@mcqj/vexflow 0.0.1-alpha.2 → 0.0.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/cjs/vexflow-bravura.js +1 -1
- package/build/cjs/vexflow-core.js +1 -1
- package/build/cjs/vexflow-debug-with-tests.js +4 -4
- package/build/cjs/vexflow-debug.js +4 -4
- package/build/cjs/vexflow.js +1 -1
- package/build/esm/src/version.js +3 -3
- package/build/playwright-artifacts/.last-run.json +4 -0
- package/package.json +4 -30
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.VexFlow=t())})(this,function(){function e(e,t,n=!0){if(typeof e!=`object`||!e)return!1;let r=e.constructor;if(n){for(;e!==null;){if(r=e.constructor,`CATEGORY`in r&&r.CATEGORY===t)return!0;e=Object.getPrototypeOf(e)}return!1}return`CATEGORY`in r&&r.CATEGORY===t}var t=t=>e(t,`Accidental`),n=t=>e(t,`Annotation`),r=t=>e(t,`Barline`),i=t=>e(t,`Dot`),a=t=>e(t,`GraceNote`),o=t=>e(t,`GraceNoteGroup`),s=t=>e(t,`Note`),c=t=>e(t,`RenderContext`),l=t=>e(t,`StaveNote`),u=t=>e(t,`StemmableNote`),d=t=>e(t,`TabNote`),f=function(e){return e.Accidental=`Accidental`,e.Annotation=`Annotation`,e.Articulation=`Articulation`,e.Barline=`Barline`,e.BarNote=`BarNote`,e.Beam=`Beam`,e.Bend=`Bend`,e.ChordSymbol=`ChordSymbol`,e.Clef=`Clef`,e.ClefNote=`ClefNote`,e.Crescendo=`Crescendo`,e.Curve=`Curve`,e.Dot=`Dot`,e.Element=`Element`,e.Flag=`Flag`,e.Fraction=`Fraction`,e.FretHandFinger=`FretHandFinger`,e.GhostNote=`GhostNote`,e.Glyph=`Glyph`,e.GlyphNote=`GlyphNote`,e.GraceNote=`GraceNote`,e.GraceNoteGroup=`GraceNoteGroup`,e.GraceTabNote=`GraceTabNote`,e.KeySignature=`KeySignature`,e.KeySigNote=`KeySigNote`,e.Modifier=`Modifier`,e.MultiMeasureRest=`MultiMeasureRest`,e.Note=`Note`,e.NoteHead=`NoteHead`,e.NoteSubGroup=`NoteSubGroup`,e.Ornament=`Ornament`,e.Parenthesis=`Parenthesis`,e.PedalMarking=`PedalMarking`,e.RenderContext=`RenderContext`,e.RepeatNote=`RepeatNote`,e.Repetition=`Repetition`,e.Stave=`Stave`,e.StaveConnector=`StaveConnector`,e.StaveHairpin=`StaveHairpin`,e.StaveLine=`StaveLine`,e.StaveModifier=`StaveModifier`,e.StaveNote=`StaveNote`,e.StaveSection=`StaveSection`,e.StaveTempo=`StaveTempo`,e.StaveText=`StaveText`,e.StaveTie=`StaveTie`,e.Stem=`Stem`,e.StemmableNote=`StemmableNote`,e.StringNumber=`StringNumber`,e.Stroke=`Stroke`,e.System=`System`,e.TabNote=`TabNote`,e.TabSlide=`TabSlide`,e.TabStave=`TabStave`,e.TabTie=`TabTie`,e.TextBracket=`TextBracket`,e.TextDynamics=`TextDynamics`,e.TextNote=`TextNote`,e.Tickable=`Tickable`,e.TimeSignature=`TimeSignature`,e.TimeSigNote=`TimeSigNote`,e.Tremolo=`Tremolo`,e.Tuplet=`Tuplet`,e.Vibrato=`Vibrato`,e.VibratoBracket=`VibratoBracket`,e.Voice=`Voice`,e.Volta=`Volta`,e}({});globalThis.structuredClone;var p=class extends Error{constructor(e,t=``){super(`[RuntimeError] `+e+`: `+t),this.code=e}};function m(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:Function(`return this`)()}function h(e,t=`undefined`,n=``){if(e===void 0)throw new p(t,n);return e}function g(e,...t){if(!t)return;let n=Array.prototype.slice.call(t).join(` `);m().console.log(e+`: `+n)}function _(...e){let t=e.join(` `),n=Error();m().console.log(`Warning: `,t,n.stack)}function v(e,t){return e%t>=t/2?parseInt(`${e/t}`,10)*t+t:parseInt(`${e/t}`,10)*t}function y(e,t){let n=t+(e-t)/2;return n%2>0&&(n=v(n*10,5)/10),n}function b(e){return`vf-${e}`}function x(e){return e%=2*Math.PI,e<0&&(e+=2*Math.PI),e}function S(e){return e.reduce((e,t)=>e+t,0)}var C=class e{static get CATEGORY(){return f.Fraction}static{this.fractionA=new e}static{this.fractionB=new e}static GCD(e,t){if(typeof e!=`number`||Number.isNaN(e)||typeof t!=`number`||Number.isNaN(t))throw new p(`BadArgument`,`Invalid numbers: ${e}, ${t}`);let n;for(;t!==0;)n=t,t=e%t,e=n;return e}static LCM(t,n){return t*n/e.GCD(t,n)}static LCMM(t){return t.length===0?0:t.length===1?t[0]:t.length===2?e.LCM(t[0],t[1]):e.LCM(t.shift(),e.LCMM(t))}constructor(e,t){this.numerator=1,this.denominator=1,this.set(e,t)}set(e=1,t=1){return this.numerator=e,this.denominator=t,this}value(){return this.numerator/this.denominator}simplify(){let t=this.numerator,n=this.denominator,r=e.GCD(t,n);return t/=r,n/=r,n<0&&(n=-n,t=-t),this.set(t,n)}add(t=0,n=1){let[r,i]=w(t,n),a=e.LCM(this.denominator,i),o=a/this.denominator,s=a/i,c=this.numerator*o+r*s;return this.set(c,a)}subtract(t=0,n=1){let[r,i]=w(t,n),a=e.LCM(this.denominator,i),o=a/this.denominator,s=a/i,c=this.numerator*o-r*s;return this.set(c,a)}multiply(e=1,t=1){let[n,r]=w(e,t);return this.set(this.numerator*n,this.denominator*r)}divide(e=1,t=1){let[n,r]=w(e,t);return this.set(this.numerator*r,this.denominator*n)}equals(t){let n=e.fractionA.copy(t).simplify(),r=e.fractionB.copy(this).simplify();return n.numerator===r.numerator&&n.denominator===r.denominator}greaterThan(t){let n=e.fractionA.copy(this);return n.subtract(t),n.numerator>0}greaterThanEquals(t){let n=e.fractionA.copy(this);return n.subtract(t),n.numerator>=0}lessThan(e){return!this.greaterThanEquals(e)}lessThanEquals(e){return!this.greaterThan(e)}clone(){return new e(this.numerator,this.denominator)}copy(e){return typeof e==`number`?this.set(e):this.set(e.numerator,e.denominator)}quotient(){return Math.floor(this.numerator/this.denominator)}remainder(){return this.numerator%this.denominator}makeAbs(){return this.denominator=Math.abs(this.denominator),this.numerator=Math.abs(this.numerator),this}toString(){return`${this.numerator}/${this.denominator}`}toSimplifiedString(){return e.fractionA.copy(this).simplify().toString()}toMixedString(){let t=``,n=this.quotient(),r=e.fractionA.copy(this);return n<0&&r.makeAbs(),n===0?t=r.numerator===0?`0`:r.toSimplifiedString():(t+=n,r.numerator!==0&&(t+=` ${r.toSimplifiedString()}`)),t}parse(e){let t=e.split(`/`),n=parseInt(t[0],10),r=t[1]?parseInt(t[1],10):1;return this.set(n,r)}};function w(e,t=1){return typeof e==`number`?[e,t]:[e.numerator,e.denominator]}var T=class e{static{this.cacheStyle=new Map}static{this.cacheFont=new Map}static clear(e){e?(this.cacheFont.delete(e),this.cacheStyle.delete(e)):(this.cacheFont.clear(),this.cacheStyle.clear())}static getFontInfo(t){let n=this.cacheFont.get(t);return n||(n={family:e.get(`${t}.fontFamily`),size:e.get(`${t}.fontSize`)*e.get(`${t}.fontScale`),weight:e.get(`${t}.fontWeight`),style:e.get(`${t}.fontStyle`)},this.cacheFont.set(t,n)),structuredClone(n)}static getStyle(t){let n=this.cacheStyle.get(t);return n||(n={fillStyle:e.get(`${t}.fillStyle`),strokeStyle:e.get(`${t}.strokeStyle`),lineWidth:e.get(`${t}.lineWidth`),lineDash:e.get(`${t}.lineDash`),shadowBlur:e.get(`${t}.shadowBlur`),shadowColor:e.get(`${t}.shadowColor`)},this.cacheStyle.set(t,n)),structuredClone(n)}static get(e,t){let n=e.split(`.`),r=n.pop(),i=E,a=t;for(;i;){a=i[r]??a;let e=n.shift();if(e)i=i[e];else break}return a}},E={pointerRect:!1,fontFamily:`Bravura,Academico`,fontSize:30,fontScale:1,fontWeight:`normal`,fontStyle:`normal`,Accidental:{cautionary:{fontSize:20},grace:{fontSize:20},noteheadAccidentalPadding:1,leftPadding:2,accidentalSpacing:3},Annotation:{fontSize:10},Bend:{fontSize:10,line:{strokeStyle:`#777777`,lineWidth:1}},ChordSymbol:{fontSize:12,spacing:.05,subscriptOffset:.2,superscriptOffset:-.4,superSubRatio:.6},FretHandFinger:{fontSize:9,fontWeight:`bold`},GraceNote:{fontScale:2/3},GraceTabNote:{fontScale:2/3},NoteHead:{minPadding:2},PedalMarking:{text:{fontSize:12,fontStyle:`italic`}},Repetition:{text:{fontSize:12,fontWeight:`bold`,offsetX:12,offsetY:25,spacing:5},coda:{offsetY:25},segno:{offsetY:10}},Stave:{strokeStyle:`#999999`,fontSize:8,padding:12,endPaddingMax:10,endPaddingMin:5,unalignedNotePadding:10},StaveConnector:{text:{fontSize:16}},StaveLine:{fontSize:10},StaveNote:{pointerRect:!0},StaveSection:{fontSize:10,fontWeight:`bold`,lineWidth:2,padding:2,strokeStyle:`black`},StaveTempo:{fontSize:14,glyph:{fontSize:25},name:{fontWeight:`bold`}},StaveText:{fontSize:16},StaveTie:{fontSize:10},Stem:{strokeStyle:`black`},StringNumber:{fontSize:10,fontWeight:`bold`,verticalPadding:8,stemPadding:2,leftPadding:5,rightPadding:6},Stroke:{text:{fontSize:10,fontStyle:`italic`,fontWeight:`bold`}},TabNote:{text:{fontSize:9}},TabSlide:{fontSize:10,fontStyle:`italic`,fontWeight:`bold`},TabStave:{strokeStyle:`#999999`,fontSize:8},TabTie:{fontSize:10},TextBracket:{fontSize:15,fontStyle:`italic`},TextNote:{text:{fontSize:12}},Tremolo:{spacing:7},Tuplet:{pointerRect:!0,yOffset:0,textYOffset:2,bracket:{padding:5,lineWidth:1,legLength:10},suffix:{fontScale:1/2,extraSpacing:1,suffixOffsetY:-3}},Volta:{fontSize:9,fontWeight:`bold`}},D=class e{static copy(t){return new e(t.x,t.y,t.w,t.h)}constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r}getX(){return this.x}getY(){return this.y}getW(){return this.w}getH(){return this.h}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setW(e){return this.w=e,this}setH(e){return this.h=e,this}move(e,t){return this.x+=e,this.y+=t,this}clone(){return e.copy(this)}mergeWith(e){let t=e,n=this.x<t.x?this.x:t.x,r=this.y<t.y?this.y:t.y,i=Math.max(this.x+this.w,t.x+t.w)-n,a=Math.max(this.y+this.h,t.y+t.h)-r;return this.x=n,this.y=r,this.w=i,this.h=a,this}},O=function(e){return e.NORMAL=`normal`,e.BOLD=`bold`,e}({}),ee=function(e){return e.NORMAL=`normal`,e.ITALIC=`italic`,e}({}),te,k=class e{static{this.scaleToPxFrom={pt:4/3,px:1,em:16,"%":4/25,in:96,mm:96/25.4,cm:96/2.54}}static convertSizeToPixelValue(t){if(typeof t==`number`)return t*e.scaleToPxFrom.pt;{let n=parseFloat(t);if(isNaN(n))return 0;let r=t.replace(/[\d.\s]/g,``).toLowerCase();return n*(e.scaleToPxFrom[r]??1)}}static convertSizeToPointValue(t){if(typeof t==`number`)return t;{let n=parseFloat(t);if(isNaN(n))return 0;let r=t.replace(/[\d.\s]/g,``).toLowerCase();return n*((e.scaleToPxFrom[r]??1)/e.scaleToPxFrom.pt)}}static validate(t,n,r,i){if(typeof t==`string`&&n===void 0&&r===void 0&&i===void 0)return e.fromCSSString(t);let a;return typeof t==`object`?(a=t.family,n=t.size,r=t.weight,i=t.style):a=t,a??=T.get(`fontFamily`),n??=T.get(`fontSize`)+`pt`,r??=`normal`,i??=`normal`,r===``&&(r=`normal`),i===``&&(i=`normal`),typeof n==`number`&&(n=`${n}pt`),typeof r==`number`&&(r=r.toString()),{family:a,size:n,weight:r,style:i}}static fromCSSString(e){te||=document.createElement(`span`),te.style.font=e;let{fontFamily:t,fontSize:n,fontWeight:r,fontStyle:i}=te.style;return{family:t,size:n,weight:r,style:i}}static toCSSString(e){if(!e)return``;let t,n=e.style;t=n===`normal`||n===``||n===void 0?``:n.trim()+` `;let r,i=e.weight;r=i===`normal`||i===``||i===void 0?``:typeof i==`number`?i+` `:i.trim()+` `;let a,o=e.size;a=o===void 0?T.get(`fontSize`)+`pt`:typeof o==`number`?o+`pt `:o.trim()+` `;let s=e.family??T.get(`fontFamily`);return`${t}${r}${a}${s}`}static scaleSize(e,t){if(typeof e==`number`)return e*t;{let n=parseFloat(e),r=e.replace(/[\d.\s]/g,``);return`${n*t}${r}`}}static isBold(e){if(!e)return!1;if(typeof e==`number`)return e>=600;{let t=parseInt(e,10);return isNaN(t)?e.toLowerCase()===`bold`:t>=600}}static isItalic(e){return e?e.toLowerCase()===`italic`:!1}static{this.HOST_URL=`https://cdn.jsdelivr.net/npm/@vexflow-fonts/`}static{this.FILES={Academico:`academico/academico.woff2`,Bravura:`bravura/bravura.woff2`,"Bravura Text":`bravuratext/bravuratext.woff2`,Edwin:`edwin/edwin-roman.woff2`,"Finale Ash":`finaleash/finaleash.woff2`,"Finale Ash Text":`finaleashtext/finaleashtext.woff2`,"Finale Broadway":`finalebroadway/finalebroadway.woff2`,"Finale Broadway Text":`finalebroadwaytext/finalebroadwaytext.woff2`,"Finale Jazz":`finalejazz/finalejazz.woff2`,"Finale Jazz Text":`finalejazztext/finalejazztext.woff2`,"Finale Maestro":`finalemaestro/finalemaestro.woff2`,"Finale Maestro Text":`finalemaestrotext/finalemaestrotext-regular.woff2`,Gonville:`gonville/gonville.woff2`,Gootville:`gootville/gootville.woff2`,"Gootville Text":`gootvilletext/gootvilletext.woff2`,Leipzig:`leipzig/leipzig.woff2`,Leland:`leland/leland.woff2`,"Leland Text":`lelandtext/lelandtext.woff2`,MuseJazz:`musejazz/musejazz.woff2`,"MuseJazz Text":`musejazztext/musejazztext.woff2`,Nepomuk:`nepomuk/nepomuk.woff2`,Petaluma:`petaluma/petaluma.woff2`,"Petaluma Script":`petalumascript/petalumascript.woff2`,"Petaluma Text":`petalumatext/petalumatext.woff2`,"Roboto Slab":`robotoslab/robotoslab-regular-400.woff2`,Sebastian:`sebastian/sebastian.woff2`,"Sebastian Text":`sebastiantext/sebastiantext.woff2`}}static async load(t,n,r){if(typeof FontFace>`u`)return Promise.reject(Error(`FontFace API is not available in this environment. Cannot load fonts.`));if(n===void 0){let r=e.FILES;if(!(t in r))return Promise.reject(Error(`Font ${t} not found in Font.FILES`));n=e.HOST_URL+r[t]}let i=new FontFace(t,`url(${n})`,r),a=i.load(),o;return typeof document<`u`?o=document.fonts:typeof self<`u`&&`fonts`in self&&(o=self.fonts),o?.add(i),a}static getURLForFont(t){let n=e.FILES;if(t in n)return e.HOST_URL+n[t]}},ne=class{constructor(){this.id={},this.type={},this.class={}}},re=class e{static getDefaultRegistry(){return e.defaultRegistry}static enableDefaultRegistry(t){e.defaultRegistry=t}static disableDefaultRegistry(){e.defaultRegistry=void 0}constructor(){this.index=new ne}clear(){return this.index=new ne,this}setIndexValue(e,t,n,r){let i=this.index;i[e][t]||(i[e][t]={}),i[e][t][n]=r}updateIndex({id:e,name:t,value:n,oldValue:r}){let i=this.getElementById(e);r!==void 0&&this.index[t][r]&&delete this.index[t][r][e],n&&i&&this.setIndexValue(t,n,i.getAttribute(`id`),i)}register(e,t){if(t||=e.getAttribute(`id`),!t)throw new p("Can't add element without `id` attribute to registry");return e.setAttribute(`id`,t),this.setIndexValue(`id`,t,t,e),this.updateIndex({id:t,name:`type`,value:e.getAttribute(`type`),oldValue:void 0}),e.onRegister(this),this}getElementById(e){return this.index.id?.[e]?.[e]}getElementsByAttribute(e,t){let n=this.index[e];if(n){let e=n[t];if(e)return Object.keys(e).map(t=>e[t])}return[]}getElementsByType(e){return this.getElementsByAttribute(`type`,e)}getElementsByClass(e){return this.getElementsByAttribute(`class`,e)}onUpdate(e){return[`id`,`type`,`class`].includes(e.name)&&this.updateIndex(e),this}},A=class e{static get CATEGORY(){return f.Element}static{this.ID=1e3}static newID(){return`auto${e.ID++}`}static setTextMeasurementCanvas(t){e.txtCanvas=t}static getTextMeasurementCanvas(){let t=e.txtCanvas;return t||(typeof document<`u`?t=document.createElement(`canvas`):typeof OffscreenCanvas<`u`&&(t=new OffscreenCanvas(300,150)),e.txtCanvas=t),t}constructor(t){this.children=[],this.style={},this._text=``,this.metricsValid=!1,this._textMetrics={fontBoundingBoxAscent:0,fontBoundingBoxDescent:0,actualBoundingBoxAscent:0,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:0,width:0,alphabeticBaseline:0,emHeightAscent:0,emHeightDescent:0,hangingBaseline:0,ideographicBaseline:0},this._height=0,this._width=0,this.xShift=0,this.yShift=0,this.x=0,this.y=0,this.attrs={id:e.newID(),type:t??this.constructor.CATEGORY,class:``},this.rendered=!1,this._fontInfo=T.getFontInfo(this.attrs.type),this.style=T.getStyle(this.attrs.type),this.fontScale=T.get(`${this.attrs.type}.fontScale`),this.shouldDrawPointerRect=T.get(`${this.attrs.type}.pointerRect`),re.getDefaultRegistry()?.register(this)}addChild(e){if(e.parent)throw new p(`Element`,`Parent already defined`);return e.parent=this,this.children.push(e),this}getCategory(){return this.attrs.type}setStyle(e){return this.style=e,this}setGroupStyle(e){return this.style=e,this.children.forEach(t=>t.setGroupStyle(e)),this}getStyle(){return this.style}applyStyle(e=this.context,t=this.getStyle()){return e?(t.shadowColor&&e.setShadowColor(t.shadowColor),t.shadowBlur&&e.setShadowBlur(t.shadowBlur),t.fillStyle&&e.setFillStyle(t.fillStyle),t.strokeStyle&&e.setStrokeStyle(t.strokeStyle),t.lineWidth&&e.setLineWidth(t.lineWidth),t.lineDash&&e.setLineDash(t.lineDash.split(` `).map(Number)),this):this}drawWithStyle(){let e=this.checkContext();return e.save(),this.applyStyle(e),this.draw(),e.restore(),this}draw(){throw new p(`Element`,`Draw not defined`)}hasClass(e){return this.attrs.class?this.attrs.class?.split(` `).indexOf(e)!==-1:!1}addClass(e){return this.hasClass(e)?this:(this.attrs.class?this.attrs.class=`${this.attrs.class} ${e}`:this.attrs.class=`${e}`,this.registry?.onUpdate({id:this.attrs.id,name:`class`,value:e,oldValue:void 0}),this)}removeClass(e){if(!this.hasClass(e))return this;let t=this.attrs.class?.split(` `);return t&&(t.splice(t.indexOf(e)),this.attrs.class=t.join(` `)),this.registry?.onUpdate({id:this.attrs.id,name:`class`,value:void 0,oldValue:e}),this}onRegister(e){return this.registry=e,this}isRendered(){return this.rendered}setRendered(e=!0){return this.rendered=e,this}getAttributes(){return this.attrs}getAttribute(e){return this.attrs[e]}getSVGElement(e=``){let t=b(this.attrs.id+e),n=document.getElementById(t);if(n)return n}setAttribute(e,t){let n=this.attrs.id,r=this.attrs[e];return this.attrs[e]=t,this.registry?.onUpdate({id:n,name:e,value:t,oldValue:r}),this}getBoundingBox(){return new D(this.x+this.xShift,this.y+this.yShift-this.textMetrics.actualBoundingBoxAscent,this.width,this.height)}getContext(){return this.context}drawPointerRect(){if(this.shouldDrawPointerRect){let e=this.getBoundingBox();this.context?.pointerRect(e.getX(),e.getY(),e.getW(),e.getH())}}setContext(e){return this.context=e,this}checkContext(){return h(this.context,`NoContext`,`No rendering context attached to instance.`)}set font(e){this.setFont(e)}get font(){return k.toCSSString(this._fontInfo)}setFont(e,t,n,r){let i=T.getFontInfo(this.attrs.type),a=typeof e==`object`,o=typeof e==`string`,s=t===void 0&&n===void 0&&r===void 0;return this.metricsValid=!1,this._fontInfo=a?{...i,...e}:o&&s?k.fromCSSString(e):k.validate(e??i.family,t??i.size,n??i.weight,r??i.style),this}getFont(){return k.toCSSString(this._fontInfo)}get fontInfo(){return this._fontInfo}set fontInfo(e){this.setFont(e)}setFontSize(e){let t=this.fontInfo;return this.setFont(t.family,e,t.weight,t.style),this}getFontSize(){return this.fontSize}getFontScale(){return this.fontScale}set fontSize(e){this.setFontSize(e)}get fontSize(){let e=this.fontInfo.size;return typeof e==`number`&&(e=`${e}pt`),e}get fontSizeInPoints(){return k.convertSizeToPointValue(this.fontSize)}get fontSizeInPixels(){return k.convertSizeToPixelValue(this.fontSize)}get fontStyle(){return this.fontInfo.style}set fontStyle(e){let t=this.fontInfo;this.setFont(t.family,t.size,t.weight,e)}get fontWeight(){return this.fontInfo.weight+``}set fontWeight(e){let t=this.fontInfo;this.setFont(t.family,t.size,e,t.style)}getWidth(){return this.width}get width(){return this.metricsValid||this.measureText(),this._width}setWidth(e){return this.width=e,this}set width(e){this.metricsValid||this.measureText(),this._width=e}setX(e){return this.x=e,this}getX(){return this.x}getY(){return this.y}setY(e){return this.y=e,this}setYShift(e){return this.yShift=e,this}getYShift(){return this.yShift}setXShift(e){return this.xShift=e,this}getXShift(){return this.xShift}setText(e){return this.text=e,this}set text(e){this.metricsValid=!1,this._text=e}getText(){return this._text}get text(){return this._text}renderText(e,t,n){e.setFont(this._fontInfo),e.fillText(this._text,t+this.x+this.xShift,n+this.y+this.yShift),this.children.forEach(r=>{e.setFont(r.fontInfo),e.fillText(r.text,t+r.x+r.xShift,n+r.y+r.yShift)})}measureText(){let t=e.getTextMeasurementCanvas()?.getContext(`2d`);return t?(t.font=k.toCSSString(k.validate(this.fontInfo)),this._textMetrics=t.measureText(this.text),this._height=this._textMetrics.actualBoundingBoxAscent+this._textMetrics.actualBoundingBoxDescent,this._width=this._textMetrics.width,this.metricsValid=!0,this._textMetrics):(console.warn(`Element: No context for txtCanvas. Returning empty text metrics.`),this._textMetrics)}static measureWidth(t,n=``){let r=e.getTextMeasurementCanvas()?.getContext(`2d`);return r?(r.font=k.toCSSString(T.getFontInfo(n)),r.measureText(t).width):(console.warn(`Element: No context for txtCanvas. Returning empty text metrics.`),0)}getTextMetrics(){return this.textMetrics}get textMetrics(){return this.metricsValid||this.measureText(),this._textMetrics}getHeight(){return this.height}get height(){return this.metricsValid||this.measureText(),this._height}set height(e){this.metricsValid||this.measureText(),this._height=e}setOriginX(e){let t=this.getBoundingBox(),n=(e-Math.abs((t.getX()-this.xShift)/t.getW()))*t.getW();this.xShift=-n}setOriginY(e){let t=this.getBoundingBox(),n=(e-Math.abs((t.getY()-this.yShift)/t.getH()))*t.getH();this.yShift=-n}setOrigin(e,t){this.setOriginX(e),this.setOriginY(t)}},j=function(e){return e[e.CENTER=0]=`CENTER`,e[e.LEFT=1]=`LEFT`,e[e.RIGHT=2]=`RIGHT`,e[e.ABOVE=3]=`ABOVE`,e[e.BELOW=4]=`BELOW`,e}({}),M=class e extends A{static get CATEGORY(){return f.Modifier}static get Position(){return j}static get PositionString(){return{center:0,above:3,below:4,left:1,right:2}}constructor(){super(),this.width=0,this.textLine=0,this.position=e.Position.LEFT,this.spacingFromNextModifier=0}reset(){}getNote(){return h(this.note,`NoNote`,`Modifier has no note.`)}checkAttachedNote(){let e=this.getCategory();return h(this.index,`NoIndex`,`Can't draw ${e} without an index.`),h(this.note,`NoNote`,`Can't draw ${e} without a note.`)}setNote(e){return this.note=e,this}getIndex(){return this.index}checkIndex(){return h(this.index,`NoIndex`,`Modifier has an invalid index.`)}setIndex(e){return this.index=e,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return h(this.modifierContext,`NoModifierContext`,`Modifier Context Required`)}setModifierContext(e){return this.modifierContext=e,this}getPosition(){return this.position}setPosition(t){return this.position=typeof t==`string`?e.PositionString[t]:t,this.reset(),this}setTextLine(e){return this.textLine=e,this}setYShift(e){return this.yShift=e,this}setSpacingFromNextModifier(e){this.spacingFromNextModifier=e}getSpacingFromNextModifier(){return this.spacingFromNextModifier}setXShift(t){return this.xShift=0,this.position===e.Position.LEFT?this.xShift-=t:this.xShift+=t,this}getXShift(){return this.xShift}draw(){throw this.checkContext(),new p(`NotImplemented`,`draw() not implemented for this modifier.`)}alignSubNotesWithNote(t,n,r=e.Position.LEFT){let i=n.getTickContext(),a=i.getMetrics(),o=n.getStave(),s=r===e.Position.RIGHT?i.getX()+this.getSpacingFromNextModifier()*t.length+10:i.getX()-a.modLeftPx-a.modRightPx+this.getSpacingFromNextModifier();t.forEach(e=>{let t=e.getTickContext();o&&e.setStave(o),t.setXOffset(s)})}},N=class e{static get NUM_TONES(){return this.canonicalNotes.length}static get roots(){return[`c`,`d`,`e`,`f`,`g`,`a`,`b`]}static get rootValues(){return[0,2,4,5,7,9,11]}static get rootIndexes(){return{c:0,d:1,e:2,f:3,g:4,a:5,b:6}}static get canonicalNotes(){return[`c`,`c#`,`d`,`d#`,`e`,`f`,`f#`,`g`,`g#`,`a`,`a#`,`b`]}static get diatonicIntervals(){return[`unison`,`m2`,`M2`,`m3`,`M3`,`p4`,`dim5`,`p5`,`m6`,`M6`,`b7`,`M7`,`octave`]}static get diatonicAccidentals(){return{unison:{note:0,accidental:0},m2:{note:1,accidental:-1},M2:{note:1,accidental:0},m3:{note:2,accidental:-1},M3:{note:2,accidental:0},p4:{note:3,accidental:0},dim5:{note:4,accidental:-1},p5:{note:4,accidental:0},m6:{note:5,accidental:-1},M6:{note:5,accidental:0},b7:{note:6,accidental:-1},M7:{note:6,accidental:0},octave:{note:7,accidental:0}}}static get intervals(){return{u:0,unison:0,m2:1,b2:1,min2:1,S:1,H:1,2:2,M2:2,maj2:2,T:2,W:2,m3:3,b3:3,min3:3,M3:4,3:4,maj3:4,4:5,p4:5,"#4":6,b5:6,aug4:6,dim5:6,5:7,p5:7,"#5":8,b6:8,aug5:8,6:9,M6:9,maj6:9,b7:10,m7:10,min7:10,dom7:10,M7:11,maj7:11,8:12,octave:12}}static get scales(){return{major:[2,2,1,2,2,2,1],minor:[2,1,2,2,1,2,2],ionian:[2,2,1,2,2,2,1],dorian:[2,1,2,2,2,1,2],phyrgian:[1,2,2,2,1,2,2],lydian:[2,2,2,1,2,2,1],mixolydian:[2,2,1,2,2,1,2],aeolian:[2,1,2,2,1,2,2],locrian:[1,2,2,1,2,2,2]}}static get scaleTypes(){return{M:e.scales.major,m:e.scales.minor}}static get accidentals(){return[`bb`,`b`,`n`,`#`,`##`]}static get noteValues(){return{c:{rootIndex:0,intVal:0},cn:{rootIndex:0,intVal:0},"c#":{rootIndex:0,intVal:1},"c##":{rootIndex:0,intVal:2},cb:{rootIndex:0,intVal:11},cbb:{rootIndex:0,intVal:10},d:{rootIndex:1,intVal:2},dn:{rootIndex:1,intVal:2},"d#":{rootIndex:1,intVal:3},"d##":{rootIndex:1,intVal:4},db:{rootIndex:1,intVal:1},dbb:{rootIndex:1,intVal:0},e:{rootIndex:2,intVal:4},en:{rootIndex:2,intVal:4},"e#":{rootIndex:2,intVal:5},"e##":{rootIndex:2,intVal:6},eb:{rootIndex:2,intVal:3},ebb:{rootIndex:2,intVal:2},f:{rootIndex:3,intVal:5},fn:{rootIndex:3,intVal:5},"f#":{rootIndex:3,intVal:6},"f##":{rootIndex:3,intVal:7},fb:{rootIndex:3,intVal:4},fbb:{rootIndex:3,intVal:3},g:{rootIndex:4,intVal:7},gn:{rootIndex:4,intVal:7},"g#":{rootIndex:4,intVal:8},"g##":{rootIndex:4,intVal:9},gb:{rootIndex:4,intVal:6},gbb:{rootIndex:4,intVal:5},a:{rootIndex:5,intVal:9},an:{rootIndex:5,intVal:9},"a#":{rootIndex:5,intVal:10},"a##":{rootIndex:5,intVal:11},ab:{rootIndex:5,intVal:8},abb:{rootIndex:5,intVal:7},b:{rootIndex:6,intVal:11},bn:{rootIndex:6,intVal:11},"b#":{rootIndex:6,intVal:0},"b##":{rootIndex:6,intVal:1},bb:{rootIndex:6,intVal:10},bbb:{rootIndex:6,intVal:9}}}isValidNoteValue(t){return t>=0&&t<e.canonicalNotes.length}isValidIntervalValue(t){return t>=0&&t<e.diatonicIntervals.length}getNoteParts(e){if(!e||e.length<1||e.length>3)throw new p(`BadArguments`,`Invalid note name: `+e);let t=e.toLowerCase(),n=/^([cdefgab])(b|bb|n|#|##)?$/.exec(t);if(n!==null)return{root:n[1],accidental:n[2]};throw new p(`BadArguments`,`Invalid note name: `+e)}getKeyParts(e){if(!e||e.length<1)throw new p(`BadArguments`,`Invalid key: `+e);let t=e.toLowerCase(),n=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(t);if(n!==null){let e=n[1],t=n[2],r=n[3];return r||=`M`,{root:e,accidental:t,type:r}}throw new p(`BadArguments`,`Invalid key: ${e}`)}getNoteValue(t){let n=e.noteValues[t];if(n===void 0)throw new p(`BadArguments`,`Invalid note name: ${t}`);return n.intVal}getIntervalValue(t){let n=e.intervals[t];if(n===void 0)throw new p(`BadArguments`,`Invalid interval name: ${t}`);return n}getCanonicalNoteName(t){if(!this.isValidNoteValue(t))throw new p(`BadArguments`,`Invalid note value: ${t}`);return e.canonicalNotes[t]}getCanonicalIntervalName(t){if(!this.isValidIntervalValue(t))throw new p(`BadArguments`,`Invalid interval value: ${t}`);return e.diatonicIntervals[t]}getRelativeNoteValue(t,n,r=1){if(r!==1&&r!==-1)throw new p(`BadArguments`,`Invalid direction: ${r}`);let i=(t+r*n)%e.NUM_TONES;return i<0&&(i+=e.NUM_TONES),i}getRelativeNoteName(t,n){let r=this.getNoteParts(t),i=this.getNoteValue(r.root),a=n-i;if(Math.abs(a)>e.NUM_TONES-3){let r=1;a>0&&(r=-1);let o=(n+1+(i+1))%e.NUM_TONES*r;if(Math.abs(o)>2)throw new p(`BadArguments`,`Notes not related: ${t}, ${n})`);a=o}if(Math.abs(a)>2)throw new p(`BadArguments`,`Notes not related: ${t}, ${n})`);let o=r.root;if(a>0)for(let e=1;e<=a;++e)o+=`#`;else if(a<0)for(let e=-1;e>=a;--e)o+=`b`;return o}getScaleTones(e,t){let n=[e],r=e;for(let i=0;i<t.length;i++)r=this.getRelativeNoteValue(r,t[i]),r!==e&&n.push(r);return n}getIntervalBetween(t,n,r=1){if(r!==1&&r!==-1)throw new p(`BadArguments`,`Invalid direction: ${r}`);if(!this.isValidNoteValue(t)||!this.isValidNoteValue(n))throw new p(`BadArguments`,`Invalid notes: ${t}, ${n}`);let i=r===1?n-t:t-n;return i<0&&(i+=e.NUM_TONES),i}createScaleMap(t){let n=this.getKeyParts(t);if(!n.type)throw new p(`BadArguments`,`Unsupported key type: undefined`);let r=e.scaleTypes[n.type],i=n.root;if(n.accidental&&(i+=n.accidental),!r)throw new p(`BadArguments`,`Unsupported key type: `+t);let a=this.getScaleTones(this.getNoteValue(i),r),o=e.rootIndexes[n.root],s={};for(let t=0;t<e.roots.length;++t){let n=(o+t)%e.roots.length,r=e.roots[n],i=this.getRelativeNoteName(r,a[t]);i.length===1&&(i+=`n`),s[r]=i}return s}},P=function(e){return e.null=`\0`,e.fourStringTabClef=``,e.sixStringTabClef=``,e.accSagittal11LargeDiesisDown=``,e.accSagittal11LargeDiesisUp=``,e.accSagittal11MediumDiesisDown=``,e.accSagittal11MediumDiesisUp=``,e.accSagittal11v19LargeDiesisDown=``,e.accSagittal11v19LargeDiesisUp=``,e.accSagittal11v19MediumDiesisDown=``,e.accSagittal11v19MediumDiesisUp=``,e.accSagittal11v49CommaDown=``,e.accSagittal11v49CommaUp=``,e.accSagittal143CommaDown=``,e.accSagittal143CommaUp=``,e.accSagittal17CommaDown=``,e.accSagittal17CommaUp=``,e.accSagittal17KleismaDown=``,e.accSagittal17KleismaUp=``,e.accSagittal19CommaDown=``,e.accSagittal19CommaUp=``,e.accSagittal19SchismaDown=``,e.accSagittal19SchismaUp=``,e.accSagittal1MinaDown=``,e.accSagittal1MinaUp=``,e.accSagittal1TinaDown=``,e.accSagittal1TinaUp=``,e.accSagittal23CommaDown=``,e.accSagittal23CommaUp=``,e.accSagittal23SmallDiesisDown=``,e.accSagittal23SmallDiesisUp=``,e.accSagittal25SmallDiesisDown=``,e.accSagittal25SmallDiesisUp=``,e.accSagittal2MinasDown=``,e.accSagittal2MinasUp=``,e.accSagittal2TinasDown=``,e.accSagittal2TinasUp=``,e.accSagittal35LargeDiesisDown=``,e.accSagittal35LargeDiesisUp=``,e.accSagittal35MediumDiesisDown=``,e.accSagittal35MediumDiesisUp=``,e.accSagittal3TinasDown=``,e.accSagittal3TinasUp=``,e.accSagittal49LargeDiesisDown=``,e.accSagittal49LargeDiesisUp=``,e.accSagittal49MediumDiesisDown=``,e.accSagittal49MediumDiesisUp=``,e.accSagittal49SmallDiesisDown=``,e.accSagittal49SmallDiesisUp=``,e.accSagittal4TinasDown=``,e.accSagittal4TinasUp=``,e.accSagittal55CommaDown=``,e.accSagittal55CommaUp=``,e.accSagittal5CommaDown=``,e.accSagittal5CommaUp=``,e.accSagittal5TinasDown=``,e.accSagittal5TinasUp=``,e.accSagittal5v11SmallDiesisDown=``,e.accSagittal5v11SmallDiesisUp=``,e.accSagittal5v13LargeDiesisDown=``,e.accSagittal5v13LargeDiesisUp=``,e.accSagittal5v13MediumDiesisDown=``,e.accSagittal5v13MediumDiesisUp=``,e.accSagittal5v19CommaDown=``,e.accSagittal5v19CommaUp=``,e.accSagittal5v23SmallDiesisDown=``,e.accSagittal5v23SmallDiesisUp=``,e.accSagittal5v49MediumDiesisDown=``,e.accSagittal5v49MediumDiesisUp=``,e.accSagittal5v7KleismaDown=``,e.accSagittal5v7KleismaUp=``,e.accSagittal6TinasDown=``,e.accSagittal6TinasUp=``,e.accSagittal7CommaDown=``,e.accSagittal7CommaUp=``,e.accSagittal7TinasDown=``,e.accSagittal7TinasUp=``,e.accSagittal7v11CommaDown=``,e.accSagittal7v11CommaUp=``,e.accSagittal7v11KleismaDown=``,e.accSagittal7v11KleismaUp=``,e.accSagittal7v19CommaDown=``,e.accSagittal7v19CommaUp=``,e.accSagittal8TinasDown=``,e.accSagittal8TinasUp=``,e.accSagittal9TinasDown=``,e.accSagittal9TinasUp=``,e.accSagittalAcute=``,e.accSagittalDoubleFlat=``,e.accSagittalDoubleFlat11v49CUp=``,e.accSagittalDoubleFlat143CUp=``,e.accSagittalDoubleFlat17CUp=``,e.accSagittalDoubleFlat17kUp=``,e.accSagittalDoubleFlat19CUp=``,e.accSagittalDoubleFlat19sUp=``,e.accSagittalDoubleFlat23CUp=``,e.accSagittalDoubleFlat23SUp=``,e.accSagittalDoubleFlat25SUp=``,e.accSagittalDoubleFlat49SUp=``,e.accSagittalDoubleFlat55CUp=``,e.accSagittalDoubleFlat5CUp=``,e.accSagittalDoubleFlat5v11SUp=``,e.accSagittalDoubleFlat5v19CUp=``,e.accSagittalDoubleFlat5v23SUp=``,e.accSagittalDoubleFlat5v7kUp=``,e.accSagittalDoubleFlat7CUp=``,e.accSagittalDoubleFlat7v11CUp=``,e.accSagittalDoubleFlat7v11kUp=``,e.accSagittalDoubleFlat7v19CUp=``,e.accSagittalDoubleSharp=``,e.accSagittalDoubleSharp11v49CDown=``,e.accSagittalDoubleSharp143CDown=``,e.accSagittalDoubleSharp17CDown=``,e.accSagittalDoubleSharp17kDown=``,e.accSagittalDoubleSharp19CDown=``,e.accSagittalDoubleSharp19sDown=``,e.accSagittalDoubleSharp23CDown=``,e.accSagittalDoubleSharp23SDown=``,e.accSagittalDoubleSharp25SDown=``,e.accSagittalDoubleSharp49SDown=``,e.accSagittalDoubleSharp55CDown=``,e.accSagittalDoubleSharp5CDown=``,e.accSagittalDoubleSharp5v11SDown=``,e.accSagittalDoubleSharp5v19CDown=``,e.accSagittalDoubleSharp5v23SDown=``,e.accSagittalDoubleSharp5v7kDown=``,e.accSagittalDoubleSharp7CDown=``,e.accSagittalDoubleSharp7v11CDown=``,e.accSagittalDoubleSharp7v11kDown=``,e.accSagittalDoubleSharp7v19CDown=``,e.accSagittalFlat=``,e.accSagittalFlat11LDown=``,e.accSagittalFlat11MDown=``,e.accSagittalFlat11v19LDown=``,e.accSagittalFlat11v19MDown=``,e.accSagittalFlat11v49CDown=``,e.accSagittalFlat11v49CUp=``,e.accSagittalFlat143CDown=``,e.accSagittalFlat143CUp=``,e.accSagittalFlat17CDown=``,e.accSagittalFlat17CUp=``,e.accSagittalFlat17kDown=``,e.accSagittalFlat17kUp=``,e.accSagittalFlat19CDown=``,e.accSagittalFlat19CUp=``,e.accSagittalFlat19sDown=``,e.accSagittalFlat19sUp=``,e.accSagittalFlat23CDown=``,e.accSagittalFlat23CUp=``,e.accSagittalFlat23SDown=``,e.accSagittalFlat23SUp=``,e.accSagittalFlat25SDown=``,e.accSagittalFlat25SUp=``,e.accSagittalFlat35LDown=``,e.accSagittalFlat35MDown=``,e.accSagittalFlat49LDown=``,e.accSagittalFlat49MDown=``,e.accSagittalFlat49SDown=``,e.accSagittalFlat49SUp=``,e.accSagittalFlat55CDown=``,e.accSagittalFlat55CUp=``,e.accSagittalFlat5CDown=``,e.accSagittalFlat5CUp=``,e.accSagittalFlat5v11SDown=``,e.accSagittalFlat5v11SUp=``,e.accSagittalFlat5v13LDown=``,e.accSagittalFlat5v13MDown=``,e.accSagittalFlat5v19CDown=``,e.accSagittalFlat5v19CUp=``,e.accSagittalFlat5v23SDown=``,e.accSagittalFlat5v23SUp=``,e.accSagittalFlat5v49MDown=``,e.accSagittalFlat5v7kDown=``,e.accSagittalFlat5v7kUp=``,e.accSagittalFlat7CDown=``,e.accSagittalFlat7CUp=``,e.accSagittalFlat7v11CDown=``,e.accSagittalFlat7v11CUp=``,e.accSagittalFlat7v11kDown=``,e.accSagittalFlat7v11kUp=``,e.accSagittalFlat7v19CDown=``,e.accSagittalFlat7v19CUp=``,e.accSagittalFractionalTinaDown=``,e.accSagittalFractionalTinaUp=``,e.accSagittalGrave=``,e.accSagittalShaftDown=``,e.accSagittalShaftUp=``,e.accSagittalSharp=``,e.accSagittalSharp11LUp=``,e.accSagittalSharp11MUp=``,e.accSagittalSharp11v19LUp=``,e.accSagittalSharp11v19MUp=``,e.accSagittalSharp11v49CDown=``,e.accSagittalSharp11v49CUp=``,e.accSagittalSharp143CDown=``,e.accSagittalSharp143CUp=``,e.accSagittalSharp17CDown=``,e.accSagittalSharp17CUp=``,e.accSagittalSharp17kDown=``,e.accSagittalSharp17kUp=``,e.accSagittalSharp19CDown=``,e.accSagittalSharp19CUp=``,e.accSagittalSharp19sDown=``,e.accSagittalSharp19sUp=``,e.accSagittalSharp23CDown=``,e.accSagittalSharp23CUp=``,e.accSagittalSharp23SDown=``,e.accSagittalSharp23SUp=``,e.accSagittalSharp25SDown=``,e.accSagittalSharp25SUp=``,e.accSagittalSharp35LUp=``,e.accSagittalSharp35MUp=``,e.accSagittalSharp49LUp=``,e.accSagittalSharp49MUp=``,e.accSagittalSharp49SDown=``,e.accSagittalSharp49SUp=``,e.accSagittalSharp55CDown=``,e.accSagittalSharp55CUp=``,e.accSagittalSharp5CDown=``,e.accSagittalSharp5CUp=``,e.accSagittalSharp5v11SDown=``,e.accSagittalSharp5v11SUp=``,e.accSagittalSharp5v13LUp=``,e.accSagittalSharp5v13MUp=``,e.accSagittalSharp5v19CDown=``,e.accSagittalSharp5v19CUp=``,e.accSagittalSharp5v23SDown=``,e.accSagittalSharp5v23SUp=``,e.accSagittalSharp5v49MUp=``,e.accSagittalSharp5v7kDown=``,e.accSagittalSharp5v7kUp=``,e.accSagittalSharp7CDown=``,e.accSagittalSharp7CUp=``,e.accSagittalSharp7v11CDown=``,e.accSagittalSharp7v11CUp=``,e.accSagittalSharp7v11kDown=``,e.accSagittalSharp7v11kUp=``,e.accSagittalSharp7v19CDown=``,e.accSagittalSharp7v19CUp=``,e.accSagittalUnused1=``,e.accSagittalUnused2=``,e.accSagittalUnused3=``,e.accSagittalUnused4=``,e.accdnCombDot=``,e.accdnCombLH2RanksEmpty=``,e.accdnCombLH3RanksEmptySquare=``,e.accdnCombRH3RanksEmpty=``,e.accdnCombRH4RanksEmpty=``,e.accdnDiatonicClef=``,e.accdnLH2Ranks16Round=``,e.accdnLH2Ranks8Plus16Round=``,e.accdnLH2Ranks8Round=``,e.accdnLH2RanksFullMasterRound=``,e.accdnLH2RanksMasterPlus16Round=``,e.accdnLH2RanksMasterRound=``,e.accdnLH3Ranks2Plus8Square=``,e.accdnLH3Ranks2Square=``,e.accdnLH3Ranks8Square=``,e.accdnLH3RanksDouble8Square=``,e.accdnLH3RanksTuttiSquare=``,e.accdnPull=``,e.accdnPush=``,e.accdnRH3RanksAccordion=``,e.accdnRH3RanksAuthenticMusette=``,e.accdnRH3RanksBandoneon=``,e.accdnRH3RanksBassoon=``,e.accdnRH3RanksClarinet=``,e.accdnRH3RanksDoubleTremoloLower8ve=``,e.accdnRH3RanksDoubleTremoloUpper8ve=``,e.accdnRH3RanksFullFactory=``,e.accdnRH3RanksHarmonium=``,e.accdnRH3RanksImitationMusette=``,e.accdnRH3RanksLowerTremolo8=``,e.accdnRH3RanksMaster=``,e.accdnRH3RanksOboe=``,e.accdnRH3RanksOrgan=``,e.accdnRH3RanksPiccolo=``,e.accdnRH3RanksTremoloLower8ve=``,e.accdnRH3RanksTremoloUpper8ve=``,e.accdnRH3RanksTwoChoirs=``,e.accdnRH3RanksUpperTremolo8=``,e.accdnRH3RanksViolin=``,e.accdnRH4RanksAlto=``,e.accdnRH4RanksBassAlto=``,e.accdnRH4RanksMaster=``,e.accdnRH4RanksSoftBass=``,e.accdnRH4RanksSoftTenor=``,e.accdnRH4RanksSoprano=``,e.accdnRH4RanksTenor=``,e.accdnRicochet2=``,e.accdnRicochet3=``,e.accdnRicochet4=``,e.accdnRicochet5=``,e.accdnRicochet6=``,e.accdnRicochetStem2=``,e.accdnRicochetStem3=``,e.accdnRicochetStem4=``,e.accdnRicochetStem5=``,e.accdnRicochetStem6=``,e.accidental1CommaFlat=``,e.accidental1CommaSharp=``,e.accidental2CommaFlat=``,e.accidental2CommaSharp=``,e.accidental3CommaFlat=``,e.accidental3CommaSharp=``,e.accidental4CommaFlat=``,e.accidental5CommaSharp=``,e.accidentalArrowDown=``,e.accidentalArrowUp=``,e.accidentalBakiyeFlat=``,e.accidentalBakiyeSharp=``,e.accidentalBracketLeft=``,e.accidentalBracketRight=``,e.accidentalBuyukMucennebFlat=``,e.accidentalBuyukMucennebSharp=``,e.accidentalCombiningCloseCurlyBrace=``,e.accidentalCombiningLower17Schisma=``,e.accidentalCombiningLower19Schisma=``,e.accidentalCombiningLower23Limit29LimitComma=``,e.accidentalCombiningLower29LimitComma=``,e.accidentalCombiningLower31Schisma=``,e.accidentalCombiningLower37Quartertone=``,e.accidentalCombiningLower41Comma=``,e.accidentalCombiningLower43Comma=``,e.accidentalCombiningLower47Quartertone=``,e.accidentalCombiningLower53LimitComma=``,e.accidentalCombiningOpenCurlyBrace=``,e.accidentalCombiningRaise17Schisma=``,e.accidentalCombiningRaise19Schisma=``,e.accidentalCombiningRaise23Limit29LimitComma=``,e.accidentalCombiningRaise29LimitComma=``,e.accidentalCombiningRaise31Schisma=``,e.accidentalCombiningRaise37Quartertone=``,e.accidentalCombiningRaise41Comma=``,e.accidentalCombiningRaise43Comma=``,e.accidentalCombiningRaise47Quartertone=``,e.accidentalCombiningRaise53LimitComma=``,e.accidentalCommaSlashDown=``,e.accidentalCommaSlashUp=``,e.accidentalDoubleFlat=``,e.accidentalDoubleFlatArabic=``,e.accidentalDoubleFlatEqualTempered=``,e.accidentalDoubleFlatOneArrowDown=``,e.accidentalDoubleFlatOneArrowUp=``,e.accidentalDoubleFlatReversed=``,e.accidentalDoubleFlatThreeArrowsDown=``,e.accidentalDoubleFlatThreeArrowsUp=``,e.accidentalDoubleFlatTurned=``,e.accidentalDoubleFlatTwoArrowsDown=``,e.accidentalDoubleFlatTwoArrowsUp=``,e.accidentalDoubleSharp=``,e.accidentalDoubleSharpArabic=``,e.accidentalDoubleSharpEqualTempered=``,e.accidentalDoubleSharpOneArrowDown=``,e.accidentalDoubleSharpOneArrowUp=``,e.accidentalDoubleSharpThreeArrowsDown=``,e.accidentalDoubleSharpThreeArrowsUp=``,e.accidentalDoubleSharpTwoArrowsDown=``,e.accidentalDoubleSharpTwoArrowsUp=``,e.accidentalEnharmonicAlmostEqualTo=``,e.accidentalEnharmonicEquals=``,e.accidentalEnharmonicTilde=``,e.accidentalFilledReversedFlatAndFlat=``,e.accidentalFilledReversedFlatAndFlatArrowDown=``,e.accidentalFilledReversedFlatAndFlatArrowUp=``,e.accidentalFilledReversedFlatArrowDown=``,e.accidentalFilledReversedFlatArrowUp=``,e.accidentalFiveQuarterTonesFlatArrowDown=``,e.accidentalFiveQuarterTonesSharpArrowUp=``,e.accidentalFlat=``,e.accidentalFlatArabic=``,e.accidentalFlatEqualTempered=``,e.accidentalFlatLoweredStockhausen=``,e.accidentalFlatOneArrowDown=``,e.accidentalFlatOneArrowUp=``,e.accidentalFlatRaisedStockhausen=``,e.accidentalFlatRepeatedLineStockhausen=``,e.accidentalFlatRepeatedSpaceStockhausen=``,e.accidentalFlatThreeArrowsDown=``,e.accidentalFlatThreeArrowsUp=``,e.accidentalFlatTurned=``,e.accidentalFlatTwoArrowsDown=``,e.accidentalFlatTwoArrowsUp=``,e.accidentalHabaFlatQuarterToneHigher=``,e.accidentalHabaFlatThreeQuarterTonesLower=``,e.accidentalHabaQuarterToneHigher=``,e.accidentalHabaQuarterToneLower=``,e.accidentalHabaSharpQuarterToneLower=``,e.accidentalHabaSharpThreeQuarterTonesHigher=``,e.accidentalHalfSharpArrowDown=``,e.accidentalHalfSharpArrowUp=``,e.accidentalJohnston13=``,e.accidentalJohnston31=``,e.accidentalJohnstonDown=``,e.accidentalJohnstonEl=``,e.accidentalJohnstonMinus=``,e.accidentalJohnstonPlus=``,e.accidentalJohnstonSeven=``,e.accidentalJohnstonUp=``,e.accidentalKomaFlat=``,e.accidentalKomaSharp=``,e.accidentalKoron=``,e.accidentalKucukMucennebFlat=``,e.accidentalKucukMucennebSharp=``,e.accidentalLargeDoubleSharp=``,e.accidentalLowerOneSeptimalComma=``,e.accidentalLowerOneTridecimalQuartertone=``,e.accidentalLowerOneUndecimalQuartertone=``,e.accidentalLowerTwoSeptimalCommas=``,e.accidentalLoweredStockhausen=``,e.accidentalNarrowReversedFlat=``,e.accidentalNarrowReversedFlatAndFlat=``,e.accidentalNatural=``,e.accidentalNaturalArabic=``,e.accidentalNaturalEqualTempered=``,e.accidentalNaturalFlat=``,e.accidentalNaturalLoweredStockhausen=``,e.accidentalNaturalOneArrowDown=``,e.accidentalNaturalOneArrowUp=``,e.accidentalNaturalRaisedStockhausen=``,e.accidentalNaturalReversed=``,e.accidentalNaturalSharp=``,e.accidentalNaturalThreeArrowsDown=``,e.accidentalNaturalThreeArrowsUp=``,e.accidentalNaturalTwoArrowsDown=``,e.accidentalNaturalTwoArrowsUp=``,e.accidentalOneAndAHalfSharpsArrowDown=``,e.accidentalOneAndAHalfSharpsArrowUp=``,e.accidentalOneQuarterToneFlatFerneyhough=``,e.accidentalOneQuarterToneFlatStockhausen=``,e.accidentalOneQuarterToneSharpFerneyhough=``,e.accidentalOneQuarterToneSharpStockhausen=``,e.accidentalOneThirdToneFlatFerneyhough=``,e.accidentalOneThirdToneSharpFerneyhough=``,e.accidentalParensLeft=``,e.accidentalParensRight=``,e.accidentalQuarterFlatEqualTempered=``,e.accidentalQuarterSharpEqualTempered=``,e.accidentalQuarterToneFlat4=``,e.accidentalQuarterToneFlatArabic=``,e.accidentalQuarterToneFlatArrowUp=``,e.accidentalQuarterToneFlatFilledReversed=``,e.accidentalQuarterToneFlatNaturalArrowDown=``,e.accidentalQuarterToneFlatPenderecki=``,e.accidentalQuarterToneFlatStein=``,e.accidentalQuarterToneFlatVanBlankenburg=``,e.accidentalQuarterToneSharp4=``,e.accidentalQuarterToneSharpArabic=``,e.accidentalQuarterToneSharpArrowDown=``,e.accidentalQuarterToneSharpBusotti=``,e.accidentalQuarterToneSharpNaturalArrowUp=``,e.accidentalQuarterToneSharpStein=``,e.accidentalQuarterToneSharpWiggle=``,e.accidentalRaiseOneSeptimalComma=``,e.accidentalRaiseOneTridecimalQuartertone=``,e.accidentalRaiseOneUndecimalQuartertone=``,e.accidentalRaiseTwoSeptimalCommas=``,e.accidentalRaisedStockhausen=``,e.accidentalReversedFlatAndFlatArrowDown=``,e.accidentalReversedFlatAndFlatArrowUp=``,e.accidentalReversedFlatArrowDown=``,e.accidentalReversedFlatArrowUp=``,e.accidentalSharp=``,e.accidentalSharpArabic=``,e.accidentalSharpEqualTempered=``,e.accidentalSharpLoweredStockhausen=``,e.accidentalSharpOneArrowDown=``,e.accidentalSharpOneArrowUp=``,e.accidentalSharpOneHorizontalStroke=``,e.accidentalSharpRaisedStockhausen=``,e.accidentalSharpRepeatedLineStockhausen=``,e.accidentalSharpRepeatedSpaceStockhausen=``,e.accidentalSharpReversed=``,e.accidentalSharpSharp=``,e.accidentalSharpThreeArrowsDown=``,e.accidentalSharpThreeArrowsUp=``,e.accidentalSharpTwoArrowsDown=``,e.accidentalSharpTwoArrowsUp=``,e.accidentalSims12Down=``,e.accidentalSims12Up=``,e.accidentalSims4Down=``,e.accidentalSims4Up=``,e.accidentalSims6Down=``,e.accidentalSims6Up=``,e.accidentalSori=``,e.accidentalTavenerFlat=``,e.accidentalTavenerSharp=``,e.accidentalThreeQuarterTonesFlatArabic=``,e.accidentalThreeQuarterTonesFlatArrowDown=``,e.accidentalThreeQuarterTonesFlatArrowUp=``,e.accidentalThreeQuarterTonesFlatCouper=``,e.accidentalThreeQuarterTonesFlatGrisey=``,e.accidentalThreeQuarterTonesFlatTartini=``,e.accidentalThreeQuarterTonesFlatZimmermann=``,e.accidentalThreeQuarterTonesSharpArabic=``,e.accidentalThreeQuarterTonesSharpArrowDown=``,e.accidentalThreeQuarterTonesSharpArrowUp=``,e.accidentalThreeQuarterTonesSharpBusotti=``,e.accidentalThreeQuarterTonesSharpStein=``,e.accidentalThreeQuarterTonesSharpStockhausen=``,e.accidentalTripleFlat=``,e.accidentalTripleSharp=``,e.accidentalTwoThirdTonesFlatFerneyhough=``,e.accidentalTwoThirdTonesSharpFerneyhough=``,e.accidentalUpsAndDownsDown=``,e.accidentalUpsAndDownsLess=``,e.accidentalUpsAndDownsMore=``,e.accidentalUpsAndDownsUp=``,e.accidentalWilsonMinus=``,e.accidentalWilsonPlus=``,e.accidentalWyschnegradsky10TwelfthsFlat=``,e.accidentalWyschnegradsky10TwelfthsSharp=``,e.accidentalWyschnegradsky11TwelfthsFlat=``,e.accidentalWyschnegradsky11TwelfthsSharp=``,e.accidentalWyschnegradsky1TwelfthsFlat=``,e.accidentalWyschnegradsky1TwelfthsSharp=``,e.accidentalWyschnegradsky2TwelfthsFlat=``,e.accidentalWyschnegradsky2TwelfthsSharp=``,e.accidentalWyschnegradsky3TwelfthsFlat=``,e.accidentalWyschnegradsky3TwelfthsSharp=``,e.accidentalWyschnegradsky4TwelfthsFlat=``,e.accidentalWyschnegradsky4TwelfthsSharp=``,e.accidentalWyschnegradsky5TwelfthsFlat=``,e.accidentalWyschnegradsky5TwelfthsSharp=``,e.accidentalWyschnegradsky6TwelfthsFlat=``,e.accidentalWyschnegradsky6TwelfthsSharp=``,e.accidentalWyschnegradsky7TwelfthsFlat=``,e.accidentalWyschnegradsky7TwelfthsSharp=``,e.accidentalWyschnegradsky8TwelfthsFlat=``,e.accidentalWyschnegradsky8TwelfthsSharp=``,e.accidentalWyschnegradsky9TwelfthsFlat=``,e.accidentalWyschnegradsky9TwelfthsSharp=``,e.accidentalXenakisOneThirdToneSharp=``,e.accidentalXenakisTwoThirdTonesSharp=``,e.analyticsChoralmelodie=``,e.analyticsEndStimme=``,e.analyticsHauptrhythmus=``,e.analyticsHauptstimme=``,e.analyticsInversion1=``,e.analyticsNebenstimme=``,e.analyticsStartStimme=``,e.analyticsTheme=``,e.analyticsTheme1=``,e.analyticsThemeInversion=``,e.analyticsThemeRetrograde=``,e.analyticsThemeRetrogradeInversion=``,e.arpeggiato=``,e.arpeggiatoDown=``,e.arpeggiatoUp=``,e.arrowBlackDown=``,e.arrowBlackDownLeft=``,e.arrowBlackDownRight=``,e.arrowBlackLeft=``,e.arrowBlackRight=``,e.arrowBlackUp=``,e.arrowBlackUpLeft=``,e.arrowBlackUpRight=``,e.arrowOpenDown=``,e.arrowOpenDownLeft=``,e.arrowOpenDownRight=``,e.arrowOpenLeft=``,e.arrowOpenRight=``,e.arrowOpenUp=``,e.arrowOpenUpLeft=``,e.arrowOpenUpRight=``,e.arrowWhiteDown=``,e.arrowWhiteDownLeft=``,e.arrowWhiteDownRight=``,e.arrowWhiteLeft=``,e.arrowWhiteRight=``,e.arrowWhiteUp=``,e.arrowWhiteUpLeft=``,e.arrowWhiteUpRight=``,e.arrowheadBlackDown=``,e.arrowheadBlackDownLeft=``,e.arrowheadBlackDownRight=``,e.arrowheadBlackLeft=``,e.arrowheadBlackRight=``,e.arrowheadBlackUp=``,e.arrowheadBlackUpLeft=``,e.arrowheadBlackUpRight=``,e.arrowheadOpenDown=``,e.arrowheadOpenDownLeft=``,e.arrowheadOpenDownRight=``,e.arrowheadOpenLeft=``,e.arrowheadOpenRight=``,e.arrowheadOpenUp=``,e.arrowheadOpenUpLeft=``,e.arrowheadOpenUpRight=``,e.arrowheadWhiteDown=``,e.arrowheadWhiteDownLeft=``,e.arrowheadWhiteDownRight=``,e.arrowheadWhiteLeft=``,e.arrowheadWhiteRight=``,e.arrowheadWhiteUp=``,e.arrowheadWhiteUpLeft=``,e.arrowheadWhiteUpRight=``,e.articAccentAbove=``,e.articAccentBelow=``,e.articAccentStaccatoAbove=``,e.articAccentStaccatoBelow=``,e.articLaissezVibrerAbove=``,e.articLaissezVibrerBelow=``,e.articMarcatoAbove=``,e.articMarcatoBelow=``,e.articMarcatoStaccatoAbove=``,e.articMarcatoStaccatoBelow=``,e.articMarcatoTenutoAbove=``,e.articMarcatoTenutoBelow=``,e.articSoftAccentAbove=``,e.articSoftAccentBelow=``,e.articSoftAccentStaccatoAbove=``,e.articSoftAccentStaccatoBelow=``,e.articSoftAccentTenutoAbove=``,e.articSoftAccentTenutoBelow=``,e.articSoftAccentTenutoStaccatoAbove=``,e.articSoftAccentTenutoStaccatoBelow=``,e.articStaccatissimoAbove=``,e.articStaccatissimoBelow=``,e.articStaccatissimoStrokeAbove=``,e.articStaccatissimoStrokeBelow=``,e.articStaccatissimoWedgeAbove=``,e.articStaccatissimoWedgeBelow=``,e.articStaccatoAbove=``,e.articStaccatoBelow=``,e.articStressAbove=``,e.articStressBelow=``,e.articTenutoAbove=``,e.articTenutoAccentAbove=``,e.articTenutoAccentBelow=``,e.articTenutoBelow=``,e.articTenutoStaccatoAbove=``,e.articTenutoStaccatoBelow=``,e.articUnstressAbove=``,e.articUnstressBelow=``,e.augmentationDot=``,e.barlineDashed=``,e.barlineDotted=``,e.barlineDouble=``,e.barlineFinal=``,e.barlineHeavy=``,e.barlineHeavyHeavy=``,e.barlineReverseFinal=``,e.barlineShort=``,e.barlineSingle=``,e.barlineTick=``,e.beamAccelRit1=``,e.beamAccelRit10=``,e.beamAccelRit11=``,e.beamAccelRit12=``,e.beamAccelRit13=``,e.beamAccelRit14=``,e.beamAccelRit15=``,e.beamAccelRit2=``,e.beamAccelRit3=``,e.beamAccelRit4=``,e.beamAccelRit5=``,e.beamAccelRit6=``,e.beamAccelRit7=``,e.beamAccelRit8=``,e.beamAccelRit9=``,e.beamAccelRitFinal=``,e.brace=``,e.bracket=``,e.bracketBottom=``,e.bracketTop=``,e.brassBend=``,e.brassDoitLong=``,e.brassDoitMedium=``,e.brassDoitShort=``,e.brassFallLipLong=``,e.brassFallLipMedium=``,e.brassFallLipShort=``,e.brassFallRoughLong=``,e.brassFallRoughMedium=``,e.brassFallRoughShort=``,e.brassFallSmoothLong=``,e.brassFallSmoothMedium=``,e.brassFallSmoothShort=``,e.brassFlip=``,e.brassHarmonMuteClosed=``,e.brassHarmonMuteStemHalfLeft=``,e.brassHarmonMuteStemHalfRight=``,e.brassHarmonMuteStemOpen=``,e.brassJazzTurn=``,e.brassLiftLong=``,e.brassLiftMedium=``,e.brassLiftShort=``,e.brassLiftSmoothLong=``,e.brassLiftSmoothMedium=``,e.brassLiftSmoothShort=``,e.brassMuteClosed=``,e.brassMuteHalfClosed=``,e.brassMuteOpen=``,e.brassPlop=``,e.brassScoop=``,e.brassSmear=``,e.brassValveTrill=``,e.breathMarkComma=``,e.breathMarkSalzedo=``,e.breathMarkTick=``,e.breathMarkUpbow=``,e.bridgeClef=``,e.buzzRoll=``,e.cClef=``,e.cClef8vb=``,e.cClefArrowDown=``,e.cClefArrowUp=``,e.cClefChange=``,e.cClefCombining=``,e.cClefReversed=``,e.cClefSquare=``,e.caesura=``,e.caesuraCurved=``,e.caesuraShort=``,e.caesuraSingleStroke=``,e.caesuraThick=``,e.chantAccentusAbove=``,e.chantAccentusBelow=``,e.chantAuctumAsc=``,e.chantAuctumDesc=``,e.chantAugmentum=``,e.chantCaesura=``,e.chantCclef=``,e.chantCirculusAbove=``,e.chantCirculusBelow=``,e.chantConnectingLineAsc2nd=``,e.chantConnectingLineAsc3rd=``,e.chantConnectingLineAsc4th=``,e.chantConnectingLineAsc5th=``,e.chantConnectingLineAsc6th=``,e.chantCustosStemDownPosHigh=``,e.chantCustosStemDownPosHighest=``,e.chantCustosStemDownPosMiddle=``,e.chantCustosStemUpPosLow=``,e.chantCustosStemUpPosLowest=``,e.chantCustosStemUpPosMiddle=``,e.chantDeminutumLower=``,e.chantDeminutumUpper=``,e.chantDivisioFinalis=``,e.chantDivisioMaior=``,e.chantDivisioMaxima=``,e.chantDivisioMinima=``,e.chantEntryLineAsc2nd=``,e.chantEntryLineAsc3rd=``,e.chantEntryLineAsc4th=``,e.chantEntryLineAsc5th=``,e.chantEntryLineAsc6th=``,e.chantEpisema=``,e.chantFclef=``,e.chantIctusAbove=``,e.chantIctusBelow=``,e.chantLigaturaDesc2nd=``,e.chantLigaturaDesc3rd=``,e.chantLigaturaDesc4th=``,e.chantLigaturaDesc5th=``,e.chantOriscusAscending=``,e.chantOriscusDescending=``,e.chantOriscusLiquescens=``,e.chantPodatusLower=``,e.chantPodatusUpper=``,e.chantPunctum=``,e.chantPunctumCavum=``,e.chantPunctumDeminutum=``,e.chantPunctumInclinatum=``,e.chantPunctumInclinatumAuctum=``,e.chantPunctumInclinatumDeminutum=``,e.chantPunctumLinea=``,e.chantPunctumLineaCavum=``,e.chantPunctumVirga=``,e.chantPunctumVirgaReversed=``,e.chantQuilisma=``,e.chantSemicirculusAbove=``,e.chantSemicirculusBelow=``,e.chantStaff=``,e.chantStaffNarrow=``,e.chantStaffWide=``,e.chantStrophicus=``,e.chantStrophicusAuctus=``,e.chantStrophicusLiquescens2nd=``,e.chantStrophicusLiquescens3rd=``,e.chantStrophicusLiquescens4th=``,e.chantStrophicusLiquescens5th=``,e.chantVirgula=``,e.clef15=``,e.clef8=``,e.clefChangeCombining=``,e.coda=``,e.codaSquare=``,e.conductorBeat2Compound=``,e.conductorBeat2Simple=``,e.conductorBeat3Compound=``,e.conductorBeat3Simple=``,e.conductorBeat4Compound=``,e.conductorBeat4Simple=``,e.conductorLeftBeat=``,e.conductorRightBeat=``,e.conductorStrongBeat=``,e.conductorUnconducted=``,e.conductorWeakBeat=``,e.controlBeginBeam=``,e.controlBeginPhrase=``,e.controlBeginSlur=``,e.controlBeginTie=``,e.controlEndBeam=``,e.controlEndPhrase=``,e.controlEndSlur=``,e.controlEndTie=``,e.csymAccidentalDoubleFlat=``,e.csymAccidentalDoubleSharp=``,e.csymAccidentalFlat=``,e.csymAccidentalNatural=``,e.csymAccidentalSharp=``,e.csymAccidentalTripleFlat=``,e.csymAccidentalTripleSharp=``,e.csymAlteredBassSlash=``,e.csymAugmented=``,e.csymBracketLeftTall=``,e.csymBracketRightTall=``,e.csymDiagonalArrangementSlash=``,e.csymDiminished=``,e.csymHalfDiminished=``,e.csymMajorSeventh=``,e.csymMinor=``,e.csymParensLeftTall=``,e.csymParensLeftVeryTall=``,e.csymParensRightTall=``,e.csymParensRightVeryTall=``,e.curlewSign=``,e.daCapo=``,e.dalSegno=``,e.daseianExcellentes1=``,e.daseianExcellentes2=``,e.daseianExcellentes3=``,e.daseianExcellentes4=``,e.daseianFinales1=``,e.daseianFinales2=``,e.daseianFinales3=``,e.daseianFinales4=``,e.daseianGraves1=``,e.daseianGraves2=``,e.daseianGraves3=``,e.daseianGraves4=``,e.daseianResidua1=``,e.daseianResidua2=``,e.daseianSuperiores1=``,e.daseianSuperiores2=``,e.daseianSuperiores3=``,e.daseianSuperiores4=``,e.doubleLateralRollStevens=``,e.doubleTongueAbove=``,e.doubleTongueBelow=``,e.dynamicCombinedSeparatorColon=``,e.dynamicCombinedSeparatorHyphen=``,e.dynamicCombinedSeparatorSlash=``,e.dynamicCombinedSeparatorSpace=``,e.dynamicCrescendoHairpin=``,e.dynamicDiminuendoHairpin=``,e.dynamicFF=``,e.dynamicFFF=``,e.dynamicFFFF=``,e.dynamicFFFFF=``,e.dynamicFFFFFF=``,e.dynamicForte=``,e.dynamicFortePiano=``,e.dynamicForzando=``,e.dynamicHairpinBracketLeft=``,e.dynamicHairpinBracketRight=``,e.dynamicHairpinParenthesisLeft=``,e.dynamicHairpinParenthesisRight=``,e.dynamicMF=``,e.dynamicMP=``,e.dynamicMessaDiVoce=``,e.dynamicMezzo=``,e.dynamicNiente=``,e.dynamicNienteForHairpin=``,e.dynamicPF=``,e.dynamicPP=``,e.dynamicPPP=``,e.dynamicPPPP=``,e.dynamicPPPPP=``,e.dynamicPPPPPP=``,e.dynamicPiano=``,e.dynamicRinforzando=``,e.dynamicRinforzando1=``,e.dynamicRinforzando2=``,e.dynamicSforzando=``,e.dynamicSforzando1=``,e.dynamicSforzandoPianissimo=``,e.dynamicSforzandoPiano=``,e.dynamicSforzato=``,e.dynamicSforzatoFF=``,e.dynamicSforzatoPiano=``,e.dynamicZ=``,e.elecAudioChannelsEight=``,e.elecAudioChannelsFive=``,e.elecAudioChannelsFour=``,e.elecAudioChannelsOne=``,e.elecAudioChannelsSeven=``,e.elecAudioChannelsSix=``,e.elecAudioChannelsThreeFrontal=``,e.elecAudioChannelsThreeSurround=``,e.elecAudioChannelsTwo=``,e.elecAudioIn=``,e.elecAudioMono=``,e.elecAudioOut=``,e.elecAudioStereo=``,e.elecCamera=``,e.elecDataIn=``,e.elecDataOut=``,e.elecDisc=``,e.elecDownload=``,e.elecEject=``,e.elecFastForward=``,e.elecHeadphones=``,e.elecHeadset=``,e.elecLineIn=``,e.elecLineOut=``,e.elecLoop=``,e.elecLoudspeaker=``,e.elecMIDIController0=``,e.elecMIDIController100=``,e.elecMIDIController20=``,e.elecMIDIController40=``,e.elecMIDIController60=``,e.elecMIDIController80=``,e.elecMIDIIn=``,e.elecMIDIOut=``,e.elecMicrophone=``,e.elecMicrophoneMute=``,e.elecMicrophoneUnmute=``,e.elecMixingConsole=``,e.elecMonitor=``,e.elecMute=``,e.elecPause=``,e.elecPlay=``,e.elecPowerOnOff=``,e.elecProjector=``,e.elecReplay=``,e.elecRewind=``,e.elecShuffle=``,e.elecSkipBackwards=``,e.elecSkipForwards=``,e.elecStop=``,e.elecTape=``,e.elecUSB=``,e.elecUnmute=``,e.elecUpload=``,e.elecVideoCamera=``,e.elecVideoIn=``,e.elecVideoOut=``,e.elecVolumeFader=``,e.elecVolumeFaderThumb=``,e.elecVolumeLevel0=``,e.elecVolumeLevel100=``,e.elecVolumeLevel20=``,e.elecVolumeLevel40=``,e.elecVolumeLevel60=``,e.elecVolumeLevel80=``,e.fClef=``,e.fClef15ma=``,e.fClef15mb=``,e.fClef8va=``,e.fClef8vb=``,e.fClefArrowDown=``,e.fClefArrowUp=``,e.fClefChange=``,e.fClefReversed=``,e.fClefTurned=``,e.fermataAbove=``,e.fermataBelow=``,e.fermataLongAbove=``,e.fermataLongBelow=``,e.fermataLongHenzeAbove=``,e.fermataLongHenzeBelow=``,e.fermataShortAbove=``,e.fermataShortBelow=``,e.fermataShortHenzeAbove=``,e.fermataShortHenzeBelow=``,e.fermataVeryLongAbove=``,e.fermataVeryLongBelow=``,e.fermataVeryShortAbove=``,e.fermataVeryShortBelow=``,e.figbass0=``,e.figbass1=``,e.figbass2=``,e.figbass2Raised=``,e.figbass3=``,e.figbass4=``,e.figbass4Raised=``,e.figbass5=``,e.figbass5Raised1=``,e.figbass5Raised2=``,e.figbass5Raised3=``,e.figbass6=``,e.figbass6Raised=``,e.figbass6Raised2=``,e.figbass7=``,e.figbass7Diminished=``,e.figbass7Raised1=``,e.figbass7Raised2=``,e.figbass8=``,e.figbass9=``,e.figbass9Raised=``,e.figbassBracketLeft=``,e.figbassBracketRight=``,e.figbassCombiningLowering=``,e.figbassCombiningRaising=``,e.figbassDoubleFlat=``,e.figbassDoubleSharp=``,e.figbassFlat=``,e.figbassNatural=``,e.figbassParensLeft=``,e.figbassParensRight=``,e.figbassPlus=``,e.figbassSharp=``,e.figbassTripleFlat=``,e.figbassTripleSharp=``,e.fingering0=``,e.fingering0Italic=``,e.fingering1=``,e.fingering1Italic=``,e.fingering2=``,e.fingering2Italic=``,e.fingering3=``,e.fingering3Italic=``,e.fingering4=``,e.fingering4Italic=``,e.fingering5=``,e.fingering5Italic=``,e.fingering6=``,e.fingering6Italic=``,e.fingering7=``,e.fingering7Italic=``,e.fingering8=``,e.fingering8Italic=``,e.fingering9=``,e.fingering9Italic=``,e.fingeringALower=``,e.fingeringCLower=``,e.fingeringELower=``,e.fingeringILower=``,e.fingeringLeftBracket=``,e.fingeringLeftBracketItalic=``,e.fingeringLeftParenthesis=``,e.fingeringLeftParenthesisItalic=``,e.fingeringMLower=``,e.fingeringMultipleNotes=``,e.fingeringOLower=``,e.fingeringPLower=``,e.fingeringQLower=``,e.fingeringRightBracket=``,e.fingeringRightBracketItalic=``,e.fingeringRightParenthesis=``,e.fingeringRightParenthesisItalic=``,e.fingeringSLower=``,e.fingeringSeparatorMiddleDot=``,e.fingeringSeparatorMiddleDotWhite=``,e.fingeringSeparatorSlash=``,e.fingeringSubstitutionAbove=``,e.fingeringSubstitutionBelow=``,e.fingeringSubstitutionDash=``,e.fingeringTLower=``,e.fingeringTUpper=``,e.fingeringXLower=``,e.flag1024thDown=``,e.flag1024thUp=``,e.flag128thDown=``,e.flag128thUp=``,e.flag16thDown=``,e.flag16thUp=``,e.flag256thDown=``,e.flag256thUp=``,e.flag32ndDown=``,e.flag32ndUp=``,e.flag512thDown=``,e.flag512thUp=``,e.flag64thDown=``,e.flag64thUp=``,e.flag8thDown=``,e.flag8thUp=``,e.flagInternalDown=``,e.flagInternalUp=``,e.fretboard3String=``,e.fretboard3StringNut=``,e.fretboard4String=``,e.fretboard4StringNut=``,e.fretboard5String=``,e.fretboard5StringNut=``,e.fretboard6String=``,e.fretboard6StringNut=``,e.fretboardFilledCircle=``,e.fretboardO=``,e.fretboardX=``,e.functionAngleLeft=``,e.functionAngleRight=``,e.functionBracketLeft=``,e.functionBracketRight=``,e.functionDD=``,e.functionDLower=``,e.functionDUpper=``,e.functionEight=``,e.functionFUpper=``,e.functionFive=``,e.functionFour=``,e.functionGLower=``,e.functionGUpper=``,e.functionGreaterThan=``,e.functionILower=``,e.functionIUpper=``,e.functionKLower=``,e.functionKUpper=``,e.functionLLower=``,e.functionLUpper=``,e.functionLessThan=``,e.functionMLower=``,e.functionMUpper=``,e.functionMinus=``,e.functionNLower=``,e.functionNUpper=``,e.functionNUpperSuperscript=``,e.functionNine=``,e.functionOne=``,e.functionPLower=``,e.functionPUpper=``,e.functionParensLeft=``,e.functionParensRight=``,e.functionPlus=``,e.functionRLower=``,e.functionRepetition1=``,e.functionRepetition2=``,e.functionRing=``,e.functionSLower=``,e.functionSSLower=``,e.functionSSUpper=``,e.functionSUpper=``,e.functionSeven=``,e.functionSix=``,e.functionSlashedDD=``,e.functionTLower=``,e.functionTUpper=``,e.functionThree=``,e.functionTwo=``,e.functionVLower=``,e.functionVUpper=``,e.functionZero=``,e.gClef=``,e.gClef15ma=``,e.gClef15mb=``,e.gClef8va=``,e.gClef8vb=``,e.gClef8vbCClef=``,e.gClef8vbOld=``,e.gClef8vbParens=``,e.gClefArrowDown=``,e.gClefArrowUp=``,e.gClefChange=``,e.gClefLigatedNumberAbove=``,e.gClefLigatedNumberBelow=``,e.gClefReversed=``,e.gClefTurned=``,e.glissandoDown=``,e.glissandoUp=``,e.graceNoteAcciaccaturaStemDown=``,e.graceNoteAcciaccaturaStemUp=``,e.graceNoteAppoggiaturaStemDown=``,e.graceNoteAppoggiaturaStemUp=``,e.graceNoteSlashStemDown=``,e.graceNoteSlashStemUp=``,e.guitarBarreFull=``,e.guitarBarreHalf=``,e.guitarClosePedal=``,e.guitarFadeIn=``,e.guitarFadeOut=``,e.guitarGolpe=``,e.guitarHalfOpenPedal=``,e.guitarLeftHandTapping=``,e.guitarOpenPedal=``,e.guitarRightHandTapping=``,e.guitarShake=``,e.guitarString0=``,e.guitarString1=``,e.guitarString10=``,e.guitarString11=``,e.guitarString12=``,e.guitarString13=``,e.guitarString2=``,e.guitarString3=``,e.guitarString4=``,e.guitarString5=``,e.guitarString6=``,e.guitarString7=``,e.guitarString8=``,e.guitarString9=``,e.guitarStrumDown=``,e.guitarStrumUp=``,e.guitarVibratoBarDip=``,e.guitarVibratoBarScoop=``,e.guitarVibratoStroke=``,e.guitarVolumeSwell=``,e.guitarWideVibratoStroke=``,e.handbellsBelltree=``,e.handbellsDamp3=``,e.handbellsEcho1=``,e.handbellsEcho2=``,e.handbellsGyro=``,e.handbellsHandMartellato=``,e.handbellsMalletBellOnTable=``,e.handbellsMalletBellSuspended=``,e.handbellsMalletLft=``,e.handbellsMartellato=``,e.handbellsMartellatoLift=``,e.handbellsMutedMartellato=``,e.handbellsPluckLift=``,e.handbellsSwing=``,e.handbellsSwingDown=``,e.handbellsSwingUp=``,e.handbellsTablePairBells=``,e.handbellsTableSingleBell=``,e.harpMetalRod=``,e.harpPedalCentered=``,e.harpPedalDivider=``,e.harpPedalLowered=``,e.harpPedalRaised=``,e.harpSalzedoAeolianAscending=``,e.harpSalzedoAeolianDescending=``,e.harpSalzedoDampAbove=``,e.harpSalzedoDampBelow=``,e.harpSalzedoDampBothHands=``,e.harpSalzedoDampLowStrings=``,e.harpSalzedoFluidicSoundsLeft=``,e.harpSalzedoFluidicSoundsRight=``,e.harpSalzedoIsolatedSounds=``,e.harpSalzedoMetallicSounds=``,e.harpSalzedoMetallicSoundsOneString=``,e.harpSalzedoMuffleTotally=``,e.harpSalzedoOboicFlux=``,e.harpSalzedoPlayUpperEnd=``,e.harpSalzedoSlideWithSuppleness=``,e.harpSalzedoSnareDrum=``,e.harpSalzedoTamTamSounds=``,e.harpSalzedoThunderEffect=``,e.harpSalzedoTimpanicSounds=``,e.harpSalzedoWhistlingSounds=``,e.harpStringNoiseStem=``,e.harpTuningKey=``,e.harpTuningKeyGlissando=``,e.harpTuningKeyHandle=``,e.harpTuningKeyShank=``,e.indianDrumClef=``,e.kahnBackChug=``,e.kahnBackFlap=``,e.kahnBackRiff=``,e.kahnBackRip=``,e.kahnBallChange=``,e.kahnBallDig=``,e.kahnBrushBackward=``,e.kahnBrushForward=``,e.kahnChug=``,e.kahnClap=``,e.kahnDoubleSnap=``,e.kahnDoubleWing=``,e.kahnDrawStep=``,e.kahnDrawTap=``,e.kahnFlam=``,e.kahnFlap=``,e.kahnFlapStep=``,e.kahnFlat=``,e.kahnFleaHop=``,e.kahnFleaTap=``,e.kahnGraceTap=``,e.kahnGraceTapChange=``,e.kahnGraceTapHop=``,e.kahnGraceTapStamp=``,e.kahnHeel=``,e.kahnHeelChange=``,e.kahnHeelClick=``,e.kahnHeelDrop=``,e.kahnHeelStep=``,e.kahnHeelTap=``,e.kahnHop=``,e.kahnJumpApart=``,e.kahnJumpTogether=``,e.kahnKneeInward=``,e.kahnKneeOutward=``,e.kahnLeap=``,e.kahnLeapFlatFoot=``,e.kahnLeapHeelClick=``,e.kahnLeftCatch=``,e.kahnLeftCross=``,e.kahnLeftFoot=``,e.kahnLeftToeStrike=``,e.kahnLeftTurn=``,e.kahnOverTheTop=``,e.kahnOverTheTopTap=``,e.kahnPull=``,e.kahnPush=``,e.kahnRiff=``,e.kahnRiffle=``,e.kahnRightCatch=``,e.kahnRightCross=``,e.kahnRightFoot=``,e.kahnRightToeStrike=``,e.kahnRightTurn=``,e.kahnRip=``,e.kahnRipple=``,e.kahnScrape=``,e.kahnScuff=``,e.kahnScuffle=``,e.kahnShuffle=``,e.kahnSlam=``,e.kahnSlap=``,e.kahnSlideStep=``,e.kahnSlideTap=``,e.kahnSnap=``,e.kahnStamp=``,e.kahnStampStamp=``,e.kahnStep=``,e.kahnStepStamp=``,e.kahnStomp=``,e.kahnStompBrush=``,e.kahnTap=``,e.kahnToe=``,e.kahnToeClick=``,e.kahnToeDrop=``,e.kahnToeStep=``,e.kahnToeTap=``,e.kahnTrench=``,e.kahnWing=``,e.kahnWingChange=``,e.kahnZank=``,e.kahnZink=``,e.keyboardBebung2DotsAbove=``,e.keyboardBebung2DotsBelow=``,e.keyboardBebung3DotsAbove=``,e.keyboardBebung3DotsBelow=``,e.keyboardBebung4DotsAbove=``,e.keyboardBebung4DotsBelow=``,e.keyboardLeftPedalPictogram=``,e.keyboardMiddlePedalPictogram=``,e.keyboardPedalD=``,e.keyboardPedalDot=``,e.keyboardPedalE=``,e.keyboardPedalHalf=``,e.keyboardPedalHalf2=``,e.keyboardPedalHalf3=``,e.keyboardPedalHeel1=``,e.keyboardPedalHeel2=``,e.keyboardPedalHeel3=``,e.keyboardPedalHeelToToe=``,e.keyboardPedalHeelToe=``,e.keyboardPedalHookEnd=``,e.keyboardPedalHookStart=``,e.keyboardPedalHyphen=``,e.keyboardPedalP=``,e.keyboardPedalParensLeft=``,e.keyboardPedalParensRight=``,e.keyboardPedalPed=``,e.keyboardPedalS=``,e.keyboardPedalSost=``,e.keyboardPedalToe1=``,e.keyboardPedalToe2=``,e.keyboardPedalToeToHeel=``,e.keyboardPedalUp=``,e.keyboardPedalUpNotch=``,e.keyboardPedalUpSpecial=``,e.keyboardPlayWithLH=``,e.keyboardPlayWithLHEnd=``,e.keyboardPlayWithRH=``,e.keyboardPlayWithRHEnd=``,e.keyboardPluckInside=``,e.keyboardRightPedalPictogram=``,e.kievanAccidentalFlat=``,e.kievanAccidentalSharp=``,e.kievanAugmentationDot=``,e.kievanCClef=``,e.kievanEndingSymbol=``,e.kievanNote8thStemDown=``,e.kievanNote8thStemUp=``,e.kievanNoteBeam=``,e.kievanNoteHalfStaffLine=``,e.kievanNoteHalfStaffSpace=``,e.kievanNoteQuarterStemDown=``,e.kievanNoteQuarterStemUp=``,e.kievanNoteReciting=``,e.kievanNoteWhole=``,e.kievanNoteWholeFinal=``,e.kodalyHandDo=``,e.kodalyHandFa=``,e.kodalyHandLa=``,e.kodalyHandMi=``,e.kodalyHandRe=``,e.kodalyHandSo=``,e.kodalyHandTi=``,e.leftRepeatSmall=``,e.legerLine=``,e.legerLineNarrow=``,e.legerLineWide=``,e.luteBarlineEndRepeat=``,e.luteBarlineFinal=``,e.luteBarlineStartRepeat=``,e.luteDuration16th=``,e.luteDuration32nd=``,e.luteDuration8th=``,e.luteDurationDoubleWhole=``,e.luteDurationHalf=``,e.luteDurationQuarter=``,e.luteDurationWhole=``,e.luteFingeringRHFirst=``,e.luteFingeringRHSecond=``,e.luteFingeringRHThird=``,e.luteFingeringRHThumb=``,e.luteFrench10thCourse=``,e.luteFrench7thCourse=``,e.luteFrench8thCourse=``,e.luteFrench9thCourse=``,e.luteFrenchAppoggiaturaAbove=``,e.luteFrenchAppoggiaturaBelow=``,e.luteFrenchFretA=``,e.luteFrenchFretB=``,e.luteFrenchFretC=``,e.luteFrenchFretD=``,e.luteFrenchFretE=``,e.luteFrenchFretF=``,e.luteFrenchFretG=``,e.luteFrenchFretH=``,e.luteFrenchFretI=``,e.luteFrenchFretK=``,e.luteFrenchFretL=``,e.luteFrenchFretM=``,e.luteFrenchFretN=``,e.luteFrenchMordentInverted=``,e.luteFrenchMordentLower=``,e.luteFrenchMordentUpper=``,e.luteGermanALower=``,e.luteGermanAUpper=``,e.luteGermanBLower=``,e.luteGermanBUpper=``,e.luteGermanCLower=``,e.luteGermanCUpper=``,e.luteGermanDLower=``,e.luteGermanDUpper=``,e.luteGermanELower=``,e.luteGermanEUpper=``,e.luteGermanFLower=``,e.luteGermanFUpper=``,e.luteGermanGLower=``,e.luteGermanGUpper=``,e.luteGermanHLower=``,e.luteGermanHUpper=``,e.luteGermanILower=``,e.luteGermanIUpper=``,e.luteGermanKLower=``,e.luteGermanKUpper=``,e.luteGermanLLower=``,e.luteGermanLUpper=``,e.luteGermanMLower=``,e.luteGermanMUpper=``,e.luteGermanNLower=``,e.luteGermanNUpper=``,e.luteGermanOLower=``,e.luteGermanPLower=``,e.luteGermanQLower=``,e.luteGermanRLower=``,e.luteGermanSLower=``,e.luteGermanTLower=``,e.luteGermanVLower=``,e.luteGermanXLower=``,e.luteGermanYLower=``,e.luteGermanZLower=``,e.luteItalianClefCSolFaUt=``,e.luteItalianClefFFaUt=``,e.luteItalianFret0=``,e.luteItalianFret1=``,e.luteItalianFret2=``,e.luteItalianFret3=``,e.luteItalianFret4=``,e.luteItalianFret5=``,e.luteItalianFret6=``,e.luteItalianFret7=``,e.luteItalianFret8=``,e.luteItalianFret9=``,e.luteItalianHoldFinger=``,e.luteItalianHoldNote=``,e.luteItalianReleaseFinger=``,e.luteItalianTempoFast=``,e.luteItalianTempoNeitherFastNorSlow=``,e.luteItalianTempoSlow=``,e.luteItalianTempoSomewhatFast=``,e.luteItalianTempoVerySlow=``,e.luteItalianTimeTriple=``,e.luteItalianTremolo=``,e.luteItalianVibrato=``,e.luteStaff6Lines=``,e.luteStaff6LinesNarrow=``,e.luteStaff6LinesWide=``,e.lyricsElision=``,e.lyricsElisionNarrow=``,e.lyricsElisionWide=``,e.lyricsHyphenBaseline=``,e.lyricsHyphenBaselineNonBreaking=``,e.lyricsTextRepeat=``,e.medRenFlatHardB=``,e.medRenFlatSoftB=``,e.medRenFlatWithDot=``,e.medRenGClefCMN=``,e.medRenLiquescenceCMN=``,e.medRenLiquescentAscCMN=``,e.medRenLiquescentDescCMN=``,e.medRenNatural=``,e.medRenNaturalWithCross=``,e.medRenOriscusCMN=``,e.medRenPlicaCMN=``,e.medRenPunctumCMN=``,e.medRenQuilismaCMN=``,e.medRenSharpCroix=``,e.medRenStrophicusCMN=``,e.mensuralAlterationSign=``,e.mensuralBlackBrevis=``,e.mensuralBlackBrevisVoid=``,e.mensuralBlackDragma=``,e.mensuralBlackLonga=``,e.mensuralBlackMaxima=``,e.mensuralBlackMinima=``,e.mensuralBlackMinimaVoid=``,e.mensuralBlackSemibrevis=``,e.mensuralBlackSemibrevisCaudata=``,e.mensuralBlackSemibrevisOblique=``,e.mensuralBlackSemibrevisVoid=``,e.mensuralBlackSemiminima=``,e.mensuralCclef=``,e.mensuralCclefPetrucciPosHigh=``,e.mensuralCclefPetrucciPosHighest=``,e.mensuralCclefPetrucciPosLow=``,e.mensuralCclefPetrucciPosLowest=``,e.mensuralCclefPetrucciPosMiddle=``,e.mensuralColorationEndRound=``,e.mensuralColorationEndSquare=``,e.mensuralColorationStartRound=``,e.mensuralColorationStartSquare=``,e.mensuralCombStemDiagonal=``,e.mensuralCombStemDown=``,e.mensuralCombStemDownFlagExtended=``,e.mensuralCombStemDownFlagFlared=``,e.mensuralCombStemDownFlagFusa=``,e.mensuralCombStemDownFlagLeft=``,e.mensuralCombStemDownFlagRight=``,e.mensuralCombStemDownFlagSemiminima=``,e.mensuralCombStemUp=``,e.mensuralCombStemUpFlagExtended=``,e.mensuralCombStemUpFlagFlared=``,e.mensuralCombStemUpFlagFusa=``,e.mensuralCombStemUpFlagLeft=``,e.mensuralCombStemUpFlagRight=``,e.mensuralCombStemUpFlagSemiminima=``,e.mensuralCustosCheckmark=``,e.mensuralCustosDown=``,e.mensuralCustosTurn=``,e.mensuralCustosUp=``,e.mensuralFclef=``,e.mensuralFclefPetrucci=``,e.mensuralGclef=``,e.mensuralGclefPetrucci=``,e.mensuralModusImperfectumVert=``,e.mensuralModusPerfectumVert=``,e.mensuralNoteheadLongaBlack=``,e.mensuralNoteheadLongaBlackVoid=``,e.mensuralNoteheadLongaVoid=``,e.mensuralNoteheadLongaWhite=``,e.mensuralNoteheadMaximaBlack=``,e.mensuralNoteheadMaximaBlackVoid=``,e.mensuralNoteheadMaximaVoid=``,e.mensuralNoteheadMaximaWhite=``,e.mensuralNoteheadMinimaWhite=``,e.mensuralNoteheadSemibrevisBlack=``,e.mensuralNoteheadSemibrevisBlackVoid=``,e.mensuralNoteheadSemibrevisBlackVoidTurned=``,e.mensuralNoteheadSemibrevisVoid=``,e.mensuralNoteheadSemiminimaWhite=``,e.mensuralObliqueAsc2ndBlack=``,e.mensuralObliqueAsc2ndBlackVoid=``,e.mensuralObliqueAsc2ndVoid=``,e.mensuralObliqueAsc2ndWhite=``,e.mensuralObliqueAsc3rdBlack=``,e.mensuralObliqueAsc3rdBlackVoid=``,e.mensuralObliqueAsc3rdVoid=``,e.mensuralObliqueAsc3rdWhite=``,e.mensuralObliqueAsc4thBlack=``,e.mensuralObliqueAsc4thBlackVoid=``,e.mensuralObliqueAsc4thVoid=``,e.mensuralObliqueAsc4thWhite=``,e.mensuralObliqueAsc5thBlack=``,e.mensuralObliqueAsc5thBlackVoid=``,e.mensuralObliqueAsc5thVoid=``,e.mensuralObliqueAsc5thWhite=``,e.mensuralObliqueDesc2ndBlack=``,e.mensuralObliqueDesc2ndBlackVoid=``,e.mensuralObliqueDesc2ndVoid=``,e.mensuralObliqueDesc2ndWhite=``,e.mensuralObliqueDesc3rdBlack=``,e.mensuralObliqueDesc3rdBlackVoid=``,e.mensuralObliqueDesc3rdVoid=``,e.mensuralObliqueDesc3rdWhite=``,e.mensuralObliqueDesc4thBlack=``,e.mensuralObliqueDesc4thBlackVoid=``,e.mensuralObliqueDesc4thVoid=``,e.mensuralObliqueDesc4thWhite=``,e.mensuralObliqueDesc5thBlack=``,e.mensuralObliqueDesc5thBlackVoid=``,e.mensuralObliqueDesc5thVoid=``,e.mensuralObliqueDesc5thWhite=``,e.mensuralProlation1=``,e.mensuralProlation10=``,e.mensuralProlation11=``,e.mensuralProlation2=``,e.mensuralProlation3=``,e.mensuralProlation4=``,e.mensuralProlation5=``,e.mensuralProlation6=``,e.mensuralProlation7=``,e.mensuralProlation8=``,e.mensuralProlation9=``,e.mensuralProlationCombiningDot=``,e.mensuralProlationCombiningDotVoid=``,e.mensuralProlationCombiningStroke=``,e.mensuralProlationCombiningThreeDots=``,e.mensuralProlationCombiningThreeDotsTri=``,e.mensuralProlationCombiningTwoDots=``,e.mensuralProportion1=``,e.mensuralProportion2=``,e.mensuralProportion3=``,e.mensuralProportion4=``,e.mensuralProportion5=``,e.mensuralProportion6=``,e.mensuralProportion7=``,e.mensuralProportion8=``,e.mensuralProportion9=``,e.mensuralProportionMajor=``,e.mensuralProportionMinor=``,e.mensuralProportionProportioDupla1=``,e.mensuralProportionProportioDupla2=``,e.mensuralProportionProportioQuadrupla=``,e.mensuralProportionProportioTripla=``,e.mensuralProportionTempusPerfectum=``,e.mensuralRestBrevis=``,e.mensuralRestFusa=``,e.mensuralRestLongaImperfecta=``,e.mensuralRestLongaPerfecta=``,e.mensuralRestMaxima=``,e.mensuralRestMinima=``,e.mensuralRestSemibrevis=``,e.mensuralRestSemifusa=``,e.mensuralRestSemiminima=``,e.mensuralSignumDown=``,e.mensuralSignumUp=``,e.mensuralTempusImperfectumHoriz=``,e.mensuralTempusPerfectumHoriz=``,e.mensuralWhiteBrevis=``,e.mensuralWhiteFusa=``,e.mensuralWhiteLonga=``,e.mensuralWhiteMaxima=``,e.mensuralWhiteMinima=``,e.mensuralWhiteSemibrevis=``,e.mensuralWhiteSemiminima=``,e.metAugmentationDot=``,e.metNote1024thDown=``,e.metNote1024thUp=``,e.metNote128thDown=``,e.metNote128thUp=``,e.metNote16thDown=``,e.metNote16thUp=``,e.metNote256thDown=``,e.metNote256thUp=``,e.metNote32ndDown=``,e.metNote32ndUp=``,e.metNote512thDown=``,e.metNote512thUp=``,e.metNote64thDown=``,e.metNote64thUp=``,e.metNote8thDown=``,e.metNote8thUp=``,e.metNoteDoubleWhole=``,e.metNoteDoubleWholeSquare=``,e.metNoteHalfDown=``,e.metNoteHalfUp=``,e.metNoteQuarterDown=``,e.metNoteQuarterUp=``,e.metNoteWhole=``,e.metricModulationArrowLeft=``,e.metricModulationArrowRight=``,e.miscDoNotCopy=``,e.miscDoNotPhotocopy=``,e.miscEyeglasses=``,e.note1024thDown=``,e.note1024thUp=``,e.note128thDown=``,e.note128thUp=``,e.note16thDown=``,e.note16thUp=``,e.note256thDown=``,e.note256thUp=``,e.note32ndDown=``,e.note32ndUp=``,e.note512thDown=``,e.note512thUp=``,e.note64thDown=``,e.note64thUp=``,e.note8thDown=``,e.note8thUp=``,e.noteABlack=``,e.noteAFlatBlack=``,e.noteAFlatHalf=``,e.noteAFlatWhole=``,e.noteAHalf=``,e.noteASharpBlack=``,e.noteASharpHalf=``,e.noteASharpWhole=``,e.noteAWhole=``,e.noteBBlack=``,e.noteBFlatBlack=``,e.noteBFlatHalf=``,e.noteBFlatWhole=``,e.noteBHalf=``,e.noteBSharpBlack=``,e.noteBSharpHalf=``,e.noteBSharpWhole=``,e.noteBWhole=``,e.noteCBlack=``,e.noteCFlatBlack=``,e.noteCFlatHalf=``,e.noteCFlatWhole=``,e.noteCHalf=``,e.noteCSharpBlack=``,e.noteCSharpHalf=``,e.noteCSharpWhole=``,e.noteCWhole=``,e.noteDBlack=``,e.noteDFlatBlack=``,e.noteDFlatHalf=``,e.noteDFlatWhole=``,e.noteDHalf=``,e.noteDSharpBlack=``,e.noteDSharpHalf=``,e.noteDSharpWhole=``,e.noteDWhole=``,e.noteDiBlack=``,e.noteDiHalf=``,e.noteDiWhole=``,e.noteDoBlack=``,e.noteDoHalf=``,e.noteDoWhole=``,e.noteDoubleWhole=``,e.noteDoubleWholeSquare=``,e.noteEBlack=``,e.noteEFlatBlack=``,e.noteEFlatHalf=``,e.noteEFlatWhole=``,e.noteEHalf=``,e.noteESharpBlack=``,e.noteESharpHalf=``,e.noteESharpWhole=``,e.noteEWhole=``,e.noteEmptyBlack=``,e.noteEmptyHalf=``,e.noteEmptyWhole=``,e.noteFBlack=``,e.noteFFlatBlack=``,e.noteFFlatHalf=``,e.noteFFlatWhole=``,e.noteFHalf=``,e.noteFSharpBlack=``,e.noteFSharpHalf=``,e.noteFSharpWhole=``,e.noteFWhole=``,e.noteFaBlack=``,e.noteFaHalf=``,e.noteFaWhole=``,e.noteFiBlack=``,e.noteFiHalf=``,e.noteFiWhole=``,e.noteGBlack=``,e.noteGFlatBlack=``,e.noteGFlatHalf=``,e.noteGFlatWhole=``,e.noteGHalf=``,e.noteGSharpBlack=``,e.noteGSharpHalf=``,e.noteGSharpWhole=``,e.noteGWhole=``,e.noteHBlack=``,e.noteHHalf=``,e.noteHSharpBlack=``,e.noteHSharpHalf=``,e.noteHSharpWhole=``,e.noteHWhole=``,e.noteHalfDown=``,e.noteHalfUp=``,e.noteLaBlack=``,e.noteLaHalf=``,e.noteLaWhole=``,e.noteLeBlack=``,e.noteLeHalf=``,e.noteLeWhole=``,e.noteLiBlack=``,e.noteLiHalf=``,e.noteLiWhole=``,e.noteMeBlack=``,e.noteMeHalf=``,e.noteMeWhole=``,e.noteMiBlack=``,e.noteMiHalf=``,e.noteMiWhole=``,e.noteQuarterDown=``,e.noteQuarterUp=``,e.noteRaBlack=``,e.noteRaHalf=``,e.noteRaWhole=``,e.noteReBlack=``,e.noteReHalf=``,e.noteReWhole=``,e.noteRiBlack=``,e.noteRiHalf=``,e.noteRiWhole=``,e.noteSeBlack=``,e.noteSeHalf=``,e.noteSeWhole=``,e.noteShapeArrowheadLeftBlack=``,e.noteShapeArrowheadLeftDoubleWhole=``,e.noteShapeArrowheadLeftWhite=``,e.noteShapeDiamondBlack=``,e.noteShapeDiamondDoubleWhole=``,e.noteShapeDiamondWhite=``,e.noteShapeIsoscelesTriangleBlack=``,e.noteShapeIsoscelesTriangleDoubleWhole=``,e.noteShapeIsoscelesTriangleWhite=``,e.noteShapeKeystoneBlack=``,e.noteShapeKeystoneDoubleWhole=``,e.noteShapeKeystoneWhite=``,e.noteShapeMoonBlack=``,e.noteShapeMoonDoubleWhole=``,e.noteShapeMoonLeftBlack=``,e.noteShapeMoonLeftDoubleWhole=``,e.noteShapeMoonLeftWhite=``,e.noteShapeMoonWhite=``,e.noteShapeQuarterMoonBlack=``,e.noteShapeQuarterMoonDoubleWhole=``,e.noteShapeQuarterMoonWhite=``,e.noteShapeRoundBlack=``,e.noteShapeRoundDoubleWhole=``,e.noteShapeRoundWhite=``,e.noteShapeSquareBlack=``,e.noteShapeSquareDoubleWhole=``,e.noteShapeSquareWhite=``,e.noteShapeTriangleLeftBlack=``,e.noteShapeTriangleLeftDoubleWhole=``,e.noteShapeTriangleLeftWhite=``,e.noteShapeTriangleRightBlack=``,e.noteShapeTriangleRightDoubleWhole=``,e.noteShapeTriangleRightWhite=``,e.noteShapeTriangleRoundBlack=``,e.noteShapeTriangleRoundDoubleWhole=``,e.noteShapeTriangleRoundLeftBlack=``,e.noteShapeTriangleRoundLeftDoubleWhole=``,e.noteShapeTriangleRoundLeftWhite=``,e.noteShapeTriangleRoundWhite=``,e.noteShapeTriangleUpBlack=``,e.noteShapeTriangleUpDoubleWhole=``,e.noteShapeTriangleUpWhite=``,e.noteSiBlack=``,e.noteSiHalf=``,e.noteSiWhole=``,e.noteSoBlack=``,e.noteSoHalf=``,e.noteSoWhole=``,e.noteTeBlack=``,e.noteTeHalf=``,e.noteTeWhole=``,e.noteTiBlack=``,e.noteTiHalf=``,e.noteTiWhole=``,e.noteWhole=``,e.noteheadBlack=``,e.noteheadCircleSlash=``,e.noteheadCircleX=``,e.noteheadCircleXDoubleWhole=``,e.noteheadCircleXHalf=``,e.noteheadCircleXWhole=``,e.noteheadCircledBlack=``,e.noteheadCircledBlackLarge=``,e.noteheadCircledDoubleWhole=``,e.noteheadCircledDoubleWholeLarge=``,e.noteheadCircledHalf=``,e.noteheadCircledHalfLarge=``,e.noteheadCircledWhole=``,e.noteheadCircledWholeLarge=``,e.noteheadCircledXLarge=``,e.noteheadClusterDoubleWhole2nd=``,e.noteheadClusterDoubleWhole3rd=``,e.noteheadClusterDoubleWholeBottom=``,e.noteheadClusterDoubleWholeMiddle=``,e.noteheadClusterDoubleWholeTop=``,e.noteheadClusterHalf2nd=``,e.noteheadClusterHalf3rd=``,e.noteheadClusterHalfBottom=``,e.noteheadClusterHalfMiddle=``,e.noteheadClusterHalfTop=``,e.noteheadClusterQuarter2nd=``,e.noteheadClusterQuarter3rd=``,e.noteheadClusterQuarterBottom=``,e.noteheadClusterQuarterMiddle=``,e.noteheadClusterQuarterTop=``,e.noteheadClusterRoundBlack=``,e.noteheadClusterRoundWhite=``,e.noteheadClusterSquareBlack=``,e.noteheadClusterSquareWhite=``,e.noteheadClusterWhole2nd=``,e.noteheadClusterWhole3rd=``,e.noteheadClusterWholeBottom=``,e.noteheadClusterWholeMiddle=``,e.noteheadClusterWholeTop=``,e.noteheadCowellEleventhNoteSeriesHalf=``,e.noteheadCowellEleventhNoteSeriesWhole=``,e.noteheadCowellEleventhSeriesBlack=``,e.noteheadCowellFifteenthNoteSeriesBlack=``,e.noteheadCowellFifteenthNoteSeriesHalf=``,e.noteheadCowellFifteenthNoteSeriesWhole=``,e.noteheadCowellFifthNoteSeriesBlack=``,e.noteheadCowellFifthNoteSeriesHalf=``,e.noteheadCowellFifthNoteSeriesWhole=``,e.noteheadCowellNinthNoteSeriesBlack=``,e.noteheadCowellNinthNoteSeriesHalf=``,e.noteheadCowellNinthNoteSeriesWhole=``,e.noteheadCowellSeventhNoteSeriesBlack=``,e.noteheadCowellSeventhNoteSeriesHalf=``,e.noteheadCowellSeventhNoteSeriesWhole=``,e.noteheadCowellThirdNoteSeriesBlack=``,e.noteheadCowellThirdNoteSeriesHalf=``,e.noteheadCowellThirdNoteSeriesWhole=``,e.noteheadCowellThirteenthNoteSeriesBlack=``,e.noteheadCowellThirteenthNoteSeriesHalf=``,e.noteheadCowellThirteenthNoteSeriesWhole=``,e.noteheadDiamondBlack=``,e.noteheadDiamondBlackOld=``,e.noteheadDiamondBlackWide=``,e.noteheadDiamondClusterBlack2nd=``,e.noteheadDiamondClusterBlack3rd=``,e.noteheadDiamondClusterBlackBottom=``,e.noteheadDiamondClusterBlackMiddle=``,e.noteheadDiamondClusterBlackTop=``,e.noteheadDiamondClusterWhite2nd=``,e.noteheadDiamondClusterWhite3rd=``,e.noteheadDiamondClusterWhiteBottom=``,e.noteheadDiamondClusterWhiteMiddle=``,e.noteheadDiamondClusterWhiteTop=``,e.noteheadDiamondDoubleWhole=``,e.noteheadDiamondDoubleWholeOld=``,e.noteheadDiamondHalf=``,e.noteheadDiamondHalfFilled=``,e.noteheadDiamondHalfOld=``,e.noteheadDiamondHalfWide=``,e.noteheadDiamondOpen=``,e.noteheadDiamondWhite=``,e.noteheadDiamondWhiteWide=``,e.noteheadDiamondWhole=``,e.noteheadDiamondWholeOld=``,e.noteheadDoubleWhole=``,e.noteheadDoubleWholeSquare=``,e.noteheadDoubleWholeWithX=``,e.noteheadHalf=``,e.noteheadHalfFilled=``,e.noteheadHalfWithX=``,e.noteheadHeavyX=``,e.noteheadHeavyXHat=``,e.noteheadLargeArrowDownBlack=``,e.noteheadLargeArrowDownDoubleWhole=``,e.noteheadLargeArrowDownHalf=``,e.noteheadLargeArrowDownWhole=``,e.noteheadLargeArrowUpBlack=``,e.noteheadLargeArrowUpDoubleWhole=``,e.noteheadLargeArrowUpHalf=``,e.noteheadLargeArrowUpWhole=``,e.noteheadMoonBlack=``,e.noteheadMoonWhite=``,e.noteheadNancarrowSine=``,e.noteheadNull=``,e.noteheadParenthesis=``,e.noteheadParenthesisLeft=``,e.noteheadParenthesisRight=``,e.noteheadPlusBlack=``,e.noteheadPlusDoubleWhole=``,e.noteheadPlusHalf=``,e.noteheadPlusWhole=``,e.noteheadRectangularClusterBlackBottom=``,e.noteheadRectangularClusterBlackMiddle=``,e.noteheadRectangularClusterBlackTop=``,e.noteheadRectangularClusterWhiteBottom=``,e.noteheadRectangularClusterWhiteMiddle=``,e.noteheadRectangularClusterWhiteTop=``,e.noteheadRoundBlack=``,e.noteheadRoundBlackDoubleSlashed=``,e.noteheadRoundBlackLarge=``,e.noteheadRoundBlackSlashed=``,e.noteheadRoundBlackSlashedLarge=``,e.noteheadRoundWhite=``,e.noteheadRoundWhiteDoubleSlashed=``,e.noteheadRoundWhiteLarge=``,e.noteheadRoundWhiteSlashed=``,e.noteheadRoundWhiteSlashedLarge=``,e.noteheadRoundWhiteWithDot=``,e.noteheadRoundWhiteWithDotLarge=``,e.noteheadSlashDiamondWhite=``,e.noteheadSlashHorizontalEnds=``,e.noteheadSlashHorizontalEndsMuted=``,e.noteheadSlashVerticalEnds=``,e.noteheadSlashVerticalEndsMuted=``,e.noteheadSlashVerticalEndsSmall=``,e.noteheadSlashWhiteDoubleWhole=``,e.noteheadSlashWhiteHalf=``,e.noteheadSlashWhiteMuted=``,e.noteheadSlashWhiteWhole=``,e.noteheadSlashX=``,e.noteheadSlashedBlack1=``,e.noteheadSlashedBlack2=``,e.noteheadSlashedDoubleWhole1=``,e.noteheadSlashedDoubleWhole2=``,e.noteheadSlashedHalf1=``,e.noteheadSlashedHalf2=``,e.noteheadSlashedWhole1=``,e.noteheadSlashedWhole2=``,e.noteheadSquareBlack=``,e.noteheadSquareBlackLarge=``,e.noteheadSquareBlackWhite=``,e.noteheadSquareWhite=``,e.noteheadTriangleDownBlack=``,e.noteheadTriangleDownDoubleWhole=``,e.noteheadTriangleDownHalf=``,e.noteheadTriangleDownWhite=``,e.noteheadTriangleDownWhole=``,e.noteheadTriangleLeftBlack=``,e.noteheadTriangleLeftWhite=``,e.noteheadTriangleRightBlack=``,e.noteheadTriangleRightWhite=``,e.noteheadTriangleRoundDownBlack=``,e.noteheadTriangleRoundDownWhite=``,e.noteheadTriangleUpBlack=``,e.noteheadTriangleUpDoubleWhole=``,e.noteheadTriangleUpHalf=``,e.noteheadTriangleUpRightBlack=``,e.noteheadTriangleUpRightWhite=``,e.noteheadTriangleUpWhite=``,e.noteheadTriangleUpWhole=``,e.noteheadVoidWithX=``,e.noteheadWhole=``,e.noteheadWholeFilled=``,e.noteheadWholeWithX=``,e.noteheadXBlack=``,e.noteheadXDoubleWhole=``,e.noteheadXHalf=``,e.noteheadXOrnate=``,e.noteheadXOrnateEllipse=``,e.noteheadXWhole=``,e.octaveBaselineA=``,e.octaveBaselineB=``,e.octaveBaselineM=``,e.octaveBaselineV=``,e.octaveBassa=``,e.octaveLoco=``,e.octaveParensLeft=``,e.octaveParensRight=``,e.octaveSuperscriptA=``,e.octaveSuperscriptB=``,e.octaveSuperscriptM=``,e.octaveSuperscriptV=``,e.oneHandedRollStevens=``,e.organGerman2Fusae=``,e.organGerman2Minimae=``,e.organGerman2OctaveUp=``,e.organGerman2Semifusae=``,e.organGerman2Semiminimae=``,e.organGerman3Fusae=``,e.organGerman3Minimae=``,e.organGerman3Semifusae=``,e.organGerman3Semiminimae=``,e.organGerman4Fusae=``,e.organGerman4Minimae=``,e.organGerman4Semifusae=``,e.organGerman4Semiminimae=``,e.organGerman5Fusae=``,e.organGerman5Minimae=``,e.organGerman5Semifusae=``,e.organGerman5Semiminimae=``,e.organGerman6Fusae=``,e.organGerman6Minimae=``,e.organGerman6Semifusae=``,e.organGerman6Semiminimae=``,e.organGermanALower=``,e.organGermanAUpper=``,e.organGermanAugmentationDot=``,e.organGermanBLower=``,e.organGermanBUpper=``,e.organGermanBuxheimerBrevis2=``,e.organGermanBuxheimerBrevis3=``,e.organGermanBuxheimerMinimaRest=``,e.organGermanBuxheimerSemibrevis=``,e.organGermanBuxheimerSemibrevisRest=``,e.organGermanCLower=``,e.organGermanCUpper=``,e.organGermanCisLower=``,e.organGermanCisUpper=``,e.organGermanDLower=``,e.organGermanDUpper=``,e.organGermanDisLower=``,e.organGermanDisUpper=``,e.organGermanELower=``,e.organGermanEUpper=``,e.organGermanFLower=``,e.organGermanFUpper=``,e.organGermanFisLower=``,e.organGermanFisUpper=``,e.organGermanFusa=``,e.organGermanFusaRest=``,e.organGermanGLower=``,e.organGermanGUpper=``,e.organGermanGisLower=``,e.organGermanGisUpper=``,e.organGermanHLower=``,e.organGermanHUpper=``,e.organGermanMinima=``,e.organGermanMinimaRest=``,e.organGermanOctaveDown=``,e.organGermanOctaveUp=``,e.organGermanSemibrevis=``,e.organGermanSemibrevisRest=``,e.organGermanSemifusa=``,e.organGermanSemifusaRest=``,e.organGermanSemiminima=``,e.organGermanSemiminimaRest=``,e.organGermanTie=``,e.ornamentBottomLeftConcaveStroke=``,e.ornamentBottomLeftConcaveStrokeLarge=``,e.ornamentBottomLeftConvexStroke=``,e.ornamentBottomRightConcaveStroke=``,e.ornamentBottomRightConvexStroke=``,e.ornamentComma=``,e.ornamentDoubleObliqueLinesAfterNote=``,e.ornamentDoubleObliqueLinesBeforeNote=``,e.ornamentDownCurve=``,e.ornamentHaydn=``,e.ornamentHighLeftConcaveStroke=``,e.ornamentHighLeftConvexStroke=``,e.ornamentHighRightConcaveStroke=``,e.ornamentHighRightConvexStroke=``,e.ornamentHookAfterNote=``,e.ornamentHookBeforeNote=``,e.ornamentLeftFacingHalfCircle=``,e.ornamentLeftFacingHook=``,e.ornamentLeftPlus=``,e.ornamentLeftShakeT=``,e.ornamentLeftVerticalStroke=``,e.ornamentLeftVerticalStrokeWithCross=``,e.ornamentLowLeftConcaveStroke=``,e.ornamentLowLeftConvexStroke=``,e.ornamentLowRightConcaveStroke=``,e.ornamentLowRightConvexStroke=``,e.ornamentMiddleVerticalStroke=``,e.ornamentMordent=``,e.ornamentObliqueLineAfterNote=``,e.ornamentObliqueLineBeforeNote=``,e.ornamentObliqueLineHorizAfterNote=``,e.ornamentObliqueLineHorizBeforeNote=``,e.ornamentOriscus=``,e.ornamentPinceCouperin=``,e.ornamentPortDeVoixV=``,e.ornamentPrecompAppoggTrill=``,e.ornamentPrecompAppoggTrillSuffix=``,e.ornamentPrecompCadence=``,e.ornamentPrecompCadenceUpperPrefix=``,e.ornamentPrecompCadenceUpperPrefixTurn=``,e.ornamentPrecompCadenceWithTurn=``,e.ornamentPrecompDescendingSlide=``,e.ornamentPrecompDoubleCadenceLowerPrefix=``,e.ornamentPrecompDoubleCadenceUpperPrefix=``,e.ornamentPrecompDoubleCadenceUpperPrefixTurn=``,e.ornamentPrecompInvertedMordentUpperPrefix=``,e.ornamentPrecompMordentRelease=``,e.ornamentPrecompMordentUpperPrefix=``,e.ornamentPrecompPortDeVoixMordent=``,e.ornamentPrecompSlide=``,e.ornamentPrecompSlideTrillBach=``,e.ornamentPrecompSlideTrillDAnglebert=``,e.ornamentPrecompSlideTrillMarpurg=``,e.ornamentPrecompSlideTrillMuffat=``,e.ornamentPrecompSlideTrillSuffixMuffat=``,e.ornamentPrecompTrillLowerSuffix=``,e.ornamentPrecompTrillSuffixDandrieu=``,e.ornamentPrecompTrillWithMordent=``,e.ornamentPrecompTurnTrillBach=``,e.ornamentPrecompTurnTrillDAnglebert=``,e.ornamentQuilisma=``,e.ornamentRightFacingHalfCircle=``,e.ornamentRightFacingHook=``,e.ornamentRightVerticalStroke=``,e.ornamentSchleifer=``,e.ornamentShake3=``,e.ornamentShakeMuffat1=``,e.ornamentShortObliqueLineAfterNote=``,e.ornamentShortObliqueLineBeforeNote=``,e.ornamentShortTrill=``,e.ornamentTopLeftConcaveStroke=``,e.ornamentTopLeftConvexStroke=``,e.ornamentTopRightConcaveStroke=``,e.ornamentTopRightConvexStroke=``,e.ornamentTremblement=``,e.ornamentTremblementCouperin=``,e.ornamentTrill=``,e.ornamentTurn=``,e.ornamentTurnInverted=``,e.ornamentTurnSlash=``,e.ornamentTurnUp=``,e.ornamentTurnUpS=``,e.ornamentUpCurve=``,e.ornamentVerticalLine=``,e.ornamentZigZagLineNoRightEnd=``,e.ornamentZigZagLineWithRightEnd=``,e.ottava=``,e.ottavaAlta=``,e.ottavaBassa=``,e.ottavaBassaBa=``,e.ottavaBassaVb=``,e.pendereckiTremolo=``,e.pictAgogo=``,e.pictAlmglocken=``,e.pictAnvil=``,e.pictBambooChimes=``,e.pictBambooScraper=``,e.pictBassDrum=``,e.pictBassDrumOnSide=``,e.pictBeaterBow=``,e.pictBeaterBox=``,e.pictBeaterBrassMalletsDown=``,e.pictBeaterBrassMalletsLeft=``,e.pictBeaterBrassMalletsRight=``,e.pictBeaterBrassMalletsUp=``,e.pictBeaterCombiningDashedCircle=``,e.pictBeaterCombiningParentheses=``,e.pictBeaterDoubleBassDrumDown=``,e.pictBeaterDoubleBassDrumUp=``,e.pictBeaterFinger=``,e.pictBeaterFingernails=``,e.pictBeaterFist=``,e.pictBeaterGuiroScraper=``,e.pictBeaterHammer=``,e.pictBeaterHammerMetalDown=``,e.pictBeaterHammerMetalUp=``,e.pictBeaterHammerPlasticDown=``,e.pictBeaterHammerPlasticUp=``,e.pictBeaterHammerWoodDown=``,e.pictBeaterHammerWoodUp=``,e.pictBeaterHand=``,e.pictBeaterHardBassDrumDown=``,e.pictBeaterHardBassDrumUp=``,e.pictBeaterHardGlockenspielDown=``,e.pictBeaterHardGlockenspielLeft=``,e.pictBeaterHardGlockenspielRight=``,e.pictBeaterHardGlockenspielUp=``,e.pictBeaterHardTimpaniDown=``,e.pictBeaterHardTimpaniLeft=``,e.pictBeaterHardTimpaniRight=``,e.pictBeaterHardTimpaniUp=``,e.pictBeaterHardXylophoneDown=``,e.pictBeaterHardXylophoneLeft=``,e.pictBeaterHardXylophoneRight=``,e.pictBeaterHardXylophoneUp=``,e.pictBeaterHardYarnDown=``,e.pictBeaterHardYarnLeft=``,e.pictBeaterHardYarnRight=``,e.pictBeaterHardYarnUp=``,e.pictBeaterJazzSticksDown=``,e.pictBeaterJazzSticksUp=``,e.pictBeaterKnittingNeedle=``,e.pictBeaterMallet=``,e.pictBeaterMalletDown=``,e.pictBeaterMediumBassDrumDown=``,e.pictBeaterMediumBassDrumUp=``,e.pictBeaterMediumTimpaniDown=``,e.pictBeaterMediumTimpaniLeft=``,e.pictBeaterMediumTimpaniRight=``,e.pictBeaterMediumTimpaniUp=``,e.pictBeaterMediumXylophoneDown=``,e.pictBeaterMediumXylophoneLeft=``,e.pictBeaterMediumXylophoneRight=``,e.pictBeaterMediumXylophoneUp=``,e.pictBeaterMediumYarnDown=``,e.pictBeaterMediumYarnLeft=``,e.pictBeaterMediumYarnRight=``,e.pictBeaterMediumYarnUp=``,e.pictBeaterMetalBassDrumDown=``,e.pictBeaterMetalBassDrumUp=``,e.pictBeaterMetalDown=``,e.pictBeaterMetalHammer=``,e.pictBeaterMetalLeft=``,e.pictBeaterMetalRight=``,e.pictBeaterMetalUp=``,e.pictBeaterSnareSticksDown=``,e.pictBeaterSnareSticksUp=``,e.pictBeaterSoftBassDrumDown=``,e.pictBeaterSoftBassDrumUp=``,e.pictBeaterSoftGlockenspielDown=``,e.pictBeaterSoftGlockenspielLeft=``,e.pictBeaterSoftGlockenspielRight=``,e.pictBeaterSoftGlockenspielUp=``,e.pictBeaterSoftTimpaniDown=``,e.pictBeaterSoftTimpaniLeft=``,e.pictBeaterSoftTimpaniRight=``,e.pictBeaterSoftTimpaniUp=``,e.pictBeaterSoftXylophone=``,e.pictBeaterSoftXylophoneDown=``,e.pictBeaterSoftXylophoneLeft=``,e.pictBeaterSoftXylophoneRight=``,e.pictBeaterSoftXylophoneUp=``,e.pictBeaterSoftYarnDown=``,e.pictBeaterSoftYarnLeft=``,e.pictBeaterSoftYarnRight=``,e.pictBeaterSoftYarnUp=``,e.pictBeaterSpoonWoodenMallet=``,e.pictBeaterSuperballDown=``,e.pictBeaterSuperballLeft=``,e.pictBeaterSuperballRight=``,e.pictBeaterSuperballUp=``,e.pictBeaterTriangleDown=``,e.pictBeaterTrianglePlain=``,e.pictBeaterTriangleUp=``,e.pictBeaterWireBrushesDown=``,e.pictBeaterWireBrushesUp=``,e.pictBeaterWoodTimpaniDown=``,e.pictBeaterWoodTimpaniLeft=``,e.pictBeaterWoodTimpaniRight=``,e.pictBeaterWoodTimpaniUp=``,e.pictBeaterWoodXylophoneDown=``,e.pictBeaterWoodXylophoneLeft=``,e.pictBeaterWoodXylophoneRight=``,e.pictBeaterWoodXylophoneUp=``,e.pictBell=``,e.pictBellOfCymbal=``,e.pictBellPlate=``,e.pictBellTree=``,e.pictBirdWhistle=``,e.pictBoardClapper=``,e.pictBongos=``,e.pictBrakeDrum=``,e.pictCabasa=``,e.pictCannon=``,e.pictCarHorn=``,e.pictCastanets=``,e.pictCastanetsWithHandle=``,e.pictCelesta=``,e.pictCencerro=``,e.pictCenter1=``,e.pictCenter2=``,e.pictCenter3=``,e.pictChainRattle=``,e.pictChimes=``,e.pictChineseCymbal=``,e.pictChokeCymbal=``,e.pictClaves=``,e.pictCoins=``,e.pictConga=``,e.pictCowBell=``,e.pictCrashCymbals=``,e.pictCrotales=``,e.pictCrushStem=``,e.pictCuica=``,e.pictCymbalTongs=``,e.pictDamp1=``,e.pictDamp2=``,e.pictDamp3=``,e.pictDamp4=``,e.pictDeadNoteStem=``,e.pictDrumStick=``,e.pictDuckCall=``,e.pictEdgeOfCymbal=``,e.pictEmptyTrap=``,e.pictFingerCymbals=``,e.pictFlexatone=``,e.pictFootballRatchet=``,e.pictGlassHarmonica=``,e.pictGlassHarp=``,e.pictGlassPlateChimes=``,e.pictGlassTubeChimes=``,e.pictGlsp=``,e.pictGlspSmithBrindle=``,e.pictGobletDrum=``,e.pictGong=``,e.pictGongWithButton=``,e.pictGuiro=``,e.pictGumHardDown=``,e.pictGumHardLeft=``,e.pictGumHardRight=``,e.pictGumHardUp=``,e.pictGumMediumDown=``,e.pictGumMediumLeft=``,e.pictGumMediumRight=``,e.pictGumMediumUp=``,e.pictGumSoftDown=``,e.pictGumSoftLeft=``,e.pictGumSoftRight=``,e.pictGumSoftUp=``,e.pictHalfOpen1=``,e.pictHalfOpen2=``,e.pictHandbell=``,e.pictHiHat=``,e.pictHiHatOnStand=``,e.pictJawHarp=``,e.pictJingleBells=``,e.pictKlaxonHorn=``,e.pictLeftHandCircle=``,e.pictLionsRoar=``,e.pictLithophone=``,e.pictLogDrum=``,e.pictLotusFlute=``,e.pictMar=``,e.pictMarSmithBrindle=``,e.pictMaraca=``,e.pictMaracas=``,e.pictMegaphone=``,e.pictMetalPlateChimes=``,e.pictMetalTubeChimes=``,e.pictMusicalSaw=``,e.pictNormalPosition=``,e.pictOnRim=``,e.pictOpen=``,e.pictOpenRimShot=``,e.pictPistolShot=``,e.pictPoliceWhistle=``,e.pictQuijada=``,e.pictRainstick=``,e.pictRatchet=``,e.pictRecoReco=``,e.pictRightHandSquare=``,e.pictRim1=``,e.pictRim2=``,e.pictRim3=``,e.pictRimShotOnStem=``,e.pictSandpaperBlocks=``,e.pictScrapeAroundRim=``,e.pictScrapeAroundRimClockwise=``,e.pictScrapeCenterToEdge=``,e.pictScrapeEdgeToCenter=``,e.pictShellBells=``,e.pictShellChimes=``,e.pictSiren=``,e.pictSistrum=``,e.pictSizzleCymbal=``,e.pictSleighBell=``,e.pictSlideBrushOnGong=``,e.pictSlideWhistle=``,e.pictSlitDrum=``,e.pictSnareDrum=``,e.pictSnareDrumMilitary=``,e.pictSnareDrumSnaresOff=``,e.pictSteelDrums=``,e.pictStickShot=``,e.pictSuperball=``,e.pictSuspendedCymbal=``,e.pictSwishStem=``,e.pictTabla=``,e.pictTamTam=``,e.pictTamTamWithBeater=``,e.pictTambourine=``,e.pictTempleBlocks=``,e.pictTenorDrum=``,e.pictThundersheet=``,e.pictTimbales=``,e.pictTimpani=``,e.pictTomTom=``,e.pictTomTomChinese=``,e.pictTomTomIndoAmerican=``,e.pictTomTomJapanese=``,e.pictTriangle=``,e.pictTubaphone=``,e.pictTubularBells=``,e.pictTurnLeftStem=``,e.pictTurnRightLeftStem=``,e.pictTurnRightStem=``,e.pictVib=``,e.pictVibMotorOff=``,e.pictVibSmithBrindle=``,e.pictVibraslap=``,e.pictVietnameseHat=``,e.pictWhip=``,e.pictWindChimesGlass=``,e.pictWindMachine=``,e.pictWindWhistle=``,e.pictWoodBlock=``,e.pictWoundHardDown=``,e.pictWoundHardLeft=``,e.pictWoundHardRight=``,e.pictWoundHardUp=``,e.pictWoundSoftDown=``,e.pictWoundSoftLeft=``,e.pictWoundSoftRight=``,e.pictWoundSoftUp=``,e.pictXyl=``,e.pictXylBass=``,e.pictXylSmithBrindle=``,e.pictXylTenor=``,e.pictXylTenorTrough=``,e.pictXylTrough=``,e.pluckedBuzzPizzicato=``,e.pluckedDamp=``,e.pluckedDampAll=``,e.pluckedDampOnStem=``,e.pluckedFingernailFlick=``,e.pluckedLeftHandPizzicato=``,e.pluckedPlectrum=``,e.pluckedSnapPizzicatoAbove=``,e.pluckedSnapPizzicatoBelow=``,e.pluckedWithFingernails=``,e.quindicesima=``,e.quindicesimaAlta=``,e.quindicesimaBassa=``,e.quindicesimaBassaMb=``,e.repeat1Bar=``,e.repeat2Bars=``,e.repeat4Bars=``,e.repeatBarLowerDot=``,e.repeatBarSlash=``,e.repeatBarUpperDot=``,e.repeatDot=``,e.repeatDots=``,e.repeatLeft=``,e.repeatRight=``,e.repeatRightLeft=``,e.rest1024th=``,e.rest128th=``,e.rest16th=``,e.rest256th=``,e.rest32nd=``,e.rest512th=``,e.rest64th=``,e.rest8th=``,e.restDoubleWhole=``,e.restDoubleWholeLegerLine=``,e.restHBar=``,e.restHBarLeft=``,e.restHBarMiddle=``,e.restHBarRight=``,e.restHalf=``,e.restHalfLegerLine=``,e.restLonga=``,e.restMaxima=``,e.restQuarter=``,e.restQuarterOld=``,e.restQuarterZ=``,e.restWhole=``,e.restWholeLegerLine=``,e.reversedBrace=``,e.reversedBracketBottom=``,e.reversedBracketTop=``,e.rightRepeatSmall=``,e.scaleDegree1=``,e.scaleDegree2=``,e.scaleDegree3=``,e.scaleDegree4=``,e.scaleDegree5=``,e.scaleDegree6=``,e.scaleDegree7=``,e.scaleDegree8=``,e.scaleDegree9=``,e.schaefferClef=``,e.schaefferFClefToGClef=``,e.schaefferGClefToFClef=``,e.schaefferPreviousClef=``,e.segno=``,e.segnoSerpent1=``,e.segnoSerpent2=``,e.semipitchedPercussionClef1=``,e.semipitchedPercussionClef2=``,e.smnFlat=``,e.smnFlatWhite=``,e.smnHistoryDoubleFlat=``,e.smnHistoryDoubleSharp=``,e.smnHistoryFlat=``,e.smnHistorySharp=``,e.smnNatural=``,e.smnSharp=``,e.smnSharpDown=``,e.smnSharpWhite=``,e.smnSharpWhiteDown=``,e.splitBarDivider=``,e.staff1Line=``,e.staff1LineNarrow=``,e.staff1LineWide=``,e.staff2Lines=``,e.staff2LinesNarrow=``,e.staff2LinesWide=``,e.staff3Lines=``,e.staff3LinesNarrow=``,e.staff3LinesWide=``,e.staff4Lines=``,e.staff4LinesNarrow=``,e.staff4LinesWide=``,e.staff5Lines=``,e.staff5LinesNarrow=``,e.staff5LinesWide=``,e.staff6Lines=``,e.staff6LinesNarrow=``,e.staff6LinesWide=``,e.staffDivideArrowDown=``,e.staffDivideArrowUp=``,e.staffDivideArrowUpDown=``,e.staffPosLower1=``,e.staffPosLower2=``,e.staffPosLower3=``,e.staffPosLower4=``,e.staffPosLower5=``,e.staffPosLower6=``,e.staffPosLower7=``,e.staffPosLower8=``,e.staffPosRaise1=``,e.staffPosRaise2=``,e.staffPosRaise3=``,e.staffPosRaise4=``,e.staffPosRaise5=``,e.staffPosRaise6=``,e.staffPosRaise7=``,e.staffPosRaise8=``,e.stem=``,e.stemBowOnBridge=``,e.stemBowOnTailpiece=``,e.stemBuzzRoll=``,e.stemDamp=``,e.stemHarpStringNoise=``,e.stemMultiphonicsBlack=``,e.stemMultiphonicsBlackWhite=``,e.stemMultiphonicsWhite=``,e.stemPendereckiTremolo=``,e.stemRimShot=``,e.stemSprechgesang=``,e.stemSulPonticello=``,e.stemSussurando=``,e.stemSwished=``,e.stemVibratoPulse=``,e.stockhausenTremolo=``,e.stringsBowBehindBridge=``,e.stringsBowBehindBridgeFourStrings=``,e.stringsBowBehindBridgeOneString=``,e.stringsBowBehindBridgeThreeStrings=``,e.stringsBowBehindBridgeTwoStrings=``,e.stringsBowOnBridge=``,e.stringsBowOnTailpiece=``,e.stringsChangeBowDirection=``,e.stringsDownBow=``,e.stringsDownBowAwayFromBody=``,e.stringsDownBowBeyondBridge=``,e.stringsDownBowTowardsBody=``,e.stringsDownBowTurned=``,e.stringsFouette=``,e.stringsHalfHarmonic=``,e.stringsHarmonic=``,e.stringsJeteAbove=``,e.stringsJeteBelow=``,e.stringsMuteOff=``,e.stringsMuteOn=``,e.stringsOverpressureDownBow=``,e.stringsOverpressureNoDirection=``,e.stringsOverpressurePossibileDownBow=``,e.stringsOverpressurePossibileUpBow=``,e.stringsOverpressureUpBow=``,e.stringsScrapeCircularClockwise=``,e.stringsScrapeCircularCounterclockwise=``,e.stringsScrapeParallelInward=``,e.stringsScrapeParallelOutward=``,e.stringsThumbPosition=``,e.stringsThumbPositionTurned=``,e.stringsTripleChopInward=``,e.stringsTripleChopOutward=``,e.stringsUpBow=``,e.stringsUpBowAwayFromBody=``,e.stringsUpBowBeyondBridge=``,e.stringsUpBowTowardsBody=``,e.stringsUpBowTurned=``,e.stringsVibratoPulse=``,e.swissRudimentsNoteheadBlackDouble=``,e.swissRudimentsNoteheadBlackFlam=``,e.swissRudimentsNoteheadHalfDouble=``,e.swissRudimentsNoteheadHalfFlam=``,e.systemDivider=``,e.systemDividerExtraLong=``,e.systemDividerLong=``,e.textAugmentationDot=``,e.textBlackNoteFrac16thLongStem=``,e.textBlackNoteFrac16thShortStem=``,e.textBlackNoteFrac32ndLongStem=``,e.textBlackNoteFrac8thLongStem=``,e.textBlackNoteFrac8thShortStem=``,e.textBlackNoteLongStem=``,e.textBlackNoteShortStem=``,e.textCont16thBeamLongStem=``,e.textCont16thBeamShortStem=``,e.textCont32ndBeamLongStem=``,e.textCont8thBeamLongStem=``,e.textCont8thBeamShortStem=``,e.textHeadlessBlackNoteFrac16thLongStem=``,e.textHeadlessBlackNoteFrac16thShortStem=``,e.textHeadlessBlackNoteFrac32ndLongStem=``,e.textHeadlessBlackNoteFrac8thLongStem=``,e.textHeadlessBlackNoteFrac8thShortStem=``,e.textHeadlessBlackNoteLongStem=``,e.textHeadlessBlackNoteShortStem=``,e.textTie=``,e.textTuplet3LongStem=``,e.textTuplet3ShortStem=``,e.textTupletBracketEndLongStem=``,e.textTupletBracketEndShortStem=``,e.textTupletBracketStartLongStem=``,e.textTupletBracketStartShortStem=``,e.timeSig0=``,e.timeSig0Reversed=``,e.timeSig0Turned=``,e.timeSig1=``,e.timeSig1Reversed=``,e.timeSig1Turned=``,e.timeSig2=``,e.timeSig2Reversed=``,e.timeSig2Turned=``,e.timeSig3=``,e.timeSig3Reversed=``,e.timeSig3Turned=``,e.timeSig4=``,e.timeSig4Reversed=``,e.timeSig4Turned=``,e.timeSig5=``,e.timeSig5Reversed=``,e.timeSig5Turned=``,e.timeSig6=``,e.timeSig6Reversed=``,e.timeSig6Turned=``,e.timeSig7=``,e.timeSig7Reversed=``,e.timeSig7Turned=``,e.timeSig8=``,e.timeSig8Reversed=``,e.timeSig8Turned=``,e.timeSig9=``,e.timeSig9Reversed=``,e.timeSig9Turned=``,e.timeSigBracketLeft=``,e.timeSigBracketLeftSmall=``,e.timeSigBracketRight=``,e.timeSigBracketRightSmall=``,e.timeSigCombDenominator=``,e.timeSigCombNumerator=``,e.timeSigComma=``,e.timeSigCommon=``,e.timeSigCommonReversed=``,e.timeSigCommonTurned=``,e.timeSigCut2=``,e.timeSigCut3=``,e.timeSigCutCommon=``,e.timeSigCutCommonReversed=``,e.timeSigCutCommonTurned=``,e.timeSigEquals=``,e.timeSigFractionHalf=``,e.timeSigFractionOneThird=``,e.timeSigFractionQuarter=``,e.timeSigFractionThreeQuarters=``,e.timeSigFractionTwoThirds=``,e.timeSigFractionalSlash=``,e.timeSigMinus=``,e.timeSigMultiply=``,e.timeSigOpenPenderecki=``,e.timeSigParensLeft=``,e.timeSigParensLeftSmall=``,e.timeSigParensRight=``,e.timeSigParensRightSmall=``,e.timeSigPlus=``,e.timeSigPlusSmall=``,e.timeSigSlash=``,e.timeSigX=``,e.tremolo1=``,e.tremolo2=``,e.tremolo3=``,e.tremolo4=``,e.tremolo5=``,e.tremoloDivisiDots2=``,e.tremoloDivisiDots3=``,e.tremoloDivisiDots4=``,e.tremoloDivisiDots6=``,e.tremoloFingered1=``,e.tremoloFingered2=``,e.tremoloFingered3=``,e.tremoloFingered4=``,e.tremoloFingered5=``,e.tripleTongueAbove=``,e.tripleTongueBelow=``,e.tuplet0=``,e.tuplet1=``,e.tuplet2=``,e.tuplet3=``,e.tuplet4=``,e.tuplet5=``,e.tuplet6=``,e.tuplet7=``,e.tuplet8=``,e.tuplet9=``,e.tupletColon=``,e.unmeasuredTremolo=``,e.unmeasuredTremoloSimple=``,e.unpitchedPercussionClef1=``,e.unpitchedPercussionClef2=``,e.ventiduesima=``,e.ventiduesimaAlta=``,e.ventiduesimaBassa=``,e.ventiduesimaBassaMb=``,e.vocalFingerClickStockhausen=``,e.vocalHalbGesungen=``,e.vocalMouthClosed=``,e.vocalMouthOpen=``,e.vocalMouthPursed=``,e.vocalMouthSlightlyOpen=``,e.vocalMouthWideOpen=``,e.vocalNasalVoice=``,e.vocalSprechgesang=``,e.vocalTongueClickStockhausen=``,e.vocalTongueFingerClickStockhausen=``,e.vocalsSussurando=``,e.wiggleArpeggiatoDown=``,e.wiggleArpeggiatoDownArrow=``,e.wiggleArpeggiatoDownSwash=``,e.wiggleArpeggiatoUp=``,e.wiggleArpeggiatoUpArrow=``,e.wiggleArpeggiatoUpSwash=``,e.wiggleCircular=``,e.wiggleCircularConstant=``,e.wiggleCircularConstantFlipped=``,e.wiggleCircularConstantFlippedLarge=``,e.wiggleCircularConstantLarge=``,e.wiggleCircularEnd=``,e.wiggleCircularLarge=``,e.wiggleCircularLarger=``,e.wiggleCircularLargerStill=``,e.wiggleCircularLargest=``,e.wiggleCircularSmall=``,e.wiggleCircularStart=``,e.wiggleGlissando=``,e.wiggleGlissandoGroup1=``,e.wiggleGlissandoGroup2=``,e.wiggleGlissandoGroup3=``,e.wiggleRandom1=``,e.wiggleRandom2=``,e.wiggleRandom3=``,e.wiggleRandom4=``,e.wiggleSawtooth=``,e.wiggleSawtoothNarrow=``,e.wiggleSawtoothWide=``,e.wiggleSquareWave=``,e.wiggleSquareWaveNarrow=``,e.wiggleSquareWaveWide=``,e.wiggleTrill=``,e.wiggleTrillFast=``,e.wiggleTrillFaster=``,e.wiggleTrillFasterStill=``,e.wiggleTrillFastest=``,e.wiggleTrillSlow=``,e.wiggleTrillSlower=``,e.wiggleTrillSlowerStill=``,e.wiggleTrillSlowest=``,e.wiggleVIbratoLargestSlower=``,e.wiggleVIbratoMediumSlower=``,e.wiggleVibrato=``,e.wiggleVibratoLargeFast=``,e.wiggleVibratoLargeFaster=``,e.wiggleVibratoLargeFasterStill=``,e.wiggleVibratoLargeFastest=``,e.wiggleVibratoLargeSlow=``,e.wiggleVibratoLargeSlower=``,e.wiggleVibratoLargeSlowest=``,e.wiggleVibratoLargestFast=``,e.wiggleVibratoLargestFaster=``,e.wiggleVibratoLargestFasterStill=``,e.wiggleVibratoLargestFastest=``,e.wiggleVibratoLargestSlow=``,e.wiggleVibratoLargestSlowest=``,e.wiggleVibratoMediumFast=``,e.wiggleVibratoMediumFaster=``,e.wiggleVibratoMediumFasterStill=``,e.wiggleVibratoMediumFastest=``,e.wiggleVibratoMediumSlow=``,e.wiggleVibratoMediumSlowest=``,e.wiggleVibratoSmallFast=``,e.wiggleVibratoSmallFaster=``,e.wiggleVibratoSmallFasterStill=``,e.wiggleVibratoSmallFastest=``,e.wiggleVibratoSmallSlow=``,e.wiggleVibratoSmallSlower=``,e.wiggleVibratoSmallSlowest=``,e.wiggleVibratoSmallestFast=``,e.wiggleVibratoSmallestFaster=``,e.wiggleVibratoSmallestFasterStill=``,e.wiggleVibratoSmallestFastest=``,e.wiggleVibratoSmallestSlow=``,e.wiggleVibratoSmallestSlower=``,e.wiggleVibratoSmallestSlowest=``,e.wiggleVibratoStart=``,e.wiggleVibratoWide=``,e.wiggleWavy=``,e.wiggleWavyNarrow=``,e.wiggleWavyWide=``,e.windClosedHole=``,e.windFlatEmbouchure=``,e.windHalfClosedHole1=``,e.windHalfClosedHole2=``,e.windHalfClosedHole3=``,e.windLessRelaxedEmbouchure=``,e.windLessTightEmbouchure=``,e.windMouthpiecePop=``,e.windMultiphonicsBlackStem=``,e.windMultiphonicsBlackWhiteStem=``,e.windMultiphonicsWhiteStem=``,e.windOpenHole=``,e.windReedPositionIn=``,e.windReedPositionNormal=``,e.windReedPositionOut=``,e.windRelaxedEmbouchure=``,e.windRimOnly=``,e.windSharpEmbouchure=``,e.windStrongAirPressure=``,e.windThreeQuartersClosedHole=``,e.windTightEmbouchure=``,e.windTrillKey=``,e.windVeryTightEmbouchure=``,e.windWeakAirPressure=``,e}({}),F=16384,ie={"1/8":F*8,"1/4":F*4,"1/2":F*2,1:F/1,2:F/2,4:F/4,8:F/8,16:F/16,32:F/32,64:F/64,128:F/128,256:F/256,512:F/512,1024:F/1024},ae={m:`1/8`,l:`1/4`,w:`1`,h:`2`,q:`4`,b:`256`},oe={...(()=>{let e={};for(let t=1;t<=14;t++)e[`flats_${t}`]={accidental:`b`,num:t},e[`sharps_${t}`]={accidental:`#`,num:t};return e.flats_0={num:0},e.sharps_0={num:0},e})(),C:{num:0},Am:{num:0},F:{accidental:`b`,num:1},Dm:{accidental:`b`,num:1},Bb:{accidental:`b`,num:2},Gm:{accidental:`b`,num:2},Eb:{accidental:`b`,num:3},Cm:{accidental:`b`,num:3},Ab:{accidental:`b`,num:4},Fm:{accidental:`b`,num:4},Db:{accidental:`b`,num:5},Bbm:{accidental:`b`,num:5},Gb:{accidental:`b`,num:6},Ebm:{accidental:`b`,num:6},Cb:{accidental:`b`,num:7},Abm:{accidental:`b`,num:7},Dbm:{accidental:`b`,num:8},Gbm:{accidental:`b`,num:9},G:{accidental:`#`,num:1},Em:{accidental:`#`,num:1},D:{accidental:`#`,num:2},Bm:{accidental:`#`,num:2},A:{accidental:`#`,num:3},"F#m":{accidental:`#`,num:3},E:{accidental:`#`,num:4},"C#m":{accidental:`#`,num:4},B:{accidental:`#`,num:5},"G#m":{accidental:`#`,num:5},"F#":{accidental:`#`,num:6},"D#m":{accidental:`#`,num:6},"C#":{accidental:`#`,num:7},"A#m":{accidental:`#`,num:7},"G#":{accidental:`#`,num:8},"D#":{accidental:`#`,num:9},"A#":{accidental:`#`,num:10}},se={treble:{lineShift:0},bass:{lineShift:6},tenor:{lineShift:4},alto:{lineShift:3},soprano:{lineShift:1},percussion:{lineShift:0},"mezzo-soprano":{lineShift:2},"baritone-c":{lineShift:5},"baritone-f":{lineShift:5},subbass:{lineShift:7},french:{lineShift:-1}},ce={C:{index:0,intVal:0},CN:{index:0,intVal:0},"C#":{index:0,intVal:1},"C##":{index:0,intVal:2},CB:{index:0,intVal:11},CBB:{index:0,intVal:10},D:{index:1,intVal:2},DN:{index:1,intVal:2},"D#":{index:1,intVal:3},"D##":{index:1,intVal:4},DB:{index:1,intVal:1},DBB:{index:1,intVal:0},E:{index:2,intVal:4},EN:{index:2,intVal:4},"E#":{index:2,intVal:5},"E##":{index:2,intVal:6},EB:{index:2,intVal:3},EBB:{index:2,intVal:2},F:{index:3,intVal:5},FN:{index:3,intVal:5},"F#":{index:3,intVal:6},"F##":{index:3,intVal:7},FB:{index:3,intVal:4},FBB:{index:3,intVal:3},G:{index:4,intVal:7},GN:{index:4,intVal:7},"G#":{index:4,intVal:8},"G##":{index:4,intVal:9},GB:{index:4,intVal:6},GBB:{index:4,intVal:5},A:{index:5,intVal:9},AN:{index:5,intVal:9},"A#":{index:5,intVal:10},"A##":{index:5,intVal:11},AB:{index:5,intVal:8},ABB:{index:5,intVal:7},B:{index:6,intVal:11},BN:{index:6,intVal:11},"B#":{index:6,intVal:12},"B##":{index:6,intVal:13},BB:{index:6,intVal:10},BBB:{index:6,intVal:9},R:{index:6},X:{index:6}},le={n:{name:`note`},r:{name:`rest`},h:{name:`harmonic`},m:{name:`muted`},s:{name:`slash`},g:{name:`ghost`},d:{name:`diamond`},x:{name:`x`},ci:{name:`circled`},cx:{name:`circle x`},sf:{name:`slashed`},sb:{name:`slashed backward`},sq:{name:`square`},tu:{name:`triangle up`},td:{name:`triangle down`}},ue={"#":P.accidentalSharp,"##":P.accidentalDoubleSharp,b:P.accidentalFlat,bb:P.accidentalDoubleFlat,n:P.accidentalNatural,"{":P.accidentalParensLeft,"}":P.accidentalParensRight,db:P.accidentalThreeQuarterTonesFlatZimmermann,d:P.accidentalQuarterToneFlatStein,"++":P.accidentalThreeQuarterTonesSharpStein,"+":P.accidentalQuarterToneSharpStein,"+-":P.accidentalKucukMucennebSharp,bs:P.accidentalBakiyeFlat,bss:P.accidentalBuyukMucennebFlat,o:P.accidentalSori,k:P.accidentalKoron,bbs:P.accidentalBuyukMucennebSharp,"++-":P.accidentalBuyukMucennebSharp,ashs:P.accidentalBuyukMucennebSharp,afhf:P.accidentalBuyukMucennebSharp},de={1:{a:[1],b:[1]},2:{a:[1,2]},3:{a:[1,3,2],b:[1,2,1],secondOnBottom:[1,2,3]},4:{a:[1,3,4,2],b:[1,2,3,1],spacedOutTetrachord:[1,2,1,2]},5:{a:[1,3,5,4,2],b:[1,2,4,3,1],spacedOutPentachord:[1,2,3,2,1],verySpacedOutPentachord:[1,2,1,2,1]},6:{a:[1,3,5,6,4,2],b:[1,2,4,5,3,1],spacedOutHexachord:[1,3,2,1,3,2],verySpacedOutHexachord:[1,2,1,2,1,2]}},fe={"a.":{code:P.augmentationDot,betweenLines:!0},av:{aboveCode:P.articStaccatissimoAbove,belowCode:P.articStaccatissimoBelow,betweenLines:!0},"a>":{aboveCode:P.articAccentAbove,belowCode:P.articAccentBelow,betweenLines:!0},"a-":{aboveCode:P.articTenutoAbove,belowCode:P.articTenutoBelow,betweenLines:!0},"a^":{aboveCode:P.articMarcatoAbove,belowCode:P.articMarcatoBelow,betweenLines:!1},"a+":{code:P.pluckedLeftHandPizzicato,betweenLines:!1},ao:{aboveCode:P.pluckedSnapPizzicatoAbove,belowCode:P.pluckedSnapPizzicatoBelow,betweenLines:!1},ah:{code:P.stringsHarmonic,betweenLines:!1},"a@":{aboveCode:P.fermataAbove,belowCode:P.fermataBelow,betweenLines:!1},"a@a":{code:P.fermataAbove,betweenLines:!1},"a@u":{code:P.fermataBelow,betweenLines:!1},"a@s":{aboveCode:P.fermataShortAbove,belowCode:P.fermataShortBelow,betweenLines:!1},"a@as":{code:P.fermataShortAbove,betweenLines:!1},"a@us":{code:P.fermataShortBelow,betweenLines:!1},"a@l":{aboveCode:P.fermataLongAbove,belowCode:P.fermataLongBelow,betweenLines:!1},"a@al":{code:P.fermataLongAbove,betweenLines:!1},"a@ul":{code:P.fermataLongBelow,betweenLines:!1},"a@vl":{aboveCode:P.fermataVeryLongAbove,belowCode:P.fermataVeryLongBelow,betweenLines:!1},"a@avl":{code:P.fermataVeryLongAbove,betweenLines:!1},"a@uvl":{code:P.fermataVeryLongBelow,betweenLines:!1},"a|":{code:P.stringsUpBow,betweenLines:!1},am:{code:P.stringsDownBow,betweenLines:!1},"a,":{code:P.pictChokeCymbal,betweenLines:!1}},pe={mordent:P.ornamentShortTrill,mordentInverted:P.ornamentMordent,turn:P.ornamentTurn,turnInverted:P.ornamentTurnSlash,tr:P.ornamentTrill,upprall:P.ornamentPrecompSlideTrillDAnglebert,downprall:P.ornamentPrecompDoubleCadenceUpperPrefix,prallup:P.ornamentPrecompTrillSuffixDandrieu,pralldown:P.ornamentPrecompTrillLowerSuffix,upmordent:P.ornamentPrecompSlideTrillBach,downmordent:P.ornamentPrecompDoubleCadenceUpperPrefixTurn,lineprall:P.ornamentPrecompAppoggTrill,prallprall:P.ornamentTremblement,scoop:P.brassScoop,doit:P.brassDoitMedium,fall:P.brassFallLipShort,doitLong:P.brassLiftMedium,fallLong:P.brassFallRoughMedium,bend:P.brassBend,plungerClosed:P.brassMuteClosed,plungerOpen:P.brassMuteOpen,flip:P.brassFlip,jazzTurn:P.brassJazzTurn,smear:P.brassSmear},I=class e{static{this.UNISON=!0}static{this.SOFTMAX_FACTOR=10}static{this.STEM_WIDTH=1.5}static{this.STEM_HEIGHT=35}static{this.STAVE_LINE_THICKNESS=1}static{this.RENDER_PRECISION_PLACES=3}static{this.RESOLUTION=F}static{this.durationCodes={"1/8":{stem:!0},"1/4":{stem:!1},"1/2":{stem:!1},1:{stem:!1},2:{stem:!0},4:{stem:!0},8:{stem:!0,beamCount:1,stemBeamExtension:0,codeFlagUp:P.flag8thUp},16:{beamCount:2,stemBeamExtension:0,stem:!0,codeFlagUp:P.flag16thUp},32:{beamCount:3,stemBeamExtension:7.5,stem:!0,codeFlagUp:P.flag32ndUp},64:{beamCount:4,stemBeamExtension:15,stem:!0,codeFlagUp:P.flag64thUp},128:{beamCount:5,stemBeamExtension:22.5,stem:!0,codeFlagUp:P.flag128thUp},256:{beamCount:6,stemBeamExtension:25,stem:!0,codeFlagUp:P.flag256thUp},512:{beamCount:7,stemBeamExtension:27.5,stem:!0,codeFlagUp:P.flag512thUp},1024:{beamCount:8,stemBeamExtension:30,stem:!0,codeFlagUp:P.flag1024thUp}}}static{this.NOTATION_FONT_SCALE=39}static{this.TABLATURE_FONT_SCALE=39}static{this.SLASH_NOTEHEAD_WIDTH=15}static{this.STAVE_LINE_DISTANCE=10}static{this.noteHeadStemYOffsets={[P.noteheadXBlack]:{up:.444,down:-.44},[P.noteheadXHalf]:{up:.412,down:-.412}}}static{this.TEXT_HEIGHT_OFFSET_HACK=1}static clefProperties(e){if(!e||!(e in se))throw new p(`BadArgument`,`Invalid clef: `+e);return se[e]}static keyProperties(t,n=`treble`,r=`N`,i){let a={octaveShift:0,duration:`4`};typeof i==`object`&&(a={...a,...i});let o=e.sanitizeDuration(a.duration),s=t.split(`/`);if(s.length<2)throw new p(`BadArguments`,`First argument must be note/octave or note/octave/glyph-code: ${t}`);let c=s[0].toUpperCase();r=r.toUpperCase();let l=ce[c];if(!l)throw new p(`BadArguments`,`Invalid key name: `+c);let u=parseInt(s[1],10);u-=a.octaveShift;let d=(u*7-28+l.index)/2;d+=e.clefProperties(n).lineShift;let f=l.intVal===void 0?void 0:u*12+l.intVal,m=``,h=`N`;return h=s.length>2&&s[2]?s[2].toUpperCase():r===`N`?c:r,m=this.codeNoteHead(h,o),{key:c,octave:u,line:d,intValue:f,code:m,displaced:!1}}static integerToNote(e){if(e===void 0||e<0||e>11)throw new p(`BadArguments`,`integerToNote() requires an integer in the range [0, 11]: ${e}`);let t={0:`C`,1:`C#`,2:`D`,3:`D#`,4:`E`,5:`F`,6:`F#`,7:`G`,8:`G#`,9:`A`,10:`A#`,11:`B`}[e];if(!t)throw new p(`BadArguments`,`Unknown note value for integer: ${e}`);return t}static textWidth(e){return 7*e.toString().length}static articulationCodes(e){return fe[e]}static accidentalCodes(e){return ue[e]??e}static{this.accidentalColumnsTable=de}static ornamentCodes(e){return pe[e]??e}static keySignature(e){let t=oe[e];if(!t)throw new p(`BadKeySignature`,`Bad key signature spec: '${e}'`);if(!t.accidental)return[];let n={b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]}[t.accidental],r=Math.min(t.num,7),i=Math.max(t.num-7,0),a=n.slice(i,r).map(e=>({type:`${t.accidental}`,line:e})),o=n.slice(0,i).map(e=>({type:`${t.accidental}${t.accidental}`,line:e}));return[...a,...o]}static getKeySignatures(){return oe}static hasKeySignature(e){return e in oe}static{this.unicode={sharp:`♯`,flat:`♭`,natural:`♮`,triangle:`△`,"o-with-slash":`ø`,degrees:`°`,circle:`○`}}static sanitizeDuration(e){let t=ae[e];if(t!==void 0&&(e=t),ie[e]===void 0)throw new p(`BadArguments`,`The provided duration is not valid: ${e}`);return e}static durationToFraction(t){return new C().parse(e.sanitizeDuration(t))}static durationToNumber(t){return e.durationToFraction(t).value()}static durationToTicks(t){t=e.sanitizeDuration(t);let n=ie[t];if(n===void 0)throw new p(`InvalidDuration`);return n}static codeNoteHead(e,t){switch(e){case`D0`:return P.noteheadDiamondWhole;case`D1`:return P.noteheadDiamondHalf;case`D2`:return P.noteheadDiamondBlack;case`D3`:return P.noteheadDiamondBlack;case`T0`:return P.noteheadTriangleUpWhole;case`T1`:return P.noteheadTriangleUpHalf;case`T2`:return P.noteheadTriangleUpBlack;case`T3`:return P.noteheadTriangleUpBlack;case`X0`:return P.noteheadXWhole;case`X1`:return P.noteheadXHalf;case`X2`:return P.noteheadXBlack;case`X3`:return P.noteheadCircleX;case`S1`:return P.noteheadSquareWhite;case`S2`:return P.noteheadSquareBlack;case`R1`:return P.noteheadSquareWhite;case`R2`:return P.noteheadSquareWhite;case`DO`:return P.noteheadTriangleUpBlack;case`RE`:return P.noteheadMoonBlack;case`MI`:return P.noteheadDiamondBlack;case`FA`:return P.noteheadTriangleLeftBlack;case`FAUP`:return P.noteheadTriangleRightBlack;case`SO`:return P.noteheadBlack;case`LA`:return P.noteheadSquareBlack;case`TI`:return P.noteheadTriangleRoundDownBlack;case`DI`:case`H`:switch(t){case`1/2`:return P.noteheadDiamondDoubleWhole;case`1`:return P.noteheadDiamondWhole;case`2`:return P.noteheadDiamondHalf;default:return P.noteheadDiamondBlack}case`X`:case`M`:switch(t){case`1/2`:return P.noteheadXDoubleWhole;case`1`:return P.noteheadXWhole;case`2`:return P.noteheadXHalf;default:return P.noteheadXBlack}case`CX`:switch(t){case`1/2`:return P.noteheadCircleXDoubleWhole;case`1`:return P.noteheadCircleXWhole;case`2`:return P.noteheadCircleXHalf;default:return P.noteheadCircleX}case`CI`:switch(t){case`1/2`:return P.noteheadCircledDoubleWhole;case`1`:return P.noteheadCircledWhole;case`2`:return P.noteheadCircledHalf;default:return P.noteheadCircledBlack}case`SQ`:switch(t){case`1/2`:return P.noteheadDoubleWholeSquare;case`1`:return P.noteheadSquareWhite;case`2`:return P.noteheadSquareWhite;default:return P.noteheadSquareBlack}case`TU`:switch(t){case`1/2`:return P.noteheadTriangleUpDoubleWhole;case`1`:return P.noteheadTriangleUpWhole;case`2`:return P.noteheadTriangleUpHalf;default:return P.noteheadTriangleUpBlack}case`TD`:switch(t){case`1/2`:return P.noteheadTriangleDownDoubleWhole;case`1`:return P.noteheadTriangleDownWhole;case`2`:return P.noteheadTriangleDownHalf;default:return P.noteheadTriangleDownBlack}case`SF`:switch(t){case`1/2`:return P.noteheadSlashedDoubleWhole1;case`1`:return P.noteheadSlashedWhole1;case`2`:return P.noteheadSlashedHalf1;default:return P.noteheadSlashedBlack1}case`SB`:switch(t){case`1/2`:return P.noteheadSlashedDoubleWhole2;case`1`:return P.noteheadSlashedWhole2;case`2`:return P.noteheadSlashedHalf2;default:return P.noteheadSlashedBlack2}case`R`:switch(t){case`1/8`:return P.restMaxima;case`1/4`:return P.restLonga;case`1/2`:return P.restDoubleWhole;case`1`:return P.restWhole;case`2`:return P.restHalf;case`4`:return P.restQuarter;case`8`:return P.rest8th;case`16`:return P.rest16th;case`32`:return P.rest32nd;case`64`:return P.rest64th;case`128`:return P.rest128th;case`256`:return P.rest256th;case`512`:return P.rest512th;case`1024`:return P.rest1024th}break;case`S`:switch(t){case`1/2`:return P.noteheadSlashWhiteDoubleWhole;case`1`:return P.noteheadSlashWhiteWhole;case`2`:return P.noteheadSlashWhiteHalf;default:return P.noteheadSlashVerticalEnds}default:switch(t){case`1/8`:return P.mensuralNoteheadMaximaBlack;case`1/4`:return P.mensuralNoteheadLongaBlack;case`1/2`:return P.noteheadDoubleWhole;case`1`:return P.noteheadWhole;case`2`:return P.noteheadHalf;default:return P.noteheadBlack}}return P.null}static{this.validTypes=le}static{this.TIME4_4={numBeats:4,beatValue:4,resolution:F}}};function me(...e){he.DEBUG&&g(`VexFlow.Accidental`,e)}var he=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Accidental}static format(e,t){if(!e||e.length===0)return;let n=T.get(`Accidental.noteheadAccidentalPadding`),r=t.leftShift+n,i=T.get(`Accidental.accidentalSpacing`),a=T.get(`Accidental.leftPadding`),o=[],s,c=0;for(let t=0;t<e.length;++t){let n=e[t],r=n.getNote(),i=r.getStave(),a=n.checkIndex(),l=r.getKeyProps()[a];if(r!==s){for(let e=0;e<r.keys.length;++e)c=Math.max(r.getLeftDisplacedHeadPx()-r.getXShift(),c);s=r}if(i){let e=i.getSpacingBetweenLines(),t=i.getYForLine(l.line),r=Math.round(t/e*2)/2;o.push({y:t,line:r,extraXSpaceNeeded:c,accidental:n,spacingBetweenStaveLines:e})}else o.push({line:l.line,extraXSpaceNeeded:c,accidental:n})}o.sort((e,t)=>t.line-e.line);let l=[],u=0;for(let e=0;e<o.length;e++){let t=o[e],n=t.accidental.type,r=l[l.length-1],a;!r||r?.line!==t.line?(a={line:t.line,flatLine:!0,dblSharpLine:!0,numAcc:0,width:0,column:0},l.push(a)):a=r,n!==`b`&&n!==`bb`&&(a.flatLine=!1),n!==`##`&&(a.dblSharpLine=!1),a.numAcc++,a.width+=t.accidental.getWidth()+i,u=Math.max(t.extraXSpaceNeeded,u)}let d=0;for(let e=0;e<l.length;e++){let t=!1,n=e,r=e;for(;r+1<l.length&&!t;)this.checkCollision(l[r],l[r+1])?r++:t=!0;let i=e=>l[n+e],a=e=>e.map(i),o=(e,t)=>{let[n,r]=a([e,t]).map(e=>e.line);return n-r},s=(...e)=>e.map(a).every(([e,t])=>!this.checkCollision(e,t)),c=r-n+1,u=this.checkCollision(l[n],l[r])?`a`:`b`;switch(c){case 3:u===`a`&&o(1,2)===.5&&o(0,1)!==.5&&(u=`secondOnBottom`);break;case 4:s([0,2],[1,3])&&(u=`spacedOutTetrachord`);break;case 5:u===`b`&&s([1,3])&&(u=`spacedOutPentachord`,s([0,2],[2,4])&&(u=`verySpacedOutPentachord`));break;case 6:s([0,3],[1,4],[2,5])&&(u=`spacedOutHexachord`),s([0,2],[2,4],[1,3],[3,5])&&(u=`verySpacedOutHexachord`)}let f,p;if(c>=7){let t=2,n=!0;for(;n===!0;){n=!1;for(let e=0;e+t<l.length;e++)if(this.checkCollision(l[e],l[e+t])){n=!0,t++;break}}for(f=e;f<=r;f++)p=(f-e)%t+1,l[f].column=p,d=d>p?d:p}else for(f=e;f<=r;f++)p=I.accidentalColumnsTable[c][u][f-e],l[f].column=p,d=d>p?d:p;e=r}let f=[],p=[];for(let e=0;e<=d;e++)f[e]=0,p[e]=0;f[0]=r+u,p[0]=r,l.forEach(e=>{e.width>f[e.column]&&(f[e.column]=e.width)});for(let e=1;e<f.length;e++)p[e]=f[e]+p[e-1];let m=p[p.length-1],h=0;l.forEach(e=>{let t=0,n=h+e.numAcc;for(;h<n;h++){let n=p[e.column-1]+t+u;o[h].accidental.setXShift(n),t+=o[h].accidental.getWidth()+i,me(`Line, accCount, shift: `,e.line,h,n)}}),t.leftShift=m+a}static checkCollision(e,t){let n=t.line-e.line,r=3;n>0?(r=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(n-=.5)):(r=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(n-=.5));let i=Math.abs(n)<r;return me(`Line1, Line2, Collision: `,e.line,t.line,i),i}static applyAccidentals(n,r){let i=[],a={};n.forEach(e=>{let t=new C(0,1);e.getTickables().forEach(e=>{if(e.shouldIgnoreTicks())return;let n=a[t.value()];n?n.push(e):(i.push(t.value()),a[t.value()]=[e]),t.add(e.getTicks())})});let s=new N;r||=`C`;let c=s.createScaleMap(r),u={};i.forEach(n=>{let r=a[n],i=[],d=n=>{if(!l(n)||n.isRest()||n.shouldIgnoreTicks())return;let r=n;r.keys.forEach((n,a)=>{let o=s.getNoteParts(n.split(`/`)[0]),l=n.split(`/`)[1],d=o.accidental||`n`,f=o.root+d;u[o.root+l]||(u[o.root+l]=c[o.root]);let p=u[o.root+l]===f,m=i.indexOf(n)>-1;if(r.getModifiers().forEach((e,n)=>{t(e)&&e.type==d&&e.getIndex()==a&&r.getModifiers().splice(n,1)}),!p||p&&m){u[o.root+l]=f;let t=new e(d);r.addModifier(t,a),i.push(n)}}),r.getModifiers().forEach(e=>{o(e)&&e.getGraceNotes().forEach(d)})};r.forEach(d)})}constructor(e){super(),me(`New accidental: `,e),this.type=e,this.position=M.Position.LEFT,this.cautionary=!1,this.reset()}reset(){this.text=``,this.cautionary?(this.text+=I.accidentalCodes(`{`),this.text+=I.accidentalCodes(this.type),this.text+=I.accidentalCodes(`}`),this.fontInfo.size=T.get(`Accidental.cautionary.fontSize`)):(this.text+=I.accidentalCodes(this.type),this.fontInfo.size=T.get(`Accidental.fontSize`)),a(this.note)&&(this.fontInfo.size=T.get(`Accidental.grace.fontSize`))}setNote(e){return h(e,`ArgumentError`,`Bad note value: ${e}`),this.note=e,this.reset(),this}setAsCautionary(){return this.cautionary=!0,this.reset(),this}draw(){let{type:e,position:t,index:n}=this,r=this.checkContext(),i=this.checkAttachedNote();this.setRendered();let a=i.getModifierStartXY(t,n);this.x=a.x-this.width,this.y=a.y,me(`Rendering: `,e,a.x,a.y),this.renderText(r,0,0)}};function ge(...e){L.DEBUG&&g(`VexFlow.Stem`,e)}var L=class e extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.Stem}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return I.STEM_WIDTH}static get HEIGHT(){return I.STEM_HEIGHT}constructor(e){super(),this.stemUpYOffset=0,this.stemDownYOffset=0,this.stemUpYBaseOffset=0,this.stemDownYBaseOffset=0,this.xBegin=e?.xBegin??0,this.xEnd=e?.xEnd??0,this.yTop=e?.yTop??0,this.yBottom=e?.yBottom??0,this.stemExtension=e?.stemExtension??0,this.stemDirection=e?.stemDirection??0,this.hide=e?.hide||!1,this.isStemlet=e?.isStemlet||!1,this.stemletHeight=e?.stemletHeight??0,this.renderHeightAdjustment=0,this.setOptions(e)}setOptions(e){this.stemUpYOffset=e?.stemUpYOffset??0,this.stemDownYOffset=e?.stemDownYOffset??0,this.stemUpYBaseOffset=e?.stemUpYBaseOffset??0,this.stemDownYBaseOffset=e?.stemDownYBaseOffset??0}setNoteHeadXBounds(e,t){return this.xBegin=e,this.xEnd=t,this}setDirection(e){this.stemDirection=e}setExtension(e){this.stemExtension=e}getExtension(){return this.stemExtension}setYBounds(e,t){this.yTop=e,this.yBottom=t}getHeight(){let t=this.stemDirection===e.UP?this.stemUpYOffset:this.stemDownYOffset;return(this.yBottom-this.yTop+(e.HEIGHT-t+this.stemExtension))*this.stemDirection}getBoundingBox(){throw new p(`NotImplemented`,`getBoundingBox() not implemented.`)}getExtents(){let t=this.stemDirection===e.UP,n=[this.yTop,this.yBottom],r=e.HEIGHT+this.stemExtension,i=(t?Math.min:Math.max)(...n),a=(t?Math.max:Math.min)(...n);return{topY:i+r*-this.stemDirection,baseY:a}}setVisibility(e){return this.hide=!e,this}setStemlet(e,t){return this.isStemlet=e,this.stemletHeight=t,this}adjustHeightForFlag(){this.renderHeightAdjustment=T.get(`Stem.heightAdjustmentForFlag`,-3)}adjustHeightForBeam(){this.renderHeightAdjustment=-e.WIDTH/2}draw(){if(this.setRendered(),this.hide)return;let t=this.checkContext(),n,r,i=this.stemDirection,a=0;i===e.DOWN?(n=this.xBegin,r=this.yTop+this.stemDownYOffset,a=this.stemDownYBaseOffset):(n=this.xEnd,r=this.yBottom-this.stemUpYOffset,a=this.stemUpYBaseOffset);let o=this.getHeight();ge(`Rendering stem - `,`Top Y: `,this.yTop,`Bottom Y: `,this.yBottom);let s=this.isStemlet?o-this.stemletHeight*this.stemDirection:0,c=this.getAttribute(`class`);t.openGroup(`stem`+(c?` `+c:``),this.getAttribute(`id`)),t.beginPath(),t.setLineWidth(e.WIDTH),t.moveTo(n,r-s+a),t.lineTo(n,r-o-this.renderHeightAdjustment*i),t.stroke(),t.closeGroup()}};function _e(...e){be.DEBUG&&g(`VexFlow.Annotation`,e)}var ve=function(e){return e[e.LEFT=1]=`LEFT`,e[e.CENTER=2]=`CENTER`,e[e.RIGHT=3]=`RIGHT`,e[e.CENTER_STEM=4]=`CENTER_STEM`,e}({}),ye=function(e){return e[e.TOP=1]=`TOP`,e[e.CENTER=2]=`CENTER`,e[e.BOTTOM=3]=`BOTTOM`,e[e.CENTER_STEM=4]=`CENTER_STEM`,e}({}),be=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Annotation}static{this.HorizontalJustify=ve}static{this.HorizontalJustifyString={left:1,right:3,center:2,centerStem:4}}static{this.VerticalJustify=ye}static{this.VerticalJustifyString={above:1,top:1,below:3,bottom:3,center:2,centerStem:4}}static get minAnnotationPadding(){return T.get(`NoteHead.minPadding`)}static format(t,n){if(!t||t.length===0)return!1;let r=0,i=0,a=0,o=0;for(let s=0;s<t.length;++s){let c=t[s],l=(2+k.convertSizeToPixelValue(c.fontInfo.size))/I.STAVE_LINE_DISTANCE,f=c.checkAttachedNote(),p=f.getGlyphWidth(),m=c.getWidth();c.horizontalJustification===3?(a=Math.max(p,a),r=Math.max(r,m)+e.minAnnotationPadding):c.horizontalJustification===1?(o=Math.max(p,o),i=Math.max(i,m)):(r=Math.max(r,m/2)+e.minAnnotationPadding,i=Math.max(i,m/2),a=Math.max(p/2,a),o=Math.max(p/2,o));let h=f.getStave(),g=f.hasStem()?f.getStemDirection():L.UP,_=0,v=5;if(d(f)){if(f.renderOptions.drawStem){let e=f.getStem();e&&(_=Math.abs(e.getHeight())/I.STAVE_LINE_DISTANCE)}else _=0}else if(u(f)){let e=f.getStem();e&&f.getNoteType()===`n`&&(_=Math.abs(e.getHeight())/I.STAVE_LINE_DISTANCE)}if(h&&(v=h.getNumLines()),c.verticalJustification===this.VerticalJustify.TOP){let e=f.getLineNumber(!0);d(f)&&(e=v-(f.leastString()-.5)),g===L.UP&&(e+=_),e+n.topTextLine+.5<v?(c.setTextLine(v-e),l+=v-e,n.topTextLine=l):(c.setTextLine(n.topTextLine),n.topTextLine+=l)}else if(c.verticalJustification===this.VerticalJustify.BOTTOM){let e=v-f.getLineNumber();d(f)&&(e=f.greatestString()-1),g===L.DOWN&&(e+=_);let t=e+n.textLine+1;t<v?(c.setTextLine(v-t),l+=v-t,n.textLine=l):(c.setTextLine(n.textLine),n.textLine+=l)}else c.setTextLine(n.textLine)}let s=Math.min(Math.max(i-o,0),Math.max(i-n.rightShift,0)),c=Math.min(Math.max(r-a,0),Math.max(r-n.leftShift,0));return n.leftShift+=c,n.rightShift+=s,!0}constructor(e){super(),this.text=e,this.horizontalJustification=2,this.verticalJustification=1}setVerticalJustification(t){return this.verticalJustification=typeof t==`string`?e.VerticalJustifyString[t]:t,this}getJustification(){return this.horizontalJustification}setJustification(t){return this.horizontalJustification=typeof t==`string`?e.HorizontalJustifyString[t]:t,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote(),n=t.hasStem()?t.getStemDirection():L.UP,r=t.getModifierStartXY(j.ABOVE,this.index);this.setRendered();let i=this.getAttribute(`class`);e.openGroup(`annotation`+(i?` `+i:``),this.getAttribute(`id`));let a=this.getWidth(),o=k.convertSizeToPixelValue(this.fontInfo.size),s,c;s=this.horizontalJustification===1?r.x:this.horizontalJustification===3?r.x-a:this.horizontalJustification===2?r.x-a/2:t.getStemX()-a/2;let l={},u=0,d=t.hasStem(),f=t.checkStave();if(d&&(l=t.checkStem().getExtents(),u=f.getSpacingBetweenLines()),this.verticalJustification===3)c=t.getYs().reduce((e,t)=>e>t?e:t),c+=(this.textLine+1)*I.STAVE_LINE_DISTANCE+o,d&&n===L.DOWN&&(c=Math.max(c,l.topY+o+u*this.textLine));else if(this.verticalJustification===2){let e=t.getYForTopText(this.textLine)-1;c=e+(f.getYForBottomText(this.textLine)-e)/2+o/2}else if(this.verticalJustification===1)c=Math.min(...t.getYs())-(this.textLine+1)*I.STAVE_LINE_DISTANCE,d&&n===L.UP&&(u=l.topY<f.getTopLineTopY()?I.STAVE_LINE_DISTANCE:u,c=Math.min(c,l.topY-u*(this.textLine+1)));else{let e=t.getStemExtents();c=e.topY+(e.baseY-e.topY)/2+o/2}_e(`Rendering annotation: `,this.text,s,c),this.x=s,this.y=c,this.renderText(e,0,0),this.drawPointerRect(),e.closeGroup()}};function xe(...e){je.DEBUG&&g(`VexFlow.Articulation`,e)}var{ABOVE:R,BELOW:Se}=M.Position;function Ce(e,t){return e(t/.5)*.5}function we(e,t){return t===R?e<=5:e>=1}function Te(e,t){return we(e,t)?t===R?Math.ceil:Math.floor:Math.round}function Ee(e,t,n,r){let i=Ce(Te(t,n),t),a=e&&we(i,n),o=i%1==0;return a&&o?i+.5*-r:i}var De=e=>l(e)||a(e);function Oe(e,t){let n=e.getStemDirection(),{topY:r,baseY:i}=e.getStemExtents();if(De(e))return e.hasStem()?n===L.UP?r:i:Math.min(...e.getYs());if(d(e))return e.hasStem()&&n===L.UP?r:e.checkStave().getYForTopText(t);throw new p(`UnknownCategory`,`Only can get the top and bottom ys of stavenotes and tabnotes`)}function ke(e,t){let n=e.getStemDirection(),{topY:r,baseY:i}=e.getStemExtents();if(De(e))return e.hasStem()?n===L.UP?i:r:Math.max(...e.getYs());if(d(e))return e.hasStem()?n===L.UP?e.checkStave().getYForBottomText(t):r:e.checkStave().getYForBottomText(t);throw new p(`UnknownCategory`,`Only can get the top and bottom ys of stavenotes and tabnotes`)}function Ae(e,t){let n=t===R&&e.getStemDirection()===L.UP||t===Se&&e.getStemDirection()===L.DOWN;return De(e)?e.hasStem()&&n?.5:1:e.hasStem()&&n?1:0}var je=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Articulation}static{this.INITIAL_OFFSET=-.5}static format(e,t){if(!e||e.length===0)return!1;let n=0,r=(e,t,n)=>Ce(Te(t,n),e.height/10+.5);e.forEach(e=>{let i=e.checkAttachedNote();n=Math.max(i.getGlyphWidth(),n);let a=5,o=i.hasStem()?i.getStemDirection():L.UP,s=0;if(u(i)){let e=i.getStem();e&&(s=Math.abs(e.getHeight())/I.STAVE_LINE_DISTANCE)}let c=i.getStave();if(c&&(a=c.getNumLines()),e.getPosition()===R){let n=i.getLineNumber(!0);o===L.UP&&(n+=s);let c=r(e,t.topTextLine,R),l=n+t.topTextLine+.5;!e.articulation.betweenLines&&l<a&&(c+=a-l),e.setTextLine(t.topTextLine),t.topTextLine+=c,e.setOrigin(.5,1)}else if(e.getPosition()===Se){let n=Math.max(a-i.getLineNumber(),0);o===L.DOWN&&(n+=s);let c=r(e,t.textLine,Se),l=n+t.textLine+.5;!e.articulation.betweenLines&&l<a&&(c+=a-l),e.setTextLine(t.textLine),t.textLine+=c,e.setOrigin(.5,0)}});let i=e.map(e=>e.getWidth()).reduce((e,t)=>Math.max(t,e)),a=Math.min(Math.max(i-n,0),Math.max(i-(t.leftShift+t.rightShift),0));return t.leftShift+=a/2,t.rightShift+=a/2,!0}static easyScoreHook({articulations:e},t,n){if(!e)return;let r={staccato:`a.`,tenuto:`a-`,accent:`a>`};e.split(`,`).map(e=>e.trim().split(`.`)).map(([e,t])=>{let i={type:r[e]};return t&&(i.position=M.PositionString[t]),n.getFactory().Articulation(i)}).map(e=>t.addModifier(e,0))}constructor(e){super(),this.heightShift=0,this.type=e,this.position=R,I.articulationCodes(this.type)||(this.position=(this.type.codePointAt(0)??0)%2==0?R:Se),this.articulation={betweenLines:!1},this.reset()}reset(){this.articulation=I.articulationCodes(this.type),this.articulation||={code:this.type,betweenLines:!1};let e=(this.position===R?this.articulation.aboveCode:this.articulation.belowCode)||this.articulation.code||P.null;this.text=e}setBetweenLines(e=!0){return this.articulation.betweenLines=e,this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=this.checkIndex(),{position:i,textLine:a}=this,o=this.articulation.betweenLines,s=n.checkStave(),c=s.getSpacingBetweenLines(),l=d(n),{x:u}=n.getModifierStartXY(i,r),f=!o||l,p=Ae(n,i),m={[R]:()=>{let t=Oe(n,a)-(a+p)*c;return f?Math.min(s.getYForTopText(e.INITIAL_OFFSET),t):t},[Se]:()=>{let t=ke(n,a)+(a+p)*c;return f?Math.max(s.getYForBottomText(e.INITIAL_OFFSET),t):t}}[i]();if(!l){let e=i===R?-1:1,t=n.getKeyProps()[r].line,a=(n.getYs()[r]-m)/c+Number(t),s=Ee(o,a,i,e);we(s,i)&&this.setOrigin(.5,.5),m+=Math.abs(s-a)*c*e}xe(`Rendering articulation at (x: ${u}, y: ${m})`),this.x=u,this.y=m,this.renderText(t,0,0)}},Me=class{static get CATEGORY(){return f.RenderContext}set font(e){this.setFont(e)}get font(){return this.getFont()}};function Ne(e,t,n,r=`#F55`){e.save(),e.setFillStyle(r),e.beginPath(),e.arc(t,n,3,0,Math.PI*2,!1),e.closePath(),e.fill(),e.restore()}var Pe=class extends A{static get CATEGORY(){return f.Tickable}constructor(){super(),this._preFormatted=!1,this._postFormatted=!1,this.ticks=new C(0,1),this.intrinsicTicks=0,this.tickMultiplier=new C(1,1),this.modifiers=[],this.tupletStack=[],this.alignCenter=!1,this.centerXShift=0,this.ignoreTicks=!1,this.formatterMetrics={freedom:{left:0,right:0},duration:``,iterations:0,space:{used:0,mean:0,deviation:0}}}reset(){return this}getTicks(){return this.ticks}shouldIgnoreTicks(){return this.ignoreTicks}setIgnoreTicks(e){return this.ignoreTicks=e,this}getWidth(){if(!this._preFormatted)throw new p(`UnformattedNote`,`Can't call GetWidth on an unformatted note.`);return this.width+(this.modifierContext?this.modifierContext.getWidth():0)}getX(){return this.checkTickContext(`Can't getX() without a TickContext.`).getX()+this.xShift}getFormatterMetrics(){return this.formatterMetrics}getCenterXShift(){return this.isCenterAligned()?this.centerXShift:0}setCenterXShift(e){return this.centerXShift=e,this}isCenterAligned(){return this.alignCenter}setCenterAlignment(e){return this.alignCenter=e,this}getVoice(){return h(this.voice,`NoVoice`,`Tickable has no voice.`)}setVoice(e){this.voice=e}getTuplet(){return this.tupletStack.at(-1)}getTupletStack(){return this.tupletStack}removeTuplet(e){let t=this.tupletStack.indexOf(e);if(t===-1)throw new p(`BadArguments`,`Tuplet is not found in this tickable`);this.tupletStack.splice(t,1);let n=e.getNoteCount(),r=e.getNotesOccupied();return this.applyTickMultiplier(n,r),this}clearTuplets(){return this.tupletStack.length?(this.tupletStack=[],this.tickMultiplier=new C(1,1),this.ticks=new C(this.intrinsicTicks,1),this):this}resetTuplet(e){if(e)try{this.removeTuplet(e)}catch{}else this.clearTuplets();return this}setTuplet(e){return this.tupletStack.length&&this.clearTuplets(),this.addTuplet(e)}addTuplet(e){this.tupletStack.push(e);let t=e.getNoteCount(),n=e.getNotesOccupied();return this.applyTickMultiplier(n,t),this}setTupletStack(e){this.clearTuplets();for(let t of e)this.addTuplet(t);return this}addToModifierContext(e){this.modifierContext=e;for(let e=0;e<this.modifiers.length;++e)this.modifierContext.addMember(this.modifiers[e]);return this.modifierContext.addMember(this),this._preFormatted=!1,this}addModifier(e,t=0){return this.modifiers.push(e),this._preFormatted=!1,this}getModifiers(){return this.modifiers}setTickContext(e){this.tickContext=e,this._preFormatted=!1}checkTickContext(e=`Tickable has no tick context.`){return h(this.tickContext,`NoTickContext`,e)}preFormat(){this._preFormatted||(this.width=0,this.modifierContext&&(this.modifierContext.preFormat(),this.width+=this.modifierContext.getWidth()))}set preFormatted(e){this._preFormatted=e}get preFormatted(){return this._preFormatted}postFormat(){return this._postFormatted||=!0,this}set postFormatted(e){this._postFormatted=e}get postFormatted(){return this._postFormatted}getIntrinsicTicks(){return this.intrinsicTicks}setIntrinsicTicks(e){this.intrinsicTicks=e,this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}getTickMultiplier(){return this.tickMultiplier}applyTickMultiplier(e,t){this.tickMultiplier.multiply(e,t),this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}setDuration(e){let t=e.numerator*(I.RESOLUTION/e.denominator);this.ticks=this.tickMultiplier.clone().multiply(t),this.intrinsicTicks=this.ticks.value()}getAbsoluteX(){return this.checkTickContext(`Can't getAbsoluteX() without a TickContext.`).getX()}setModifierContext(e){return this.modifierContext=e,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return h(this.modifierContext,`NoModifierContext`,`No modifier context attached to this tickable.`)}},z=class e extends Pe{static get CATEGORY(){return f.Note}static getGlyphProps(e,t=`n`){e=I.sanitizeDuration(e);let n=I.durationCodes[e];n===void 0&&(n=I.durationCodes[4]);let r=I.codeNoteHead(t.toUpperCase(),e);return r!==P.null&&(n={...n,codeHead:r}),n}static plotMetrics(e,t,n){let r=t.getMetrics(),i=t.getAbsoluteX()-r.modLeftPx-r.leftDisplacedHeadPx,a=t.getAbsoluteX()-r.leftDisplacedHeadPx,o=t.getAbsoluteX(),s=t.getAbsoluteX()+r.notePx,c=t.getAbsoluteX()+r.notePx+r.rightDisplacedHeadPx,l=t.getAbsoluteX()+r.notePx+r.rightDisplacedHeadPx+r.modRightPx,u=l+(t.getFormatterMetrics().freedom.right??0),d=l-i;e.save(),e.setFont(T.get(`fontFamily`),8),e.fillText(Math.round(d)+`px`,i+t.getXShift(),n);let f=n+7;function p(n,r,i,a=f){e.beginPath(),e.setStrokeStyle(i),e.setFillStyle(i),e.setLineWidth(3),e.moveTo(n+t.getXShift(),a),e.lineTo(r+t.getXShift(),a),e.stroke()}p(i,a,`red`),p(a,o,`#999`),p(o,s,`green`),p(s,c,`#999`),p(c,l,`red`),p(l,u,`#DD0`),p(i-t.getXShift(),i,`#BBB`),Ne(e,o+t.getXShift(),f,`blue`);let m=t.getFormatterMetrics();if(m.iterations>0){let r=m.space.deviation,i=r>=0?`+`:``;e.setFillStyle(`red`),e.fillText(i+Math.round(r),o+t.getXShift(),n-10)}e.restore()}static parseDuration(e){if(!e)return;let t=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(e);if(t)return{duration:t[1],dots:t[2].length,type:t[3]||`n`}}static parseNoteStruct(t){let n=e.parseDuration(t.duration);if(!n)return;let r=t.type;if(r&&!I.validTypes[r])return;let i=[];r||(r=n.type||`n`,t.keys!==void 0&&t.keys.forEach((e,t)=>{let n=e.split(`/`);i[t]=n&&n.length===3?n[2]:r}));let a=I.durationToTicks(n.duration);if(!a)return;let o=t.dots?t.dots:n.dots;if(typeof o!=`number`)return;let s=a;for(let e=0;e<o;e++){if(s<=1)return;s/=2,a+=s}return{duration:n.duration,type:r,customTypes:i,dots:o,ticks:a}}constructor(t){if(super(),!t)throw new p(`BadArguments`,`Note must have valid initialization data to identify duration and type.`);let n=e.parseNoteStruct(t);if(!n)throw new p(`BadArguments`,`Invalid note initialization object: ${JSON.stringify(t)}`);this.keys=t.keys||[],this.keyProps=[],this.duration=n.duration,this.noteType=n.type,this.customTypes=n.customTypes,t.durationOverride?this.setDuration(t.durationOverride):this.setIntrinsicTicks(n.ticks),this.modifiers=[],this.glyphProps=e.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map(t=>e.getGlyphProps(this.duration,t)),this.playNote=void 0,this.ignoreTicks=!1,this.width=0,this.leftDisplacedHeadPx=0,this.rightDisplacedHeadPx=0,this.xShift=0,this.ys=[],t.alignCenter&&this.setCenterAlignment(t.alignCenter),this.renderOptions={annotationSpacing:5,strokePx:1,yShift:0}}getPlayNote(){return this.playNote}setPlayNote(e){return this.playNote=e,this}isRest(){return!1}addStroke(e,t){return t.setNote(this),t.setIndex(e),this.modifiers.push(t),this.preFormatted=!1,this}getStave(){return this.stave}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}setStave(e){return this.stave=e,this.setYs([e.getYForLine(0)]),this.setContext(this.stave.getContext()),this}getLeftDisplacedHeadPx(){return this.leftDisplacedHeadPx}getRightDisplacedHeadPx(){return this.rightDisplacedHeadPx}setLeftDisplacedHeadPx(e){return this.leftDisplacedHeadPx=e,this}setRightDisplacedHeadPx(e){return this.rightDisplacedHeadPx=e,this}shouldIgnoreTicks(){return this.ignoreTicks}getLineNumber(e){return 0}getLineForRest(){return 0}getGlyphProps(){return this.glyphProps}getGlyphWidth(){return 0}setYs(e){return this.ys=e,this}getYs(){if(this.ys.length===0)throw new p(`NoYValues`,`No Y-values calculated for this note.`);return this.ys}getYForTopText(e){return this.checkStave().getYForTopText(e)}getVoice(){if(!this.voice)throw new p(`NoVoice`,`Note has no voice.`);return this.voice}setVoice(e){return this.voice=e,this.preFormatted=!1,this}getTickContext(){return this.checkTickContext()}setTickContext(e){return this.tickContext=e,this.preFormatted=!1,this}getDuration(){return this.duration}isDotted(){return this.getModifiersByType(f.Dot).length>0}hasStem(){return!1}getNoteType(){return this.noteType}getBeam(){return this.beam}checkBeam(){return h(this.beam,`NoBeam`,`No beam attached to instance`)}hasBeam(){return this.beam!==void 0}setBeam(e){return this.beam=e,this}addModifier(e,t=0){let n=`Note.addModifier(modifier: Modifier, index: number=0)`;if(typeof t==`string`&&(t=parseInt(t),console.warn(n+" expected a number for `index`, but received a string.")),typeof e!=`object`||typeof t!=`number`)throw new p(`WrongParams`,`Incorrect call signature. Use `+n+` instead.`);return e.setNote(this),e.setIndex(t),super.addModifier(e),this}getModifiersByType(e){return this.modifiers.filter(t=>t.getCategory()===e)}getModifierStartXY(e,t,n){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call GetModifierStartXY on an unformatted note`);return{x:this.getAbsoluteX(),y:this.ys[0]}}getRightParenthesisPx(e){return this.getKeyProps()[e].displaced?this.getRightDisplacedHeadPx():0}getLeftParenthesisPx(e){return this.getKeyProps()[e].displaced?this.getLeftDisplacedHeadPx()-this.xShift:-this.xShift}getFirstDotPx(){let e=this.getRightDisplacedHeadPx(),t=this.checkModifierContext().getMembers(`Parenthesis`);return t.length!==0&&(e+=t[0].getWidth()+1),e}getMetrics(){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call getMetrics on an unformatted note.`);let e=this.modifierContext?this.modifierContext.getState().leftShift:0,t=this.modifierContext?this.modifierContext.getState().rightShift:0,n=this.getWidth();return{width:n,glyphWidth:this.getGlyphWidth(),notePx:n-e-t-this.leftDisplacedHeadPx-this.rightDisplacedHeadPx,modLeftPx:e,modRightPx:t,leftDisplacedHeadPx:this.leftDisplacedHeadPx,rightDisplacedHeadPx:this.rightDisplacedHeadPx,glyphPx:0}}getAbsoluteX(){let e=this.checkTickContext(`Can't getAbsoluteX() without a TickContext.`).getX();return this.stave&&(e+=this.stave.getNoteStartX()+T.get(`Stave.padding`,0)),this.isCenterAligned()&&(e+=this.getCenterXShift()),e}getStemDirection(){throw new p(`NoStem`,`No stem attached to this note.`)}getStemExtents(){throw new p(`NoStem`,`No stem attached to this note.`)}getTieRightX(){let e=this.getAbsoluteX(),t=this.getGlyphWidth();return e+=t/2,e+=-this.width/2+this.width+2,e}getTieLeftX(){let e=this.getAbsoluteX(),t=this.getGlyphWidth();return e+=t/2,e-=this.width/2+2,e}getKeys(){return this.keys}getKeyProps(){return this.keyProps}getBoundingBox(){let e=super.getBoundingBox();for(let t=0;t<this.modifiers.length;t++)e.mergeWith(this.modifiers[t].getBoundingBox());return e}},B=function(e){return e[e.CENTER=0]=`CENTER`,e[e.LEFT=1]=`LEFT`,e[e.RIGHT=2]=`RIGHT`,e[e.ABOVE=3]=`ABOVE`,e[e.BELOW=4]=`BELOW`,e[e.BEGIN=5]=`BEGIN`,e[e.END=6]=`END`,e}({}),V=class extends A{static get CATEGORY(){return f.StaveModifier}static get Position(){return B}constructor(){super(),this.padding=10,this.position=3}getPosition(){return this.position}setPosition(e){return this.position=e,this}getStave(){return this.stave}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}setStave(e){return this.stave=e,this}getPadding(e){return e!==void 0&&e<2?0:this.padding}setPadding(e){return this.padding=e,this}setLayoutMetrics(e){return this.layoutMetrics=e,this}getLayoutMetrics(){return this.layoutMetrics}},H=function(e){return e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`,e[e.END=3]=`END`,e[e.REPEAT_BEGIN=4]=`REPEAT_BEGIN`,e[e.REPEAT_END=5]=`REPEAT_END`,e[e.REPEAT_BOTH=6]=`REPEAT_BOTH`,e[e.NONE=7]=`NONE`,e}({}),Fe=function(e){return e[e.NONE=0]=`NONE`,e[e.STRAIGHT=1]=`STRAIGHT`,e[e.CURVED=2]=`CURVED`,e}({}),U=class e extends V{static get CATEGORY(){return f.Barline}static get type(){return H}static get typeString(){return{single:1,double:2,end:3,repeatBegin:4,repeatEnd:5,repeatBoth:6,none:7}}constructor(e){super(),this.repeatBrackets=0,this.thickness=I.STAVE_LINE_THICKNESS;let t=H;this.widths={},this.widths[t.SINGLE]=5,this.widths[t.DOUBLE]=5,this.widths[t.END]=5,this.widths[t.REPEAT_BEGIN]=5,this.widths[t.REPEAT_END]=5,this.widths[t.REPEAT_BOTH]=5,this.widths[t.NONE]=5,this.paddings={},this.paddings[t.SINGLE]=0,this.paddings[t.DOUBLE]=0,this.paddings[t.END]=0,this.paddings[t.REPEAT_BEGIN]=15,this.paddings[t.REPEAT_END]=15,this.paddings[t.REPEAT_BOTH]=15,this.paddings[t.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[t.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(B.BEGIN),this.setType(e)}setRepeatBracket(e){this.repeatBrackets=e}getRepeatBrackets(){return this.repeatBrackets}getType(){return this.type}setType(t){return this.type=typeof t==`string`?e.typeString[t]:t,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);switch(t.openGroup(`stavebarline`+(n?` `+n:``),this.getAttribute(`id`)),this.type){case 1:this.drawVerticalBar(e,this.x,!1);break;case 2:this.drawVerticalBar(e,this.x,!0);break;case 3:this.drawVerticalEndBar(e,this.x);break;case 4:this.drawRepeatBar(e,this.x,!0),e.getX()!==this.x&&this.drawVerticalBar(e,e.getX());break;case 5:this.drawRepeatBar(e,this.x,!1);break;case 6:this.drawRepeatBar(e,this.x,!1),this.drawRepeatBar(e,this.x,!0)}this.drawPointerRect(),t.closeGroup()}drawVerticalBar(e,t,n){let r=e.checkContext(),i=e.getTopLineTopY(),a=e.getBottomLineBottomY();n&&r.fillRect(t-3,i,1,a-i),r.fillRect(t,i,1,a-i)}drawVerticalEndBar(e,t){let n=e.checkContext(),r=e.getTopLineTopY(),i=e.getBottomLineBottomY();n.fillRect(t-5,r,1,i-r),n.fillRect(t-2,r,3,i-r)}drawStraightBrackets(e,t,n,r,i){let a=e.checkContext(),o=Math.round(1.5*I.STAVE_LINE_DISTANCE)*i,s=Math.round(.6*I.STAVE_LINE_DISTANCE),c=Math.round(s/2),l=n+r,u=i>0?t-2:t;a.moveTo(u,l),a.lineTo(u,l+-1*r*s),a.lineTo(u+o,l+s*r),a.lineTo(u+o,l+r*(s+c)),a.lineTo(u,l),a.fill()}drawCurvedBrackets(e,t,n,r,i){let a=e.checkContext(),o=Math.round(1.5*I.STAVE_LINE_DISTANCE)*i,s=Math.round(.6*I.STAVE_LINE_DISTANCE),c=Math.round(s/2),l=n+r,u=i>0?t-2:t;a.moveTo(u,l),a.lineTo(u,l+-1*r*s),a.quadraticCurveTo(u+o/2,l+-1*r*s,u+o,l+s*r),a.lineTo(u+o,l+r*(s+c)),a.quadraticCurveTo(u+o/2,l,u,l),a.fill()}drawRepeatBar(e,t,n){let r=e.checkContext(),i=e.getTopLineTopY(),a=e.getBottomLineBottomY(),o=3;n||(o=-5);let s=n?1:-1;r.fillRect(t+o,i,1,a-i),r.fillRect(t-2,i,3,a-i),this.repeatBrackets===2?(this.drawCurvedBrackets(e,t,i,-1,s),this.drawCurvedBrackets(e,t,a,1,s)):this.repeatBrackets===1&&(this.drawStraightBrackets(e,t,i,-1,s),this.drawStraightBrackets(e,t,a,1,s)),n?o+=4:o-=4;let c=t+o+1,l=(e.getNumLines()-1)*e.getSpacingBetweenLines();l=l/2-e.getSpacingBetweenLines()/2;let u=i+l+1;r.beginPath(),r.arc(c,u,2,0,Math.PI*2,!1),r.fill(),u+=e.getSpacingBetweenLines(),r.beginPath(),r.arc(c,u,2,0,Math.PI*2,!1),r.fill()}};function Ie(...e){Le.DEBUG&&g(`VexFlow.BarNote`,e)}var Le=class extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.BarNote}constructor(e=H.SINGLE){super({duration:`b`}),this.metrics={widths:{}};let t=H;this.metrics.widths={[t.SINGLE]:8,[t.DOUBLE]:12,[t.END]:15,[t.REPEAT_BEGIN]:14,[t.REPEAT_END]:14,[t.REPEAT_BOTH]:18,[t.NONE]:0},this.ignoreTicks=!0,this.setType(e)}getType(){return this.type}setType(e){return this.type=typeof e==`string`?U.typeString[e]:e,this.setWidth(this.metrics.widths[this.type]),this}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkContext();Ie(`Rendering bar line at: `,this.getAbsoluteX());let t=new U(this.type);t.setX(this.getAbsoluteX()),t.setStave(this.checkStave()),t.setContext(e),t.drawWithStyle(),this.setRendered()}},Re=class e extends M{static get CATEGORY(){return f.Bend}static get UP(){return 0}static get DOWN(){return 1}static format(e,t){if(!e||e.length===0)return!1;let n=0;for(let r=0;r<e.length;++r){let i=e[r],a=i.checkAttachedNote();if(d(a)){let e=a.leastString()-1;t.topTextLine<e&&(t.topTextLine=e)}i.setXShift(n),n=i.getWidth(),i.setTextLine(t.topTextLine)}return t.rightShift+=n,t.topTextLine+=1,!0}setStyleLine(e){return this.styleLine=e,this}getStyleLine(){return this.styleLine}constructor(e){super(),this.styleLine=T.getStyle(`Bend.line`),this.xShift=0,this.tap=``,this.renderOptions={bendWidth:8,releaseWidth:8},this.phrase=e,this.updateWidth()}setXShift(e){return this.xShift=e,this.updateWidth(),this}setTap(e){return this.tap=e,this}getTextHeight(){let e=new A(f.Bend);return e.setText(this.phrase[0].text),e.getHeight()}updateWidth(){let t=e=>{let t=new A(f.Bend);return t.setText(e),t.getWidth()},n=0;for(let r=0;r<this.phrase.length;++r){let i=this.phrase[r];if(i.width!==void 0)n+=i.width;else{let r=i.type===e.UP?this.renderOptions.bendWidth:this.renderOptions.releaseWidth;i.width=Math.max(r,t(i.text))+3,i.drawWidth=i.width/2,n+=i.width}}return this.setWidth(n+this.xShift),this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=n.getModifierStartXY(M.Position.RIGHT,this.index);r.x+=3,r.y+=.5;let i=this.xShift,a=n.checkStave().getSpacingBetweenLines(),o=n.getYs().reduce((e,t)=>e<t?e:t),s=r.y-((this.textLine+1)*a+r.y-o)+3,c=r.y-((this.textLine+1)*a+r.y-o)-1,l=(e,n,r,i)=>{let a=e+r,o=n;this.applyStyle(t,this.styleLine),t.beginPath(),t.moveTo(e,n),t.quadraticCurveTo(a,o,e+r,i),t.stroke()},u=(e,n,r,i)=>{this.applyStyle(t,this.styleLine),t.beginPath(),t.moveTo(e,i),t.quadraticCurveTo(e+r,i,e+r,n),t.stroke()},d=(e,n,r)=>{let i=n+4*r;t.beginPath(),t.moveTo(e,n),t.lineTo(e-4,i),t.lineTo(e+4,i),t.closePath(),t.fill()},f=(e,n)=>{t.setFont(this.fontInfo);let r=e-t.measureText(n).width/2;t.fillText(n,r,c)},m,h=0,g=0;this.tap?.length&&f(n.getModifierStartXY(M.Position.CENTER,this.index).x,this.tap);for(let t=0;t<this.phrase.length;++t){let n=this.phrase[t];n.drawWidth||=0,t===0&&(n.drawWidth+=i),g=n.drawWidth+h-(t===1?i:0),n.type===e.UP&&(m&&m.type===e.UP&&d(r.x,s,1),l(r.x,r.y,g,s)),n.type===e.DOWN&&(m&&m.type===e.UP&&u(r.x,r.y,g,s),m&&m.type===e.DOWN&&(d(r.x,r.y,-1),u(r.x,r.y,g,s)),m||(g=n.drawWidth,u(r.x,r.y,g,s))),f(r.x+g,n.text),m=n,h=n.drawWidth,m.x=r.x,r.x+=g}if(!m||m.x===void 0)throw new p(`NoLastBendForBend`,`Internal error.`);m.type===e.UP?d(m.x+g,s,1):m.type===e.DOWN&&d(m.x+g,r.y,-1)}};function ze(...e){We.DEBUG&&g(`VexFlow.ChordSymbol`,e)}var Be=class extends A{constructor(e,t,n,r,i){super(),this.text=e,this.symbolModifier=t,this.xShift=n,this.yShift=r,this.vAlign=i}isSuperscript(){return this.symbolModifier===3}isSubscript(){return this.symbolModifier===2}},Ve=function(e){return e[e.LEFT=1]=`LEFT`,e[e.CENTER=2]=`CENTER`,e[e.RIGHT=3]=`RIGHT`,e[e.CENTER_STEM=4]=`CENTER_STEM`,e}({}),He=function(e){return e[e.TOP=1]=`TOP`,e[e.BOTTOM=2]=`BOTTOM`,e}({}),Ue=function(e){return e[e.NONE=1]=`NONE`,e[e.SUBSCRIPT=2]=`SUBSCRIPT`,e[e.SUPERSCRIPT=3]=`SUPERSCRIPT`,e}({}),We=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.ChordSymbol}static{this.HorizontalJustify=Ve}static{this.HorizontalJustifyString={left:1,right:3,center:2,centerStem:4}}static{this.VerticalJustify=He}static{this.VerticalJustifyString={top:1,above:1,below:2,bottom:2}}static get superSubRatio(){return T.get(`ChordSymbol.superSubRatio`)}static get spacingBetweenBlocks(){return T.get(`ChordSymbol.spacing`)}static get superscriptOffset(){return T.get(`ChordSymbol.superscriptOffset`)}static get subscriptOffset(){return T.get(`ChordSymbol.subscriptOffset`)}static{this.glyphs={diminished:P.csymDiminished,dim:P.csymDiminished,halfDiminished:P.csymHalfDiminished,"+":P.csymAugmented,augmented:P.csymAugmented,majorSeventh:P.csymMajorSeventh,minor:P.csymMinor,"-":P.csymMinor,"(":`(`,leftParen:`(`,")":`)`,rightParen:`)`,leftBracket:P.csymBracketLeftTall,rightBracket:P.csymBracketRightTall,leftParenTall:`(`,rightParenTall:`)`,"/":P.csymDiagonalArrangementSlash,over:P.csymDiagonalArrangementSlash,"#":P.csymAccidentalSharp,b:P.csymAccidentalFlat}}static{this.symbolModifiers=Ue}static get minPadding(){return T.get(`NoteHead.minPadding`)}static format(t,n){if(!t||t.length===0)return!1;let r=0,i=0,a=0,o=0,s=0;for(let c of t){let t=c.checkAttachedNote(),l=1;for(let t=0;t<c.symbolBlocks.length;++t){let n=c.symbolBlocks[t],i=n.isSuperscript(),a=n.isSubscript();if(n.setXShift(r),(i||a)&&(l=2),a&&t>0){let i=c.symbolBlocks[t-1];i.isSuperscript()&&(n.setXShift(r-i.getWidth()-e.minPadding),n.vAlign=!0,r+=-i.getWidth()-e.minPadding+(i.getWidth()>n.getWidth()?i.getWidth()-n.getWidth():0))}r+=n.getWidth()+e.minPadding}if(c.getVertical()===1?(c.setTextLine(n.topTextLine),n.topTextLine+=l):(c.setTextLine(n.textLine+1),n.textLine+=l+1),c.getReportWidth()){if(u(t)){let n=t.getGlyphWidth();c.getHorizontal()===3?(o=Math.max(n,o),i=Math.max(i,r)+e.minPadding):c.getHorizontal()===1?(s=Math.max(n,s),a=Math.max(a,r)):(i=Math.max(i,r/2)+e.minPadding,a=Math.max(a,r/2),o=Math.max(n/2,o),s=Math.max(n/2,s))}c.width=r}r=0}let c=Math.min(Math.max(a-s,0),Math.max(a-n.rightShift,0)),l=Math.min(Math.max(i-o,0),Math.max(i-n.leftShift,0));return n.leftShift+=l,n.rightShift+=c,!0}constructor(){super(),this.symbolBlocks=[],this.horizontal=1,this.vertical=1,this.reportWidth=!0}get superscriptOffset(){return e.superscriptOffset*k.convertSizeToPixelValue(this.fontInfo.size)}get subscriptOffset(){return e.subscriptOffset*k.convertSizeToPixelValue(this.fontInfo.size)}setReportWidth(e){return this.reportWidth=e,this}getReportWidth(){return this.reportWidth}getSymbolBlock(t={}){let n=new Be(t.text??``,t.symbolModifier??1,0,0,!1);if(n.isSubscript()&&n.setYShift(this.subscriptOffset),n.isSuperscript()&&n.setYShift(this.superscriptOffset),n.isSubscript()||n.isSuperscript()){let{family:t,size:r,weight:i,style:a}=this.fontInfo,o=k.scaleSize(r,e.superSubRatio);n.setFont(t,o,i,a)}else n.setFont(this.fontInfo);return n}addSymbolBlock(e){return this.symbolBlocks.push(this.getSymbolBlock(e)),this}addText(e,t={}){return this.addSymbolBlock({...t,text:e})}addTextSuperscript(e){return this.addSymbolBlock({text:e,symbolModifier:3})}addTextSubscript(e){return this.addSymbolBlock({text:e,symbolModifier:2})}addGlyphSuperscript(t){return this.addTextSuperscript(e.glyphs[t])}addGlyph(t,n={}){return this.addText(e.glyphs[t],n)}addGlyphOrText(t,n={}){let r=``;for(let n=0;n<t.length;++n){let i=t[n],a=e.glyphs[i];r+=a||i}return r.length>0&&this.addText(r,n),this}addLine(e={}){return this.addText(``,e)}setVertical(t){return this.vertical=typeof t==`string`?e.VerticalJustifyString[t]:t,this}getVertical(){return this.vertical}setHorizontal(t){return this.horizontal=typeof t==`string`?e.HorizontalJustifyString[t]:t,this}getHorizontal(){return this.horizontal}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=this.getAttribute(`class`);e.openGroup(`chordsymbol`+(n?` `+n:``),this.getAttribute(`id`));let r=t.getModifierStartXY(M.Position.ABOVE,this.index);e.setFont(this.fontInfo);let i,a=t.hasStem(),o=t.checkStave();if(this.vertical===2){if(i=o.getYForBottomText(this.textLine+I.TEXT_HEIGHT_OFFSET_HACK),a){let e=t.checkStem().getExtents(),n=o.getSpacingBetweenLines(),r=t.getStemDirection()===1?e.baseY:e.topY;i=Math.max(i,r+n*(this.textLine+2))}}else{let e=Math.min(...t.getYs());if(i=Math.min(o.getYForTopText(this.textLine),e-10),a){let e=t.checkStem().getExtents(),n=o.getSpacingBetweenLines();i=Math.min(i,e.topY-5-n*this.textLine)}}let s=r.x;s=this.horizontal===1?r.x:this.horizontal===3?r.x+this.getWidth():this.horizontal===2?r.x-this.getWidth()/2:t.getStemX()-this.getWidth()/2,ze(`Rendering ChordSymbol: `,s,i),this.symbolBlocks.forEach(t=>{ze(`Rendering Text: `,t.getText(),s+t.getXShift(),i+t.getYShift()),t.setX(s),t.setY(i),t.renderText(e,0,0)}),this.drawPointerRect(),e.closeGroup()}getBoundingBox(){let e=this.symbolBlocks[0].getBoundingBox();for(let t=1;t<this.symbolBlocks.length;t++)e.mergeWith(this.symbolBlocks[t].getBoundingBox());return e}},Ge=class e extends M{static get CATEGORY(){return f.Dot}static getDots(t){return t.getModifiersByType(e.CATEGORY)}static buildAndAttach(t,n){for(let r of t)if(n?.all)for(let t=0;t<r.keys.length;t++){let n=new e;r.addModifier(n,t)}else if(n?.index!==void 0){let t=new e;r.addModifier(t,n?.index)}else{let t=new e;r.addModifier(t,0)}}static format(e,t){let n=t.rightShift;if(!e||e.length===0)return!1;let r=[],i={};for(let t=0;t<e.length;++t){let a=e[t],o=a.getNote(),s,c;if(l(o)){let e=a.checkIndex();s=o.getKeyProps()[e],c=o.getFirstDotPx()}else if(d(o))s={line:.5},c=n;else throw new p(`Internal`,`Unexpected instance.`);let u=o.getAttribute(`id`);r.push({line:s.line,note:o,noteId:u,dot:a}),i[u]=Math.max(i[u]||c,c)}r.sort((e,t)=>t.line-e.line);let a=n,o=0,s=null,c=null,u=null,f=0;for(let e=0;e<r.length;++e){let{dot:t,note:n,noteId:l,line:d}=r[e];(d!==s||n!==c)&&(a=i[l]),!n.isRest()&&d!==s&&(Math.abs(d%1)===.5?f=0:(f=.5,(c!==null&&!c.isRest()&&s!==null&&s-d===.5||d+f===u)&&(f=-.5))),n.isRest()?t.dotShiftY+=-f:t.dotShiftY=-f,u=d+f,t.setXShift(a),a+=t.getWidth()+1,o=a>o?a:o,s=d,c=n}return t.rightShift+=o,!0}constructor(){super(),this.position=M.Position.RIGHT,this.setText(P.augmentationDot),this.dotShiftY=0}setNote(e){return this.note=e,this.font=e.font,this}setDotShiftY(e){return this.dotShiftY=e,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.checkStave().getSpacingBetweenLines(),r=t.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});d(t)&&(r.y=t.getStemExtents().baseY),this.x=r.x,this.y=r.y+this.dotShiftY*n,this.renderText(e,0,0)}},Ke=class extends M{static get CATEGORY(){return f.FretHandFinger}static format(e,t){let{leftShift:n,rightShift:r}=t;if(!e||e.length===0)return!1;let i=[],a=null,o=0,s=0;for(let c=0;c<e.length;++c){let l=e[c],u=l.getNote(),d=l.getPosition(),f=l.checkIndex(),p=u.getKeyProps()[f],m=T.get(`FretHandFinger.fontSize`);if(l.position===j.ABOVE&&(t.topTextLine+=m/I.STAVE_LINE_DISTANCE+.5),l.position===j.BELOW&&(t.textLine+=m/I.STAVE_LINE_DISTANCE+.5),u!==a){for(let e=0;e<u.keys.length;++e)n===0&&(o=Math.max(u.getLeftDisplacedHeadPx(),o)),r===0&&(s=Math.max(u.getRightDisplacedHeadPx(),s));a=u}i.push({note:u,num:l,pos:d,line:p.line,shiftL:o,shiftR:s})}i.sort((e,t)=>t.line-e.line);let c=0,l=0,u=0,d=0,f=null,p=null;for(let e=0;e<i.length;++e){let t=0,{note:a,pos:o,num:m,line:h,shiftL:g,shiftR:_}=i[e];(h!==f||a!==p)&&(c=n+g,l=r+_);let v=m.getWidth()+1;o===M.Position.LEFT?(m.setXShift(n+c),t=n+v,u=t>u?t:u):o===M.Position.RIGHT&&(m.setXShift(l),t=s+v,d=t>d?t:d),f=h,p=a}return t.leftShift+=u,t.rightShift+=d,!0}static easyScoreHook({fingerings:e}={},t,n){e?.split(`,`).map(e=>{let t=e.trim().split(`.`),r={number:t[0]};return t[1]&&(r.position=t[1]),n.getFactory().Fingering(r)}).map((e,n)=>t.addModifier(e,n))}constructor(e){super(),this.setFretHandFinger(e),this.position=M.Position.LEFT,this.xOffset=0,this.yOffset=0}setFretHandFinger(e){return this.text=e,this}getFretHandFinger(){return this.text}setOffsetX(e){return this.xOffset=e,this}setOffsetY(e){return this.yOffset=e,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(this.position,this.index),r=n.x+this.xOffset,i=n.y+this.yOffset+5;switch(this.position){case M.Position.ABOVE:r-=4,i-=12;break;case M.Position.BELOW:r-=2,i+=10;break;case M.Position.LEFT:r-=this.width;break;case M.Position.RIGHT:r+=1;break;default:throw new p(`InvalidPosition`,`The position ${this.position} does not exist`)}this.renderText(e,r,i)}};function qe(...e){Je.DEBUG&&g(`VexFlow.NoteHead`,e)}var Je=class extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.NoteHead}constructor(e){super(e),this.customGlyph=!1,this.ledger={"":``,"":``},this.index=e.index,this.x=e.x||0,this.y=e.y||0,e.noteType&&(this.noteType=e.noteType),this.displaced=e.displaced||!1,this.stemDirection=e.stemDirection||L.UP,this.line=e.line||0,this.glyphProps=z.getGlyphProps(this.duration,this.noteType),h(this.glyphProps,`BadArguments`,`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),(this.line>5||this.line<0)&&this.ledger[this.glyphProps.codeHead]&&(this.glyphProps.codeHead=this.ledger[this.glyphProps.codeHead]),this.text=this.glyphProps.codeHead,e.customGlyphCode&&(this.customGlyph=!0,this.text=e.customGlyphCode),this.setStyle(e.style??{}),this.slashed=e.slashed||!1,this.renderOptions={...this.renderOptions}}getWidth(){return this.width}isDisplaced(){return this.displaced===!0}getLine(){return this.line}setLine(e){return this.line=e,this}getAbsoluteX(){let e=this.preFormatted?super.getAbsoluteX():this.x,t=L.WIDTH/2;return e+(this.displaced?(this.width-t)*this.stemDirection:0)}setStave(e){let t=this.getLine();return this.stave=e,this.stave&&(this.setY(this.stave.getYForNote(t)),this.setContext(this.stave.getContext())),this}preFormat(){return this.preFormatted||=!0,this}draw(){let e=this.checkContext();this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`notehead`+(t?` `+t:``),this.getAttribute(`id`)),qe(`Drawing note head '`,this.noteType,this.duration,`' at`,this.x,this.y),this.x=this.getAbsoluteX(),this.renderText(e,0,0),this.parent?.drawModifiers(this),this.drawPointerRect(),e.closeGroup()}};function Ye(...e){Xe.DEBUG&&g(`VexFlow.Flag`,e)}var Xe=class extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.Flag}draw(){let e=this.checkContext();this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`flag`+(t?` `+t:``),this.getAttribute(`id`)),Ye(`Drawing flag '`,this.text,`' at`,this.x,this.y),this.renderText(e,0,0),this.drawPointerRect(),e.closeGroup()}},Ze=class extends z{static get CATEGORY(){return f.StemmableNote}constructor(e){super(e),this.flag=new Xe}getStem(){return this.stem}checkStem(){if(!this.stem)throw new p(`NoStem`,`No stem attached to instance`);return this.stem}setStem(e){return this.stem=e,this.addChild(e),this}buildStem(){let e=new L;return this.setStem(e),this}buildFlag(){let{glyphProps:e}=this;if(this.hasFlag()){let t=this.getStemDirection()===L.DOWN?String.fromCodePoint((e.codeFlagUp?.codePointAt(0)??-1)+1):e.codeFlagUp??P.null;this.flag.setText(t),this.flag.fontInfo=this.fontInfo}}getBaseCustomNoteHeadGlyphProps(){return this.getStemDirection()===L.DOWN?this.customGlyphs[this.customGlyphs.length-1]:this.customGlyphs[0]}getStemLength(){return L.HEIGHT+this.getStemExtension()}getBeamCount(){let e=this.getGlyphProps();return e?e.beamCount:0}getStemMinimumLength(){let e=I.durationToFraction(this.duration),t=this.beam===void 0,n=e.value()<=1?0:20;switch(this.duration){case`8`:case`16`:n=t?35:25;break;case`32`:n=t?45:35;break;case`64`:n=t?50:40;break;case`128`:n=t?55:45;break;case`256`:n=t?60:55;break;case`512`:n=t?65:60;break;case`1024`:n=t?70:65}return n}getStemDirection(){if(!this.stemDirection)throw new p(`NoStem`,`No stem attached to this note.`);return this.stemDirection}setStemDirection(e){if(e||=L.UP,e!==L.UP&&e!==L.DOWN)throw new p(`BadArgument`,`Invalid stem direction: ${e}`);return this.stemDirection=e,this.reset(),this.hasFlag()&&this.buildFlag(),this.beam=void 0,this.stem&&(this.stem.setDirection(e),this.stem.setExtension(this.getStemExtension())),this.preFormatted&&this.preFormat(),this}getStemX(){let e=this.getAbsoluteX()+this.xShift,t=this.getAbsoluteX()+this.xShift+this.getGlyphWidth();return this.stemDirection===L.DOWN?e:t}getCenterGlyphX(){return this.getAbsoluteX()+this.xShift+this.getGlyphWidth()/2}getStemExtension(){let e=this.getGlyphProps(),t=this.flag.getHeight(),n=this.getFontScale();return this.stemExtensionOverride===void 0?this.beam?e.stemBeamExtension*n:t>L.HEIGHT*n?t-L.HEIGHT*n:0:this.stemExtensionOverride}setStemLength(e){return this.stemExtensionOverride=e-L.HEIGHT,this}getStemExtents(){if(!this.stem)throw new p(`NoStem`,`No stem attached to this note.`);return this.stem.getExtents()}getYForTopText(e){let t=this.checkStave();if(this.hasStem()){let n=this.getStemExtents();if(!n)throw new p(`InvalidState`,`Stem does not have extents.`);return Math.min(t.getYForTopText(e),n.topY-this.renderOptions.annotationSpacing*(e+1))}return t.getYForTopText(e)}getYForBottomText(e){let t=this.checkStave();if(this.hasStem()){let n=this.getStemExtents();if(!n)throw new p(`InvalidState`,`Stem does not have extents.`);return Math.max(t.getYForTopText(e),n.baseY+this.renderOptions.annotationSpacing*e)}return t.getYForBottomText(e)}hasFlag(){return this.glyphProps.codeFlagUp!==void 0&&!this.beam&&!this.isRest()}postFormat(){return this.beam?.postFormat(),this.postFormatted=!0,this}drawStem(e){this.checkContext(),this.setRendered(),this.setStem(new L(e)),this.stem?.setContext(this.getContext()).drawWithStyle()}};function Qe(...e){W.DEBUG&&g(`VexFlow.StaveNote`,e)}var $e=(e,t)=>t===(e.getStemDirection()===L.UP?e.keyProps.length-1:0);function et(e,t,n){let r=n;e.line+=r,e.maxLine+=r,e.minLine+=r,e.note.setKeyLine(0,e.note.getKeyLine(0)+r)}function tt(e,t,n){let r=e.line-y(t.minLine,n.maxLine);e.note.setKeyLine(0,e.note.getKeyLine(0)-r),e.line-=r,e.maxLine-=r,e.minLine-=r}var W=class e extends Ze{static{this.DEBUG=!1}static get CATEGORY(){return f.StaveNote}static get LEDGER_LINE_OFFSET(){return 3}static get minNoteheadPadding(){return T.get(`NoteHead.minPadding`)}static format(e,t){if(!e||e.length<2)return!1;let n=[];for(let t=0;t<e.length;t++){let r=e[t].sortedKeyProps,i=r[0].keyProps.line,a=r[r.length-1].keyProps.line,o=e[t].getStemDirection(),s=e[t].getStemLength()/10,c=e[t].getStemMinimumLength()/10,l;e[t].isRest()?(l=i+Math.ceil(e[t]._noteHeads[0].getTextMetrics().actualBoundingBoxAscent/I.STAVE_LINE_DISTANCE),a=i-Math.ceil(e[t]._noteHeads[0].getTextMetrics().actualBoundingBoxDescent/I.STAVE_LINE_DISTANCE)):(l=o===1?r[r.length-1].keyProps.line+s:r[r.length-1].keyProps.line,a=o===1?r[0].keyProps.line:r[0].keyProps.line-s),n.push({line:r[0].keyProps.line,maxLine:l,minLine:a,isrest:e[t].isRest(),stemDirection:o,stemMax:s,stemMin:c,voiceShift:e[t].getVoiceShiftWidth(),isDisplaced:e[t].isDisplaced(),note:e[t]})}let r=0,i,a,o,s=[!1,!1,!1];for(let e=0;e<n.length;e++)s[e]=n[e].note.renderOptions.draw!==!1;if(s[0]&&s[1]&&s[2])r=3,i=n[0],a=n[1],o=n[2];else if(s[0]&&s[1])r=2,i=n[0],o=n[1];else if(s[0]&&s[2])r=2,i=n[0],o=n[2];else if(s[1]&&s[2])r=2,i=n[1],o=n[2];else return!0;r===2&&i.stemDirection===-1&&o.stemDirection===1&&(i=n[1],o=n[0]);let c=Math.max(i.voiceShift,o.voiceShift),l=0;if(r===2){let e=i.note.hasStem()&&o.note.hasStem()&&i.stemDirection===o.stemDirection?0:.5;if(o.isrest&&i.isrest&&i.note.duration===o.note.duration)o.note.renderOptions.draw=!1;else if(i.minLine<=o.maxLine+e){if(i.isrest)et(i,o,1);else if(o.isrest)et(o,i,-1);else{let e=Math.abs(i.line-o.line);if(i.note.hasStem()&&o.note.hasStem()){let t=i.note.sortedKeyProps[0].keyProps.code,n=o.note.sortedKeyProps[o.note.sortedKeyProps.length-1].keyProps.code;!I.UNISON||t!==n||i.note.getModifiers().filter(e=>e.getCategory()===f.Dot&&e.getIndex()===0).length!==o.note.getModifiers().filter(e=>e.getCategory()===f.Dot&&e.getIndex()===0).length||e<1&&e>0||JSON.stringify(i.note.getStyle())!==JSON.stringify(o.note.getStyle())?(l=c+2,i.stemDirection===o.stemDirection?i.note.setXShift(l):o.note.setXShift(l)):i.note.voice!==o.note.voice&&i.stemDirection===o.stemDirection&&(i.line===o.line?o.stemDirection===1&&(o.stemDirection=-1,o.note.setStemDirection(-1)):(l=c+2,i.note.setXShift(l)))}else e<1?(l=c+2,i.note.duration<o.note.duration?i.note.setXShift(l):o.note.setXShift(l)):i.note.hasStem()?(i.stemDirection=-i.note.getStemDirection(),i.note.setStemDirection(i.stemDirection)):o.note.hasStem()&&(o.stemDirection=-o.note.getStemDirection(),o.note.setStemDirection(o.stemDirection))}}return t.rightShift+=l,!0}if(!a)throw new p(`InvalidState`,`noteM not defined.`);return a.isrest&&!i.isrest&&!o.isrest&&(i.minLine<=a.maxLine||a.minLine<=o.maxLine)?(a.maxLine-a.minLine<i.minLine-o.maxLine?tt(a,i,o):(l=c+2,a.note.setXShift(l),o.note.hasBeam()===!1&&(o.stemDirection=-1,o.note.setStemDirection(-1)),i.minLine<=o.maxLine&&i.note.hasBeam()===!1&&(i.stemDirection=1,i.note.setStemDirection(1))),t.rightShift+=l,!0):i.isrest&&a.isrest&&o.isrest?(i.note.renderOptions.draw=!1,o.note.renderOptions.draw=!1,t.rightShift+=l,!0):(a.isrest&&i.isrest&&a.minLine<=o.maxLine&&(a.note.renderOptions.draw=!1),a.isrest&&o.isrest&&i.minLine<=a.maxLine&&(a.note.renderOptions.draw=!1),i.isrest&&i.minLine<=a.maxLine&&et(i,a,1),o.isrest&&a.minLine<=o.maxLine&&et(o,a,-1),(i.minLine<=a.maxLine+.5||a.minLine<=o.maxLine)&&(l=c+2,a.note.setXShift(l),o.note.hasBeam()===!1&&(o.stemDirection=-1,o.note.setStemDirection(-1)),i.minLine<=o.maxLine&&i.note.hasBeam()===!1&&(i.stemDirection=1,i.note.setStemDirection(1))),t.rightShift+=l,!0)}static postFormat(e){return e?(e.forEach(e=>e.postFormat()),!0):!1}constructor(t){super(t),this.minLine=0,this.maxLine=0,this.sortedKeyProps=[],this.ledgerLineStyle={},this.clef=t.clef??`treble`,this.octaveShift=t.octaveShift??0,this.glyphProps=z.getGlyphProps(this.duration,this.noteType),h(this.glyphProps,`BadArguments`,`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.displaced=!1,this.dotShiftY=0,this.useDefaultHeadX=!1,this._noteHeads=[],this.modifiers=[],this.renderOptions={...this.renderOptions,strokePx:t.strokePx||e.LEDGER_LINE_OFFSET},this.calculateKeyProps(),this.buildStem(),t.autoStem?this.autoStem():this.setStemDirection(t.stemDirection??L.UP),this.reset(),this.buildFlag()}reset(){super.reset();let e=this._noteHeads.map(e=>e.getStyle());this.buildNoteHeads(),this._noteHeads.forEach((t,n)=>{let r=e[n];r&&t.setStyle(r)});let t=this.stave;return t&&this.setStave(t),this.calcNoteDisplacements(),this}setBeam(e){return this.beam=e,this.calcNoteDisplacements(),this.stem&&this.stem.setExtension(this.getStemExtension()),this}buildStem(){return this.setStem(new L({hide:this.isRest()})),this}buildNoteHeads(){this._noteHeads=[];let e=this.getStemDirection(),t=this.getKeys(),n,r,i=!1,a,o,s;e===L.UP?(a=0,o=t.length,s=1):(a=t.length-1,o=-1,s=-1);for(let t=a;t!==o;t+=s){let a=this.sortedKeyProps[t].keyProps,o=a.line;n===void 0?n=o:(r=Math.abs(n-o),r===0||r===.5?i=!i:(i=!1,this.useDefaultHeadX=!0)),n=o;let s=new Je({duration:this.duration,noteType:this.noteType,displaced:i,stemDirection:e,customGlyphCode:a.code,line:a.line});s.fontInfo=this.fontInfo,this.addChild(s),this._noteHeads[this.sortedKeyProps[t].index]=s}return this._noteHeads}autoStem(){this.setStemDirection(this.calculateOptimalStemDirection())}calculateOptimalStemDirection(){return this.minLine=this.sortedKeyProps[0].keyProps.line,this.maxLine=this.sortedKeyProps[this.keyProps.length-1].keyProps.line,(this.minLine+this.maxLine)/2<3?L.UP:L.DOWN}calculateKeyProps(){let e;for(let t=0;t<this.keys.length;++t){let n=this.keys[t],r={octaveShift:this.octaveShift??0,duration:this.duration},i=I.keyProperties(n,this.clef,this.noteType,r);if(!i)throw new p(`BadArguments`,`Invalid key for note properties: ${n}`);i.key===`R`&&(i.line=this.duration===`1`||this.duration===`w`?4:3);let a=i.line;e===void 0?e=a:Math.abs(e-a)<1&&(this.displaced=!0,i.displaced=!0,this.keyProps.length>0&&(this.keyProps[t-1].displaced=!0)),e=a,this.keyProps.push(i)}this.keyProps.forEach((e,t)=>{this.sortedKeyProps.push({keyProps:e,index:t})}),this.sortedKeyProps.sort((e,t)=>e.keyProps.line-t.keyProps.line)}getBoundingBox(){let e=new D(this.getAbsoluteX(),this.ys[0],0,0);this._noteHeads.forEach(t=>{e.mergeWith(t.getBoundingBox())});let{yTop:t,yBottom:n}=this.getNoteHeadBounds();if(!this.isRest()&&this.hasStem()){let r=this.stem.getHeight(),i=this.getStemDirection()===L.DOWN?t-r-this.flag.getTextMetrics().actualBoundingBoxDescent:n-r+this.flag.getTextMetrics().actualBoundingBoxAscent;e.mergeWith(new D(this.getAbsoluteX(),i,0,0))}if(this.hasFlag()){let t=this.flag.getBoundingBox();e.mergeWith(t)}for(let t=0;t<this.modifiers.length;t++)e.mergeWith(this.modifiers[t].getBoundingBox());return e}getLineNumber(e){if(!this.keyProps.length)throw new p(`NoKeyProps`,`Can't get bottom note line, because note is not initialized properly.`);let t=this.keyProps[0].line;for(let n=0;n<this.keyProps.length;n++){let r=this.keyProps[n].line;e?r>t&&(t=r):r<t&&(t=r)}return t}isRest(){let e=this.glyphProps.codeHead;return e>=``&&e<=``}isChord(){return!this.isRest()&&this.keys.length>1}hasStem(){return this.glyphProps.stem}hasFlag(){return super.hasFlag()&&!this.isRest()}getStemX(){return this.noteType===`r`?this.getCenterGlyphX():super.getStemX()+(this.stemDirection?L.WIDTH/(2*-this.stemDirection):0)}getYForTopText(e){let t=this.getStemExtents();return Math.min(this.checkStave().getYForTopText(e),t.topY-this.renderOptions.annotationSpacing*(e+1))}getYForBottomText(e){let t=this.getStemExtents();return Math.max(this.checkStave().getYForTopText(e),t.baseY+this.renderOptions.annotationSpacing*e)}setStave(e){super.setStave(e);let t=this._noteHeads.map(t=>(t.setStave(e),t.getY()));if(this.setYs(t),this.stem){let{yTop:e,yBottom:t}=this.getStemYBounds();this.stem.setYBounds(e,t)}return this}isDisplaced(){return this.displaced}setNoteDisplaced(e){return this.displaced=e,this}getTieRightX(){let e=this.getAbsoluteX();return e+=this.getGlyphWidth()+this.xShift+this.rightDisplacedHeadPx,this.modifierContext&&(e+=this.modifierContext.getRightShift()),e}getTieLeftX(){let e=this.getAbsoluteX();return e+=this.xShift-this.leftDisplacedHeadPx,e}getLineForRest(){let e=this.keyProps[0].line;if(this.keyProps.length>1){let t=this.keyProps[this.keyProps.length-1].line;e=y(Math.max(e,t),Math.min(e,t))}return e}getModifierStartXY(e,t,n={}){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call GetModifierStartXY on an unformatted note`);if(this.ys.length===0)throw new p(`NoYValues`,`No Y-Values calculated for this note.`);let{ABOVE:r,BELOW:i,LEFT:a,RIGHT:o}=M.Position,s=0;e===a?s=-2:e===o?(s=this.getGlyphWidth()+this.xShift+2,this.stemDirection===L.UP&&this.hasFlag()&&(n.forceFlagRight||$e(this,t))&&(s+=this.flag.getWidth())):(e===i||e===r)&&(s=this.getGlyphWidth()/2);let c=0;switch(this._noteHeads[t].getText()){case P.restWhole:c+=.5;break;case P.restHalf:case P.restQuarter:case P.rest8th:case P.rest16th:c-=.5;break;case P.rest32nd:case P.rest64th:c-=1.5;break;case P.rest128th:case P.rest256th:c-=2.5;break;case P.rest512th:c-=3.5;break;case P.rest1024th:c-=4.5}return{x:this.getAbsoluteX()+s,y:this.ys[t]+c*this.checkStave().getSpacingBetweenLines()}}setStyle(e){return super.setGroupStyle(e)}setStemStyle(e){let t=this.getStem();return t&&t.setStyle(e),this}getStemStyle(){return this.stem?.getStyle()}setLedgerLineStyle(e){this.ledgerLineStyle=e}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(e){this.flag.setStyle(e)}getFlagStyle(){return this.flag.getStyle()}getGlyphWidth(){return this.noteHeads[0].getWidth()}setKeyStyle(e,t){return this._noteHeads[e].setStyle(t),this}setKeyLine(e,t){return this.keyProps[e].line=t,this.reset(),this}getKeyLine(e){return this.keyProps[e].line}getVoiceShiftWidth(){return this.getGlyphWidth()*(this.displaced?2:1)}calcNoteDisplacements(){this.setLeftDisplacedHeadPx(this.displaced&&this.stemDirection===L.DOWN?this.getGlyphWidth():0),this.setRightDisplacedHeadPx(!this.hasFlag()&&this.displaced&&this.stemDirection===L.UP?this.getGlyphWidth():0)}preFormat(){if(this.preFormatted)return;let t=0;this.modifierContext&&(this.modifierContext.preFormat(),this.modifierContext.getWidth()===0&&(t=e.minNoteheadPadding));let n=this.getGlyphWidth()+this.leftDisplacedHeadPx+this.rightDisplacedHeadPx+t;this.shouldDrawFlag()&&this.stemDirection===L.UP&&(n+=this.getGlyphWidth()),this.setWidth(n),this.preFormatted=!0}getStemYBounds(){let e=this.stemDirection===L.UP?`up`:`down`,t=1/0,n=-1/0;if(this._noteHeads.forEach(r=>{let i=I.noteHeadStemYOffsets[r.text],a=i?i[e]:0,o=r.getY()-a*I.STAVE_LINE_DISTANCE;t=Math.min(o,t),n=Math.max(o,n)}),!isFinite(t)||!isFinite(n)){let e=this.getNoteHeadBounds();return{yTop:e.yTop,yBottom:e.yBottom}}return{yTop:t,yBottom:n}}getNoteHeadBounds(){let e=1/0,t=-1/0,n,r,i=this.checkStave().getNumLines(),a=1,o,s,c=i,l=a;return this._noteHeads.forEach(u=>{let d=u.getLine(),f=u.getY();e=Math.min(f,e),t=Math.max(f,t),r===void 0&&u.isDisplaced()&&(r=u.getAbsoluteX()),n===void 0&&!u.isDisplaced()&&(n=u.getAbsoluteX()),i=Math.max(d,i),a=Math.min(d,a),u.isDisplaced()?(o=o===void 0?d:Math.max(d,o),s=s===void 0?d:Math.min(d,s)):(c=Math.max(d,c),l=Math.min(d,l))},this),{yTop:e,yBottom:t,displacedX:r,nonDisplacedX:n,highestLine:i,lowestLine:a,highestDisplacedLine:o,lowestDisplacedLine:s,highestNonDisplacedLine:c,lowestNonDisplacedLine:l}}getNoteHeadBeginX(){return this.getAbsoluteX()+this.xShift}getNoteHeadEndX(){return this.getNoteHeadBeginX()+this.getGlyphWidth()}get noteHeads(){return this._noteHeads.slice()}drawLedgerLines(){let e=this.checkStave(),{renderOptions:{strokePx:t}}=this,n=this.checkContext(),r=this.getGlyphWidth()+t*2,i=2*(this.getGlyphWidth()+t)-L.WIDTH/2;if(this.isRest())return;if(!n)throw new p(`NoCanvasContext`,`Can't draw without a canvas context.`);let{highestLine:a,lowestLine:o,highestDisplacedLine:s,highestNonDisplacedLine:c,lowestDisplacedLine:l,lowestNonDisplacedLine:u,displacedX:d,nonDisplacedX:f}=this.getNoteHeadBounds();if(a<6&&o>0)return;let m=Math.min(d??0,f??0),h=(e,a,o)=>{let s;s=o&&a?m-t:a?(f??0)-t:(d??0)-t;let c=a&&o?i:r;n.beginPath(),n.moveTo(s,e),n.lineTo(s+c,e),n.stroke()},g={...e.getDefaultLedgerLineStyle(),...this.getLedgerLineStyle()};n.save(),this.applyStyle(n,g);for(let t=6;t<=a;++t){let n=f!==void 0&&t<=c,r=s!==void 0&&t<=s;h(e.getYForNote(t),n,r)}for(let t=0;t>=o;--t){let n=f!==void 0&&t>=u,r=l!==void 0&&t>=l;h(e.getYForNote(t),n,r)}n.restore()}drawModifiers(e){let t=this.checkContext();for(let n=0;n<this.modifiers.length;n++){let r=this.modifiers[n],i=r.checkIndex();this._noteHeads[i]===e&&(r.setContext(t),r.drawWithStyle())}}shouldDrawFlag(){let e=this.stem!==void 0,t=this.glyphProps.codeFlagUp!==void 0,n=this.beam===void 0;return e&&t&&n&&!this.isRest()}drawFlag(){let e=this.checkContext();if(!e)throw new p(`NoCanvasContext`,`Can't draw without a canvas context.`);if(this.shouldDrawFlag()){let{yTop:t,yBottom:n}=this.getNoteHeadBounds(),r=this.stem.getHeight(),i=this.getStemX()-I.STEM_WIDTH/2,a=this.getStemDirection()===L.DOWN?t-r-this.flag.getTextMetrics().actualBoundingBoxDescent:n-r+this.flag.getTextMetrics().actualBoundingBoxAscent;this.flag.setContext(e).setX(i).setY(a).drawWithStyle()}}drawNoteHeads(){let e=this.checkContext();this._noteHeads.forEach(t=>{t.setContext(e).drawWithStyle()})}drawStem(e){let t=this.checkContext();e&&this.setStem(new L(e)),this.shouldDrawFlag()&&this.stem&&this.stem.adjustHeightForFlag(),this.stem&&this.stem.setContext(t).drawWithStyle()}getStemExtension(){let e=super.getStemExtension();if(!this.glyphProps.stem)return e;let t=this.getStemDirection();if(t!==this.calculateOptimalStemDirection())return e;let n;n=t===L.UP?3-this.maxLine:this.minLine-3;let r=n-3.5;if(r<=0)return e;let i=this.getStave(),a=10;return i!==void 0&&(a=i.getSpacingBetweenLines()),e+r*a}draw(){if(this.renderOptions.draw===!1)return;if(this.ys.length===0)throw new p(`NoYValues`,`Can't draw note without Y values.`);let e=this.checkContext(),t=this.getNoteHeadBeginX(),n=this.hasStem()&&!this.beam;if(this._noteHeads.forEach(e=>e.setX(t)),this.stem){let e=this.getStemX();this.stem.setNoteHeadXBounds(e,e)}Qe(`Rendering `,this.isChord()?`chord :`:`note :`,this.keys);let r=this.getAttribute(`class`);e.openGroup(`stavenote`+(r?` `+r:``),this.getAttribute(`id`)),this.drawLedgerLines(),n&&this.drawStem(),this.drawNoteHeads(),this.drawFlag(),this.drawPointerRect(),e.closeGroup(),this.setRendered()}},nt=class extends A{static get CATEGORY(){return f.StaveTie}constructor(e,t=``){super(),this.setNotes(e),this.text=t,this.renderOptions={cp1:8,cp2:12,shortTieCutoff:10,cp1Short:2,cp2Short:8,textShiftX:0,firstXShift:0,lastXShift:0,yShift:7,tieSpacing:0}}getDirection(){return this.direction!==void 0&&this.direction!==null?this.direction:this.notes.lastNote?this.notes.lastNote.getStemDirection():this.notes.firstNote?this.notes.firstNote.getStemDirection():0}setDirection(e){return this.direction=e,this}setNotes(e){if(!e.firstNote&&!e.lastNote)throw new p(`BadArguments`,`Tie needs to have either firstNote or lastNote set.`);if(e.firstIndexes||=[0],e.lastIndexes||=[0],e.firstIndexes.length!==e.lastIndexes.length)throw new p(`BadArguments`,`Tied notes must have same number of indexes.`);return this.notes=e,this}isPartial(){return!this.notes.firstNote||!this.notes.lastNote}renderTie(e){if(e.firstYs.length===0||e.lastYs.length===0)throw new p(`BadArguments`,`No Y-values to render`);let t=this.checkContext(),n=this.renderOptions.cp1,r=this.renderOptions.cp2;Math.abs(e.lastX-e.firstX)<this.renderOptions.shortTieCutoff&&(n=this.renderOptions.cp1Short,r=this.renderOptions.cp2Short);let i=this.renderOptions.firstXShift,a=this.renderOptions.lastXShift,o=this.renderOptions.yShift*e.direction,s=this.notes.firstIndexes,c=this.notes.lastIndexes,l=this.getAttribute(`class`);t.openGroup(`stavetie`+(l?` `+l:``),this.getAttribute(`id`));for(let l=0;l<s.length;++l){let u=(e.lastX+a+(e.firstX+i))/2,d=e.firstYs[s[l]]+o,f=e.lastYs[c[l]]+o;if(isNaN(d)||isNaN(f))throw new p(`BadArguments`,`Bad indexes for tie rendering.`);let m=(d+f)/2+n*e.direction,h=(d+f)/2+r*e.direction;t.beginPath(),t.moveTo(e.firstX+i,d),t.quadraticCurveTo(u,m,e.lastX+a,f),t.quadraticCurveTo(u,h,e.firstX+i,d),t.closePath(),t.fill()}this.drawPointerRect(),t.closeGroup()}renderTieText(e,t){let n=this.checkContext(),r=(e+t)/2;r-=n.measureText(this.text).width/2;let i=this.notes.firstNote?.checkStave()??this.notes.lastNote?.checkStave();i&&(n.setFont(this.fontInfo),n.fillText(this.text,r+this.renderOptions.textShiftX,i.getYForTopText()-1))}getNotes(){return this.notes}getFirstX(){return this.notes.firstNote?this.notes.firstNote.getTieRightX()+this.renderOptions.tieSpacing:this.notes.lastNote?this.notes.lastNote.checkStave().getTieStartX():0}getLastX(){return this.notes.lastNote?this.notes.lastNote.getTieLeftX()+this.renderOptions.tieSpacing:this.notes.firstNote?this.notes.firstNote.checkStave().getTieEndX():0}getFirstYs(){return this.notes.firstNote?this.notes.firstNote.getYs():this.notes.lastNote?this.notes.lastNote.getYs():[0]}getLastYs(){return this.notes.lastNote?this.notes.lastNote.getYs():this.notes.firstNote?this.notes.firstNote.getYs():[0]}synchronizeIndexes(){this.notes.firstNote&&this.notes.lastNote||(this.notes.firstNote||this.notes.lastNote)&&(this.notes.firstNote?this.notes.lastIndexes=this.notes.firstIndexes:this.notes.firstIndexes=this.notes.lastIndexes)}draw(){this.checkContext(),this.setRendered(),this.synchronizeIndexes();let e=this.getFirstX(),t=this.getLastX();return this.renderTie({firstX:e,lastX:t,firstYs:this.getFirstYs(),lastYs:this.getLastYs(),direction:this.getDirection()}),this.renderTieText(e,t),!0}},rt=class e extends nt{static get CATEGORY(){return f.TabTie}static createHammeron(t){return new e(t,`H`)}static createPulloff(t){return new e(t,`P`)}constructor(e,t){super(e,t),this.renderOptions.cp1=9,this.renderOptions.cp2=11,this.renderOptions.yShift=3,this.direction=-1}},it=function(e){return e[e.STRICT=1]=`STRICT`,e[e.SOFT=2]=`SOFT`,e[e.FULL=3]=`FULL`,e}({}),G=class extends A{static get CATEGORY(){return f.Voice}static get Mode(){return it}constructor(e){super(),this.resolutionMultiplier=1,this.mode=1,this.preFormatted=!1,this.ticksUsed=new C(0,1),this.largestTickWidth=0,this.tickables=[],this.options={softmaxFactor:I.SOFTMAX_FACTOR};let t;if(typeof e==`string`){let n=e.match(/(\d+)\/(\d+)/);n&&(t={numBeats:parseInt(n[1]),beatValue:parseInt(n[2])})}else t=e;this.time={numBeats:4,beatValue:4,resolution:I.RESOLUTION,...t},this.totalTicks=new C(this.time.numBeats*(this.time.resolution/this.time.beatValue),1),this.smallestTickCount=this.totalTicks.clone()}getTotalTicks(){return this.totalTicks}getTicksUsed(){return this.ticksUsed}getLargestTickWidth(){return this.largestTickWidth}getSmallestTickCount(){return this.smallestTickCount}getTickables(){return this.tickables}getMode(){return this.mode}setMode(e){return this.mode=e,this}getResolutionMultiplier(){return this.resolutionMultiplier}getActualResolution(){return this.resolutionMultiplier*this.time.resolution}setStave(e){return this.stave=e,this}getStave(){return this.stave}getBoundingBox(){let e=this.tickables[0].getBoundingBox();for(let t=1;t<this.tickables.length;++t){let n=this.tickables[t];!n.getStave()&&this.stave&&n.setStave(this.stave);let r=n.getBoundingBox();e.mergeWith(r)}return e}setStrict(e){return this.mode=e?1:2,this}isComplete(){return this.mode===1||this.mode===3?this.ticksUsed.equals(this.totalTicks):!0}setSoftmaxFactor(e){return this.options.softmaxFactor=e,this.expTicksUsed=0,this}reCalculateExpTicksUsed(){let e=this.ticksUsed.value(),t=t=>this.options.softmaxFactor**+(t.getTicks().value()/e);return this.expTicksUsed=S(this.tickables.map(t)),this.expTicksUsed}softmax(e){this.expTicksUsed||=this.reCalculateExpTicksUsed();let t=this.ticksUsed.value();return(e=>this.options.softmaxFactor**+(e/t))(e)/this.expTicksUsed}addTickable(e){if(!e.shouldIgnoreTicks()){let t=e.getTicks();if(this.ticksUsed.add(t),this.expTicksUsed=0,(this.mode===1||this.mode===3)&&this.ticksUsed.greaterThan(this.totalTicks))throw this.ticksUsed.subtract(t),new p(`BadArgument`,`Too many ticks.`);t.lessThan(this.smallestTickCount)&&(this.smallestTickCount=t.clone()),this.resolutionMultiplier=this.ticksUsed.denominator,this.totalTicks.add(0,this.ticksUsed.denominator)}return this.tickables.push(e),e.setVoice(this),this}addTickables(e){for(let t=0;t<e.length;++t)this.addTickable(e[t]);return this}preFormat(){if(this.preFormatted)return this;let e=this.checkStave();return this.tickables.forEach(t=>{t.getStave()||t.setStave(e)}),this.preFormatted=!0,this}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}draw(e=this.checkContext(),t){t??=this.stave,this.setRendered();for(let n=0;n<this.tickables.length;++n){let r=this.tickables[n];t&&r.setStave(t),h(r.getStave(),`MissingStave`,`The voice cannot draw tickables without staves.`),r.setContext(e),r.drawWithStyle()}}};function at(...e){ot.DEBUG&&g(`VexFlow.GraceNoteGroup`,e)}var ot=class extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.GraceNoteGroup}static format(e,t){if(!e||e.length===0)return!1;let n=[],r=null,i=0;for(let t=0;t<e.length;++t){let a=e[t],o=a.getNote(),s=l(o),c=s?4:0;if(s&&o!==r){for(let e=0;e<o.keys.length;++e)i=Math.max(o.getLeftDisplacedHeadPx(),i);r=o}n.push({shift:i,gracenoteGroup:a,spacing:c})}let a=n[0].shift,o,s=!1,c=!1;for(let e=0;e<n.length;++e){let t=n[e].gracenoteGroup;t.position===M.Position.RIGHT?s=!0:c=!0,t.preFormat(),o=t.getWidth()+n[e].spacing,a=Math.max(o,a)}for(let e=0;e<n.length;++e){let t=n[e].gracenoteGroup;o=t.getWidth()+n[e].spacing,t.setSpacingFromNextModifier(a-Math.min(o,a)+W.minNoteheadPadding)}return s&&(t.rightShift+=a),c&&(t.leftShift+=a),!0}constructor(e,t){return super(),this.preFormatted=!1,this.position=M.Position.LEFT,this.graceNotes=e,this.width=0,this.showSlur=t,this.slur=void 0,this.voice=new G({numBeats:4,beatValue:4,resolution:I.RESOLUTION}).setStrict(!1),this.renderOptions={slurYShift:0},this.beams=[],this.voice.addTickables(this.graceNotes),this}preFormat(){this.preFormatted||=(this.formatter||=new Q,this.formatter.joinVoices([this.voice]).format([this.voice],0,{}),this.setWidth(this.formatter.getMinTotalWidth()),!0)}beamNotes(e){if(e||=this.graceNotes,e.length>1){let t=new Gt(e);t.renderOptions.beamWidth=3,t.renderOptions.partialBeamLength=4,this.beams.push(t)}return this}setWidth(e){return this.width=e,this}getWidth(){return this.width+W.minNoteheadPadding}getGraceNotes(){return this.graceNotes}draw(){let e=this.checkContext(),t=this.checkAttachedNote();if(this.setRendered(),at(`Drawing grace note group for:`,t),this.alignSubNotesWithNote(this.getGraceNotes(),t,this.position),this.graceNotes.forEach(t=>t.setContext(e).drawWithStyle()),this.beams.forEach(t=>t.setContext(e).drawWithStyle()),this.showSlur){let n=l(t),r=n?nt:rt;this.slur=new r({lastNote:this.graceNotes[0],firstNote:t,firstIndexes:[0],lastIndexes:[0]}),this.slur.renderOptions.cp2=12,this.slur.renderOptions.yShift=(n?7:5)+this.renderOptions.slurYShift,this.slur.setContext(e).drawWithStyle()}}},st=class extends M{static get CATEGORY(){return f.NoteSubGroup}static format(e,t){if(!e||e.length===0)return!1;let n=0;for(let t=0;t<e.length;++t){let r=e[t];r.preFormat(),n+=r.getWidth()}return t.leftShift+=n,!0}constructor(e){super(),this.preFormatted=!1,this.position=M.Position.LEFT,this.subNotes=e,this.subNotes.forEach(e=>{e.setIgnoreTicks(!1)}),this.width=0,this.formatter=new Q,this.voice=new G({numBeats:4,beatValue:4,resolution:I.RESOLUTION}).setStrict(!1),this.voice.addTickables(this.subNotes)}preFormat(){this.preFormatted||=(this.formatter.joinVoices([this.voice]).format([this.voice],0),this.setWidth(this.formatter.getMinTotalWidth()),!0)}setWidth(e){return this.width=e,this}getWidth(){return this.width}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered(),this.alignSubNotesWithNote(this.subNotes,t),this.subNotes.forEach(t=>t.setContext(e).drawWithStyle())}};function ct(...e){lt.DEBUG&&g(`VexFlow.Ornament`,e)}var lt=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Ornament}static get minPadding(){return T.get(`NoteHead.minPadding`)}static format(t,n){if(!t||t.length===0)return!1;let r=0,i=n.rightShift,a=n.leftShift;for(let o=0;o<t.length;++o){let s=t[o];if(s.position===j.RIGHT)s.xShift+=i+2,i+=s.width+e.minPadding;else if(s.position===j.LEFT)s.xShift-=a+s.width+2,a+=s.width+e.minPadding;else if(s.position===j.ABOVE){r=Math.max(s.getWidth(),r);let e=s.getNote(),t=e.getLineNumber(!0)+n.topTextLine,i=e.getStem();i&&e.getStemDirection()===L.UP&&(t+=Math.abs(i.getHeight())/I.STAVE_LINE_DISTANCE);let a=e.getStave()?.getNumLines()??0;t<a&&(n.topTextLine+=a-t),s.setTextLine(n.topTextLine),n.topTextLine+=2}else r=Math.max(s.getWidth(),r),s.setTextLine(n.textLine),n.textLine+=2}return n.leftShift=a+r/2,n.rightShift=i+r/2,!0}static get ornamentNoteTransition(){return[`flip`,`jazzTurn`,`smear`]}static get ornamentAttack(){return[`scoop`]}static get ornamentAlignWithNoteHead(){return[`doit`,`fall`,`fallLong`,`doitLong`,`scoop`]}static get ornamentRelease(){return[`doit`,`fall`,`fallLong`,`doitLong`,`jazzTurn`,`smear`,`flip`]}static get ornamentLeft(){return[`scoop`]}static get ornamentRight(){return[`doit`,`fall`,`fallLong`,`doitLong`]}static get ornamentYShift(){return[`fallLong`]}static get ornamentArticulation(){return[`bend`,`plungerClosed`,`plungerOpen`]}constructor(t){super(),this.position=j.ABOVE,e.ornamentRight.indexOf(t)>=0&&(this.position=j.RIGHT),e.ornamentLeft.indexOf(t)>=0&&(this.position=j.LEFT),this.type=t,this.delayed=!1,this.renderOptions={accidentalLowerPadding:3,accidentalUpperPadding:3},this.adjustForStemDirection=!1,this.ornamentAlignWithNoteHead=e.ornamentAlignWithNoteHead.indexOf(this.type)>=0,e.ornamentNoteTransition.indexOf(this.type)>=0&&(this.delayed=!0),this.text=I.ornamentCodes(this.type)}setNote(t){return super.setNote(t),e.ornamentArticulation.indexOf(this.type)>=0&&(this.position=t.getLineNumber()>=3?M.Position.ABOVE:M.Position.BELOW),this}setDelayed(e){return this.delayed=e,this}setUpperAccidental(e){return this.accidentalUpper=new A,this.accidentalUpper.setText(I.accidentalCodes(e)),this}setLowerAccidental(e){return this.accidentalLower=new A,this.accidentalLower.setText(I.accidentalCodes(e)),this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=n.checkStave(),i=this.getAttribute(`class`);t.openGroup(`ornament`+(i?` `+i:``),this.getAttribute(`id`));let a=n.getModifierStartXY(this.position,this.index),o=a.x,s=r.getSpacingBetweenLines(),c=Ae(n,this.position),l=this.ornamentAlignWithNoteHead?a.y:0;if(this.position===j.ABOVE&&(l=Oe(n,this.textLine)-(this.textLine+c)*s),this.position===j.BELOW&&(l=ke(n,this.textLine)+(this.textLine+c+1.5)*s),this.delayed){let e=0,t=n.getTickContext().getX();if(this.delayXShift!==void 0)e=this.delayXShift;else{let i=n.getVoice().getTickables(),a=i.indexOf(n),s=a+1<i.length?i[a+1].checkTickContext():void 0;e+=s?(s.getX()-t)*.5:(r.getX()+r.getWidth()-o)*.5,this.delayXShift=e}o+=e}ct(`Rendering ornament: `,this.text.charCodeAt(0),o,l),this.accidentalLower&&(this.accidentalLower.renderText(t,o+this.xShift-this.accidentalLower.getWidth()*.5,l+this.yShift-this.accidentalLower.getTextMetrics().actualBoundingBoxDescent),l-=this.accidentalLower.getHeight()+this.renderOptions.accidentalLowerPadding),e.ornamentYShift.indexOf(this.type)>=0&&(this.yShift+=this.getHeight()),this.x=o-(this.position===j.ABOVE||this.position===j.BELOW?this.width*.5:0),this.y=l,this.renderText(t,0,0),this.accidentalUpper&&(l-=this.getHeight()+this.renderOptions.accidentalUpperPadding,this.accidentalUpper.renderText(t,o+this.xShift-this.accidentalUpper.getWidth()*.5,l+this.yShift-this.accidentalUpper.getTextMetrics().actualBoundingBoxDescent)),this.drawPointerRect(),t.closeGroup()}},ut=class e extends M{static get CATEGORY(){return f.Parenthesis}static buildAndAttach(t){for(let n of t)for(let t=0;t<n.keys.length;t++)n.addModifier(new e(j.LEFT),t),n.addModifier(new e(j.RIGHT),t)}static format(e,t){if(!e||e.length===0)return!1;let n=0,r=0;for(let t=0;t<e.length;++t){let i=e[t],a=i.getNote(),o=i.getPosition(),s=i.checkIndex(),c=0;o===j.RIGHT&&(c=a.getRightParenthesisPx(s),r=r>c+i.width?r:c+i.width),o===j.LEFT&&(c=a.getLeftParenthesisPx(s)+i.width,n=n>c+i.width?n:c+i.width),i.setXShift(c)}return t.leftShift+=n,t.rightShift+=r,!0}constructor(e){super(),this.position=e??M.Position.LEFT,this.position===M.Position.RIGHT?this.text=``:this.position===M.Position.LEFT&&(this.text=``)}setNote(e){return this.note=e,this.setFont(e.getFont()),this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});this.renderText(e,n.x,n.y)}};function dt(e){if(!e)return!1;let t=m();return typeof t.HTMLCanvasElement==`function`&&e instanceof t.HTMLCanvasElement||typeof e.getContext==`function`&&typeof e.toDataURL==`function`}function ft(e){if(!e)return!1;let t=m();return typeof t.HTMLDivElement==`function`&&e instanceof t.HTMLDivElement||typeof e.appendChild==`function`&&typeof e.style==`object`}var pt=class e extends Me{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static sanitizeCanvasDims(e,t){let n=this.CANVAS_BROWSER_SIZE_LIMIT;return Math.max(e,t)>n&&(_(`Canvas dimensions exceed browser limit. Cropping to `+n),e>n&&(e=n),t>n&&(t=n)),[e,t]}constructor(t){super(),this.textHeight=0,this.context2D=t,this.curTransfrom=t.getTransform(),this.canvas=t.canvas?t.canvas:{width:e.WIDTH,height:e.HEIGHT}}clear(){this.context2D.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(e,t){}closeGroup(){}openRotation(e,t,n){this.curTransfrom=this.context2D.getTransform(),this.context2D.translate(t,n),this.context2D.rotate(e*Math.PI/180),this.context2D.translate(-t,-n)}closeRotation(){this.context2D.setTransform(this.curTransfrom)}add(e){}setFillStyle(e){return this.context2D.fillStyle=e,this}setBackgroundFillStyle(e){return this}setStrokeStyle(e){return this.context2D.strokeStyle=e,this}setShadowColor(e){return this.context2D.shadowColor=e,this}setShadowBlur(e){let t=this.context2D.getTransform(),n=Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d);return this.context2D.shadowBlur=n*e,this}setLineWidth(e){return this.context2D.lineWidth=e,this}setLineCap(e){return this.context2D.lineCap=e,this}setLineDash(e){return this.context2D.setLineDash(e),this}scale(e,t){return this.context2D.scale(e,t),this}resize(t,n,r){let i=this.context2D.canvas,a=r??m().devicePixelRatio??1;return[t,n]=e.sanitizeCanvasDims(t*a,n*a),t=t/a|0,n=n/a|0,i.width=t*a,i.height=n*a,dt(i)&&(i.style.width=t+`px`,i.style.height=n+`px`),this.scale(a,a)}rect(e,t,n,r){return this.context2D.rect(e,t,n,r),this}fillRect(e,t,n,r){return this.context2D.fillRect(e,t,n,r),this}pointerRect(e,t,n,r){return this}clearRect(e,t,n,r){return this.context2D.clearRect(e,t,n,r),this}beginPath(){return this.context2D.beginPath(),this}moveTo(e,t){return this.context2D.moveTo(e,t),this}lineTo(e,t){return this.context2D.lineTo(e,t),this}bezierCurveTo(e,t,n,r,i,a){return this.context2D.bezierCurveTo(e,t,n,r,i,a),this}quadraticCurveTo(e,t,n,r){return this.context2D.quadraticCurveTo(e,t,n,r),this}arc(e,t,n,r,i,a){return this.context2D.arc(e,t,n,r,i,a),this}fill(){return this.context2D.fill(),this}stroke(){return this.context2D.stroke(),this}closePath(){return this.context2D.closePath(),this}measureText(e){let t=this.context2D.measureText(e),n=0,r=0;return t.fontBoundingBoxAscent?(n=-t.fontBoundingBoxAscent,r=t.fontBoundingBoxDescent+t.fontBoundingBoxAscent):(n=-t.actualBoundingBoxAscent,r=t.actualBoundingBoxDescent+t.actualBoundingBoxAscent),{x:0,y:n,width:t.width,height:r}}fillText(e,t,n){return this.context2D.fillText(e,t,n),this}save(){return this.context2D.save(),this}restore(){return this.context2D.restore(),this}set fillStyle(e){this.context2D.fillStyle=e}get fillStyle(){return this.context2D.fillStyle}set strokeStyle(e){this.context2D.strokeStyle=e}get strokeStyle(){return this.context2D.strokeStyle}setFont(e,t,n,r){let i=k.validate(e,t,n,r);return this.context2D.font=k.toCSSString(i),this.textHeight=k.convertSizeToPixelValue(i.size),this}getFont(){return this.context2D.font}},mt={path:{x:!0,y:!0,width:!0,height:!0,"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0},rect:{"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0},text:{width:!0,height:!0}},ht=`http://www.w3.org/2000/svg`,gt=2*Math.PI,_t=class e extends Me{static{this.measureTextElement=new A}constructor(e){super(),this.width=0,this.height=0,this.precision=1,this.backgroundFillStyle=`white`,this.fontCSSString=``,this.element=e,this.precision=10**I.RENDER_PRECISION_PLACES;let t=this.create(`svg`);t.setAttribute(`pointer-events`,`none`),this.element.appendChild(t),this.svg=t,this.parent=this.svg,this.groups=[this.svg],this.path=``,this.pen={x:NaN,y:NaN};let n={"font-family":T.get(`fontFamily`),"font-size":`10pt`,"font-weight":O.NORMAL,"font-style":ee.NORMAL};this.state={scaleX:1,scaleY:1,...n},this.attributes={"stroke-width":1,"stroke-dasharray":`none`,fill:`black`,stroke:`black`,shadowBlur:0,shadowColor:`black`,...n},this.groupAttributes=[],this.applyAttributes(t,this.attributes),this.groupAttributes.push({...this.attributes}),this.stateStack=[]}round(e){return Math.round(e*this.precision)/this.precision}create(e){return document.createElementNS(ht,e)}openGroup(e,t){let n=this.create(`g`);return this.groups.push(n),this.parent.appendChild(n),this.parent=n,e&&n.setAttribute(`class`,b(e)),t&&n.setAttribute(`id`,b(t)),this.applyAttributes(n,this.attributes),this.groupAttributes.push({...this.groupAttributes[this.groupAttributes.length-1],...this.attributes}),n}closeGroup(){this.groups.pop(),this.groupAttributes.pop(),this.parent=this.groups[this.groups.length-1]}openRotation(e,t,n){this.openGroup().setAttribute(`transform`,`translate(${t},${n}) rotate(${e}) translate(-${t},-${n})`)}closeRotation(){this.closeGroup()}add(e){this.parent.appendChild(e)}setFillStyle(e){return this.attributes.fill=e,this}setBackgroundFillStyle(e){return this.backgroundFillStyle=e,this}setStrokeStyle(e){return this.attributes.stroke=e,this}setShadowColor(e){return this.attributes.shadowColor=e,this}setShadowBlur(e){return this.attributes.shadowBlur=e,this}setLineWidth(e){return this.attributes[`stroke-width`]=e,this}setLineDash(e){if(Object.prototype.toString.call(e)===`[object Array]`)return this.attributes[`stroke-dasharray`]=e.join(`,`),this;throw new p(`ArgumentError`,`lineDash must be an array of integers.`)}setLineCap(e){return this.attributes[`stroke-linecap`]=e,this}resize(e,t){this.width=e,this.height=t,this.element.style.width=e.toString(),this.svg.style.width=e.toString(),this.svg.style.height=t.toString();let n={width:e,height:t};return this.applyAttributes(this.svg,n),this.scale(this.state.scaleX,this.state.scaleY),this}scale(e,t){this.state.scaleX=this.state.scaleX?this.state.scaleX*e:e,this.state.scaleY=this.state.scaleY?this.state.scaleY*t:t;let n=this.width/this.state.scaleX,r=this.height/this.state.scaleY;return this.setViewBox(0,0,n,r),this}setViewBox(e,t,n,r){if(typeof e==`string`)this.svg.setAttribute(`viewBox`,e);else{let i=e+` `+t+` `+n+` `+r;this.svg.setAttribute(`viewBox`,i)}}applyAttributes(e,t){let n=mt[e.nodeName];for(let r in t)n&&n[r]||t[r]&&(this.groupAttributes.length===0||t[r]!=this.groupAttributes[this.groupAttributes.length-1][r])&&e.setAttributeNS(null,r,t[r]);return e}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild)}rect(e,t,n,r,i){r<0&&(t+=r,r*=-1);let a=this.create(`rect`);return i??={fill:`none`,"stroke-width":this.attributes[`stroke-width`],stroke:`black`},e=this.round(e),t=this.round(t),n=this.round(n),r=this.round(r),this.applyAttributes(a,{x:e,y:t,width:n,height:r,...i}),this.add(a),this}fillRect(e,t,n,r){let i={fill:this.attributes.fill,stroke:`none`};return this.rect(e,t,n,r,i),this}pointerRect(e,t,n,r){return this.rect(e,t,n,r,{opacity:`0`,"pointer-events":`auto`}),this}clearRect(e,t,n,r){return this.rect(e,t,n,r,{fill:this.backgroundFillStyle,stroke:`none`}),this}beginPath(){return this.path=``,this.pen.x=NaN,this.pen.y=NaN,this}moveTo(e,t){return e=this.round(e),t=this.round(t),this.path+=`M`+e+` `+t,this.pen.x=e,this.pen.y=t,this}lineTo(e,t){return e=this.round(e),t=this.round(t),this.path+=`L`+e+` `+t,this.pen.x=e,this.pen.y=t,this}bezierCurveTo(e,t,n,r,i,a){return i=this.round(i),a=this.round(a),e=this.round(e),t=this.round(t),n=this.round(n),r=this.round(r),this.path+=`C`+e+` `+t+`,`+n+` `+r+`,`+i+` `+a,this.pen.x=i,this.pen.y=a,this}quadraticCurveTo(e,t,n,r){return n=this.round(n),r=this.round(r),e=this.round(e),t=this.round(t),this.path+=`Q`+e+` `+t+`,`+n+` `+r,this.pen.x=n,this.pen.y=r,this}arc(e,t,n,r,i,a){let o=e+n*Math.cos(r),s=t+n*Math.sin(r);o=this.round(o),s=this.round(s);let c=x(r),l=x(i);if(!a&&i-r>=gt||a&&r-i>=gt||c===l){let i=e+n*Math.cos(r+Math.PI),a=t+n*Math.sin(r+Math.PI);i=this.round(i),a=this.round(a),n=this.round(n),this.path+=`M${o} ${s} A${n} ${n} 0 0 0 ${i} ${a} `,this.path+=`A${n} ${n} 0 0 0 ${o} ${s}`,this.pen.x=o,this.pen.y=s}else{let u=e+n*Math.cos(i),d=t+n*Math.sin(i);r=c,i=l;let f;f=Math.abs(i-r)<Math.PI?a:!a,r>i&&(f=!f);let p=!a;u=this.round(u),d=this.round(d),n=this.round(n),this.path+=`M${o} ${s} A${n} ${n} 0 ${+f} ${+p} ${u} ${d}`,this.pen.x=u,this.pen.y=d}return this}closePath(){return this.path+=`Z`,this}getShadowStyle(){return`filter: drop-shadow(0 0 ${this.attributes.shadowBlur/1.5}px ${this.attributes.shadowColor})`}fill(e){let t=this.create(`path`);return e===void 0&&(e={...this.attributes,stroke:`none`}),e.d=this.path,this.attributes.shadowBlur>0&&(e.style=this.getShadowStyle()),this.applyAttributes(t,e),this.add(t),this}stroke(){let e=this.create(`path`),t={...this.attributes,fill:`none`,d:this.path};return this.attributes.shadowBlur>0&&(t.style=this.getShadowStyle()),this.applyAttributes(e,t),this.add(e),this}measureText(t){e.measureTextElement.setText(t),e.measureTextElement.setFont(this.attributes[`font-family`],this.attributes[`font-size`],this.attributes[`font-weight`],this.attributes[`font-style`]);let n=e.measureTextElement.getBoundingBox();return{x:n.x,y:n.y,width:n.w,height:n.h}}fillText(e,t,n){if(!e||e.length<=0)return this;t=this.round(t),n=this.round(n);let r={...this.attributes,stroke:`none`,x:t,y:n},i=this.create(`text`);return i.textContent=e,this.applyAttributes(i,r),this.add(i),this}save(){return this.stateStack.push({state:structuredClone(this.state),attributes:structuredClone(this.attributes)}),this}restore(){let e=this.stateStack.pop();if(e){let t=e;this.state=structuredClone(t.state),this.attributes=structuredClone(t.attributes)}return this}set fillStyle(e){this.setFillStyle(e)}get fillStyle(){return this.attributes.fill}set strokeStyle(e){this.setStrokeStyle(e)}get strokeStyle(){return this.attributes.stroke}setFont(e,t,n,r){let i=k.validate(e,t,n,r);this.fontCSSString=k.toCSSString(i);let a={"font-family":i.family,"font-size":i.size,"font-weight":i.weight,"font-style":i.style};return this.attributes={...this.attributes,...a},this.state={...this.state,...a},this}getFont(){return this.fontCSSString}},vt=function(e){return e[e.CANVAS=1]=`CANVAS`,e[e.SVG=2]=`SVG`,e}({}),yt=function(e){return e[e.NONE=1]=`NONE`,e[e.UP=2]=`UP`,e[e.DOWN=3]=`DOWN`,e}({}),K=class e{static{this.Backends=vt}static{this.LineEndType=yt}static{this.lastContext=void 0}static buildContext(t,n,r,i,a=`#FFF`){let o=new e(t,n);r&&i&&o.resize(r,i);let s=o.getContext();return s.setBackgroundFillStyle(a),e.lastContext=s,s}static getCanvasContext(t,n,r,i){return e.buildContext(t,e.Backends.CANVAS,n,r,i)}static getSVGContext(t,n,r,i){return e.buildContext(t,e.Backends.SVG,n,r,i)}static drawDashedLine(e,t,n,r,i,a){e.beginPath();let o=r-t,s=i-n,c=Math.atan2(s,o),l=t,u=n;e.moveTo(t,n);let d=0,f=!0;for(;!((o<0?l<=r:l>=r)&&(s<0?u<=i:u>=i));){let t=a[d++%a.length],n=l+Math.cos(c)*t;l=o<0?Math.max(r,n):Math.min(r,n);let p=u+Math.sin(c)*t;u=s<0?Math.max(i,p):Math.min(i,p),f?e.lineTo(l,u):e.moveTo(l,u),f=!f}e.closePath(),e.stroke()}constructor(t,n){if(c(t))this.ctx=t;else{if(n===void 0)throw new p(`InvalidArgument`,`Missing backend argument`);let r=n,i;if(typeof t==`string`){let e=document.getElementById(t);if(!e)throw new p(`BadElementId`,`Can't find element with ID "${e}"`);i=e}else i=t;if(r===e.Backends.CANVAS){if(!dt(i))throw new p(`BadElement`,`CANVAS context requires an HTMLCanvasElement.`);let e=i.getContext(`2d`,{willReadFrequently:!0});if(!e)throw new p(`BadElement`,`Can't get canvas context`);this.ctx=new pt(e)}else if(r===e.Backends.SVG){if(!ft(i))throw new p(`BadElement`,`SVG context requires an HTMLDivElement.`);this.ctx=new _t(i)}else throw new p(`InvalidBackend`,`No support for backend: ${r}`)}}resize(e,t){return this.ctx.resize(e,t),this}getContext(){return this.ctx}},bt=class extends M{static get CATEGORY(){return f.StringNumber}static format(e,t){let n=t.leftShift,r=t.rightShift;if(!e||e.length===0)return!1;let i=[],a=null,o=0,s=0;for(let n=0;n<e.length;++n){let c=e[n],u=c.getNote(),d=c.getPosition();if(!l(u))throw new p(`NoStaveNote`);let f=c.checkIndex(),m=u.getKeyProps()[f],h=u.getModifierContext(),g=c.radius*2/I.STAVE_LINE_DISTANCE+.5;if(h&&(d===j.ABOVE?(c.textLine=h.getState().topTextLine,t.topTextLine+=g):d===j.BELOW&&(c.textLine=h.getState().textLine,t.textLine+=g)),u!==a){for(let e=0;e<u.keys.length;++e)d===M.Position.LEFT&&(o=Math.max(u.getLeftDisplacedHeadPx(),o)),r===0&&(s=Math.max(u.getRightDisplacedHeadPx(),s));a=u}let _=m.line;i.push({pos:d,note:u,num:c,line:_,shiftL:o,shiftR:s})}i.sort((e,t)=>t.line-e.line);let c=0,u=0,d=0,f=null,m=null;for(let e=0;e<i.length;++e){let t=i[e].note,a=i[e].pos,s=i[e].num,l=i[e].line,p=i[e].shiftR;(l!==f||t!==m)&&(c=r+p);let h=s.getWidth()+1,g=0;a===M.Position.LEFT?(s.setXShift(n+o),g=h,u=Math.max(g,u)):a===M.Position.RIGHT&&(s.setXShift(c),g+=h,d=g>d?g:d),f=l,m=t}return t.leftShift+=u,t.rightShift+=d,!0}constructor(e){super(),this.stringNumber=e,this.position=M.Position.ABOVE,this.xShift=0,this.yShift=0,this.textLine=0,this.stemOffset=0,this.xOffset=0,this.yOffset=0,this.dashed=!0,this.leg=K.LineEndType.NONE,this.radius=8,this.drawCircle=!0,this.setWidth(this.radius*2+4)}setLineEndType(e){return e>=K.LineEndType.NONE&&e<=K.LineEndType.DOWN&&(this.leg=e),this}setStringNumber(e){return this.stringNumber=e,this}setOffsetX(e){return this.xOffset=e,this}setOffsetY(e){return this.yOffset=e,this}setLastNote(e){return this.lastNote=e,this}setDashed(e){return this.dashed=e,this}setDrawCircle(e){return this.drawCircle=e,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(this.position,this.index),r=t.hasStem()?t.getStemDirection():L.UP,i=n.x+this.xShift+this.xOffset,a={};t.hasStem()&&(a=t.checkStem().getExtents());let o=n.y+this.yShift+this.yOffset;switch(this.position){case M.Position.ABOVE:o=t.getYs().reduce((e,t)=>e<t?e:t),t.hasStem()&&r===L.UP&&(o=a.topY+T.get(`StringNumber.stemPadding`)),o-=this.radius+T.get(`StringNumber.verticalPadding`)+this.textLine*I.STAVE_LINE_DISTANCE;break;case M.Position.BELOW:o=t.getYs().reduce((e,t)=>e>t?e:t),t.hasStem()&&r===L.DOWN&&(o=a.topY-T.get(`StringNumber.stemPadding`)),o+=this.radius+T.get(`StringNumber.verticalPadding`)+this.textLine*I.STAVE_LINE_DISTANCE;break;case M.Position.LEFT:i-=this.radius/2+T.get(`StringNumber.leftPadding`);break;case M.Position.RIGHT:i+=this.radius/2+T.get(`StringNumber.rightPadding`);break;default:throw new p(`InvalidPosition`,`The position ${this.position} is invalid`)}this.drawCircle&&(e.beginPath(),e.arc(i,o,this.radius,0,Math.PI*2,!1),e.setLineWidth(1.5),e.stroke()),e.setFont(this.fontInfo);let s=i-e.measureText(this.stringNumber).width/2;e.fillText(``+this.stringNumber,s,o+4.5);let c=this.lastNote;if(u(c)){let n=c.getStemX()-t.getX()+5;e.setStrokeStyle(`#000000`),e.setLineCap(`round`),e.setLineWidth(.6),this.dashed?K.drawDashedLine(e,i+10,o,i+n,o,[3,3]):K.drawDashedLine(e,i+10,o,i+n,o,[3,0]);let r,a;switch(this.leg){case K.LineEndType.UP:r=-10,a=this.dashed?[3,3]:[3,0],K.drawDashedLine(e,i+n,o,i+n,o+r,a);break;case K.LineEndType.DOWN:r=10,a=this.dashed?[3,3]:[3,0],K.drawDashedLine(e,i+n,o,i+n,o+r,a)}}}},xt=class e extends M{static get CATEGORY(){return f.Stroke}static{this.Type={BRUSH_DOWN:1,BRUSH_UP:2,ROLL_DOWN:3,ROLL_UP:4,RASGUEADO_DOWN:5,RASGUEADO_UP:6,ARPEGGIO_DIRECTIONLESS:7}}static format(e,t){let n=t.leftShift;if(!e||e.length===0)return!1;let r=e.map(e=>{let t=e.getNote(),n=e.checkIndex();if(l(t)){let{line:r}=t.getKeyProps()[n];return{line:r,shift:t.getLeftDisplacedHeadPx(),stroke:e}}if(d(t)){let{str:r}=t.getPositions()[n];return{line:r,shift:0,stroke:e}}throw new p(`Internal`,`Unexpected instance.`)}),i=n,a=r.reduce((e,{stroke:t,shift:n})=>(t.setXShift(i+n),Math.max(t.getWidth()+5,e)),0);return t.leftShift+=a,!0}constructor(e,t){super(),this.boundingBox=new D(0,0,0,0),this.options={allVoices:!0,...t},this.allVoices=this.options.allVoices,this.type=e,this.position=M.Position.LEFT,this.renderOptions={fontScale:T.get(`Stroke.fontSize`)},this.setXShift(0),this.setWidth(10)}getPosition(){return this.position}addEndNote(e){return this.noteEnd=e,this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=n.getModifierStartXY(this.position,this.index),i=n.getYs(),a=r.y,o=r.y,c=r.x-5,l=n.checkStave().getSpacingBetweenLines(),u=this.checkModifierContext().getMembers(n.getCategory());for(let e=0;e<u.length;e++){let t=u[e];if(s(t)){i=t.getYs();for(let t=0;t<i.length;t++)(this.note===u[e]||this.allVoices)&&(a=Math.min(a,i[t]),o=Math.max(o,i[t]))}}let d=``,f=0,m=0;switch(this.type){case e.Type.BRUSH_DOWN:case e.Type.ROLL_DOWN:case e.Type.RASGUEADO_DOWN:d=P.arrowheadBlackUp,f=a,a-=l/2,o+=l/2;break;case e.Type.BRUSH_UP:case e.Type.ROLL_UP:case e.Type.RASGUEADO_UP:d=P.arrowheadBlackDown,f=o+l,a-=l/2;break;case e.Type.ARPEGGIO_DIRECTIONLESS:a-=l/2,o+=l/2;break;default:throw new p(`InvalidType`,`The stroke type ${this.type} does not exist`)}if(this.type===e.Type.BRUSH_DOWN||this.type===e.Type.BRUSH_UP)t.fillRect(c+this.xShift,a,1,o-a),this.boundingBox=new D(c+this.xShift,a,1,o-a);else{let n=d===P.arrowheadBlackDown?P.wiggleArpeggiatoDown:P.wiggleArpeggiatoUp,r=``,i=new A;for(;i.getWidth()<o-a;)r+=n,i.setText(r);this.type===e.Type.RASGUEADO_DOWN||this.type===e.Type.ROLL_DOWN||this.type===e.Type.ARPEGGIO_DIRECTIONLESS?(t.openRotation(90,c+this.xShift,a),i.renderText(t,c+this.xShift,a-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2),t.closeRotation(),m=a+i.getWidth()+5,this.boundingBox=new D(c+this.xShift-i.getHeight()/2,a-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2,i.getHeight(),i.getWidth())):(t.openRotation(-90,c+this.xShift,o),i.renderText(t,c+this.xShift,o-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2),t.closeRotation(),m=o-i.getWidth()-5,this.boundingBox=new D(c+this.xShift-i.getHeight()/2,o-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2-i.getWidth(),i.getHeight(),i.getWidth()))}if(f!==0){let e=new A;e.setText(d),e.renderText(t,c+this.xShift-e.getWidth()/2,f),this.boundingBox.mergeWith(new D(c+this.xShift-e.getWidth()/2,f-e.getHeight(),e.getWidth(),e.getHeight()))}if(this.type===e.Type.RASGUEADO_DOWN||this.type===e.Type.RASGUEADO_UP){let n=new A(`Stroke.text`);n.setText(`R`),n.renderText(t,c+this.xShift-n.getWidth()/2,m+(this.type===e.Type.RASGUEADO_DOWN?n.getHeight():0)),this.boundingBox.mergeWith(new D(c+this.xShift-n.getWidth()/2,m+(this.type===e.Type.RASGUEADO_DOWN?n.getHeight():0)-n.getHeight(),n.getWidth(),n.getHeight()))}}getBoundingBox(){return this.boundingBox}},St=class extends M{static get CATEGORY(){return f.Vibrato}static format(e,t,n){if(!e||e.length===0)return!1;let r=t.topTextLine,i=0,a=t.rightShift-7,o=n.getMembers(Re.CATEGORY);if(o&&o.length>0){let e=o.map(e=>e.getTextHeight()).reduce((e,t)=>e>t?e:t)/I.STAVE_LINE_DISTANCE;r-=e+1}else t.topTextLine+=1;for(let t=0;t<e.length;++t){let n=e[t];n.setXShift(a),n.setTextLine(r),i+=n.getWidth(),a+=i}return t.rightShift+=i,!0}constructor(){super(),this.position=M.Position.RIGHT,this.renderOptions={code:60080,width:20},this.setVibratoWidth(this.renderOptions.width)}setVibratoWidth(e){this.renderOptions.width=e,this.text=String.fromCodePoint(this.renderOptions.code);let t=this.getWidth();if(!t)throw new p(`Cannot set vibrato width if width is 0`);let n=Math.round(this.renderOptions.width/t);for(let e=1;e<n;e++)this.text+=String.fromCodePoint(this.renderOptions.code);return this}setVibratoCode(e){return this.renderOptions.code=e,this.setVibratoWidth(this.renderOptions.width)}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(M.Position.RIGHT,this.index).x,r=t.getYForTopText(this.textLine)+5;this.renderText(e,n,r)}};function Ct(...e){wt.DEBUG&&g(`VexFlow.ModifierContext`,e)}var wt=class{constructor(){this.state={leftShift:0,rightShift:0,textLine:0,topTextLine:0},this.members={},this.preFormatted=!1,this.postFormatted=!1,this.formatted=!1,this.width=0,this.spacing=0}static{this.DEBUG=!1}addModifier(e){return Ct(`addModifier is deprecated, use addMember instead.`),this.addMember(e)}addMember(e){let t=e.getCategory();return this.members[t]||(this.members[t]=[]),this.members[t].push(e),e.setModifierContext(this),this.preFormatted=!1,this}getModifiers(e){return Ct(`getModifiers is deprecated, use getMembers instead.`),this.getMembers(e)}getMembers(e){return this.members[e]??[]}getWidth(){return this.width}getLeftShift(){return this.state.leftShift}getRightShift(){return this.state.rightShift}getState(){return this.state}getMetrics(){if(!this.formatted)throw new p(`UnformattedMember`,`Unformatted member has no metrics.`);return{width:this.state.leftShift+this.state.rightShift+this.spacing,spacing:this.spacing}}preFormat(){if(this.preFormatted)return;Ct(`Preformatting ModifierContext`);let e=this.state,t=this.members;W.format(t[f.StaveNote],e),ut.format(t[f.Parenthesis],e),Ge.format(t[f.Dot],e),Ke.format(t[f.FretHandFinger],e),he.format(t[f.Accidental],e),xt.format(t[f.Stroke],e),ot.format(t[f.GraceNoteGroup],e),st.format(t[f.NoteSubGroup],e),bt.format(t[f.StringNumber],e),je.format(t[f.Articulation],e),lt.format(t[f.Ornament],e),be.format(t[f.Annotation],e),We.format(t[f.ChordSymbol],e),Re.format(t[f.Bend],e),St.format(t[f.Vibrato],e,this),this.width=e.leftShift+e.rightShift,this.preFormatted=!0}postFormat(){this.postFormatted||(Ct(`Postformatting ModifierContext`),W.postFormat(this.getMembers(f.StaveNote)))}};function Tt(...e){q.DEBUG&&g(`VexFlow.Clef`,e)}var q=class e extends V{static{this.DEBUG=!1}static get CATEGORY(){return f.Clef}static get types(){let{gClef:e,fClef:t,cClef:n,unpitchedPercussionClef1:r,sixStringTabClef:i}=P;return{treble:{code:e,line:3},bass:{code:t,line:1},alto:{code:n,line:2},tenor:{code:n,line:1},percussion:{code:r,line:2},soprano:{code:n,line:4},"mezzo-soprano":{code:n,line:3},"baritone-c":{code:n,line:0},"baritone-f":{code:t,line:2},subbass:{code:t,line:0},french:{code:e,line:4},tab:{code:i,line:2.5}}}constructor(t,n,r){super(),this.code=e.types.treble.code,this.line=e.types.treble.line,this.size=`default`,this.type=`treble`,this.setPosition(B.BEGIN),this.setType(t,n,r),Tt(`Creating clef:`,t)}setType(t,n=`default`,r){return this.type=t,this.code=e.types[t].code,this.line=e.types[t].line,this.size=n??`default`,r===`8va`&&(this.code===P.gClef&&(this.code=P.gClef8va),this.code===P.fClef&&(this.code=P.fClef8va)),r===`8vb`&&(this.code===P.gClef&&(this.code=P.gClef8vb),this.code===P.fClef&&(this.code=P.fClef8vb)),this.text=this.code,this.fontInfo.size=Math.floor(e.getPoint(this.size)),this}static getPoint(e){return e==="default"?T.get(`fontSize`):T.get(`fontSize`)*2/3}setStave(e){return this.stave=e,this}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`clef`+(n?` `+n:``),this.getAttribute(`id`)),this.y=e.getYForLine(this.line),this.renderText(t,0,0),this.drawPointerRect(),t.closeGroup()}},J=class extends V{static get CATEGORY(){return f.KeySignature}constructor(e,t,n){super(),this.accList=[],this.setKeySig(e,t,n),this.setPosition(B.BEGIN),this.children=[],this.paddingForced=!1}convertToGlyph(e,t,n){let r=I.accidentalCodes(e.type),i=new A(f.KeySignature);i.setText(r);let a=1;if(i.setYShift(n.getYForLine(e.line)),this.children.length>0){let e=this.children[this.children.length-1],t=e=>e.getText()===P.accidentalNatural;(t(e)||t(i))&&((e,t)=>Math.abs(t.getYShift()-e.getYShift()))(e,i)<10&&(a=2),i.setXShift(e.getXShift()+e.getWidth()+a)}this.children.push(i),this.width+=i.getWidth()+a}cancelKey(e){return this.formatted=!1,this.cancelKeySpec=e,this}convertToCancelAccList(e){let t=I.keySignature(e),n=this.accList.length>0&&t.length>0&&t[0].type!==this.accList[0].type,r=n?t.length:t.length-this.accList.length;if(r<1)return;let i=[];for(let e=0;e<r;e++){let a=e;n||(a=t.length-r+e);let o=t[a];i.push({type:`n`,line:o.line})}return this.accList=i.concat(this.accList),{accList:i,type:t[0].type}}addToStave(e){return this.paddingForced=!0,e.addModifier(this),this}setStave(e){return this.formatted=!1,super.setStave(e)}getBoundingBox(){return this.formatted||this.format(),super.getBoundingBox()}calculateDimensions(){let e;e=this.children.length>0?this.children[0].getBoundingBox():new D(this.x+this.xShift,this.y+this.yShift,0,0),this.children.forEach(t=>{e.mergeWith(t.getBoundingBox())}),this.width=e.getW(),this.height=e.getH(),this.y=e.getY()}convertAccLines(e,t,n=this.accList){let r=0,i;switch(e){case`soprano`:t===`#`?i=[2.5,.5,2,0,1.5,-.5,1]:r=-1;break;case`mezzo-soprano`:t===`b`?i=[0,2,.5,2.5,1,3,1.5]:r=1.5;break;case`alto`:r=.5;break;case`tenor`:t===`#`?i=[3,1,2.5,.5,2,0,1.5]:r=-.5;break;case`baritone-f`:case`baritone-c`:t===`b`?i=[.5,2.5,1,3,1.5,3.5,2]:r=2;break;case`bass`:case`french`:r=1}let a;if(i!==void 0)for(a=0;a<n.length;++a)n[a].line=i[a];else if(r!==0)for(a=0;a<n.length;++a)n[a].line+=r}getPadding(e){return this.formatted||this.format(),this.children.length===0||!this.paddingForced&&e<2?0:this.padding}getWidth(){return this.formatted||this.format(),this.width}setKeySig(e,t,n){return this.formatted=!1,this.keySpec=e,this.cancelKeySpec=t,this.alterKeySpec=n,this}alterKey(e){return this.formatted=!1,this.alterKeySpec=e,this}convertToAlterAccList(e){let t=Math.min(e.length,this.accList.length);for(let n=0;n<t;++n)e[n]&&(this.accList[n].type=e[n])}format(){let e=this.getStave();e||(e=new X(0,0,100),this.setStave(e)),this.width=0,this.children=[],this.accList=I.keySignature(h(this.keySpec));let t=this.accList,n=t.length>0?t[0].type:void 0,r;if(this.cancelKeySpec&&(r=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){let i=(this.position===B.END?e.getEndClef():e.getClef())||e.getClef();r&&this.convertAccLines(i,r.type,r.accList),this.convertAccLines(i,n,t);for(let t=0;t<this.accList.length;++t)this.convertToGlyph(this.accList[t],this.accList[t+1],e)}this.calculateDimensions(),this.formatted=!0}draw(){let e=this.checkStave().checkContext();this.formatted||this.format(),this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`keysignature`+(t?` `+t:``),this.getAttribute(`id`));for(let t=0;t<this.children.length;t++)this.children[t].renderText(e,this.x,0);this.drawPointerRect(),e.closeGroup()}},Et=class e extends V{static get CATEGORY(){return f.Repetition}static{this.type={NONE:1,CODA_LEFT:2,CODA_RIGHT:3,SEGNO_LEFT:4,SEGNO_RIGHT:5,DC:6,DC_AL_CODA:7,DC_AL_FINE:8,DS:9,DS_AL_CODA:10,DS_AL_FINE:11,FINE:12,TO_CODA:13}}constructor(e,t,n){super(),this.symbolType=e,this.x=t,this.xShift=0,this.yShift=n}setShiftX(e){return this.xShift=e,this}setShiftY(e){return this.yShift=e,this}draw(){let t=this.checkStave(),n=t.getModifierXShift(this.getPosition());switch(this.setRendered(),this.symbolType){case e.type.CODA_RIGHT:this.drawCodaFixed(t,n+t.getWidth());break;case e.type.CODA_LEFT:this.drawSymbolText(t,n,`Coda`,!0);break;case e.type.SEGNO_LEFT:this.drawSegnoFixed(t,n);break;case e.type.SEGNO_RIGHT:this.drawSegnoFixed(t,n+t.getWidth());break;case e.type.DC:this.drawSymbolText(t,n,`D.C.`,!1);break;case e.type.DC_AL_CODA:this.drawSymbolText(t,n,`D.C. al`,!0);break;case e.type.DC_AL_FINE:this.drawSymbolText(t,n,`D.C. al Fine`,!1);break;case e.type.DS:this.drawSymbolText(t,n,`D.S.`,!1);break;case e.type.DS_AL_CODA:this.drawSymbolText(t,n,`D.S. al`,!0);break;case e.type.DS_AL_FINE:this.drawSymbolText(t,n,`D.S. al Fine`,!1);break;case e.type.FINE:this.drawSymbolText(t,n,`Fine`,!1);break;case e.type.TO_CODA:this.drawSymbolText(t,n,`To`,!0)}}drawCodaFixed(e,t){let n=e.getYForTopText(e.getNumLines());return this.text=P.coda,this.renderText(e.checkContext(),t,n+T.get(`Repetition.coda.offsetY`)),this}drawSegnoFixed(e,t){let n=e.getYForTopText(e.getNumLines());return this.text=P.segno,this.renderText(e.checkContext(),t,n+T.get(`Repetition.segno.offsetY`)),this}drawSymbolText(t,n,r,i){let a=t.checkContext(),o=0;switch(this.text=r,i&&(this.text+=` `),this.setFont(T.getFontInfo(`Repetition.text`)),this.symbolType){case e.type.CODA_LEFT:o=t.getVerticalBarWidth();break;case e.type.DC:case e.type.DC_AL_FINE:case e.type.DS:case e.type.DS_AL_FINE:case e.type.FINE:default:o=n-(t.getNoteStartX()-this.x)+t.getWidth()-this.width-T.get(`Repetition.text.offsetX`)}let s=t.getYForTopText(t.getNumLines())+T.get(`Repetition.text.offsetY`);return this.renderText(a,o,s),this}},Dt=class extends V{static get CATEGORY(){return f.StaveSection}constructor(e,t=0,n=0,r=!0){super(),this.setText(e),this.x=t,this.yShift=n,this.drawRect=r,this.padding=T.get(`StaveSection.padding`)}setDrawRect(e){return this.drawRect=e,this}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered(),this.x=e.getX()+e.getModifierXShift(this.getPosition());let n=-1*this.textMetrics.actualBoundingBoxDescent,r=this.width+2*this.padding,i=this.height+2*this.padding,a=e.getYForTopText(1.5)+this.yShift,o=this.x+this.xShift;this.drawRect&&(t.beginPath(),t.rect(o,a-i+n,r,i),t.stroke()),this.renderText(t,this.xShift+this.padding,a-this.padding)}},Ot=class extends V{static get CATEGORY(){return f.StaveTempo}constructor(e,t,n){super(),this.durationToCode={"1/4":P.metNoteDoubleWholeSquare,long:P.metNoteDoubleWholeSquare,"1/2":P.metNoteDoubleWhole,breve:P.metNoteDoubleWhole,1:P.metNoteWhole,whole:P.metNoteWhole,w:P.metNoteWhole,2:P.metNoteHalfUp,half:P.metNoteHalfUp,h:P.metNoteHalfUp,4:P.metNoteQuarterUp,quarter:P.metNoteQuarterUp,q:P.metNoteQuarterUp,8:P.metNote8thUp,eighth:P.metNote8thUp,16:P.metNote16thUp,"16th":P.metNote16thUp,32:P.metNote32ndUp,"32nd":P.metNote32ndUp,64:P.metNote64thUp,"64th":P.metNote64thUp,128:P.metNote128thUp,"128th":P.metNote128thUp,256:P.metNote256thUp,"256th":P.metNote256thUp,512:P.metNote512thUp,"512th":P.metNote512thUp,1024:P.metNote1024thUp,"1024th":P.metNote1024thUp},this.tempo=e,this.position=B.ABOVE,this.x=t,this.setXShift(10),this.setYShift(n)}setTempo(e){return this.tempo=e,this}draw(){let e=this.checkStave(),t=e.getModifierXShift(this.getPosition()),n=e.checkContext();this.setRendered();let{name:r,duration:i,dots:a,bpm:o,duration2:s,dots2:c,parenthesis:l}=this.tempo,u=this.x+t,d=e.getYForTopText(1),f=new A(`StaveTempo.glyph`),p=new A(`StaveTempo`);if(r&&(this.text=r,this.fontInfo=T.getFontInfo(`StaveTempo.name`),this.renderText(n,t,d),u+=this.getWidth()+3),(r&&i||l)&&(p.setText(`(`),p.renderText(n,u+this.xShift,d+this.yShift),u+=p.getWidth()+3),i){if(f.setText(this.durationToCode[i]),f.renderText(n,u+this.xShift,d+this.yShift),u+=f.getWidth()+3,a){f.setText(P.metAugmentationDot);for(let e=0;e<a;e++)f.renderText(n,u+this.xShift,d+2+this.yShift),u+=f.getWidth()+3}if(p.setText(`=`),p.renderText(n,u+this.xShift,d+this.yShift),u+=p.getWidth()+3,s){if(f.setText(this.durationToCode[s]),f.renderText(n,u+this.xShift,d+this.yShift),u+=f.getWidth()+3,c){f.setText(P.metAugmentationDot);for(let e=0;e<c;e++)f.renderText(n,u+this.xShift,d+2+this.yShift),u+=f.getWidth()+3}}else o&&(p.setText(``+o),p.renderText(n,u+this.xShift,d+this.yShift),u+=p.getWidth()+3);(r||l)&&(p.setText(`)`),p.renderText(n,u+this.xShift,d+this.yShift))}}},kt=function(e){return e[e.LEFT=1]=`LEFT`,e[e.CENTER=2]=`CENTER`,e[e.RIGHT=3]=`RIGHT`,e}({}),At=class e extends z{static get CATEGORY(){return f.TextNote}static{this.Justification=kt}static get GLYPHS(){return{segno:P.segno,tr:P.ornamentTrill,mordent:P.ornamentMordent,mordentUpper:P.ornamentShortTrill,mordentLower:P.ornamentMordent,f:P.dynamicForte,p:P.dynamicPiano,m:P.dynamicMezzo,s:P.dynamicSforzando,z:P.dynamicZ,coda:P.coda,pedalOpen:P.keyboardPedalPed,pedalClose:P.keyboardPedalUp,caesuraStraight:P.caesura,caesuraCurved:P.caesuraCurved,breath:P.breathMarkComma,tick:P.breathMarkTick,turn:P.ornamentTurn,turnInverted:P.ornamentTurnSlash}}constructor(t){super(t),this.text=t.text??``,t.glyph&&(this.text+=e.GLYPHS[t.glyph]||t.glyph),t.font?this.setFont(t.font):t.glyph===void 0&&this.setFont(T.getFontInfo(`TextNote.text.fontSize`));let n=k.convertSizeToPointValue(this.fontInfo.size)*.769231;t.superscript&&(this.superscript=new A(`TexNote.subSuper`),this.superscript.setText(t.superscript),this.superscript.setFontSize(n)),t.subscript&&(this.subscript=new A(`TexNote.subSuper`),this.subscript.setText(t.subscript),this.subscript.setFontSize(n)),this.line=t.line??0,this.smooth=t.smooth||!1,this.ignoreTicks=t.ignoreTicks||!1,this.justification=1}setJustification(e){return this.justification=e,this}setLine(e){return this.line=e,this}getLine(){return this.line}preFormat(){if(this.preFormatted)return;let e=this.checkTickContext(`Can't preformat without a TickContext.`);this.justification===2?this.leftDisplacedHeadPx=this.width/2:this.justification===3&&(this.leftDisplacedHeadPx=this.width),this.rightDisplacedHeadPx=e.getMetrics().glyphPx/2,this.preFormatted=!0}draw(){let e=this.checkContext(),t=this.checkStave(),n=this.checkTickContext(`Can't draw without a TickContext.`);this.setRendered();let r=this.getAbsoluteX()+n.getMetrics().glyphPx/2,i=this.getWidth();this.justification===2?r-=i/2:this.justification===3&&(r-=i);let a=t.getYForLine(this.line+-3);this.renderText(e,r,a);let o=this.getHeight();this.superscript&&this.superscript.renderText(e,r+this.width+2,a-o/2.2),this.subscript&&this.subscript.renderText(e,r+this.width+2,a+o/2.2-1)}},jt=class extends V{static get CATEGORY(){return f.StaveText}constructor(e,t,n={}){super(),this.setText(e),this.setXShift(n.shiftX??0),this.setYShift(n.shiftY??0),this.position=t,this.justification=n.justification??At.Justification.CENTER}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n,r;switch(this.position){case B.LEFT:case B.RIGHT:r=(e.getYForLine(0)+e.getBottomLineY())/2,n=this.position===B.LEFT?e.getX()-this.width-24:e.getX()+e.getWidth()+24;break;case B.ABOVE:case B.BELOW:n=e.getX(),this.justification===kt.CENTER?n+=e.getWidth()/2-this.width/2:this.justification===kt.RIGHT&&(n+=e.getWidth()-this.width),r=this.position===B.ABOVE?e.getYForTopText(2):e.getYForBottomText(2);break;default:throw new p(`InvalidPosition`,`Value Must be in Modifier.Position.`)}this.renderText(t,n,r+4)}},Mt=function(e){return e[e.NONE=1]=`NONE`,e[e.BEGIN=2]=`BEGIN`,e[e.MID=3]=`MID`,e[e.END=4]=`END`,e[e.BEGIN_END=5]=`BEGIN_END`,e}({}),Nt=class extends V{static get CATEGORY(){return f.Volta}static get type(){return Mt}constructor(e,t,n,r){super(),this.type=e,this.x=n,this.yShift=r,this.text=t}draw(){let e=this.checkStave(),t=e.getModifierXShift(this.getPosition()),n=e.checkContext();this.setRendered();let r=e.getWidth()-t,i=e.getYForTopText(e.getNumLines())+this.yShift,a=1.5*e.getSpacingBetweenLines();switch(this.type){case 2:n.fillRect(this.x+t,i,1,a);break;case 4:r-=5,n.fillRect(this.x+t+r,i,1,a);break;case 5:r-=3,n.fillRect(this.x+t,i,1,a),n.fillRect(this.x+t+r,i,1,a)}(this.type===2||this.type===5)&&this.renderText(n,t+5,i-this.yShift+15),n.fillRect(this.x+t,i,r,1)}},Pt=e=>{e.split(`/`).forEach(t=>{if(/^[0-9+\-()]+$/.test(t)===!1)throw new p(`BadTimeSignature`,`Invalid time spec: ${e}. Must contain valid signatures.`)})},Y=class e extends V{static get CATEGORY(){return f.TimeSignature}constructor(e=`4/4`,t=15,n=!0){super(),this.topRenderY=0,this.botRenderY=0,this.timeSpec=`4/4`,this.line=0,this.isNumeric=!0,this.topStartX=0,this.botStartX=0,this.lineShift=0,this.topText=new A,this.botText=new A,this.validateArgs=n;let r=t;this.topLine=1,this.bottomLine=3,this.setPosition(B.BEGIN),this.setTimeSig(e),this.setPadding(r)}static getTimeSigCode(e,t=!1){let n=P.null;switch(e){case`C`:n=P.timeSigCommon;break;case`C|`:n=P.timeSigCutCommon;break;case`+`:n=t?P.timeSigPlusSmall:P.timeSigPlus;break;case`-`:n=P.timeSigMinus;break;case`(`:n=t?P.timeSigParensLeftSmall:P.timeSigParensLeft;break;case`)`:n=t?P.timeSigParensRightSmall:P.timeSigParensRight;break;default:n=String.fromCodePoint(57472+Number(e[0]))}return n}makeTimeSignatureGlyph(t,n){let r=``,i=0,a=0;for(let i=0;i<t.length;++i){let a=e.getTimeSigCode(t[i],n.length>0);r+=a}this.topText.setText(r),i=this.topText.getWidth(),a=this.topText.getHeight();let o=0;r=``;for(let t=0;t<n.length;++t){let i=e.getTimeSigCode(n[t],!0);r+=i}this.botText.setText(r),o=this.botText.getWidth(),a=Math.max(a,this.botText.getHeight()),this.lineShift=a>30?.5:0,this.width=Math.max(i,o),this.topStartX=(this.width-i)/2,this.botStartX=(this.width-o)/2}setTimeSig(t){if(this.timeSpec=t,t===`C`||t===`C|`){let n=e.getTimeSigCode(t);this.line=2,this.text=n,this.isNumeric=!1}else{this.validateArgs&&Pt(t);let e=t.split(`/`);this.line=0,this.isNumeric=!0,this.makeTimeSignatureGlyph(e[0]??``,e[1]??``)}return this}getTimeSpec(){return this.timeSpec}getLine(){return this.line}setLine(e){this.line=e}getIsNumeric(){return this.isNumeric}setIsNumeric(e){this.isNumeric=e}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`timesignature`+(n?` `+n:``),this.getAttribute(`id`)),this.drawAt(t,e,this.x),this.drawPointerRect(),t.closeGroup()}drawAt(e,t,n){if(this.setRendered(),this.isNumeric){let r=n+this.topStartX;this.topRenderY=this.botText.getText().length>0?t.getYForLine(this.topLine-this.lineShift):(t.getYForLine(this.topLine)+t.getYForLine(this.bottomLine))/2,this.topText.renderText(e,r,this.topRenderY),r=n+this.botStartX,this.botRenderY=t.getYForLine(this.bottomLine+this.lineShift),this.botText.renderText(e,r,this.botRenderY)}else this.renderText(e,n-this.x,t.getYForLine(this.line))}getBoundingBox(){if(this.isNumeric){let e=this.topText.getBoundingBox(),t=this.botText.getBoundingBox();return e.move(this.x+this.topStartX,this.topRenderY),t.move(this.x+this.botStartX,this.botRenderY),e.mergeWith(t)}{let e=this.checkStave(),t=super.getBoundingBox();return t.move(0,e.getYForLine(this.line)),t}}},Ft={[U.CATEGORY]:0,[q.CATEGORY]:1,[J.CATEGORY]:2,[Y.CATEGORY]:3},It={[Y.CATEGORY]:0,[J.CATEGORY]:1,[U.CATEGORY]:2,[q.CATEGORY]:3},X=class extends A{static get CATEGORY(){return f.Stave}static get defaultPadding(){return T.get(`Stave.padding`)+T.get(`Stave.endPaddingMax`)}static get rightPadding(){return T.get(`Stave.endPaddingMax`)}constructor(e,t,n,r){super(),this.x=e,this.y=t,this.width=n,this.formatted=!1,this.startX=e+5,this.endX=e+n,this.modifiers=[],this.measure=0,this.clef=`treble`,this.endClef=void 0,this.options={verticalBarWidth:10,numLines:5,leftBar:!0,rightBar:!0,spacingBetweenLinesPx:I.STAVE_LINE_DISTANCE,spaceAboveStaffLn:4,spaceBelowStaffLn:4,topTextPosition:1,bottomTextPosition:4,lineConfig:[],...r},this.bounds={x:this.x,y:this.y,w:this.width,h:0},this.defaultLedgerLineStyle={strokeStyle:`#444`,lineWidth:2},this.resetLines(),this.addModifier(new U(this.options.leftBar?H.SINGLE:H.NONE)),this.addEndModifier(new U(this.options.rightBar?H.SINGLE:H.NONE))}setDefaultLedgerLineStyle(e){this.defaultLedgerLineStyle=e}getDefaultLedgerLineStyle(){return{...this.getStyle(),...this.defaultLedgerLineStyle}}space(e){return this.options.spacingBetweenLinesPx*e}resetLines(){this.options.lineConfig=[];for(let e=0;e<this.options.numLines;e++)this.options.lineConfig.push({visible:!0});this.height=(this.options.numLines+this.options.spaceAboveStaffLn)*this.options.spacingBetweenLinesPx,this.options.bottomTextPosition=this.options.numLines}setNoteStartX(e){return this.formatted||this.format(),this.startX=e,this}getNoteStartX(){return this.formatted||this.format(),this.startX}getNoteEndX(){return this.formatted||this.format(),this.endX}getTieStartX(){return this.startX}getTieEndX(){return this.endX}getNumLines(){return this.options.numLines}setNumLines(e){return this.options.numLines=e,this.resetLines(),this}getTopLineTopY(){return this.getYForLine(0)}getBottomLineBottomY(){return this.getYForLine(this.getNumLines()-1)+(this.getStyle().lineWidth??1)}setX(e){let t=e-this.x;this.formatted=!1,this.x=e,this.startX+=t,this.endX+=t;for(let e=0;e<this.modifiers.length;e++){let n=this.modifiers[e];n.setX(n.getX()+t)}return this}setWidth(e){return this.formatted=!1,this.width=e,this.endX=this.x+e,this}setMeasure(e){return this.measure=e,this}getMeasure(){return this.measure}getModifierXShift(e=0){if(typeof e!=`number`)throw new p(`InvalidIndex`,`Must be of number type`);if(this.formatted||this.format(),this.getModifiers(B.BEGIN).length===1||this.modifiers[e].getPosition()===B.RIGHT)return 0;let t=this.startX-this.x,n=this.modifiers[0];return n.getType()===H.REPEAT_BEGIN&&t>n.getWidth()&&(t-=n.getWidth()),t}setRepetitionType(e,t=0){return this.modifiers.push(new Et(e,this.x,t)),this}setVoltaType(e,t,n){return this.modifiers.push(new Nt(e,t,this.x,n)),this}setSection(e,t,n=0,r,i=!0){let a=new Dt(e).setYShift(t).setXShift(n).setDrawRect(i);return r&&a.setFontSize(r),this.addModifier(a),this}setTempo(e,t){return this.modifiers.push(new Ot(e,this.x,t)),this}setStaveText(e,t,n={}){return this.modifiers.push(new jt(e,t,n)),this}getSpacingBetweenLines(){return this.options.spacingBetweenLinesPx}getBoundingBox(){return new D(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){let e=this.options,t=e.spacingBetweenLinesPx;return this.getYForLine(e.numLines)+e.spaceBelowStaffLn*t}getBottomLineY(){return this.getYForLine(this.options.numLines)}getYForLine(e){let t=this.options,n=t.spacingBetweenLinesPx,r=t.spaceAboveStaffLn;return this.y+e*n+r*n}getLineForY(e){let t=this.options,n=t.spacingBetweenLinesPx,r=t.spaceAboveStaffLn;return(e-this.y)/n-r}getYForTopText(e=0){return this.getYForLine(-e-this.options.topTextPosition)}getYForBottomText(e=0){return this.getYForLine(this.options.bottomTextPosition+e)}getYForNote(e){let t=this.options,n=t.spacingBetweenLinesPx,r=t.spaceAboveStaffLn;return this.y+r*n+5*n-e*n}getYForGlyphs(){return this.getYForLine(3)}addModifier(e,t){return t!==void 0&&e.setPosition(t),e.setStave(this),this.formatted=!1,this.modifiers.push(e),this}addEndModifier(e){return this.addModifier(e,B.END),this}setBegBarType(e,t=Fe.NONE){let{SINGLE:n,REPEAT_BEGIN:r,NONE:i}=H;return(e===n||e===r||e===i)&&(this.modifiers[0].setType(e).setRepeatBracket(t),this.formatted=!1),this}setEndBarType(e,t=Fe.NONE){return e!==H.REPEAT_BEGIN&&(this.modifiers[1].setType(e).setRepeatBracket(t),this.formatted=!1),this}setClef(e,t,n,r){r===void 0&&(r=B.BEGIN),r===B.END?this.endClef=e:this.clef=e;let i=this.getModifiers(r,q.CATEGORY);return i.length===0?this.addClef(e,t,n,r):i[0].setType(e,t,n),this}getClef(){return this.clef}setEndClef(e,t,n){return this.setClef(e,t,n,B.END),this}getEndClef(){return this.endClef}setKeySignature(e,t,n){n===void 0&&(n=B.BEGIN);let r=this.getModifiers(n,J.CATEGORY);return r.length===0?this.addKeySignature(e,t,n):r[0].setKeySig(e,t),this}setEndKeySignature(e,t){return this.setKeySignature(e,t,B.END),this}setTimeSignature(e,t,n){n===void 0&&(n=B.BEGIN);let r=this.getModifiers(n,Y.CATEGORY);return r.length===0?this.addTimeSignature(e,t,n):r[0].setTimeSig(e),this}setEndTimeSignature(e,t){return this.setTimeSignature(e,t,B.END),this}addKeySignature(e,t,n){return n===void 0&&(n=B.BEGIN),this.addModifier(new J(e,t).setPosition(n),n),this}addClef(e,t,n,r){return r===void 0||r===B.BEGIN?this.clef=e:r===B.END&&(this.endClef=e),this.addModifier(new q(e,t,n),r),this}addEndClef(e,t,n){return this.addClef(e,t,n,B.END),this}addTimeSignature(e,t,n){return this.addModifier(new Y(e,t),n),this}addEndTimeSignature(e,t){return this.addTimeSignature(e,t,B.END),this}addTrebleGlyph(){return this.addClef(`treble`),this}getModifiers(e,t){let n=e===void 0,r=t===void 0;return n&&r?this.modifiers:n?this.modifiers.filter(e=>t===e.getCategory()):r?this.modifiers.filter(t=>e===t.getPosition()):this.modifiers.filter(n=>e===n.getPosition()&&t===n.getCategory())}sortByCategory(e,t){for(let n=e.length-1;n>=0;n--)for(let r=0;r<n;r++)if(t[e[r].getCategory()]>t[e[r+1].getCategory()]){let t=e[r];e[r]=e[r+1],e[r+1]=t}}format(){let e=this.modifiers[0],t=this.modifiers[1],n=this.getModifiers(B.BEGIN),i=this.getModifiers(B.END);this.sortByCategory(n,Ft),this.sortByCategory(i,It),n.length>1&&e.getType()===H.REPEAT_BEGIN&&(n.push(n.splice(0,1)[0]),n.splice(0,0,new U(H.SINGLE))),i.indexOf(t)>0&&i.splice(0,0,new U(H.NONE));let a,o,s,c=0,l=this.x;for(let e=0;e<n.length;e++)s=n[e],o=s.getPadding(e+c),a=s.getWidth(),l+=o,s.setX(l),l+=a,o+a===0&&c--;this.startX=l,l=this.x+this.width;let u={left:0,right:0,paddingRight:0,paddingLeft:0},d=0;for(let e=0;e<i.length;e++){s=i[e],d=r(s)?e:d,u.right=0,u.left=0,u.paddingRight=0,u.paddingLeft=0;let t=s.getLayoutMetrics();t?(e!==0&&(u.right=t.xMax??0,u.paddingRight=t.paddingRight??0),u.left=-(t.xMin??0),u.paddingLeft=t.paddingLeft??0,e===i.length-1&&(u.paddingLeft=0)):(u.paddingRight=s.getPadding(e-d),e!==0&&(u.right=s.getWidth()),e===0&&(u.left=s.getWidth())),l-=u.paddingRight,l-=u.right,s.setX(l),l-=u.left,l-=u.paddingLeft}this.endX=i.length===1?this.x+this.width:l,this.formatted=!0}draw(){let e=this.checkContext();this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`stave`+(t?` `+t:``),this.getAttribute(`id`)),this.formatted||this.format();let n=this.options.numLines,r=this.width,i=this.x,a,o=(this.getStyle().lineWidth??1)%2==0?0:.5;for(let t=0;t<n;t++)a=this.getYForLine(t),this.options.lineConfig[t].visible&&(e.beginPath(),e.moveTo(i,a+o),e.lineTo(i+r,a+o),e.stroke());this.drawPointerRect(),e.closeGroup();for(let t=0;t<this.modifiers.length;t++){let n=this.modifiers[t];n.setContext(e),n.setStave(this),n.drawWithStyle()}if(this.measure>0){e.setFont(this.fontInfo);let t=e.measureText(``+this.measure).width;a=this.getYForTopText(0)+3,e.fillText(``+this.measure,this.x-t/2,a)}}getVerticalBarWidth(){return this.options.verticalBarWidth}getConfigForLines(){return this.options.lineConfig}setConfigForLine(e,t){if(e>=this.options.numLines||e<0)throw new p(`StaveConfigError`,`The line number must be within the range of the number of lines in the Stave.`);if(t.visible===void 0)throw new p(`StaveConfigError`,`The line configuration object is missing the 'visible' property.`);if(typeof t.visible!=`boolean`)throw new p(`StaveConfigError`,`The line configuration objects 'visible' property must be true or false.`);return this.options.lineConfig[e]=t,this}setConfigForLines(e){if(e.length!==this.options.numLines)throw new p(`StaveConfigError`,`The length of the lines configuration array must match the number of lines in the Stave`);for(let t in e)e[t].visible===void 0&&(e[t]=this.options.lineConfig[t]),this.options.lineConfig[t]={...this.options.lineConfig[t],...e[t]};return this.options.lineConfig=e,this}static formatBegModifiers(e){let t=t=>{let n=0;e.forEach(e=>{let r=e.getModifiers(B.BEGIN,t);r.length>0&&r[0].getX()>n&&(n=r[0].getX())});let r=0;e.forEach(e=>{r=0,e.getModifiers(B.BEGIN,t).forEach(e=>{n-e.getX()>r&&(r=n-e.getX())});let i=e.getModifiers(B.BEGIN),a=!1;i.forEach(e=>{e.getCategory()===t&&(a=!0),a&&r>0&&e.setX(e.getX()+r)}),e.setNoteStartX(e.getNoteStartX()+r)})};e.forEach(e=>{e.formatted||e.format()}),t(f.Clef),t(f.KeySignature),t(f.TimeSignature);let n=0;e.forEach(e=>{e.getNoteStartX()>n&&(n=e.getNoteStartX())}),e.forEach(e=>{e.setNoteStartX(n)}),n=0,e.forEach(e=>{e.getModifiers(B.BEGIN,f.Barline).forEach(e=>{e.getType()===H.REPEAT_BEGIN&&e.getX()>n&&(n=e.getX())})}),e.forEach(e=>{e.getModifiers(B.BEGIN,f.Barline).forEach(e=>{e.getType()===H.REPEAT_BEGIN&&e.setX(n)})})}};function Lt(e,t,n,r,i){if(t!==Z.type.BOLD_DOUBLE_LEFT&&t!==Z.type.BOLD_DOUBLE_RIGHT)throw new p(`InvalidConnector`,`A REPEAT_BEGIN or REPEAT_END type must be provided.`);let a=3,o=3.5;t===Z.type.BOLD_DOUBLE_RIGHT&&(a=-5,o=3),e.fillRect(n+a,r,1,i-r),e.fillRect(n-2,r,o,i-r)}var Z=class e extends A{static get CATEGORY(){return f.StaveConnector}static{this.type={SINGLE_RIGHT:0,SINGLE_LEFT:1,SINGLE:1,DOUBLE:2,BRACE:3,BRACKET:4,BOLD_DOUBLE_LEFT:5,BOLD_DOUBLE_RIGHT:6,THIN_DOUBLE:7,NONE:8}}static{this.typeString={singleRight:e.type.SINGLE_RIGHT,singleLeft:e.type.SINGLE_LEFT,single:e.type.SINGLE,double:e.type.DOUBLE,brace:e.type.BRACE,bracket:e.type.BRACKET,boldDoubleLeft:e.type.BOLD_DOUBLE_LEFT,boldDoubleRight:e.type.BOLD_DOUBLE_RIGHT,thinDouble:e.type.THIN_DOUBLE,none:e.type.NONE}}constructor(t,n){super(),this.thickness=I.STAVE_LINE_THICKNESS,this.topStave=t,this.bottomStave=n,this.type=e.type.DOUBLE,this.xShift=0,this.texts=[]}setType(t){let n=typeof t==`string`?e.typeString[t]:t;return Object.values(e.type).includes(n)&&(this.type=n),this}getType(){return this.type}setText(e,t={}){let n=new A(`StaveConnector.text`);return n.setText(e),n.setXShift(t.shiftX??0),n.setYShift(t.shiftY??0),this.texts.push(n),this}draw(){let t=this.checkContext();this.setRendered();let n=this.topStave.getYForLine(0),r=this.bottomStave.getYForLine(this.bottomStave.getNumLines()-1)+this.thickness,i=3,a=this.topStave.getX();(this.type===e.type.SINGLE_RIGHT||this.type===e.type.BOLD_DOUBLE_RIGHT||this.type===e.type.THIN_DOUBLE)&&(a=this.topStave.getX()+this.topStave.getWidth());let o=r-n,s=new A;switch(this.type){case e.type.SINGLE:i=1;break;case e.type.SINGLE_LEFT:i=1;break;case e.type.SINGLE_RIGHT:i=1;break;case e.type.DOUBLE:a-=5,n-=this.thickness,o+=.5;break;case e.type.BRACE:{i=12;let e=this.topStave.getX()-2+this.xShift,a=n,s=e,c=r,l=e-i,u=a+o/2,d=l-.9*i,f=a+.2*o,p=e+1.1*i,m=u-.135*o,h=p,g=u+.135*o,_=d,v=c-.2*o,y=l-i,b=v,x=e+.4*i,S=u+.135*o,C=x,w=u-.135*o,T=y,E=f;t.beginPath(),t.moveTo(e,a),t.bezierCurveTo(d,f,p,m,l,u),t.bezierCurveTo(h,g,_,v,s,c),t.bezierCurveTo(y,b,x,S,l,u),t.bezierCurveTo(C,w,T,E,e,a),t.fill(),t.stroke();break}case e.type.BRACKET:n-=6,r+=6,o=r-n,s.setText(P.bracketTop),s.renderText(t,a-5,n),s.setText(P.bracketBottom),s.renderText(t,a-5,r),a-=5;break;case e.type.BOLD_DOUBLE_LEFT:Lt(t,this.type,a+this.xShift,n,r-this.thickness);break;case e.type.BOLD_DOUBLE_RIGHT:Lt(t,this.type,a,n,r-this.thickness);break;case e.type.THIN_DOUBLE:i=1,o-=this.thickness;break;case e.type.NONE:break;default:throw new p(`InvalidType`,`The provided StaveConnector.type (${this.type}) is invalid.`)}this.type!==e.type.BRACE&&this.type!==e.type.BOLD_DOUBLE_LEFT&&this.type!==e.type.BOLD_DOUBLE_RIGHT&&this.type!==e.type.NONE&&t.fillRect(a,n,i,o),this.type===e.type.THIN_DOUBLE&&t.fillRect(a-3,n,i,o);for(let e=0;e<this.texts.length;e++){let n=this.texts[e],r=this.topStave.getX()-n.getWidth()-24,i=(this.topStave.getYForLine(0)+this.bottomStave.getBottomLineY())/2;n.renderText(t,r,i+4)}}},Rt=class{static getNextContext(e){let t=e.tContexts,n=t.indexOf(e);if(n+1<t.length)return t[n+1]}constructor(e){this.preFormatted=!1,this.postFormatted=!1,this.tickID=e?.tickID??0,this.currentTick=new C(0,1),this.maxTicks=new C(0,1),this.maxTickable=void 0,this.minTicks=void 0,this.minTickable=void 0,this.padding=1,this.x=0,this.xBase=0,this.xOffset=0,this.tickables=[],this.tickablesByVoice={},this.notePx=0,this.glyphPx=0,this.leftDisplacedHeadPx=0,this.rightDisplacedHeadPx=0,this.modLeftPx=0,this.modRightPx=0,this.totalLeftPx=0,this.totalRightPx=0,this.tContexts=[],this.width=0,this.formatterMetrics={freedom:{left:0,right:0}}}getTickID(){return this.tickID}getX(){return this.x}setX(e){return this.x=e,this.xBase=e,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(e){this.xBase=e,this.x=e+this.xOffset}getXOffset(){return this.xOffset}setXOffset(e){this.xOffset=e,this.x=this.xBase+e}getWidth(){return this.width+this.padding*2}setPadding(e){return this.padding=e,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getMaxTickable(){return this.maxTickable}getMinTickable(){return this.minTickable}getTickables(){return this.tickables}getTickableForVoice(e){return this.tickablesByVoice[e]}getTickablesByVoice(){return this.tickablesByVoice}getCenterAlignedTickables(){return this.tickables.filter(e=>e.isCenterAligned())}getMetrics(){let{width:e,glyphPx:t,notePx:n,leftDisplacedHeadPx:r,rightDisplacedHeadPx:i,modLeftPx:a,modRightPx:o,totalLeftPx:s,totalRightPx:c}=this;return{width:e,glyphPx:t,notePx:n,leftDisplacedHeadPx:r,rightDisplacedHeadPx:i,modLeftPx:a,modRightPx:o,totalLeftPx:s,totalRightPx:c}}getCurrentTick(){return this.currentTick}setCurrentTick(e){this.currentTick=e,this.preFormatted=!1}addTickable(e,t){if(!e)throw new p(`BadArgument`,`Invalid tickable added.`);if(!e.shouldIgnoreTicks()){let t=e.getTicks();t.greaterThan(this.maxTicks)&&(this.maxTicks=t.clone(),this.maxTickable=e),(this.minTicks===void 0||t.lessThan(this.minTicks))&&(this.minTicks=t.clone(),this.minTickable=e)}return e.setTickContext(this),this.tickables.push(e),this.tickablesByVoice[t??0]=e,this.preFormatted=!1,this}preFormat(){if(this.preFormatted)return this;for(let e=0;e<this.tickables.length;++e){let t=this.tickables[e];t.preFormat();let n=t.getMetrics();this.leftDisplacedHeadPx=Math.max(this.leftDisplacedHeadPx,n.leftDisplacedHeadPx),this.rightDisplacedHeadPx=Math.max(this.rightDisplacedHeadPx,n.rightDisplacedHeadPx),this.notePx=Math.max(this.notePx,n.notePx),this.glyphPx=Math.max(this.glyphPx,n.glyphWidth??0),this.modLeftPx=Math.max(this.modLeftPx,n.modLeftPx),this.modRightPx=Math.max(this.modRightPx,n.modRightPx),this.totalLeftPx=Math.max(this.totalLeftPx,n.modLeftPx+n.leftDisplacedHeadPx),this.totalRightPx=Math.max(this.totalRightPx,n.modRightPx+n.rightDisplacedHeadPx),this.width=this.notePx+this.totalLeftPx+this.totalRightPx}return this}postFormat(){return this.postFormatted||=!0,this}getFormatterMetrics(){return this.formatterMetrics}move(e,t,n){this.setX(this.getX()+e),this.getFormatterMetrics().freedom.left+=e,this.getFormatterMetrics().freedom.right-=e,t&&(t.getFormatterMetrics().freedom.right+=e),n&&(n.getFormatterMetrics().freedom.left-=e)}getDeviationCost(){return S(this.tickables.map(e=>e.getFormatterMetrics().space.deviation))}getAverageDeviationCost(){return this.tickables.length?this.getDeviationCost()/this.tickables.length:0}};function zt(...e){Q.DEBUG&&g(`VexFlow.Formatter`,e)}function Bt(e,t,n,r){let i=t;for(let t=n+1;t<e.length;t++){let n=e[t];if(s(n)&&!n.isRest()&&!n.shouldIgnoreTicks()){i=n.getLineForRest();break}}return r&&t!==i&&(i=y(Math.max(t,i),Math.min(t,i))),i}var Q=class e{static{this.DEBUG=!1}static SimpleFormat(e,t=0,{paddingBetween:n=10}={}){e.reduce((e,t)=>{t.addToModifierContext(new wt);let r=new Rt().addTickable(t).preFormat(),i=r.getMetrics();return r.setX(e+i.totalLeftPx),e+r.getWidth()+i.totalRightPx+n},t)}static plotDebugging(e,t,n,r,i,a){a={stavePadding:T.get(`Stave.padding`),...a};let o=n+a.stavePadding,s=t.contextGaps;function c(t,n,a){e.beginPath(),e.setStrokeStyle(a),e.setFillStyle(a),e.setLineWidth(1),e.fillRect(t,r,Math.max(n-t,0),i-r)}e.save(),e.setFont(T.get(`fontFamily`),8),s.gaps.forEach(t=>{c(o+t.x1,o+t.x2,`rgba(100,200,100,0.4)`),e.setFillStyle(`green`),e.fillText(Math.round(t.x2-t.x1).toString(),o+t.x1,i+12)}),e.setFillStyle(`red`),e.fillText(`Loss: ${(t.totalCost??0).toFixed(2)} Shift: ${(t.totalShift??0).toFixed(2)} Gap: ${s.total.toFixed(2)}`,o-20,i+27),e.restore()}static FormatAndDraw(t,n,r,i){let a={autoBeam:!1,alignRests:!1};typeof i==`object`?a={...a,...i}:typeof i==`boolean`&&(a.autoBeam=i);let o=new G(I.TIME4_4).setMode(G.Mode.SOFT).addTickables(r),s=a.autoBeam?Gt.applyAndGetBeams(o):[];return new e().joinVoices([o]).formatToStave([o],n,{alignRests:a.alignRests,stave:n}),o.setContext(t).setStave(n).drawWithStyle(),s.forEach(e=>e.setContext(t).drawWithStyle()),o.getBoundingBox()}static FormatAndDrawTab(t,n,r,i,a,o,s){let c={autoBeam:o,alignRests:!1};typeof s==`object`?c={...c,...s}:typeof s==`boolean`&&(c.autoBeam=s);let l=new G(I.TIME4_4).setMode(G.Mode.SOFT).addTickables(a),u=new G(I.TIME4_4).setMode(G.Mode.SOFT).addTickables(i),d=c.autoBeam?Gt.applyAndGetBeams(l):[];new e().joinVoices([l]).joinVoices([u]).formatToStave([l,u],r,{alignRests:c.alignRests}),l.draw(t,r),u.draw(t,n),d.forEach(e=>e.setContext(t).drawWithStyle()),new Z(r,n).setContext(t).drawWithStyle()}static AlignRestsToNotes(e,t,n=!1){e.forEach((r,i)=>{if(l(r)&&r.isRest()){if(r.getTuplet()&&!n||r.getLineForRest()!==3)return;if(t||r.getBeam()){let t=r.getKeyProps()[0];if(i===0)t.line=Bt(e,t.line,i,!1);else if(i>0&&i<e.length){let n=e[i-1];l(n)&&(t.line=n.isRest()?n.getKeyProps()[0].line:Bt(e,n.getLineForRest(),i,!0))}r.setKeyLine(0,t.line)}}})}constructor(e){this.formatterOptions={globalSoftmax:!1,softmaxFactor:I.SOFTMAX_FACTOR,maxIterations:5,...e},this.justifyWidth=0,this.totalCost=0,this.totalShift=0,this.durationStats={},this.minTotalWidth=0,this.hasMinTotalWidth=!1,this.tickContexts={map:{},array:[],list:[],resolutionMultiplier:0},this.modifierContexts=[],this.contextGaps={total:0,gaps:[]},this.voices=[],this.lossHistory=[]}alignRests(t,n){if(!t||!t.length)throw new p(`BadArgument`,`No voices to format rests`);t.forEach(t=>e.AlignRestsToNotes(t.getTickables(),n))}preCalculateMinTotalWidth(e){let t=T.get(`Stave.unalignedNotePadding`),n=0,r=0,i=0,a=[],o=[];if(this.hasMinTotalWidth)return this.minTotalWidth;if(!e)throw new p(`BadArgument`,`'voices' required to run preCalculateMinTotalWidth`);this.createTickContexts(e);let{list:s,map:c}=this.tickContexts;this.minTotalWidth=0,s.forEach(t=>{let s=c[t];s.preFormat(),s.getTickables().length<e.length&&(n+=1),s.getTickables().forEach(e=>{r+=e.getMetrics().width,i+=e.getTicks().value(),a.push(e.getMetrics().width),o.push(e.getTicks().value())});let l=s.getWidth();this.minTotalWidth+=l}),this.hasMinTotalWidth=!0;let l=r>0?r/a.length:1/a.length,u=(S(a.map(e=>(e-l)**2))/a.length)**.5/l,d=i/o.length,f=(S(o.map(e=>(e-d)**2))/o.length)**.5/d,m=Math.max(f,u)*s.length*t,h=t*n;return this.minTotalWidth+Math.max(h,m)}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new p(`NoMinTotalWidth`,`Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'`);return this.minTotalWidth}static getResolutionMultiplier(e){if(!e||!e.length)throw new p(`BadArgument`,`No voices to format`);let t=e[0].getTotalTicks();return e.reduce((e,n)=>{if(!n.getTotalTicks().equals(t))throw new p(`TickMismatch`,`Voices should have same total note duration in ticks.`);if(n.getMode()===G.Mode.STRICT&&!n.isComplete())throw new p(`IncompleteVoice`,`Voice does not have enough notes.`);return Math.max(e,C.LCM(e,n.getResolutionMultiplier()))},1)}createModifierContexts(t){if(t.length===0)return;let n=e.getResolutionMultiplier(t),r=new Map,i=[];t.forEach(e=>{let t=new C(0,n);e.getTickables().forEach(e=>{let n=t.numerator,a=r.get(e.getStave());if(a||=(r.set(e.getStave(),{}),r.get(e.getStave())),!(a&&a[n])){let e=new wt;i.push(e),a[n]=e}e.addToModifierContext(a[n]),t.add(e.getTicks())})}),this.modifierContexts.push({map:r,array:i,resolutionMultiplier:n})}createTickContexts(t){if(t.length===0)return{map:{},array:[],list:[],resolutionMultiplier:0};let n={},r=[],i=[],a=e.getResolutionMultiplier(t);t.forEach((e,t)=>{let o=new C(0,a);e.getTickables().forEach(e=>{let a=o.numerator;if(!n[a]){let e=new Rt({tickID:a});i.push(e),n[a]=e,r.push(a)}n[a].addTickable(e,t),o.add(e.getTicks())})});let o={map:n,array:i,list:r.sort((e,t)=>e-t),resolutionMultiplier:a};this.tickContexts=o;let s=this.tickContexts.array;return s.forEach(e=>{e.tContexts=s}),o}getTickContexts(){return this.tickContexts}preFormat(e=0,t,n,r){let i=this.tickContexts;if(!i)throw new p(`NoTickContexts`,`preFormat requires TickContexts`);let{list:a,map:o}=i;this.lossHistory=[],n&&r&&n.forEach(e=>e.setStave(r).preFormat());let s=0,c=0;this.minTotalWidth=0;let l=0;a.forEach(e=>{let t=o[e];t.preFormat();let n=t.getWidth();this.minTotalWidth+=n;let r=t.getMaxTicks().value();l+=r;let i=t.getMetrics();s=s+c+i.totalLeftPx,t.setX(s),c=n-i.totalLeftPx});let{globalSoftmax:u,softmaxFactor:d,maxIterations:f}=this.formatterOptions,m=S(a.map(e=>d**(o[e].getMaxTicks().value()/l)));if(this.minTotalWidth=s+c,this.hasMinTotalWidth=!0,e<=0)return this.evaluate();let g=o[a[0]],_=o[a[a.length-1]];function v(e){return a.map((t,n)=>{let r=o[t],i=r.getTickablesByVoice(),s;if(n>0){let t=o[a[n-1]];for(let c=n-1;c>=0;c--){let n=o[a[c]].getTickablesByVoice(),f=[];if(Object.keys(i).forEach(e=>{n[e]&&f.push(e)}),f.length>0){let a=0,o=1/0,c=0;return f.forEach(e=>{let t=n[e].getTicks().value();t>a&&(s=n[e],a=t);let r=i[e],c=r.getX()-(r.getMetrics().modLeftPx+r.getMetrics().leftDisplacedHeadPx),l=n[e].getMetrics(),u=n[e].getX()+l.notePx+l.modRightPx+l.rightDisplacedHeadPx;o=Math.min(o,c-u)}),o=Math.min(o,r.getX()-(t.getX()+e*.05)),u?c=d**(a/l)/m*e:s!==void 0&&(c=s.getVoice().softmax(a)*e),{expectedDistance:c,maxNegativeShiftPx:o,fromTickable:s}}}}return{expectedDistance:0,fromTickablePx:0,maxNegativeShiftPx:0}})}function y(e){let t=b/2,n=0;return a.forEach((r,i)=>{let a=o[r];if(i>0){let t=a.getX(),r=e[i],o=h(r.fromTickable).getX()+r.expectedDistance-(t+n),s=0;o>0?n+=o:o<0&&(s=Math.min(r.maxNegativeShiftPx,Math.abs(o)),n+=-s),a.setX(t+n)}a.getCenterAlignedTickables().forEach(e=>{e.setCenterXShift(t-a.getX())})}),_.getX()-g.getX()}let b=e-_.getMetrics().notePx-_.getMetrics().totalRightPx-g.getMetrics().totalLeftPx,x=T.get(`Stave.endPaddingMin`),C=T.get(`Stave.endPaddingMax`),w=T.get(`Stave.padding`),E=b,D=v(E),O=y(D);if(a.length===1)return 0;let ee=((e,t)=>{let n=e/2;if(t.length>1)for(let e=1;e<t.length;++e)n=Math.min(t[e].expectedDistance/2,n);return n})(E,D),te=e=>{let t=0,n=_&&_.getMaxTickable();if(n){let r=n.getVoice();if(r.getTicksUsed().value()>r.getTotalTicks().value())return C*2<ee?ee:C;let i=n.getWidth();t=r.softmax(_.getMaxTicks().value())*e-(i+w)}return C*2<t?t:C},k=te(E),ne=k-(C-x),re=b-ne,A=f;for(;O>re&&A>0||O+k<re&&A>1;)E-=O-re,k=te(E),ne=k-(C-x),O=y(v(E)),A--;return this.justifyWidth=e,this.evaluate()}evaluate(){let e=this.tickContexts,t=this.justifyWidth;this.contextGaps={total:0,gaps:[]},e.list.forEach((t,n)=>{if(n===0)return;let r=e.list[n-1],i=e.map[r],a=e.map[t],o=i.getMetrics(),s=a.getMetrics(),c=i.getX()+o.notePx+o.totalRightPx,l=a.getX()-s.totalLeftPx,u=l-c;this.contextGaps.total+=u,this.contextGaps.gaps.push({x1:c,x2:l}),a.getFormatterMetrics().freedom.left=u,i.getFormatterMetrics().freedom.right=u}),this.durationStats={};let n=this.durationStats;function r(e,t){let r=n[e];r===void 0?n[e]={mean:t,count:1,total:t}:(r.count+=1,r.total+=t,r.mean=r.total/r.count)}this.voices.forEach(e=>{e.getTickables().forEach((e,n,i)=>{let a=e.getTicks().clone().simplify().toString(),o=e.getMetrics(),s=e.getFormatterMetrics(),c=e.getX()+o.notePx+o.modRightPx+o.rightDisplacedHeadPx,l=0;if(n<i.length-1){let t=i[n+1],r=t.getMetrics();l=t.getX()-r.modLeftPx-r.leftDisplacedHeadPx-c,s.space.used=t.getX()-e.getX(),t.getFormatterMetrics().freedom.left=l}else l=t-c,s.space.used=t-e.getX();s.freedom.right=l,r(a,s.space.used)})});let i=0;return this.voices.forEach(e=>{e.getTickables().forEach(e=>{let t=e.getTicks().clone().simplify().toString(),r=e.getFormatterMetrics();r.space.mean=n[t].mean,r.duration=t,r.iterations+=1,r.space.deviation=r.space.used-r.space.mean,i+=r.space.deviation**2})}),this.totalCost=Math.sqrt(i),this.lossHistory.push(this.totalCost),this.totalCost}tune(e){let t=this.tickContexts;if(!t)return 0;let n=e?.alpha??.5,r=0;return this.totalShift=0,t.list.forEach((e,i,a)=>{let o=t.map[e],s=i>0?t.map[a[i-1]]:void 0,c=i<a.length-1?t.map[a[i+1]]:void 0;o.move(r,s,c);let l=-o.getDeviationCost();l>0?r=-Math.min(o.getFormatterMetrics().freedom.right,Math.abs(l)):l<0&&(r=c?Math.min(c.getFormatterMetrics().freedom.right,Math.abs(l)):0),r*=n,this.totalShift+=r}),this.evaluate()}postFormat(){return this.modifierContexts.forEach(e=>{e.array.forEach(e=>e.postFormat())}),this.tickContexts.list.forEach(e=>{this.tickContexts.map[e].postFormat()}),this}joinVoices(e){return this.createModifierContexts(e),this.hasMinTotalWidth=!1,this}format(e,t,n){let r={alignRests:!1,...n};this.voices=e;let i=this.formatterOptions.softmaxFactor;return i&&this.voices.forEach(e=>e.setSoftmaxFactor(i)),this.alignRests(e,r.alignRests),this.createTickContexts(e),this.preFormat(t,r.context,e,r.stave),r.stave&&this.postFormat(),this}formatToStave(e,t,n){let r={context:t.getContext(),...n},i=t.getNoteEndX()-t.getNoteStartX()-X.defaultPadding;return zt(`Formatting voices to width: `,i),this.format(e,i,r)}getTickContext(e){return this.tickContexts?.map[e]}},Vt=function(e){return e[e.BOTTOM=-1]=`BOTTOM`,e[e.TOP=1]=`TOP`,e}({}),Ht=class e extends A{static get CATEGORY(){return f.Tuplet}static get LOCATION_TOP(){return 1}static get LOCATION_BOTTOM(){return-1}static get NESTING_OFFSET(){return 15}constructor(t,n={}){if(super(),!t||!t.length)throw new p(`BadArguments`,`No notes provided for tuplet.`);this.notes=t;let r=n.numNotes===void 0?t.length:n.numNotes,i=n.notesOccupied||2,a=n.bracketed===void 0?t.some(e=>!e.hasBeam()):n.bracketed,o=n.ratioed===void 0?Math.abs(i-r)>1:n.ratioed,s=n.location||e.LOCATION_TOP,c=n.yOffset||T.get(`Tuplet.yOffset`),l=n.textYOffset||T.get(`Tuplet.textYOffset`),u=n.suffix||``;this.options={bracketed:a,location:s,notesOccupied:i,numNotes:r,ratioed:o,yOffset:c,textYOffset:l,suffix:u},this.textElement=new A(`Tuplet`),this.suffixElement=new A(`Tuplet.suffix`),this.setTupletLocation(s||e.LOCATION_TOP),Q.AlignRestsToNotes(t,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let e=0;e<this.notes.length;e++){let t=this.notes[e];t.getTupletStack().includes(this)||t.addTuplet(this)}}detach(){for(let e=0;e<this.notes.length;e++)this.notes[e].removeTuplet(this)}setBracketed(e){return this.options.bracketed=e,this}setRatioed(e){return this.options.ratioed=e,this}setTupletLocation(t){return t!==e.LOCATION_TOP&&t!==e.LOCATION_BOTTOM&&(console.warn(`Invalid tuplet location [${t}]. Using Tuplet.LOCATION_TOP.`),t=e.LOCATION_TOP),this.options.location=t,this}getNotes(){return this.notes}getNoteCount(){return this.options.numNotes}getNotesOccupied(){return this.options.notesOccupied}setNotesOccupied(e){this.detach(),this.options.notesOccupied=e,this.resolveGlyphs(),this.attach()}resolveGlyphs(){let e=``,t=``,n=this.options.numNotes;for(;n>=1;)e=String.fromCharCode(59520+n%10)+e,n=Math.floor(n/10);if(this.options.ratioed){for(n=this.options.notesOccupied;n>=1;)t=String.fromCharCode(59520+n%10)+t,n=Math.floor(n/10);t=P.tupletColon+t}this.textElement.setText(e+t),this.options.suffix&&this.suffixElement.setText(this.options.suffix)}getNestedTupletCount(){let{location:e}=this.options,t=0;for(let n of this.notes){let r=n.getTupletStack().filter(t=>t.options.location===e).indexOf(this);r>=0&&r>t&&(t=r)}return t}getYPosition(){let t=this.getNestedTupletCount()*e.NESTING_OFFSET*-this.options.location,n=this.options.yOffset??0,r=this.notes[0],i;if(this.options.location===e.LOCATION_TOP){i=r.checkStave().getYForLine(0)-1.5*I.STAVE_LINE_DISTANCE;for(let e=0;e<this.notes.length;++e){let t=this.notes[e],n=0,r=t.getModifierContext();r&&(n=Math.max(n,r.getState().topTextLine));let a=t.getYForTopText(n)-2*I.STAVE_LINE_DISTANCE;if(t.hasStem()||t.isRest()){let e=t.getStemDirection()===L.UP?t.getStemExtents().topY-I.STAVE_LINE_DISTANCE:t.getStemExtents().baseY-2*I.STAVE_LINE_DISTANCE;i=Math.min(e,i),n>0&&(i=Math.min(a,i))}}}else{let e=4;this.notes.forEach(t=>{let n=t.getModifierContext();n&&(e=Math.max(e,n.getState().textLine+1))}),i=r.checkStave().getYForLine(e)+2*I.STAVE_LINE_DISTANCE;for(let e=0;e<this.notes.length;++e)if(this.notes[e].hasStem()||this.notes[e].isRest()){let t=this.notes[e].getStemDirection()===L.UP?this.notes[e].getStemExtents().baseY+2*I.STAVE_LINE_DISTANCE:this.notes[e].getStemExtents().topY+I.STAVE_LINE_DISTANCE;t>i&&(i=t)}}return i+t+n}draw(){let{location:t,bracketed:n,textYOffset:r,suffix:i}=this.options,a=T.get(`Tuplet.bracket.padding`),o=T.get(`Tuplet.bracket.lineWidth`),s=T.get(`Tuplet.bracket.legLength`),c=T.get(`Tuplet.suffix.extraSpacing`),l=T.get(`Tuplet.suffix.suffixOffsetY`),u=this.checkContext(),d=0,f=0,p=this.notes[0],m=this.notes[this.notes.length-1],h=0;n?(d=p.getTieLeftX()-a,h=m.getTieRightX()-d+a,this.setWidth(h+o)):(d=p.getStemX(),h=m.getStemX()-d,this.setWidth(h)),this.setX(d),f=this.getYPosition(),this.setY(t===1?f:f-s+o),this.height=s;let g=this.textElement.getWidth(),_=g,v=0;i&&(v=this.suffixElement.getWidth(),_=g+c+v);let y=d+h/2-_/2,b=f+this.textElement.getHeight()/2+(t===e.LOCATION_TOP?-1:1)*r,x=this.getAttribute(`class`);if(u.openGroup(`tuplet`+(x?` `+x:``),this.getAttribute(`id`)),n){let n=h/2-_/2-a,r=t===e.LOCATION_BOTTOM;n>0&&(u.fillRect(d,f,n,o),u.fillRect(d+h/2+_/2+a,f,n,o),u.fillRect(d,f+ +!!r,o,t*s),u.fillRect(d+h,f+ +!!r,o,t*s))}let S=y;if(this.textElement.renderText(u,S,b),this.textElement.setX(S),this.textElement.setY(b),S+=g+c,i){let e=b+l;this.suffixElement.renderText(u,S,e),this.suffixElement.setX(S),this.suffixElement.setY(e),S+=v}this.drawPointerRect(),u.closeGroup(),this.setRendered()}getBoundingBox(){let{bracketed:e,suffix:t}=this.options,n=this.textElement.getBoundingBox(),r=this.suffixElement.getBoundingBox(),i=t?n.mergeWith(r):n;return e?new D(this.x,this.y,this.width,this.height).mergeWith(i):i}};function Ut(e){let t=0;return e.forEach(e=>{e.keyProps&&e.keyProps.forEach(e=>{t+=e.line-3})}),t>=0?L.DOWN:L.UP}function Wt(e,t){let n=e.getStemExtents().topY,r=e.getStemX(),i=t.getStemExtents().topY,a=t.getStemX();return(i-n)/(a-r)}var Gt=class e extends A{static get CATEGORY(){return f.Beam}getStemDirection(){return this._stemDirection}static getDefaultBeamGroups(e){(!e||e===`c`)&&(e=`4/4`);let t={"1/2":[`1/2`],"2/2":[`1/2`],"3/2":[`1/2`],"4/2":[`1/2`],"1/4":[`1/4`],"2/4":[`1/4`],"3/4":[`1/4`],"4/4":[`1/4`],"1/8":[`1/8`],"2/8":[`2/8`],"3/8":[`3/8`],"4/8":[`2/8`],"1/16":[`1/16`],"2/16":[`2/16`],"3/16":[`3/16`],"4/16":[`2/16`]}[e];if(t===void 0){let t=parseInt(e.split(`/`)[0],10),n=parseInt(e.split(`/`)[1],10);if(t%3==0)return[new C(3,n)];if(n>4)return[new C(2,n)];if(n<=4)return[new C(1,n)]}else return t.map(e=>new C().parse(e));return[new C(1,4)]}static applyAndGetBeams(t,n,r){return e.generateBeams(t.getTickables(),{groups:r,stemDirection:n})}static generateBeams(t,n={}){(!n.groups||!n.groups.length)&&(n.groups=[new C(2,8)]);let r=n.groups.map(e=>{if(!e.multiply)throw new p(`InvalidBeamGroups`,`The beam groups must be an array of VexFlow.Fractions`);return e.clone().multiply(I.RESOLUTION,1)}),i=t,a=0,o=[],s=[];function c(e){return e.reduce((e,t)=>t.getTicks().clone().add(e),new C(0,1))}function l(){r.length-1>a?a+=1:a=0}function u(){let e=[],t=new C(0,1);i.forEach(n=>{if(e=[],n.shouldIgnoreTicks()){o.push(s),s=e;return}s.push(n);let i=r[a].clone(),u=c(s).add(t),d=I.durationToNumber(n.getDuration())<8;if(d&&n.getTuplet()&&(i.numerator*=2),u.greaterThan(i)){if(!d){let t=s.pop();t&&e.push(t)}o.push(s);do t=u.subtract(r[a]),l();while(t.greaterThanEquals(r[a]));s=e}else u.equals(i)&&(o.push(s),t=new C(0,1),s=e,l())}),s.length>0&&o.push(s)}function d(){return o.filter(e=>{if(e.length>1){let t=!0;return e.forEach(e=>{e.getIntrinsicTicks()>=I.durationToTicks(`4`)&&(t=!1)}),t}return!1})}function f(){let e=[];o.forEach(t=>{let r=[];t.forEach((t,i,a)=>{let o=i===0||i===a.length-1,s=a[i-1],c=!n.beamRests&&t.isRest(),l=n.beamRests&&n.beamMiddleOnly&&t.isRest()&&o,u=!1;if(n.maintainStemDirections&&s&&!t.isRest()&&!s.isRest()){let e=s.getStemDirection();u=t.getStemDirection()!==e}let d=parseInt(t.getDuration(),10)<8;c||l||u||d?(r.length>0&&e.push(r),r=u?[t]:[]):r.push(t)}),r.length>0&&e.push(r)}),o=e}function m(){o.forEach(e=>{let t;if(n.maintainStemDirections){let n=h(e);t=n?n.getStemDirection():L.UP}else t=n.stemDirection?n.stemDirection:Ut(e);g(e,t)})}function h(e){for(let t=0;t<e.length;t++){let n=e[t];if(!n.isRest())return n}return!1}function g(e,t){e.forEach(e=>{e.setStemDirection(t)})}function _(){let e=[];return o.forEach(t=>{let n;t.forEach(t=>{let r=t.getTuplet();r&&n!==r&&(n=r,e.push(n))})}),e}u(),f(),m();let v=d(),y=_(),b=[];return v.forEach(t=>{let r=new e(t);n.showStemlets&&(r.renderOptions.showStemlets=!0),n.secondaryBreaks&&(r.renderOptions.secondaryBreakTicks=I.durationToTicks(n.secondaryBreaks)),n.flatBeams===!0&&(r.renderOptions.flatBeams=!0,r.renderOptions.flatBeamOffset=n.flatBeamOffset),b.push(r)}),y.forEach(e=>{let t=e.notes[0].stemDirection===L.DOWN?Vt.BOTTOM:Vt.TOP;e.setTupletLocation(t);let n=!1;for(let t=0;t<e.notes.length;t++)if(!e.notes[t].hasBeam()){n=!0;break}e.setBracketed(n)}),b}constructor(e,t=!1){if(super(),this.slope=0,this.yShift=0,this.forcedPartialDirections={},!e||e.length===0)throw new p(`BadArguments`,`No notes provided for beam.`);if(e.length===1)throw new p(`BadArguments`,`Too few notes for beam.`);if(this._ticks=e[0].getIntrinsicTicks(),this._ticks>=I.durationToTicks(`4`))throw new p(`BadArguments`,`Beams can only be applied to notes shorter than a quarter note.`);let n,r;this._stemDirection=e[0].getStemDirection();let i=this._stemDirection;for(t&&l(e[0])?i=Ut(e):t&&d(e[0])&&(i=e.reduce((e,t)=>e+t.getStemDirection(),0)>-1?L.UP:L.DOWN),n=0;n<e.length;++n)r=e[n],t&&(r.setStemDirection(i),this._stemDirection=i),r.setBeam(this);this.postFormatted=!1,this.notes=e,this._beamCount=this.getBeamCount(),this.breakOnIndexes=[],this.renderOptions={beamWidth:5,maxSlope:.25,minSlope:-.25,slopeIterations:20,slopeCost:100,showStemlets:!1,stemletExtension:7,partialBeamLength:10,flatBeams:!1,minFlatBeamOffset:15}}getNotes(){return this.notes}getBeamCount(){return this.notes.map(e=>e.getGlyphProps().beamCount).reduce((e,t)=>t>e?t:e)}breakSecondaryAt(e){return this.breakOnIndexes=e,this}setPartialBeamSideAt(e,t){return this.forcedPartialDirections[e]=t,this}unsetPartialBeamSideAt(e){return delete this.forcedPartialDirections[e],this}getSlopeY(e,t,n,r){return n+(e-t)*r}calculateSlope(){let{notes:e,renderOptions:{maxSlope:t,minSlope:n,slopeIterations:r,slopeCost:i}}=this,a=this._stemDirection,o=e[0],s=Wt(o,e[e.length-1]),c=(t-n)/r,l=Number.MAX_VALUE,u=0,d=0;for(let r=n;r<=t;r+=c){let t=0,n=0;for(let i=1;i<e.length;++i){let s=e[i];if(s.hasStem()||s.isRest()){let e=this.getSlopeY(s.getStemX(),o.getStemX(),o.getStemExtents().topY,r)+n,c=s.getStemExtents().topY;if(c*a<e*a){let r=Math.abs(c-e);n+=r*-a,t+=r*i}else t+=(c-e)*a}}let c=s/2,f=i*Math.abs(c-r)+Math.abs(t);f<l&&(l=f,u=r,d=n)}this.slope=u,this.yShift=d}calculateFlatSlope(){let{notes:e,renderOptions:{beamWidth:t,minFlatBeamOffset:n,flatBeamOffset:r}}=this,i=this._stemDirection,a=0,o=0,s=0,c=0;for(let t=0;t<e.length;t++){let n=e[t],r=n.getStemExtents().topY;a+=r,i===L.DOWN&&c<r?(c=r,o=Math.max(...n.getYs()),s=n.getBeamCount()):i===L.UP&&(c===0||c>r)&&(c=r,o=Math.min(...n.getYs()),s=n.getBeamCount())}let l=a/e.length,u=n+s*t*1.5,d=o+u*-i;i===L.DOWN&&l<d?l=o+u:i===L.UP&&l>d&&(l=o-u),r?(i===L.DOWN&&l>r||i===L.UP&&l<r)&&(this.renderOptions.flatBeamOffset=l):this.renderOptions.flatBeamOffset=l,this.slope=0,this.yShift=0}getBeamYToDraw(){let e=this.notes[0].getStemExtents().topY;return this.renderOptions.flatBeams&&this.renderOptions.flatBeamOffset&&(e=this.renderOptions.flatBeamOffset),e}applyStemExtensions(){let{notes:e,slope:t,renderOptions:{showStemlets:n,stemletExtension:r,beamWidth:i}}=this,a=this.yShift,o=this._beamCount,s=e[0],c=this.getBeamYToDraw(),l=s.getStemX();for(let s=0;s<e.length;++s){let u=e[s],d=u.getStem();if(d){let e=u.getStemX(),{topY:s}=u.getStemExtents(),f=this.getSlopeY(e,l,c,t)+a,p=d.getExtension(),m=u.getStemDirection()===L.UP?s-f:f-s,h=0;if(u.getStemDirection()!==this._stemDirection&&(h=(1+(u.getGlyphProps().beamCount-1)*1.5)*this.renderOptions.beamWidth),d.setExtension(p+m+h),d.adjustHeightForBeam(),u.isRest()&&n){let e=(o-1)*i*1.5+i;d.setVisibility(!0).setStemlet(!0,e+r)}}}}lookupBeamDirection(e,t,n,r,i){if(e===`4`)return`L`;let a=this.forcedPartialDirections[i];if(a)return a;let o=`${I.durationToNumber(e)/2}`,s=t<I.durationToTicks(o),c=r<I.durationToTicks(o),l=n<I.durationToTicks(o);return s&&c&&l?`B`:s&&!c&&l?`L`:!s&&c&&l?`R`:this.lookupBeamDirection(o,t,n,r,i)}getBeamLines(e){let t=I.durationToTicks(e),n=!1,r=[],i,a=this.renderOptions.partialBeamLength,o=!1,s=0;for(let c=0;c<this.notes.length;++c){let l=this.notes[c],u=l.getTicks().value();s+=u;let d=!1;parseInt(e,10)>=8&&(d=this.breakOnIndexes.indexOf(c)!==-1,this.renderOptions.secondaryBreakTicks&&s>=this.renderOptions.secondaryBreakTicks&&(s=0,d=!0));let f=l.getIntrinsicTicks()<t,p=l.getStemX()-L.WIDTH/2,m=this.notes[c-1],h=this.notes[c+1],g=h&&h.getIntrinsicTicks()<t,_=m&&m.getIntrinsicTicks()<t,v=m&&h&&f&&!_&&!g;if(f){if(n)i=r[r.length-1],i.end=p,d&&(n=!1,h&&!g&&i.end===void 0&&(i.end=i.start-a));else{if(i={start:p,end:void 0},n=!0,v){let t=m.getIntrinsicTicks(),n=h.getIntrinsicTicks(),r=l.getIntrinsicTicks(),o=this.lookupBeamDirection(e,t,r,n,c);[`L`,`B`].includes(o)?i.end=i.start-a:i.end=i.start+a}else g?d&&(i.end=i.start-a,n=!1):(o||c===0)&&h?i.end=i.start+a:i.end=i.start-a;r.push(i)}}else n=!1;o=d}let c=r[r.length-1];return c&&c.end===void 0&&(c.end=c.start-a),r}drawStems(e){this.notes.forEach(t=>{let n=t.getStem();if(n){let r=t.getStemX();n.setNoteHeadXBounds(r,r),n.setContext(e).drawWithStyle()}},this)}drawBeamLines(e){let t=[`4`,`8`,`16`,`32`,`64`,`128`,`256`,`512`,`1024`],n=this.notes[0],r=this.getBeamYToDraw(),i=n.getStemX(),a=this.renderOptions.beamWidth*this._stemDirection;for(let n=0;n<t.length;++n){let o=t[n],s=this.getBeamLines(o);for(let t=0;t<s.length;++t){let n=s[t],o=n.start,c=this.getSlopeY(o,i,r,this.slope),l=n.end;if(l){let t=this.getSlopeY(l,i,r,this.slope);e.beginPath(),e.moveTo(o,c),e.lineTo(o,c+a),e.lineTo(l+1,t+a),e.lineTo(l+1,t),e.closePath(),e.fill()}else throw new p(`NoLastBeamX`,`lastBeamX undefined.`)}r+=a*1.5}}preFormat(){return this}postFormat(){this.postFormatted||=(d(this.notes[0])||this.renderOptions.flatBeams?this.calculateFlatSlope():this.calculateSlope(),this.applyStemExtensions(),!0)}draw(){let e=this.checkContext();if(this.setRendered(),this.unbeamable)return;this.postFormatted||this.postFormat();let t=this.getAttribute(`class`);e.openGroup(`beam`+(t?` `+t:``),this.getAttribute(`id`)),this.drawStems(e),this.drawBeamLines(e),this.drawPointerRect(),e.closeGroup()}},Kt=class extends z{static get CATEGORY(){return f.ClefNote}constructor(e,t=`default`,n){super({duration:`b`}),this.setType(e,t,n),this.ignoreTicks=!0}setType(e,t,n){return this.clef=new q(e,t,n),this.setWidth(this.clef.getWidth()),this}getClef(){return this.clef}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkStave(),t=this.checkContext();this.setRendered(),this.clef.setX(this.getAbsoluteX()),this.clef.setY(e.getYForLine(this.clef.line)),this.clef.renderText(t,0,0)}getBoundingBox(){return this.clef.getBoundingBox()}};function qt(...e){Yt.DEBUG&&g(`VexFlow.Crescendo`,e)}function Jt(e,t){let n=t.beginX,r=t.endX,i=t.y,a=t.height/2;e.beginPath(),t.reverse?(e.moveTo(n,i-a),e.lineTo(r,i),e.lineTo(n,i+a)):(e.moveTo(r,i-a),e.lineTo(n,i),e.lineTo(r,i+a)),e.stroke(),e.closePath()}var Yt=class extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.Crescendo}constructor(e){super(e),this.options={extendLeft:0,extendRight:0,yShift:0},this.decrescendo=!1,this.line=e.line??0,this.height=15}setLine(e){return this.line=e,this}setHeight(e){return this.height=e,this}setDecrescendo(e){return this.decrescendo=e,this}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkContext(),t=this.checkStave();this.setRendered();let n=this.getTickContext(),r=Rt.getNextContext(n),i=this.getAbsoluteX(),a=r?r.getX():t.getX()+t.getWidth(),o=t.getYForLine(this.line+-3)+1;qt(`Drawing `,this.decrescendo?`decrescendo `:`crescendo `,this.height,`x`,i-a),Jt(e,{beginX:i-this.options.extendLeft,endX:a+this.options.extendRight,y:o+this.options.yShift,height:this.height,reverse:this.decrescendo})}},Xt=function(e){return e[e.NEAR_HEAD=1]=`NEAR_HEAD`,e[e.NEAR_TOP=2]=`NEAR_TOP`,e}({}),Zt=class e extends A{static get CATEGORY(){return f.Curve}static get Position(){return Xt}static get PositionString(){return{nearHead:1,nearTop:2}}constructor(e,t,n){super(),this.renderOptions={thickness:2,xShift:0,yShift:10,position:1,positionEnd:1,invert:!1,cps:[{x:0,y:10},{x:0,y:10}],openingDirection:`auto`,...n},this.setNotes(e,t)}setNotes(e,t){if(!e&&!t)throw new p(`BadArguments`,"Curve needs to have either `from` or `to` set.");return this.from=e,this.to=t,this}isPartial(){return!this.from||!this.to}renderCurve(e){let t=this.checkContext(),n=this.renderOptions.xShift,r=this.renderOptions.yShift*e.direction,i=e.firstX+n,a=e.firstY+r,o=e.lastX-n,s=e.lastY+r,c=this.renderOptions.thickness,l=this.renderOptions.cps,{x:u,y:d}=l[0],{x:f,y:p}=l[1],m=(o-i)/(l.length+2);t.beginPath(),t.moveTo(i,a),t.bezierCurveTo(i+m+u,a+d*e.direction,o-m+f,s+p*e.direction,o,s),this.style?.lineDash||t.bezierCurveTo(o-m+f,s+(p+c)*e.direction,i+m+u,a+(d+c)*e.direction,i,a),t.stroke(),t.closePath(),this.style?.lineDash||t.fill()}draw(){this.checkContext(),this.setRendered();let t=this.from,n=this.to,r,i,a,o,s=0,c=`baseY`,l=`baseY`;function u(t){return typeof t==`string`?e.PositionString[t]:t}let d=u(this.renderOptions.position),f=u(this.renderOptions.positionEnd);return d===2&&(c=`topY`,l=`topY`),f===1?l=`baseY`:f===2&&(l=`topY`),t?(r=t.getTieRightX(),s=t.getStemDirection(),a=t.getStemExtents()[c]):(r=n.checkStave().getTieStartX(),a=n.getStemExtents()[c]),n?(i=n.getTieLeftX(),s=n.getStemDirection(),o=n.getStemExtents()[l]):(i=t.checkStave().getTieEndX(),o=t.getStemExtents()[l]),this.renderOptions.openingDirection===`up`&&(s=1),this.renderOptions.openingDirection===`down`&&(s=-1),this.renderCurve({firstX:r,lastX:i,firstY:a,lastY:o,direction:s*(this.renderOptions.invert===!0?-1:1)}),!0}};function Qt(...e){tn.DEBUG&&g(`VexFlow.Parser`,e)}var $t=-1;function en(e){if(`matchedString`in e)return e.matchedString;if(`results`in e)return en(e.results);let t=e;return t.length===1?en(t[0]):t.length===0?null:t.map(en)}var tn=class{static{this.DEBUG=!1}constructor(e){this.grammar=e,this.line=``,this.pos=0,this.errorPos=$t}parse(e){this.line=e,this.pos=0,this.errorPos=$t;let t=this.expect(this.grammar.begin());return t.errorPos=this.errorPos,t}matchFail(e){this.errorPos===$t&&(this.errorPos=this.pos),this.pos=e}matchSuccess(){this.errorPos=$t}matchToken(e,t=!1){let n=RegExp(t?`^((`+e+`))`:`^((`+e+`)\\s*)`),r=this.line.slice(this.pos).match(n);return r===null?{success:!1,pos:this.pos}:{success:!0,matchedString:r[2],incrementPos:r[1].length,pos:this.pos}}expectOne(e,t=!1){let n=[],r=this.pos,i=!0,a=!1;if(t=t===!0||e.maybe===!0,e.expect)for(let t of e.expect){let r=this.pos,o=this.expect(t);if(o.success){if(n.push(o),a=!0,e.or)break}else if(i=!1,!e.or){this.pos=r;break}}let o=e.or&&a||i,s=o||t===!0,c=+!!o;return t&&!o&&(this.pos=r),s?this.matchSuccess():this.matchFail(r),{success:s,results:n,numMatches:c}}expectOneOrMore(e,t=!1){let n=[],r=this.pos,i=0,a=!0;do{let t=this.expectOne(e);t.success&&t.results?(i++,n.push(t.results)):a=!1}while(a);let o=i>0||t===!0;return t&&!(i>0)&&(this.pos=r),o?this.matchSuccess():this.matchFail(r),{success:o,results:n,numMatches:i}}expectZeroOrMore(e){return this.expectOneOrMore(e,!0)}expect(e){if(Qt(`Evaluating rule function:`,e),!e)throw new p(`Invalid rule function`);let t,n=e.bind(this.grammar)();if(n.token)t=this.matchToken(n.token,n.noSpace===!0),t.success&&(this.pos+=t.incrementPos);else if(n.expect)t=n.oneOrMore?this.expectOneOrMore(n):n.zeroOrMore?this.expectZeroOrMore(n):this.expectOne(n);else throw Qt(n),new p("Bad grammar! No `token` or `expect` property "+n);let r=[];return t.matches=r,t.results&&t.results.forEach(e=>r.push(en(e))),n.run&&t.success&&n.run({matches:r}),t}};function $(...e){ln.DEBUG&&g(`VexFlow.EasyScore`,e)}var nn=class{constructor(e){this.builder=e}begin(){return this.LINE}LINE(){return{expect:[this.PIECE,this.PIECES,this.EOL]}}PIECE(){return{expect:[this.CHORDORNOTE,this.PARAMS],run:()=>this.builder.commitPiece()}}PIECES(){return{expect:[this.COMMA,this.PIECE],zeroOrMore:!0}}PARAMS(){return{expect:[this.DURATION,this.TYPE,this.DOTS,this.OPTS]}}CHORDORNOTE(){return{expect:[this.CHORD,this.SINGLENOTE],or:!0}}CHORD(){return{expect:[this.LPAREN,this.NOTES,this.RPAREN],run:e=>this.builder.addChord(e.matches[1])}}NOTES(){return{expect:[this.NOTE],oneOrMore:!0}}NOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE]}}SINGLENOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE],run:e=>{let t=e;this.builder.addSingleNote(t.matches[0],t.matches[1],t.matches[2])}}}ACCIDENTAL(){return{expect:[this.MICROTONES,this.ACCIDENTALS],maybe:!0,or:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:e=>this.builder.setNoteDots(e.matches)}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:e=>this.builder.setNoteType(e.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:e=>this.builder.setNoteDuration(e.matches[1])}}OPTS(){return{expect:[this.LBRACKET,this.KEYVAL,this.KEYVALS,this.RBRACKET],maybe:!0}}KEYVALS(){return{expect:[this.COMMA,this.KEYVAL],zeroOrMore:!0}}KEYVAL(){let e=e=>e.slice(1,-1);return{expect:[this.KEY,this.EQUALS,this.VAL],run:t=>this.builder.addNoteOption(t.matches[0],e(t.matches[2]))}}VAL(){return{expect:[this.SVAL,this.DVAL],or:!0}}KEY(){return{token:`[a-zA-Z][a-zA-Z0-9]*`}}DVAL(){return{token:`["][^"]*["]`}}SVAL(){return{token:`['][^']*[']`}}NOTENAME(){return{token:`[a-gA-G]`}}OCTAVE(){return{token:`[0-9]+`}}ACCIDENTALS(){return{token:`bb|b|##|#|n`}}MICROTONES(){return{token:`bbs|bss|bs|db|d|\\+\\+-|\\+-|\\+\\+|\\+|k|o`}}DURATIONS(){return{token:`[0-9whq]+`}}TYPES(){return{token:`[rRsSmMhHgG]`}}LPAREN(){return{token:`[(]`}}RPAREN(){return{token:`[)]`}}COMMA(){return{token:`[,]`}}DOT(){return{token:`[.]`}}SLASH(){return{token:`[/]`}}MAYBESLASH(){return{token:`[/]?`}}EQUALS(){return{token:`[=]`}}LBRACKET(){return{token:`\\[`}}RBRACKET(){return{token:`\\]`}}EOL(){return{token:`$`}}},rn=class{constructor(e){this.chord=[],this.dots=0,this.options={},this.duration=e}},an=class{constructor(e){this.commitHooks=[],this.factory=e,this.reset()}reset(e){this.options={stem:`auto`,clef:`treble`,...e},this.elements={notes:[],accidentals:[]},this.rollingDuration=`8`,this.resetPiece()}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(e){this.commitHooks.push(e)}resetPiece(){$(`resetPiece`),this.piece=new rn(this.rollingDuration)}setNoteDots(e){$(`setNoteDots:`,e),e&&(this.piece.dots=e.length)}setNoteDuration(e){$(`setNoteDuration:`,e),this.rollingDuration=this.piece.duration=e||this.rollingDuration}setNoteType(e){$(`setNoteType:`,e),e&&(this.piece.type=e)}addNoteOption(e,t){$(`addNoteOption: key:`,e,`value:`,t),this.piece.options[e]=t}addNote(e,t,n){$(`addNote:`,e,t,n),this.piece.chord.push({key:e,accid:t,octave:n})}addSingleNote(e,t,n){$(`addSingleNote:`,e,t,n),this.addNote(e,t,n)}addChord(e){$(`startChord`),typeof e[0]==`object`?e.forEach(e=>{e&&this.addNote(...e)}):this.addSingleNote(e[0]),$(`endChord`)}commitPiece(){$(`commitPiece`);let{factory:e}=this;if(!e)return;let t={...this.options,...this.piece.options},n=h(t.stem,`BadArguments`,`options.stem is not defined`).toLowerCase(),r=h(t.clef,`BadArguments`,`options.clef is not defined`).toLowerCase(),{chord:i,duration:a,dots:o,type:s}=this.piece,c=N.accidentals,l=i.map(e=>e.key+(c.includes(e.accid??``)?e.accid:``)+`/`+e.octave),u=n===`auto`,d=s?.toLowerCase()===`g`?e.GhostNote({duration:a,dots:o}):e.StaveNote({keys:l,duration:a,dots:o,type:s,clef:r,autoStem:u});u||d.setStemDirection(n===`up`?L.UP:L.DOWN);let f=[];i.forEach((t,n)=>{let r=t.accid;if(typeof r==`string`){let t=e.Accidental({type:r});d.addModifier(t,n),f.push(t)}else f.push(void 0)});for(let e=0;e<o;e++)Ge.buildAndAttach([d],{all:!0});this.commitHooks.forEach(e=>e(t,d,this)),this.elements.notes.push(d),this.elements.accidentals.push(f),this.resetPiece()}};function on(e,t){e.id!==void 0&&t.setAttribute(`id`,e.id)}var sn=/\s*,\s*/;function cn(e,t){e.class!==void 0&&e.class.split(sn).forEach(e=>t.addClass(e))}var ln=class{static{this.DEBUG=!1}constructor(e={}){this.defaults={clef:`treble`,time:`4/4`,stem:`auto`},this.setOptions(e)}set(e){return this.defaults={...this.defaults,...e},this}setOptions(e){let t=e.factory,n=e.builder??new an(t);return this.options={commitHooks:[on,cn,je.easyScoreHook,Ke.easyScoreHook],throwOnError:!1,...e,factory:t,builder:n},this.factory=t,this.builder=n,this.grammar=new nn(this.builder),this.parser=new tn(this.grammar),this.options.commitHooks?.forEach(e=>this.addCommitHook(e)),this}setContext(e){return this.factory.setContext(e),this}parse(e,t={}){this.builder.reset(t);let n=this.parser.parse(e);if(!n.success&&this.options.throwOnError)throw $(n),new p(`Error parsing line: `+e);return n}beam(e,t){return this.factory.Beam({notes:e,options:t}),e}tuplet(e,t){return this.factory.Tuplet({notes:e,options:t}),e}notes(e,t={}){return t={clef:this.defaults.clef,stem:this.defaults.stem,...t},this.parse(e,t),this.builder.getElements().notes}voice(e,t={}){return t={time:this.defaults.time,...t},this.factory.Voice(t).addTickables(e)}addCommitHook(e){this.builder.addCommitHook(e)}},un=`Ghost note must have valid initialization data to identify duration.`,dn=class extends Ze{static get CATEGORY(){return f.GhostNote}constructor(e){if(!e)throw new p(`BadArguments`,un);let t;if(typeof e==`string`)t={duration:e};else if(typeof e==`object`)t=e;else throw new p(`BadArguments`,un);super(t),this.setWidth(0)}isRest(){return!0}setStave(e){return super.setStave(e),this}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this}draw(){this.setRendered();for(let e=0;e<this.modifiers.length;++e){let t=this.modifiers[e];n(t)&&(t.setContext(this.getContext()),t.drawWithStyle())}}},fn=class extends z{static get CATEGORY(){return f.GlyphNote}constructor(e,t,n){super(t),this.options={ignoreTicks:!1,line:2,...n},this.ignoreTicks=this.options.ignoreTicks,this.setGlyph(e)}setGlyph(e){return this.text=e,this}preFormat(){return!this.preFormatted&&this.modifierContext&&this.modifierContext.preFormat(),this.preFormatted=!0,this}drawModifiers(){let e=this.checkContext();for(let t=0;t<this.modifiers.length;t++){let n=this.modifiers[t];n.setContext(e),n.drawWithStyle()}}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`glyphNote`+(n?` `+n:``),this.getAttribute(`id`)),this.x=this.isCenterAligned()?this.getAbsoluteX()-this.getWidth()/2:this.getAbsoluteX(),this.y=e.getYForLine(this.options.line),this.renderText(t,0,0),this.drawModifiers(),this.drawPointerRect(),t.closeGroup()}},pn=class e extends W{static get CATEGORY(){return f.GraceNote}static get LEDGER_LINE_OFFSET(){return 2}constructor(t){super({strokePx:e.LEDGER_LINE_OFFSET,...t}),this.slash=t.slash||!1,this.slur=!0,this.buildNoteHeads(),this.width=3}getStemExtension(){if(this.stemExtensionOverride)return this.stemExtensionOverride;let e=super.getStemExtension();return e=L.HEIGHT*this.getFontScale()-L.HEIGHT+e,e}draw(){super.draw(),this.setRendered();let e=this.stem;if(this.slash&&e){let e=this.getFontScale(),t,n=this.beam;if(n)n.postFormatted||n.postFormat(),t=this.calcBeamedNotesSlashBBox(8*e,8*e,{stem:6*e,beam:5*e});else{let n=this.getStemDirection(),r=this.getNoteHeadBounds(),i=this.noteHeads[0].getWidth(),a=n===L.DOWN?this.getAbsoluteX():this.getAbsoluteX()+i,o=I.STEM_HEIGHT*e/2,s=n===L.DOWN?r.yBottom+o:r.yTop-o;t=n===L.DOWN?{x1:a-i,y1:s-i,x2:a+i,y2:s+i}:{x1:a-i,y1:s+i,x2:a+i,y2:s-i}}let r=this.checkContext();r.setLineWidth(1*e),r.beginPath(),r.moveTo(t.x1,t.y1),r.lineTo(t.x2,t.y2),r.closePath(),r.stroke()}}calcBeamedNotesSlashBBox(e,t,n){let r=this.beam;if(!r)throw new p(`NoBeam`,`Can't calculate without a beam.`);let i=r.slope,a=r.notes[r.notes.length-1]===this?-1:1,o=Math.atan(i*a),s={dx:Math.cos(o)*t,dy:Math.sin(o)*t};e*=this.getStemDirection();let c=Math.atan((s.dy-e)/s.dx),l=Math.cos(c)*n.stem*a,u=Math.sin(c)*n.stem,d=Math.cos(c)*n.beam*a,f=Math.sin(c)*n.beam,m=this.getStemX(),h=r.notes[0].getStemX(),g=r.getBeamYToDraw()+(m-h)*i;return{x1:m-l,y1:g+e-u,x2:m+s.dx*a+d,y2:g+s.dy+f}}},mn=class extends z{static get CATEGORY(){return f.KeySigNote}constructor(e,t,n){super({duration:`b`}),this.keySignature=new J(e,t,n),this.ignoreTicks=!0}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this.keySignature.setStave(this.checkStave()),this.setWidth(this.keySignature.getWidth()),this}draw(){let e=this.checkStave().checkContext();this.setRendered(),this.keySignature.setX(this.getAbsoluteX()),this.keySignature.setContext(e),this.keySignature.drawWithStyle()}},hn=class extends A{static get CATEGORY(){return f.MultiMeasureRest}constructor(e,t){super(),this.xs={left:NaN,right:NaN},this.hasPaddingLeft=!1,this.hasPaddingRight=!1,this.hasLineThickness=!1,this.hasSymbolSpacing=!1;let n=t.numberGlyphPoint??T.get(`MultiMeasureRest.fontSize`);this.fontInfo.size=n,this.numberOfMeasures=e,this.text=``;let r=`${this.numberOfMeasures}`;for(let e of r)this.text+=String.fromCodePoint(57472+Number(e));this.hasPaddingLeft=typeof t.paddingLeft==`number`,this.hasPaddingRight=typeof t.paddingRight==`number`,this.hasLineThickness=typeof t.lineThickness==`number`,this.hasSymbolSpacing=typeof t.symbolSpacing==`number`,this.renderOptions={useSymbols:!1,showNumber:!0,numberLine:-.5,numberGlyphPoint:n,line:2,spacingBetweenLinesPx:I.STAVE_LINE_DISTANCE,serifThickness:2,semibreveRestGlyphScale:T.get(`fontSize`),paddingLeft:0,paddingRight:0,lineThickness:5,symbolSpacing:0,...t}}getXs(){return this.xs}setStave(e){return this.stave=e,this}getStave(){return this.stave}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}drawLine(e,t,n,r){let i=this.renderOptions,a=e.getYForLine(i.line),o=(r-n)*.1;n+=o,r-=o;let s=``,c=new A;c.setText(s);let l=c.getWidth();if(!l)throw new p(`Cannot drawLine if width is 0`);for(let e=1;(e+2)*l+n<=r;e++)s+=``;s+=``,c.setText(s),c.renderText(t,n+(r-n)*.5-c.getWidth()*.5,a)}drawSymbols(e,t,n,r){let i=Math.floor(this.numberOfMeasures/4),a=this.numberOfMeasures%4,o=Math.floor(a/2),s=a%2,c=this.renderOptions,l=new A,u=``;for(let e=0;e<i;++e)u+=P.restLonga+` `;for(let e=0;e<o;++e)u+=P.restDoubleWhole+` `;l.setText(u);let d=new A;u=``;for(let e=0;e<s;++e)u+=P.restWhole+` `;d.setText(u);let f=l.getWidth()+d.getWidth(),p=n+(r-n)*.5-f*.5,m=c.line,h=e.getYForLine(m-1),g=e.getYForLine(m);l.renderText(t,p,g),p+=l.getWidth(),d.renderText(t,p,h),p+=d.getWidth()}draw(){let e=this.checkContext();this.setRendered();let t=this.checkStave(),n=t.getNoteStartX(),i=t.getNoteEndX(),a=t.getModifiers(B.BEGIN);a.length===1&&r(a[0])&&(n-=a[0].getWidth());let o=this.renderOptions;this.hasPaddingLeft&&(n=t.getX()+o.paddingLeft),this.hasPaddingRight&&(i=t.getX()+t.getWidth()-o.paddingRight),this.xs.left=n,this.xs.right=i,o.useSymbols?this.drawSymbols(t,e,n,i):this.drawLine(t,e,n,i),o.showNumber&&this.renderText(e,n+(i-n)*.5-this.width*.5,t.getYForLine(o.numberLine)-this.height*.5)}};function gn(...e){_n.DEBUG&&g(`VexFlow.PedalMarking`,e)}var _n=class e extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.PedalMarking}static{this.GLYPHS={pedalDepress:P.keyboardPedalPed,pedalRelease:P.keyboardPedalUp}}static{this.type={TEXT:1,BRACKET:2,MIXED:3}}static{this.typeString={text:e.type.TEXT,bracket:e.type.BRACKET,mixed:e.type.MIXED}}static createSustain(t){return new e(t)}static createSostenuto(t){let n=new e(t);return n.setType(e.type.MIXED),n.setCustomText(`Sost. Ped.`),n}static createUnaCorda(t){let n=new e(t);return n.setType(e.type.TEXT),n.setCustomText(`una corda`,`tre corda`),n}constructor(t){super(),this.notes=t,this.type=e.type.TEXT,this.line=0,this.depressText=e.GLYPHS.pedalDepress,this.releaseText=e.GLYPHS.pedalRelease,this.renderOptions={bracketHeight:10,textMarginRight:6,bracketLineWidth:1,color:`black`}}setType(t){return t=typeof t==`string`?e.typeString[t]:t,t>=e.type.TEXT&&t<=e.type.MIXED&&(this.type=t),this}setCustomText(e,t){return this.depressText=e||``,this.releaseText=t||``,this.setFont(T.getFontInfo(`PedalMarking.text`)),this}setLine(e){return this.line=e,this}drawBracketed(){let t=this.checkContext(),n=!1,r,i,a=0;this.notes.forEach((o,s,c)=>{n=!n;let l=o.getAbsoluteX(),u=o.checkStave().getYForBottomText(this.line+3);if(l<r)throw new p(`InvalidConfiguration`,`The notes provided must be in order of ascending x positions`);let d=c[s+1]===o,f=c[s-1]===o,m=0;if(n)m=f?5:0,this.type===e.type.MIXED&&!f?(a=t.measureText(this.depressText).width,t.fillText(this.depressText,l,u),m=a+this.renderOptions.textMarginRight):(t.beginPath(),t.moveTo(l,u-this.renderOptions.bracketHeight),t.lineTo(l+m,u),t.stroke(),t.closePath());else{let e=o.getVoice().getTickables().indexOf(o),n=o.getVoice().getTickables().length,a=e+1<n?o.getVoice().getTickables()[e+1].getAbsoluteX():(o.getStave()?.getX()??0)+(o.getStave()?.getWidth()??0);t.beginPath(),t.moveTo(r,i),t.lineTo(d?l-5:a-5,u),t.lineTo(d?l:a-5,u-this.renderOptions.bracketHeight),t.stroke(),t.closePath()}r=l+m,i=u})}drawText(){let e=this.checkContext(),t=!1,n=0;this.notes.forEach(r=>{t=!t;let i=r.checkStave(),a=r.getAbsoluteX(),o=i.getYForBottomText(this.line+3);if(t)n=e.measureText(this.depressText).width,e.fillText(this.depressText,a,o);else{let t=r.getVoice().getTickables().indexOf(r),i=r.getVoice().getTickables().length,a=t+1<i?r.getVoice().getTickables()[t+1].getAbsoluteX():(r.getStave()?.getX()??0)+(r.getStave()?.getWidth()??0);n=e.measureText(this.releaseText).width,e.fillText(this.releaseText,a-n,o)}})}draw(){let t=this.checkContext();this.setRendered(),t.setStrokeStyle(this.renderOptions.color),t.setFillStyle(this.renderOptions.color),t.setFont(this.font),gn(`Rendering Pedal Marking`),this.type===e.type.BRACKET||this.type===e.type.MIXED?(t.setLineWidth(this.renderOptions.bracketLineWidth),this.drawBracketed()):this.type===e.type.TEXT&&this.drawText()}},vn={1:P.repeat1Bar,2:P.repeat2Bars,4:P.repeat4Bars,slash:P.repeatBarSlash},yn=class extends fn{static get CATEGORY(){return f.RepeatNote}constructor(e,t,n){let r=vn[e]||``;super(r,{duration:`q`,alignCenter:e!==`slash`,...t},n)}};function bn(e,t,n,r,i,a,o){e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.lineTo(a,o),e.lineTo(t,n),e.closePath(),e.fill()}var xn=class e extends A{static get CATEGORY(){return f.StaveLine}static{this.TextVerticalPosition={TOP:1,BOTTOM:2}}static{this.TextJustification=kt}constructor(t){super(),this.setNotes(t),this.text=``,this.renderOptions={paddingLeft:4,paddingRight:3,lineWidth:1,lineDash:void 0,roundedEnd:!0,color:void 0,drawStartArrow:!1,drawEndArrow:!1,arrowheadLength:10,arrowheadAngle:Math.PI/8,textPositionVertical:e.TextVerticalPosition.TOP,textJustification:e.TextJustification.CENTER}}setText(e){return this.text=e,this}setNotes(e){if(!e.firstNote&&!e.lastNote)throw new p(`BadArguments`,`Notes needs to have either firstNote or lastNote set.`);if(e.firstIndexes||=[0],e.lastIndexes||=[0],e.firstIndexes.length!==e.lastIndexes.length)throw new p(`BadArguments`,`Connected notes must have same number of indexes.`);return this.notes=e,this.firstNote=e.firstNote,this.firstIndexes=e.firstIndexes,this.lastNote=e.lastNote,this.lastIndexes=e.lastIndexes,this}applyLineStyle(){let e=this.checkContext(),t=this.renderOptions;t.lineDash&&e.setLineDash(t.lineDash),t.lineWidth&&e.setLineWidth(t.lineWidth),t.roundedEnd?e.setLineCap(`round`):e.setLineCap(`square`)}drawArrowLine(e,t,n){let r=this.renderOptions.drawStartArrow&&this.renderOptions.drawEndArrow,i=t.x,a=t.y,o=n.x,s=n.y,c=Math.sqrt((o-i)*(o-i)+(s-a)*(s-a)),l=(c-this.renderOptions.arrowheadLength/3)/c,u,d,f,p;this.renderOptions.drawEndArrow||r?(u=Math.round(i+(o-i)*l),d=Math.round(a+(s-a)*l)):(u=o,d=s),this.renderOptions.drawStartArrow||r?(f=i+(o-i)*(1-l),p=a+(s-a)*(1-l)):(f=i,p=a),this.renderOptions.color&&(e.setStrokeStyle(this.renderOptions.color),e.setFillStyle(this.renderOptions.color)),e.beginPath(),e.moveTo(f,p),e.lineTo(u,d),e.stroke(),e.closePath();let m=Math.atan2(s-a,o-i),h=Math.abs(this.renderOptions.arrowheadLength/Math.cos(this.renderOptions.arrowheadAngle)),g,_,v,y,b,x;(this.renderOptions.drawEndArrow||r)&&(g=m+Math.PI+this.renderOptions.arrowheadAngle,v=o+Math.cos(g)*h,y=s+Math.sin(g)*h,_=m+Math.PI-this.renderOptions.arrowheadAngle,b=o+Math.cos(_)*h,x=s+Math.sin(_)*h,bn(e,v,y,o,s,b,x)),(this.renderOptions.drawStartArrow||r)&&(g=m+this.renderOptions.arrowheadAngle,v=i+Math.cos(g)*h,y=a+Math.sin(g)*h,_=m-this.renderOptions.arrowheadAngle,b=i+Math.cos(_)*h,x=a+Math.sin(_)*h,bn(e,v,y,i,a,b,x))}draw(){let t=this.checkContext();this.setRendered();let n=this.firstNote,r=this.lastNote,i=this.renderOptions;this.applyLineStyle();let a={x:0,y:0},o={x:0,y:0};this.firstIndexes.forEach((e,s)=>{let c=this.lastIndexes[s];a=n.getModifierStartXY(2,e),o=r.getModifierStartXY(1,c);let l=a.y>o.y;a.x+=n.getMetrics().modRightPx+i.paddingLeft,o.x-=r.getMetrics().modLeftPx+i.paddingRight;let u=n.getGlyphWidth();n.getKeyProps()[e].displaced&&n.getStemDirection()===1&&(a.x+=u+i.paddingLeft),r.getKeyProps()[c].displaced&&r.getStemDirection()===-1&&(o.x-=u+i.paddingRight),a.y+=l?-3:1,o.y+=l?2:0,this.drawArrowLine(t,a,o)});let s=this.width,c=i.textJustification,l=0;c===e.TextJustification.LEFT?l=a.x:c===e.TextJustification.CENTER?l=(o.x-a.x)/2+a.x-s/2:c===e.TextJustification.RIGHT&&(l=o.x-s);let u=0,d=i.textPositionVertical;d===e.TextVerticalPosition.TOP?u=n.checkStave().getYForTopText():d===e.TextVerticalPosition.BOTTOM&&(u=n.checkStave().getYForBottomText(I.TEXT_HEIGHT_OFFSET_HACK));let f=i.color;this.applyStyle(t,{fillStyle:f,strokeStyle:f}),this.renderText(t,l,u)}},Sn=class extends A{static get CATEGORY(){return f.System}constructor(e={}){super(),this.setOptions(e),this.partStaves=[],this.partStaveInfos=[],this.partVoices=[]}setOptions(e={}){if(!e.factory)throw new p(`NoFactory`,`System.setOptions(options) requires a factory.`);this.factory=e.factory,this.options={factory:this.factory,x:10,y:10,width:500,spaceBetweenStaves:12,autoWidth:!1,noJustification:!1,debugFormatter:!1,formatIterations:0,noPadding:!1,...e,details:{alpha:.5,...e.details},formatOptions:{...e.formatOptions}},this.options.noJustification===!1&&e.width===void 0&&(this.options.autoWidth=!0)}getX(){return this.options.x}setX(e){return this.options.x=e,this.partStaves.forEach(t=>{t.setX(e)}),this}getY(){return this.options.y}setY(e){return this.options.y=e,this.partStaves.forEach(t=>{t.setY(e)}),this}getStaves(){return this.partStaves}getVoices(){return this.partVoices}setContext(e){return super.setContext(e),this.factory.setContext(e),this}addConnector(e=`double`){return this.connector=this.factory.StaveConnector({topStave:this.partStaves[0],bottomStave:this.partStaves[this.partStaves.length-1],type:e}),this.connector}addStave(e){let t={leftBar:!1,...e.options},n=e.stave??this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:t}),r={spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,noJustification:!1,...e,options:t},i=this.getContext();return r.voices.forEach(e=>{e.setContext(i).setStave(n).getTickables().forEach(e=>e.setStave(n)),this.partVoices.push(e)}),this.partStaves.push(n),this.partStaveInfos.push(r),n}addVoices(e){let t=this.getContext();e.forEach(e=>{e.setContext(t),this.partVoices.push(e)})}format(){let e=this.options.details,t=0,n=new Q(e);this.formatter=n;let r=this.options.y,i=0,a=[];this.partStaves.forEach((e,t)=>{r+=e.space(this.partStaveInfos[t].spaceAbove),e.setY(r),r+=e.space(this.partStaveInfos[t].spaceBelow),r+=e.space(this.options.spaceBetweenStaves),this.partStaveInfos[t].debugNoteMetrics&&(a.push({y:r,stave:e}),r+=15),i=Math.max(i,e.getNoteStartX())}),this.partVoices.forEach(e=>{e.getTickables().forEach(e=>{let t=e.getStave();t&&e.setStave(t)})}),n.joinVoices(this.partVoices),this.partStaves.forEach(e=>e.setNoteStartX(i)),this.options.autoWidth&&this.partVoices.length>0?(t=n.preCalculateMinTotalWidth(this.partVoices),this.options.width=t+X.rightPadding+(i-this.options.x),this.partStaves.forEach(e=>{e.setWidth(this.options.width)})):t=this.options.noPadding?this.options.width-(i-this.options.x):this.options.width-(i-this.options.x)-X.defaultPadding,this.partVoices.length>0&&n.format(this.partVoices,this.options.noJustification?0:t,this.options.formatOptions),n.postFormat();for(let t=0;t<this.options.formatIterations;t++)n.tune(e);this.startX=i,this.debugNoteMetricsYs=a,this.lastY=r,X.formatBegModifiers(this.partStaves)}getBoundingBox(){return new D(this.options.x,this.options.y,this.options.width,(this.lastY??0)-this.options.y)}draw(){let e=this.checkContext();if(!this.formatter||!this.startX||!this.lastY||!this.debugNoteMetricsYs)throw new p(`NoFormatter`,`format() must be called before draw()`);this.setRendered(),this.options.debugFormatter&&Q.plotDebugging(e,this.formatter,this.startX,this.options.y,this.lastY),this.debugNoteMetricsYs.forEach(t=>{this.partVoices.forEach(n=>{n.getTickables().forEach(n=>{n.getStave()===t.stave&&z.plotMetrics(e,n,t.y)})})})}};function Cn(e,t){let n=[],r=[];for(let i=1;i<=e;i++)t.indexOf(i)>-1?(n.push(r),r=[]):r.push(i);return r.length>0&&n.push(r),n}function wn(e,t,n,r){let i=r!==1,a=r!==-1,o=n.getSpacingBetweenLines(),s=n.getNumLines(),c=[];return t.forEach(t=>{let l=t.indexOf(s)>-1,u=t.indexOf(1)>-1;if(i&&u||a&&l)return;t.length===1&&t.push(t[0]);let d=[];t.forEach((t,i,a)=>{let c=t===1,l=t===s,u=n.getYForLine(t-1);i===0&&!c?u-=o/2-1:i===a.length-1&&!l&&(u+=o/2-1),d.push(u),r===1&&c?d.push(e-2):r===-1&&l&&d.push(e+2)}),c.push(d.sort((e,t)=>e-t))}),c}var Tn=class e extends Ze{static get CATEGORY(){return f.TabNote}constructor(e,t=!1){super(e),this.fretElement=[],this.greatestString=()=>this.positions.map(e=>e.str).reduce((e,t)=>e>t?e:t),this.leastString=()=>this.positions.map(e=>e.str).reduce((e,t)=>e<t?e:t),this.ghost=!1,this.positions=e.positions||[],this.renderOptions={...this.renderOptions,drawStem:t,drawDots:t,drawStemThroughStave:!1,yShift:0},this.glyphProps=z.getGlyphProps(this.duration,this.noteType),h(this.glyphProps,`BadArguments`,`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.buildStem(),e.stemDirection?this.setStemDirection(e.stemDirection):this.setStemDirection(L.UP),this.ghost=!1,this.updateWidth()}reset(){return super.reset(),this.stave&&this.setStave(this.stave),this}setGhost(e){return this.ghost=e,this.updateWidth(),this}hasStem(){return!!this.renderOptions.drawStem}getStemExtension(){return this.stemExtensionOverride===void 0?this.flag.getHeight()>L.HEIGHT?this.flag.getHeight()-L.HEIGHT:0:this.stemExtensionOverride}static tabToElement(e){let t;return e.toUpperCase()===`X`?(t=new A(`TabNote`),t.setText(P.accidentalDoubleSharp)):(t=new A(`TabNote.text`),t.setText(e),t.setYShift(t.getHeight()/2)),t}updateWidth(){this.fretElement=[],this.width=0;for(let t=0;t<this.positions.length;++t){let n=this.positions[t].fret;this.ghost&&(n=`(`+n+`)`);let r=e.tabToElement(n.toString());this.fretElement.push(r),this.width=Math.max(r.getWidth(),this.width)}}setStave(e){super.setStave(e);let t=e.getContext();this.setContext(t);let n=this.positions.map(({str:t})=>e.getYForLine(Number(t)-1));return this.setYs(n),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}getModifierStartXY(e,t){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call GetModifierStartXY on an unformatted note`);if(this.ys.length===0)throw new p(`NoYValues`,`No Y-Values calculated for this note.`);let n=0;return e===M.Position.LEFT?n=-2:e===M.Position.RIGHT?n=this.width+2:(e===M.Position.BELOW||e===M.Position.ABOVE)&&(n=this.width/2),{x:this.getAbsoluteX()+n,y:this.ys[t]}}getLineForRest(){return Number(this.positions[0].str)}preFormat(){this.preFormatted||=(this.modifierContext&&this.modifierContext.preFormat(),!0)}getStemX(){return this.getCenterGlyphX()}getStemY(){let e=this.checkStave().getNumLines()-.5,t=L.UP===this.stemDirection?-.5:e;return this.checkStave().getYForLine(t)}getStemExtents(){return this.checkStem().getExtents()}drawFlag(){let{beam:e,glyphProps:t,renderOptions:{drawStem:n}}=this,r=this.checkContext(),i=e===void 0&&n;if(t.codeFlagUp&&i){let e=this.getStemX(),t=this.getStemDirection()===L.DOWN?this.getStemY()-this.checkStem().getHeight()-this.getStemExtension():this.getStemY()-this.checkStem().getHeight()+this.getStemExtension();this.flag.setContext(r).setX(e).setY(t).drawWithStyle()}}drawModifiers(){this.modifiers.forEach(e=>{(!i(e)||this.renderOptions.drawDots)&&(e.setContext(this.getContext()),e.drawWithStyle())})}drawStemThrough(){let e=this.getStemX(),t=this.getStemY(),n=this.checkContext(),r=this.renderOptions.drawStem,i=this.renderOptions.drawStemThroughStave;if(r&&i){let r=wn(t,Cn(this.checkStave().getNumLines(),this.positions.map(e=>Number(e.str))),this.checkStave(),this.getStemDirection());n.setLineWidth(L.WIDTH),r.forEach(t=>{t.length!==0&&(n.beginPath(),n.moveTo(e,t[0]),n.lineTo(e,t[t.length-1]),n.stroke(),n.closePath())})}}drawPositions(){let e=this.checkContext(),t=this.getAbsoluteX(),n=this.ys;for(let r=0;r<this.positions.length;++r){let i=n[r]+this.renderOptions.yShift,a=this.fretElement[r],o=t-a.getWidth()/2;e.clearRect(o-2,i-3,a.getWidth()+4,6),a.renderText(e,o,i)}}draw(){let e=this.checkContext();if(this.ys.length===0)throw new p(`NoYValues`,`Can't draw note without Y values.`);this.setRendered();let t=this.beam===void 0&&this.renderOptions.drawStem,n=this.getAttribute(`class`);if(e.openGroup(`tabnote`+(n?` `+n:``),this.getAttribute(`id`)),this.drawPositions(),this.drawStemThrough(),this.stem&&t){let t=this.getStemX();this.stem.setNoteHeadXBounds(t,t),this.stem.setContext(e).drawWithStyle()}this.drawFlag(),this.drawModifiers(),this.drawPointerRect(),e.closeGroup()}},En=class extends X{static get CATEGORY(){return f.TabStave}constructor(e,t,n,r){let i={spacingBetweenLinesPx:13,numLines:6,topTextPosition:1,...r};super(e,t,n,i)}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef(`tab`),this}};function Dn(...e){kn.DEBUG&&g(`VexFlow.TextBracket`,e)}var On=function(e){return e[e.TOP=1]=`TOP`,e[e.BOTTOM=-1]=`BOTTOM`,e}({}),kn=class e extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.TextBracket}static get Position(){return On}static get PositionString(){return{top:1,bottom:-1}}constructor({start:t,stop:n,text:r=``,superscript:i=``,position:a=1}){super(),this.start=t,this.stop=n,this.textElement=new A(`TextBracket`),this.textElement.setText(r),this.superscriptElement=new A(`TextBracket`),this.superscriptElement.setText(i);let o=k.scaleSize(this.fontInfo.size,.714286);this.superscriptElement.setFontSize(o),this.position=typeof a==`string`?e.PositionString[a]:a,this.line=1,this.renderOptions={dashed:!0,dash:[5],color:`black`,lineWidth:1,showBracket:!0,bracketHeight:8,underlineSuperscript:!0}}applyStyle(e){this.textElement.setFont(this.fontInfo);let{family:t,size:n,weight:r,style:i}=this.fontInfo,a=k.scaleSize(n,.714286);this.superscriptElement.setFont(t,a,r,i);let o=this.renderOptions;return e.setStrokeStyle(o.color),e.setFillStyle(o.color),e.setLineWidth(o.lineWidth),this}setDashed(e,t){return this.renderOptions.dashed=e,t&&(this.renderOptions.dash=t),this}setLine(e){return this.line=e,this}draw(){let e=this.checkContext();this.setRendered();let t=0;switch(this.position){case 1:t=this.start.checkStave().getYForTopText(this.line);break;case-1:t=this.start.checkStave().getYForBottomText(this.line+I.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new p(`InvalidPosition`,`The position ${this.position} is invalid.`)}let n={x:this.start.getAbsoluteX(),y:t},r={x:this.stop.getAbsoluteX(),y:t};Dn(`Rendering TextBracket: start:`,n,`stop:`,r,`y:`,t);let i=this.renderOptions.bracketHeight*this.position;this.textElement.renderText(e,n.x,n.y);let a=this.textElement.getWidth(),o=this.textElement.getHeight(),s=n.y-o/2.5;this.superscriptElement.renderText(e,n.x+a+1,s);let c=this.superscriptElement.getWidth(),l=this.superscriptElement.getHeight(),u=n.x,d=s,f=r.x+this.stop.getGlyphWidth();this.position===1?(u+=a+c+5,d-=l/2.7):this.position===-1&&(d+=l/2.7,u+=a+2,this.renderOptions.underlineSuperscript||(u+=c)),this.renderOptions.dashed?(K.drawDashedLine(e,u,d,f,d,this.renderOptions.dash),this.renderOptions.showBracket&&K.drawDashedLine(e,f,d+1*this.position,f,d+i,this.renderOptions.dash)):(e.beginPath(),e.moveTo(u,d),e.lineTo(f,d),this.renderOptions.showBracket&&e.lineTo(f,d+i),e.stroke(),e.closePath())}};function An(...e){jn.DEBUG&&g(`VexFlow.TextDynamics`,e)}var jn=class e extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.TextDynamics}static get GLYPHS(){return{f:P.dynamicForte,p:P.dynamicPiano,m:P.dynamicMezzo,s:P.dynamicSforzando,z:P.dynamicZ,r:P.dynamicRinforzando}}constructor(e){super(e),this.sequence=(e.text??``).toLowerCase(),this.line=e.line??0,this.text=``,An(`New Dynamics Text: `,this.sequence)}setLine(e){return this.line=e,this}preFormat(){return this.text=``,this.sequence.split(``).forEach(t=>{let n=e.GLYPHS[t];if(!n)throw new p(`Invalid dynamics character: `+t);this.text+=n}),this.preFormatted=!0,this}draw(){this.setRendered();let e=this.getAbsoluteX(),t=this.checkStave().getYForLine(this.line+-3);An(`Rendering Dynamics: `,this.sequence),this.renderText(this.checkContext(),e,t)}},Mn=class extends z{static get CATEGORY(){return f.TimeSigNote}constructor(e,t){super({duration:`b`}),this.timeSig=new Y(e,t),this.setWidth(this.timeSig.getWidth()),this.ignoreTicks=!0}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkStave(),t=this.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`timesignote`+(n?` `+n:``),this.getAttribute(`id`)),this.timeSig.drawAt(t,e,this.getAbsoluteX()),this.drawPointerRect(),t.closeGroup()}};function Nn(...e){Pn.DEBUG&&g(`VexFlow.VibratoBracket`,e)}var Pn=class extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.VibratoBracket}constructor(e){super(),this.vibrato=new St,e.start&&(this.start=e.start),e.stop&&(this.stop=e.stop),this.line=1}setLine(e){return this.line=e,this}setVibratoCode(e){return this.vibrato.setVibratoCode(e),this}draw(){let e=this.checkContext();this.setRendered();let t=this.start&&this.start.checkStave().getYForTopText(this.line)||this.stop&&this.stop.checkStave().getYForTopText(this.line)||0,n=this.start&&this.start.getAbsoluteX()||this.stop&&this.stop.checkStave().getTieStartX()||0,r=this.stop&&this.stop.getAbsoluteX()-this.stop.getWidth()-5||this.start&&this.start.checkStave().getTieEndX()-10||0;this.vibrato.setVibratoWidth(r-n),Nn(`Rendering VibratoBracket: startX:`,n,`stopX:`,r,`y:`,t),this.vibrato.renderText(e,n,t)}};function Fn(...e){In.DEBUG&&g(`VexFlow.Factory`,e)}var In=class e{static{this.DEBUG=!1}static newFromElementId(t,n=500,r=200){return new e({renderer:{elementId:t,width:n,height:r}})}constructor(e={}){Fn(`New factory: `,e),this.options={stave:{space:10},renderer:{elementId:``,width:500,height:200,background:`#FFF`}},this.setOptions(e)}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=void 0}setOptions(e){this.options={...this.options,...e},this.initRenderer(),this.reset()}initRenderer(){let{elementId:e,width:t,height:n,background:r}=this.options.renderer;if(e===null)return;if(e===``)throw Fn(this),new p(`renderer.elementId not set in FactoryOptions`);let i=this.options.renderer.backend;i===void 0&&(i=dt(document.getElementById(e))?K.Backends.CANVAS:K.Backends.SVG),this.context=K.buildContext(e,i,t,n,r)}getContext(){return this.context}setContext(e){return this.context=e,this}getStave(){return this.stave}getVoices(){return this.voices}Stave(e){let t=this.options.stave.space,n={x:0,y:0,width:this.options.renderer.width-t*1,options:{spacingBetweenLinesPx:t*1},...e},r=new X(n.x,n.y,n.width,n.options);return this.staves.push(r),r.setContext(this.context),this.stave=r,r}TabStave(e){let t=this.options.stave.space,n={x:0,y:0,width:this.options.renderer.width-t*1,options:{spacingBetweenLinesPx:t*1.3},...e},r=new En(n.x,n.y,n.width,n.options);return this.staves.push(r),r.setContext(this.context),this.stave=r,r}StaveNote(e){let t=new W(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GlyphNote(e,t,n){let r=new fn(e,t,n);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}RepeatNote(e,t,n){let r=new yn(e,t,n);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}GhostNote(e){let t=new dn(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TextNote(e){let t=new At(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}BarNote(e={}){let t=new Le(e.type);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}ClefNote(e){let t={type:`treble`,options:{size:`default`,annotation:void 0},...e},n=new Kt(t.type,t.options.size,t.options.annotation);return this.stave&&n.setStave(this.stave),n.setContext(this.context),this.renderQ.push(n),n}TimeSigNote(e){let t=new Mn({time:`4/4`,...e}.time);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}KeySigNote(e){let t=new mn(e.key,e.cancelKey,e.alterKey);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TabNote(e){let t=new Tn(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GraceNote(e){let t=new pn(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),t}GraceNoteGroup(e){let t=new ot(e.notes,e.slur);return t.setContext(this.context),t}Accidental(e){let t=new he(e.type);return t.setContext(this.context),t}Annotation(e){let t={text:`p`,hJustify:ve.CENTER,vJustify:ye.BOTTOM,...e},n=new be(t.text);return n.setJustification(t.hJustify),n.setVerticalJustification(t.vJustify),n.setFont(t.font),n.setContext(this.context),n}ChordSymbol(e){let t={vJustify:`top`,hJustify:`center`,...e},n=new We;return n.setHorizontal(t.hJustify),n.setVertical(t.vJustify),typeof t.fontFamily==`string`&&typeof t.fontSize==`number`?typeof t.fontWeight==`string`?n.setFont(t.fontFamily,t.fontSize,t.fontWeight):n.setFont(t.fontFamily,t.fontSize,``):typeof t.fontSize==`number`&&n.setFontSize(t.fontSize),n.setContext(this.context),n}Articulation(e){let t=new je(e?.type??`a.`);return e?.position!==void 0&&t.setPosition(e.position),e?.betweenLines!==void 0&&t.setBetweenLines(e.betweenLines),t.setContext(this.context),t}Ornament(e,t){let n={type:e,accidental:``,...t},r=new lt(e);return t?.position!==void 0&&r.setPosition(t.position),n.upperAccidental&&r.setUpperAccidental(n.upperAccidental),n.lowerAccidental&&r.setLowerAccidental(n.lowerAccidental),n.delayed!==void 0&&r.setDelayed(n.delayed),r.setContext(this.context),r}TextDynamics(e){let t={text:`p`,duration:`q`,dots:0,line:0,...e},n=new jn({text:t.text,line:t.line,duration:t.duration,dots:t.dots});return this.stave&&n.setStave(this.stave),n.setContext(this.context),this.renderQ.push(n),n}Fingering(e){let t={number:`0`,position:`left`,...e},n=new Ke(t.number);return n.setPosition(t.position),n.setContext(this.context),n}StringNumber(e,t=!0){let n=new bt(e.number);return n.setPosition(e.position),n.setContext(this.context),n.setDrawCircle(t),n}TickContext(){return new Rt}ModifierContext(){return new wt}MultiMeasureRest(e){let t=new hn(h(e.numberOfMeasures,`NoNumberOfMeasures`),e);return t.setContext(this.context),this.renderQ.push(t),t}Voice(e){let t=new G({time:`4/4`,...e}.time);return this.voices.push(t),t}StaveConnector(e){let t=new Z(e.topStave,e.bottomStave);return t.setType(e.type).setContext(this.context),this.renderQ.push(t),t}Formatter(e){return new Q(e)}Tuplet(e){let t={notes:[],options:{},...e},n=new Ht(t.notes,t.options).setContext(this.context);return this.renderQ.push(n),n}Beam(e){let t=new Gt(e.notes,e.options?.autoStem).setContext(this.context);return t.breakSecondaryAt(e.options?.secondaryBeamBreaks??[]),e.options?.partialBeamDirections&&Object.entries(e.options?.partialBeamDirections).forEach(([e,n])=>{t.setPartialBeamSideAt(Number(e),n)}),this.renderQ.push(t),t}Curve(e){let t=new Zt(e.from,e.to,e.options).setContext(this.context);return this.renderQ.push(t),t}StaveTie(e){let t=new nt({firstNote:e.from,lastNote:e.to,firstIndexes:e.firstIndexes,lastIndexes:e.lastIndexes},e.text);return e.options?.direction&&t.setDirection(e.options.direction),t.setContext(this.context),this.renderQ.push(t),t}StaveLine(e){let t=new xn({firstNote:e.from,lastNote:e.to,firstIndexes:e.firstIndexes,lastIndexes:e.lastIndexes});return e.options?.text&&t.setText(e.options.text),e.options?.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}VibratoBracket(e){let t=new Pn({start:e.from,stop:e.to});return e.options.line&&t.setLine(e.options.line),e.options.code&&t.setVibratoCode(e.options.code),t.setContext(this.context),this.renderQ.push(t),t}TextBracket(e){let t=new kn({start:e.from,stop:e.to,text:e.text,superscript:e.options.superscript,position:e.options.position});return e.options.line&&t.setLine(e.options.line),e.options.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}System(e={}){e.factory=this;let t=new Sn(e).setContext(this.context);return this.systems.push(t),t}EasyScore(e={}){return e.factory=this,new ln(e)}PedalMarking(e){let t={notes:[],options:{style:`mixed`},...e},n=new _n(t.notes);return n.setType(_n.typeString[t.options.style]),n.setContext(this.context),this.renderQ.push(n),n}NoteSubGroup(e){let t=new st({notes:[],...e}.notes);return t.setContext(this.context),t}draw(){let e=this.context;this.systems.forEach(t=>t.setContext(e).format()),this.staves.forEach(t=>t.setContext(e).drawWithStyle()),this.voices.forEach(t=>t.setContext(e).drawWithStyle()),this.renderQ.forEach(t=>{t.isRendered()||t.setContext(e).drawWithStyle()}),this.systems.forEach(t=>t.setContext(e).drawWithStyle()),this.reset()}},Ln=class extends Tn{static get CATEGORY(){return f.GraceTabNote}constructor(e){super(e,!1),this.renderOptions={...this.renderOptions,yShift:.3},this.updateWidth()}},Rn=class{constructor(e){this.music=new N,this.setKey(e)}setKey(e){return this.key=e,this.reset(),this}getKey(){return this.key}reset(){if(this.keyParts=this.music.getKeyParts(this.key),this.keyString=this.keyParts.root,this.keyParts.accidental&&(this.keyString+=this.keyParts.accidental),!N.scaleTypes[this.keyParts.type])throw new p(`BadArguments`,`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),N.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};let e=N.rootIndexes[this.keyParts.root];for(let t=0;t<N.roots.length;++t){let n=(e+t)%N.roots.length,r=N.roots[n],i=this.music.getRelativeNoteName(r,this.scale[t]);this.scaleMap[r]=i,this.scaleMapByValue[this.scale[t]]=i,this.originalScaleMapByValue[this.scale[t]]=i}return this}getAccidental(e){let t=this.music.getKeyParts(e).root,n=this.music.getNoteParts(this.scaleMap[t]);return{note:this.scaleMap[t],accidental:n.accidental}}selectNote(e){e=e.toLowerCase();let t=this.music.getNoteParts(e),n=this.scaleMap[t.root],r=this.music.getNoteParts(n);if(n===e)return{note:n,accidental:t.accidental,change:!1};let i=this.scaleMapByValue[this.music.getNoteValue(e)];if(i!==void 0)return{note:i,accidental:this.music.getNoteParts(i).accidental,change:!1};let a=this.originalScaleMapByValue[this.music.getNoteValue(e)];return a===void 0?r.root===e?(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[t.root])],this.scaleMapByValue[this.music.getNoteValue(r.root)]=r.root,this.scaleMap[r.root]=r.root,{note:r.root,accidental:void 0,change:!0}):(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[t.root])],this.scaleMapByValue[this.music.getNoteValue(e)]=e,delete this.scaleMap[r.root],this.scaleMap[r.root]=e,{note:e,accidental:t.accidental,change:!0}):(this.scaleMap[r.root]=a,delete this.scaleMapByValue[this.music.getNoteValue(n)],this.scaleMapByValue[this.music.getNoteValue(e)]=a,{note:a,accidental:this.music.getNoteParts(a).accidental,change:!0})}},zn=class e extends A{static get CATEGORY(){return f.StaveHairpin}static{this.type={CRESC:1,DECRESC:2}}static FormatByTicksAndDraw(t,n,r,i,a,o){let s=n.pixelsPerTick;if(s===null)throw new p(`BadArguments`,`A valid Formatter must be provide to draw offsets by ticks.`);let c=s*(o.leftShiftTicks??0),l=s*(o.rightShiftTicks??0),u={height:o.height,yShift:o.yShift,leftShiftPx:c,rightShiftPx:l,rightShiftTicks:0,leftShiftTicks:0};new e({firstNote:r.firstNote,lastNote:r.lastNote},i).setContext(t).setRenderOptions(u).setPosition(a).drawWithStyle()}constructor(e,t){super(),this.setNotes(e),this.hairpin=t,this.position=M.Position.BELOW,this.renderOptions={height:10,yShift:0,leftShiftPx:0,rightShiftPx:0,rightShiftTicks:0,leftShiftTicks:0}}setPosition(e){return(e===M.Position.ABOVE||e===M.Position.BELOW)&&(this.position=e),this}setRenderOptions(e){return this.renderOptions=e,this}setNotes(e){if(!e.firstNote&&!e.lastNote)throw new p(`BadArguments`,`Hairpin needs to have either firstNote or lastNote set.`);return this.notes=e,this.firstNote=e.firstNote,this.lastNote=e.lastNote,this}renderHairpin(t){let n=this.checkContext(),r=this.renderOptions.yShift+20,i=t.firstY;this.position===M.Position.ABOVE&&(r=-r+30,i=t.firstY-t.staffHeight);let a=this.renderOptions.leftShiftPx,o=this.renderOptions.rightShiftPx;switch(n.beginPath(),this.hairpin){case e.type.CRESC:n.moveTo(t.lastX+o,i+r),n.lineTo(t.firstX+a,i+this.renderOptions.height/2+r),n.lineTo(t.lastX+o,i+this.renderOptions.height+r);break;case e.type.DECRESC:n.moveTo(t.firstX+a,i+r),n.lineTo(t.lastX+o,i+this.renderOptions.height/2+r),n.lineTo(t.firstX+a,i+this.renderOptions.height+r)}n.stroke(),n.closePath()}draw(){this.checkContext(),this.setRendered();let e=this.firstNote,t=this.lastNote;if(!e||!t)throw new p(`NoNote`,`Notes required to draw`);let n=e.getModifierStartXY(this.position,0),r=t.getModifierStartXY(this.position,0);this.renderHairpin({firstX:n.x,lastX:r.x,firstY:e.checkStave().getY()+e.checkStave().getHeight(),lastY:t.checkStave().getY()+t.checkStave().getHeight(),staffHeight:e.checkStave().getHeight()})}},Bn=class e extends rt{static get CATEGORY(){return f.TabSlide}static get SLIDE_UP(){return 1}static get SLIDE_DOWN(){return-1}static createSlideUp(t){return new e(t,e.SLIDE_UP)}static createSlideDown(t){return new e(t,e.SLIDE_DOWN)}constructor(t,n){if(super(t,`sl.`),!n){let r=t.firstNote.getPositions()[0].fret;typeof r==`string`&&(r=parseInt(r,10));let i=t.lastNote.getPositions()[0].fret;typeof i==`string`&&(i=parseInt(i,10)),n=isNaN(r)||isNaN(i)?e.SLIDE_UP:r>i?e.SLIDE_DOWN:e.SLIDE_UP}this.direction=n,this.renderOptions.cp1=11,this.renderOptions.cp2=14,this.renderOptions.yShift=.5}renderTie(t){if(t.firstYs.length===0||t.lastYs.length===0)throw new p(`BadArguments`,`No Y-values to render`);let n=this.checkContext(),r=t.firstX,i=t.firstYs,a=t.lastX,o=t.direction;if(o!==e.SLIDE_UP&&o!==e.SLIDE_DOWN)throw new p(`BadSlide`,`Invalid slide direction`);let s=this.notes.firstIndexes;for(let e=0;e<s.length;++e){let t=i[s[e]]+this.renderOptions.yShift;if(isNaN(t))throw new p(`BadArguments`,`Bad indexes for slide rendering.`);n.beginPath(),n.moveTo(r,t+3*o),n.lineTo(a,t-3*o),n.closePath(),n.stroke()}this.setRendered()}},Vn=class extends M{static get CATEGORY(){return f.Tremolo}constructor(e){super(),this.num=e,this.position=M.Position.CENTER,this.text=P.tremolo1}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getStemDirection(),r=t.getFontScale(),i=T.get(`Tremolo.spacing`)*n*r,a=t.getAbsoluteX()+(n===L.UP?t.getGlyphWidth()-L.WIDTH/2:L.WIDTH/2),o=t.getStemExtents().topY+(this.num<=3?i:0);this.fontInfo.size=T.get(`Tremolo.fontSize`)*r;for(let t=0;t<this.num;++t)this.renderText(e,a,o),o+=i}},Hn=class e{static get names(){return{standard:`E/5,B/4,G/4,D/4,A/3,E/3`,dagdad:`D/5,A/4,G/4,D/4,A/3,D/3`,dropd:`E/5,B/4,G/4,D/4,A/3,D/3`,eb:`Eb/5,Bb/4,Gb/4,Db/4,Ab/3,Db/3`,standardBanjo:`D/5,B/4,G/4,D/4,G/5`}}constructor(e=`E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2`){this.tuningValues=[],this.setTuning(e)}noteToInteger(e){return I.keyProperties(e).intValue??-1}setTuning(t){e.names[t]&&(t=e.names[t]),this.tuningValues=[];let n=t.split(/\s*,\s*/);if(n.length===0)throw new p(`BadArguments`,`Invalid tuning string: ${t}`);for(let e=0;e<n.length;++e)this.tuningValues[e]=this.noteToInteger(n[e])}getValueForString(e){let t=Number(e);if(t<1||t>this.tuningValues.length)throw new p(`BadArguments`,`String number must be between 1 and ${this.tuningValues.length}:${e}`);return this.tuningValues[t-1]}getValueForFret(e,t){let n=this.getValueForString(t),r=Number(e);if(r<0)throw new p(`BadArguments`,`Fret number must be 0 or higher: ${e}`);return n+r}getNoteForFret(e,t){let n=this.getValueForFret(e,t),r=Math.floor(n/12),i=n%12;return`${I.integerToNote(i)}/${r}`}},Un=`0.0.1-alpha.1`,Wn=`9bb4391be6956ee50fb5978030c0a7e59208dafd`,Gn=`2026-09-09T16:23:00.419Z`,Kn=class{static{this.BUILD={VERSION:Un,ID:Wn,DATE:Gn,INFO:``}}static{this.Accidental=he}static{this.Annotation=be}static{this.Articulation=je}static{this.Barline=U}static{this.BarNote=Le}static{this.Beam=Gt}static{this.Bend=Re}static{this.BoundingBox=D}static{this.CanvasContext=pt}static{this.ChordSymbol=We}static{this.Clef=q}static{this.ClefNote=Kt}static{this.Crescendo=Yt}static{this.Curve=Zt}static{this.Dot=Ge}static{this.EasyScore=ln}static{this.Element=A}static{this.Factory=In}static{this.Font=k}static{this.Formatter=Q}static{this.Fraction=C}static{this.FretHandFinger=Ke}static{this.GhostNote=dn}static{this.GlyphNote=fn}static{this.GraceNote=pn}static{this.GraceNoteGroup=ot}static{this.GraceTabNote=Ln}static{this.KeyManager=Rn}static{this.KeySignature=J}static{this.KeySigNote=mn}static{this.Modifier=M}static{this.ModifierContext=wt}static{this.MultiMeasureRest=hn}static{this.Music=N}static{this.Note=z}static{this.NoteHead=Je}static{this.NoteSubGroup=st}static{this.Ornament=lt}static{this.Parenthesis=ut}static{this.Parser=tn}static{this.PedalMarking=_n}static{this.Registry=re}static{this.RenderContext=Me}static{this.Renderer=K}static{this.RepeatNote=yn}static{this.Repetition=Et}static{this.Stave=X}static{this.StaveConnector=Z}static{this.StaveHairpin=zn}static{this.StaveLine=xn}static{this.StaveModifier=V}static{this.StaveNote=W}static{this.StaveTempo=Ot}static{this.StaveText=jt}static{this.StaveTie=nt}static{this.Stem=L}static{this.StringNumber=bt}static{this.Stroke=xt}static{this.SVGContext=_t}static{this.System=Sn}static{this.TabNote=Tn}static{this.TabSlide=Bn}static{this.TabStave=En}static{this.TabTie=rt}static{this.TextBracket=kn}static{this.TextDynamics=jn}static{this.TextNote=At}static{this.TickContext=Rt}static{this.TimeSignature=Y}static{this.TimeSigNote=Mn}static{this.Tremolo=Vn}static{this.Tuning=Hn}static{this.Tuplet=Ht}static{this.Vibrato=St}static{this.VibratoBracket=Pn}static{this.Voice=G}static{this.Volta=Nt}static{this.RuntimeError=p}static{this.Test=void 0}static{this.AnnotationHorizontalJustify=ve}static{this.AnnotationVerticalJustify=ye}static{this.ChordSymbolHorizontalJustify=Ve}static{this.ChordSymbolVerticalJustify=He}static{this.SymbolModifiers=Ue}static{this.CurvePosition=Xt}static{this.FontWeight=O}static{this.FontStyle=ee}static{this.Glyphs=P}static{this.ModifierPosition=j}static{this.RendererBackends=vt}static{this.RendererLineEndType=yt}static{this.BarlineType=H}static{this.RepeatBracketType=Fe}static{this.StaveModifierPosition=B}static{this.VoltaType=Mt}static{this.TextBracketPosition=On}static{this.TextJustification=kt}static{this.VoiceMode=it}static async loadFonts(...e){e||=Object.keys(k.FILES);let t=[];for(let n of e)t.push(k.load(n));await Promise.all(t)}static setFonts(...e){E.fontFamily=e.join(`,`),T.clear()}static getFonts(){return T.get(`fontFamily`).split(`,`)}static get RENDER_PRECISION_PLACES(){return I.RENDER_PRECISION_PLACES}static set RENDER_PRECISION_PLACES(e){I.RENDER_PRECISION_PLACES=e}static get SOFTMAX_FACTOR(){return I.SOFTMAX_FACTOR}static set SOFTMAX_FACTOR(e){I.SOFTMAX_FACTOR=e}static get UNISON(){return I.UNISON}static set UNISON(e){I.UNISON=e}static get NOTATION_FONT_SCALE(){return I.NOTATION_FONT_SCALE}static set NOTATION_FONT_SCALE(e){I.NOTATION_FONT_SCALE=e}static get TABLATURE_FONT_SCALE(){return I.TABLATURE_FONT_SCALE}static set TABLATURE_FONT_SCALE(e){I.TABLATURE_FONT_SCALE=e}static get RESOLUTION(){return I.RESOLUTION}static set RESOLUTION(e){I.RESOLUTION=e}static get SLASH_NOTEHEAD_WIDTH(){return I.SLASH_NOTEHEAD_WIDTH}static set SLASH_NOTEHEAD_WIDTH(e){I.SLASH_NOTEHEAD_WIDTH=e}static get STAVE_LINE_DISTANCE(){return I.STAVE_LINE_DISTANCE}static set STAVE_LINE_DISTANCE(e){I.STAVE_LINE_DISTANCE=e}static get STAVE_LINE_THICKNESS(){return E.Stave.lineWidth}static set STAVE_LINE_THICKNESS(e){E.Stave.lineWidth=e,E.TabStave.lineWidth=e,T.clear(`Stave`),T.clear(`TabStave`)}static get STEM_HEIGHT(){return I.STEM_HEIGHT}static set STEM_HEIGHT(e){I.STEM_HEIGHT=e}static get STEM_WIDTH(){return I.STEM_WIDTH}static set STEM_WIDTH(e){I.STEM_WIDTH=e}static get TIME4_4(){return I.TIME4_4}static get unicode(){return I.unicode}static keySignature(e){return I.keySignature(e)}static hasKeySignature(e){return I.hasKeySignature(e)}static getKeySignatures(){return I.getKeySignatures()}static clefProperties(e){return I.clefProperties(e)}static keyProperties(e,t,n){return I.keyProperties(e,t,n)}static durationToTicks(e){return I.durationToTicks(e)}};return Kn.BUILD.INFO=`vexflow-core`,Kn});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.VexFlow=t())})(this,function(){function e(e,t,n=!0){if(typeof e!=`object`||!e)return!1;let r=e.constructor;if(n){for(;e!==null;){if(r=e.constructor,`CATEGORY`in r&&r.CATEGORY===t)return!0;e=Object.getPrototypeOf(e)}return!1}return`CATEGORY`in r&&r.CATEGORY===t}var t=t=>e(t,`Accidental`),n=t=>e(t,`Annotation`),r=t=>e(t,`Barline`),i=t=>e(t,`Dot`),a=t=>e(t,`GraceNote`),o=t=>e(t,`GraceNoteGroup`),s=t=>e(t,`Note`),c=t=>e(t,`RenderContext`),l=t=>e(t,`StaveNote`),u=t=>e(t,`StemmableNote`),d=t=>e(t,`TabNote`),f=function(e){return e.Accidental=`Accidental`,e.Annotation=`Annotation`,e.Articulation=`Articulation`,e.Barline=`Barline`,e.BarNote=`BarNote`,e.Beam=`Beam`,e.Bend=`Bend`,e.ChordSymbol=`ChordSymbol`,e.Clef=`Clef`,e.ClefNote=`ClefNote`,e.Crescendo=`Crescendo`,e.Curve=`Curve`,e.Dot=`Dot`,e.Element=`Element`,e.Flag=`Flag`,e.Fraction=`Fraction`,e.FretHandFinger=`FretHandFinger`,e.GhostNote=`GhostNote`,e.Glyph=`Glyph`,e.GlyphNote=`GlyphNote`,e.GraceNote=`GraceNote`,e.GraceNoteGroup=`GraceNoteGroup`,e.GraceTabNote=`GraceTabNote`,e.KeySignature=`KeySignature`,e.KeySigNote=`KeySigNote`,e.Modifier=`Modifier`,e.MultiMeasureRest=`MultiMeasureRest`,e.Note=`Note`,e.NoteHead=`NoteHead`,e.NoteSubGroup=`NoteSubGroup`,e.Ornament=`Ornament`,e.Parenthesis=`Parenthesis`,e.PedalMarking=`PedalMarking`,e.RenderContext=`RenderContext`,e.RepeatNote=`RepeatNote`,e.Repetition=`Repetition`,e.Stave=`Stave`,e.StaveConnector=`StaveConnector`,e.StaveHairpin=`StaveHairpin`,e.StaveLine=`StaveLine`,e.StaveModifier=`StaveModifier`,e.StaveNote=`StaveNote`,e.StaveSection=`StaveSection`,e.StaveTempo=`StaveTempo`,e.StaveText=`StaveText`,e.StaveTie=`StaveTie`,e.Stem=`Stem`,e.StemmableNote=`StemmableNote`,e.StringNumber=`StringNumber`,e.Stroke=`Stroke`,e.System=`System`,e.TabNote=`TabNote`,e.TabSlide=`TabSlide`,e.TabStave=`TabStave`,e.TabTie=`TabTie`,e.TextBracket=`TextBracket`,e.TextDynamics=`TextDynamics`,e.TextNote=`TextNote`,e.Tickable=`Tickable`,e.TimeSignature=`TimeSignature`,e.TimeSigNote=`TimeSigNote`,e.Tremolo=`Tremolo`,e.Tuplet=`Tuplet`,e.Vibrato=`Vibrato`,e.VibratoBracket=`VibratoBracket`,e.Voice=`Voice`,e.Volta=`Volta`,e}({});globalThis.structuredClone;var p=class extends Error{constructor(e,t=``){super(`[RuntimeError] `+e+`: `+t),this.code=e}};function m(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:Function(`return this`)()}function h(e,t=`undefined`,n=``){if(e===void 0)throw new p(t,n);return e}function g(e,...t){if(!t)return;let n=Array.prototype.slice.call(t).join(` `);m().console.log(e+`: `+n)}function _(...e){let t=e.join(` `),n=Error();m().console.log(`Warning: `,t,n.stack)}function v(e,t){return e%t>=t/2?parseInt(`${e/t}`,10)*t+t:parseInt(`${e/t}`,10)*t}function y(e,t){let n=t+(e-t)/2;return n%2>0&&(n=v(n*10,5)/10),n}function b(e){return`vf-${e}`}function x(e){return e%=2*Math.PI,e<0&&(e+=2*Math.PI),e}function S(e){return e.reduce((e,t)=>e+t,0)}var C=class e{static get CATEGORY(){return f.Fraction}static{this.fractionA=new e}static{this.fractionB=new e}static GCD(e,t){if(typeof e!=`number`||Number.isNaN(e)||typeof t!=`number`||Number.isNaN(t))throw new p(`BadArgument`,`Invalid numbers: ${e}, ${t}`);let n;for(;t!==0;)n=t,t=e%t,e=n;return e}static LCM(t,n){return t*n/e.GCD(t,n)}static LCMM(t){return t.length===0?0:t.length===1?t[0]:t.length===2?e.LCM(t[0],t[1]):e.LCM(t.shift(),e.LCMM(t))}constructor(e,t){this.numerator=1,this.denominator=1,this.set(e,t)}set(e=1,t=1){return this.numerator=e,this.denominator=t,this}value(){return this.numerator/this.denominator}simplify(){let t=this.numerator,n=this.denominator,r=e.GCD(t,n);return t/=r,n/=r,n<0&&(n=-n,t=-t),this.set(t,n)}add(t=0,n=1){let[r,i]=w(t,n),a=e.LCM(this.denominator,i),o=a/this.denominator,s=a/i,c=this.numerator*o+r*s;return this.set(c,a)}subtract(t=0,n=1){let[r,i]=w(t,n),a=e.LCM(this.denominator,i),o=a/this.denominator,s=a/i,c=this.numerator*o-r*s;return this.set(c,a)}multiply(e=1,t=1){let[n,r]=w(e,t);return this.set(this.numerator*n,this.denominator*r)}divide(e=1,t=1){let[n,r]=w(e,t);return this.set(this.numerator*r,this.denominator*n)}equals(t){let n=e.fractionA.copy(t).simplify(),r=e.fractionB.copy(this).simplify();return n.numerator===r.numerator&&n.denominator===r.denominator}greaterThan(t){let n=e.fractionA.copy(this);return n.subtract(t),n.numerator>0}greaterThanEquals(t){let n=e.fractionA.copy(this);return n.subtract(t),n.numerator>=0}lessThan(e){return!this.greaterThanEquals(e)}lessThanEquals(e){return!this.greaterThan(e)}clone(){return new e(this.numerator,this.denominator)}copy(e){return typeof e==`number`?this.set(e):this.set(e.numerator,e.denominator)}quotient(){return Math.floor(this.numerator/this.denominator)}remainder(){return this.numerator%this.denominator}makeAbs(){return this.denominator=Math.abs(this.denominator),this.numerator=Math.abs(this.numerator),this}toString(){return`${this.numerator}/${this.denominator}`}toSimplifiedString(){return e.fractionA.copy(this).simplify().toString()}toMixedString(){let t=``,n=this.quotient(),r=e.fractionA.copy(this);return n<0&&r.makeAbs(),n===0?t=r.numerator===0?`0`:r.toSimplifiedString():(t+=n,r.numerator!==0&&(t+=` ${r.toSimplifiedString()}`)),t}parse(e){let t=e.split(`/`),n=parseInt(t[0],10),r=t[1]?parseInt(t[1],10):1;return this.set(n,r)}};function w(e,t=1){return typeof e==`number`?[e,t]:[e.numerator,e.denominator]}var T=class e{static{this.cacheStyle=new Map}static{this.cacheFont=new Map}static clear(e){e?(this.cacheFont.delete(e),this.cacheStyle.delete(e)):(this.cacheFont.clear(),this.cacheStyle.clear())}static getFontInfo(t){let n=this.cacheFont.get(t);return n||(n={family:e.get(`${t}.fontFamily`),size:e.get(`${t}.fontSize`)*e.get(`${t}.fontScale`),weight:e.get(`${t}.fontWeight`),style:e.get(`${t}.fontStyle`)},this.cacheFont.set(t,n)),structuredClone(n)}static getStyle(t){let n=this.cacheStyle.get(t);return n||(n={fillStyle:e.get(`${t}.fillStyle`),strokeStyle:e.get(`${t}.strokeStyle`),lineWidth:e.get(`${t}.lineWidth`),lineDash:e.get(`${t}.lineDash`),shadowBlur:e.get(`${t}.shadowBlur`),shadowColor:e.get(`${t}.shadowColor`)},this.cacheStyle.set(t,n)),structuredClone(n)}static get(e,t){let n=e.split(`.`),r=n.pop(),i=E,a=t;for(;i;){a=i[r]??a;let e=n.shift();if(e)i=i[e];else break}return a}},E={pointerRect:!1,fontFamily:`Bravura,Academico`,fontSize:30,fontScale:1,fontWeight:`normal`,fontStyle:`normal`,Accidental:{cautionary:{fontSize:20},grace:{fontSize:20},noteheadAccidentalPadding:1,leftPadding:2,accidentalSpacing:3},Annotation:{fontSize:10},Bend:{fontSize:10,line:{strokeStyle:`#777777`,lineWidth:1}},ChordSymbol:{fontSize:12,spacing:.05,subscriptOffset:.2,superscriptOffset:-.4,superSubRatio:.6},FretHandFinger:{fontSize:9,fontWeight:`bold`},GraceNote:{fontScale:2/3},GraceTabNote:{fontScale:2/3},NoteHead:{minPadding:2},PedalMarking:{text:{fontSize:12,fontStyle:`italic`}},Repetition:{text:{fontSize:12,fontWeight:`bold`,offsetX:12,offsetY:25,spacing:5},coda:{offsetY:25},segno:{offsetY:10}},Stave:{strokeStyle:`#999999`,fontSize:8,padding:12,endPaddingMax:10,endPaddingMin:5,unalignedNotePadding:10},StaveConnector:{text:{fontSize:16}},StaveLine:{fontSize:10},StaveNote:{pointerRect:!0},StaveSection:{fontSize:10,fontWeight:`bold`,lineWidth:2,padding:2,strokeStyle:`black`},StaveTempo:{fontSize:14,glyph:{fontSize:25},name:{fontWeight:`bold`}},StaveText:{fontSize:16},StaveTie:{fontSize:10},Stem:{strokeStyle:`black`},StringNumber:{fontSize:10,fontWeight:`bold`,verticalPadding:8,stemPadding:2,leftPadding:5,rightPadding:6},Stroke:{text:{fontSize:10,fontStyle:`italic`,fontWeight:`bold`}},TabNote:{text:{fontSize:9}},TabSlide:{fontSize:10,fontStyle:`italic`,fontWeight:`bold`},TabStave:{strokeStyle:`#999999`,fontSize:8},TabTie:{fontSize:10},TextBracket:{fontSize:15,fontStyle:`italic`},TextNote:{text:{fontSize:12}},Tremolo:{spacing:7},Tuplet:{pointerRect:!0,yOffset:0,textYOffset:2,bracket:{padding:5,lineWidth:1,legLength:10},suffix:{fontScale:1/2,extraSpacing:1,suffixOffsetY:-3}},Volta:{fontSize:9,fontWeight:`bold`}},D=class e{static copy(t){return new e(t.x,t.y,t.w,t.h)}constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r}getX(){return this.x}getY(){return this.y}getW(){return this.w}getH(){return this.h}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setW(e){return this.w=e,this}setH(e){return this.h=e,this}move(e,t){return this.x+=e,this.y+=t,this}clone(){return e.copy(this)}mergeWith(e){let t=e,n=this.x<t.x?this.x:t.x,r=this.y<t.y?this.y:t.y,i=Math.max(this.x+this.w,t.x+t.w)-n,a=Math.max(this.y+this.h,t.y+t.h)-r;return this.x=n,this.y=r,this.w=i,this.h=a,this}},O=function(e){return e.NORMAL=`normal`,e.BOLD=`bold`,e}({}),ee=function(e){return e.NORMAL=`normal`,e.ITALIC=`italic`,e}({}),te,k=class e{static{this.scaleToPxFrom={pt:4/3,px:1,em:16,"%":4/25,in:96,mm:96/25.4,cm:96/2.54}}static convertSizeToPixelValue(t){if(typeof t==`number`)return t*e.scaleToPxFrom.pt;{let n=parseFloat(t);if(isNaN(n))return 0;let r=t.replace(/[\d.\s]/g,``).toLowerCase();return n*(e.scaleToPxFrom[r]??1)}}static convertSizeToPointValue(t){if(typeof t==`number`)return t;{let n=parseFloat(t);if(isNaN(n))return 0;let r=t.replace(/[\d.\s]/g,``).toLowerCase();return n*((e.scaleToPxFrom[r]??1)/e.scaleToPxFrom.pt)}}static validate(t,n,r,i){if(typeof t==`string`&&n===void 0&&r===void 0&&i===void 0)return e.fromCSSString(t);let a;return typeof t==`object`?(a=t.family,n=t.size,r=t.weight,i=t.style):a=t,a??=T.get(`fontFamily`),n??=T.get(`fontSize`)+`pt`,r??=`normal`,i??=`normal`,r===``&&(r=`normal`),i===``&&(i=`normal`),typeof n==`number`&&(n=`${n}pt`),typeof r==`number`&&(r=r.toString()),{family:a,size:n,weight:r,style:i}}static fromCSSString(e){te||=document.createElement(`span`),te.style.font=e;let{fontFamily:t,fontSize:n,fontWeight:r,fontStyle:i}=te.style;return{family:t,size:n,weight:r,style:i}}static toCSSString(e){if(!e)return``;let t,n=e.style;t=n===`normal`||n===``||n===void 0?``:n.trim()+` `;let r,i=e.weight;r=i===`normal`||i===``||i===void 0?``:typeof i==`number`?i+` `:i.trim()+` `;let a,o=e.size;a=o===void 0?T.get(`fontSize`)+`pt`:typeof o==`number`?o+`pt `:o.trim()+` `;let s=e.family??T.get(`fontFamily`);return`${t}${r}${a}${s}`}static scaleSize(e,t){if(typeof e==`number`)return e*t;{let n=parseFloat(e),r=e.replace(/[\d.\s]/g,``);return`${n*t}${r}`}}static isBold(e){if(!e)return!1;if(typeof e==`number`)return e>=600;{let t=parseInt(e,10);return isNaN(t)?e.toLowerCase()===`bold`:t>=600}}static isItalic(e){return e?e.toLowerCase()===`italic`:!1}static{this.HOST_URL=`https://cdn.jsdelivr.net/npm/@vexflow-fonts/`}static{this.FILES={Academico:`academico/academico.woff2`,Bravura:`bravura/bravura.woff2`,"Bravura Text":`bravuratext/bravuratext.woff2`,Edwin:`edwin/edwin-roman.woff2`,"Finale Ash":`finaleash/finaleash.woff2`,"Finale Ash Text":`finaleashtext/finaleashtext.woff2`,"Finale Broadway":`finalebroadway/finalebroadway.woff2`,"Finale Broadway Text":`finalebroadwaytext/finalebroadwaytext.woff2`,"Finale Jazz":`finalejazz/finalejazz.woff2`,"Finale Jazz Text":`finalejazztext/finalejazztext.woff2`,"Finale Maestro":`finalemaestro/finalemaestro.woff2`,"Finale Maestro Text":`finalemaestrotext/finalemaestrotext-regular.woff2`,Gonville:`gonville/gonville.woff2`,Gootville:`gootville/gootville.woff2`,"Gootville Text":`gootvilletext/gootvilletext.woff2`,Leipzig:`leipzig/leipzig.woff2`,Leland:`leland/leland.woff2`,"Leland Text":`lelandtext/lelandtext.woff2`,MuseJazz:`musejazz/musejazz.woff2`,"MuseJazz Text":`musejazztext/musejazztext.woff2`,Nepomuk:`nepomuk/nepomuk.woff2`,Petaluma:`petaluma/petaluma.woff2`,"Petaluma Script":`petalumascript/petalumascript.woff2`,"Petaluma Text":`petalumatext/petalumatext.woff2`,"Roboto Slab":`robotoslab/robotoslab-regular-400.woff2`,Sebastian:`sebastian/sebastian.woff2`,"Sebastian Text":`sebastiantext/sebastiantext.woff2`}}static async load(t,n,r){if(typeof FontFace>`u`)return Promise.reject(Error(`FontFace API is not available in this environment. Cannot load fonts.`));if(n===void 0){let r=e.FILES;if(!(t in r))return Promise.reject(Error(`Font ${t} not found in Font.FILES`));n=e.HOST_URL+r[t]}let i=new FontFace(t,`url(${n})`,r),a=i.load(),o;return typeof document<`u`?o=document.fonts:typeof self<`u`&&`fonts`in self&&(o=self.fonts),o?.add(i),a}static getURLForFont(t){let n=e.FILES;if(t in n)return e.HOST_URL+n[t]}},ne=class{constructor(){this.id={},this.type={},this.class={}}},re=class e{static getDefaultRegistry(){return e.defaultRegistry}static enableDefaultRegistry(t){e.defaultRegistry=t}static disableDefaultRegistry(){e.defaultRegistry=void 0}constructor(){this.index=new ne}clear(){return this.index=new ne,this}setIndexValue(e,t,n,r){let i=this.index;i[e][t]||(i[e][t]={}),i[e][t][n]=r}updateIndex({id:e,name:t,value:n,oldValue:r}){let i=this.getElementById(e);r!==void 0&&this.index[t][r]&&delete this.index[t][r][e],n&&i&&this.setIndexValue(t,n,i.getAttribute(`id`),i)}register(e,t){if(t||=e.getAttribute(`id`),!t)throw new p("Can't add element without `id` attribute to registry");return e.setAttribute(`id`,t),this.setIndexValue(`id`,t,t,e),this.updateIndex({id:t,name:`type`,value:e.getAttribute(`type`),oldValue:void 0}),e.onRegister(this),this}getElementById(e){return this.index.id?.[e]?.[e]}getElementsByAttribute(e,t){let n=this.index[e];if(n){let e=n[t];if(e)return Object.keys(e).map(t=>e[t])}return[]}getElementsByType(e){return this.getElementsByAttribute(`type`,e)}getElementsByClass(e){return this.getElementsByAttribute(`class`,e)}onUpdate(e){return[`id`,`type`,`class`].includes(e.name)&&this.updateIndex(e),this}},A=class e{static get CATEGORY(){return f.Element}static{this.ID=1e3}static newID(){return`auto${e.ID++}`}static setTextMeasurementCanvas(t){e.txtCanvas=t}static getTextMeasurementCanvas(){let t=e.txtCanvas;return t||(typeof document<`u`?t=document.createElement(`canvas`):typeof OffscreenCanvas<`u`&&(t=new OffscreenCanvas(300,150)),e.txtCanvas=t),t}constructor(t){this.children=[],this.style={},this._text=``,this.metricsValid=!1,this._textMetrics={fontBoundingBoxAscent:0,fontBoundingBoxDescent:0,actualBoundingBoxAscent:0,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:0,width:0,alphabeticBaseline:0,emHeightAscent:0,emHeightDescent:0,hangingBaseline:0,ideographicBaseline:0},this._height=0,this._width=0,this.xShift=0,this.yShift=0,this.x=0,this.y=0,this.attrs={id:e.newID(),type:t??this.constructor.CATEGORY,class:``},this.rendered=!1,this._fontInfo=T.getFontInfo(this.attrs.type),this.style=T.getStyle(this.attrs.type),this.fontScale=T.get(`${this.attrs.type}.fontScale`),this.shouldDrawPointerRect=T.get(`${this.attrs.type}.pointerRect`),re.getDefaultRegistry()?.register(this)}addChild(e){if(e.parent)throw new p(`Element`,`Parent already defined`);return e.parent=this,this.children.push(e),this}getCategory(){return this.attrs.type}setStyle(e){return this.style=e,this}setGroupStyle(e){return this.style=e,this.children.forEach(t=>t.setGroupStyle(e)),this}getStyle(){return this.style}applyStyle(e=this.context,t=this.getStyle()){return e?(t.shadowColor&&e.setShadowColor(t.shadowColor),t.shadowBlur&&e.setShadowBlur(t.shadowBlur),t.fillStyle&&e.setFillStyle(t.fillStyle),t.strokeStyle&&e.setStrokeStyle(t.strokeStyle),t.lineWidth&&e.setLineWidth(t.lineWidth),t.lineDash&&e.setLineDash(t.lineDash.split(` `).map(Number)),this):this}drawWithStyle(){let e=this.checkContext();return e.save(),this.applyStyle(e),this.draw(),e.restore(),this}draw(){throw new p(`Element`,`Draw not defined`)}hasClass(e){return this.attrs.class?this.attrs.class?.split(` `).indexOf(e)!==-1:!1}addClass(e){return this.hasClass(e)?this:(this.attrs.class?this.attrs.class=`${this.attrs.class} ${e}`:this.attrs.class=`${e}`,this.registry?.onUpdate({id:this.attrs.id,name:`class`,value:e,oldValue:void 0}),this)}removeClass(e){if(!this.hasClass(e))return this;let t=this.attrs.class?.split(` `);return t&&(t.splice(t.indexOf(e)),this.attrs.class=t.join(` `)),this.registry?.onUpdate({id:this.attrs.id,name:`class`,value:void 0,oldValue:e}),this}onRegister(e){return this.registry=e,this}isRendered(){return this.rendered}setRendered(e=!0){return this.rendered=e,this}getAttributes(){return this.attrs}getAttribute(e){return this.attrs[e]}getSVGElement(e=``){let t=b(this.attrs.id+e),n=document.getElementById(t);if(n)return n}setAttribute(e,t){let n=this.attrs.id,r=this.attrs[e];return this.attrs[e]=t,this.registry?.onUpdate({id:n,name:e,value:t,oldValue:r}),this}getBoundingBox(){return new D(this.x+this.xShift,this.y+this.yShift-this.textMetrics.actualBoundingBoxAscent,this.width,this.height)}getContext(){return this.context}drawPointerRect(){if(this.shouldDrawPointerRect){let e=this.getBoundingBox();this.context?.pointerRect(e.getX(),e.getY(),e.getW(),e.getH())}}setContext(e){return this.context=e,this}checkContext(){return h(this.context,`NoContext`,`No rendering context attached to instance.`)}set font(e){this.setFont(e)}get font(){return k.toCSSString(this._fontInfo)}setFont(e,t,n,r){let i=T.getFontInfo(this.attrs.type),a=typeof e==`object`,o=typeof e==`string`,s=t===void 0&&n===void 0&&r===void 0;return this.metricsValid=!1,this._fontInfo=a?{...i,...e}:o&&s?k.fromCSSString(e):k.validate(e??i.family,t??i.size,n??i.weight,r??i.style),this}getFont(){return k.toCSSString(this._fontInfo)}get fontInfo(){return this._fontInfo}set fontInfo(e){this.setFont(e)}setFontSize(e){let t=this.fontInfo;return this.setFont(t.family,e,t.weight,t.style),this}getFontSize(){return this.fontSize}getFontScale(){return this.fontScale}set fontSize(e){this.setFontSize(e)}get fontSize(){let e=this.fontInfo.size;return typeof e==`number`&&(e=`${e}pt`),e}get fontSizeInPoints(){return k.convertSizeToPointValue(this.fontSize)}get fontSizeInPixels(){return k.convertSizeToPixelValue(this.fontSize)}get fontStyle(){return this.fontInfo.style}set fontStyle(e){let t=this.fontInfo;this.setFont(t.family,t.size,t.weight,e)}get fontWeight(){return this.fontInfo.weight+``}set fontWeight(e){let t=this.fontInfo;this.setFont(t.family,t.size,e,t.style)}getWidth(){return this.width}get width(){return this.metricsValid||this.measureText(),this._width}setWidth(e){return this.width=e,this}set width(e){this.metricsValid||this.measureText(),this._width=e}setX(e){return this.x=e,this}getX(){return this.x}getY(){return this.y}setY(e){return this.y=e,this}setYShift(e){return this.yShift=e,this}getYShift(){return this.yShift}setXShift(e){return this.xShift=e,this}getXShift(){return this.xShift}setText(e){return this.text=e,this}set text(e){this.metricsValid=!1,this._text=e}getText(){return this._text}get text(){return this._text}renderText(e,t,n){e.setFont(this._fontInfo),e.fillText(this._text,t+this.x+this.xShift,n+this.y+this.yShift),this.children.forEach(r=>{e.setFont(r.fontInfo),e.fillText(r.text,t+r.x+r.xShift,n+r.y+r.yShift)})}measureText(){let t=e.getTextMeasurementCanvas()?.getContext(`2d`);return t?(t.font=k.toCSSString(k.validate(this.fontInfo)),this._textMetrics=t.measureText(this.text),this._height=this._textMetrics.actualBoundingBoxAscent+this._textMetrics.actualBoundingBoxDescent,this._width=this._textMetrics.width,this.metricsValid=!0,this._textMetrics):(console.warn(`Element: No context for txtCanvas. Returning empty text metrics.`),this._textMetrics)}static measureWidth(t,n=``){let r=e.getTextMeasurementCanvas()?.getContext(`2d`);return r?(r.font=k.toCSSString(T.getFontInfo(n)),r.measureText(t).width):(console.warn(`Element: No context for txtCanvas. Returning empty text metrics.`),0)}getTextMetrics(){return this.textMetrics}get textMetrics(){return this.metricsValid||this.measureText(),this._textMetrics}getHeight(){return this.height}get height(){return this.metricsValid||this.measureText(),this._height}set height(e){this.metricsValid||this.measureText(),this._height=e}setOriginX(e){let t=this.getBoundingBox(),n=(e-Math.abs((t.getX()-this.xShift)/t.getW()))*t.getW();this.xShift=-n}setOriginY(e){let t=this.getBoundingBox(),n=(e-Math.abs((t.getY()-this.yShift)/t.getH()))*t.getH();this.yShift=-n}setOrigin(e,t){this.setOriginX(e),this.setOriginY(t)}},j=function(e){return e[e.CENTER=0]=`CENTER`,e[e.LEFT=1]=`LEFT`,e[e.RIGHT=2]=`RIGHT`,e[e.ABOVE=3]=`ABOVE`,e[e.BELOW=4]=`BELOW`,e}({}),M=class e extends A{static get CATEGORY(){return f.Modifier}static get Position(){return j}static get PositionString(){return{center:0,above:3,below:4,left:1,right:2}}constructor(){super(),this.width=0,this.textLine=0,this.position=e.Position.LEFT,this.spacingFromNextModifier=0}reset(){}getNote(){return h(this.note,`NoNote`,`Modifier has no note.`)}checkAttachedNote(){let e=this.getCategory();return h(this.index,`NoIndex`,`Can't draw ${e} without an index.`),h(this.note,`NoNote`,`Can't draw ${e} without a note.`)}setNote(e){return this.note=e,this}getIndex(){return this.index}checkIndex(){return h(this.index,`NoIndex`,`Modifier has an invalid index.`)}setIndex(e){return this.index=e,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return h(this.modifierContext,`NoModifierContext`,`Modifier Context Required`)}setModifierContext(e){return this.modifierContext=e,this}getPosition(){return this.position}setPosition(t){return this.position=typeof t==`string`?e.PositionString[t]:t,this.reset(),this}setTextLine(e){return this.textLine=e,this}setYShift(e){return this.yShift=e,this}setSpacingFromNextModifier(e){this.spacingFromNextModifier=e}getSpacingFromNextModifier(){return this.spacingFromNextModifier}setXShift(t){return this.xShift=0,this.position===e.Position.LEFT?this.xShift-=t:this.xShift+=t,this}getXShift(){return this.xShift}draw(){throw this.checkContext(),new p(`NotImplemented`,`draw() not implemented for this modifier.`)}alignSubNotesWithNote(t,n,r=e.Position.LEFT){let i=n.getTickContext(),a=i.getMetrics(),o=n.getStave(),s=r===e.Position.RIGHT?i.getX()+this.getSpacingFromNextModifier()*t.length+10:i.getX()-a.modLeftPx-a.modRightPx+this.getSpacingFromNextModifier();t.forEach(e=>{let t=e.getTickContext();o&&e.setStave(o),t.setXOffset(s)})}},N=class e{static get NUM_TONES(){return this.canonicalNotes.length}static get roots(){return[`c`,`d`,`e`,`f`,`g`,`a`,`b`]}static get rootValues(){return[0,2,4,5,7,9,11]}static get rootIndexes(){return{c:0,d:1,e:2,f:3,g:4,a:5,b:6}}static get canonicalNotes(){return[`c`,`c#`,`d`,`d#`,`e`,`f`,`f#`,`g`,`g#`,`a`,`a#`,`b`]}static get diatonicIntervals(){return[`unison`,`m2`,`M2`,`m3`,`M3`,`p4`,`dim5`,`p5`,`m6`,`M6`,`b7`,`M7`,`octave`]}static get diatonicAccidentals(){return{unison:{note:0,accidental:0},m2:{note:1,accidental:-1},M2:{note:1,accidental:0},m3:{note:2,accidental:-1},M3:{note:2,accidental:0},p4:{note:3,accidental:0},dim5:{note:4,accidental:-1},p5:{note:4,accidental:0},m6:{note:5,accidental:-1},M6:{note:5,accidental:0},b7:{note:6,accidental:-1},M7:{note:6,accidental:0},octave:{note:7,accidental:0}}}static get intervals(){return{u:0,unison:0,m2:1,b2:1,min2:1,S:1,H:1,2:2,M2:2,maj2:2,T:2,W:2,m3:3,b3:3,min3:3,M3:4,3:4,maj3:4,4:5,p4:5,"#4":6,b5:6,aug4:6,dim5:6,5:7,p5:7,"#5":8,b6:8,aug5:8,6:9,M6:9,maj6:9,b7:10,m7:10,min7:10,dom7:10,M7:11,maj7:11,8:12,octave:12}}static get scales(){return{major:[2,2,1,2,2,2,1],minor:[2,1,2,2,1,2,2],ionian:[2,2,1,2,2,2,1],dorian:[2,1,2,2,2,1,2],phyrgian:[1,2,2,2,1,2,2],lydian:[2,2,2,1,2,2,1],mixolydian:[2,2,1,2,2,1,2],aeolian:[2,1,2,2,1,2,2],locrian:[1,2,2,1,2,2,2]}}static get scaleTypes(){return{M:e.scales.major,m:e.scales.minor}}static get accidentals(){return[`bb`,`b`,`n`,`#`,`##`]}static get noteValues(){return{c:{rootIndex:0,intVal:0},cn:{rootIndex:0,intVal:0},"c#":{rootIndex:0,intVal:1},"c##":{rootIndex:0,intVal:2},cb:{rootIndex:0,intVal:11},cbb:{rootIndex:0,intVal:10},d:{rootIndex:1,intVal:2},dn:{rootIndex:1,intVal:2},"d#":{rootIndex:1,intVal:3},"d##":{rootIndex:1,intVal:4},db:{rootIndex:1,intVal:1},dbb:{rootIndex:1,intVal:0},e:{rootIndex:2,intVal:4},en:{rootIndex:2,intVal:4},"e#":{rootIndex:2,intVal:5},"e##":{rootIndex:2,intVal:6},eb:{rootIndex:2,intVal:3},ebb:{rootIndex:2,intVal:2},f:{rootIndex:3,intVal:5},fn:{rootIndex:3,intVal:5},"f#":{rootIndex:3,intVal:6},"f##":{rootIndex:3,intVal:7},fb:{rootIndex:3,intVal:4},fbb:{rootIndex:3,intVal:3},g:{rootIndex:4,intVal:7},gn:{rootIndex:4,intVal:7},"g#":{rootIndex:4,intVal:8},"g##":{rootIndex:4,intVal:9},gb:{rootIndex:4,intVal:6},gbb:{rootIndex:4,intVal:5},a:{rootIndex:5,intVal:9},an:{rootIndex:5,intVal:9},"a#":{rootIndex:5,intVal:10},"a##":{rootIndex:5,intVal:11},ab:{rootIndex:5,intVal:8},abb:{rootIndex:5,intVal:7},b:{rootIndex:6,intVal:11},bn:{rootIndex:6,intVal:11},"b#":{rootIndex:6,intVal:0},"b##":{rootIndex:6,intVal:1},bb:{rootIndex:6,intVal:10},bbb:{rootIndex:6,intVal:9}}}isValidNoteValue(t){return t>=0&&t<e.canonicalNotes.length}isValidIntervalValue(t){return t>=0&&t<e.diatonicIntervals.length}getNoteParts(e){if(!e||e.length<1||e.length>3)throw new p(`BadArguments`,`Invalid note name: `+e);let t=e.toLowerCase(),n=/^([cdefgab])(b|bb|n|#|##)?$/.exec(t);if(n!==null)return{root:n[1],accidental:n[2]};throw new p(`BadArguments`,`Invalid note name: `+e)}getKeyParts(e){if(!e||e.length<1)throw new p(`BadArguments`,`Invalid key: `+e);let t=e.toLowerCase(),n=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(t);if(n!==null){let e=n[1],t=n[2],r=n[3];return r||=`M`,{root:e,accidental:t,type:r}}throw new p(`BadArguments`,`Invalid key: ${e}`)}getNoteValue(t){let n=e.noteValues[t];if(n===void 0)throw new p(`BadArguments`,`Invalid note name: ${t}`);return n.intVal}getIntervalValue(t){let n=e.intervals[t];if(n===void 0)throw new p(`BadArguments`,`Invalid interval name: ${t}`);return n}getCanonicalNoteName(t){if(!this.isValidNoteValue(t))throw new p(`BadArguments`,`Invalid note value: ${t}`);return e.canonicalNotes[t]}getCanonicalIntervalName(t){if(!this.isValidIntervalValue(t))throw new p(`BadArguments`,`Invalid interval value: ${t}`);return e.diatonicIntervals[t]}getRelativeNoteValue(t,n,r=1){if(r!==1&&r!==-1)throw new p(`BadArguments`,`Invalid direction: ${r}`);let i=(t+r*n)%e.NUM_TONES;return i<0&&(i+=e.NUM_TONES),i}getRelativeNoteName(t,n){let r=this.getNoteParts(t),i=this.getNoteValue(r.root),a=n-i;if(Math.abs(a)>e.NUM_TONES-3){let r=1;a>0&&(r=-1);let o=(n+1+(i+1))%e.NUM_TONES*r;if(Math.abs(o)>2)throw new p(`BadArguments`,`Notes not related: ${t}, ${n})`);a=o}if(Math.abs(a)>2)throw new p(`BadArguments`,`Notes not related: ${t}, ${n})`);let o=r.root;if(a>0)for(let e=1;e<=a;++e)o+=`#`;else if(a<0)for(let e=-1;e>=a;--e)o+=`b`;return o}getScaleTones(e,t){let n=[e],r=e;for(let i=0;i<t.length;i++)r=this.getRelativeNoteValue(r,t[i]),r!==e&&n.push(r);return n}getIntervalBetween(t,n,r=1){if(r!==1&&r!==-1)throw new p(`BadArguments`,`Invalid direction: ${r}`);if(!this.isValidNoteValue(t)||!this.isValidNoteValue(n))throw new p(`BadArguments`,`Invalid notes: ${t}, ${n}`);let i=r===1?n-t:t-n;return i<0&&(i+=e.NUM_TONES),i}createScaleMap(t){let n=this.getKeyParts(t);if(!n.type)throw new p(`BadArguments`,`Unsupported key type: undefined`);let r=e.scaleTypes[n.type],i=n.root;if(n.accidental&&(i+=n.accidental),!r)throw new p(`BadArguments`,`Unsupported key type: `+t);let a=this.getScaleTones(this.getNoteValue(i),r),o=e.rootIndexes[n.root],s={};for(let t=0;t<e.roots.length;++t){let n=(o+t)%e.roots.length,r=e.roots[n],i=this.getRelativeNoteName(r,a[t]);i.length===1&&(i+=`n`),s[r]=i}return s}},P=function(e){return e.null=`\0`,e.fourStringTabClef=``,e.sixStringTabClef=``,e.accSagittal11LargeDiesisDown=``,e.accSagittal11LargeDiesisUp=``,e.accSagittal11MediumDiesisDown=``,e.accSagittal11MediumDiesisUp=``,e.accSagittal11v19LargeDiesisDown=``,e.accSagittal11v19LargeDiesisUp=``,e.accSagittal11v19MediumDiesisDown=``,e.accSagittal11v19MediumDiesisUp=``,e.accSagittal11v49CommaDown=``,e.accSagittal11v49CommaUp=``,e.accSagittal143CommaDown=``,e.accSagittal143CommaUp=``,e.accSagittal17CommaDown=``,e.accSagittal17CommaUp=``,e.accSagittal17KleismaDown=``,e.accSagittal17KleismaUp=``,e.accSagittal19CommaDown=``,e.accSagittal19CommaUp=``,e.accSagittal19SchismaDown=``,e.accSagittal19SchismaUp=``,e.accSagittal1MinaDown=``,e.accSagittal1MinaUp=``,e.accSagittal1TinaDown=``,e.accSagittal1TinaUp=``,e.accSagittal23CommaDown=``,e.accSagittal23CommaUp=``,e.accSagittal23SmallDiesisDown=``,e.accSagittal23SmallDiesisUp=``,e.accSagittal25SmallDiesisDown=``,e.accSagittal25SmallDiesisUp=``,e.accSagittal2MinasDown=``,e.accSagittal2MinasUp=``,e.accSagittal2TinasDown=``,e.accSagittal2TinasUp=``,e.accSagittal35LargeDiesisDown=``,e.accSagittal35LargeDiesisUp=``,e.accSagittal35MediumDiesisDown=``,e.accSagittal35MediumDiesisUp=``,e.accSagittal3TinasDown=``,e.accSagittal3TinasUp=``,e.accSagittal49LargeDiesisDown=``,e.accSagittal49LargeDiesisUp=``,e.accSagittal49MediumDiesisDown=``,e.accSagittal49MediumDiesisUp=``,e.accSagittal49SmallDiesisDown=``,e.accSagittal49SmallDiesisUp=``,e.accSagittal4TinasDown=``,e.accSagittal4TinasUp=``,e.accSagittal55CommaDown=``,e.accSagittal55CommaUp=``,e.accSagittal5CommaDown=``,e.accSagittal5CommaUp=``,e.accSagittal5TinasDown=``,e.accSagittal5TinasUp=``,e.accSagittal5v11SmallDiesisDown=``,e.accSagittal5v11SmallDiesisUp=``,e.accSagittal5v13LargeDiesisDown=``,e.accSagittal5v13LargeDiesisUp=``,e.accSagittal5v13MediumDiesisDown=``,e.accSagittal5v13MediumDiesisUp=``,e.accSagittal5v19CommaDown=``,e.accSagittal5v19CommaUp=``,e.accSagittal5v23SmallDiesisDown=``,e.accSagittal5v23SmallDiesisUp=``,e.accSagittal5v49MediumDiesisDown=``,e.accSagittal5v49MediumDiesisUp=``,e.accSagittal5v7KleismaDown=``,e.accSagittal5v7KleismaUp=``,e.accSagittal6TinasDown=``,e.accSagittal6TinasUp=``,e.accSagittal7CommaDown=``,e.accSagittal7CommaUp=``,e.accSagittal7TinasDown=``,e.accSagittal7TinasUp=``,e.accSagittal7v11CommaDown=``,e.accSagittal7v11CommaUp=``,e.accSagittal7v11KleismaDown=``,e.accSagittal7v11KleismaUp=``,e.accSagittal7v19CommaDown=``,e.accSagittal7v19CommaUp=``,e.accSagittal8TinasDown=``,e.accSagittal8TinasUp=``,e.accSagittal9TinasDown=``,e.accSagittal9TinasUp=``,e.accSagittalAcute=``,e.accSagittalDoubleFlat=``,e.accSagittalDoubleFlat11v49CUp=``,e.accSagittalDoubleFlat143CUp=``,e.accSagittalDoubleFlat17CUp=``,e.accSagittalDoubleFlat17kUp=``,e.accSagittalDoubleFlat19CUp=``,e.accSagittalDoubleFlat19sUp=``,e.accSagittalDoubleFlat23CUp=``,e.accSagittalDoubleFlat23SUp=``,e.accSagittalDoubleFlat25SUp=``,e.accSagittalDoubleFlat49SUp=``,e.accSagittalDoubleFlat55CUp=``,e.accSagittalDoubleFlat5CUp=``,e.accSagittalDoubleFlat5v11SUp=``,e.accSagittalDoubleFlat5v19CUp=``,e.accSagittalDoubleFlat5v23SUp=``,e.accSagittalDoubleFlat5v7kUp=``,e.accSagittalDoubleFlat7CUp=``,e.accSagittalDoubleFlat7v11CUp=``,e.accSagittalDoubleFlat7v11kUp=``,e.accSagittalDoubleFlat7v19CUp=``,e.accSagittalDoubleSharp=``,e.accSagittalDoubleSharp11v49CDown=``,e.accSagittalDoubleSharp143CDown=``,e.accSagittalDoubleSharp17CDown=``,e.accSagittalDoubleSharp17kDown=``,e.accSagittalDoubleSharp19CDown=``,e.accSagittalDoubleSharp19sDown=``,e.accSagittalDoubleSharp23CDown=``,e.accSagittalDoubleSharp23SDown=``,e.accSagittalDoubleSharp25SDown=``,e.accSagittalDoubleSharp49SDown=``,e.accSagittalDoubleSharp55CDown=``,e.accSagittalDoubleSharp5CDown=``,e.accSagittalDoubleSharp5v11SDown=``,e.accSagittalDoubleSharp5v19CDown=``,e.accSagittalDoubleSharp5v23SDown=``,e.accSagittalDoubleSharp5v7kDown=``,e.accSagittalDoubleSharp7CDown=``,e.accSagittalDoubleSharp7v11CDown=``,e.accSagittalDoubleSharp7v11kDown=``,e.accSagittalDoubleSharp7v19CDown=``,e.accSagittalFlat=``,e.accSagittalFlat11LDown=``,e.accSagittalFlat11MDown=``,e.accSagittalFlat11v19LDown=``,e.accSagittalFlat11v19MDown=``,e.accSagittalFlat11v49CDown=``,e.accSagittalFlat11v49CUp=``,e.accSagittalFlat143CDown=``,e.accSagittalFlat143CUp=``,e.accSagittalFlat17CDown=``,e.accSagittalFlat17CUp=``,e.accSagittalFlat17kDown=``,e.accSagittalFlat17kUp=``,e.accSagittalFlat19CDown=``,e.accSagittalFlat19CUp=``,e.accSagittalFlat19sDown=``,e.accSagittalFlat19sUp=``,e.accSagittalFlat23CDown=``,e.accSagittalFlat23CUp=``,e.accSagittalFlat23SDown=``,e.accSagittalFlat23SUp=``,e.accSagittalFlat25SDown=``,e.accSagittalFlat25SUp=``,e.accSagittalFlat35LDown=``,e.accSagittalFlat35MDown=``,e.accSagittalFlat49LDown=``,e.accSagittalFlat49MDown=``,e.accSagittalFlat49SDown=``,e.accSagittalFlat49SUp=``,e.accSagittalFlat55CDown=``,e.accSagittalFlat55CUp=``,e.accSagittalFlat5CDown=``,e.accSagittalFlat5CUp=``,e.accSagittalFlat5v11SDown=``,e.accSagittalFlat5v11SUp=``,e.accSagittalFlat5v13LDown=``,e.accSagittalFlat5v13MDown=``,e.accSagittalFlat5v19CDown=``,e.accSagittalFlat5v19CUp=``,e.accSagittalFlat5v23SDown=``,e.accSagittalFlat5v23SUp=``,e.accSagittalFlat5v49MDown=``,e.accSagittalFlat5v7kDown=``,e.accSagittalFlat5v7kUp=``,e.accSagittalFlat7CDown=``,e.accSagittalFlat7CUp=``,e.accSagittalFlat7v11CDown=``,e.accSagittalFlat7v11CUp=``,e.accSagittalFlat7v11kDown=``,e.accSagittalFlat7v11kUp=``,e.accSagittalFlat7v19CDown=``,e.accSagittalFlat7v19CUp=``,e.accSagittalFractionalTinaDown=``,e.accSagittalFractionalTinaUp=``,e.accSagittalGrave=``,e.accSagittalShaftDown=``,e.accSagittalShaftUp=``,e.accSagittalSharp=``,e.accSagittalSharp11LUp=``,e.accSagittalSharp11MUp=``,e.accSagittalSharp11v19LUp=``,e.accSagittalSharp11v19MUp=``,e.accSagittalSharp11v49CDown=``,e.accSagittalSharp11v49CUp=``,e.accSagittalSharp143CDown=``,e.accSagittalSharp143CUp=``,e.accSagittalSharp17CDown=``,e.accSagittalSharp17CUp=``,e.accSagittalSharp17kDown=``,e.accSagittalSharp17kUp=``,e.accSagittalSharp19CDown=``,e.accSagittalSharp19CUp=``,e.accSagittalSharp19sDown=``,e.accSagittalSharp19sUp=``,e.accSagittalSharp23CDown=``,e.accSagittalSharp23CUp=``,e.accSagittalSharp23SDown=``,e.accSagittalSharp23SUp=``,e.accSagittalSharp25SDown=``,e.accSagittalSharp25SUp=``,e.accSagittalSharp35LUp=``,e.accSagittalSharp35MUp=``,e.accSagittalSharp49LUp=``,e.accSagittalSharp49MUp=``,e.accSagittalSharp49SDown=``,e.accSagittalSharp49SUp=``,e.accSagittalSharp55CDown=``,e.accSagittalSharp55CUp=``,e.accSagittalSharp5CDown=``,e.accSagittalSharp5CUp=``,e.accSagittalSharp5v11SDown=``,e.accSagittalSharp5v11SUp=``,e.accSagittalSharp5v13LUp=``,e.accSagittalSharp5v13MUp=``,e.accSagittalSharp5v19CDown=``,e.accSagittalSharp5v19CUp=``,e.accSagittalSharp5v23SDown=``,e.accSagittalSharp5v23SUp=``,e.accSagittalSharp5v49MUp=``,e.accSagittalSharp5v7kDown=``,e.accSagittalSharp5v7kUp=``,e.accSagittalSharp7CDown=``,e.accSagittalSharp7CUp=``,e.accSagittalSharp7v11CDown=``,e.accSagittalSharp7v11CUp=``,e.accSagittalSharp7v11kDown=``,e.accSagittalSharp7v11kUp=``,e.accSagittalSharp7v19CDown=``,e.accSagittalSharp7v19CUp=``,e.accSagittalUnused1=``,e.accSagittalUnused2=``,e.accSagittalUnused3=``,e.accSagittalUnused4=``,e.accdnCombDot=``,e.accdnCombLH2RanksEmpty=``,e.accdnCombLH3RanksEmptySquare=``,e.accdnCombRH3RanksEmpty=``,e.accdnCombRH4RanksEmpty=``,e.accdnDiatonicClef=``,e.accdnLH2Ranks16Round=``,e.accdnLH2Ranks8Plus16Round=``,e.accdnLH2Ranks8Round=``,e.accdnLH2RanksFullMasterRound=``,e.accdnLH2RanksMasterPlus16Round=``,e.accdnLH2RanksMasterRound=``,e.accdnLH3Ranks2Plus8Square=``,e.accdnLH3Ranks2Square=``,e.accdnLH3Ranks8Square=``,e.accdnLH3RanksDouble8Square=``,e.accdnLH3RanksTuttiSquare=``,e.accdnPull=``,e.accdnPush=``,e.accdnRH3RanksAccordion=``,e.accdnRH3RanksAuthenticMusette=``,e.accdnRH3RanksBandoneon=``,e.accdnRH3RanksBassoon=``,e.accdnRH3RanksClarinet=``,e.accdnRH3RanksDoubleTremoloLower8ve=``,e.accdnRH3RanksDoubleTremoloUpper8ve=``,e.accdnRH3RanksFullFactory=``,e.accdnRH3RanksHarmonium=``,e.accdnRH3RanksImitationMusette=``,e.accdnRH3RanksLowerTremolo8=``,e.accdnRH3RanksMaster=``,e.accdnRH3RanksOboe=``,e.accdnRH3RanksOrgan=``,e.accdnRH3RanksPiccolo=``,e.accdnRH3RanksTremoloLower8ve=``,e.accdnRH3RanksTremoloUpper8ve=``,e.accdnRH3RanksTwoChoirs=``,e.accdnRH3RanksUpperTremolo8=``,e.accdnRH3RanksViolin=``,e.accdnRH4RanksAlto=``,e.accdnRH4RanksBassAlto=``,e.accdnRH4RanksMaster=``,e.accdnRH4RanksSoftBass=``,e.accdnRH4RanksSoftTenor=``,e.accdnRH4RanksSoprano=``,e.accdnRH4RanksTenor=``,e.accdnRicochet2=``,e.accdnRicochet3=``,e.accdnRicochet4=``,e.accdnRicochet5=``,e.accdnRicochet6=``,e.accdnRicochetStem2=``,e.accdnRicochetStem3=``,e.accdnRicochetStem4=``,e.accdnRicochetStem5=``,e.accdnRicochetStem6=``,e.accidental1CommaFlat=``,e.accidental1CommaSharp=``,e.accidental2CommaFlat=``,e.accidental2CommaSharp=``,e.accidental3CommaFlat=``,e.accidental3CommaSharp=``,e.accidental4CommaFlat=``,e.accidental5CommaSharp=``,e.accidentalArrowDown=``,e.accidentalArrowUp=``,e.accidentalBakiyeFlat=``,e.accidentalBakiyeSharp=``,e.accidentalBracketLeft=``,e.accidentalBracketRight=``,e.accidentalBuyukMucennebFlat=``,e.accidentalBuyukMucennebSharp=``,e.accidentalCombiningCloseCurlyBrace=``,e.accidentalCombiningLower17Schisma=``,e.accidentalCombiningLower19Schisma=``,e.accidentalCombiningLower23Limit29LimitComma=``,e.accidentalCombiningLower29LimitComma=``,e.accidentalCombiningLower31Schisma=``,e.accidentalCombiningLower37Quartertone=``,e.accidentalCombiningLower41Comma=``,e.accidentalCombiningLower43Comma=``,e.accidentalCombiningLower47Quartertone=``,e.accidentalCombiningLower53LimitComma=``,e.accidentalCombiningOpenCurlyBrace=``,e.accidentalCombiningRaise17Schisma=``,e.accidentalCombiningRaise19Schisma=``,e.accidentalCombiningRaise23Limit29LimitComma=``,e.accidentalCombiningRaise29LimitComma=``,e.accidentalCombiningRaise31Schisma=``,e.accidentalCombiningRaise37Quartertone=``,e.accidentalCombiningRaise41Comma=``,e.accidentalCombiningRaise43Comma=``,e.accidentalCombiningRaise47Quartertone=``,e.accidentalCombiningRaise53LimitComma=``,e.accidentalCommaSlashDown=``,e.accidentalCommaSlashUp=``,e.accidentalDoubleFlat=``,e.accidentalDoubleFlatArabic=``,e.accidentalDoubleFlatEqualTempered=``,e.accidentalDoubleFlatOneArrowDown=``,e.accidentalDoubleFlatOneArrowUp=``,e.accidentalDoubleFlatReversed=``,e.accidentalDoubleFlatThreeArrowsDown=``,e.accidentalDoubleFlatThreeArrowsUp=``,e.accidentalDoubleFlatTurned=``,e.accidentalDoubleFlatTwoArrowsDown=``,e.accidentalDoubleFlatTwoArrowsUp=``,e.accidentalDoubleSharp=``,e.accidentalDoubleSharpArabic=``,e.accidentalDoubleSharpEqualTempered=``,e.accidentalDoubleSharpOneArrowDown=``,e.accidentalDoubleSharpOneArrowUp=``,e.accidentalDoubleSharpThreeArrowsDown=``,e.accidentalDoubleSharpThreeArrowsUp=``,e.accidentalDoubleSharpTwoArrowsDown=``,e.accidentalDoubleSharpTwoArrowsUp=``,e.accidentalEnharmonicAlmostEqualTo=``,e.accidentalEnharmonicEquals=``,e.accidentalEnharmonicTilde=``,e.accidentalFilledReversedFlatAndFlat=``,e.accidentalFilledReversedFlatAndFlatArrowDown=``,e.accidentalFilledReversedFlatAndFlatArrowUp=``,e.accidentalFilledReversedFlatArrowDown=``,e.accidentalFilledReversedFlatArrowUp=``,e.accidentalFiveQuarterTonesFlatArrowDown=``,e.accidentalFiveQuarterTonesSharpArrowUp=``,e.accidentalFlat=``,e.accidentalFlatArabic=``,e.accidentalFlatEqualTempered=``,e.accidentalFlatLoweredStockhausen=``,e.accidentalFlatOneArrowDown=``,e.accidentalFlatOneArrowUp=``,e.accidentalFlatRaisedStockhausen=``,e.accidentalFlatRepeatedLineStockhausen=``,e.accidentalFlatRepeatedSpaceStockhausen=``,e.accidentalFlatThreeArrowsDown=``,e.accidentalFlatThreeArrowsUp=``,e.accidentalFlatTurned=``,e.accidentalFlatTwoArrowsDown=``,e.accidentalFlatTwoArrowsUp=``,e.accidentalHabaFlatQuarterToneHigher=``,e.accidentalHabaFlatThreeQuarterTonesLower=``,e.accidentalHabaQuarterToneHigher=``,e.accidentalHabaQuarterToneLower=``,e.accidentalHabaSharpQuarterToneLower=``,e.accidentalHabaSharpThreeQuarterTonesHigher=``,e.accidentalHalfSharpArrowDown=``,e.accidentalHalfSharpArrowUp=``,e.accidentalJohnston13=``,e.accidentalJohnston31=``,e.accidentalJohnstonDown=``,e.accidentalJohnstonEl=``,e.accidentalJohnstonMinus=``,e.accidentalJohnstonPlus=``,e.accidentalJohnstonSeven=``,e.accidentalJohnstonUp=``,e.accidentalKomaFlat=``,e.accidentalKomaSharp=``,e.accidentalKoron=``,e.accidentalKucukMucennebFlat=``,e.accidentalKucukMucennebSharp=``,e.accidentalLargeDoubleSharp=``,e.accidentalLowerOneSeptimalComma=``,e.accidentalLowerOneTridecimalQuartertone=``,e.accidentalLowerOneUndecimalQuartertone=``,e.accidentalLowerTwoSeptimalCommas=``,e.accidentalLoweredStockhausen=``,e.accidentalNarrowReversedFlat=``,e.accidentalNarrowReversedFlatAndFlat=``,e.accidentalNatural=``,e.accidentalNaturalArabic=``,e.accidentalNaturalEqualTempered=``,e.accidentalNaturalFlat=``,e.accidentalNaturalLoweredStockhausen=``,e.accidentalNaturalOneArrowDown=``,e.accidentalNaturalOneArrowUp=``,e.accidentalNaturalRaisedStockhausen=``,e.accidentalNaturalReversed=``,e.accidentalNaturalSharp=``,e.accidentalNaturalThreeArrowsDown=``,e.accidentalNaturalThreeArrowsUp=``,e.accidentalNaturalTwoArrowsDown=``,e.accidentalNaturalTwoArrowsUp=``,e.accidentalOneAndAHalfSharpsArrowDown=``,e.accidentalOneAndAHalfSharpsArrowUp=``,e.accidentalOneQuarterToneFlatFerneyhough=``,e.accidentalOneQuarterToneFlatStockhausen=``,e.accidentalOneQuarterToneSharpFerneyhough=``,e.accidentalOneQuarterToneSharpStockhausen=``,e.accidentalOneThirdToneFlatFerneyhough=``,e.accidentalOneThirdToneSharpFerneyhough=``,e.accidentalParensLeft=``,e.accidentalParensRight=``,e.accidentalQuarterFlatEqualTempered=``,e.accidentalQuarterSharpEqualTempered=``,e.accidentalQuarterToneFlat4=``,e.accidentalQuarterToneFlatArabic=``,e.accidentalQuarterToneFlatArrowUp=``,e.accidentalQuarterToneFlatFilledReversed=``,e.accidentalQuarterToneFlatNaturalArrowDown=``,e.accidentalQuarterToneFlatPenderecki=``,e.accidentalQuarterToneFlatStein=``,e.accidentalQuarterToneFlatVanBlankenburg=``,e.accidentalQuarterToneSharp4=``,e.accidentalQuarterToneSharpArabic=``,e.accidentalQuarterToneSharpArrowDown=``,e.accidentalQuarterToneSharpBusotti=``,e.accidentalQuarterToneSharpNaturalArrowUp=``,e.accidentalQuarterToneSharpStein=``,e.accidentalQuarterToneSharpWiggle=``,e.accidentalRaiseOneSeptimalComma=``,e.accidentalRaiseOneTridecimalQuartertone=``,e.accidentalRaiseOneUndecimalQuartertone=``,e.accidentalRaiseTwoSeptimalCommas=``,e.accidentalRaisedStockhausen=``,e.accidentalReversedFlatAndFlatArrowDown=``,e.accidentalReversedFlatAndFlatArrowUp=``,e.accidentalReversedFlatArrowDown=``,e.accidentalReversedFlatArrowUp=``,e.accidentalSharp=``,e.accidentalSharpArabic=``,e.accidentalSharpEqualTempered=``,e.accidentalSharpLoweredStockhausen=``,e.accidentalSharpOneArrowDown=``,e.accidentalSharpOneArrowUp=``,e.accidentalSharpOneHorizontalStroke=``,e.accidentalSharpRaisedStockhausen=``,e.accidentalSharpRepeatedLineStockhausen=``,e.accidentalSharpRepeatedSpaceStockhausen=``,e.accidentalSharpReversed=``,e.accidentalSharpSharp=``,e.accidentalSharpThreeArrowsDown=``,e.accidentalSharpThreeArrowsUp=``,e.accidentalSharpTwoArrowsDown=``,e.accidentalSharpTwoArrowsUp=``,e.accidentalSims12Down=``,e.accidentalSims12Up=``,e.accidentalSims4Down=``,e.accidentalSims4Up=``,e.accidentalSims6Down=``,e.accidentalSims6Up=``,e.accidentalSori=``,e.accidentalTavenerFlat=``,e.accidentalTavenerSharp=``,e.accidentalThreeQuarterTonesFlatArabic=``,e.accidentalThreeQuarterTonesFlatArrowDown=``,e.accidentalThreeQuarterTonesFlatArrowUp=``,e.accidentalThreeQuarterTonesFlatCouper=``,e.accidentalThreeQuarterTonesFlatGrisey=``,e.accidentalThreeQuarterTonesFlatTartini=``,e.accidentalThreeQuarterTonesFlatZimmermann=``,e.accidentalThreeQuarterTonesSharpArabic=``,e.accidentalThreeQuarterTonesSharpArrowDown=``,e.accidentalThreeQuarterTonesSharpArrowUp=``,e.accidentalThreeQuarterTonesSharpBusotti=``,e.accidentalThreeQuarterTonesSharpStein=``,e.accidentalThreeQuarterTonesSharpStockhausen=``,e.accidentalTripleFlat=``,e.accidentalTripleSharp=``,e.accidentalTwoThirdTonesFlatFerneyhough=``,e.accidentalTwoThirdTonesSharpFerneyhough=``,e.accidentalUpsAndDownsDown=``,e.accidentalUpsAndDownsLess=``,e.accidentalUpsAndDownsMore=``,e.accidentalUpsAndDownsUp=``,e.accidentalWilsonMinus=``,e.accidentalWilsonPlus=``,e.accidentalWyschnegradsky10TwelfthsFlat=``,e.accidentalWyschnegradsky10TwelfthsSharp=``,e.accidentalWyschnegradsky11TwelfthsFlat=``,e.accidentalWyschnegradsky11TwelfthsSharp=``,e.accidentalWyschnegradsky1TwelfthsFlat=``,e.accidentalWyschnegradsky1TwelfthsSharp=``,e.accidentalWyschnegradsky2TwelfthsFlat=``,e.accidentalWyschnegradsky2TwelfthsSharp=``,e.accidentalWyschnegradsky3TwelfthsFlat=``,e.accidentalWyschnegradsky3TwelfthsSharp=``,e.accidentalWyschnegradsky4TwelfthsFlat=``,e.accidentalWyschnegradsky4TwelfthsSharp=``,e.accidentalWyschnegradsky5TwelfthsFlat=``,e.accidentalWyschnegradsky5TwelfthsSharp=``,e.accidentalWyschnegradsky6TwelfthsFlat=``,e.accidentalWyschnegradsky6TwelfthsSharp=``,e.accidentalWyschnegradsky7TwelfthsFlat=``,e.accidentalWyschnegradsky7TwelfthsSharp=``,e.accidentalWyschnegradsky8TwelfthsFlat=``,e.accidentalWyschnegradsky8TwelfthsSharp=``,e.accidentalWyschnegradsky9TwelfthsFlat=``,e.accidentalWyschnegradsky9TwelfthsSharp=``,e.accidentalXenakisOneThirdToneSharp=``,e.accidentalXenakisTwoThirdTonesSharp=``,e.analyticsChoralmelodie=``,e.analyticsEndStimme=``,e.analyticsHauptrhythmus=``,e.analyticsHauptstimme=``,e.analyticsInversion1=``,e.analyticsNebenstimme=``,e.analyticsStartStimme=``,e.analyticsTheme=``,e.analyticsTheme1=``,e.analyticsThemeInversion=``,e.analyticsThemeRetrograde=``,e.analyticsThemeRetrogradeInversion=``,e.arpeggiato=``,e.arpeggiatoDown=``,e.arpeggiatoUp=``,e.arrowBlackDown=``,e.arrowBlackDownLeft=``,e.arrowBlackDownRight=``,e.arrowBlackLeft=``,e.arrowBlackRight=``,e.arrowBlackUp=``,e.arrowBlackUpLeft=``,e.arrowBlackUpRight=``,e.arrowOpenDown=``,e.arrowOpenDownLeft=``,e.arrowOpenDownRight=``,e.arrowOpenLeft=``,e.arrowOpenRight=``,e.arrowOpenUp=``,e.arrowOpenUpLeft=``,e.arrowOpenUpRight=``,e.arrowWhiteDown=``,e.arrowWhiteDownLeft=``,e.arrowWhiteDownRight=``,e.arrowWhiteLeft=``,e.arrowWhiteRight=``,e.arrowWhiteUp=``,e.arrowWhiteUpLeft=``,e.arrowWhiteUpRight=``,e.arrowheadBlackDown=``,e.arrowheadBlackDownLeft=``,e.arrowheadBlackDownRight=``,e.arrowheadBlackLeft=``,e.arrowheadBlackRight=``,e.arrowheadBlackUp=``,e.arrowheadBlackUpLeft=``,e.arrowheadBlackUpRight=``,e.arrowheadOpenDown=``,e.arrowheadOpenDownLeft=``,e.arrowheadOpenDownRight=``,e.arrowheadOpenLeft=``,e.arrowheadOpenRight=``,e.arrowheadOpenUp=``,e.arrowheadOpenUpLeft=``,e.arrowheadOpenUpRight=``,e.arrowheadWhiteDown=``,e.arrowheadWhiteDownLeft=``,e.arrowheadWhiteDownRight=``,e.arrowheadWhiteLeft=``,e.arrowheadWhiteRight=``,e.arrowheadWhiteUp=``,e.arrowheadWhiteUpLeft=``,e.arrowheadWhiteUpRight=``,e.articAccentAbove=``,e.articAccentBelow=``,e.articAccentStaccatoAbove=``,e.articAccentStaccatoBelow=``,e.articLaissezVibrerAbove=``,e.articLaissezVibrerBelow=``,e.articMarcatoAbove=``,e.articMarcatoBelow=``,e.articMarcatoStaccatoAbove=``,e.articMarcatoStaccatoBelow=``,e.articMarcatoTenutoAbove=``,e.articMarcatoTenutoBelow=``,e.articSoftAccentAbove=``,e.articSoftAccentBelow=``,e.articSoftAccentStaccatoAbove=``,e.articSoftAccentStaccatoBelow=``,e.articSoftAccentTenutoAbove=``,e.articSoftAccentTenutoBelow=``,e.articSoftAccentTenutoStaccatoAbove=``,e.articSoftAccentTenutoStaccatoBelow=``,e.articStaccatissimoAbove=``,e.articStaccatissimoBelow=``,e.articStaccatissimoStrokeAbove=``,e.articStaccatissimoStrokeBelow=``,e.articStaccatissimoWedgeAbove=``,e.articStaccatissimoWedgeBelow=``,e.articStaccatoAbove=``,e.articStaccatoBelow=``,e.articStressAbove=``,e.articStressBelow=``,e.articTenutoAbove=``,e.articTenutoAccentAbove=``,e.articTenutoAccentBelow=``,e.articTenutoBelow=``,e.articTenutoStaccatoAbove=``,e.articTenutoStaccatoBelow=``,e.articUnstressAbove=``,e.articUnstressBelow=``,e.augmentationDot=``,e.barlineDashed=``,e.barlineDotted=``,e.barlineDouble=``,e.barlineFinal=``,e.barlineHeavy=``,e.barlineHeavyHeavy=``,e.barlineReverseFinal=``,e.barlineShort=``,e.barlineSingle=``,e.barlineTick=``,e.beamAccelRit1=``,e.beamAccelRit10=``,e.beamAccelRit11=``,e.beamAccelRit12=``,e.beamAccelRit13=``,e.beamAccelRit14=``,e.beamAccelRit15=``,e.beamAccelRit2=``,e.beamAccelRit3=``,e.beamAccelRit4=``,e.beamAccelRit5=``,e.beamAccelRit6=``,e.beamAccelRit7=``,e.beamAccelRit8=``,e.beamAccelRit9=``,e.beamAccelRitFinal=``,e.brace=``,e.bracket=``,e.bracketBottom=``,e.bracketTop=``,e.brassBend=``,e.brassDoitLong=``,e.brassDoitMedium=``,e.brassDoitShort=``,e.brassFallLipLong=``,e.brassFallLipMedium=``,e.brassFallLipShort=``,e.brassFallRoughLong=``,e.brassFallRoughMedium=``,e.brassFallRoughShort=``,e.brassFallSmoothLong=``,e.brassFallSmoothMedium=``,e.brassFallSmoothShort=``,e.brassFlip=``,e.brassHarmonMuteClosed=``,e.brassHarmonMuteStemHalfLeft=``,e.brassHarmonMuteStemHalfRight=``,e.brassHarmonMuteStemOpen=``,e.brassJazzTurn=``,e.brassLiftLong=``,e.brassLiftMedium=``,e.brassLiftShort=``,e.brassLiftSmoothLong=``,e.brassLiftSmoothMedium=``,e.brassLiftSmoothShort=``,e.brassMuteClosed=``,e.brassMuteHalfClosed=``,e.brassMuteOpen=``,e.brassPlop=``,e.brassScoop=``,e.brassSmear=``,e.brassValveTrill=``,e.breathMarkComma=``,e.breathMarkSalzedo=``,e.breathMarkTick=``,e.breathMarkUpbow=``,e.bridgeClef=``,e.buzzRoll=``,e.cClef=``,e.cClef8vb=``,e.cClefArrowDown=``,e.cClefArrowUp=``,e.cClefChange=``,e.cClefCombining=``,e.cClefReversed=``,e.cClefSquare=``,e.caesura=``,e.caesuraCurved=``,e.caesuraShort=``,e.caesuraSingleStroke=``,e.caesuraThick=``,e.chantAccentusAbove=``,e.chantAccentusBelow=``,e.chantAuctumAsc=``,e.chantAuctumDesc=``,e.chantAugmentum=``,e.chantCaesura=``,e.chantCclef=``,e.chantCirculusAbove=``,e.chantCirculusBelow=``,e.chantConnectingLineAsc2nd=``,e.chantConnectingLineAsc3rd=``,e.chantConnectingLineAsc4th=``,e.chantConnectingLineAsc5th=``,e.chantConnectingLineAsc6th=``,e.chantCustosStemDownPosHigh=``,e.chantCustosStemDownPosHighest=``,e.chantCustosStemDownPosMiddle=``,e.chantCustosStemUpPosLow=``,e.chantCustosStemUpPosLowest=``,e.chantCustosStemUpPosMiddle=``,e.chantDeminutumLower=``,e.chantDeminutumUpper=``,e.chantDivisioFinalis=``,e.chantDivisioMaior=``,e.chantDivisioMaxima=``,e.chantDivisioMinima=``,e.chantEntryLineAsc2nd=``,e.chantEntryLineAsc3rd=``,e.chantEntryLineAsc4th=``,e.chantEntryLineAsc5th=``,e.chantEntryLineAsc6th=``,e.chantEpisema=``,e.chantFclef=``,e.chantIctusAbove=``,e.chantIctusBelow=``,e.chantLigaturaDesc2nd=``,e.chantLigaturaDesc3rd=``,e.chantLigaturaDesc4th=``,e.chantLigaturaDesc5th=``,e.chantOriscusAscending=``,e.chantOriscusDescending=``,e.chantOriscusLiquescens=``,e.chantPodatusLower=``,e.chantPodatusUpper=``,e.chantPunctum=``,e.chantPunctumCavum=``,e.chantPunctumDeminutum=``,e.chantPunctumInclinatum=``,e.chantPunctumInclinatumAuctum=``,e.chantPunctumInclinatumDeminutum=``,e.chantPunctumLinea=``,e.chantPunctumLineaCavum=``,e.chantPunctumVirga=``,e.chantPunctumVirgaReversed=``,e.chantQuilisma=``,e.chantSemicirculusAbove=``,e.chantSemicirculusBelow=``,e.chantStaff=``,e.chantStaffNarrow=``,e.chantStaffWide=``,e.chantStrophicus=``,e.chantStrophicusAuctus=``,e.chantStrophicusLiquescens2nd=``,e.chantStrophicusLiquescens3rd=``,e.chantStrophicusLiquescens4th=``,e.chantStrophicusLiquescens5th=``,e.chantVirgula=``,e.clef15=``,e.clef8=``,e.clefChangeCombining=``,e.coda=``,e.codaSquare=``,e.conductorBeat2Compound=``,e.conductorBeat2Simple=``,e.conductorBeat3Compound=``,e.conductorBeat3Simple=``,e.conductorBeat4Compound=``,e.conductorBeat4Simple=``,e.conductorLeftBeat=``,e.conductorRightBeat=``,e.conductorStrongBeat=``,e.conductorUnconducted=``,e.conductorWeakBeat=``,e.controlBeginBeam=``,e.controlBeginPhrase=``,e.controlBeginSlur=``,e.controlBeginTie=``,e.controlEndBeam=``,e.controlEndPhrase=``,e.controlEndSlur=``,e.controlEndTie=``,e.csymAccidentalDoubleFlat=``,e.csymAccidentalDoubleSharp=``,e.csymAccidentalFlat=``,e.csymAccidentalNatural=``,e.csymAccidentalSharp=``,e.csymAccidentalTripleFlat=``,e.csymAccidentalTripleSharp=``,e.csymAlteredBassSlash=``,e.csymAugmented=``,e.csymBracketLeftTall=``,e.csymBracketRightTall=``,e.csymDiagonalArrangementSlash=``,e.csymDiminished=``,e.csymHalfDiminished=``,e.csymMajorSeventh=``,e.csymMinor=``,e.csymParensLeftTall=``,e.csymParensLeftVeryTall=``,e.csymParensRightTall=``,e.csymParensRightVeryTall=``,e.curlewSign=``,e.daCapo=``,e.dalSegno=``,e.daseianExcellentes1=``,e.daseianExcellentes2=``,e.daseianExcellentes3=``,e.daseianExcellentes4=``,e.daseianFinales1=``,e.daseianFinales2=``,e.daseianFinales3=``,e.daseianFinales4=``,e.daseianGraves1=``,e.daseianGraves2=``,e.daseianGraves3=``,e.daseianGraves4=``,e.daseianResidua1=``,e.daseianResidua2=``,e.daseianSuperiores1=``,e.daseianSuperiores2=``,e.daseianSuperiores3=``,e.daseianSuperiores4=``,e.doubleLateralRollStevens=``,e.doubleTongueAbove=``,e.doubleTongueBelow=``,e.dynamicCombinedSeparatorColon=``,e.dynamicCombinedSeparatorHyphen=``,e.dynamicCombinedSeparatorSlash=``,e.dynamicCombinedSeparatorSpace=``,e.dynamicCrescendoHairpin=``,e.dynamicDiminuendoHairpin=``,e.dynamicFF=``,e.dynamicFFF=``,e.dynamicFFFF=``,e.dynamicFFFFF=``,e.dynamicFFFFFF=``,e.dynamicForte=``,e.dynamicFortePiano=``,e.dynamicForzando=``,e.dynamicHairpinBracketLeft=``,e.dynamicHairpinBracketRight=``,e.dynamicHairpinParenthesisLeft=``,e.dynamicHairpinParenthesisRight=``,e.dynamicMF=``,e.dynamicMP=``,e.dynamicMessaDiVoce=``,e.dynamicMezzo=``,e.dynamicNiente=``,e.dynamicNienteForHairpin=``,e.dynamicPF=``,e.dynamicPP=``,e.dynamicPPP=``,e.dynamicPPPP=``,e.dynamicPPPPP=``,e.dynamicPPPPPP=``,e.dynamicPiano=``,e.dynamicRinforzando=``,e.dynamicRinforzando1=``,e.dynamicRinforzando2=``,e.dynamicSforzando=``,e.dynamicSforzando1=``,e.dynamicSforzandoPianissimo=``,e.dynamicSforzandoPiano=``,e.dynamicSforzato=``,e.dynamicSforzatoFF=``,e.dynamicSforzatoPiano=``,e.dynamicZ=``,e.elecAudioChannelsEight=``,e.elecAudioChannelsFive=``,e.elecAudioChannelsFour=``,e.elecAudioChannelsOne=``,e.elecAudioChannelsSeven=``,e.elecAudioChannelsSix=``,e.elecAudioChannelsThreeFrontal=``,e.elecAudioChannelsThreeSurround=``,e.elecAudioChannelsTwo=``,e.elecAudioIn=``,e.elecAudioMono=``,e.elecAudioOut=``,e.elecAudioStereo=``,e.elecCamera=``,e.elecDataIn=``,e.elecDataOut=``,e.elecDisc=``,e.elecDownload=``,e.elecEject=``,e.elecFastForward=``,e.elecHeadphones=``,e.elecHeadset=``,e.elecLineIn=``,e.elecLineOut=``,e.elecLoop=``,e.elecLoudspeaker=``,e.elecMIDIController0=``,e.elecMIDIController100=``,e.elecMIDIController20=``,e.elecMIDIController40=``,e.elecMIDIController60=``,e.elecMIDIController80=``,e.elecMIDIIn=``,e.elecMIDIOut=``,e.elecMicrophone=``,e.elecMicrophoneMute=``,e.elecMicrophoneUnmute=``,e.elecMixingConsole=``,e.elecMonitor=``,e.elecMute=``,e.elecPause=``,e.elecPlay=``,e.elecPowerOnOff=``,e.elecProjector=``,e.elecReplay=``,e.elecRewind=``,e.elecShuffle=``,e.elecSkipBackwards=``,e.elecSkipForwards=``,e.elecStop=``,e.elecTape=``,e.elecUSB=``,e.elecUnmute=``,e.elecUpload=``,e.elecVideoCamera=``,e.elecVideoIn=``,e.elecVideoOut=``,e.elecVolumeFader=``,e.elecVolumeFaderThumb=``,e.elecVolumeLevel0=``,e.elecVolumeLevel100=``,e.elecVolumeLevel20=``,e.elecVolumeLevel40=``,e.elecVolumeLevel60=``,e.elecVolumeLevel80=``,e.fClef=``,e.fClef15ma=``,e.fClef15mb=``,e.fClef8va=``,e.fClef8vb=``,e.fClefArrowDown=``,e.fClefArrowUp=``,e.fClefChange=``,e.fClefReversed=``,e.fClefTurned=``,e.fermataAbove=``,e.fermataBelow=``,e.fermataLongAbove=``,e.fermataLongBelow=``,e.fermataLongHenzeAbove=``,e.fermataLongHenzeBelow=``,e.fermataShortAbove=``,e.fermataShortBelow=``,e.fermataShortHenzeAbove=``,e.fermataShortHenzeBelow=``,e.fermataVeryLongAbove=``,e.fermataVeryLongBelow=``,e.fermataVeryShortAbove=``,e.fermataVeryShortBelow=``,e.figbass0=``,e.figbass1=``,e.figbass2=``,e.figbass2Raised=``,e.figbass3=``,e.figbass4=``,e.figbass4Raised=``,e.figbass5=``,e.figbass5Raised1=``,e.figbass5Raised2=``,e.figbass5Raised3=``,e.figbass6=``,e.figbass6Raised=``,e.figbass6Raised2=``,e.figbass7=``,e.figbass7Diminished=``,e.figbass7Raised1=``,e.figbass7Raised2=``,e.figbass8=``,e.figbass9=``,e.figbass9Raised=``,e.figbassBracketLeft=``,e.figbassBracketRight=``,e.figbassCombiningLowering=``,e.figbassCombiningRaising=``,e.figbassDoubleFlat=``,e.figbassDoubleSharp=``,e.figbassFlat=``,e.figbassNatural=``,e.figbassParensLeft=``,e.figbassParensRight=``,e.figbassPlus=``,e.figbassSharp=``,e.figbassTripleFlat=``,e.figbassTripleSharp=``,e.fingering0=``,e.fingering0Italic=``,e.fingering1=``,e.fingering1Italic=``,e.fingering2=``,e.fingering2Italic=``,e.fingering3=``,e.fingering3Italic=``,e.fingering4=``,e.fingering4Italic=``,e.fingering5=``,e.fingering5Italic=``,e.fingering6=``,e.fingering6Italic=``,e.fingering7=``,e.fingering7Italic=``,e.fingering8=``,e.fingering8Italic=``,e.fingering9=``,e.fingering9Italic=``,e.fingeringALower=``,e.fingeringCLower=``,e.fingeringELower=``,e.fingeringILower=``,e.fingeringLeftBracket=``,e.fingeringLeftBracketItalic=``,e.fingeringLeftParenthesis=``,e.fingeringLeftParenthesisItalic=``,e.fingeringMLower=``,e.fingeringMultipleNotes=``,e.fingeringOLower=``,e.fingeringPLower=``,e.fingeringQLower=``,e.fingeringRightBracket=``,e.fingeringRightBracketItalic=``,e.fingeringRightParenthesis=``,e.fingeringRightParenthesisItalic=``,e.fingeringSLower=``,e.fingeringSeparatorMiddleDot=``,e.fingeringSeparatorMiddleDotWhite=``,e.fingeringSeparatorSlash=``,e.fingeringSubstitutionAbove=``,e.fingeringSubstitutionBelow=``,e.fingeringSubstitutionDash=``,e.fingeringTLower=``,e.fingeringTUpper=``,e.fingeringXLower=``,e.flag1024thDown=``,e.flag1024thUp=``,e.flag128thDown=``,e.flag128thUp=``,e.flag16thDown=``,e.flag16thUp=``,e.flag256thDown=``,e.flag256thUp=``,e.flag32ndDown=``,e.flag32ndUp=``,e.flag512thDown=``,e.flag512thUp=``,e.flag64thDown=``,e.flag64thUp=``,e.flag8thDown=``,e.flag8thUp=``,e.flagInternalDown=``,e.flagInternalUp=``,e.fretboard3String=``,e.fretboard3StringNut=``,e.fretboard4String=``,e.fretboard4StringNut=``,e.fretboard5String=``,e.fretboard5StringNut=``,e.fretboard6String=``,e.fretboard6StringNut=``,e.fretboardFilledCircle=``,e.fretboardO=``,e.fretboardX=``,e.functionAngleLeft=``,e.functionAngleRight=``,e.functionBracketLeft=``,e.functionBracketRight=``,e.functionDD=``,e.functionDLower=``,e.functionDUpper=``,e.functionEight=``,e.functionFUpper=``,e.functionFive=``,e.functionFour=``,e.functionGLower=``,e.functionGUpper=``,e.functionGreaterThan=``,e.functionILower=``,e.functionIUpper=``,e.functionKLower=``,e.functionKUpper=``,e.functionLLower=``,e.functionLUpper=``,e.functionLessThan=``,e.functionMLower=``,e.functionMUpper=``,e.functionMinus=``,e.functionNLower=``,e.functionNUpper=``,e.functionNUpperSuperscript=``,e.functionNine=``,e.functionOne=``,e.functionPLower=``,e.functionPUpper=``,e.functionParensLeft=``,e.functionParensRight=``,e.functionPlus=``,e.functionRLower=``,e.functionRepetition1=``,e.functionRepetition2=``,e.functionRing=``,e.functionSLower=``,e.functionSSLower=``,e.functionSSUpper=``,e.functionSUpper=``,e.functionSeven=``,e.functionSix=``,e.functionSlashedDD=``,e.functionTLower=``,e.functionTUpper=``,e.functionThree=``,e.functionTwo=``,e.functionVLower=``,e.functionVUpper=``,e.functionZero=``,e.gClef=``,e.gClef15ma=``,e.gClef15mb=``,e.gClef8va=``,e.gClef8vb=``,e.gClef8vbCClef=``,e.gClef8vbOld=``,e.gClef8vbParens=``,e.gClefArrowDown=``,e.gClefArrowUp=``,e.gClefChange=``,e.gClefLigatedNumberAbove=``,e.gClefLigatedNumberBelow=``,e.gClefReversed=``,e.gClefTurned=``,e.glissandoDown=``,e.glissandoUp=``,e.graceNoteAcciaccaturaStemDown=``,e.graceNoteAcciaccaturaStemUp=``,e.graceNoteAppoggiaturaStemDown=``,e.graceNoteAppoggiaturaStemUp=``,e.graceNoteSlashStemDown=``,e.graceNoteSlashStemUp=``,e.guitarBarreFull=``,e.guitarBarreHalf=``,e.guitarClosePedal=``,e.guitarFadeIn=``,e.guitarFadeOut=``,e.guitarGolpe=``,e.guitarHalfOpenPedal=``,e.guitarLeftHandTapping=``,e.guitarOpenPedal=``,e.guitarRightHandTapping=``,e.guitarShake=``,e.guitarString0=``,e.guitarString1=``,e.guitarString10=``,e.guitarString11=``,e.guitarString12=``,e.guitarString13=``,e.guitarString2=``,e.guitarString3=``,e.guitarString4=``,e.guitarString5=``,e.guitarString6=``,e.guitarString7=``,e.guitarString8=``,e.guitarString9=``,e.guitarStrumDown=``,e.guitarStrumUp=``,e.guitarVibratoBarDip=``,e.guitarVibratoBarScoop=``,e.guitarVibratoStroke=``,e.guitarVolumeSwell=``,e.guitarWideVibratoStroke=``,e.handbellsBelltree=``,e.handbellsDamp3=``,e.handbellsEcho1=``,e.handbellsEcho2=``,e.handbellsGyro=``,e.handbellsHandMartellato=``,e.handbellsMalletBellOnTable=``,e.handbellsMalletBellSuspended=``,e.handbellsMalletLft=``,e.handbellsMartellato=``,e.handbellsMartellatoLift=``,e.handbellsMutedMartellato=``,e.handbellsPluckLift=``,e.handbellsSwing=``,e.handbellsSwingDown=``,e.handbellsSwingUp=``,e.handbellsTablePairBells=``,e.handbellsTableSingleBell=``,e.harpMetalRod=``,e.harpPedalCentered=``,e.harpPedalDivider=``,e.harpPedalLowered=``,e.harpPedalRaised=``,e.harpSalzedoAeolianAscending=``,e.harpSalzedoAeolianDescending=``,e.harpSalzedoDampAbove=``,e.harpSalzedoDampBelow=``,e.harpSalzedoDampBothHands=``,e.harpSalzedoDampLowStrings=``,e.harpSalzedoFluidicSoundsLeft=``,e.harpSalzedoFluidicSoundsRight=``,e.harpSalzedoIsolatedSounds=``,e.harpSalzedoMetallicSounds=``,e.harpSalzedoMetallicSoundsOneString=``,e.harpSalzedoMuffleTotally=``,e.harpSalzedoOboicFlux=``,e.harpSalzedoPlayUpperEnd=``,e.harpSalzedoSlideWithSuppleness=``,e.harpSalzedoSnareDrum=``,e.harpSalzedoTamTamSounds=``,e.harpSalzedoThunderEffect=``,e.harpSalzedoTimpanicSounds=``,e.harpSalzedoWhistlingSounds=``,e.harpStringNoiseStem=``,e.harpTuningKey=``,e.harpTuningKeyGlissando=``,e.harpTuningKeyHandle=``,e.harpTuningKeyShank=``,e.indianDrumClef=``,e.kahnBackChug=``,e.kahnBackFlap=``,e.kahnBackRiff=``,e.kahnBackRip=``,e.kahnBallChange=``,e.kahnBallDig=``,e.kahnBrushBackward=``,e.kahnBrushForward=``,e.kahnChug=``,e.kahnClap=``,e.kahnDoubleSnap=``,e.kahnDoubleWing=``,e.kahnDrawStep=``,e.kahnDrawTap=``,e.kahnFlam=``,e.kahnFlap=``,e.kahnFlapStep=``,e.kahnFlat=``,e.kahnFleaHop=``,e.kahnFleaTap=``,e.kahnGraceTap=``,e.kahnGraceTapChange=``,e.kahnGraceTapHop=``,e.kahnGraceTapStamp=``,e.kahnHeel=``,e.kahnHeelChange=``,e.kahnHeelClick=``,e.kahnHeelDrop=``,e.kahnHeelStep=``,e.kahnHeelTap=``,e.kahnHop=``,e.kahnJumpApart=``,e.kahnJumpTogether=``,e.kahnKneeInward=``,e.kahnKneeOutward=``,e.kahnLeap=``,e.kahnLeapFlatFoot=``,e.kahnLeapHeelClick=``,e.kahnLeftCatch=``,e.kahnLeftCross=``,e.kahnLeftFoot=``,e.kahnLeftToeStrike=``,e.kahnLeftTurn=``,e.kahnOverTheTop=``,e.kahnOverTheTopTap=``,e.kahnPull=``,e.kahnPush=``,e.kahnRiff=``,e.kahnRiffle=``,e.kahnRightCatch=``,e.kahnRightCross=``,e.kahnRightFoot=``,e.kahnRightToeStrike=``,e.kahnRightTurn=``,e.kahnRip=``,e.kahnRipple=``,e.kahnScrape=``,e.kahnScuff=``,e.kahnScuffle=``,e.kahnShuffle=``,e.kahnSlam=``,e.kahnSlap=``,e.kahnSlideStep=``,e.kahnSlideTap=``,e.kahnSnap=``,e.kahnStamp=``,e.kahnStampStamp=``,e.kahnStep=``,e.kahnStepStamp=``,e.kahnStomp=``,e.kahnStompBrush=``,e.kahnTap=``,e.kahnToe=``,e.kahnToeClick=``,e.kahnToeDrop=``,e.kahnToeStep=``,e.kahnToeTap=``,e.kahnTrench=``,e.kahnWing=``,e.kahnWingChange=``,e.kahnZank=``,e.kahnZink=``,e.keyboardBebung2DotsAbove=``,e.keyboardBebung2DotsBelow=``,e.keyboardBebung3DotsAbove=``,e.keyboardBebung3DotsBelow=``,e.keyboardBebung4DotsAbove=``,e.keyboardBebung4DotsBelow=``,e.keyboardLeftPedalPictogram=``,e.keyboardMiddlePedalPictogram=``,e.keyboardPedalD=``,e.keyboardPedalDot=``,e.keyboardPedalE=``,e.keyboardPedalHalf=``,e.keyboardPedalHalf2=``,e.keyboardPedalHalf3=``,e.keyboardPedalHeel1=``,e.keyboardPedalHeel2=``,e.keyboardPedalHeel3=``,e.keyboardPedalHeelToToe=``,e.keyboardPedalHeelToe=``,e.keyboardPedalHookEnd=``,e.keyboardPedalHookStart=``,e.keyboardPedalHyphen=``,e.keyboardPedalP=``,e.keyboardPedalParensLeft=``,e.keyboardPedalParensRight=``,e.keyboardPedalPed=``,e.keyboardPedalS=``,e.keyboardPedalSost=``,e.keyboardPedalToe1=``,e.keyboardPedalToe2=``,e.keyboardPedalToeToHeel=``,e.keyboardPedalUp=``,e.keyboardPedalUpNotch=``,e.keyboardPedalUpSpecial=``,e.keyboardPlayWithLH=``,e.keyboardPlayWithLHEnd=``,e.keyboardPlayWithRH=``,e.keyboardPlayWithRHEnd=``,e.keyboardPluckInside=``,e.keyboardRightPedalPictogram=``,e.kievanAccidentalFlat=``,e.kievanAccidentalSharp=``,e.kievanAugmentationDot=``,e.kievanCClef=``,e.kievanEndingSymbol=``,e.kievanNote8thStemDown=``,e.kievanNote8thStemUp=``,e.kievanNoteBeam=``,e.kievanNoteHalfStaffLine=``,e.kievanNoteHalfStaffSpace=``,e.kievanNoteQuarterStemDown=``,e.kievanNoteQuarterStemUp=``,e.kievanNoteReciting=``,e.kievanNoteWhole=``,e.kievanNoteWholeFinal=``,e.kodalyHandDo=``,e.kodalyHandFa=``,e.kodalyHandLa=``,e.kodalyHandMi=``,e.kodalyHandRe=``,e.kodalyHandSo=``,e.kodalyHandTi=``,e.leftRepeatSmall=``,e.legerLine=``,e.legerLineNarrow=``,e.legerLineWide=``,e.luteBarlineEndRepeat=``,e.luteBarlineFinal=``,e.luteBarlineStartRepeat=``,e.luteDuration16th=``,e.luteDuration32nd=``,e.luteDuration8th=``,e.luteDurationDoubleWhole=``,e.luteDurationHalf=``,e.luteDurationQuarter=``,e.luteDurationWhole=``,e.luteFingeringRHFirst=``,e.luteFingeringRHSecond=``,e.luteFingeringRHThird=``,e.luteFingeringRHThumb=``,e.luteFrench10thCourse=``,e.luteFrench7thCourse=``,e.luteFrench8thCourse=``,e.luteFrench9thCourse=``,e.luteFrenchAppoggiaturaAbove=``,e.luteFrenchAppoggiaturaBelow=``,e.luteFrenchFretA=``,e.luteFrenchFretB=``,e.luteFrenchFretC=``,e.luteFrenchFretD=``,e.luteFrenchFretE=``,e.luteFrenchFretF=``,e.luteFrenchFretG=``,e.luteFrenchFretH=``,e.luteFrenchFretI=``,e.luteFrenchFretK=``,e.luteFrenchFretL=``,e.luteFrenchFretM=``,e.luteFrenchFretN=``,e.luteFrenchMordentInverted=``,e.luteFrenchMordentLower=``,e.luteFrenchMordentUpper=``,e.luteGermanALower=``,e.luteGermanAUpper=``,e.luteGermanBLower=``,e.luteGermanBUpper=``,e.luteGermanCLower=``,e.luteGermanCUpper=``,e.luteGermanDLower=``,e.luteGermanDUpper=``,e.luteGermanELower=``,e.luteGermanEUpper=``,e.luteGermanFLower=``,e.luteGermanFUpper=``,e.luteGermanGLower=``,e.luteGermanGUpper=``,e.luteGermanHLower=``,e.luteGermanHUpper=``,e.luteGermanILower=``,e.luteGermanIUpper=``,e.luteGermanKLower=``,e.luteGermanKUpper=``,e.luteGermanLLower=``,e.luteGermanLUpper=``,e.luteGermanMLower=``,e.luteGermanMUpper=``,e.luteGermanNLower=``,e.luteGermanNUpper=``,e.luteGermanOLower=``,e.luteGermanPLower=``,e.luteGermanQLower=``,e.luteGermanRLower=``,e.luteGermanSLower=``,e.luteGermanTLower=``,e.luteGermanVLower=``,e.luteGermanXLower=``,e.luteGermanYLower=``,e.luteGermanZLower=``,e.luteItalianClefCSolFaUt=``,e.luteItalianClefFFaUt=``,e.luteItalianFret0=``,e.luteItalianFret1=``,e.luteItalianFret2=``,e.luteItalianFret3=``,e.luteItalianFret4=``,e.luteItalianFret5=``,e.luteItalianFret6=``,e.luteItalianFret7=``,e.luteItalianFret8=``,e.luteItalianFret9=``,e.luteItalianHoldFinger=``,e.luteItalianHoldNote=``,e.luteItalianReleaseFinger=``,e.luteItalianTempoFast=``,e.luteItalianTempoNeitherFastNorSlow=``,e.luteItalianTempoSlow=``,e.luteItalianTempoSomewhatFast=``,e.luteItalianTempoVerySlow=``,e.luteItalianTimeTriple=``,e.luteItalianTremolo=``,e.luteItalianVibrato=``,e.luteStaff6Lines=``,e.luteStaff6LinesNarrow=``,e.luteStaff6LinesWide=``,e.lyricsElision=``,e.lyricsElisionNarrow=``,e.lyricsElisionWide=``,e.lyricsHyphenBaseline=``,e.lyricsHyphenBaselineNonBreaking=``,e.lyricsTextRepeat=``,e.medRenFlatHardB=``,e.medRenFlatSoftB=``,e.medRenFlatWithDot=``,e.medRenGClefCMN=``,e.medRenLiquescenceCMN=``,e.medRenLiquescentAscCMN=``,e.medRenLiquescentDescCMN=``,e.medRenNatural=``,e.medRenNaturalWithCross=``,e.medRenOriscusCMN=``,e.medRenPlicaCMN=``,e.medRenPunctumCMN=``,e.medRenQuilismaCMN=``,e.medRenSharpCroix=``,e.medRenStrophicusCMN=``,e.mensuralAlterationSign=``,e.mensuralBlackBrevis=``,e.mensuralBlackBrevisVoid=``,e.mensuralBlackDragma=``,e.mensuralBlackLonga=``,e.mensuralBlackMaxima=``,e.mensuralBlackMinima=``,e.mensuralBlackMinimaVoid=``,e.mensuralBlackSemibrevis=``,e.mensuralBlackSemibrevisCaudata=``,e.mensuralBlackSemibrevisOblique=``,e.mensuralBlackSemibrevisVoid=``,e.mensuralBlackSemiminima=``,e.mensuralCclef=``,e.mensuralCclefPetrucciPosHigh=``,e.mensuralCclefPetrucciPosHighest=``,e.mensuralCclefPetrucciPosLow=``,e.mensuralCclefPetrucciPosLowest=``,e.mensuralCclefPetrucciPosMiddle=``,e.mensuralColorationEndRound=``,e.mensuralColorationEndSquare=``,e.mensuralColorationStartRound=``,e.mensuralColorationStartSquare=``,e.mensuralCombStemDiagonal=``,e.mensuralCombStemDown=``,e.mensuralCombStemDownFlagExtended=``,e.mensuralCombStemDownFlagFlared=``,e.mensuralCombStemDownFlagFusa=``,e.mensuralCombStemDownFlagLeft=``,e.mensuralCombStemDownFlagRight=``,e.mensuralCombStemDownFlagSemiminima=``,e.mensuralCombStemUp=``,e.mensuralCombStemUpFlagExtended=``,e.mensuralCombStemUpFlagFlared=``,e.mensuralCombStemUpFlagFusa=``,e.mensuralCombStemUpFlagLeft=``,e.mensuralCombStemUpFlagRight=``,e.mensuralCombStemUpFlagSemiminima=``,e.mensuralCustosCheckmark=``,e.mensuralCustosDown=``,e.mensuralCustosTurn=``,e.mensuralCustosUp=``,e.mensuralFclef=``,e.mensuralFclefPetrucci=``,e.mensuralGclef=``,e.mensuralGclefPetrucci=``,e.mensuralModusImperfectumVert=``,e.mensuralModusPerfectumVert=``,e.mensuralNoteheadLongaBlack=``,e.mensuralNoteheadLongaBlackVoid=``,e.mensuralNoteheadLongaVoid=``,e.mensuralNoteheadLongaWhite=``,e.mensuralNoteheadMaximaBlack=``,e.mensuralNoteheadMaximaBlackVoid=``,e.mensuralNoteheadMaximaVoid=``,e.mensuralNoteheadMaximaWhite=``,e.mensuralNoteheadMinimaWhite=``,e.mensuralNoteheadSemibrevisBlack=``,e.mensuralNoteheadSemibrevisBlackVoid=``,e.mensuralNoteheadSemibrevisBlackVoidTurned=``,e.mensuralNoteheadSemibrevisVoid=``,e.mensuralNoteheadSemiminimaWhite=``,e.mensuralObliqueAsc2ndBlack=``,e.mensuralObliqueAsc2ndBlackVoid=``,e.mensuralObliqueAsc2ndVoid=``,e.mensuralObliqueAsc2ndWhite=``,e.mensuralObliqueAsc3rdBlack=``,e.mensuralObliqueAsc3rdBlackVoid=``,e.mensuralObliqueAsc3rdVoid=``,e.mensuralObliqueAsc3rdWhite=``,e.mensuralObliqueAsc4thBlack=``,e.mensuralObliqueAsc4thBlackVoid=``,e.mensuralObliqueAsc4thVoid=``,e.mensuralObliqueAsc4thWhite=``,e.mensuralObliqueAsc5thBlack=``,e.mensuralObliqueAsc5thBlackVoid=``,e.mensuralObliqueAsc5thVoid=``,e.mensuralObliqueAsc5thWhite=``,e.mensuralObliqueDesc2ndBlack=``,e.mensuralObliqueDesc2ndBlackVoid=``,e.mensuralObliqueDesc2ndVoid=``,e.mensuralObliqueDesc2ndWhite=``,e.mensuralObliqueDesc3rdBlack=``,e.mensuralObliqueDesc3rdBlackVoid=``,e.mensuralObliqueDesc3rdVoid=``,e.mensuralObliqueDesc3rdWhite=``,e.mensuralObliqueDesc4thBlack=``,e.mensuralObliqueDesc4thBlackVoid=``,e.mensuralObliqueDesc4thVoid=``,e.mensuralObliqueDesc4thWhite=``,e.mensuralObliqueDesc5thBlack=``,e.mensuralObliqueDesc5thBlackVoid=``,e.mensuralObliqueDesc5thVoid=``,e.mensuralObliqueDesc5thWhite=``,e.mensuralProlation1=``,e.mensuralProlation10=``,e.mensuralProlation11=``,e.mensuralProlation2=``,e.mensuralProlation3=``,e.mensuralProlation4=``,e.mensuralProlation5=``,e.mensuralProlation6=``,e.mensuralProlation7=``,e.mensuralProlation8=``,e.mensuralProlation9=``,e.mensuralProlationCombiningDot=``,e.mensuralProlationCombiningDotVoid=``,e.mensuralProlationCombiningStroke=``,e.mensuralProlationCombiningThreeDots=``,e.mensuralProlationCombiningThreeDotsTri=``,e.mensuralProlationCombiningTwoDots=``,e.mensuralProportion1=``,e.mensuralProportion2=``,e.mensuralProportion3=``,e.mensuralProportion4=``,e.mensuralProportion5=``,e.mensuralProportion6=``,e.mensuralProportion7=``,e.mensuralProportion8=``,e.mensuralProportion9=``,e.mensuralProportionMajor=``,e.mensuralProportionMinor=``,e.mensuralProportionProportioDupla1=``,e.mensuralProportionProportioDupla2=``,e.mensuralProportionProportioQuadrupla=``,e.mensuralProportionProportioTripla=``,e.mensuralProportionTempusPerfectum=``,e.mensuralRestBrevis=``,e.mensuralRestFusa=``,e.mensuralRestLongaImperfecta=``,e.mensuralRestLongaPerfecta=``,e.mensuralRestMaxima=``,e.mensuralRestMinima=``,e.mensuralRestSemibrevis=``,e.mensuralRestSemifusa=``,e.mensuralRestSemiminima=``,e.mensuralSignumDown=``,e.mensuralSignumUp=``,e.mensuralTempusImperfectumHoriz=``,e.mensuralTempusPerfectumHoriz=``,e.mensuralWhiteBrevis=``,e.mensuralWhiteFusa=``,e.mensuralWhiteLonga=``,e.mensuralWhiteMaxima=``,e.mensuralWhiteMinima=``,e.mensuralWhiteSemibrevis=``,e.mensuralWhiteSemiminima=``,e.metAugmentationDot=``,e.metNote1024thDown=``,e.metNote1024thUp=``,e.metNote128thDown=``,e.metNote128thUp=``,e.metNote16thDown=``,e.metNote16thUp=``,e.metNote256thDown=``,e.metNote256thUp=``,e.metNote32ndDown=``,e.metNote32ndUp=``,e.metNote512thDown=``,e.metNote512thUp=``,e.metNote64thDown=``,e.metNote64thUp=``,e.metNote8thDown=``,e.metNote8thUp=``,e.metNoteDoubleWhole=``,e.metNoteDoubleWholeSquare=``,e.metNoteHalfDown=``,e.metNoteHalfUp=``,e.metNoteQuarterDown=``,e.metNoteQuarterUp=``,e.metNoteWhole=``,e.metricModulationArrowLeft=``,e.metricModulationArrowRight=``,e.miscDoNotCopy=``,e.miscDoNotPhotocopy=``,e.miscEyeglasses=``,e.note1024thDown=``,e.note1024thUp=``,e.note128thDown=``,e.note128thUp=``,e.note16thDown=``,e.note16thUp=``,e.note256thDown=``,e.note256thUp=``,e.note32ndDown=``,e.note32ndUp=``,e.note512thDown=``,e.note512thUp=``,e.note64thDown=``,e.note64thUp=``,e.note8thDown=``,e.note8thUp=``,e.noteABlack=``,e.noteAFlatBlack=``,e.noteAFlatHalf=``,e.noteAFlatWhole=``,e.noteAHalf=``,e.noteASharpBlack=``,e.noteASharpHalf=``,e.noteASharpWhole=``,e.noteAWhole=``,e.noteBBlack=``,e.noteBFlatBlack=``,e.noteBFlatHalf=``,e.noteBFlatWhole=``,e.noteBHalf=``,e.noteBSharpBlack=``,e.noteBSharpHalf=``,e.noteBSharpWhole=``,e.noteBWhole=``,e.noteCBlack=``,e.noteCFlatBlack=``,e.noteCFlatHalf=``,e.noteCFlatWhole=``,e.noteCHalf=``,e.noteCSharpBlack=``,e.noteCSharpHalf=``,e.noteCSharpWhole=``,e.noteCWhole=``,e.noteDBlack=``,e.noteDFlatBlack=``,e.noteDFlatHalf=``,e.noteDFlatWhole=``,e.noteDHalf=``,e.noteDSharpBlack=``,e.noteDSharpHalf=``,e.noteDSharpWhole=``,e.noteDWhole=``,e.noteDiBlack=``,e.noteDiHalf=``,e.noteDiWhole=``,e.noteDoBlack=``,e.noteDoHalf=``,e.noteDoWhole=``,e.noteDoubleWhole=``,e.noteDoubleWholeSquare=``,e.noteEBlack=``,e.noteEFlatBlack=``,e.noteEFlatHalf=``,e.noteEFlatWhole=``,e.noteEHalf=``,e.noteESharpBlack=``,e.noteESharpHalf=``,e.noteESharpWhole=``,e.noteEWhole=``,e.noteEmptyBlack=``,e.noteEmptyHalf=``,e.noteEmptyWhole=``,e.noteFBlack=``,e.noteFFlatBlack=``,e.noteFFlatHalf=``,e.noteFFlatWhole=``,e.noteFHalf=``,e.noteFSharpBlack=``,e.noteFSharpHalf=``,e.noteFSharpWhole=``,e.noteFWhole=``,e.noteFaBlack=``,e.noteFaHalf=``,e.noteFaWhole=``,e.noteFiBlack=``,e.noteFiHalf=``,e.noteFiWhole=``,e.noteGBlack=``,e.noteGFlatBlack=``,e.noteGFlatHalf=``,e.noteGFlatWhole=``,e.noteGHalf=``,e.noteGSharpBlack=``,e.noteGSharpHalf=``,e.noteGSharpWhole=``,e.noteGWhole=``,e.noteHBlack=``,e.noteHHalf=``,e.noteHSharpBlack=``,e.noteHSharpHalf=``,e.noteHSharpWhole=``,e.noteHWhole=``,e.noteHalfDown=``,e.noteHalfUp=``,e.noteLaBlack=``,e.noteLaHalf=``,e.noteLaWhole=``,e.noteLeBlack=``,e.noteLeHalf=``,e.noteLeWhole=``,e.noteLiBlack=``,e.noteLiHalf=``,e.noteLiWhole=``,e.noteMeBlack=``,e.noteMeHalf=``,e.noteMeWhole=``,e.noteMiBlack=``,e.noteMiHalf=``,e.noteMiWhole=``,e.noteQuarterDown=``,e.noteQuarterUp=``,e.noteRaBlack=``,e.noteRaHalf=``,e.noteRaWhole=``,e.noteReBlack=``,e.noteReHalf=``,e.noteReWhole=``,e.noteRiBlack=``,e.noteRiHalf=``,e.noteRiWhole=``,e.noteSeBlack=``,e.noteSeHalf=``,e.noteSeWhole=``,e.noteShapeArrowheadLeftBlack=``,e.noteShapeArrowheadLeftDoubleWhole=``,e.noteShapeArrowheadLeftWhite=``,e.noteShapeDiamondBlack=``,e.noteShapeDiamondDoubleWhole=``,e.noteShapeDiamondWhite=``,e.noteShapeIsoscelesTriangleBlack=``,e.noteShapeIsoscelesTriangleDoubleWhole=``,e.noteShapeIsoscelesTriangleWhite=``,e.noteShapeKeystoneBlack=``,e.noteShapeKeystoneDoubleWhole=``,e.noteShapeKeystoneWhite=``,e.noteShapeMoonBlack=``,e.noteShapeMoonDoubleWhole=``,e.noteShapeMoonLeftBlack=``,e.noteShapeMoonLeftDoubleWhole=``,e.noteShapeMoonLeftWhite=``,e.noteShapeMoonWhite=``,e.noteShapeQuarterMoonBlack=``,e.noteShapeQuarterMoonDoubleWhole=``,e.noteShapeQuarterMoonWhite=``,e.noteShapeRoundBlack=``,e.noteShapeRoundDoubleWhole=``,e.noteShapeRoundWhite=``,e.noteShapeSquareBlack=``,e.noteShapeSquareDoubleWhole=``,e.noteShapeSquareWhite=``,e.noteShapeTriangleLeftBlack=``,e.noteShapeTriangleLeftDoubleWhole=``,e.noteShapeTriangleLeftWhite=``,e.noteShapeTriangleRightBlack=``,e.noteShapeTriangleRightDoubleWhole=``,e.noteShapeTriangleRightWhite=``,e.noteShapeTriangleRoundBlack=``,e.noteShapeTriangleRoundDoubleWhole=``,e.noteShapeTriangleRoundLeftBlack=``,e.noteShapeTriangleRoundLeftDoubleWhole=``,e.noteShapeTriangleRoundLeftWhite=``,e.noteShapeTriangleRoundWhite=``,e.noteShapeTriangleUpBlack=``,e.noteShapeTriangleUpDoubleWhole=``,e.noteShapeTriangleUpWhite=``,e.noteSiBlack=``,e.noteSiHalf=``,e.noteSiWhole=``,e.noteSoBlack=``,e.noteSoHalf=``,e.noteSoWhole=``,e.noteTeBlack=``,e.noteTeHalf=``,e.noteTeWhole=``,e.noteTiBlack=``,e.noteTiHalf=``,e.noteTiWhole=``,e.noteWhole=``,e.noteheadBlack=``,e.noteheadCircleSlash=``,e.noteheadCircleX=``,e.noteheadCircleXDoubleWhole=``,e.noteheadCircleXHalf=``,e.noteheadCircleXWhole=``,e.noteheadCircledBlack=``,e.noteheadCircledBlackLarge=``,e.noteheadCircledDoubleWhole=``,e.noteheadCircledDoubleWholeLarge=``,e.noteheadCircledHalf=``,e.noteheadCircledHalfLarge=``,e.noteheadCircledWhole=``,e.noteheadCircledWholeLarge=``,e.noteheadCircledXLarge=``,e.noteheadClusterDoubleWhole2nd=``,e.noteheadClusterDoubleWhole3rd=``,e.noteheadClusterDoubleWholeBottom=``,e.noteheadClusterDoubleWholeMiddle=``,e.noteheadClusterDoubleWholeTop=``,e.noteheadClusterHalf2nd=``,e.noteheadClusterHalf3rd=``,e.noteheadClusterHalfBottom=``,e.noteheadClusterHalfMiddle=``,e.noteheadClusterHalfTop=``,e.noteheadClusterQuarter2nd=``,e.noteheadClusterQuarter3rd=``,e.noteheadClusterQuarterBottom=``,e.noteheadClusterQuarterMiddle=``,e.noteheadClusterQuarterTop=``,e.noteheadClusterRoundBlack=``,e.noteheadClusterRoundWhite=``,e.noteheadClusterSquareBlack=``,e.noteheadClusterSquareWhite=``,e.noteheadClusterWhole2nd=``,e.noteheadClusterWhole3rd=``,e.noteheadClusterWholeBottom=``,e.noteheadClusterWholeMiddle=``,e.noteheadClusterWholeTop=``,e.noteheadCowellEleventhNoteSeriesHalf=``,e.noteheadCowellEleventhNoteSeriesWhole=``,e.noteheadCowellEleventhSeriesBlack=``,e.noteheadCowellFifteenthNoteSeriesBlack=``,e.noteheadCowellFifteenthNoteSeriesHalf=``,e.noteheadCowellFifteenthNoteSeriesWhole=``,e.noteheadCowellFifthNoteSeriesBlack=``,e.noteheadCowellFifthNoteSeriesHalf=``,e.noteheadCowellFifthNoteSeriesWhole=``,e.noteheadCowellNinthNoteSeriesBlack=``,e.noteheadCowellNinthNoteSeriesHalf=``,e.noteheadCowellNinthNoteSeriesWhole=``,e.noteheadCowellSeventhNoteSeriesBlack=``,e.noteheadCowellSeventhNoteSeriesHalf=``,e.noteheadCowellSeventhNoteSeriesWhole=``,e.noteheadCowellThirdNoteSeriesBlack=``,e.noteheadCowellThirdNoteSeriesHalf=``,e.noteheadCowellThirdNoteSeriesWhole=``,e.noteheadCowellThirteenthNoteSeriesBlack=``,e.noteheadCowellThirteenthNoteSeriesHalf=``,e.noteheadCowellThirteenthNoteSeriesWhole=``,e.noteheadDiamondBlack=``,e.noteheadDiamondBlackOld=``,e.noteheadDiamondBlackWide=``,e.noteheadDiamondClusterBlack2nd=``,e.noteheadDiamondClusterBlack3rd=``,e.noteheadDiamondClusterBlackBottom=``,e.noteheadDiamondClusterBlackMiddle=``,e.noteheadDiamondClusterBlackTop=``,e.noteheadDiamondClusterWhite2nd=``,e.noteheadDiamondClusterWhite3rd=``,e.noteheadDiamondClusterWhiteBottom=``,e.noteheadDiamondClusterWhiteMiddle=``,e.noteheadDiamondClusterWhiteTop=``,e.noteheadDiamondDoubleWhole=``,e.noteheadDiamondDoubleWholeOld=``,e.noteheadDiamondHalf=``,e.noteheadDiamondHalfFilled=``,e.noteheadDiamondHalfOld=``,e.noteheadDiamondHalfWide=``,e.noteheadDiamondOpen=``,e.noteheadDiamondWhite=``,e.noteheadDiamondWhiteWide=``,e.noteheadDiamondWhole=``,e.noteheadDiamondWholeOld=``,e.noteheadDoubleWhole=``,e.noteheadDoubleWholeSquare=``,e.noteheadDoubleWholeWithX=``,e.noteheadHalf=``,e.noteheadHalfFilled=``,e.noteheadHalfWithX=``,e.noteheadHeavyX=``,e.noteheadHeavyXHat=``,e.noteheadLargeArrowDownBlack=``,e.noteheadLargeArrowDownDoubleWhole=``,e.noteheadLargeArrowDownHalf=``,e.noteheadLargeArrowDownWhole=``,e.noteheadLargeArrowUpBlack=``,e.noteheadLargeArrowUpDoubleWhole=``,e.noteheadLargeArrowUpHalf=``,e.noteheadLargeArrowUpWhole=``,e.noteheadMoonBlack=``,e.noteheadMoonWhite=``,e.noteheadNancarrowSine=``,e.noteheadNull=``,e.noteheadParenthesis=``,e.noteheadParenthesisLeft=``,e.noteheadParenthesisRight=``,e.noteheadPlusBlack=``,e.noteheadPlusDoubleWhole=``,e.noteheadPlusHalf=``,e.noteheadPlusWhole=``,e.noteheadRectangularClusterBlackBottom=``,e.noteheadRectangularClusterBlackMiddle=``,e.noteheadRectangularClusterBlackTop=``,e.noteheadRectangularClusterWhiteBottom=``,e.noteheadRectangularClusterWhiteMiddle=``,e.noteheadRectangularClusterWhiteTop=``,e.noteheadRoundBlack=``,e.noteheadRoundBlackDoubleSlashed=``,e.noteheadRoundBlackLarge=``,e.noteheadRoundBlackSlashed=``,e.noteheadRoundBlackSlashedLarge=``,e.noteheadRoundWhite=``,e.noteheadRoundWhiteDoubleSlashed=``,e.noteheadRoundWhiteLarge=``,e.noteheadRoundWhiteSlashed=``,e.noteheadRoundWhiteSlashedLarge=``,e.noteheadRoundWhiteWithDot=``,e.noteheadRoundWhiteWithDotLarge=``,e.noteheadSlashDiamondWhite=``,e.noteheadSlashHorizontalEnds=``,e.noteheadSlashHorizontalEndsMuted=``,e.noteheadSlashVerticalEnds=``,e.noteheadSlashVerticalEndsMuted=``,e.noteheadSlashVerticalEndsSmall=``,e.noteheadSlashWhiteDoubleWhole=``,e.noteheadSlashWhiteHalf=``,e.noteheadSlashWhiteMuted=``,e.noteheadSlashWhiteWhole=``,e.noteheadSlashX=``,e.noteheadSlashedBlack1=``,e.noteheadSlashedBlack2=``,e.noteheadSlashedDoubleWhole1=``,e.noteheadSlashedDoubleWhole2=``,e.noteheadSlashedHalf1=``,e.noteheadSlashedHalf2=``,e.noteheadSlashedWhole1=``,e.noteheadSlashedWhole2=``,e.noteheadSquareBlack=``,e.noteheadSquareBlackLarge=``,e.noteheadSquareBlackWhite=``,e.noteheadSquareWhite=``,e.noteheadTriangleDownBlack=``,e.noteheadTriangleDownDoubleWhole=``,e.noteheadTriangleDownHalf=``,e.noteheadTriangleDownWhite=``,e.noteheadTriangleDownWhole=``,e.noteheadTriangleLeftBlack=``,e.noteheadTriangleLeftWhite=``,e.noteheadTriangleRightBlack=``,e.noteheadTriangleRightWhite=``,e.noteheadTriangleRoundDownBlack=``,e.noteheadTriangleRoundDownWhite=``,e.noteheadTriangleUpBlack=``,e.noteheadTriangleUpDoubleWhole=``,e.noteheadTriangleUpHalf=``,e.noteheadTriangleUpRightBlack=``,e.noteheadTriangleUpRightWhite=``,e.noteheadTriangleUpWhite=``,e.noteheadTriangleUpWhole=``,e.noteheadVoidWithX=``,e.noteheadWhole=``,e.noteheadWholeFilled=``,e.noteheadWholeWithX=``,e.noteheadXBlack=``,e.noteheadXDoubleWhole=``,e.noteheadXHalf=``,e.noteheadXOrnate=``,e.noteheadXOrnateEllipse=``,e.noteheadXWhole=``,e.octaveBaselineA=``,e.octaveBaselineB=``,e.octaveBaselineM=``,e.octaveBaselineV=``,e.octaveBassa=``,e.octaveLoco=``,e.octaveParensLeft=``,e.octaveParensRight=``,e.octaveSuperscriptA=``,e.octaveSuperscriptB=``,e.octaveSuperscriptM=``,e.octaveSuperscriptV=``,e.oneHandedRollStevens=``,e.organGerman2Fusae=``,e.organGerman2Minimae=``,e.organGerman2OctaveUp=``,e.organGerman2Semifusae=``,e.organGerman2Semiminimae=``,e.organGerman3Fusae=``,e.organGerman3Minimae=``,e.organGerman3Semifusae=``,e.organGerman3Semiminimae=``,e.organGerman4Fusae=``,e.organGerman4Minimae=``,e.organGerman4Semifusae=``,e.organGerman4Semiminimae=``,e.organGerman5Fusae=``,e.organGerman5Minimae=``,e.organGerman5Semifusae=``,e.organGerman5Semiminimae=``,e.organGerman6Fusae=``,e.organGerman6Minimae=``,e.organGerman6Semifusae=``,e.organGerman6Semiminimae=``,e.organGermanALower=``,e.organGermanAUpper=``,e.organGermanAugmentationDot=``,e.organGermanBLower=``,e.organGermanBUpper=``,e.organGermanBuxheimerBrevis2=``,e.organGermanBuxheimerBrevis3=``,e.organGermanBuxheimerMinimaRest=``,e.organGermanBuxheimerSemibrevis=``,e.organGermanBuxheimerSemibrevisRest=``,e.organGermanCLower=``,e.organGermanCUpper=``,e.organGermanCisLower=``,e.organGermanCisUpper=``,e.organGermanDLower=``,e.organGermanDUpper=``,e.organGermanDisLower=``,e.organGermanDisUpper=``,e.organGermanELower=``,e.organGermanEUpper=``,e.organGermanFLower=``,e.organGermanFUpper=``,e.organGermanFisLower=``,e.organGermanFisUpper=``,e.organGermanFusa=``,e.organGermanFusaRest=``,e.organGermanGLower=``,e.organGermanGUpper=``,e.organGermanGisLower=``,e.organGermanGisUpper=``,e.organGermanHLower=``,e.organGermanHUpper=``,e.organGermanMinima=``,e.organGermanMinimaRest=``,e.organGermanOctaveDown=``,e.organGermanOctaveUp=``,e.organGermanSemibrevis=``,e.organGermanSemibrevisRest=``,e.organGermanSemifusa=``,e.organGermanSemifusaRest=``,e.organGermanSemiminima=``,e.organGermanSemiminimaRest=``,e.organGermanTie=``,e.ornamentBottomLeftConcaveStroke=``,e.ornamentBottomLeftConcaveStrokeLarge=``,e.ornamentBottomLeftConvexStroke=``,e.ornamentBottomRightConcaveStroke=``,e.ornamentBottomRightConvexStroke=``,e.ornamentComma=``,e.ornamentDoubleObliqueLinesAfterNote=``,e.ornamentDoubleObliqueLinesBeforeNote=``,e.ornamentDownCurve=``,e.ornamentHaydn=``,e.ornamentHighLeftConcaveStroke=``,e.ornamentHighLeftConvexStroke=``,e.ornamentHighRightConcaveStroke=``,e.ornamentHighRightConvexStroke=``,e.ornamentHookAfterNote=``,e.ornamentHookBeforeNote=``,e.ornamentLeftFacingHalfCircle=``,e.ornamentLeftFacingHook=``,e.ornamentLeftPlus=``,e.ornamentLeftShakeT=``,e.ornamentLeftVerticalStroke=``,e.ornamentLeftVerticalStrokeWithCross=``,e.ornamentLowLeftConcaveStroke=``,e.ornamentLowLeftConvexStroke=``,e.ornamentLowRightConcaveStroke=``,e.ornamentLowRightConvexStroke=``,e.ornamentMiddleVerticalStroke=``,e.ornamentMordent=``,e.ornamentObliqueLineAfterNote=``,e.ornamentObliqueLineBeforeNote=``,e.ornamentObliqueLineHorizAfterNote=``,e.ornamentObliqueLineHorizBeforeNote=``,e.ornamentOriscus=``,e.ornamentPinceCouperin=``,e.ornamentPortDeVoixV=``,e.ornamentPrecompAppoggTrill=``,e.ornamentPrecompAppoggTrillSuffix=``,e.ornamentPrecompCadence=``,e.ornamentPrecompCadenceUpperPrefix=``,e.ornamentPrecompCadenceUpperPrefixTurn=``,e.ornamentPrecompCadenceWithTurn=``,e.ornamentPrecompDescendingSlide=``,e.ornamentPrecompDoubleCadenceLowerPrefix=``,e.ornamentPrecompDoubleCadenceUpperPrefix=``,e.ornamentPrecompDoubleCadenceUpperPrefixTurn=``,e.ornamentPrecompInvertedMordentUpperPrefix=``,e.ornamentPrecompMordentRelease=``,e.ornamentPrecompMordentUpperPrefix=``,e.ornamentPrecompPortDeVoixMordent=``,e.ornamentPrecompSlide=``,e.ornamentPrecompSlideTrillBach=``,e.ornamentPrecompSlideTrillDAnglebert=``,e.ornamentPrecompSlideTrillMarpurg=``,e.ornamentPrecompSlideTrillMuffat=``,e.ornamentPrecompSlideTrillSuffixMuffat=``,e.ornamentPrecompTrillLowerSuffix=``,e.ornamentPrecompTrillSuffixDandrieu=``,e.ornamentPrecompTrillWithMordent=``,e.ornamentPrecompTurnTrillBach=``,e.ornamentPrecompTurnTrillDAnglebert=``,e.ornamentQuilisma=``,e.ornamentRightFacingHalfCircle=``,e.ornamentRightFacingHook=``,e.ornamentRightVerticalStroke=``,e.ornamentSchleifer=``,e.ornamentShake3=``,e.ornamentShakeMuffat1=``,e.ornamentShortObliqueLineAfterNote=``,e.ornamentShortObliqueLineBeforeNote=``,e.ornamentShortTrill=``,e.ornamentTopLeftConcaveStroke=``,e.ornamentTopLeftConvexStroke=``,e.ornamentTopRightConcaveStroke=``,e.ornamentTopRightConvexStroke=``,e.ornamentTremblement=``,e.ornamentTremblementCouperin=``,e.ornamentTrill=``,e.ornamentTurn=``,e.ornamentTurnInverted=``,e.ornamentTurnSlash=``,e.ornamentTurnUp=``,e.ornamentTurnUpS=``,e.ornamentUpCurve=``,e.ornamentVerticalLine=``,e.ornamentZigZagLineNoRightEnd=``,e.ornamentZigZagLineWithRightEnd=``,e.ottava=``,e.ottavaAlta=``,e.ottavaBassa=``,e.ottavaBassaBa=``,e.ottavaBassaVb=``,e.pendereckiTremolo=``,e.pictAgogo=``,e.pictAlmglocken=``,e.pictAnvil=``,e.pictBambooChimes=``,e.pictBambooScraper=``,e.pictBassDrum=``,e.pictBassDrumOnSide=``,e.pictBeaterBow=``,e.pictBeaterBox=``,e.pictBeaterBrassMalletsDown=``,e.pictBeaterBrassMalletsLeft=``,e.pictBeaterBrassMalletsRight=``,e.pictBeaterBrassMalletsUp=``,e.pictBeaterCombiningDashedCircle=``,e.pictBeaterCombiningParentheses=``,e.pictBeaterDoubleBassDrumDown=``,e.pictBeaterDoubleBassDrumUp=``,e.pictBeaterFinger=``,e.pictBeaterFingernails=``,e.pictBeaterFist=``,e.pictBeaterGuiroScraper=``,e.pictBeaterHammer=``,e.pictBeaterHammerMetalDown=``,e.pictBeaterHammerMetalUp=``,e.pictBeaterHammerPlasticDown=``,e.pictBeaterHammerPlasticUp=``,e.pictBeaterHammerWoodDown=``,e.pictBeaterHammerWoodUp=``,e.pictBeaterHand=``,e.pictBeaterHardBassDrumDown=``,e.pictBeaterHardBassDrumUp=``,e.pictBeaterHardGlockenspielDown=``,e.pictBeaterHardGlockenspielLeft=``,e.pictBeaterHardGlockenspielRight=``,e.pictBeaterHardGlockenspielUp=``,e.pictBeaterHardTimpaniDown=``,e.pictBeaterHardTimpaniLeft=``,e.pictBeaterHardTimpaniRight=``,e.pictBeaterHardTimpaniUp=``,e.pictBeaterHardXylophoneDown=``,e.pictBeaterHardXylophoneLeft=``,e.pictBeaterHardXylophoneRight=``,e.pictBeaterHardXylophoneUp=``,e.pictBeaterHardYarnDown=``,e.pictBeaterHardYarnLeft=``,e.pictBeaterHardYarnRight=``,e.pictBeaterHardYarnUp=``,e.pictBeaterJazzSticksDown=``,e.pictBeaterJazzSticksUp=``,e.pictBeaterKnittingNeedle=``,e.pictBeaterMallet=``,e.pictBeaterMalletDown=``,e.pictBeaterMediumBassDrumDown=``,e.pictBeaterMediumBassDrumUp=``,e.pictBeaterMediumTimpaniDown=``,e.pictBeaterMediumTimpaniLeft=``,e.pictBeaterMediumTimpaniRight=``,e.pictBeaterMediumTimpaniUp=``,e.pictBeaterMediumXylophoneDown=``,e.pictBeaterMediumXylophoneLeft=``,e.pictBeaterMediumXylophoneRight=``,e.pictBeaterMediumXylophoneUp=``,e.pictBeaterMediumYarnDown=``,e.pictBeaterMediumYarnLeft=``,e.pictBeaterMediumYarnRight=``,e.pictBeaterMediumYarnUp=``,e.pictBeaterMetalBassDrumDown=``,e.pictBeaterMetalBassDrumUp=``,e.pictBeaterMetalDown=``,e.pictBeaterMetalHammer=``,e.pictBeaterMetalLeft=``,e.pictBeaterMetalRight=``,e.pictBeaterMetalUp=``,e.pictBeaterSnareSticksDown=``,e.pictBeaterSnareSticksUp=``,e.pictBeaterSoftBassDrumDown=``,e.pictBeaterSoftBassDrumUp=``,e.pictBeaterSoftGlockenspielDown=``,e.pictBeaterSoftGlockenspielLeft=``,e.pictBeaterSoftGlockenspielRight=``,e.pictBeaterSoftGlockenspielUp=``,e.pictBeaterSoftTimpaniDown=``,e.pictBeaterSoftTimpaniLeft=``,e.pictBeaterSoftTimpaniRight=``,e.pictBeaterSoftTimpaniUp=``,e.pictBeaterSoftXylophone=``,e.pictBeaterSoftXylophoneDown=``,e.pictBeaterSoftXylophoneLeft=``,e.pictBeaterSoftXylophoneRight=``,e.pictBeaterSoftXylophoneUp=``,e.pictBeaterSoftYarnDown=``,e.pictBeaterSoftYarnLeft=``,e.pictBeaterSoftYarnRight=``,e.pictBeaterSoftYarnUp=``,e.pictBeaterSpoonWoodenMallet=``,e.pictBeaterSuperballDown=``,e.pictBeaterSuperballLeft=``,e.pictBeaterSuperballRight=``,e.pictBeaterSuperballUp=``,e.pictBeaterTriangleDown=``,e.pictBeaterTrianglePlain=``,e.pictBeaterTriangleUp=``,e.pictBeaterWireBrushesDown=``,e.pictBeaterWireBrushesUp=``,e.pictBeaterWoodTimpaniDown=``,e.pictBeaterWoodTimpaniLeft=``,e.pictBeaterWoodTimpaniRight=``,e.pictBeaterWoodTimpaniUp=``,e.pictBeaterWoodXylophoneDown=``,e.pictBeaterWoodXylophoneLeft=``,e.pictBeaterWoodXylophoneRight=``,e.pictBeaterWoodXylophoneUp=``,e.pictBell=``,e.pictBellOfCymbal=``,e.pictBellPlate=``,e.pictBellTree=``,e.pictBirdWhistle=``,e.pictBoardClapper=``,e.pictBongos=``,e.pictBrakeDrum=``,e.pictCabasa=``,e.pictCannon=``,e.pictCarHorn=``,e.pictCastanets=``,e.pictCastanetsWithHandle=``,e.pictCelesta=``,e.pictCencerro=``,e.pictCenter1=``,e.pictCenter2=``,e.pictCenter3=``,e.pictChainRattle=``,e.pictChimes=``,e.pictChineseCymbal=``,e.pictChokeCymbal=``,e.pictClaves=``,e.pictCoins=``,e.pictConga=``,e.pictCowBell=``,e.pictCrashCymbals=``,e.pictCrotales=``,e.pictCrushStem=``,e.pictCuica=``,e.pictCymbalTongs=``,e.pictDamp1=``,e.pictDamp2=``,e.pictDamp3=``,e.pictDamp4=``,e.pictDeadNoteStem=``,e.pictDrumStick=``,e.pictDuckCall=``,e.pictEdgeOfCymbal=``,e.pictEmptyTrap=``,e.pictFingerCymbals=``,e.pictFlexatone=``,e.pictFootballRatchet=``,e.pictGlassHarmonica=``,e.pictGlassHarp=``,e.pictGlassPlateChimes=``,e.pictGlassTubeChimes=``,e.pictGlsp=``,e.pictGlspSmithBrindle=``,e.pictGobletDrum=``,e.pictGong=``,e.pictGongWithButton=``,e.pictGuiro=``,e.pictGumHardDown=``,e.pictGumHardLeft=``,e.pictGumHardRight=``,e.pictGumHardUp=``,e.pictGumMediumDown=``,e.pictGumMediumLeft=``,e.pictGumMediumRight=``,e.pictGumMediumUp=``,e.pictGumSoftDown=``,e.pictGumSoftLeft=``,e.pictGumSoftRight=``,e.pictGumSoftUp=``,e.pictHalfOpen1=``,e.pictHalfOpen2=``,e.pictHandbell=``,e.pictHiHat=``,e.pictHiHatOnStand=``,e.pictJawHarp=``,e.pictJingleBells=``,e.pictKlaxonHorn=``,e.pictLeftHandCircle=``,e.pictLionsRoar=``,e.pictLithophone=``,e.pictLogDrum=``,e.pictLotusFlute=``,e.pictMar=``,e.pictMarSmithBrindle=``,e.pictMaraca=``,e.pictMaracas=``,e.pictMegaphone=``,e.pictMetalPlateChimes=``,e.pictMetalTubeChimes=``,e.pictMusicalSaw=``,e.pictNormalPosition=``,e.pictOnRim=``,e.pictOpen=``,e.pictOpenRimShot=``,e.pictPistolShot=``,e.pictPoliceWhistle=``,e.pictQuijada=``,e.pictRainstick=``,e.pictRatchet=``,e.pictRecoReco=``,e.pictRightHandSquare=``,e.pictRim1=``,e.pictRim2=``,e.pictRim3=``,e.pictRimShotOnStem=``,e.pictSandpaperBlocks=``,e.pictScrapeAroundRim=``,e.pictScrapeAroundRimClockwise=``,e.pictScrapeCenterToEdge=``,e.pictScrapeEdgeToCenter=``,e.pictShellBells=``,e.pictShellChimes=``,e.pictSiren=``,e.pictSistrum=``,e.pictSizzleCymbal=``,e.pictSleighBell=``,e.pictSlideBrushOnGong=``,e.pictSlideWhistle=``,e.pictSlitDrum=``,e.pictSnareDrum=``,e.pictSnareDrumMilitary=``,e.pictSnareDrumSnaresOff=``,e.pictSteelDrums=``,e.pictStickShot=``,e.pictSuperball=``,e.pictSuspendedCymbal=``,e.pictSwishStem=``,e.pictTabla=``,e.pictTamTam=``,e.pictTamTamWithBeater=``,e.pictTambourine=``,e.pictTempleBlocks=``,e.pictTenorDrum=``,e.pictThundersheet=``,e.pictTimbales=``,e.pictTimpani=``,e.pictTomTom=``,e.pictTomTomChinese=``,e.pictTomTomIndoAmerican=``,e.pictTomTomJapanese=``,e.pictTriangle=``,e.pictTubaphone=``,e.pictTubularBells=``,e.pictTurnLeftStem=``,e.pictTurnRightLeftStem=``,e.pictTurnRightStem=``,e.pictVib=``,e.pictVibMotorOff=``,e.pictVibSmithBrindle=``,e.pictVibraslap=``,e.pictVietnameseHat=``,e.pictWhip=``,e.pictWindChimesGlass=``,e.pictWindMachine=``,e.pictWindWhistle=``,e.pictWoodBlock=``,e.pictWoundHardDown=``,e.pictWoundHardLeft=``,e.pictWoundHardRight=``,e.pictWoundHardUp=``,e.pictWoundSoftDown=``,e.pictWoundSoftLeft=``,e.pictWoundSoftRight=``,e.pictWoundSoftUp=``,e.pictXyl=``,e.pictXylBass=``,e.pictXylSmithBrindle=``,e.pictXylTenor=``,e.pictXylTenorTrough=``,e.pictXylTrough=``,e.pluckedBuzzPizzicato=``,e.pluckedDamp=``,e.pluckedDampAll=``,e.pluckedDampOnStem=``,e.pluckedFingernailFlick=``,e.pluckedLeftHandPizzicato=``,e.pluckedPlectrum=``,e.pluckedSnapPizzicatoAbove=``,e.pluckedSnapPizzicatoBelow=``,e.pluckedWithFingernails=``,e.quindicesima=``,e.quindicesimaAlta=``,e.quindicesimaBassa=``,e.quindicesimaBassaMb=``,e.repeat1Bar=``,e.repeat2Bars=``,e.repeat4Bars=``,e.repeatBarLowerDot=``,e.repeatBarSlash=``,e.repeatBarUpperDot=``,e.repeatDot=``,e.repeatDots=``,e.repeatLeft=``,e.repeatRight=``,e.repeatRightLeft=``,e.rest1024th=``,e.rest128th=``,e.rest16th=``,e.rest256th=``,e.rest32nd=``,e.rest512th=``,e.rest64th=``,e.rest8th=``,e.restDoubleWhole=``,e.restDoubleWholeLegerLine=``,e.restHBar=``,e.restHBarLeft=``,e.restHBarMiddle=``,e.restHBarRight=``,e.restHalf=``,e.restHalfLegerLine=``,e.restLonga=``,e.restMaxima=``,e.restQuarter=``,e.restQuarterOld=``,e.restQuarterZ=``,e.restWhole=``,e.restWholeLegerLine=``,e.reversedBrace=``,e.reversedBracketBottom=``,e.reversedBracketTop=``,e.rightRepeatSmall=``,e.scaleDegree1=``,e.scaleDegree2=``,e.scaleDegree3=``,e.scaleDegree4=``,e.scaleDegree5=``,e.scaleDegree6=``,e.scaleDegree7=``,e.scaleDegree8=``,e.scaleDegree9=``,e.schaefferClef=``,e.schaefferFClefToGClef=``,e.schaefferGClefToFClef=``,e.schaefferPreviousClef=``,e.segno=``,e.segnoSerpent1=``,e.segnoSerpent2=``,e.semipitchedPercussionClef1=``,e.semipitchedPercussionClef2=``,e.smnFlat=``,e.smnFlatWhite=``,e.smnHistoryDoubleFlat=``,e.smnHistoryDoubleSharp=``,e.smnHistoryFlat=``,e.smnHistorySharp=``,e.smnNatural=``,e.smnSharp=``,e.smnSharpDown=``,e.smnSharpWhite=``,e.smnSharpWhiteDown=``,e.splitBarDivider=``,e.staff1Line=``,e.staff1LineNarrow=``,e.staff1LineWide=``,e.staff2Lines=``,e.staff2LinesNarrow=``,e.staff2LinesWide=``,e.staff3Lines=``,e.staff3LinesNarrow=``,e.staff3LinesWide=``,e.staff4Lines=``,e.staff4LinesNarrow=``,e.staff4LinesWide=``,e.staff5Lines=``,e.staff5LinesNarrow=``,e.staff5LinesWide=``,e.staff6Lines=``,e.staff6LinesNarrow=``,e.staff6LinesWide=``,e.staffDivideArrowDown=``,e.staffDivideArrowUp=``,e.staffDivideArrowUpDown=``,e.staffPosLower1=``,e.staffPosLower2=``,e.staffPosLower3=``,e.staffPosLower4=``,e.staffPosLower5=``,e.staffPosLower6=``,e.staffPosLower7=``,e.staffPosLower8=``,e.staffPosRaise1=``,e.staffPosRaise2=``,e.staffPosRaise3=``,e.staffPosRaise4=``,e.staffPosRaise5=``,e.staffPosRaise6=``,e.staffPosRaise7=``,e.staffPosRaise8=``,e.stem=``,e.stemBowOnBridge=``,e.stemBowOnTailpiece=``,e.stemBuzzRoll=``,e.stemDamp=``,e.stemHarpStringNoise=``,e.stemMultiphonicsBlack=``,e.stemMultiphonicsBlackWhite=``,e.stemMultiphonicsWhite=``,e.stemPendereckiTremolo=``,e.stemRimShot=``,e.stemSprechgesang=``,e.stemSulPonticello=``,e.stemSussurando=``,e.stemSwished=``,e.stemVibratoPulse=``,e.stockhausenTremolo=``,e.stringsBowBehindBridge=``,e.stringsBowBehindBridgeFourStrings=``,e.stringsBowBehindBridgeOneString=``,e.stringsBowBehindBridgeThreeStrings=``,e.stringsBowBehindBridgeTwoStrings=``,e.stringsBowOnBridge=``,e.stringsBowOnTailpiece=``,e.stringsChangeBowDirection=``,e.stringsDownBow=``,e.stringsDownBowAwayFromBody=``,e.stringsDownBowBeyondBridge=``,e.stringsDownBowTowardsBody=``,e.stringsDownBowTurned=``,e.stringsFouette=``,e.stringsHalfHarmonic=``,e.stringsHarmonic=``,e.stringsJeteAbove=``,e.stringsJeteBelow=``,e.stringsMuteOff=``,e.stringsMuteOn=``,e.stringsOverpressureDownBow=``,e.stringsOverpressureNoDirection=``,e.stringsOverpressurePossibileDownBow=``,e.stringsOverpressurePossibileUpBow=``,e.stringsOverpressureUpBow=``,e.stringsScrapeCircularClockwise=``,e.stringsScrapeCircularCounterclockwise=``,e.stringsScrapeParallelInward=``,e.stringsScrapeParallelOutward=``,e.stringsThumbPosition=``,e.stringsThumbPositionTurned=``,e.stringsTripleChopInward=``,e.stringsTripleChopOutward=``,e.stringsUpBow=``,e.stringsUpBowAwayFromBody=``,e.stringsUpBowBeyondBridge=``,e.stringsUpBowTowardsBody=``,e.stringsUpBowTurned=``,e.stringsVibratoPulse=``,e.swissRudimentsNoteheadBlackDouble=``,e.swissRudimentsNoteheadBlackFlam=``,e.swissRudimentsNoteheadHalfDouble=``,e.swissRudimentsNoteheadHalfFlam=``,e.systemDivider=``,e.systemDividerExtraLong=``,e.systemDividerLong=``,e.textAugmentationDot=``,e.textBlackNoteFrac16thLongStem=``,e.textBlackNoteFrac16thShortStem=``,e.textBlackNoteFrac32ndLongStem=``,e.textBlackNoteFrac8thLongStem=``,e.textBlackNoteFrac8thShortStem=``,e.textBlackNoteLongStem=``,e.textBlackNoteShortStem=``,e.textCont16thBeamLongStem=``,e.textCont16thBeamShortStem=``,e.textCont32ndBeamLongStem=``,e.textCont8thBeamLongStem=``,e.textCont8thBeamShortStem=``,e.textHeadlessBlackNoteFrac16thLongStem=``,e.textHeadlessBlackNoteFrac16thShortStem=``,e.textHeadlessBlackNoteFrac32ndLongStem=``,e.textHeadlessBlackNoteFrac8thLongStem=``,e.textHeadlessBlackNoteFrac8thShortStem=``,e.textHeadlessBlackNoteLongStem=``,e.textHeadlessBlackNoteShortStem=``,e.textTie=``,e.textTuplet3LongStem=``,e.textTuplet3ShortStem=``,e.textTupletBracketEndLongStem=``,e.textTupletBracketEndShortStem=``,e.textTupletBracketStartLongStem=``,e.textTupletBracketStartShortStem=``,e.timeSig0=``,e.timeSig0Reversed=``,e.timeSig0Turned=``,e.timeSig1=``,e.timeSig1Reversed=``,e.timeSig1Turned=``,e.timeSig2=``,e.timeSig2Reversed=``,e.timeSig2Turned=``,e.timeSig3=``,e.timeSig3Reversed=``,e.timeSig3Turned=``,e.timeSig4=``,e.timeSig4Reversed=``,e.timeSig4Turned=``,e.timeSig5=``,e.timeSig5Reversed=``,e.timeSig5Turned=``,e.timeSig6=``,e.timeSig6Reversed=``,e.timeSig6Turned=``,e.timeSig7=``,e.timeSig7Reversed=``,e.timeSig7Turned=``,e.timeSig8=``,e.timeSig8Reversed=``,e.timeSig8Turned=``,e.timeSig9=``,e.timeSig9Reversed=``,e.timeSig9Turned=``,e.timeSigBracketLeft=``,e.timeSigBracketLeftSmall=``,e.timeSigBracketRight=``,e.timeSigBracketRightSmall=``,e.timeSigCombDenominator=``,e.timeSigCombNumerator=``,e.timeSigComma=``,e.timeSigCommon=``,e.timeSigCommonReversed=``,e.timeSigCommonTurned=``,e.timeSigCut2=``,e.timeSigCut3=``,e.timeSigCutCommon=``,e.timeSigCutCommonReversed=``,e.timeSigCutCommonTurned=``,e.timeSigEquals=``,e.timeSigFractionHalf=``,e.timeSigFractionOneThird=``,e.timeSigFractionQuarter=``,e.timeSigFractionThreeQuarters=``,e.timeSigFractionTwoThirds=``,e.timeSigFractionalSlash=``,e.timeSigMinus=``,e.timeSigMultiply=``,e.timeSigOpenPenderecki=``,e.timeSigParensLeft=``,e.timeSigParensLeftSmall=``,e.timeSigParensRight=``,e.timeSigParensRightSmall=``,e.timeSigPlus=``,e.timeSigPlusSmall=``,e.timeSigSlash=``,e.timeSigX=``,e.tremolo1=``,e.tremolo2=``,e.tremolo3=``,e.tremolo4=``,e.tremolo5=``,e.tremoloDivisiDots2=``,e.tremoloDivisiDots3=``,e.tremoloDivisiDots4=``,e.tremoloDivisiDots6=``,e.tremoloFingered1=``,e.tremoloFingered2=``,e.tremoloFingered3=``,e.tremoloFingered4=``,e.tremoloFingered5=``,e.tripleTongueAbove=``,e.tripleTongueBelow=``,e.tuplet0=``,e.tuplet1=``,e.tuplet2=``,e.tuplet3=``,e.tuplet4=``,e.tuplet5=``,e.tuplet6=``,e.tuplet7=``,e.tuplet8=``,e.tuplet9=``,e.tupletColon=``,e.unmeasuredTremolo=``,e.unmeasuredTremoloSimple=``,e.unpitchedPercussionClef1=``,e.unpitchedPercussionClef2=``,e.ventiduesima=``,e.ventiduesimaAlta=``,e.ventiduesimaBassa=``,e.ventiduesimaBassaMb=``,e.vocalFingerClickStockhausen=``,e.vocalHalbGesungen=``,e.vocalMouthClosed=``,e.vocalMouthOpen=``,e.vocalMouthPursed=``,e.vocalMouthSlightlyOpen=``,e.vocalMouthWideOpen=``,e.vocalNasalVoice=``,e.vocalSprechgesang=``,e.vocalTongueClickStockhausen=``,e.vocalTongueFingerClickStockhausen=``,e.vocalsSussurando=``,e.wiggleArpeggiatoDown=``,e.wiggleArpeggiatoDownArrow=``,e.wiggleArpeggiatoDownSwash=``,e.wiggleArpeggiatoUp=``,e.wiggleArpeggiatoUpArrow=``,e.wiggleArpeggiatoUpSwash=``,e.wiggleCircular=``,e.wiggleCircularConstant=``,e.wiggleCircularConstantFlipped=``,e.wiggleCircularConstantFlippedLarge=``,e.wiggleCircularConstantLarge=``,e.wiggleCircularEnd=``,e.wiggleCircularLarge=``,e.wiggleCircularLarger=``,e.wiggleCircularLargerStill=``,e.wiggleCircularLargest=``,e.wiggleCircularSmall=``,e.wiggleCircularStart=``,e.wiggleGlissando=``,e.wiggleGlissandoGroup1=``,e.wiggleGlissandoGroup2=``,e.wiggleGlissandoGroup3=``,e.wiggleRandom1=``,e.wiggleRandom2=``,e.wiggleRandom3=``,e.wiggleRandom4=``,e.wiggleSawtooth=``,e.wiggleSawtoothNarrow=``,e.wiggleSawtoothWide=``,e.wiggleSquareWave=``,e.wiggleSquareWaveNarrow=``,e.wiggleSquareWaveWide=``,e.wiggleTrill=``,e.wiggleTrillFast=``,e.wiggleTrillFaster=``,e.wiggleTrillFasterStill=``,e.wiggleTrillFastest=``,e.wiggleTrillSlow=``,e.wiggleTrillSlower=``,e.wiggleTrillSlowerStill=``,e.wiggleTrillSlowest=``,e.wiggleVIbratoLargestSlower=``,e.wiggleVIbratoMediumSlower=``,e.wiggleVibrato=``,e.wiggleVibratoLargeFast=``,e.wiggleVibratoLargeFaster=``,e.wiggleVibratoLargeFasterStill=``,e.wiggleVibratoLargeFastest=``,e.wiggleVibratoLargeSlow=``,e.wiggleVibratoLargeSlower=``,e.wiggleVibratoLargeSlowest=``,e.wiggleVibratoLargestFast=``,e.wiggleVibratoLargestFaster=``,e.wiggleVibratoLargestFasterStill=``,e.wiggleVibratoLargestFastest=``,e.wiggleVibratoLargestSlow=``,e.wiggleVibratoLargestSlowest=``,e.wiggleVibratoMediumFast=``,e.wiggleVibratoMediumFaster=``,e.wiggleVibratoMediumFasterStill=``,e.wiggleVibratoMediumFastest=``,e.wiggleVibratoMediumSlow=``,e.wiggleVibratoMediumSlowest=``,e.wiggleVibratoSmallFast=``,e.wiggleVibratoSmallFaster=``,e.wiggleVibratoSmallFasterStill=``,e.wiggleVibratoSmallFastest=``,e.wiggleVibratoSmallSlow=``,e.wiggleVibratoSmallSlower=``,e.wiggleVibratoSmallSlowest=``,e.wiggleVibratoSmallestFast=``,e.wiggleVibratoSmallestFaster=``,e.wiggleVibratoSmallestFasterStill=``,e.wiggleVibratoSmallestFastest=``,e.wiggleVibratoSmallestSlow=``,e.wiggleVibratoSmallestSlower=``,e.wiggleVibratoSmallestSlowest=``,e.wiggleVibratoStart=``,e.wiggleVibratoWide=``,e.wiggleWavy=``,e.wiggleWavyNarrow=``,e.wiggleWavyWide=``,e.windClosedHole=``,e.windFlatEmbouchure=``,e.windHalfClosedHole1=``,e.windHalfClosedHole2=``,e.windHalfClosedHole3=``,e.windLessRelaxedEmbouchure=``,e.windLessTightEmbouchure=``,e.windMouthpiecePop=``,e.windMultiphonicsBlackStem=``,e.windMultiphonicsBlackWhiteStem=``,e.windMultiphonicsWhiteStem=``,e.windOpenHole=``,e.windReedPositionIn=``,e.windReedPositionNormal=``,e.windReedPositionOut=``,e.windRelaxedEmbouchure=``,e.windRimOnly=``,e.windSharpEmbouchure=``,e.windStrongAirPressure=``,e.windThreeQuartersClosedHole=``,e.windTightEmbouchure=``,e.windTrillKey=``,e.windVeryTightEmbouchure=``,e.windWeakAirPressure=``,e}({}),F=16384,ie={"1/8":F*8,"1/4":F*4,"1/2":F*2,1:F/1,2:F/2,4:F/4,8:F/8,16:F/16,32:F/32,64:F/64,128:F/128,256:F/256,512:F/512,1024:F/1024},ae={m:`1/8`,l:`1/4`,w:`1`,h:`2`,q:`4`,b:`256`},oe={...(()=>{let e={};for(let t=1;t<=14;t++)e[`flats_${t}`]={accidental:`b`,num:t},e[`sharps_${t}`]={accidental:`#`,num:t};return e.flats_0={num:0},e.sharps_0={num:0},e})(),C:{num:0},Am:{num:0},F:{accidental:`b`,num:1},Dm:{accidental:`b`,num:1},Bb:{accidental:`b`,num:2},Gm:{accidental:`b`,num:2},Eb:{accidental:`b`,num:3},Cm:{accidental:`b`,num:3},Ab:{accidental:`b`,num:4},Fm:{accidental:`b`,num:4},Db:{accidental:`b`,num:5},Bbm:{accidental:`b`,num:5},Gb:{accidental:`b`,num:6},Ebm:{accidental:`b`,num:6},Cb:{accidental:`b`,num:7},Abm:{accidental:`b`,num:7},Dbm:{accidental:`b`,num:8},Gbm:{accidental:`b`,num:9},G:{accidental:`#`,num:1},Em:{accidental:`#`,num:1},D:{accidental:`#`,num:2},Bm:{accidental:`#`,num:2},A:{accidental:`#`,num:3},"F#m":{accidental:`#`,num:3},E:{accidental:`#`,num:4},"C#m":{accidental:`#`,num:4},B:{accidental:`#`,num:5},"G#m":{accidental:`#`,num:5},"F#":{accidental:`#`,num:6},"D#m":{accidental:`#`,num:6},"C#":{accidental:`#`,num:7},"A#m":{accidental:`#`,num:7},"G#":{accidental:`#`,num:8},"D#":{accidental:`#`,num:9},"A#":{accidental:`#`,num:10}},se={treble:{lineShift:0},bass:{lineShift:6},tenor:{lineShift:4},alto:{lineShift:3},soprano:{lineShift:1},percussion:{lineShift:0},"mezzo-soprano":{lineShift:2},"baritone-c":{lineShift:5},"baritone-f":{lineShift:5},subbass:{lineShift:7},french:{lineShift:-1}},ce={C:{index:0,intVal:0},CN:{index:0,intVal:0},"C#":{index:0,intVal:1},"C##":{index:0,intVal:2},CB:{index:0,intVal:11},CBB:{index:0,intVal:10},D:{index:1,intVal:2},DN:{index:1,intVal:2},"D#":{index:1,intVal:3},"D##":{index:1,intVal:4},DB:{index:1,intVal:1},DBB:{index:1,intVal:0},E:{index:2,intVal:4},EN:{index:2,intVal:4},"E#":{index:2,intVal:5},"E##":{index:2,intVal:6},EB:{index:2,intVal:3},EBB:{index:2,intVal:2},F:{index:3,intVal:5},FN:{index:3,intVal:5},"F#":{index:3,intVal:6},"F##":{index:3,intVal:7},FB:{index:3,intVal:4},FBB:{index:3,intVal:3},G:{index:4,intVal:7},GN:{index:4,intVal:7},"G#":{index:4,intVal:8},"G##":{index:4,intVal:9},GB:{index:4,intVal:6},GBB:{index:4,intVal:5},A:{index:5,intVal:9},AN:{index:5,intVal:9},"A#":{index:5,intVal:10},"A##":{index:5,intVal:11},AB:{index:5,intVal:8},ABB:{index:5,intVal:7},B:{index:6,intVal:11},BN:{index:6,intVal:11},"B#":{index:6,intVal:12},"B##":{index:6,intVal:13},BB:{index:6,intVal:10},BBB:{index:6,intVal:9},R:{index:6},X:{index:6}},le={n:{name:`note`},r:{name:`rest`},h:{name:`harmonic`},m:{name:`muted`},s:{name:`slash`},g:{name:`ghost`},d:{name:`diamond`},x:{name:`x`},ci:{name:`circled`},cx:{name:`circle x`},sf:{name:`slashed`},sb:{name:`slashed backward`},sq:{name:`square`},tu:{name:`triangle up`},td:{name:`triangle down`}},ue={"#":P.accidentalSharp,"##":P.accidentalDoubleSharp,b:P.accidentalFlat,bb:P.accidentalDoubleFlat,n:P.accidentalNatural,"{":P.accidentalParensLeft,"}":P.accidentalParensRight,db:P.accidentalThreeQuarterTonesFlatZimmermann,d:P.accidentalQuarterToneFlatStein,"++":P.accidentalThreeQuarterTonesSharpStein,"+":P.accidentalQuarterToneSharpStein,"+-":P.accidentalKucukMucennebSharp,bs:P.accidentalBakiyeFlat,bss:P.accidentalBuyukMucennebFlat,o:P.accidentalSori,k:P.accidentalKoron,bbs:P.accidentalBuyukMucennebSharp,"++-":P.accidentalBuyukMucennebSharp,ashs:P.accidentalBuyukMucennebSharp,afhf:P.accidentalBuyukMucennebSharp},de={1:{a:[1],b:[1]},2:{a:[1,2]},3:{a:[1,3,2],b:[1,2,1],secondOnBottom:[1,2,3]},4:{a:[1,3,4,2],b:[1,2,3,1],spacedOutTetrachord:[1,2,1,2]},5:{a:[1,3,5,4,2],b:[1,2,4,3,1],spacedOutPentachord:[1,2,3,2,1],verySpacedOutPentachord:[1,2,1,2,1]},6:{a:[1,3,5,6,4,2],b:[1,2,4,5,3,1],spacedOutHexachord:[1,3,2,1,3,2],verySpacedOutHexachord:[1,2,1,2,1,2]}},fe={"a.":{code:P.augmentationDot,betweenLines:!0},av:{aboveCode:P.articStaccatissimoAbove,belowCode:P.articStaccatissimoBelow,betweenLines:!0},"a>":{aboveCode:P.articAccentAbove,belowCode:P.articAccentBelow,betweenLines:!0},"a-":{aboveCode:P.articTenutoAbove,belowCode:P.articTenutoBelow,betweenLines:!0},"a^":{aboveCode:P.articMarcatoAbove,belowCode:P.articMarcatoBelow,betweenLines:!1},"a+":{code:P.pluckedLeftHandPizzicato,betweenLines:!1},ao:{aboveCode:P.pluckedSnapPizzicatoAbove,belowCode:P.pluckedSnapPizzicatoBelow,betweenLines:!1},ah:{code:P.stringsHarmonic,betweenLines:!1},"a@":{aboveCode:P.fermataAbove,belowCode:P.fermataBelow,betweenLines:!1},"a@a":{code:P.fermataAbove,betweenLines:!1},"a@u":{code:P.fermataBelow,betweenLines:!1},"a@s":{aboveCode:P.fermataShortAbove,belowCode:P.fermataShortBelow,betweenLines:!1},"a@as":{code:P.fermataShortAbove,betweenLines:!1},"a@us":{code:P.fermataShortBelow,betweenLines:!1},"a@l":{aboveCode:P.fermataLongAbove,belowCode:P.fermataLongBelow,betweenLines:!1},"a@al":{code:P.fermataLongAbove,betweenLines:!1},"a@ul":{code:P.fermataLongBelow,betweenLines:!1},"a@vl":{aboveCode:P.fermataVeryLongAbove,belowCode:P.fermataVeryLongBelow,betweenLines:!1},"a@avl":{code:P.fermataVeryLongAbove,betweenLines:!1},"a@uvl":{code:P.fermataVeryLongBelow,betweenLines:!1},"a|":{code:P.stringsUpBow,betweenLines:!1},am:{code:P.stringsDownBow,betweenLines:!1},"a,":{code:P.pictChokeCymbal,betweenLines:!1}},pe={mordent:P.ornamentShortTrill,mordentInverted:P.ornamentMordent,turn:P.ornamentTurn,turnInverted:P.ornamentTurnSlash,tr:P.ornamentTrill,upprall:P.ornamentPrecompSlideTrillDAnglebert,downprall:P.ornamentPrecompDoubleCadenceUpperPrefix,prallup:P.ornamentPrecompTrillSuffixDandrieu,pralldown:P.ornamentPrecompTrillLowerSuffix,upmordent:P.ornamentPrecompSlideTrillBach,downmordent:P.ornamentPrecompDoubleCadenceUpperPrefixTurn,lineprall:P.ornamentPrecompAppoggTrill,prallprall:P.ornamentTremblement,scoop:P.brassScoop,doit:P.brassDoitMedium,fall:P.brassFallLipShort,doitLong:P.brassLiftMedium,fallLong:P.brassFallRoughMedium,bend:P.brassBend,plungerClosed:P.brassMuteClosed,plungerOpen:P.brassMuteOpen,flip:P.brassFlip,jazzTurn:P.brassJazzTurn,smear:P.brassSmear},I=class e{static{this.UNISON=!0}static{this.SOFTMAX_FACTOR=10}static{this.STEM_WIDTH=1.5}static{this.STEM_HEIGHT=35}static{this.STAVE_LINE_THICKNESS=1}static{this.RENDER_PRECISION_PLACES=3}static{this.RESOLUTION=F}static{this.durationCodes={"1/8":{stem:!0},"1/4":{stem:!1},"1/2":{stem:!1},1:{stem:!1},2:{stem:!0},4:{stem:!0},8:{stem:!0,beamCount:1,stemBeamExtension:0,codeFlagUp:P.flag8thUp},16:{beamCount:2,stemBeamExtension:0,stem:!0,codeFlagUp:P.flag16thUp},32:{beamCount:3,stemBeamExtension:7.5,stem:!0,codeFlagUp:P.flag32ndUp},64:{beamCount:4,stemBeamExtension:15,stem:!0,codeFlagUp:P.flag64thUp},128:{beamCount:5,stemBeamExtension:22.5,stem:!0,codeFlagUp:P.flag128thUp},256:{beamCount:6,stemBeamExtension:25,stem:!0,codeFlagUp:P.flag256thUp},512:{beamCount:7,stemBeamExtension:27.5,stem:!0,codeFlagUp:P.flag512thUp},1024:{beamCount:8,stemBeamExtension:30,stem:!0,codeFlagUp:P.flag1024thUp}}}static{this.NOTATION_FONT_SCALE=39}static{this.TABLATURE_FONT_SCALE=39}static{this.SLASH_NOTEHEAD_WIDTH=15}static{this.STAVE_LINE_DISTANCE=10}static{this.noteHeadStemYOffsets={[P.noteheadXBlack]:{up:.444,down:-.44},[P.noteheadXHalf]:{up:.412,down:-.412}}}static{this.TEXT_HEIGHT_OFFSET_HACK=1}static clefProperties(e){if(!e||!(e in se))throw new p(`BadArgument`,`Invalid clef: `+e);return se[e]}static keyProperties(t,n=`treble`,r=`N`,i){let a={octaveShift:0,duration:`4`};typeof i==`object`&&(a={...a,...i});let o=e.sanitizeDuration(a.duration),s=t.split(`/`);if(s.length<2)throw new p(`BadArguments`,`First argument must be note/octave or note/octave/glyph-code: ${t}`);let c=s[0].toUpperCase();r=r.toUpperCase();let l=ce[c];if(!l)throw new p(`BadArguments`,`Invalid key name: `+c);let u=parseInt(s[1],10);u-=a.octaveShift;let d=(u*7-28+l.index)/2;d+=e.clefProperties(n).lineShift;let f=l.intVal===void 0?void 0:u*12+l.intVal,m=``,h=`N`;return h=s.length>2&&s[2]?s[2].toUpperCase():r===`N`?c:r,m=this.codeNoteHead(h,o),{key:c,octave:u,line:d,intValue:f,code:m,displaced:!1}}static integerToNote(e){if(e===void 0||e<0||e>11)throw new p(`BadArguments`,`integerToNote() requires an integer in the range [0, 11]: ${e}`);let t={0:`C`,1:`C#`,2:`D`,3:`D#`,4:`E`,5:`F`,6:`F#`,7:`G`,8:`G#`,9:`A`,10:`A#`,11:`B`}[e];if(!t)throw new p(`BadArguments`,`Unknown note value for integer: ${e}`);return t}static textWidth(e){return 7*e.toString().length}static articulationCodes(e){return fe[e]}static accidentalCodes(e){return ue[e]??e}static{this.accidentalColumnsTable=de}static ornamentCodes(e){return pe[e]??e}static keySignature(e){let t=oe[e];if(!t)throw new p(`BadKeySignature`,`Bad key signature spec: '${e}'`);if(!t.accidental)return[];let n={b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]}[t.accidental],r=Math.min(t.num,7),i=Math.max(t.num-7,0),a=n.slice(i,r).map(e=>({type:`${t.accidental}`,line:e})),o=n.slice(0,i).map(e=>({type:`${t.accidental}${t.accidental}`,line:e}));return[...a,...o]}static getKeySignatures(){return oe}static hasKeySignature(e){return e in oe}static{this.unicode={sharp:`♯`,flat:`♭`,natural:`♮`,triangle:`△`,"o-with-slash":`ø`,degrees:`°`,circle:`○`}}static sanitizeDuration(e){let t=ae[e];if(t!==void 0&&(e=t),ie[e]===void 0)throw new p(`BadArguments`,`The provided duration is not valid: ${e}`);return e}static durationToFraction(t){return new C().parse(e.sanitizeDuration(t))}static durationToNumber(t){return e.durationToFraction(t).value()}static durationToTicks(t){t=e.sanitizeDuration(t);let n=ie[t];if(n===void 0)throw new p(`InvalidDuration`);return n}static codeNoteHead(e,t){switch(e){case`D0`:return P.noteheadDiamondWhole;case`D1`:return P.noteheadDiamondHalf;case`D2`:return P.noteheadDiamondBlack;case`D3`:return P.noteheadDiamondBlack;case`T0`:return P.noteheadTriangleUpWhole;case`T1`:return P.noteheadTriangleUpHalf;case`T2`:return P.noteheadTriangleUpBlack;case`T3`:return P.noteheadTriangleUpBlack;case`X0`:return P.noteheadXWhole;case`X1`:return P.noteheadXHalf;case`X2`:return P.noteheadXBlack;case`X3`:return P.noteheadCircleX;case`S1`:return P.noteheadSquareWhite;case`S2`:return P.noteheadSquareBlack;case`R1`:return P.noteheadSquareWhite;case`R2`:return P.noteheadSquareWhite;case`DO`:return P.noteheadTriangleUpBlack;case`RE`:return P.noteheadMoonBlack;case`MI`:return P.noteheadDiamondBlack;case`FA`:return P.noteheadTriangleLeftBlack;case`FAUP`:return P.noteheadTriangleRightBlack;case`SO`:return P.noteheadBlack;case`LA`:return P.noteheadSquareBlack;case`TI`:return P.noteheadTriangleRoundDownBlack;case`DI`:case`H`:switch(t){case`1/2`:return P.noteheadDiamondDoubleWhole;case`1`:return P.noteheadDiamondWhole;case`2`:return P.noteheadDiamondHalf;default:return P.noteheadDiamondBlack}case`X`:case`M`:switch(t){case`1/2`:return P.noteheadXDoubleWhole;case`1`:return P.noteheadXWhole;case`2`:return P.noteheadXHalf;default:return P.noteheadXBlack}case`CX`:switch(t){case`1/2`:return P.noteheadCircleXDoubleWhole;case`1`:return P.noteheadCircleXWhole;case`2`:return P.noteheadCircleXHalf;default:return P.noteheadCircleX}case`CI`:switch(t){case`1/2`:return P.noteheadCircledDoubleWhole;case`1`:return P.noteheadCircledWhole;case`2`:return P.noteheadCircledHalf;default:return P.noteheadCircledBlack}case`SQ`:switch(t){case`1/2`:return P.noteheadDoubleWholeSquare;case`1`:return P.noteheadSquareWhite;case`2`:return P.noteheadSquareWhite;default:return P.noteheadSquareBlack}case`TU`:switch(t){case`1/2`:return P.noteheadTriangleUpDoubleWhole;case`1`:return P.noteheadTriangleUpWhole;case`2`:return P.noteheadTriangleUpHalf;default:return P.noteheadTriangleUpBlack}case`TD`:switch(t){case`1/2`:return P.noteheadTriangleDownDoubleWhole;case`1`:return P.noteheadTriangleDownWhole;case`2`:return P.noteheadTriangleDownHalf;default:return P.noteheadTriangleDownBlack}case`SF`:switch(t){case`1/2`:return P.noteheadSlashedDoubleWhole1;case`1`:return P.noteheadSlashedWhole1;case`2`:return P.noteheadSlashedHalf1;default:return P.noteheadSlashedBlack1}case`SB`:switch(t){case`1/2`:return P.noteheadSlashedDoubleWhole2;case`1`:return P.noteheadSlashedWhole2;case`2`:return P.noteheadSlashedHalf2;default:return P.noteheadSlashedBlack2}case`R`:switch(t){case`1/8`:return P.restMaxima;case`1/4`:return P.restLonga;case`1/2`:return P.restDoubleWhole;case`1`:return P.restWhole;case`2`:return P.restHalf;case`4`:return P.restQuarter;case`8`:return P.rest8th;case`16`:return P.rest16th;case`32`:return P.rest32nd;case`64`:return P.rest64th;case`128`:return P.rest128th;case`256`:return P.rest256th;case`512`:return P.rest512th;case`1024`:return P.rest1024th}break;case`S`:switch(t){case`1/2`:return P.noteheadSlashWhiteDoubleWhole;case`1`:return P.noteheadSlashWhiteWhole;case`2`:return P.noteheadSlashWhiteHalf;default:return P.noteheadSlashVerticalEnds}default:switch(t){case`1/8`:return P.mensuralNoteheadMaximaBlack;case`1/4`:return P.mensuralNoteheadLongaBlack;case`1/2`:return P.noteheadDoubleWhole;case`1`:return P.noteheadWhole;case`2`:return P.noteheadHalf;default:return P.noteheadBlack}}return P.null}static{this.validTypes=le}static{this.TIME4_4={numBeats:4,beatValue:4,resolution:F}}};function me(...e){he.DEBUG&&g(`VexFlow.Accidental`,e)}var he=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Accidental}static format(e,t){if(!e||e.length===0)return;let n=T.get(`Accidental.noteheadAccidentalPadding`),r=t.leftShift+n,i=T.get(`Accidental.accidentalSpacing`),a=T.get(`Accidental.leftPadding`),o=[],s,c=0;for(let t=0;t<e.length;++t){let n=e[t],r=n.getNote(),i=r.getStave(),a=n.checkIndex(),l=r.getKeyProps()[a];if(r!==s){for(let e=0;e<r.keys.length;++e)c=Math.max(r.getLeftDisplacedHeadPx()-r.getXShift(),c);s=r}if(i){let e=i.getSpacingBetweenLines(),t=i.getYForLine(l.line),r=Math.round(t/e*2)/2;o.push({y:t,line:r,extraXSpaceNeeded:c,accidental:n,spacingBetweenStaveLines:e})}else o.push({line:l.line,extraXSpaceNeeded:c,accidental:n})}o.sort((e,t)=>t.line-e.line);let l=[],u=0;for(let e=0;e<o.length;e++){let t=o[e],n=t.accidental.type,r=l[l.length-1],a;!r||r?.line!==t.line?(a={line:t.line,flatLine:!0,dblSharpLine:!0,numAcc:0,width:0,column:0},l.push(a)):a=r,n!==`b`&&n!==`bb`&&(a.flatLine=!1),n!==`##`&&(a.dblSharpLine=!1),a.numAcc++,a.width+=t.accidental.getWidth()+i,u=Math.max(t.extraXSpaceNeeded,u)}let d=0;for(let e=0;e<l.length;e++){let t=!1,n=e,r=e;for(;r+1<l.length&&!t;)this.checkCollision(l[r],l[r+1])?r++:t=!0;let i=e=>l[n+e],a=e=>e.map(i),o=(e,t)=>{let[n,r]=a([e,t]).map(e=>e.line);return n-r},s=(...e)=>e.map(a).every(([e,t])=>!this.checkCollision(e,t)),c=r-n+1,u=this.checkCollision(l[n],l[r])?`a`:`b`;switch(c){case 3:u===`a`&&o(1,2)===.5&&o(0,1)!==.5&&(u=`secondOnBottom`);break;case 4:s([0,2],[1,3])&&(u=`spacedOutTetrachord`);break;case 5:u===`b`&&s([1,3])&&(u=`spacedOutPentachord`,s([0,2],[2,4])&&(u=`verySpacedOutPentachord`));break;case 6:s([0,3],[1,4],[2,5])&&(u=`spacedOutHexachord`),s([0,2],[2,4],[1,3],[3,5])&&(u=`verySpacedOutHexachord`)}let f,p;if(c>=7){let t=2,n=!0;for(;n===!0;){n=!1;for(let e=0;e+t<l.length;e++)if(this.checkCollision(l[e],l[e+t])){n=!0,t++;break}}for(f=e;f<=r;f++)p=(f-e)%t+1,l[f].column=p,d=d>p?d:p}else for(f=e;f<=r;f++)p=I.accidentalColumnsTable[c][u][f-e],l[f].column=p,d=d>p?d:p;e=r}let f=[],p=[];for(let e=0;e<=d;e++)f[e]=0,p[e]=0;f[0]=r+u,p[0]=r,l.forEach(e=>{e.width>f[e.column]&&(f[e.column]=e.width)});for(let e=1;e<f.length;e++)p[e]=f[e]+p[e-1];let m=p[p.length-1],h=0;l.forEach(e=>{let t=0,n=h+e.numAcc;for(;h<n;h++){let n=p[e.column-1]+t+u;o[h].accidental.setXShift(n),t+=o[h].accidental.getWidth()+i,me(`Line, accCount, shift: `,e.line,h,n)}}),t.leftShift=m+a}static checkCollision(e,t){let n=t.line-e.line,r=3;n>0?(r=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(n-=.5)):(r=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(n-=.5));let i=Math.abs(n)<r;return me(`Line1, Line2, Collision: `,e.line,t.line,i),i}static applyAccidentals(n,r){let i=[],a={};n.forEach(e=>{let t=new C(0,1);e.getTickables().forEach(e=>{if(e.shouldIgnoreTicks())return;let n=a[t.value()];n?n.push(e):(i.push(t.value()),a[t.value()]=[e]),t.add(e.getTicks())})});let s=new N;r||=`C`;let c=s.createScaleMap(r),u={};i.forEach(n=>{let r=a[n],i=[],d=n=>{if(!l(n)||n.isRest()||n.shouldIgnoreTicks())return;let r=n;r.keys.forEach((n,a)=>{let o=s.getNoteParts(n.split(`/`)[0]),l=n.split(`/`)[1],d=o.accidental||`n`,f=o.root+d;u[o.root+l]||(u[o.root+l]=c[o.root]);let p=u[o.root+l]===f,m=i.indexOf(n)>-1;if(r.getModifiers().forEach((e,n)=>{t(e)&&e.type==d&&e.getIndex()==a&&r.getModifiers().splice(n,1)}),!p||p&&m){u[o.root+l]=f;let t=new e(d);r.addModifier(t,a),i.push(n)}}),r.getModifiers().forEach(e=>{o(e)&&e.getGraceNotes().forEach(d)})};r.forEach(d)})}constructor(e){super(),me(`New accidental: `,e),this.type=e,this.position=M.Position.LEFT,this.cautionary=!1,this.reset()}reset(){this.text=``,this.cautionary?(this.text+=I.accidentalCodes(`{`),this.text+=I.accidentalCodes(this.type),this.text+=I.accidentalCodes(`}`),this.fontInfo.size=T.get(`Accidental.cautionary.fontSize`)):(this.text+=I.accidentalCodes(this.type),this.fontInfo.size=T.get(`Accidental.fontSize`)),a(this.note)&&(this.fontInfo.size=T.get(`Accidental.grace.fontSize`))}setNote(e){return h(e,`ArgumentError`,`Bad note value: ${e}`),this.note=e,this.reset(),this}setAsCautionary(){return this.cautionary=!0,this.reset(),this}draw(){let{type:e,position:t,index:n}=this,r=this.checkContext(),i=this.checkAttachedNote();this.setRendered();let a=i.getModifierStartXY(t,n);this.x=a.x-this.width,this.y=a.y,me(`Rendering: `,e,a.x,a.y),this.renderText(r,0,0)}};function ge(...e){L.DEBUG&&g(`VexFlow.Stem`,e)}var L=class e extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.Stem}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return I.STEM_WIDTH}static get HEIGHT(){return I.STEM_HEIGHT}constructor(e){super(),this.stemUpYOffset=0,this.stemDownYOffset=0,this.stemUpYBaseOffset=0,this.stemDownYBaseOffset=0,this.xBegin=e?.xBegin??0,this.xEnd=e?.xEnd??0,this.yTop=e?.yTop??0,this.yBottom=e?.yBottom??0,this.stemExtension=e?.stemExtension??0,this.stemDirection=e?.stemDirection??0,this.hide=e?.hide||!1,this.isStemlet=e?.isStemlet||!1,this.stemletHeight=e?.stemletHeight??0,this.renderHeightAdjustment=0,this.setOptions(e)}setOptions(e){this.stemUpYOffset=e?.stemUpYOffset??0,this.stemDownYOffset=e?.stemDownYOffset??0,this.stemUpYBaseOffset=e?.stemUpYBaseOffset??0,this.stemDownYBaseOffset=e?.stemDownYBaseOffset??0}setNoteHeadXBounds(e,t){return this.xBegin=e,this.xEnd=t,this}setDirection(e){this.stemDirection=e}setExtension(e){this.stemExtension=e}getExtension(){return this.stemExtension}setYBounds(e,t){this.yTop=e,this.yBottom=t}getHeight(){let t=this.stemDirection===e.UP?this.stemUpYOffset:this.stemDownYOffset;return(this.yBottom-this.yTop+(e.HEIGHT-t+this.stemExtension))*this.stemDirection}getBoundingBox(){throw new p(`NotImplemented`,`getBoundingBox() not implemented.`)}getExtents(){let t=this.stemDirection===e.UP,n=[this.yTop,this.yBottom],r=e.HEIGHT+this.stemExtension,i=(t?Math.min:Math.max)(...n),a=(t?Math.max:Math.min)(...n);return{topY:i+r*-this.stemDirection,baseY:a}}setVisibility(e){return this.hide=!e,this}setStemlet(e,t){return this.isStemlet=e,this.stemletHeight=t,this}adjustHeightForFlag(){this.renderHeightAdjustment=T.get(`Stem.heightAdjustmentForFlag`,-3)}adjustHeightForBeam(){this.renderHeightAdjustment=-e.WIDTH/2}draw(){if(this.setRendered(),this.hide)return;let t=this.checkContext(),n,r,i=this.stemDirection,a=0;i===e.DOWN?(n=this.xBegin,r=this.yTop+this.stemDownYOffset,a=this.stemDownYBaseOffset):(n=this.xEnd,r=this.yBottom-this.stemUpYOffset,a=this.stemUpYBaseOffset);let o=this.getHeight();ge(`Rendering stem - `,`Top Y: `,this.yTop,`Bottom Y: `,this.yBottom);let s=this.isStemlet?o-this.stemletHeight*this.stemDirection:0,c=this.getAttribute(`class`);t.openGroup(`stem`+(c?` `+c:``),this.getAttribute(`id`)),t.beginPath(),t.setLineWidth(e.WIDTH),t.moveTo(n,r-s+a),t.lineTo(n,r-o-this.renderHeightAdjustment*i),t.stroke(),t.closeGroup()}};function _e(...e){be.DEBUG&&g(`VexFlow.Annotation`,e)}var ve=function(e){return e[e.LEFT=1]=`LEFT`,e[e.CENTER=2]=`CENTER`,e[e.RIGHT=3]=`RIGHT`,e[e.CENTER_STEM=4]=`CENTER_STEM`,e}({}),ye=function(e){return e[e.TOP=1]=`TOP`,e[e.CENTER=2]=`CENTER`,e[e.BOTTOM=3]=`BOTTOM`,e[e.CENTER_STEM=4]=`CENTER_STEM`,e}({}),be=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Annotation}static{this.HorizontalJustify=ve}static{this.HorizontalJustifyString={left:1,right:3,center:2,centerStem:4}}static{this.VerticalJustify=ye}static{this.VerticalJustifyString={above:1,top:1,below:3,bottom:3,center:2,centerStem:4}}static get minAnnotationPadding(){return T.get(`NoteHead.minPadding`)}static format(t,n){if(!t||t.length===0)return!1;let r=0,i=0,a=0,o=0;for(let s=0;s<t.length;++s){let c=t[s],l=(2+k.convertSizeToPixelValue(c.fontInfo.size))/I.STAVE_LINE_DISTANCE,f=c.checkAttachedNote(),p=f.getGlyphWidth(),m=c.getWidth();c.horizontalJustification===3?(a=Math.max(p,a),r=Math.max(r,m)+e.minAnnotationPadding):c.horizontalJustification===1?(o=Math.max(p,o),i=Math.max(i,m)):(r=Math.max(r,m/2)+e.minAnnotationPadding,i=Math.max(i,m/2),a=Math.max(p/2,a),o=Math.max(p/2,o));let h=f.getStave(),g=f.hasStem()?f.getStemDirection():L.UP,_=0,v=5;if(d(f)){if(f.renderOptions.drawStem){let e=f.getStem();e&&(_=Math.abs(e.getHeight())/I.STAVE_LINE_DISTANCE)}else _=0}else if(u(f)){let e=f.getStem();e&&f.getNoteType()===`n`&&(_=Math.abs(e.getHeight())/I.STAVE_LINE_DISTANCE)}if(h&&(v=h.getNumLines()),c.verticalJustification===this.VerticalJustify.TOP){let e=f.getLineNumber(!0);d(f)&&(e=v-(f.leastString()-.5)),g===L.UP&&(e+=_),e+n.topTextLine+.5<v?(c.setTextLine(v-e),l+=v-e,n.topTextLine=l):(c.setTextLine(n.topTextLine),n.topTextLine+=l)}else if(c.verticalJustification===this.VerticalJustify.BOTTOM){let e=v-f.getLineNumber();d(f)&&(e=f.greatestString()-1),g===L.DOWN&&(e+=_);let t=e+n.textLine+1;t<v?(c.setTextLine(v-t),l+=v-t,n.textLine=l):(c.setTextLine(n.textLine),n.textLine+=l)}else c.setTextLine(n.textLine)}let s=Math.min(Math.max(i-o,0),Math.max(i-n.rightShift,0)),c=Math.min(Math.max(r-a,0),Math.max(r-n.leftShift,0));return n.leftShift+=c,n.rightShift+=s,!0}constructor(e){super(),this.text=e,this.horizontalJustification=2,this.verticalJustification=1}setVerticalJustification(t){return this.verticalJustification=typeof t==`string`?e.VerticalJustifyString[t]:t,this}getJustification(){return this.horizontalJustification}setJustification(t){return this.horizontalJustification=typeof t==`string`?e.HorizontalJustifyString[t]:t,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote(),n=t.hasStem()?t.getStemDirection():L.UP,r=t.getModifierStartXY(j.ABOVE,this.index);this.setRendered();let i=this.getAttribute(`class`);e.openGroup(`annotation`+(i?` `+i:``),this.getAttribute(`id`));let a=this.getWidth(),o=k.convertSizeToPixelValue(this.fontInfo.size),s,c;s=this.horizontalJustification===1?r.x:this.horizontalJustification===3?r.x-a:this.horizontalJustification===2?r.x-a/2:t.getStemX()-a/2;let l={},u=0,d=t.hasStem(),f=t.checkStave();if(d&&(l=t.checkStem().getExtents(),u=f.getSpacingBetweenLines()),this.verticalJustification===3)c=t.getYs().reduce((e,t)=>e>t?e:t),c+=(this.textLine+1)*I.STAVE_LINE_DISTANCE+o,d&&n===L.DOWN&&(c=Math.max(c,l.topY+o+u*this.textLine));else if(this.verticalJustification===2){let e=t.getYForTopText(this.textLine)-1;c=e+(f.getYForBottomText(this.textLine)-e)/2+o/2}else if(this.verticalJustification===1)c=Math.min(...t.getYs())-(this.textLine+1)*I.STAVE_LINE_DISTANCE,d&&n===L.UP&&(u=l.topY<f.getTopLineTopY()?I.STAVE_LINE_DISTANCE:u,c=Math.min(c,l.topY-u*(this.textLine+1)));else{let e=t.getStemExtents();c=e.topY+(e.baseY-e.topY)/2+o/2}_e(`Rendering annotation: `,this.text,s,c),this.x=s,this.y=c,this.renderText(e,0,0),this.drawPointerRect(),e.closeGroup()}};function xe(...e){je.DEBUG&&g(`VexFlow.Articulation`,e)}var{ABOVE:R,BELOW:Se}=M.Position;function Ce(e,t){return e(t/.5)*.5}function we(e,t){return t===R?e<=5:e>=1}function Te(e,t){return we(e,t)?t===R?Math.ceil:Math.floor:Math.round}function Ee(e,t,n,r){let i=Ce(Te(t,n),t),a=e&&we(i,n),o=i%1==0;return a&&o?i+.5*-r:i}var De=e=>l(e)||a(e);function Oe(e,t){let n=e.getStemDirection(),{topY:r,baseY:i}=e.getStemExtents();if(De(e))return e.hasStem()?n===L.UP?r:i:Math.min(...e.getYs());if(d(e))return e.hasStem()&&n===L.UP?r:e.checkStave().getYForTopText(t);throw new p(`UnknownCategory`,`Only can get the top and bottom ys of stavenotes and tabnotes`)}function ke(e,t){let n=e.getStemDirection(),{topY:r,baseY:i}=e.getStemExtents();if(De(e))return e.hasStem()?n===L.UP?i:r:Math.max(...e.getYs());if(d(e))return e.hasStem()?n===L.UP?e.checkStave().getYForBottomText(t):r:e.checkStave().getYForBottomText(t);throw new p(`UnknownCategory`,`Only can get the top and bottom ys of stavenotes and tabnotes`)}function Ae(e,t){let n=t===R&&e.getStemDirection()===L.UP||t===Se&&e.getStemDirection()===L.DOWN;return De(e)?e.hasStem()&&n?.5:1:e.hasStem()&&n?1:0}var je=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Articulation}static{this.INITIAL_OFFSET=-.5}static format(e,t){if(!e||e.length===0)return!1;let n=0,r=(e,t,n)=>Ce(Te(t,n),e.height/10+.5);e.forEach(e=>{let i=e.checkAttachedNote();n=Math.max(i.getGlyphWidth(),n);let a=5,o=i.hasStem()?i.getStemDirection():L.UP,s=0;if(u(i)){let e=i.getStem();e&&(s=Math.abs(e.getHeight())/I.STAVE_LINE_DISTANCE)}let c=i.getStave();if(c&&(a=c.getNumLines()),e.getPosition()===R){let n=i.getLineNumber(!0);o===L.UP&&(n+=s);let c=r(e,t.topTextLine,R),l=n+t.topTextLine+.5;!e.articulation.betweenLines&&l<a&&(c+=a-l),e.setTextLine(t.topTextLine),t.topTextLine+=c,e.setOrigin(.5,1)}else if(e.getPosition()===Se){let n=Math.max(a-i.getLineNumber(),0);o===L.DOWN&&(n+=s);let c=r(e,t.textLine,Se),l=n+t.textLine+.5;!e.articulation.betweenLines&&l<a&&(c+=a-l),e.setTextLine(t.textLine),t.textLine+=c,e.setOrigin(.5,0)}});let i=e.map(e=>e.getWidth()).reduce((e,t)=>Math.max(t,e)),a=Math.min(Math.max(i-n,0),Math.max(i-(t.leftShift+t.rightShift),0));return t.leftShift+=a/2,t.rightShift+=a/2,!0}static easyScoreHook({articulations:e},t,n){if(!e)return;let r={staccato:`a.`,tenuto:`a-`,accent:`a>`};e.split(`,`).map(e=>e.trim().split(`.`)).map(([e,t])=>{let i={type:r[e]};return t&&(i.position=M.PositionString[t]),n.getFactory().Articulation(i)}).map(e=>t.addModifier(e,0))}constructor(e){super(),this.heightShift=0,this.type=e,this.position=R,I.articulationCodes(this.type)||(this.position=(this.type.codePointAt(0)??0)%2==0?R:Se),this.articulation={betweenLines:!1},this.reset()}reset(){this.articulation=I.articulationCodes(this.type),this.articulation||={code:this.type,betweenLines:!1};let e=(this.position===R?this.articulation.aboveCode:this.articulation.belowCode)||this.articulation.code||P.null;this.text=e}setBetweenLines(e=!0){return this.articulation.betweenLines=e,this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=this.checkIndex(),{position:i,textLine:a}=this,o=this.articulation.betweenLines,s=n.checkStave(),c=s.getSpacingBetweenLines(),l=d(n),{x:u}=n.getModifierStartXY(i,r),f=!o||l,p=Ae(n,i),m={[R]:()=>{let t=Oe(n,a)-(a+p)*c;return f?Math.min(s.getYForTopText(e.INITIAL_OFFSET),t):t},[Se]:()=>{let t=ke(n,a)+(a+p)*c;return f?Math.max(s.getYForBottomText(e.INITIAL_OFFSET),t):t}}[i]();if(!l){let e=i===R?-1:1,t=n.getKeyProps()[r].line,a=(n.getYs()[r]-m)/c+Number(t),s=Ee(o,a,i,e);we(s,i)&&this.setOrigin(.5,.5),m+=Math.abs(s-a)*c*e}xe(`Rendering articulation at (x: ${u}, y: ${m})`),this.x=u,this.y=m,this.renderText(t,0,0)}},Me=class{static get CATEGORY(){return f.RenderContext}set font(e){this.setFont(e)}get font(){return this.getFont()}};function Ne(e,t,n,r=`#F55`){e.save(),e.setFillStyle(r),e.beginPath(),e.arc(t,n,3,0,Math.PI*2,!1),e.closePath(),e.fill(),e.restore()}var Pe=class extends A{static get CATEGORY(){return f.Tickable}constructor(){super(),this._preFormatted=!1,this._postFormatted=!1,this.ticks=new C(0,1),this.intrinsicTicks=0,this.tickMultiplier=new C(1,1),this.modifiers=[],this.tupletStack=[],this.alignCenter=!1,this.centerXShift=0,this.ignoreTicks=!1,this.formatterMetrics={freedom:{left:0,right:0},duration:``,iterations:0,space:{used:0,mean:0,deviation:0}}}reset(){return this}getTicks(){return this.ticks}shouldIgnoreTicks(){return this.ignoreTicks}setIgnoreTicks(e){return this.ignoreTicks=e,this}getWidth(){if(!this._preFormatted)throw new p(`UnformattedNote`,`Can't call GetWidth on an unformatted note.`);return this.width+(this.modifierContext?this.modifierContext.getWidth():0)}getX(){return this.checkTickContext(`Can't getX() without a TickContext.`).getX()+this.xShift}getFormatterMetrics(){return this.formatterMetrics}getCenterXShift(){return this.isCenterAligned()?this.centerXShift:0}setCenterXShift(e){return this.centerXShift=e,this}isCenterAligned(){return this.alignCenter}setCenterAlignment(e){return this.alignCenter=e,this}getVoice(){return h(this.voice,`NoVoice`,`Tickable has no voice.`)}setVoice(e){this.voice=e}getTuplet(){return this.tupletStack.at(-1)}getTupletStack(){return this.tupletStack}removeTuplet(e){let t=this.tupletStack.indexOf(e);if(t===-1)throw new p(`BadArguments`,`Tuplet is not found in this tickable`);this.tupletStack.splice(t,1);let n=e.getNoteCount(),r=e.getNotesOccupied();return this.applyTickMultiplier(n,r),this}clearTuplets(){return this.tupletStack.length?(this.tupletStack=[],this.tickMultiplier=new C(1,1),this.ticks=new C(this.intrinsicTicks,1),this):this}resetTuplet(e){if(e)try{this.removeTuplet(e)}catch{}else this.clearTuplets();return this}setTuplet(e){return this.tupletStack.length&&this.clearTuplets(),this.addTuplet(e)}addTuplet(e){this.tupletStack.push(e);let t=e.getNoteCount(),n=e.getNotesOccupied();return this.applyTickMultiplier(n,t),this}setTupletStack(e){this.clearTuplets();for(let t of e)this.addTuplet(t);return this}addToModifierContext(e){this.modifierContext=e;for(let e=0;e<this.modifiers.length;++e)this.modifierContext.addMember(this.modifiers[e]);return this.modifierContext.addMember(this),this._preFormatted=!1,this}addModifier(e,t=0){return this.modifiers.push(e),this._preFormatted=!1,this}getModifiers(){return this.modifiers}setTickContext(e){this.tickContext=e,this._preFormatted=!1}checkTickContext(e=`Tickable has no tick context.`){return h(this.tickContext,`NoTickContext`,e)}preFormat(){this._preFormatted||(this.width=0,this.modifierContext&&(this.modifierContext.preFormat(),this.width+=this.modifierContext.getWidth()))}set preFormatted(e){this._preFormatted=e}get preFormatted(){return this._preFormatted}postFormat(){return this._postFormatted||=!0,this}set postFormatted(e){this._postFormatted=e}get postFormatted(){return this._postFormatted}getIntrinsicTicks(){return this.intrinsicTicks}setIntrinsicTicks(e){this.intrinsicTicks=e,this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}getTickMultiplier(){return this.tickMultiplier}applyTickMultiplier(e,t){this.tickMultiplier.multiply(e,t),this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}setDuration(e){let t=e.numerator*(I.RESOLUTION/e.denominator);this.ticks=this.tickMultiplier.clone().multiply(t),this.intrinsicTicks=this.ticks.value()}getAbsoluteX(){return this.checkTickContext(`Can't getAbsoluteX() without a TickContext.`).getX()}setModifierContext(e){return this.modifierContext=e,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return h(this.modifierContext,`NoModifierContext`,`No modifier context attached to this tickable.`)}},z=class e extends Pe{static get CATEGORY(){return f.Note}static getGlyphProps(e,t=`n`){e=I.sanitizeDuration(e);let n=I.durationCodes[e];n===void 0&&(n=I.durationCodes[4]);let r=I.codeNoteHead(t.toUpperCase(),e);return r!==P.null&&(n={...n,codeHead:r}),n}static plotMetrics(e,t,n){let r=t.getMetrics(),i=t.getAbsoluteX()-r.modLeftPx-r.leftDisplacedHeadPx,a=t.getAbsoluteX()-r.leftDisplacedHeadPx,o=t.getAbsoluteX(),s=t.getAbsoluteX()+r.notePx,c=t.getAbsoluteX()+r.notePx+r.rightDisplacedHeadPx,l=t.getAbsoluteX()+r.notePx+r.rightDisplacedHeadPx+r.modRightPx,u=l+(t.getFormatterMetrics().freedom.right??0),d=l-i;e.save(),e.setFont(T.get(`fontFamily`),8),e.fillText(Math.round(d)+`px`,i+t.getXShift(),n);let f=n+7;function p(n,r,i,a=f){e.beginPath(),e.setStrokeStyle(i),e.setFillStyle(i),e.setLineWidth(3),e.moveTo(n+t.getXShift(),a),e.lineTo(r+t.getXShift(),a),e.stroke()}p(i,a,`red`),p(a,o,`#999`),p(o,s,`green`),p(s,c,`#999`),p(c,l,`red`),p(l,u,`#DD0`),p(i-t.getXShift(),i,`#BBB`),Ne(e,o+t.getXShift(),f,`blue`);let m=t.getFormatterMetrics();if(m.iterations>0){let r=m.space.deviation,i=r>=0?`+`:``;e.setFillStyle(`red`),e.fillText(i+Math.round(r),o+t.getXShift(),n-10)}e.restore()}static parseDuration(e){if(!e)return;let t=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(e);if(t)return{duration:t[1],dots:t[2].length,type:t[3]||`n`}}static parseNoteStruct(t){let n=e.parseDuration(t.duration);if(!n)return;let r=t.type;if(r&&!I.validTypes[r])return;let i=[];r||(r=n.type||`n`,t.keys!==void 0&&t.keys.forEach((e,t)=>{let n=e.split(`/`);i[t]=n&&n.length===3?n[2]:r}));let a=I.durationToTicks(n.duration);if(!a)return;let o=t.dots?t.dots:n.dots;if(typeof o!=`number`)return;let s=a;for(let e=0;e<o;e++){if(s<=1)return;s/=2,a+=s}return{duration:n.duration,type:r,customTypes:i,dots:o,ticks:a}}constructor(t){if(super(),!t)throw new p(`BadArguments`,`Note must have valid initialization data to identify duration and type.`);let n=e.parseNoteStruct(t);if(!n)throw new p(`BadArguments`,`Invalid note initialization object: ${JSON.stringify(t)}`);this.keys=t.keys||[],this.keyProps=[],this.duration=n.duration,this.noteType=n.type,this.customTypes=n.customTypes,t.durationOverride?this.setDuration(t.durationOverride):this.setIntrinsicTicks(n.ticks),this.modifiers=[],this.glyphProps=e.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map(t=>e.getGlyphProps(this.duration,t)),this.playNote=void 0,this.ignoreTicks=!1,this.width=0,this.leftDisplacedHeadPx=0,this.rightDisplacedHeadPx=0,this.xShift=0,this.ys=[],t.alignCenter&&this.setCenterAlignment(t.alignCenter),this.renderOptions={annotationSpacing:5,strokePx:1,yShift:0}}getPlayNote(){return this.playNote}setPlayNote(e){return this.playNote=e,this}isRest(){return!1}addStroke(e,t){return t.setNote(this),t.setIndex(e),this.modifiers.push(t),this.preFormatted=!1,this}getStave(){return this.stave}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}setStave(e){return this.stave=e,this.setYs([e.getYForLine(0)]),this.setContext(this.stave.getContext()),this}getLeftDisplacedHeadPx(){return this.leftDisplacedHeadPx}getRightDisplacedHeadPx(){return this.rightDisplacedHeadPx}setLeftDisplacedHeadPx(e){return this.leftDisplacedHeadPx=e,this}setRightDisplacedHeadPx(e){return this.rightDisplacedHeadPx=e,this}shouldIgnoreTicks(){return this.ignoreTicks}getLineNumber(e){return 0}getLineForRest(){return 0}getGlyphProps(){return this.glyphProps}getGlyphWidth(){return 0}setYs(e){return this.ys=e,this}getYs(){if(this.ys.length===0)throw new p(`NoYValues`,`No Y-values calculated for this note.`);return this.ys}getYForTopText(e){return this.checkStave().getYForTopText(e)}getVoice(){if(!this.voice)throw new p(`NoVoice`,`Note has no voice.`);return this.voice}setVoice(e){return this.voice=e,this.preFormatted=!1,this}getTickContext(){return this.checkTickContext()}setTickContext(e){return this.tickContext=e,this.preFormatted=!1,this}getDuration(){return this.duration}isDotted(){return this.getModifiersByType(f.Dot).length>0}hasStem(){return!1}getNoteType(){return this.noteType}getBeam(){return this.beam}checkBeam(){return h(this.beam,`NoBeam`,`No beam attached to instance`)}hasBeam(){return this.beam!==void 0}setBeam(e){return this.beam=e,this}addModifier(e,t=0){let n=`Note.addModifier(modifier: Modifier, index: number=0)`;if(typeof t==`string`&&(t=parseInt(t),console.warn(n+" expected a number for `index`, but received a string.")),typeof e!=`object`||typeof t!=`number`)throw new p(`WrongParams`,`Incorrect call signature. Use `+n+` instead.`);return e.setNote(this),e.setIndex(t),super.addModifier(e),this}getModifiersByType(e){return this.modifiers.filter(t=>t.getCategory()===e)}getModifierStartXY(e,t,n){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call GetModifierStartXY on an unformatted note`);return{x:this.getAbsoluteX(),y:this.ys[0]}}getRightParenthesisPx(e){return this.getKeyProps()[e].displaced?this.getRightDisplacedHeadPx():0}getLeftParenthesisPx(e){return this.getKeyProps()[e].displaced?this.getLeftDisplacedHeadPx()-this.xShift:-this.xShift}getFirstDotPx(){let e=this.getRightDisplacedHeadPx(),t=this.checkModifierContext().getMembers(`Parenthesis`);return t.length!==0&&(e+=t[0].getWidth()+1),e}getMetrics(){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call getMetrics on an unformatted note.`);let e=this.modifierContext?this.modifierContext.getState().leftShift:0,t=this.modifierContext?this.modifierContext.getState().rightShift:0,n=this.getWidth();return{width:n,glyphWidth:this.getGlyphWidth(),notePx:n-e-t-this.leftDisplacedHeadPx-this.rightDisplacedHeadPx,modLeftPx:e,modRightPx:t,leftDisplacedHeadPx:this.leftDisplacedHeadPx,rightDisplacedHeadPx:this.rightDisplacedHeadPx,glyphPx:0}}getAbsoluteX(){let e=this.checkTickContext(`Can't getAbsoluteX() without a TickContext.`).getX();return this.stave&&(e+=this.stave.getNoteStartX()+T.get(`Stave.padding`,0)),this.isCenterAligned()&&(e+=this.getCenterXShift()),e}getStemDirection(){throw new p(`NoStem`,`No stem attached to this note.`)}getStemExtents(){throw new p(`NoStem`,`No stem attached to this note.`)}getTieRightX(){let e=this.getAbsoluteX(),t=this.getGlyphWidth();return e+=t/2,e+=-this.width/2+this.width+2,e}getTieLeftX(){let e=this.getAbsoluteX(),t=this.getGlyphWidth();return e+=t/2,e-=this.width/2+2,e}getKeys(){return this.keys}getKeyProps(){return this.keyProps}getBoundingBox(){let e=super.getBoundingBox();for(let t=0;t<this.modifiers.length;t++)e.mergeWith(this.modifiers[t].getBoundingBox());return e}},B=function(e){return e[e.CENTER=0]=`CENTER`,e[e.LEFT=1]=`LEFT`,e[e.RIGHT=2]=`RIGHT`,e[e.ABOVE=3]=`ABOVE`,e[e.BELOW=4]=`BELOW`,e[e.BEGIN=5]=`BEGIN`,e[e.END=6]=`END`,e}({}),V=class extends A{static get CATEGORY(){return f.StaveModifier}static get Position(){return B}constructor(){super(),this.padding=10,this.position=3}getPosition(){return this.position}setPosition(e){return this.position=e,this}getStave(){return this.stave}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}setStave(e){return this.stave=e,this}getPadding(e){return e!==void 0&&e<2?0:this.padding}setPadding(e){return this.padding=e,this}setLayoutMetrics(e){return this.layoutMetrics=e,this}getLayoutMetrics(){return this.layoutMetrics}},H=function(e){return e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`,e[e.END=3]=`END`,e[e.REPEAT_BEGIN=4]=`REPEAT_BEGIN`,e[e.REPEAT_END=5]=`REPEAT_END`,e[e.REPEAT_BOTH=6]=`REPEAT_BOTH`,e[e.NONE=7]=`NONE`,e}({}),Fe=function(e){return e[e.NONE=0]=`NONE`,e[e.STRAIGHT=1]=`STRAIGHT`,e[e.CURVED=2]=`CURVED`,e}({}),U=class e extends V{static get CATEGORY(){return f.Barline}static get type(){return H}static get typeString(){return{single:1,double:2,end:3,repeatBegin:4,repeatEnd:5,repeatBoth:6,none:7}}constructor(e){super(),this.repeatBrackets=0,this.thickness=I.STAVE_LINE_THICKNESS;let t=H;this.widths={},this.widths[t.SINGLE]=5,this.widths[t.DOUBLE]=5,this.widths[t.END]=5,this.widths[t.REPEAT_BEGIN]=5,this.widths[t.REPEAT_END]=5,this.widths[t.REPEAT_BOTH]=5,this.widths[t.NONE]=5,this.paddings={},this.paddings[t.SINGLE]=0,this.paddings[t.DOUBLE]=0,this.paddings[t.END]=0,this.paddings[t.REPEAT_BEGIN]=15,this.paddings[t.REPEAT_END]=15,this.paddings[t.REPEAT_BOTH]=15,this.paddings[t.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[t.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(B.BEGIN),this.setType(e)}setRepeatBracket(e){this.repeatBrackets=e}getRepeatBrackets(){return this.repeatBrackets}getType(){return this.type}setType(t){return this.type=typeof t==`string`?e.typeString[t]:t,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);switch(t.openGroup(`stavebarline`+(n?` `+n:``),this.getAttribute(`id`)),this.type){case 1:this.drawVerticalBar(e,this.x,!1);break;case 2:this.drawVerticalBar(e,this.x,!0);break;case 3:this.drawVerticalEndBar(e,this.x);break;case 4:this.drawRepeatBar(e,this.x,!0),e.getX()!==this.x&&this.drawVerticalBar(e,e.getX());break;case 5:this.drawRepeatBar(e,this.x,!1);break;case 6:this.drawRepeatBar(e,this.x,!1),this.drawRepeatBar(e,this.x,!0)}this.drawPointerRect(),t.closeGroup()}drawVerticalBar(e,t,n){let r=e.checkContext(),i=e.getTopLineTopY(),a=e.getBottomLineBottomY();n&&r.fillRect(t-3,i,1,a-i),r.fillRect(t,i,1,a-i)}drawVerticalEndBar(e,t){let n=e.checkContext(),r=e.getTopLineTopY(),i=e.getBottomLineBottomY();n.fillRect(t-5,r,1,i-r),n.fillRect(t-2,r,3,i-r)}drawStraightBrackets(e,t,n,r,i){let a=e.checkContext(),o=Math.round(1.5*I.STAVE_LINE_DISTANCE)*i,s=Math.round(.6*I.STAVE_LINE_DISTANCE),c=Math.round(s/2),l=n+r,u=i>0?t-2:t;a.moveTo(u,l),a.lineTo(u,l+-1*r*s),a.lineTo(u+o,l+s*r),a.lineTo(u+o,l+r*(s+c)),a.lineTo(u,l),a.fill()}drawCurvedBrackets(e,t,n,r,i){let a=e.checkContext(),o=Math.round(1.5*I.STAVE_LINE_DISTANCE)*i,s=Math.round(.6*I.STAVE_LINE_DISTANCE),c=Math.round(s/2),l=n+r,u=i>0?t-2:t;a.moveTo(u,l),a.lineTo(u,l+-1*r*s),a.quadraticCurveTo(u+o/2,l+-1*r*s,u+o,l+s*r),a.lineTo(u+o,l+r*(s+c)),a.quadraticCurveTo(u+o/2,l,u,l),a.fill()}drawRepeatBar(e,t,n){let r=e.checkContext(),i=e.getTopLineTopY(),a=e.getBottomLineBottomY(),o=3;n||(o=-5);let s=n?1:-1;r.fillRect(t+o,i,1,a-i),r.fillRect(t-2,i,3,a-i),this.repeatBrackets===2?(this.drawCurvedBrackets(e,t,i,-1,s),this.drawCurvedBrackets(e,t,a,1,s)):this.repeatBrackets===1&&(this.drawStraightBrackets(e,t,i,-1,s),this.drawStraightBrackets(e,t,a,1,s)),n?o+=4:o-=4;let c=t+o+1,l=(e.getNumLines()-1)*e.getSpacingBetweenLines();l=l/2-e.getSpacingBetweenLines()/2;let u=i+l+1;r.beginPath(),r.arc(c,u,2,0,Math.PI*2,!1),r.fill(),u+=e.getSpacingBetweenLines(),r.beginPath(),r.arc(c,u,2,0,Math.PI*2,!1),r.fill()}};function Ie(...e){Le.DEBUG&&g(`VexFlow.BarNote`,e)}var Le=class extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.BarNote}constructor(e=H.SINGLE){super({duration:`b`}),this.metrics={widths:{}};let t=H;this.metrics.widths={[t.SINGLE]:8,[t.DOUBLE]:12,[t.END]:15,[t.REPEAT_BEGIN]:14,[t.REPEAT_END]:14,[t.REPEAT_BOTH]:18,[t.NONE]:0},this.ignoreTicks=!0,this.setType(e)}getType(){return this.type}setType(e){return this.type=typeof e==`string`?U.typeString[e]:e,this.setWidth(this.metrics.widths[this.type]),this}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkContext();Ie(`Rendering bar line at: `,this.getAbsoluteX());let t=new U(this.type);t.setX(this.getAbsoluteX()),t.setStave(this.checkStave()),t.setContext(e),t.drawWithStyle(),this.setRendered()}},Re=class e extends M{static get CATEGORY(){return f.Bend}static get UP(){return 0}static get DOWN(){return 1}static format(e,t){if(!e||e.length===0)return!1;let n=0;for(let r=0;r<e.length;++r){let i=e[r],a=i.checkAttachedNote();if(d(a)){let e=a.leastString()-1;t.topTextLine<e&&(t.topTextLine=e)}i.setXShift(n),n=i.getWidth(),i.setTextLine(t.topTextLine)}return t.rightShift+=n,t.topTextLine+=1,!0}setStyleLine(e){return this.styleLine=e,this}getStyleLine(){return this.styleLine}constructor(e){super(),this.styleLine=T.getStyle(`Bend.line`),this.xShift=0,this.tap=``,this.renderOptions={bendWidth:8,releaseWidth:8},this.phrase=e,this.updateWidth()}setXShift(e){return this.xShift=e,this.updateWidth(),this}setTap(e){return this.tap=e,this}getTextHeight(){let e=new A(f.Bend);return e.setText(this.phrase[0].text),e.getHeight()}updateWidth(){let t=e=>{let t=new A(f.Bend);return t.setText(e),t.getWidth()},n=0;for(let r=0;r<this.phrase.length;++r){let i=this.phrase[r];if(i.width!==void 0)n+=i.width;else{let r=i.type===e.UP?this.renderOptions.bendWidth:this.renderOptions.releaseWidth;i.width=Math.max(r,t(i.text))+3,i.drawWidth=i.width/2,n+=i.width}}return this.setWidth(n+this.xShift),this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=n.getModifierStartXY(M.Position.RIGHT,this.index);r.x+=3,r.y+=.5;let i=this.xShift,a=n.checkStave().getSpacingBetweenLines(),o=n.getYs().reduce((e,t)=>e<t?e:t),s=r.y-((this.textLine+1)*a+r.y-o)+3,c=r.y-((this.textLine+1)*a+r.y-o)-1,l=(e,n,r,i)=>{let a=e+r,o=n;this.applyStyle(t,this.styleLine),t.beginPath(),t.moveTo(e,n),t.quadraticCurveTo(a,o,e+r,i),t.stroke()},u=(e,n,r,i)=>{this.applyStyle(t,this.styleLine),t.beginPath(),t.moveTo(e,i),t.quadraticCurveTo(e+r,i,e+r,n),t.stroke()},d=(e,n,r)=>{let i=n+4*r;t.beginPath(),t.moveTo(e,n),t.lineTo(e-4,i),t.lineTo(e+4,i),t.closePath(),t.fill()},f=(e,n)=>{t.setFont(this.fontInfo);let r=e-t.measureText(n).width/2;t.fillText(n,r,c)},m,h=0,g=0;this.tap?.length&&f(n.getModifierStartXY(M.Position.CENTER,this.index).x,this.tap);for(let t=0;t<this.phrase.length;++t){let n=this.phrase[t];n.drawWidth||=0,t===0&&(n.drawWidth+=i),g=n.drawWidth+h-(t===1?i:0),n.type===e.UP&&(m&&m.type===e.UP&&d(r.x,s,1),l(r.x,r.y,g,s)),n.type===e.DOWN&&(m&&m.type===e.UP&&u(r.x,r.y,g,s),m&&m.type===e.DOWN&&(d(r.x,r.y,-1),u(r.x,r.y,g,s)),m||(g=n.drawWidth,u(r.x,r.y,g,s))),f(r.x+g,n.text),m=n,h=n.drawWidth,m.x=r.x,r.x+=g}if(!m||m.x===void 0)throw new p(`NoLastBendForBend`,`Internal error.`);m.type===e.UP?d(m.x+g,s,1):m.type===e.DOWN&&d(m.x+g,r.y,-1)}};function ze(...e){We.DEBUG&&g(`VexFlow.ChordSymbol`,e)}var Be=class extends A{constructor(e,t,n,r,i){super(),this.text=e,this.symbolModifier=t,this.xShift=n,this.yShift=r,this.vAlign=i}isSuperscript(){return this.symbolModifier===3}isSubscript(){return this.symbolModifier===2}},Ve=function(e){return e[e.LEFT=1]=`LEFT`,e[e.CENTER=2]=`CENTER`,e[e.RIGHT=3]=`RIGHT`,e[e.CENTER_STEM=4]=`CENTER_STEM`,e}({}),He=function(e){return e[e.TOP=1]=`TOP`,e[e.BOTTOM=2]=`BOTTOM`,e}({}),Ue=function(e){return e[e.NONE=1]=`NONE`,e[e.SUBSCRIPT=2]=`SUBSCRIPT`,e[e.SUPERSCRIPT=3]=`SUPERSCRIPT`,e}({}),We=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.ChordSymbol}static{this.HorizontalJustify=Ve}static{this.HorizontalJustifyString={left:1,right:3,center:2,centerStem:4}}static{this.VerticalJustify=He}static{this.VerticalJustifyString={top:1,above:1,below:2,bottom:2}}static get superSubRatio(){return T.get(`ChordSymbol.superSubRatio`)}static get spacingBetweenBlocks(){return T.get(`ChordSymbol.spacing`)}static get superscriptOffset(){return T.get(`ChordSymbol.superscriptOffset`)}static get subscriptOffset(){return T.get(`ChordSymbol.subscriptOffset`)}static{this.glyphs={diminished:P.csymDiminished,dim:P.csymDiminished,halfDiminished:P.csymHalfDiminished,"+":P.csymAugmented,augmented:P.csymAugmented,majorSeventh:P.csymMajorSeventh,minor:P.csymMinor,"-":P.csymMinor,"(":`(`,leftParen:`(`,")":`)`,rightParen:`)`,leftBracket:P.csymBracketLeftTall,rightBracket:P.csymBracketRightTall,leftParenTall:`(`,rightParenTall:`)`,"/":P.csymDiagonalArrangementSlash,over:P.csymDiagonalArrangementSlash,"#":P.csymAccidentalSharp,b:P.csymAccidentalFlat}}static{this.symbolModifiers=Ue}static get minPadding(){return T.get(`NoteHead.minPadding`)}static format(t,n){if(!t||t.length===0)return!1;let r=0,i=0,a=0,o=0,s=0;for(let c of t){let t=c.checkAttachedNote(),l=1;for(let t=0;t<c.symbolBlocks.length;++t){let n=c.symbolBlocks[t],i=n.isSuperscript(),a=n.isSubscript();if(n.setXShift(r),(i||a)&&(l=2),a&&t>0){let i=c.symbolBlocks[t-1];i.isSuperscript()&&(n.setXShift(r-i.getWidth()-e.minPadding),n.vAlign=!0,r+=-i.getWidth()-e.minPadding+(i.getWidth()>n.getWidth()?i.getWidth()-n.getWidth():0))}r+=n.getWidth()+e.minPadding}if(c.getVertical()===1?(c.setTextLine(n.topTextLine),n.topTextLine+=l):(c.setTextLine(n.textLine+1),n.textLine+=l+1),c.getReportWidth()){if(u(t)){let n=t.getGlyphWidth();c.getHorizontal()===3?(o=Math.max(n,o),i=Math.max(i,r)+e.minPadding):c.getHorizontal()===1?(s=Math.max(n,s),a=Math.max(a,r)):(i=Math.max(i,r/2)+e.minPadding,a=Math.max(a,r/2),o=Math.max(n/2,o),s=Math.max(n/2,s))}c.width=r}r=0}let c=Math.min(Math.max(a-s,0),Math.max(a-n.rightShift,0)),l=Math.min(Math.max(i-o,0),Math.max(i-n.leftShift,0));return n.leftShift+=l,n.rightShift+=c,!0}constructor(){super(),this.symbolBlocks=[],this.horizontal=1,this.vertical=1,this.reportWidth=!0}get superscriptOffset(){return e.superscriptOffset*k.convertSizeToPixelValue(this.fontInfo.size)}get subscriptOffset(){return e.subscriptOffset*k.convertSizeToPixelValue(this.fontInfo.size)}setReportWidth(e){return this.reportWidth=e,this}getReportWidth(){return this.reportWidth}getSymbolBlock(t={}){let n=new Be(t.text??``,t.symbolModifier??1,0,0,!1);if(n.isSubscript()&&n.setYShift(this.subscriptOffset),n.isSuperscript()&&n.setYShift(this.superscriptOffset),n.isSubscript()||n.isSuperscript()){let{family:t,size:r,weight:i,style:a}=this.fontInfo,o=k.scaleSize(r,e.superSubRatio);n.setFont(t,o,i,a)}else n.setFont(this.fontInfo);return n}addSymbolBlock(e){return this.symbolBlocks.push(this.getSymbolBlock(e)),this}addText(e,t={}){return this.addSymbolBlock({...t,text:e})}addTextSuperscript(e){return this.addSymbolBlock({text:e,symbolModifier:3})}addTextSubscript(e){return this.addSymbolBlock({text:e,symbolModifier:2})}addGlyphSuperscript(t){return this.addTextSuperscript(e.glyphs[t])}addGlyph(t,n={}){return this.addText(e.glyphs[t],n)}addGlyphOrText(t,n={}){let r=``;for(let n=0;n<t.length;++n){let i=t[n],a=e.glyphs[i];r+=a||i}return r.length>0&&this.addText(r,n),this}addLine(e={}){return this.addText(``,e)}setVertical(t){return this.vertical=typeof t==`string`?e.VerticalJustifyString[t]:t,this}getVertical(){return this.vertical}setHorizontal(t){return this.horizontal=typeof t==`string`?e.HorizontalJustifyString[t]:t,this}getHorizontal(){return this.horizontal}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=this.getAttribute(`class`);e.openGroup(`chordsymbol`+(n?` `+n:``),this.getAttribute(`id`));let r=t.getModifierStartXY(M.Position.ABOVE,this.index);e.setFont(this.fontInfo);let i,a=t.hasStem(),o=t.checkStave();if(this.vertical===2){if(i=o.getYForBottomText(this.textLine+I.TEXT_HEIGHT_OFFSET_HACK),a){let e=t.checkStem().getExtents(),n=o.getSpacingBetweenLines(),r=t.getStemDirection()===1?e.baseY:e.topY;i=Math.max(i,r+n*(this.textLine+2))}}else{let e=Math.min(...t.getYs());if(i=Math.min(o.getYForTopText(this.textLine),e-10),a){let e=t.checkStem().getExtents(),n=o.getSpacingBetweenLines();i=Math.min(i,e.topY-5-n*this.textLine)}}let s=r.x;s=this.horizontal===1?r.x:this.horizontal===3?r.x+this.getWidth():this.horizontal===2?r.x-this.getWidth()/2:t.getStemX()-this.getWidth()/2,ze(`Rendering ChordSymbol: `,s,i),this.symbolBlocks.forEach(t=>{ze(`Rendering Text: `,t.getText(),s+t.getXShift(),i+t.getYShift()),t.setX(s),t.setY(i),t.renderText(e,0,0)}),this.drawPointerRect(),e.closeGroup()}getBoundingBox(){let e=this.symbolBlocks[0].getBoundingBox();for(let t=1;t<this.symbolBlocks.length;t++)e.mergeWith(this.symbolBlocks[t].getBoundingBox());return e}},Ge=class e extends M{static get CATEGORY(){return f.Dot}static getDots(t){return t.getModifiersByType(e.CATEGORY)}static buildAndAttach(t,n){for(let r of t)if(n?.all)for(let t=0;t<r.keys.length;t++){let n=new e;r.addModifier(n,t)}else if(n?.index!==void 0){let t=new e;r.addModifier(t,n?.index)}else{let t=new e;r.addModifier(t,0)}}static format(e,t){let n=t.rightShift;if(!e||e.length===0)return!1;let r=[],i={};for(let t=0;t<e.length;++t){let a=e[t],o=a.getNote(),s,c;if(l(o)){let e=a.checkIndex();s=o.getKeyProps()[e],c=o.getFirstDotPx()}else if(d(o))s={line:.5},c=n;else throw new p(`Internal`,`Unexpected instance.`);let u=o.getAttribute(`id`);r.push({line:s.line,note:o,noteId:u,dot:a}),i[u]=Math.max(i[u]||c,c)}r.sort((e,t)=>t.line-e.line);let a=n,o=0,s=null,c=null,u=null,f=0;for(let e=0;e<r.length;++e){let{dot:t,note:n,noteId:l,line:d}=r[e];(d!==s||n!==c)&&(a=i[l]),!n.isRest()&&d!==s&&(Math.abs(d%1)===.5?f=0:(f=.5,(c!==null&&!c.isRest()&&s!==null&&s-d===.5||d+f===u)&&(f=-.5))),n.isRest()?t.dotShiftY+=-f:t.dotShiftY=-f,u=d+f,t.setXShift(a),a+=t.getWidth()+1,o=a>o?a:o,s=d,c=n}return t.rightShift+=o,!0}constructor(){super(),this.position=M.Position.RIGHT,this.setText(P.augmentationDot),this.dotShiftY=0}setNote(e){return this.note=e,this.font=e.font,this}setDotShiftY(e){return this.dotShiftY=e,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.checkStave().getSpacingBetweenLines(),r=t.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});d(t)&&(r.y=t.getStemExtents().baseY),this.x=r.x,this.y=r.y+this.dotShiftY*n,this.renderText(e,0,0)}},Ke=class extends M{static get CATEGORY(){return f.FretHandFinger}static format(e,t){let{leftShift:n,rightShift:r}=t;if(!e||e.length===0)return!1;let i=[],a=null,o=0,s=0;for(let c=0;c<e.length;++c){let l=e[c],u=l.getNote(),d=l.getPosition(),f=l.checkIndex(),p=u.getKeyProps()[f],m=T.get(`FretHandFinger.fontSize`);if(l.position===j.ABOVE&&(t.topTextLine+=m/I.STAVE_LINE_DISTANCE+.5),l.position===j.BELOW&&(t.textLine+=m/I.STAVE_LINE_DISTANCE+.5),u!==a){for(let e=0;e<u.keys.length;++e)n===0&&(o=Math.max(u.getLeftDisplacedHeadPx(),o)),r===0&&(s=Math.max(u.getRightDisplacedHeadPx(),s));a=u}i.push({note:u,num:l,pos:d,line:p.line,shiftL:o,shiftR:s})}i.sort((e,t)=>t.line-e.line);let c=0,l=0,u=0,d=0,f=null,p=null;for(let e=0;e<i.length;++e){let t=0,{note:a,pos:o,num:m,line:h,shiftL:g,shiftR:_}=i[e];(h!==f||a!==p)&&(c=n+g,l=r+_);let v=m.getWidth()+1;o===M.Position.LEFT?(m.setXShift(n+c),t=n+v,u=t>u?t:u):o===M.Position.RIGHT&&(m.setXShift(l),t=s+v,d=t>d?t:d),f=h,p=a}return t.leftShift+=u,t.rightShift+=d,!0}static easyScoreHook({fingerings:e}={},t,n){e?.split(`,`).map(e=>{let t=e.trim().split(`.`),r={number:t[0]};return t[1]&&(r.position=t[1]),n.getFactory().Fingering(r)}).map((e,n)=>t.addModifier(e,n))}constructor(e){super(),this.setFretHandFinger(e),this.position=M.Position.LEFT,this.xOffset=0,this.yOffset=0}setFretHandFinger(e){return this.text=e,this}getFretHandFinger(){return this.text}setOffsetX(e){return this.xOffset=e,this}setOffsetY(e){return this.yOffset=e,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(this.position,this.index),r=n.x+this.xOffset,i=n.y+this.yOffset+5;switch(this.position){case M.Position.ABOVE:r-=4,i-=12;break;case M.Position.BELOW:r-=2,i+=10;break;case M.Position.LEFT:r-=this.width;break;case M.Position.RIGHT:r+=1;break;default:throw new p(`InvalidPosition`,`The position ${this.position} does not exist`)}this.renderText(e,r,i)}};function qe(...e){Je.DEBUG&&g(`VexFlow.NoteHead`,e)}var Je=class extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.NoteHead}constructor(e){super(e),this.customGlyph=!1,this.ledger={"":``,"":``},this.index=e.index,this.x=e.x||0,this.y=e.y||0,e.noteType&&(this.noteType=e.noteType),this.displaced=e.displaced||!1,this.stemDirection=e.stemDirection||L.UP,this.line=e.line||0,this.glyphProps=z.getGlyphProps(this.duration,this.noteType),h(this.glyphProps,`BadArguments`,`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),(this.line>5||this.line<0)&&this.ledger[this.glyphProps.codeHead]&&(this.glyphProps.codeHead=this.ledger[this.glyphProps.codeHead]),this.text=this.glyphProps.codeHead,e.customGlyphCode&&(this.customGlyph=!0,this.text=e.customGlyphCode),this.setStyle(e.style??{}),this.slashed=e.slashed||!1,this.renderOptions={...this.renderOptions}}getWidth(){return this.width}isDisplaced(){return this.displaced===!0}getLine(){return this.line}setLine(e){return this.line=e,this}getAbsoluteX(){let e=this.preFormatted?super.getAbsoluteX():this.x,t=L.WIDTH/2;return e+(this.displaced?(this.width-t)*this.stemDirection:0)}setStave(e){let t=this.getLine();return this.stave=e,this.stave&&(this.setY(this.stave.getYForNote(t)),this.setContext(this.stave.getContext())),this}preFormat(){return this.preFormatted||=!0,this}draw(){let e=this.checkContext();this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`notehead`+(t?` `+t:``),this.getAttribute(`id`)),qe(`Drawing note head '`,this.noteType,this.duration,`' at`,this.x,this.y),this.x=this.getAbsoluteX(),this.renderText(e,0,0),this.parent?.drawModifiers(this),this.drawPointerRect(),e.closeGroup()}};function Ye(...e){Xe.DEBUG&&g(`VexFlow.Flag`,e)}var Xe=class extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.Flag}draw(){let e=this.checkContext();this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`flag`+(t?` `+t:``),this.getAttribute(`id`)),Ye(`Drawing flag '`,this.text,`' at`,this.x,this.y),this.renderText(e,0,0),this.drawPointerRect(),e.closeGroup()}},Ze=class extends z{static get CATEGORY(){return f.StemmableNote}constructor(e){super(e),this.flag=new Xe}getStem(){return this.stem}checkStem(){if(!this.stem)throw new p(`NoStem`,`No stem attached to instance`);return this.stem}setStem(e){return this.stem=e,this.addChild(e),this}buildStem(){let e=new L;return this.setStem(e),this}buildFlag(){let{glyphProps:e}=this;if(this.hasFlag()){let t=this.getStemDirection()===L.DOWN?String.fromCodePoint((e.codeFlagUp?.codePointAt(0)??-1)+1):e.codeFlagUp??P.null;this.flag.setText(t),this.flag.fontInfo=this.fontInfo}}getBaseCustomNoteHeadGlyphProps(){return this.getStemDirection()===L.DOWN?this.customGlyphs[this.customGlyphs.length-1]:this.customGlyphs[0]}getStemLength(){return L.HEIGHT+this.getStemExtension()}getBeamCount(){let e=this.getGlyphProps();return e?e.beamCount:0}getStemMinimumLength(){let e=I.durationToFraction(this.duration),t=this.beam===void 0,n=e.value()<=1?0:20;switch(this.duration){case`8`:case`16`:n=t?35:25;break;case`32`:n=t?45:35;break;case`64`:n=t?50:40;break;case`128`:n=t?55:45;break;case`256`:n=t?60:55;break;case`512`:n=t?65:60;break;case`1024`:n=t?70:65}return n}getStemDirection(){if(!this.stemDirection)throw new p(`NoStem`,`No stem attached to this note.`);return this.stemDirection}setStemDirection(e){if(e||=L.UP,e!==L.UP&&e!==L.DOWN)throw new p(`BadArgument`,`Invalid stem direction: ${e}`);return this.stemDirection=e,this.reset(),this.hasFlag()&&this.buildFlag(),this.beam=void 0,this.stem&&(this.stem.setDirection(e),this.stem.setExtension(this.getStemExtension())),this.preFormatted&&this.preFormat(),this}getStemX(){let e=this.getAbsoluteX()+this.xShift,t=this.getAbsoluteX()+this.xShift+this.getGlyphWidth();return this.stemDirection===L.DOWN?e:t}getCenterGlyphX(){return this.getAbsoluteX()+this.xShift+this.getGlyphWidth()/2}getStemExtension(){let e=this.getGlyphProps(),t=this.flag.getHeight(),n=this.getFontScale();return this.stemExtensionOverride===void 0?this.beam?e.stemBeamExtension*n:t>L.HEIGHT*n?t-L.HEIGHT*n:0:this.stemExtensionOverride}setStemLength(e){return this.stemExtensionOverride=e-L.HEIGHT,this}getStemExtents(){if(!this.stem)throw new p(`NoStem`,`No stem attached to this note.`);return this.stem.getExtents()}getYForTopText(e){let t=this.checkStave();if(this.hasStem()){let n=this.getStemExtents();if(!n)throw new p(`InvalidState`,`Stem does not have extents.`);return Math.min(t.getYForTopText(e),n.topY-this.renderOptions.annotationSpacing*(e+1))}return t.getYForTopText(e)}getYForBottomText(e){let t=this.checkStave();if(this.hasStem()){let n=this.getStemExtents();if(!n)throw new p(`InvalidState`,`Stem does not have extents.`);return Math.max(t.getYForTopText(e),n.baseY+this.renderOptions.annotationSpacing*e)}return t.getYForBottomText(e)}hasFlag(){return this.glyphProps.codeFlagUp!==void 0&&!this.beam&&!this.isRest()}postFormat(){return this.beam?.postFormat(),this.postFormatted=!0,this}drawStem(e){this.checkContext(),this.setRendered(),this.setStem(new L(e)),this.stem?.setContext(this.getContext()).drawWithStyle()}};function Qe(...e){W.DEBUG&&g(`VexFlow.StaveNote`,e)}var $e=(e,t)=>t===(e.getStemDirection()===L.UP?e.keyProps.length-1:0);function et(e,t,n){let r=n;e.line+=r,e.maxLine+=r,e.minLine+=r,e.note.setKeyLine(0,e.note.getKeyLine(0)+r)}function tt(e,t,n){let r=e.line-y(t.minLine,n.maxLine);e.note.setKeyLine(0,e.note.getKeyLine(0)-r),e.line-=r,e.maxLine-=r,e.minLine-=r}var W=class e extends Ze{static{this.DEBUG=!1}static get CATEGORY(){return f.StaveNote}static get LEDGER_LINE_OFFSET(){return 3}static get minNoteheadPadding(){return T.get(`NoteHead.minPadding`)}static format(e,t){if(!e||e.length<2)return!1;let n=[];for(let t=0;t<e.length;t++){let r=e[t].sortedKeyProps,i=r[0].keyProps.line,a=r[r.length-1].keyProps.line,o=e[t].getStemDirection(),s=e[t].getStemLength()/10,c=e[t].getStemMinimumLength()/10,l;e[t].isRest()?(l=i+Math.ceil(e[t]._noteHeads[0].getTextMetrics().actualBoundingBoxAscent/I.STAVE_LINE_DISTANCE),a=i-Math.ceil(e[t]._noteHeads[0].getTextMetrics().actualBoundingBoxDescent/I.STAVE_LINE_DISTANCE)):(l=o===1?r[r.length-1].keyProps.line+s:r[r.length-1].keyProps.line,a=o===1?r[0].keyProps.line:r[0].keyProps.line-s),n.push({line:r[0].keyProps.line,maxLine:l,minLine:a,isrest:e[t].isRest(),stemDirection:o,stemMax:s,stemMin:c,voiceShift:e[t].getVoiceShiftWidth(),isDisplaced:e[t].isDisplaced(),note:e[t]})}let r=0,i,a,o,s=[!1,!1,!1];for(let e=0;e<n.length;e++)s[e]=n[e].note.renderOptions.draw!==!1;if(s[0]&&s[1]&&s[2])r=3,i=n[0],a=n[1],o=n[2];else if(s[0]&&s[1])r=2,i=n[0],o=n[1];else if(s[0]&&s[2])r=2,i=n[0],o=n[2];else if(s[1]&&s[2])r=2,i=n[1],o=n[2];else return!0;r===2&&i.stemDirection===-1&&o.stemDirection===1&&(i=n[1],o=n[0]);let c=Math.max(i.voiceShift,o.voiceShift),l=0;if(r===2){let e=i.note.hasStem()&&o.note.hasStem()&&i.stemDirection===o.stemDirection?0:.5;if(o.isrest&&i.isrest&&i.note.duration===o.note.duration)o.note.renderOptions.draw=!1;else if(i.minLine<=o.maxLine+e){if(i.isrest)et(i,o,1);else if(o.isrest)et(o,i,-1);else{let e=Math.abs(i.line-o.line);if(i.note.hasStem()&&o.note.hasStem()){let t=i.note.sortedKeyProps[0].keyProps.code,n=o.note.sortedKeyProps[o.note.sortedKeyProps.length-1].keyProps.code;!I.UNISON||t!==n||i.note.getModifiers().filter(e=>e.getCategory()===f.Dot&&e.getIndex()===0).length!==o.note.getModifiers().filter(e=>e.getCategory()===f.Dot&&e.getIndex()===0).length||e<1&&e>0||JSON.stringify(i.note.getStyle())!==JSON.stringify(o.note.getStyle())?(l=c+2,i.stemDirection===o.stemDirection?i.note.setXShift(l):o.note.setXShift(l)):i.note.voice!==o.note.voice&&i.stemDirection===o.stemDirection&&(i.line===o.line?o.stemDirection===1&&(o.stemDirection=-1,o.note.setStemDirection(-1)):(l=c+2,i.note.setXShift(l)))}else e<1?(l=c+2,i.note.duration<o.note.duration?i.note.setXShift(l):o.note.setXShift(l)):i.note.hasStem()?(i.stemDirection=-i.note.getStemDirection(),i.note.setStemDirection(i.stemDirection)):o.note.hasStem()&&(o.stemDirection=-o.note.getStemDirection(),o.note.setStemDirection(o.stemDirection))}}return t.rightShift+=l,!0}if(!a)throw new p(`InvalidState`,`noteM not defined.`);return a.isrest&&!i.isrest&&!o.isrest&&(i.minLine<=a.maxLine||a.minLine<=o.maxLine)?(a.maxLine-a.minLine<i.minLine-o.maxLine?tt(a,i,o):(l=c+2,a.note.setXShift(l),o.note.hasBeam()===!1&&(o.stemDirection=-1,o.note.setStemDirection(-1)),i.minLine<=o.maxLine&&i.note.hasBeam()===!1&&(i.stemDirection=1,i.note.setStemDirection(1))),t.rightShift+=l,!0):i.isrest&&a.isrest&&o.isrest?(i.note.renderOptions.draw=!1,o.note.renderOptions.draw=!1,t.rightShift+=l,!0):(a.isrest&&i.isrest&&a.minLine<=o.maxLine&&(a.note.renderOptions.draw=!1),a.isrest&&o.isrest&&i.minLine<=a.maxLine&&(a.note.renderOptions.draw=!1),i.isrest&&i.minLine<=a.maxLine&&et(i,a,1),o.isrest&&a.minLine<=o.maxLine&&et(o,a,-1),(i.minLine<=a.maxLine+.5||a.minLine<=o.maxLine)&&(l=c+2,a.note.setXShift(l),o.note.hasBeam()===!1&&(o.stemDirection=-1,o.note.setStemDirection(-1)),i.minLine<=o.maxLine&&i.note.hasBeam()===!1&&(i.stemDirection=1,i.note.setStemDirection(1))),t.rightShift+=l,!0)}static postFormat(e){return e?(e.forEach(e=>e.postFormat()),!0):!1}constructor(t){super(t),this.minLine=0,this.maxLine=0,this.sortedKeyProps=[],this.ledgerLineStyle={},this.clef=t.clef??`treble`,this.octaveShift=t.octaveShift??0,this.glyphProps=z.getGlyphProps(this.duration,this.noteType),h(this.glyphProps,`BadArguments`,`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.displaced=!1,this.dotShiftY=0,this.useDefaultHeadX=!1,this._noteHeads=[],this.modifiers=[],this.renderOptions={...this.renderOptions,strokePx:t.strokePx||e.LEDGER_LINE_OFFSET},this.calculateKeyProps(),this.buildStem(),t.autoStem?this.autoStem():this.setStemDirection(t.stemDirection??L.UP),this.reset(),this.buildFlag()}reset(){super.reset();let e=this._noteHeads.map(e=>e.getStyle());this.buildNoteHeads(),this._noteHeads.forEach((t,n)=>{let r=e[n];r&&t.setStyle(r)});let t=this.stave;return t&&this.setStave(t),this.calcNoteDisplacements(),this}setBeam(e){return this.beam=e,this.calcNoteDisplacements(),this.stem&&this.stem.setExtension(this.getStemExtension()),this}buildStem(){return this.setStem(new L({hide:this.isRest()})),this}buildNoteHeads(){this._noteHeads=[];let e=this.getStemDirection(),t=this.getKeys(),n,r,i=!1,a,o,s;e===L.UP?(a=0,o=t.length,s=1):(a=t.length-1,o=-1,s=-1);for(let t=a;t!==o;t+=s){let a=this.sortedKeyProps[t].keyProps,o=a.line;n===void 0?n=o:(r=Math.abs(n-o),r===0||r===.5?i=!i:(i=!1,this.useDefaultHeadX=!0)),n=o;let s=new Je({duration:this.duration,noteType:this.noteType,displaced:i,stemDirection:e,customGlyphCode:a.code,line:a.line});s.fontInfo=this.fontInfo,this.addChild(s),this._noteHeads[this.sortedKeyProps[t].index]=s}return this._noteHeads}autoStem(){this.setStemDirection(this.calculateOptimalStemDirection())}calculateOptimalStemDirection(){return this.minLine=this.sortedKeyProps[0].keyProps.line,this.maxLine=this.sortedKeyProps[this.keyProps.length-1].keyProps.line,(this.minLine+this.maxLine)/2<3?L.UP:L.DOWN}calculateKeyProps(){let e;for(let t=0;t<this.keys.length;++t){let n=this.keys[t],r={octaveShift:this.octaveShift??0,duration:this.duration},i=I.keyProperties(n,this.clef,this.noteType,r);if(!i)throw new p(`BadArguments`,`Invalid key for note properties: ${n}`);i.key===`R`&&(i.line=this.duration===`1`||this.duration===`w`?4:3);let a=i.line;e===void 0?e=a:Math.abs(e-a)<1&&(this.displaced=!0,i.displaced=!0,this.keyProps.length>0&&(this.keyProps[t-1].displaced=!0)),e=a,this.keyProps.push(i)}this.keyProps.forEach((e,t)=>{this.sortedKeyProps.push({keyProps:e,index:t})}),this.sortedKeyProps.sort((e,t)=>e.keyProps.line-t.keyProps.line)}getBoundingBox(){let e=new D(this.getAbsoluteX(),this.ys[0],0,0);this._noteHeads.forEach(t=>{e.mergeWith(t.getBoundingBox())});let{yTop:t,yBottom:n}=this.getNoteHeadBounds();if(!this.isRest()&&this.hasStem()){let r=this.stem.getHeight(),i=this.getStemDirection()===L.DOWN?t-r-this.flag.getTextMetrics().actualBoundingBoxDescent:n-r+this.flag.getTextMetrics().actualBoundingBoxAscent;e.mergeWith(new D(this.getAbsoluteX(),i,0,0))}if(this.hasFlag()){let t=this.flag.getBoundingBox();e.mergeWith(t)}for(let t=0;t<this.modifiers.length;t++)e.mergeWith(this.modifiers[t].getBoundingBox());return e}getLineNumber(e){if(!this.keyProps.length)throw new p(`NoKeyProps`,`Can't get bottom note line, because note is not initialized properly.`);let t=this.keyProps[0].line;for(let n=0;n<this.keyProps.length;n++){let r=this.keyProps[n].line;e?r>t&&(t=r):r<t&&(t=r)}return t}isRest(){let e=this.glyphProps.codeHead;return e>=``&&e<=``}isChord(){return!this.isRest()&&this.keys.length>1}hasStem(){return this.glyphProps.stem}hasFlag(){return super.hasFlag()&&!this.isRest()}getStemX(){return this.noteType===`r`?this.getCenterGlyphX():super.getStemX()+(this.stemDirection?L.WIDTH/(2*-this.stemDirection):0)}getYForTopText(e){let t=this.getStemExtents();return Math.min(this.checkStave().getYForTopText(e),t.topY-this.renderOptions.annotationSpacing*(e+1))}getYForBottomText(e){let t=this.getStemExtents();return Math.max(this.checkStave().getYForTopText(e),t.baseY+this.renderOptions.annotationSpacing*e)}setStave(e){super.setStave(e);let t=this._noteHeads.map(t=>(t.setStave(e),t.getY()));if(this.setYs(t),this.stem){let{yTop:e,yBottom:t}=this.getStemYBounds();this.stem.setYBounds(e,t)}return this}isDisplaced(){return this.displaced}setNoteDisplaced(e){return this.displaced=e,this}getTieRightX(){let e=this.getAbsoluteX();return e+=this.getGlyphWidth()+this.xShift+this.rightDisplacedHeadPx,this.modifierContext&&(e+=this.modifierContext.getRightShift()),e}getTieLeftX(){let e=this.getAbsoluteX();return e+=this.xShift-this.leftDisplacedHeadPx,e}getLineForRest(){let e=this.keyProps[0].line;if(this.keyProps.length>1){let t=this.keyProps[this.keyProps.length-1].line;e=y(Math.max(e,t),Math.min(e,t))}return e}getModifierStartXY(e,t,n={}){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call GetModifierStartXY on an unformatted note`);if(this.ys.length===0)throw new p(`NoYValues`,`No Y-Values calculated for this note.`);let{ABOVE:r,BELOW:i,LEFT:a,RIGHT:o}=M.Position,s=0;e===a?s=-2:e===o?(s=this.getGlyphWidth()+this.xShift+2,this.stemDirection===L.UP&&this.hasFlag()&&(n.forceFlagRight||$e(this,t))&&(s+=this.flag.getWidth())):(e===i||e===r)&&(s=this.getGlyphWidth()/2);let c=0;switch(this._noteHeads[t].getText()){case P.restWhole:c+=.5;break;case P.restHalf:case P.restQuarter:case P.rest8th:case P.rest16th:c-=.5;break;case P.rest32nd:case P.rest64th:c-=1.5;break;case P.rest128th:case P.rest256th:c-=2.5;break;case P.rest512th:c-=3.5;break;case P.rest1024th:c-=4.5}return{x:this.getAbsoluteX()+s,y:this.ys[t]+c*this.checkStave().getSpacingBetweenLines()}}setStyle(e){return super.setGroupStyle(e)}setStemStyle(e){let t=this.getStem();return t&&t.setStyle(e),this}getStemStyle(){return this.stem?.getStyle()}setLedgerLineStyle(e){this.ledgerLineStyle=e}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(e){this.flag.setStyle(e)}getFlagStyle(){return this.flag.getStyle()}getGlyphWidth(){return this.noteHeads[0].getWidth()}setKeyStyle(e,t){return this._noteHeads[e].setStyle(t),this}setKeyLine(e,t){return this.keyProps[e].line=t,this.reset(),this}getKeyLine(e){return this.keyProps[e].line}getVoiceShiftWidth(){return this.getGlyphWidth()*(this.displaced?2:1)}calcNoteDisplacements(){this.setLeftDisplacedHeadPx(this.displaced&&this.stemDirection===L.DOWN?this.getGlyphWidth():0),this.setRightDisplacedHeadPx(!this.hasFlag()&&this.displaced&&this.stemDirection===L.UP?this.getGlyphWidth():0)}preFormat(){if(this.preFormatted)return;let t=0;this.modifierContext&&(this.modifierContext.preFormat(),this.modifierContext.getWidth()===0&&(t=e.minNoteheadPadding));let n=this.getGlyphWidth()+this.leftDisplacedHeadPx+this.rightDisplacedHeadPx+t;this.shouldDrawFlag()&&this.stemDirection===L.UP&&(n+=this.getGlyphWidth()),this.setWidth(n),this.preFormatted=!0}getStemYBounds(){let e=this.stemDirection===L.UP?`up`:`down`,t=1/0,n=-1/0;if(this._noteHeads.forEach(r=>{let i=I.noteHeadStemYOffsets[r.text],a=i?i[e]:0,o=r.getY()-a*I.STAVE_LINE_DISTANCE;t=Math.min(o,t),n=Math.max(o,n)}),!isFinite(t)||!isFinite(n)){let e=this.getNoteHeadBounds();return{yTop:e.yTop,yBottom:e.yBottom}}return{yTop:t,yBottom:n}}getNoteHeadBounds(){let e=1/0,t=-1/0,n,r,i=this.checkStave().getNumLines(),a=1,o,s,c=i,l=a;return this._noteHeads.forEach(u=>{let d=u.getLine(),f=u.getY();e=Math.min(f,e),t=Math.max(f,t),r===void 0&&u.isDisplaced()&&(r=u.getAbsoluteX()),n===void 0&&!u.isDisplaced()&&(n=u.getAbsoluteX()),i=Math.max(d,i),a=Math.min(d,a),u.isDisplaced()?(o=o===void 0?d:Math.max(d,o),s=s===void 0?d:Math.min(d,s)):(c=Math.max(d,c),l=Math.min(d,l))},this),{yTop:e,yBottom:t,displacedX:r,nonDisplacedX:n,highestLine:i,lowestLine:a,highestDisplacedLine:o,lowestDisplacedLine:s,highestNonDisplacedLine:c,lowestNonDisplacedLine:l}}getNoteHeadBeginX(){return this.getAbsoluteX()+this.xShift}getNoteHeadEndX(){return this.getNoteHeadBeginX()+this.getGlyphWidth()}get noteHeads(){return this._noteHeads.slice()}drawLedgerLines(){let e=this.checkStave(),{renderOptions:{strokePx:t}}=this,n=this.checkContext(),r=this.getGlyphWidth()+t*2,i=2*(this.getGlyphWidth()+t)-L.WIDTH/2;if(this.isRest())return;if(!n)throw new p(`NoCanvasContext`,`Can't draw without a canvas context.`);let{highestLine:a,lowestLine:o,highestDisplacedLine:s,highestNonDisplacedLine:c,lowestDisplacedLine:l,lowestNonDisplacedLine:u,displacedX:d,nonDisplacedX:f}=this.getNoteHeadBounds();if(a<6&&o>0)return;let m=Math.min(d??0,f??0),h=(e,a,o)=>{let s;s=o&&a?m-t:a?(f??0)-t:(d??0)-t;let c=a&&o?i:r;n.beginPath(),n.moveTo(s,e),n.lineTo(s+c,e),n.stroke()},g={...e.getDefaultLedgerLineStyle(),...this.getLedgerLineStyle()};n.save(),this.applyStyle(n,g);for(let t=6;t<=a;++t){let n=f!==void 0&&t<=c,r=s!==void 0&&t<=s;h(e.getYForNote(t),n,r)}for(let t=0;t>=o;--t){let n=f!==void 0&&t>=u,r=l!==void 0&&t>=l;h(e.getYForNote(t),n,r)}n.restore()}drawModifiers(e){let t=this.checkContext();for(let n=0;n<this.modifiers.length;n++){let r=this.modifiers[n],i=r.checkIndex();this._noteHeads[i]===e&&(r.setContext(t),r.drawWithStyle())}}shouldDrawFlag(){let e=this.stem!==void 0,t=this.glyphProps.codeFlagUp!==void 0,n=this.beam===void 0;return e&&t&&n&&!this.isRest()}drawFlag(){let e=this.checkContext();if(!e)throw new p(`NoCanvasContext`,`Can't draw without a canvas context.`);if(this.shouldDrawFlag()){let{yTop:t,yBottom:n}=this.getNoteHeadBounds(),r=this.stem.getHeight(),i=this.getStemX()-I.STEM_WIDTH/2,a=this.getStemDirection()===L.DOWN?t-r-this.flag.getTextMetrics().actualBoundingBoxDescent:n-r+this.flag.getTextMetrics().actualBoundingBoxAscent;this.flag.setContext(e).setX(i).setY(a).drawWithStyle()}}drawNoteHeads(){let e=this.checkContext();this._noteHeads.forEach(t=>{t.setContext(e).drawWithStyle()})}drawStem(e){let t=this.checkContext();e&&this.setStem(new L(e)),this.shouldDrawFlag()&&this.stem&&this.stem.adjustHeightForFlag(),this.stem&&this.stem.setContext(t).drawWithStyle()}getStemExtension(){let e=super.getStemExtension();if(!this.glyphProps.stem)return e;let t=this.getStemDirection();if(t!==this.calculateOptimalStemDirection())return e;let n;n=t===L.UP?3-this.maxLine:this.minLine-3;let r=n-3.5;if(r<=0)return e;let i=this.getStave(),a=10;return i!==void 0&&(a=i.getSpacingBetweenLines()),e+r*a}draw(){if(this.renderOptions.draw===!1)return;if(this.ys.length===0)throw new p(`NoYValues`,`Can't draw note without Y values.`);let e=this.checkContext(),t=this.getNoteHeadBeginX(),n=this.hasStem()&&!this.beam;if(this._noteHeads.forEach(e=>e.setX(t)),this.stem){let e=this.getStemX();this.stem.setNoteHeadXBounds(e,e)}Qe(`Rendering `,this.isChord()?`chord :`:`note :`,this.keys);let r=this.getAttribute(`class`);e.openGroup(`stavenote`+(r?` `+r:``),this.getAttribute(`id`)),this.drawLedgerLines(),n&&this.drawStem(),this.drawNoteHeads(),this.drawFlag(),this.drawPointerRect(),e.closeGroup(),this.setRendered()}},nt=class extends A{static get CATEGORY(){return f.StaveTie}constructor(e,t=``){super(),this.setNotes(e),this.text=t,this.renderOptions={cp1:8,cp2:12,shortTieCutoff:10,cp1Short:2,cp2Short:8,textShiftX:0,firstXShift:0,lastXShift:0,yShift:7,tieSpacing:0}}getDirection(){return this.direction!==void 0&&this.direction!==null?this.direction:this.notes.lastNote?this.notes.lastNote.getStemDirection():this.notes.firstNote?this.notes.firstNote.getStemDirection():0}setDirection(e){return this.direction=e,this}setNotes(e){if(!e.firstNote&&!e.lastNote)throw new p(`BadArguments`,`Tie needs to have either firstNote or lastNote set.`);if(e.firstIndexes||=[0],e.lastIndexes||=[0],e.firstIndexes.length!==e.lastIndexes.length)throw new p(`BadArguments`,`Tied notes must have same number of indexes.`);return this.notes=e,this}isPartial(){return!this.notes.firstNote||!this.notes.lastNote}renderTie(e){if(e.firstYs.length===0||e.lastYs.length===0)throw new p(`BadArguments`,`No Y-values to render`);let t=this.checkContext(),n=this.renderOptions.cp1,r=this.renderOptions.cp2;Math.abs(e.lastX-e.firstX)<this.renderOptions.shortTieCutoff&&(n=this.renderOptions.cp1Short,r=this.renderOptions.cp2Short);let i=this.renderOptions.firstXShift,a=this.renderOptions.lastXShift,o=this.renderOptions.yShift*e.direction,s=this.notes.firstIndexes,c=this.notes.lastIndexes,l=this.getAttribute(`class`);t.openGroup(`stavetie`+(l?` `+l:``),this.getAttribute(`id`));for(let l=0;l<s.length;++l){let u=(e.lastX+a+(e.firstX+i))/2,d=e.firstYs[s[l]]+o,f=e.lastYs[c[l]]+o;if(isNaN(d)||isNaN(f))throw new p(`BadArguments`,`Bad indexes for tie rendering.`);let m=(d+f)/2+n*e.direction,h=(d+f)/2+r*e.direction;t.beginPath(),t.moveTo(e.firstX+i,d),t.quadraticCurveTo(u,m,e.lastX+a,f),t.quadraticCurveTo(u,h,e.firstX+i,d),t.closePath(),t.fill()}this.drawPointerRect(),t.closeGroup()}renderTieText(e,t){let n=this.checkContext(),r=(e+t)/2;r-=n.measureText(this.text).width/2;let i=this.notes.firstNote?.checkStave()??this.notes.lastNote?.checkStave();i&&(n.setFont(this.fontInfo),n.fillText(this.text,r+this.renderOptions.textShiftX,i.getYForTopText()-1))}getNotes(){return this.notes}getFirstX(){return this.notes.firstNote?this.notes.firstNote.getTieRightX()+this.renderOptions.tieSpacing:this.notes.lastNote?this.notes.lastNote.checkStave().getTieStartX():0}getLastX(){return this.notes.lastNote?this.notes.lastNote.getTieLeftX()+this.renderOptions.tieSpacing:this.notes.firstNote?this.notes.firstNote.checkStave().getTieEndX():0}getFirstYs(){return this.notes.firstNote?this.notes.firstNote.getYs():this.notes.lastNote?this.notes.lastNote.getYs():[0]}getLastYs(){return this.notes.lastNote?this.notes.lastNote.getYs():this.notes.firstNote?this.notes.firstNote.getYs():[0]}synchronizeIndexes(){this.notes.firstNote&&this.notes.lastNote||(this.notes.firstNote||this.notes.lastNote)&&(this.notes.firstNote?this.notes.lastIndexes=this.notes.firstIndexes:this.notes.firstIndexes=this.notes.lastIndexes)}draw(){this.checkContext(),this.setRendered(),this.synchronizeIndexes();let e=this.getFirstX(),t=this.getLastX();return this.renderTie({firstX:e,lastX:t,firstYs:this.getFirstYs(),lastYs:this.getLastYs(),direction:this.getDirection()}),this.renderTieText(e,t),!0}},rt=class e extends nt{static get CATEGORY(){return f.TabTie}static createHammeron(t){return new e(t,`H`)}static createPulloff(t){return new e(t,`P`)}constructor(e,t){super(e,t),this.renderOptions.cp1=9,this.renderOptions.cp2=11,this.renderOptions.yShift=3,this.direction=-1}},it=function(e){return e[e.STRICT=1]=`STRICT`,e[e.SOFT=2]=`SOFT`,e[e.FULL=3]=`FULL`,e}({}),G=class extends A{static get CATEGORY(){return f.Voice}static get Mode(){return it}constructor(e){super(),this.resolutionMultiplier=1,this.mode=1,this.preFormatted=!1,this.ticksUsed=new C(0,1),this.largestTickWidth=0,this.tickables=[],this.options={softmaxFactor:I.SOFTMAX_FACTOR};let t;if(typeof e==`string`){let n=e.match(/(\d+)\/(\d+)/);n&&(t={numBeats:parseInt(n[1]),beatValue:parseInt(n[2])})}else t=e;this.time={numBeats:4,beatValue:4,resolution:I.RESOLUTION,...t},this.totalTicks=new C(this.time.numBeats*(this.time.resolution/this.time.beatValue),1),this.smallestTickCount=this.totalTicks.clone()}getTotalTicks(){return this.totalTicks}getTicksUsed(){return this.ticksUsed}getLargestTickWidth(){return this.largestTickWidth}getSmallestTickCount(){return this.smallestTickCount}getTickables(){return this.tickables}getMode(){return this.mode}setMode(e){return this.mode=e,this}getResolutionMultiplier(){return this.resolutionMultiplier}getActualResolution(){return this.resolutionMultiplier*this.time.resolution}setStave(e){return this.stave=e,this}getStave(){return this.stave}getBoundingBox(){let e=this.tickables[0].getBoundingBox();for(let t=1;t<this.tickables.length;++t){let n=this.tickables[t];!n.getStave()&&this.stave&&n.setStave(this.stave);let r=n.getBoundingBox();e.mergeWith(r)}return e}setStrict(e){return this.mode=e?1:2,this}isComplete(){return this.mode===1||this.mode===3?this.ticksUsed.equals(this.totalTicks):!0}setSoftmaxFactor(e){return this.options.softmaxFactor=e,this.expTicksUsed=0,this}reCalculateExpTicksUsed(){let e=this.ticksUsed.value(),t=t=>this.options.softmaxFactor**+(t.getTicks().value()/e);return this.expTicksUsed=S(this.tickables.map(t)),this.expTicksUsed}softmax(e){this.expTicksUsed||=this.reCalculateExpTicksUsed();let t=this.ticksUsed.value();return(e=>this.options.softmaxFactor**+(e/t))(e)/this.expTicksUsed}addTickable(e){if(!e.shouldIgnoreTicks()){let t=e.getTicks();if(this.ticksUsed.add(t),this.expTicksUsed=0,(this.mode===1||this.mode===3)&&this.ticksUsed.greaterThan(this.totalTicks))throw this.ticksUsed.subtract(t),new p(`BadArgument`,`Too many ticks.`);t.lessThan(this.smallestTickCount)&&(this.smallestTickCount=t.clone()),this.resolutionMultiplier=this.ticksUsed.denominator,this.totalTicks.add(0,this.ticksUsed.denominator)}return this.tickables.push(e),e.setVoice(this),this}addTickables(e){for(let t=0;t<e.length;++t)this.addTickable(e[t]);return this}preFormat(){if(this.preFormatted)return this;let e=this.checkStave();return this.tickables.forEach(t=>{t.getStave()||t.setStave(e)}),this.preFormatted=!0,this}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}draw(e=this.checkContext(),t){t??=this.stave,this.setRendered();for(let n=0;n<this.tickables.length;++n){let r=this.tickables[n];t&&r.setStave(t),h(r.getStave(),`MissingStave`,`The voice cannot draw tickables without staves.`),r.setContext(e),r.drawWithStyle()}}};function at(...e){ot.DEBUG&&g(`VexFlow.GraceNoteGroup`,e)}var ot=class extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.GraceNoteGroup}static format(e,t){if(!e||e.length===0)return!1;let n=[],r=null,i=0;for(let t=0;t<e.length;++t){let a=e[t],o=a.getNote(),s=l(o),c=s?4:0;if(s&&o!==r){for(let e=0;e<o.keys.length;++e)i=Math.max(o.getLeftDisplacedHeadPx(),i);r=o}n.push({shift:i,gracenoteGroup:a,spacing:c})}let a=n[0].shift,o,s=!1,c=!1;for(let e=0;e<n.length;++e){let t=n[e].gracenoteGroup;t.position===M.Position.RIGHT?s=!0:c=!0,t.preFormat(),o=t.getWidth()+n[e].spacing,a=Math.max(o,a)}for(let e=0;e<n.length;++e){let t=n[e].gracenoteGroup;o=t.getWidth()+n[e].spacing,t.setSpacingFromNextModifier(a-Math.min(o,a)+W.minNoteheadPadding)}return s&&(t.rightShift+=a),c&&(t.leftShift+=a),!0}constructor(e,t){return super(),this.preFormatted=!1,this.position=M.Position.LEFT,this.graceNotes=e,this.width=0,this.showSlur=t,this.slur=void 0,this.voice=new G({numBeats:4,beatValue:4,resolution:I.RESOLUTION}).setStrict(!1),this.renderOptions={slurYShift:0},this.beams=[],this.voice.addTickables(this.graceNotes),this}preFormat(){this.preFormatted||=(this.formatter||=new Q,this.formatter.joinVoices([this.voice]).format([this.voice],0,{}),this.setWidth(this.formatter.getMinTotalWidth()),!0)}beamNotes(e){if(e||=this.graceNotes,e.length>1){let t=new Gt(e);t.renderOptions.beamWidth=3,t.renderOptions.partialBeamLength=4,this.beams.push(t)}return this}setWidth(e){return this.width=e,this}getWidth(){return this.width+W.minNoteheadPadding}getGraceNotes(){return this.graceNotes}draw(){let e=this.checkContext(),t=this.checkAttachedNote();if(this.setRendered(),at(`Drawing grace note group for:`,t),this.alignSubNotesWithNote(this.getGraceNotes(),t,this.position),this.graceNotes.forEach(t=>t.setContext(e).drawWithStyle()),this.beams.forEach(t=>t.setContext(e).drawWithStyle()),this.showSlur){let n=l(t),r=n?nt:rt;this.slur=new r({lastNote:this.graceNotes[0],firstNote:t,firstIndexes:[0],lastIndexes:[0]}),this.slur.renderOptions.cp2=12,this.slur.renderOptions.yShift=(n?7:5)+this.renderOptions.slurYShift,this.slur.setContext(e).drawWithStyle()}}},st=class extends M{static get CATEGORY(){return f.NoteSubGroup}static format(e,t){if(!e||e.length===0)return!1;let n=0;for(let t=0;t<e.length;++t){let r=e[t];r.preFormat(),n+=r.getWidth()}return t.leftShift+=n,!0}constructor(e){super(),this.preFormatted=!1,this.position=M.Position.LEFT,this.subNotes=e,this.subNotes.forEach(e=>{e.setIgnoreTicks(!1)}),this.width=0,this.formatter=new Q,this.voice=new G({numBeats:4,beatValue:4,resolution:I.RESOLUTION}).setStrict(!1),this.voice.addTickables(this.subNotes)}preFormat(){this.preFormatted||=(this.formatter.joinVoices([this.voice]).format([this.voice],0),this.setWidth(this.formatter.getMinTotalWidth()),!0)}setWidth(e){return this.width=e,this}getWidth(){return this.width}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered(),this.alignSubNotesWithNote(this.subNotes,t),this.subNotes.forEach(t=>t.setContext(e).drawWithStyle())}};function ct(...e){lt.DEBUG&&g(`VexFlow.Ornament`,e)}var lt=class e extends M{static{this.DEBUG=!1}static get CATEGORY(){return f.Ornament}static get minPadding(){return T.get(`NoteHead.minPadding`)}static format(t,n){if(!t||t.length===0)return!1;let r=0,i=n.rightShift,a=n.leftShift;for(let o=0;o<t.length;++o){let s=t[o];if(s.position===j.RIGHT)s.xShift+=i+2,i+=s.width+e.minPadding;else if(s.position===j.LEFT)s.xShift-=a+s.width+2,a+=s.width+e.minPadding;else if(s.position===j.ABOVE){r=Math.max(s.getWidth(),r);let e=s.getNote(),t=e.getLineNumber(!0)+n.topTextLine,i=e.getStem();i&&e.getStemDirection()===L.UP&&(t+=Math.abs(i.getHeight())/I.STAVE_LINE_DISTANCE);let a=e.getStave()?.getNumLines()??0;t<a&&(n.topTextLine+=a-t),s.setTextLine(n.topTextLine),n.topTextLine+=2}else r=Math.max(s.getWidth(),r),s.setTextLine(n.textLine),n.textLine+=2}return n.leftShift=a+r/2,n.rightShift=i+r/2,!0}static get ornamentNoteTransition(){return[`flip`,`jazzTurn`,`smear`]}static get ornamentAttack(){return[`scoop`]}static get ornamentAlignWithNoteHead(){return[`doit`,`fall`,`fallLong`,`doitLong`,`scoop`]}static get ornamentRelease(){return[`doit`,`fall`,`fallLong`,`doitLong`,`jazzTurn`,`smear`,`flip`]}static get ornamentLeft(){return[`scoop`]}static get ornamentRight(){return[`doit`,`fall`,`fallLong`,`doitLong`]}static get ornamentYShift(){return[`fallLong`]}static get ornamentArticulation(){return[`bend`,`plungerClosed`,`plungerOpen`]}constructor(t){super(),this.position=j.ABOVE,e.ornamentRight.indexOf(t)>=0&&(this.position=j.RIGHT),e.ornamentLeft.indexOf(t)>=0&&(this.position=j.LEFT),this.type=t,this.delayed=!1,this.renderOptions={accidentalLowerPadding:3,accidentalUpperPadding:3},this.adjustForStemDirection=!1,this.ornamentAlignWithNoteHead=e.ornamentAlignWithNoteHead.indexOf(this.type)>=0,e.ornamentNoteTransition.indexOf(this.type)>=0&&(this.delayed=!0),this.text=I.ornamentCodes(this.type)}setNote(t){return super.setNote(t),e.ornamentArticulation.indexOf(this.type)>=0&&(this.position=t.getLineNumber()>=3?M.Position.ABOVE:M.Position.BELOW),this}setDelayed(e){return this.delayed=e,this}setUpperAccidental(e){return this.accidentalUpper=new A,this.accidentalUpper.setText(I.accidentalCodes(e)),this}setLowerAccidental(e){return this.accidentalLower=new A,this.accidentalLower.setText(I.accidentalCodes(e)),this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=n.checkStave(),i=this.getAttribute(`class`);t.openGroup(`ornament`+(i?` `+i:``),this.getAttribute(`id`));let a=n.getModifierStartXY(this.position,this.index),o=a.x,s=r.getSpacingBetweenLines(),c=Ae(n,this.position),l=this.ornamentAlignWithNoteHead?a.y:0;if(this.position===j.ABOVE&&(l=Oe(n,this.textLine)-(this.textLine+c)*s),this.position===j.BELOW&&(l=ke(n,this.textLine)+(this.textLine+c+1.5)*s),this.delayed){let e=0,t=n.getTickContext().getX();if(this.delayXShift!==void 0)e=this.delayXShift;else{let i=n.getVoice().getTickables(),a=i.indexOf(n),s=a+1<i.length?i[a+1].checkTickContext():void 0;e+=s?(s.getX()-t)*.5:(r.getX()+r.getWidth()-o)*.5,this.delayXShift=e}o+=e}ct(`Rendering ornament: `,this.text.charCodeAt(0),o,l),this.accidentalLower&&(this.accidentalLower.renderText(t,o+this.xShift-this.accidentalLower.getWidth()*.5,l+this.yShift-this.accidentalLower.getTextMetrics().actualBoundingBoxDescent),l-=this.accidentalLower.getHeight()+this.renderOptions.accidentalLowerPadding),e.ornamentYShift.indexOf(this.type)>=0&&(this.yShift+=this.getHeight()),this.x=o-(this.position===j.ABOVE||this.position===j.BELOW?this.width*.5:0),this.y=l,this.renderText(t,0,0),this.accidentalUpper&&(l-=this.getHeight()+this.renderOptions.accidentalUpperPadding,this.accidentalUpper.renderText(t,o+this.xShift-this.accidentalUpper.getWidth()*.5,l+this.yShift-this.accidentalUpper.getTextMetrics().actualBoundingBoxDescent)),this.drawPointerRect(),t.closeGroup()}},ut=class e extends M{static get CATEGORY(){return f.Parenthesis}static buildAndAttach(t){for(let n of t)for(let t=0;t<n.keys.length;t++)n.addModifier(new e(j.LEFT),t),n.addModifier(new e(j.RIGHT),t)}static format(e,t){if(!e||e.length===0)return!1;let n=0,r=0;for(let t=0;t<e.length;++t){let i=e[t],a=i.getNote(),o=i.getPosition(),s=i.checkIndex(),c=0;o===j.RIGHT&&(c=a.getRightParenthesisPx(s),r=r>c+i.width?r:c+i.width),o===j.LEFT&&(c=a.getLeftParenthesisPx(s)+i.width,n=n>c+i.width?n:c+i.width),i.setXShift(c)}return t.leftShift+=n,t.rightShift+=r,!0}constructor(e){super(),this.position=e??M.Position.LEFT,this.position===M.Position.RIGHT?this.text=``:this.position===M.Position.LEFT&&(this.text=``)}setNote(e){return this.note=e,this.setFont(e.getFont()),this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});this.renderText(e,n.x,n.y)}};function dt(e){if(!e)return!1;let t=m();return typeof t.HTMLCanvasElement==`function`&&e instanceof t.HTMLCanvasElement||typeof e.getContext==`function`&&typeof e.toDataURL==`function`}function ft(e){if(!e)return!1;let t=m();return typeof t.HTMLDivElement==`function`&&e instanceof t.HTMLDivElement||typeof e.appendChild==`function`&&typeof e.style==`object`}var pt=class e extends Me{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static sanitizeCanvasDims(e,t){let n=this.CANVAS_BROWSER_SIZE_LIMIT;return Math.max(e,t)>n&&(_(`Canvas dimensions exceed browser limit. Cropping to `+n),e>n&&(e=n),t>n&&(t=n)),[e,t]}constructor(t){super(),this.textHeight=0,this.context2D=t,this.curTransfrom=t.getTransform(),this.canvas=t.canvas?t.canvas:{width:e.WIDTH,height:e.HEIGHT}}clear(){this.context2D.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(e,t){}closeGroup(){}openRotation(e,t,n){this.curTransfrom=this.context2D.getTransform(),this.context2D.translate(t,n),this.context2D.rotate(e*Math.PI/180),this.context2D.translate(-t,-n)}closeRotation(){this.context2D.setTransform(this.curTransfrom)}add(e){}setFillStyle(e){return this.context2D.fillStyle=e,this}setBackgroundFillStyle(e){return this}setStrokeStyle(e){return this.context2D.strokeStyle=e,this}setShadowColor(e){return this.context2D.shadowColor=e,this}setShadowBlur(e){let t=this.context2D.getTransform(),n=Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d);return this.context2D.shadowBlur=n*e,this}setLineWidth(e){return this.context2D.lineWidth=e,this}setLineCap(e){return this.context2D.lineCap=e,this}setLineDash(e){return this.context2D.setLineDash(e),this}scale(e,t){return this.context2D.scale(e,t),this}resize(t,n,r){let i=this.context2D.canvas,a=r??m().devicePixelRatio??1;return[t,n]=e.sanitizeCanvasDims(t*a,n*a),t=t/a|0,n=n/a|0,i.width=t*a,i.height=n*a,dt(i)&&(i.style.width=t+`px`,i.style.height=n+`px`),this.scale(a,a)}rect(e,t,n,r){return this.context2D.rect(e,t,n,r),this}fillRect(e,t,n,r){return this.context2D.fillRect(e,t,n,r),this}pointerRect(e,t,n,r){return this}clearRect(e,t,n,r){return this.context2D.clearRect(e,t,n,r),this}beginPath(){return this.context2D.beginPath(),this}moveTo(e,t){return this.context2D.moveTo(e,t),this}lineTo(e,t){return this.context2D.lineTo(e,t),this}bezierCurveTo(e,t,n,r,i,a){return this.context2D.bezierCurveTo(e,t,n,r,i,a),this}quadraticCurveTo(e,t,n,r){return this.context2D.quadraticCurveTo(e,t,n,r),this}arc(e,t,n,r,i,a){return this.context2D.arc(e,t,n,r,i,a),this}fill(){return this.context2D.fill(),this}stroke(){return this.context2D.stroke(),this}closePath(){return this.context2D.closePath(),this}measureText(e){let t=this.context2D.measureText(e),n=0,r=0;return t.fontBoundingBoxAscent?(n=-t.fontBoundingBoxAscent,r=t.fontBoundingBoxDescent+t.fontBoundingBoxAscent):(n=-t.actualBoundingBoxAscent,r=t.actualBoundingBoxDescent+t.actualBoundingBoxAscent),{x:0,y:n,width:t.width,height:r}}fillText(e,t,n){return this.context2D.fillText(e,t,n),this}save(){return this.context2D.save(),this}restore(){return this.context2D.restore(),this}set fillStyle(e){this.context2D.fillStyle=e}get fillStyle(){return this.context2D.fillStyle}set strokeStyle(e){this.context2D.strokeStyle=e}get strokeStyle(){return this.context2D.strokeStyle}setFont(e,t,n,r){let i=k.validate(e,t,n,r);return this.context2D.font=k.toCSSString(i),this.textHeight=k.convertSizeToPixelValue(i.size),this}getFont(){return this.context2D.font}},mt={path:{x:!0,y:!0,width:!0,height:!0,"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0},rect:{"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0},text:{width:!0,height:!0}},ht=`http://www.w3.org/2000/svg`,gt=2*Math.PI,_t=class e extends Me{static{this.measureTextElement=new A}constructor(e){super(),this.width=0,this.height=0,this.precision=1,this.backgroundFillStyle=`white`,this.fontCSSString=``,this.element=e,this.precision=10**I.RENDER_PRECISION_PLACES;let t=this.create(`svg`);t.setAttribute(`pointer-events`,`none`),this.element.appendChild(t),this.svg=t,this.parent=this.svg,this.groups=[this.svg],this.path=``,this.pen={x:NaN,y:NaN};let n={"font-family":T.get(`fontFamily`),"font-size":`10pt`,"font-weight":O.NORMAL,"font-style":ee.NORMAL};this.state={scaleX:1,scaleY:1,...n},this.attributes={"stroke-width":1,"stroke-dasharray":`none`,fill:`black`,stroke:`black`,shadowBlur:0,shadowColor:`black`,...n},this.groupAttributes=[],this.applyAttributes(t,this.attributes),this.groupAttributes.push({...this.attributes}),this.stateStack=[]}round(e){return Math.round(e*this.precision)/this.precision}create(e){return document.createElementNS(ht,e)}openGroup(e,t){let n=this.create(`g`);return this.groups.push(n),this.parent.appendChild(n),this.parent=n,e&&n.setAttribute(`class`,b(e)),t&&n.setAttribute(`id`,b(t)),this.applyAttributes(n,this.attributes),this.groupAttributes.push({...this.groupAttributes[this.groupAttributes.length-1],...this.attributes}),n}closeGroup(){this.groups.pop(),this.groupAttributes.pop(),this.parent=this.groups[this.groups.length-1]}openRotation(e,t,n){this.openGroup().setAttribute(`transform`,`translate(${t},${n}) rotate(${e}) translate(-${t},-${n})`)}closeRotation(){this.closeGroup()}add(e){this.parent.appendChild(e)}setFillStyle(e){return this.attributes.fill=e,this}setBackgroundFillStyle(e){return this.backgroundFillStyle=e,this}setStrokeStyle(e){return this.attributes.stroke=e,this}setShadowColor(e){return this.attributes.shadowColor=e,this}setShadowBlur(e){return this.attributes.shadowBlur=e,this}setLineWidth(e){return this.attributes[`stroke-width`]=e,this}setLineDash(e){if(Object.prototype.toString.call(e)===`[object Array]`)return this.attributes[`stroke-dasharray`]=e.join(`,`),this;throw new p(`ArgumentError`,`lineDash must be an array of integers.`)}setLineCap(e){return this.attributes[`stroke-linecap`]=e,this}resize(e,t){this.width=e,this.height=t,this.element.style.width=e.toString(),this.svg.style.width=e.toString(),this.svg.style.height=t.toString();let n={width:e,height:t};return this.applyAttributes(this.svg,n),this.scale(this.state.scaleX,this.state.scaleY),this}scale(e,t){this.state.scaleX=this.state.scaleX?this.state.scaleX*e:e,this.state.scaleY=this.state.scaleY?this.state.scaleY*t:t;let n=this.width/this.state.scaleX,r=this.height/this.state.scaleY;return this.setViewBox(0,0,n,r),this}setViewBox(e,t,n,r){if(typeof e==`string`)this.svg.setAttribute(`viewBox`,e);else{let i=e+` `+t+` `+n+` `+r;this.svg.setAttribute(`viewBox`,i)}}applyAttributes(e,t){let n=mt[e.nodeName];for(let r in t)n&&n[r]||t[r]&&(this.groupAttributes.length===0||t[r]!=this.groupAttributes[this.groupAttributes.length-1][r])&&e.setAttributeNS(null,r,t[r]);return e}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild)}rect(e,t,n,r,i){r<0&&(t+=r,r*=-1);let a=this.create(`rect`);return i??={fill:`none`,"stroke-width":this.attributes[`stroke-width`],stroke:`black`},e=this.round(e),t=this.round(t),n=this.round(n),r=this.round(r),this.applyAttributes(a,{x:e,y:t,width:n,height:r,...i}),this.add(a),this}fillRect(e,t,n,r){let i={fill:this.attributes.fill,stroke:`none`};return this.rect(e,t,n,r,i),this}pointerRect(e,t,n,r){return this.rect(e,t,n,r,{opacity:`0`,"pointer-events":`auto`}),this}clearRect(e,t,n,r){return this.rect(e,t,n,r,{fill:this.backgroundFillStyle,stroke:`none`}),this}beginPath(){return this.path=``,this.pen.x=NaN,this.pen.y=NaN,this}moveTo(e,t){return e=this.round(e),t=this.round(t),this.path+=`M`+e+` `+t,this.pen.x=e,this.pen.y=t,this}lineTo(e,t){return e=this.round(e),t=this.round(t),this.path+=`L`+e+` `+t,this.pen.x=e,this.pen.y=t,this}bezierCurveTo(e,t,n,r,i,a){return i=this.round(i),a=this.round(a),e=this.round(e),t=this.round(t),n=this.round(n),r=this.round(r),this.path+=`C`+e+` `+t+`,`+n+` `+r+`,`+i+` `+a,this.pen.x=i,this.pen.y=a,this}quadraticCurveTo(e,t,n,r){return n=this.round(n),r=this.round(r),e=this.round(e),t=this.round(t),this.path+=`Q`+e+` `+t+`,`+n+` `+r,this.pen.x=n,this.pen.y=r,this}arc(e,t,n,r,i,a){let o=e+n*Math.cos(r),s=t+n*Math.sin(r);o=this.round(o),s=this.round(s);let c=x(r),l=x(i);if(!a&&i-r>=gt||a&&r-i>=gt||c===l){let i=e+n*Math.cos(r+Math.PI),a=t+n*Math.sin(r+Math.PI);i=this.round(i),a=this.round(a),n=this.round(n),this.path+=`M${o} ${s} A${n} ${n} 0 0 0 ${i} ${a} `,this.path+=`A${n} ${n} 0 0 0 ${o} ${s}`,this.pen.x=o,this.pen.y=s}else{let u=e+n*Math.cos(i),d=t+n*Math.sin(i);r=c,i=l;let f;f=Math.abs(i-r)<Math.PI?a:!a,r>i&&(f=!f);let p=!a;u=this.round(u),d=this.round(d),n=this.round(n),this.path+=`M${o} ${s} A${n} ${n} 0 ${+f} ${+p} ${u} ${d}`,this.pen.x=u,this.pen.y=d}return this}closePath(){return this.path+=`Z`,this}getShadowStyle(){return`filter: drop-shadow(0 0 ${this.attributes.shadowBlur/1.5}px ${this.attributes.shadowColor})`}fill(e){let t=this.create(`path`);return e===void 0&&(e={...this.attributes,stroke:`none`}),e.d=this.path,this.attributes.shadowBlur>0&&(e.style=this.getShadowStyle()),this.applyAttributes(t,e),this.add(t),this}stroke(){let e=this.create(`path`),t={...this.attributes,fill:`none`,d:this.path};return this.attributes.shadowBlur>0&&(t.style=this.getShadowStyle()),this.applyAttributes(e,t),this.add(e),this}measureText(t){e.measureTextElement.setText(t),e.measureTextElement.setFont(this.attributes[`font-family`],this.attributes[`font-size`],this.attributes[`font-weight`],this.attributes[`font-style`]);let n=e.measureTextElement.getBoundingBox();return{x:n.x,y:n.y,width:n.w,height:n.h}}fillText(e,t,n){if(!e||e.length<=0)return this;t=this.round(t),n=this.round(n);let r={...this.attributes,stroke:`none`,x:t,y:n},i=this.create(`text`);return i.textContent=e,this.applyAttributes(i,r),this.add(i),this}save(){return this.stateStack.push({state:structuredClone(this.state),attributes:structuredClone(this.attributes)}),this}restore(){let e=this.stateStack.pop();if(e){let t=e;this.state=structuredClone(t.state),this.attributes=structuredClone(t.attributes)}return this}set fillStyle(e){this.setFillStyle(e)}get fillStyle(){return this.attributes.fill}set strokeStyle(e){this.setStrokeStyle(e)}get strokeStyle(){return this.attributes.stroke}setFont(e,t,n,r){let i=k.validate(e,t,n,r);this.fontCSSString=k.toCSSString(i);let a={"font-family":i.family,"font-size":i.size,"font-weight":i.weight,"font-style":i.style};return this.attributes={...this.attributes,...a},this.state={...this.state,...a},this}getFont(){return this.fontCSSString}},vt=function(e){return e[e.CANVAS=1]=`CANVAS`,e[e.SVG=2]=`SVG`,e}({}),yt=function(e){return e[e.NONE=1]=`NONE`,e[e.UP=2]=`UP`,e[e.DOWN=3]=`DOWN`,e}({}),K=class e{static{this.Backends=vt}static{this.LineEndType=yt}static{this.lastContext=void 0}static buildContext(t,n,r,i,a=`#FFF`){let o=new e(t,n);r&&i&&o.resize(r,i);let s=o.getContext();return s.setBackgroundFillStyle(a),e.lastContext=s,s}static getCanvasContext(t,n,r,i){return e.buildContext(t,e.Backends.CANVAS,n,r,i)}static getSVGContext(t,n,r,i){return e.buildContext(t,e.Backends.SVG,n,r,i)}static drawDashedLine(e,t,n,r,i,a){e.beginPath();let o=r-t,s=i-n,c=Math.atan2(s,o),l=t,u=n;e.moveTo(t,n);let d=0,f=!0;for(;!((o<0?l<=r:l>=r)&&(s<0?u<=i:u>=i));){let t=a[d++%a.length],n=l+Math.cos(c)*t;l=o<0?Math.max(r,n):Math.min(r,n);let p=u+Math.sin(c)*t;u=s<0?Math.max(i,p):Math.min(i,p),f?e.lineTo(l,u):e.moveTo(l,u),f=!f}e.closePath(),e.stroke()}constructor(t,n){if(c(t))this.ctx=t;else{if(n===void 0)throw new p(`InvalidArgument`,`Missing backend argument`);let r=n,i;if(typeof t==`string`){let e=document.getElementById(t);if(!e)throw new p(`BadElementId`,`Can't find element with ID "${e}"`);i=e}else i=t;if(r===e.Backends.CANVAS){if(!dt(i))throw new p(`BadElement`,`CANVAS context requires an HTMLCanvasElement.`);let e=i.getContext(`2d`,{willReadFrequently:!0});if(!e)throw new p(`BadElement`,`Can't get canvas context`);this.ctx=new pt(e)}else if(r===e.Backends.SVG){if(!ft(i))throw new p(`BadElement`,`SVG context requires an HTMLDivElement.`);this.ctx=new _t(i)}else throw new p(`InvalidBackend`,`No support for backend: ${r}`)}}resize(e,t){return this.ctx.resize(e,t),this}getContext(){return this.ctx}},bt=class extends M{static get CATEGORY(){return f.StringNumber}static format(e,t){let n=t.leftShift,r=t.rightShift;if(!e||e.length===0)return!1;let i=[],a=null,o=0,s=0;for(let n=0;n<e.length;++n){let c=e[n],u=c.getNote(),d=c.getPosition();if(!l(u))throw new p(`NoStaveNote`);let f=c.checkIndex(),m=u.getKeyProps()[f],h=u.getModifierContext(),g=c.radius*2/I.STAVE_LINE_DISTANCE+.5;if(h&&(d===j.ABOVE?(c.textLine=h.getState().topTextLine,t.topTextLine+=g):d===j.BELOW&&(c.textLine=h.getState().textLine,t.textLine+=g)),u!==a){for(let e=0;e<u.keys.length;++e)d===M.Position.LEFT&&(o=Math.max(u.getLeftDisplacedHeadPx(),o)),r===0&&(s=Math.max(u.getRightDisplacedHeadPx(),s));a=u}let _=m.line;i.push({pos:d,note:u,num:c,line:_,shiftL:o,shiftR:s})}i.sort((e,t)=>t.line-e.line);let c=0,u=0,d=0,f=null,m=null;for(let e=0;e<i.length;++e){let t=i[e].note,a=i[e].pos,s=i[e].num,l=i[e].line,p=i[e].shiftR;(l!==f||t!==m)&&(c=r+p);let h=s.getWidth()+1,g=0;a===M.Position.LEFT?(s.setXShift(n+o),g=h,u=Math.max(g,u)):a===M.Position.RIGHT&&(s.setXShift(c),g+=h,d=g>d?g:d),f=l,m=t}return t.leftShift+=u,t.rightShift+=d,!0}constructor(e){super(),this.stringNumber=e,this.position=M.Position.ABOVE,this.xShift=0,this.yShift=0,this.textLine=0,this.stemOffset=0,this.xOffset=0,this.yOffset=0,this.dashed=!0,this.leg=K.LineEndType.NONE,this.radius=8,this.drawCircle=!0,this.setWidth(this.radius*2+4)}setLineEndType(e){return e>=K.LineEndType.NONE&&e<=K.LineEndType.DOWN&&(this.leg=e),this}setStringNumber(e){return this.stringNumber=e,this}setOffsetX(e){return this.xOffset=e,this}setOffsetY(e){return this.yOffset=e,this}setLastNote(e){return this.lastNote=e,this}setDashed(e){return this.dashed=e,this}setDrawCircle(e){return this.drawCircle=e,this}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(this.position,this.index),r=t.hasStem()?t.getStemDirection():L.UP,i=n.x+this.xShift+this.xOffset,a={};t.hasStem()&&(a=t.checkStem().getExtents());let o=n.y+this.yShift+this.yOffset;switch(this.position){case M.Position.ABOVE:o=t.getYs().reduce((e,t)=>e<t?e:t),t.hasStem()&&r===L.UP&&(o=a.topY+T.get(`StringNumber.stemPadding`)),o-=this.radius+T.get(`StringNumber.verticalPadding`)+this.textLine*I.STAVE_LINE_DISTANCE;break;case M.Position.BELOW:o=t.getYs().reduce((e,t)=>e>t?e:t),t.hasStem()&&r===L.DOWN&&(o=a.topY-T.get(`StringNumber.stemPadding`)),o+=this.radius+T.get(`StringNumber.verticalPadding`)+this.textLine*I.STAVE_LINE_DISTANCE;break;case M.Position.LEFT:i-=this.radius/2+T.get(`StringNumber.leftPadding`);break;case M.Position.RIGHT:i+=this.radius/2+T.get(`StringNumber.rightPadding`);break;default:throw new p(`InvalidPosition`,`The position ${this.position} is invalid`)}this.drawCircle&&(e.beginPath(),e.arc(i,o,this.radius,0,Math.PI*2,!1),e.setLineWidth(1.5),e.stroke()),e.setFont(this.fontInfo);let s=i-e.measureText(this.stringNumber).width/2;e.fillText(``+this.stringNumber,s,o+4.5);let c=this.lastNote;if(u(c)){let n=c.getStemX()-t.getX()+5;e.setStrokeStyle(`#000000`),e.setLineCap(`round`),e.setLineWidth(.6),this.dashed?K.drawDashedLine(e,i+10,o,i+n,o,[3,3]):K.drawDashedLine(e,i+10,o,i+n,o,[3,0]);let r,a;switch(this.leg){case K.LineEndType.UP:r=-10,a=this.dashed?[3,3]:[3,0],K.drawDashedLine(e,i+n,o,i+n,o+r,a);break;case K.LineEndType.DOWN:r=10,a=this.dashed?[3,3]:[3,0],K.drawDashedLine(e,i+n,o,i+n,o+r,a)}}}},xt=class e extends M{static get CATEGORY(){return f.Stroke}static{this.Type={BRUSH_DOWN:1,BRUSH_UP:2,ROLL_DOWN:3,ROLL_UP:4,RASGUEADO_DOWN:5,RASGUEADO_UP:6,ARPEGGIO_DIRECTIONLESS:7}}static format(e,t){let n=t.leftShift;if(!e||e.length===0)return!1;let r=e.map(e=>{let t=e.getNote(),n=e.checkIndex();if(l(t)){let{line:r}=t.getKeyProps()[n];return{line:r,shift:t.getLeftDisplacedHeadPx(),stroke:e}}if(d(t)){let{str:r}=t.getPositions()[n];return{line:r,shift:0,stroke:e}}throw new p(`Internal`,`Unexpected instance.`)}),i=n,a=r.reduce((e,{stroke:t,shift:n})=>(t.setXShift(i+n),Math.max(t.getWidth()+5,e)),0);return t.leftShift+=a,!0}constructor(e,t){super(),this.boundingBox=new D(0,0,0,0),this.options={allVoices:!0,...t},this.allVoices=this.options.allVoices,this.type=e,this.position=M.Position.LEFT,this.renderOptions={fontScale:T.get(`Stroke.fontSize`)},this.setXShift(0),this.setWidth(10)}getPosition(){return this.position}addEndNote(e){return this.noteEnd=e,this}draw(){let t=this.checkContext(),n=this.checkAttachedNote();this.setRendered();let r=n.getModifierStartXY(this.position,this.index),i=n.getYs(),a=r.y,o=r.y,c=r.x-5,l=n.checkStave().getSpacingBetweenLines(),u=this.checkModifierContext().getMembers(n.getCategory());for(let e=0;e<u.length;e++){let t=u[e];if(s(t)){i=t.getYs();for(let t=0;t<i.length;t++)(this.note===u[e]||this.allVoices)&&(a=Math.min(a,i[t]),o=Math.max(o,i[t]))}}let d=``,f=0,m=0;switch(this.type){case e.Type.BRUSH_DOWN:case e.Type.ROLL_DOWN:case e.Type.RASGUEADO_DOWN:d=P.arrowheadBlackUp,f=a,a-=l/2,o+=l/2;break;case e.Type.BRUSH_UP:case e.Type.ROLL_UP:case e.Type.RASGUEADO_UP:d=P.arrowheadBlackDown,f=o+l,a-=l/2;break;case e.Type.ARPEGGIO_DIRECTIONLESS:a-=l/2,o+=l/2;break;default:throw new p(`InvalidType`,`The stroke type ${this.type} does not exist`)}if(this.type===e.Type.BRUSH_DOWN||this.type===e.Type.BRUSH_UP)t.fillRect(c+this.xShift,a,1,o-a),this.boundingBox=new D(c+this.xShift,a,1,o-a);else{let n=d===P.arrowheadBlackDown?P.wiggleArpeggiatoDown:P.wiggleArpeggiatoUp,r=``,i=new A;for(;i.getWidth()<o-a;)r+=n,i.setText(r);this.type===e.Type.RASGUEADO_DOWN||this.type===e.Type.ROLL_DOWN||this.type===e.Type.ARPEGGIO_DIRECTIONLESS?(t.openRotation(90,c+this.xShift,a),i.renderText(t,c+this.xShift,a-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2),t.closeRotation(),m=a+i.getWidth()+5,this.boundingBox=new D(c+this.xShift-i.getHeight()/2,a-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2,i.getHeight(),i.getWidth())):(t.openRotation(-90,c+this.xShift,o),i.renderText(t,c+this.xShift,o-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2),t.closeRotation(),m=o-i.getWidth()-5,this.boundingBox=new D(c+this.xShift-i.getHeight()/2,o-i.getTextMetrics().actualBoundingBoxDescent+i.getHeight()/2-i.getWidth(),i.getHeight(),i.getWidth()))}if(f!==0){let e=new A;e.setText(d),e.renderText(t,c+this.xShift-e.getWidth()/2,f),this.boundingBox.mergeWith(new D(c+this.xShift-e.getWidth()/2,f-e.getHeight(),e.getWidth(),e.getHeight()))}if(this.type===e.Type.RASGUEADO_DOWN||this.type===e.Type.RASGUEADO_UP){let n=new A(`Stroke.text`);n.setText(`R`),n.renderText(t,c+this.xShift-n.getWidth()/2,m+(this.type===e.Type.RASGUEADO_DOWN?n.getHeight():0)),this.boundingBox.mergeWith(new D(c+this.xShift-n.getWidth()/2,m+(this.type===e.Type.RASGUEADO_DOWN?n.getHeight():0)-n.getHeight(),n.getWidth(),n.getHeight()))}}getBoundingBox(){return this.boundingBox}},St=class extends M{static get CATEGORY(){return f.Vibrato}static format(e,t,n){if(!e||e.length===0)return!1;let r=t.topTextLine,i=0,a=t.rightShift-7,o=n.getMembers(Re.CATEGORY);if(o&&o.length>0){let e=o.map(e=>e.getTextHeight()).reduce((e,t)=>e>t?e:t)/I.STAVE_LINE_DISTANCE;r-=e+1}else t.topTextLine+=1;for(let t=0;t<e.length;++t){let n=e[t];n.setXShift(a),n.setTextLine(r),i+=n.getWidth(),a+=i}return t.rightShift+=i,!0}constructor(){super(),this.position=M.Position.RIGHT,this.renderOptions={code:60080,width:20},this.setVibratoWidth(this.renderOptions.width)}setVibratoWidth(e){this.renderOptions.width=e,this.text=String.fromCodePoint(this.renderOptions.code);let t=this.getWidth();if(!t)throw new p(`Cannot set vibrato width if width is 0`);let n=Math.round(this.renderOptions.width/t);for(let e=1;e<n;e++)this.text+=String.fromCodePoint(this.renderOptions.code);return this}setVibratoCode(e){return this.renderOptions.code=e,this.setVibratoWidth(this.renderOptions.width)}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getModifierStartXY(M.Position.RIGHT,this.index).x,r=t.getYForTopText(this.textLine)+5;this.renderText(e,n,r)}};function Ct(...e){wt.DEBUG&&g(`VexFlow.ModifierContext`,e)}var wt=class{constructor(){this.state={leftShift:0,rightShift:0,textLine:0,topTextLine:0},this.members={},this.preFormatted=!1,this.postFormatted=!1,this.formatted=!1,this.width=0,this.spacing=0}static{this.DEBUG=!1}addModifier(e){return Ct(`addModifier is deprecated, use addMember instead.`),this.addMember(e)}addMember(e){let t=e.getCategory();return this.members[t]||(this.members[t]=[]),this.members[t].push(e),e.setModifierContext(this),this.preFormatted=!1,this}getModifiers(e){return Ct(`getModifiers is deprecated, use getMembers instead.`),this.getMembers(e)}getMembers(e){return this.members[e]??[]}getWidth(){return this.width}getLeftShift(){return this.state.leftShift}getRightShift(){return this.state.rightShift}getState(){return this.state}getMetrics(){if(!this.formatted)throw new p(`UnformattedMember`,`Unformatted member has no metrics.`);return{width:this.state.leftShift+this.state.rightShift+this.spacing,spacing:this.spacing}}preFormat(){if(this.preFormatted)return;Ct(`Preformatting ModifierContext`);let e=this.state,t=this.members;W.format(t[f.StaveNote],e),ut.format(t[f.Parenthesis],e),Ge.format(t[f.Dot],e),Ke.format(t[f.FretHandFinger],e),he.format(t[f.Accidental],e),xt.format(t[f.Stroke],e),ot.format(t[f.GraceNoteGroup],e),st.format(t[f.NoteSubGroup],e),bt.format(t[f.StringNumber],e),je.format(t[f.Articulation],e),lt.format(t[f.Ornament],e),be.format(t[f.Annotation],e),We.format(t[f.ChordSymbol],e),Re.format(t[f.Bend],e),St.format(t[f.Vibrato],e,this),this.width=e.leftShift+e.rightShift,this.preFormatted=!0}postFormat(){this.postFormatted||(Ct(`Postformatting ModifierContext`),W.postFormat(this.getMembers(f.StaveNote)))}};function Tt(...e){q.DEBUG&&g(`VexFlow.Clef`,e)}var q=class e extends V{static{this.DEBUG=!1}static get CATEGORY(){return f.Clef}static get types(){let{gClef:e,fClef:t,cClef:n,unpitchedPercussionClef1:r,sixStringTabClef:i}=P;return{treble:{code:e,line:3},bass:{code:t,line:1},alto:{code:n,line:2},tenor:{code:n,line:1},percussion:{code:r,line:2},soprano:{code:n,line:4},"mezzo-soprano":{code:n,line:3},"baritone-c":{code:n,line:0},"baritone-f":{code:t,line:2},subbass:{code:t,line:0},french:{code:e,line:4},tab:{code:i,line:2.5}}}constructor(t,n,r){super(),this.code=e.types.treble.code,this.line=e.types.treble.line,this.size=`default`,this.type=`treble`,this.setPosition(B.BEGIN),this.setType(t,n,r),Tt(`Creating clef:`,t)}setType(t,n=`default`,r){return this.type=t,this.code=e.types[t].code,this.line=e.types[t].line,this.size=n??`default`,r===`8va`&&(this.code===P.gClef&&(this.code=P.gClef8va),this.code===P.fClef&&(this.code=P.fClef8va)),r===`8vb`&&(this.code===P.gClef&&(this.code=P.gClef8vb),this.code===P.fClef&&(this.code=P.fClef8vb)),this.text=this.code,this.fontInfo.size=Math.floor(e.getPoint(this.size)),this}static getPoint(e){return e==="default"?T.get(`fontSize`):T.get(`fontSize`)*2/3}setStave(e){return this.stave=e,this}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`clef`+(n?` `+n:``),this.getAttribute(`id`)),this.y=e.getYForLine(this.line),this.renderText(t,0,0),this.drawPointerRect(),t.closeGroup()}},J=class extends V{static get CATEGORY(){return f.KeySignature}constructor(e,t,n){super(),this.accList=[],this.setKeySig(e,t,n),this.setPosition(B.BEGIN),this.children=[],this.paddingForced=!1}convertToGlyph(e,t,n){let r=I.accidentalCodes(e.type),i=new A(f.KeySignature);i.setText(r);let a=1;if(i.setYShift(n.getYForLine(e.line)),this.children.length>0){let e=this.children[this.children.length-1],t=e=>e.getText()===P.accidentalNatural;(t(e)||t(i))&&((e,t)=>Math.abs(t.getYShift()-e.getYShift()))(e,i)<10&&(a=2),i.setXShift(e.getXShift()+e.getWidth()+a)}this.children.push(i),this.width+=i.getWidth()+a}cancelKey(e){return this.formatted=!1,this.cancelKeySpec=e,this}convertToCancelAccList(e){let t=I.keySignature(e),n=this.accList.length>0&&t.length>0&&t[0].type!==this.accList[0].type,r=n?t.length:t.length-this.accList.length;if(r<1)return;let i=[];for(let e=0;e<r;e++){let a=e;n||(a=t.length-r+e);let o=t[a];i.push({type:`n`,line:o.line})}return this.accList=i.concat(this.accList),{accList:i,type:t[0].type}}addToStave(e){return this.paddingForced=!0,e.addModifier(this),this}setStave(e){return this.formatted=!1,super.setStave(e)}getBoundingBox(){return this.formatted||this.format(),super.getBoundingBox()}calculateDimensions(){let e;e=this.children.length>0?this.children[0].getBoundingBox():new D(this.x+this.xShift,this.y+this.yShift,0,0),this.children.forEach(t=>{e.mergeWith(t.getBoundingBox())}),this.width=e.getW(),this.height=e.getH(),this.y=e.getY()}convertAccLines(e,t,n=this.accList){let r=0,i;switch(e){case`soprano`:t===`#`?i=[2.5,.5,2,0,1.5,-.5,1]:r=-1;break;case`mezzo-soprano`:t===`b`?i=[0,2,.5,2.5,1,3,1.5]:r=1.5;break;case`alto`:r=.5;break;case`tenor`:t===`#`?i=[3,1,2.5,.5,2,0,1.5]:r=-.5;break;case`baritone-f`:case`baritone-c`:t===`b`?i=[.5,2.5,1,3,1.5,3.5,2]:r=2;break;case`bass`:case`french`:r=1}let a;if(i!==void 0)for(a=0;a<n.length;++a)n[a].line=i[a];else if(r!==0)for(a=0;a<n.length;++a)n[a].line+=r}getPadding(e){return this.formatted||this.format(),this.children.length===0||!this.paddingForced&&e<2?0:this.padding}getWidth(){return this.formatted||this.format(),this.width}setKeySig(e,t,n){return this.formatted=!1,this.keySpec=e,this.cancelKeySpec=t,this.alterKeySpec=n,this}alterKey(e){return this.formatted=!1,this.alterKeySpec=e,this}convertToAlterAccList(e){let t=Math.min(e.length,this.accList.length);for(let n=0;n<t;++n)e[n]&&(this.accList[n].type=e[n])}format(){let e=this.getStave();e||(e=new X(0,0,100),this.setStave(e)),this.width=0,this.children=[],this.accList=I.keySignature(h(this.keySpec));let t=this.accList,n=t.length>0?t[0].type:void 0,r;if(this.cancelKeySpec&&(r=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){let i=(this.position===B.END?e.getEndClef():e.getClef())||e.getClef();r&&this.convertAccLines(i,r.type,r.accList),this.convertAccLines(i,n,t);for(let t=0;t<this.accList.length;++t)this.convertToGlyph(this.accList[t],this.accList[t+1],e)}this.calculateDimensions(),this.formatted=!0}draw(){let e=this.checkStave().checkContext();this.formatted||this.format(),this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`keysignature`+(t?` `+t:``),this.getAttribute(`id`));for(let t=0;t<this.children.length;t++)this.children[t].renderText(e,this.x,0);this.drawPointerRect(),e.closeGroup()}},Et=class e extends V{static get CATEGORY(){return f.Repetition}static{this.type={NONE:1,CODA_LEFT:2,CODA_RIGHT:3,SEGNO_LEFT:4,SEGNO_RIGHT:5,DC:6,DC_AL_CODA:7,DC_AL_FINE:8,DS:9,DS_AL_CODA:10,DS_AL_FINE:11,FINE:12,TO_CODA:13}}constructor(e,t,n){super(),this.symbolType=e,this.x=t,this.xShift=0,this.yShift=n}setShiftX(e){return this.xShift=e,this}setShiftY(e){return this.yShift=e,this}draw(){let t=this.checkStave(),n=t.getModifierXShift(this.getPosition());switch(this.setRendered(),this.symbolType){case e.type.CODA_RIGHT:this.drawCodaFixed(t,n+t.getWidth());break;case e.type.CODA_LEFT:this.drawSymbolText(t,n,`Coda`,!0);break;case e.type.SEGNO_LEFT:this.drawSegnoFixed(t,n);break;case e.type.SEGNO_RIGHT:this.drawSegnoFixed(t,n+t.getWidth());break;case e.type.DC:this.drawSymbolText(t,n,`D.C.`,!1);break;case e.type.DC_AL_CODA:this.drawSymbolText(t,n,`D.C. al`,!0);break;case e.type.DC_AL_FINE:this.drawSymbolText(t,n,`D.C. al Fine`,!1);break;case e.type.DS:this.drawSymbolText(t,n,`D.S.`,!1);break;case e.type.DS_AL_CODA:this.drawSymbolText(t,n,`D.S. al`,!0);break;case e.type.DS_AL_FINE:this.drawSymbolText(t,n,`D.S. al Fine`,!1);break;case e.type.FINE:this.drawSymbolText(t,n,`Fine`,!1);break;case e.type.TO_CODA:this.drawSymbolText(t,n,`To`,!0)}}drawCodaFixed(e,t){let n=e.getYForTopText(e.getNumLines());return this.text=P.coda,this.renderText(e.checkContext(),t,n+T.get(`Repetition.coda.offsetY`)),this}drawSegnoFixed(e,t){let n=e.getYForTopText(e.getNumLines());return this.text=P.segno,this.renderText(e.checkContext(),t,n+T.get(`Repetition.segno.offsetY`)),this}drawSymbolText(t,n,r,i){let a=t.checkContext(),o=0;switch(this.text=r,i&&(this.text+=` `),this.setFont(T.getFontInfo(`Repetition.text`)),this.symbolType){case e.type.CODA_LEFT:o=t.getVerticalBarWidth();break;case e.type.DC:case e.type.DC_AL_FINE:case e.type.DS:case e.type.DS_AL_FINE:case e.type.FINE:default:o=n-(t.getNoteStartX()-this.x)+t.getWidth()-this.width-T.get(`Repetition.text.offsetX`)}let s=t.getYForTopText(t.getNumLines())+T.get(`Repetition.text.offsetY`);return this.renderText(a,o,s),this}},Dt=class extends V{static get CATEGORY(){return f.StaveSection}constructor(e,t=0,n=0,r=!0){super(),this.setText(e),this.x=t,this.yShift=n,this.drawRect=r,this.padding=T.get(`StaveSection.padding`)}setDrawRect(e){return this.drawRect=e,this}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered(),this.x=e.getX()+e.getModifierXShift(this.getPosition());let n=-1*this.textMetrics.actualBoundingBoxDescent,r=this.width+2*this.padding,i=this.height+2*this.padding,a=e.getYForTopText(1.5)+this.yShift,o=this.x+this.xShift;this.drawRect&&(t.beginPath(),t.rect(o,a-i+n,r,i),t.stroke()),this.renderText(t,this.xShift+this.padding,a-this.padding)}},Ot=class extends V{static get CATEGORY(){return f.StaveTempo}constructor(e,t,n){super(),this.durationToCode={"1/4":P.metNoteDoubleWholeSquare,long:P.metNoteDoubleWholeSquare,"1/2":P.metNoteDoubleWhole,breve:P.metNoteDoubleWhole,1:P.metNoteWhole,whole:P.metNoteWhole,w:P.metNoteWhole,2:P.metNoteHalfUp,half:P.metNoteHalfUp,h:P.metNoteHalfUp,4:P.metNoteQuarterUp,quarter:P.metNoteQuarterUp,q:P.metNoteQuarterUp,8:P.metNote8thUp,eighth:P.metNote8thUp,16:P.metNote16thUp,"16th":P.metNote16thUp,32:P.metNote32ndUp,"32nd":P.metNote32ndUp,64:P.metNote64thUp,"64th":P.metNote64thUp,128:P.metNote128thUp,"128th":P.metNote128thUp,256:P.metNote256thUp,"256th":P.metNote256thUp,512:P.metNote512thUp,"512th":P.metNote512thUp,1024:P.metNote1024thUp,"1024th":P.metNote1024thUp},this.tempo=e,this.position=B.ABOVE,this.x=t,this.setXShift(10),this.setYShift(n)}setTempo(e){return this.tempo=e,this}draw(){let e=this.checkStave(),t=e.getModifierXShift(this.getPosition()),n=e.checkContext();this.setRendered();let{name:r,duration:i,dots:a,bpm:o,duration2:s,dots2:c,parenthesis:l}=this.tempo,u=this.x+t,d=e.getYForTopText(1),f=new A(`StaveTempo.glyph`),p=new A(`StaveTempo`);if(r&&(this.text=r,this.fontInfo=T.getFontInfo(`StaveTempo.name`),this.renderText(n,t,d),u+=this.getWidth()+3),(r&&i||l)&&(p.setText(`(`),p.renderText(n,u+this.xShift,d+this.yShift),u+=p.getWidth()+3),i){if(f.setText(this.durationToCode[i]),f.renderText(n,u+this.xShift,d+this.yShift),u+=f.getWidth()+3,a){f.setText(P.metAugmentationDot);for(let e=0;e<a;e++)f.renderText(n,u+this.xShift,d+2+this.yShift),u+=f.getWidth()+3}if(p.setText(`=`),p.renderText(n,u+this.xShift,d+this.yShift),u+=p.getWidth()+3,s){if(f.setText(this.durationToCode[s]),f.renderText(n,u+this.xShift,d+this.yShift),u+=f.getWidth()+3,c){f.setText(P.metAugmentationDot);for(let e=0;e<c;e++)f.renderText(n,u+this.xShift,d+2+this.yShift),u+=f.getWidth()+3}}else o&&(p.setText(``+o),p.renderText(n,u+this.xShift,d+this.yShift),u+=p.getWidth()+3);(r||l)&&(p.setText(`)`),p.renderText(n,u+this.xShift,d+this.yShift))}}},kt=function(e){return e[e.LEFT=1]=`LEFT`,e[e.CENTER=2]=`CENTER`,e[e.RIGHT=3]=`RIGHT`,e}({}),At=class e extends z{static get CATEGORY(){return f.TextNote}static{this.Justification=kt}static get GLYPHS(){return{segno:P.segno,tr:P.ornamentTrill,mordent:P.ornamentMordent,mordentUpper:P.ornamentShortTrill,mordentLower:P.ornamentMordent,f:P.dynamicForte,p:P.dynamicPiano,m:P.dynamicMezzo,s:P.dynamicSforzando,z:P.dynamicZ,coda:P.coda,pedalOpen:P.keyboardPedalPed,pedalClose:P.keyboardPedalUp,caesuraStraight:P.caesura,caesuraCurved:P.caesuraCurved,breath:P.breathMarkComma,tick:P.breathMarkTick,turn:P.ornamentTurn,turnInverted:P.ornamentTurnSlash}}constructor(t){super(t),this.text=t.text??``,t.glyph&&(this.text+=e.GLYPHS[t.glyph]||t.glyph),t.font?this.setFont(t.font):t.glyph===void 0&&this.setFont(T.getFontInfo(`TextNote.text.fontSize`));let n=k.convertSizeToPointValue(this.fontInfo.size)*.769231;t.superscript&&(this.superscript=new A(`TexNote.subSuper`),this.superscript.setText(t.superscript),this.superscript.setFontSize(n)),t.subscript&&(this.subscript=new A(`TexNote.subSuper`),this.subscript.setText(t.subscript),this.subscript.setFontSize(n)),this.line=t.line??0,this.smooth=t.smooth||!1,this.ignoreTicks=t.ignoreTicks||!1,this.justification=1}setJustification(e){return this.justification=e,this}setLine(e){return this.line=e,this}getLine(){return this.line}preFormat(){if(this.preFormatted)return;let e=this.checkTickContext(`Can't preformat without a TickContext.`);this.justification===2?this.leftDisplacedHeadPx=this.width/2:this.justification===3&&(this.leftDisplacedHeadPx=this.width),this.rightDisplacedHeadPx=e.getMetrics().glyphPx/2,this.preFormatted=!0}draw(){let e=this.checkContext(),t=this.checkStave(),n=this.checkTickContext(`Can't draw without a TickContext.`);this.setRendered();let r=this.getAbsoluteX()+n.getMetrics().glyphPx/2,i=this.getWidth();this.justification===2?r-=i/2:this.justification===3&&(r-=i);let a=t.getYForLine(this.line+-3);this.renderText(e,r,a);let o=this.getHeight();this.superscript&&this.superscript.renderText(e,r+this.width+2,a-o/2.2),this.subscript&&this.subscript.renderText(e,r+this.width+2,a+o/2.2-1)}},jt=class extends V{static get CATEGORY(){return f.StaveText}constructor(e,t,n={}){super(),this.setText(e),this.setXShift(n.shiftX??0),this.setYShift(n.shiftY??0),this.position=t,this.justification=n.justification??At.Justification.CENTER}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n,r;switch(this.position){case B.LEFT:case B.RIGHT:r=(e.getYForLine(0)+e.getBottomLineY())/2,n=this.position===B.LEFT?e.getX()-this.width-24:e.getX()+e.getWidth()+24;break;case B.ABOVE:case B.BELOW:n=e.getX(),this.justification===kt.CENTER?n+=e.getWidth()/2-this.width/2:this.justification===kt.RIGHT&&(n+=e.getWidth()-this.width),r=this.position===B.ABOVE?e.getYForTopText(2):e.getYForBottomText(2);break;default:throw new p(`InvalidPosition`,`Value Must be in Modifier.Position.`)}this.renderText(t,n,r+4)}},Mt=function(e){return e[e.NONE=1]=`NONE`,e[e.BEGIN=2]=`BEGIN`,e[e.MID=3]=`MID`,e[e.END=4]=`END`,e[e.BEGIN_END=5]=`BEGIN_END`,e}({}),Nt=class extends V{static get CATEGORY(){return f.Volta}static get type(){return Mt}constructor(e,t,n,r){super(),this.type=e,this.x=n,this.yShift=r,this.text=t}draw(){let e=this.checkStave(),t=e.getModifierXShift(this.getPosition()),n=e.checkContext();this.setRendered();let r=e.getWidth()-t,i=e.getYForTopText(e.getNumLines())+this.yShift,a=1.5*e.getSpacingBetweenLines();switch(this.type){case 2:n.fillRect(this.x+t,i,1,a);break;case 4:r-=5,n.fillRect(this.x+t+r,i,1,a);break;case 5:r-=3,n.fillRect(this.x+t,i,1,a),n.fillRect(this.x+t+r,i,1,a)}(this.type===2||this.type===5)&&this.renderText(n,t+5,i-this.yShift+15),n.fillRect(this.x+t,i,r,1)}},Pt=e=>{e.split(`/`).forEach(t=>{if(/^[0-9+\-()]+$/.test(t)===!1)throw new p(`BadTimeSignature`,`Invalid time spec: ${e}. Must contain valid signatures.`)})},Y=class e extends V{static get CATEGORY(){return f.TimeSignature}constructor(e=`4/4`,t=15,n=!0){super(),this.topRenderY=0,this.botRenderY=0,this.timeSpec=`4/4`,this.line=0,this.isNumeric=!0,this.topStartX=0,this.botStartX=0,this.lineShift=0,this.topText=new A,this.botText=new A,this.validateArgs=n;let r=t;this.topLine=1,this.bottomLine=3,this.setPosition(B.BEGIN),this.setTimeSig(e),this.setPadding(r)}static getTimeSigCode(e,t=!1){let n=P.null;switch(e){case`C`:n=P.timeSigCommon;break;case`C|`:n=P.timeSigCutCommon;break;case`+`:n=t?P.timeSigPlusSmall:P.timeSigPlus;break;case`-`:n=P.timeSigMinus;break;case`(`:n=t?P.timeSigParensLeftSmall:P.timeSigParensLeft;break;case`)`:n=t?P.timeSigParensRightSmall:P.timeSigParensRight;break;default:n=String.fromCodePoint(57472+Number(e[0]))}return n}makeTimeSignatureGlyph(t,n){let r=``,i=0,a=0;for(let i=0;i<t.length;++i){let a=e.getTimeSigCode(t[i],n.length>0);r+=a}this.topText.setText(r),i=this.topText.getWidth(),a=this.topText.getHeight();let o=0;r=``;for(let t=0;t<n.length;++t){let i=e.getTimeSigCode(n[t],!0);r+=i}this.botText.setText(r),o=this.botText.getWidth(),a=Math.max(a,this.botText.getHeight()),this.lineShift=a>30?.5:0,this.width=Math.max(i,o),this.topStartX=(this.width-i)/2,this.botStartX=(this.width-o)/2}setTimeSig(t){if(this.timeSpec=t,t===`C`||t===`C|`){let n=e.getTimeSigCode(t);this.line=2,this.text=n,this.isNumeric=!1}else{this.validateArgs&&Pt(t);let e=t.split(`/`);this.line=0,this.isNumeric=!0,this.makeTimeSignatureGlyph(e[0]??``,e[1]??``)}return this}getTimeSpec(){return this.timeSpec}getLine(){return this.line}setLine(e){this.line=e}getIsNumeric(){return this.isNumeric}setIsNumeric(e){this.isNumeric=e}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`timesignature`+(n?` `+n:``),this.getAttribute(`id`)),this.drawAt(t,e,this.x),this.drawPointerRect(),t.closeGroup()}drawAt(e,t,n){if(this.setRendered(),this.isNumeric){let r=n+this.topStartX;this.topRenderY=this.botText.getText().length>0?t.getYForLine(this.topLine-this.lineShift):(t.getYForLine(this.topLine)+t.getYForLine(this.bottomLine))/2,this.topText.renderText(e,r,this.topRenderY),r=n+this.botStartX,this.botRenderY=t.getYForLine(this.bottomLine+this.lineShift),this.botText.renderText(e,r,this.botRenderY)}else this.renderText(e,n-this.x,t.getYForLine(this.line))}getBoundingBox(){if(this.isNumeric){let e=this.topText.getBoundingBox(),t=this.botText.getBoundingBox();return e.move(this.x+this.topStartX,this.topRenderY),t.move(this.x+this.botStartX,this.botRenderY),e.mergeWith(t)}{let e=this.checkStave(),t=super.getBoundingBox();return t.move(0,e.getYForLine(this.line)),t}}},Ft={[U.CATEGORY]:0,[q.CATEGORY]:1,[J.CATEGORY]:2,[Y.CATEGORY]:3},It={[Y.CATEGORY]:0,[J.CATEGORY]:1,[U.CATEGORY]:2,[q.CATEGORY]:3},X=class extends A{static get CATEGORY(){return f.Stave}static get defaultPadding(){return T.get(`Stave.padding`)+T.get(`Stave.endPaddingMax`)}static get rightPadding(){return T.get(`Stave.endPaddingMax`)}constructor(e,t,n,r){super(),this.x=e,this.y=t,this.width=n,this.formatted=!1,this.startX=e+5,this.endX=e+n,this.modifiers=[],this.measure=0,this.clef=`treble`,this.endClef=void 0,this.options={verticalBarWidth:10,numLines:5,leftBar:!0,rightBar:!0,spacingBetweenLinesPx:I.STAVE_LINE_DISTANCE,spaceAboveStaffLn:4,spaceBelowStaffLn:4,topTextPosition:1,bottomTextPosition:4,lineConfig:[],...r},this.bounds={x:this.x,y:this.y,w:this.width,h:0},this.defaultLedgerLineStyle={strokeStyle:`#444`,lineWidth:2},this.resetLines(),this.addModifier(new U(this.options.leftBar?H.SINGLE:H.NONE)),this.addEndModifier(new U(this.options.rightBar?H.SINGLE:H.NONE))}setDefaultLedgerLineStyle(e){this.defaultLedgerLineStyle=e}getDefaultLedgerLineStyle(){return{...this.getStyle(),...this.defaultLedgerLineStyle}}space(e){return this.options.spacingBetweenLinesPx*e}resetLines(){this.options.lineConfig=[];for(let e=0;e<this.options.numLines;e++)this.options.lineConfig.push({visible:!0});this.height=(this.options.numLines+this.options.spaceAboveStaffLn)*this.options.spacingBetweenLinesPx,this.options.bottomTextPosition=this.options.numLines}setNoteStartX(e){return this.formatted||this.format(),this.startX=e,this}getNoteStartX(){return this.formatted||this.format(),this.startX}getNoteEndX(){return this.formatted||this.format(),this.endX}getTieStartX(){return this.startX}getTieEndX(){return this.endX}getNumLines(){return this.options.numLines}setNumLines(e){return this.options.numLines=e,this.resetLines(),this}getTopLineTopY(){return this.getYForLine(0)}getBottomLineBottomY(){return this.getYForLine(this.getNumLines()-1)+(this.getStyle().lineWidth??1)}setX(e){let t=e-this.x;this.formatted=!1,this.x=e,this.startX+=t,this.endX+=t;for(let e=0;e<this.modifiers.length;e++){let n=this.modifiers[e];n.setX(n.getX()+t)}return this}setWidth(e){return this.formatted=!1,this.width=e,this.endX=this.x+e,this}setMeasure(e){return this.measure=e,this}getMeasure(){return this.measure}getModifierXShift(e=0){if(typeof e!=`number`)throw new p(`InvalidIndex`,`Must be of number type`);if(this.formatted||this.format(),this.getModifiers(B.BEGIN).length===1||this.modifiers[e].getPosition()===B.RIGHT)return 0;let t=this.startX-this.x,n=this.modifiers[0];return n.getType()===H.REPEAT_BEGIN&&t>n.getWidth()&&(t-=n.getWidth()),t}setRepetitionType(e,t=0){return this.modifiers.push(new Et(e,this.x,t)),this}setVoltaType(e,t,n){return this.modifiers.push(new Nt(e,t,this.x,n)),this}setSection(e,t,n=0,r,i=!0){let a=new Dt(e).setYShift(t).setXShift(n).setDrawRect(i);return r&&a.setFontSize(r),this.addModifier(a),this}setTempo(e,t){return this.modifiers.push(new Ot(e,this.x,t)),this}setStaveText(e,t,n={}){return this.modifiers.push(new jt(e,t,n)),this}getSpacingBetweenLines(){return this.options.spacingBetweenLinesPx}getBoundingBox(){return new D(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){let e=this.options,t=e.spacingBetweenLinesPx;return this.getYForLine(e.numLines)+e.spaceBelowStaffLn*t}getBottomLineY(){return this.getYForLine(this.options.numLines)}getYForLine(e){let t=this.options,n=t.spacingBetweenLinesPx,r=t.spaceAboveStaffLn;return this.y+e*n+r*n}getLineForY(e){let t=this.options,n=t.spacingBetweenLinesPx,r=t.spaceAboveStaffLn;return(e-this.y)/n-r}getYForTopText(e=0){return this.getYForLine(-e-this.options.topTextPosition)}getYForBottomText(e=0){return this.getYForLine(this.options.bottomTextPosition+e)}getYForNote(e){let t=this.options,n=t.spacingBetweenLinesPx,r=t.spaceAboveStaffLn;return this.y+r*n+5*n-e*n}getYForGlyphs(){return this.getYForLine(3)}addModifier(e,t){return t!==void 0&&e.setPosition(t),e.setStave(this),this.formatted=!1,this.modifiers.push(e),this}addEndModifier(e){return this.addModifier(e,B.END),this}setBegBarType(e,t=Fe.NONE){let{SINGLE:n,REPEAT_BEGIN:r,NONE:i}=H;return(e===n||e===r||e===i)&&(this.modifiers[0].setType(e).setRepeatBracket(t),this.formatted=!1),this}setEndBarType(e,t=Fe.NONE){return e!==H.REPEAT_BEGIN&&(this.modifiers[1].setType(e).setRepeatBracket(t),this.formatted=!1),this}setClef(e,t,n,r){r===void 0&&(r=B.BEGIN),r===B.END?this.endClef=e:this.clef=e;let i=this.getModifiers(r,q.CATEGORY);return i.length===0?this.addClef(e,t,n,r):i[0].setType(e,t,n),this}getClef(){return this.clef}setEndClef(e,t,n){return this.setClef(e,t,n,B.END),this}getEndClef(){return this.endClef}setKeySignature(e,t,n){n===void 0&&(n=B.BEGIN);let r=this.getModifiers(n,J.CATEGORY);return r.length===0?this.addKeySignature(e,t,n):r[0].setKeySig(e,t),this}setEndKeySignature(e,t){return this.setKeySignature(e,t,B.END),this}setTimeSignature(e,t,n){n===void 0&&(n=B.BEGIN);let r=this.getModifiers(n,Y.CATEGORY);return r.length===0?this.addTimeSignature(e,t,n):r[0].setTimeSig(e),this}setEndTimeSignature(e,t){return this.setTimeSignature(e,t,B.END),this}addKeySignature(e,t,n){return n===void 0&&(n=B.BEGIN),this.addModifier(new J(e,t).setPosition(n),n),this}addClef(e,t,n,r){return r===void 0||r===B.BEGIN?this.clef=e:r===B.END&&(this.endClef=e),this.addModifier(new q(e,t,n),r),this}addEndClef(e,t,n){return this.addClef(e,t,n,B.END),this}addTimeSignature(e,t,n){return this.addModifier(new Y(e,t),n),this}addEndTimeSignature(e,t){return this.addTimeSignature(e,t,B.END),this}addTrebleGlyph(){return this.addClef(`treble`),this}getModifiers(e,t){let n=e===void 0,r=t===void 0;return n&&r?this.modifiers:n?this.modifiers.filter(e=>t===e.getCategory()):r?this.modifiers.filter(t=>e===t.getPosition()):this.modifiers.filter(n=>e===n.getPosition()&&t===n.getCategory())}sortByCategory(e,t){for(let n=e.length-1;n>=0;n--)for(let r=0;r<n;r++)if(t[e[r].getCategory()]>t[e[r+1].getCategory()]){let t=e[r];e[r]=e[r+1],e[r+1]=t}}format(){let e=this.modifiers[0],t=this.modifiers[1],n=this.getModifiers(B.BEGIN),i=this.getModifiers(B.END);this.sortByCategory(n,Ft),this.sortByCategory(i,It),n.length>1&&e.getType()===H.REPEAT_BEGIN&&(n.push(n.splice(0,1)[0]),n.splice(0,0,new U(H.SINGLE))),i.indexOf(t)>0&&i.splice(0,0,new U(H.NONE));let a,o,s,c=0,l=this.x;for(let e=0;e<n.length;e++)s=n[e],o=s.getPadding(e+c),a=s.getWidth(),l+=o,s.setX(l),l+=a,o+a===0&&c--;this.startX=l,l=this.x+this.width;let u={left:0,right:0,paddingRight:0,paddingLeft:0},d=0;for(let e=0;e<i.length;e++){s=i[e],d=r(s)?e:d,u.right=0,u.left=0,u.paddingRight=0,u.paddingLeft=0;let t=s.getLayoutMetrics();t?(e!==0&&(u.right=t.xMax??0,u.paddingRight=t.paddingRight??0),u.left=-(t.xMin??0),u.paddingLeft=t.paddingLeft??0,e===i.length-1&&(u.paddingLeft=0)):(u.paddingRight=s.getPadding(e-d),e!==0&&(u.right=s.getWidth()),e===0&&(u.left=s.getWidth())),l-=u.paddingRight,l-=u.right,s.setX(l),l-=u.left,l-=u.paddingLeft}this.endX=i.length===1?this.x+this.width:l,this.formatted=!0}draw(){let e=this.checkContext();this.setRendered();let t=this.getAttribute(`class`);e.openGroup(`stave`+(t?` `+t:``),this.getAttribute(`id`)),this.formatted||this.format();let n=this.options.numLines,r=this.width,i=this.x,a,o=(this.getStyle().lineWidth??1)%2==0?0:.5;for(let t=0;t<n;t++)a=this.getYForLine(t),this.options.lineConfig[t].visible&&(e.beginPath(),e.moveTo(i,a+o),e.lineTo(i+r,a+o),e.stroke());this.drawPointerRect(),e.closeGroup();for(let t=0;t<this.modifiers.length;t++){let n=this.modifiers[t];n.setContext(e),n.setStave(this),n.drawWithStyle()}if(this.measure>0){e.setFont(this.fontInfo);let t=e.measureText(``+this.measure).width;a=this.getYForTopText(0)+3,e.fillText(``+this.measure,this.x-t/2,a)}}getVerticalBarWidth(){return this.options.verticalBarWidth}getConfigForLines(){return this.options.lineConfig}setConfigForLine(e,t){if(e>=this.options.numLines||e<0)throw new p(`StaveConfigError`,`The line number must be within the range of the number of lines in the Stave.`);if(t.visible===void 0)throw new p(`StaveConfigError`,`The line configuration object is missing the 'visible' property.`);if(typeof t.visible!=`boolean`)throw new p(`StaveConfigError`,`The line configuration objects 'visible' property must be true or false.`);return this.options.lineConfig[e]=t,this}setConfigForLines(e){if(e.length!==this.options.numLines)throw new p(`StaveConfigError`,`The length of the lines configuration array must match the number of lines in the Stave`);for(let t in e)e[t].visible===void 0&&(e[t]=this.options.lineConfig[t]),this.options.lineConfig[t]={...this.options.lineConfig[t],...e[t]};return this.options.lineConfig=e,this}static formatBegModifiers(e){let t=t=>{let n=0;e.forEach(e=>{let r=e.getModifiers(B.BEGIN,t);r.length>0&&r[0].getX()>n&&(n=r[0].getX())});let r=0;e.forEach(e=>{r=0,e.getModifiers(B.BEGIN,t).forEach(e=>{n-e.getX()>r&&(r=n-e.getX())});let i=e.getModifiers(B.BEGIN),a=!1;i.forEach(e=>{e.getCategory()===t&&(a=!0),a&&r>0&&e.setX(e.getX()+r)}),e.setNoteStartX(e.getNoteStartX()+r)})};e.forEach(e=>{e.formatted||e.format()}),t(f.Clef),t(f.KeySignature),t(f.TimeSignature);let n=0;e.forEach(e=>{e.getNoteStartX()>n&&(n=e.getNoteStartX())}),e.forEach(e=>{e.setNoteStartX(n)}),n=0,e.forEach(e=>{e.getModifiers(B.BEGIN,f.Barline).forEach(e=>{e.getType()===H.REPEAT_BEGIN&&e.getX()>n&&(n=e.getX())})}),e.forEach(e=>{e.getModifiers(B.BEGIN,f.Barline).forEach(e=>{e.getType()===H.REPEAT_BEGIN&&e.setX(n)})})}};function Lt(e,t,n,r,i){if(t!==Z.type.BOLD_DOUBLE_LEFT&&t!==Z.type.BOLD_DOUBLE_RIGHT)throw new p(`InvalidConnector`,`A REPEAT_BEGIN or REPEAT_END type must be provided.`);let a=3,o=3.5;t===Z.type.BOLD_DOUBLE_RIGHT&&(a=-5,o=3),e.fillRect(n+a,r,1,i-r),e.fillRect(n-2,r,o,i-r)}var Z=class e extends A{static get CATEGORY(){return f.StaveConnector}static{this.type={SINGLE_RIGHT:0,SINGLE_LEFT:1,SINGLE:1,DOUBLE:2,BRACE:3,BRACKET:4,BOLD_DOUBLE_LEFT:5,BOLD_DOUBLE_RIGHT:6,THIN_DOUBLE:7,NONE:8}}static{this.typeString={singleRight:e.type.SINGLE_RIGHT,singleLeft:e.type.SINGLE_LEFT,single:e.type.SINGLE,double:e.type.DOUBLE,brace:e.type.BRACE,bracket:e.type.BRACKET,boldDoubleLeft:e.type.BOLD_DOUBLE_LEFT,boldDoubleRight:e.type.BOLD_DOUBLE_RIGHT,thinDouble:e.type.THIN_DOUBLE,none:e.type.NONE}}constructor(t,n){super(),this.thickness=I.STAVE_LINE_THICKNESS,this.topStave=t,this.bottomStave=n,this.type=e.type.DOUBLE,this.xShift=0,this.texts=[]}setType(t){let n=typeof t==`string`?e.typeString[t]:t;return Object.values(e.type).includes(n)&&(this.type=n),this}getType(){return this.type}setText(e,t={}){let n=new A(`StaveConnector.text`);return n.setText(e),n.setXShift(t.shiftX??0),n.setYShift(t.shiftY??0),this.texts.push(n),this}draw(){let t=this.checkContext();this.setRendered();let n=this.topStave.getYForLine(0),r=this.bottomStave.getYForLine(this.bottomStave.getNumLines()-1)+this.thickness,i=3,a=this.topStave.getX();(this.type===e.type.SINGLE_RIGHT||this.type===e.type.BOLD_DOUBLE_RIGHT||this.type===e.type.THIN_DOUBLE)&&(a=this.topStave.getX()+this.topStave.getWidth());let o=r-n,s=new A;switch(this.type){case e.type.SINGLE:i=1;break;case e.type.SINGLE_LEFT:i=1;break;case e.type.SINGLE_RIGHT:i=1;break;case e.type.DOUBLE:a-=5,n-=this.thickness,o+=.5;break;case e.type.BRACE:{i=12;let e=this.topStave.getX()-2+this.xShift,a=n,s=e,c=r,l=e-i,u=a+o/2,d=l-.9*i,f=a+.2*o,p=e+1.1*i,m=u-.135*o,h=p,g=u+.135*o,_=d,v=c-.2*o,y=l-i,b=v,x=e+.4*i,S=u+.135*o,C=x,w=u-.135*o,T=y,E=f;t.beginPath(),t.moveTo(e,a),t.bezierCurveTo(d,f,p,m,l,u),t.bezierCurveTo(h,g,_,v,s,c),t.bezierCurveTo(y,b,x,S,l,u),t.bezierCurveTo(C,w,T,E,e,a),t.fill(),t.stroke();break}case e.type.BRACKET:n-=6,r+=6,o=r-n,s.setText(P.bracketTop),s.renderText(t,a-5,n),s.setText(P.bracketBottom),s.renderText(t,a-5,r),a-=5;break;case e.type.BOLD_DOUBLE_LEFT:Lt(t,this.type,a+this.xShift,n,r-this.thickness);break;case e.type.BOLD_DOUBLE_RIGHT:Lt(t,this.type,a,n,r-this.thickness);break;case e.type.THIN_DOUBLE:i=1,o-=this.thickness;break;case e.type.NONE:break;default:throw new p(`InvalidType`,`The provided StaveConnector.type (${this.type}) is invalid.`)}this.type!==e.type.BRACE&&this.type!==e.type.BOLD_DOUBLE_LEFT&&this.type!==e.type.BOLD_DOUBLE_RIGHT&&this.type!==e.type.NONE&&t.fillRect(a,n,i,o),this.type===e.type.THIN_DOUBLE&&t.fillRect(a-3,n,i,o);for(let e=0;e<this.texts.length;e++){let n=this.texts[e],r=this.topStave.getX()-n.getWidth()-24,i=(this.topStave.getYForLine(0)+this.bottomStave.getBottomLineY())/2;n.renderText(t,r,i+4)}}},Rt=class{static getNextContext(e){let t=e.tContexts,n=t.indexOf(e);if(n+1<t.length)return t[n+1]}constructor(e){this.preFormatted=!1,this.postFormatted=!1,this.tickID=e?.tickID??0,this.currentTick=new C(0,1),this.maxTicks=new C(0,1),this.maxTickable=void 0,this.minTicks=void 0,this.minTickable=void 0,this.padding=1,this.x=0,this.xBase=0,this.xOffset=0,this.tickables=[],this.tickablesByVoice={},this.notePx=0,this.glyphPx=0,this.leftDisplacedHeadPx=0,this.rightDisplacedHeadPx=0,this.modLeftPx=0,this.modRightPx=0,this.totalLeftPx=0,this.totalRightPx=0,this.tContexts=[],this.width=0,this.formatterMetrics={freedom:{left:0,right:0}}}getTickID(){return this.tickID}getX(){return this.x}setX(e){return this.x=e,this.xBase=e,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(e){this.xBase=e,this.x=e+this.xOffset}getXOffset(){return this.xOffset}setXOffset(e){this.xOffset=e,this.x=this.xBase+e}getWidth(){return this.width+this.padding*2}setPadding(e){return this.padding=e,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getMaxTickable(){return this.maxTickable}getMinTickable(){return this.minTickable}getTickables(){return this.tickables}getTickableForVoice(e){return this.tickablesByVoice[e]}getTickablesByVoice(){return this.tickablesByVoice}getCenterAlignedTickables(){return this.tickables.filter(e=>e.isCenterAligned())}getMetrics(){let{width:e,glyphPx:t,notePx:n,leftDisplacedHeadPx:r,rightDisplacedHeadPx:i,modLeftPx:a,modRightPx:o,totalLeftPx:s,totalRightPx:c}=this;return{width:e,glyphPx:t,notePx:n,leftDisplacedHeadPx:r,rightDisplacedHeadPx:i,modLeftPx:a,modRightPx:o,totalLeftPx:s,totalRightPx:c}}getCurrentTick(){return this.currentTick}setCurrentTick(e){this.currentTick=e,this.preFormatted=!1}addTickable(e,t){if(!e)throw new p(`BadArgument`,`Invalid tickable added.`);if(!e.shouldIgnoreTicks()){let t=e.getTicks();t.greaterThan(this.maxTicks)&&(this.maxTicks=t.clone(),this.maxTickable=e),(this.minTicks===void 0||t.lessThan(this.minTicks))&&(this.minTicks=t.clone(),this.minTickable=e)}return e.setTickContext(this),this.tickables.push(e),this.tickablesByVoice[t??0]=e,this.preFormatted=!1,this}preFormat(){if(this.preFormatted)return this;for(let e=0;e<this.tickables.length;++e){let t=this.tickables[e];t.preFormat();let n=t.getMetrics();this.leftDisplacedHeadPx=Math.max(this.leftDisplacedHeadPx,n.leftDisplacedHeadPx),this.rightDisplacedHeadPx=Math.max(this.rightDisplacedHeadPx,n.rightDisplacedHeadPx),this.notePx=Math.max(this.notePx,n.notePx),this.glyphPx=Math.max(this.glyphPx,n.glyphWidth??0),this.modLeftPx=Math.max(this.modLeftPx,n.modLeftPx),this.modRightPx=Math.max(this.modRightPx,n.modRightPx),this.totalLeftPx=Math.max(this.totalLeftPx,n.modLeftPx+n.leftDisplacedHeadPx),this.totalRightPx=Math.max(this.totalRightPx,n.modRightPx+n.rightDisplacedHeadPx),this.width=this.notePx+this.totalLeftPx+this.totalRightPx}return this}postFormat(){return this.postFormatted||=!0,this}getFormatterMetrics(){return this.formatterMetrics}move(e,t,n){this.setX(this.getX()+e),this.getFormatterMetrics().freedom.left+=e,this.getFormatterMetrics().freedom.right-=e,t&&(t.getFormatterMetrics().freedom.right+=e),n&&(n.getFormatterMetrics().freedom.left-=e)}getDeviationCost(){return S(this.tickables.map(e=>e.getFormatterMetrics().space.deviation))}getAverageDeviationCost(){return this.tickables.length?this.getDeviationCost()/this.tickables.length:0}};function zt(...e){Q.DEBUG&&g(`VexFlow.Formatter`,e)}function Bt(e,t,n,r){let i=t;for(let t=n+1;t<e.length;t++){let n=e[t];if(s(n)&&!n.isRest()&&!n.shouldIgnoreTicks()){i=n.getLineForRest();break}}return r&&t!==i&&(i=y(Math.max(t,i),Math.min(t,i))),i}var Q=class e{static{this.DEBUG=!1}static SimpleFormat(e,t=0,{paddingBetween:n=10}={}){e.reduce((e,t)=>{t.addToModifierContext(new wt);let r=new Rt().addTickable(t).preFormat(),i=r.getMetrics();return r.setX(e+i.totalLeftPx),e+r.getWidth()+i.totalRightPx+n},t)}static plotDebugging(e,t,n,r,i,a){a={stavePadding:T.get(`Stave.padding`),...a};let o=n+a.stavePadding,s=t.contextGaps;function c(t,n,a){e.beginPath(),e.setStrokeStyle(a),e.setFillStyle(a),e.setLineWidth(1),e.fillRect(t,r,Math.max(n-t,0),i-r)}e.save(),e.setFont(T.get(`fontFamily`),8),s.gaps.forEach(t=>{c(o+t.x1,o+t.x2,`rgba(100,200,100,0.4)`),e.setFillStyle(`green`),e.fillText(Math.round(t.x2-t.x1).toString(),o+t.x1,i+12)}),e.setFillStyle(`red`),e.fillText(`Loss: ${(t.totalCost??0).toFixed(2)} Shift: ${(t.totalShift??0).toFixed(2)} Gap: ${s.total.toFixed(2)}`,o-20,i+27),e.restore()}static FormatAndDraw(t,n,r,i){let a={autoBeam:!1,alignRests:!1};typeof i==`object`?a={...a,...i}:typeof i==`boolean`&&(a.autoBeam=i);let o=new G(I.TIME4_4).setMode(G.Mode.SOFT).addTickables(r),s=a.autoBeam?Gt.applyAndGetBeams(o):[];return new e().joinVoices([o]).formatToStave([o],n,{alignRests:a.alignRests,stave:n}),o.setContext(t).setStave(n).drawWithStyle(),s.forEach(e=>e.setContext(t).drawWithStyle()),o.getBoundingBox()}static FormatAndDrawTab(t,n,r,i,a,o,s){let c={autoBeam:o,alignRests:!1};typeof s==`object`?c={...c,...s}:typeof s==`boolean`&&(c.autoBeam=s);let l=new G(I.TIME4_4).setMode(G.Mode.SOFT).addTickables(a),u=new G(I.TIME4_4).setMode(G.Mode.SOFT).addTickables(i),d=c.autoBeam?Gt.applyAndGetBeams(l):[];new e().joinVoices([l]).joinVoices([u]).formatToStave([l,u],r,{alignRests:c.alignRests}),l.draw(t,r),u.draw(t,n),d.forEach(e=>e.setContext(t).drawWithStyle()),new Z(r,n).setContext(t).drawWithStyle()}static AlignRestsToNotes(e,t,n=!1){e.forEach((r,i)=>{if(l(r)&&r.isRest()){if(r.getTuplet()&&!n||r.getLineForRest()!==3)return;if(t||r.getBeam()){let t=r.getKeyProps()[0];if(i===0)t.line=Bt(e,t.line,i,!1);else if(i>0&&i<e.length){let n=e[i-1];l(n)&&(t.line=n.isRest()?n.getKeyProps()[0].line:Bt(e,n.getLineForRest(),i,!0))}r.setKeyLine(0,t.line)}}})}constructor(e){this.formatterOptions={globalSoftmax:!1,softmaxFactor:I.SOFTMAX_FACTOR,maxIterations:5,...e},this.justifyWidth=0,this.totalCost=0,this.totalShift=0,this.durationStats={},this.minTotalWidth=0,this.hasMinTotalWidth=!1,this.tickContexts={map:{},array:[],list:[],resolutionMultiplier:0},this.modifierContexts=[],this.contextGaps={total:0,gaps:[]},this.voices=[],this.lossHistory=[]}alignRests(t,n){if(!t||!t.length)throw new p(`BadArgument`,`No voices to format rests`);t.forEach(t=>e.AlignRestsToNotes(t.getTickables(),n))}preCalculateMinTotalWidth(e){let t=T.get(`Stave.unalignedNotePadding`),n=0,r=0,i=0,a=[],o=[];if(this.hasMinTotalWidth)return this.minTotalWidth;if(!e)throw new p(`BadArgument`,`'voices' required to run preCalculateMinTotalWidth`);this.createTickContexts(e);let{list:s,map:c}=this.tickContexts;this.minTotalWidth=0,s.forEach(t=>{let s=c[t];s.preFormat(),s.getTickables().length<e.length&&(n+=1),s.getTickables().forEach(e=>{r+=e.getMetrics().width,i+=e.getTicks().value(),a.push(e.getMetrics().width),o.push(e.getTicks().value())});let l=s.getWidth();this.minTotalWidth+=l}),this.hasMinTotalWidth=!0;let l=r>0?r/a.length:1/a.length,u=(S(a.map(e=>(e-l)**2))/a.length)**.5/l,d=i/o.length,f=(S(o.map(e=>(e-d)**2))/o.length)**.5/d,m=Math.max(f,u)*s.length*t,h=t*n;return this.minTotalWidth+Math.max(h,m)}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new p(`NoMinTotalWidth`,`Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'`);return this.minTotalWidth}static getResolutionMultiplier(e){if(!e||!e.length)throw new p(`BadArgument`,`No voices to format`);let t=e[0].getTotalTicks();return e.reduce((e,n)=>{if(!n.getTotalTicks().equals(t))throw new p(`TickMismatch`,`Voices should have same total note duration in ticks.`);if(n.getMode()===G.Mode.STRICT&&!n.isComplete())throw new p(`IncompleteVoice`,`Voice does not have enough notes.`);return Math.max(e,C.LCM(e,n.getResolutionMultiplier()))},1)}createModifierContexts(t){if(t.length===0)return;let n=e.getResolutionMultiplier(t),r=new Map,i=[];t.forEach(e=>{let t=new C(0,n);e.getTickables().forEach(e=>{let n=t.numerator,a=r.get(e.getStave());if(a||=(r.set(e.getStave(),{}),r.get(e.getStave())),!(a&&a[n])){let e=new wt;i.push(e),a[n]=e}e.addToModifierContext(a[n]),t.add(e.getTicks())})}),this.modifierContexts.push({map:r,array:i,resolutionMultiplier:n})}createTickContexts(t){if(t.length===0)return{map:{},array:[],list:[],resolutionMultiplier:0};let n={},r=[],i=[],a=e.getResolutionMultiplier(t);t.forEach((e,t)=>{let o=new C(0,a);e.getTickables().forEach(e=>{let a=o.numerator;if(!n[a]){let e=new Rt({tickID:a});i.push(e),n[a]=e,r.push(a)}n[a].addTickable(e,t),o.add(e.getTicks())})});let o={map:n,array:i,list:r.sort((e,t)=>e-t),resolutionMultiplier:a};this.tickContexts=o;let s=this.tickContexts.array;return s.forEach(e=>{e.tContexts=s}),o}getTickContexts(){return this.tickContexts}preFormat(e=0,t,n,r){let i=this.tickContexts;if(!i)throw new p(`NoTickContexts`,`preFormat requires TickContexts`);let{list:a,map:o}=i;this.lossHistory=[],n&&r&&n.forEach(e=>e.setStave(r).preFormat());let s=0,c=0;this.minTotalWidth=0;let l=0;a.forEach(e=>{let t=o[e];t.preFormat();let n=t.getWidth();this.minTotalWidth+=n;let r=t.getMaxTicks().value();l+=r;let i=t.getMetrics();s=s+c+i.totalLeftPx,t.setX(s),c=n-i.totalLeftPx});let{globalSoftmax:u,softmaxFactor:d,maxIterations:f}=this.formatterOptions,m=S(a.map(e=>d**(o[e].getMaxTicks().value()/l)));if(this.minTotalWidth=s+c,this.hasMinTotalWidth=!0,e<=0)return this.evaluate();let g=o[a[0]],_=o[a[a.length-1]];function v(e){return a.map((t,n)=>{let r=o[t],i=r.getTickablesByVoice(),s;if(n>0){let t=o[a[n-1]];for(let c=n-1;c>=0;c--){let n=o[a[c]].getTickablesByVoice(),f=[];if(Object.keys(i).forEach(e=>{n[e]&&f.push(e)}),f.length>0){let a=0,o=1/0,c=0;return f.forEach(e=>{let t=n[e].getTicks().value();t>a&&(s=n[e],a=t);let r=i[e],c=r.getX()-(r.getMetrics().modLeftPx+r.getMetrics().leftDisplacedHeadPx),l=n[e].getMetrics(),u=n[e].getX()+l.notePx+l.modRightPx+l.rightDisplacedHeadPx;o=Math.min(o,c-u)}),o=Math.min(o,r.getX()-(t.getX()+e*.05)),u?c=d**(a/l)/m*e:s!==void 0&&(c=s.getVoice().softmax(a)*e),{expectedDistance:c,maxNegativeShiftPx:o,fromTickable:s}}}}return{expectedDistance:0,fromTickablePx:0,maxNegativeShiftPx:0}})}function y(e){let t=b/2,n=0;return a.forEach((r,i)=>{let a=o[r];if(i>0){let t=a.getX(),r=e[i],o=h(r.fromTickable).getX()+r.expectedDistance-(t+n),s=0;o>0?n+=o:o<0&&(s=Math.min(r.maxNegativeShiftPx,Math.abs(o)),n+=-s),a.setX(t+n)}a.getCenterAlignedTickables().forEach(e=>{e.setCenterXShift(t-a.getX())})}),_.getX()-g.getX()}let b=e-_.getMetrics().notePx-_.getMetrics().totalRightPx-g.getMetrics().totalLeftPx,x=T.get(`Stave.endPaddingMin`),C=T.get(`Stave.endPaddingMax`),w=T.get(`Stave.padding`),E=b,D=v(E),O=y(D);if(a.length===1)return 0;let ee=((e,t)=>{let n=e/2;if(t.length>1)for(let e=1;e<t.length;++e)n=Math.min(t[e].expectedDistance/2,n);return n})(E,D),te=e=>{let t=0,n=_&&_.getMaxTickable();if(n){let r=n.getVoice();if(r.getTicksUsed().value()>r.getTotalTicks().value())return C*2<ee?ee:C;let i=n.getWidth();t=r.softmax(_.getMaxTicks().value())*e-(i+w)}return C*2<t?t:C},k=te(E),ne=k-(C-x),re=b-ne,A=f;for(;O>re&&A>0||O+k<re&&A>1;)E-=O-re,k=te(E),ne=k-(C-x),O=y(v(E)),A--;return this.justifyWidth=e,this.evaluate()}evaluate(){let e=this.tickContexts,t=this.justifyWidth;this.contextGaps={total:0,gaps:[]},e.list.forEach((t,n)=>{if(n===0)return;let r=e.list[n-1],i=e.map[r],a=e.map[t],o=i.getMetrics(),s=a.getMetrics(),c=i.getX()+o.notePx+o.totalRightPx,l=a.getX()-s.totalLeftPx,u=l-c;this.contextGaps.total+=u,this.contextGaps.gaps.push({x1:c,x2:l}),a.getFormatterMetrics().freedom.left=u,i.getFormatterMetrics().freedom.right=u}),this.durationStats={};let n=this.durationStats;function r(e,t){let r=n[e];r===void 0?n[e]={mean:t,count:1,total:t}:(r.count+=1,r.total+=t,r.mean=r.total/r.count)}this.voices.forEach(e=>{e.getTickables().forEach((e,n,i)=>{let a=e.getTicks().clone().simplify().toString(),o=e.getMetrics(),s=e.getFormatterMetrics(),c=e.getX()+o.notePx+o.modRightPx+o.rightDisplacedHeadPx,l=0;if(n<i.length-1){let t=i[n+1],r=t.getMetrics();l=t.getX()-r.modLeftPx-r.leftDisplacedHeadPx-c,s.space.used=t.getX()-e.getX(),t.getFormatterMetrics().freedom.left=l}else l=t-c,s.space.used=t-e.getX();s.freedom.right=l,r(a,s.space.used)})});let i=0;return this.voices.forEach(e=>{e.getTickables().forEach(e=>{let t=e.getTicks().clone().simplify().toString(),r=e.getFormatterMetrics();r.space.mean=n[t].mean,r.duration=t,r.iterations+=1,r.space.deviation=r.space.used-r.space.mean,i+=r.space.deviation**2})}),this.totalCost=Math.sqrt(i),this.lossHistory.push(this.totalCost),this.totalCost}tune(e){let t=this.tickContexts;if(!t)return 0;let n=e?.alpha??.5,r=0;return this.totalShift=0,t.list.forEach((e,i,a)=>{let o=t.map[e],s=i>0?t.map[a[i-1]]:void 0,c=i<a.length-1?t.map[a[i+1]]:void 0;o.move(r,s,c);let l=-o.getDeviationCost();l>0?r=-Math.min(o.getFormatterMetrics().freedom.right,Math.abs(l)):l<0&&(r=c?Math.min(c.getFormatterMetrics().freedom.right,Math.abs(l)):0),r*=n,this.totalShift+=r}),this.evaluate()}postFormat(){return this.modifierContexts.forEach(e=>{e.array.forEach(e=>e.postFormat())}),this.tickContexts.list.forEach(e=>{this.tickContexts.map[e].postFormat()}),this}joinVoices(e){return this.createModifierContexts(e),this.hasMinTotalWidth=!1,this}format(e,t,n){let r={alignRests:!1,...n};this.voices=e;let i=this.formatterOptions.softmaxFactor;return i&&this.voices.forEach(e=>e.setSoftmaxFactor(i)),this.alignRests(e,r.alignRests),this.createTickContexts(e),this.preFormat(t,r.context,e,r.stave),r.stave&&this.postFormat(),this}formatToStave(e,t,n){let r={context:t.getContext(),...n},i=t.getNoteEndX()-t.getNoteStartX()-X.defaultPadding;return zt(`Formatting voices to width: `,i),this.format(e,i,r)}getTickContext(e){return this.tickContexts?.map[e]}},Vt=function(e){return e[e.BOTTOM=-1]=`BOTTOM`,e[e.TOP=1]=`TOP`,e}({}),Ht=class e extends A{static get CATEGORY(){return f.Tuplet}static get LOCATION_TOP(){return 1}static get LOCATION_BOTTOM(){return-1}static get NESTING_OFFSET(){return 15}constructor(t,n={}){if(super(),!t||!t.length)throw new p(`BadArguments`,`No notes provided for tuplet.`);this.notes=t;let r=n.numNotes===void 0?t.length:n.numNotes,i=n.notesOccupied||2,a=n.bracketed===void 0?t.some(e=>!e.hasBeam()):n.bracketed,o=n.ratioed===void 0?Math.abs(i-r)>1:n.ratioed,s=n.location||e.LOCATION_TOP,c=n.yOffset||T.get(`Tuplet.yOffset`),l=n.textYOffset||T.get(`Tuplet.textYOffset`),u=n.suffix||``;this.options={bracketed:a,location:s,notesOccupied:i,numNotes:r,ratioed:o,yOffset:c,textYOffset:l,suffix:u},this.textElement=new A(`Tuplet`),this.suffixElement=new A(`Tuplet.suffix`),this.setTupletLocation(s||e.LOCATION_TOP),Q.AlignRestsToNotes(t,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let e=0;e<this.notes.length;e++){let t=this.notes[e];t.getTupletStack().includes(this)||t.addTuplet(this)}}detach(){for(let e=0;e<this.notes.length;e++)this.notes[e].removeTuplet(this)}setBracketed(e){return this.options.bracketed=e,this}setRatioed(e){return this.options.ratioed=e,this}setTupletLocation(t){return t!==e.LOCATION_TOP&&t!==e.LOCATION_BOTTOM&&(console.warn(`Invalid tuplet location [${t}]. Using Tuplet.LOCATION_TOP.`),t=e.LOCATION_TOP),this.options.location=t,this}getNotes(){return this.notes}getNoteCount(){return this.options.numNotes}getNotesOccupied(){return this.options.notesOccupied}setNotesOccupied(e){this.detach(),this.options.notesOccupied=e,this.resolveGlyphs(),this.attach()}resolveGlyphs(){let e=``,t=``,n=this.options.numNotes;for(;n>=1;)e=String.fromCharCode(59520+n%10)+e,n=Math.floor(n/10);if(this.options.ratioed){for(n=this.options.notesOccupied;n>=1;)t=String.fromCharCode(59520+n%10)+t,n=Math.floor(n/10);t=P.tupletColon+t}this.textElement.setText(e+t),this.options.suffix&&this.suffixElement.setText(this.options.suffix)}getNestedTupletCount(){let{location:e}=this.options,t=0;for(let n of this.notes){let r=n.getTupletStack().filter(t=>t.options.location===e).indexOf(this);r>=0&&r>t&&(t=r)}return t}getYPosition(){let t=this.getNestedTupletCount()*e.NESTING_OFFSET*-this.options.location,n=this.options.yOffset??0,r=this.notes[0],i;if(this.options.location===e.LOCATION_TOP){i=r.checkStave().getYForLine(0)-1.5*I.STAVE_LINE_DISTANCE;for(let e=0;e<this.notes.length;++e){let t=this.notes[e],n=0,r=t.getModifierContext();r&&(n=Math.max(n,r.getState().topTextLine));let a=t.getYForTopText(n)-2*I.STAVE_LINE_DISTANCE;if(t.hasStem()||t.isRest()){let e=t.getStemDirection()===L.UP?t.getStemExtents().topY-I.STAVE_LINE_DISTANCE:t.getStemExtents().baseY-2*I.STAVE_LINE_DISTANCE;i=Math.min(e,i),n>0&&(i=Math.min(a,i))}}}else{let e=4;this.notes.forEach(t=>{let n=t.getModifierContext();n&&(e=Math.max(e,n.getState().textLine+1))}),i=r.checkStave().getYForLine(e)+2*I.STAVE_LINE_DISTANCE;for(let e=0;e<this.notes.length;++e)if(this.notes[e].hasStem()||this.notes[e].isRest()){let t=this.notes[e].getStemDirection()===L.UP?this.notes[e].getStemExtents().baseY+2*I.STAVE_LINE_DISTANCE:this.notes[e].getStemExtents().topY+I.STAVE_LINE_DISTANCE;t>i&&(i=t)}}return i+t+n}draw(){let{location:t,bracketed:n,textYOffset:r,suffix:i}=this.options,a=T.get(`Tuplet.bracket.padding`),o=T.get(`Tuplet.bracket.lineWidth`),s=T.get(`Tuplet.bracket.legLength`),c=T.get(`Tuplet.suffix.extraSpacing`),l=T.get(`Tuplet.suffix.suffixOffsetY`),u=this.checkContext(),d=0,f=0,p=this.notes[0],m=this.notes[this.notes.length-1],h=0;n?(d=p.getTieLeftX()-a,h=m.getTieRightX()-d+a,this.setWidth(h+o)):(d=p.getStemX(),h=m.getStemX()-d,this.setWidth(h)),this.setX(d),f=this.getYPosition(),this.setY(t===1?f:f-s+o),this.height=s;let g=this.textElement.getWidth(),_=g,v=0;i&&(v=this.suffixElement.getWidth(),_=g+c+v);let y=d+h/2-_/2,b=f+this.textElement.getHeight()/2+(t===e.LOCATION_TOP?-1:1)*r,x=this.getAttribute(`class`);if(u.openGroup(`tuplet`+(x?` `+x:``),this.getAttribute(`id`)),n){let n=h/2-_/2-a,r=t===e.LOCATION_BOTTOM;n>0&&(u.fillRect(d,f,n,o),u.fillRect(d+h/2+_/2+a,f,n,o),u.fillRect(d,f+ +!!r,o,t*s),u.fillRect(d+h,f+ +!!r,o,t*s))}let S=y;if(this.textElement.renderText(u,S,b),this.textElement.setX(S),this.textElement.setY(b),S+=g+c,i){let e=b+l;this.suffixElement.renderText(u,S,e),this.suffixElement.setX(S),this.suffixElement.setY(e),S+=v}this.drawPointerRect(),u.closeGroup(),this.setRendered()}getBoundingBox(){let{bracketed:e,suffix:t}=this.options,n=this.textElement.getBoundingBox(),r=this.suffixElement.getBoundingBox(),i=t?n.mergeWith(r):n;return e?new D(this.x,this.y,this.width,this.height).mergeWith(i):i}};function Ut(e){let t=0;return e.forEach(e=>{e.keyProps&&e.keyProps.forEach(e=>{t+=e.line-3})}),t>=0?L.DOWN:L.UP}function Wt(e,t){let n=e.getStemExtents().topY,r=e.getStemX(),i=t.getStemExtents().topY,a=t.getStemX();return(i-n)/(a-r)}var Gt=class e extends A{static get CATEGORY(){return f.Beam}getStemDirection(){return this._stemDirection}static getDefaultBeamGroups(e){(!e||e===`c`)&&(e=`4/4`);let t={"1/2":[`1/2`],"2/2":[`1/2`],"3/2":[`1/2`],"4/2":[`1/2`],"1/4":[`1/4`],"2/4":[`1/4`],"3/4":[`1/4`],"4/4":[`1/4`],"1/8":[`1/8`],"2/8":[`2/8`],"3/8":[`3/8`],"4/8":[`2/8`],"1/16":[`1/16`],"2/16":[`2/16`],"3/16":[`3/16`],"4/16":[`2/16`]}[e];if(t===void 0){let t=parseInt(e.split(`/`)[0],10),n=parseInt(e.split(`/`)[1],10);if(t%3==0)return[new C(3,n)];if(n>4)return[new C(2,n)];if(n<=4)return[new C(1,n)]}else return t.map(e=>new C().parse(e));return[new C(1,4)]}static applyAndGetBeams(t,n,r){return e.generateBeams(t.getTickables(),{groups:r,stemDirection:n})}static generateBeams(t,n={}){(!n.groups||!n.groups.length)&&(n.groups=[new C(2,8)]);let r=n.groups.map(e=>{if(!e.multiply)throw new p(`InvalidBeamGroups`,`The beam groups must be an array of VexFlow.Fractions`);return e.clone().multiply(I.RESOLUTION,1)}),i=t,a=0,o=[],s=[];function c(e){return e.reduce((e,t)=>t.getTicks().clone().add(e),new C(0,1))}function l(){r.length-1>a?a+=1:a=0}function u(){let e=[],t=new C(0,1);i.forEach(n=>{if(e=[],n.shouldIgnoreTicks()){o.push(s),s=e;return}s.push(n);let i=r[a].clone(),u=c(s).add(t),d=I.durationToNumber(n.getDuration())<8;if(d&&n.getTuplet()&&(i.numerator*=2),u.greaterThan(i)){if(!d){let t=s.pop();t&&e.push(t)}o.push(s);do t=u.subtract(r[a]),l();while(t.greaterThanEquals(r[a]));s=e}else u.equals(i)&&(o.push(s),t=new C(0,1),s=e,l())}),s.length>0&&o.push(s)}function d(){return o.filter(e=>{if(e.length>1){let t=!0;return e.forEach(e=>{e.getIntrinsicTicks()>=I.durationToTicks(`4`)&&(t=!1)}),t}return!1})}function f(){let e=[];o.forEach(t=>{let r=[];t.forEach((t,i,a)=>{let o=i===0||i===a.length-1,s=a[i-1],c=!n.beamRests&&t.isRest(),l=n.beamRests&&n.beamMiddleOnly&&t.isRest()&&o,u=!1;if(n.maintainStemDirections&&s&&!t.isRest()&&!s.isRest()){let e=s.getStemDirection();u=t.getStemDirection()!==e}let d=parseInt(t.getDuration(),10)<8;c||l||u||d?(r.length>0&&e.push(r),r=u?[t]:[]):r.push(t)}),r.length>0&&e.push(r)}),o=e}function m(){o.forEach(e=>{let t;if(n.maintainStemDirections){let n=h(e);t=n?n.getStemDirection():L.UP}else t=n.stemDirection?n.stemDirection:Ut(e);g(e,t)})}function h(e){for(let t=0;t<e.length;t++){let n=e[t];if(!n.isRest())return n}return!1}function g(e,t){e.forEach(e=>{e.setStemDirection(t)})}function _(){let e=[];return o.forEach(t=>{let n;t.forEach(t=>{let r=t.getTuplet();r&&n!==r&&(n=r,e.push(n))})}),e}u(),f(),m();let v=d(),y=_(),b=[];return v.forEach(t=>{let r=new e(t);n.showStemlets&&(r.renderOptions.showStemlets=!0),n.secondaryBreaks&&(r.renderOptions.secondaryBreakTicks=I.durationToTicks(n.secondaryBreaks)),n.flatBeams===!0&&(r.renderOptions.flatBeams=!0,r.renderOptions.flatBeamOffset=n.flatBeamOffset),b.push(r)}),y.forEach(e=>{let t=e.notes[0].stemDirection===L.DOWN?Vt.BOTTOM:Vt.TOP;e.setTupletLocation(t);let n=!1;for(let t=0;t<e.notes.length;t++)if(!e.notes[t].hasBeam()){n=!0;break}e.setBracketed(n)}),b}constructor(e,t=!1){if(super(),this.slope=0,this.yShift=0,this.forcedPartialDirections={},!e||e.length===0)throw new p(`BadArguments`,`No notes provided for beam.`);if(e.length===1)throw new p(`BadArguments`,`Too few notes for beam.`);if(this._ticks=e[0].getIntrinsicTicks(),this._ticks>=I.durationToTicks(`4`))throw new p(`BadArguments`,`Beams can only be applied to notes shorter than a quarter note.`);let n,r;this._stemDirection=e[0].getStemDirection();let i=this._stemDirection;for(t&&l(e[0])?i=Ut(e):t&&d(e[0])&&(i=e.reduce((e,t)=>e+t.getStemDirection(),0)>-1?L.UP:L.DOWN),n=0;n<e.length;++n)r=e[n],t&&(r.setStemDirection(i),this._stemDirection=i),r.setBeam(this);this.postFormatted=!1,this.notes=e,this._beamCount=this.getBeamCount(),this.breakOnIndexes=[],this.renderOptions={beamWidth:5,maxSlope:.25,minSlope:-.25,slopeIterations:20,slopeCost:100,showStemlets:!1,stemletExtension:7,partialBeamLength:10,flatBeams:!1,minFlatBeamOffset:15}}getNotes(){return this.notes}getBeamCount(){return this.notes.map(e=>e.getGlyphProps().beamCount).reduce((e,t)=>t>e?t:e)}breakSecondaryAt(e){return this.breakOnIndexes=e,this}setPartialBeamSideAt(e,t){return this.forcedPartialDirections[e]=t,this}unsetPartialBeamSideAt(e){return delete this.forcedPartialDirections[e],this}getSlopeY(e,t,n,r){return n+(e-t)*r}calculateSlope(){let{notes:e,renderOptions:{maxSlope:t,minSlope:n,slopeIterations:r,slopeCost:i}}=this,a=this._stemDirection,o=e[0],s=Wt(o,e[e.length-1]),c=(t-n)/r,l=Number.MAX_VALUE,u=0,d=0;for(let r=n;r<=t;r+=c){let t=0,n=0;for(let i=1;i<e.length;++i){let s=e[i];if(s.hasStem()||s.isRest()){let e=this.getSlopeY(s.getStemX(),o.getStemX(),o.getStemExtents().topY,r)+n,c=s.getStemExtents().topY;if(c*a<e*a){let r=Math.abs(c-e);n+=r*-a,t+=r*i}else t+=(c-e)*a}}let c=s/2,f=i*Math.abs(c-r)+Math.abs(t);f<l&&(l=f,u=r,d=n)}this.slope=u,this.yShift=d}calculateFlatSlope(){let{notes:e,renderOptions:{beamWidth:t,minFlatBeamOffset:n,flatBeamOffset:r}}=this,i=this._stemDirection,a=0,o=0,s=0,c=0;for(let t=0;t<e.length;t++){let n=e[t],r=n.getStemExtents().topY;a+=r,i===L.DOWN&&c<r?(c=r,o=Math.max(...n.getYs()),s=n.getBeamCount()):i===L.UP&&(c===0||c>r)&&(c=r,o=Math.min(...n.getYs()),s=n.getBeamCount())}let l=a/e.length,u=n+s*t*1.5,d=o+u*-i;i===L.DOWN&&l<d?l=o+u:i===L.UP&&l>d&&(l=o-u),r?(i===L.DOWN&&l>r||i===L.UP&&l<r)&&(this.renderOptions.flatBeamOffset=l):this.renderOptions.flatBeamOffset=l,this.slope=0,this.yShift=0}getBeamYToDraw(){let e=this.notes[0].getStemExtents().topY;return this.renderOptions.flatBeams&&this.renderOptions.flatBeamOffset&&(e=this.renderOptions.flatBeamOffset),e}applyStemExtensions(){let{notes:e,slope:t,renderOptions:{showStemlets:n,stemletExtension:r,beamWidth:i}}=this,a=this.yShift,o=this._beamCount,s=e[0],c=this.getBeamYToDraw(),l=s.getStemX();for(let s=0;s<e.length;++s){let u=e[s],d=u.getStem();if(d){let e=u.getStemX(),{topY:s}=u.getStemExtents(),f=this.getSlopeY(e,l,c,t)+a,p=d.getExtension(),m=u.getStemDirection()===L.UP?s-f:f-s,h=0;if(u.getStemDirection()!==this._stemDirection&&(h=(1+(u.getGlyphProps().beamCount-1)*1.5)*this.renderOptions.beamWidth),d.setExtension(p+m+h),d.adjustHeightForBeam(),u.isRest()&&n){let e=(o-1)*i*1.5+i;d.setVisibility(!0).setStemlet(!0,e+r)}}}}lookupBeamDirection(e,t,n,r,i){if(e===`4`)return`L`;let a=this.forcedPartialDirections[i];if(a)return a;let o=`${I.durationToNumber(e)/2}`,s=t<I.durationToTicks(o),c=r<I.durationToTicks(o),l=n<I.durationToTicks(o);return s&&c&&l?`B`:s&&!c&&l?`L`:!s&&c&&l?`R`:this.lookupBeamDirection(o,t,n,r,i)}getBeamLines(e){let t=I.durationToTicks(e),n=!1,r=[],i,a=this.renderOptions.partialBeamLength,o=!1,s=0;for(let c=0;c<this.notes.length;++c){let l=this.notes[c],u=l.getTicks().value();s+=u;let d=!1;parseInt(e,10)>=8&&(d=this.breakOnIndexes.indexOf(c)!==-1,this.renderOptions.secondaryBreakTicks&&s>=this.renderOptions.secondaryBreakTicks&&(s=0,d=!0));let f=l.getIntrinsicTicks()<t,p=l.getStemX()-L.WIDTH/2,m=this.notes[c-1],h=this.notes[c+1],g=h&&h.getIntrinsicTicks()<t,_=m&&m.getIntrinsicTicks()<t,v=m&&h&&f&&!_&&!g;if(f){if(n)i=r[r.length-1],i.end=p,d&&(n=!1,h&&!g&&i.end===void 0&&(i.end=i.start-a));else{if(i={start:p,end:void 0},n=!0,v){let t=m.getIntrinsicTicks(),n=h.getIntrinsicTicks(),r=l.getIntrinsicTicks(),o=this.lookupBeamDirection(e,t,r,n,c);[`L`,`B`].includes(o)?i.end=i.start-a:i.end=i.start+a}else g?d&&(i.end=i.start-a,n=!1):(o||c===0)&&h?i.end=i.start+a:i.end=i.start-a;r.push(i)}}else n=!1;o=d}let c=r[r.length-1];return c&&c.end===void 0&&(c.end=c.start-a),r}drawStems(e){this.notes.forEach(t=>{let n=t.getStem();if(n){let r=t.getStemX();n.setNoteHeadXBounds(r,r),n.setContext(e).drawWithStyle()}},this)}drawBeamLines(e){let t=[`4`,`8`,`16`,`32`,`64`,`128`,`256`,`512`,`1024`],n=this.notes[0],r=this.getBeamYToDraw(),i=n.getStemX(),a=this.renderOptions.beamWidth*this._stemDirection;for(let n=0;n<t.length;++n){let o=t[n],s=this.getBeamLines(o);for(let t=0;t<s.length;++t){let n=s[t],o=n.start,c=this.getSlopeY(o,i,r,this.slope),l=n.end;if(l){let t=this.getSlopeY(l,i,r,this.slope);e.beginPath(),e.moveTo(o,c),e.lineTo(o,c+a),e.lineTo(l+1,t+a),e.lineTo(l+1,t),e.closePath(),e.fill()}else throw new p(`NoLastBeamX`,`lastBeamX undefined.`)}r+=a*1.5}}preFormat(){return this}postFormat(){this.postFormatted||=(d(this.notes[0])||this.renderOptions.flatBeams?this.calculateFlatSlope():this.calculateSlope(),this.applyStemExtensions(),!0)}draw(){let e=this.checkContext();if(this.setRendered(),this.unbeamable)return;this.postFormatted||this.postFormat();let t=this.getAttribute(`class`);e.openGroup(`beam`+(t?` `+t:``),this.getAttribute(`id`)),this.drawStems(e),this.drawBeamLines(e),this.drawPointerRect(),e.closeGroup()}},Kt=class extends z{static get CATEGORY(){return f.ClefNote}constructor(e,t=`default`,n){super({duration:`b`}),this.setType(e,t,n),this.ignoreTicks=!0}setType(e,t,n){return this.clef=new q(e,t,n),this.setWidth(this.clef.getWidth()),this}getClef(){return this.clef}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkStave(),t=this.checkContext();this.setRendered(),this.clef.setX(this.getAbsoluteX()),this.clef.setY(e.getYForLine(this.clef.line)),this.clef.renderText(t,0,0)}getBoundingBox(){return this.clef.getBoundingBox()}};function qt(...e){Yt.DEBUG&&g(`VexFlow.Crescendo`,e)}function Jt(e,t){let n=t.beginX,r=t.endX,i=t.y,a=t.height/2;e.beginPath(),t.reverse?(e.moveTo(n,i-a),e.lineTo(r,i),e.lineTo(n,i+a)):(e.moveTo(r,i-a),e.lineTo(n,i),e.lineTo(r,i+a)),e.stroke(),e.closePath()}var Yt=class extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.Crescendo}constructor(e){super(e),this.options={extendLeft:0,extendRight:0,yShift:0},this.decrescendo=!1,this.line=e.line??0,this.height=15}setLine(e){return this.line=e,this}setHeight(e){return this.height=e,this}setDecrescendo(e){return this.decrescendo=e,this}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkContext(),t=this.checkStave();this.setRendered();let n=this.getTickContext(),r=Rt.getNextContext(n),i=this.getAbsoluteX(),a=r?r.getX():t.getX()+t.getWidth(),o=t.getYForLine(this.line+-3)+1;qt(`Drawing `,this.decrescendo?`decrescendo `:`crescendo `,this.height,`x`,i-a),Jt(e,{beginX:i-this.options.extendLeft,endX:a+this.options.extendRight,y:o+this.options.yShift,height:this.height,reverse:this.decrescendo})}},Xt=function(e){return e[e.NEAR_HEAD=1]=`NEAR_HEAD`,e[e.NEAR_TOP=2]=`NEAR_TOP`,e}({}),Zt=class e extends A{static get CATEGORY(){return f.Curve}static get Position(){return Xt}static get PositionString(){return{nearHead:1,nearTop:2}}constructor(e,t,n){super(),this.renderOptions={thickness:2,xShift:0,yShift:10,position:1,positionEnd:1,invert:!1,cps:[{x:0,y:10},{x:0,y:10}],openingDirection:`auto`,...n},this.setNotes(e,t)}setNotes(e,t){if(!e&&!t)throw new p(`BadArguments`,"Curve needs to have either `from` or `to` set.");return this.from=e,this.to=t,this}isPartial(){return!this.from||!this.to}renderCurve(e){let t=this.checkContext(),n=this.renderOptions.xShift,r=this.renderOptions.yShift*e.direction,i=e.firstX+n,a=e.firstY+r,o=e.lastX-n,s=e.lastY+r,c=this.renderOptions.thickness,l=this.renderOptions.cps,{x:u,y:d}=l[0],{x:f,y:p}=l[1],m=(o-i)/(l.length+2);t.beginPath(),t.moveTo(i,a),t.bezierCurveTo(i+m+u,a+d*e.direction,o-m+f,s+p*e.direction,o,s),this.style?.lineDash||t.bezierCurveTo(o-m+f,s+(p+c)*e.direction,i+m+u,a+(d+c)*e.direction,i,a),t.stroke(),t.closePath(),this.style?.lineDash||t.fill()}draw(){this.checkContext(),this.setRendered();let t=this.from,n=this.to,r,i,a,o,s=0,c=`baseY`,l=`baseY`;function u(t){return typeof t==`string`?e.PositionString[t]:t}let d=u(this.renderOptions.position),f=u(this.renderOptions.positionEnd);return d===2&&(c=`topY`,l=`topY`),f===1?l=`baseY`:f===2&&(l=`topY`),t?(r=t.getTieRightX(),s=t.getStemDirection(),a=t.getStemExtents()[c]):(r=n.checkStave().getTieStartX(),a=n.getStemExtents()[c]),n?(i=n.getTieLeftX(),s=n.getStemDirection(),o=n.getStemExtents()[l]):(i=t.checkStave().getTieEndX(),o=t.getStemExtents()[l]),this.renderOptions.openingDirection===`up`&&(s=1),this.renderOptions.openingDirection===`down`&&(s=-1),this.renderCurve({firstX:r,lastX:i,firstY:a,lastY:o,direction:s*(this.renderOptions.invert===!0?-1:1)}),!0}};function Qt(...e){tn.DEBUG&&g(`VexFlow.Parser`,e)}var $t=-1;function en(e){if(`matchedString`in e)return e.matchedString;if(`results`in e)return en(e.results);let t=e;return t.length===1?en(t[0]):t.length===0?null:t.map(en)}var tn=class{static{this.DEBUG=!1}constructor(e){this.grammar=e,this.line=``,this.pos=0,this.errorPos=$t}parse(e){this.line=e,this.pos=0,this.errorPos=$t;let t=this.expect(this.grammar.begin());return t.errorPos=this.errorPos,t}matchFail(e){this.errorPos===$t&&(this.errorPos=this.pos),this.pos=e}matchSuccess(){this.errorPos=$t}matchToken(e,t=!1){let n=RegExp(t?`^((`+e+`))`:`^((`+e+`)\\s*)`),r=this.line.slice(this.pos).match(n);return r===null?{success:!1,pos:this.pos}:{success:!0,matchedString:r[2],incrementPos:r[1].length,pos:this.pos}}expectOne(e,t=!1){let n=[],r=this.pos,i=!0,a=!1;if(t=t===!0||e.maybe===!0,e.expect)for(let t of e.expect){let r=this.pos,o=this.expect(t);if(o.success){if(n.push(o),a=!0,e.or)break}else if(i=!1,!e.or){this.pos=r;break}}let o=e.or&&a||i,s=o||t===!0,c=+!!o;return t&&!o&&(this.pos=r),s?this.matchSuccess():this.matchFail(r),{success:s,results:n,numMatches:c}}expectOneOrMore(e,t=!1){let n=[],r=this.pos,i=0,a=!0;do{let t=this.expectOne(e);t.success&&t.results?(i++,n.push(t.results)):a=!1}while(a);let o=i>0||t===!0;return t&&!(i>0)&&(this.pos=r),o?this.matchSuccess():this.matchFail(r),{success:o,results:n,numMatches:i}}expectZeroOrMore(e){return this.expectOneOrMore(e,!0)}expect(e){if(Qt(`Evaluating rule function:`,e),!e)throw new p(`Invalid rule function`);let t,n=e.bind(this.grammar)();if(n.token)t=this.matchToken(n.token,n.noSpace===!0),t.success&&(this.pos+=t.incrementPos);else if(n.expect)t=n.oneOrMore?this.expectOneOrMore(n):n.zeroOrMore?this.expectZeroOrMore(n):this.expectOne(n);else throw Qt(n),new p("Bad grammar! No `token` or `expect` property "+n);let r=[];return t.matches=r,t.results&&t.results.forEach(e=>r.push(en(e))),n.run&&t.success&&n.run({matches:r}),t}};function $(...e){ln.DEBUG&&g(`VexFlow.EasyScore`,e)}var nn=class{constructor(e){this.builder=e}begin(){return this.LINE}LINE(){return{expect:[this.PIECE,this.PIECES,this.EOL]}}PIECE(){return{expect:[this.CHORDORNOTE,this.PARAMS],run:()=>this.builder.commitPiece()}}PIECES(){return{expect:[this.COMMA,this.PIECE],zeroOrMore:!0}}PARAMS(){return{expect:[this.DURATION,this.TYPE,this.DOTS,this.OPTS]}}CHORDORNOTE(){return{expect:[this.CHORD,this.SINGLENOTE],or:!0}}CHORD(){return{expect:[this.LPAREN,this.NOTES,this.RPAREN],run:e=>this.builder.addChord(e.matches[1])}}NOTES(){return{expect:[this.NOTE],oneOrMore:!0}}NOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE]}}SINGLENOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE],run:e=>{let t=e;this.builder.addSingleNote(t.matches[0],t.matches[1],t.matches[2])}}}ACCIDENTAL(){return{expect:[this.MICROTONES,this.ACCIDENTALS],maybe:!0,or:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:e=>this.builder.setNoteDots(e.matches)}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:e=>this.builder.setNoteType(e.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:e=>this.builder.setNoteDuration(e.matches[1])}}OPTS(){return{expect:[this.LBRACKET,this.KEYVAL,this.KEYVALS,this.RBRACKET],maybe:!0}}KEYVALS(){return{expect:[this.COMMA,this.KEYVAL],zeroOrMore:!0}}KEYVAL(){let e=e=>e.slice(1,-1);return{expect:[this.KEY,this.EQUALS,this.VAL],run:t=>this.builder.addNoteOption(t.matches[0],e(t.matches[2]))}}VAL(){return{expect:[this.SVAL,this.DVAL],or:!0}}KEY(){return{token:`[a-zA-Z][a-zA-Z0-9]*`}}DVAL(){return{token:`["][^"]*["]`}}SVAL(){return{token:`['][^']*[']`}}NOTENAME(){return{token:`[a-gA-G]`}}OCTAVE(){return{token:`[0-9]+`}}ACCIDENTALS(){return{token:`bb|b|##|#|n`}}MICROTONES(){return{token:`bbs|bss|bs|db|d|\\+\\+-|\\+-|\\+\\+|\\+|k|o`}}DURATIONS(){return{token:`[0-9whq]+`}}TYPES(){return{token:`[rRsSmMhHgG]`}}LPAREN(){return{token:`[(]`}}RPAREN(){return{token:`[)]`}}COMMA(){return{token:`[,]`}}DOT(){return{token:`[.]`}}SLASH(){return{token:`[/]`}}MAYBESLASH(){return{token:`[/]?`}}EQUALS(){return{token:`[=]`}}LBRACKET(){return{token:`\\[`}}RBRACKET(){return{token:`\\]`}}EOL(){return{token:`$`}}},rn=class{constructor(e){this.chord=[],this.dots=0,this.options={},this.duration=e}},an=class{constructor(e){this.commitHooks=[],this.factory=e,this.reset()}reset(e){this.options={stem:`auto`,clef:`treble`,...e},this.elements={notes:[],accidentals:[]},this.rollingDuration=`8`,this.resetPiece()}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(e){this.commitHooks.push(e)}resetPiece(){$(`resetPiece`),this.piece=new rn(this.rollingDuration)}setNoteDots(e){$(`setNoteDots:`,e),e&&(this.piece.dots=e.length)}setNoteDuration(e){$(`setNoteDuration:`,e),this.rollingDuration=this.piece.duration=e||this.rollingDuration}setNoteType(e){$(`setNoteType:`,e),e&&(this.piece.type=e)}addNoteOption(e,t){$(`addNoteOption: key:`,e,`value:`,t),this.piece.options[e]=t}addNote(e,t,n){$(`addNote:`,e,t,n),this.piece.chord.push({key:e,accid:t,octave:n})}addSingleNote(e,t,n){$(`addSingleNote:`,e,t,n),this.addNote(e,t,n)}addChord(e){$(`startChord`),typeof e[0]==`object`?e.forEach(e=>{e&&this.addNote(...e)}):this.addSingleNote(e[0]),$(`endChord`)}commitPiece(){$(`commitPiece`);let{factory:e}=this;if(!e)return;let t={...this.options,...this.piece.options},n=h(t.stem,`BadArguments`,`options.stem is not defined`).toLowerCase(),r=h(t.clef,`BadArguments`,`options.clef is not defined`).toLowerCase(),{chord:i,duration:a,dots:o,type:s}=this.piece,c=N.accidentals,l=i.map(e=>e.key+(c.includes(e.accid??``)?e.accid:``)+`/`+e.octave),u=n===`auto`,d=s?.toLowerCase()===`g`?e.GhostNote({duration:a,dots:o}):e.StaveNote({keys:l,duration:a,dots:o,type:s,clef:r,autoStem:u});u||d.setStemDirection(n===`up`?L.UP:L.DOWN);let f=[];i.forEach((t,n)=>{let r=t.accid;if(typeof r==`string`){let t=e.Accidental({type:r});d.addModifier(t,n),f.push(t)}else f.push(void 0)});for(let e=0;e<o;e++)Ge.buildAndAttach([d],{all:!0});this.commitHooks.forEach(e=>e(t,d,this)),this.elements.notes.push(d),this.elements.accidentals.push(f),this.resetPiece()}};function on(e,t){e.id!==void 0&&t.setAttribute(`id`,e.id)}var sn=/\s*,\s*/;function cn(e,t){e.class!==void 0&&e.class.split(sn).forEach(e=>t.addClass(e))}var ln=class{static{this.DEBUG=!1}constructor(e={}){this.defaults={clef:`treble`,time:`4/4`,stem:`auto`},this.setOptions(e)}set(e){return this.defaults={...this.defaults,...e},this}setOptions(e){let t=e.factory,n=e.builder??new an(t);return this.options={commitHooks:[on,cn,je.easyScoreHook,Ke.easyScoreHook],throwOnError:!1,...e,factory:t,builder:n},this.factory=t,this.builder=n,this.grammar=new nn(this.builder),this.parser=new tn(this.grammar),this.options.commitHooks?.forEach(e=>this.addCommitHook(e)),this}setContext(e){return this.factory.setContext(e),this}parse(e,t={}){this.builder.reset(t);let n=this.parser.parse(e);if(!n.success&&this.options.throwOnError)throw $(n),new p(`Error parsing line: `+e);return n}beam(e,t){return this.factory.Beam({notes:e,options:t}),e}tuplet(e,t){return this.factory.Tuplet({notes:e,options:t}),e}notes(e,t={}){return t={clef:this.defaults.clef,stem:this.defaults.stem,...t},this.parse(e,t),this.builder.getElements().notes}voice(e,t={}){return t={time:this.defaults.time,...t},this.factory.Voice(t).addTickables(e)}addCommitHook(e){this.builder.addCommitHook(e)}},un=`Ghost note must have valid initialization data to identify duration.`,dn=class extends Ze{static get CATEGORY(){return f.GhostNote}constructor(e){if(!e)throw new p(`BadArguments`,un);let t;if(typeof e==`string`)t={duration:e};else if(typeof e==`object`)t=e;else throw new p(`BadArguments`,un);super(t),this.setWidth(0)}isRest(){return!0}setStave(e){return super.setStave(e),this}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this}draw(){this.setRendered();for(let e=0;e<this.modifiers.length;++e){let t=this.modifiers[e];n(t)&&(t.setContext(this.getContext()),t.drawWithStyle())}}},fn=class extends z{static get CATEGORY(){return f.GlyphNote}constructor(e,t,n){super(t),this.options={ignoreTicks:!1,line:2,...n},this.ignoreTicks=this.options.ignoreTicks,this.setGlyph(e)}setGlyph(e){return this.text=e,this}preFormat(){return!this.preFormatted&&this.modifierContext&&this.modifierContext.preFormat(),this.preFormatted=!0,this}drawModifiers(){let e=this.checkContext();for(let t=0;t<this.modifiers.length;t++){let n=this.modifiers[t];n.setContext(e),n.drawWithStyle()}}draw(){let e=this.checkStave(),t=e.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`glyphNote`+(n?` `+n:``),this.getAttribute(`id`)),this.x=this.isCenterAligned()?this.getAbsoluteX()-this.getWidth()/2:this.getAbsoluteX(),this.y=e.getYForLine(this.options.line),this.renderText(t,0,0),this.drawModifiers(),this.drawPointerRect(),t.closeGroup()}},pn=class e extends W{static get CATEGORY(){return f.GraceNote}static get LEDGER_LINE_OFFSET(){return 2}constructor(t){super({strokePx:e.LEDGER_LINE_OFFSET,...t}),this.slash=t.slash||!1,this.slur=!0,this.buildNoteHeads(),this.width=3}getStemExtension(){if(this.stemExtensionOverride)return this.stemExtensionOverride;let e=super.getStemExtension();return e=L.HEIGHT*this.getFontScale()-L.HEIGHT+e,e}draw(){super.draw(),this.setRendered();let e=this.stem;if(this.slash&&e){let e=this.getFontScale(),t,n=this.beam;if(n)n.postFormatted||n.postFormat(),t=this.calcBeamedNotesSlashBBox(8*e,8*e,{stem:6*e,beam:5*e});else{let n=this.getStemDirection(),r=this.getNoteHeadBounds(),i=this.noteHeads[0].getWidth(),a=n===L.DOWN?this.getAbsoluteX():this.getAbsoluteX()+i,o=I.STEM_HEIGHT*e/2,s=n===L.DOWN?r.yBottom+o:r.yTop-o;t=n===L.DOWN?{x1:a-i,y1:s-i,x2:a+i,y2:s+i}:{x1:a-i,y1:s+i,x2:a+i,y2:s-i}}let r=this.checkContext();r.setLineWidth(1*e),r.beginPath(),r.moveTo(t.x1,t.y1),r.lineTo(t.x2,t.y2),r.closePath(),r.stroke()}}calcBeamedNotesSlashBBox(e,t,n){let r=this.beam;if(!r)throw new p(`NoBeam`,`Can't calculate without a beam.`);let i=r.slope,a=r.notes[r.notes.length-1]===this?-1:1,o=Math.atan(i*a),s={dx:Math.cos(o)*t,dy:Math.sin(o)*t};e*=this.getStemDirection();let c=Math.atan((s.dy-e)/s.dx),l=Math.cos(c)*n.stem*a,u=Math.sin(c)*n.stem,d=Math.cos(c)*n.beam*a,f=Math.sin(c)*n.beam,m=this.getStemX(),h=r.notes[0].getStemX(),g=r.getBeamYToDraw()+(m-h)*i;return{x1:m-l,y1:g+e-u,x2:m+s.dx*a+d,y2:g+s.dy+f}}},mn=class extends z{static get CATEGORY(){return f.KeySigNote}constructor(e,t,n){super({duration:`b`}),this.keySignature=new J(e,t,n),this.ignoreTicks=!0}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this.keySignature.setStave(this.checkStave()),this.setWidth(this.keySignature.getWidth()),this}draw(){let e=this.checkStave().checkContext();this.setRendered(),this.keySignature.setX(this.getAbsoluteX()),this.keySignature.setContext(e),this.keySignature.drawWithStyle()}},hn=class extends A{static get CATEGORY(){return f.MultiMeasureRest}constructor(e,t){super(),this.xs={left:NaN,right:NaN},this.hasPaddingLeft=!1,this.hasPaddingRight=!1,this.hasLineThickness=!1,this.hasSymbolSpacing=!1;let n=t.numberGlyphPoint??T.get(`MultiMeasureRest.fontSize`);this.fontInfo.size=n,this.numberOfMeasures=e,this.text=``;let r=`${this.numberOfMeasures}`;for(let e of r)this.text+=String.fromCodePoint(57472+Number(e));this.hasPaddingLeft=typeof t.paddingLeft==`number`,this.hasPaddingRight=typeof t.paddingRight==`number`,this.hasLineThickness=typeof t.lineThickness==`number`,this.hasSymbolSpacing=typeof t.symbolSpacing==`number`,this.renderOptions={useSymbols:!1,showNumber:!0,numberLine:-.5,numberGlyphPoint:n,line:2,spacingBetweenLinesPx:I.STAVE_LINE_DISTANCE,serifThickness:2,semibreveRestGlyphScale:T.get(`fontSize`),paddingLeft:0,paddingRight:0,lineThickness:5,symbolSpacing:0,...t}}getXs(){return this.xs}setStave(e){return this.stave=e,this}getStave(){return this.stave}checkStave(){return h(this.stave,`NoStave`,`No stave attached to instance.`)}drawLine(e,t,n,r){let i=this.renderOptions,a=e.getYForLine(i.line),o=(r-n)*.1;n+=o,r-=o;let s=``,c=new A;c.setText(s);let l=c.getWidth();if(!l)throw new p(`Cannot drawLine if width is 0`);for(let e=1;(e+2)*l+n<=r;e++)s+=``;s+=``,c.setText(s),c.renderText(t,n+(r-n)*.5-c.getWidth()*.5,a)}drawSymbols(e,t,n,r){let i=Math.floor(this.numberOfMeasures/4),a=this.numberOfMeasures%4,o=Math.floor(a/2),s=a%2,c=this.renderOptions,l=new A,u=``;for(let e=0;e<i;++e)u+=P.restLonga+` `;for(let e=0;e<o;++e)u+=P.restDoubleWhole+` `;l.setText(u);let d=new A;u=``;for(let e=0;e<s;++e)u+=P.restWhole+` `;d.setText(u);let f=l.getWidth()+d.getWidth(),p=n+(r-n)*.5-f*.5,m=c.line,h=e.getYForLine(m-1),g=e.getYForLine(m);l.renderText(t,p,g),p+=l.getWidth(),d.renderText(t,p,h),p+=d.getWidth()}draw(){let e=this.checkContext();this.setRendered();let t=this.checkStave(),n=t.getNoteStartX(),i=t.getNoteEndX(),a=t.getModifiers(B.BEGIN);a.length===1&&r(a[0])&&(n-=a[0].getWidth());let o=this.renderOptions;this.hasPaddingLeft&&(n=t.getX()+o.paddingLeft),this.hasPaddingRight&&(i=t.getX()+t.getWidth()-o.paddingRight),this.xs.left=n,this.xs.right=i,o.useSymbols?this.drawSymbols(t,e,n,i):this.drawLine(t,e,n,i),o.showNumber&&this.renderText(e,n+(i-n)*.5-this.width*.5,t.getYForLine(o.numberLine)-this.height*.5)}};function gn(...e){_n.DEBUG&&g(`VexFlow.PedalMarking`,e)}var _n=class e extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.PedalMarking}static{this.GLYPHS={pedalDepress:P.keyboardPedalPed,pedalRelease:P.keyboardPedalUp}}static{this.type={TEXT:1,BRACKET:2,MIXED:3}}static{this.typeString={text:e.type.TEXT,bracket:e.type.BRACKET,mixed:e.type.MIXED}}static createSustain(t){return new e(t)}static createSostenuto(t){let n=new e(t);return n.setType(e.type.MIXED),n.setCustomText(`Sost. Ped.`),n}static createUnaCorda(t){let n=new e(t);return n.setType(e.type.TEXT),n.setCustomText(`una corda`,`tre corda`),n}constructor(t){super(),this.notes=t,this.type=e.type.TEXT,this.line=0,this.depressText=e.GLYPHS.pedalDepress,this.releaseText=e.GLYPHS.pedalRelease,this.renderOptions={bracketHeight:10,textMarginRight:6,bracketLineWidth:1,color:`black`}}setType(t){return t=typeof t==`string`?e.typeString[t]:t,t>=e.type.TEXT&&t<=e.type.MIXED&&(this.type=t),this}setCustomText(e,t){return this.depressText=e||``,this.releaseText=t||``,this.setFont(T.getFontInfo(`PedalMarking.text`)),this}setLine(e){return this.line=e,this}drawBracketed(){let t=this.checkContext(),n=!1,r,i,a=0;this.notes.forEach((o,s,c)=>{n=!n;let l=o.getAbsoluteX(),u=o.checkStave().getYForBottomText(this.line+3);if(l<r)throw new p(`InvalidConfiguration`,`The notes provided must be in order of ascending x positions`);let d=c[s+1]===o,f=c[s-1]===o,m=0;if(n)m=f?5:0,this.type===e.type.MIXED&&!f?(a=t.measureText(this.depressText).width,t.fillText(this.depressText,l,u),m=a+this.renderOptions.textMarginRight):(t.beginPath(),t.moveTo(l,u-this.renderOptions.bracketHeight),t.lineTo(l+m,u),t.stroke(),t.closePath());else{let e=o.getVoice().getTickables().indexOf(o),n=o.getVoice().getTickables().length,a=e+1<n?o.getVoice().getTickables()[e+1].getAbsoluteX():(o.getStave()?.getX()??0)+(o.getStave()?.getWidth()??0);t.beginPath(),t.moveTo(r,i),t.lineTo(d?l-5:a-5,u),t.lineTo(d?l:a-5,u-this.renderOptions.bracketHeight),t.stroke(),t.closePath()}r=l+m,i=u})}drawText(){let e=this.checkContext(),t=!1,n=0;this.notes.forEach(r=>{t=!t;let i=r.checkStave(),a=r.getAbsoluteX(),o=i.getYForBottomText(this.line+3);if(t)n=e.measureText(this.depressText).width,e.fillText(this.depressText,a,o);else{let t=r.getVoice().getTickables().indexOf(r),i=r.getVoice().getTickables().length,a=t+1<i?r.getVoice().getTickables()[t+1].getAbsoluteX():(r.getStave()?.getX()??0)+(r.getStave()?.getWidth()??0);n=e.measureText(this.releaseText).width,e.fillText(this.releaseText,a-n,o)}})}draw(){let t=this.checkContext();this.setRendered(),t.setStrokeStyle(this.renderOptions.color),t.setFillStyle(this.renderOptions.color),t.setFont(this.font),gn(`Rendering Pedal Marking`),this.type===e.type.BRACKET||this.type===e.type.MIXED?(t.setLineWidth(this.renderOptions.bracketLineWidth),this.drawBracketed()):this.type===e.type.TEXT&&this.drawText()}},vn={1:P.repeat1Bar,2:P.repeat2Bars,4:P.repeat4Bars,slash:P.repeatBarSlash},yn=class extends fn{static get CATEGORY(){return f.RepeatNote}constructor(e,t,n){let r=vn[e]||``;super(r,{duration:`q`,alignCenter:e!==`slash`,...t},n)}};function bn(e,t,n,r,i,a,o){e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.lineTo(a,o),e.lineTo(t,n),e.closePath(),e.fill()}var xn=class e extends A{static get CATEGORY(){return f.StaveLine}static{this.TextVerticalPosition={TOP:1,BOTTOM:2}}static{this.TextJustification=kt}constructor(t){super(),this.setNotes(t),this.text=``,this.renderOptions={paddingLeft:4,paddingRight:3,lineWidth:1,lineDash:void 0,roundedEnd:!0,color:void 0,drawStartArrow:!1,drawEndArrow:!1,arrowheadLength:10,arrowheadAngle:Math.PI/8,textPositionVertical:e.TextVerticalPosition.TOP,textJustification:e.TextJustification.CENTER}}setText(e){return this.text=e,this}setNotes(e){if(!e.firstNote&&!e.lastNote)throw new p(`BadArguments`,`Notes needs to have either firstNote or lastNote set.`);if(e.firstIndexes||=[0],e.lastIndexes||=[0],e.firstIndexes.length!==e.lastIndexes.length)throw new p(`BadArguments`,`Connected notes must have same number of indexes.`);return this.notes=e,this.firstNote=e.firstNote,this.firstIndexes=e.firstIndexes,this.lastNote=e.lastNote,this.lastIndexes=e.lastIndexes,this}applyLineStyle(){let e=this.checkContext(),t=this.renderOptions;t.lineDash&&e.setLineDash(t.lineDash),t.lineWidth&&e.setLineWidth(t.lineWidth),t.roundedEnd?e.setLineCap(`round`):e.setLineCap(`square`)}drawArrowLine(e,t,n){let r=this.renderOptions.drawStartArrow&&this.renderOptions.drawEndArrow,i=t.x,a=t.y,o=n.x,s=n.y,c=Math.sqrt((o-i)*(o-i)+(s-a)*(s-a)),l=(c-this.renderOptions.arrowheadLength/3)/c,u,d,f,p;this.renderOptions.drawEndArrow||r?(u=Math.round(i+(o-i)*l),d=Math.round(a+(s-a)*l)):(u=o,d=s),this.renderOptions.drawStartArrow||r?(f=i+(o-i)*(1-l),p=a+(s-a)*(1-l)):(f=i,p=a),this.renderOptions.color&&(e.setStrokeStyle(this.renderOptions.color),e.setFillStyle(this.renderOptions.color)),e.beginPath(),e.moveTo(f,p),e.lineTo(u,d),e.stroke(),e.closePath();let m=Math.atan2(s-a,o-i),h=Math.abs(this.renderOptions.arrowheadLength/Math.cos(this.renderOptions.arrowheadAngle)),g,_,v,y,b,x;(this.renderOptions.drawEndArrow||r)&&(g=m+Math.PI+this.renderOptions.arrowheadAngle,v=o+Math.cos(g)*h,y=s+Math.sin(g)*h,_=m+Math.PI-this.renderOptions.arrowheadAngle,b=o+Math.cos(_)*h,x=s+Math.sin(_)*h,bn(e,v,y,o,s,b,x)),(this.renderOptions.drawStartArrow||r)&&(g=m+this.renderOptions.arrowheadAngle,v=i+Math.cos(g)*h,y=a+Math.sin(g)*h,_=m-this.renderOptions.arrowheadAngle,b=i+Math.cos(_)*h,x=a+Math.sin(_)*h,bn(e,v,y,i,a,b,x))}draw(){let t=this.checkContext();this.setRendered();let n=this.firstNote,r=this.lastNote,i=this.renderOptions;this.applyLineStyle();let a={x:0,y:0},o={x:0,y:0};this.firstIndexes.forEach((e,s)=>{let c=this.lastIndexes[s];a=n.getModifierStartXY(2,e),o=r.getModifierStartXY(1,c);let l=a.y>o.y;a.x+=n.getMetrics().modRightPx+i.paddingLeft,o.x-=r.getMetrics().modLeftPx+i.paddingRight;let u=n.getGlyphWidth();n.getKeyProps()[e].displaced&&n.getStemDirection()===1&&(a.x+=u+i.paddingLeft),r.getKeyProps()[c].displaced&&r.getStemDirection()===-1&&(o.x-=u+i.paddingRight),a.y+=l?-3:1,o.y+=l?2:0,this.drawArrowLine(t,a,o)});let s=this.width,c=i.textJustification,l=0;c===e.TextJustification.LEFT?l=a.x:c===e.TextJustification.CENTER?l=(o.x-a.x)/2+a.x-s/2:c===e.TextJustification.RIGHT&&(l=o.x-s);let u=0,d=i.textPositionVertical;d===e.TextVerticalPosition.TOP?u=n.checkStave().getYForTopText():d===e.TextVerticalPosition.BOTTOM&&(u=n.checkStave().getYForBottomText(I.TEXT_HEIGHT_OFFSET_HACK));let f=i.color;this.applyStyle(t,{fillStyle:f,strokeStyle:f}),this.renderText(t,l,u)}},Sn=class extends A{static get CATEGORY(){return f.System}constructor(e={}){super(),this.setOptions(e),this.partStaves=[],this.partStaveInfos=[],this.partVoices=[]}setOptions(e={}){if(!e.factory)throw new p(`NoFactory`,`System.setOptions(options) requires a factory.`);this.factory=e.factory,this.options={factory:this.factory,x:10,y:10,width:500,spaceBetweenStaves:12,autoWidth:!1,noJustification:!1,debugFormatter:!1,formatIterations:0,noPadding:!1,...e,details:{alpha:.5,...e.details},formatOptions:{...e.formatOptions}},this.options.noJustification===!1&&e.width===void 0&&(this.options.autoWidth=!0)}getX(){return this.options.x}setX(e){return this.options.x=e,this.partStaves.forEach(t=>{t.setX(e)}),this}getY(){return this.options.y}setY(e){return this.options.y=e,this.partStaves.forEach(t=>{t.setY(e)}),this}getStaves(){return this.partStaves}getVoices(){return this.partVoices}setContext(e){return super.setContext(e),this.factory.setContext(e),this}addConnector(e=`double`){return this.connector=this.factory.StaveConnector({topStave:this.partStaves[0],bottomStave:this.partStaves[this.partStaves.length-1],type:e}),this.connector}addStave(e){let t={leftBar:!1,...e.options},n=e.stave??this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:t}),r={spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,noJustification:!1,...e,options:t},i=this.getContext();return r.voices.forEach(e=>{e.setContext(i).setStave(n).getTickables().forEach(e=>e.setStave(n)),this.partVoices.push(e)}),this.partStaves.push(n),this.partStaveInfos.push(r),n}addVoices(e){let t=this.getContext();e.forEach(e=>{e.setContext(t),this.partVoices.push(e)})}format(){let e=this.options.details,t=0,n=new Q(e);this.formatter=n;let r=this.options.y,i=0,a=[];this.partStaves.forEach((e,t)=>{r+=e.space(this.partStaveInfos[t].spaceAbove),e.setY(r),r+=e.space(this.partStaveInfos[t].spaceBelow),r+=e.space(this.options.spaceBetweenStaves),this.partStaveInfos[t].debugNoteMetrics&&(a.push({y:r,stave:e}),r+=15),i=Math.max(i,e.getNoteStartX())}),this.partVoices.forEach(e=>{e.getTickables().forEach(e=>{let t=e.getStave();t&&e.setStave(t)})}),n.joinVoices(this.partVoices),this.partStaves.forEach(e=>e.setNoteStartX(i)),this.options.autoWidth&&this.partVoices.length>0?(t=n.preCalculateMinTotalWidth(this.partVoices),this.options.width=t+X.rightPadding+(i-this.options.x),this.partStaves.forEach(e=>{e.setWidth(this.options.width)})):t=this.options.noPadding?this.options.width-(i-this.options.x):this.options.width-(i-this.options.x)-X.defaultPadding,this.partVoices.length>0&&n.format(this.partVoices,this.options.noJustification?0:t,this.options.formatOptions),n.postFormat();for(let t=0;t<this.options.formatIterations;t++)n.tune(e);this.startX=i,this.debugNoteMetricsYs=a,this.lastY=r,X.formatBegModifiers(this.partStaves)}getBoundingBox(){return new D(this.options.x,this.options.y,this.options.width,(this.lastY??0)-this.options.y)}draw(){let e=this.checkContext();if(!this.formatter||!this.startX||!this.lastY||!this.debugNoteMetricsYs)throw new p(`NoFormatter`,`format() must be called before draw()`);this.setRendered(),this.options.debugFormatter&&Q.plotDebugging(e,this.formatter,this.startX,this.options.y,this.lastY),this.debugNoteMetricsYs.forEach(t=>{this.partVoices.forEach(n=>{n.getTickables().forEach(n=>{n.getStave()===t.stave&&z.plotMetrics(e,n,t.y)})})})}};function Cn(e,t){let n=[],r=[];for(let i=1;i<=e;i++)t.indexOf(i)>-1?(n.push(r),r=[]):r.push(i);return r.length>0&&n.push(r),n}function wn(e,t,n,r){let i=r!==1,a=r!==-1,o=n.getSpacingBetweenLines(),s=n.getNumLines(),c=[];return t.forEach(t=>{let l=t.indexOf(s)>-1,u=t.indexOf(1)>-1;if(i&&u||a&&l)return;t.length===1&&t.push(t[0]);let d=[];t.forEach((t,i,a)=>{let c=t===1,l=t===s,u=n.getYForLine(t-1);i===0&&!c?u-=o/2-1:i===a.length-1&&!l&&(u+=o/2-1),d.push(u),r===1&&c?d.push(e-2):r===-1&&l&&d.push(e+2)}),c.push(d.sort((e,t)=>e-t))}),c}var Tn=class e extends Ze{static get CATEGORY(){return f.TabNote}constructor(e,t=!1){super(e),this.fretElement=[],this.greatestString=()=>this.positions.map(e=>e.str).reduce((e,t)=>e>t?e:t),this.leastString=()=>this.positions.map(e=>e.str).reduce((e,t)=>e<t?e:t),this.ghost=!1,this.positions=e.positions||[],this.renderOptions={...this.renderOptions,drawStem:t,drawDots:t,drawStemThroughStave:!1,yShift:0},this.glyphProps=z.getGlyphProps(this.duration,this.noteType),h(this.glyphProps,`BadArguments`,`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.buildStem(),e.stemDirection?this.setStemDirection(e.stemDirection):this.setStemDirection(L.UP),this.ghost=!1,this.updateWidth()}reset(){return super.reset(),this.stave&&this.setStave(this.stave),this}setGhost(e){return this.ghost=e,this.updateWidth(),this}hasStem(){return!!this.renderOptions.drawStem}getStemExtension(){return this.stemExtensionOverride===void 0?this.flag.getHeight()>L.HEIGHT?this.flag.getHeight()-L.HEIGHT:0:this.stemExtensionOverride}static tabToElement(e){let t;return e.toUpperCase()===`X`?(t=new A(`TabNote`),t.setText(P.accidentalDoubleSharp)):(t=new A(`TabNote.text`),t.setText(e),t.setYShift(t.getHeight()/2)),t}updateWidth(){this.fretElement=[],this.width=0;for(let t=0;t<this.positions.length;++t){let n=this.positions[t].fret;this.ghost&&(n=`(`+n+`)`);let r=e.tabToElement(n.toString());this.fretElement.push(r),this.width=Math.max(r.getWidth(),this.width)}}setStave(e){super.setStave(e);let t=e.getContext();this.setContext(t);let n=this.positions.map(({str:t})=>e.getYForLine(Number(t)-1));return this.setYs(n),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}getModifierStartXY(e,t){if(!this.preFormatted)throw new p(`UnformattedNote`,`Can't call GetModifierStartXY on an unformatted note`);if(this.ys.length===0)throw new p(`NoYValues`,`No Y-Values calculated for this note.`);let n=0;return e===M.Position.LEFT?n=-2:e===M.Position.RIGHT?n=this.width+2:(e===M.Position.BELOW||e===M.Position.ABOVE)&&(n=this.width/2),{x:this.getAbsoluteX()+n,y:this.ys[t]}}getLineForRest(){return Number(this.positions[0].str)}preFormat(){this.preFormatted||=(this.modifierContext&&this.modifierContext.preFormat(),!0)}getStemX(){return this.getCenterGlyphX()}getStemY(){let e=this.checkStave().getNumLines()-.5,t=L.UP===this.stemDirection?-.5:e;return this.checkStave().getYForLine(t)}getStemExtents(){return this.checkStem().getExtents()}drawFlag(){let{beam:e,glyphProps:t,renderOptions:{drawStem:n}}=this,r=this.checkContext(),i=e===void 0&&n;if(t.codeFlagUp&&i){let e=this.getStemX(),t=this.getStemDirection()===L.DOWN?this.getStemY()-this.checkStem().getHeight()-this.getStemExtension():this.getStemY()-this.checkStem().getHeight()+this.getStemExtension();this.flag.setContext(r).setX(e).setY(t).drawWithStyle()}}drawModifiers(){this.modifiers.forEach(e=>{(!i(e)||this.renderOptions.drawDots)&&(e.setContext(this.getContext()),e.drawWithStyle())})}drawStemThrough(){let e=this.getStemX(),t=this.getStemY(),n=this.checkContext(),r=this.renderOptions.drawStem,i=this.renderOptions.drawStemThroughStave;if(r&&i){let r=wn(t,Cn(this.checkStave().getNumLines(),this.positions.map(e=>Number(e.str))),this.checkStave(),this.getStemDirection());n.setLineWidth(L.WIDTH),r.forEach(t=>{t.length!==0&&(n.beginPath(),n.moveTo(e,t[0]),n.lineTo(e,t[t.length-1]),n.stroke(),n.closePath())})}}drawPositions(){let e=this.checkContext(),t=this.getAbsoluteX(),n=this.ys;for(let r=0;r<this.positions.length;++r){let i=n[r]+this.renderOptions.yShift,a=this.fretElement[r],o=t-a.getWidth()/2;e.clearRect(o-2,i-3,a.getWidth()+4,6),a.renderText(e,o,i)}}draw(){let e=this.checkContext();if(this.ys.length===0)throw new p(`NoYValues`,`Can't draw note without Y values.`);this.setRendered();let t=this.beam===void 0&&this.renderOptions.drawStem,n=this.getAttribute(`class`);if(e.openGroup(`tabnote`+(n?` `+n:``),this.getAttribute(`id`)),this.drawPositions(),this.drawStemThrough(),this.stem&&t){let t=this.getStemX();this.stem.setNoteHeadXBounds(t,t),this.stem.setContext(e).drawWithStyle()}this.drawFlag(),this.drawModifiers(),this.drawPointerRect(),e.closeGroup()}},En=class extends X{static get CATEGORY(){return f.TabStave}constructor(e,t,n,r){let i={spacingBetweenLinesPx:13,numLines:6,topTextPosition:1,...r};super(e,t,n,i)}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef(`tab`),this}};function Dn(...e){kn.DEBUG&&g(`VexFlow.TextBracket`,e)}var On=function(e){return e[e.TOP=1]=`TOP`,e[e.BOTTOM=-1]=`BOTTOM`,e}({}),kn=class e extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.TextBracket}static get Position(){return On}static get PositionString(){return{top:1,bottom:-1}}constructor({start:t,stop:n,text:r=``,superscript:i=``,position:a=1}){super(),this.start=t,this.stop=n,this.textElement=new A(`TextBracket`),this.textElement.setText(r),this.superscriptElement=new A(`TextBracket`),this.superscriptElement.setText(i);let o=k.scaleSize(this.fontInfo.size,.714286);this.superscriptElement.setFontSize(o),this.position=typeof a==`string`?e.PositionString[a]:a,this.line=1,this.renderOptions={dashed:!0,dash:[5],color:`black`,lineWidth:1,showBracket:!0,bracketHeight:8,underlineSuperscript:!0}}applyStyle(e){this.textElement.setFont(this.fontInfo);let{family:t,size:n,weight:r,style:i}=this.fontInfo,a=k.scaleSize(n,.714286);this.superscriptElement.setFont(t,a,r,i);let o=this.renderOptions;return e.setStrokeStyle(o.color),e.setFillStyle(o.color),e.setLineWidth(o.lineWidth),this}setDashed(e,t){return this.renderOptions.dashed=e,t&&(this.renderOptions.dash=t),this}setLine(e){return this.line=e,this}draw(){let e=this.checkContext();this.setRendered();let t=0;switch(this.position){case 1:t=this.start.checkStave().getYForTopText(this.line);break;case-1:t=this.start.checkStave().getYForBottomText(this.line+I.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new p(`InvalidPosition`,`The position ${this.position} is invalid.`)}let n={x:this.start.getAbsoluteX(),y:t},r={x:this.stop.getAbsoluteX(),y:t};Dn(`Rendering TextBracket: start:`,n,`stop:`,r,`y:`,t);let i=this.renderOptions.bracketHeight*this.position;this.textElement.renderText(e,n.x,n.y);let a=this.textElement.getWidth(),o=this.textElement.getHeight(),s=n.y-o/2.5;this.superscriptElement.renderText(e,n.x+a+1,s);let c=this.superscriptElement.getWidth(),l=this.superscriptElement.getHeight(),u=n.x,d=s,f=r.x+this.stop.getGlyphWidth();this.position===1?(u+=a+c+5,d-=l/2.7):this.position===-1&&(d+=l/2.7,u+=a+2,this.renderOptions.underlineSuperscript||(u+=c)),this.renderOptions.dashed?(K.drawDashedLine(e,u,d,f,d,this.renderOptions.dash),this.renderOptions.showBracket&&K.drawDashedLine(e,f,d+1*this.position,f,d+i,this.renderOptions.dash)):(e.beginPath(),e.moveTo(u,d),e.lineTo(f,d),this.renderOptions.showBracket&&e.lineTo(f,d+i),e.stroke(),e.closePath())}};function An(...e){jn.DEBUG&&g(`VexFlow.TextDynamics`,e)}var jn=class e extends z{static{this.DEBUG=!1}static get CATEGORY(){return f.TextDynamics}static get GLYPHS(){return{f:P.dynamicForte,p:P.dynamicPiano,m:P.dynamicMezzo,s:P.dynamicSforzando,z:P.dynamicZ,r:P.dynamicRinforzando}}constructor(e){super(e),this.sequence=(e.text??``).toLowerCase(),this.line=e.line??0,this.text=``,An(`New Dynamics Text: `,this.sequence)}setLine(e){return this.line=e,this}preFormat(){return this.text=``,this.sequence.split(``).forEach(t=>{let n=e.GLYPHS[t];if(!n)throw new p(`Invalid dynamics character: `+t);this.text+=n}),this.preFormatted=!0,this}draw(){this.setRendered();let e=this.getAbsoluteX(),t=this.checkStave().getYForLine(this.line+-3);An(`Rendering Dynamics: `,this.sequence),this.renderText(this.checkContext(),e,t)}},Mn=class extends z{static get CATEGORY(){return f.TimeSigNote}constructor(e,t){super({duration:`b`}),this.timeSig=new Y(e,t),this.setWidth(this.timeSig.getWidth()),this.ignoreTicks=!0}addToModifierContext(e){return this}preFormat(){return this.preFormatted=!0,this}draw(){let e=this.checkStave(),t=this.checkContext();this.setRendered();let n=this.getAttribute(`class`);t.openGroup(`timesignote`+(n?` `+n:``),this.getAttribute(`id`)),this.timeSig.drawAt(t,e,this.getAbsoluteX()),this.drawPointerRect(),t.closeGroup()}};function Nn(...e){Pn.DEBUG&&g(`VexFlow.VibratoBracket`,e)}var Pn=class extends A{static{this.DEBUG=!1}static get CATEGORY(){return f.VibratoBracket}constructor(e){super(),this.vibrato=new St,e.start&&(this.start=e.start),e.stop&&(this.stop=e.stop),this.line=1}setLine(e){return this.line=e,this}setVibratoCode(e){return this.vibrato.setVibratoCode(e),this}draw(){let e=this.checkContext();this.setRendered();let t=this.start&&this.start.checkStave().getYForTopText(this.line)||this.stop&&this.stop.checkStave().getYForTopText(this.line)||0,n=this.start&&this.start.getAbsoluteX()||this.stop&&this.stop.checkStave().getTieStartX()||0,r=this.stop&&this.stop.getAbsoluteX()-this.stop.getWidth()-5||this.start&&this.start.checkStave().getTieEndX()-10||0;this.vibrato.setVibratoWidth(r-n),Nn(`Rendering VibratoBracket: startX:`,n,`stopX:`,r,`y:`,t),this.vibrato.renderText(e,n,t)}};function Fn(...e){In.DEBUG&&g(`VexFlow.Factory`,e)}var In=class e{static{this.DEBUG=!1}static newFromElementId(t,n=500,r=200){return new e({renderer:{elementId:t,width:n,height:r}})}constructor(e={}){Fn(`New factory: `,e),this.options={stave:{space:10},renderer:{elementId:``,width:500,height:200,background:`#FFF`}},this.setOptions(e)}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=void 0}setOptions(e){this.options={...this.options,...e},this.initRenderer(),this.reset()}initRenderer(){let{elementId:e,width:t,height:n,background:r}=this.options.renderer;if(e===null)return;if(e===``)throw Fn(this),new p(`renderer.elementId not set in FactoryOptions`);let i=this.options.renderer.backend;i===void 0&&(i=dt(document.getElementById(e))?K.Backends.CANVAS:K.Backends.SVG),this.context=K.buildContext(e,i,t,n,r)}getContext(){return this.context}setContext(e){return this.context=e,this}getStave(){return this.stave}getVoices(){return this.voices}Stave(e){let t=this.options.stave.space,n={x:0,y:0,width:this.options.renderer.width-t*1,options:{spacingBetweenLinesPx:t*1},...e},r=new X(n.x,n.y,n.width,n.options);return this.staves.push(r),r.setContext(this.context),this.stave=r,r}TabStave(e){let t=this.options.stave.space,n={x:0,y:0,width:this.options.renderer.width-t*1,options:{spacingBetweenLinesPx:t*1.3},...e},r=new En(n.x,n.y,n.width,n.options);return this.staves.push(r),r.setContext(this.context),this.stave=r,r}StaveNote(e){let t=new W(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GlyphNote(e,t,n){let r=new fn(e,t,n);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}RepeatNote(e,t,n){let r=new yn(e,t,n);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}GhostNote(e){let t=new dn(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TextNote(e){let t=new At(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}BarNote(e={}){let t=new Le(e.type);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}ClefNote(e){let t={type:`treble`,options:{size:`default`,annotation:void 0},...e},n=new Kt(t.type,t.options.size,t.options.annotation);return this.stave&&n.setStave(this.stave),n.setContext(this.context),this.renderQ.push(n),n}TimeSigNote(e){let t=new Mn({time:`4/4`,...e}.time);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}KeySigNote(e){let t=new mn(e.key,e.cancelKey,e.alterKey);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TabNote(e){let t=new Tn(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GraceNote(e){let t=new pn(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),t}GraceNoteGroup(e){let t=new ot(e.notes,e.slur);return t.setContext(this.context),t}Accidental(e){let t=new he(e.type);return t.setContext(this.context),t}Annotation(e){let t={text:`p`,hJustify:ve.CENTER,vJustify:ye.BOTTOM,...e},n=new be(t.text);return n.setJustification(t.hJustify),n.setVerticalJustification(t.vJustify),n.setFont(t.font),n.setContext(this.context),n}ChordSymbol(e){let t={vJustify:`top`,hJustify:`center`,...e},n=new We;return n.setHorizontal(t.hJustify),n.setVertical(t.vJustify),typeof t.fontFamily==`string`&&typeof t.fontSize==`number`?typeof t.fontWeight==`string`?n.setFont(t.fontFamily,t.fontSize,t.fontWeight):n.setFont(t.fontFamily,t.fontSize,``):typeof t.fontSize==`number`&&n.setFontSize(t.fontSize),n.setContext(this.context),n}Articulation(e){let t=new je(e?.type??`a.`);return e?.position!==void 0&&t.setPosition(e.position),e?.betweenLines!==void 0&&t.setBetweenLines(e.betweenLines),t.setContext(this.context),t}Ornament(e,t){let n={type:e,accidental:``,...t},r=new lt(e);return t?.position!==void 0&&r.setPosition(t.position),n.upperAccidental&&r.setUpperAccidental(n.upperAccidental),n.lowerAccidental&&r.setLowerAccidental(n.lowerAccidental),n.delayed!==void 0&&r.setDelayed(n.delayed),r.setContext(this.context),r}TextDynamics(e){let t={text:`p`,duration:`q`,dots:0,line:0,...e},n=new jn({text:t.text,line:t.line,duration:t.duration,dots:t.dots});return this.stave&&n.setStave(this.stave),n.setContext(this.context),this.renderQ.push(n),n}Fingering(e){let t={number:`0`,position:`left`,...e},n=new Ke(t.number);return n.setPosition(t.position),n.setContext(this.context),n}StringNumber(e,t=!0){let n=new bt(e.number);return n.setPosition(e.position),n.setContext(this.context),n.setDrawCircle(t),n}TickContext(){return new Rt}ModifierContext(){return new wt}MultiMeasureRest(e){let t=new hn(h(e.numberOfMeasures,`NoNumberOfMeasures`),e);return t.setContext(this.context),this.renderQ.push(t),t}Voice(e){let t=new G({time:`4/4`,...e}.time);return this.voices.push(t),t}StaveConnector(e){let t=new Z(e.topStave,e.bottomStave);return t.setType(e.type).setContext(this.context),this.renderQ.push(t),t}Formatter(e){return new Q(e)}Tuplet(e){let t={notes:[],options:{},...e},n=new Ht(t.notes,t.options).setContext(this.context);return this.renderQ.push(n),n}Beam(e){let t=new Gt(e.notes,e.options?.autoStem).setContext(this.context);return t.breakSecondaryAt(e.options?.secondaryBeamBreaks??[]),e.options?.partialBeamDirections&&Object.entries(e.options?.partialBeamDirections).forEach(([e,n])=>{t.setPartialBeamSideAt(Number(e),n)}),this.renderQ.push(t),t}Curve(e){let t=new Zt(e.from,e.to,e.options).setContext(this.context);return this.renderQ.push(t),t}StaveTie(e){let t=new nt({firstNote:e.from,lastNote:e.to,firstIndexes:e.firstIndexes,lastIndexes:e.lastIndexes},e.text);return e.options?.direction&&t.setDirection(e.options.direction),t.setContext(this.context),this.renderQ.push(t),t}StaveLine(e){let t=new xn({firstNote:e.from,lastNote:e.to,firstIndexes:e.firstIndexes,lastIndexes:e.lastIndexes});return e.options?.text&&t.setText(e.options.text),e.options?.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}VibratoBracket(e){let t=new Pn({start:e.from,stop:e.to});return e.options.line&&t.setLine(e.options.line),e.options.code&&t.setVibratoCode(e.options.code),t.setContext(this.context),this.renderQ.push(t),t}TextBracket(e){let t=new kn({start:e.from,stop:e.to,text:e.text,superscript:e.options.superscript,position:e.options.position});return e.options.line&&t.setLine(e.options.line),e.options.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}System(e={}){e.factory=this;let t=new Sn(e).setContext(this.context);return this.systems.push(t),t}EasyScore(e={}){return e.factory=this,new ln(e)}PedalMarking(e){let t={notes:[],options:{style:`mixed`},...e},n=new _n(t.notes);return n.setType(_n.typeString[t.options.style]),n.setContext(this.context),this.renderQ.push(n),n}NoteSubGroup(e){let t=new st({notes:[],...e}.notes);return t.setContext(this.context),t}draw(){let e=this.context;this.systems.forEach(t=>t.setContext(e).format()),this.staves.forEach(t=>t.setContext(e).drawWithStyle()),this.voices.forEach(t=>t.setContext(e).drawWithStyle()),this.renderQ.forEach(t=>{t.isRendered()||t.setContext(e).drawWithStyle()}),this.systems.forEach(t=>t.setContext(e).drawWithStyle()),this.reset()}},Ln=class extends Tn{static get CATEGORY(){return f.GraceTabNote}constructor(e){super(e,!1),this.renderOptions={...this.renderOptions,yShift:.3},this.updateWidth()}},Rn=class{constructor(e){this.music=new N,this.setKey(e)}setKey(e){return this.key=e,this.reset(),this}getKey(){return this.key}reset(){if(this.keyParts=this.music.getKeyParts(this.key),this.keyString=this.keyParts.root,this.keyParts.accidental&&(this.keyString+=this.keyParts.accidental),!N.scaleTypes[this.keyParts.type])throw new p(`BadArguments`,`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),N.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};let e=N.rootIndexes[this.keyParts.root];for(let t=0;t<N.roots.length;++t){let n=(e+t)%N.roots.length,r=N.roots[n],i=this.music.getRelativeNoteName(r,this.scale[t]);this.scaleMap[r]=i,this.scaleMapByValue[this.scale[t]]=i,this.originalScaleMapByValue[this.scale[t]]=i}return this}getAccidental(e){let t=this.music.getKeyParts(e).root,n=this.music.getNoteParts(this.scaleMap[t]);return{note:this.scaleMap[t],accidental:n.accidental}}selectNote(e){e=e.toLowerCase();let t=this.music.getNoteParts(e),n=this.scaleMap[t.root],r=this.music.getNoteParts(n);if(n===e)return{note:n,accidental:t.accidental,change:!1};let i=this.scaleMapByValue[this.music.getNoteValue(e)];if(i!==void 0)return{note:i,accidental:this.music.getNoteParts(i).accidental,change:!1};let a=this.originalScaleMapByValue[this.music.getNoteValue(e)];return a===void 0?r.root===e?(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[t.root])],this.scaleMapByValue[this.music.getNoteValue(r.root)]=r.root,this.scaleMap[r.root]=r.root,{note:r.root,accidental:void 0,change:!0}):(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[t.root])],this.scaleMapByValue[this.music.getNoteValue(e)]=e,delete this.scaleMap[r.root],this.scaleMap[r.root]=e,{note:e,accidental:t.accidental,change:!0}):(this.scaleMap[r.root]=a,delete this.scaleMapByValue[this.music.getNoteValue(n)],this.scaleMapByValue[this.music.getNoteValue(e)]=a,{note:a,accidental:this.music.getNoteParts(a).accidental,change:!0})}},zn=class e extends A{static get CATEGORY(){return f.StaveHairpin}static{this.type={CRESC:1,DECRESC:2}}static FormatByTicksAndDraw(t,n,r,i,a,o){let s=n.pixelsPerTick;if(s===null)throw new p(`BadArguments`,`A valid Formatter must be provide to draw offsets by ticks.`);let c=s*(o.leftShiftTicks??0),l=s*(o.rightShiftTicks??0),u={height:o.height,yShift:o.yShift,leftShiftPx:c,rightShiftPx:l,rightShiftTicks:0,leftShiftTicks:0};new e({firstNote:r.firstNote,lastNote:r.lastNote},i).setContext(t).setRenderOptions(u).setPosition(a).drawWithStyle()}constructor(e,t){super(),this.setNotes(e),this.hairpin=t,this.position=M.Position.BELOW,this.renderOptions={height:10,yShift:0,leftShiftPx:0,rightShiftPx:0,rightShiftTicks:0,leftShiftTicks:0}}setPosition(e){return(e===M.Position.ABOVE||e===M.Position.BELOW)&&(this.position=e),this}setRenderOptions(e){return this.renderOptions=e,this}setNotes(e){if(!e.firstNote&&!e.lastNote)throw new p(`BadArguments`,`Hairpin needs to have either firstNote or lastNote set.`);return this.notes=e,this.firstNote=e.firstNote,this.lastNote=e.lastNote,this}renderHairpin(t){let n=this.checkContext(),r=this.renderOptions.yShift+20,i=t.firstY;this.position===M.Position.ABOVE&&(r=-r+30,i=t.firstY-t.staffHeight);let a=this.renderOptions.leftShiftPx,o=this.renderOptions.rightShiftPx;switch(n.beginPath(),this.hairpin){case e.type.CRESC:n.moveTo(t.lastX+o,i+r),n.lineTo(t.firstX+a,i+this.renderOptions.height/2+r),n.lineTo(t.lastX+o,i+this.renderOptions.height+r);break;case e.type.DECRESC:n.moveTo(t.firstX+a,i+r),n.lineTo(t.lastX+o,i+this.renderOptions.height/2+r),n.lineTo(t.firstX+a,i+this.renderOptions.height+r)}n.stroke(),n.closePath()}draw(){this.checkContext(),this.setRendered();let e=this.firstNote,t=this.lastNote;if(!e||!t)throw new p(`NoNote`,`Notes required to draw`);let n=e.getModifierStartXY(this.position,0),r=t.getModifierStartXY(this.position,0);this.renderHairpin({firstX:n.x,lastX:r.x,firstY:e.checkStave().getY()+e.checkStave().getHeight(),lastY:t.checkStave().getY()+t.checkStave().getHeight(),staffHeight:e.checkStave().getHeight()})}},Bn=class e extends rt{static get CATEGORY(){return f.TabSlide}static get SLIDE_UP(){return 1}static get SLIDE_DOWN(){return-1}static createSlideUp(t){return new e(t,e.SLIDE_UP)}static createSlideDown(t){return new e(t,e.SLIDE_DOWN)}constructor(t,n){if(super(t,`sl.`),!n){let r=t.firstNote.getPositions()[0].fret;typeof r==`string`&&(r=parseInt(r,10));let i=t.lastNote.getPositions()[0].fret;typeof i==`string`&&(i=parseInt(i,10)),n=isNaN(r)||isNaN(i)?e.SLIDE_UP:r>i?e.SLIDE_DOWN:e.SLIDE_UP}this.direction=n,this.renderOptions.cp1=11,this.renderOptions.cp2=14,this.renderOptions.yShift=.5}renderTie(t){if(t.firstYs.length===0||t.lastYs.length===0)throw new p(`BadArguments`,`No Y-values to render`);let n=this.checkContext(),r=t.firstX,i=t.firstYs,a=t.lastX,o=t.direction;if(o!==e.SLIDE_UP&&o!==e.SLIDE_DOWN)throw new p(`BadSlide`,`Invalid slide direction`);let s=this.notes.firstIndexes;for(let e=0;e<s.length;++e){let t=i[s[e]]+this.renderOptions.yShift;if(isNaN(t))throw new p(`BadArguments`,`Bad indexes for slide rendering.`);n.beginPath(),n.moveTo(r,t+3*o),n.lineTo(a,t-3*o),n.closePath(),n.stroke()}this.setRendered()}},Vn=class extends M{static get CATEGORY(){return f.Tremolo}constructor(e){super(),this.num=e,this.position=M.Position.CENTER,this.text=P.tremolo1}draw(){let e=this.checkContext(),t=this.checkAttachedNote();this.setRendered();let n=t.getStemDirection(),r=t.getFontScale(),i=T.get(`Tremolo.spacing`)*n*r,a=t.getAbsoluteX()+(n===L.UP?t.getGlyphWidth()-L.WIDTH/2:L.WIDTH/2),o=t.getStemExtents().topY+(this.num<=3?i:0);this.fontInfo.size=T.get(`Tremolo.fontSize`)*r;for(let t=0;t<this.num;++t)this.renderText(e,a,o),o+=i}},Hn=class e{static get names(){return{standard:`E/5,B/4,G/4,D/4,A/3,E/3`,dagdad:`D/5,A/4,G/4,D/4,A/3,D/3`,dropd:`E/5,B/4,G/4,D/4,A/3,D/3`,eb:`Eb/5,Bb/4,Gb/4,Db/4,Ab/3,Db/3`,standardBanjo:`D/5,B/4,G/4,D/4,G/5`}}constructor(e=`E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2`){this.tuningValues=[],this.setTuning(e)}noteToInteger(e){return I.keyProperties(e).intValue??-1}setTuning(t){e.names[t]&&(t=e.names[t]),this.tuningValues=[];let n=t.split(/\s*,\s*/);if(n.length===0)throw new p(`BadArguments`,`Invalid tuning string: ${t}`);for(let e=0;e<n.length;++e)this.tuningValues[e]=this.noteToInteger(n[e])}getValueForString(e){let t=Number(e);if(t<1||t>this.tuningValues.length)throw new p(`BadArguments`,`String number must be between 1 and ${this.tuningValues.length}:${e}`);return this.tuningValues[t-1]}getValueForFret(e,t){let n=this.getValueForString(t),r=Number(e);if(r<0)throw new p(`BadArguments`,`Fret number must be 0 or higher: ${e}`);return n+r}getNoteForFret(e,t){let n=this.getValueForFret(e,t),r=Math.floor(n/12),i=n%12;return`${I.integerToNote(i)}/${r}`}},Un=`0.0.1-alpha.2`,Wn=`83f5f82ddf9c0bbe0af89224944b421676aa3f97`,Gn=`2026-09-14T09:28:14.606Z`,Kn=class{static{this.BUILD={VERSION:Un,ID:Wn,DATE:Gn,INFO:``}}static{this.Accidental=he}static{this.Annotation=be}static{this.Articulation=je}static{this.Barline=U}static{this.BarNote=Le}static{this.Beam=Gt}static{this.Bend=Re}static{this.BoundingBox=D}static{this.CanvasContext=pt}static{this.ChordSymbol=We}static{this.Clef=q}static{this.ClefNote=Kt}static{this.Crescendo=Yt}static{this.Curve=Zt}static{this.Dot=Ge}static{this.EasyScore=ln}static{this.Element=A}static{this.Factory=In}static{this.Font=k}static{this.Formatter=Q}static{this.Fraction=C}static{this.FretHandFinger=Ke}static{this.GhostNote=dn}static{this.GlyphNote=fn}static{this.GraceNote=pn}static{this.GraceNoteGroup=ot}static{this.GraceTabNote=Ln}static{this.KeyManager=Rn}static{this.KeySignature=J}static{this.KeySigNote=mn}static{this.Modifier=M}static{this.ModifierContext=wt}static{this.MultiMeasureRest=hn}static{this.Music=N}static{this.Note=z}static{this.NoteHead=Je}static{this.NoteSubGroup=st}static{this.Ornament=lt}static{this.Parenthesis=ut}static{this.Parser=tn}static{this.PedalMarking=_n}static{this.Registry=re}static{this.RenderContext=Me}static{this.Renderer=K}static{this.RepeatNote=yn}static{this.Repetition=Et}static{this.Stave=X}static{this.StaveConnector=Z}static{this.StaveHairpin=zn}static{this.StaveLine=xn}static{this.StaveModifier=V}static{this.StaveNote=W}static{this.StaveTempo=Ot}static{this.StaveText=jt}static{this.StaveTie=nt}static{this.Stem=L}static{this.StringNumber=bt}static{this.Stroke=xt}static{this.SVGContext=_t}static{this.System=Sn}static{this.TabNote=Tn}static{this.TabSlide=Bn}static{this.TabStave=En}static{this.TabTie=rt}static{this.TextBracket=kn}static{this.TextDynamics=jn}static{this.TextNote=At}static{this.TickContext=Rt}static{this.TimeSignature=Y}static{this.TimeSigNote=Mn}static{this.Tremolo=Vn}static{this.Tuning=Hn}static{this.Tuplet=Ht}static{this.Vibrato=St}static{this.VibratoBracket=Pn}static{this.Voice=G}static{this.Volta=Nt}static{this.RuntimeError=p}static{this.Test=void 0}static{this.AnnotationHorizontalJustify=ve}static{this.AnnotationVerticalJustify=ye}static{this.ChordSymbolHorizontalJustify=Ve}static{this.ChordSymbolVerticalJustify=He}static{this.SymbolModifiers=Ue}static{this.CurvePosition=Xt}static{this.FontWeight=O}static{this.FontStyle=ee}static{this.Glyphs=P}static{this.ModifierPosition=j}static{this.RendererBackends=vt}static{this.RendererLineEndType=yt}static{this.BarlineType=H}static{this.RepeatBracketType=Fe}static{this.StaveModifierPosition=B}static{this.VoltaType=Mt}static{this.TextBracketPosition=On}static{this.TextJustification=kt}static{this.VoiceMode=it}static async loadFonts(...e){e||=Object.keys(k.FILES);let t=[];for(let n of e)t.push(k.load(n));await Promise.all(t)}static setFonts(...e){E.fontFamily=e.join(`,`),T.clear()}static getFonts(){return T.get(`fontFamily`).split(`,`)}static get RENDER_PRECISION_PLACES(){return I.RENDER_PRECISION_PLACES}static set RENDER_PRECISION_PLACES(e){I.RENDER_PRECISION_PLACES=e}static get SOFTMAX_FACTOR(){return I.SOFTMAX_FACTOR}static set SOFTMAX_FACTOR(e){I.SOFTMAX_FACTOR=e}static get UNISON(){return I.UNISON}static set UNISON(e){I.UNISON=e}static get NOTATION_FONT_SCALE(){return I.NOTATION_FONT_SCALE}static set NOTATION_FONT_SCALE(e){I.NOTATION_FONT_SCALE=e}static get TABLATURE_FONT_SCALE(){return I.TABLATURE_FONT_SCALE}static set TABLATURE_FONT_SCALE(e){I.TABLATURE_FONT_SCALE=e}static get RESOLUTION(){return I.RESOLUTION}static set RESOLUTION(e){I.RESOLUTION=e}static get SLASH_NOTEHEAD_WIDTH(){return I.SLASH_NOTEHEAD_WIDTH}static set SLASH_NOTEHEAD_WIDTH(e){I.SLASH_NOTEHEAD_WIDTH=e}static get STAVE_LINE_DISTANCE(){return I.STAVE_LINE_DISTANCE}static set STAVE_LINE_DISTANCE(e){I.STAVE_LINE_DISTANCE=e}static get STAVE_LINE_THICKNESS(){return E.Stave.lineWidth}static set STAVE_LINE_THICKNESS(e){E.Stave.lineWidth=e,E.TabStave.lineWidth=e,T.clear(`Stave`),T.clear(`TabStave`)}static get STEM_HEIGHT(){return I.STEM_HEIGHT}static set STEM_HEIGHT(e){I.STEM_HEIGHT=e}static get STEM_WIDTH(){return I.STEM_WIDTH}static set STEM_WIDTH(e){I.STEM_WIDTH=e}static get TIME4_4(){return I.TIME4_4}static get unicode(){return I.unicode}static keySignature(e){return I.keySignature(e)}static hasKeySignature(e){return I.hasKeySignature(e)}static getKeySignatures(){return I.getKeySignatures()}static clefProperties(e){return I.clefProperties(e)}static keyProperties(e,t,n){return I.keyProperties(e,t,n)}static durationToTicks(e){return I.durationToTicks(e)}};return Kn.BUILD.INFO=`vexflow-core`,Kn});
|
|
2
2
|
//# sourceMappingURL=vexflow-core.js.map
|