vexflow 5.0.0-alpha.3 → 5.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/README.md +6 -6
  2. package/build/cjs/vexflow-bravura.js +2 -2
  3. package/build/cjs/vexflow-bravura.js.map +1 -1
  4. package/build/cjs/vexflow-core.js +2 -2
  5. package/build/cjs/vexflow-core.js.map +1 -1
  6. package/build/cjs/vexflow-debug-with-tests.js +2066 -1877
  7. package/build/cjs/vexflow-debug-with-tests.js.map +1 -1
  8. package/build/cjs/vexflow-debug.js +1052 -993
  9. package/build/cjs/vexflow-debug.js.map +1 -1
  10. package/build/cjs/vexflow.js +2 -2
  11. package/build/cjs/vexflow.js.map +1 -1
  12. package/build/esm/src/accidental.js +22 -28
  13. package/build/esm/src/annotation.js +0 -2
  14. package/build/esm/src/barnote.js +3 -3
  15. package/build/esm/src/beam.js +26 -46
  16. package/build/esm/src/bend.js +11 -3
  17. package/build/esm/src/chordsymbol.js +0 -4
  18. package/build/esm/src/clef.js +0 -2
  19. package/build/esm/src/clefnote.js +6 -1
  20. package/build/esm/src/curve.js +8 -5
  21. package/build/esm/src/element.js +94 -118
  22. package/build/esm/src/factory.js +4 -4
  23. package/build/esm/src/flag.js +20 -0
  24. package/build/esm/src/fonts/gonville.js +1 -1
  25. package/build/esm/src/formatter.js +13 -21
  26. package/build/esm/src/fraction.js +15 -22
  27. package/build/esm/src/glyphnote.js +3 -4
  28. package/build/esm/src/gracenote.js +0 -2
  29. package/build/esm/src/gracenotegroup.js +17 -8
  30. package/build/esm/src/index.js +1 -0
  31. package/build/esm/src/keysignature.js +38 -31
  32. package/build/esm/src/keysignote.js +1 -1
  33. package/build/esm/src/metrics.js +58 -7
  34. package/build/esm/src/modifier.js +10 -23
  35. package/build/esm/src/multimeasurerest.js +16 -25
  36. package/build/esm/src/note.js +7 -0
  37. package/build/esm/src/notehead.js +6 -1
  38. package/build/esm/src/ornament.js +0 -2
  39. package/build/esm/src/pedalmarking.js +33 -41
  40. package/build/esm/src/registry.js +5 -19
  41. package/build/esm/src/stave.js +11 -19
  42. package/build/esm/src/stavebarline.js +2 -3
  43. package/build/esm/src/stavehairpin.js +1 -1
  44. package/build/esm/src/staveline.js +0 -4
  45. package/build/esm/src/stavemodifier.js +0 -2
  46. package/build/esm/src/stavenote.js +42 -68
  47. package/build/esm/src/staverepetition.js +3 -2
  48. package/build/esm/src/stavesection.js +13 -15
  49. package/build/esm/src/stavetempo.js +7 -13
  50. package/build/esm/src/stavetext.js +2 -2
  51. package/build/esm/src/stavetie.js +82 -40
  52. package/build/esm/src/stavevolta.js +3 -2
  53. package/build/esm/src/stem.js +0 -4
  54. package/build/esm/src/stemmablenote.js +5 -6
  55. package/build/esm/src/stringnumber.js +0 -2
  56. package/build/esm/src/svgcontext.js +5 -13
  57. package/build/esm/src/tabnote.js +2 -8
  58. package/build/esm/src/textbracket.js +0 -3
  59. package/build/esm/src/textnote.js +0 -2
  60. package/build/esm/src/tickable.js +13 -26
  61. package/build/esm/src/tickcontext.js +20 -2
  62. package/build/esm/src/timesignature.js +2 -4
  63. package/build/esm/src/timesignote.js +2 -0
  64. package/build/esm/src/tuplet.js +37 -30
  65. package/build/esm/src/version.js +3 -3
  66. package/build/esm/src/vexflow.js +6 -2
  67. package/build/esm/src/vibrato.js +6 -1
  68. package/build/esm/tests/accidental_tests.js +30 -17
  69. package/build/esm/tests/annotation_tests.js +12 -12
  70. package/build/esm/tests/articulation_tests.js +13 -13
  71. package/build/esm/tests/auto_beam_formatting_tests.js +33 -33
  72. package/build/esm/tests/beam_tests.js +1 -1
  73. package/build/esm/tests/bend_tests.js +7 -7
  74. package/build/esm/tests/chordsymbol_tests.js +8 -8
  75. package/build/esm/tests/clef_tests.js +5 -1
  76. package/build/esm/tests/curve_tests.js +34 -0
  77. package/build/esm/tests/{bach_tests.js → demo_petzold_tests.js} +7 -7
  78. package/build/esm/tests/dot_tests.js +4 -4
  79. package/build/esm/tests/formatter_tests.js +25 -25
  80. package/build/esm/tests/glyphnote_tests.js +6 -0
  81. package/build/esm/tests/gracenote_tests.js +2 -1
  82. package/build/esm/tests/gracetabnote_tests.js +1 -1
  83. package/build/esm/tests/index.js +1 -1
  84. package/build/esm/tests/key_clef_tests.js +6 -6
  85. package/build/esm/tests/keysignature_tests.js +20 -17
  86. package/build/esm/tests/notehead_tests.js +10 -7
  87. package/build/esm/tests/offscreencanvas_tests.js +1 -1
  88. package/build/esm/tests/ornament_tests.js +8 -8
  89. package/build/esm/tests/pedalmarking_tests.js +27 -0
  90. package/build/esm/tests/percussion_tests.js +6 -3
  91. package/build/esm/tests/renderer_tests.js +1 -1
  92. package/build/esm/tests/rests_tests.js +26 -26
  93. package/build/esm/tests/rhythm_tests.js +15 -15
  94. package/build/esm/tests/stave_tests.js +44 -43
  95. package/build/esm/tests/staveconnector_tests.js +73 -73
  96. package/build/esm/tests/stavehairpin_tests.js +1 -1
  97. package/build/esm/tests/stavemodifier_tests.js +3 -3
  98. package/build/esm/tests/stavenote_tests.js +29 -29
  99. package/build/esm/tests/stavetie_tests.js +29 -0
  100. package/build/esm/tests/stringnumber_tests.js +1 -1
  101. package/build/esm/tests/strokes_tests.js +1 -1
  102. package/build/esm/tests/style_tests.js +1 -1
  103. package/build/esm/tests/tabnote_tests.js +7 -7
  104. package/build/esm/tests/tabslide_tests.js +6 -6
  105. package/build/esm/tests/tabstave_tests.js +2 -1
  106. package/build/esm/tests/tabtie_tests.js +8 -8
  107. package/build/esm/tests/textnote_tests.js +1 -1
  108. package/build/esm/tests/threevoice_tests.js +2 -2
  109. package/build/esm/tests/timesignature_tests.js +23 -13
  110. package/build/esm/tests/vexflow_test_helpers.js +25 -39
  111. package/build/esm/tests/vibrato_tests.js +3 -3
  112. package/build/esm/tests/voice_tests.js +1 -1
  113. package/build/types/src/accidental.d.ts +19 -1
  114. package/build/types/src/annotation.d.ts +1 -1
  115. package/build/types/src/beam.d.ts +12 -1
  116. package/build/types/src/bend.d.ts +6 -0
  117. package/build/types/src/clefnote.d.ts +2 -0
  118. package/build/types/src/curve.d.ts +5 -4
  119. package/build/types/src/element.d.ts +23 -14
  120. package/build/types/src/factory.d.ts +2 -2
  121. package/build/types/src/flag.d.ts +12 -0
  122. package/build/types/src/fonts/gonville.d.ts +1 -1
  123. package/build/types/src/formatter.d.ts +5 -3
  124. package/build/types/src/fraction.d.ts +12 -7
  125. package/build/types/src/frethandfinger.d.ts +1 -1
  126. package/build/types/src/index.d.ts +1 -0
  127. package/build/types/src/keysignature.d.ts +7 -7
  128. package/build/types/src/metrics.d.ts +5 -0
  129. package/build/types/src/modifier.d.ts +3 -2
  130. package/build/types/src/multimeasurerest.d.ts +4 -1
  131. package/build/types/src/note.d.ts +2 -0
  132. package/build/types/src/pedalmarking.d.ts +2 -2
  133. package/build/types/src/registry.d.ts +1 -1
  134. package/build/types/src/stave.d.ts +1 -3
  135. package/build/types/src/stavebarline.d.ts +1 -1
  136. package/build/types/src/staveline.d.ts +1 -1
  137. package/build/types/src/stavemodifier.d.ts +0 -1
  138. package/build/types/src/stavenote.d.ts +2 -1
  139. package/build/types/src/staverepetition.d.ts +1 -1
  140. package/build/types/src/stavesection.d.ts +3 -4
  141. package/build/types/src/stavetempo.d.ts +4 -5
  142. package/build/types/src/stavetext.d.ts +1 -2
  143. package/build/types/src/stavetie.d.ts +39 -2
  144. package/build/types/src/stavevolta.d.ts +1 -2
  145. package/build/types/src/stemmablenote.d.ts +2 -3
  146. package/build/types/src/svgcontext.d.ts +1 -1
  147. package/build/types/src/tickable.d.ts +2 -1
  148. package/build/types/src/tickcontext.d.ts +30 -0
  149. package/build/types/src/tuplet.d.ts +2 -12
  150. package/build/types/src/typeguard.d.ts +1 -0
  151. package/package.json +33 -29
  152. package/tests/flow.html +2 -2
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VexFlow 5.0.0-alpha.3 2024-03-10T22:53:53.018Z 34a251a7bd087f8a341d61837db71c38def9f70d
2
+ * VexFlow 5.0.0-beta.0 2024-09-12T19:16:57.446Z 2daeb4def8b685227f2a3c924177b40ddcc5bda3
3
3
  * Copyright (c) 2023-present VexFlow contributors (see https://github.com/vexflow/vexflow/blob/main/AUTHORS.md).
4
4
  */
5
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VexFlow=e():t.VexFlow=e()}("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:this,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var e={};function i(t,e,i=!0){if("object"!=typeof t||null===t)return!1;let s=t.constructor;if(i){for(;null!==t;){if(s=t.constructor,"CATEGORY"in s&&s.CATEGORY===e)return!0;t=Object.getPrototypeOf(t)}return!1}return"CATEGORY"in s&&s.CATEGORY===e}t.d(e,{default:()=>ds});const s=t=>i(t,l.Barline),n=t=>i(t,l.GraceNote),a=t=>i(t,l.Note),o=t=>i(t,l.StaveNote),r=t=>i(t,l.StemmableNote),h=t=>i(t,l.TabNote);var l;!function(t){t.Accidental="Accidental",t.Annotation="Annotation",t.Articulation="Articulation",t.Barline="Barline",t.BarNote="BarNote",t.Beam="Beam",t.Bend="Bend",t.ChordSymbol="ChordSymbol",t.Clef="Clef",t.ClefNote="ClefNote",t.Crescendo="Crescendo",t.Curve="Curve",t.Dot="Dot",t.Element="Element",t.Fraction="Fraction",t.FretHandFinger="FretHandFinger",t.GhostNote="GhostNote",t.Glyph="Glyph",t.GlyphNote="GlyphNote",t.GraceNote="GraceNote",t.GraceNoteGroup="GraceNoteGroup",t.GraceTabNote="GraceTabNote",t.KeySignature="KeySignature",t.KeySigNote="KeySigNote",t.Modifier="Modifier",t.MultiMeasureRest="MultiMeasureRest",t.Note="Note",t.NoteHead="NoteHead",t.NoteSubGroup="NoteSubGroup",t.Ornament="Ornament",t.Parenthesis="Parenthesis",t.PedalMarking="PedalMarking",t.RenderContext="RenderContext",t.RepeatNote="RepeatNote",t.Repetition="Repetition",t.Stave="Stave",t.StaveConnector="StaveConnector",t.StaveHairpin="StaveHairpin",t.StaveLine="StaveLine",t.StaveModifier="StaveModifier",t.StaveNote="StaveNote",t.StaveSection="StaveSection",t.StaveTempo="StaveTempo",t.StaveText="StaveText",t.StaveTie="StaveTie",t.Stem="Stem",t.StemmableNote="StemmableNote",t.StringNumber="StringNumber",t.Stroke="Stroke",t.System="System",t.TabNote="TabNote",t.TabSlide="TabSlide",t.TabStave="TabStave",t.TabTie="TabTie",t.TextBracket="TextBracket",t.TextDynamics="TextDynamics",t.TextNote="TextNote",t.Tickable="Tickable",t.TimeSignature="TimeSignature",t.TimeSigNote="TimeSigNote",t.Tremolo="Tremolo",t.Tuplet="Tuplet",t.Vibrato="Vibrato",t.VibratoBracket="VibratoBracket",t.Voice="Voice",t.Volta="Volta"}(l||(l={}));class c extends Error{constructor(t,e=""){super("[RuntimeError] "+t+": "+e),this.code=t}}function d(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t.g?t.g:Function("return this")()}function u(t,e="undefined",i=""){if(void 0===t)throw new c(e,i);return t}function g(t,...e){if(!e)return;const i=Array.prototype.slice.call(e).join(" ");d().console.log(t+": "+i)}function p(t,e){let i=e+(t-e)/2;var s,n;return i%2>0&&(i=((s=10*i)%(n=5)>=n/2?parseInt(""+s/n,10)*n+n:parseInt(""+s/n,10)*n)/10),i}function m(t){return`vf-${t}`}function f(t){return(t%=2*Math.PI)<0&&(t+=2*Math.PI),t}function S(t){return t.reduce(((t,e)=>t+e),0)}var T,w,x,b=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class y{static get CATEGORY(){return l.Fraction}static GCD(t,e){if("number"!=typeof t||Number.isNaN(t)||"number"!=typeof e||Number.isNaN(e))throw new c("BadArgument",`Invalid numbers: ${t}, ${e}`);let i;for(;0!==e;)i=e,e=t%e,t=i;return t}static LCM(t,e){return t*e/T.GCD(t,e)}static LCMM(t){return 0===t.length?0:1===t.length?t[0]:2===t.length?T.LCM(t[0],t[1]):T.LCM(t.shift(),T.LCMM(t))}constructor(t,e){this.numerator=1,this.denominator=1,this.set(t,e)}set(t=1,e=1){return this.numerator=t,this.denominator=e,this}value(){return this.numerator/this.denominator}simplify(){let t=this.numerator,e=this.denominator;const i=T.GCD(t,e);return t/=i,e/=i,e<0&&(e=-e,t=-t),this.set(t,e)}add(t=0,e=1){const[i,s]=C(t,e),n=T.LCM(this.denominator,s),a=n/this.denominator,o=n/s,r=this.numerator*a+i*o;return this.set(r,n)}subtract(t=0,e=1){const[i,s]=C(t,e),n=T.LCM(this.denominator,s),a=n/this.denominator,o=n/s,r=this.numerator*a-i*o;return this.set(r,n)}multiply(t=1,e=1){const[i,s]=C(t,e);return this.set(this.numerator*i,this.denominator*s)}divide(t=1,e=1){const[i,s]=C(t,e);return this.set(this.numerator*s,this.denominator*i)}equals(t){const e=b(T,T,"f",w).copy(t).simplify(),i=b(T,T,"f",x).copy(this).simplify();return e.numerator===i.numerator&&e.denominator===i.denominator}greaterThan(t){const e=b(T,T,"f",w).copy(this);return e.subtract(t),e.numerator>0}greaterThanEquals(t){const e=b(T,T,"f",w).copy(this);return e.subtract(t),e.numerator>=0}lessThan(t){return!this.greaterThanEquals(t)}lessThanEquals(t){return!this.greaterThan(t)}clone(){return new T(this.numerator,this.denominator)}copy(t){return"number"==typeof t?this.set(t):this.set(t.numerator,t.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 b(T,T,"f",w).copy(this).simplify().toString()}toMixedString(){let t="";const e=this.quotient(),i=b(T,T,"f",w).copy(this);return e<0&&i.makeAbs(),0!==e?(t+=e,0!==i.numerator&&(t+=` ${i.toSimplifiedString()}`)):t=0===i.numerator?"0":i.toSimplifiedString(),t}parse(t){const e=t.split("/"),i=parseInt(e[0],10),s=e[1]?parseInt(e[1],10):1;return this.set(i,s)}}function C(t,e=1){return"number"==typeof t?[t,e]:[t.numerator,t.denominator]}w={value:new(T=y)},x={value:new T};class v{static getFontInfo(t){return{family:v.get(`${t}.fontFamily`),size:v.get(`${t}.fontSize`)*v.get(`${t}.fontScale`),weight:v.get(`${t}.fontWeight`),style:v.get(`${t}.fontStyle`)}}static get(t,e){var i;const s=t.split("."),n=s.pop();let a=k,o=e;for(;a;){o=null!==(i=a[n])&&void 0!==i?i:o;const t=s.shift();if(!t)break;a=a[t]}return o}}const k={fontFamily:"Bravura,Academico",fontSize:30,fontScale:1,fontWeight:"normal",fontStyle:"normal",Accidental:{cautionary:{fontSize:20},grace:{fontSize:25},noteheadAccidentalPadding:1,leftPadding:2,accidentalSpacing:3},Annotation:{fontSize:10},Bend:{fontSize:10},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:{fontSize:8,padding:12,endPaddingMax:10,endPaddingMin:5,unalignedNotePadding:10},StaveConnector:{text:{fontSize:16}},StaveLine:{fontSize:10},StaveSection:{fontSize:10,fontWeight:"bold"},StaveTempo:{fontSize:14,glyph:{fontSize:25},name:{fontWeight:"bold"}},StaveText:{fontSize:16},StaveTie:{fontSize:10},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"},TabTie:{fontSize:10},TextBracket:{fontSize:15,fontStyle:"italic"},TextNote:{text:{fontSize:12}},Tremolo:{spacing:7},Volta:{fontSize:9,fontWeight:"bold"}};class D{static copy(t){return new D(t.x,t.y,t.w,t.h)}constructor(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s}getX(){return this.x}getY(){return this.y}getW(){return this.w}getH(){return this.h}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setW(t){return this.w=t,this}setH(t){return this.h=t,this}move(t,e){return this.x+=t,this.y+=e,this}clone(){return D.copy(this)}mergeWith(t){const e=t,i=this.x<e.x?this.x:e.x,s=this.y<e.y?this.y:e.y,n=Math.max(this.x+this.w,e.x+e.w)-i,a=Math.max(this.y+this.h,e.y+e.h)-s;return this.x=i,this.y=s,this.w=n,this.h=a,this}}var B,E,L=function(t,e,i,s){return new(i||(i=Promise))((function(n,a){function o(t){try{h(s.next(t))}catch(t){a(t)}}function r(t){try{h(s.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}h((s=s.apply(t,e||[])).next())}))};let N;!function(t){t.NORMAL="normal",t.BOLD="bold"}(B||(B={})),function(t){t.NORMAL="normal",t.ITALIC="italic"}(E||(E={}));class F{static convertSizeToPixelValue(t){var e;if("number"==typeof t)return t*F.scaleToPxFrom.pt;{const i=parseFloat(t);if(isNaN(i))return 0;const s=t.replace(/[\d.\s]/g,"").toLowerCase();return i*(null!==(e=F.scaleToPxFrom[s])&&void 0!==e?e:1)}}static convertSizeToPointValue(t){var e;if("number"==typeof t)return t;{const i=parseFloat(t);if(isNaN(i))return 0;const s=t.replace(/[\d.\s]/g,"").toLowerCase();return i*((null!==(e=F.scaleToPxFrom[s])&&void 0!==e?e:1)/F.scaleToPxFrom.pt)}}static validate(t,e,i,s){if("string"==typeof t&&void 0===e&&void 0===i&&void 0===s)return F.fromCSSString(t);let n;return"object"==typeof t?(n=t.family,e=t.size,i=t.weight,s=t.style):n=t,n=null!=n?n:v.get("fontFamily"),e=null!=e?e:v.get("fontSize")+"pt",i=null!=i?i:B.NORMAL,s=null!=s?s:E.NORMAL,""===i&&(i=B.NORMAL),""===s&&(s=E.NORMAL),"number"==typeof e&&(e=`${e}pt`),"number"==typeof i&&(i=i.toString()),{family:n,size:e,weight:i,style:s}}static fromCSSString(t){N||(N=document.createElement("span")),N.style.font=t;const{fontFamily:e,fontSize:i,fontWeight:s,fontStyle:n}=N.style;return{family:e,size:i,weight:s,style:n}}static toCSSString(t){var e;if(!t)return"";let i;const s=t.style;let n;i=s===E.NORMAL||""===s||void 0===s?"":s.trim()+" ";const a=t.weight;let o;n=a===B.NORMAL||""===a||void 0===a?"":"number"==typeof a?a+" ":a.trim()+" ";const r=t.size;o=void 0===r?v.get("fontSize")+"pt":"number"==typeof r?r+"pt ":r.trim()+" ";return`${i}${n}${o}${null!==(e=t.family)&&void 0!==e?e:v.get("fontFamily")}`}static scaleSize(t,e){if("number"==typeof t)return t*e;return`${parseFloat(t)*e}${t.replace(/[\d.\s]/g,"")}`}static isBold(t){if(t){if("number"==typeof t)return t>=600;{const e=parseInt(t,10);return isNaN(e)?"bold"===t.toLowerCase():e>=600}}return!1}static isItalic(t){return!!t&&t.toLowerCase()===E.ITALIC}static load(t,e,i){return L(this,void 0,void 0,(function*(){if("undefined"==typeof FontFace)return Promise.reject(new Error("FontFace API is not available in this environment. Cannot load fonts."));if(void 0===e){const i=F.FILES;if(!(t in i))return Promise.reject(new Error(`Font ${t} not found in Font.FILES`));e=F.HOST_URL+i[t]}const s=new FontFace(t,`url(${e})`,i),n=s.load();let a;return"undefined"!=typeof document?a=document.fonts:"undefined"!=typeof self&&"fonts"in self&&(a=self.fonts),null==a||a.add(s),n}))}static getURLForFont(t){const e=F.FILES;if(t in e)return F.HOST_URL+e[t]}}F.scaleToPxFrom={pt:4/3,px:1,em:16,"%":.16,in:96,mm:96/25.4,cm:96/2.54},F.HOST_URL="https://cdn.jsdelivr.net/npm/@vexflow-fonts/",F.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"};var O,A,P=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)},R=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i};class M{constructor(){this.id={},this.type={},this.class={}}}class I{static getDefaultRegistry(){return P(O,O,"f",A)}static enableDefaultRegistry(t){R(O,O,t,"f",A)}static disableDefaultRegistry(){R(O,O,void 0,"f",A)}constructor(){this.index=new M}clear(){return this.index=new M,this}setIndexValue(t,e,i,s){const n=this.index;n[t][e]||(n[t][e]={}),n[t][e][i]=s}updateIndex({id:t,name:e,value:i,oldValue:s}){const n=this.getElementById(t);void 0!==s&&this.index[e][s]&&delete this.index[e][s][t],i&&n&&this.setIndexValue(e,i,n.getAttribute("id"),n)}register(t,e){if(!(e=e||t.getAttribute("id")))throw new c("Can't add element without `id` attribute to registry");return t.setAttribute("id",e),this.setIndexValue("id",e,e,t),this.updateIndex({id:e,name:"type",value:t.getAttribute("type"),oldValue:void 0}),t.onRegister(this),this}getElementById(t){var e,i;return null===(i=null===(e=this.index.id)||void 0===e?void 0:e[t])||void 0===i?void 0:i[t]}getElementsByAttribute(t,e){const i=this.index[t];if(i){const t=i[e];if(t){return Object.keys(t).map((e=>t[e]))}}return[]}getElementsByType(t){return this.getElementsByAttribute("type",t)}getElementsByClass(t){return this.getElementsByAttribute("class",t)}onUpdate(t){return["id","type","class"].includes(t.name)&&this.updateIndex(t),this}}O=I,A={value:void 0};var W,H,G,U,V,X,Y,_,z,j,q,K=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},Q=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class ${static get CATEGORY(){return l.Element}static newID(){return"auto"+W.ID++}static setTextMeasurementCanvas(t){K(W,W,t,"f",H)}static getTextMeasurementCanvas(){let t=Q(W,W,"f",H);return t||("undefined"!=typeof document?t=document.createElement("canvas"):"undefined"!=typeof OffscreenCanvas&&(t=new OffscreenCanvas(300,150)),K(W,W,t,"f",H)),t}constructor(t){var e;this.children=[],G.set(this,void 0),U.set(this,void 0),V.set(this,void 0),X.set(this,void 0),Y.set(this,""),_.set(this,!1),z.set(this,{fontBoundingBoxAscent:0,fontBoundingBoxDescent:0,actualBoundingBoxAscent:0,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:0,width:0,alphabeticBaseline:0,emHeightAscent:0,emHeightDescent:0,hangingBaseline:0,ideographicBaseline:0}),j.set(this,0),q.set(this,0),this.xShift=0,this.yShift=0,this.x=0,this.y=0,K(this,U,{id:W.newID(),type:null!=t?t:this.constructor.CATEGORY,class:""},"f"),this.rendered=!1,K(this,V,v.getFontInfo(Q(this,U,"f").type),"f"),K(this,X,v.get(`${Q(this,U,"f").type}.fontScale`),"f"),null===(e=I.getDefaultRegistry())||void 0===e||e.register(this)}addChildElement(t){return this.children.push(t),this}getCategory(){return Q(this,U,"f").type}setStyle(t){return this.style=t,this}setGroupStyle(t){return this.style=t,this.children.forEach((e=>e.setGroupStyle(t))),this}getStyle(){return this.style}applyStyle(t=Q(this,G,"f"),e=this.getStyle()){return e&&t?(t.save(),e.shadowColor&&t.setShadowColor(e.shadowColor),e.shadowBlur&&t.setShadowBlur(e.shadowBlur),e.fillStyle&&t.setFillStyle(e.fillStyle),e.strokeStyle&&t.setStrokeStyle(e.strokeStyle),e.lineWidth&&t.setLineWidth(e.lineWidth),e.lineDash&&t.setLineDash(e.lineDash.split(" ").map(Number)),this):this}restoreStyle(t=Q(this,G,"f"),e=this.getStyle()){return e&&t?(t.restore(),this):this}drawWithStyle(){this.checkContext(),this.applyStyle(),this.draw(),this.restoreStyle()}draw(){throw new c("Element","Draw not defined")}hasClass(t){var e;return!!Q(this,U,"f").class&&-1!==(null===(e=Q(this,U,"f").class)||void 0===e?void 0:e.split(" ").indexOf(t))}addClass(t){var e;return this.hasClass(t)||(Q(this,U,"f").class?Q(this,U,"f").class=`${Q(this,U,"f").class} ${t}`:Q(this,U,"f").class=`${t}`,null===(e=this.registry)||void 0===e||e.onUpdate({id:Q(this,U,"f").id,name:"class",value:t,oldValue:void 0})),this}removeClass(t){var e,i;if(!this.hasClass(t))return this;const s=null===(e=Q(this,U,"f").class)||void 0===e?void 0:e.split(" ");return s&&(s.splice(s.indexOf(t)),Q(this,U,"f").class=s.join(" ")),null===(i=this.registry)||void 0===i||i.onUpdate({id:Q(this,U,"f").id,name:"class",value:void 0,oldValue:t}),this}onRegister(t){return this.registry=t,this}isRendered(){return this.rendered}setRendered(t=!0){return this.rendered=t,this}getAttributes(){return Q(this,U,"f")}getAttribute(t){return Q(this,U,"f")[t]}getSVGElement(t=""){const e=m(Q(this,U,"f").id+t),i=document.getElementById(e);if(i)return i}setAttribute(t,e){var i;const s=Q(this,U,"f").id,n=Q(this,U,"f")[t];return Q(this,U,"f")[t]=e,null===(i=this.registry)||void 0===i||i.onUpdate({id:s,name:t,value:e,oldValue:n}),this}getBoundingBox(){return new D(this.x+this.xShift,this.y+this.yShift-this.textMetrics.actualBoundingBoxAscent,this.width,this.height)}getContext(){return Q(this,G,"f")}setContext(t){return K(this,G,t,"f"),this}checkContext(){return u(Q(this,G,"f"),"NoContext","No rendering context attached to instance.")}set font(t){this.setFont(t)}get font(){return F.toCSSString(Q(this,V,"f"))}setFont(t,e,i,s){const n=v.getFontInfo(Q(this,U,"f").type),a="object"==typeof t,o="string"==typeof t,r=void 0===e&&void 0===i&&void 0===s;return K(this,_,!1,"f"),K(this,V,a?Object.assign(Object.assign({},n),t):o&&r?F.fromCSSString(t):F.validate(null!=t?t:n.family,null!=e?e:n.size,null!=i?i:n.weight,null!=s?s:n.style),"f"),this}getFont(){return F.toCSSString(Q(this,V,"f"))}get fontInfo(){return Q(this,V,"f")}set fontInfo(t){this.setFont(t)}setFontSize(t){const e=this.fontInfo;return this.setFont(e.family,t,e.weight,e.style),this}getFontSize(){return this.fontSize}getFontScale(){return Q(this,X,"f")}set fontSize(t){this.setFontSize(t)}get fontSize(){let t=this.fontInfo.size;return"number"==typeof t&&(t=`${t}pt`),t}get fontSizeInPoints(){return F.convertSizeToPointValue(this.fontSize)}get fontSizeInPixels(){return F.convertSizeToPixelValue(this.fontSize)}get fontStyle(){return this.fontInfo.style}set fontStyle(t){const e=this.fontInfo;this.setFont(e.family,e.size,e.weight,t)}get fontWeight(){return this.fontInfo.weight+""}set fontWeight(t){const e=this.fontInfo;this.setFont(e.family,e.size,t,e.style)}getWidth(){return this.width}get width(){return Q(this,_,"f")||this.measureText(),Q(this,q,"f")}setWidth(t){return this.width=t,this}set width(t){Q(this,_,"f")||this.measureText(),K(this,q,t,"f")}setX(t){return this.x=t,this}getX(){return this.x}getY(){return this.y}setY(t){return this.y=t,this}setYShift(t){return this.yShift=t,this}getYShift(){return this.yShift}setXShift(t){return this.xShift=t,this}getXShift(){return this.xShift}setText(t){return this.text=t,this}set text(t){K(this,_,!1,"f"),K(this,Y,t,"f")}getText(){return Q(this,Y,"f")}get text(){return Q(this,Y,"f")}renderText(t,e,i){t.save(),t.setFont(Q(this,V,"f")),t.fillText(Q(this,Y,"f"),e+this.x+this.xShift,i+this.y+this.yShift),this.children.forEach((s=>{t.setFont(Q(s,V,"f")),t.fillText(Q(s,Y,"f"),e+s.x+s.xShift,i+s.y+s.yShift)})),t.restore()}measureText(){var t;const e=null===(t=W.getTextMeasurementCanvas())||void 0===t?void 0:t.getContext("2d");return e?(e.font=F.toCSSString(F.validate(Q(this,V,"f"))),K(this,z,e.measureText(Q(this,Y,"f")),"f"),K(this,j,Q(this,z,"f").actualBoundingBoxAscent+Q(this,z,"f").actualBoundingBoxDescent,"f"),K(this,q,Q(this,z,"f").width,"f"),K(this,_,!0,"f"),Q(this,z,"f")):(console.warn("Element: No context for txtCanvas. Returning empty text metrics."),Q(this,z,"f"))}static measureWidth(t,e=""){var i;const s=null===(i=W.getTextMeasurementCanvas())||void 0===i?void 0:i.getContext("2d");return s?(s.font=F.toCSSString(v.getFontInfo(e)),s.measureText(t).width):(console.warn("Element: No context for txtCanvas. Returning empty text metrics."),0)}getTextMetrics(){return this.textMetrics}get textMetrics(){return Q(this,_,"f")||this.measureText(),Q(this,z,"f")}getHeight(){return this.height}get height(){return Q(this,_,"f")||this.measureText(),Q(this,j,"f")}set height(t){Q(this,_,"f")||this.measureText(),K(this,j,t,"f")}setOriginX(t){const e=this.getBoundingBox(),i=(t-Math.abs((e.getX()-this.xShift)/e.getW()))*e.getW();this.xShift=-i}setOriginY(t){const e=this.getBoundingBox(),i=(t-Math.abs((e.getY()-this.yShift)/e.getH()))*e.getH();this.yShift=-i}setOrigin(t,e){this.setOriginX(t),this.setOriginY(e)}}W=$,G=new WeakMap,U=new WeakMap,V=new WeakMap,X=new WeakMap,Y=new WeakMap,_=new WeakMap,z=new WeakMap,j=new WeakMap,q=new WeakMap,$.ID=1e3,H={value:void 0};var J,Z,tt,et,it=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},st=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};!function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.ABOVE=3]="ABOVE",t[t.BELOW=4]="BELOW"}(tt||(tt={}));class nt extends ${static get CATEGORY(){return l.Modifier}static get Position(){return tt}static get PositionString(){return{center:tt.CENTER,above:tt.ABOVE,below:tt.BELOW,left:tt.LEFT,right:tt.RIGHT}}constructor(){super(),J.set(this,void 0),Z.set(this,void 0),this.width=0,this.textLine=0,this.position=nt.Position.LEFT,it(this,J,0,"f")}reset(){}getNote(){return u(this.note,"NoNote","Modifier has no note.")}checkAttachedNote(){const t=this.getCategory();return u(this.index,"NoIndex",`Can't draw ${t} without an index.`),u(this.note,"NoNote",`Can't draw ${t} without a note.`)}setNote(t){return this.note=t,this}getIndex(){return this.index}checkIndex(){return u(this.index,"NoIndex","Modifier has an invalid index.")}setIndex(t){return this.index=t,this}getModifierContext(){return st(this,Z,"f")}checkModifierContext(){return u(st(this,Z,"f"),"NoModifierContext","Modifier Context Required")}setModifierContext(t){return it(this,Z,t,"f"),this}getPosition(){return this.position}setPosition(t){return this.position="string"==typeof t?nt.PositionString[t]:t,this.reset(),this}setTextLine(t){return this.textLine=t,this}setYShift(t){return this.yShift=t,this}setSpacingFromNextModifier(t){it(this,J,t,"f")}getSpacingFromNextModifier(){return st(this,J,"f")}setXShift(t){return this.xShift=0,this.position===nt.Position.LEFT?this.xShift-=t:this.xShift+=t,this}getXShift(){return this.xShift}draw(){throw this.checkContext(),new c("NotImplemented","draw() not implemented for this modifier.")}alignSubNotesWithNote(t,e){const i=e.getTickContext(),s=i.getMetrics(),n=e.getStave(),a=i.getX()-s.modLeftPx-s.modRightPx+this.getSpacingFromNextModifier();t.forEach((t=>{const e=t.getTickContext();n&&t.setStave(n),e.setXOffset(a)}))}}J=new WeakMap,Z=new WeakMap;class at{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:at.scales.major,m:at.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<at.canonicalNotes.length}isValidIntervalValue(t){return t>=0&&t<at.diatonicIntervals.length}getNoteParts(t){if(!t||t.length<1)throw new c("BadArguments","Invalid note name: "+t);if(t.length>3)throw new c("BadArguments","Invalid note name: "+t);const e=t.toLowerCase(),i=/^([cdefgab])(b|bb|n|#|##)?$/.exec(e);if(null!==i){return{root:i[1],accidental:i[2]}}throw new c("BadArguments","Invalid note name: "+t)}getKeyParts(t){if(!t||t.length<1)throw new c("BadArguments","Invalid key: "+t);const e=t.toLowerCase(),i=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(e);if(null!==i){const t=i[1],e=i[2];let s=i[3];return s||(s="M"),{root:t,accidental:e,type:s}}throw new c("BadArguments",`Invalid key: ${t}`)}getNoteValue(t){const e=at.noteValues[t];if(void 0===e)throw new c("BadArguments",`Invalid note name: ${t}`);return e.intVal}getIntervalValue(t){const e=at.intervals[t];if(void 0===e)throw new c("BadArguments",`Invalid interval name: ${t}`);return e}getCanonicalNoteName(t){if(!this.isValidNoteValue(t))throw new c("BadArguments",`Invalid note value: ${t}`);return at.canonicalNotes[t]}getCanonicalIntervalName(t){if(!this.isValidIntervalValue(t))throw new c("BadArguments",`Invalid interval value: ${t}`);return at.diatonicIntervals[t]}getRelativeNoteValue(t,e,i=1){if(1!==i&&-1!==i)throw new c("BadArguments",`Invalid direction: ${i}`);let s=(t+i*e)%at.NUM_TONES;return s<0&&(s+=at.NUM_TONES),s}getRelativeNoteName(t,e){const i=this.getNoteParts(t),s=this.getNoteValue(i.root);let n=e-s;if(Math.abs(n)>at.NUM_TONES-3){let i=1;n>0&&(i=-1);const a=(e+1+(s+1))%at.NUM_TONES*i;if(Math.abs(a)>2)throw new c("BadArguments",`Notes not related: ${t}, ${e})`);n=a}if(Math.abs(n)>2)throw new c("BadArguments",`Notes not related: ${t}, ${e})`);let a=i.root;if(n>0)for(let t=1;t<=n;++t)a+="#";else if(n<0)for(let t=-1;t>=n;--t)a+="b";return a}getScaleTones(t,e){const i=[t];let s=t;for(let n=0;n<e.length;n++)s=this.getRelativeNoteValue(s,e[n]),s!==t&&i.push(s);return i}getIntervalBetween(t,e,i=1){if(1!==i&&-1!==i)throw new c("BadArguments",`Invalid direction: ${i}`);if(!this.isValidNoteValue(t)||!this.isValidNoteValue(e))throw new c("BadArguments",`Invalid notes: ${t}, ${e}`);let s=1===i?e-t:t-e;return s<0&&(s+=at.NUM_TONES),s}createScaleMap(t){const e=this.getKeyParts(t);if(!e.type)throw new c("BadArguments","Unsupported key type: undefined");const i=at.scaleTypes[e.type];let s=e.root;if(e.accidental&&(s+=e.accidental),!i)throw new c("BadArguments","Unsupported key type: "+t);const n=this.getScaleTones(this.getNoteValue(s),i),a=at.rootIndexes[e.root],o={};for(let t=0;t<at.roots.length;++t){const e=(a+t)%at.roots.length,i=at.roots[e];let s=this.getRelativeNoteName(i,n[t]);1===s.length&&(s+="n"),o[i]=s}return o}}!function(t){t.null="\0",t.fourStringTabClef="",t.sixStringTabClef="",t.accSagittal11LargeDiesisDown="",t.accSagittal11LargeDiesisUp="",t.accSagittal11MediumDiesisDown="",t.accSagittal11MediumDiesisUp="",t.accSagittal11v19LargeDiesisDown="",t.accSagittal11v19LargeDiesisUp="",t.accSagittal11v19MediumDiesisDown="",t.accSagittal11v19MediumDiesisUp="",t.accSagittal11v49CommaDown="",t.accSagittal11v49CommaUp="",t.accSagittal143CommaDown="",t.accSagittal143CommaUp="",t.accSagittal17CommaDown="",t.accSagittal17CommaUp="",t.accSagittal17KleismaDown="",t.accSagittal17KleismaUp="",t.accSagittal19CommaDown="",t.accSagittal19CommaUp="",t.accSagittal19SchismaDown="",t.accSagittal19SchismaUp="",t.accSagittal1MinaDown="",t.accSagittal1MinaUp="",t.accSagittal1TinaDown="",t.accSagittal1TinaUp="",t.accSagittal23CommaDown="",t.accSagittal23CommaUp="",t.accSagittal23SmallDiesisDown="",t.accSagittal23SmallDiesisUp="",t.accSagittal25SmallDiesisDown="",t.accSagittal25SmallDiesisUp="",t.accSagittal2MinasDown="",t.accSagittal2MinasUp="",t.accSagittal2TinasDown="",t.accSagittal2TinasUp="",t.accSagittal35LargeDiesisDown="",t.accSagittal35LargeDiesisUp="",t.accSagittal35MediumDiesisDown="",t.accSagittal35MediumDiesisUp="",t.accSagittal3TinasDown="",t.accSagittal3TinasUp="",t.accSagittal49LargeDiesisDown="",t.accSagittal49LargeDiesisUp="",t.accSagittal49MediumDiesisDown="",t.accSagittal49MediumDiesisUp="",t.accSagittal49SmallDiesisDown="",t.accSagittal49SmallDiesisUp="",t.accSagittal4TinasDown="",t.accSagittal4TinasUp="",t.accSagittal55CommaDown="",t.accSagittal55CommaUp="",t.accSagittal5CommaDown="",t.accSagittal5CommaUp="",t.accSagittal5TinasDown="",t.accSagittal5TinasUp="",t.accSagittal5v11SmallDiesisDown="",t.accSagittal5v11SmallDiesisUp="",t.accSagittal5v13LargeDiesisDown="",t.accSagittal5v13LargeDiesisUp="",t.accSagittal5v13MediumDiesisDown="",t.accSagittal5v13MediumDiesisUp="",t.accSagittal5v19CommaDown="",t.accSagittal5v19CommaUp="",t.accSagittal5v23SmallDiesisDown="",t.accSagittal5v23SmallDiesisUp="",t.accSagittal5v49MediumDiesisDown="",t.accSagittal5v49MediumDiesisUp="",t.accSagittal5v7KleismaDown="",t.accSagittal5v7KleismaUp="",t.accSagittal6TinasDown="",t.accSagittal6TinasUp="",t.accSagittal7CommaDown="",t.accSagittal7CommaUp="",t.accSagittal7TinasDown="",t.accSagittal7TinasUp="",t.accSagittal7v11CommaDown="",t.accSagittal7v11CommaUp="",t.accSagittal7v11KleismaDown="",t.accSagittal7v11KleismaUp="",t.accSagittal7v19CommaDown="",t.accSagittal7v19CommaUp="",t.accSagittal8TinasDown="",t.accSagittal8TinasUp="",t.accSagittal9TinasDown="",t.accSagittal9TinasUp="",t.accSagittalAcute="",t.accSagittalDoubleFlat="",t.accSagittalDoubleFlat11v49CUp="",t.accSagittalDoubleFlat143CUp="",t.accSagittalDoubleFlat17CUp="",t.accSagittalDoubleFlat17kUp="",t.accSagittalDoubleFlat19CUp="",t.accSagittalDoubleFlat19sUp="",t.accSagittalDoubleFlat23CUp="",t.accSagittalDoubleFlat23SUp="",t.accSagittalDoubleFlat25SUp="",t.accSagittalDoubleFlat49SUp="",t.accSagittalDoubleFlat55CUp="",t.accSagittalDoubleFlat5CUp="",t.accSagittalDoubleFlat5v11SUp="",t.accSagittalDoubleFlat5v19CUp="",t.accSagittalDoubleFlat5v23SUp="",t.accSagittalDoubleFlat5v7kUp="",t.accSagittalDoubleFlat7CUp="",t.accSagittalDoubleFlat7v11CUp="",t.accSagittalDoubleFlat7v11kUp="",t.accSagittalDoubleFlat7v19CUp="",t.accSagittalDoubleSharp="",t.accSagittalDoubleSharp11v49CDown="",t.accSagittalDoubleSharp143CDown="",t.accSagittalDoubleSharp17CDown="",t.accSagittalDoubleSharp17kDown="",t.accSagittalDoubleSharp19CDown="",t.accSagittalDoubleSharp19sDown="",t.accSagittalDoubleSharp23CDown="",t.accSagittalDoubleSharp23SDown="",t.accSagittalDoubleSharp25SDown="",t.accSagittalDoubleSharp49SDown="",t.accSagittalDoubleSharp55CDown="",t.accSagittalDoubleSharp5CDown="",t.accSagittalDoubleSharp5v11SDown="",t.accSagittalDoubleSharp5v19CDown="",t.accSagittalDoubleSharp5v23SDown="",t.accSagittalDoubleSharp5v7kDown="",t.accSagittalDoubleSharp7CDown="",t.accSagittalDoubleSharp7v11CDown="",t.accSagittalDoubleSharp7v11kDown="",t.accSagittalDoubleSharp7v19CDown="",t.accSagittalFlat="",t.accSagittalFlat11LDown="",t.accSagittalFlat11MDown="",t.accSagittalFlat11v19LDown="",t.accSagittalFlat11v19MDown="",t.accSagittalFlat11v49CDown="",t.accSagittalFlat11v49CUp="",t.accSagittalFlat143CDown="",t.accSagittalFlat143CUp="",t.accSagittalFlat17CDown="",t.accSagittalFlat17CUp="",t.accSagittalFlat17kDown="",t.accSagittalFlat17kUp="",t.accSagittalFlat19CDown="",t.accSagittalFlat19CUp="",t.accSagittalFlat19sDown="",t.accSagittalFlat19sUp="",t.accSagittalFlat23CDown="",t.accSagittalFlat23CUp="",t.accSagittalFlat23SDown="",t.accSagittalFlat23SUp="",t.accSagittalFlat25SDown="",t.accSagittalFlat25SUp="",t.accSagittalFlat35LDown="",t.accSagittalFlat35MDown="",t.accSagittalFlat49LDown="",t.accSagittalFlat49MDown="",t.accSagittalFlat49SDown="",t.accSagittalFlat49SUp="",t.accSagittalFlat55CDown="",t.accSagittalFlat55CUp="",t.accSagittalFlat5CDown="",t.accSagittalFlat5CUp="",t.accSagittalFlat5v11SDown="",t.accSagittalFlat5v11SUp="",t.accSagittalFlat5v13LDown="",t.accSagittalFlat5v13MDown="",t.accSagittalFlat5v19CDown="",t.accSagittalFlat5v19CUp="",t.accSagittalFlat5v23SDown="",t.accSagittalFlat5v23SUp="",t.accSagittalFlat5v49MDown="",t.accSagittalFlat5v7kDown="",t.accSagittalFlat5v7kUp="",t.accSagittalFlat7CDown="",t.accSagittalFlat7CUp="",t.accSagittalFlat7v11CDown="",t.accSagittalFlat7v11CUp="",t.accSagittalFlat7v11kDown="",t.accSagittalFlat7v11kUp="",t.accSagittalFlat7v19CDown="",t.accSagittalFlat7v19CUp="",t.accSagittalFractionalTinaDown="",t.accSagittalFractionalTinaUp="",t.accSagittalGrave="",t.accSagittalShaftDown="",t.accSagittalShaftUp="",t.accSagittalSharp="",t.accSagittalSharp11LUp="",t.accSagittalSharp11MUp="",t.accSagittalSharp11v19LUp="",t.accSagittalSharp11v19MUp="",t.accSagittalSharp11v49CDown="",t.accSagittalSharp11v49CUp="",t.accSagittalSharp143CDown="",t.accSagittalSharp143CUp="",t.accSagittalSharp17CDown="",t.accSagittalSharp17CUp="",t.accSagittalSharp17kDown="",t.accSagittalSharp17kUp="",t.accSagittalSharp19CDown="",t.accSagittalSharp19CUp="",t.accSagittalSharp19sDown="",t.accSagittalSharp19sUp="",t.accSagittalSharp23CDown="",t.accSagittalSharp23CUp="",t.accSagittalSharp23SDown="",t.accSagittalSharp23SUp="",t.accSagittalSharp25SDown="",t.accSagittalSharp25SUp="",t.accSagittalSharp35LUp="",t.accSagittalSharp35MUp="",t.accSagittalSharp49LUp="",t.accSagittalSharp49MUp="",t.accSagittalSharp49SDown="",t.accSagittalSharp49SUp="",t.accSagittalSharp55CDown="",t.accSagittalSharp55CUp="",t.accSagittalSharp5CDown="",t.accSagittalSharp5CUp="",t.accSagittalSharp5v11SDown="",t.accSagittalSharp5v11SUp="",t.accSagittalSharp5v13LUp="",t.accSagittalSharp5v13MUp="",t.accSagittalSharp5v19CDown="",t.accSagittalSharp5v19CUp="",t.accSagittalSharp5v23SDown="",t.accSagittalSharp5v23SUp="",t.accSagittalSharp5v49MUp="",t.accSagittalSharp5v7kDown="",t.accSagittalSharp5v7kUp="",t.accSagittalSharp7CDown="",t.accSagittalSharp7CUp="",t.accSagittalSharp7v11CDown="",t.accSagittalSharp7v11CUp="",t.accSagittalSharp7v11kDown="",t.accSagittalSharp7v11kUp="",t.accSagittalSharp7v19CDown="",t.accSagittalSharp7v19CUp="",t.accSagittalUnused1="",t.accSagittalUnused2="",t.accSagittalUnused3="",t.accSagittalUnused4="",t.accdnCombDot="",t.accdnCombLH2RanksEmpty="",t.accdnCombLH3RanksEmptySquare="",t.accdnCombRH3RanksEmpty="",t.accdnCombRH4RanksEmpty="",t.accdnDiatonicClef="",t.accdnLH2Ranks16Round="",t.accdnLH2Ranks8Plus16Round="",t.accdnLH2Ranks8Round="",t.accdnLH2RanksFullMasterRound="",t.accdnLH2RanksMasterPlus16Round="",t.accdnLH2RanksMasterRound="",t.accdnLH3Ranks2Plus8Square="",t.accdnLH3Ranks2Square="",t.accdnLH3Ranks8Square="",t.accdnLH3RanksDouble8Square="",t.accdnLH3RanksTuttiSquare="",t.accdnPull="",t.accdnPush="",t.accdnRH3RanksAccordion="",t.accdnRH3RanksAuthenticMusette="",t.accdnRH3RanksBandoneon="",t.accdnRH3RanksBassoon="",t.accdnRH3RanksClarinet="",t.accdnRH3RanksDoubleTremoloLower8ve="",t.accdnRH3RanksDoubleTremoloUpper8ve="",t.accdnRH3RanksFullFactory="",t.accdnRH3RanksHarmonium="",t.accdnRH3RanksImitationMusette="",t.accdnRH3RanksLowerTremolo8="",t.accdnRH3RanksMaster="",t.accdnRH3RanksOboe="",t.accdnRH3RanksOrgan="",t.accdnRH3RanksPiccolo="",t.accdnRH3RanksTremoloLower8ve="",t.accdnRH3RanksTremoloUpper8ve="",t.accdnRH3RanksTwoChoirs="",t.accdnRH3RanksUpperTremolo8="",t.accdnRH3RanksViolin="",t.accdnRH4RanksAlto="",t.accdnRH4RanksBassAlto="",t.accdnRH4RanksMaster="",t.accdnRH4RanksSoftBass="",t.accdnRH4RanksSoftTenor="",t.accdnRH4RanksSoprano="",t.accdnRH4RanksTenor="",t.accdnRicochet2="",t.accdnRicochet3="",t.accdnRicochet4="",t.accdnRicochet5="",t.accdnRicochet6="",t.accdnRicochetStem2="",t.accdnRicochetStem3="",t.accdnRicochetStem4="",t.accdnRicochetStem5="",t.accdnRicochetStem6="",t.accidental1CommaFlat="",t.accidental1CommaSharp="",t.accidental2CommaFlat="",t.accidental2CommaSharp="",t.accidental3CommaFlat="",t.accidental3CommaSharp="",t.accidental4CommaFlat="",t.accidental5CommaSharp="",t.accidentalArrowDown="",t.accidentalArrowUp="",t.accidentalBakiyeFlat="",t.accidentalBakiyeSharp="",t.accidentalBracketLeft="",t.accidentalBracketRight="",t.accidentalBuyukMucennebFlat="",t.accidentalBuyukMucennebSharp="",t.accidentalCombiningCloseCurlyBrace="",t.accidentalCombiningLower17Schisma="",t.accidentalCombiningLower19Schisma="",t.accidentalCombiningLower23Limit29LimitComma="",t.accidentalCombiningLower29LimitComma="",t.accidentalCombiningLower31Schisma="",t.accidentalCombiningLower37Quartertone="",t.accidentalCombiningLower41Comma="",t.accidentalCombiningLower43Comma="",t.accidentalCombiningLower47Quartertone="",t.accidentalCombiningLower53LimitComma="",t.accidentalCombiningOpenCurlyBrace="",t.accidentalCombiningRaise17Schisma="",t.accidentalCombiningRaise19Schisma="",t.accidentalCombiningRaise23Limit29LimitComma="",t.accidentalCombiningRaise29LimitComma="",t.accidentalCombiningRaise31Schisma="",t.accidentalCombiningRaise37Quartertone="",t.accidentalCombiningRaise41Comma="",t.accidentalCombiningRaise43Comma="",t.accidentalCombiningRaise47Quartertone="",t.accidentalCombiningRaise53LimitComma="",t.accidentalCommaSlashDown="",t.accidentalCommaSlashUp="",t.accidentalDoubleFlat="",t.accidentalDoubleFlatArabic="",t.accidentalDoubleFlatEqualTempered="",t.accidentalDoubleFlatOneArrowDown="",t.accidentalDoubleFlatOneArrowUp="",t.accidentalDoubleFlatReversed="",t.accidentalDoubleFlatThreeArrowsDown="",t.accidentalDoubleFlatThreeArrowsUp="",t.accidentalDoubleFlatTurned="",t.accidentalDoubleFlatTwoArrowsDown="",t.accidentalDoubleFlatTwoArrowsUp="",t.accidentalDoubleSharp="",t.accidentalDoubleSharpArabic="",t.accidentalDoubleSharpEqualTempered="",t.accidentalDoubleSharpOneArrowDown="",t.accidentalDoubleSharpOneArrowUp="",t.accidentalDoubleSharpThreeArrowsDown="",t.accidentalDoubleSharpThreeArrowsUp="",t.accidentalDoubleSharpTwoArrowsDown="",t.accidentalDoubleSharpTwoArrowsUp="",t.accidentalEnharmonicAlmostEqualTo="",t.accidentalEnharmonicEquals="",t.accidentalEnharmonicTilde="",t.accidentalFilledReversedFlatAndFlat="",t.accidentalFilledReversedFlatAndFlatArrowDown="",t.accidentalFilledReversedFlatAndFlatArrowUp="",t.accidentalFilledReversedFlatArrowDown="",t.accidentalFilledReversedFlatArrowUp="",t.accidentalFiveQuarterTonesFlatArrowDown="",t.accidentalFiveQuarterTonesSharpArrowUp="",t.accidentalFlat="",t.accidentalFlatArabic="",t.accidentalFlatEqualTempered="",t.accidentalFlatLoweredStockhausen="",t.accidentalFlatOneArrowDown="",t.accidentalFlatOneArrowUp="",t.accidentalFlatRaisedStockhausen="",t.accidentalFlatRepeatedLineStockhausen="",t.accidentalFlatRepeatedSpaceStockhausen="",t.accidentalFlatThreeArrowsDown="",t.accidentalFlatThreeArrowsUp="",t.accidentalFlatTurned="",t.accidentalFlatTwoArrowsDown="",t.accidentalFlatTwoArrowsUp="",t.accidentalHabaFlatQuarterToneHigher="",t.accidentalHabaFlatThreeQuarterTonesLower="",t.accidentalHabaQuarterToneHigher="",t.accidentalHabaQuarterToneLower="",t.accidentalHabaSharpQuarterToneLower="",t.accidentalHabaSharpThreeQuarterTonesHigher="",t.accidentalHalfSharpArrowDown="",t.accidentalHalfSharpArrowUp="",t.accidentalJohnston13="",t.accidentalJohnston31="",t.accidentalJohnstonDown="",t.accidentalJohnstonEl="",t.accidentalJohnstonMinus="",t.accidentalJohnstonPlus="",t.accidentalJohnstonSeven="",t.accidentalJohnstonUp="",t.accidentalKomaFlat="",t.accidentalKomaSharp="",t.accidentalKoron="",t.accidentalKucukMucennebFlat="",t.accidentalKucukMucennebSharp="",t.accidentalLargeDoubleSharp="",t.accidentalLowerOneSeptimalComma="",t.accidentalLowerOneTridecimalQuartertone="",t.accidentalLowerOneUndecimalQuartertone="",t.accidentalLowerTwoSeptimalCommas="",t.accidentalLoweredStockhausen="",t.accidentalNarrowReversedFlat="",t.accidentalNarrowReversedFlatAndFlat="",t.accidentalNatural="",t.accidentalNaturalArabic="",t.accidentalNaturalEqualTempered="",t.accidentalNaturalFlat="",t.accidentalNaturalLoweredStockhausen="",t.accidentalNaturalOneArrowDown="",t.accidentalNaturalOneArrowUp="",t.accidentalNaturalRaisedStockhausen="",t.accidentalNaturalReversed="",t.accidentalNaturalSharp="",t.accidentalNaturalThreeArrowsDown="",t.accidentalNaturalThreeArrowsUp="",t.accidentalNaturalTwoArrowsDown="",t.accidentalNaturalTwoArrowsUp="",t.accidentalOneAndAHalfSharpsArrowDown="",t.accidentalOneAndAHalfSharpsArrowUp="",t.accidentalOneQuarterToneFlatFerneyhough="",t.accidentalOneQuarterToneFlatStockhausen="",t.accidentalOneQuarterToneSharpFerneyhough="",t.accidentalOneQuarterToneSharpStockhausen="",t.accidentalOneThirdToneFlatFerneyhough="",t.accidentalOneThirdToneSharpFerneyhough="",t.accidentalParensLeft="",t.accidentalParensRight="",t.accidentalQuarterFlatEqualTempered="",t.accidentalQuarterSharpEqualTempered="",t.accidentalQuarterToneFlat4="",t.accidentalQuarterToneFlatArabic="",t.accidentalQuarterToneFlatArrowUp="",t.accidentalQuarterToneFlatFilledReversed="",t.accidentalQuarterToneFlatNaturalArrowDown="",t.accidentalQuarterToneFlatPenderecki="",t.accidentalQuarterToneFlatStein="",t.accidentalQuarterToneFlatVanBlankenburg="",t.accidentalQuarterToneSharp4="",t.accidentalQuarterToneSharpArabic="",t.accidentalQuarterToneSharpArrowDown="",t.accidentalQuarterToneSharpBusotti="",t.accidentalQuarterToneSharpNaturalArrowUp="",t.accidentalQuarterToneSharpStein="",t.accidentalQuarterToneSharpWiggle="",t.accidentalRaiseOneSeptimalComma="",t.accidentalRaiseOneTridecimalQuartertone="",t.accidentalRaiseOneUndecimalQuartertone="",t.accidentalRaiseTwoSeptimalCommas="",t.accidentalRaisedStockhausen="",t.accidentalReversedFlatAndFlatArrowDown="",t.accidentalReversedFlatAndFlatArrowUp="",t.accidentalReversedFlatArrowDown="",t.accidentalReversedFlatArrowUp="",t.accidentalSharp="",t.accidentalSharpArabic="",t.accidentalSharpEqualTempered="",t.accidentalSharpLoweredStockhausen="",t.accidentalSharpOneArrowDown="",t.accidentalSharpOneArrowUp="",t.accidentalSharpOneHorizontalStroke="",t.accidentalSharpRaisedStockhausen="",t.accidentalSharpRepeatedLineStockhausen="",t.accidentalSharpRepeatedSpaceStockhausen="",t.accidentalSharpReversed="",t.accidentalSharpSharp="",t.accidentalSharpThreeArrowsDown="",t.accidentalSharpThreeArrowsUp="",t.accidentalSharpTwoArrowsDown="",t.accidentalSharpTwoArrowsUp="",t.accidentalSims12Down="",t.accidentalSims12Up="",t.accidentalSims4Down="",t.accidentalSims4Up="",t.accidentalSims6Down="",t.accidentalSims6Up="",t.accidentalSori="",t.accidentalTavenerFlat="",t.accidentalTavenerSharp="",t.accidentalThreeQuarterTonesFlatArabic="",t.accidentalThreeQuarterTonesFlatArrowDown="",t.accidentalThreeQuarterTonesFlatArrowUp="",t.accidentalThreeQuarterTonesFlatCouper="",t.accidentalThreeQuarterTonesFlatGrisey="",t.accidentalThreeQuarterTonesFlatTartini="",t.accidentalThreeQuarterTonesFlatZimmermann="",t.accidentalThreeQuarterTonesSharpArabic="",t.accidentalThreeQuarterTonesSharpArrowDown="",t.accidentalThreeQuarterTonesSharpArrowUp="",t.accidentalThreeQuarterTonesSharpBusotti="",t.accidentalThreeQuarterTonesSharpStein="",t.accidentalThreeQuarterTonesSharpStockhausen="",t.accidentalTripleFlat="",t.accidentalTripleSharp="",t.accidentalTwoThirdTonesFlatFerneyhough="",t.accidentalTwoThirdTonesSharpFerneyhough="",t.accidentalUpsAndDownsDown="",t.accidentalUpsAndDownsLess="",t.accidentalUpsAndDownsMore="",t.accidentalUpsAndDownsUp="",t.accidentalWilsonMinus="",t.accidentalWilsonPlus="",t.accidentalWyschnegradsky10TwelfthsFlat="",t.accidentalWyschnegradsky10TwelfthsSharp="",t.accidentalWyschnegradsky11TwelfthsFlat="",t.accidentalWyschnegradsky11TwelfthsSharp="",t.accidentalWyschnegradsky1TwelfthsFlat="",t.accidentalWyschnegradsky1TwelfthsSharp="",t.accidentalWyschnegradsky2TwelfthsFlat="",t.accidentalWyschnegradsky2TwelfthsSharp="",t.accidentalWyschnegradsky3TwelfthsFlat="",t.accidentalWyschnegradsky3TwelfthsSharp="",t.accidentalWyschnegradsky4TwelfthsFlat="",t.accidentalWyschnegradsky4TwelfthsSharp="",t.accidentalWyschnegradsky5TwelfthsFlat="",t.accidentalWyschnegradsky5TwelfthsSharp="",t.accidentalWyschnegradsky6TwelfthsFlat="",t.accidentalWyschnegradsky6TwelfthsSharp="",t.accidentalWyschnegradsky7TwelfthsFlat="",t.accidentalWyschnegradsky7TwelfthsSharp="",t.accidentalWyschnegradsky8TwelfthsFlat="",t.accidentalWyschnegradsky8TwelfthsSharp="",t.accidentalWyschnegradsky9TwelfthsFlat="",t.accidentalWyschnegradsky9TwelfthsSharp="",t.accidentalXenakisOneThirdToneSharp="",t.accidentalXenakisTwoThirdTonesSharp="",t.analyticsChoralmelodie="",t.analyticsEndStimme="",t.analyticsHauptrhythmus="",t.analyticsHauptstimme="",t.analyticsInversion1="",t.analyticsNebenstimme="",t.analyticsStartStimme="",t.analyticsTheme="",t.analyticsTheme1="",t.analyticsThemeInversion="",t.analyticsThemeRetrograde="",t.analyticsThemeRetrogradeInversion="",t.arpeggiato="",t.arpeggiatoDown="",t.arpeggiatoUp="",t.arrowBlackDown="",t.arrowBlackDownLeft="",t.arrowBlackDownRight="",t.arrowBlackLeft="",t.arrowBlackRight="",t.arrowBlackUp="",t.arrowBlackUpLeft="",t.arrowBlackUpRight="",t.arrowOpenDown="",t.arrowOpenDownLeft="",t.arrowOpenDownRight="",t.arrowOpenLeft="",t.arrowOpenRight="",t.arrowOpenUp="",t.arrowOpenUpLeft="",t.arrowOpenUpRight="",t.arrowWhiteDown="",t.arrowWhiteDownLeft="",t.arrowWhiteDownRight="",t.arrowWhiteLeft="",t.arrowWhiteRight="",t.arrowWhiteUp="",t.arrowWhiteUpLeft="",t.arrowWhiteUpRight="",t.arrowheadBlackDown="",t.arrowheadBlackDownLeft="",t.arrowheadBlackDownRight="",t.arrowheadBlackLeft="",t.arrowheadBlackRight="",t.arrowheadBlackUp="",t.arrowheadBlackUpLeft="",t.arrowheadBlackUpRight="",t.arrowheadOpenDown="",t.arrowheadOpenDownLeft="",t.arrowheadOpenDownRight="",t.arrowheadOpenLeft="",t.arrowheadOpenRight="",t.arrowheadOpenUp="",t.arrowheadOpenUpLeft="",t.arrowheadOpenUpRight="",t.arrowheadWhiteDown="",t.arrowheadWhiteDownLeft="",t.arrowheadWhiteDownRight="",t.arrowheadWhiteLeft="",t.arrowheadWhiteRight="",t.arrowheadWhiteUp="",t.arrowheadWhiteUpLeft="",t.arrowheadWhiteUpRight="",t.articAccentAbove="",t.articAccentBelow="",t.articAccentStaccatoAbove="",t.articAccentStaccatoBelow="",t.articLaissezVibrerAbove="",t.articLaissezVibrerBelow="",t.articMarcatoAbove="",t.articMarcatoBelow="",t.articMarcatoStaccatoAbove="",t.articMarcatoStaccatoBelow="",t.articMarcatoTenutoAbove="",t.articMarcatoTenutoBelow="",t.articSoftAccentAbove="",t.articSoftAccentBelow="",t.articSoftAccentStaccatoAbove="",t.articSoftAccentStaccatoBelow="",t.articSoftAccentTenutoAbove="",t.articSoftAccentTenutoBelow="",t.articSoftAccentTenutoStaccatoAbove="",t.articSoftAccentTenutoStaccatoBelow="",t.articStaccatissimoAbove="",t.articStaccatissimoBelow="",t.articStaccatissimoStrokeAbove="",t.articStaccatissimoStrokeBelow="",t.articStaccatissimoWedgeAbove="",t.articStaccatissimoWedgeBelow="",t.articStaccatoAbove="",t.articStaccatoBelow="",t.articStressAbove="",t.articStressBelow="",t.articTenutoAbove="",t.articTenutoAccentAbove="",t.articTenutoAccentBelow="",t.articTenutoBelow="",t.articTenutoStaccatoAbove="",t.articTenutoStaccatoBelow="",t.articUnstressAbove="",t.articUnstressBelow="",t.augmentationDot="",t.barlineDashed="",t.barlineDotted="",t.barlineDouble="",t.barlineFinal="",t.barlineHeavy="",t.barlineHeavyHeavy="",t.barlineReverseFinal="",t.barlineShort="",t.barlineSingle="",t.barlineTick="",t.beamAccelRit1="",t.beamAccelRit10="",t.beamAccelRit11="",t.beamAccelRit12="",t.beamAccelRit13="",t.beamAccelRit14="",t.beamAccelRit15="",t.beamAccelRit2="",t.beamAccelRit3="",t.beamAccelRit4="",t.beamAccelRit5="",t.beamAccelRit6="",t.beamAccelRit7="",t.beamAccelRit8="",t.beamAccelRit9="",t.beamAccelRitFinal="",t.brace="",t.bracket="",t.bracketBottom="",t.bracketTop="",t.brassBend="",t.brassDoitLong="",t.brassDoitMedium="",t.brassDoitShort="",t.brassFallLipLong="",t.brassFallLipMedium="",t.brassFallLipShort="",t.brassFallRoughLong="",t.brassFallRoughMedium="",t.brassFallRoughShort="",t.brassFallSmoothLong="",t.brassFallSmoothMedium="",t.brassFallSmoothShort="",t.brassFlip="",t.brassHarmonMuteClosed="",t.brassHarmonMuteStemHalfLeft="",t.brassHarmonMuteStemHalfRight="",t.brassHarmonMuteStemOpen="",t.brassJazzTurn="",t.brassLiftLong="",t.brassLiftMedium="",t.brassLiftShort="",t.brassLiftSmoothLong="",t.brassLiftSmoothMedium="",t.brassLiftSmoothShort="",t.brassMuteClosed="",t.brassMuteHalfClosed="",t.brassMuteOpen="",t.brassPlop="",t.brassScoop="",t.brassSmear="",t.brassValveTrill="",t.breathMarkComma="",t.breathMarkSalzedo="",t.breathMarkTick="",t.breathMarkUpbow="",t.bridgeClef="",t.buzzRoll="",t.cClef="",t.cClef8vb="",t.cClefArrowDown="",t.cClefArrowUp="",t.cClefChange="",t.cClefCombining="",t.cClefReversed="",t.cClefSquare="",t.caesura="",t.caesuraCurved="",t.caesuraShort="",t.caesuraSingleStroke="",t.caesuraThick="",t.chantAccentusAbove="",t.chantAccentusBelow="",t.chantAuctumAsc="",t.chantAuctumDesc="",t.chantAugmentum="",t.chantCaesura="",t.chantCclef="",t.chantCirculusAbove="",t.chantCirculusBelow="",t.chantConnectingLineAsc2nd="",t.chantConnectingLineAsc3rd="",t.chantConnectingLineAsc4th="",t.chantConnectingLineAsc5th="",t.chantConnectingLineAsc6th="",t.chantCustosStemDownPosHigh="",t.chantCustosStemDownPosHighest="",t.chantCustosStemDownPosMiddle="",t.chantCustosStemUpPosLow="",t.chantCustosStemUpPosLowest="",t.chantCustosStemUpPosMiddle="",t.chantDeminutumLower="",t.chantDeminutumUpper="",t.chantDivisioFinalis="",t.chantDivisioMaior="",t.chantDivisioMaxima="",t.chantDivisioMinima="",t.chantEntryLineAsc2nd="",t.chantEntryLineAsc3rd="",t.chantEntryLineAsc4th="",t.chantEntryLineAsc5th="",t.chantEntryLineAsc6th="",t.chantEpisema="",t.chantFclef="",t.chantIctusAbove="",t.chantIctusBelow="",t.chantLigaturaDesc2nd="",t.chantLigaturaDesc3rd="",t.chantLigaturaDesc4th="",t.chantLigaturaDesc5th="",t.chantOriscusAscending="",t.chantOriscusDescending="",t.chantOriscusLiquescens="",t.chantPodatusLower="",t.chantPodatusUpper="",t.chantPunctum="",t.chantPunctumCavum="",t.chantPunctumDeminutum="",t.chantPunctumInclinatum="",t.chantPunctumInclinatumAuctum="",t.chantPunctumInclinatumDeminutum="",t.chantPunctumLinea="",t.chantPunctumLineaCavum="",t.chantPunctumVirga="",t.chantPunctumVirgaReversed="",t.chantQuilisma="",t.chantSemicirculusAbove="",t.chantSemicirculusBelow="",t.chantStaff="",t.chantStaffNarrow="",t.chantStaffWide="",t.chantStrophicus="",t.chantStrophicusAuctus="",t.chantStrophicusLiquescens2nd="",t.chantStrophicusLiquescens3rd="",t.chantStrophicusLiquescens4th="",t.chantStrophicusLiquescens5th="",t.chantVirgula="",t.clef15="",t.clef8="",t.clefChangeCombining="",t.coda="",t.codaSquare="",t.conductorBeat2Compound="",t.conductorBeat2Simple="",t.conductorBeat3Compound="",t.conductorBeat3Simple="",t.conductorBeat4Compound="",t.conductorBeat4Simple="",t.conductorLeftBeat="",t.conductorRightBeat="",t.conductorStrongBeat="",t.conductorUnconducted="",t.conductorWeakBeat="";t.controlBeginBeam="",t.controlBeginPhrase="",t.controlBeginSlur="",t.controlBeginTie="",t.controlEndBeam="",t.controlEndPhrase="",t.controlEndSlur="",t.controlEndTie="",t.csymAccidentalDoubleFlat="",t.csymAccidentalDoubleSharp="",t.csymAccidentalFlat="",t.csymAccidentalNatural="",t.csymAccidentalSharp="",t.csymAccidentalTripleFlat="",t.csymAccidentalTripleSharp="",t.csymAlteredBassSlash="",t.csymAugmented="",t.csymBracketLeftTall="",t.csymBracketRightTall="",t.csymDiagonalArrangementSlash="",t.csymDiminished="",t.csymHalfDiminished="",t.csymMajorSeventh="",t.csymMinor="",t.csymParensLeftTall="",t.csymParensLeftVeryTall="",t.csymParensRightTall="",t.csymParensRightVeryTall="",t.curlewSign="",t.daCapo="",t.dalSegno="",t.daseianExcellentes1="",t.daseianExcellentes2="",t.daseianExcellentes3="",t.daseianExcellentes4="",t.daseianFinales1="",t.daseianFinales2="",t.daseianFinales3="",t.daseianFinales4="",t.daseianGraves1="",t.daseianGraves2="",t.daseianGraves3="",t.daseianGraves4="",t.daseianResidua1="",t.daseianResidua2="",t.daseianSuperiores1="",t.daseianSuperiores2="",t.daseianSuperiores3="",t.daseianSuperiores4="",t.doubleLateralRollStevens="",t.doubleTongueAbove="",t.doubleTongueBelow="",t.dynamicCombinedSeparatorColon="",t.dynamicCombinedSeparatorHyphen="",t.dynamicCombinedSeparatorSlash="",t.dynamicCombinedSeparatorSpace="",t.dynamicCrescendoHairpin="",t.dynamicDiminuendoHairpin="",t.dynamicFF="",t.dynamicFFF="",t.dynamicFFFF="",t.dynamicFFFFF="",t.dynamicFFFFFF="",t.dynamicForte="",t.dynamicFortePiano="",t.dynamicForzando="",t.dynamicHairpinBracketLeft="",t.dynamicHairpinBracketRight="",t.dynamicHairpinParenthesisLeft="",t.dynamicHairpinParenthesisRight="",t.dynamicMF="",t.dynamicMP="",t.dynamicMessaDiVoce="",t.dynamicMezzo="",t.dynamicNiente="",t.dynamicNienteForHairpin="",t.dynamicPF="",t.dynamicPP="",t.dynamicPPP="",t.dynamicPPPP="",t.dynamicPPPPP="",t.dynamicPPPPPP="",t.dynamicPiano="",t.dynamicRinforzando="",t.dynamicRinforzando1="",t.dynamicRinforzando2="",t.dynamicSforzando="",t.dynamicSforzando1="",t.dynamicSforzandoPianissimo="",t.dynamicSforzandoPiano="",t.dynamicSforzato="",t.dynamicSforzatoFF="",t.dynamicSforzatoPiano="",t.dynamicZ="",t.elecAudioChannelsEight="",t.elecAudioChannelsFive="",t.elecAudioChannelsFour="",t.elecAudioChannelsOne="",t.elecAudioChannelsSeven="",t.elecAudioChannelsSix="",t.elecAudioChannelsThreeFrontal="",t.elecAudioChannelsThreeSurround="",t.elecAudioChannelsTwo="",t.elecAudioIn="",t.elecAudioMono="",t.elecAudioOut="",t.elecAudioStereo="",t.elecCamera="",t.elecDataIn="",t.elecDataOut="",t.elecDisc="",t.elecDownload="",t.elecEject="",t.elecFastForward="",t.elecHeadphones="",t.elecHeadset="",t.elecLineIn="",t.elecLineOut="",t.elecLoop="",t.elecLoudspeaker="",t.elecMIDIController0="",t.elecMIDIController100="",t.elecMIDIController20="",t.elecMIDIController40="",t.elecMIDIController60="",t.elecMIDIController80="",t.elecMIDIIn="",t.elecMIDIOut="",t.elecMicrophone="",t.elecMicrophoneMute="",t.elecMicrophoneUnmute="",t.elecMixingConsole="",t.elecMonitor="",t.elecMute="",t.elecPause="",t.elecPlay="",t.elecPowerOnOff="",t.elecProjector="",t.elecReplay="",t.elecRewind="",t.elecShuffle="",t.elecSkipBackwards="",t.elecSkipForwards="",t.elecStop="",t.elecTape="",t.elecUSB="",t.elecUnmute="",t.elecUpload="",t.elecVideoCamera="",t.elecVideoIn="",t.elecVideoOut="",t.elecVolumeFader="",t.elecVolumeFaderThumb="",t.elecVolumeLevel0="",t.elecVolumeLevel100="",t.elecVolumeLevel20="",t.elecVolumeLevel40="",t.elecVolumeLevel60="",t.elecVolumeLevel80="",t.fClef="",t.fClef15ma="",t.fClef15mb="",t.fClef8va="",t.fClef8vb="",t.fClefArrowDown="",t.fClefArrowUp="",t.fClefChange="",t.fClefReversed="",t.fClefTurned="",t.fermataAbove="",t.fermataBelow="",t.fermataLongAbove="",t.fermataLongBelow="",t.fermataLongHenzeAbove="",t.fermataLongHenzeBelow="",t.fermataShortAbove="",t.fermataShortBelow="",t.fermataShortHenzeAbove="",t.fermataShortHenzeBelow="",t.fermataVeryLongAbove="",t.fermataVeryLongBelow="",t.fermataVeryShortAbove="",t.fermataVeryShortBelow="",t.figbass0="",t.figbass1="",t.figbass2="",t.figbass2Raised="",t.figbass3="",t.figbass4="",t.figbass4Raised="",t.figbass5="",t.figbass5Raised1="",t.figbass5Raised2="",t.figbass5Raised3="",t.figbass6="",t.figbass6Raised="",t.figbass6Raised2="",t.figbass7="",t.figbass7Diminished="",t.figbass7Raised1="",t.figbass7Raised2="",t.figbass8="",t.figbass9="",t.figbass9Raised="",t.figbassBracketLeft="",t.figbassBracketRight="",t.figbassCombiningLowering="",t.figbassCombiningRaising="",t.figbassDoubleFlat="",t.figbassDoubleSharp="",t.figbassFlat="",t.figbassNatural="",t.figbassParensLeft="",t.figbassParensRight="",t.figbassPlus="",t.figbassSharp="",t.figbassTripleFlat="",t.figbassTripleSharp="",t.fingering0="",t.fingering0Italic="",t.fingering1="",t.fingering1Italic="",t.fingering2="",t.fingering2Italic="",t.fingering3="",t.fingering3Italic="",t.fingering4="",t.fingering4Italic="",t.fingering5="",t.fingering5Italic="",t.fingering6="",t.fingering6Italic="",t.fingering7="",t.fingering7Italic="",t.fingering8="",t.fingering8Italic="",t.fingering9="",t.fingering9Italic="",t.fingeringALower="",t.fingeringCLower="",t.fingeringELower="",t.fingeringILower="",t.fingeringLeftBracket="",t.fingeringLeftBracketItalic="",t.fingeringLeftParenthesis="",t.fingeringLeftParenthesisItalic="",t.fingeringMLower="",t.fingeringMultipleNotes="",t.fingeringOLower="",t.fingeringPLower="",t.fingeringQLower="",t.fingeringRightBracket="",t.fingeringRightBracketItalic="",t.fingeringRightParenthesis="",t.fingeringRightParenthesisItalic="",t.fingeringSLower="",t.fingeringSeparatorMiddleDot="",t.fingeringSeparatorMiddleDotWhite="",t.fingeringSeparatorSlash="",t.fingeringSubstitutionAbove="",t.fingeringSubstitutionBelow="",t.fingeringSubstitutionDash="",t.fingeringTLower="",t.fingeringTUpper="",t.fingeringXLower="",t.flag1024thDown="",t.flag1024thUp="",t.flag128thDown="",t.flag128thUp="",t.flag16thDown="",t.flag16thUp="",t.flag256thDown="",t.flag256thUp="",t.flag32ndDown="",t.flag32ndUp="",t.flag512thDown="",t.flag512thUp="",t.flag64thDown="",t.flag64thUp="",t.flag8thDown="",t.flag8thUp="",t.flagInternalDown="",t.flagInternalUp="",t.fretboard3String="",t.fretboard3StringNut="",t.fretboard4String="",t.fretboard4StringNut="",t.fretboard5String="",t.fretboard5StringNut="",t.fretboard6String="",t.fretboard6StringNut="",t.fretboardFilledCircle="",t.fretboardO="",t.fretboardX="",t.functionAngleLeft="",t.functionAngleRight="",t.functionBracketLeft="",t.functionBracketRight="",t.functionDD="",t.functionDLower="",t.functionDUpper="",t.functionEight="",t.functionFUpper="",t.functionFive="",t.functionFour="",t.functionGLower="",t.functionGUpper="",t.functionGreaterThan="",t.functionILower="",t.functionIUpper="",t.functionKLower="",t.functionKUpper="",t.functionLLower="",t.functionLUpper="",t.functionLessThan="",t.functionMLower="",t.functionMUpper="",t.functionMinus="",t.functionNLower="",t.functionNUpper="",t.functionNUpperSuperscript="",t.functionNine="",t.functionOne="",t.functionPLower="",t.functionPUpper="",t.functionParensLeft="",t.functionParensRight="",t.functionPlus="",t.functionRLower="",t.functionRepetition1="",t.functionRepetition2="",t.functionRing="",t.functionSLower="",t.functionSSLower="",t.functionSSUpper="",t.functionSUpper="",t.functionSeven="",t.functionSix="",t.functionSlashedDD="",t.functionTLower="",t.functionTUpper="",t.functionThree="",t.functionTwo="",t.functionVLower="",t.functionVUpper="",t.functionZero="",t.gClef="",t.gClef15ma="",t.gClef15mb="",t.gClef8va="",t.gClef8vb="",t.gClef8vbCClef="",t.gClef8vbOld="",t.gClef8vbParens="",t.gClefArrowDown="",t.gClefArrowUp="",t.gClefChange="",t.gClefLigatedNumberAbove="",t.gClefLigatedNumberBelow="",t.gClefReversed="",t.gClefTurned="",t.glissandoDown="",t.glissandoUp="",t.graceNoteAcciaccaturaStemDown="",t.graceNoteAcciaccaturaStemUp="",t.graceNoteAppoggiaturaStemDown="",t.graceNoteAppoggiaturaStemUp="",t.graceNoteSlashStemDown="",t.graceNoteSlashStemUp="",t.guitarBarreFull="",t.guitarBarreHalf="",t.guitarClosePedal="",t.guitarFadeIn="",t.guitarFadeOut="",t.guitarGolpe="",t.guitarHalfOpenPedal="",t.guitarLeftHandTapping="",t.guitarOpenPedal="",t.guitarRightHandTapping="",t.guitarShake="",t.guitarString0="",t.guitarString1="",t.guitarString10="",t.guitarString11="",t.guitarString12="",t.guitarString13="",t.guitarString2="",t.guitarString3="",t.guitarString4="",t.guitarString5="",t.guitarString6="",t.guitarString7="",t.guitarString8="",t.guitarString9="",t.guitarStrumDown="",t.guitarStrumUp="",t.guitarVibratoBarDip="",t.guitarVibratoBarScoop="",t.guitarVibratoStroke="",t.guitarVolumeSwell="",t.guitarWideVibratoStroke="",t.handbellsBelltree="",t.handbellsDamp3="",t.handbellsEcho1="",t.handbellsEcho2="",t.handbellsGyro="",t.handbellsHandMartellato="",t.handbellsMalletBellOnTable="",t.handbellsMalletBellSuspended="",t.handbellsMalletLft="",t.handbellsMartellato="",t.handbellsMartellatoLift="",t.handbellsMutedMartellato="",t.handbellsPluckLift="",t.handbellsSwing="",t.handbellsSwingDown="",t.handbellsSwingUp="",t.handbellsTablePairBells="",t.handbellsTableSingleBell="",t.harpMetalRod="",t.harpPedalCentered="",t.harpPedalDivider="",t.harpPedalLowered="",t.harpPedalRaised="",t.harpSalzedoAeolianAscending="",t.harpSalzedoAeolianDescending="",t.harpSalzedoDampAbove="",t.harpSalzedoDampBelow="",t.harpSalzedoDampBothHands="",t.harpSalzedoDampLowStrings="",t.harpSalzedoFluidicSoundsLeft="",t.harpSalzedoFluidicSoundsRight="",t.harpSalzedoIsolatedSounds="",t.harpSalzedoMetallicSounds="",t.harpSalzedoMetallicSoundsOneString="",t.harpSalzedoMuffleTotally="",t.harpSalzedoOboicFlux="",t.harpSalzedoPlayUpperEnd="",t.harpSalzedoSlideWithSuppleness="",t.harpSalzedoSnareDrum="",t.harpSalzedoTamTamSounds="",t.harpSalzedoThunderEffect="",t.harpSalzedoTimpanicSounds="",t.harpSalzedoWhistlingSounds="",t.harpStringNoiseStem="",t.harpTuningKey="",t.harpTuningKeyGlissando="",t.harpTuningKeyHandle="",t.harpTuningKeyShank="",t.indianDrumClef="",t.kahnBackChug="",t.kahnBackFlap="",t.kahnBackRiff="",t.kahnBackRip="",t.kahnBallChange="",t.kahnBallDig="",t.kahnBrushBackward="",t.kahnBrushForward="",t.kahnChug="",t.kahnClap="",t.kahnDoubleSnap="",t.kahnDoubleWing="",t.kahnDrawStep="",t.kahnDrawTap="",t.kahnFlam="",t.kahnFlap="",t.kahnFlapStep="",t.kahnFlat="",t.kahnFleaHop="",t.kahnFleaTap="",t.kahnGraceTap="",t.kahnGraceTapChange="",t.kahnGraceTapHop="",t.kahnGraceTapStamp="",t.kahnHeel="",t.kahnHeelChange="",t.kahnHeelClick="",t.kahnHeelDrop="",t.kahnHeelStep="",t.kahnHeelTap="",t.kahnHop="",t.kahnJumpApart="",t.kahnJumpTogether="",t.kahnKneeInward="",t.kahnKneeOutward="",t.kahnLeap="",t.kahnLeapFlatFoot="",t.kahnLeapHeelClick="",t.kahnLeftCatch="",t.kahnLeftCross="",t.kahnLeftFoot="",t.kahnLeftToeStrike="",t.kahnLeftTurn="",t.kahnOverTheTop="",t.kahnOverTheTopTap="",t.kahnPull="",t.kahnPush="",t.kahnRiff="",t.kahnRiffle="",t.kahnRightCatch="",t.kahnRightCross="",t.kahnRightFoot="",t.kahnRightToeStrike="",t.kahnRightTurn="",t.kahnRip="",t.kahnRipple="",t.kahnScrape="",t.kahnScuff="",t.kahnScuffle="",t.kahnShuffle="",t.kahnSlam="",t.kahnSlap="",t.kahnSlideStep="",t.kahnSlideTap="",t.kahnSnap="",t.kahnStamp="",t.kahnStampStamp="",t.kahnStep="",t.kahnStepStamp="",t.kahnStomp="",t.kahnStompBrush="",t.kahnTap="",t.kahnToe="",t.kahnToeClick="",t.kahnToeDrop="",t.kahnToeStep="",t.kahnToeTap="",t.kahnTrench="",t.kahnWing="",t.kahnWingChange="",t.kahnZank="",t.kahnZink="",t.keyboardBebung2DotsAbove="",t.keyboardBebung2DotsBelow="",t.keyboardBebung3DotsAbove="",t.keyboardBebung3DotsBelow="",t.keyboardBebung4DotsAbove="",t.keyboardBebung4DotsBelow="",t.keyboardLeftPedalPictogram="",t.keyboardMiddlePedalPictogram="",t.keyboardPedalD="",t.keyboardPedalDot="",t.keyboardPedalE="",t.keyboardPedalHalf="",t.keyboardPedalHalf2="",t.keyboardPedalHalf3="",t.keyboardPedalHeel1="",t.keyboardPedalHeel2="",t.keyboardPedalHeel3="",t.keyboardPedalHeelToToe="",t.keyboardPedalHeelToe="",t.keyboardPedalHookEnd="",t.keyboardPedalHookStart="",t.keyboardPedalHyphen="",t.keyboardPedalP="",t.keyboardPedalParensLeft="",t.keyboardPedalParensRight="",t.keyboardPedalPed="",t.keyboardPedalS="",t.keyboardPedalSost="",t.keyboardPedalToe1="",t.keyboardPedalToe2="",t.keyboardPedalToeToHeel="",t.keyboardPedalUp="",t.keyboardPedalUpNotch="",t.keyboardPedalUpSpecial="",t.keyboardPlayWithLH="",t.keyboardPlayWithLHEnd="",t.keyboardPlayWithRH="",t.keyboardPlayWithRHEnd="",t.keyboardPluckInside="",t.keyboardRightPedalPictogram="",t.kievanAccidentalFlat="",t.kievanAccidentalSharp="",t.kievanAugmentationDot="",t.kievanCClef="",t.kievanEndingSymbol="",t.kievanNote8thStemDown="",t.kievanNote8thStemUp="",t.kievanNoteBeam="",t.kievanNoteHalfStaffLine="",t.kievanNoteHalfStaffSpace="",t.kievanNoteQuarterStemDown="",t.kievanNoteQuarterStemUp="",t.kievanNoteReciting="",t.kievanNoteWhole="",t.kievanNoteWholeFinal="",t.kodalyHandDo="",t.kodalyHandFa="",t.kodalyHandLa="",t.kodalyHandMi="",t.kodalyHandRe="",t.kodalyHandSo="",t.kodalyHandTi="",t.leftRepeatSmall="",t.legerLine="",t.legerLineNarrow="",t.legerLineWide="",t.luteBarlineEndRepeat="",t.luteBarlineFinal="",t.luteBarlineStartRepeat="",t.luteDuration16th="",t.luteDuration32nd="",t.luteDuration8th="",t.luteDurationDoubleWhole="",t.luteDurationHalf="",t.luteDurationQuarter="",t.luteDurationWhole="",t.luteFingeringRHFirst="",t.luteFingeringRHSecond="",t.luteFingeringRHThird="",t.luteFingeringRHThumb="",t.luteFrench10thCourse="",t.luteFrench7thCourse="",t.luteFrench8thCourse="",t.luteFrench9thCourse="",t.luteFrenchAppoggiaturaAbove="",t.luteFrenchAppoggiaturaBelow="",t.luteFrenchFretA="",t.luteFrenchFretB="",t.luteFrenchFretC="",t.luteFrenchFretD="",t.luteFrenchFretE="",t.luteFrenchFretF="",t.luteFrenchFretG="",t.luteFrenchFretH="",t.luteFrenchFretI="",t.luteFrenchFretK="",t.luteFrenchFretL="",t.luteFrenchFretM="",t.luteFrenchFretN="",t.luteFrenchMordentInverted="",t.luteFrenchMordentLower="",t.luteFrenchMordentUpper="",t.luteGermanALower="",t.luteGermanAUpper="",t.luteGermanBLower="",t.luteGermanBUpper="",t.luteGermanCLower="",t.luteGermanCUpper="",t.luteGermanDLower="",t.luteGermanDUpper="",t.luteGermanELower="",t.luteGermanEUpper="",t.luteGermanFLower="",t.luteGermanFUpper="",t.luteGermanGLower="",t.luteGermanGUpper="",t.luteGermanHLower="",t.luteGermanHUpper="",t.luteGermanILower="",t.luteGermanIUpper="",t.luteGermanKLower="",t.luteGermanKUpper="",t.luteGermanLLower="",t.luteGermanLUpper="",t.luteGermanMLower="",t.luteGermanMUpper="",t.luteGermanNLower="",t.luteGermanNUpper="",t.luteGermanOLower="",t.luteGermanPLower="",t.luteGermanQLower="",t.luteGermanRLower="",t.luteGermanSLower="",t.luteGermanTLower="",t.luteGermanVLower="",t.luteGermanXLower="",t.luteGermanYLower="",t.luteGermanZLower="",t.luteItalianClefCSolFaUt="",t.luteItalianClefFFaUt="",t.luteItalianFret0="",t.luteItalianFret1="",t.luteItalianFret2="",t.luteItalianFret3="",t.luteItalianFret4="",t.luteItalianFret5="",t.luteItalianFret6="",t.luteItalianFret7="",t.luteItalianFret8="",t.luteItalianFret9="",t.luteItalianHoldFinger="",t.luteItalianHoldNote="",t.luteItalianReleaseFinger="",t.luteItalianTempoFast="",t.luteItalianTempoNeitherFastNorSlow="",t.luteItalianTempoSlow="",t.luteItalianTempoSomewhatFast="",t.luteItalianTempoVerySlow="",t.luteItalianTimeTriple="",t.luteItalianTremolo="",t.luteItalianVibrato="",t.luteStaff6Lines="",t.luteStaff6LinesNarrow="",t.luteStaff6LinesWide="",t.lyricsElision="",t.lyricsElisionNarrow="",t.lyricsElisionWide="",t.lyricsHyphenBaseline="",t.lyricsHyphenBaselineNonBreaking="",t.lyricsTextRepeat="",t.medRenFlatHardB="",t.medRenFlatSoftB="",t.medRenFlatWithDot="",t.medRenGClefCMN="",t.medRenLiquescenceCMN="",t.medRenLiquescentAscCMN="",t.medRenLiquescentDescCMN="",t.medRenNatural="",t.medRenNaturalWithCross="",t.medRenOriscusCMN="",t.medRenPlicaCMN="",t.medRenPunctumCMN="",t.medRenQuilismaCMN="",t.medRenSharpCroix="",t.medRenStrophicusCMN="",t.mensuralAlterationSign="",t.mensuralBlackBrevis="",t.mensuralBlackBrevisVoid="",t.mensuralBlackDragma="",t.mensuralBlackLonga="",t.mensuralBlackMaxima="",t.mensuralBlackMinima="",t.mensuralBlackMinimaVoid="",t.mensuralBlackSemibrevis="",t.mensuralBlackSemibrevisCaudata="",t.mensuralBlackSemibrevisOblique="",t.mensuralBlackSemibrevisVoid="",t.mensuralBlackSemiminima="",t.mensuralCclef="",t.mensuralCclefPetrucciPosHigh="",t.mensuralCclefPetrucciPosHighest="",t.mensuralCclefPetrucciPosLow="",t.mensuralCclefPetrucciPosLowest="",t.mensuralCclefPetrucciPosMiddle="",t.mensuralColorationEndRound="",t.mensuralColorationEndSquare="",t.mensuralColorationStartRound="",t.mensuralColorationStartSquare="",t.mensuralCombStemDiagonal="",t.mensuralCombStemDown="",t.mensuralCombStemDownFlagExtended="",t.mensuralCombStemDownFlagFlared="",t.mensuralCombStemDownFlagFusa="",t.mensuralCombStemDownFlagLeft="",t.mensuralCombStemDownFlagRight="",t.mensuralCombStemDownFlagSemiminima="",t.mensuralCombStemUp="",t.mensuralCombStemUpFlagExtended="",t.mensuralCombStemUpFlagFlared="",t.mensuralCombStemUpFlagFusa="",t.mensuralCombStemUpFlagLeft="",t.mensuralCombStemUpFlagRight="",t.mensuralCombStemUpFlagSemiminima="",t.mensuralCustosCheckmark="",t.mensuralCustosDown="",t.mensuralCustosTurn="",t.mensuralCustosUp="",t.mensuralFclef="",t.mensuralFclefPetrucci="",t.mensuralGclef="",t.mensuralGclefPetrucci="",t.mensuralModusImperfectumVert="",t.mensuralModusPerfectumVert="",t.mensuralNoteheadLongaBlack="",t.mensuralNoteheadLongaBlackVoid="",t.mensuralNoteheadLongaVoid="",t.mensuralNoteheadLongaWhite="",t.mensuralNoteheadMaximaBlack="",t.mensuralNoteheadMaximaBlackVoid="",t.mensuralNoteheadMaximaVoid="",t.mensuralNoteheadMaximaWhite="",t.mensuralNoteheadMinimaWhite="",t.mensuralNoteheadSemibrevisBlack="",t.mensuralNoteheadSemibrevisBlackVoid="",t.mensuralNoteheadSemibrevisBlackVoidTurned="",t.mensuralNoteheadSemibrevisVoid="",t.mensuralNoteheadSemiminimaWhite="",t.mensuralObliqueAsc2ndBlack="",t.mensuralObliqueAsc2ndBlackVoid="",t.mensuralObliqueAsc2ndVoid="",t.mensuralObliqueAsc2ndWhite="",t.mensuralObliqueAsc3rdBlack="",t.mensuralObliqueAsc3rdBlackVoid="",t.mensuralObliqueAsc3rdVoid="",t.mensuralObliqueAsc3rdWhite="",t.mensuralObliqueAsc4thBlack="",t.mensuralObliqueAsc4thBlackVoid="",t.mensuralObliqueAsc4thVoid="",t.mensuralObliqueAsc4thWhite="",t.mensuralObliqueAsc5thBlack="",t.mensuralObliqueAsc5thBlackVoid="",t.mensuralObliqueAsc5thVoid="",t.mensuralObliqueAsc5thWhite="",t.mensuralObliqueDesc2ndBlack="",t.mensuralObliqueDesc2ndBlackVoid="",t.mensuralObliqueDesc2ndVoid="",t.mensuralObliqueDesc2ndWhite="",t.mensuralObliqueDesc3rdBlack="";t.mensuralObliqueDesc3rdBlackVoid="",t.mensuralObliqueDesc3rdVoid="",t.mensuralObliqueDesc3rdWhite="",t.mensuralObliqueDesc4thBlack="",t.mensuralObliqueDesc4thBlackVoid="",t.mensuralObliqueDesc4thVoid="",t.mensuralObliqueDesc4thWhite="",t.mensuralObliqueDesc5thBlack="",t.mensuralObliqueDesc5thBlackVoid="",t.mensuralObliqueDesc5thVoid="",t.mensuralObliqueDesc5thWhite="",t.mensuralProlation1="",t.mensuralProlation10="",t.mensuralProlation11="",t.mensuralProlation2="",t.mensuralProlation3="",t.mensuralProlation4="",t.mensuralProlation5="",t.mensuralProlation6="",t.mensuralProlation7="",t.mensuralProlation8="",t.mensuralProlation9="",t.mensuralProlationCombiningDot="",t.mensuralProlationCombiningDotVoid="",t.mensuralProlationCombiningStroke="",t.mensuralProlationCombiningThreeDots="",t.mensuralProlationCombiningThreeDotsTri="",t.mensuralProlationCombiningTwoDots="",t.mensuralProportion1="",t.mensuralProportion2="",t.mensuralProportion3="",t.mensuralProportion4="",t.mensuralProportion5="",t.mensuralProportion6="",t.mensuralProportion7="",t.mensuralProportion8="",t.mensuralProportion9="",t.mensuralProportionMajor="",t.mensuralProportionMinor="",t.mensuralProportionProportioDupla1="",t.mensuralProportionProportioDupla2="",t.mensuralProportionProportioQuadrupla="",t.mensuralProportionProportioTripla="",t.mensuralProportionTempusPerfectum="",t.mensuralRestBrevis="",t.mensuralRestFusa="",t.mensuralRestLongaImperfecta="",t.mensuralRestLongaPerfecta="",t.mensuralRestMaxima="",t.mensuralRestMinima="",t.mensuralRestSemibrevis="",t.mensuralRestSemifusa="",t.mensuralRestSemiminima="",t.mensuralSignumDown="",t.mensuralSignumUp="",t.mensuralTempusImperfectumHoriz="",t.mensuralTempusPerfectumHoriz="",t.mensuralWhiteBrevis="",t.mensuralWhiteFusa="",t.mensuralWhiteLonga="",t.mensuralWhiteMaxima="",t.mensuralWhiteMinima="",t.mensuralWhiteSemibrevis="",t.mensuralWhiteSemiminima="",t.metAugmentationDot="",t.metNote1024thDown="",t.metNote1024thUp="",t.metNote128thDown="",t.metNote128thUp="",t.metNote16thDown="",t.metNote16thUp="",t.metNote256thDown="",t.metNote256thUp="",t.metNote32ndDown="",t.metNote32ndUp="",t.metNote512thDown="",t.metNote512thUp="",t.metNote64thDown="",t.metNote64thUp="",t.metNote8thDown="",t.metNote8thUp="",t.metNoteDoubleWhole="",t.metNoteDoubleWholeSquare="",t.metNoteHalfDown="",t.metNoteHalfUp="",t.metNoteQuarterDown="",t.metNoteQuarterUp="",t.metNoteWhole="",t.metricModulationArrowLeft="",t.metricModulationArrowRight="",t.miscDoNotCopy="",t.miscDoNotPhotocopy="",t.miscEyeglasses="",t.note1024thDown="",t.note1024thUp="",t.note128thDown="",t.note128thUp="",t.note16thDown="",t.note16thUp="",t.note256thDown="",t.note256thUp="",t.note32ndDown="",t.note32ndUp="",t.note512thDown="",t.note512thUp="",t.note64thDown="",t.note64thUp="",t.note8thDown="",t.note8thUp="",t.noteABlack="",t.noteAFlatBlack="",t.noteAFlatHalf="",t.noteAFlatWhole="",t.noteAHalf="",t.noteASharpBlack="",t.noteASharpHalf="",t.noteASharpWhole="",t.noteAWhole="",t.noteBBlack="",t.noteBFlatBlack="",t.noteBFlatHalf="",t.noteBFlatWhole="",t.noteBHalf="",t.noteBSharpBlack="",t.noteBSharpHalf="",t.noteBSharpWhole="",t.noteBWhole="",t.noteCBlack="",t.noteCFlatBlack="",t.noteCFlatHalf="",t.noteCFlatWhole="",t.noteCHalf="",t.noteCSharpBlack="",t.noteCSharpHalf="",t.noteCSharpWhole="",t.noteCWhole="",t.noteDBlack="",t.noteDFlatBlack="",t.noteDFlatHalf="",t.noteDFlatWhole="",t.noteDHalf="",t.noteDSharpBlack="",t.noteDSharpHalf="",t.noteDSharpWhole="",t.noteDWhole="",t.noteDiBlack="",t.noteDiHalf="",t.noteDiWhole="",t.noteDoBlack="",t.noteDoHalf="",t.noteDoWhole="",t.noteDoubleWhole="",t.noteDoubleWholeSquare="",t.noteEBlack="",t.noteEFlatBlack="",t.noteEFlatHalf="",t.noteEFlatWhole="",t.noteEHalf="",t.noteESharpBlack="",t.noteESharpHalf="",t.noteESharpWhole="",t.noteEWhole="",t.noteEmptyBlack="",t.noteEmptyHalf="",t.noteEmptyWhole="",t.noteFBlack="",t.noteFFlatBlack="",t.noteFFlatHalf="",t.noteFFlatWhole="",t.noteFHalf="",t.noteFSharpBlack="",t.noteFSharpHalf="",t.noteFSharpWhole="",t.noteFWhole="",t.noteFaBlack="",t.noteFaHalf="",t.noteFaWhole="",t.noteFiBlack="",t.noteFiHalf="",t.noteFiWhole="",t.noteGBlack="",t.noteGFlatBlack="",t.noteGFlatHalf="",t.noteGFlatWhole="",t.noteGHalf="",t.noteGSharpBlack="",t.noteGSharpHalf="",t.noteGSharpWhole="",t.noteGWhole="",t.noteHBlack="",t.noteHHalf="",t.noteHSharpBlack="",t.noteHSharpHalf="",t.noteHSharpWhole="",t.noteHWhole="",t.noteHalfDown="",t.noteHalfUp="",t.noteLaBlack="",t.noteLaHalf="",t.noteLaWhole="",t.noteLeBlack="",t.noteLeHalf="",t.noteLeWhole="",t.noteLiBlack="",t.noteLiHalf="",t.noteLiWhole="",t.noteMeBlack="",t.noteMeHalf="",t.noteMeWhole="",t.noteMiBlack="",t.noteMiHalf="",t.noteMiWhole="",t.noteQuarterDown="",t.noteQuarterUp="",t.noteRaBlack="",t.noteRaHalf="",t.noteRaWhole="",t.noteReBlack="",t.noteReHalf="",t.noteReWhole="",t.noteRiBlack="",t.noteRiHalf="",t.noteRiWhole="",t.noteSeBlack="",t.noteSeHalf="",t.noteSeWhole="",t.noteShapeArrowheadLeftBlack="",t.noteShapeArrowheadLeftDoubleWhole="",t.noteShapeArrowheadLeftWhite="",t.noteShapeDiamondBlack="",t.noteShapeDiamondDoubleWhole="",t.noteShapeDiamondWhite="",t.noteShapeIsoscelesTriangleBlack="",t.noteShapeIsoscelesTriangleDoubleWhole="",t.noteShapeIsoscelesTriangleWhite="",t.noteShapeKeystoneBlack="",t.noteShapeKeystoneDoubleWhole="",t.noteShapeKeystoneWhite="",t.noteShapeMoonBlack="",t.noteShapeMoonDoubleWhole="",t.noteShapeMoonLeftBlack="",t.noteShapeMoonLeftDoubleWhole="",t.noteShapeMoonLeftWhite="",t.noteShapeMoonWhite="",t.noteShapeQuarterMoonBlack="",t.noteShapeQuarterMoonDoubleWhole="",t.noteShapeQuarterMoonWhite="",t.noteShapeRoundBlack="",t.noteShapeRoundDoubleWhole="",t.noteShapeRoundWhite="",t.noteShapeSquareBlack="",t.noteShapeSquareDoubleWhole="",t.noteShapeSquareWhite="",t.noteShapeTriangleLeftBlack="",t.noteShapeTriangleLeftDoubleWhole="",t.noteShapeTriangleLeftWhite="",t.noteShapeTriangleRightBlack="",t.noteShapeTriangleRightDoubleWhole="",t.noteShapeTriangleRightWhite="",t.noteShapeTriangleRoundBlack="",t.noteShapeTriangleRoundDoubleWhole="",t.noteShapeTriangleRoundLeftBlack="",t.noteShapeTriangleRoundLeftDoubleWhole="",t.noteShapeTriangleRoundLeftWhite="",t.noteShapeTriangleRoundWhite="",t.noteShapeTriangleUpBlack="",t.noteShapeTriangleUpDoubleWhole="",t.noteShapeTriangleUpWhite="",t.noteSiBlack="",t.noteSiHalf="",t.noteSiWhole="",t.noteSoBlack="",t.noteSoHalf="",t.noteSoWhole="",t.noteTeBlack="",t.noteTeHalf="",t.noteTeWhole="",t.noteTiBlack="",t.noteTiHalf="",t.noteTiWhole="",t.noteWhole="",t.noteheadBlack="",t.noteheadCircleSlash="",t.noteheadCircleX="",t.noteheadCircleXDoubleWhole="",t.noteheadCircleXHalf="",t.noteheadCircleXWhole="",t.noteheadCircledBlack="",t.noteheadCircledBlackLarge="",t.noteheadCircledDoubleWhole="",t.noteheadCircledDoubleWholeLarge="",t.noteheadCircledHalf="",t.noteheadCircledHalfLarge="",t.noteheadCircledWhole="",t.noteheadCircledWholeLarge="",t.noteheadCircledXLarge="",t.noteheadClusterDoubleWhole2nd="",t.noteheadClusterDoubleWhole3rd="",t.noteheadClusterDoubleWholeBottom="",t.noteheadClusterDoubleWholeMiddle="",t.noteheadClusterDoubleWholeTop="",t.noteheadClusterHalf2nd="",t.noteheadClusterHalf3rd="",t.noteheadClusterHalfBottom="",t.noteheadClusterHalfMiddle="",t.noteheadClusterHalfTop="",t.noteheadClusterQuarter2nd="",t.noteheadClusterQuarter3rd="",t.noteheadClusterQuarterBottom="",t.noteheadClusterQuarterMiddle="",t.noteheadClusterQuarterTop="",t.noteheadClusterRoundBlack="",t.noteheadClusterRoundWhite="",t.noteheadClusterSquareBlack="",t.noteheadClusterSquareWhite="",t.noteheadClusterWhole2nd="",t.noteheadClusterWhole3rd="",t.noteheadClusterWholeBottom="",t.noteheadClusterWholeMiddle="",t.noteheadClusterWholeTop="",t.noteheadCowellEleventhNoteSeriesHalf="",t.noteheadCowellEleventhNoteSeriesWhole="",t.noteheadCowellEleventhSeriesBlack="",t.noteheadCowellFifteenthNoteSeriesBlack="",t.noteheadCowellFifteenthNoteSeriesHalf="",t.noteheadCowellFifteenthNoteSeriesWhole="",t.noteheadCowellFifthNoteSeriesBlack="",t.noteheadCowellFifthNoteSeriesHalf="",t.noteheadCowellFifthNoteSeriesWhole="",t.noteheadCowellNinthNoteSeriesBlack="",t.noteheadCowellNinthNoteSeriesHalf="",t.noteheadCowellNinthNoteSeriesWhole="",t.noteheadCowellSeventhNoteSeriesBlack="",t.noteheadCowellSeventhNoteSeriesHalf="",t.noteheadCowellSeventhNoteSeriesWhole="",t.noteheadCowellThirdNoteSeriesBlack="",t.noteheadCowellThirdNoteSeriesHalf="",t.noteheadCowellThirdNoteSeriesWhole="",t.noteheadCowellThirteenthNoteSeriesBlack="",t.noteheadCowellThirteenthNoteSeriesHalf="",t.noteheadCowellThirteenthNoteSeriesWhole="",t.noteheadDiamondBlack="",t.noteheadDiamondBlackOld="",t.noteheadDiamondBlackWide="",t.noteheadDiamondClusterBlack2nd="",t.noteheadDiamondClusterBlack3rd="",t.noteheadDiamondClusterBlackBottom="",t.noteheadDiamondClusterBlackMiddle="",t.noteheadDiamondClusterBlackTop="",t.noteheadDiamondClusterWhite2nd="",t.noteheadDiamondClusterWhite3rd="",t.noteheadDiamondClusterWhiteBottom="",t.noteheadDiamondClusterWhiteMiddle="",t.noteheadDiamondClusterWhiteTop="",t.noteheadDiamondDoubleWhole="",t.noteheadDiamondDoubleWholeOld="",t.noteheadDiamondHalf="",t.noteheadDiamondHalfFilled="",t.noteheadDiamondHalfOld="",t.noteheadDiamondHalfWide="",t.noteheadDiamondOpen="",t.noteheadDiamondWhite="",t.noteheadDiamondWhiteWide="",t.noteheadDiamondWhole="",t.noteheadDiamondWholeOld="",t.noteheadDoubleWhole="",t.noteheadDoubleWholeSquare="",t.noteheadDoubleWholeWithX="",t.noteheadHalf="",t.noteheadHalfFilled="",t.noteheadHalfWithX="",t.noteheadHeavyX="",t.noteheadHeavyXHat="",t.noteheadLargeArrowDownBlack="",t.noteheadLargeArrowDownDoubleWhole="",t.noteheadLargeArrowDownHalf="",t.noteheadLargeArrowDownWhole="",t.noteheadLargeArrowUpBlack="",t.noteheadLargeArrowUpDoubleWhole="",t.noteheadLargeArrowUpHalf="",t.noteheadLargeArrowUpWhole="",t.noteheadMoonBlack="",t.noteheadMoonWhite="",t.noteheadNancarrowSine="",t.noteheadNull="",t.noteheadParenthesis="",t.noteheadParenthesisLeft="",t.noteheadParenthesisRight="",t.noteheadPlusBlack="",t.noteheadPlusDoubleWhole="",t.noteheadPlusHalf="",t.noteheadPlusWhole="",t.noteheadRectangularClusterBlackBottom="",t.noteheadRectangularClusterBlackMiddle="",t.noteheadRectangularClusterBlackTop="",t.noteheadRectangularClusterWhiteBottom="",t.noteheadRectangularClusterWhiteMiddle="",t.noteheadRectangularClusterWhiteTop="",t.noteheadRoundBlack="",t.noteheadRoundBlackDoubleSlashed="",t.noteheadRoundBlackLarge="",t.noteheadRoundBlackSlashed="",t.noteheadRoundBlackSlashedLarge="",t.noteheadRoundWhite="",t.noteheadRoundWhiteDoubleSlashed="",t.noteheadRoundWhiteLarge="",t.noteheadRoundWhiteSlashed="",t.noteheadRoundWhiteSlashedLarge="",t.noteheadRoundWhiteWithDot="",t.noteheadRoundWhiteWithDotLarge="",t.noteheadSlashDiamondWhite="",t.noteheadSlashHorizontalEnds="",t.noteheadSlashHorizontalEndsMuted="",t.noteheadSlashVerticalEnds="",t.noteheadSlashVerticalEndsMuted="",t.noteheadSlashVerticalEndsSmall="",t.noteheadSlashWhiteDoubleWhole="",t.noteheadSlashWhiteHalf="",t.noteheadSlashWhiteMuted="",t.noteheadSlashWhiteWhole="",t.noteheadSlashX="",t.noteheadSlashedBlack1="",t.noteheadSlashedBlack2="",t.noteheadSlashedDoubleWhole1="",t.noteheadSlashedDoubleWhole2="",t.noteheadSlashedHalf1="",t.noteheadSlashedHalf2="",t.noteheadSlashedWhole1="",t.noteheadSlashedWhole2="",t.noteheadSquareBlack="",t.noteheadSquareBlackLarge="",t.noteheadSquareBlackWhite="",t.noteheadSquareWhite="",t.noteheadTriangleDownBlack="",t.noteheadTriangleDownDoubleWhole="",t.noteheadTriangleDownHalf="",t.noteheadTriangleDownWhite="",t.noteheadTriangleDownWhole="",t.noteheadTriangleLeftBlack="",t.noteheadTriangleLeftWhite="",t.noteheadTriangleRightBlack="",t.noteheadTriangleRightWhite="",t.noteheadTriangleRoundDownBlack="",t.noteheadTriangleRoundDownWhite="",t.noteheadTriangleUpBlack="",t.noteheadTriangleUpDoubleWhole="",t.noteheadTriangleUpHalf="",t.noteheadTriangleUpRightBlack="",t.noteheadTriangleUpRightWhite="",t.noteheadTriangleUpWhite="",t.noteheadTriangleUpWhole="",t.noteheadVoidWithX="",t.noteheadWhole="",t.noteheadWholeFilled="",t.noteheadWholeWithX="",t.noteheadXBlack="",t.noteheadXDoubleWhole="",t.noteheadXHalf="",t.noteheadXOrnate="",t.noteheadXOrnateEllipse="",t.noteheadXWhole="",t.octaveBaselineA="",t.octaveBaselineB="",t.octaveBaselineM="",t.octaveBaselineV="",t.octaveBassa="",t.octaveLoco="",t.octaveParensLeft="",t.octaveParensRight="",t.octaveSuperscriptA="",t.octaveSuperscriptB="",t.octaveSuperscriptM="",t.octaveSuperscriptV="",t.oneHandedRollStevens="",t.organGerman2Fusae="",t.organGerman2Minimae="",t.organGerman2OctaveUp="",t.organGerman2Semifusae="",t.organGerman2Semiminimae="",t.organGerman3Fusae="",t.organGerman3Minimae="",t.organGerman3Semifusae="",t.organGerman3Semiminimae="",t.organGerman4Fusae="",t.organGerman4Minimae="",t.organGerman4Semifusae="",t.organGerman4Semiminimae="",t.organGerman5Fusae="",t.organGerman5Minimae="",t.organGerman5Semifusae="",t.organGerman5Semiminimae="",t.organGerman6Fusae="",t.organGerman6Minimae="",t.organGerman6Semifusae="",t.organGerman6Semiminimae="",t.organGermanALower="",t.organGermanAUpper="",t.organGermanAugmentationDot="",t.organGermanBLower="",t.organGermanBUpper="",t.organGermanBuxheimerBrevis2="",t.organGermanBuxheimerBrevis3="",t.organGermanBuxheimerMinimaRest="",t.organGermanBuxheimerSemibrevis="",t.organGermanBuxheimerSemibrevisRest="",t.organGermanCLower="",t.organGermanCUpper="",t.organGermanCisLower="",t.organGermanCisUpper="",t.organGermanDLower="",t.organGermanDUpper="",t.organGermanDisLower="",t.organGermanDisUpper="",t.organGermanELower="",t.organGermanEUpper="",t.organGermanFLower="",t.organGermanFUpper="",t.organGermanFisLower="",t.organGermanFisUpper="",t.organGermanFusa="",t.organGermanFusaRest="",t.organGermanGLower="",t.organGermanGUpper="",t.organGermanGisLower="",t.organGermanGisUpper="",t.organGermanHLower="",t.organGermanHUpper="",t.organGermanMinima="",t.organGermanMinimaRest="",t.organGermanOctaveDown="",t.organGermanOctaveUp="",t.organGermanSemibrevis="",t.organGermanSemibrevisRest="",t.organGermanSemifusa="",t.organGermanSemifusaRest="",t.organGermanSemiminima="",t.organGermanSemiminimaRest="",t.organGermanTie="",t.ornamentBottomLeftConcaveStroke="",t.ornamentBottomLeftConcaveStrokeLarge="",t.ornamentBottomLeftConvexStroke="",t.ornamentBottomRightConcaveStroke="",t.ornamentBottomRightConvexStroke="",t.ornamentComma="",t.ornamentDoubleObliqueLinesAfterNote="",t.ornamentDoubleObliqueLinesBeforeNote="",t.ornamentDownCurve="",t.ornamentHaydn="",t.ornamentHighLeftConcaveStroke="",t.ornamentHighLeftConvexStroke="",t.ornamentHighRightConcaveStroke="",t.ornamentHighRightConvexStroke="",t.ornamentHookAfterNote="",t.ornamentHookBeforeNote="",t.ornamentLeftFacingHalfCircle="",t.ornamentLeftFacingHook="",t.ornamentLeftPlus="",t.ornamentLeftShakeT="",t.ornamentLeftVerticalStroke="",t.ornamentLeftVerticalStrokeWithCross="",t.ornamentLowLeftConcaveStroke="",t.ornamentLowLeftConvexStroke="",t.ornamentLowRightConcaveStroke="",t.ornamentLowRightConvexStroke="",t.ornamentMiddleVerticalStroke="",t.ornamentMordent="",t.ornamentObliqueLineAfterNote="",t.ornamentObliqueLineBeforeNote="",t.ornamentObliqueLineHorizAfterNote="",t.ornamentObliqueLineHorizBeforeNote="",t.ornamentOriscus="",t.ornamentPinceCouperin="",t.ornamentPortDeVoixV="",t.ornamentPrecompAppoggTrill="",t.ornamentPrecompAppoggTrillSuffix="",t.ornamentPrecompCadence="",t.ornamentPrecompCadenceUpperPrefix="",t.ornamentPrecompCadenceUpperPrefixTurn="",t.ornamentPrecompCadenceWithTurn="",t.ornamentPrecompDescendingSlide="",t.ornamentPrecompDoubleCadenceLowerPrefix="",t.ornamentPrecompDoubleCadenceUpperPrefix="",t.ornamentPrecompDoubleCadenceUpperPrefixTurn="",t.ornamentPrecompInvertedMordentUpperPrefix="",t.ornamentPrecompMordentRelease="",t.ornamentPrecompMordentUpperPrefix="",t.ornamentPrecompPortDeVoixMordent="",t.ornamentPrecompSlide="",t.ornamentPrecompSlideTrillBach="",t.ornamentPrecompSlideTrillDAnglebert="",t.ornamentPrecompSlideTrillMarpurg="",t.ornamentPrecompSlideTrillMuffat="",t.ornamentPrecompSlideTrillSuffixMuffat="",t.ornamentPrecompTrillLowerSuffix="",t.ornamentPrecompTrillSuffixDandrieu="",t.ornamentPrecompTrillWithMordent="",t.ornamentPrecompTurnTrillBach="",t.ornamentPrecompTurnTrillDAnglebert="",t.ornamentQuilisma="",t.ornamentRightFacingHalfCircle="",t.ornamentRightFacingHook="",t.ornamentRightVerticalStroke="",t.ornamentSchleifer="",t.ornamentShake3="",t.ornamentShakeMuffat1="",t.ornamentShortObliqueLineAfterNote="",t.ornamentShortObliqueLineBeforeNote="",t.ornamentShortTrill="",t.ornamentTopLeftConcaveStroke="",t.ornamentTopLeftConvexStroke="",t.ornamentTopRightConcaveStroke="",t.ornamentTopRightConvexStroke="",t.ornamentTremblement="",t.ornamentTremblementCouperin="",t.ornamentTrill="",t.ornamentTurn="",t.ornamentTurnInverted="",t.ornamentTurnSlash="",t.ornamentTurnUp="",t.ornamentTurnUpS="",t.ornamentUpCurve="",t.ornamentVerticalLine="",t.ornamentZigZagLineNoRightEnd="",t.ornamentZigZagLineWithRightEnd="",t.ottava="",t.ottavaAlta="",t.ottavaBassa="",t.ottavaBassaBa="",t.ottavaBassaVb="",t.pendereckiTremolo="",t.pictAgogo="",t.pictAlmglocken="",t.pictAnvil="",t.pictBambooChimes="",t.pictBambooScraper="",t.pictBassDrum="",t.pictBassDrumOnSide="",t.pictBeaterBow="",t.pictBeaterBox="",t.pictBeaterBrassMalletsDown="",t.pictBeaterBrassMalletsLeft="",t.pictBeaterBrassMalletsRight="",t.pictBeaterBrassMalletsUp="",t.pictBeaterCombiningDashedCircle="",t.pictBeaterCombiningParentheses="",t.pictBeaterDoubleBassDrumDown="",t.pictBeaterDoubleBassDrumUp="",t.pictBeaterFinger="",t.pictBeaterFingernails="",t.pictBeaterFist="",t.pictBeaterGuiroScraper="",t.pictBeaterHammer="",t.pictBeaterHammerMetalDown="",t.pictBeaterHammerMetalUp="",t.pictBeaterHammerPlasticDown="",t.pictBeaterHammerPlasticUp="",t.pictBeaterHammerWoodDown="",t.pictBeaterHammerWoodUp="",t.pictBeaterHand="",t.pictBeaterHardBassDrumDown="",t.pictBeaterHardBassDrumUp="",t.pictBeaterHardGlockenspielDown="",t.pictBeaterHardGlockenspielLeft="",t.pictBeaterHardGlockenspielRight="",t.pictBeaterHardGlockenspielUp="",t.pictBeaterHardTimpaniDown="",t.pictBeaterHardTimpaniLeft="",t.pictBeaterHardTimpaniRight="",t.pictBeaterHardTimpaniUp="",t.pictBeaterHardXylophoneDown="",t.pictBeaterHardXylophoneLeft="",t.pictBeaterHardXylophoneRight="",t.pictBeaterHardXylophoneUp="",t.pictBeaterHardYarnDown="",t.pictBeaterHardYarnLeft="",t.pictBeaterHardYarnRight="",t.pictBeaterHardYarnUp="",t.pictBeaterJazzSticksDown="",t.pictBeaterJazzSticksUp="",t.pictBeaterKnittingNeedle="",t.pictBeaterMallet="",t.pictBeaterMalletDown="",t.pictBeaterMediumBassDrumDown="",t.pictBeaterMediumBassDrumUp="",t.pictBeaterMediumTimpaniDown="",t.pictBeaterMediumTimpaniLeft="",t.pictBeaterMediumTimpaniRight="",t.pictBeaterMediumTimpaniUp="",t.pictBeaterMediumXylophoneDown="",t.pictBeaterMediumXylophoneLeft="",t.pictBeaterMediumXylophoneRight="",t.pictBeaterMediumXylophoneUp="",t.pictBeaterMediumYarnDown="",t.pictBeaterMediumYarnLeft="",t.pictBeaterMediumYarnRight="",t.pictBeaterMediumYarnUp="",t.pictBeaterMetalBassDrumDown="",t.pictBeaterMetalBassDrumUp="",t.pictBeaterMetalDown="",t.pictBeaterMetalHammer="",t.pictBeaterMetalLeft="",t.pictBeaterMetalRight="",t.pictBeaterMetalUp="",t.pictBeaterSnareSticksDown="",t.pictBeaterSnareSticksUp="",t.pictBeaterSoftBassDrumDown="",t.pictBeaterSoftBassDrumUp="",t.pictBeaterSoftGlockenspielDown="",t.pictBeaterSoftGlockenspielLeft="",t.pictBeaterSoftGlockenspielRight="",t.pictBeaterSoftGlockenspielUp="",t.pictBeaterSoftTimpaniDown="",t.pictBeaterSoftTimpaniLeft="",t.pictBeaterSoftTimpaniRight="",t.pictBeaterSoftTimpaniUp="",t.pictBeaterSoftXylophone="",t.pictBeaterSoftXylophoneDown="",t.pictBeaterSoftXylophoneLeft="",t.pictBeaterSoftXylophoneRight="",t.pictBeaterSoftXylophoneUp="",t.pictBeaterSoftYarnDown="",t.pictBeaterSoftYarnLeft="",t.pictBeaterSoftYarnRight="",t.pictBeaterSoftYarnUp="",t.pictBeaterSpoonWoodenMallet="",t.pictBeaterSuperballDown="",t.pictBeaterSuperballLeft="",t.pictBeaterSuperballRight="",t.pictBeaterSuperballUp="",t.pictBeaterTriangleDown="",t.pictBeaterTrianglePlain="",t.pictBeaterTriangleUp="",t.pictBeaterWireBrushesDown="",t.pictBeaterWireBrushesUp="",t.pictBeaterWoodTimpaniDown="",t.pictBeaterWoodTimpaniLeft="",t.pictBeaterWoodTimpaniRight="",t.pictBeaterWoodTimpaniUp="",t.pictBeaterWoodXylophoneDown="",t.pictBeaterWoodXylophoneLeft="",t.pictBeaterWoodXylophoneRight="",t.pictBeaterWoodXylophoneUp="",t.pictBell="",t.pictBellOfCymbal="",t.pictBellPlate="",t.pictBellTree="",t.pictBirdWhistle="",t.pictBoardClapper="",t.pictBongos="",t.pictBrakeDrum="",t.pictCabasa="",t.pictCannon="",t.pictCarHorn="",t.pictCastanets="",t.pictCastanetsWithHandle="",t.pictCelesta="",t.pictCencerro="",t.pictCenter1="",t.pictCenter2="",t.pictCenter3="",t.pictChainRattle="",t.pictChimes="",t.pictChineseCymbal="",t.pictChokeCymbal="",t.pictClaves="",t.pictCoins="",t.pictConga="",t.pictCowBell="",t.pictCrashCymbals="",t.pictCrotales="",t.pictCrushStem="",t.pictCuica="",t.pictCymbalTongs="",t.pictDamp1="",t.pictDamp2="",t.pictDamp3="",t.pictDamp4="",t.pictDeadNoteStem="",t.pictDrumStick="",t.pictDuckCall="",t.pictEdgeOfCymbal="",t.pictEmptyTrap="",t.pictFingerCymbals="",t.pictFlexatone="",t.pictFootballRatchet="",t.pictGlassHarmonica="",t.pictGlassHarp="",t.pictGlassPlateChimes="",t.pictGlassTubeChimes="",t.pictGlsp="",t.pictGlspSmithBrindle="",t.pictGobletDrum="",t.pictGong="",t.pictGongWithButton="",t.pictGuiro="",t.pictGumHardDown="",t.pictGumHardLeft="",t.pictGumHardRight="",t.pictGumHardUp="",t.pictGumMediumDown="";t.pictGumMediumLeft="",t.pictGumMediumRight="",t.pictGumMediumUp="",t.pictGumSoftDown="",t.pictGumSoftLeft="",t.pictGumSoftRight="",t.pictGumSoftUp="",t.pictHalfOpen1="",t.pictHalfOpen2="",t.pictHandbell="",t.pictHiHat="",t.pictHiHatOnStand="",t.pictJawHarp="",t.pictJingleBells="",t.pictKlaxonHorn="",t.pictLeftHandCircle="",t.pictLionsRoar="",t.pictLithophone="",t.pictLogDrum="",t.pictLotusFlute="",t.pictMar="",t.pictMarSmithBrindle="",t.pictMaraca="",t.pictMaracas="",t.pictMegaphone="",t.pictMetalPlateChimes="",t.pictMetalTubeChimes="",t.pictMusicalSaw="",t.pictNormalPosition="",t.pictOnRim="",t.pictOpen="",t.pictOpenRimShot="",t.pictPistolShot="",t.pictPoliceWhistle="",t.pictQuijada="",t.pictRainstick="",t.pictRatchet="",t.pictRecoReco="",t.pictRightHandSquare="",t.pictRim1="",t.pictRim2="",t.pictRim3="",t.pictRimShotOnStem="",t.pictSandpaperBlocks="",t.pictScrapeAroundRim="",t.pictScrapeAroundRimClockwise="",t.pictScrapeCenterToEdge="",t.pictScrapeEdgeToCenter="",t.pictShellBells="",t.pictShellChimes="",t.pictSiren="",t.pictSistrum="",t.pictSizzleCymbal="",t.pictSleighBell="",t.pictSlideBrushOnGong="",t.pictSlideWhistle="",t.pictSlitDrum="",t.pictSnareDrum="",t.pictSnareDrumMilitary="",t.pictSnareDrumSnaresOff="",t.pictSteelDrums="",t.pictStickShot="",t.pictSuperball="",t.pictSuspendedCymbal="",t.pictSwishStem="",t.pictTabla="",t.pictTamTam="",t.pictTamTamWithBeater="",t.pictTambourine="",t.pictTempleBlocks="",t.pictTenorDrum="",t.pictThundersheet="",t.pictTimbales="",t.pictTimpani="",t.pictTomTom="",t.pictTomTomChinese="",t.pictTomTomIndoAmerican="",t.pictTomTomJapanese="",t.pictTriangle="",t.pictTubaphone="",t.pictTubularBells="",t.pictTurnLeftStem="",t.pictTurnRightLeftStem="",t.pictTurnRightStem="",t.pictVib="",t.pictVibMotorOff="",t.pictVibSmithBrindle="",t.pictVibraslap="",t.pictVietnameseHat="",t.pictWhip="",t.pictWindChimesGlass="",t.pictWindMachine="",t.pictWindWhistle="",t.pictWoodBlock="",t.pictWoundHardDown="",t.pictWoundHardLeft="",t.pictWoundHardRight="",t.pictWoundHardUp="",t.pictWoundSoftDown="",t.pictWoundSoftLeft="",t.pictWoundSoftRight="",t.pictWoundSoftUp="",t.pictXyl="",t.pictXylBass="",t.pictXylSmithBrindle="",t.pictXylTenor="",t.pictXylTenorTrough="",t.pictXylTrough="",t.pluckedBuzzPizzicato="",t.pluckedDamp="",t.pluckedDampAll="",t.pluckedDampOnStem="",t.pluckedFingernailFlick="",t.pluckedLeftHandPizzicato="",t.pluckedPlectrum="",t.pluckedSnapPizzicatoAbove="",t.pluckedSnapPizzicatoBelow="",t.pluckedWithFingernails="",t.quindicesima="",t.quindicesimaAlta="",t.quindicesimaBassa="",t.quindicesimaBassaMb="",t.repeat1Bar="",t.repeat2Bars="",t.repeat4Bars="",t.repeatBarLowerDot="",t.repeatBarSlash="",t.repeatBarUpperDot="",t.repeatDot="",t.repeatDots="",t.repeatLeft="",t.repeatRight="",t.repeatRightLeft="",t.rest1024th="",t.rest128th="",t.rest16th="",t.rest256th="",t.rest32nd="",t.rest512th="",t.rest64th="",t.rest8th="",t.restDoubleWhole="",t.restDoubleWholeLegerLine="",t.restHBar="",t.restHBarLeft="",t.restHBarMiddle="",t.restHBarRight="",t.restHalf="",t.restHalfLegerLine="",t.restLonga="",t.restMaxima="",t.restQuarter="",t.restQuarterOld="",t.restQuarterZ="",t.restWhole="",t.restWholeLegerLine="",t.reversedBrace="",t.reversedBracketBottom="",t.reversedBracketTop="",t.rightRepeatSmall="",t.scaleDegree1="",t.scaleDegree2="",t.scaleDegree3="",t.scaleDegree4="",t.scaleDegree5="",t.scaleDegree6="",t.scaleDegree7="",t.scaleDegree8="",t.scaleDegree9="",t.schaefferClef="",t.schaefferFClefToGClef="",t.schaefferGClefToFClef="",t.schaefferPreviousClef="",t.segno="",t.segnoSerpent1="",t.segnoSerpent2="",t.semipitchedPercussionClef1="",t.semipitchedPercussionClef2="",t.smnFlat="",t.smnFlatWhite="",t.smnHistoryDoubleFlat="",t.smnHistoryDoubleSharp="",t.smnHistoryFlat="",t.smnHistorySharp="",t.smnNatural="",t.smnSharp="",t.smnSharpDown="",t.smnSharpWhite="",t.smnSharpWhiteDown="",t.splitBarDivider="",t.staff1Line="",t.staff1LineNarrow="",t.staff1LineWide="",t.staff2Lines="",t.staff2LinesNarrow="",t.staff2LinesWide="",t.staff3Lines="",t.staff3LinesNarrow="",t.staff3LinesWide="",t.staff4Lines="",t.staff4LinesNarrow="",t.staff4LinesWide="",t.staff5Lines="",t.staff5LinesNarrow="",t.staff5LinesWide="",t.staff6Lines="",t.staff6LinesNarrow="",t.staff6LinesWide="",t.staffDivideArrowDown="",t.staffDivideArrowUp="",t.staffDivideArrowUpDown="",t.staffPosLower1="",t.staffPosLower2="",t.staffPosLower3="",t.staffPosLower4="",t.staffPosLower5="",t.staffPosLower6="",t.staffPosLower7="",t.staffPosLower8="",t.staffPosRaise1="",t.staffPosRaise2="",t.staffPosRaise3="",t.staffPosRaise4="",t.staffPosRaise5="",t.staffPosRaise6="",t.staffPosRaise7="",t.staffPosRaise8="",t.stem="",t.stemBowOnBridge="",t.stemBowOnTailpiece="",t.stemBuzzRoll="",t.stemDamp="",t.stemHarpStringNoise="",t.stemMultiphonicsBlack="",t.stemMultiphonicsBlackWhite="",t.stemMultiphonicsWhite="",t.stemPendereckiTremolo="",t.stemRimShot="",t.stemSprechgesang="",t.stemSulPonticello="",t.stemSussurando="",t.stemSwished="",t.stemVibratoPulse="",t.stockhausenTremolo="",t.stringsBowBehindBridge="",t.stringsBowBehindBridgeFourStrings="",t.stringsBowBehindBridgeOneString="",t.stringsBowBehindBridgeThreeStrings="",t.stringsBowBehindBridgeTwoStrings="",t.stringsBowOnBridge="",t.stringsBowOnTailpiece="",t.stringsChangeBowDirection="",t.stringsDownBow="",t.stringsDownBowAwayFromBody="",t.stringsDownBowBeyondBridge="",t.stringsDownBowTowardsBody="",t.stringsDownBowTurned="",t.stringsFouette="",t.stringsHalfHarmonic="",t.stringsHarmonic="",t.stringsJeteAbove="",t.stringsJeteBelow="",t.stringsMuteOff="",t.stringsMuteOn="",t.stringsOverpressureDownBow="",t.stringsOverpressureNoDirection="",t.stringsOverpressurePossibileDownBow="",t.stringsOverpressurePossibileUpBow="",t.stringsOverpressureUpBow="",t.stringsScrapeCircularClockwise="",t.stringsScrapeCircularCounterclockwise="",t.stringsScrapeParallelInward="",t.stringsScrapeParallelOutward="",t.stringsThumbPosition="",t.stringsThumbPositionTurned="",t.stringsTripleChopInward="",t.stringsTripleChopOutward="",t.stringsUpBow="",t.stringsUpBowAwayFromBody="",t.stringsUpBowBeyondBridge="",t.stringsUpBowTowardsBody="",t.stringsUpBowTurned="",t.stringsVibratoPulse="",t.swissRudimentsNoteheadBlackDouble="",t.swissRudimentsNoteheadBlackFlam="",t.swissRudimentsNoteheadHalfDouble="",t.swissRudimentsNoteheadHalfFlam="",t.systemDivider="",t.systemDividerExtraLong="",t.systemDividerLong="",t.textAugmentationDot="",t.textBlackNoteFrac16thLongStem="",t.textBlackNoteFrac16thShortStem="",t.textBlackNoteFrac32ndLongStem="",t.textBlackNoteFrac8thLongStem="",t.textBlackNoteFrac8thShortStem="",t.textBlackNoteLongStem="",t.textBlackNoteShortStem="",t.textCont16thBeamLongStem="",t.textCont16thBeamShortStem="",t.textCont32ndBeamLongStem="",t.textCont8thBeamLongStem="",t.textCont8thBeamShortStem="",t.textHeadlessBlackNoteFrac16thLongStem="",t.textHeadlessBlackNoteFrac16thShortStem="",t.textHeadlessBlackNoteFrac32ndLongStem="",t.textHeadlessBlackNoteFrac8thLongStem="",t.textHeadlessBlackNoteFrac8thShortStem="",t.textHeadlessBlackNoteLongStem="",t.textHeadlessBlackNoteShortStem="",t.textTie="",t.textTuplet3LongStem="",t.textTuplet3ShortStem="",t.textTupletBracketEndLongStem="",t.textTupletBracketEndShortStem="",t.textTupletBracketStartLongStem="",t.textTupletBracketStartShortStem="",t.timeSig0="",t.timeSig0Reversed="",t.timeSig0Turned="",t.timeSig1="",t.timeSig1Reversed="",t.timeSig1Turned="",t.timeSig2="",t.timeSig2Reversed="",t.timeSig2Turned="",t.timeSig3="",t.timeSig3Reversed="",t.timeSig3Turned="",t.timeSig4="",t.timeSig4Reversed="",t.timeSig4Turned="",t.timeSig5="",t.timeSig5Reversed="",t.timeSig5Turned="",t.timeSig6="",t.timeSig6Reversed="",t.timeSig6Turned="",t.timeSig7="",t.timeSig7Reversed="",t.timeSig7Turned="",t.timeSig8="",t.timeSig8Reversed="",t.timeSig8Turned="",t.timeSig9="",t.timeSig9Reversed="",t.timeSig9Turned="",t.timeSigBracketLeft="",t.timeSigBracketLeftSmall="",t.timeSigBracketRight="",t.timeSigBracketRightSmall="",t.timeSigCombDenominator="",t.timeSigCombNumerator="",t.timeSigComma="",t.timeSigCommon="",t.timeSigCommonReversed="",t.timeSigCommonTurned="",t.timeSigCut2="",t.timeSigCut3="",t.timeSigCutCommon="",t.timeSigCutCommonReversed="",t.timeSigCutCommonTurned="",t.timeSigEquals="",t.timeSigFractionHalf="",t.timeSigFractionOneThird="",t.timeSigFractionQuarter="",t.timeSigFractionThreeQuarters="",t.timeSigFractionTwoThirds="",t.timeSigFractionalSlash="",t.timeSigMinus="",t.timeSigMultiply="",t.timeSigOpenPenderecki="",t.timeSigParensLeft="",t.timeSigParensLeftSmall="",t.timeSigParensRight="",t.timeSigParensRightSmall="",t.timeSigPlus="",t.timeSigPlusSmall="",t.timeSigSlash="",t.timeSigX="",t.tremolo1="",t.tremolo2="",t.tremolo3="",t.tremolo4="",t.tremolo5="",t.tremoloDivisiDots2="",t.tremoloDivisiDots3="",t.tremoloDivisiDots4="",t.tremoloDivisiDots6="",t.tremoloFingered1="",t.tremoloFingered2="",t.tremoloFingered3="",t.tremoloFingered4="",t.tremoloFingered5="",t.tripleTongueAbove="",t.tripleTongueBelow="",t.tuplet0="",t.tuplet1="",t.tuplet2="",t.tuplet3="",t.tuplet4="",t.tuplet5="",t.tuplet6="",t.tuplet7="",t.tuplet8="",t.tuplet9="",t.tupletColon="",t.unmeasuredTremolo="",t.unmeasuredTremoloSimple="",t.unpitchedPercussionClef1="",t.unpitchedPercussionClef2="",t.ventiduesima="",t.ventiduesimaAlta="",t.ventiduesimaBassa="",t.ventiduesimaBassaMb="",t.vocalFingerClickStockhausen="",t.vocalHalbGesungen="",t.vocalMouthClosed="",t.vocalMouthOpen="",t.vocalMouthPursed="",t.vocalMouthSlightlyOpen="",t.vocalMouthWideOpen="",t.vocalNasalVoice="",t.vocalSprechgesang="",t.vocalTongueClickStockhausen="",t.vocalTongueFingerClickStockhausen="",t.vocalsSussurando="",t.wiggleArpeggiatoDown="",t.wiggleArpeggiatoDownArrow="",t.wiggleArpeggiatoDownSwash="",t.wiggleArpeggiatoUp="",t.wiggleArpeggiatoUpArrow="",t.wiggleArpeggiatoUpSwash="",t.wiggleCircular="",t.wiggleCircularConstant="",t.wiggleCircularConstantFlipped="",t.wiggleCircularConstantFlippedLarge="",t.wiggleCircularConstantLarge="",t.wiggleCircularEnd="",t.wiggleCircularLarge="",t.wiggleCircularLarger="",t.wiggleCircularLargerStill="",t.wiggleCircularLargest="",t.wiggleCircularSmall="",t.wiggleCircularStart="",t.wiggleGlissando="",t.wiggleGlissandoGroup1="",t.wiggleGlissandoGroup2="",t.wiggleGlissandoGroup3="",t.wiggleRandom1="",t.wiggleRandom2="",t.wiggleRandom3="",t.wiggleRandom4="",t.wiggleSawtooth="",t.wiggleSawtoothNarrow="",t.wiggleSawtoothWide="",t.wiggleSquareWave="",t.wiggleSquareWaveNarrow="",t.wiggleSquareWaveWide="",t.wiggleTrill="",t.wiggleTrillFast="",t.wiggleTrillFaster="",t.wiggleTrillFasterStill="",t.wiggleTrillFastest="",t.wiggleTrillSlow="",t.wiggleTrillSlower="",t.wiggleTrillSlowerStill="",t.wiggleTrillSlowest="",t.wiggleVIbratoLargestSlower="",t.wiggleVIbratoMediumSlower="",t.wiggleVibrato="",t.wiggleVibratoLargeFast="",t.wiggleVibratoLargeFaster="",t.wiggleVibratoLargeFasterStill="",t.wiggleVibratoLargeFastest="",t.wiggleVibratoLargeSlow="",t.wiggleVibratoLargeSlower="",t.wiggleVibratoLargeSlowest="",t.wiggleVibratoLargestFast="",t.wiggleVibratoLargestFaster="",t.wiggleVibratoLargestFasterStill="",t.wiggleVibratoLargestFastest="",t.wiggleVibratoLargestSlow="",t.wiggleVibratoLargestSlowest="",t.wiggleVibratoMediumFast="",t.wiggleVibratoMediumFaster="",t.wiggleVibratoMediumFasterStill="",t.wiggleVibratoMediumFastest="",t.wiggleVibratoMediumSlow="",t.wiggleVibratoMediumSlowest="",t.wiggleVibratoSmallFast="",t.wiggleVibratoSmallFaster="",t.wiggleVibratoSmallFasterStill="",t.wiggleVibratoSmallFastest="",t.wiggleVibratoSmallSlow="",t.wiggleVibratoSmallSlower="",t.wiggleVibratoSmallSlowest="",t.wiggleVibratoSmallestFast="",t.wiggleVibratoSmallestFaster="",t.wiggleVibratoSmallestFasterStill="",t.wiggleVibratoSmallestFastest="",t.wiggleVibratoSmallestSlow="",t.wiggleVibratoSmallestSlower="",t.wiggleVibratoSmallestSlowest="",t.wiggleVibratoStart="",t.wiggleVibratoWide="",t.wiggleWavy="",t.wiggleWavyNarrow="",t.wiggleWavyWide="",t.windClosedHole="",t.windFlatEmbouchure="",t.windHalfClosedHole1="",t.windHalfClosedHole2="",t.windHalfClosedHole3="",t.windLessRelaxedEmbouchure="",t.windLessTightEmbouchure="",t.windMouthpiecePop="",t.windMultiphonicsBlackStem="",t.windMultiphonicsBlackWhiteStem="",t.windMultiphonicsWhiteStem="",t.windOpenHole="",t.windReedPositionIn="",t.windReedPositionNormal="",t.windReedPositionOut="",t.windRelaxedEmbouchure="",t.windRimOnly="",t.windSharpEmbouchure="",t.windStrongAirPressure="",t.windThreeQuartersClosedHole="",t.windTightEmbouchure="",t.windTrillKey="",t.windVeryTightEmbouchure="",t.windWeakAirPressure=""}(et||(et={}));const ot=16384,rt={"1/2":32768,1:16384,2:8192,4:4096,8:2048,16:1024,32:512,64:256,128:128,256:64},ht={w:"1",h:"2",q:"4",b:"256"},lt={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},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}},ct={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}},dt={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}},ut={"#":et.accidentalSharp,"##":et.accidentalDoubleSharp,b:et.accidentalFlat,bb:et.accidentalDoubleFlat,n:et.accidentalNatural,"{":et.accidentalParensLeft,"}":et.accidentalParensRight,db:et.accidentalThreeQuarterTonesFlatZimmermann,d:et.accidentalQuarterToneFlatStein,"++":et.accidentalThreeQuarterTonesSharpStein,"+":et.accidentalQuarterToneSharpStein,"+-":et.accidentalKucukMucennebSharp,bs:et.accidentalBakiyeFlat,bss:et.accidentalBuyukMucennebFlat,o:et.accidentalSori,k:et.accidentalKoron,bbs:et.accidentalBuyukMucennebSharp,"++-":et.accidentalBuyukMucennebSharp,ashs:et.accidentalBuyukMucennebSharp,afhf:et.accidentalBuyukMucennebSharp},gt={"a.":{code:et.augmentationDot,betweenLines:!0},av:{aboveCode:et.articStaccatissimoAbove,belowCode:et.articStaccatissimoBelow,betweenLines:!0},"a>":{aboveCode:et.articAccentAbove,belowCode:et.articAccentBelow,betweenLines:!0},"a-":{aboveCode:et.articTenutoAbove,belowCode:et.articTenutoBelow,betweenLines:!0},"a^":{aboveCode:et.articMarcatoAbove,belowCode:et.articMarcatoBelow,betweenLines:!1},"a+":{code:et.pluckedLeftHandPizzicato,betweenLines:!1},ao:{aboveCode:et.pluckedSnapPizzicatoAbove,belowCode:et.pluckedSnapPizzicatoBelow,betweenLines:!1},ah:{code:et.stringsHarmonic,betweenLines:!1},"a@":{aboveCode:et.fermataAbove,belowCode:et.fermataBelow,betweenLines:!1},"a@a":{code:et.fermataAbove,betweenLines:!1},"a@u":{code:et.fermataBelow,betweenLines:!1},"a@s":{aboveCode:et.fermataShortAbove,belowCode:et.fermataShortBelow,betweenLines:!1},"a@as":{code:et.fermataShortAbove,betweenLines:!1},"a@us":{code:et.fermataShortBelow,betweenLines:!1},"a@l":{aboveCode:et.fermataLongAbove,belowCode:et.fermataLongBelow,betweenLines:!1},"a@al":{code:et.fermataLongAbove,betweenLines:!1},"a@ul":{code:et.fermataLongBelow,betweenLines:!1},"a@vl":{aboveCode:et.fermataVeryLongAbove,belowCode:et.fermataVeryLongBelow,betweenLines:!1},"a@avl":{code:et.fermataVeryLongAbove,betweenLines:!1},"a@uvl":{code:et.fermataVeryLongBelow,betweenLines:!1},"a|":{code:et.stringsUpBow,betweenLines:!1},am:{code:et.stringsDownBow,betweenLines:!1},"a,":{code:et.pictChokeCymbal,betweenLines:!1}},pt={mordent:et.ornamentShortTrill,mordentInverted:et.ornamentMordent,turn:et.ornamentTurn,turnInverted:et.ornamentTurnSlash,tr:et.ornamentTrill,upprall:et.ornamentPrecompSlideTrillDAnglebert,downprall:et.ornamentPrecompDoubleCadenceUpperPrefix,prallup:et.ornamentPrecompTrillSuffixDandrieu,pralldown:et.ornamentPrecompTrillLowerSuffix,upmordent:et.ornamentPrecompSlideTrillBach,downmordent:et.ornamentPrecompDoubleCadenceUpperPrefixTurn,lineprall:et.ornamentPrecompAppoggTrill,prallprall:et.ornamentTremblement,scoop:et.brassScoop,doit:et.brassDoitMedium,fall:et.brassFallLipShort,doitLong:et.brassLiftMedium,fallLong:et.brassFallRoughMedium,bend:et.brassBend,plungerClosed:et.brassMuteClosed,plungerOpen:et.brassMuteOpen,flip:et.brassFlip,jazzTurn:et.brassJazzTurn,smear:et.brassSmear};class mt{static clefProperties(t){if(!t||!(t in ct))throw new c("BadArgument","Invalid clef: "+t);return ct[t]}static keyProperties(t,e="treble",i="N",s){let n={octaveShift:0,duration:"4"};"object"==typeof s&&(n=Object.assign(Object.assign({},n),s));const a=mt.sanitizeDuration(n.duration),o=t.split("/");if(o.length<2)throw new c("BadArguments",`First argument must be note/octave or note/octave/glyph-code: ${t}`);const r=o[0].toUpperCase();i=i.toUpperCase();const h=dt[r];if(!h)throw new c("BadArguments","Invalid key name: "+r);let l=parseInt(o[1],10);l-=n.octaveShift;let d=(7*l-28+h.index)/2;d+=mt.clefProperties(e).lineShift;const u=void 0!==h.intVal?12*l+h.intVal:void 0;let g="",p="N";return p=o.length>2&&o[2]?o[2].toUpperCase():"N"!==i?i:r,g=this.codeNoteHead(p,a),{key:r,octave:l,line:d,intValue:u,code:g,displaced:!1}}static integerToNote(t){if(void 0===t||t<0||t>11)throw new c("BadArguments",`integerToNote() requires an integer in the range [0, 11]: ${t}`);const e={0:"C",1:"C#",2:"D",3:"D#",4:"E",5:"F",6:"F#",7:"G",8:"G#",9:"A",10:"A#",11:"B"}[t];if(!e)throw new c("BadArguments",`Unknown note value for integer: ${t}`);return e}static textWidth(t){return 7*t.toString().length}static articulationCodes(t){return gt[t]}static accidentalCodes(t){var e;return null!==(e=ut[t])&&void 0!==e?e:t}static ornamentCodes(t){var e;return null!==(e=pt[t])&&void 0!==e?e:t}static keySignature(t){const e=lt[t];if(!e)throw new c("BadKeySignature",`Bad key signature spec: '${t}'`);if(!e.accidental)return[];const i={b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]}[e.accidental],s=[];for(let t=0;t<e.num;++t){const n=i[t];s.push({type:e.accidental,line:n})}return s}static getKeySignatures(){return lt}static hasKeySignature(t){return t in lt}static sanitizeDuration(t){const e=ht[t];if(void 0!==e&&(t=e),void 0===rt[t])throw new c("BadArguments",`The provided duration is not valid: ${t}`);return t}static durationToFraction(t){return(new y).parse(mt.sanitizeDuration(t))}static durationToNumber(t){return mt.durationToFraction(t).value()}static durationToTicks(t){t=mt.sanitizeDuration(t);const e=rt[t];if(void 0===e)throw new c("InvalidDuration");return e}static codeNoteHead(t,e){switch(t){case"D0":return et.noteheadDiamondWhole;case"D1":return et.noteheadDiamondHalf;case"D2":case"D3":return et.noteheadDiamondBlack;case"T0":return et.noteheadTriangleUpWhole;case"T1":return et.noteheadTriangleUpHalf;case"T2":case"T3":return et.noteheadTriangleUpBlack;case"X0":return et.noteheadXWhole;case"X1":return et.noteheadXHalf;case"X2":return et.noteheadXBlack;case"X3":return et.noteheadCircleX;case"S1":return et.noteheadSquareWhite;case"S2":return et.noteheadSquareBlack;case"R1":case"R2":return et.noteheadSquareWhite;case"DO":return et.noteheadTriangleUpBlack;case"RE":return et.noteheadMoonBlack;case"MI":return et.noteheadDiamondBlack;case"FA":return et.noteheadTriangleLeftBlack;case"FAUP":return et.noteheadTriangleRightBlack;case"SO":return et.noteheadBlack;case"LA":return et.noteheadSquareBlack;case"TI":return et.noteheadTriangleRoundDownBlack;case"DI":case"H":switch(e){case"1/2":return et.noteheadDiamondDoubleWhole;case"1":return et.noteheadDiamondWhole;case"2":return et.noteheadDiamondHalf;default:return et.noteheadDiamondBlack}case"X":case"M":switch(e){case"1/2":return et.noteheadXDoubleWhole;case"1":return et.noteheadXWhole;case"2":return et.noteheadXHalf;default:return et.noteheadXBlack}case"CX":switch(e){case"1/2":return et.noteheadCircleXDoubleWhole;case"1":return et.noteheadCircleXWhole;case"2":return et.noteheadCircleXHalf;default:return et.noteheadCircleX}case"CI":switch(e){case"1/2":return et.noteheadCircledDoubleWhole;case"1":return et.noteheadCircledWhole;case"2":return et.noteheadCircledHalf;default:return et.noteheadCircledBlack}case"SQ":switch(e){case"1/2":return et.noteheadDoubleWholeSquare;case"1":case"2":return et.noteheadSquareWhite;default:return et.noteheadSquareBlack}case"TU":switch(e){case"1/2":return et.noteheadTriangleUpDoubleWhole;case"1":return et.noteheadTriangleUpWhole;case"2":return et.noteheadTriangleUpHalf;default:return et.noteheadTriangleUpBlack}case"TD":switch(e){case"1/2":return et.noteheadTriangleDownDoubleWhole;case"1":return et.noteheadTriangleDownWhole;case"2":return et.noteheadTriangleDownHalf;default:return et.noteheadTriangleDownBlack}case"SF":switch(e){case"1/2":return et.noteheadSlashedDoubleWhole1;case"1":return et.noteheadSlashedWhole1;case"2":return et.noteheadSlashedHalf1;default:return et.noteheadSlashedBlack1}case"SB":switch(e){case"1/2":return et.noteheadSlashedDoubleWhole2;case"1":return et.noteheadSlashedWhole2;case"2":return et.noteheadSlashedHalf2;default:return et.noteheadSlashedBlack2}case"R":switch(e){case"1/2":return et.restDoubleWhole;case"1":return et.restWhole;case"2":return et.restHalf;case"4":return et.restQuarter;case"8":return et.rest8th;case"16":return et.rest16th;case"32":return et.rest32nd;case"64":return et.rest64th;case"128":return et.rest128th}break;case"S":switch(e){case"1/2":return et.noteheadSlashWhiteDoubleWhole;case"1":return et.noteheadSlashWhiteWhole;case"2":return et.noteheadSlashWhiteHalf;default:return et.noteheadSlashVerticalEnds}default:switch(e){case"1/2":return et.noteheadDoubleWhole;case"1":return et.noteheadWhole;case"2":return et.noteheadHalf;default:return et.noteheadBlack}}return et.null}}mt.UNISON=!0,mt.SOFTMAX_FACTOR=10,mt.STEM_WIDTH=1.5,mt.STEM_HEIGHT=35,mt.STAVE_LINE_THICKNESS=1,mt.RENDER_PRECISION_PLACES=3,mt.RESOLUTION=ot,mt.durationCodes={"1/2":{stem:!1},1:{stem:!1},2:{stem:!0},4:{stem:!0},8:{stem:!0,beamCount:1,stemBeamExtension:0,codeFlagUp:et.flag8thUp},16:{beamCount:2,stemBeamExtension:0,stem:!0,codeFlagUp:et.flag16thUp},32:{beamCount:3,stemBeamExtension:7.5,stem:!0,codeFlagUp:et.flag32ndUp},64:{beamCount:4,stemBeamExtension:15,stem:!0,codeFlagUp:et.flag64thUp},128:{beamCount:5,stemBeamExtension:22.5,stem:!0,codeFlagUp:et.flag128thUp}},mt.NOTATION_FONT_SCALE=39,mt.TABLATURE_FONT_SCALE=39,mt.SLASH_NOTEHEAD_WIDTH=15,mt.STAVE_LINE_DISTANCE=10,mt.TEXT_HEIGHT_OFFSET_HACK=1,mt.accidentalColumnsTable={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]}},mt.unicode={sharp:"♯",flat:"♭",natural:"♮",triangle:"△","o-with-slash":"ø",degrees:"°",circle:"○"},mt.validTypes={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"}},mt.TIME4_4={numBeats:4,beatValue:4,resolution:ot};var ft,St,Tt,wt,xt=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};function bt(...t){yt.DEBUG&&g("VexFlow.Accidental",t)}class yt extends nt{static get CATEGORY(){return l.Accidental}static format(t,e){if(!t||0===t.length)return;const i=v.get("Accidental.noteheadAccidentalPadding"),s=e.leftShift+i,n=v.get("Accidental.accidentalSpacing"),a=v.get("Accidental.leftPadding"),o=[];let r,h=0;for(let e=0;e<t.length;++e){const i=t[e],s=i.getNote(),n=s.getStave(),a=i.checkIndex(),l=s.getKeyProps()[a];if(s!==r){for(let t=0;t<s.keys.length;++t)h=Math.max(s.getLeftDisplacedHeadPx()-s.getXShift(),h);r=s}if(n){const t=n.getSpacingBetweenLines(),e=n.getYForLine(l.line),s=Math.round(e/t*2)/2;o.push({y:e,line:s,extraXSpaceNeeded:h,accidental:i,spacingBetweenStaveLines:t})}else o.push({line:l.line,extraXSpaceNeeded:h,accidental:i})}o.sort(((t,e)=>e.line-t.line));const l=[];let c=0;for(let t=0;t<o.length;t++){const e=o[t],i=e.accidental.type,s=l[l.length-1];let a;s&&(null==s?void 0:s.line)===e.line?a=s:(a={line:e.line,flatLine:!0,dblSharpLine:!0,numAcc:0,width:0,column:0},l.push(a)),"b"!==i&&"bb"!==i&&(a.flatLine=!1),"##"!==i&&(a.dblSharpLine=!1),a.numAcc++,a.width+=e.accidental.getWidth()+n,c=Math.max(e.extraXSpaceNeeded,c)}let d=0;for(let t=0;t<l.length;t++){let e=!1;const i=t;let s=t;for(;s+1<l.length&&!e;)xt(this,ft,"m",St).call(this,l[s],l[s+1])?s++:e=!0;const n=t=>l[i+t],a=t=>t.map(n),o=(t,e)=>{const[i,s]=a([t,e]).map((t=>t.line));return i-s},r=(...t)=>t.map(a).every((([t,e])=>!xt(this,ft,"m",St).call(this,t,e))),h=s-i+1;let c,u,g=xt(this,ft,"m",St).call(this,l[i],l[s])?"a":"b";switch(h){case 3:"a"===g&&.5===o(1,2)&&.5!==o(0,1)&&(g="secondOnBottom");break;case 4:r([0,2],[1,3])&&(g="spacedOutTetrachord");break;case 5:"b"===g&&r([1,3])&&(g="spacedOutPentachord",r([0,2],[2,4])&&(g="verySpacedOutPentachord"));break;case 6:r([0,3],[1,4],[2,5])&&(g="spacedOutHexachord"),r([0,2],[2,4],[1,3],[3,5])&&(g="verySpacedOutHexachord")}if(h>=7){let e=2,i=!0;for(;!0===i;){i=!1;for(let t=0;t+e<l.length;t++)if(xt(this,ft,"m",St).call(this,l[t],l[t+e])){i=!0,e++;break}}for(c=t;c<=s;c++)u=(c-t)%e+1,l[c].column=u,d=d>u?d:u}else for(c=t;c<=s;c++)u=mt.accidentalColumnsTable[h][g][c-t],l[c].column=u,d=d>u?d:u;t=s}const u=[],g=[];for(let t=0;t<=d;t++)u[t]=0,g[t]=0;u[0]=s+c,g[0]=s,l.forEach((t=>{t.width>u[t.column]&&(u[t.column]=t.width)}));for(let t=1;t<u.length;t++)g[t]=u[t]+g[t-1];const p=g[g.length-1];let m=0;l.forEach((t=>{let e=0;const i=m+t.numAcc;for(;m<i;m++){const i=g[t.column-1]+e+c;o[m].accidental.setXShift(i),e+=o[m].accidental.getWidth()+n,bt("Line, accCount, shift: ",t.line,m,i)}})),e.leftShift=p+a}static applyAccidentals(t,e){const s=[],n={};t.forEach((t=>{const e=new y(0,1);t.getTickables().forEach((t=>{if(t.shouldIgnoreTicks())return;const i=n[e.value()];i?i.push(t):(s.push(e.value()),n[e.value()]=[t]),e.add(t.getTicks())}))}));const a=new at;e||(e="C");const r=a.createScaleMap(e),h={};s.forEach((t=>{const e=n[t],s=[],c=t=>{if(!o(t)||t.isRest()||t.shouldIgnoreTicks())return;const e=t;e.keys.forEach(((t,n)=>{const o=a.getNoteParts(t.split("/")[0]),c=t.split("/")[1],d=o.accidental||"n",u=o.root+d;h[o.root+c]||(h[o.root+c]=r[o.root]);const g=h[o.root+c]===u,p=s.indexOf(t)>-1;if(e.getModifiers().forEach(((t,s)=>{i(t,l.Accidental)&&t.type==d&&t.getIndex()==n&&e.getModifiers().splice(s,1)})),!g||g&&p){h[o.root+c]=u;const i=new ft(d);e.addModifier(i,n),s.push(t)}})),e.getModifiers().forEach((t=>{i(t,l.GraceNoteGroup)&&t.getGraceNotes().forEach(c)}))};e.forEach(c)}))}constructor(t){super(),bt("New accidental: ",t),this.type=t,this.position=nt.Position.LEFT,this.cautionary=!1,this.reset()}reset(){this.text="",this.cautionary?(this.text+=mt.accidentalCodes("{"),this.text+=mt.accidentalCodes(this.type),this.text+=mt.accidentalCodes("}"),this.fontInfo.size=v.get("Accidental.cautionary.fontSize")):(this.text+=mt.accidentalCodes(this.type),this.fontInfo.size=v.get("Accidental.fontSize")),n(this.note)&&(this.fontInfo.size=v.get("Accidental.grace.fontSize"))}setNote(t){return u(t,"ArgumentError",`Bad note value: ${t}`),this.note=t,this.reset(),this}setAsCautionary(){return this.cautionary=!0,this.reset(),this}draw(){const{type:t,position:e,index:i}=this,s=this.checkContext(),n=this.checkAttachedNote();this.setRendered();const a=n.getModifierStartXY(e,i);this.x=a.x-this.width,this.y=a.y,bt("Rendering: ",t,a.x,a.y),this.renderText(s,0,0)}}ft=yt,St=function(t,e){let i=e.line-t.line,s=3;i>0?(s=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(i-=.5)):(s=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(i-=.5));const n=Math.abs(i)<s;return bt("Line1, Line2, Collision: ",t.line,e.line,n),n},yt.DEBUG=!1;class Ct extends ${static get CATEGORY(){return l.Stem}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return mt.STEM_WIDTH}static get HEIGHT(){return mt.STEM_HEIGHT}constructor(t){var e,i,s,n,a,o,r;super(),this.stemUpYOffset=0,this.stemDownYOffset=0,this.stemUpYBaseOffset=0,this.stemDownYBaseOffset=0,this.xBegin=null!==(e=null==t?void 0:t.xBegin)&&void 0!==e?e:0,this.xEnd=null!==(i=null==t?void 0:t.xEnd)&&void 0!==i?i:0,this.yTop=null!==(s=null==t?void 0:t.yTop)&&void 0!==s?s:0,this.yBottom=null!==(n=null==t?void 0:t.yBottom)&&void 0!==n?n:0,this.stemExtension=null!==(a=null==t?void 0:t.stemExtension)&&void 0!==a?a:0,this.stemDirection=null!==(o=null==t?void 0:t.stemDirection)&&void 0!==o?o:0,this.hide=(null==t?void 0:t.hide)||!1,this.isStemlet=(null==t?void 0:t.isStemlet)||!1,this.stemletHeight=null!==(r=null==t?void 0:t.stemletHeight)&&void 0!==r?r:0,this.renderHeightAdjustment=0,this.setOptions(t)}setOptions(t){var e,i,s,n;this.stemUpYOffset=null!==(e=null==t?void 0:t.stemUpYOffset)&&void 0!==e?e:0,this.stemDownYOffset=null!==(i=null==t?void 0:t.stemDownYOffset)&&void 0!==i?i:0,this.stemUpYBaseOffset=null!==(s=null==t?void 0:t.stemUpYBaseOffset)&&void 0!==s?s:0,this.stemDownYBaseOffset=null!==(n=null==t?void 0:t.stemDownYBaseOffset)&&void 0!==n?n:0}setNoteHeadXBounds(t,e){return this.xBegin=t,this.xEnd=e,this}setDirection(t){this.stemDirection=t}setExtension(t){this.stemExtension=t}getExtension(){return this.stemExtension}setYBounds(t,e){this.yTop=t,this.yBottom=e}getHeight(){const t=this.stemDirection===Ct.UP?this.stemUpYOffset:this.stemDownYOffset;return(this.yBottom-this.yTop+(Ct.HEIGHT-t+this.stemExtension))*this.stemDirection}getBoundingBox(){throw new c("NotImplemented","getBoundingBox() not implemented.")}getExtents(){const t=this.stemDirection===Ct.UP,e=[this.yTop,this.yBottom],i=Ct.HEIGHT+this.stemExtension,s=(t?Math.min:Math.max)(...e),n=(t?Math.max:Math.min)(...e);return{topY:s+i*-this.stemDirection,baseY:n}}setVisibility(t){return this.hide=!t,this}setStemlet(t,e){return this.isStemlet=t,this.stemletHeight=e,this}adjustHeightForFlag(){this.renderHeightAdjustment=v.get("Stem.heightAdjustmentForFlag",-3)}adjustHeightForBeam(){this.renderHeightAdjustment=-Ct.WIDTH/2}draw(){if(this.setRendered(),this.hide)return;const t=this.checkContext();let e,i;const s=this.stemDirection;let n=0;s===Ct.DOWN?(e=this.xBegin,i=this.yTop+this.stemDownYOffset,n=this.stemDownYBaseOffset):(e=this.xEnd,i=this.yBottom-this.stemUpYOffset,n=this.stemUpYBaseOffset);const a=this.getHeight();!function(...t){Ct.DEBUG&&g("VexFlow.Stem",t)}("Rendering stem - ","Top Y: ",this.yTop,"Bottom Y: ",this.yBottom);const o=this.isStemlet?a-this.stemletHeight*this.stemDirection:0;t.save(),this.applyStyle(),t.openGroup("stem",this.getAttribute("id")),t.beginPath(),t.setLineWidth(Ct.WIDTH),t.moveTo(e,i-o+n),t.lineTo(e,i-a-this.renderHeightAdjustment*s),t.stroke(),t.closeGroup(),this.restoreStyle(),t.restore()}}Ct.DEBUG=!1,function(t){t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT",t[t.CENTER_STEM=4]="CENTER_STEM"}(Tt||(Tt={})),function(t){t[t.TOP=1]="TOP",t[t.CENTER=2]="CENTER",t[t.BOTTOM=3]="BOTTOM",t[t.CENTER_STEM=4]="CENTER_STEM"}(wt||(wt={}));class vt extends nt{static get CATEGORY(){return l.Annotation}static get minAnnotationPadding(){return v.get("NoteHead.minPadding")}static format(t,e){if(!t||0===t.length)return!1;let i=0,s=0,n=0,a=0;for(let o=0;o<t.length;++o){const l=t[o];let c=(2+F.convertSizeToPixelValue(l.fontInfo.size))/mt.STAVE_LINE_DISTANCE;const d=l.checkAttachedNote(),u=d.getGlyphWidth(),g=l.getWidth();l.horizontalJustification===Tt.RIGHT?(n=Math.max(u,n),i=Math.max(i,g)+vt.minAnnotationPadding):l.horizontalJustification===Tt.LEFT?(a=Math.max(u,a),s=Math.max(s,g)):(i=Math.max(i,g/2)+vt.minAnnotationPadding,s=Math.max(s,g/2),n=Math.max(u/2,n),a=Math.max(u/2,a));const p=d.getStave(),m=d.hasStem()?d.getStemDirection():Ct.UP;let f=0,S=5;if(h(d))if(d.renderOptions.drawStem){const t=d.getStem();t&&(f=Math.abs(t.getHeight())/mt.STAVE_LINE_DISTANCE)}else f=0;else if(r(d)){const t=d.getStem();t&&"n"===d.getNoteType()&&(f=Math.abs(t.getHeight())/mt.STAVE_LINE_DISTANCE)}if(p&&(S=p.getNumLines()),l.verticalJustification===this.VerticalJustify.TOP){let t=d.getLineNumber(!0);h(d)&&(t=S-(d.leastString()-.5)),m===Ct.UP&&(t+=f);t+e.topTextLine+.5<S?(l.setTextLine(S-t),c+=S-t,e.topTextLine=c):(l.setTextLine(e.topTextLine),e.topTextLine+=c)}else if(l.verticalJustification===this.VerticalJustify.BOTTOM){let t=S-d.getLineNumber();h(d)&&(t=d.greatestString()-1),m===Ct.DOWN&&(t+=f);const i=t+e.textLine+1;i<S?(l.setTextLine(S-i),c+=S-i,e.textLine=c):(l.setTextLine(e.textLine),e.textLine+=c)}else l.setTextLine(e.textLine)}const o=Math.min(Math.max(s-a,0),Math.max(s-e.rightShift,0)),l=Math.min(Math.max(i-n,0),Math.max(i-e.leftShift,0));return e.leftShift+=l,e.rightShift+=o,!0}constructor(t){super(),this.text=t,this.horizontalJustification=Tt.CENTER,this.verticalJustification=wt.TOP}setVerticalJustification(t){return this.verticalJustification="string"==typeof t?vt.VerticalJustifyString[t]:t,this}getJustification(){return this.horizontalJustification}setJustification(t){return this.horizontalJustification="string"==typeof t?vt.HorizontalJustifyString[t]:t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote(),i=e.hasStem()?e.getStemDirection():Ct.UP,s=e.getModifierStartXY(tt.ABOVE,this.index);this.setRendered(),this.applyStyle(),t.openGroup("annotation",this.getAttribute("id"));const n=this.getWidth(),a=F.convertSizeToPixelValue(this.fontInfo.size);let o,r;o=this.horizontalJustification===Tt.LEFT?s.x:this.horizontalJustification===Tt.RIGHT?s.x-n:this.horizontalJustification===Tt.CENTER?s.x-n/2:e.getStemX()-n/2;let h={},l=0;const c=e.hasStem(),d=e.checkStave();if(c&&(h=e.checkStem().getExtents(),l=d.getSpacingBetweenLines()),this.verticalJustification===wt.BOTTOM){r=e.getYs().reduce(((t,e)=>t>e?t:e)),r+=(this.textLine+1)*mt.STAVE_LINE_DISTANCE+a,c&&i===Ct.DOWN&&(r=Math.max(r,h.topY+a+l*this.textLine))}else if(this.verticalJustification===wt.CENTER){const t=e.getYForTopText(this.textLine)-1;r=t+(d.getYForBottomText(this.textLine)-t)/2+a/2}else if(this.verticalJustification===wt.TOP){r=Math.min(...e.getYs())-(this.textLine+1)*mt.STAVE_LINE_DISTANCE,c&&i===Ct.UP&&(l=h.topY<d.getTopLineTopY()?mt.STAVE_LINE_DISTANCE:l,r=Math.min(r,h.topY-l*(this.textLine+1)))}else{const t=e.getStemExtents();r=t.topY+(t.baseY-t.topY)/2+a/2}!function(...t){vt.DEBUG&&g("VexFlow.Annotation",t)}("Rendering annotation: ",this.text,o,r),this.x=o,this.y=r,this.renderText(t,0,0),t.closeGroup(),this.restoreStyle()}}vt.DEBUG=!1,vt.HorizontalJustify=Tt,vt.HorizontalJustifyString={left:Tt.LEFT,right:Tt.RIGHT,center:Tt.CENTER,centerStem:Tt.CENTER_STEM},vt.VerticalJustify=wt,vt.VerticalJustifyString={above:wt.TOP,top:wt.TOP,below:wt.BOTTOM,bottom:wt.BOTTOM,center:wt.CENTER,centerStem:wt.CENTER_STEM};const{ABOVE:kt,BELOW:Dt}=nt.Position;function Bt(t,e){return.5*t(e/.5)}function Et(t,e){return e===kt?t<=5:t>=1}function Lt(t,e){return Et(t,e)?e===kt?Math.ceil:Math.floor:Math.round}const Nt=t=>o(t)||n(t);function Ft(t,e){const i=t.getStemDirection(),{topY:s,baseY:n}=t.getStemExtents();if(Nt(t))return t.hasStem()?i===Ct.UP?s:n:Math.min(...t.getYs());if(h(t))return t.hasStem()&&i===Ct.UP?s:t.checkStave().getYForTopText(e);throw new c("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")}function Ot(t,e){const i=t.getStemDirection(),{topY:s,baseY:n}=t.getStemExtents();if(Nt(t))return t.hasStem()?i===Ct.UP?n:s:Math.max(...t.getYs());if(h(t))return t.hasStem()?i===Ct.UP?t.checkStave().getYForBottomText(e):s:t.checkStave().getYForBottomText(e);throw new c("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")}function At(t,e){const i=e===kt&&t.getStemDirection()===Ct.UP||e===Dt&&t.getStemDirection()===Ct.DOWN;return Nt(t)?t.hasStem()&&i?.5:1:t.hasStem()&&i?1:0}class Pt extends nt{static get CATEGORY(){return l.Articulation}static format(t,e){if(!t||0===t.length)return!1;let i=0;const s=(t,e,i)=>Bt(Lt(e,i),t.height/10+.5);t.forEach((t=>{const n=t.checkAttachedNote();i=Math.max(n.getGlyphWidth(),i);let a=5;const o=n.hasStem()?n.getStemDirection():Ct.UP;let h=0;if(r(n)){const t=n.getStem();t&&(h=Math.abs(t.getHeight())/mt.STAVE_LINE_DISTANCE)}const l=n.getStave();if(l&&(a=l.getNumLines()),t.getPosition()===kt){let i=n.getLineNumber(!0);o===Ct.UP&&(i+=h);let r=s(t,e.topTextLine,kt);const l=i+e.topTextLine+.5;!t.articulation.betweenLines&&l<a&&(r+=a-l),t.setTextLine(e.topTextLine),e.topTextLine+=r}else if(t.getPosition()===Dt){let i=Math.max(a-n.getLineNumber(),0);o===Ct.DOWN&&(i+=h);let r=s(t,e.textLine,Dt);const l=i+e.textLine+.5;!t.articulation.betweenLines&&l<a&&(r+=a-l),t.setTextLine(e.textLine),e.textLine+=r}}));const n=t.map((t=>t.getWidth())).reduce(((t,e)=>Math.max(e,t))),a=Math.min(Math.max(n-i,0),Math.max(n-(e.leftShift+e.rightShift),0));return e.leftShift+=a/2,e.rightShift+=a/2,!0}static easyScoreHook({articulations:t},e,i){if(!t)return;const s={staccato:"a.",tenuto:"a-",accent:"a>"};t.split(",").map((t=>t.trim().split("."))).map((([t,e])=>{const n={type:s[t]};return e&&(n.position=nt.PositionString[e]),i.getFactory().Articulation(n)})).map((t=>e.addModifier(t,0)))}constructor(t){var e;super(),this.heightShift=0,this.type=t,this.position=kt,mt.articulationCodes(this.type)||((null!==(e=this.type.codePointAt(0))&&void 0!==e?e:0)%2==0?this.position=kt:this.position=Dt),this.articulation={betweenLines:!1},this.reset()}reset(){this.articulation=mt.articulationCodes(this.type),this.articulation||(this.articulation={code:this.type,betweenLines:!1});const t=(this.position===kt?this.articulation.aboveCode:this.articulation.belowCode)||this.articulation.code||et.null;this.text=t}setBetweenLines(t=!0){return this.articulation.betweenLines=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=this.checkIndex(),{position:s,textLine:n}=this,a=this.articulation.betweenLines,o=e.checkStave(),r=o.getSpacingBetweenLines(),l=h(e),{x:c}=e.getModifierStartXY(s,i),d=!a||l,u=At(e,s);let p={[kt]:()=>{this.setOrigin(.5,1);const t=Ft(e,n)-(n+u)*r;return d?Math.min(o.getYForTopText(Pt.INITIAL_OFFSET),t):t},[Dt]:()=>{this.setOrigin(.5,0);const t=Ot(e,n)+(n+u)*r;return d?Math.max(o.getYForBottomText(Pt.INITIAL_OFFSET),t):t}}[s]();if(!l){const t=s===kt?-1:1,n=e.getKeyProps()[i].line,o=(e.getYs()[i]-p)/r+Number(n),h=function(t,e,i,s){const n=Bt(Lt(e,i),e);if(t&&Et(n,i)&&n%1==0)return n+.5*-s;return n}(a,o,s,t);Et(h,s)&&this.setOrigin(.5,.5),p+=Math.abs(h-o)*r*t}!function(...t){Pt.DEBUG&&g("VexFlow.Articulation",t)}(`Rendering articulation at (x: ${c}, y: ${p})`),this.x=c,this.y=p,this.renderText(t,0,0)}}Pt.DEBUG=!1,Pt.INITIAL_OFFSET=-.5;class Rt{static get CATEGORY(){return l.RenderContext}set font(t){this.setFont(t)}get font(){return this.getFont()}}var Mt,It,Wt,Ht,Gt,Ut,Vt,Xt=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)},Yt=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i};class _t extends ${static get CATEGORY(){return l.Tickable}constructor(){super(),Mt.set(this,!1),It.set(this,!1),this.ticks=new y(0,1),this.intrinsicTicks=0,this.tickMultiplier=new y(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(t){return this.ignoreTicks=t,this}getWidth(){if(!Xt(this,Mt,"f"))throw new c("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(t){return this.centerXShift=t,this}isCenterAligned(){return this.alignCenter}setCenterAlignment(t){return this.alignCenter=t,this}getVoice(){return u(this.voice,"NoVoice","Tickable has no voice.")}setVoice(t){this.voice=t}getTuplet(){return this.tuplet}getTupletStack(){return this.tupletStack}resetTuplet(t){let e,i;if(t){const s=this.tupletStack.indexOf(t);return-1!==s&&(this.tupletStack.splice(s,1),e=t.getNoteCount(),i=t.getNotesOccupied(),this.applyTickMultiplier(e,i)),this}for(;this.tupletStack.length;)e=(t=this.tupletStack.pop()).getNoteCount(),i=t.getNotesOccupied(),this.applyTickMultiplier(e,i);return this}setTuplet(t){if(t){this.tupletStack.push(t);const e=t.getNoteCount(),i=t.getNotesOccupied();this.applyTickMultiplier(i,e)}return this.tuplet=t,this}addToModifierContext(t){this.modifierContext=t;for(let t=0;t<this.modifiers.length;++t)this.modifierContext.addMember(this.modifiers[t]);return this.modifierContext.addMember(this),Yt(this,Mt,!1,"f"),this}addModifier(t,e=0){return this.modifiers.push(t),Yt(this,Mt,!1,"f"),this}getModifiers(){return this.modifiers}setTickContext(t){this.tickContext=t,Yt(this,Mt,!1,"f")}checkTickContext(t="Tickable has no tick context."){return u(this.tickContext,"NoTickContext",t)}preFormat(){Xt(this,Mt,"f")||(this.width=0,this.modifierContext&&(this.modifierContext.preFormat(),this.width+=this.modifierContext.getWidth()))}set preFormatted(t){Yt(this,Mt,t,"f")}get preFormatted(){return Xt(this,Mt,"f")}postFormat(){return Xt(this,It,"f")||Yt(this,It,!0,"f"),this}set postFormatted(t){Yt(this,It,t,"f")}get postFormatted(){return Xt(this,It,"f")}getIntrinsicTicks(){return this.intrinsicTicks}setIntrinsicTicks(t){this.intrinsicTicks=t,this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}getTickMultiplier(){return this.tickMultiplier}applyTickMultiplier(t,e){this.tickMultiplier.multiply(t,e),this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}setDuration(t){const e=t.numerator*(mt.RESOLUTION/t.denominator);this.ticks=this.tickMultiplier.clone().multiply(e),this.intrinsicTicks=this.ticks.value()}getAbsoluteX(){return this.checkTickContext("Can't getAbsoluteX() without a TickContext.").getX()}setModifierContext(t){return this.modifierContext=t,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return u(this.modifierContext,"NoModifierContext","No modifier context attached to this tickable.")}}Mt=new WeakMap,It=new WeakMap;class zt extends _t{static get CATEGORY(){return l.Note}static getGlyphProps(t,e="n"){t=mt.sanitizeDuration(t);let i=mt.durationCodes[t];void 0===i&&(i=mt.durationCodes[4]);const s=mt.codeNoteHead(e.toUpperCase(),t);return s!==et.null&&(i=Object.assign(Object.assign({},i),{codeHead:s})),i}static plotMetrics(t,e,i){var s;const n=e.getMetrics(),a=e.getAbsoluteX()-n.modLeftPx-n.leftDisplacedHeadPx,o=e.getAbsoluteX()-n.leftDisplacedHeadPx,r=e.getAbsoluteX(),h=e.getAbsoluteX()+n.notePx,l=e.getAbsoluteX()+n.notePx+n.rightDisplacedHeadPx,c=e.getAbsoluteX()+n.notePx+n.rightDisplacedHeadPx+n.modRightPx,d=c+(null!==(s=e.getFormatterMetrics().freedom.right)&&void 0!==s?s:0),u=c-a;t.save(),t.setFont(v.get("fontFamily"),8),t.fillText(Math.round(u)+"px",a+e.getXShift(),i);const g=i+7;function p(i,s,n,a=g){t.beginPath(),t.setStrokeStyle(n),t.setFillStyle(n),t.setLineWidth(3),t.moveTo(i+e.getXShift(),a),t.lineTo(s+e.getXShift(),a),t.stroke()}p(a,o,"red"),p(o,r,"#999"),p(r,h,"green"),p(h,l,"#999"),p(l,c,"red"),p(c,d,"#DD0"),p(a-e.getXShift(),a,"#BBB"),function(t,e,i,s="#F55"){t.save(),t.setFillStyle(s),t.beginPath(),t.arc(e,i,3,0,2*Math.PI,!1),t.closePath(),t.fill(),t.restore()}(t,r+e.getXShift(),g,"blue");const m=e.getFormatterMetrics();if(m.iterations>0){const s=m.space.deviation,n=s>=0?"+":"";t.setFillStyle("red"),t.fillText(n+Math.round(s),r+e.getXShift(),i-10)}t.restore()}static parseDuration(t){if(!t)return;const e=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(t);if(!e)return;return{duration:e[1],dots:e[2].length,type:e[3]||"n"}}static parseNoteStruct(t){const e=zt.parseDuration(t.duration);if(!e)return;let i=t.type;if(i&&!mt.validTypes[i])return;const s=[];i||(i=e.type||"n",void 0!==t.keys&&t.keys.forEach(((t,e)=>{const n=t.split("/");s[e]=n&&3===n.length?n[2]:i})));let n=mt.durationToTicks(e.duration);if(!n)return;const a=t.dots?t.dots:e.dots;if("number"!=typeof a)return;let o=n;for(let t=0;t<a;t++){if(o<=1)return;o/=2,n+=o}return{duration:e.duration,type:i,customTypes:s,dots:a,ticks:n}}constructor(t){if(super(),!t)throw new c("BadArguments","Note must have valid initialization data to identify duration and type.");const e=zt.parseNoteStruct(t);if(!e)throw new c("BadArguments",`Invalid note initialization object: ${JSON.stringify(t)}`);this.keys=t.keys||[],this.keyProps=[],this.duration=e.duration,this.noteType=e.type,this.customTypes=e.customTypes,t.durationOverride?this.setDuration(t.durationOverride):this.setIntrinsicTicks(e.ticks),this.modifiers=[],this.glyphProps=zt.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map((t=>zt.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(t){return this.playNote=t,this}isRest(){return!1}addStroke(t,e){return e.setNote(this),e.setIndex(t),this.modifiers.push(e),this.preFormatted=!1,this}getStave(){return this.stave}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}setStave(t){return this.stave=t,this.setYs([t.getYForLine(0)]),this.setContext(this.stave.getContext()),this}getLeftDisplacedHeadPx(){return this.leftDisplacedHeadPx}getRightDisplacedHeadPx(){return this.rightDisplacedHeadPx}setLeftDisplacedHeadPx(t){return this.leftDisplacedHeadPx=t,this}setRightDisplacedHeadPx(t){return this.rightDisplacedHeadPx=t,this}shouldIgnoreTicks(){return this.ignoreTicks}getLineNumber(t){return 0}getLineForRest(){return 0}getGlyphProps(){return this.glyphProps}getGlyphWidth(){return 0}setYs(t){return this.ys=t,this}getYs(){if(0===this.ys.length)throw new c("NoYValues","No Y-values calculated for this note.");return this.ys}getYForTopText(t){return this.checkStave().getYForTopText(t)}getVoice(){if(!this.voice)throw new c("NoVoice","Note has no voice.");return this.voice}setVoice(t){return this.voice=t,this.preFormatted=!1,this}getTickContext(){return this.checkTickContext()}setTickContext(t){return this.tickContext=t,this.preFormatted=!1,this}getDuration(){return this.duration}isDotted(){return this.getModifiersByType(l.Dot).length>0}hasStem(){return!1}getNoteType(){return this.noteType}getBeam(){return this.beam}checkBeam(){return u(this.beam,"NoBeam","No beam attached to instance")}hasBeam(){return void 0!==this.beam}setBeam(t){return this.beam=t,this}addModifier(t,e=0){const i="Note.addModifier(modifier: Modifier, index: number=0)";if("string"==typeof e&&(e=parseInt(e),console.warn(i+" expected a number for `index`, but received a string.")),"object"!=typeof t||"number"!=typeof e)throw new c("WrongParams","Incorrect call signature. Use "+i+" instead.");return t.setNote(this),t.setIndex(e),super.addModifier(t),this}getModifiersByType(t){return this.modifiers.filter((e=>e.getCategory()===t))}getModifierStartXY(t,e,i){if(!this.preFormatted)throw new c("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");return{x:this.getAbsoluteX(),y:this.ys[0]}}getRightParenthesisPx(t){return this.getKeyProps()[t].displaced?this.getRightDisplacedHeadPx():0}getLeftParenthesisPx(t){return this.getKeyProps()[t].displaced?this.getLeftDisplacedHeadPx()-this.xShift:-this.xShift}getFirstDotPx(){let t=this.getRightDisplacedHeadPx();const e=this.checkModifierContext().getMembers("Parenthesis");return 0!==e.length&&(t+=e[0].getWidth()+1),t}getMetrics(){if(!this.preFormatted)throw new c("UnformattedNote","Can't call getMetrics on an unformatted note.");const t=this.modifierContext?this.modifierContext.getState().leftShift:0,e=this.modifierContext?this.modifierContext.getState().rightShift:0,i=this.getWidth();return{width:i,glyphWidth:this.getGlyphWidth(),notePx:i-t-e-this.leftDisplacedHeadPx-this.rightDisplacedHeadPx,modLeftPx:t,modRightPx:e,leftDisplacedHeadPx:this.leftDisplacedHeadPx,rightDisplacedHeadPx:this.rightDisplacedHeadPx,glyphPx:0}}getAbsoluteX(){let t=this.checkTickContext("Can't getAbsoluteX() without a TickContext.").getX();return this.stave&&(t+=this.stave.getNoteStartX()+v.get("Stave.padding",0)),this.isCenterAligned()&&(t+=this.getCenterXShift()),t}getStemDirection(){throw new c("NoStem","No stem attached to this note.")}getStemExtents(){throw new c("NoStem","No stem attached to this note.")}getTieRightX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()/2,t+=-this.width/2+this.width+2,t}getTieLeftX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()/2,t-=this.width/2+2,t}getKeys(){return this.keys}getKeyProps(){return this.keyProps}}!function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.ABOVE=3]="ABOVE",t[t.BELOW=4]="BELOW",t[t.BEGIN=5]="BEGIN",t[t.END=6]="END"}(Wt||(Wt={}));class jt extends ${static get CATEGORY(){return l.StaveModifier}static get Position(){return Wt}constructor(){super(),this.padding=10,this.position=Wt.ABOVE}getPosition(){return this.position}setPosition(t){return this.position=t,this}getStave(){return this.stave}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}setStave(t){return this.stave=t,this}getPadding(t){return void 0!==t&&t<2?0:this.padding}setPadding(t){return this.padding=t,this}setLayoutMetrics(t){return this.layoutMetrics=t,this}getLayoutMetrics(){return this.layoutMetrics}draw(...t){}}!function(t){t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE",t[t.END=3]="END",t[t.REPEAT_BEGIN=4]="REPEAT_BEGIN",t[t.REPEAT_END=5]="REPEAT_END",t[t.REPEAT_BOTH=6]="REPEAT_BOTH",t[t.NONE=7]="NONE"}(Ht||(Ht={}));class qt extends jt{static get CATEGORY(){return l.Barline}static get type(){return Ht}static get typeString(){return{single:Ht.SINGLE,double:Ht.DOUBLE,end:Ht.END,repeatBegin:Ht.REPEAT_BEGIN,repeatEnd:Ht.REPEAT_END,repeatBoth:Ht.REPEAT_BOTH,none:Ht.NONE}}constructor(t){super(),this.thickness=mt.STAVE_LINE_THICKNESS;const e=Ht;this.widths={},this.widths[e.SINGLE]=5,this.widths[e.DOUBLE]=5,this.widths[e.END]=5,this.widths[e.REPEAT_BEGIN]=5,this.widths[e.REPEAT_END]=5,this.widths[e.REPEAT_BOTH]=5,this.widths[e.NONE]=5,this.paddings={},this.paddings[e.SINGLE]=0,this.paddings[e.DOUBLE]=0,this.paddings[e.END]=0,this.paddings[e.REPEAT_BEGIN]=15,this.paddings[e.REPEAT_END]=15,this.paddings[e.REPEAT_BOTH]=15,this.paddings[e.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[e.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(Wt.BEGIN),this.setType(t)}getType(){return this.type}setType(t){return this.type="string"==typeof t?qt.typeString[t]:t,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(t){const e=t.checkContext();switch(this.setRendered(),this.applyStyle(e),e.openGroup("stavebarline",this.getAttribute("id")),this.type){case Ht.SINGLE:this.drawVerticalBar(t,this.x,!1);break;case Ht.DOUBLE:this.drawVerticalBar(t,this.x,!0);break;case Ht.END:this.drawVerticalEndBar(t,this.x);break;case Ht.REPEAT_BEGIN:this.drawRepeatBar(t,this.x,!0),t.getX()!==this.x&&this.drawVerticalBar(t,t.getX());break;case Ht.REPEAT_END:this.drawRepeatBar(t,this.x,!1);break;case Ht.REPEAT_BOTH:this.drawRepeatBar(t,this.x,!1),this.drawRepeatBar(t,this.x,!0)}e.closeGroup(),this.restoreStyle(e)}drawVerticalBar(t,e,i){const s=t.checkContext(),n=t.getTopLineTopY(),a=t.getBottomLineBottomY();i&&s.fillRect(e-3,n,1,a-n),s.fillRect(e,n,1,a-n)}drawVerticalEndBar(t,e){const i=t.checkContext(),s=t.getTopLineTopY(),n=t.getBottomLineBottomY();i.fillRect(e-5,s,1,n-s),i.fillRect(e-2,s,3,n-s)}drawRepeatBar(t,e,i){const s=t.checkContext(),n=t.getTopLineTopY(),a=t.getBottomLineBottomY();let o=3;i||(o=-5),s.fillRect(e+o,n,1,a-n),s.fillRect(e-2,n,3,a-n);i?o+=4:o-=4;const r=e+o+1;let h=(t.getNumLines()-1)*t.getSpacingBetweenLines();h=h/2-t.getSpacingBetweenLines()/2;let l=n+h+1;s.beginPath(),s.arc(r,l,2,0,2*Math.PI,!1),s.fill(),l+=t.getSpacingBetweenLines(),s.beginPath(),s.arc(r,l,2,0,2*Math.PI,!1),s.fill()}}class Kt extends zt{static get CATEGORY(){return l.BarNote}constructor(t=Ht.SINGLE){super({duration:"b"}),this.metrics={widths:{}};const e=Ht;this.metrics.widths={[e.SINGLE]:8,[e.DOUBLE]:12,[e.END]:15,[e.REPEAT_BEGIN]:14,[e.REPEAT_END]:14,[e.REPEAT_BOTH]:18,[e.NONE]:0},this.ignoreTicks=!0,this.setType(t)}getType(){return this.type}setType(t){return this.type="string"==typeof t?qt.typeString[t]:t,this.setWidth(this.metrics.widths[this.type]),this}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkContext();!function(...t){Kt.DEBUG&&g("VexFlow.BarNote",t)}("Rendering bar line at: ",this.getAbsoluteX()),this.applyStyle(t);const e=new qt(this.type);e.setX(this.getAbsoluteX()),e.draw(this.checkStave()),this.restoreStyle(t),this.setRendered()}}Kt.DEBUG=!1;class Qt extends nt{static get CATEGORY(){return l.Bend}static get UP(){return 0}static get DOWN(){return 1}static format(t,e){if(!t||0===t.length)return!1;let i=0;for(let s=0;s<t.length;++s){const n=t[s],a=n.checkAttachedNote();if(h(a)){const t=a.leastString()-1;e.topTextLine<t&&(e.topTextLine=t)}n.setXShift(i),i=n.getWidth(),n.setTextLine(e.topTextLine)}return e.rightShift+=i,e.topTextLine+=1,!0}constructor(t){super(),this.xShift=0,this.tap="",this.renderOptions={bendWidth:8,releaseWidth:8},this.setStyle({lineWidth:1,strokeStyle:"black",fillStyle:"black"}),this.phrase=t,this.updateWidth()}setXShift(t){return this.xShift=t,this.updateWidth(),this}setTap(t){return this.tap=t,this}getTextHeight(){const t=new $(l.Bend);return t.setText(this.phrase[0].text),t.getHeight()}updateWidth(){const t=t=>{const e=new $(l.Bend);return e.setText(t),e.getWidth()};let e=0;for(let i=0;i<this.phrase.length;++i){const s=this.phrase[i];if(void 0!==s.width)e+=s.width;else{const i=s.type===Qt.UP?this.renderOptions.bendWidth:this.renderOptions.releaseWidth;s.width=Math.max(i,t(s.text))+3,s.drawWidth=s.width/2,e+=s.width}}return this.setWidth(e+this.xShift),this}draw(){var t;const e=this.checkContext(),i=this.checkAttachedNote();this.setRendered(),this.applyStyle();const s=i.getModifierStartXY(nt.Position.RIGHT,this.index);s.x+=3,s.y+=.5;const n=this.xShift,a=i.checkStave().getSpacingBetweenLines(),o=i.getYs().reduce(((t,e)=>t<e?t:e)),r=s.y-((this.textLine+1)*a+s.y-o)+3,h=s.y-((this.textLine+1)*a+s.y-o)-1,l=(t,i,s,n)=>{const a=t+s,o=i;e.beginPath(),e.moveTo(t,i),e.quadraticCurveTo(a,o,t+s,n),e.stroke()},d=(t,i,s,n)=>{e.beginPath(),e.moveTo(t,n),e.quadraticCurveTo(t+s,n,t+s,i),e.stroke()},u=(t,i,s)=>{const n=i+4*s;e.beginPath(),e.moveTo(t,i),e.lineTo(t-4,n),e.lineTo(t+4,n),e.closePath(),e.fill()},g=(t,i)=>{e.setFont(this.fontInfo);const s=t-e.measureText(i).width/2;e.fillText(i,s,h)};let p,m=0,f=0;if(null===(t=this.tap)||void 0===t?void 0:t.length){g(i.getModifierStartXY(nt.Position.CENTER,this.index).x,this.tap)}for(let t=0;t<this.phrase.length;++t){const e=this.phrase[t];e.drawWidth||(e.drawWidth=0),0===t&&(e.drawWidth+=n),f=e.drawWidth+m-(1===t?n:0),e.type===Qt.UP&&(p&&p.type===Qt.UP&&u(s.x,r,1),l(s.x,s.y,f,r)),e.type===Qt.DOWN&&(p&&p.type===Qt.UP&&d(s.x,s.y,f,r),p&&p.type===Qt.DOWN&&(u(s.x,s.y,-1),d(s.x,s.y,f,r)),p||(f=e.drawWidth,d(s.x,s.y,f,r))),g(s.x+f,e.text),p=e,m=e.drawWidth,p.x=s.x,s.x+=f}if(!p||void 0===p.x)throw new c("NoLastBendForBend","Internal error.");p.type===Qt.UP?u(p.x+f,r,1):p.type===Qt.DOWN&&u(p.x+f,s.y,-1),this.restoreStyle()}}function $t(...t){Zt.DEBUG&&g("VexFlow.ChordSymbol",t)}class Jt extends ${constructor(t,e,i,s,n){super(),this.text=t,this.symbolModifier=e,this.xShift=i,this.yShift=s,this.vAlign=n}isSuperscript(){return this.symbolModifier===Vt.SUPERSCRIPT}isSubscript(){return this.symbolModifier===Vt.SUBSCRIPT}}!function(t){t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT",t[t.CENTER_STEM=4]="CENTER_STEM"}(Gt||(Gt={})),function(t){t[t.TOP=1]="TOP",t[t.BOTTOM=2]="BOTTOM"}(Ut||(Ut={})),function(t){t[t.NONE=1]="NONE",t[t.SUBSCRIPT=2]="SUBSCRIPT",t[t.SUPERSCRIPT=3]="SUPERSCRIPT"}(Vt||(Vt={}));class Zt extends nt{static get CATEGORY(){return l.ChordSymbol}static get superSubRatio(){return v.get("ChordSymbol.superSubRatio")}static get spacingBetweenBlocks(){return v.get("ChordSymbol.spacing")}static get superscriptOffset(){return v.get("ChordSymbol.superscriptOffset")}static get subscriptOffset(){return v.get("ChordSymbol.subscriptOffset")}static get minPadding(){return v.get("NoteHead.minPadding")}static format(t,e){if(!t||0===t.length)return!1;let i=0,s=0,n=0,a=0,o=0;for(const h of t){const t=h.checkAttachedNote();let l=1;for(let t=0;t<h.symbolBlocks.length;++t){const e=h.symbolBlocks[t],s=e.isSuperscript(),n=e.isSubscript();if(e.setXShift(i),(s||n)&&(l=2),n&&t>0){const s=h.symbolBlocks[t-1];s.isSuperscript()&&(e.setXShift(i-s.getWidth()-Zt.minPadding),e.vAlign=!0,i+=-s.getWidth()-Zt.minPadding+(s.getWidth()>e.getWidth()?s.getWidth()-e.getWidth():0))}i+=e.getWidth()+Zt.minPadding}if(h.getVertical()===Ut.TOP?(h.setTextLine(e.topTextLine),e.topTextLine+=l):(h.setTextLine(e.textLine+1),e.textLine+=l+1),h.getReportWidth()){if(r(t)){const e=t.getGlyphWidth();h.getHorizontal()===Gt.RIGHT?(a=Math.max(e,a),s=Math.max(s,i)+Zt.minPadding):h.getHorizontal()===Gt.LEFT?(o=Math.max(e,o),n=Math.max(n,i)):(s=Math.max(s,i/2)+Zt.minPadding,n=Math.max(n,i/2),a=Math.max(e/2,a),o=Math.max(e/2,o))}h.width=i}i=0}const h=Math.min(Math.max(n-o,0),Math.max(n-e.rightShift,0)),l=Math.min(Math.max(s-a,0),Math.max(s-e.leftShift,0));return e.leftShift+=l,e.rightShift+=h,!0}constructor(){super(),this.symbolBlocks=[],this.horizontal=Gt.LEFT,this.vertical=Ut.TOP,this.reportWidth=!0}get superscriptOffset(){return Zt.superscriptOffset*F.convertSizeToPixelValue(this.fontInfo.size)}get subscriptOffset(){return Zt.subscriptOffset*F.convertSizeToPixelValue(this.fontInfo.size)}setReportWidth(t){return this.reportWidth=t,this}getReportWidth(){return this.reportWidth}getSymbolBlock(t={}){var e,i;const s=new Jt(null!==(e=t.text)&&void 0!==e?e:"",null!==(i=t.symbolModifier)&&void 0!==i?i:Vt.NONE,0,0,!1);if(s.isSubscript()&&s.setYShift(this.subscriptOffset),s.isSuperscript()&&s.setYShift(this.superscriptOffset),s.isSubscript()||s.isSuperscript()){const{family:t,size:e,weight:i,style:n}=this.fontInfo,a=F.scaleSize(e,Zt.superSubRatio);s.setFont(t,a,i,n)}else s.setFont(this.fontInfo);return s}addSymbolBlock(t){return this.symbolBlocks.push(this.getSymbolBlock(t)),this}addText(t,e={}){return this.addSymbolBlock(Object.assign(Object.assign({},e),{text:t}))}addTextSuperscript(t){const e=Vt.SUPERSCRIPT;return this.addSymbolBlock({text:t,symbolModifier:e})}addTextSubscript(t){const e=Vt.SUBSCRIPT;return this.addSymbolBlock({text:t,symbolModifier:e})}addGlyphSuperscript(t){return this.addTextSuperscript(Zt.glyphs[t])}addGlyph(t,e={}){return this.addText(Zt.glyphs[t],e)}addGlyphOrText(t,e={}){let i="";for(let e=0;e<t.length;++e){const s=t[e],n=Zt.glyphs[s];i+=n||s}return i.length>0&&this.addText(i,e),this}addLine(t={}){return this.addText("",t)}setVertical(t){return this.vertical="string"==typeof t?Zt.VerticalJustifyString[t]:t,this}getVertical(){return this.vertical}setHorizontal(t){return this.horizontal="string"==typeof t?Zt.HorizontalJustifyString[t]:t,this}getHorizontal(){return this.horizontal}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered(),t.save(),this.applyStyle(),t.openGroup("chordsymbol",this.getAttribute("id"));const i=e.getModifierStartXY(nt.Position.ABOVE,this.index);let s;t.setFont(this.fontInfo);const n=e.hasStem(),a=e.checkStave();if(this.vertical===Ut.BOTTOM){if(s=a.getYForBottomText(this.textLine+mt.TEXT_HEIGHT_OFFSET_HACK),n){const t=e.checkStem().getExtents(),i=a.getSpacingBetweenLines(),n=1===e.getStemDirection()?t.baseY:t.topY;s=Math.max(s,n+i*(this.textLine+2))}}else{const t=Math.min(...e.getYs());if(s=Math.min(a.getYForTopText(this.textLine),t-10),n){const t=e.checkStem().getExtents(),i=a.getSpacingBetweenLines();s=Math.min(s,t.topY-5-i*this.textLine)}}let o=i.x;o=this.horizontal===Gt.LEFT?i.x:this.horizontal===Gt.RIGHT?i.x+this.getWidth():this.horizontal===Gt.CENTER?i.x-this.getWidth()/2:e.getStemX()-this.getWidth()/2,$t("Rendering ChordSymbol: ",o,s),this.symbolBlocks.forEach((e=>{$t("Rendering Text: ",e.getText(),o+e.getXShift(),s+e.getYShift()),e.setX(o),e.setY(s),e.renderText(t,0,0)})),t.closeGroup(),this.restoreStyle(),t.restore()}getBoundingBox(){const t=this.symbolBlocks[0].getBoundingBox();for(let e=1;e<this.symbolBlocks.length;e++)t.mergeWith(this.symbolBlocks[e].getBoundingBox());return t}}Zt.DEBUG=!1,Zt.HorizontalJustify=Gt,Zt.HorizontalJustifyString={left:Gt.LEFT,right:Gt.RIGHT,center:Gt.CENTER,centerStem:Gt.CENTER_STEM},Zt.VerticalJustify=Ut,Zt.VerticalJustifyString={top:Ut.TOP,above:Ut.TOP,below:Ut.BOTTOM,bottom:Ut.BOTTOM},Zt.glyphs={diminished:et.csymDiminished,dim:et.csymDiminished,halfDiminished:et.csymHalfDiminished,"+":et.csymAugmented,augmented:et.csymAugmented,majorSeventh:et.csymMajorSeventh,minor:et.csymMinor,"-":et.csymMinor,"(":"(",leftParen:"(",")":")",rightParen:")",leftBracket:et.csymBracketLeftTall,rightBracket:et.csymBracketRightTall,leftParenTall:"(",rightParenTall:")","/":et.csymDiagonalArrangementSlash,over:et.csymDiagonalArrangementSlash,"#":et.csymAccidentalSharp,b:et.csymAccidentalFlat},Zt.symbolModifiers=Vt;class te extends nt{static get CATEGORY(){return l.Dot}static getDots(t){return t.getModifiersByType(te.CATEGORY)}static buildAndAttach(t,e){for(const i of t)if(null==e?void 0:e.all)for(let t=0;t<i.keys.length;t++){const e=new te;i.addModifier(e,t)}else if(void 0!==(null==e?void 0:e.index)){const t=new te;i.addModifier(t,null==e?void 0:e.index)}else{const t=new te;i.addModifier(t,0)}}static format(t,e){const i=e.rightShift;if(!t||0===t.length)return!1;const s=[],n={};for(let e=0;e<t.length;++e){const a=t[e],r=a.getNote();let l,d;if(o(r)){const t=a.checkIndex();l=r.getKeyProps()[t],d=r.getFirstDotPx()}else{if(!h(r))throw new c("Internal","Unexpected instance.");l={line:.5},d=i}const u=r.getAttribute("id");s.push({line:l.line,note:r,noteId:u,dot:a}),n[u]=Math.max(n[u]||d,d)}s.sort(((t,e)=>e.line-t.line));let a=i,r=0,l=null,d=null,u=null,g=0;for(let t=0;t<s.length;++t){const{dot:e,note:i,noteId:o,line:h}=s[t];h===l&&i===d||(a=n[o]),i.isRest()||h===l||(.5===Math.abs(h%1)?g=0:(g=.5,null===d||d.isRest()||null===l||l-h!=.5?h+g===u&&(g=-.5):g=-.5)),i.isRest()?e.dotShiftY+=-g:e.dotShiftY=-g,u=h+g,e.setXShift(a),a+=e.getWidth()+1,r=a>r?a:r,l=h,d=i}return e.rightShift+=r,!0}constructor(){super(),this.position=nt.Position.RIGHT,this.setText(et.augmentationDot),this.dotShiftY=0}setNote(t){return this.note=t,this.font=t.font,this}setDotShiftY(t){return this.dotShiftY=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.checkStave().getSpacingBetweenLines(),s=e.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});h(e)&&(s.y=e.getStemExtents().baseY),this.x=s.x,this.y=s.y+this.dotShiftY*i,this.renderText(t,0,0)}}class ee extends nt{static get CATEGORY(){return l.FretHandFinger}static format(t,e){const{leftShift:i,rightShift:s}=e;if(!t||0===t.length)return!1;const n=[];let a=null,o=0,r=0;for(let h=0;h<t.length;++h){const l=t[h],c=l.getNote(),d=l.getPosition(),u=l.checkIndex(),g=c.getKeyProps()[u],p=v.get("FretHandFinger.fontSize");if(l.position===tt.ABOVE&&(e.topTextLine+=p/mt.STAVE_LINE_DISTANCE+.5),l.position===tt.BELOW&&(e.textLine+=p/mt.STAVE_LINE_DISTANCE+.5),c!==a){for(let t=0;t<c.keys.length;++t)0===i&&(o=Math.max(c.getLeftDisplacedHeadPx(),o)),0===s&&(r=Math.max(c.getRightDisplacedHeadPx(),r));a=c}n.push({note:c,num:l,pos:d,line:g.line,shiftL:o,shiftR:r})}n.sort(((t,e)=>e.line-t.line));let h=0,l=0,c=0,d=0,u=null,g=null;for(let t=0;t<n.length;++t){let e=0;const{note:a,pos:o,num:p,line:m,shiftL:f,shiftR:S}=n[t];m===u&&a===g||(h=i+f,l=s+S);const T=p.getWidth()+1;o===nt.Position.LEFT?(p.setXShift(i+h),e=i+T,c=e>c?e:c):o===nt.Position.RIGHT&&(p.setXShift(l),e=r+T,d=e>d?e:d),u=m,g=a}return e.leftShift+=c,e.rightShift+=d,!0}static easyScoreHook({fingerings:t}={},e,i){null==t||t.split(",").map((t=>{const e=t.trim().split("."),s={number:e[0]};return e[1]&&(s.position=e[1]),i.getFactory().Fingering(s)})).map(((t,i)=>e.addModifier(t,i)))}constructor(t){super(),this.setFretHandFinger(t),this.position=nt.Position.LEFT,this.xOffset=0,this.yOffset=0}setFretHandFinger(t){return this.text=t,this}getFretHandFinger(){return this.text}setOffsetX(t){return this.xOffset=t,this}setOffsetY(t){return this.yOffset=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index);let s=i.x+this.xOffset,n=i.y+this.yOffset+5;switch(this.position){case nt.Position.ABOVE:s-=4,n-=12;break;case nt.Position.BELOW:s-=2,n+=10;break;case nt.Position.LEFT:s-=this.width;break;case nt.Position.RIGHT:s+=1;break;default:throw new c("InvalidPosition",`The position ${this.position} does not exist`)}this.renderText(t,s,n)}}class ie extends zt{static get CATEGORY(){return l.NoteHead}constructor(t){super(t),this.customGlyph=!1,this.ledger={"":"","":""},this.index=t.index,this.x=t.x||0,this.y=t.y||0,t.noteType&&(this.noteType=t.noteType),this.displaced=t.displaced||!1,this.stemDirection=t.stemDirection||Ct.UP,this.line=t.line||0,this.glyphProps=zt.getGlyphProps(this.duration,this.noteType),u(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,t.customGlyphCode&&(this.customGlyph=!0,this.text=t.customGlyphCode),this.setStyle(t.style),this.slashed=t.slashed||!1,this.renderOptions=Object.assign({},this.renderOptions)}getWidth(){return this.width}isDisplaced(){return!0===this.displaced}getLine(){return this.line}setLine(t){return this.line=t,this}getAbsoluteX(){const t=this.preFormatted?super.getAbsoluteX():this.x,e=Ct.WIDTH/2;return t+(this.displaced?(this.width-e)*this.stemDirection:0)}setStave(t){const e=this.getLine();return this.stave=t,this.stave&&(this.setY(this.stave.getYForNote(e)),this.setContext(this.stave.getContext())),this}preFormat(){return this.preFormatted||(this.preFormatted=!0),this}draw(){const t=this.checkContext();this.setRendered(),function(...t){ie.DEBUG&&g("VexFlow.NoteHead",t)}("Drawing note head '",this.noteType,this.duration,"' at",this.x,this.y),this.x=this.getAbsoluteX(),this.renderText(t,0,0)}}ie.DEBUG=!1;class se extends zt{static get CATEGORY(){return l.StemmableNote}constructor(t){super(t),this.flag=new $,this.flagStyle={}}getStem(){return this.stem}checkStem(){if(!this.stem)throw new c("NoStem","No stem attached to instance");return this.stem}setStem(t){return this.stem=t,this.addChildElement(t),this}buildStem(){const t=new Ct;return this.setStem(t),this}buildFlag(){var t,e,i;const{glyphProps:s}=this;if(this.hasFlag()){const n=this.getStemDirection()===Ct.DOWN?String.fromCodePoint((null!==(e=null===(t=s.codeFlagUp)||void 0===t?void 0:t.codePointAt(0))&&void 0!==e?e:-1)+1):null!==(i=s.codeFlagUp)&&void 0!==i?i:et.null;this.flag.setText(n),this.flag.fontInfo=this.fontInfo}}getBaseCustomNoteHeadGlyphProps(){return this.getStemDirection()===Ct.DOWN?this.customGlyphs[this.customGlyphs.length-1]:this.customGlyphs[0]}getStemLength(){return Ct.HEIGHT+this.getStemExtension()}getBeamCount(){const t=this.getGlyphProps();return t?t.beamCount:0}getStemMinimumLength(){const t=mt.durationToFraction(this.duration),e=void 0===this.beam;let i=t.value()<=1?0:20;switch(this.duration){case"8":case"16":i=e?35:25;break;case"32":i=e?45:35;break;case"64":i=e?50:40;break;case"128":i=e?55:45}return i}getStemDirection(){if(!this.stemDirection)throw new c("NoStem","No stem attached to this note.");return this.stemDirection}setStemDirection(t){if(t||(t=Ct.UP),t!==Ct.UP&&t!==Ct.DOWN)throw new c("BadArgument",`Invalid stem direction: ${t}`);return this.stemDirection=t,this.reset(),this.hasFlag()&&this.buildFlag(),this.beam=void 0,this.stem&&(this.stem.setDirection(t),this.stem.setExtension(this.getStemExtension())),this.preFormatted&&this.preFormat(),this}getStemX(){const t=this.getAbsoluteX()+this.xShift,e=this.getAbsoluteX()+this.xShift+this.getGlyphWidth();return this.stemDirection===Ct.DOWN?t:e}getCenterGlyphX(){return this.getAbsoluteX()+this.xShift+this.getGlyphWidth()/2}getStemExtension(){const t=this.getGlyphProps(),e=this.flag.getHeight(),i=this.getFontScale();return void 0!==this.stemExtensionOverride?this.stemExtensionOverride:this.beam?t.stemBeamExtension*i:e>Ct.HEIGHT*i?e-Ct.HEIGHT*i:0}setStemLength(t){return this.stemExtensionOverride=t-Ct.HEIGHT,this}getStemExtents(){if(!this.stem)throw new c("NoStem","No stem attached to this note.");return this.stem.getExtents()}getYForTopText(t){const e=this.checkStave();if(this.hasStem()){const i=this.getStemExtents();if(!i)throw new c("InvalidState","Stem does not have extents.");return Math.min(e.getYForTopText(t),i.topY-this.renderOptions.annotationSpacing*(t+1))}return e.getYForTopText(t)}getYForBottomText(t){const e=this.checkStave();if(this.hasStem()){const i=this.getStemExtents();if(!i)throw new c("InvalidState","Stem does not have extents.");return Math.max(e.getYForTopText(t),i.baseY+this.renderOptions.annotationSpacing*t)}return e.getYForBottomText(t)}hasFlag(){return void 0!==this.glyphProps.codeFlagUp&&!this.beam&&!this.isRest()}postFormat(){var t;return null===(t=this.beam)||void 0===t||t.postFormat(),this.postFormatted=!0,this}drawStem(t){var e;this.checkContext(),this.setRendered(),this.setStem(new Ct(t)),null===(e=this.stem)||void 0===e||e.setContext(this.getContext()).draw()}}var ne,ae,oe=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)},re=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i};function he(t,e,i){const s=i;t.line+=s,t.maxLine+=s,t.minLine+=s,t.note.setKeyLine(0,t.note.getKeyLine(0)+s)}class le extends se{static get CATEGORY(){return l.StaveNote}static get LEDGER_LINE_OFFSET(){return 3}static get minNoteheadPadding(){return v.get("NoteHead.minPadding")}static format(t,e){if(!t||t.length<2)return!1;const i=[];for(let e=0;e<t.length;e++){const s=oe(t[e],ae,"f"),n=s[0].keyProps.line;let a=s[s.length-1].keyProps.line;const o=t[e].getStemDirection(),r=t[e].getStemLength()/10,h=t[e].getStemMinimumLength()/10;let l;t[e].isRest()?(l=n+Math.ceil(oe(t[e],ne,"f")[0].getTextMetrics().actualBoundingBoxAscent/mt.STAVE_LINE_DISTANCE),a=n-Math.ceil(oe(t[e],ne,"f")[0].getTextMetrics().actualBoundingBoxDescent/mt.STAVE_LINE_DISTANCE)):(l=1===o?s[s.length-1].keyProps.line+r:s[s.length-1].keyProps.line,a=1===o?s[0].keyProps.line:s[0].keyProps.line-r),i.push({line:s[0].keyProps.line,maxLine:l,minLine:a,isrest:t[e].isRest(),stemDirection:o,stemMax:r,stemMin:h,voiceShift:t[e].getVoiceShiftWidth(),isDisplaced:t[e].isDisplaced(),note:t[e]})}let s,n,a,o=0;const r=[!1,!1,!1];for(let t=0;t<i.length;t++)r[t]=!1!==i[t].note.renderOptions.draw;if(r[0]&&r[1]&&r[2])o=3,s=i[0],n=i[1],a=i[2];else if(r[0]&&r[1])o=2,s=i[0],a=i[1];else if(r[0]&&r[2])o=2,s=i[0],a=i[2];else{if(!r[1]||!r[2])return!0;o=2,s=i[1],a=i[2]}2===o&&-1===s.stemDirection&&1===a.stemDirection&&(s=i[1],a=i[0]);const h=Math.max(s.voiceShift,a.voiceShift);let d=0;if(2===o){const t=s.note.hasStem()&&a.note.hasStem()&&s.stemDirection===a.stemDirection?0:.5;if(a.isrest&&s.isrest&&s.note.duration===a.note.duration)a.note.renderOptions.draw=!1;else if(s.minLine<=a.maxLine+t)if(s.isrest)he(s,0,1);else if(a.isrest)he(a,0,-1);else{const t=Math.abs(s.line-a.line);if(s.note.hasStem()&&a.note.hasStem()){const e=oe(s.note,ae,"f")[0].keyProps.code,i=oe(a.note,ae,"f")[oe(a.note,ae,"f").length-1].keyProps.code;!mt.UNISON||e!==i||s.note.getModifiers().filter((t=>t.getCategory()===l.Dot&&0===t.getIndex())).length!==a.note.getModifiers().filter((t=>t.getCategory()===l.Dot&&0===t.getIndex())).length||t<1&&t>0||JSON.stringify(s.note.getStyle())!==JSON.stringify(a.note.getStyle())?(d=h+2,s.stemDirection===a.stemDirection?s.note.setXShift(d):a.note.setXShift(d)):s.note.voice!==a.note.voice&&s.stemDirection===a.stemDirection&&(s.line!==a.line?(d=h+2,s.note.setXShift(d)):1===a.stemDirection&&(a.stemDirection=-1,a.note.setStemDirection(-1)))}else t<1?(d=h+2,s.note.duration<a.note.duration?s.note.setXShift(d):a.note.setXShift(d)):s.note.hasStem()?(s.stemDirection=-s.note.getStemDirection(),s.note.setStemDirection(s.stemDirection)):a.note.hasStem()&&(a.stemDirection=-a.note.getStemDirection(),a.note.setStemDirection(a.stemDirection))}return e.rightShift+=d,!0}if(!n)throw new c("InvalidState","noteM not defined.");if(n.isrest&&!s.isrest&&!a.isrest&&(s.minLine<=n.maxLine||n.minLine<=a.maxLine)){return n.maxLine-n.minLine<s.minLine-a.maxLine?function(t,e,i){const s=t.line-p(e.minLine,i.maxLine);t.note.setKeyLine(0,t.note.getKeyLine(0)-s),t.line-=s,t.maxLine-=s,t.minLine-=s}(n,s,a):(d=h+2,n.note.setXShift(d),!1===a.note.hasBeam()&&(a.stemDirection=-1,a.note.setStemDirection(-1)),s.minLine<=a.maxLine&&!1===s.note.hasBeam()&&(s.stemDirection=1,s.note.setStemDirection(1))),e.rightShift+=d,!0}return s.isrest&&n.isrest&&a.isrest?(s.note.renderOptions.draw=!1,a.note.renderOptions.draw=!1,e.rightShift+=d,!0):(n.isrest&&s.isrest&&n.minLine<=a.maxLine&&(n.note.renderOptions.draw=!1),n.isrest&&a.isrest&&s.minLine<=n.maxLine&&(n.note.renderOptions.draw=!1),s.isrest&&s.minLine<=n.maxLine&&he(s,0,1),a.isrest&&n.minLine<=a.maxLine&&he(a,0,-1),(s.minLine<=n.maxLine+.5||n.minLine<=a.maxLine)&&(d=h+2,n.note.setXShift(d),!1===a.note.hasBeam()&&(a.stemDirection=-1,a.note.setStemDirection(-1)),s.minLine<=a.maxLine&&!1===s.note.hasBeam()&&(s.stemDirection=1,s.note.setStemDirection(1))),e.rightShift+=d,!0)}static postFormat(t){return!!t&&(t.forEach((t=>t.postFormat())),!0)}constructor(t){var e,i,s;super(t),this.minLine=0,this.maxLine=0,ne.set(this,void 0),ae.set(this,[]),this.ledgerLineStyle={},this.clef=null!==(e=t.clef)&&void 0!==e?e:"treble",this.octaveShift=null!==(i=t.octaveShift)&&void 0!==i?i:0,this.glyphProps=zt.getGlyphProps(this.duration,this.noteType),u(this.glyphProps,"BadArguments",`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.displaced=!1,this.dotShiftY=0,this.useDefaultHeadX=!1,re(this,ne,[],"f"),this.modifiers=[],this.renderOptions=Object.assign(Object.assign({},this.renderOptions),{strokePx:t.strokePx||le.LEDGER_LINE_OFFSET}),this.calculateKeyProps(),this.buildStem(),t.autoStem?this.autoStem():this.setStemDirection(null!==(s=t.stemDirection)&&void 0!==s?s:Ct.UP),this.reset(),this.buildFlag()}reset(){super.reset();const t=oe(this,ne,"f").map((t=>t.getStyle()));this.buildNoteHeads(),oe(this,ne,"f").forEach(((e,i)=>{const s=t[i];s&&e.setStyle(s)}));const e=this.stave;return e&&this.setStave(e),this.calcNoteDisplacements(),this}setBeam(t){return this.beam=t,this.calcNoteDisplacements(),this.stem&&this.stem.setExtension(this.getStemExtension()),this}buildStem(){return this.setStem(new Ct({hide:!!this.isRest()})),this}buildNoteHeads(){re(this,ne,[],"f");const t=this.getStemDirection(),e=this.getKeys();let i,s,n,a,o,r=!1;t===Ct.UP?(n=0,a=e.length,o=1):(n=e.length-1,a=-1,o=-1);for(let e=n;e!==a;e+=o){const n=oe(this,ae,"f")[e].keyProps,a=n.line;void 0===i?i=a:(s=Math.abs(i-a),0===s||.5===s?r=!r:(r=!1,this.useDefaultHeadX=!0)),i=a;const o=new ie({duration:this.duration,noteType:this.noteType,displaced:r,stemDirection:t,customGlyphCode:n.code,line:n.line});o.fontInfo=this.fontInfo,this.addChildElement(o),oe(this,ne,"f")[oe(this,ae,"f")[e].index]=o}return oe(this,ne,"f")}autoStem(){this.setStemDirection(this.calculateOptimalStemDirection())}calculateOptimalStemDirection(){this.minLine=oe(this,ae,"f")[0].keyProps.line,this.maxLine=oe(this,ae,"f")[this.keyProps.length-1].keyProps.line;return(this.minLine+this.maxLine)/2<3?Ct.UP:Ct.DOWN}calculateKeyProps(){var t;let e;for(let i=0;i<this.keys.length;++i){const s=this.keys[i],n={octaveShift:null!==(t=this.octaveShift)&&void 0!==t?t:0,duration:this.duration},a=mt.keyProperties(s,this.clef,this.noteType,n);if(!a)throw new c("BadArguments",`Invalid key for note properties: ${s}`);"R"===a.key&&("1"===this.duration||"w"===this.duration?a.line=4:a.line=3);const o=a.line;void 0===e?e=o:.5===Math.abs(e-o)&&(this.displaced=!0,a.displaced=!0,this.keyProps.length>0&&(this.keyProps[i-1].displaced=!0)),e=o,this.keyProps.push(a)}this.keyProps.forEach(((t,e)=>{oe(this,ae,"f").push({keyProps:t,index:e})})),oe(this,ae,"f").sort(((t,e)=>t.keyProps.line-e.keyProps.line))}getBoundingBox(){const t=new D(this.getAbsoluteX(),this.ys[0],0,0);oe(this,ne,"f").forEach((e=>{t.mergeWith(e.getBoundingBox())}));const{yTop:e,yBottom:i}=this.getNoteHeadBounds(),s=this.stem.getHeight(),n=this.getStemX()-mt.STEM_WIDTH/2,a=this.getStemDirection()===Ct.DOWN?e-s-this.flag.getTextMetrics().actualBoundingBoxDescent:i-s+this.flag.getTextMetrics().actualBoundingBoxAscent;if(!this.isRest()&&this.hasStem()&&t.mergeWith(new D(this.getAbsoluteX(),a,0,0)),this.hasFlag()){const e=this.flag.getBoundingBox();t.mergeWith(e.move(n,a))}for(let e=0;e<this.modifiers.length;e++)t.mergeWith(this.modifiers[e].getBoundingBox());return t}getLineNumber(t){if(!this.keyProps.length)throw new c("NoKeyProps","Can't get bottom note line, because note is not initialized properly.");let e=this.keyProps[0].line;for(let i=0;i<this.keyProps.length;i++){const s=this.keyProps[i].line;t?s>e&&(e=s):s<e&&(e=s)}return e}isRest(){const t=this.glyphProps.codeHead;return t>=""&&t<=""}isChord(){return!this.isRest()&&this.keys.length>1}hasStem(){return this.glyphProps.stem}hasFlag(){return super.hasFlag()&&!this.isRest()}getStemX(){return"r"===this.noteType?this.getCenterGlyphX():super.getStemX()+(this.stemDirection?Ct.WIDTH/(2*-this.stemDirection):0)}getYForTopText(t){const e=this.getStemExtents();return Math.min(this.checkStave().getYForTopText(t),e.topY-this.renderOptions.annotationSpacing*(t+1))}getYForBottomText(t){const e=this.getStemExtents();return Math.max(this.checkStave().getYForTopText(t),e.baseY+this.renderOptions.annotationSpacing*t)}setStave(t){super.setStave(t);const e=oe(this,ne,"f").map((e=>(e.setStave(t),e.getY())));if(this.setYs(e),this.stem){const{yTop:t,yBottom:e}=this.getNoteHeadBounds();this.stem.setYBounds(t,e)}return this}isDisplaced(){return this.displaced}setNoteDisplaced(t){return this.displaced=t,this}getTieRightX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()+this.xShift+this.rightDisplacedHeadPx,this.modifierContext&&(t+=this.modifierContext.getRightShift()),t}getTieLeftX(){let t=this.getAbsoluteX();return t+=this.xShift-this.leftDisplacedHeadPx,t}getLineForRest(){let t=this.keyProps[0].line;if(this.keyProps.length>1){const e=this.keyProps[this.keyProps.length-1].line;t=p(Math.max(t,e),Math.min(t,e))}return t}getModifierStartXY(t,e,i={}){if(!this.preFormatted)throw new c("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(0===this.ys.length)throw new c("NoYValues","No Y-Values calculated for this note.");const{ABOVE:s,BELOW:n,LEFT:a,RIGHT:o}=nt.Position;let r=0;t===a?r=-2:t===o?(r=this.getGlyphWidth()+this.xShift+2,this.stemDirection===Ct.UP&&this.hasFlag()&&(i.forceFlagRight||((t,e)=>e===(t.getStemDirection()===Ct.UP?t.keyProps.length-1:0))(this,e))&&(r+=this.flag.getWidth())):t!==n&&t!==s||(r=this.getGlyphWidth()/2);let h=0;switch(oe(this,ne,"f")[e].getText()){case et.restDoubleWhole:case et.restWhole:h+=.5;break;case et.restHalf:case et.restQuarter:case et.rest8th:case et.rest16th:h-=.5;break;case et.rest32nd:case et.rest64th:h-=1.5;break;case et.rest128th:h-=2.5}return{x:this.getAbsoluteX()+r,y:this.ys[e]+h*this.checkStave().getSpacingBetweenLines()}}setStyle(t){return super.setGroupStyle(t)}setStemStyle(t){const e=this.getStem();return e&&e.setStyle(t),this}getStemStyle(){var t;return null===(t=this.stem)||void 0===t?void 0:t.getStyle()}setLedgerLineStyle(t){this.ledgerLineStyle=t}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(t){this.flagStyle=t}getFlagStyle(){return this.flagStyle}getGlyphWidth(){return this.noteHeads[0].getWidth()}setKeyStyle(t,e){return oe(this,ne,"f")[t].setStyle(e),this}setKeyLine(t,e){return this.keyProps[t].line=e,this.reset(),this}getKeyLine(t){return this.keyProps[t].line}getVoiceShiftWidth(){return this.getGlyphWidth()*(this.displaced?2:1)}calcNoteDisplacements(){this.setLeftDisplacedHeadPx(this.displaced&&this.stemDirection===Ct.DOWN?this.getGlyphWidth():0),this.setRightDisplacedHeadPx(!this.hasFlag()&&this.displaced&&this.stemDirection===Ct.UP?this.getGlyphWidth():0)}preFormat(){if(this.preFormatted)return;let t=0;this.modifierContext&&(this.modifierContext.preFormat(),0===this.modifierContext.getWidth()&&(t=le.minNoteheadPadding));let e=this.getGlyphWidth()+this.leftDisplacedHeadPx+this.rightDisplacedHeadPx+t;this.shouldDrawFlag()&&this.stemDirection===Ct.UP&&(e+=this.getGlyphWidth()),this.setWidth(e),this.preFormatted=!0}getNoteHeadBounds(){let t,e,i,s,n=1/0,a=-1/0,o=this.checkStave().getNumLines(),r=1,h=o,l=r;return oe(this,ne,"f").forEach((c=>{const d=c.getLine(),u=c.getY();n=Math.min(u,n),a=Math.max(u,a),void 0===e&&c.isDisplaced()&&(e=c.getAbsoluteX()),void 0!==t||c.isDisplaced()||(t=c.getAbsoluteX()),o=Math.max(d,o),r=Math.min(d,r),c.isDisplaced()?(i=void 0===i?d:Math.max(d,i),s=void 0===s?d:Math.min(d,s)):(h=Math.max(d,h),l=Math.min(d,l))}),this),{yTop:n,yBottom:a,displacedX:e,nonDisplacedX:t,highestLine:o,lowestLine:r,highestDisplacedLine:i,lowestDisplacedLine:s,highestNonDisplacedLine:h,lowestNonDisplacedLine:l}}getNoteHeadBeginX(){return this.getAbsoluteX()+this.xShift}getNoteHeadEndX(){return this.getNoteHeadBeginX()+this.getGlyphWidth()}get noteHeads(){return oe(this,ne,"f").slice()}drawLedgerLines(){const t=this.checkStave(),{renderOptions:{strokePx:e}}=this,i=this.checkContext(),s=this.getGlyphWidth()+2*e,n=2*(this.getGlyphWidth()+e)-Ct.WIDTH/2;if(this.isRest())return;if(!i)throw new c("NoCanvasContext","Can't draw without a canvas context.");const{highestLine:a,lowestLine:o,highestDisplacedLine:r,highestNonDisplacedLine:h,lowestDisplacedLine:l,lowestNonDisplacedLine:d,displacedX:u,nonDisplacedX:g}=this.getNoteHeadBounds();if(a<6&&o>0)return;const p=Math.min(null!=u?u:0,null!=g?g:0),m=(t,a,o)=>{let r;r=o&&a?p-e:a?(null!=g?g:0)-e:(null!=u?u:0)-e;const h=a&&o?n:s;i.beginPath(),i.moveTo(r,t),i.lineTo(r+h,t),i.stroke()},f=Object.assign(Object.assign({},t.getDefaultLedgerLineStyle()),this.getLedgerLineStyle());this.applyStyle(i,f);for(let e=6;e<=a;++e){const i=void 0!==g&&e<=h,s=void 0!==r&&e<=r;m(t.getYForNote(e),i,s)}for(let e=0;e>=o;--e){const i=void 0!==g&&e>=d,s=void 0!==l&&e>=l;m(t.getYForNote(e),i,s)}this.restoreStyle(i,f)}drawModifiers(t){const e=this.checkContext();for(let i=0;i<this.modifiers.length;i++){const s=this.modifiers[i],n=s.checkIndex(),a=oe(this,ne,"f")[n];if(a===t){const t=a.getStyle();a.applyStyle(e,t),s.setContext(e),s.drawWithStyle(),a.restoreStyle(e,t)}}}shouldDrawFlag(){const t=void 0!==this.stem,e=void 0!==this.glyphProps.codeFlagUp,i=void 0===this.beam;return t&&e&&i&&!this.isRest()}drawFlag(){const t=this.checkContext();if(!t)throw new c("NoCanvasContext","Can't draw without a canvas context.");if(this.shouldDrawFlag()){const{yTop:e,yBottom:i}=this.getNoteHeadBounds(),s=this.stem.getHeight(),n=this.getStemX()-mt.STEM_WIDTH/2,a=this.getStemDirection()===Ct.DOWN?e-s-this.flag.getTextMetrics().actualBoundingBoxDescent:i-s+this.flag.getTextMetrics().actualBoundingBoxAscent;this.applyStyle(t,this.flagStyle),this.flag.renderText(t,n,a),this.restoreStyle(t,this.flagStyle)}}drawNoteHeads(){const t=this.checkContext();oe(this,ne,"f").forEach((e=>{e.applyStyle(t),t.openGroup("notehead",e.getAttribute("id")),e.setContext(t).draw(),this.drawModifiers(e),t.closeGroup(),e.restoreStyle(t)}))}drawStem(t){const e=this.checkContext();t&&this.setStem(new Ct(t)),this.shouldDrawFlag()&&this.stem&&this.stem.adjustHeightForFlag(),this.stem&&this.stem.setContext(e).draw()}getStemExtension(){const t=super.getStemExtension();if(!this.glyphProps.stem)return t;const e=this.getStemDirection();if(e!==this.calculateOptimalStemDirection())return t;let i;i=e===Ct.UP?3-this.maxLine:this.minLine-3;const s=i-3.5;if(s<=0)return t;const n=this.getStave();let a=10;return void 0!==n&&(a=n.getSpacingBetweenLines()),t+s*a}draw(){if(!1===this.renderOptions.draw)return;if(0===this.ys.length)throw new c("NoYValues","Can't draw note without Y values.");const t=this.checkContext(),e=this.getNoteHeadBeginX(),i=this.hasStem()&&!this.beam;if(oe(this,ne,"f").forEach((t=>t.setX(e))),this.stem){const t=this.getStemX();this.stem.setNoteHeadXBounds(t,t)}!function(...t){le.DEBUG&&g("VexFlow.StaveNote",t)}("Rendering ",this.isChord()?"chord :":"note :",this.keys),this.applyStyle(),t.openGroup("stavenote",this.getAttribute("id")),this.drawLedgerLines(),i&&this.drawStem(),this.drawNoteHeads(),this.drawFlag();const s=this.getBoundingBox();t.pointerRect(s.getX(),s.getY(),s.getW(),s.getH()),t.closeGroup(),this.restoreStyle(),this.setRendered()}}ne=new WeakMap,ae=new WeakMap,le.DEBUG=!1;class ce extends ${static get CATEGORY(){return l.StaveTie}constructor(t,e=""){super(),this.setNotes(t),this.text=e,this.renderOptions={cp1:8,cp2:12,textShiftX:0,firstXShift:0,lastXShift:0,yShift:7,tieSpacing:0}}setDirection(t){return this.direction=t,this}setNotes(t){if(!t.firstNote&&!t.lastNote)throw new c("BadArguments","Tie needs to have either firstNote or lastNote set.");if(t.firstIndexes||(t.firstIndexes=[0]),t.lastIndexes||(t.lastIndexes=[0]),t.firstIndexes.length!==t.lastIndexes.length)throw new c("BadArguments","Tied notes must have same number of indexes.");return this.notes=t,this}isPartial(){return!this.notes.firstNote||!this.notes.lastNote}renderTie(t){if(0===t.firstYs.length||0===t.lastYs.length)throw new c("BadArguments","No Y-values to render");const e=this.checkContext();let i=this.renderOptions.cp1,s=this.renderOptions.cp2;Math.abs(t.lastX-t.firstX)<10&&(i=2,s=8);const n=this.renderOptions.firstXShift,a=this.renderOptions.lastXShift,o=this.renderOptions.yShift*t.direction,r=this.notes.firstIndexes,h=this.notes.lastIndexes;this.applyStyle(),e.openGroup("stavetie",this.getAttribute("id"));for(let l=0;l<r.length;++l){const d=(t.lastX+a+(t.firstX+n))/2,u=t.firstYs[r[l]]+o,g=t.lastYs[h[l]]+o;if(isNaN(u)||isNaN(g))throw new c("BadArguments","Bad indexes for tie rendering.");const p=(u+g)/2+i*t.direction,m=(u+g)/2+s*t.direction;e.beginPath(),e.moveTo(t.firstX+n,u),e.quadraticCurveTo(d,p,t.lastX+a,g),e.quadraticCurveTo(d,m,t.firstX+n,u),e.closePath(),e.fill()}e.closeGroup(),this.restoreStyle()}renderTieText(t,e){var i,s,n;const a=this.checkContext();let o=(t+e)/2;o-=a.measureText(this.text).width/2;const r=null!==(s=null===(i=this.notes.firstNote)||void 0===i?void 0:i.checkStave())&&void 0!==s?s:null===(n=this.notes.lastNote)||void 0===n?void 0:n.checkStave();r&&(a.save(),a.setFont(this.fontInfo),a.fillText(this.text,o+this.renderOptions.textShiftX,r.getYForTopText()-1),a.restore())}getNotes(){return this.notes}draw(){this.checkContext(),this.setRendered();const t=this.notes.firstNote,e=this.notes.lastNote;let i=0,s=0,n=[0],a=[0],o=0;if(t)i=t.getTieRightX()+this.renderOptions.tieSpacing,o=t.getStemDirection(),n=t.getYs();else if(e){i=e.checkStave().getTieStartX(),n=e.getYs(),this.notes.firstIndexes=this.notes.lastIndexes}if(e)s=e.getTieLeftX()+this.renderOptions.tieSpacing,o=e.getStemDirection(),a=e.getYs();else if(t){s=t.checkStave().getTieEndX(),a=t.getYs(),this.notes.lastIndexes=this.notes.firstIndexes}return this.direction&&(o=this.direction),this.renderTie({firstX:i,lastX:s,firstYs:n,lastYs:a,direction:o}),this.renderTieText(i,s),!0}}class de extends ce{static get CATEGORY(){return l.TabTie}static createHammeron(t){return new de(t,"H")}static createPulloff(t){return new de(t,"P")}constructor(t,e){super(t,e),this.renderOptions.cp1=9,this.renderOptions.cp2=11,this.renderOptions.yShift=3,this.direction=-1}}var ue;!function(t){t[t.STRICT=1]="STRICT",t[t.SOFT=2]="SOFT",t[t.FULL=3]="FULL"}(ue||(ue={}));class ge extends ${static get CATEGORY(){return l.Voice}static get Mode(){return ue}constructor(t){let e;if(super(),this.resolutionMultiplier=1,this.mode=ue.STRICT,this.preFormatted=!1,this.ticksUsed=new y(0,1),this.largestTickWidth=0,this.tickables=[],this.options={softmaxFactor:mt.SOFTMAX_FACTOR},"string"==typeof t){const i=t.match(/(\d+)\/(\d+)/);i&&(e={numBeats:parseInt(i[1]),beatValue:parseInt(i[2])})}else e=t;this.time=Object.assign({numBeats:4,beatValue:4,resolution:mt.RESOLUTION},e),this.totalTicks=new y(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(t){return this.mode=t,this}getResolutionMultiplier(){return this.resolutionMultiplier}getActualResolution(){return this.resolutionMultiplier*this.time.resolution}setStave(t){return this.stave=t,this}getStave(){return this.stave}getBoundingBox(){const t=this.tickables[0].getBoundingBox();for(let e=1;e<this.tickables.length;++e){const i=this.tickables[e];!i.getStave()&&this.stave&&i.setStave(this.stave);const s=i.getBoundingBox();t.mergeWith(s)}return t}setStrict(t){return this.mode=t?ue.STRICT:ue.SOFT,this}isComplete(){return this.mode!==ue.STRICT&&this.mode!==ue.FULL||this.ticksUsed.equals(this.totalTicks)}setSoftmaxFactor(t){return this.options.softmaxFactor=t,this.expTicksUsed=0,this}reCalculateExpTicksUsed(){const t=this.ticksUsed.value();return this.expTicksUsed=S(this.tickables.map((e=>Math.pow(this.options.softmaxFactor,e.getTicks().value()/t)))),this.expTicksUsed}softmax(t){this.expTicksUsed||(this.expTicksUsed=this.reCalculateExpTicksUsed());const e=this.ticksUsed.value();return(t=>Math.pow(this.options.softmaxFactor,t/e))(t)/this.expTicksUsed}addTickable(t){if(!t.shouldIgnoreTicks()){const e=t.getTicks();if(this.ticksUsed.add(e),this.expTicksUsed=0,(this.mode===ue.STRICT||this.mode===ue.FULL)&&this.ticksUsed.greaterThan(this.totalTicks))throw this.ticksUsed.subtract(e),new c("BadArgument","Too many ticks.");e.lessThan(this.smallestTickCount)&&(this.smallestTickCount=e.clone()),this.resolutionMultiplier=this.ticksUsed.denominator,this.totalTicks.add(0,this.ticksUsed.denominator)}return this.tickables.push(t),t.setVoice(this),this}addTickables(t){for(let e=0;e<t.length;++e)this.addTickable(t[e]);return this}preFormat(){if(this.preFormatted)return this;const t=this.checkStave();return this.tickables.forEach((e=>{e.getStave()||e.setStave(t)})),this.preFormatted=!0,this}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}draw(t=this.checkContext(),e){e=null!=e?e:this.stave,this.setRendered();for(let i=0;i<this.tickables.length;++i){const s=this.tickables[i];e&&s.setStave(e),u(s.getStave(),"MissingStave","The voice cannot draw tickables without staves."),s.setContext(t),s.drawWithStyle()}}}class pe extends nt{static get CATEGORY(){return l.GraceNoteGroup}static format(t,e){if(!t||0===t.length)return!1;const i=[];let s=null,n=0;for(let e=0;e<t.length;++e){const a=t[e],r=a.getNote(),h=o(r),l=h?4:0;if(h&&r!==s){for(let t=0;t<r.keys.length;++t)n=Math.max(r.getLeftDisplacedHeadPx(),n);s=r}i.push({shift:n,gracenoteGroup:a,spacing:l})}let a,r=i[0].shift;for(let t=0;t<i.length;++t){const e=i[t].gracenoteGroup;e.preFormat(),a=e.getWidth()+i[t].spacing,r=Math.max(a,r)}for(let t=0;t<i.length;++t){const e=i[t].gracenoteGroup;a=e.getWidth()+i[t].spacing,e.setSpacingFromNextModifier(r-Math.min(a,r)+le.minNoteheadPadding)}return e.leftShift+=r,!0}constructor(t,e){return super(),this.preFormatted=!1,this.position=nt.Position.LEFT,this.graceNotes=t,this.width=0,this.showSlur=e,this.slur=void 0,this.voice=new ge({numBeats:4,beatValue:4,resolution:mt.RESOLUTION}).setStrict(!1),this.renderOptions={slurYShift:0},this.beams=[],this.voice.addTickables(this.graceNotes),this}preFormat(){this.preFormatted||(this.formatter||(this.formatter=new ti),this.formatter.joinVoices([this.voice]).format([this.voice],0,{}),this.setWidth(this.formatter.getMinTotalWidth()),this.preFormatted=!0)}beamNotes(t){if((t=t||this.graceNotes).length>1){const e=new mi(t);e.renderOptions.beamWidth=3,e.renderOptions.partialBeamLength=4,this.beams.push(e)}return this}setWidth(t){return this.width=t,this}getWidth(){return this.width+le.minNoteheadPadding}getGraceNotes(){return this.graceNotes}draw(){const t=this.checkContext(),e=this.checkAttachedNote();if(this.setRendered(),function(...t){pe.DEBUG&&g("VexFlow.GraceNoteGroup",t)}("Drawing grace note group for:",e),this.alignSubNotesWithNote(this.getGraceNotes(),e),this.graceNotes.forEach((e=>e.setContext(t).draw())),this.beams.forEach((e=>e.setContext(t).draw())),this.showSlur){const i=o(e),s=i?ce:de;this.slur=new s({lastNote:this.graceNotes[0],firstNote:e,firstIndexes:[0],lastIndexes:[0]}),this.slur.renderOptions.cp2=12,this.slur.renderOptions.yShift=(i?7:5)+this.renderOptions.slurYShift,this.slur.setContext(t).draw()}}}pe.DEBUG=!1;class me extends nt{static get CATEGORY(){return l.NoteSubGroup}static format(t,e){if(!t||0===t.length)return!1;let i=0;for(let e=0;e<t.length;++e){const s=t[e];s.preFormat(),i+=s.getWidth()}return e.leftShift+=i,!0}constructor(t){super(),this.preFormatted=!1,this.position=nt.Position.LEFT,this.subNotes=t,this.subNotes.forEach((t=>{t.setIgnoreTicks(!1)})),this.width=0,this.formatter=new ti,this.voice=new ge({numBeats:4,beatValue:4,resolution:mt.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()),this.preFormatted=!0)}setWidth(t){return this.width=t,this}getWidth(){return this.width}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered(),this.alignSubNotesWithNote(this.subNotes,e),this.subNotes.forEach((e=>e.setContext(t).drawWithStyle()))}}class fe extends nt{static get CATEGORY(){return l.Ornament}static get minPadding(){return v.get("NoteHead.minPadding")}static format(t,e){var i,s;if(!t||0===t.length)return!1;let n=0,a=e.rightShift,o=e.leftShift;for(let r=0;r<t.length;++r){const h=t[r],l=2;if(h.position===tt.RIGHT)h.xShift+=a+2,a+=h.width+fe.minPadding;else if(h.position===tt.LEFT)h.xShift-=o+h.width+2,o+=h.width+fe.minPadding;else if(h.position===tt.ABOVE){n=Math.max(h.getWidth(),n);const t=h.getNote();let a=t.getLineNumber(!0)+e.topTextLine;const o=t.getStem();o&&t.getStemDirection()===Ct.UP&&(a+=Math.abs(o.getHeight())/mt.STAVE_LINE_DISTANCE);const r=null!==(s=null===(i=t.getStave())||void 0===i?void 0:i.getNumLines())&&void 0!==s?s:0;a<r&&(e.topTextLine+=r-a),h.setTextLine(e.topTextLine),e.topTextLine+=l}else n=Math.max(h.getWidth(),n),h.setTextLine(e.textLine),e.textLine+=l}return e.leftShift=o+n/2,e.rightShift=a+n/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=tt.ABOVE,fe.ornamentRight.indexOf(t)>=0&&(this.position=tt.RIGHT),fe.ornamentLeft.indexOf(t)>=0&&(this.position=tt.LEFT),this.type=t,this.delayed=!1,this.renderOptions={accidentalLowerPadding:3,accidentalUpperPadding:3},this.adjustForStemDirection=!1,this.ornamentAlignWithNoteHead=fe.ornamentAlignWithNoteHead.indexOf(this.type)>=0,fe.ornamentNoteTransition.indexOf(this.type)>=0&&(this.delayed=!0),this.text=mt.ornamentCodes(this.type)}setNote(t){return super.setNote(t),fe.ornamentArticulation.indexOf(this.type)>=0&&(t.getLineNumber()>=3?this.position=nt.Position.ABOVE:this.position=nt.Position.BELOW),this}setDelayed(t){return this.delayed=t,this}setUpperAccidental(t){return this.accidentalUpper=new $,this.accidentalUpper.setText(mt.accidentalCodes(t)),this}setLowerAccidental(t){return this.accidentalLower=new $,this.accidentalLower.setText(mt.accidentalCodes(t)),this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.checkStave();this.applyStyle(),t.openGroup("ornament",this.getAttribute("id"));const s=e.getModifierStartXY(this.position,this.index);let n=s.x;const a=i.getSpacingBetweenLines(),o=At(e,this.position);let r=this.ornamentAlignWithNoteHead?s.y:0;if(this.position===tt.ABOVE&&(r=Ft(e,this.textLine)-(this.textLine+o)*a),this.position===tt.BELOW&&(r=Ot(e,this.textLine)+(this.textLine+o+1.5)*a),this.delayed){let t=0;const s=e.getTickContext().getX();if(void 0!==this.delayXShift)t=this.delayXShift;else{const a=e.getVoice().getTickables(),o=a.indexOf(e),r=o+1<a.length?a[o+1].checkTickContext():void 0;t+=r?.5*(r.getX()-s):.5*(i.getX()+i.getWidth()-n),this.delayXShift=t}n+=t}!function(...t){fe.DEBUG&&g("VexFlow.Ornament",t)}("Rendering ornament: ",this.text.charCodeAt(0),n,r),this.accidentalLower&&(this.accidentalLower.renderText(t,n+this.xShift-.5*this.accidentalLower.getWidth(),r+this.yShift-this.accidentalLower.getTextMetrics().actualBoundingBoxDescent),r-=this.accidentalLower.getHeight()+this.renderOptions.accidentalLowerPadding),fe.ornamentYShift.indexOf(this.type)>=0&&(this.yShift+=this.getHeight()),this.x=n-(this.position===tt.ABOVE||this.position===tt.BELOW?.5*this.width:0),this.y=r,this.renderText(t,0,0),this.accidentalUpper&&(r-=this.getHeight()+this.renderOptions.accidentalUpperPadding,this.accidentalUpper.renderText(t,n+this.xShift-.5*this.accidentalUpper.getWidth(),r+this.yShift-this.accidentalUpper.getTextMetrics().actualBoundingBoxDescent)),t.closeGroup(),this.restoreStyle()}}fe.DEBUG=!1;class Se extends nt{static get CATEGORY(){return l.Parenthesis}static buildAndAttach(t){for(const e of t)for(let t=0;t<e.keys.length;t++)e.addModifier(new Se(tt.LEFT),t),e.addModifier(new Se(tt.RIGHT),t)}static format(t,e){if(!t||0===t.length)return!1;let i=0,s=0;for(let e=0;e<t.length;++e){const n=t[e],a=n.getNote(),o=n.getPosition(),r=n.checkIndex();let h=0;o===tt.RIGHT&&(h=a.getRightParenthesisPx(r),s=s>h+n.width?s:h+n.width),o===tt.LEFT&&(h=a.getLeftParenthesisPx(r)+n.width,i=i>h+n.width?i:h+n.width),n.setXShift(h)}return e.leftShift+=i,e.rightShift+=s,!0}constructor(t){super(),this.position=null!=t?t:nt.Position.LEFT,this.position===nt.Position.RIGHT?this.text="":this.position===nt.Position.LEFT&&(this.text="")}setNote(t){return this.note=t,this.setFont(t.getFont()),this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});this.renderText(t,i.x,i.y)}}function Te(t){if(!t)return!1;const e=d();return"function"==typeof e.HTMLCanvasElement&&t instanceof e.HTMLCanvasElement||"function"==typeof t.getContext&&"function"==typeof t.toDataURL}class we extends Rt{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static sanitizeCanvasDims(t,e){const i=this.CANVAS_BROWSER_SIZE_LIMIT;return Math.max(t,e)>i&&(!function(...t){const e=t.join(" "),i=new Error;d().console.log("Warning: ",e,i.stack)}("Canvas dimensions exceed browser limit. Cropping to "+i),t>i&&(t=i),e>i&&(e=i)),[t,e]}constructor(t){super(),this.textHeight=0,this.context2D=t,this.curTransfrom=t.getTransform(),t.canvas?this.canvas=t.canvas:this.canvas={width:we.WIDTH,height:we.HEIGHT}}clear(){this.context2D.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(t,e){}closeGroup(){}openRotation(t,e,i){this.curTransfrom=this.context2D.getTransform(),this.context2D.translate(e,i),this.context2D.rotate(t*Math.PI/180),this.context2D.translate(-e,-i)}closeRotation(){this.context2D.setTransform(this.curTransfrom)}add(t){}setFillStyle(t){return this.context2D.fillStyle=t,this}setBackgroundFillStyle(t){return this}setStrokeStyle(t){return this.context2D.strokeStyle=t,this}setShadowColor(t){return this.context2D.shadowColor=t,this}setShadowBlur(t){const e=this.context2D.getTransform(),i=Math.sqrt(e.a*e.a+e.b*e.b+e.c*e.c+e.d*e.d);return this.context2D.shadowBlur=i*t,this}setLineWidth(t){return this.context2D.lineWidth=t,this}setLineCap(t){return this.context2D.lineCap=t,this}setLineDash(t){return this.context2D.setLineDash(t),this}scale(t,e){return this.context2D.scale(t,e),this}resize(t,e,i){var s;const n=this.context2D.canvas,a=null!==(s=null!=i?i:d().devicePixelRatio)&&void 0!==s?s:1;return[t,e]=we.sanitizeCanvasDims(t*a,e*a),t=t/a|0,e=e/a|0,n.width=t*a,n.height=e*a,Te(n)&&(n.style.width=t+"px",n.style.height=e+"px"),this.scale(a,a)}rect(t,e,i,s){return this.context2D.rect(t,e,i,s),this}fillRect(t,e,i,s){return this.context2D.fillRect(t,e,i,s),this}pointerRect(t,e,i,s){return this}clearRect(t,e,i,s){return this.context2D.clearRect(t,e,i,s),this}beginPath(){return this.context2D.beginPath(),this}moveTo(t,e){return this.context2D.moveTo(t,e),this}lineTo(t,e){return this.context2D.lineTo(t,e),this}bezierCurveTo(t,e,i,s,n,a){return this.context2D.bezierCurveTo(t,e,i,s,n,a),this}quadraticCurveTo(t,e,i,s){return this.context2D.quadraticCurveTo(t,e,i,s),this}arc(t,e,i,s,n,a){return this.context2D.arc(t,e,i,s,n,a),this}fill(){return this.context2D.fill(),this}stroke(){return this.context2D.stroke(),this}closePath(){return this.context2D.closePath(),this}measureText(t){const e=this.context2D.measureText(t);let i=0,s=0;return e.fontBoundingBoxAscent?(i=-e.fontBoundingBoxAscent,s=e.fontBoundingBoxDescent+e.fontBoundingBoxAscent):(i=-e.actualBoundingBoxAscent,s=e.actualBoundingBoxDescent+e.actualBoundingBoxAscent),{x:0,y:i,width:e.width,height:s}}fillText(t,e,i){return this.context2D.fillText(t,e,i),this}save(){return this.context2D.save(),this}restore(){return this.context2D.restore(),this}set fillStyle(t){this.context2D.fillStyle=t}get fillStyle(){return this.context2D.fillStyle}set strokeStyle(t){this.context2D.strokeStyle=t}get strokeStyle(){return this.context2D.strokeStyle}setFont(t,e,i,s){const n=F.validate(t,e,i,s);return this.context2D.font=F.toCSSString(n),this.textHeight=F.convertSizeToPixelValue(n.size),this}getFont(){return this.context2D.font}}var xe,be,ye=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};const Ce={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}},ve=2*Math.PI;class ke extends Rt{constructor(t){super(),xe.add(this),this.width=0,this.height=0,this.precision=1,this.backgroundFillStyle="white",this.fontCSSString="",this.element=t,this.precision=Math.pow(10,mt.RENDER_PRECISION_PLACES);const e=this.create("svg");e.setAttribute("pointer-events","none"),this.element.appendChild(e),this.svg=e,this.parent=this.svg,this.groups=[this.svg],this.path="",this.pen={x:NaN,y:NaN};const i={"font-family":v.get("fontFamily"),"font-size":"10pt","font-weight":B.NORMAL,"font-style":E.NORMAL};this.state=Object.assign({scaleX:1,scaleY:1},i),this.attributes=Object.assign({"stroke-width":1,"stroke-dasharray":"none",fill:"black",stroke:"black",shadowBlur:0,shadowColor:"black"},i),this.groupAttributes=[],this.applyAttributes(e,this.attributes),this.groupAttributes.push(Object.assign({},this.attributes)),this.stateStack=[]}round(t){return Math.round(t*this.precision)/this.precision}create(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}openGroup(t,e){const i=this.create("g");return this.groups.push(i),this.parent.appendChild(i),this.parent=i,t&&i.setAttribute("class",m(t)),e&&i.setAttribute("id",m(e)),this.applyAttributes(i,this.attributes),this.groupAttributes.push(Object.assign(Object.assign({},this.groupAttributes[this.groupAttributes.length-1]),this.attributes)),i}closeGroup(){this.groups.pop(),this.groupAttributes.pop(),this.parent=this.groups[this.groups.length-1]}openRotation(t,e,i){this.openGroup().setAttribute("transform",`translate(${e},${i}) rotate(${t}) translate(-${e},-${i})`)}closeRotation(){this.closeGroup()}add(t){this.parent.appendChild(t)}setFillStyle(t){return this.attributes.fill=t,this}setBackgroundFillStyle(t){return this.backgroundFillStyle=t,this}setStrokeStyle(t){return this.attributes.stroke=t,this}setShadowColor(t){return this.attributes.shadowColor=t,this}setShadowBlur(t){return this.attributes.shadowBlur=t,this}setLineWidth(t){return this.attributes["stroke-width"]=t,this}setLineDash(t){if("[object Array]"===Object.prototype.toString.call(t))return this.attributes["stroke-dasharray"]=t.join(","),this;throw new c("ArgumentError","lineDash must be an array of integers.")}setLineCap(t){return this.attributes["stroke-linecap"]=t,this}resize(t,e){this.width=t,this.height=e,this.element.style.width=t.toString(),this.svg.style.width=t.toString(),this.svg.style.height=e.toString();const i={width:t,height:e};return this.applyAttributes(this.svg,i),this.scale(this.state.scaleX,this.state.scaleY),this}scale(t,e){this.state.scaleX=this.state.scaleX?this.state.scaleX*t:t,this.state.scaleY=this.state.scaleY?this.state.scaleY*e:e;const i=this.width/this.state.scaleX,s=this.height/this.state.scaleY;return this.setViewBox(0,0,i,s),this}setViewBox(t,e,i,s){if("string"==typeof t)this.svg.setAttribute("viewBox",t);else{const n=t+" "+e+" "+i+" "+s;this.svg.setAttribute("viewBox",n)}}applyAttributes(t,e){const i=Ce[t.nodeName];for(const s in e)i&&i[s]||!e[s]||0!==this.groupAttributes.length&&e[s]==this.groupAttributes[this.groupAttributes.length-1][s]||t.setAttributeNS(null,s,e[s]);return t}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild);this.scale(this.state.scaleX,this.state.scaleY)}rect(t,e,i,s,n){s<0&&(e+=s,s*=-1);const a=this.create("rect");return n=null!=n?n:{fill:"none","stroke-width":this.attributes["stroke-width"],stroke:"black"},t=this.round(t),e=this.round(e),i=this.round(i),s=this.round(s),this.applyAttributes(a,Object.assign({x:t,y:e,width:i,height:s},n)),this.add(a),this}fillRect(t,e,i,s){const n={fill:this.attributes.fill,stroke:"none"};return this.rect(t,e,i,s,n),this}pointerRect(t,e,i,s){return this.rect(t,e,i,s,{opacity:"0","pointer-events":"auto"}),this}clearRect(t,e,i,s){return this.rect(t,e,i,s,{fill:this.backgroundFillStyle,stroke:"none"}),this}beginPath(){return this.path="",this.pen.x=NaN,this.pen.y=NaN,this}moveTo(t,e){return t=this.round(t),e=this.round(e),this.path+="M"+t+" "+e,this.pen.x=t,this.pen.y=e,this}lineTo(t,e){return t=this.round(t),e=this.round(e),this.path+="L"+t+" "+e,this.pen.x=t,this.pen.y=e,this}bezierCurveTo(t,e,i,s,n,a){return n=this.round(n),a=this.round(a),t=this.round(t),e=this.round(e),i=this.round(i),s=this.round(s),this.path+="C"+t+" "+e+","+i+" "+s+","+n+" "+a,this.pen.x=n,this.pen.y=a,this}quadraticCurveTo(t,e,i,s){return i=this.round(i),s=this.round(s),t=this.round(t),e=this.round(e),this.path+="Q"+t+" "+e+","+i+" "+s,this.pen.x=i,this.pen.y=s,this}arc(t,e,i,s,n,a){let o=t+i*Math.cos(s),r=e+i*Math.sin(s);o=this.round(o),r=this.round(r);const h=f(s),l=f(n);if(!a&&n-s>=ve||a&&s-n>=ve||h===l){let n=t+i*Math.cos(s+Math.PI),a=e+i*Math.sin(s+Math.PI);n=this.round(n),a=this.round(a),i=this.round(i),this.path+=`M${o} ${r} A${i} ${i} 0 0 0 ${n} ${a} `,this.path+=`A${i} ${i} 0 0 0 ${o} ${r}`,this.pen.x=o,this.pen.y=r}else{let c,d=t+i*Math.cos(n),u=e+i*Math.sin(n);s=h,n=l,c=Math.abs(n-s)<Math.PI?a:!a,s>n&&(c=!c);const g=!a;d=this.round(d),u=this.round(u),i=this.round(i),this.path+=`M${o} ${r} A${i} ${i} 0 ${+c} ${+g} ${d} ${u}`,this.pen.x=d,this.pen.y=u}return this}closePath(){return this.path+="Z",this}fill(t){const e=this.create("path");return void 0===t&&(t=Object.assign(Object.assign({},this.attributes),{stroke:"none"})),t.d=this.path,this.attributes.shadowBlur>0&&(t.style=ye(this,xe,"m",be).call(this)),this.applyAttributes(e,t),this.add(e),this}stroke(){const t=this.create("path"),e=Object.assign(Object.assign({},this.attributes),{fill:"none",d:this.path});return this.attributes.shadowBlur>0&&(e.style=ye(this,xe,"m",be).call(this)),this.applyAttributes(t,e),this.add(t),this}measureText(t){ke.measureTextElement.setText(t),ke.measureTextElement.setFont(this.attributes["font-family"],this.attributes["font-size"],this.attributes["font-weight"],this.attributes["font-style"]);const e=ke.measureTextElement.getBoundingBox();return{x:e.x,y:e.y,width:e.w,height:e.h}}fillText(t,e,i){if(!t||t.length<=0)return this;e=this.round(e),i=this.round(i);const s=Object.assign(Object.assign({},this.attributes),{stroke:"none",x:e,y:i}),n=this.create("text");return n.textContent=t,this.applyAttributes(n,s),this.add(n),this}save(){return this.stateStack.push({state:structuredClone(this.state),attributes:structuredClone(this.attributes)}),this}restore(){const t=this.stateStack.pop();if(t){const e=t;this.state=structuredClone(e.state),this.attributes=structuredClone(e.attributes)}return this}set fillStyle(t){this.setFillStyle(t)}get fillStyle(){return this.attributes.fill}set strokeStyle(t){this.setStrokeStyle(t)}get strokeStyle(){return this.attributes.stroke}setFont(t,e,i,s){const n=F.validate(t,e,i,s);this.fontCSSString=F.toCSSString(n);const a={"font-family":n.family,"font-size":n.size,"font-weight":n.weight,"font-style":n.style};return this.attributes=Object.assign(Object.assign({},this.attributes),a),this.state=Object.assign(Object.assign({},this.state),a),this}getFont(){return this.fontCSSString}}var De,Be;xe=new WeakSet,be=function(){return`filter: drop-shadow(0 0 ${this.attributes.shadowBlur/1.5}px ${this.attributes.shadowColor})`},ke.measureTextElement=new $,function(t){t[t.CANVAS=1]="CANVAS",t[t.SVG=2]="SVG"}(De||(De={})),function(t){t[t.NONE=1]="NONE",t[t.UP=2]="UP",t[t.DOWN=3]="DOWN"}(Be||(Be={}));class Ee{static buildContext(t,e,i,s,n="#FFF"){const a=new Ee(t,e);i&&s&&a.resize(i,s);const o=a.getContext();return o.setBackgroundFillStyle(n),Ee.lastContext=o,o}static getCanvasContext(t,e,i,s){return Ee.buildContext(t,Ee.Backends.CANVAS,e,i,s)}static getSVGContext(t,e,i,s){return Ee.buildContext(t,Ee.Backends.SVG,e,i,s)}static drawDashedLine(t,e,i,s,n,a){t.beginPath();const o=s-e,r=n-i,h=Math.atan2(r,o);let l=e,c=i;t.moveTo(e,i);let d=0,u=!0;for(;!(o<0?l<=s:l>=s)||!(r<0?c<=n:c>=n);){const e=a[d++%a.length],i=l+Math.cos(h)*e;l=o<0?Math.max(s,i):Math.min(s,i);const g=c+Math.sin(h)*e;c=r<0?Math.max(n,g):Math.min(n,g),u?t.lineTo(l,c):t.moveTo(l,c),u=!u}t.closePath(),t.stroke()}constructor(t,e){if(i(t,l.RenderContext))this.ctx=t;else{if(void 0===e)throw new c("InvalidArgument","Missing backend argument");const i=e;let s;if("string"==typeof t){const e=document.getElementById(t);if(!e)throw new c("BadElementId",`Can't find element with ID "${e}"`);s=e}else s=t;if(i===Ee.Backends.CANVAS){if(!Te(s))throw new c("BadElement","CANVAS context requires an HTMLCanvasElement.");const t=s.getContext("2d",{willReadFrequently:!0});if(!t)throw new c("BadElement","Can't get canvas context");this.ctx=new we(t)}else{if(i!==Ee.Backends.SVG)throw new c("InvalidBackend",`No support for backend: ${i}`);if(!function(t){if(!t)return!1;const e=d();return"function"==typeof e.HTMLDivElement&&t instanceof e.HTMLDivElement||"function"==typeof t.appendChild&&"object"==typeof t.style}(s))throw new c("BadElement","SVG context requires an HTMLDivElement.");this.ctx=new ke(s)}}}resize(t,e){return this.ctx.resize(t,e),this}getContext(){return this.ctx}}Ee.Backends=De,Ee.LineEndType=Be,Ee.lastContext=void 0;class Le extends nt{static get CATEGORY(){return l.StringNumber}static format(t,e){const i=e.leftShift,s=e.rightShift;if(!t||0===t.length)return!1;const n=[];let a=null,r=0,h=0;for(let i=0;i<t.length;++i){const l=t[i],d=l.getNote(),u=l.getPosition();if(!o(d))throw new c("NoStaveNote");const g=l.checkIndex(),p=d.getKeyProps()[g],m=d.getModifierContext(),f=2*l.radius/mt.STAVE_LINE_DISTANCE+.5;if(m&&(u===tt.ABOVE?(l.textLine=m.getState().topTextLine,e.topTextLine+=f):u===tt.BELOW&&(l.textLine=m.getState().textLine,e.textLine+=f)),d!==a){for(let t=0;t<d.keys.length;++t)u===nt.Position.LEFT&&(r=Math.max(d.getLeftDisplacedHeadPx(),r)),0===s&&(h=Math.max(d.getRightDisplacedHeadPx(),h));a=d}const S=p.line;n.push({pos:u,note:d,num:l,line:S,shiftL:r,shiftR:h})}n.sort(((t,e)=>e.line-t.line));let l=0,d=0,u=0,g=null,p=null;for(let t=0;t<n.length;++t){const e=n[t].note,a=n[t].pos,o=n[t].num,h=n[t].line,c=n[t].shiftR;h===g&&e===p||(l=s+c);const m=o.getWidth()+1;let f=0;a===nt.Position.LEFT?(o.setXShift(i+r),f=m,d=Math.max(f,d)):a===nt.Position.RIGHT&&(o.setXShift(l),f+=m,u=f>u?f:u),g=h,p=e}return e.leftShift+=d,e.rightShift+=u,!0}constructor(t){super(),this.stringNumber=t,this.position=nt.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=Ee.LineEndType.NONE,this.radius=8,this.drawCircle=!0,this.setWidth(2*this.radius+4)}setLineEndType(t){return t>=Ee.LineEndType.NONE&&t<=Ee.LineEndType.DOWN&&(this.leg=t),this}setStringNumber(t){return this.stringNumber=t,this}setOffsetX(t){return this.xOffset=t,this}setOffsetY(t){return this.yOffset=t,this}setLastNote(t){return this.lastNote=t,this}setDashed(t){return this.dashed=t,this}setDrawCircle(t){return this.drawCircle=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index),s=e.hasStem()?e.getStemDirection():Ct.UP;let n=i.x+this.xShift+this.xOffset,a={};e.hasStem()&&(a=e.checkStem().getExtents());let o=i.y+this.yShift+this.yOffset;switch(this.position){case nt.Position.ABOVE:o=e.getYs().reduce(((t,e)=>t<e?t:e)),e.hasStem()&&s===Ct.UP&&(o=a.topY+v.get("StringNumber.stemPadding")),o-=this.radius+v.get("StringNumber.verticalPadding")+this.textLine*mt.STAVE_LINE_DISTANCE;break;case nt.Position.BELOW:o=e.getYs().reduce(((t,e)=>t>e?t:e)),e.hasStem()&&s===Ct.DOWN&&(o=a.topY-v.get("StringNumber.stemPadding")),o+=this.radius+v.get("StringNumber.verticalPadding")+this.textLine*mt.STAVE_LINE_DISTANCE;break;case nt.Position.LEFT:n-=this.radius/2+v.get("StringNumber.leftPadding");break;case nt.Position.RIGHT:n+=this.radius/2+v.get("StringNumber.rightPadding");break;default:throw new c("InvalidPosition",`The position ${this.position} is invalid`)}t.save(),this.drawCircle&&(t.beginPath(),t.arc(n,o,this.radius,0,2*Math.PI,!1),t.setLineWidth(1.5),t.stroke()),t.setFont(this.fontInfo);const h=n-t.measureText(this.stringNumber).width/2;t.fillText(""+this.stringNumber,h,o+4.5);const l=this.lastNote;if(r(l)){const i=l.getStemX()-e.getX()+5;let s,a;switch(t.setStrokeStyle("#000000"),t.setLineCap("round"),t.setLineWidth(.6),this.dashed?Ee.drawDashedLine(t,n+10,o,n+i,o,[3,3]):Ee.drawDashedLine(t,n+10,o,n+i,o,[3,0]),this.leg){case Ee.LineEndType.UP:s=-10,a=this.dashed?[3,3]:[3,0],Ee.drawDashedLine(t,n+i,o,n+i,o+s,a);break;case Ee.LineEndType.DOWN:s=10,a=this.dashed?[3,3]:[3,0],Ee.drawDashedLine(t,n+i,o,n+i,o+s,a)}}t.restore()}}class Ne extends nt{static get CATEGORY(){return l.Stroke}static format(t,e){const i=e.leftShift;if(!t||0===t.length)return!1;const s=t.map((t=>{const e=t.getNote(),i=t.checkIndex();if(o(e)){const{line:s}=e.getKeyProps()[i];return{line:s,shift:e.getLeftDisplacedHeadPx(),stroke:t}}if(h(e)){const{str:s}=e.getPositions()[i];return{line:s,shift:0,stroke:t}}throw new c("Internal","Unexpected instance.")})),n=i,a=s.reduce(((t,{stroke:e,shift:i})=>(e.setXShift(n+i),Math.max(e.getWidth()+5,t))),0);return e.leftShift+=a,!0}constructor(t,e){super(),this.options=Object.assign({allVoices:!0},e),this.allVoices=this.options.allVoices,this.type=t,this.position=nt.Position.LEFT,this.renderOptions={fontScale:v.get("Stroke.fontSize")},this.setXShift(0),this.setWidth(10)}getPosition(){return this.position}addEndNote(t){return this.noteEnd=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index);let s=e.getYs(),n=i.y,o=i.y;const r=i.x-5,h=e.checkStave().getSpacingBetweenLines(),l=this.checkModifierContext().getMembers(e.getCategory());for(let t=0;t<l.length;t++){const e=l[t];if(a(e)){s=e.getYs();for(let e=0;e<s.length;e++)(this.note===l[t]||this.allVoices)&&(n=Math.min(n,s[e]),o=Math.max(o,s[e]))}}let d="",u=0,g=0;switch(this.type){case Ne.Type.BRUSH_DOWN:case Ne.Type.ROLL_DOWN:case Ne.Type.RASGUEADO_DOWN:d=et.arrowheadBlackUp,u=n,n-=h/2,o+=h/2;break;case Ne.Type.BRUSH_UP:case Ne.Type.ROLL_UP:case Ne.Type.RASGUEADO_UP:d=et.arrowheadBlackDown,u=o+h,n-=h/2;break;case Ne.Type.ARPEGGIO_DIRECTIONLESS:n-=h/2,o+=h/2;break;default:throw new c("InvalidType",`The stroke type ${this.type} does not exist`)}if(this.type===Ne.Type.BRUSH_DOWN||this.type===Ne.Type.BRUSH_UP)t.fillRect(r+this.xShift,n,1,o-n);else{const e=d===et.arrowheadBlackDown?et.wiggleArpeggiatoDown:et.wiggleArpeggiatoUp;let i="";const s=new $;for(;s.getWidth()<o-n;)i+=e,s.setText(i);this.type===Ne.Type.RASGUEADO_DOWN||this.type===Ne.Type.ROLL_DOWN||this.type===Ne.Type.ARPEGGIO_DIRECTIONLESS?(t.openRotation(90,r+this.xShift,n),s.renderText(t,r+this.xShift,n-s.getTextMetrics().actualBoundingBoxDescent+s.getHeight()/2),t.closeRotation(),g=n+s.getWidth()+5):(t.openRotation(-90,r+this.xShift,o),s.renderText(t,r+this.xShift,o-s.getTextMetrics().actualBoundingBoxDescent+s.getHeight()/2),t.closeRotation(),g=o-s.getWidth()-5)}if(0!==u){const e=new $;e.setText(d),e.renderText(t,r+this.xShift-e.getWidth()/2,u)}if(this.type===Ne.Type.RASGUEADO_DOWN||this.type===Ne.Type.RASGUEADO_UP){const e=new $("Stroke.text");e.setText("R"),e.renderText(t,r+this.xShift-e.getWidth()/2,g+(this.type===Ne.Type.RASGUEADO_DOWN?e.getHeight():0))}}}Ne.Type={BRUSH_DOWN:1,BRUSH_UP:2,ROLL_DOWN:3,ROLL_UP:4,RASGUEADO_DOWN:5,RASGUEADO_UP:6,ARPEGGIO_DIRECTIONLESS:7};class Fe extends nt{static get CATEGORY(){return l.Vibrato}static format(t,e,i){if(!t||0===t.length)return!1;let s=e.topTextLine,n=0,a=e.rightShift-7;const o=i.getMembers(Qt.CATEGORY);if(o&&o.length>0){s-=o.map((t=>t.getTextHeight())).reduce(((t,e)=>t>e?t:e))/mt.STAVE_LINE_DISTANCE+1}else e.topTextLine+=1;for(let e=0;e<t.length;++e){const i=t[e];i.setXShift(a),i.setTextLine(s),n+=i.getWidth(),a+=n}return e.rightShift+=n,!0}constructor(){super(),this.position=nt.Position.RIGHT,this.renderOptions={code:60080,width:20},this.setVibratoWidth(this.renderOptions.width)}setVibratoWidth(t){this.renderOptions.width=t,this.text=String.fromCodePoint(this.renderOptions.code);const e=Math.round(this.renderOptions.width/this.getWidth());for(let t=1;t<e;t++)this.text+=String.fromCodePoint(this.renderOptions.code);return this}setVibratoCode(t){return this.renderOptions.code=t,this.setVibratoWidth(this.renderOptions.width)}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(nt.Position.RIGHT,this.index).x,s=e.getYForTopText(this.textLine)+5;this.renderText(t,i,s)}}function Oe(...t){Ae.DEBUG&&g("VexFlow.ModifierContext",t)}class Ae{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}addModifier(t){return Oe("addModifier is deprecated, use addMember instead."),this.addMember(t)}addMember(t){const e=t.getCategory();return this.members[e]||(this.members[e]=[]),this.members[e].push(t),t.setModifierContext(this),this.preFormatted=!1,this}getModifiers(t){return Oe("getModifiers is deprecated, use getMembers instead."),this.getMembers(t)}getMembers(t){var e;return null!==(e=this.members[t])&&void 0!==e?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 c("UnformattedMember","Unformatted member has no metrics.");return{width:this.state.leftShift+this.state.rightShift+this.spacing,spacing:this.spacing}}preFormat(){if(this.preFormatted)return;Oe("Preformatting ModifierContext");const t=this.state,e=this.members;le.format(e[l.StaveNote],t),Se.format(e[l.Parenthesis],t),te.format(e[l.Dot],t),ee.format(e[l.FretHandFinger],t),yt.format(e[l.Accidental],t),Ne.format(e[l.Stroke],t),pe.format(e[l.GraceNoteGroup],t),me.format(e[l.NoteSubGroup],t),Le.format(e[l.StringNumber],t),Pt.format(e[l.Articulation],t),fe.format(e[l.Ornament],t),vt.format(e[l.Annotation],t),Zt.format(e[l.ChordSymbol],t),Qt.format(e[l.Bend],t),Fe.format(e[l.Vibrato],t,this),this.width=t.leftShift+t.rightShift,this.preFormatted=!0}postFormat(){this.postFormatted||(Oe("Postformatting ModifierContext"),le.postFormat(this.getMembers(l.StaveNote)))}}Ae.DEBUG=!1;class Pe extends jt{static get CATEGORY(){return l.Clef}static get types(){const{gClef:t,fClef:e,cClef:i,unpitchedPercussionClef1:s,sixStringTabClef:n}=et;return{treble:{code:t,line:3},bass:{code:e,line:1},alto:{code:i,line:2},tenor:{code:i,line:1},percussion:{code:s,line:2},soprano:{code:i,line:4},"mezzo-soprano":{code:i,line:3},"baritone-c":{code:i,line:0},"baritone-f":{code:e,line:2},subbass:{code:e,line:0},french:{code:t,line:4},tab:{code:n,line:2.5}}}constructor(t,e,i){super(),this.code=Pe.types.treble.code,this.line=Pe.types.treble.line,this.size="default",this.type="treble",this.setPosition(Wt.BEGIN),this.setType(t,e,i),function(...t){Pe.DEBUG&&g("VexFlow.Clef",t)}("Creating clef:",t)}setType(t,e="default",i){return this.type=t,this.code=Pe.types[t].code,this.line=Pe.types[t].line,this.size=null!=e?e:"default","8va"===i&&(this.code===et.gClef&&(this.code=et.gClef8va),this.code===et.fClef&&(this.code=et.fClef8va)),"8vb"===i&&(this.code===et.gClef&&(this.code=et.gClef8vb),this.code===et.fClef&&(this.code=et.fClef8vb)),this.text=this.code,this.fontInfo.size=Math.floor(Pe.getPoint(this.size)),this}static getPoint(t){return"default"===t?v.get("fontSize"):2*v.get("fontSize")/3}setStave(t){return this.stave=t,this}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),this.applyStyle(e),e.openGroup("clef",this.getAttribute("id")),this.y=t.getYForLine(this.line),this.renderText(e,0,0),e.closeGroup(),this.restoreStyle(e)}}Pe.DEBUG=!1;class Re extends jt{static get CATEGORY(){return l.KeySignature}constructor(t,e,i){super(),this.accList=[],this.setKeySig(t,e,i),this.setPosition(Wt.BEGIN),this.glyphs=[],this.paddingForced=!1}convertToGlyph(t,e,i){const s=mt.accidentalCodes(t.type),n=new $(l.KeySignature);n.setText(s);if(n.setYShift(i.getYForLine(t.line)),this.glyphs.length>0){const t=this.glyphs[this.glyphs.length-1];n.setXShift(t.getXShift()+t.getWidth()+1)}this.glyphs.push(n),this.width+=n.getWidth()+1}cancelKey(t){return this.formatted=!1,this.cancelKeySpec=t,this}convertToCancelAccList(t){const e=mt.keySignature(t),i=this.accList.length>0&&e.length>0&&e[0].type!==this.accList[0].type,s=i?e.length:e.length-this.accList.length;if(s<1)return;const n=[];for(let t=0;t<s;t++){let a=t;i||(a=e.length-s+t);const o=e[a];n.push({type:"n",line:o.line})}return this.accList=n.concat(this.accList),{accList:n,type:e[0].type}}addToStave(t){return this.paddingForced=!0,t.addModifier(this),this}convertAccLines(t,e,i=this.accList){let s,n,a=0;switch(t){case"soprano":"#"===e?s=[2.5,.5,2,0,1.5,-.5,1]:a=-1;break;case"mezzo-soprano":"b"===e?s=[0,2,.5,2.5,1,3,1.5]:a=1.5;break;case"alto":a=.5;break;case"tenor":"#"===e?s=[3,1,2.5,.5,2,0,1.5]:a=-.5;break;case"baritone-f":case"baritone-c":"b"===e?s=[.5,2.5,1,3,1.5,3.5,2]:a=2;break;case"bass":case"french":a=1}if(void 0!==s)for(n=0;n<i.length;++n)i[n].line=s[n];else if(0!==a)for(n=0;n<i.length;++n)i[n].line+=a}getPadding(t){return this.formatted||this.format(),0===this.glyphs.length||!this.paddingForced&&t<2?0:this.padding}getWidth(){return this.formatted||this.calculateWidth(),this.width}setKeySig(t,e,i){return this.formatted=!1,this.keySpec=t,this.cancelKeySpec=e,this.alterKeySpec=i,this}alterKey(t){return this.formatted=!1,this.alterKeySpec=t,this}convertToAlterAccList(t){const e=Math.min(t.length,this.accList.length);for(let i=0;i<e;++i)t[i]&&(this.accList[i].type=t[i])}format(){const t=this.checkStave();this.width=0,this.glyphs=[],this.accList=mt.keySignature(u(this.keySpec));const e=this.accList,i=e.length>0?e[0].type:void 0;let s;if(this.cancelKeySpec&&(s=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){const n=(this.position===Wt.END?t.getEndClef():t.getClef())||t.getClef();s&&this.convertAccLines(n,s.type,s.accList),this.convertAccLines(n,i,e);for(let e=0;e<this.accList.length;++e)this.convertToGlyph(this.accList[e],this.accList[e+1],t)}this.formatted=!0}calculateWidth(){if(this.width=0,this.accList=mt.keySignature(u(this.keySpec)),this.cancelKeySpec&&this.convertToCancelAccList(this.cancelKeySpec),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0)for(let t=0;t<this.accList.length;++t){const e=mt.accidentalCodes(this.accList[t].type),i=new $(l.KeySignature);i.setText(e);const s=1;this.width+=i.getWidth()+s}}draw(){const t=this.checkStave().checkContext();this.formatted||this.format(),this.setRendered(),this.applyStyle(t),t.openGroup("keysignature",this.getAttribute("id"));for(let e=0;e<this.glyphs.length;e++){this.glyphs[e].renderText(t,this.x,0)}t.closeGroup(),this.restoreStyle(t)}}class Me extends jt{static get CATEGORY(){return l.Repetition}constructor(t,e,i){super(),this.symbolType=t,this.x=e,this.xShift=0,this.yShift=i}setShiftX(t){return this.xShift=t,this}setShiftY(t){return this.yShift=t,this}draw(t,e){switch(this.setRendered(),this.symbolType){case Me.type.CODA_RIGHT:this.drawCodaFixed(t,e+t.getWidth());break;case Me.type.CODA_LEFT:this.drawSymbolText(t,e,"Coda",!0);break;case Me.type.SEGNO_LEFT:this.drawSegnoFixed(t,e);break;case Me.type.SEGNO_RIGHT:this.drawSegnoFixed(t,e+t.getWidth());break;case Me.type.DC:this.drawSymbolText(t,e,"D.C.",!1);break;case Me.type.DC_AL_CODA:this.drawSymbolText(t,e,"D.C. al",!0);break;case Me.type.DC_AL_FINE:this.drawSymbolText(t,e,"D.C. al Fine",!1);break;case Me.type.DS:this.drawSymbolText(t,e,"D.S.",!1);break;case Me.type.DS_AL_CODA:this.drawSymbolText(t,e,"D.S. al",!0);break;case Me.type.DS_AL_FINE:this.drawSymbolText(t,e,"D.S. al Fine",!1);break;case Me.type.FINE:this.drawSymbolText(t,e,"Fine",!1);break;case Me.type.TO_CODA:this.drawSymbolText(t,e,"To",!0)}return this}drawCodaFixed(t,e){const i=t.getYForTopText(t.getNumLines());return this.text=et.coda,this.renderText(t.checkContext(),e,i+v.get("Repetition.coda.offsetY")),this}drawSegnoFixed(t,e){const i=t.getYForTopText(t.getNumLines());return this.text=et.segno,this.renderText(t.checkContext(),e,i+v.get("Repetition.segno.offsetY")),this}drawSymbolText(t,e,i,s){const n=t.checkContext();let a=0;switch(this.text=i,s&&(this.text+=" "),this.setFont(v.getFontInfo("Repetition.text")),this.symbolType){case Me.type.CODA_LEFT:a=t.getVerticalBarWidth();break;case Me.type.DC:case Me.type.DC_AL_FINE:case Me.type.DS:case Me.type.DS_AL_FINE:case Me.type.FINE:default:a=e-(t.getNoteStartX()-this.x)+t.getWidth()-this.width-v.get("Repetition.text.offsetX")}const o=t.getYForTopText(t.getNumLines())+v.get("Repetition.text.offsetY");return this.renderText(n,a,o),this}}Me.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};class Ie extends jt{static get CATEGORY(){return l.StaveSection}constructor(t,e,i,s=!0){super(),this.setStaveSection(t),this.x=e,this.yShift=i,this.drawRect=s}setStaveSection(t){return this.text=t,this}draw(t,e){const i=t.checkContext();this.setRendered(),i.save(),i.setLineWidth(2);const s=-1*this.textMetrics.actualBoundingBoxDescent,n=this.width+4,a=this.height+4,o=t.getYForTopText(1.5)+this.yShift,r=this.x+e;return this.drawRect&&(i.beginPath(),i.rect(r,o-a+s,n,a),i.stroke()),this.renderText(i,e+2,o-2),i.restore(),this}}var We,He,Ge,Ue=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class Ve extends jt{static get CATEGORY(){return l.StaveTempo}constructor(t,e,i){super(),We.set(this,{"1/4":et.metNoteDoubleWholeSquare,long:et.metNoteDoubleWholeSquare,"1/2":et.metNoteDoubleWhole,breve:et.metNoteDoubleWhole,1:et.metNoteWhole,whole:et.metNoteWhole,w:et.metNoteWhole,2:et.metNoteHalfUp,half:et.metNoteHalfUp,h:et.metNoteHalfUp,4:et.metNoteQuarterUp,quarter:et.metNoteQuarterUp,q:et.metNoteQuarterUp,8:et.metNote8thUp,eighth:et.metNote8thUp,16:et.metNote16thUp,"16th":et.metNote16thUp,32:et.metNote32ndUp,"32nd":et.metNote32ndUp,64:et.metNote64thUp,"64th":et.metNote64thUp,128:et.metNote128thUp,"128th":et.metNote128thUp,256:et.metNote256thUp,"256th":et.metNote256thUp,512:et.metNote512thUp,"512th":et.metNote512thUp,1024:et.metNote1024thUp,"1024th":et.metNote1024thUp}),this.tempo=t,this.position=Wt.ABOVE,this.x=e,this.setXShift(10),this.setYShift(i)}setTempo(t){return this.tempo=t,this}draw(t,e){const i=t.checkContext();this.setRendered();const{name:s,duration:n,dots:a,bpm:o,duration2:r,dots2:h,parenthesis:l}=this.tempo;let c=this.x+e;const d=t.getYForTopText(1),u=new $("StaveTempo.glyph"),g=new $("StaveTempo");if(s&&(this.text=s,this.fontInfo=v.getFontInfo("StaveTempo.name"),this.renderText(i,e,d),c+=this.getWidth()+3),(s&&n||l)&&(g.setText("("),g.renderText(i,c+this.xShift,d+this.yShift),c+=g.getWidth()+3),n){if(u.setText(Ue(this,We,"f")[n]),u.renderText(i,c+this.xShift,d+this.yShift),c+=u.getWidth()+3,a){u.setText(et.metAugmentationDot);for(let t=0;t<a;t++)u.renderText(i,c+this.xShift,d+2+this.yShift),c+=u.getWidth()+3}if(g.setText("="),g.renderText(i,c+this.xShift,d+this.yShift),c+=g.getWidth()+3,r){if(u.setText(Ue(this,We,"f")[r]),u.renderText(i,c+this.xShift,d+this.yShift),c+=u.getWidth()+3,h){u.setText(et.metAugmentationDot);for(let t=0;t<h;t++)u.renderText(i,c+this.xShift,d+2+this.yShift),c+=u.getWidth()+3}}else o&&(g.setText(""+o),g.renderText(i,c+this.xShift,d+this.yShift),c+=g.getWidth()+3);(s||l)&&(g.setText(")"),g.renderText(i,c+this.xShift,d+this.yShift))}return this}}We=new WeakMap,function(t){t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(He||(He={}));class Xe extends zt{static get CATEGORY(){return l.TextNote}static get GLYPHS(){return{segno:et.segno,tr:et.ornamentTrill,mordent:et.ornamentMordent,mordentUpper:et.ornamentShortTrill,mordentLower:et.ornamentMordent,f:et.dynamicForte,p:et.dynamicPiano,m:et.dynamicMezzo,s:et.dynamicSforzando,z:et.dynamicZ,coda:et.coda,pedalOpen:et.keyboardPedalPed,pedalClose:et.keyboardPedalUp,caesuraStraight:et.caesura,caesuraCurved:et.caesuraCurved,breath:et.breathMarkComma,tick:et.breathMarkTick,turn:et.ornamentTurn,turnInverted:et.ornamentTurnSlash}}constructor(t){var e,i;super(t),this.text=null!==(e=t.text)&&void 0!==e?e:"",t.glyph&&(this.text+=Xe.GLYPHS[t.glyph]||t.glyph),t.font?this.setFont(t.font):void 0===t.glyph&&this.setFont(v.getFontInfo("TextNote.text.fontSize"));const s=.769231*F.convertSizeToPointValue(this.fontInfo.size);t.superscript&&(this.superscript=new $("TexNote.subSuper"),this.superscript.setText(t.superscript),this.superscript.setFontSize(s)),t.subscript&&(this.subscript=new $("TexNote.subSuper"),this.subscript.setText(t.subscript),this.subscript.setFontSize(s)),this.line=null!==(i=t.line)&&void 0!==i?i:0,this.smooth=t.smooth||!1,this.ignoreTicks=t.ignoreTicks||!1,this.justification=He.LEFT}setJustification(t){return this.justification=t,this}setLine(t){return this.line=t,this}getLine(){return this.line}preFormat(){if(this.preFormatted)return;const t=this.checkTickContext("Can't preformat without a TickContext.");this.justification===He.CENTER?this.leftDisplacedHeadPx=this.width/2:this.justification===He.RIGHT&&(this.leftDisplacedHeadPx=this.width),this.rightDisplacedHeadPx=t.getMetrics().glyphPx/2,this.preFormatted=!0}draw(){const t=this.checkContext(),e=this.checkStave(),i=this.checkTickContext("Can't draw without a TickContext.");this.setRendered();let s=this.getAbsoluteX()+i.getMetrics().glyphPx/2;const n=this.getWidth();this.justification===He.CENTER?s-=n/2:this.justification===He.RIGHT&&(s-=n);const a=e.getYForLine(this.line+-3);this.applyStyle(t),this.renderText(t,s,a);const o=this.getHeight();this.superscript&&this.superscript.renderText(t,s+this.width+2,a-o/2.2),this.subscript&&this.subscript.renderText(t,s+this.width+2,a+o/2.2-1),this.restoreStyle(t)}}Xe.Justification=He;class Ye extends jt{static get CATEGORY(){return l.StaveText}constructor(t,e,i={}){var s,n,a;super(),this.setText(t),this.setXShift(null!==(s=i.shiftX)&&void 0!==s?s:0),this.setYShift(null!==(n=i.shiftY)&&void 0!==n?n:0),this.position=e,this.justification=null!==(a=i.justification)&&void 0!==a?a:Xe.Justification.CENTER}draw(t){const e=t.checkContext();let i,s;switch(this.setRendered(),this.position){case Wt.LEFT:case Wt.RIGHT:s=(t.getYForLine(0)+t.getBottomLineY())/2,i=this.position===Wt.LEFT?t.getX()-this.width-24:t.getX()+t.getWidth()+24;break;case Wt.ABOVE:case Wt.BELOW:i=t.getX(),this.justification===He.CENTER?i+=t.getWidth()/2-this.width/2:this.justification===He.RIGHT&&(i+=t.getWidth()-this.width),s=this.position===Wt.ABOVE?t.getYForTopText(2):t.getYForBottomText(2);break;default:throw new c("InvalidPosition","Value Must be in Modifier.Position.")}return this.renderText(e,i,s+4),this}}!function(t){t[t.NONE=1]="NONE",t[t.BEGIN=2]="BEGIN",t[t.MID=3]="MID",t[t.END=4]="END",t[t.BEGIN_END=5]="BEGIN_END"}(Ge||(Ge={}));class _e extends jt{static get CATEGORY(){return l.Volta}static get type(){return Ge}constructor(t,e,i,s){super(),this.type=t,this.x=i,this.yShift=s,this.text=e}draw(t,e){const i=t.checkContext();this.setRendered();let s=t.getWidth()-e;const n=t.getYForTopText(t.getNumLines())+this.yShift,a=1.5*t.getSpacingBetweenLines();switch(this.type){case Ge.BEGIN:i.fillRect(this.x+e,n,1,a);break;case Ge.END:s-=5,i.fillRect(this.x+e+s,n,1,a);break;case Ge.BEGIN_END:s-=3,i.fillRect(this.x+e,n,1,a),i.fillRect(this.x+e+s,n,1,a)}return this.type!==Ge.BEGIN&&this.type!==Ge.BEGIN_END||this.renderText(i,e+5,n-this.yShift+15),i.fillRect(this.x+e,n,s,1),this}}class ze extends jt{static get CATEGORY(){return l.TimeSignature}constructor(t="4/4",e=15,i=!0){super(),this.timeSpec="4/4",this.line=0,this.isNumeric=!0,this.topStartX=0,this.botStartX=0,this.lineShift=0,this.topText=new $,this.botText=new $,this.validateArgs=i;const s=e;this.topLine=1,this.bottomLine=3,this.setPosition(Wt.BEGIN),this.setTimeSig(t),this.setPadding(s)}static getTimeSigCode(t,e=!1){let i=et.null;switch(t){case"C":i=et.timeSigCommon;break;case"C|":i=et.timeSigCutCommon;break;case"+":i=e?et.timeSigPlusSmall:et.timeSigPlus;break;case"-":i=et.timeSigMinus;break;case"(":i=e?et.timeSigParensLeftSmall:et.timeSigParensLeft;break;case")":i=e?et.timeSigParensRightSmall:et.timeSigParensRight;break;default:i=String.fromCodePoint(57472+Number(t[0]))}return i}makeTimeSignatureGlyph(t,e){let i="",s=0,n=0;for(let s=0;s<t.length;++s){i+=ze.getTimeSigCode(t[s],e.length>0)}this.topText.setText(i),s=this.topText.getWidth(),n=this.topText.getHeight();let a=0;i="";for(let t=0;t<e.length;++t){i+=ze.getTimeSigCode(e[t],!0)}this.botText.setText(i),a=this.botText.getWidth(),n=Math.max(n,this.botText.getHeight()),this.lineShift=n>30?.5:0,this.width=Math.max(s,a),this.topStartX=(this.width-s)/2,this.botStartX=(this.width-a)/2}setTimeSig(t){var e,i;if(this.timeSpec=t,"C"===t||"C|"===t){const e=ze.getTimeSigCode(t);this.line=2,this.text=e,this.isNumeric=!1}else{this.validateArgs&&(t=>{t.split("/").forEach((e=>{if(!1===/^[0-9+\-()]+$/.test(e))throw new c("BadTimeSignature",`Invalid time spec: ${t}. Must contain valid signatures.`)}))})(t);const s=t.split("/");this.line=0,this.isNumeric=!0,this.makeTimeSignatureGlyph(null!==(e=s[0])&&void 0!==e?e:"",null!==(i=s[1])&&void 0!==i?i:"")}return this}getTimeSpec(){return this.timeSpec}getLine(){return this.line}setLine(t){this.line=t}getIsNumeric(){return this.isNumeric}setIsNumeric(t){this.isNumeric=t}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),this.drawAt(e,t,this.x)}drawAt(t,e,i){if(this.setRendered(),this.applyStyle(t),t.openGroup("timesignature",this.getAttribute("id")),this.isNumeric){let s=i+this.topStartX,n=0;n=this.botText.getText().length>0?e.getYForLine(this.topLine-this.lineShift):(e.getYForLine(this.topLine)+e.getYForLine(this.bottomLine))/2,this.topText.renderText(t,s,n),s=i+this.botStartX,n=e.getYForLine(this.bottomLine+this.lineShift),this.botText.renderText(t,s,n)}else this.renderText(t,i-this.x,e.getYForLine(this.line));t.closeGroup(),this.restoreStyle(t)}}const je={[qt.CATEGORY]:0,[Pe.CATEGORY]:1,[Re.CATEGORY]:2,[ze.CATEGORY]:3},qe={[ze.CATEGORY]:0,[Re.CATEGORY]:1,[qt.CATEGORY]:2,[Pe.CATEGORY]:3};class Ke extends ${static get CATEGORY(){return l.Stave}static get defaultPadding(){return v.get("Stave.padding")+v.get("Stave.endPaddingMax")}static get rightPadding(){return v.get("Stave.endPaddingMax")}constructor(t,e,i,s){super(),this.x=t,this.y=e,this.width=i,this.formatted=!1,this.startX=t+5,this.endX=t+i,this.modifiers=[],this.measure=0,this.clef="treble",this.endClef=void 0,this.options=Object.assign({verticalBarWidth:10,numLines:5,fillStyle:"#999999",leftBar:!0,rightBar:!0,spacingBetweenLinesPx:mt.STAVE_LINE_DISTANCE,spaceAboveStaffLn:4,spaceBelowStaffLn:4,topTextPosition:1,bottomTextPosition:4,lineConfig:[]},s),this.bounds={x:this.x,y:this.y,w:this.width,h:0},this.defaultLedgerLineStyle={strokeStyle:"#444",lineWidth:1.4},this.resetLines(),this.addModifier(new qt(this.options.leftBar?Ht.SINGLE:Ht.NONE)),this.addEndModifier(new qt(this.options.rightBar?Ht.SINGLE:Ht.NONE))}setDefaultLedgerLineStyle(t){this.defaultLedgerLineStyle=t}getDefaultLedgerLineStyle(){return Object.assign(Object.assign({},this.getStyle()),this.defaultLedgerLineStyle)}space(t){return this.options.spacingBetweenLinesPx*t}resetLines(){this.options.lineConfig=[];for(let t=0;t<this.options.numLines;t++)this.options.lineConfig.push({visible:!0});this.height=(this.options.numLines+this.options.spaceAboveStaffLn)*this.options.spacingBetweenLinesPx,this.options.bottomTextPosition=this.options.numLines}setNoteStartX(t){return this.formatted||this.format(),this.startX=t,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(t){return this.options.numLines=t,this.resetLines(),this}getTopLineTopY(){return this.getYForLine(0)-mt.STAVE_LINE_THICKNESS/2}getBottomLineBottomY(){return this.getYForLine(this.getNumLines()-1)+mt.STAVE_LINE_THICKNESS/2}setX(t){const e=t-this.x;this.formatted=!1,this.x=t,this.startX+=e,this.endX+=e;for(let t=0;t<this.modifiers.length;t++){const i=this.modifiers[t];i.setX(i.getX()+e)}return this}setWidth(t){return this.formatted=!1,this.width=t,this.endX=this.x+t,this}getStyle(){return Object.assign({fillStyle:this.options.fillStyle,strokeStyle:this.options.fillStyle,lineWidth:mt.STAVE_LINE_THICKNESS},super.getStyle())}setMeasure(t){return this.measure=t,this}getMeasure(){return this.measure}getModifierXShift(t=0){if("number"!=typeof t)throw new c("InvalidIndex","Must be of number type");if(this.formatted||this.format(),1===this.getModifiers(Wt.BEGIN).length)return 0;if(this.modifiers[t].getPosition()===Wt.RIGHT)return 0;let e=this.startX-this.x;const i=this.modifiers[0];return i.getType()===Ht.REPEAT_BEGIN&&e>i.getWidth()&&(e-=i.getWidth()),e}setRepetitionType(t,e=0){return this.modifiers.push(new Me(t,this.x,e)),this}setVoltaType(t,e,i){return this.modifiers.push(new _e(t,e,this.x,i)),this}setSection(t,e,i=0,s,n=!0){const a=new Ie(t,this.x+i,e,n);return s&&a.setFontSize(s),this.modifiers.push(a),this}setTempo(t,e){return this.modifiers.push(new Ve(t,this.x,e)),this}setStaveText(t,e,i={}){return this.modifiers.push(new Ye(t,e,i)),this}getSpacingBetweenLines(){return this.options.spacingBetweenLinesPx}getBoundingBox(){return new D(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){const t=this.options,e=t.spacingBetweenLinesPx;return this.getYForLine(t.numLines)+t.spaceBelowStaffLn*e}getBottomLineY(){return this.getYForLine(this.options.numLines)}getYForLine(t){const e=this.options,i=e.spacingBetweenLinesPx,s=e.spaceAboveStaffLn;return this.y+t*i+s*i}getLineForY(t){const e=this.options,i=e.spacingBetweenLinesPx,s=e.spaceAboveStaffLn;return(t-this.y)/i-s}getYForTopText(t=0){return this.getYForLine(-t-this.options.topTextPosition)}getYForBottomText(t=0){return this.getYForLine(this.options.bottomTextPosition+t)}getYForNote(t){const e=this.options,i=e.spacingBetweenLinesPx,s=e.spaceAboveStaffLn;return this.y+s*i+5*i-t*i}getYForGlyphs(){return this.getYForLine(3)}addModifier(t,e){return void 0!==e&&t.setPosition(e),t.setStave(this),this.formatted=!1,this.modifiers.push(t),this}addEndModifier(t){return this.addModifier(t,Wt.END),this}setBegBarType(t){const{SINGLE:e,REPEAT_BEGIN:i,NONE:s}=Ht;return t!==e&&t!==i&&t!==s||(this.modifiers[0].setType(t),this.formatted=!1),this}setEndBarType(t){return t!==Ht.REPEAT_BEGIN&&(this.modifiers[1].setType(t),this.formatted=!1),this}setClef(t,e,i,s){void 0===s&&(s=Wt.BEGIN),s===Wt.END?this.endClef=t:this.clef=t;const n=this.getModifiers(s,Pe.CATEGORY);return 0===n.length?this.addClef(t,e,i,s):n[0].setType(t,e,i),this}getClef(){return this.clef}setEndClef(t,e,i){return this.setClef(t,e,i,Wt.END),this}getEndClef(){return this.endClef}setKeySignature(t,e,i){void 0===i&&(i=Wt.BEGIN);const s=this.getModifiers(i,Re.CATEGORY);return 0===s.length?this.addKeySignature(t,e,i):s[0].setKeySig(t,e),this}setEndKeySignature(t,e){return this.setKeySignature(t,e,Wt.END),this}setTimeSignature(t,e,i){void 0===i&&(i=Wt.BEGIN);const s=this.getModifiers(i,ze.CATEGORY);return 0===s.length?this.addTimeSignature(t,e,i):s[0].setTimeSig(t),this}setEndTimeSignature(t,e){return this.setTimeSignature(t,e,Wt.END),this}addKeySignature(t,e,i){return void 0===i&&(i=Wt.BEGIN),this.addModifier(new Re(t,e).setPosition(i),i),this}addClef(t,e,i,s){return void 0===s||s===Wt.BEGIN?this.clef=t:s===Wt.END&&(this.endClef=t),this.addModifier(new Pe(t,e,i),s),this}addEndClef(t,e,i){return this.addClef(t,e,i,Wt.END),this}addTimeSignature(t,e,i){return this.addModifier(new ze(t,e),i),this}addEndTimeSignature(t,e){return this.addTimeSignature(t,e,Wt.END),this}addTrebleGlyph(){return this.addClef("treble"),this}getModifiers(t,e){const i=void 0===t,s=void 0===e;return i&&s?this.modifiers:i?this.modifiers.filter((t=>e===t.getCategory())):s?this.modifiers.filter((e=>t===e.getPosition())):this.modifiers.filter((i=>t===i.getPosition()&&e===i.getCategory()))}sortByCategory(t,e){for(let i=t.length-1;i>=0;i--)for(let s=0;s<i;s++)if(e[t[s].getCategory()]>e[t[s+1].getCategory()]){const e=t[s];t[s]=t[s+1],t[s+1]=e}}format(){var t,e,i,n;const a=this.modifiers[0],o=this.modifiers[1],r=this.getModifiers(Wt.BEGIN),h=this.getModifiers(Wt.END);let l,c,d;this.sortByCategory(r,je),this.sortByCategory(h,qe),r.length>1&&a.getType()===Ht.REPEAT_BEGIN&&(r.push(r.splice(0,1)[0]),r.splice(0,0,new qt(Ht.SINGLE))),h.indexOf(o)>0&&h.splice(0,0,new qt(Ht.NONE));let u=0,g=this.x;for(let t=0;t<r.length;t++)d=r[t],c=d.getPadding(t+u),l=d.getWidth(),g+=c,d.setX(g),g+=l,c+l===0&&u--;this.startX=g,g=this.x+this.width;const p={left:0,right:0,paddingRight:0,paddingLeft:0};let m=0;for(let a=0;a<h.length;a++){d=h[a],m=s(d)?a:m,p.right=0,p.left=0,p.paddingRight=0,p.paddingLeft=0;const o=d.getLayoutMetrics();o?(0!==a&&(p.right=null!==(t=o.xMax)&&void 0!==t?t:0,p.paddingRight=null!==(e=o.paddingRight)&&void 0!==e?e:0),p.left=null!==(i=-o.xMin)&&void 0!==i?i:0,p.paddingLeft=null!==(n=o.paddingLeft)&&void 0!==n?n:0,a===h.length-1&&(p.paddingLeft=0)):(p.paddingRight=d.getPadding(a-m),0!==a&&(p.right=d.getWidth()),0===a&&(p.left=d.getWidth())),g-=p.paddingRight,g-=p.right,d.setX(g),g-=p.left,g-=p.paddingLeft}this.endX=1===h.length?this.x+this.width:g,this.formatted=!0}draw(){const t=this.checkContext();this.setRendered(),this.applyStyle(),t.openGroup("stave",this.getAttribute("id")),this.formatted||this.format();const e=this.options.numLines,i=this.width,s=this.x;let n;for(let a=0;a<e;a++)n=this.getYForLine(a),this.options.lineConfig[a].visible&&(t.beginPath(),t.moveTo(s,n),t.lineTo(s+i,n),t.stroke());t.closeGroup(),this.restoreStyle();for(let e=0;e<this.modifiers.length;e++){const i=this.modifiers[e];"function"==typeof i.draw&&(i.applyStyle(t),i.draw(this,this.getModifierXShift(e)),i.restoreStyle(t))}if(this.measure>0){t.save(),t.setFont(this.fontInfo);const e=t.measureText(""+this.measure).width;n=this.getYForTopText(0)+3,t.fillText(""+this.measure,this.x-e/2,n),t.restore()}return this}getVerticalBarWidth(){return this.options.verticalBarWidth}getConfigForLines(){return this.options.lineConfig}setConfigForLine(t,e){if(t>=this.options.numLines||t<0)throw new c("StaveConfigError","The line number must be within the range of the number of lines in the Stave.");if(void 0===e.visible)throw new c("StaveConfigError","The line configuration object is missing the 'visible' property.");if("boolean"!=typeof e.visible)throw new c("StaveConfigError","The line configuration objects 'visible' property must be true or false.");return this.options.lineConfig[t]=e,this}setConfigForLines(t){if(t.length!==this.options.numLines)throw new c("StaveConfigError","The length of the lines configuration array must match the number of lines in the Stave");for(const e in t)void 0===t[e].visible&&(t[e]=this.options.lineConfig[e]),this.options.lineConfig[e]=Object.assign(Object.assign({},this.options.lineConfig[e]),t[e]);return this.options.lineConfig=t,this}static formatBegModifiers(t){const e=e=>{let i=0;t.forEach((t=>{const s=t.getModifiers(Wt.BEGIN,e);s.length>0&&s[0].getX()>i&&(i=s[0].getX())}));let s=0;t.forEach((t=>{s=0;t.getModifiers(Wt.BEGIN,e).forEach((t=>{i-t.getX()>s&&(s=i-t.getX())}));const n=t.getModifiers(Wt.BEGIN);let a=!1;n.forEach((t=>{t.getCategory()===e&&(a=!0),a&&s>0&&t.setX(t.getX()+s)})),t.setNoteStartX(t.getNoteStartX()+s)}))};t.forEach((t=>{t.formatted||t.format()})),e(l.Clef),e(l.KeySignature),e(l.TimeSignature);let i=0;t.forEach((t=>{t.getNoteStartX()>i&&(i=t.getNoteStartX())})),t.forEach((t=>{t.setNoteStartX(i)})),i=0,t.forEach((t=>{t.getModifiers(Wt.BEGIN,l.Barline).forEach((t=>{t.getType()===Ht.REPEAT_BEGIN&&t.getX()>i&&(i=t.getX())}))})),t.forEach((t=>{t.getModifiers(Wt.BEGIN,l.Barline).forEach((t=>{t.getType()===Ht.REPEAT_BEGIN&&t.setX(i)}))}))}}function Qe(t,e,i,s,n){if(e!==$e.type.BOLD_DOUBLE_LEFT&&e!==$e.type.BOLD_DOUBLE_RIGHT)throw new c("InvalidConnector","A REPEAT_BEGIN or REPEAT_END type must be provided.");let a=3,o=3.5;e===$e.type.BOLD_DOUBLE_RIGHT&&(a=-5,o=3),t.fillRect(i+a,s,1,n-s),t.fillRect(i-2,s,o,n-s)}class $e extends ${static get CATEGORY(){return l.StaveConnector}constructor(t,e){super(),this.thickness=mt.STAVE_LINE_THICKNESS,this.topStave=t,this.bottomStave=e,this.type=$e.type.DOUBLE,this.xShift=0,this.texts=[]}setType(t){const e="string"==typeof t?$e.typeString[t]:t;return Object.values($e.type).includes(e)&&(this.type=e),this}getType(){return this.type}setText(t,e={}){var i,s;const n=new $("StaveConnector.text");return n.setText(t),n.setXShift(null!==(i=e.shiftX)&&void 0!==i?i:0),n.setYShift(null!==(s=e.shiftY)&&void 0!==s?s:0),this.texts.push(n),this}draw(){const t=this.checkContext();this.setRendered();let e=this.topStave.getYForLine(0),i=this.bottomStave.getYForLine(this.bottomStave.getNumLines()-1)+this.thickness,s=3,n=this.topStave.getX();(this.type===$e.type.SINGLE_RIGHT||this.type===$e.type.BOLD_DOUBLE_RIGHT||this.type===$e.type.THIN_DOUBLE)&&(n=this.topStave.getX()+this.topStave.getWidth());let a=i-e;const o=new $;switch(this.type){case $e.type.SINGLE:case $e.type.SINGLE_LEFT:case $e.type.SINGLE_RIGHT:s=1;break;case $e.type.DOUBLE:n-=5,e-=this.thickness,a+=.5;break;case $e.type.BRACE:{s=12;const n=this.topStave.getX()-2+this.xShift,o=e,r=n,h=i,l=n-s,c=o+a/2,d=l-.9*s,u=o+.2*a,g=n+1.1*s,p=c-.135*a,m=g,f=c+.135*a,S=d,T=h-.2*a,w=l-s,x=T,b=n+.4*s,y=c+.135*a,C=b,v=c-.135*a,k=w,D=u;t.beginPath(),t.moveTo(n,o),t.bezierCurveTo(d,u,g,p,l,c),t.bezierCurveTo(m,f,S,T,r,h),t.bezierCurveTo(w,x,b,y,l,c),t.bezierCurveTo(C,v,k,D,n,o),t.fill(),t.stroke();break}case $e.type.BRACKET:e-=6,i+=6,a=i-e,o.setText(et.bracketTop),o.renderText(t,n-5,e),o.setText(et.bracketBottom),o.renderText(t,n-5,i),n-=5;break;case $e.type.BOLD_DOUBLE_LEFT:Qe(t,this.type,n+this.xShift,e,i-this.thickness);break;case $e.type.BOLD_DOUBLE_RIGHT:Qe(t,this.type,n,e,i-this.thickness);break;case $e.type.THIN_DOUBLE:s=1,a-=this.thickness;break;case $e.type.NONE:break;default:throw new c("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(n,e,s,a),this.type===$e.type.THIN_DOUBLE&&t.fillRect(n-3,e,s,a);for(let e=0;e<this.texts.length;e++){const i=this.texts[e],s=this.topStave.getX()-i.getWidth()-24,n=(this.topStave.getYForLine(0)+this.bottomStave.getBottomLineY())/2;i.renderText(t,s,n+4)}}}$e.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},$e.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};class Je{static getNextContext(t){const e=t.tContexts,i=e.indexOf(t);if(i+1<e.length)return e[i+1]}constructor(t){this.preFormatted=!1,this.postFormatted=!1,this.tickID=t&&t.tickID?t.tickID:0,this.currentTick=new y(0,1),this.maxTicks=new y(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(t){return this.x=t,this.xBase=t,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(t){this.xBase=t,this.x=t+this.xOffset}getXOffset(){return this.xOffset}setXOffset(t){this.xOffset=t,this.x=this.xBase+t}getWidth(){return this.width+2*this.padding}setPadding(t){return this.padding=t,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getMaxTickable(){return this.maxTickable}getMinTickable(){return this.minTickable}getTickables(){return this.tickables}getTickableForVoice(t){return this.tickablesByVoice[t]}getTickablesByVoice(){return this.tickablesByVoice}getCenterAlignedTickables(){return this.tickables.filter((t=>t.isCenterAligned()))}getMetrics(){const{width:t,glyphPx:e,notePx:i,leftDisplacedHeadPx:s,rightDisplacedHeadPx:n,modLeftPx:a,modRightPx:o,totalLeftPx:r,totalRightPx:h}=this;return{width:t,glyphPx:e,notePx:i,leftDisplacedHeadPx:s,rightDisplacedHeadPx:n,modLeftPx:a,modRightPx:o,totalLeftPx:r,totalRightPx:h}}getCurrentTick(){return this.currentTick}setCurrentTick(t){this.currentTick=t,this.preFormatted=!1}addTickable(t,e){if(!t)throw new c("BadArgument","Invalid tickable added.");if(!t.shouldIgnoreTicks()){const e=t.getTicks();e.greaterThan(this.maxTicks)&&(this.maxTicks=e.clone(),this.maxTickable=t),(void 0===this.minTicks||e.lessThan(this.minTicks))&&(this.minTicks=e.clone(),this.minTickable=t)}return t.setTickContext(this),this.tickables.push(t),this.tickablesByVoice[null!=e?e:0]=t,this.preFormatted=!1,this}preFormat(){var t;if(this.preFormatted)return this;for(let e=0;e<this.tickables.length;++e){const i=this.tickables[e];i.preFormat();const s=i.getMetrics();this.leftDisplacedHeadPx=Math.max(this.leftDisplacedHeadPx,s.leftDisplacedHeadPx),this.rightDisplacedHeadPx=Math.max(this.rightDisplacedHeadPx,s.rightDisplacedHeadPx),this.notePx=Math.max(this.notePx,s.notePx),this.glyphPx=Math.max(this.glyphPx,null!==(t=s.glyphWidth)&&void 0!==t?t:0),this.modLeftPx=Math.max(this.modLeftPx,s.modLeftPx),this.modRightPx=Math.max(this.modRightPx,s.modRightPx),this.totalLeftPx=Math.max(this.totalLeftPx,s.modLeftPx+s.leftDisplacedHeadPx),this.totalRightPx=Math.max(this.totalRightPx,s.modRightPx+s.rightDisplacedHeadPx),this.width=this.notePx+this.totalLeftPx+this.totalRightPx}return this}postFormat(){return this.postFormatted||(this.postFormatted=!0),this}getFormatterMetrics(){return this.formatterMetrics}}function Ze(t,e,i,s){let n=e;for(let e=i+1;e<t.length;e++){const i=t[e];if(a(i)&&!i.isRest()&&!i.shouldIgnoreTicks()){n=i.getLineForRest();break}}if(s&&e!==n){n=p(Math.max(e,n),Math.min(e,n))}return n}class ti{static SimpleFormat(t,e=0,{paddingBetween:i=10}={}){t.reduce(((t,e)=>{e.addToModifierContext(new Ae);const s=(new Je).addTickable(e).preFormat(),n=s.getMetrics();return s.setX(t+n.totalLeftPx),t+s.getWidth()+n.totalRightPx+i}),e)}static plotDebugging(t,e,i,s,n,a){var o,r;const h=i+(a=Object.assign({stavePadding:v.get("Stave.padding")},a)).stavePadding,l=e.contextGaps;t.save(),t.setFont(v.get("fontFamily"),8),l.gaps.forEach((e=>{var i,a,o;i=h+e.x1,a=h+e.x2,o="rgba(100,200,100,0.4)",t.beginPath(),t.setStrokeStyle(o),t.setFillStyle(o),t.setLineWidth(1),t.fillRect(i,s,Math.max(a-i,0),n-s),t.setFillStyle("green"),t.fillText(Math.round(e.x2-e.x1).toString(),h+e.x1,n+12)})),t.setFillStyle("red"),t.fillText(`Loss: ${(null!==(o=e.totalCost)&&void 0!==o?o:0).toFixed(2)} Shift: ${(null!==(r=e.totalShift)&&void 0!==r?r:0).toFixed(2)} Gap: ${l.total.toFixed(2)}`,h-20,n+27),t.restore()}static FormatAndDraw(t,e,i,s){let n={autoBeam:!1,alignRests:!1};"object"==typeof s?n=Object.assign(Object.assign({},n),s):"boolean"==typeof s&&(n.autoBeam=s);const a=new ge(mt.TIME4_4).setMode(ge.Mode.SOFT).addTickables(i),o=n.autoBeam?mi.applyAndGetBeams(a):[];return(new ti).joinVoices([a]).formatToStave([a],e,{alignRests:n.alignRests,stave:e}),a.setStave(e).draw(t,e),o.forEach((e=>e.setContext(t).draw())),a.getBoundingBox()}static FormatAndDrawTab(t,e,i,s,n,a,o){let r={autoBeam:a,alignRests:!1};"object"==typeof o?r=Object.assign(Object.assign({},r),o):"boolean"==typeof o&&(r.autoBeam=o);const h=new ge(mt.TIME4_4).setMode(ge.Mode.SOFT).addTickables(n),l=new ge(mt.TIME4_4).setMode(ge.Mode.SOFT).addTickables(s),c=r.autoBeam?mi.applyAndGetBeams(h):[];(new ti).joinVoices([h]).joinVoices([l]).formatToStave([h,l],i,{alignRests:r.alignRests}),h.draw(t,i),l.draw(t,e),c.forEach((e=>e.setContext(t).draw())),new $e(i,e).setContext(t).draw()}static AlignRestsToNotes(t,e,i){t.forEach(((s,n)=>{if(o(s)&&s.isRest()){if(s.getTuplet()&&!i)return;if(3!==s.getLineForRest())return;if(e||s.getBeam()){const e=s.getKeyProps()[0];if(0===n)e.line=Ze(t,e.line,n,!1);else if(n>0&&n<t.length){const i=t[n-1];if(o(i))if(i.isRest())e.line=i.getKeyProps()[0].line;else{const s=i.getLineForRest();e.line=Ze(t,s,n,!0)}}s.setKeyLine(0,e.line)}}}))}constructor(t){this.formatterOptions=Object.assign({globalSoftmax:!1,softmaxFactor:mt.SOFTMAX_FACTOR,maxIterations:5},t),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,e){if(!t||!t.length)throw new c("BadArgument","No voices to format rests");t.forEach((t=>ti.AlignRestsToNotes(t.getTickables(),e)))}preCalculateMinTotalWidth(t){const e=v.get("Stave.unalignedNotePadding");let i=0,s=0,n=0;const a=[],o=[];if(this.hasMinTotalWidth)return this.minTotalWidth;if(!t)throw new c("BadArgument","'voices' required to run preCalculateMinTotalWidth");this.createTickContexts(t);const{list:r,map:h}=this.tickContexts;this.minTotalWidth=0,r.forEach((e=>{const r=h[e];r.preFormat(),r.getTickables().length<t.length&&(i+=1),r.getTickables().forEach((t=>{s+=t.getMetrics().width,n+=t.getTicks().value(),a.push(t.getMetrics().width),o.push(t.getTicks().value())}));const l=r.getWidth();this.minTotalWidth+=l})),this.hasMinTotalWidth=!0;const l=s>0?s/a.length:1/a.length,d=S(a.map((t=>Math.pow(t-l,2)))),u=Math.pow(d/a.length,.5)/l,g=n/o.length,p=S(o.map((t=>Math.pow(t-g,2)))),m=Math.pow(p/o.length,.5)/g,f=Math.max(m,u)*r.length*e,T=e*i;return this.minTotalWidth+Math.max(T,f)}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new c("NoMinTotalWidth","Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'");return this.minTotalWidth}static getResolutionMultiplier(t){if(!t||!t.length)throw new c("BadArgument","No voices to format");const e=t[0].getTotalTicks();return t.reduce(((t,i)=>{if(!i.getTotalTicks().equals(e))throw new c("TickMismatch","Voices should have same total note duration in ticks.");if(i.getMode()===ge.Mode.STRICT&&!i.isComplete())throw new c("IncompleteVoice","Voice does not have enough notes.");return Math.max(t,y.LCM(t,i.getResolutionMultiplier()))}),1)}createModifierContexts(t){if(0===t.length)return;const e=ti.getResolutionMultiplier(t),i=new Map,s=[];t.forEach((t=>{const n=new y(0,e);t.getTickables().forEach((t=>{const e=n.numerator;let a=i.get(t.getStave());if(a||(i.set(t.getStave(),{}),a=i.get(t.getStave())),!(a?a[e]:void 0)){const t=new Ae;s.push(t),a[e]=t}t.addToModifierContext(a[e]),n.add(t.getTicks())}))})),this.modifierContexts.push({map:i,array:s,resolutionMultiplier:e})}createTickContexts(t){const e=function(t,e,i){if(0===t.length)return{map:{},array:[],list:[],resolutionMultiplier:0};const s={},n=[],a=[],o=ti.getResolutionMultiplier(t);return t.forEach(((t,r)=>{const h=new y(0,o);t.getTickables().forEach((t=>{const o=h.numerator;if(!s[o]){const t=e({tickID:o});a.push(t),s[o]=t,n.push(o)}i(t,s[o],r),h.add(t.getTicks())}))})),{map:s,array:a,list:n.sort(((t,e)=>t-e)),resolutionMultiplier:o}}(t,(t=>new Je(t)),((t,e,i)=>e.addTickable(t,i)));this.tickContexts=e;const i=this.tickContexts.array;return i.forEach((t=>{t.tContexts=i})),e}getTickContexts(){return this.tickContexts}preFormat(t=0,e,i,s){const n=this.tickContexts;if(!n)throw new c("NoTickContexts","preFormat requires TickContexts");const{list:a,map:o}=n;this.lossHistory=[],i&&s&&i.forEach((t=>t.setStave(s).preFormat()));let r=0,h=0;this.minTotalWidth=0;let l=0;a.forEach((t=>{const e=o[t];e.preFormat();const i=e.getWidth();this.minTotalWidth+=i;const s=e.getMaxTicks().value();l+=s;const n=e.getMetrics();r=r+h+n.totalLeftPx,e.setX(r),h=i-n.totalLeftPx}));const{globalSoftmax:d,softmaxFactor:g,maxIterations:p}=this.formatterOptions,m=S(a.map((t=>Math.pow(g,o[t].getMaxTicks().value()/l))));if(this.minTotalWidth=r+h,this.hasMinTotalWidth=!0,t<=0)return this.evaluate();const f=o[a[0]],T=o[a[a.length-1]];function w(t){return a.map(((e,i)=>{const s=o[e],n=s.getTickablesByVoice();let r;if(i>0){const e=o[a[i-1]];for(let h=i-1;h>=0;h--){const i=o[a[h]].getTickablesByVoice(),c=[];if(Object.keys(n).forEach((t=>{i[t]&&c.push(t)})),c.length>0){let a=0,o=1/0,h=0;if(c.forEach((t=>{const e=i[t].getTicks().value();e>a&&(r=i[t],a=e);const s=n[t],h=s.getX()-(s.getMetrics().modLeftPx+s.getMetrics().leftDisplacedHeadPx),l=i[t].getMetrics(),c=i[t].getX()+l.notePx+l.modRightPx+l.rightDisplacedHeadPx;o=Math.min(o,h-c)})),o=Math.min(o,s.getX()-(e.getX()+.05*t)),d){const e=l;h=Math.pow(g,a/e)/m*t}else void 0!==r&&(h=r.getVoice().softmax(a)*t);return{expectedDistance:h,maxNegativeShiftPx:o,fromTickable:r}}}}return{expectedDistance:0,fromTickablePx:0,maxNegativeShiftPx:0}}))}function x(t){const e=b/2;let i=0;return a.forEach(((s,n)=>{const a=o[s];if(n>0){const e=a.getX(),s=t[n],o=u(s.fromTickable).getX()+s.expectedDistance-(e+i);let r=0;o>0?i+=o:o<0&&(r=Math.min(s.maxNegativeShiftPx,Math.abs(o)),i+=-r),a.setX(e+i)}a.getCenterAlignedTickables().forEach((t=>{t.setCenterXShift(e-a.getX())}))})),T.getX()-f.getX()}const b=t-T.getMetrics().notePx-T.getMetrics().totalRightPx-f.getMetrics().totalLeftPx,y=v.get("Stave.endPaddingMin"),C=v.get("Stave.endPaddingMax"),k=v.get("Stave.padding");let D=b;const B=w(D);let E=x(B);if(1===a.length)return 0;const L=((t,e)=>{let i=t/2;if(e.length>1)for(let t=1;t<e.length;++t)i=Math.min(e[t].expectedDistance/2,i);return i})(D,B),N=t=>{let e=0;const i=T&&T.getMaxTickable();if(i){const s=i.getVoice();if(s.getTicksUsed().value()>s.getTotalTicks().value())return 2*C<L?L:C;const n=i.getWidth();e=s.softmax(T.getMaxTicks().value())*t-(n+k)}return 2*C<e?e:C};let F=N(D),O=F-(C-y);const A=b-O;let P=p;for(;E>A&&P>0||E+F<A&&P>1;)D-=E-A,F=N(D),O=F-(C-y),E=x(w(D)),P--;return this.justifyWidth=t,this.evaluate()}evaluate(){const t=this.tickContexts,e=this.justifyWidth;this.contextGaps={total:0,gaps:[]},t.list.forEach(((e,i)=>{if(0===i)return;const s=t.list[i-1],n=t.map[s],a=t.map[e],o=n.getMetrics(),r=a.getMetrics(),h=n.getX()+o.notePx+o.totalRightPx,l=a.getX()-r.totalLeftPx,c=l-h;this.contextGaps.total+=c,this.contextGaps.gaps.push({x1:h,x2:l}),a.getFormatterMetrics().freedom.left=c,n.getFormatterMetrics().freedom.right=c})),this.durationStats={};const i=this.durationStats;this.voices.forEach((t=>{t.getTickables().forEach(((t,s,n)=>{const a=t.getTicks().clone().simplify().toString(),o=t.getMetrics(),r=t.getFormatterMetrics(),h=t.getX()+o.notePx+o.modRightPx+o.rightDisplacedHeadPx;let l=0;if(s<n.length-1){const e=n[s+1],i=e.getMetrics();l=e.getX()-i.modLeftPx-i.leftDisplacedHeadPx-h,r.space.used=e.getX()-t.getX(),e.getFormatterMetrics().freedom.left=l}else l=e-h,r.space.used=e-t.getX();r.freedom.right=l,function(t,e){const s=i[t];void 0===s?i[t]={mean:e,count:1}:(s.count+=1,s.mean=(s.mean+e)/2)}(a,r.space.used)}))}));let s=0;return this.voices.forEach((t=>{t.getTickables().forEach((t=>{const e=t.getTicks().clone().simplify().toString(),n=t.getFormatterMetrics();n.space.mean=i[e].mean,n.duration=e,n.iterations+=1,n.space.deviation=n.space.used-n.space.mean,s+=Math.pow(n.space.deviation,2)}))})),this.totalCost=Math.sqrt(s),this.lossHistory.push(this.totalCost),this.totalCost}tune(t){var e;const i=this.tickContexts;if(!i)return 0;const s=null!==(e=null==t?void 0:t.alpha)&&void 0!==e?e:.5;let n=0;return this.totalShift=0,i.list.forEach(((t,e,a)=>{const o=i.map[t],r=e>0?i.map[a[e-1]]:void 0,h=e<a.length-1?i.map[a[e+1]]:void 0;!function(t,e,i,s){t.setX(t.getX()+e),t.getFormatterMetrics().freedom.left+=e,t.getFormatterMetrics().freedom.right-=e,i&&(i.getFormatterMetrics().freedom.right+=e),s&&(s.getFormatterMetrics().freedom.left-=e)}(o,n,r,h);const l=-S(o.getTickables().map((t=>t.getFormatterMetrics().space.deviation)));l>0?n=-Math.min(o.getFormatterMetrics().freedom.right,Math.abs(l)):l<0&&(n=h?Math.min(h.getFormatterMetrics().freedom.right,Math.abs(l)):0),n*=s,this.totalShift+=n})),this.evaluate()}postFormat(){return this.modifierContexts.forEach((t=>{t.array.forEach((t=>t.postFormat()))})),this.tickContexts.list.forEach((t=>{this.tickContexts.map[t].postFormat()})),this}joinVoices(t){return this.createModifierContexts(t),this.hasMinTotalWidth=!1,this}format(t,e,i){const s=Object.assign({alignRests:!1},i);this.voices=t;const n=this.formatterOptions.softmaxFactor;return n&&this.voices.forEach((t=>t.setSoftmaxFactor(n))),this.alignRests(t,s.alignRests),this.createTickContexts(t),this.preFormat(e,s.context,t,s.stave),s.stave&&this.postFormat(),this}formatToStave(t,e,i){const s=Object.assign({context:e.getContext()},i),n=e.getNoteEndX()-e.getNoteStartX()-Ke.defaultPadding;return function(...t){ti.DEBUG&&g("VexFlow.Formatter",t)}("Formatting voices to width: ",n),this.format(t,n,s)}getTickContext(t){var e;return null===(e=this.tickContexts)||void 0===e?void 0:e.map[t]}}var ei;ti.DEBUG=!1,function(t){t[t.BOTTOM=-1]="BOTTOM",t[t.TOP=1]="TOP"}(ei||(ei={}));class ii extends ${static get CATEGORY(){return l.Tuplet}static get LOCATION_TOP(){return ei.TOP}static get LOCATION_BOTTOM(){return ei.BOTTOM}static get NESTING_OFFSET(){return 15}constructor(t,e={}){if(super(),!t||!t.length)throw new c("BadArguments","No notes provided for tuplet.");this.options=e,this.notes=t,this.numNotes=void 0!==this.options.numNotes?this.options.numNotes:t.length,this.notesOccupied=this.options.notesOccupied||2,void 0!==this.options.bracketed?this.bracketed=this.options.bracketed:this.bracketed=t.some((t=>!t.hasBeam())),this.ratioed=void 0!==this.options.ratioed?this.options.ratioed:Math.abs(this.notesOccupied-this.numNotes)>1,this.textElement=new $("Tuplet"),this.setTupletLocation(this.options.location||ii.LOCATION_TOP),ti.AlignRestsToNotes(t,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let t=0;t<this.notes.length;t++){this.notes[t].setTuplet(this)}}detach(){for(let t=0;t<this.notes.length;t++){this.notes[t].resetTuplet(this)}}setBracketed(t){return this.bracketed=!!t,this}setRatioed(t){return this.ratioed=!!t,this}setTupletLocation(t){return t!==ii.LOCATION_TOP&&t!==ii.LOCATION_BOTTOM&&(console.warn(`Invalid tuplet location [${t}]. Using Tuplet.LOCATION_TOP.`),t=ii.LOCATION_TOP),this.location=t,this}getNotes(){return this.notes}getNoteCount(){return this.numNotes}getNotesOccupied(){return this.notesOccupied}setNotesOccupied(t){this.detach(),this.notesOccupied=t,this.resolveGlyphs(),this.attach()}resolveGlyphs(){let t="",e="",i=this.numNotes;for(;i>=1;)t=String.fromCharCode(59520+i%10)+t,i=Math.floor(i/10);if(this.ratioed){for(i=this.notesOccupied;i>=1;)e=String.fromCharCode(59520+i%10)+e,i=Math.floor(i/10);e=et.tupletColon+e}this.textElement.setText(t+e)}getNestedTupletCount(){const t=this.location,e=this.notes[0];let i=n(e,t),s=n(e,t);function n(t,e){return t.getTupletStack().filter((t=>t.location===e)).length}return this.notes.forEach((e=>{const a=n(e,t);i=a>i?a:i,s=a<s?a:s})),i-s}getYPosition(){var t;const e=this.getNestedTupletCount()*ii.NESTING_OFFSET*-this.location,i=null!==(t=this.options.yOffset)&&void 0!==t?t:0,s=this.notes[0];let n;if(this.location===ii.LOCATION_TOP){n=s.checkStave().getYForLine(0)-1.5*mt.STAVE_LINE_DISTANCE;for(let t=0;t<this.notes.length;++t){const e=this.notes[t];let i=0;const s=e.getModifierContext();s&&(i=Math.max(i,s.getState().topTextLine));const a=e.getYForTopText(i)-2*mt.STAVE_LINE_DISTANCE;if(e.hasStem()||e.isRest()){const t=e.getStemDirection()===Ct.UP?e.getStemExtents().topY-mt.STAVE_LINE_DISTANCE:e.getStemExtents().baseY-2*mt.STAVE_LINE_DISTANCE;n=Math.min(t,n),i>0&&(n=Math.min(a,n))}}}else{let t=4;this.notes.forEach((e=>{const i=e.getModifierContext();i&&(t=Math.max(t,i.getState().textLine+1))})),n=s.checkStave().getYForLine(t)+2*mt.STAVE_LINE_DISTANCE;for(let t=0;t<this.notes.length;++t)if(this.notes[t].hasStem()||this.notes[t].isRest()){const e=this.notes[t].getStemDirection()===Ct.UP?this.notes[t].getStemExtents().baseY+2*mt.STAVE_LINE_DISTANCE:this.notes[t].getStemExtents().topY+mt.STAVE_LINE_DISTANCE;e>n&&(n=e)}}return n+e+i}draw(){const t=this.checkContext();let e=0,i=0;this.setRendered();const s=this.notes[0],n=this.notes[this.notes.length-1];this.bracketed?(e=s.getTieLeftX()-5,this.width=n.getTieRightX()-e+5):(e=s.getStemX(),this.width=n.getStemX()-e),i=this.getYPosition();const a=e+this.width/2-this.textElement.getWidth()/2;if(this.bracketed){const s=this.width/2-this.textElement.getWidth()/2-5;s>0&&(t.fillRect(e,i,s,1),t.fillRect(e+this.width/2+this.textElement.getWidth()/2+5,i,s,1),t.fillRect(e,i+(this.location===ii.LOCATION_BOTTOM?1:0),1,10*this.location),t.fillRect(e+this.width,i+(this.location===ii.LOCATION_BOTTOM?1:0),1,10*this.location))}this.textElement.renderText(t,a,i+this.textElement.getHeight()/2)}}var si,ni,ai,oi,ri,hi,li,ci=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)},di=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i};function ui(t){let e=0;return t.forEach((t=>{t.keyProps&&t.keyProps.forEach((t=>{e+=t.line-3}))})),e>=0?Ct.DOWN:Ct.UP}const gi="L",pi="B";class mi extends ${static get CATEGORY(){return l.Beam}getStemDirection(){return ci(this,si,"f")}static getDefaultBeamGroups(t){t&&"c"!==t||(t="4/4");const e={"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"]}[t];if(void 0!==e)return e.map((t=>(new y).parse(t)));{const e=parseInt(t.split("/")[0],10),i=parseInt(t.split("/")[1],10);if(e%3==0)return[new y(3,i)];if(i>4)return[new y(2,i)];if(i<=4)return[new y(1,i)]}return[new y(1,4)]}static applyAndGetBeams(t,e,i){return mi.generateBeams(t.getTickables(),{groups:i,stemDirection:e})}static generateBeams(t,e={}){e.groups&&e.groups.length||(e.groups=[new y(2,8)]);const i=e.groups.map((t=>{if(!t.multiply)throw new c("InvalidBeamGroups","The beam groups must be an array of VexFlow.Fractions");return t.clone().multiply(mt.RESOLUTION,1)})),s=t;let n=0,a=[],o=[];function r(){i.length-1>n?n+=1:n=0}!function(){let t=[],e=new y(0,1);s.forEach((s=>{if(t=[],s.shouldIgnoreTicks())return a.push(o),void(o=t);o.push(s);const h=i[n].clone(),l=function(t){return t.reduce(((t,e)=>e.getTicks().clone().add(t)),new y(0,1))}(o).add(e),c=mt.durationToNumber(s.getDuration())<8;if(c&&s.getTuplet()&&(h.numerator*=2),l.greaterThan(h)){if(!c){const e=o.pop();e&&t.push(e)}a.push(o);do{e=l.subtract(i[n]),r()}while(e.greaterThanEquals(i[n]));o=t}else l.equals(h)&&(a.push(o),e=new y(0,1),o=t,r())})),o.length>0&&a.push(o)}(),function(){const t=[];a.forEach((i=>{let s=[];i.forEach(((i,n,a)=>{const o=0===n||n===a.length-1,r=a[n-1],h=!e.beamRests&&i.isRest(),l=e.beamRests&&e.beamMiddleOnly&&i.isRest()&&o;let c=!1;if(e.maintainStemDirections&&r&&!i.isRest()&&!r.isRest()){const t=r.getStemDirection();c=i.getStemDirection()!==t}const d=parseInt(i.getDuration(),10)<8;h||l||c||d?(s.length>0&&t.push(s),s=c?[i]:[]):s.push(i)})),s.length>0&&t.push(s)})),a=t}(),a.forEach((t=>{let i;if(e.maintainStemDirections){const e=function(t){for(let e=0;e<t.length;e++){const i=t[e];if(!i.isRest())return i}return!1}(t);i=e?e.getStemDirection():Ct.UP}else i=e.stemDirection?e.stemDirection:ui(t);!function(t,e){t.forEach((t=>{t.setStemDirection(e)}))}(t,i)}));const h=a.filter((t=>{if(t.length>1){let e=!0;return t.forEach((t=>{t.getIntrinsicTicks()>=mt.durationToTicks("4")&&(e=!1)})),e}return!1})),l=function(){const t=[];return a.forEach((e=>{let i;e.forEach((e=>{const s=e.getTuplet();s&&i!==s&&(i=s,t.push(i))}))})),t}(),d=[];return h.forEach((t=>{const i=new mi(t);e.showStemlets&&(i.renderOptions.showStemlets=!0),e.secondaryBreaks&&(i.renderOptions.secondaryBreakTicks=mt.durationToTicks(e.secondaryBreaks)),!0===e.flatBeams&&(i.renderOptions.flatBeams=!0,i.renderOptions.flatBeamOffset=e.flatBeamOffset),d.push(i)})),l.forEach((t=>{const e=t.notes[0].stemDirection===Ct.DOWN?ei.BOTTOM:ei.TOP;t.setTupletLocation(e);let i=!1;for(let e=0;e<t.notes.length;e++){if(!t.notes[e].hasBeam()){i=!0;break}}t.setBracketed(i)})),d}constructor(t,e=!1){if(super(),this.slope=0,si.set(this,void 0),ni.set(this,void 0),ai.set(this,0),oi.set(this,void 0),ri.set(this,void 0),hi.set(this,void 0),li.set(this,{}),!t||0===t.length)throw new c("BadArguments","No notes provided for beam.");if(1===t.length)throw new c("BadArguments","Too few notes for beam.");if(di(this,ni,t[0].getIntrinsicTicks(),"f"),ci(this,ni,"f")>=mt.durationToTicks("4"))throw new c("BadArguments","Beams can only be applied to notes shorter than a quarter note.");let i,s;di(this,si,t[0].getStemDirection(),"f");let n=ci(this,si,"f");if(e&&o(t[0]))n=ui(t);else if(e&&h(t[0])){const e=t.reduce(((t,e)=>t+e.getStemDirection()),0);n=e>-1?Ct.UP:Ct.DOWN}for(i=0;i<t.length;++i)s=t[i],e&&(s.setStemDirection(n),di(this,si,n,"f")),s.setBeam(this);this.postFormatted=!1,this.notes=t,di(this,ri,this.getBeamCount(),"f"),di(this,oi,[],"f"),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((t=>t.getGlyphProps().beamCount)).reduce(((t,e)=>e>t?e:t))}breakSecondaryAt(t){return di(this,oi,t,"f"),this}setPartialBeamSideAt(t,e){return ci(this,li,"f")[t]=e,this}unsetPartialBeamSideAt(t){return delete ci(this,li,"f")[t],this}getSlopeY(t,e,i,s){return i+(t-e)*s}calculateSlope(){const{notes:t,renderOptions:{maxSlope:e,minSlope:i,slopeIterations:s,slopeCost:n}}=this,a=ci(this,si,"f"),o=t[0],r=function(t,e){const i=t.getStemExtents().topY,s=t.getStemX();return(e.getStemExtents().topY-i)/(e.getStemX()-s)}(o,t[t.length-1]),h=(e-i)/s;let l=Number.MAX_VALUE,c=0,d=0;for(let s=i;s<=e;s+=h){let e=0,i=0;for(let n=1;n<t.length;++n){const r=t[n];if(r.hasStem()||r.isRest()){const t=this.getSlopeY(r.getStemX(),o.getStemX(),o.getStemExtents().topY,s)+i,h=r.getStemExtents().topY;if(h*a<t*a){const s=Math.abs(h-t);i+=s*-a,e+=s*n}else e+=(h-t)*a}}const h=r/2,u=n*Math.abs(h-s)+Math.abs(e);u<l&&(l=u,c=s,d=i)}this.slope=c,di(this,ai,d,"f")}calculateFlatSlope(){const{notes:t,renderOptions:{beamWidth:e,minFlatBeamOffset:i,flatBeamOffset:s}}=this,n=ci(this,si,"f");let a=0,o=0,r=0,h=0;for(let e=0;e<t.length;e++){const i=t[e],s=i.getStemExtents().topY;a+=s,n===Ct.DOWN&&h<s?(h=s,o=Math.max(...i.getYs()),r=i.getBeamCount()):n===Ct.UP&&(0===h||h>s)&&(h=s,o=Math.min(...i.getYs()),r=i.getBeamCount())}let l=a/t.length;const c=i+r*e*1.5,d=o+c*-n;n===Ct.DOWN&&l<d?l=o+c:n===Ct.UP&&l>d&&(l=o-c),s?(n===Ct.DOWN&&l>s||n===Ct.UP&&l<s)&&(this.renderOptions.flatBeamOffset=l):this.renderOptions.flatBeamOffset=l,this.slope=0,di(this,ai,0,"f")}getBeamYToDraw(){let t=this.notes[0].getStemExtents().topY;return this.renderOptions.flatBeams&&this.renderOptions.flatBeamOffset&&(t=this.renderOptions.flatBeamOffset),t}applyStemExtensions(){const{notes:t,slope:e,renderOptions:{showStemlets:i,stemletExtension:s,beamWidth:n}}=this,a=ci(this,ai,"f"),o=ci(this,ri,"f"),r=t[0],h=this.getBeamYToDraw(),l=r.getStemX();for(let r=0;r<t.length;++r){const c=t[r],d=c.getStem();if(d){const t=c.getStemX(),{topY:r}=c.getStemExtents(),u=this.getSlopeY(t,l,h,e)+a,g=d.getExtension(),p=c.getStemDirection()===Ct.UP?r-u:u-r;let m=0;if(c.getStemDirection()!==ci(this,si,"f")){m=(1+1.5*(c.getGlyphProps().beamCount-1))*this.renderOptions.beamWidth}if(d.setExtension(g+p+m),d.adjustHeightForBeam(),c.isRest()&&i){const t=(o-1)*n*1.5+n;d.setVisibility(!0).setStemlet(!0,t+s)}}}}lookupBeamDirection(t,e,i,s,n){if("4"===t)return gi;const a=ci(this,li,"f")[n];if(a)return a;const o=""+mt.durationToNumber(t)/2,r=e<mt.durationToTicks(o),h=s<mt.durationToTicks(o),l=i<mt.durationToTicks(o);return r&&h&&l?pi:r&&!h&&l?gi:!r&&h&&l?"R":this.lookupBeamDirection(o,e,i,s,n)}getBeamLines(t){const e=mt.durationToTicks(t);let i=!1;const s=[];let n;const a=this.renderOptions.partialBeamLength;let o=!1,r=0;for(let h=0;h<this.notes.length;++h){const l=this.notes[h];r+=l.getTicks().value();let c=!1;parseInt(t,10)>=8&&(c=-1!==ci(this,oi,"f").indexOf(h),this.renderOptions.secondaryBreakTicks&&r>=this.renderOptions.secondaryBreakTicks&&(r=0,c=!0));const d=l.getIntrinsicTicks()<e,u=l.getStemX()-Ct.WIDTH/2,g=this.notes[h-1],p=this.notes[h+1],m=p&&p.getIntrinsicTicks()<e,f=g&&g.getIntrinsicTicks()<e,S=g&&p&&d&&!f&&!m;if(d)if(i)n=s[s.length-1],n.end=u,c&&(i=!1,p&&!m&&void 0===n.end&&(n.end=n.start-a));else{if(n={start:u,end:void 0},i=!0,S){const e=g.getIntrinsicTicks(),i=p.getIntrinsicTicks(),s=l.getIntrinsicTicks(),o=this.lookupBeamDirection(t,e,s,i,h);[gi,pi].includes(o)?n.end=n.start-a:n.end=n.start+a}else m?c&&(n.end=n.start-a,i=!1):n.end=(o||0===h)&&p?n.start+a:n.start-a;s.push(n)}else i=!1;o=c}const h=s[s.length-1];return h&&void 0===h.end&&(h.end=h.start-a),s}drawStems(t){this.notes.forEach((e=>{const i=e.getStem();if(i){const s=e.getStemX();i.setNoteHeadXBounds(s,s),i.setContext(t).draw()}}),this)}drawBeamLines(t){const e=["4","8","16","32","64"],i=this.notes[0];let s=this.getBeamYToDraw();const n=i.getStemX(),a=this.renderOptions.beamWidth*ci(this,si,"f");for(let i=0;i<e.length;++i){const o=e[i],r=this.getBeamLines(o);for(let e=0;e<r.length;++e){const i=r[e],o=i.start,h=this.getSlopeY(o,n,s,this.slope),l=i.end;if(!l)throw new c("NoLastBeamX","lastBeamX undefined.");{const e=this.getSlopeY(l,n,s,this.slope);t.beginPath(),t.moveTo(o,h),t.lineTo(o,h+a),t.lineTo(l+1,e+a),t.lineTo(l+1,e),t.closePath(),t.fill()}}s+=1.5*a}}preFormat(){return this}postFormat(){this.postFormatted||(h(this.notes[0])||this.renderOptions.flatBeams?this.calculateFlatSlope():this.calculateSlope(),this.applyStemExtensions(),this.postFormatted=!0)}draw(){const t=this.checkContext();this.setRendered(),ci(this,hi,"f")||(this.postFormatted||this.postFormat(),this.drawStems(t),this.applyStyle(),t.openGroup("beam",this.getAttribute("id")),this.drawBeamLines(t),t.closeGroup(),this.restoreStyle())}}si=new WeakMap,ni=new WeakMap,ai=new WeakMap,oi=new WeakMap,ri=new WeakMap,hi=new WeakMap,li=new WeakMap;class fi extends zt{static get CATEGORY(){return l.ClefNote}constructor(t,e="default",i){super({duration:"b"}),this.setType(t,e,i),this.ignoreTicks=!0}setType(t,e,i){return this.clef=new Pe(t,e,i),this.setWidth(this.clef.getWidth()),this}getClef(){return this.clef}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkStave(),e=this.checkContext();this.setRendered(),this.clef.renderText(e,this.getAbsoluteX()-this.x,t.getYForLine(this.clef.line))}}class Si extends zt{static get CATEGORY(){return l.Crescendo}constructor(t){var e;super(t),this.options={extendLeft:0,extendRight:0,yShift:0},this.decrescendo=!1,this.line=null!==(e=t.line)&&void 0!==e?e:0,this.height=15}setLine(t){return this.line=t,this}setHeight(t){return this.height=t,this}setDecrescendo(t){return this.decrescendo=t,this}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkContext(),e=this.checkStave();this.setRendered();const i=this.getTickContext(),s=Je.getNextContext(i),n=this.getAbsoluteX(),a=s?s.getX():e.getX()+e.getWidth(),o=e.getYForLine(this.line+-3)+1;!function(...t){Si.DEBUG&&g("VexFlow.Crescendo",t)}("Drawing ",this.decrescendo?"decrescendo ":"crescendo ",this.height,"x",n-a),function(t,e){const i=e.beginX,s=e.endX,n=e.y,a=e.height/2;t.beginPath(),e.reverse?(t.moveTo(i,n-a),t.lineTo(s,n),t.lineTo(i,n+a)):(t.moveTo(s,n-a),t.lineTo(i,n),t.lineTo(s,n+a)),t.stroke(),t.closePath()}(t,{beginX:n-this.options.extendLeft,endX:a+this.options.extendRight,y:o+this.options.yShift,height:this.height,reverse:this.decrescendo})}}var Ti;Si.DEBUG=!1,function(t){t[t.NEAR_HEAD=1]="NEAR_HEAD",t[t.NEAR_TOP=2]="NEAR_TOP"}(Ti||(Ti={}));class wi extends ${static get CATEGORY(){return l.Curve}static get Position(){return Ti}static get PositionString(){return{nearHead:Ti.NEAR_HEAD,nearTop:Ti.NEAR_TOP}}constructor(t,e,i){super(),this.renderOptions=Object.assign({thickness:2,xShift:0,yShift:10,position:Ti.NEAR_HEAD,positionEnd:Ti.NEAR_HEAD,invert:!1,cps:[{x:0,y:10},{x:0,y:10}]},i),this.from=t,this.to=e}setNotes(t,e){if(!t&&!e)throw new c("BadArguments","Curve needs to have either `from` or `to` set.");return this.from=t,this.to=e,this}isPartial(){return!this.from||!this.to}renderCurve(t){var e,i;const s=this.checkContext();this.applyStyle();const n=this.renderOptions.xShift,a=this.renderOptions.yShift*t.direction,o=t.firstX+n,r=t.firstY+a,h=t.lastX-n,l=t.lastY+a,c=this.renderOptions.thickness,d=this.renderOptions.cps,{x:u,y:g}=d[0],{x:p,y:m}=d[1],f=(h-o)/(d.length+2);s.beginPath(),s.moveTo(o,r),s.bezierCurveTo(o+f+u,r+g*t.direction,h-f+p,l+m*t.direction,h,l),(null===(e=this.style)||void 0===e?void 0:e.lineDash)||s.bezierCurveTo(h-f+p,l+(m+c)*t.direction,o+f+u,r+(g+c)*t.direction,o,r),s.stroke(),s.closePath(),(null===(i=this.style)||void 0===i?void 0:i.lineDash)||s.fill(),this.restoreStyle()}draw(){this.checkContext(),this.setRendered();const t=this.from,e=this.to;let i,s,n,a,o=0,r="baseY",h="baseY";function l(t){return"string"==typeof t?wi.PositionString[t]:t}const c=l(this.renderOptions.position),d=l(this.renderOptions.positionEnd);if(c===Ti.NEAR_TOP&&(r="topY",h="topY"),d===Ti.NEAR_HEAD?h="baseY":d===Ti.NEAR_TOP&&(h="topY"),t)i=t.getTieRightX(),o=t.getStemDirection(),n=t.getStemExtents()[r];else{i=e.checkStave().getTieStartX(),n=e.getStemExtents()[r]}if(e)s=e.getTieLeftX(),o=e.getStemDirection(),a=e.getStemExtents()[h];else{s=t.checkStave().getTieEndX(),a=t.getStemExtents()[h]}return this.renderCurve({firstX:i,lastX:s,firstY:n,lastY:a,direction:o*(!0===this.renderOptions.invert?-1:1)}),!0}}function xi(...t){yi.DEBUG&&g("VexFlow.Parser",t)}function bi(t){if("matchedString"in t)return t.matchedString;if("results"in t)return bi(t.results);const e=t;return 1===e.length?bi(e[0]):0===e.length?null:e.map(bi)}class yi{constructor(t){this.grammar=t,this.line="",this.pos=0,this.errorPos=-1}parse(t){this.line=t,this.pos=0,this.errorPos=-1;const e=this.expect(this.grammar.begin());return e.errorPos=this.errorPos,e}matchFail(t){-1===this.errorPos&&(this.errorPos=this.pos),this.pos=t}matchSuccess(){this.errorPos=-1}matchToken(t,e=!1){const i=e?new RegExp("^(("+t+"))"):new RegExp("^(("+t+")\\s*)"),s=this.line.slice(this.pos).match(i);return null!==s?{success:!0,matchedString:s[2],incrementPos:s[1].length,pos:this.pos}:{success:!1,pos:this.pos}}expectOne(t,e=!1){const i=[],s=this.pos;let n=!0,a=!1;if(e=!0===e||!0===t.maybe,t.expect)for(const e of t.expect){const s=this.pos,o=this.expect(e);if(o.success){if(i.push(o),a=!0,t.or)break}else if(n=!1,!t.or){this.pos=s;break}}const o=t.or&&a||n,r=o||!0===e,h=o?1:0;return e&&!o&&(this.pos=s),r?this.matchSuccess():this.matchFail(s),{success:r,results:i,numMatches:h}}expectOneOrMore(t,e=!1){const i=[],s=this.pos;let n=0,a=!0;do{const e=this.expectOne(t);e.success&&e.results?(n++,i.push(e.results)):a=!1}while(a);const o=n>0||!0===e;return!e||n>0||(this.pos=s),o?this.matchSuccess():this.matchFail(s),{success:o,results:i,numMatches:n}}expectZeroOrMore(t){return this.expectOneOrMore(t,!0)}expect(t){if(xi("Evaluating rule function:",t),!t)throw new c("Invalid rule function");let e;const i=t.bind(this.grammar)();if(i.token)e=this.matchToken(i.token,!0===i.noSpace),e.success&&(this.pos+=e.incrementPos);else{if(!i.expect)throw xi(i),new c("Bad grammar! No `token` or `expect` property "+i);e=i.oneOrMore?this.expectOneOrMore(i):i.zeroOrMore?this.expectZeroOrMore(i):this.expectOne(i)}const s=[];return e.matches=s,e.results&&e.results.forEach((t=>s.push(bi(t)))),i.run&&e.success&&i.run({matches:s}),e}}function Ci(...t){Ni.DEBUG&&g("VexFlow.EasyScore",t)}yi.DEBUG=!1;class vi{constructor(t){this.builder=t}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:t=>this.builder.addChord(t.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:t=>{const e=t;this.builder.addSingleNote(e.matches[0],e.matches[1],e.matches[2])}}}ACCIDENTAL(){return{expect:[this.MICROTONES,this.ACCIDENTALS],maybe:!0,or:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:t=>this.builder.setNoteDots(t.matches)}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:t=>this.builder.setNoteType(t.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:t=>this.builder.setNoteDuration(t.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(){return{expect:[this.KEY,this.EQUALS,this.VAL],run:t=>this.builder.addNoteOption(t.matches[0],t.matches[2].slice(1,-1))}}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:"$"}}}class ki{constructor(t){this.chord=[],this.dots=0,this.options={},this.duration=t}}class Di{constructor(t){this.commitHooks=[],this.factory=t,this.reset()}reset(t){this.options=Object.assign({stem:"auto",clef:"treble"},t),this.elements={notes:[],accidentals:[]},this.rollingDuration="8",this.resetPiece()}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(t){this.commitHooks.push(t)}resetPiece(){Ci("resetPiece"),this.piece=new ki(this.rollingDuration)}setNoteDots(t){Ci("setNoteDots:",t),t&&(this.piece.dots=t.length)}setNoteDuration(t){Ci("setNoteDuration:",t),this.rollingDuration=this.piece.duration=t||this.rollingDuration}setNoteType(t){Ci("setNoteType:",t),t&&(this.piece.type=t)}addNoteOption(t,e){Ci("addNoteOption: key:",t,"value:",e),this.piece.options[t]=e}addNote(t,e,i){Ci("addNote:",t,e,i),this.piece.chord.push({key:t,accid:e,octave:i})}addSingleNote(t,e,i){Ci("addSingleNote:",t,e,i),this.addNote(t,e,i)}addChord(t){Ci("startChord"),"object"!=typeof t[0]?this.addSingleNote(t[0]):t.forEach((t=>{t&&this.addNote(...t)})),Ci("endChord")}commitPiece(){Ci("commitPiece");const{factory:t}=this;if(!t)return;const e=Object.assign(Object.assign({},this.options),this.piece.options),i=u(e.stem,"BadArguments","options.stem is not defined").toLowerCase(),s=u(e.clef,"BadArguments","options.clef is not defined").toLowerCase(),{chord:n,duration:a,dots:o,type:r}=this.piece,h=at.accidentals,l=n.map((t=>{var e;return t.key+(h.includes(null!==(e=t.accid)&&void 0!==e?e:"")?t.accid:"")+"/"+t.octave})),c="auto"===i,d="g"===(null==r?void 0:r.toLowerCase())?t.GhostNote({duration:a,dots:o}):t.StaveNote({keys:l,duration:a,dots:o,type:r,clef:s,autoStem:c});c||d.setStemDirection("up"===i?Ct.UP:Ct.DOWN);const g=[];n.forEach(((e,i)=>{const s=e.accid;if("string"==typeof s){const e=t.Accidental({type:s});d.addModifier(e,i),g.push(e)}else g.push(void 0)}));for(let t=0;t<o;t++)te.buildAndAttach([d],{all:!0});this.commitHooks.forEach((t=>t(e,d,this))),this.elements.notes.push(d),this.elements.accidentals.push(g),this.resetPiece()}}function Bi(t,e){void 0!==t.id&&e.setAttribute("id",t.id)}const Ei=/\s*,\s*/;function Li(t,e){void 0!==t.class&&t.class.split(Ei).forEach((t=>e.addClass(t)))}class Ni{constructor(t={}){this.defaults={clef:"treble",time:"4/4",stem:"auto"},this.setOptions(t)}set(t){return this.defaults=Object.assign(Object.assign({},this.defaults),t),this}setOptions(t){var e,i;const s=t.factory,n=null!==(e=t.builder)&&void 0!==e?e:new Di(s);return this.options=Object.assign(Object.assign({commitHooks:[Bi,Li,Pt.easyScoreHook,ee.easyScoreHook],throwOnError:!1},t),{factory:s,builder:n}),this.factory=s,this.builder=n,this.grammar=new vi(this.builder),this.parser=new yi(this.grammar),null===(i=this.options.commitHooks)||void 0===i||i.forEach((t=>this.addCommitHook(t))),this}setContext(t){return this.factory.setContext(t),this}parse(t,e={}){this.builder.reset(e);const i=this.parser.parse(t);if(!i.success&&this.options.throwOnError)throw Ci(i),new c("Error parsing line: "+t);return i}beam(t,e){return this.factory.Beam({notes:t,options:e}),t}tuplet(t,e){return this.factory.Tuplet({notes:t,options:e}),t}notes(t,e={}){return e=Object.assign({clef:this.defaults.clef,stem:this.defaults.stem},e),this.parse(t,e),this.builder.getElements().notes}voice(t,e={}){return e=Object.assign({time:this.defaults.time},e),this.factory.Voice(e).addTickables(t)}addCommitHook(t){this.builder.addCommitHook(t)}}Ni.DEBUG=!1;const Fi="Ghost note must have valid initialization data to identify duration.";class Oi extends se{static get CATEGORY(){return l.GhostNote}constructor(t){if(!t)throw new c("BadArguments",Fi);let e;if("string"==typeof t)e={duration:t};else{if("object"!=typeof t)throw new c("BadArguments",Fi);e=t}super(e),this.setWidth(0)}isRest(){return!0}setStave(t){return super.setStave(t),this}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this}draw(){this.setRendered();for(let t=0;t<this.modifiers.length;++t){const e=this.modifiers[t];i(e,l.Annotation)&&(e.setContext(this.getContext()),e.drawWithStyle())}}}class Ai extends zt{static get CATEGORY(){return l.GlyphNote}constructor(t,e,i){super(e),this.options=Object.assign({ignoreTicks:!1,line:2},i),this.ignoreTicks=this.options.ignoreTicks,this.setGlyph(t)}setGlyph(t){return this.text=t,this}preFormat(){return!this.preFormatted&&this.modifierContext&&this.modifierContext.preFormat(),this.preFormatted=!0,this}drawModifiers(){const t=this.checkContext();for(let e=0;e<this.modifiers.length;e++){const i=this.modifiers[e];i.setContext(t),i.drawWithStyle()}}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),this.applyStyle(e),e.openGroup("glyphNote",this.getAttribute("id"));const i=this.isCenterAligned()?this.getAbsoluteX()-this.getWidth()/2:this.getAbsoluteX();this.renderText(e,i,t.getYForLine(this.options.line)),this.drawModifiers(),e.closeGroup(),this.restoreStyle(e)}}class Pi extends le{static get CATEGORY(){return l.GraceNote}static get LEDGER_LINE_OFFSET(){return 2}constructor(t){super(Object.assign({strokePx:Pi.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 t=super.getStemExtension();return t=Ct.HEIGHT*this.getFontScale()-Ct.HEIGHT+t,t}draw(){super.draw(),this.setRendered();const t=this.stem;if(this.slash&&t){const t=this.getFontScale();let e;const i=this.beam;if(i)i.postFormatted||i.postFormat(),e=this.calcBeamedNotesSlashBBox(8*t,8*t,{stem:6*t,beam:5*t});else{const i=this.getStemDirection(),s=this.getNoteHeadBounds(),n=this.noteHeads[0].getWidth(),a=i===Ct.DOWN?this.getAbsoluteX():this.getAbsoluteX()+n,o=mt.STEM_HEIGHT*t/2,r=i===Ct.DOWN?s.yBottom+o:s.yTop-o;e=i===Ct.DOWN?{x1:a-n,y1:r-n,x2:a+n,y2:r+n}:{x1:a-n,y1:r+n,x2:a+n,y2:r-n}}const s=this.checkContext();s.save(),s.setLineWidth(1*t),s.beginPath(),s.moveTo(e.x1,e.y1),s.lineTo(e.x2,e.y2),s.closePath(),s.stroke(),s.restore()}}calcBeamedNotesSlashBBox(t,e,i){const s=this.beam;if(!s)throw new c("NoBeam","Can't calculate without a beam.");const n=s.slope,a=s.notes[s.notes.length-1]===this?-1:1,o=Math.atan(n*a),r=Math.cos(o)*e,h=Math.sin(o)*e;t*=this.getStemDirection();const l=Math.atan((h-t)/r),d=Math.cos(l)*i.stem*a,u=Math.sin(l)*i.stem,g=Math.cos(l)*i.beam*a,p=Math.sin(l)*i.beam,m=this.getStemX(),f=s.notes[0].getStemX(),S=s.getBeamYToDraw()+(m-f)*n;return{x1:m-d,y1:S+t-u,x2:m+r*a+g,y2:S+h+p}}}class Ri extends zt{static get CATEGORY(){return l.KeySigNote}constructor(t,e,i){super({duration:"b"}),this.keySignature=new Re(t,e,i),this.ignoreTicks=!0}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this.keySignature.setStave(this.checkStave()),this.setWidth(this.keySignature.getWidth()),this}draw(){const t=this.checkStave().checkContext();this.setRendered(),this.keySignature.setX(this.getAbsoluteX()),this.keySignature.setContext(t),this.keySignature.draw()}}var Mi,Ii,Wi,Hi,Gi=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},Ui=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class Vi extends ${static get CATEGORY(){return l.MultiMeasureRest}constructor(t,e){var i;super(),this.xs={left:NaN,right:NaN},Mi.set(this,!1),Ii.set(this,!1),Wi.set(this,!1),Hi.set(this,!1);const s=null!==(i=e.numberGlyphPoint)&&void 0!==i?i:v.get("MultiMeasureRest.fontSize");this.fontInfo.size=s,this.numberOfMeasures=t,this.text="";const n=`${this.numberOfMeasures}`;for(const t of n)this.text+=String.fromCodePoint(57472+Number(t));Gi(this,Mi,"number"==typeof e.paddingLeft,"f"),Gi(this,Ii,"number"==typeof e.paddingRight,"f"),Gi(this,Wi,"number"==typeof e.lineThickness,"f"),Gi(this,Hi,"number"==typeof e.symbolSpacing,"f"),this.renderOptions=Object.assign({useSymbols:!1,showNumber:!0,numberLine:-.5,numberGlyphPoint:s,line:2,spacingBetweenLinesPx:mt.STAVE_LINE_DISTANCE,serifThickness:2,semibreveRestGlyphScale:v.get("fontSize"),paddingLeft:0,paddingRight:0,lineThickness:5,symbolSpacing:0},e)}getXs(){return this.xs}setStave(t){return this.stave=t,this}getStave(){return this.stave}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}drawLine(t,e,i,s){const n=this.renderOptions,a=t.getYForLine(n.line),o=.1*(s-i);i+=o,s-=o;let r="";const h=new $;h.setText(r);for(let t=1;(t+2)*h.getWidth()+i<=s;t++)r+="";r+="",h.setText(r),h.renderText(e,i+.5*(s-i)-.5*h.getWidth(),a)}drawSymbols(t,e,i,s){const n=Math.floor(this.numberOfMeasures/4),a=this.numberOfMeasures%4,o=Math.floor(a/2),r=a%2,h=this.renderOptions,l=new $;let c="";for(let t=0;t<n;++t)c+=et.restLonga+" ";for(let t=0;t<o;++t)c+=et.restDoubleWhole+" ";l.setText(c);const d=new $;c="";for(let t=0;t<r;++t)c+=et.restWhole+" ";d.setText(c);let u=i+.5*(s-i)-.5*(l.getWidth()+d.getWidth());const g=h.line,p=t.getYForLine(g-1),m=t.getYForLine(g);l.renderText(e,u,m),u+=l.getWidth(),d.renderText(e,u,p),u+=d.getWidth()}draw(){const t=this.checkContext();this.setRendered();const e=this.checkStave();let i=e.getNoteStartX(),n=e.getNoteEndX();const a=e.getModifiers(Wt.BEGIN);1===a.length&&s(a[0])&&(i-=a[0].getWidth());const o=this.renderOptions;Ui(this,Mi,"f")&&(i=e.getX()+o.paddingLeft),Ui(this,Ii,"f")&&(n=e.getX()+e.getWidth()-o.paddingRight),this.xs.left=i,this.xs.right=n,o.useSymbols?this.drawSymbols(e,t,i,n):this.drawLine(e,t,i,n),o.showNumber&&this.renderText(t,i+.5*(n-i)-.5*this.width,e.getYForLine(o.numberLine)-.5*this.height)}}function Xi(t,e,i,s){var n;const a=new $(Yi.CATEGORY);a.setText(null!==(n=Yi.GLYPHS[t])&&void 0!==n?n:t),a.renderText(e,i-(a.getWidth()-mt.STAVE_LINE_DISTANCE)/2,s)}Mi=new WeakMap,Ii=new WeakMap,Wi=new WeakMap,Hi=new WeakMap;class Yi extends ${static get CATEGORY(){return l.PedalMarking}static createSustain(t){return new Yi(t)}static createSostenuto(t){const e=new Yi(t);return e.setType(Yi.type.MIXED),e.setCustomText("Sost. Ped."),e}static createUnaCorda(t){const e=new Yi(t);return e.setType(Yi.type.TEXT),e.setCustomText("una corda","tre corda"),e}constructor(t){super(),this.notes=t,this.type=Yi.type.TEXT,this.line=0,this.customDepressText="",this.customReleaseText="",this.renderOptions={bracketHeight:10,textMarginRight:6,bracketLineWidth:1,color:"black"}}setType(t){return(t="string"==typeof t?Yi.typeString[t]:t)>=Yi.type.TEXT&&t<=Yi.type.MIXED&&(this.type=t),this}setCustomText(t,e){return this.customDepressText=t||"",this.customReleaseText=e||"",this}setLine(t){return this.line=t,this}drawBracketed(){const t=this.checkContext();let e,i,s=!1;this.notes.forEach(((n,a,o)=>{s=!s;const r=n.getAbsoluteX(),h=n.checkStave().getYForBottomText(this.line+3);if(r<e)throw new c("InvalidConfiguration","The notes provided must be in order of ascending x positions");const l=o[a+1]===n,d=o[a-1]===n;let u=0;if(s)if(u=d?5:0,this.type!==Yi.type.MIXED||d)t.beginPath(),t.moveTo(r,h-this.renderOptions.bracketHeight),t.lineTo(r+u,h),t.stroke(),t.closePath();else if(this.customDepressText){const e=t.measureText(this.customDepressText).width;t.fillText(this.customDepressText,r-e/2,h),u=e/2+this.renderOptions.textMarginRight}else Xi("pedalDepress",t,r,h),u=20+this.renderOptions.textMarginRight;else u=l?-5:0,t.beginPath(),t.moveTo(e,i),t.lineTo(r+u,h),t.lineTo(r,h-this.renderOptions.bracketHeight),t.stroke(),t.closePath();e=r+u,i=h}))}drawText(){const t=this.checkContext();let e=!1;this.notes.forEach((i=>{e=!e;const s=i.checkStave(),n=i.getAbsoluteX(),a=s.getYForBottomText(this.line+3);let o=0;e?this.customDepressText?(o=t.measureText(this.customDepressText).width,t.fillText(this.customDepressText,n-o/2,a)):Xi("pedalDepress",t,n,a):this.customReleaseText?(o=t.measureText(this.customReleaseText).width,t.fillText(this.customReleaseText,n-o/2,a)):Xi("pedalRelease",t,n,a)}))}draw(){const t=this.checkContext();this.setRendered(),t.save(),t.setStrokeStyle(this.renderOptions.color),t.setFillStyle(this.renderOptions.color),t.setFont(v.getFontInfo("PedalMarking.text")),function(...t){Yi.DEBUG&&g("VexFlow.PedalMarking",t)}("Rendering Pedal Marking"),this.type===Yi.type.BRACKET||this.type===Yi.type.MIXED?(t.setLineWidth(this.renderOptions.bracketLineWidth),this.drawBracketed()):this.type===Yi.type.TEXT&&this.drawText(),t.restore()}}Yi.DEBUG=!1,Yi.GLYPHS={pedalDepress:et.keyboardPedalPed,pedalRelease:et.keyboardPedalUp},Yi.type={TEXT:1,BRACKET:2,MIXED:3},Yi.typeString={text:Yi.type.TEXT,bracket:Yi.type.BRACKET,mixed:Yi.type.MIXED};const _i={1:et.repeat1Bar,2:et.repeat2Bars,4:et.repeat4Bars,slash:et.repeatBarSlash};class zi extends Ai{static get CATEGORY(){return l.RepeatNote}constructor(t,e,i){super(_i[t]||"",Object.assign({duration:"q",alignCenter:"slash"!==t},e),i)}}function ji(t,e,i,s,n,a,o){t.beginPath(),t.moveTo(e,i),t.lineTo(s,n),t.lineTo(a,o),t.lineTo(e,i),t.closePath(),t.fill()}class qi extends ${static get CATEGORY(){return l.StaveLine}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:qi.TextVerticalPosition.TOP,textJustification:qi.TextJustification.CENTER}}setText(t){return this.text=t,this}setNotes(t){if(!t.firstNote&&!t.lastNote)throw new c("BadArguments","Notes needs to have either firstNote or lastNote set.");if(t.firstIndexes||(t.firstIndexes=[0]),t.lastIndexes||(t.lastIndexes=[0]),t.firstIndexes.length!==t.lastIndexes.length)throw new c("BadArguments","Connected notes must have same number of indexes.");return this.notes=t,this.firstNote=t.firstNote,this.firstIndexes=t.firstIndexes,this.lastNote=t.lastNote,this.lastIndexes=t.lastIndexes,this}applyLineStyle(){const t=this.checkContext(),e=this.renderOptions;e.lineDash&&t.setLineDash(e.lineDash),e.lineWidth&&t.setLineWidth(e.lineWidth),e.roundedEnd?t.setLineCap("round"):t.setLineCap("square")}drawArrowLine(t,e,i){const s=this.renderOptions.drawStartArrow&&this.renderOptions.drawEndArrow,n=e.x,a=e.y,o=i.x,r=i.y,h=Math.sqrt((o-n)*(o-n)+(r-a)*(r-a)),l=(h-this.renderOptions.arrowheadLength/3)/h;let c,d,u,g;this.renderOptions.drawEndArrow||s?(c=Math.round(n+(o-n)*l),d=Math.round(a+(r-a)*l)):(c=o,d=r),this.renderOptions.drawStartArrow||s?(u=n+(o-n)*(1-l),g=a+(r-a)*(1-l)):(u=n,g=a),this.renderOptions.color&&(t.setStrokeStyle(this.renderOptions.color),t.setFillStyle(this.renderOptions.color)),t.beginPath(),t.moveTo(u,g),t.lineTo(c,d),t.stroke(),t.closePath();const p=Math.atan2(r-a,o-n),m=Math.abs(this.renderOptions.arrowheadLength/Math.cos(this.renderOptions.arrowheadAngle));let f,S,T,w,x,b;(this.renderOptions.drawEndArrow||s)&&(f=p+Math.PI+this.renderOptions.arrowheadAngle,T=o+Math.cos(f)*m,w=r+Math.sin(f)*m,S=p+Math.PI-this.renderOptions.arrowheadAngle,x=o+Math.cos(S)*m,b=r+Math.sin(S)*m,ji(t,T,w,o,r,x,b)),(this.renderOptions.drawStartArrow||s)&&(f=p+this.renderOptions.arrowheadAngle,T=n+Math.cos(f)*m,w=a+Math.sin(f)*m,S=p-this.renderOptions.arrowheadAngle,x=n+Math.cos(S)*m,b=a+Math.sin(S)*m,ji(t,T,w,n,a,x,b))}draw(){const t=this.checkContext();this.setRendered();const e=this.firstNote,i=this.lastNote,s=this.renderOptions;t.save(),this.applyLineStyle();let n={x:0,y:0},a={x:0,y:0};this.firstIndexes.forEach(((o,r)=>{const h=this.lastIndexes[r];n=e.getModifierStartXY(2,o),a=i.getModifierStartXY(1,h);const l=n.y>a.y;n.x+=e.getMetrics().modRightPx+s.paddingLeft,a.x-=i.getMetrics().modLeftPx+s.paddingRight;const c=e.getGlyphWidth();e.getKeyProps()[o].displaced&&1===e.getStemDirection()&&(n.x+=c+s.paddingLeft);i.getKeyProps()[h].displaced&&-1===i.getStemDirection()&&(a.x-=c+s.paddingRight),n.y+=l?-3:1,a.y+=l?2:0,this.drawArrowLine(t,n,a)})),t.restore();const o=this.width,r=s.textJustification;let h=0;if(r===qi.TextJustification.LEFT)h=n.x;else if(r===qi.TextJustification.CENTER){h=(a.x-n.x)/2+n.x-o/2}else r===qi.TextJustification.RIGHT&&(h=a.x-o);let l=0;const c=s.textPositionVertical;c===qi.TextVerticalPosition.TOP?l=e.checkStave().getYForTopText():c===qi.TextVerticalPosition.BOTTOM&&(l=e.checkStave().getYForBottomText(mt.TEXT_HEIGHT_OFFSET_HACK));const d=s.color;return this.applyStyle(t,{fillStyle:d,strokeStyle:d}),this.renderText(t,h,l),this.restoreStyle(t),this}}qi.TextVerticalPosition={TOP:1,BOTTOM:2},qi.TextJustification=He;class Ki extends ${static get CATEGORY(){return l.System}constructor(t={}){super(),this.setOptions(t),this.partStaves=[],this.partStaveInfos=[],this.partVoices=[]}setOptions(t={}){if(!t.factory)throw new c("NoFactory","System.setOptions(options) requires a factory.");this.factory=t.factory,this.options=Object.assign(Object.assign({factory:this.factory,x:10,y:10,width:500,spaceBetweenStaves:12,autoWidth:!1,noJustification:!1,debugFormatter:!1,formatIterations:0,noPadding:!1},t),{details:Object.assign({alpha:.5},t.details),formatOptions:Object.assign({},t.formatOptions)}),!1===this.options.noJustification&&void 0===t.width&&(this.options.autoWidth=!0)}getX(){return this.options.x}setX(t){return this.options.x=t,this.partStaves.forEach((e=>{e.setX(t)})),this}getY(){return this.options.y}setY(t){return this.options.y=t,this.partStaves.forEach((e=>{e.setY(t)})),this}getStaves(){return this.partStaves}getVoices(){return this.partVoices}setContext(t){return super.setContext(t),this.factory.setContext(t),this}addConnector(t="double"){return this.connector=this.factory.StaveConnector({topStave:this.partStaves[0],bottomStave:this.partStaves[this.partStaves.length-1],type:t}),this.connector}addStave(t){var e;const i=Object.assign({leftBar:!1},t.options),s=null!==(e=t.stave)&&void 0!==e?e:this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:i}),n=Object.assign(Object.assign({spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,noJustification:!1},t),{options:i}),a=this.getContext();return n.voices.forEach((t=>{t.setContext(a).setStave(s).getTickables().forEach((t=>t.setStave(s))),this.partVoices.push(t)})),this.partStaves.push(s),this.partStaveInfos.push(n),s}addVoices(t){const e=this.getContext();t.forEach((t=>{t.setContext(e),this.partVoices.push(t)}))}format(){const t=this.options.details;let e=0;const i=new ti(t);this.formatter=i;let s=this.options.y,n=0;const a=[];this.partStaves.forEach(((t,e)=>{s+=t.space(this.partStaveInfos[e].spaceAbove),t.setY(s),s+=t.space(this.partStaveInfos[e].spaceBelow),s+=t.space(this.options.spaceBetweenStaves),this.partStaveInfos[e].debugNoteMetrics&&(a.push({y:s,stave:t}),s+=15),n=Math.max(n,t.getNoteStartX())})),this.partVoices.forEach((t=>{t.getTickables().forEach((t=>{const e=t.getStave();e&&t.setStave(e)}))})),i.joinVoices(this.partVoices),this.partStaves.forEach((t=>t.setNoteStartX(n))),this.options.autoWidth&&this.partVoices.length>0?(e=i.preCalculateMinTotalWidth(this.partVoices),this.options.width=e+Ke.rightPadding+(n-this.options.x),this.partStaves.forEach((t=>{t.setWidth(this.options.width)}))):e=this.options.noPadding?this.options.width-(n-this.options.x):this.options.width-(n-this.options.x)-Ke.defaultPadding,this.partVoices.length>0&&i.format(this.partVoices,this.options.noJustification?0:e,this.options.formatOptions),i.postFormat();for(let e=0;e<this.options.formatIterations;e++)i.tune(t);this.startX=n,this.debugNoteMetricsYs=a,this.lastY=s,Ke.formatBegModifiers(this.partStaves)}getBoundingBox(){var t;return new D(this.options.x,this.options.y,this.options.width,(null!==(t=this.lastY)&&void 0!==t?t:0)-this.options.y)}draw(){const t=this.checkContext();if(!(this.formatter&&this.startX&&this.lastY&&this.debugNoteMetricsYs))throw new c("NoFormatter","format() must be called before draw()");this.setRendered(),this.options.debugFormatter&&ti.plotDebugging(t,this.formatter,this.startX,this.options.y,this.lastY),this.debugNoteMetricsYs.forEach((e=>{this.partVoices.forEach((i=>{i.getTickables().forEach((i=>{i.getStave()===e.stave&&zt.plotMetrics(t,i,e.y)}))}))}))}}class Qi extends se{static get CATEGORY(){return l.TabNote}constructor(t,e=!1){super(t),this.fretElement=[],this.greatestString=()=>this.positions.map((t=>t.str)).reduce(((t,e)=>t>e?t:e)),this.leastString=()=>this.positions.map((t=>t.str)).reduce(((t,e)=>t<e?t:e)),this.ghost=!1,this.positions=t.positions||[],this.renderOptions=Object.assign(Object.assign({},this.renderOptions),{drawStem:e,drawDots:e,drawStemThroughStave:!1,yShift:0}),this.glyphProps=zt.getGlyphProps(this.duration,this.noteType),u(this.glyphProps,"BadArguments",`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.buildStem(),t.stemDirection?this.setStemDirection(t.stemDirection):this.setStemDirection(Ct.UP),this.ghost=!1,this.updateWidth()}reset(){return super.reset(),this.stave&&this.setStave(this.stave),this}setGhost(t){return this.ghost=t,this.updateWidth(),this}hasStem(){return!!this.renderOptions.drawStem}getStemExtension(){return void 0!==this.stemExtensionOverride?this.stemExtensionOverride:this.flag.getHeight()>Ct.HEIGHT?this.flag.getHeight()-Ct.HEIGHT:0}static tabToElement(t){let e;return"X"===t.toUpperCase()?(e=new $("TabNote"),e.setText(et.accidentalDoubleSharp)):(e=new $("TabNote.text"),e.setText(t),e.setYShift(e.getHeight()/2)),e}updateWidth(){this.fretElement=[],this.width=0;for(let t=0;t<this.positions.length;++t){let e=this.positions[t].fret;this.ghost&&(e="("+e+")");const i=Qi.tabToElement(e.toString());this.fretElement.push(i),this.width=Math.max(i.getWidth(),this.width)}}setStave(t){super.setStave(t);const e=t.getContext();this.setContext(e);const i=this.positions.map((({str:e})=>t.getYForLine(Number(e)-1)));return this.setYs(i),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}getModifierStartXY(t,e){if(!this.preFormatted)throw new c("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(0===this.ys.length)throw new c("NoYValues","No Y-Values calculated for this note.");let i=0;if(t===nt.Position.LEFT)i=-2;else if(t===nt.Position.RIGHT)i=this.width+2;else if(t===nt.Position.BELOW||t===nt.Position.ABOVE){i=this.width/2}return{x:this.getAbsoluteX()+i,y:this.ys[e]}}getLineForRest(){return Number(this.positions[0].str)}preFormat(){this.preFormatted||(this.modifierContext&&this.modifierContext.preFormat(),this.preFormatted=!0)}getStemX(){return this.getCenterGlyphX()}getStemY(){const t=this.checkStave().getNumLines()-.5,e=Ct.UP===this.stemDirection?-.5:t;return this.checkStave().getYForLine(e)}getStemExtents(){return this.checkStem().getExtents()}drawFlag(){const{beam:t,glyphProps:e,renderOptions:{drawStem:i}}=this,s=this.checkContext(),n=void 0===t&&i;if(e.codeFlagUp&&n){const t=this.getStemX(),e=this.getStemDirection()===Ct.DOWN?this.getStemY()-this.checkStem().getHeight()-this.getStemExtension():this.getStemY()-this.checkStem().getHeight()+this.getStemExtension();this.applyStyle(s,this.flagStyle),this.flag.renderText(s,t,e),this.restoreStyle(s,this.flagStyle)}}drawModifiers(){this.modifiers.forEach((t=>{i(t,l.Dot)&&!this.renderOptions.drawDots||(t.setContext(this.getContext()),t.drawWithStyle())}))}drawStemThrough(){const t=this.getStemX(),e=this.getStemY(),i=this.checkContext(),s=this.renderOptions.drawStem,n=this.renderOptions.drawStemThroughStave;if(s&&n){const s=function(t,e){const i=[];let s=[];for(let n=1;n<=t;n++)e.indexOf(n)>-1?(i.push(s),s=[]):s.push(n);return s.length>0&&i.push(s),i}(this.checkStave().getNumLines(),this.positions.map((t=>Number(t.str)))),n=function(t,e,i,s){const n=1!==s,a=-1!==s,o=i.getSpacingBetweenLines(),r=i.getNumLines(),h=[];return e.forEach((e=>{const l=e.indexOf(r)>-1,c=e.indexOf(1)>-1;if(n&&c||a&&l)return;1===e.length&&e.push(e[0]);const d=[];e.forEach(((e,n,a)=>{const h=1===e,l=e===r;let c=i.getYForLine(e-1);0!==n||h?n!==a.length-1||l||(c+=o/2-1):c-=o/2-1,d.push(c),1===s&&h?d.push(t-2):-1===s&&l&&d.push(t+2)})),h.push(d.sort(((t,e)=>t-e)))})),h}(e,s,this.checkStave(),this.getStemDirection());i.save(),i.setLineWidth(Ct.WIDTH),n.forEach((e=>{0!==e.length&&(i.beginPath(),i.moveTo(t,e[0]),i.lineTo(t,e[e.length-1]),i.stroke(),i.closePath())})),i.restore()}}drawPositions(){const t=this.checkContext(),e=this.getAbsoluteX(),i=this.ys;for(let s=0;s<this.positions.length;++s){const n=i[s]+this.renderOptions.yShift,a=this.fretElement[s],o=e-a.getWidth()/2;t.clearRect(o-2,n-3,a.getWidth()+4,6),a.renderText(t,o,n)}}draw(){const t=this.checkContext();if(0===this.ys.length)throw new c("NoYValues","Can't draw note without Y values.");this.setRendered();const e=void 0===this.beam&&this.renderOptions.drawStem;if(this.applyStyle(),t.openGroup("tabnote",this.getAttribute("id")),this.drawPositions(),this.drawStemThrough(),this.stem&&e){const e=this.getStemX();this.stem.setNoteHeadXBounds(e,e),this.stem.setContext(t).draw()}this.drawFlag(),this.drawModifiers(),t.closeGroup(),this.restoreStyle()}}class $i extends Ke{static get CATEGORY(){return l.TabStave}constructor(t,e,i,s){super(t,e,i,Object.assign({spacingBetweenLinesPx:13,numLines:6,topTextPosition:1},s))}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef("tab"),this}}var Ji;!function(t){t[t.TOP=1]="TOP",t[t.BOTTOM=-1]="BOTTOM"}(Ji||(Ji={}));class Zi extends ${static get CATEGORY(){return l.TextBracket}static get Position(){return Ji}static get PositionString(){return{top:Ji.TOP,bottom:Ji.BOTTOM}}constructor({start:t,stop:e,text:i="",superscript:s="",position:n=Ji.TOP}){super(),this.start=t,this.stop=e,this.textElement=new $("TextBracket"),this.textElement.setText(i),this.superscriptElement=new $("TextBracket"),this.superscriptElement.setText(s);const a=F.scaleSize(this.fontInfo.size,.714286);this.superscriptElement.setFontSize(a),this.position="string"==typeof n?Zi.PositionString[n]:n,this.line=1,this.renderOptions={dashed:!0,dash:[5],color:"black",lineWidth:1,showBracket:!0,bracketHeight:8,underlineSuperscript:!0}}applyStyle(t){this.textElement.setFont(this.fontInfo);const{family:e,size:i,weight:s,style:n}=this.fontInfo,a=F.scaleSize(i,.714286);this.superscriptElement.setFont(e,a,s,n);const o=this.renderOptions;return t.setStrokeStyle(o.color),t.setFillStyle(o.color),t.setLineWidth(o.lineWidth),this}setDashed(t,e){return this.renderOptions.dashed=t,e&&(this.renderOptions.dash=e),this}setLine(t){return this.line=t,this}draw(){const t=this.checkContext();this.setRendered();let e=0;switch(this.position){case Ji.TOP:e=this.start.checkStave().getYForTopText(this.line);break;case Ji.BOTTOM:e=this.start.checkStave().getYForBottomText(this.line+mt.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new c("InvalidPosition",`The position ${this.position} is invalid.`)}const i={x:this.start.getAbsoluteX(),y:e},s={x:this.stop.getAbsoluteX(),y:e};!function(...t){Zi.DEBUG&&g("VexFlow.TextBracket",t)}("Rendering TextBracket: start:",i,"stop:",s,"y:",e);const n=this.renderOptions.bracketHeight*this.position;t.save(),this.applyStyle(t),this.textElement.renderText(t,i.x,i.y);const a=this.textElement.getWidth(),o=this.textElement.getHeight(),r=i.y-o/2.5;this.superscriptElement.renderText(t,i.x+a+1,r);const h=this.superscriptElement.getWidth(),l=this.superscriptElement.getHeight();let d=i.x,u=r;const p=s.x+this.stop.getGlyphWidth();this.position===Ji.TOP?(d+=a+h+5,u-=l/2.7):this.position===Ji.BOTTOM&&(u+=l/2.7,d+=a+2,this.renderOptions.underlineSuperscript||(d+=h)),this.renderOptions.dashed?(Ee.drawDashedLine(t,d,u,p,u,this.renderOptions.dash),this.renderOptions.showBracket&&Ee.drawDashedLine(t,p,u+1*this.position,p,u+n,this.renderOptions.dash)):(t.beginPath(),t.moveTo(d,u),t.lineTo(p,u),this.renderOptions.showBracket&&t.lineTo(p,u+n),t.stroke(),t.closePath()),t.restore()}}function ts(...t){es.DEBUG&&g("VexFlow.TextDynamics",t)}Zi.DEBUG=!1;class es extends zt{static get CATEGORY(){return l.TextDynamics}static get GLYPHS(){return{f:et.dynamicForte,p:et.dynamicPiano,m:et.dynamicMezzo,s:et.dynamicSforzando,z:et.dynamicZ,r:et.dynamicRinforzando}}constructor(t){var e,i;super(t),this.sequence=(null!==(e=t.text)&&void 0!==e?e:"").toLowerCase(),this.line=null!==(i=t.line)&&void 0!==i?i:0,this.text="",ts("New Dynamics Text: ",this.sequence)}setLine(t){return this.line=t,this}preFormat(){return this.text="",this.sequence.split("").forEach((t=>{const e=es.GLYPHS[t];if(!e)throw new c("Invalid dynamics character: "+t);this.text+=e})),this.preFormatted=!0,this}draw(){this.setRendered();const t=this.getAbsoluteX(),e=this.checkStave().getYForLine(this.line+-3);ts("Rendering Dynamics: ",this.sequence),this.renderText(this.checkContext(),t,e)}}es.DEBUG=!1;class is extends zt{static get CATEGORY(){return l.TimeSigNote}constructor(t,e){super({duration:"b"}),this.timeSig=new ze(t,e),this.setWidth(this.timeSig.getWidth()),this.ignoreTicks=!0}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkStave(),e=this.checkContext();this.setRendered(),this.timeSig.drawAt(e,t,this.getAbsoluteX())}}class ss extends ${static get CATEGORY(){return l.VibratoBracket}constructor(t){super(),this.vibrato=new Fe,t.start&&(this.start=t.start),t.stop&&(this.stop=t.stop),this.line=1}setLine(t){return this.line=t,this}setVibratoCode(t){return this.vibrato.setVibratoCode(t),this}draw(){const t=this.checkContext();this.setRendered();const e=this.start&&this.start.checkStave().getYForTopText(this.line)||this.stop&&this.stop.checkStave().getYForTopText(this.line)||0,i=this.start&&this.start.getAbsoluteX()||this.stop&&this.stop.checkStave().getTieStartX()||0,s=this.stop&&this.stop.getAbsoluteX()-this.stop.getWidth()-5||this.start&&this.start.checkStave().getTieEndX()-10||0;this.vibrato.setVibratoWidth(s-i),function(...t){ss.DEBUG&&g("VexFlow.VibratoBracket",t)}("Rendering VibratoBracket: startX:",i,"stopX:",s,"y:",e),this.vibrato.renderText(t,i,e)}}function ns(...t){as.DEBUG&&g("VexFlow.Factory",t)}ss.DEBUG=!1;class as{static newFromElementId(t,e=500,i=200){return new as({renderer:{elementId:t,width:e,height:i}})}constructor(t={}){ns("New factory: ",t),this.options={stave:{space:10},renderer:{elementId:"",width:500,height:200,background:"#FFF"}},this.setOptions(t)}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=void 0}setOptions(t){this.options=Object.assign(Object.assign({},this.options),t),this.initRenderer(),this.reset()}initRenderer(){const{elementId:t,width:e,height:i,background:s}=this.options.renderer;if(null===t)return;if(""===t)throw ns(this),new c("renderer.elementId not set in FactoryOptions");let n=this.options.renderer.backend;if(void 0===n){n=Te(document.getElementById(t))?Ee.Backends.CANVAS:Ee.Backends.SVG}this.context=Ee.buildContext(t,n,e,i,s)}getContext(){return this.context}setContext(t){return this.context=t,this}getStave(){return this.stave}getVoices(){return this.voices}Stave(t){const e=this.options.stave.space,i=Object.assign({x:0,y:0,width:this.options.renderer.width-1*e,options:{spacingBetweenLinesPx:1*e}},t),s=new Ke(i.x,i.y,i.width,i.options);return this.staves.push(s),s.setContext(this.context),this.stave=s,s}TabStave(t){const e=this.options.stave.space,i=Object.assign({x:0,y:0,width:this.options.renderer.width-1*e,options:{spacingBetweenLinesPx:1.3*e}},t),s=new $i(i.x,i.y,i.width,i.options);return this.staves.push(s),s.setContext(this.context),this.stave=s,s}StaveNote(t){const e=new le(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}GlyphNote(t,e,i){const s=new Ai(t,e,i);return this.stave&&s.setStave(this.stave),s.setContext(this.context),this.renderQ.push(s),s}RepeatNote(t,e,i){const s=new zi(t,e,i);return this.stave&&s.setStave(this.stave),s.setContext(this.context),this.renderQ.push(s),s}GhostNote(t){const e=new Oi(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TextNote(t){const e=new Xe(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}BarNote(t={}){const e=new Kt(t.type);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}ClefNote(t){const e=Object.assign({type:"treble",options:{size:"default",annotation:void 0}},t),i=new fi(e.type,e.options.size,e.options.annotation);return this.stave&&i.setStave(this.stave),i.setContext(this.context),this.renderQ.push(i),i}TimeSigNote(t){const e=Object.assign({time:"4/4"},t),i=new is(e.time);return this.stave&&i.setStave(this.stave),i.setContext(this.context),this.renderQ.push(i),i}KeySigNote(t){const e=new Ri(t.key,t.cancelKey,t.alterKey);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TabNote(t){const e=new Qi(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}GraceNote(t){const e=new Pi(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),e}GraceNoteGroup(t){const e=new pe(t.notes,t.slur);return e.setContext(this.context),e}Accidental(t){const e=new yt(t.type);return e.setContext(this.context),e}Annotation(t){const e=Object.assign({text:"p",hJustify:Tt.CENTER,vJustify:wt.BOTTOM},t),i=new vt(e.text);return i.setJustification(e.hJustify),i.setVerticalJustification(e.vJustify),i.setFont(e.font),i.setContext(this.context),i}ChordSymbol(t){const e=Object.assign({vJustify:"top",hJustify:"center"},t),i=new Zt;return i.setHorizontal(e.hJustify),i.setVertical(e.vJustify),"string"==typeof e.fontFamily&&"number"==typeof e.fontSize?"string"==typeof e.fontWeight?i.setFont(e.fontFamily,e.fontSize,e.fontWeight):i.setFont(e.fontFamily,e.fontSize,""):"number"==typeof e.fontSize&&i.setFontSize(e.fontSize),i.setContext(this.context),i}Articulation(t){var e;const i=new Pt(null!==(e=null==t?void 0:t.type)&&void 0!==e?e:"a.");return void 0!==(null==t?void 0:t.position)&&i.setPosition(t.position),void 0!==(null==t?void 0:t.betweenLines)&&i.setBetweenLines(t.betweenLines),i.setContext(this.context),i}Ornament(t,e){const i=Object.assign({type:t,accidental:""},e),s=new fe(t);return void 0!==(null==e?void 0:e.position)&&s.setPosition(e.position),i.upperAccidental&&s.setUpperAccidental(i.upperAccidental),i.lowerAccidental&&s.setLowerAccidental(i.lowerAccidental),void 0!==i.delayed&&s.setDelayed(i.delayed),s.setContext(this.context),s}TextDynamics(t){const e=Object.assign({text:"p",duration:"q",dots:0,line:0},t),i=new es({text:e.text,line:e.line,duration:e.duration,dots:e.dots});return this.stave&&i.setStave(this.stave),i.setContext(this.context),this.renderQ.push(i),i}Fingering(t){const e=Object.assign({number:"0",position:"left"},t),i=new ee(e.number);return i.setPosition(e.position),i.setContext(this.context),i}StringNumber(t,e=!0){const i=new Le(t.number);return i.setPosition(t.position),i.setContext(this.context),i.setDrawCircle(e),i}TickContext(){return new Je}ModifierContext(){return new Ae}MultiMeasureRest(t){const e=u(t.numberOfMeasures,"NoNumberOfMeasures"),i=new Vi(e,t);return i.setContext(this.context),this.renderQ.push(i),i}Voice(t){const e=Object.assign({time:"4/4"},t),i=new ge(e.time);return this.voices.push(i),i}StaveConnector(t){const e=new $e(t.topStave,t.bottomStave);return e.setType(t.type).setContext(this.context),this.renderQ.push(e),e}Formatter(t){return new ti(t)}Tuplet(t){const e=Object.assign({notes:[],options:{}},t),i=new ii(e.notes,e.options).setContext(this.context);return this.renderQ.push(i),i}Beam(t){var e,i,s,n,a;const o=new mi(t.notes,null===(e=t.options)||void 0===e?void 0:e.autoStem).setContext(this.context);return o.breakSecondaryAt(null!==(s=null===(i=t.options)||void 0===i?void 0:i.secondaryBeamBreaks)&&void 0!==s?s:[]),(null===(n=t.options)||void 0===n?void 0:n.partialBeamDirections)&&Object.entries(null===(a=t.options)||void 0===a?void 0:a.partialBeamDirections).forEach((([t,e])=>{o.setPartialBeamSideAt(Number(t),e)})),this.renderQ.push(o),o}Curve(t){const e=new wi(t.from,t.to,t.options).setContext(this.context);return this.renderQ.push(e),e}StaveTie(t){var e;const i=new ce({firstNote:t.from,lastNote:t.to,firstIndexes:t.firstIndexes,lastIndexes:t.lastIndexes},t.text);return(null===(e=t.options)||void 0===e?void 0:e.direction)&&i.setDirection(t.options.direction),i.setContext(this.context),this.renderQ.push(i),i}StaveLine(t){var e,i;const s=new qi({firstNote:t.from,lastNote:t.to,firstIndexes:t.firstIndexes,lastIndexes:t.lastIndexes});return(null===(e=t.options)||void 0===e?void 0:e.text)&&s.setText(t.options.text),(null===(i=t.options)||void 0===i?void 0:i.font)&&s.setFont(t.options.font),s.setContext(this.context),this.renderQ.push(s),s}VibratoBracket(t){const e=new ss({start:t.from,stop:t.to});return t.options.line&&e.setLine(t.options.line),t.options.code&&e.setVibratoCode(t.options.code),e.setContext(this.context),this.renderQ.push(e),e}TextBracket(t){const e=new Zi({start:t.from,stop:t.to,text:t.text,superscript:t.options.superscript,position:t.options.position});return t.options.line&&e.setLine(t.options.line),t.options.font&&e.setFont(t.options.font),e.setContext(this.context),this.renderQ.push(e),e}System(t={}){t.factory=this;const e=new Ki(t).setContext(this.context);return this.systems.push(e),e}EasyScore(t={}){return t.factory=this,new Ni(t)}PedalMarking(t){const e=Object.assign({notes:[],options:{style:"mixed"}},t),i=new Yi(e.notes);return i.setType(Yi.typeString[e.options.style]),i.setContext(this.context),this.renderQ.push(i),i}NoteSubGroup(t){const e=Object.assign({notes:[]},t),i=new me(e.notes);return i.setContext(this.context),i}draw(){const t=this.context;this.systems.forEach((e=>e.setContext(t).format())),this.staves.forEach((e=>e.setContext(t).draw())),this.voices.forEach((e=>e.setContext(t).draw())),this.renderQ.forEach((e=>{e.isRendered()||e.setContext(t).draw()})),this.systems.forEach((e=>e.setContext(t).draw())),this.reset()}}as.DEBUG=!1;class os extends ${static get CATEGORY(){return l.StaveHairpin}static FormatByTicksAndDraw(t,e,i,s,n,a){var o,r;const h=e.pixelsPerTick;if(null===h)throw new c("BadArguments","A valid Formatter must be provide to draw offsets by ticks.");const l=h*(null!==(o=a.leftShiftTicks)&&void 0!==o?o:0),d=h*(null!==(r=a.rightShiftTicks)&&void 0!==r?r:0),u={height:a.height,yShift:a.yShift,leftShiftPx:l,rightShiftPx:d,rightShiftTicks:0,leftShiftTicks:0};new os({firstNote:i.firstNote,lastNote:i.lastNote},s).setContext(t).setRenderOptions(u).setPosition(n).draw()}constructor(t,e){super(),this.setNotes(t),this.hairpin=e,this.position=nt.Position.BELOW,this.renderOptions={height:10,yShift:0,leftShiftPx:0,rightShiftPx:0,rightShiftTicks:0,leftShiftTicks:0}}setPosition(t){return t!==nt.Position.ABOVE&&t!==nt.Position.BELOW||(this.position=t),this}setRenderOptions(t){return this.renderOptions=t,this}setNotes(t){if(!t.firstNote&&!t.lastNote)throw new c("BadArguments","Hairpin needs to have either firstNote or lastNote set.");return this.notes=t,this.firstNote=t.firstNote,this.lastNote=t.lastNote,this}renderHairpin(t){const e=this.checkContext();let i=this.renderOptions.yShift+20,s=t.firstY;this.position===nt.Position.ABOVE&&(i=30-i,s=t.firstY-t.staffHeight);const n=this.renderOptions.leftShiftPx,a=this.renderOptions.rightShiftPx;switch(e.beginPath(),this.hairpin){case os.type.CRESC:e.moveTo(t.lastX+a,s+i),e.lineTo(t.firstX+n,s+this.renderOptions.height/2+i),e.lineTo(t.lastX+a,s+this.renderOptions.height+i);break;case os.type.DECRESC:e.moveTo(t.firstX+n,s+i),e.lineTo(t.lastX+a,s+this.renderOptions.height/2+i),e.lineTo(t.firstX+n,s+this.renderOptions.height+i)}e.stroke(),e.closePath()}draw(){this.checkContext(),this.setRendered();const t=this.firstNote,e=this.lastNote;if(!t||!e)throw new c("NoNote","Notes required to draw");const i=t.getModifierStartXY(this.position,0),s=e.getModifierStartXY(this.position,0);this.renderHairpin({firstX:i.x,lastX:s.x,firstY:t.checkStave().getY()+t.checkStave().getHeight(),lastY:e.checkStave().getY()+e.checkStave().getHeight(),staffHeight:t.checkStave().getHeight()})}}os.type={CRESC:1,DECRESC:2};class rs extends de{static get CATEGORY(){return l.TabSlide}static get SLIDE_UP(){return 1}static get SLIDE_DOWN(){return-1}static createSlideUp(t){return new rs(t,rs.SLIDE_UP)}static createSlideDown(t){return new rs(t,rs.SLIDE_DOWN)}constructor(t,e){if(super(t,"sl."),!e){let i=t.firstNote.getPositions()[0].fret;"string"==typeof i&&(i=parseInt(i,10));let s=t.lastNote.getPositions()[0].fret;"string"==typeof s&&(s=parseInt(s,10)),e=isNaN(i)||isNaN(s)?rs.SLIDE_UP:i>s?rs.SLIDE_DOWN:rs.SLIDE_UP}this.direction=e,this.renderOptions.cp1=11,this.renderOptions.cp2=14,this.renderOptions.yShift=.5}renderTie(t){if(0===t.firstYs.length||0===t.lastYs.length)throw new c("BadArguments","No Y-values to render");const e=this.checkContext(),i=t.firstX,s=t.firstYs,n=t.lastX,a=t.direction;if(a!==rs.SLIDE_UP&&a!==rs.SLIDE_DOWN)throw new c("BadSlide","Invalid slide direction");const o=this.notes.firstIndexes;for(let t=0;t<o.length;++t){const r=s[o[t]]+this.renderOptions.yShift;if(isNaN(r))throw new c("BadArguments","Bad indexes for slide rendering.");e.beginPath(),e.moveTo(i,r+3*a),e.lineTo(n,r-3*a),e.closePath(),e.stroke()}this.setRendered()}}class hs{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(t="E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2"){this.tuningValues=[],this.setTuning(t)}noteToInteger(t){var e;return null!==(e=mt.keyProperties(t).intValue)&&void 0!==e?e:-1}setTuning(t){hs.names[t]&&(t=hs.names[t]),this.tuningValues=[];const e=t.split(/\s*,\s*/);if(0===e.length)throw new c("BadArguments",`Invalid tuning string: ${t}`);for(let t=0;t<e.length;++t)this.tuningValues[t]=this.noteToInteger(e[t])}getValueForString(t){const e=Number(t);if(e<1||e>this.tuningValues.length)throw new c("BadArguments",`String number must be between 1 and ${this.tuningValues.length}:${t}`);return this.tuningValues[e-1]}getValueForFret(t,e){const i=this.getValueForString(e),s=Number(t);if(s<0)throw new c("BadArguments",`Fret number must be 0 or higher: ${t}`);return i+s}getNoteForFret(t,e){const i=this.getValueForFret(t,e),s=Math.floor(i/12),n=i%12;return`${mt.integerToNote(n)}/${s}`}}var ls=function(t,e,i,s){return new(i||(i=Promise))((function(n,a){function o(t){try{h(s.next(t))}catch(t){a(t)}}function r(t){try{h(s.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}h((s=s.apply(t,e||[])).next())}))};class cs{static loadFonts(...t){return ls(this,void 0,void 0,(function*(){t||(t=Object.keys(F.FILES));const e=[];for(const i of t)e.push(F.load(i));yield Promise.all(e)}))}static setFonts(...t){k.fontFamily=t.join(",")}static getFonts(){return v.get("fontFamily").split(",")}static get RENDER_PRECISION_PLACES(){return mt.RENDER_PRECISION_PLACES}static set RENDER_PRECISION_PLACES(t){mt.RENDER_PRECISION_PLACES=t}static get SOFTMAX_FACTOR(){return mt.SOFTMAX_FACTOR}static set SOFTMAX_FACTOR(t){mt.SOFTMAX_FACTOR=t}static get UNISON(){return mt.UNISON}static set UNISON(t){mt.UNISON=t}static get NOTATION_FONT_SCALE(){return mt.NOTATION_FONT_SCALE}static set NOTATION_FONT_SCALE(t){mt.NOTATION_FONT_SCALE=t}static get TABLATURE_FONT_SCALE(){return mt.TABLATURE_FONT_SCALE}static set TABLATURE_FONT_SCALE(t){mt.TABLATURE_FONT_SCALE=t}static get RESOLUTION(){return mt.RESOLUTION}static set RESOLUTION(t){mt.RESOLUTION=t}static get SLASH_NOTEHEAD_WIDTH(){return mt.SLASH_NOTEHEAD_WIDTH}static set SLASH_NOTEHEAD_WIDTH(t){mt.SLASH_NOTEHEAD_WIDTH=t}static get STAVE_LINE_DISTANCE(){return mt.STAVE_LINE_DISTANCE}static set STAVE_LINE_DISTANCE(t){mt.STAVE_LINE_DISTANCE=t}static get STAVE_LINE_THICKNESS(){return mt.STAVE_LINE_THICKNESS}static set STAVE_LINE_THICKNESS(t){mt.STAVE_LINE_THICKNESS=t}static get STEM_HEIGHT(){return mt.STEM_HEIGHT}static set STEM_HEIGHT(t){mt.STEM_HEIGHT=t}static get STEM_WIDTH(){return mt.STEM_WIDTH}static set STEM_WIDTH(t){mt.STEM_WIDTH=t}static get TIME4_4(){return mt.TIME4_4}static get unicode(){return mt.unicode}static keySignature(t){return mt.keySignature(t)}static hasKeySignature(t){return mt.hasKeySignature(t)}static getKeySignatures(){return mt.getKeySignatures()}static clefProperties(t){return mt.clefProperties(t)}static keyProperties(t,e,i){return mt.keyProperties(t,e,i)}static durationToTicks(t){return mt.durationToTicks(t)}}cs.BUILD={VERSION:"5.0.0-alpha.3",ID:"34a251a7bd087f8a341d61837db71c38def9f70d",DATE:"2024-03-10T22:53:53.018Z",INFO:""},cs.Accidental=yt,cs.Annotation=vt,cs.Articulation=Pt,cs.Barline=qt,cs.BarNote=Kt,cs.Beam=mi,cs.Bend=Qt,cs.BoundingBox=D,cs.CanvasContext=we,cs.ChordSymbol=Zt,cs.Clef=Pe,cs.ClefNote=fi,cs.Crescendo=Si,cs.Curve=wi,cs.Dot=te,cs.EasyScore=Ni,cs.Element=$,cs.Factory=as,cs.Font=F,cs.Formatter=ti,cs.Fraction=y,cs.FretHandFinger=ee,cs.GhostNote=Oi,cs.GlyphNote=Ai,cs.GraceNote=Pi,cs.GraceNoteGroup=pe,cs.GraceTabNote=class extends Qi{static get CATEGORY(){return l.GraceTabNote}constructor(t){super(t,!1),this.renderOptions=Object.assign(Object.assign({},this.renderOptions),{yShift:.3}),this.updateWidth()}},cs.KeyManager=class{constructor(t){this.music=new at,this.setKey(t)}setKey(t){return this.key=t,this.reset(),this}getKey(){return this.key}reset(){this.keyParts=this.music.getKeyParts(this.key),this.keyString=this.keyParts.root,this.keyParts.accidental&&(this.keyString+=this.keyParts.accidental);if(!at.scaleTypes[this.keyParts.type])throw new c("BadArguments",`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),at.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};const t=at.rootIndexes[this.keyParts.root];for(let e=0;e<at.roots.length;++e){const i=(t+e)%at.roots.length,s=at.roots[i],n=this.music.getRelativeNoteName(s,this.scale[e]);this.scaleMap[s]=n,this.scaleMapByValue[this.scale[e]]=n,this.originalScaleMapByValue[this.scale[e]]=n}return this}getAccidental(t){const e=this.music.getKeyParts(t).root,i=this.music.getNoteParts(this.scaleMap[e]);return{note:this.scaleMap[e],accidental:i.accidental}}selectNote(t){t=t.toLowerCase();const e=this.music.getNoteParts(t),i=this.scaleMap[e.root],s=this.music.getNoteParts(i);if(i===t)return{note:i,accidental:e.accidental,change:!1};const n=this.scaleMapByValue[this.music.getNoteValue(t)];if(void 0!==n)return{note:n,accidental:this.music.getNoteParts(n).accidental,change:!1};const a=this.originalScaleMapByValue[this.music.getNoteValue(t)];return void 0!==a?(this.scaleMap[s.root]=a,delete this.scaleMapByValue[this.music.getNoteValue(i)],this.scaleMapByValue[this.music.getNoteValue(t)]=a,{note:a,accidental:this.music.getNoteParts(a).accidental,change:!0}):s.root===t?(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[e.root])],this.scaleMapByValue[this.music.getNoteValue(s.root)]=s.root,this.scaleMap[s.root]=s.root,{note:s.root,accidental:void 0,change:!0}):(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[e.root])],this.scaleMapByValue[this.music.getNoteValue(t)]=t,delete this.scaleMap[s.root],this.scaleMap[s.root]=t,{note:t,accidental:e.accidental,change:!0})}},cs.KeySignature=Re,cs.KeySigNote=Ri,cs.Modifier=nt,cs.ModifierContext=Ae,cs.MultiMeasureRest=Vi,cs.Music=at,cs.Note=zt,cs.NoteHead=ie,cs.NoteSubGroup=me,cs.Ornament=fe,cs.Parenthesis=Se,cs.Parser=yi,cs.PedalMarking=Yi,cs.Registry=I,cs.RenderContext=Rt,cs.Renderer=Ee,cs.RepeatNote=zi,cs.Repetition=Me,cs.Stave=Ke,cs.StaveConnector=$e,cs.StaveHairpin=os,cs.StaveLine=qi,cs.StaveModifier=jt,cs.StaveNote=le,cs.StaveTempo=Ve,cs.StaveText=Ye,cs.StaveTie=ce,cs.Stem=Ct,cs.StringNumber=Le,cs.Stroke=Ne,cs.SVGContext=ke,cs.System=Ki,cs.TabNote=Qi,cs.TabSlide=rs,cs.TabStave=$i,cs.TabTie=de,cs.TextBracket=Zi,cs.TextDynamics=es,cs.TextNote=Xe,cs.TickContext=Je,cs.TimeSignature=ze,cs.TimeSigNote=is,cs.Tremolo=class extends nt{static get CATEGORY(){return l.Tremolo}constructor(t){super(),this.num=t,this.position=nt.Position.CENTER,this.text=et.tremolo1}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getStemDirection(),s=e.getFontScale(),n=v.get("Tremolo.spacing")*i*s,a=e.getAbsoluteX()+(i===Ct.UP?e.getGlyphWidth()-Ct.WIDTH/2:Ct.WIDTH/2);let o=e.getStemExtents().topY+(this.num<=3?n:0);this.fontInfo.size=v.get("Tremolo.fontSize")*s;for(let e=0;e<this.num;++e)this.renderText(t,a,o),o+=n}},cs.Tuning=hs,cs.Tuplet=ii,cs.Vibrato=Fe,cs.VibratoBracket=ss,cs.Voice=ge,cs.Volta=_e,cs.RuntimeError=c,cs.Test=void 0,cs.AnnotationHorizontalJustify=Tt,cs.AnnotationVerticalJustify=wt,cs.ChordSymbolHorizontalJustify=Gt,cs.ChordSymbolVerticalJustify=Ut,cs.SymbolModifiers=Vt,cs.CurvePosition=Ti,cs.FontWeight=B,cs.FontStyle=E,cs.Glyphs=et,cs.ModifierPosition=tt,cs.RendererBackends=De,cs.RendererLineEndType=Be,cs.BarlineType=Ht,cs.StaveModifierPosition=Wt,cs.VoltaType=Ge,cs.TextBracketPosition=Ji,cs.TextJustification=He,cs.VoiceMode=ue,cs.BUILD.INFO="vexflow-core";const ds=cs;return e=e.default})()));
5
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VexFlow=e():t.VexFlow=e()}("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:this,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var e={};function i(t,e,i=!0){if("object"!=typeof t||null===t)return!1;let s=t.constructor;if(i){for(;null!==t;){if(s=t.constructor,"CATEGORY"in s&&s.CATEGORY===e)return!0;t=Object.getPrototypeOf(t)}return!1}return"CATEGORY"in s&&s.CATEGORY===e}t.d(e,{default:()=>li});const s=t=>i(t,l.Barline),n=t=>i(t,l.GraceNote),a=t=>i(t,l.Note),o=t=>i(t,l.StaveNote),r=t=>i(t,l.StemmableNote),h=t=>i(t,l.TabNote);var l;!function(t){t.Accidental="Accidental",t.Annotation="Annotation",t.Articulation="Articulation",t.Barline="Barline",t.BarNote="BarNote",t.Beam="Beam",t.Bend="Bend",t.ChordSymbol="ChordSymbol",t.Clef="Clef",t.ClefNote="ClefNote",t.Crescendo="Crescendo",t.Curve="Curve",t.Dot="Dot",t.Element="Element",t.Flag="Flag",t.Fraction="Fraction",t.FretHandFinger="FretHandFinger",t.GhostNote="GhostNote",t.Glyph="Glyph",t.GlyphNote="GlyphNote",t.GraceNote="GraceNote",t.GraceNoteGroup="GraceNoteGroup",t.GraceTabNote="GraceTabNote",t.KeySignature="KeySignature",t.KeySigNote="KeySigNote",t.Modifier="Modifier",t.MultiMeasureRest="MultiMeasureRest",t.Note="Note",t.NoteHead="NoteHead",t.NoteSubGroup="NoteSubGroup",t.Ornament="Ornament",t.Parenthesis="Parenthesis",t.PedalMarking="PedalMarking",t.RenderContext="RenderContext",t.RepeatNote="RepeatNote",t.Repetition="Repetition",t.Stave="Stave",t.StaveConnector="StaveConnector",t.StaveHairpin="StaveHairpin",t.StaveLine="StaveLine",t.StaveModifier="StaveModifier",t.StaveNote="StaveNote",t.StaveSection="StaveSection",t.StaveTempo="StaveTempo",t.StaveText="StaveText",t.StaveTie="StaveTie",t.Stem="Stem",t.StemmableNote="StemmableNote",t.StringNumber="StringNumber",t.Stroke="Stroke",t.System="System",t.TabNote="TabNote",t.TabSlide="TabSlide",t.TabStave="TabStave",t.TabTie="TabTie",t.TextBracket="TextBracket",t.TextDynamics="TextDynamics",t.TextNote="TextNote",t.Tickable="Tickable",t.TimeSignature="TimeSignature",t.TimeSigNote="TimeSigNote",t.Tremolo="Tremolo",t.Tuplet="Tuplet",t.Vibrato="Vibrato",t.VibratoBracket="VibratoBracket",t.Voice="Voice",t.Volta="Volta"}(l||(l={}));class c extends Error{constructor(t,e=""){super("[RuntimeError] "+t+": "+e),this.code=t}}function d(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t.g?t.g:Function("return this")()}function u(t,e="undefined",i=""){if(void 0===t)throw new c(e,i);return t}function g(t,...e){if(!e)return;const i=Array.prototype.slice.call(e).join(" ");d().console.log(t+": "+i)}function p(t,e){let i=e+(t-e)/2;var s,n;return i%2>0&&(i=((s=10*i)%(n=5)>=n/2?parseInt(""+s/n,10)*n+n:parseInt(""+s/n,10)*n)/10),i}function m(t){return`vf-${t}`}function f(t){return(t%=2*Math.PI)<0&&(t+=2*Math.PI),t}function S(t){return t.reduce(((t,e)=>t+e),0)}class T{static get CATEGORY(){return l.Fraction}static GCD(t,e){if("number"!=typeof t||Number.isNaN(t)||"number"!=typeof e||Number.isNaN(e))throw new c("BadArgument",`Invalid numbers: ${t}, ${e}`);let i;for(;0!==e;)i=e,e=t%e,t=i;return t}static LCM(t,e){return t*e/T.GCD(t,e)}static LCMM(t){return 0===t.length?0:1===t.length?t[0]:2===t.length?T.LCM(t[0],t[1]):T.LCM(t.shift(),T.LCMM(t))}constructor(t,e){this.numerator=1,this.denominator=1,this.set(t,e)}set(t=1,e=1){return this.numerator=t,this.denominator=e,this}value(){return this.numerator/this.denominator}simplify(){let t=this.numerator,e=this.denominator;const i=T.GCD(t,e);return t/=i,e/=i,e<0&&(e=-e,t=-t),this.set(t,e)}add(t=0,e=1){const[i,s]=x(t,e),n=T.LCM(this.denominator,s),a=n/this.denominator,o=n/s,r=this.numerator*a+i*o;return this.set(r,n)}subtract(t=0,e=1){const[i,s]=x(t,e),n=T.LCM(this.denominator,s),a=n/this.denominator,o=n/s,r=this.numerator*a-i*o;return this.set(r,n)}multiply(t=1,e=1){const[i,s]=x(t,e);return this.set(this.numerator*i,this.denominator*s)}divide(t=1,e=1){const[i,s]=x(t,e);return this.set(this.numerator*s,this.denominator*i)}equals(t){const e=T.fractionA.copy(t).simplify(),i=T.fractionB.copy(this).simplify();return e.numerator===i.numerator&&e.denominator===i.denominator}greaterThan(t){const e=T.fractionA.copy(this);return e.subtract(t),e.numerator>0}greaterThanEquals(t){const e=T.fractionA.copy(this);return e.subtract(t),e.numerator>=0}lessThan(t){return!this.greaterThanEquals(t)}lessThanEquals(t){return!this.greaterThan(t)}clone(){return new T(this.numerator,this.denominator)}copy(t){return"number"==typeof t?this.set(t):this.set(t.numerator,t.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 T.fractionA.copy(this).simplify().toString()}toMixedString(){let t="";const e=this.quotient(),i=T.fractionA.copy(this);return e<0&&i.makeAbs(),0!==e?(t+=e,0!==i.numerator&&(t+=` ${i.toSimplifiedString()}`)):t=0===i.numerator?"0":i.toSimplifiedString(),t}parse(t){const e=t.split("/"),i=parseInt(e[0],10),s=e[1]?parseInt(e[1],10):1;return this.set(i,s)}}function x(t,e=1){return"number"==typeof t?[t,e]:[t.numerator,t.denominator]}T.fractionA=new T,T.fractionB=new T;class w{static clear(t){t?(this.cacheFont.delete(t),this.cacheStyle.delete(t)):(this.cacheFont.clear(),this.cacheStyle.clear())}static getFontInfo(t){let e=this.cacheFont.get(t);return e||(e={family:w.get(`${t}.fontFamily`),size:w.get(`${t}.fontSize`)*w.get(`${t}.fontScale`),weight:w.get(`${t}.fontWeight`),style:w.get(`${t}.fontStyle`)},this.cacheFont.set(t,e)),structuredClone(e)}static getStyle(t){let e=this.cacheStyle.get(t);return e||(e={fillStyle:w.get(`${t}.fillStyle`),strokeStyle:w.get(`${t}.strokeStyle`),lineWidth:w.get(`${t}.lineWidth`),lineDash:w.get(`${t}.lineDash`),shadowBlur:w.get(`${t}.shadowBlur`),shadowColor:w.get(`${t}.shadowColor`)},this.cacheStyle.set(t,e)),structuredClone(e)}static get(t,e){var i;const s=t.split("."),n=s.pop();let a=b,o=e;for(;a;){o=null!==(i=a[n])&&void 0!==i?i:o;const t=s.shift();if(!t)break;a=a[t]}return o}}w.cacheStyle=new Map,w.cacheFont=new Map;const b={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},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:{yOffset:0,textYOffset:2},Volta:{fontSize:9,fontWeight:"bold"}};class y{static copy(t){return new y(t.x,t.y,t.w,t.h)}constructor(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s}getX(){return this.x}getY(){return this.y}getW(){return this.w}getH(){return this.h}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setW(t){return this.w=t,this}setH(t){return this.h=t,this}move(t,e){return this.x+=t,this.y+=e,this}clone(){return y.copy(this)}mergeWith(t){const e=t,i=this.x<e.x?this.x:e.x,s=this.y<e.y?this.y:e.y,n=Math.max(this.x+this.w,e.x+e.w)-i,a=Math.max(this.y+this.h,e.y+e.h)-s;return this.x=i,this.y=s,this.w=n,this.h=a,this}}var C,k,D=function(t,e,i,s){return new(i||(i=Promise))((function(n,a){function o(t){try{h(s.next(t))}catch(t){a(t)}}function r(t){try{h(s.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}h((s=s.apply(t,e||[])).next())}))};let v;!function(t){t.NORMAL="normal",t.BOLD="bold"}(C||(C={})),function(t){t.NORMAL="normal",t.ITALIC="italic"}(k||(k={}));class B{static convertSizeToPixelValue(t){var e;if("number"==typeof t)return t*B.scaleToPxFrom.pt;{const i=parseFloat(t);if(isNaN(i))return 0;const s=t.replace(/[\d.\s]/g,"").toLowerCase();return i*(null!==(e=B.scaleToPxFrom[s])&&void 0!==e?e:1)}}static convertSizeToPointValue(t){var e;if("number"==typeof t)return t;{const i=parseFloat(t);if(isNaN(i))return 0;const s=t.replace(/[\d.\s]/g,"").toLowerCase();return i*((null!==(e=B.scaleToPxFrom[s])&&void 0!==e?e:1)/B.scaleToPxFrom.pt)}}static validate(t,e,i,s){if("string"==typeof t&&void 0===e&&void 0===i&&void 0===s)return B.fromCSSString(t);let n;return"object"==typeof t?(n=t.family,e=t.size,i=t.weight,s=t.style):n=t,n=null!=n?n:w.get("fontFamily"),e=null!=e?e:w.get("fontSize")+"pt",i=null!=i?i:C.NORMAL,s=null!=s?s:k.NORMAL,""===i&&(i=C.NORMAL),""===s&&(s=k.NORMAL),"number"==typeof e&&(e=`${e}pt`),"number"==typeof i&&(i=i.toString()),{family:n,size:e,weight:i,style:s}}static fromCSSString(t){v||(v=document.createElement("span")),v.style.font=t;const{fontFamily:e,fontSize:i,fontWeight:s,fontStyle:n}=v.style;return{family:e,size:i,weight:s,style:n}}static toCSSString(t){var e;if(!t)return"";let i;const s=t.style;let n;i=s===k.NORMAL||""===s||void 0===s?"":s.trim()+" ";const a=t.weight;let o;n=a===C.NORMAL||""===a||void 0===a?"":"number"==typeof a?a+" ":a.trim()+" ";const r=t.size;o=void 0===r?w.get("fontSize")+"pt":"number"==typeof r?r+"pt ":r.trim()+" ";return`${i}${n}${o}${null!==(e=t.family)&&void 0!==e?e:w.get("fontFamily")}`}static scaleSize(t,e){if("number"==typeof t)return t*e;return`${parseFloat(t)*e}${t.replace(/[\d.\s]/g,"")}`}static isBold(t){if(t){if("number"==typeof t)return t>=600;{const e=parseInt(t,10);return isNaN(e)?"bold"===t.toLowerCase():e>=600}}return!1}static isItalic(t){return!!t&&t.toLowerCase()===k.ITALIC}static load(t,e,i){return D(this,void 0,void 0,(function*(){if("undefined"==typeof FontFace)return Promise.reject(new Error("FontFace API is not available in this environment. Cannot load fonts."));if(void 0===e){const i=B.FILES;if(!(t in i))return Promise.reject(new Error(`Font ${t} not found in Font.FILES`));e=B.HOST_URL+i[t]}const s=new FontFace(t,`url(${e})`,i),n=s.load();let a;return"undefined"!=typeof document?a=document.fonts:"undefined"!=typeof self&&"fonts"in self&&(a=self.fonts),null==a||a.add(s),n}))}static getURLForFont(t){const e=B.FILES;if(t in e)return B.HOST_URL+e[t]}}B.scaleToPxFrom={pt:4/3,px:1,em:16,"%":.16,in:96,mm:96/25.4,cm:96/2.54},B.HOST_URL="https://cdn.jsdelivr.net/npm/@vexflow-fonts/",B.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"};class L{constructor(){this.id={},this.type={},this.class={}}}class E{static getDefaultRegistry(){return E.defaultRegistry}static enableDefaultRegistry(t){E.defaultRegistry=t}static disableDefaultRegistry(){E.defaultRegistry=void 0}constructor(){this.index=new L}clear(){return this.index=new L,this}setIndexValue(t,e,i,s){const n=this.index;n[t][e]||(n[t][e]={}),n[t][e][i]=s}updateIndex({id:t,name:e,value:i,oldValue:s}){const n=this.getElementById(t);void 0!==s&&this.index[e][s]&&delete this.index[e][s][t],i&&n&&this.setIndexValue(e,i,n.getAttribute("id"),n)}register(t,e){if(!(e=e||t.getAttribute("id")))throw new c("Can't add element without `id` attribute to registry");return t.setAttribute("id",e),this.setIndexValue("id",e,e,t),this.updateIndex({id:e,name:"type",value:t.getAttribute("type"),oldValue:void 0}),t.onRegister(this),this}getElementById(t){var e,i;return null===(i=null===(e=this.index.id)||void 0===e?void 0:e[t])||void 0===i?void 0:i[t]}getElementsByAttribute(t,e){const i=this.index[t];if(i){const t=i[e];if(t){return Object.keys(t).map((e=>t[e]))}}return[]}getElementsByType(t){return this.getElementsByAttribute("type",t)}getElementsByClass(t){return this.getElementsByAttribute("class",t)}onUpdate(t){return["id","type","class"].includes(t.name)&&this.updateIndex(t),this}}class N{static get CATEGORY(){return l.Element}static newID(){return"auto"+N.ID++}static setTextMeasurementCanvas(t){N.txtCanvas=t}static getTextMeasurementCanvas(){let t=N.txtCanvas;return t||("undefined"!=typeof document?t=document.createElement("canvas"):"undefined"!=typeof OffscreenCanvas&&(t=new OffscreenCanvas(300,150)),N.txtCanvas=t),t}constructor(t){var e;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:N.newID(),type:null!=t?t:this.constructor.CATEGORY,class:""},this.rendered=!1,this._fontInfo=w.getFontInfo(this.attrs.type),this.style=w.getStyle(this.attrs.type),this.fontScale=w.get(`${this.attrs.type}.fontScale`),null===(e=E.getDefaultRegistry())||void 0===e||e.register(this)}addChild(t){if(t.parent)throw new c("Element","Parent already defined");return t.parent=this,this.children.push(t),this}getCategory(){return this.attrs.type}setStyle(t){return this.style=t,this}setGroupStyle(t){return this.style=t,this.children.forEach((e=>e.setGroupStyle(t))),this}getStyle(){return this.style}applyStyle(t=this.context,e=this.getStyle()){return t?(e.shadowColor&&t.setShadowColor(e.shadowColor),e.shadowBlur&&t.setShadowBlur(e.shadowBlur),e.fillStyle&&t.setFillStyle(e.fillStyle),e.strokeStyle&&t.setStrokeStyle(e.strokeStyle),e.lineWidth&&t.setLineWidth(e.lineWidth),e.lineDash&&t.setLineDash(e.lineDash.split(" ").map(Number)),this):this}drawWithStyle(){const t=this.checkContext();return t.save(),this.applyStyle(t),this.draw(),t.restore(),this}draw(){throw new c("Element","Draw not defined")}hasClass(t){var e;return!!this.attrs.class&&-1!==(null===(e=this.attrs.class)||void 0===e?void 0:e.split(" ").indexOf(t))}addClass(t){var e;return this.hasClass(t)||(this.attrs.class?this.attrs.class=`${this.attrs.class} ${t}`:this.attrs.class=`${t}`,null===(e=this.registry)||void 0===e||e.onUpdate({id:this.attrs.id,name:"class",value:t,oldValue:void 0})),this}removeClass(t){var e,i;if(!this.hasClass(t))return this;const s=null===(e=this.attrs.class)||void 0===e?void 0:e.split(" ");return s&&(s.splice(s.indexOf(t)),this.attrs.class=s.join(" ")),null===(i=this.registry)||void 0===i||i.onUpdate({id:this.attrs.id,name:"class",value:void 0,oldValue:t}),this}onRegister(t){return this.registry=t,this}isRendered(){return this.rendered}setRendered(t=!0){return this.rendered=t,this}getAttributes(){return this.attrs}getAttribute(t){return this.attrs[t]}getSVGElement(t=""){const e=m(this.attrs.id+t),i=document.getElementById(e);if(i)return i}setAttribute(t,e){var i;const s=this.attrs.id,n=this.attrs[t];return this.attrs[t]=e,null===(i=this.registry)||void 0===i||i.onUpdate({id:s,name:t,value:e,oldValue:n}),this}getBoundingBox(){return new y(this.x+this.xShift,this.y+this.yShift-this.textMetrics.actualBoundingBoxAscent,this.width,this.height)}getContext(){return this.context}setContext(t){return this.context=t,this}checkContext(){return u(this.context,"NoContext","No rendering context attached to instance.")}set font(t){this.setFont(t)}get font(){return B.toCSSString(this._fontInfo)}setFont(t,e,i,s){const n=w.getFontInfo(this.attrs.type),a="object"==typeof t,o="string"==typeof t,r=void 0===e&&void 0===i&&void 0===s;return this.metricsValid=!1,this._fontInfo=a?Object.assign(Object.assign({},n),t):o&&r?B.fromCSSString(t):B.validate(null!=t?t:n.family,null!=e?e:n.size,null!=i?i:n.weight,null!=s?s:n.style),this}getFont(){return B.toCSSString(this._fontInfo)}get fontInfo(){return this._fontInfo}set fontInfo(t){this.setFont(t)}setFontSize(t){const e=this.fontInfo;return this.setFont(e.family,t,e.weight,e.style),this}getFontSize(){return this.fontSize}getFontScale(){return this.fontScale}set fontSize(t){this.setFontSize(t)}get fontSize(){let t=this.fontInfo.size;return"number"==typeof t&&(t=`${t}pt`),t}get fontSizeInPoints(){return B.convertSizeToPointValue(this.fontSize)}get fontSizeInPixels(){return B.convertSizeToPixelValue(this.fontSize)}get fontStyle(){return this.fontInfo.style}set fontStyle(t){const e=this.fontInfo;this.setFont(e.family,e.size,e.weight,t)}get fontWeight(){return this.fontInfo.weight+""}set fontWeight(t){const e=this.fontInfo;this.setFont(e.family,e.size,t,e.style)}getWidth(){return this.width}get width(){return this.metricsValid||this.measureText(),this._width}setWidth(t){return this.width=t,this}set width(t){this.metricsValid||this.measureText(),this._width=t}setX(t){return this.x=t,this}getX(){return this.x}getY(){return this.y}setY(t){return this.y=t,this}setYShift(t){return this.yShift=t,this}getYShift(){return this.yShift}setXShift(t){return this.xShift=t,this}getXShift(){return this.xShift}setText(t){return this.text=t,this}set text(t){this.metricsValid=!1,this._text=t}getText(){return this._text}get text(){return this._text}renderText(t,e,i){t.setFont(this._fontInfo),t.fillText(this._text,e+this.x+this.xShift,i+this.y+this.yShift),this.children.forEach((s=>{t.setFont(s.fontInfo),t.fillText(s.text,e+s.x+s.xShift,i+s.y+s.yShift)}))}measureText(){var t;const e=null===(t=N.getTextMeasurementCanvas())||void 0===t?void 0:t.getContext("2d");return e?(e.font=B.toCSSString(B.validate(this.fontInfo)),this._textMetrics=e.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,e=""){var i;const s=null===(i=N.getTextMeasurementCanvas())||void 0===i?void 0:i.getContext("2d");return s?(s.font=B.toCSSString(w.getFontInfo(e)),s.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(t){this.metricsValid||this.measureText(),this._height=t}setOriginX(t){const e=this.getBoundingBox(),i=(t-Math.abs((e.getX()-this.xShift)/e.getW()))*e.getW();this.xShift=-i}setOriginY(t){const e=this.getBoundingBox(),i=(t-Math.abs((e.getY()-this.yShift)/e.getH()))*e.getH();this.yShift=-i}setOrigin(t,e){this.setOriginX(t),this.setOriginY(e)}}var F,O;N.ID=1e3,function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.ABOVE=3]="ABOVE",t[t.BELOW=4]="BELOW"}(F||(F={}));class P extends N{static get CATEGORY(){return l.Modifier}static get Position(){return F}static get PositionString(){return{center:F.CENTER,above:F.ABOVE,below:F.BELOW,left:F.LEFT,right:F.RIGHT}}constructor(){super(),this.width=0,this.textLine=0,this.position=P.Position.LEFT,this.spacingFromNextModifier=0}reset(){}getNote(){return u(this.note,"NoNote","Modifier has no note.")}checkAttachedNote(){const t=this.getCategory();return u(this.index,"NoIndex",`Can't draw ${t} without an index.`),u(this.note,"NoNote",`Can't draw ${t} without a note.`)}setNote(t){return this.note=t,this}getIndex(){return this.index}checkIndex(){return u(this.index,"NoIndex","Modifier has an invalid index.")}setIndex(t){return this.index=t,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return u(this.modifierContext,"NoModifierContext","Modifier Context Required")}setModifierContext(t){return this.modifierContext=t,this}getPosition(){return this.position}setPosition(t){return this.position="string"==typeof t?P.PositionString[t]:t,this.reset(),this}setTextLine(t){return this.textLine=t,this}setYShift(t){return this.yShift=t,this}setSpacingFromNextModifier(t){this.spacingFromNextModifier=t}getSpacingFromNextModifier(){return this.spacingFromNextModifier}setXShift(t){return this.xShift=0,this.position===P.Position.LEFT?this.xShift-=t:this.xShift+=t,this}getXShift(){return this.xShift}draw(){throw this.checkContext(),new c("NotImplemented","draw() not implemented for this modifier.")}alignSubNotesWithNote(t,e,i=P.Position.LEFT){const s=e.getTickContext(),n=s.getMetrics(),a=e.getStave(),o=i===P.Position.RIGHT?s.getX()+this.getSpacingFromNextModifier()*t.length+10:s.getX()-n.modLeftPx-n.modRightPx+this.getSpacingFromNextModifier();t.forEach((t=>{const e=t.getTickContext();a&&t.setStave(a),e.setXOffset(o)}))}}class A{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:A.scales.major,m:A.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<A.canonicalNotes.length}isValidIntervalValue(t){return t>=0&&t<A.diatonicIntervals.length}getNoteParts(t){if(!t||t.length<1)throw new c("BadArguments","Invalid note name: "+t);if(t.length>3)throw new c("BadArguments","Invalid note name: "+t);const e=t.toLowerCase(),i=/^([cdefgab])(b|bb|n|#|##)?$/.exec(e);if(null!==i){return{root:i[1],accidental:i[2]}}throw new c("BadArguments","Invalid note name: "+t)}getKeyParts(t){if(!t||t.length<1)throw new c("BadArguments","Invalid key: "+t);const e=t.toLowerCase(),i=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(e);if(null!==i){const t=i[1],e=i[2];let s=i[3];return s||(s="M"),{root:t,accidental:e,type:s}}throw new c("BadArguments",`Invalid key: ${t}`)}getNoteValue(t){const e=A.noteValues[t];if(void 0===e)throw new c("BadArguments",`Invalid note name: ${t}`);return e.intVal}getIntervalValue(t){const e=A.intervals[t];if(void 0===e)throw new c("BadArguments",`Invalid interval name: ${t}`);return e}getCanonicalNoteName(t){if(!this.isValidNoteValue(t))throw new c("BadArguments",`Invalid note value: ${t}`);return A.canonicalNotes[t]}getCanonicalIntervalName(t){if(!this.isValidIntervalValue(t))throw new c("BadArguments",`Invalid interval value: ${t}`);return A.diatonicIntervals[t]}getRelativeNoteValue(t,e,i=1){if(1!==i&&-1!==i)throw new c("BadArguments",`Invalid direction: ${i}`);let s=(t+i*e)%A.NUM_TONES;return s<0&&(s+=A.NUM_TONES),s}getRelativeNoteName(t,e){const i=this.getNoteParts(t),s=this.getNoteValue(i.root);let n=e-s;if(Math.abs(n)>A.NUM_TONES-3){let i=1;n>0&&(i=-1);const a=(e+1+(s+1))%A.NUM_TONES*i;if(Math.abs(a)>2)throw new c("BadArguments",`Notes not related: ${t}, ${e})`);n=a}if(Math.abs(n)>2)throw new c("BadArguments",`Notes not related: ${t}, ${e})`);let a=i.root;if(n>0)for(let t=1;t<=n;++t)a+="#";else if(n<0)for(let t=-1;t>=n;--t)a+="b";return a}getScaleTones(t,e){const i=[t];let s=t;for(let n=0;n<e.length;n++)s=this.getRelativeNoteValue(s,e[n]),s!==t&&i.push(s);return i}getIntervalBetween(t,e,i=1){if(1!==i&&-1!==i)throw new c("BadArguments",`Invalid direction: ${i}`);if(!this.isValidNoteValue(t)||!this.isValidNoteValue(e))throw new c("BadArguments",`Invalid notes: ${t}, ${e}`);let s=1===i?e-t:t-e;return s<0&&(s+=A.NUM_TONES),s}createScaleMap(t){const e=this.getKeyParts(t);if(!e.type)throw new c("BadArguments","Unsupported key type: undefined");const i=A.scaleTypes[e.type];let s=e.root;if(e.accidental&&(s+=e.accidental),!i)throw new c("BadArguments","Unsupported key type: "+t);const n=this.getScaleTones(this.getNoteValue(s),i),a=A.rootIndexes[e.root],o={};for(let t=0;t<A.roots.length;++t){const e=(a+t)%A.roots.length,i=A.roots[e];let s=this.getRelativeNoteName(i,n[t]);1===s.length&&(s+="n"),o[i]=s}return o}}!function(t){t.null="\0",t.fourStringTabClef="",t.sixStringTabClef="",t.accSagittal11LargeDiesisDown="",t.accSagittal11LargeDiesisUp="",t.accSagittal11MediumDiesisDown="",t.accSagittal11MediumDiesisUp="",t.accSagittal11v19LargeDiesisDown="",t.accSagittal11v19LargeDiesisUp="",t.accSagittal11v19MediumDiesisDown="",t.accSagittal11v19MediumDiesisUp="",t.accSagittal11v49CommaDown="",t.accSagittal11v49CommaUp="",t.accSagittal143CommaDown="",t.accSagittal143CommaUp="",t.accSagittal17CommaDown="",t.accSagittal17CommaUp="",t.accSagittal17KleismaDown="",t.accSagittal17KleismaUp="",t.accSagittal19CommaDown="",t.accSagittal19CommaUp="",t.accSagittal19SchismaDown="",t.accSagittal19SchismaUp="",t.accSagittal1MinaDown="",t.accSagittal1MinaUp="",t.accSagittal1TinaDown="",t.accSagittal1TinaUp="",t.accSagittal23CommaDown="",t.accSagittal23CommaUp="",t.accSagittal23SmallDiesisDown="",t.accSagittal23SmallDiesisUp="",t.accSagittal25SmallDiesisDown="",t.accSagittal25SmallDiesisUp="",t.accSagittal2MinasDown="",t.accSagittal2MinasUp="",t.accSagittal2TinasDown="",t.accSagittal2TinasUp="",t.accSagittal35LargeDiesisDown="",t.accSagittal35LargeDiesisUp="",t.accSagittal35MediumDiesisDown="",t.accSagittal35MediumDiesisUp="",t.accSagittal3TinasDown="",t.accSagittal3TinasUp="",t.accSagittal49LargeDiesisDown="",t.accSagittal49LargeDiesisUp="",t.accSagittal49MediumDiesisDown="",t.accSagittal49MediumDiesisUp="",t.accSagittal49SmallDiesisDown="",t.accSagittal49SmallDiesisUp="",t.accSagittal4TinasDown="",t.accSagittal4TinasUp="",t.accSagittal55CommaDown="",t.accSagittal55CommaUp="",t.accSagittal5CommaDown="",t.accSagittal5CommaUp="",t.accSagittal5TinasDown="",t.accSagittal5TinasUp="",t.accSagittal5v11SmallDiesisDown="",t.accSagittal5v11SmallDiesisUp="",t.accSagittal5v13LargeDiesisDown="",t.accSagittal5v13LargeDiesisUp="",t.accSagittal5v13MediumDiesisDown="",t.accSagittal5v13MediumDiesisUp="",t.accSagittal5v19CommaDown="",t.accSagittal5v19CommaUp="",t.accSagittal5v23SmallDiesisDown="",t.accSagittal5v23SmallDiesisUp="",t.accSagittal5v49MediumDiesisDown="",t.accSagittal5v49MediumDiesisUp="",t.accSagittal5v7KleismaDown="",t.accSagittal5v7KleismaUp="",t.accSagittal6TinasDown="",t.accSagittal6TinasUp="",t.accSagittal7CommaDown="",t.accSagittal7CommaUp="",t.accSagittal7TinasDown="",t.accSagittal7TinasUp="",t.accSagittal7v11CommaDown="",t.accSagittal7v11CommaUp="",t.accSagittal7v11KleismaDown="",t.accSagittal7v11KleismaUp="",t.accSagittal7v19CommaDown="",t.accSagittal7v19CommaUp="",t.accSagittal8TinasDown="",t.accSagittal8TinasUp="",t.accSagittal9TinasDown="",t.accSagittal9TinasUp="",t.accSagittalAcute="",t.accSagittalDoubleFlat="",t.accSagittalDoubleFlat11v49CUp="",t.accSagittalDoubleFlat143CUp="",t.accSagittalDoubleFlat17CUp="",t.accSagittalDoubleFlat17kUp="",t.accSagittalDoubleFlat19CUp="",t.accSagittalDoubleFlat19sUp="",t.accSagittalDoubleFlat23CUp="",t.accSagittalDoubleFlat23SUp="",t.accSagittalDoubleFlat25SUp="",t.accSagittalDoubleFlat49SUp="",t.accSagittalDoubleFlat55CUp="",t.accSagittalDoubleFlat5CUp="",t.accSagittalDoubleFlat5v11SUp="",t.accSagittalDoubleFlat5v19CUp="",t.accSagittalDoubleFlat5v23SUp="",t.accSagittalDoubleFlat5v7kUp="",t.accSagittalDoubleFlat7CUp="",t.accSagittalDoubleFlat7v11CUp="",t.accSagittalDoubleFlat7v11kUp="",t.accSagittalDoubleFlat7v19CUp="",t.accSagittalDoubleSharp="",t.accSagittalDoubleSharp11v49CDown="",t.accSagittalDoubleSharp143CDown="",t.accSagittalDoubleSharp17CDown="",t.accSagittalDoubleSharp17kDown="",t.accSagittalDoubleSharp19CDown="",t.accSagittalDoubleSharp19sDown="",t.accSagittalDoubleSharp23CDown="",t.accSagittalDoubleSharp23SDown="",t.accSagittalDoubleSharp25SDown="",t.accSagittalDoubleSharp49SDown="",t.accSagittalDoubleSharp55CDown="",t.accSagittalDoubleSharp5CDown="",t.accSagittalDoubleSharp5v11SDown="",t.accSagittalDoubleSharp5v19CDown="",t.accSagittalDoubleSharp5v23SDown="",t.accSagittalDoubleSharp5v7kDown="",t.accSagittalDoubleSharp7CDown="",t.accSagittalDoubleSharp7v11CDown="",t.accSagittalDoubleSharp7v11kDown="",t.accSagittalDoubleSharp7v19CDown="",t.accSagittalFlat="",t.accSagittalFlat11LDown="",t.accSagittalFlat11MDown="",t.accSagittalFlat11v19LDown="",t.accSagittalFlat11v19MDown="",t.accSagittalFlat11v49CDown="",t.accSagittalFlat11v49CUp="",t.accSagittalFlat143CDown="",t.accSagittalFlat143CUp="",t.accSagittalFlat17CDown="",t.accSagittalFlat17CUp="",t.accSagittalFlat17kDown="",t.accSagittalFlat17kUp="",t.accSagittalFlat19CDown="",t.accSagittalFlat19CUp="",t.accSagittalFlat19sDown="",t.accSagittalFlat19sUp="",t.accSagittalFlat23CDown="",t.accSagittalFlat23CUp="",t.accSagittalFlat23SDown="",t.accSagittalFlat23SUp="",t.accSagittalFlat25SDown="",t.accSagittalFlat25SUp="",t.accSagittalFlat35LDown="",t.accSagittalFlat35MDown="",t.accSagittalFlat49LDown="",t.accSagittalFlat49MDown="",t.accSagittalFlat49SDown="",t.accSagittalFlat49SUp="",t.accSagittalFlat55CDown="",t.accSagittalFlat55CUp="",t.accSagittalFlat5CDown="",t.accSagittalFlat5CUp="",t.accSagittalFlat5v11SDown="",t.accSagittalFlat5v11SUp="",t.accSagittalFlat5v13LDown="",t.accSagittalFlat5v13MDown="",t.accSagittalFlat5v19CDown="",t.accSagittalFlat5v19CUp="",t.accSagittalFlat5v23SDown="",t.accSagittalFlat5v23SUp="",t.accSagittalFlat5v49MDown="",t.accSagittalFlat5v7kDown="",t.accSagittalFlat5v7kUp="",t.accSagittalFlat7CDown="",t.accSagittalFlat7CUp="",t.accSagittalFlat7v11CDown="",t.accSagittalFlat7v11CUp="",t.accSagittalFlat7v11kDown="",t.accSagittalFlat7v11kUp="",t.accSagittalFlat7v19CDown="",t.accSagittalFlat7v19CUp="",t.accSagittalFractionalTinaDown="",t.accSagittalFractionalTinaUp="",t.accSagittalGrave="",t.accSagittalShaftDown="",t.accSagittalShaftUp="",t.accSagittalSharp="",t.accSagittalSharp11LUp="",t.accSagittalSharp11MUp="",t.accSagittalSharp11v19LUp="",t.accSagittalSharp11v19MUp="",t.accSagittalSharp11v49CDown="",t.accSagittalSharp11v49CUp="",t.accSagittalSharp143CDown="",t.accSagittalSharp143CUp="",t.accSagittalSharp17CDown="",t.accSagittalSharp17CUp="",t.accSagittalSharp17kDown="",t.accSagittalSharp17kUp="",t.accSagittalSharp19CDown="",t.accSagittalSharp19CUp="",t.accSagittalSharp19sDown="",t.accSagittalSharp19sUp="",t.accSagittalSharp23CDown="",t.accSagittalSharp23CUp="",t.accSagittalSharp23SDown="",t.accSagittalSharp23SUp="",t.accSagittalSharp25SDown="",t.accSagittalSharp25SUp="",t.accSagittalSharp35LUp="",t.accSagittalSharp35MUp="",t.accSagittalSharp49LUp="",t.accSagittalSharp49MUp="",t.accSagittalSharp49SDown="",t.accSagittalSharp49SUp="",t.accSagittalSharp55CDown="",t.accSagittalSharp55CUp="",t.accSagittalSharp5CDown="",t.accSagittalSharp5CUp="",t.accSagittalSharp5v11SDown="",t.accSagittalSharp5v11SUp="",t.accSagittalSharp5v13LUp="",t.accSagittalSharp5v13MUp="",t.accSagittalSharp5v19CDown="",t.accSagittalSharp5v19CUp="",t.accSagittalSharp5v23SDown="",t.accSagittalSharp5v23SUp="",t.accSagittalSharp5v49MUp="",t.accSagittalSharp5v7kDown="",t.accSagittalSharp5v7kUp="",t.accSagittalSharp7CDown="",t.accSagittalSharp7CUp="",t.accSagittalSharp7v11CDown="",t.accSagittalSharp7v11CUp="",t.accSagittalSharp7v11kDown="",t.accSagittalSharp7v11kUp="",t.accSagittalSharp7v19CDown="",t.accSagittalSharp7v19CUp="",t.accSagittalUnused1="",t.accSagittalUnused2="",t.accSagittalUnused3="",t.accSagittalUnused4="",t.accdnCombDot="",t.accdnCombLH2RanksEmpty="",t.accdnCombLH3RanksEmptySquare="",t.accdnCombRH3RanksEmpty="",t.accdnCombRH4RanksEmpty="",t.accdnDiatonicClef="",t.accdnLH2Ranks16Round="",t.accdnLH2Ranks8Plus16Round="",t.accdnLH2Ranks8Round="",t.accdnLH2RanksFullMasterRound="",t.accdnLH2RanksMasterPlus16Round="",t.accdnLH2RanksMasterRound="",t.accdnLH3Ranks2Plus8Square="",t.accdnLH3Ranks2Square="",t.accdnLH3Ranks8Square="",t.accdnLH3RanksDouble8Square="",t.accdnLH3RanksTuttiSquare="",t.accdnPull="",t.accdnPush="",t.accdnRH3RanksAccordion="",t.accdnRH3RanksAuthenticMusette="",t.accdnRH3RanksBandoneon="",t.accdnRH3RanksBassoon="",t.accdnRH3RanksClarinet="",t.accdnRH3RanksDoubleTremoloLower8ve="",t.accdnRH3RanksDoubleTremoloUpper8ve="",t.accdnRH3RanksFullFactory="",t.accdnRH3RanksHarmonium="",t.accdnRH3RanksImitationMusette="",t.accdnRH3RanksLowerTremolo8="",t.accdnRH3RanksMaster="",t.accdnRH3RanksOboe="",t.accdnRH3RanksOrgan="",t.accdnRH3RanksPiccolo="",t.accdnRH3RanksTremoloLower8ve="",t.accdnRH3RanksTremoloUpper8ve="",t.accdnRH3RanksTwoChoirs="",t.accdnRH3RanksUpperTremolo8="",t.accdnRH3RanksViolin="",t.accdnRH4RanksAlto="",t.accdnRH4RanksBassAlto="",t.accdnRH4RanksMaster="",t.accdnRH4RanksSoftBass="",t.accdnRH4RanksSoftTenor="",t.accdnRH4RanksSoprano="",t.accdnRH4RanksTenor="",t.accdnRicochet2="",t.accdnRicochet3="",t.accdnRicochet4="",t.accdnRicochet5="",t.accdnRicochet6="",t.accdnRicochetStem2="",t.accdnRicochetStem3="",t.accdnRicochetStem4="",t.accdnRicochetStem5="",t.accdnRicochetStem6="",t.accidental1CommaFlat="",t.accidental1CommaSharp="",t.accidental2CommaFlat="",t.accidental2CommaSharp="",t.accidental3CommaFlat="",t.accidental3CommaSharp="",t.accidental4CommaFlat="",t.accidental5CommaSharp="",t.accidentalArrowDown="",t.accidentalArrowUp="",t.accidentalBakiyeFlat="",t.accidentalBakiyeSharp="",t.accidentalBracketLeft="",t.accidentalBracketRight="",t.accidentalBuyukMucennebFlat="",t.accidentalBuyukMucennebSharp="",t.accidentalCombiningCloseCurlyBrace="",t.accidentalCombiningLower17Schisma="",t.accidentalCombiningLower19Schisma="",t.accidentalCombiningLower23Limit29LimitComma="",t.accidentalCombiningLower29LimitComma="",t.accidentalCombiningLower31Schisma="",t.accidentalCombiningLower37Quartertone="",t.accidentalCombiningLower41Comma="",t.accidentalCombiningLower43Comma="",t.accidentalCombiningLower47Quartertone="",t.accidentalCombiningLower53LimitComma="",t.accidentalCombiningOpenCurlyBrace="",t.accidentalCombiningRaise17Schisma="",t.accidentalCombiningRaise19Schisma="",t.accidentalCombiningRaise23Limit29LimitComma="",t.accidentalCombiningRaise29LimitComma="",t.accidentalCombiningRaise31Schisma="",t.accidentalCombiningRaise37Quartertone="",t.accidentalCombiningRaise41Comma="",t.accidentalCombiningRaise43Comma="",t.accidentalCombiningRaise47Quartertone="",t.accidentalCombiningRaise53LimitComma="",t.accidentalCommaSlashDown="",t.accidentalCommaSlashUp="",t.accidentalDoubleFlat="",t.accidentalDoubleFlatArabic="",t.accidentalDoubleFlatEqualTempered="",t.accidentalDoubleFlatOneArrowDown="",t.accidentalDoubleFlatOneArrowUp="",t.accidentalDoubleFlatReversed="",t.accidentalDoubleFlatThreeArrowsDown="",t.accidentalDoubleFlatThreeArrowsUp="",t.accidentalDoubleFlatTurned="",t.accidentalDoubleFlatTwoArrowsDown="",t.accidentalDoubleFlatTwoArrowsUp="",t.accidentalDoubleSharp="",t.accidentalDoubleSharpArabic="",t.accidentalDoubleSharpEqualTempered="",t.accidentalDoubleSharpOneArrowDown="",t.accidentalDoubleSharpOneArrowUp="",t.accidentalDoubleSharpThreeArrowsDown="",t.accidentalDoubleSharpThreeArrowsUp="",t.accidentalDoubleSharpTwoArrowsDown="",t.accidentalDoubleSharpTwoArrowsUp="",t.accidentalEnharmonicAlmostEqualTo="",t.accidentalEnharmonicEquals="",t.accidentalEnharmonicTilde="",t.accidentalFilledReversedFlatAndFlat="",t.accidentalFilledReversedFlatAndFlatArrowDown="",t.accidentalFilledReversedFlatAndFlatArrowUp="",t.accidentalFilledReversedFlatArrowDown="",t.accidentalFilledReversedFlatArrowUp="",t.accidentalFiveQuarterTonesFlatArrowDown="",t.accidentalFiveQuarterTonesSharpArrowUp="",t.accidentalFlat="",t.accidentalFlatArabic="",t.accidentalFlatEqualTempered="",t.accidentalFlatLoweredStockhausen="",t.accidentalFlatOneArrowDown="",t.accidentalFlatOneArrowUp="",t.accidentalFlatRaisedStockhausen="",t.accidentalFlatRepeatedLineStockhausen="",t.accidentalFlatRepeatedSpaceStockhausen="",t.accidentalFlatThreeArrowsDown="",t.accidentalFlatThreeArrowsUp="",t.accidentalFlatTurned="",t.accidentalFlatTwoArrowsDown="",t.accidentalFlatTwoArrowsUp="",t.accidentalHabaFlatQuarterToneHigher="",t.accidentalHabaFlatThreeQuarterTonesLower="",t.accidentalHabaQuarterToneHigher="",t.accidentalHabaQuarterToneLower="",t.accidentalHabaSharpQuarterToneLower="",t.accidentalHabaSharpThreeQuarterTonesHigher="",t.accidentalHalfSharpArrowDown="",t.accidentalHalfSharpArrowUp="",t.accidentalJohnston13="",t.accidentalJohnston31="",t.accidentalJohnstonDown="",t.accidentalJohnstonEl="",t.accidentalJohnstonMinus="",t.accidentalJohnstonPlus="",t.accidentalJohnstonSeven="",t.accidentalJohnstonUp="",t.accidentalKomaFlat="",t.accidentalKomaSharp="",t.accidentalKoron="",t.accidentalKucukMucennebFlat="",t.accidentalKucukMucennebSharp="",t.accidentalLargeDoubleSharp="",t.accidentalLowerOneSeptimalComma="",t.accidentalLowerOneTridecimalQuartertone="",t.accidentalLowerOneUndecimalQuartertone="",t.accidentalLowerTwoSeptimalCommas="",t.accidentalLoweredStockhausen="",t.accidentalNarrowReversedFlat="",t.accidentalNarrowReversedFlatAndFlat="",t.accidentalNatural="",t.accidentalNaturalArabic="",t.accidentalNaturalEqualTempered="",t.accidentalNaturalFlat="",t.accidentalNaturalLoweredStockhausen="",t.accidentalNaturalOneArrowDown="",t.accidentalNaturalOneArrowUp="",t.accidentalNaturalRaisedStockhausen="",t.accidentalNaturalReversed="",t.accidentalNaturalSharp="",t.accidentalNaturalThreeArrowsDown="",t.accidentalNaturalThreeArrowsUp="",t.accidentalNaturalTwoArrowsDown="",t.accidentalNaturalTwoArrowsUp="",t.accidentalOneAndAHalfSharpsArrowDown="",t.accidentalOneAndAHalfSharpsArrowUp="",t.accidentalOneQuarterToneFlatFerneyhough="",t.accidentalOneQuarterToneFlatStockhausen="",t.accidentalOneQuarterToneSharpFerneyhough="",t.accidentalOneQuarterToneSharpStockhausen="",t.accidentalOneThirdToneFlatFerneyhough="",t.accidentalOneThirdToneSharpFerneyhough="",t.accidentalParensLeft="",t.accidentalParensRight="",t.accidentalQuarterFlatEqualTempered="",t.accidentalQuarterSharpEqualTempered="",t.accidentalQuarterToneFlat4="",t.accidentalQuarterToneFlatArabic="",t.accidentalQuarterToneFlatArrowUp="",t.accidentalQuarterToneFlatFilledReversed="",t.accidentalQuarterToneFlatNaturalArrowDown="",t.accidentalQuarterToneFlatPenderecki="",t.accidentalQuarterToneFlatStein="",t.accidentalQuarterToneFlatVanBlankenburg="",t.accidentalQuarterToneSharp4="",t.accidentalQuarterToneSharpArabic="",t.accidentalQuarterToneSharpArrowDown="",t.accidentalQuarterToneSharpBusotti="",t.accidentalQuarterToneSharpNaturalArrowUp="",t.accidentalQuarterToneSharpStein="",t.accidentalQuarterToneSharpWiggle="",t.accidentalRaiseOneSeptimalComma="",t.accidentalRaiseOneTridecimalQuartertone="",t.accidentalRaiseOneUndecimalQuartertone="",t.accidentalRaiseTwoSeptimalCommas="",t.accidentalRaisedStockhausen="",t.accidentalReversedFlatAndFlatArrowDown="",t.accidentalReversedFlatAndFlatArrowUp="",t.accidentalReversedFlatArrowDown="",t.accidentalReversedFlatArrowUp="",t.accidentalSharp="",t.accidentalSharpArabic="",t.accidentalSharpEqualTempered="",t.accidentalSharpLoweredStockhausen="",t.accidentalSharpOneArrowDown="",t.accidentalSharpOneArrowUp="",t.accidentalSharpOneHorizontalStroke="",t.accidentalSharpRaisedStockhausen="",t.accidentalSharpRepeatedLineStockhausen="",t.accidentalSharpRepeatedSpaceStockhausen="",t.accidentalSharpReversed="",t.accidentalSharpSharp="",t.accidentalSharpThreeArrowsDown="",t.accidentalSharpThreeArrowsUp="",t.accidentalSharpTwoArrowsDown="",t.accidentalSharpTwoArrowsUp="",t.accidentalSims12Down="",t.accidentalSims12Up="",t.accidentalSims4Down="",t.accidentalSims4Up="",t.accidentalSims6Down="",t.accidentalSims6Up="",t.accidentalSori="",t.accidentalTavenerFlat="",t.accidentalTavenerSharp="",t.accidentalThreeQuarterTonesFlatArabic="",t.accidentalThreeQuarterTonesFlatArrowDown="",t.accidentalThreeQuarterTonesFlatArrowUp="",t.accidentalThreeQuarterTonesFlatCouper="",t.accidentalThreeQuarterTonesFlatGrisey="",t.accidentalThreeQuarterTonesFlatTartini="",t.accidentalThreeQuarterTonesFlatZimmermann="",t.accidentalThreeQuarterTonesSharpArabic="",t.accidentalThreeQuarterTonesSharpArrowDown="",t.accidentalThreeQuarterTonesSharpArrowUp="",t.accidentalThreeQuarterTonesSharpBusotti="",t.accidentalThreeQuarterTonesSharpStein="",t.accidentalThreeQuarterTonesSharpStockhausen="",t.accidentalTripleFlat="",t.accidentalTripleSharp="",t.accidentalTwoThirdTonesFlatFerneyhough="",t.accidentalTwoThirdTonesSharpFerneyhough="",t.accidentalUpsAndDownsDown="",t.accidentalUpsAndDownsLess="",t.accidentalUpsAndDownsMore="",t.accidentalUpsAndDownsUp="",t.accidentalWilsonMinus="",t.accidentalWilsonPlus="",t.accidentalWyschnegradsky10TwelfthsFlat="",t.accidentalWyschnegradsky10TwelfthsSharp="",t.accidentalWyschnegradsky11TwelfthsFlat="",t.accidentalWyschnegradsky11TwelfthsSharp="",t.accidentalWyschnegradsky1TwelfthsFlat="",t.accidentalWyschnegradsky1TwelfthsSharp="",t.accidentalWyschnegradsky2TwelfthsFlat="",t.accidentalWyschnegradsky2TwelfthsSharp="",t.accidentalWyschnegradsky3TwelfthsFlat="",t.accidentalWyschnegradsky3TwelfthsSharp="",t.accidentalWyschnegradsky4TwelfthsFlat="",t.accidentalWyschnegradsky4TwelfthsSharp="",t.accidentalWyschnegradsky5TwelfthsFlat="",t.accidentalWyschnegradsky5TwelfthsSharp="",t.accidentalWyschnegradsky6TwelfthsFlat="",t.accidentalWyschnegradsky6TwelfthsSharp="",t.accidentalWyschnegradsky7TwelfthsFlat="",t.accidentalWyschnegradsky7TwelfthsSharp="",t.accidentalWyschnegradsky8TwelfthsFlat="",t.accidentalWyschnegradsky8TwelfthsSharp="",t.accidentalWyschnegradsky9TwelfthsFlat="",t.accidentalWyschnegradsky9TwelfthsSharp="",t.accidentalXenakisOneThirdToneSharp="",t.accidentalXenakisTwoThirdTonesSharp="",t.analyticsChoralmelodie="",t.analyticsEndStimme="",t.analyticsHauptrhythmus="",t.analyticsHauptstimme="",t.analyticsInversion1="",t.analyticsNebenstimme="",t.analyticsStartStimme="",t.analyticsTheme="",t.analyticsTheme1="",t.analyticsThemeInversion="",t.analyticsThemeRetrograde="",t.analyticsThemeRetrogradeInversion="",t.arpeggiato="",t.arpeggiatoDown="",t.arpeggiatoUp="",t.arrowBlackDown="",t.arrowBlackDownLeft="",t.arrowBlackDownRight="",t.arrowBlackLeft="",t.arrowBlackRight="",t.arrowBlackUp="",t.arrowBlackUpLeft="",t.arrowBlackUpRight="",t.arrowOpenDown="",t.arrowOpenDownLeft="",t.arrowOpenDownRight="",t.arrowOpenLeft="",t.arrowOpenRight="",t.arrowOpenUp="",t.arrowOpenUpLeft="",t.arrowOpenUpRight="",t.arrowWhiteDown="",t.arrowWhiteDownLeft="",t.arrowWhiteDownRight="",t.arrowWhiteLeft="",t.arrowWhiteRight="",t.arrowWhiteUp="",t.arrowWhiteUpLeft="",t.arrowWhiteUpRight="",t.arrowheadBlackDown="",t.arrowheadBlackDownLeft="",t.arrowheadBlackDownRight="",t.arrowheadBlackLeft="",t.arrowheadBlackRight="",t.arrowheadBlackUp="",t.arrowheadBlackUpLeft="",t.arrowheadBlackUpRight="",t.arrowheadOpenDown="",t.arrowheadOpenDownLeft="",t.arrowheadOpenDownRight="",t.arrowheadOpenLeft="",t.arrowheadOpenRight="",t.arrowheadOpenUp="",t.arrowheadOpenUpLeft="",t.arrowheadOpenUpRight="",t.arrowheadWhiteDown="",t.arrowheadWhiteDownLeft="",t.arrowheadWhiteDownRight="",t.arrowheadWhiteLeft="",t.arrowheadWhiteRight="",t.arrowheadWhiteUp="",t.arrowheadWhiteUpLeft="",t.arrowheadWhiteUpRight="",t.articAccentAbove="",t.articAccentBelow="",t.articAccentStaccatoAbove="",t.articAccentStaccatoBelow="",t.articLaissezVibrerAbove="",t.articLaissezVibrerBelow="",t.articMarcatoAbove="",t.articMarcatoBelow="",t.articMarcatoStaccatoAbove="",t.articMarcatoStaccatoBelow="",t.articMarcatoTenutoAbove="",t.articMarcatoTenutoBelow="",t.articSoftAccentAbove="",t.articSoftAccentBelow="",t.articSoftAccentStaccatoAbove="",t.articSoftAccentStaccatoBelow="",t.articSoftAccentTenutoAbove="",t.articSoftAccentTenutoBelow="",t.articSoftAccentTenutoStaccatoAbove="",t.articSoftAccentTenutoStaccatoBelow="",t.articStaccatissimoAbove="",t.articStaccatissimoBelow="",t.articStaccatissimoStrokeAbove="",t.articStaccatissimoStrokeBelow="",t.articStaccatissimoWedgeAbove="",t.articStaccatissimoWedgeBelow="",t.articStaccatoAbove="",t.articStaccatoBelow="",t.articStressAbove="",t.articStressBelow="",t.articTenutoAbove="",t.articTenutoAccentAbove="",t.articTenutoAccentBelow="",t.articTenutoBelow="",t.articTenutoStaccatoAbove="",t.articTenutoStaccatoBelow="",t.articUnstressAbove="",t.articUnstressBelow="",t.augmentationDot="",t.barlineDashed="",t.barlineDotted="",t.barlineDouble="",t.barlineFinal="",t.barlineHeavy="",t.barlineHeavyHeavy="",t.barlineReverseFinal="",t.barlineShort="",t.barlineSingle="",t.barlineTick="",t.beamAccelRit1="",t.beamAccelRit10="",t.beamAccelRit11="",t.beamAccelRit12="",t.beamAccelRit13="",t.beamAccelRit14="",t.beamAccelRit15="",t.beamAccelRit2="",t.beamAccelRit3="",t.beamAccelRit4="",t.beamAccelRit5="",t.beamAccelRit6="",t.beamAccelRit7="",t.beamAccelRit8="",t.beamAccelRit9="",t.beamAccelRitFinal="",t.brace="",t.bracket="",t.bracketBottom="",t.bracketTop="",t.brassBend="",t.brassDoitLong="",t.brassDoitMedium="",t.brassDoitShort="",t.brassFallLipLong="",t.brassFallLipMedium="",t.brassFallLipShort="",t.brassFallRoughLong="",t.brassFallRoughMedium="",t.brassFallRoughShort="",t.brassFallSmoothLong="",t.brassFallSmoothMedium="",t.brassFallSmoothShort="",t.brassFlip="",t.brassHarmonMuteClosed="",t.brassHarmonMuteStemHalfLeft="",t.brassHarmonMuteStemHalfRight="",t.brassHarmonMuteStemOpen="",t.brassJazzTurn="",t.brassLiftLong="",t.brassLiftMedium="",t.brassLiftShort="",t.brassLiftSmoothLong="",t.brassLiftSmoothMedium="",t.brassLiftSmoothShort="",t.brassMuteClosed="",t.brassMuteHalfClosed="",t.brassMuteOpen="",t.brassPlop="",t.brassScoop="",t.brassSmear="",t.brassValveTrill="",t.breathMarkComma="",t.breathMarkSalzedo="",t.breathMarkTick="",t.breathMarkUpbow="",t.bridgeClef="",t.buzzRoll="",t.cClef="",t.cClef8vb="",t.cClefArrowDown="",t.cClefArrowUp="",t.cClefChange="",t.cClefCombining="",t.cClefReversed="",t.cClefSquare="",t.caesura="",t.caesuraCurved="",t.caesuraShort="",t.caesuraSingleStroke="",t.caesuraThick="",t.chantAccentusAbove="",t.chantAccentusBelow="",t.chantAuctumAsc="",t.chantAuctumDesc="",t.chantAugmentum="",t.chantCaesura="",t.chantCclef="",t.chantCirculusAbove="",t.chantCirculusBelow="",t.chantConnectingLineAsc2nd="",t.chantConnectingLineAsc3rd="",t.chantConnectingLineAsc4th="",t.chantConnectingLineAsc5th="",t.chantConnectingLineAsc6th="",t.chantCustosStemDownPosHigh="",t.chantCustosStemDownPosHighest="",t.chantCustosStemDownPosMiddle="",t.chantCustosStemUpPosLow="",t.chantCustosStemUpPosLowest="",t.chantCustosStemUpPosMiddle="",t.chantDeminutumLower="",t.chantDeminutumUpper="",t.chantDivisioFinalis="",t.chantDivisioMaior="",t.chantDivisioMaxima="",t.chantDivisioMinima="",t.chantEntryLineAsc2nd="",t.chantEntryLineAsc3rd="",t.chantEntryLineAsc4th="",t.chantEntryLineAsc5th="",t.chantEntryLineAsc6th="",t.chantEpisema="",t.chantFclef="",t.chantIctusAbove="",t.chantIctusBelow="",t.chantLigaturaDesc2nd="",t.chantLigaturaDesc3rd="",t.chantLigaturaDesc4th="",t.chantLigaturaDesc5th="",t.chantOriscusAscending="",t.chantOriscusDescending="",t.chantOriscusLiquescens="",t.chantPodatusLower="",t.chantPodatusUpper="",t.chantPunctum="",t.chantPunctumCavum="",t.chantPunctumDeminutum="",t.chantPunctumInclinatum="",t.chantPunctumInclinatumAuctum="",t.chantPunctumInclinatumDeminutum="",t.chantPunctumLinea="",t.chantPunctumLineaCavum="",t.chantPunctumVirga="",t.chantPunctumVirgaReversed="",t.chantQuilisma="",t.chantSemicirculusAbove="",t.chantSemicirculusBelow="",t.chantStaff="",t.chantStaffNarrow="",t.chantStaffWide="",t.chantStrophicus="",t.chantStrophicusAuctus="",t.chantStrophicusLiquescens2nd="",t.chantStrophicusLiquescens3rd="",t.chantStrophicusLiquescens4th="",t.chantStrophicusLiquescens5th="",t.chantVirgula="",t.clef15="",t.clef8="",t.clefChangeCombining="",t.coda="",t.codaSquare="",t.conductorBeat2Compound="",t.conductorBeat2Simple="",t.conductorBeat3Compound="",t.conductorBeat3Simple="",t.conductorBeat4Compound="",t.conductorBeat4Simple="",t.conductorLeftBeat="",t.conductorRightBeat="",t.conductorStrongBeat="",t.conductorUnconducted="",t.conductorWeakBeat="";t.controlBeginBeam="",t.controlBeginPhrase="",t.controlBeginSlur="",t.controlBeginTie="",t.controlEndBeam="",t.controlEndPhrase="",t.controlEndSlur="",t.controlEndTie="",t.csymAccidentalDoubleFlat="",t.csymAccidentalDoubleSharp="",t.csymAccidentalFlat="",t.csymAccidentalNatural="",t.csymAccidentalSharp="",t.csymAccidentalTripleFlat="",t.csymAccidentalTripleSharp="",t.csymAlteredBassSlash="",t.csymAugmented="",t.csymBracketLeftTall="",t.csymBracketRightTall="",t.csymDiagonalArrangementSlash="",t.csymDiminished="",t.csymHalfDiminished="",t.csymMajorSeventh="",t.csymMinor="",t.csymParensLeftTall="",t.csymParensLeftVeryTall="",t.csymParensRightTall="",t.csymParensRightVeryTall="",t.curlewSign="",t.daCapo="",t.dalSegno="",t.daseianExcellentes1="",t.daseianExcellentes2="",t.daseianExcellentes3="",t.daseianExcellentes4="",t.daseianFinales1="",t.daseianFinales2="",t.daseianFinales3="",t.daseianFinales4="",t.daseianGraves1="",t.daseianGraves2="",t.daseianGraves3="",t.daseianGraves4="",t.daseianResidua1="",t.daseianResidua2="",t.daseianSuperiores1="",t.daseianSuperiores2="",t.daseianSuperiores3="",t.daseianSuperiores4="",t.doubleLateralRollStevens="",t.doubleTongueAbove="",t.doubleTongueBelow="",t.dynamicCombinedSeparatorColon="",t.dynamicCombinedSeparatorHyphen="",t.dynamicCombinedSeparatorSlash="",t.dynamicCombinedSeparatorSpace="",t.dynamicCrescendoHairpin="",t.dynamicDiminuendoHairpin="",t.dynamicFF="",t.dynamicFFF="",t.dynamicFFFF="",t.dynamicFFFFF="",t.dynamicFFFFFF="",t.dynamicForte="",t.dynamicFortePiano="",t.dynamicForzando="",t.dynamicHairpinBracketLeft="",t.dynamicHairpinBracketRight="",t.dynamicHairpinParenthesisLeft="",t.dynamicHairpinParenthesisRight="",t.dynamicMF="",t.dynamicMP="",t.dynamicMessaDiVoce="",t.dynamicMezzo="",t.dynamicNiente="",t.dynamicNienteForHairpin="",t.dynamicPF="",t.dynamicPP="",t.dynamicPPP="",t.dynamicPPPP="",t.dynamicPPPPP="",t.dynamicPPPPPP="",t.dynamicPiano="",t.dynamicRinforzando="",t.dynamicRinforzando1="",t.dynamicRinforzando2="",t.dynamicSforzando="",t.dynamicSforzando1="",t.dynamicSforzandoPianissimo="",t.dynamicSforzandoPiano="",t.dynamicSforzato="",t.dynamicSforzatoFF="",t.dynamicSforzatoPiano="",t.dynamicZ="",t.elecAudioChannelsEight="",t.elecAudioChannelsFive="",t.elecAudioChannelsFour="",t.elecAudioChannelsOne="",t.elecAudioChannelsSeven="",t.elecAudioChannelsSix="",t.elecAudioChannelsThreeFrontal="",t.elecAudioChannelsThreeSurround="",t.elecAudioChannelsTwo="",t.elecAudioIn="",t.elecAudioMono="",t.elecAudioOut="",t.elecAudioStereo="",t.elecCamera="",t.elecDataIn="",t.elecDataOut="",t.elecDisc="",t.elecDownload="",t.elecEject="",t.elecFastForward="",t.elecHeadphones="",t.elecHeadset="",t.elecLineIn="",t.elecLineOut="",t.elecLoop="",t.elecLoudspeaker="",t.elecMIDIController0="",t.elecMIDIController100="",t.elecMIDIController20="",t.elecMIDIController40="",t.elecMIDIController60="",t.elecMIDIController80="",t.elecMIDIIn="",t.elecMIDIOut="",t.elecMicrophone="",t.elecMicrophoneMute="",t.elecMicrophoneUnmute="",t.elecMixingConsole="",t.elecMonitor="",t.elecMute="",t.elecPause="",t.elecPlay="",t.elecPowerOnOff="",t.elecProjector="",t.elecReplay="",t.elecRewind="",t.elecShuffle="",t.elecSkipBackwards="",t.elecSkipForwards="",t.elecStop="",t.elecTape="",t.elecUSB="",t.elecUnmute="",t.elecUpload="",t.elecVideoCamera="",t.elecVideoIn="",t.elecVideoOut="",t.elecVolumeFader="",t.elecVolumeFaderThumb="",t.elecVolumeLevel0="",t.elecVolumeLevel100="",t.elecVolumeLevel20="",t.elecVolumeLevel40="",t.elecVolumeLevel60="",t.elecVolumeLevel80="",t.fClef="",t.fClef15ma="",t.fClef15mb="",t.fClef8va="",t.fClef8vb="",t.fClefArrowDown="",t.fClefArrowUp="",t.fClefChange="",t.fClefReversed="",t.fClefTurned="",t.fermataAbove="",t.fermataBelow="",t.fermataLongAbove="",t.fermataLongBelow="",t.fermataLongHenzeAbove="",t.fermataLongHenzeBelow="",t.fermataShortAbove="",t.fermataShortBelow="",t.fermataShortHenzeAbove="",t.fermataShortHenzeBelow="",t.fermataVeryLongAbove="",t.fermataVeryLongBelow="",t.fermataVeryShortAbove="",t.fermataVeryShortBelow="",t.figbass0="",t.figbass1="",t.figbass2="",t.figbass2Raised="",t.figbass3="",t.figbass4="",t.figbass4Raised="",t.figbass5="",t.figbass5Raised1="",t.figbass5Raised2="",t.figbass5Raised3="",t.figbass6="",t.figbass6Raised="",t.figbass6Raised2="",t.figbass7="",t.figbass7Diminished="",t.figbass7Raised1="",t.figbass7Raised2="",t.figbass8="",t.figbass9="",t.figbass9Raised="",t.figbassBracketLeft="",t.figbassBracketRight="",t.figbassCombiningLowering="",t.figbassCombiningRaising="",t.figbassDoubleFlat="",t.figbassDoubleSharp="",t.figbassFlat="",t.figbassNatural="",t.figbassParensLeft="",t.figbassParensRight="",t.figbassPlus="",t.figbassSharp="",t.figbassTripleFlat="",t.figbassTripleSharp="",t.fingering0="",t.fingering0Italic="",t.fingering1="",t.fingering1Italic="",t.fingering2="",t.fingering2Italic="",t.fingering3="",t.fingering3Italic="",t.fingering4="",t.fingering4Italic="",t.fingering5="",t.fingering5Italic="",t.fingering6="",t.fingering6Italic="",t.fingering7="",t.fingering7Italic="",t.fingering8="",t.fingering8Italic="",t.fingering9="",t.fingering9Italic="",t.fingeringALower="",t.fingeringCLower="",t.fingeringELower="",t.fingeringILower="",t.fingeringLeftBracket="",t.fingeringLeftBracketItalic="",t.fingeringLeftParenthesis="",t.fingeringLeftParenthesisItalic="",t.fingeringMLower="",t.fingeringMultipleNotes="",t.fingeringOLower="",t.fingeringPLower="",t.fingeringQLower="",t.fingeringRightBracket="",t.fingeringRightBracketItalic="",t.fingeringRightParenthesis="",t.fingeringRightParenthesisItalic="",t.fingeringSLower="",t.fingeringSeparatorMiddleDot="",t.fingeringSeparatorMiddleDotWhite="",t.fingeringSeparatorSlash="",t.fingeringSubstitutionAbove="",t.fingeringSubstitutionBelow="",t.fingeringSubstitutionDash="",t.fingeringTLower="",t.fingeringTUpper="",t.fingeringXLower="",t.flag1024thDown="",t.flag1024thUp="",t.flag128thDown="",t.flag128thUp="",t.flag16thDown="",t.flag16thUp="",t.flag256thDown="",t.flag256thUp="",t.flag32ndDown="",t.flag32ndUp="",t.flag512thDown="",t.flag512thUp="",t.flag64thDown="",t.flag64thUp="",t.flag8thDown="",t.flag8thUp="",t.flagInternalDown="",t.flagInternalUp="",t.fretboard3String="",t.fretboard3StringNut="",t.fretboard4String="",t.fretboard4StringNut="",t.fretboard5String="",t.fretboard5StringNut="",t.fretboard6String="",t.fretboard6StringNut="",t.fretboardFilledCircle="",t.fretboardO="",t.fretboardX="",t.functionAngleLeft="",t.functionAngleRight="",t.functionBracketLeft="",t.functionBracketRight="",t.functionDD="",t.functionDLower="",t.functionDUpper="",t.functionEight="",t.functionFUpper="",t.functionFive="",t.functionFour="",t.functionGLower="",t.functionGUpper="",t.functionGreaterThan="",t.functionILower="",t.functionIUpper="",t.functionKLower="",t.functionKUpper="",t.functionLLower="",t.functionLUpper="",t.functionLessThan="",t.functionMLower="",t.functionMUpper="",t.functionMinus="",t.functionNLower="",t.functionNUpper="",t.functionNUpperSuperscript="",t.functionNine="",t.functionOne="",t.functionPLower="",t.functionPUpper="",t.functionParensLeft="",t.functionParensRight="",t.functionPlus="",t.functionRLower="",t.functionRepetition1="",t.functionRepetition2="",t.functionRing="",t.functionSLower="",t.functionSSLower="",t.functionSSUpper="",t.functionSUpper="",t.functionSeven="",t.functionSix="",t.functionSlashedDD="",t.functionTLower="",t.functionTUpper="",t.functionThree="",t.functionTwo="",t.functionVLower="",t.functionVUpper="",t.functionZero="",t.gClef="",t.gClef15ma="",t.gClef15mb="",t.gClef8va="",t.gClef8vb="",t.gClef8vbCClef="",t.gClef8vbOld="",t.gClef8vbParens="",t.gClefArrowDown="",t.gClefArrowUp="",t.gClefChange="",t.gClefLigatedNumberAbove="",t.gClefLigatedNumberBelow="",t.gClefReversed="",t.gClefTurned="",t.glissandoDown="",t.glissandoUp="",t.graceNoteAcciaccaturaStemDown="",t.graceNoteAcciaccaturaStemUp="",t.graceNoteAppoggiaturaStemDown="",t.graceNoteAppoggiaturaStemUp="",t.graceNoteSlashStemDown="",t.graceNoteSlashStemUp="",t.guitarBarreFull="",t.guitarBarreHalf="",t.guitarClosePedal="",t.guitarFadeIn="",t.guitarFadeOut="",t.guitarGolpe="",t.guitarHalfOpenPedal="",t.guitarLeftHandTapping="",t.guitarOpenPedal="",t.guitarRightHandTapping="",t.guitarShake="",t.guitarString0="",t.guitarString1="",t.guitarString10="",t.guitarString11="",t.guitarString12="",t.guitarString13="",t.guitarString2="",t.guitarString3="",t.guitarString4="",t.guitarString5="",t.guitarString6="",t.guitarString7="",t.guitarString8="",t.guitarString9="",t.guitarStrumDown="",t.guitarStrumUp="",t.guitarVibratoBarDip="",t.guitarVibratoBarScoop="",t.guitarVibratoStroke="",t.guitarVolumeSwell="",t.guitarWideVibratoStroke="",t.handbellsBelltree="",t.handbellsDamp3="",t.handbellsEcho1="",t.handbellsEcho2="",t.handbellsGyro="",t.handbellsHandMartellato="",t.handbellsMalletBellOnTable="",t.handbellsMalletBellSuspended="",t.handbellsMalletLft="",t.handbellsMartellato="",t.handbellsMartellatoLift="",t.handbellsMutedMartellato="",t.handbellsPluckLift="",t.handbellsSwing="",t.handbellsSwingDown="",t.handbellsSwingUp="",t.handbellsTablePairBells="",t.handbellsTableSingleBell="",t.harpMetalRod="",t.harpPedalCentered="",t.harpPedalDivider="",t.harpPedalLowered="",t.harpPedalRaised="",t.harpSalzedoAeolianAscending="",t.harpSalzedoAeolianDescending="",t.harpSalzedoDampAbove="",t.harpSalzedoDampBelow="",t.harpSalzedoDampBothHands="",t.harpSalzedoDampLowStrings="",t.harpSalzedoFluidicSoundsLeft="",t.harpSalzedoFluidicSoundsRight="",t.harpSalzedoIsolatedSounds="",t.harpSalzedoMetallicSounds="",t.harpSalzedoMetallicSoundsOneString="",t.harpSalzedoMuffleTotally="",t.harpSalzedoOboicFlux="",t.harpSalzedoPlayUpperEnd="",t.harpSalzedoSlideWithSuppleness="",t.harpSalzedoSnareDrum="",t.harpSalzedoTamTamSounds="",t.harpSalzedoThunderEffect="",t.harpSalzedoTimpanicSounds="",t.harpSalzedoWhistlingSounds="",t.harpStringNoiseStem="",t.harpTuningKey="",t.harpTuningKeyGlissando="",t.harpTuningKeyHandle="",t.harpTuningKeyShank="",t.indianDrumClef="",t.kahnBackChug="",t.kahnBackFlap="",t.kahnBackRiff="",t.kahnBackRip="",t.kahnBallChange="",t.kahnBallDig="",t.kahnBrushBackward="",t.kahnBrushForward="",t.kahnChug="",t.kahnClap="",t.kahnDoubleSnap="",t.kahnDoubleWing="",t.kahnDrawStep="",t.kahnDrawTap="",t.kahnFlam="",t.kahnFlap="",t.kahnFlapStep="",t.kahnFlat="",t.kahnFleaHop="",t.kahnFleaTap="",t.kahnGraceTap="",t.kahnGraceTapChange="",t.kahnGraceTapHop="",t.kahnGraceTapStamp="",t.kahnHeel="",t.kahnHeelChange="",t.kahnHeelClick="",t.kahnHeelDrop="",t.kahnHeelStep="",t.kahnHeelTap="",t.kahnHop="",t.kahnJumpApart="",t.kahnJumpTogether="",t.kahnKneeInward="",t.kahnKneeOutward="",t.kahnLeap="",t.kahnLeapFlatFoot="",t.kahnLeapHeelClick="",t.kahnLeftCatch="",t.kahnLeftCross="",t.kahnLeftFoot="",t.kahnLeftToeStrike="",t.kahnLeftTurn="",t.kahnOverTheTop="",t.kahnOverTheTopTap="",t.kahnPull="",t.kahnPush="",t.kahnRiff="",t.kahnRiffle="",t.kahnRightCatch="",t.kahnRightCross="",t.kahnRightFoot="",t.kahnRightToeStrike="",t.kahnRightTurn="",t.kahnRip="",t.kahnRipple="",t.kahnScrape="",t.kahnScuff="",t.kahnScuffle="",t.kahnShuffle="",t.kahnSlam="",t.kahnSlap="",t.kahnSlideStep="",t.kahnSlideTap="",t.kahnSnap="",t.kahnStamp="",t.kahnStampStamp="",t.kahnStep="",t.kahnStepStamp="",t.kahnStomp="",t.kahnStompBrush="",t.kahnTap="",t.kahnToe="",t.kahnToeClick="",t.kahnToeDrop="",t.kahnToeStep="",t.kahnToeTap="",t.kahnTrench="",t.kahnWing="",t.kahnWingChange="",t.kahnZank="",t.kahnZink="",t.keyboardBebung2DotsAbove="",t.keyboardBebung2DotsBelow="",t.keyboardBebung3DotsAbove="",t.keyboardBebung3DotsBelow="",t.keyboardBebung4DotsAbove="",t.keyboardBebung4DotsBelow="",t.keyboardLeftPedalPictogram="",t.keyboardMiddlePedalPictogram="",t.keyboardPedalD="",t.keyboardPedalDot="",t.keyboardPedalE="",t.keyboardPedalHalf="",t.keyboardPedalHalf2="",t.keyboardPedalHalf3="",t.keyboardPedalHeel1="",t.keyboardPedalHeel2="",t.keyboardPedalHeel3="",t.keyboardPedalHeelToToe="",t.keyboardPedalHeelToe="",t.keyboardPedalHookEnd="",t.keyboardPedalHookStart="",t.keyboardPedalHyphen="",t.keyboardPedalP="",t.keyboardPedalParensLeft="",t.keyboardPedalParensRight="",t.keyboardPedalPed="",t.keyboardPedalS="",t.keyboardPedalSost="",t.keyboardPedalToe1="",t.keyboardPedalToe2="",t.keyboardPedalToeToHeel="",t.keyboardPedalUp="",t.keyboardPedalUpNotch="",t.keyboardPedalUpSpecial="",t.keyboardPlayWithLH="",t.keyboardPlayWithLHEnd="",t.keyboardPlayWithRH="",t.keyboardPlayWithRHEnd="",t.keyboardPluckInside="",t.keyboardRightPedalPictogram="",t.kievanAccidentalFlat="",t.kievanAccidentalSharp="",t.kievanAugmentationDot="",t.kievanCClef="",t.kievanEndingSymbol="",t.kievanNote8thStemDown="",t.kievanNote8thStemUp="",t.kievanNoteBeam="",t.kievanNoteHalfStaffLine="",t.kievanNoteHalfStaffSpace="",t.kievanNoteQuarterStemDown="",t.kievanNoteQuarterStemUp="",t.kievanNoteReciting="",t.kievanNoteWhole="",t.kievanNoteWholeFinal="",t.kodalyHandDo="",t.kodalyHandFa="",t.kodalyHandLa="",t.kodalyHandMi="",t.kodalyHandRe="",t.kodalyHandSo="",t.kodalyHandTi="",t.leftRepeatSmall="",t.legerLine="",t.legerLineNarrow="",t.legerLineWide="",t.luteBarlineEndRepeat="",t.luteBarlineFinal="",t.luteBarlineStartRepeat="",t.luteDuration16th="",t.luteDuration32nd="",t.luteDuration8th="",t.luteDurationDoubleWhole="",t.luteDurationHalf="",t.luteDurationQuarter="",t.luteDurationWhole="",t.luteFingeringRHFirst="",t.luteFingeringRHSecond="",t.luteFingeringRHThird="",t.luteFingeringRHThumb="",t.luteFrench10thCourse="",t.luteFrench7thCourse="",t.luteFrench8thCourse="",t.luteFrench9thCourse="",t.luteFrenchAppoggiaturaAbove="",t.luteFrenchAppoggiaturaBelow="",t.luteFrenchFretA="",t.luteFrenchFretB="",t.luteFrenchFretC="",t.luteFrenchFretD="",t.luteFrenchFretE="",t.luteFrenchFretF="",t.luteFrenchFretG="",t.luteFrenchFretH="",t.luteFrenchFretI="",t.luteFrenchFretK="",t.luteFrenchFretL="",t.luteFrenchFretM="",t.luteFrenchFretN="",t.luteFrenchMordentInverted="",t.luteFrenchMordentLower="",t.luteFrenchMordentUpper="",t.luteGermanALower="",t.luteGermanAUpper="",t.luteGermanBLower="",t.luteGermanBUpper="",t.luteGermanCLower="",t.luteGermanCUpper="",t.luteGermanDLower="",t.luteGermanDUpper="",t.luteGermanELower="",t.luteGermanEUpper="",t.luteGermanFLower="",t.luteGermanFUpper="",t.luteGermanGLower="",t.luteGermanGUpper="",t.luteGermanHLower="",t.luteGermanHUpper="",t.luteGermanILower="",t.luteGermanIUpper="",t.luteGermanKLower="",t.luteGermanKUpper="",t.luteGermanLLower="",t.luteGermanLUpper="",t.luteGermanMLower="",t.luteGermanMUpper="",t.luteGermanNLower="",t.luteGermanNUpper="",t.luteGermanOLower="",t.luteGermanPLower="",t.luteGermanQLower="",t.luteGermanRLower="",t.luteGermanSLower="",t.luteGermanTLower="",t.luteGermanVLower="",t.luteGermanXLower="",t.luteGermanYLower="",t.luteGermanZLower="",t.luteItalianClefCSolFaUt="",t.luteItalianClefFFaUt="",t.luteItalianFret0="",t.luteItalianFret1="",t.luteItalianFret2="",t.luteItalianFret3="",t.luteItalianFret4="",t.luteItalianFret5="",t.luteItalianFret6="",t.luteItalianFret7="",t.luteItalianFret8="",t.luteItalianFret9="",t.luteItalianHoldFinger="",t.luteItalianHoldNote="",t.luteItalianReleaseFinger="",t.luteItalianTempoFast="",t.luteItalianTempoNeitherFastNorSlow="",t.luteItalianTempoSlow="",t.luteItalianTempoSomewhatFast="",t.luteItalianTempoVerySlow="",t.luteItalianTimeTriple="",t.luteItalianTremolo="",t.luteItalianVibrato="",t.luteStaff6Lines="",t.luteStaff6LinesNarrow="",t.luteStaff6LinesWide="",t.lyricsElision="",t.lyricsElisionNarrow="",t.lyricsElisionWide="",t.lyricsHyphenBaseline="",t.lyricsHyphenBaselineNonBreaking="",t.lyricsTextRepeat="",t.medRenFlatHardB="",t.medRenFlatSoftB="",t.medRenFlatWithDot="",t.medRenGClefCMN="",t.medRenLiquescenceCMN="",t.medRenLiquescentAscCMN="",t.medRenLiquescentDescCMN="",t.medRenNatural="",t.medRenNaturalWithCross="",t.medRenOriscusCMN="",t.medRenPlicaCMN="",t.medRenPunctumCMN="",t.medRenQuilismaCMN="",t.medRenSharpCroix="",t.medRenStrophicusCMN="",t.mensuralAlterationSign="",t.mensuralBlackBrevis="",t.mensuralBlackBrevisVoid="",t.mensuralBlackDragma="",t.mensuralBlackLonga="",t.mensuralBlackMaxima="",t.mensuralBlackMinima="",t.mensuralBlackMinimaVoid="",t.mensuralBlackSemibrevis="",t.mensuralBlackSemibrevisCaudata="",t.mensuralBlackSemibrevisOblique="",t.mensuralBlackSemibrevisVoid="",t.mensuralBlackSemiminima="",t.mensuralCclef="",t.mensuralCclefPetrucciPosHigh="",t.mensuralCclefPetrucciPosHighest="",t.mensuralCclefPetrucciPosLow="",t.mensuralCclefPetrucciPosLowest="",t.mensuralCclefPetrucciPosMiddle="",t.mensuralColorationEndRound="",t.mensuralColorationEndSquare="",t.mensuralColorationStartRound="",t.mensuralColorationStartSquare="",t.mensuralCombStemDiagonal="",t.mensuralCombStemDown="",t.mensuralCombStemDownFlagExtended="",t.mensuralCombStemDownFlagFlared="",t.mensuralCombStemDownFlagFusa="",t.mensuralCombStemDownFlagLeft="",t.mensuralCombStemDownFlagRight="",t.mensuralCombStemDownFlagSemiminima="",t.mensuralCombStemUp="",t.mensuralCombStemUpFlagExtended="",t.mensuralCombStemUpFlagFlared="",t.mensuralCombStemUpFlagFusa="",t.mensuralCombStemUpFlagLeft="",t.mensuralCombStemUpFlagRight="",t.mensuralCombStemUpFlagSemiminima="",t.mensuralCustosCheckmark="",t.mensuralCustosDown="",t.mensuralCustosTurn="",t.mensuralCustosUp="",t.mensuralFclef="",t.mensuralFclefPetrucci="",t.mensuralGclef="",t.mensuralGclefPetrucci="",t.mensuralModusImperfectumVert="",t.mensuralModusPerfectumVert="",t.mensuralNoteheadLongaBlack="",t.mensuralNoteheadLongaBlackVoid="",t.mensuralNoteheadLongaVoid="",t.mensuralNoteheadLongaWhite="",t.mensuralNoteheadMaximaBlack="",t.mensuralNoteheadMaximaBlackVoid="",t.mensuralNoteheadMaximaVoid="",t.mensuralNoteheadMaximaWhite="",t.mensuralNoteheadMinimaWhite="",t.mensuralNoteheadSemibrevisBlack="",t.mensuralNoteheadSemibrevisBlackVoid="",t.mensuralNoteheadSemibrevisBlackVoidTurned="",t.mensuralNoteheadSemibrevisVoid="",t.mensuralNoteheadSemiminimaWhite="",t.mensuralObliqueAsc2ndBlack="",t.mensuralObliqueAsc2ndBlackVoid="",t.mensuralObliqueAsc2ndVoid="",t.mensuralObliqueAsc2ndWhite="",t.mensuralObliqueAsc3rdBlack="",t.mensuralObliqueAsc3rdBlackVoid="",t.mensuralObliqueAsc3rdVoid="",t.mensuralObliqueAsc3rdWhite="",t.mensuralObliqueAsc4thBlack="",t.mensuralObliqueAsc4thBlackVoid="",t.mensuralObliqueAsc4thVoid="",t.mensuralObliqueAsc4thWhite="",t.mensuralObliqueAsc5thBlack="",t.mensuralObliqueAsc5thBlackVoid="",t.mensuralObliqueAsc5thVoid="",t.mensuralObliqueAsc5thWhite="",t.mensuralObliqueDesc2ndBlack="",t.mensuralObliqueDesc2ndBlackVoid="",t.mensuralObliqueDesc2ndVoid="",t.mensuralObliqueDesc2ndWhite="",t.mensuralObliqueDesc3rdBlack="";t.mensuralObliqueDesc3rdBlackVoid="",t.mensuralObliqueDesc3rdVoid="",t.mensuralObliqueDesc3rdWhite="",t.mensuralObliqueDesc4thBlack="",t.mensuralObliqueDesc4thBlackVoid="",t.mensuralObliqueDesc4thVoid="",t.mensuralObliqueDesc4thWhite="",t.mensuralObliqueDesc5thBlack="",t.mensuralObliqueDesc5thBlackVoid="",t.mensuralObliqueDesc5thVoid="",t.mensuralObliqueDesc5thWhite="",t.mensuralProlation1="",t.mensuralProlation10="",t.mensuralProlation11="",t.mensuralProlation2="",t.mensuralProlation3="",t.mensuralProlation4="",t.mensuralProlation5="",t.mensuralProlation6="",t.mensuralProlation7="",t.mensuralProlation8="",t.mensuralProlation9="",t.mensuralProlationCombiningDot="",t.mensuralProlationCombiningDotVoid="",t.mensuralProlationCombiningStroke="",t.mensuralProlationCombiningThreeDots="",t.mensuralProlationCombiningThreeDotsTri="",t.mensuralProlationCombiningTwoDots="",t.mensuralProportion1="",t.mensuralProportion2="",t.mensuralProportion3="",t.mensuralProportion4="",t.mensuralProportion5="",t.mensuralProportion6="",t.mensuralProportion7="",t.mensuralProportion8="",t.mensuralProportion9="",t.mensuralProportionMajor="",t.mensuralProportionMinor="",t.mensuralProportionProportioDupla1="",t.mensuralProportionProportioDupla2="",t.mensuralProportionProportioQuadrupla="",t.mensuralProportionProportioTripla="",t.mensuralProportionTempusPerfectum="",t.mensuralRestBrevis="",t.mensuralRestFusa="",t.mensuralRestLongaImperfecta="",t.mensuralRestLongaPerfecta="",t.mensuralRestMaxima="",t.mensuralRestMinima="",t.mensuralRestSemibrevis="",t.mensuralRestSemifusa="",t.mensuralRestSemiminima="",t.mensuralSignumDown="",t.mensuralSignumUp="",t.mensuralTempusImperfectumHoriz="",t.mensuralTempusPerfectumHoriz="",t.mensuralWhiteBrevis="",t.mensuralWhiteFusa="",t.mensuralWhiteLonga="",t.mensuralWhiteMaxima="",t.mensuralWhiteMinima="",t.mensuralWhiteSemibrevis="",t.mensuralWhiteSemiminima="",t.metAugmentationDot="",t.metNote1024thDown="",t.metNote1024thUp="",t.metNote128thDown="",t.metNote128thUp="",t.metNote16thDown="",t.metNote16thUp="",t.metNote256thDown="",t.metNote256thUp="",t.metNote32ndDown="",t.metNote32ndUp="",t.metNote512thDown="",t.metNote512thUp="",t.metNote64thDown="",t.metNote64thUp="",t.metNote8thDown="",t.metNote8thUp="",t.metNoteDoubleWhole="",t.metNoteDoubleWholeSquare="",t.metNoteHalfDown="",t.metNoteHalfUp="",t.metNoteQuarterDown="",t.metNoteQuarterUp="",t.metNoteWhole="",t.metricModulationArrowLeft="",t.metricModulationArrowRight="",t.miscDoNotCopy="",t.miscDoNotPhotocopy="",t.miscEyeglasses="",t.note1024thDown="",t.note1024thUp="",t.note128thDown="",t.note128thUp="",t.note16thDown="",t.note16thUp="",t.note256thDown="",t.note256thUp="",t.note32ndDown="",t.note32ndUp="",t.note512thDown="",t.note512thUp="",t.note64thDown="",t.note64thUp="",t.note8thDown="",t.note8thUp="",t.noteABlack="",t.noteAFlatBlack="",t.noteAFlatHalf="",t.noteAFlatWhole="",t.noteAHalf="",t.noteASharpBlack="",t.noteASharpHalf="",t.noteASharpWhole="",t.noteAWhole="",t.noteBBlack="",t.noteBFlatBlack="",t.noteBFlatHalf="",t.noteBFlatWhole="",t.noteBHalf="",t.noteBSharpBlack="",t.noteBSharpHalf="",t.noteBSharpWhole="",t.noteBWhole="",t.noteCBlack="",t.noteCFlatBlack="",t.noteCFlatHalf="",t.noteCFlatWhole="",t.noteCHalf="",t.noteCSharpBlack="",t.noteCSharpHalf="",t.noteCSharpWhole="",t.noteCWhole="",t.noteDBlack="",t.noteDFlatBlack="",t.noteDFlatHalf="",t.noteDFlatWhole="",t.noteDHalf="",t.noteDSharpBlack="",t.noteDSharpHalf="",t.noteDSharpWhole="",t.noteDWhole="",t.noteDiBlack="",t.noteDiHalf="",t.noteDiWhole="",t.noteDoBlack="",t.noteDoHalf="",t.noteDoWhole="",t.noteDoubleWhole="",t.noteDoubleWholeSquare="",t.noteEBlack="",t.noteEFlatBlack="",t.noteEFlatHalf="",t.noteEFlatWhole="",t.noteEHalf="",t.noteESharpBlack="",t.noteESharpHalf="",t.noteESharpWhole="",t.noteEWhole="",t.noteEmptyBlack="",t.noteEmptyHalf="",t.noteEmptyWhole="",t.noteFBlack="",t.noteFFlatBlack="",t.noteFFlatHalf="",t.noteFFlatWhole="",t.noteFHalf="",t.noteFSharpBlack="",t.noteFSharpHalf="",t.noteFSharpWhole="",t.noteFWhole="",t.noteFaBlack="",t.noteFaHalf="",t.noteFaWhole="",t.noteFiBlack="",t.noteFiHalf="",t.noteFiWhole="",t.noteGBlack="",t.noteGFlatBlack="",t.noteGFlatHalf="",t.noteGFlatWhole="",t.noteGHalf="",t.noteGSharpBlack="",t.noteGSharpHalf="",t.noteGSharpWhole="",t.noteGWhole="",t.noteHBlack="",t.noteHHalf="",t.noteHSharpBlack="",t.noteHSharpHalf="",t.noteHSharpWhole="",t.noteHWhole="",t.noteHalfDown="",t.noteHalfUp="",t.noteLaBlack="",t.noteLaHalf="",t.noteLaWhole="",t.noteLeBlack="",t.noteLeHalf="",t.noteLeWhole="",t.noteLiBlack="",t.noteLiHalf="",t.noteLiWhole="",t.noteMeBlack="",t.noteMeHalf="",t.noteMeWhole="",t.noteMiBlack="",t.noteMiHalf="",t.noteMiWhole="",t.noteQuarterDown="",t.noteQuarterUp="",t.noteRaBlack="",t.noteRaHalf="",t.noteRaWhole="",t.noteReBlack="",t.noteReHalf="",t.noteReWhole="",t.noteRiBlack="",t.noteRiHalf="",t.noteRiWhole="",t.noteSeBlack="",t.noteSeHalf="",t.noteSeWhole="",t.noteShapeArrowheadLeftBlack="",t.noteShapeArrowheadLeftDoubleWhole="",t.noteShapeArrowheadLeftWhite="",t.noteShapeDiamondBlack="",t.noteShapeDiamondDoubleWhole="",t.noteShapeDiamondWhite="",t.noteShapeIsoscelesTriangleBlack="",t.noteShapeIsoscelesTriangleDoubleWhole="",t.noteShapeIsoscelesTriangleWhite="",t.noteShapeKeystoneBlack="",t.noteShapeKeystoneDoubleWhole="",t.noteShapeKeystoneWhite="",t.noteShapeMoonBlack="",t.noteShapeMoonDoubleWhole="",t.noteShapeMoonLeftBlack="",t.noteShapeMoonLeftDoubleWhole="",t.noteShapeMoonLeftWhite="",t.noteShapeMoonWhite="",t.noteShapeQuarterMoonBlack="",t.noteShapeQuarterMoonDoubleWhole="",t.noteShapeQuarterMoonWhite="",t.noteShapeRoundBlack="",t.noteShapeRoundDoubleWhole="",t.noteShapeRoundWhite="",t.noteShapeSquareBlack="",t.noteShapeSquareDoubleWhole="",t.noteShapeSquareWhite="",t.noteShapeTriangleLeftBlack="",t.noteShapeTriangleLeftDoubleWhole="",t.noteShapeTriangleLeftWhite="",t.noteShapeTriangleRightBlack="",t.noteShapeTriangleRightDoubleWhole="",t.noteShapeTriangleRightWhite="",t.noteShapeTriangleRoundBlack="",t.noteShapeTriangleRoundDoubleWhole="",t.noteShapeTriangleRoundLeftBlack="",t.noteShapeTriangleRoundLeftDoubleWhole="",t.noteShapeTriangleRoundLeftWhite="",t.noteShapeTriangleRoundWhite="",t.noteShapeTriangleUpBlack="",t.noteShapeTriangleUpDoubleWhole="",t.noteShapeTriangleUpWhite="",t.noteSiBlack="",t.noteSiHalf="",t.noteSiWhole="",t.noteSoBlack="",t.noteSoHalf="",t.noteSoWhole="",t.noteTeBlack="",t.noteTeHalf="",t.noteTeWhole="",t.noteTiBlack="",t.noteTiHalf="",t.noteTiWhole="",t.noteWhole="",t.noteheadBlack="",t.noteheadCircleSlash="",t.noteheadCircleX="",t.noteheadCircleXDoubleWhole="",t.noteheadCircleXHalf="",t.noteheadCircleXWhole="",t.noteheadCircledBlack="",t.noteheadCircledBlackLarge="",t.noteheadCircledDoubleWhole="",t.noteheadCircledDoubleWholeLarge="",t.noteheadCircledHalf="",t.noteheadCircledHalfLarge="",t.noteheadCircledWhole="",t.noteheadCircledWholeLarge="",t.noteheadCircledXLarge="",t.noteheadClusterDoubleWhole2nd="",t.noteheadClusterDoubleWhole3rd="",t.noteheadClusterDoubleWholeBottom="",t.noteheadClusterDoubleWholeMiddle="",t.noteheadClusterDoubleWholeTop="",t.noteheadClusterHalf2nd="",t.noteheadClusterHalf3rd="",t.noteheadClusterHalfBottom="",t.noteheadClusterHalfMiddle="",t.noteheadClusterHalfTop="",t.noteheadClusterQuarter2nd="",t.noteheadClusterQuarter3rd="",t.noteheadClusterQuarterBottom="",t.noteheadClusterQuarterMiddle="",t.noteheadClusterQuarterTop="",t.noteheadClusterRoundBlack="",t.noteheadClusterRoundWhite="",t.noteheadClusterSquareBlack="",t.noteheadClusterSquareWhite="",t.noteheadClusterWhole2nd="",t.noteheadClusterWhole3rd="",t.noteheadClusterWholeBottom="",t.noteheadClusterWholeMiddle="",t.noteheadClusterWholeTop="",t.noteheadCowellEleventhNoteSeriesHalf="",t.noteheadCowellEleventhNoteSeriesWhole="",t.noteheadCowellEleventhSeriesBlack="",t.noteheadCowellFifteenthNoteSeriesBlack="",t.noteheadCowellFifteenthNoteSeriesHalf="",t.noteheadCowellFifteenthNoteSeriesWhole="",t.noteheadCowellFifthNoteSeriesBlack="",t.noteheadCowellFifthNoteSeriesHalf="",t.noteheadCowellFifthNoteSeriesWhole="",t.noteheadCowellNinthNoteSeriesBlack="",t.noteheadCowellNinthNoteSeriesHalf="",t.noteheadCowellNinthNoteSeriesWhole="",t.noteheadCowellSeventhNoteSeriesBlack="",t.noteheadCowellSeventhNoteSeriesHalf="",t.noteheadCowellSeventhNoteSeriesWhole="",t.noteheadCowellThirdNoteSeriesBlack="",t.noteheadCowellThirdNoteSeriesHalf="",t.noteheadCowellThirdNoteSeriesWhole="",t.noteheadCowellThirteenthNoteSeriesBlack="",t.noteheadCowellThirteenthNoteSeriesHalf="",t.noteheadCowellThirteenthNoteSeriesWhole="",t.noteheadDiamondBlack="",t.noteheadDiamondBlackOld="",t.noteheadDiamondBlackWide="",t.noteheadDiamondClusterBlack2nd="",t.noteheadDiamondClusterBlack3rd="",t.noteheadDiamondClusterBlackBottom="",t.noteheadDiamondClusterBlackMiddle="",t.noteheadDiamondClusterBlackTop="",t.noteheadDiamondClusterWhite2nd="",t.noteheadDiamondClusterWhite3rd="",t.noteheadDiamondClusterWhiteBottom="",t.noteheadDiamondClusterWhiteMiddle="",t.noteheadDiamondClusterWhiteTop="",t.noteheadDiamondDoubleWhole="",t.noteheadDiamondDoubleWholeOld="",t.noteheadDiamondHalf="",t.noteheadDiamondHalfFilled="",t.noteheadDiamondHalfOld="",t.noteheadDiamondHalfWide="",t.noteheadDiamondOpen="",t.noteheadDiamondWhite="",t.noteheadDiamondWhiteWide="",t.noteheadDiamondWhole="",t.noteheadDiamondWholeOld="",t.noteheadDoubleWhole="",t.noteheadDoubleWholeSquare="",t.noteheadDoubleWholeWithX="",t.noteheadHalf="",t.noteheadHalfFilled="",t.noteheadHalfWithX="",t.noteheadHeavyX="",t.noteheadHeavyXHat="",t.noteheadLargeArrowDownBlack="",t.noteheadLargeArrowDownDoubleWhole="",t.noteheadLargeArrowDownHalf="",t.noteheadLargeArrowDownWhole="",t.noteheadLargeArrowUpBlack="",t.noteheadLargeArrowUpDoubleWhole="",t.noteheadLargeArrowUpHalf="",t.noteheadLargeArrowUpWhole="",t.noteheadMoonBlack="",t.noteheadMoonWhite="",t.noteheadNancarrowSine="",t.noteheadNull="",t.noteheadParenthesis="",t.noteheadParenthesisLeft="",t.noteheadParenthesisRight="",t.noteheadPlusBlack="",t.noteheadPlusDoubleWhole="",t.noteheadPlusHalf="",t.noteheadPlusWhole="",t.noteheadRectangularClusterBlackBottom="",t.noteheadRectangularClusterBlackMiddle="",t.noteheadRectangularClusterBlackTop="",t.noteheadRectangularClusterWhiteBottom="",t.noteheadRectangularClusterWhiteMiddle="",t.noteheadRectangularClusterWhiteTop="",t.noteheadRoundBlack="",t.noteheadRoundBlackDoubleSlashed="",t.noteheadRoundBlackLarge="",t.noteheadRoundBlackSlashed="",t.noteheadRoundBlackSlashedLarge="",t.noteheadRoundWhite="",t.noteheadRoundWhiteDoubleSlashed="",t.noteheadRoundWhiteLarge="",t.noteheadRoundWhiteSlashed="",t.noteheadRoundWhiteSlashedLarge="",t.noteheadRoundWhiteWithDot="",t.noteheadRoundWhiteWithDotLarge="",t.noteheadSlashDiamondWhite="",t.noteheadSlashHorizontalEnds="",t.noteheadSlashHorizontalEndsMuted="",t.noteheadSlashVerticalEnds="",t.noteheadSlashVerticalEndsMuted="",t.noteheadSlashVerticalEndsSmall="",t.noteheadSlashWhiteDoubleWhole="",t.noteheadSlashWhiteHalf="",t.noteheadSlashWhiteMuted="",t.noteheadSlashWhiteWhole="",t.noteheadSlashX="",t.noteheadSlashedBlack1="",t.noteheadSlashedBlack2="",t.noteheadSlashedDoubleWhole1="",t.noteheadSlashedDoubleWhole2="",t.noteheadSlashedHalf1="",t.noteheadSlashedHalf2="",t.noteheadSlashedWhole1="",t.noteheadSlashedWhole2="",t.noteheadSquareBlack="",t.noteheadSquareBlackLarge="",t.noteheadSquareBlackWhite="",t.noteheadSquareWhite="",t.noteheadTriangleDownBlack="",t.noteheadTriangleDownDoubleWhole="",t.noteheadTriangleDownHalf="",t.noteheadTriangleDownWhite="",t.noteheadTriangleDownWhole="",t.noteheadTriangleLeftBlack="",t.noteheadTriangleLeftWhite="",t.noteheadTriangleRightBlack="",t.noteheadTriangleRightWhite="",t.noteheadTriangleRoundDownBlack="",t.noteheadTriangleRoundDownWhite="",t.noteheadTriangleUpBlack="",t.noteheadTriangleUpDoubleWhole="",t.noteheadTriangleUpHalf="",t.noteheadTriangleUpRightBlack="",t.noteheadTriangleUpRightWhite="",t.noteheadTriangleUpWhite="",t.noteheadTriangleUpWhole="",t.noteheadVoidWithX="",t.noteheadWhole="",t.noteheadWholeFilled="",t.noteheadWholeWithX="",t.noteheadXBlack="",t.noteheadXDoubleWhole="",t.noteheadXHalf="",t.noteheadXOrnate="",t.noteheadXOrnateEllipse="",t.noteheadXWhole="",t.octaveBaselineA="",t.octaveBaselineB="",t.octaveBaselineM="",t.octaveBaselineV="",t.octaveBassa="",t.octaveLoco="",t.octaveParensLeft="",t.octaveParensRight="",t.octaveSuperscriptA="",t.octaveSuperscriptB="",t.octaveSuperscriptM="",t.octaveSuperscriptV="",t.oneHandedRollStevens="",t.organGerman2Fusae="",t.organGerman2Minimae="",t.organGerman2OctaveUp="",t.organGerman2Semifusae="",t.organGerman2Semiminimae="",t.organGerman3Fusae="",t.organGerman3Minimae="",t.organGerman3Semifusae="",t.organGerman3Semiminimae="",t.organGerman4Fusae="",t.organGerman4Minimae="",t.organGerman4Semifusae="",t.organGerman4Semiminimae="",t.organGerman5Fusae="",t.organGerman5Minimae="",t.organGerman5Semifusae="",t.organGerman5Semiminimae="",t.organGerman6Fusae="",t.organGerman6Minimae="",t.organGerman6Semifusae="",t.organGerman6Semiminimae="",t.organGermanALower="",t.organGermanAUpper="",t.organGermanAugmentationDot="",t.organGermanBLower="",t.organGermanBUpper="",t.organGermanBuxheimerBrevis2="",t.organGermanBuxheimerBrevis3="",t.organGermanBuxheimerMinimaRest="",t.organGermanBuxheimerSemibrevis="",t.organGermanBuxheimerSemibrevisRest="",t.organGermanCLower="",t.organGermanCUpper="",t.organGermanCisLower="",t.organGermanCisUpper="",t.organGermanDLower="",t.organGermanDUpper="",t.organGermanDisLower="",t.organGermanDisUpper="",t.organGermanELower="",t.organGermanEUpper="",t.organGermanFLower="",t.organGermanFUpper="",t.organGermanFisLower="",t.organGermanFisUpper="",t.organGermanFusa="",t.organGermanFusaRest="",t.organGermanGLower="",t.organGermanGUpper="",t.organGermanGisLower="",t.organGermanGisUpper="",t.organGermanHLower="",t.organGermanHUpper="",t.organGermanMinima="",t.organGermanMinimaRest="",t.organGermanOctaveDown="",t.organGermanOctaveUp="",t.organGermanSemibrevis="",t.organGermanSemibrevisRest="",t.organGermanSemifusa="",t.organGermanSemifusaRest="",t.organGermanSemiminima="",t.organGermanSemiminimaRest="",t.organGermanTie="",t.ornamentBottomLeftConcaveStroke="",t.ornamentBottomLeftConcaveStrokeLarge="",t.ornamentBottomLeftConvexStroke="",t.ornamentBottomRightConcaveStroke="",t.ornamentBottomRightConvexStroke="",t.ornamentComma="",t.ornamentDoubleObliqueLinesAfterNote="",t.ornamentDoubleObliqueLinesBeforeNote="",t.ornamentDownCurve="",t.ornamentHaydn="",t.ornamentHighLeftConcaveStroke="",t.ornamentHighLeftConvexStroke="",t.ornamentHighRightConcaveStroke="",t.ornamentHighRightConvexStroke="",t.ornamentHookAfterNote="",t.ornamentHookBeforeNote="",t.ornamentLeftFacingHalfCircle="",t.ornamentLeftFacingHook="",t.ornamentLeftPlus="",t.ornamentLeftShakeT="",t.ornamentLeftVerticalStroke="",t.ornamentLeftVerticalStrokeWithCross="",t.ornamentLowLeftConcaveStroke="",t.ornamentLowLeftConvexStroke="",t.ornamentLowRightConcaveStroke="",t.ornamentLowRightConvexStroke="",t.ornamentMiddleVerticalStroke="",t.ornamentMordent="",t.ornamentObliqueLineAfterNote="",t.ornamentObliqueLineBeforeNote="",t.ornamentObliqueLineHorizAfterNote="",t.ornamentObliqueLineHorizBeforeNote="",t.ornamentOriscus="",t.ornamentPinceCouperin="",t.ornamentPortDeVoixV="",t.ornamentPrecompAppoggTrill="",t.ornamentPrecompAppoggTrillSuffix="",t.ornamentPrecompCadence="",t.ornamentPrecompCadenceUpperPrefix="",t.ornamentPrecompCadenceUpperPrefixTurn="",t.ornamentPrecompCadenceWithTurn="",t.ornamentPrecompDescendingSlide="",t.ornamentPrecompDoubleCadenceLowerPrefix="",t.ornamentPrecompDoubleCadenceUpperPrefix="",t.ornamentPrecompDoubleCadenceUpperPrefixTurn="",t.ornamentPrecompInvertedMordentUpperPrefix="",t.ornamentPrecompMordentRelease="",t.ornamentPrecompMordentUpperPrefix="",t.ornamentPrecompPortDeVoixMordent="",t.ornamentPrecompSlide="",t.ornamentPrecompSlideTrillBach="",t.ornamentPrecompSlideTrillDAnglebert="",t.ornamentPrecompSlideTrillMarpurg="",t.ornamentPrecompSlideTrillMuffat="",t.ornamentPrecompSlideTrillSuffixMuffat="",t.ornamentPrecompTrillLowerSuffix="",t.ornamentPrecompTrillSuffixDandrieu="",t.ornamentPrecompTrillWithMordent="",t.ornamentPrecompTurnTrillBach="",t.ornamentPrecompTurnTrillDAnglebert="",t.ornamentQuilisma="",t.ornamentRightFacingHalfCircle="",t.ornamentRightFacingHook="",t.ornamentRightVerticalStroke="",t.ornamentSchleifer="",t.ornamentShake3="",t.ornamentShakeMuffat1="",t.ornamentShortObliqueLineAfterNote="",t.ornamentShortObliqueLineBeforeNote="",t.ornamentShortTrill="",t.ornamentTopLeftConcaveStroke="",t.ornamentTopLeftConvexStroke="",t.ornamentTopRightConcaveStroke="",t.ornamentTopRightConvexStroke="",t.ornamentTremblement="",t.ornamentTremblementCouperin="",t.ornamentTrill="",t.ornamentTurn="",t.ornamentTurnInverted="",t.ornamentTurnSlash="",t.ornamentTurnUp="",t.ornamentTurnUpS="",t.ornamentUpCurve="",t.ornamentVerticalLine="",t.ornamentZigZagLineNoRightEnd="",t.ornamentZigZagLineWithRightEnd="",t.ottava="",t.ottavaAlta="",t.ottavaBassa="",t.ottavaBassaBa="",t.ottavaBassaVb="",t.pendereckiTremolo="",t.pictAgogo="",t.pictAlmglocken="",t.pictAnvil="",t.pictBambooChimes="",t.pictBambooScraper="",t.pictBassDrum="",t.pictBassDrumOnSide="",t.pictBeaterBow="",t.pictBeaterBox="",t.pictBeaterBrassMalletsDown="",t.pictBeaterBrassMalletsLeft="",t.pictBeaterBrassMalletsRight="",t.pictBeaterBrassMalletsUp="",t.pictBeaterCombiningDashedCircle="",t.pictBeaterCombiningParentheses="",t.pictBeaterDoubleBassDrumDown="",t.pictBeaterDoubleBassDrumUp="",t.pictBeaterFinger="",t.pictBeaterFingernails="",t.pictBeaterFist="",t.pictBeaterGuiroScraper="",t.pictBeaterHammer="",t.pictBeaterHammerMetalDown="",t.pictBeaterHammerMetalUp="",t.pictBeaterHammerPlasticDown="",t.pictBeaterHammerPlasticUp="",t.pictBeaterHammerWoodDown="",t.pictBeaterHammerWoodUp="",t.pictBeaterHand="",t.pictBeaterHardBassDrumDown="",t.pictBeaterHardBassDrumUp="",t.pictBeaterHardGlockenspielDown="",t.pictBeaterHardGlockenspielLeft="",t.pictBeaterHardGlockenspielRight="",t.pictBeaterHardGlockenspielUp="",t.pictBeaterHardTimpaniDown="",t.pictBeaterHardTimpaniLeft="",t.pictBeaterHardTimpaniRight="",t.pictBeaterHardTimpaniUp="",t.pictBeaterHardXylophoneDown="",t.pictBeaterHardXylophoneLeft="",t.pictBeaterHardXylophoneRight="",t.pictBeaterHardXylophoneUp="",t.pictBeaterHardYarnDown="",t.pictBeaterHardYarnLeft="",t.pictBeaterHardYarnRight="",t.pictBeaterHardYarnUp="",t.pictBeaterJazzSticksDown="",t.pictBeaterJazzSticksUp="",t.pictBeaterKnittingNeedle="",t.pictBeaterMallet="",t.pictBeaterMalletDown="",t.pictBeaterMediumBassDrumDown="",t.pictBeaterMediumBassDrumUp="",t.pictBeaterMediumTimpaniDown="",t.pictBeaterMediumTimpaniLeft="",t.pictBeaterMediumTimpaniRight="",t.pictBeaterMediumTimpaniUp="",t.pictBeaterMediumXylophoneDown="",t.pictBeaterMediumXylophoneLeft="",t.pictBeaterMediumXylophoneRight="",t.pictBeaterMediumXylophoneUp="",t.pictBeaterMediumYarnDown="",t.pictBeaterMediumYarnLeft="",t.pictBeaterMediumYarnRight="",t.pictBeaterMediumYarnUp="",t.pictBeaterMetalBassDrumDown="",t.pictBeaterMetalBassDrumUp="",t.pictBeaterMetalDown="",t.pictBeaterMetalHammer="",t.pictBeaterMetalLeft="",t.pictBeaterMetalRight="",t.pictBeaterMetalUp="",t.pictBeaterSnareSticksDown="",t.pictBeaterSnareSticksUp="",t.pictBeaterSoftBassDrumDown="",t.pictBeaterSoftBassDrumUp="",t.pictBeaterSoftGlockenspielDown="",t.pictBeaterSoftGlockenspielLeft="",t.pictBeaterSoftGlockenspielRight="",t.pictBeaterSoftGlockenspielUp="",t.pictBeaterSoftTimpaniDown="",t.pictBeaterSoftTimpaniLeft="",t.pictBeaterSoftTimpaniRight="",t.pictBeaterSoftTimpaniUp="",t.pictBeaterSoftXylophone="",t.pictBeaterSoftXylophoneDown="",t.pictBeaterSoftXylophoneLeft="",t.pictBeaterSoftXylophoneRight="",t.pictBeaterSoftXylophoneUp="",t.pictBeaterSoftYarnDown="",t.pictBeaterSoftYarnLeft="",t.pictBeaterSoftYarnRight="",t.pictBeaterSoftYarnUp="",t.pictBeaterSpoonWoodenMallet="",t.pictBeaterSuperballDown="",t.pictBeaterSuperballLeft="",t.pictBeaterSuperballRight="",t.pictBeaterSuperballUp="",t.pictBeaterTriangleDown="",t.pictBeaterTrianglePlain="",t.pictBeaterTriangleUp="",t.pictBeaterWireBrushesDown="",t.pictBeaterWireBrushesUp="",t.pictBeaterWoodTimpaniDown="",t.pictBeaterWoodTimpaniLeft="",t.pictBeaterWoodTimpaniRight="",t.pictBeaterWoodTimpaniUp="",t.pictBeaterWoodXylophoneDown="",t.pictBeaterWoodXylophoneLeft="",t.pictBeaterWoodXylophoneRight="",t.pictBeaterWoodXylophoneUp="",t.pictBell="",t.pictBellOfCymbal="",t.pictBellPlate="",t.pictBellTree="",t.pictBirdWhistle="",t.pictBoardClapper="",t.pictBongos="",t.pictBrakeDrum="",t.pictCabasa="",t.pictCannon="",t.pictCarHorn="",t.pictCastanets="",t.pictCastanetsWithHandle="",t.pictCelesta="",t.pictCencerro="",t.pictCenter1="",t.pictCenter2="",t.pictCenter3="",t.pictChainRattle="",t.pictChimes="",t.pictChineseCymbal="",t.pictChokeCymbal="",t.pictClaves="",t.pictCoins="",t.pictConga="",t.pictCowBell="",t.pictCrashCymbals="",t.pictCrotales="",t.pictCrushStem="",t.pictCuica="",t.pictCymbalTongs="",t.pictDamp1="",t.pictDamp2="",t.pictDamp3="",t.pictDamp4="",t.pictDeadNoteStem="",t.pictDrumStick="",t.pictDuckCall="",t.pictEdgeOfCymbal="",t.pictEmptyTrap="",t.pictFingerCymbals="",t.pictFlexatone="",t.pictFootballRatchet="",t.pictGlassHarmonica="",t.pictGlassHarp="",t.pictGlassPlateChimes="",t.pictGlassTubeChimes="",t.pictGlsp="",t.pictGlspSmithBrindle="",t.pictGobletDrum="",t.pictGong="",t.pictGongWithButton="",t.pictGuiro="",t.pictGumHardDown="",t.pictGumHardLeft="",t.pictGumHardRight="",t.pictGumHardUp="",t.pictGumMediumDown="";t.pictGumMediumLeft="",t.pictGumMediumRight="",t.pictGumMediumUp="",t.pictGumSoftDown="",t.pictGumSoftLeft="",t.pictGumSoftRight="",t.pictGumSoftUp="",t.pictHalfOpen1="",t.pictHalfOpen2="",t.pictHandbell="",t.pictHiHat="",t.pictHiHatOnStand="",t.pictJawHarp="",t.pictJingleBells="",t.pictKlaxonHorn="",t.pictLeftHandCircle="",t.pictLionsRoar="",t.pictLithophone="",t.pictLogDrum="",t.pictLotusFlute="",t.pictMar="",t.pictMarSmithBrindle="",t.pictMaraca="",t.pictMaracas="",t.pictMegaphone="",t.pictMetalPlateChimes="",t.pictMetalTubeChimes="",t.pictMusicalSaw="",t.pictNormalPosition="",t.pictOnRim="",t.pictOpen="",t.pictOpenRimShot="",t.pictPistolShot="",t.pictPoliceWhistle="",t.pictQuijada="",t.pictRainstick="",t.pictRatchet="",t.pictRecoReco="",t.pictRightHandSquare="",t.pictRim1="",t.pictRim2="",t.pictRim3="",t.pictRimShotOnStem="",t.pictSandpaperBlocks="",t.pictScrapeAroundRim="",t.pictScrapeAroundRimClockwise="",t.pictScrapeCenterToEdge="",t.pictScrapeEdgeToCenter="",t.pictShellBells="",t.pictShellChimes="",t.pictSiren="",t.pictSistrum="",t.pictSizzleCymbal="",t.pictSleighBell="",t.pictSlideBrushOnGong="",t.pictSlideWhistle="",t.pictSlitDrum="",t.pictSnareDrum="",t.pictSnareDrumMilitary="",t.pictSnareDrumSnaresOff="",t.pictSteelDrums="",t.pictStickShot="",t.pictSuperball="",t.pictSuspendedCymbal="",t.pictSwishStem="",t.pictTabla="",t.pictTamTam="",t.pictTamTamWithBeater="",t.pictTambourine="",t.pictTempleBlocks="",t.pictTenorDrum="",t.pictThundersheet="",t.pictTimbales="",t.pictTimpani="",t.pictTomTom="",t.pictTomTomChinese="",t.pictTomTomIndoAmerican="",t.pictTomTomJapanese="",t.pictTriangle="",t.pictTubaphone="",t.pictTubularBells="",t.pictTurnLeftStem="",t.pictTurnRightLeftStem="",t.pictTurnRightStem="",t.pictVib="",t.pictVibMotorOff="",t.pictVibSmithBrindle="",t.pictVibraslap="",t.pictVietnameseHat="",t.pictWhip="",t.pictWindChimesGlass="",t.pictWindMachine="",t.pictWindWhistle="",t.pictWoodBlock="",t.pictWoundHardDown="",t.pictWoundHardLeft="",t.pictWoundHardRight="",t.pictWoundHardUp="",t.pictWoundSoftDown="",t.pictWoundSoftLeft="",t.pictWoundSoftRight="",t.pictWoundSoftUp="",t.pictXyl="",t.pictXylBass="",t.pictXylSmithBrindle="",t.pictXylTenor="",t.pictXylTenorTrough="",t.pictXylTrough="",t.pluckedBuzzPizzicato="",t.pluckedDamp="",t.pluckedDampAll="",t.pluckedDampOnStem="",t.pluckedFingernailFlick="",t.pluckedLeftHandPizzicato="",t.pluckedPlectrum="",t.pluckedSnapPizzicatoAbove="",t.pluckedSnapPizzicatoBelow="",t.pluckedWithFingernails="",t.quindicesima="",t.quindicesimaAlta="",t.quindicesimaBassa="",t.quindicesimaBassaMb="",t.repeat1Bar="",t.repeat2Bars="",t.repeat4Bars="",t.repeatBarLowerDot="",t.repeatBarSlash="",t.repeatBarUpperDot="",t.repeatDot="",t.repeatDots="",t.repeatLeft="",t.repeatRight="",t.repeatRightLeft="",t.rest1024th="",t.rest128th="",t.rest16th="",t.rest256th="",t.rest32nd="",t.rest512th="",t.rest64th="",t.rest8th="",t.restDoubleWhole="",t.restDoubleWholeLegerLine="",t.restHBar="",t.restHBarLeft="",t.restHBarMiddle="",t.restHBarRight="",t.restHalf="",t.restHalfLegerLine="",t.restLonga="",t.restMaxima="",t.restQuarter="",t.restQuarterOld="",t.restQuarterZ="",t.restWhole="",t.restWholeLegerLine="",t.reversedBrace="",t.reversedBracketBottom="",t.reversedBracketTop="",t.rightRepeatSmall="",t.scaleDegree1="",t.scaleDegree2="",t.scaleDegree3="",t.scaleDegree4="",t.scaleDegree5="",t.scaleDegree6="",t.scaleDegree7="",t.scaleDegree8="",t.scaleDegree9="",t.schaefferClef="",t.schaefferFClefToGClef="",t.schaefferGClefToFClef="",t.schaefferPreviousClef="",t.segno="",t.segnoSerpent1="",t.segnoSerpent2="",t.semipitchedPercussionClef1="",t.semipitchedPercussionClef2="",t.smnFlat="",t.smnFlatWhite="",t.smnHistoryDoubleFlat="",t.smnHistoryDoubleSharp="",t.smnHistoryFlat="",t.smnHistorySharp="",t.smnNatural="",t.smnSharp="",t.smnSharpDown="",t.smnSharpWhite="",t.smnSharpWhiteDown="",t.splitBarDivider="",t.staff1Line="",t.staff1LineNarrow="",t.staff1LineWide="",t.staff2Lines="",t.staff2LinesNarrow="",t.staff2LinesWide="",t.staff3Lines="",t.staff3LinesNarrow="",t.staff3LinesWide="",t.staff4Lines="",t.staff4LinesNarrow="",t.staff4LinesWide="",t.staff5Lines="",t.staff5LinesNarrow="",t.staff5LinesWide="",t.staff6Lines="",t.staff6LinesNarrow="",t.staff6LinesWide="",t.staffDivideArrowDown="",t.staffDivideArrowUp="",t.staffDivideArrowUpDown="",t.staffPosLower1="",t.staffPosLower2="",t.staffPosLower3="",t.staffPosLower4="",t.staffPosLower5="",t.staffPosLower6="",t.staffPosLower7="",t.staffPosLower8="",t.staffPosRaise1="",t.staffPosRaise2="",t.staffPosRaise3="",t.staffPosRaise4="",t.staffPosRaise5="",t.staffPosRaise6="",t.staffPosRaise7="",t.staffPosRaise8="",t.stem="",t.stemBowOnBridge="",t.stemBowOnTailpiece="",t.stemBuzzRoll="",t.stemDamp="",t.stemHarpStringNoise="",t.stemMultiphonicsBlack="",t.stemMultiphonicsBlackWhite="",t.stemMultiphonicsWhite="",t.stemPendereckiTremolo="",t.stemRimShot="",t.stemSprechgesang="",t.stemSulPonticello="",t.stemSussurando="",t.stemSwished="",t.stemVibratoPulse="",t.stockhausenTremolo="",t.stringsBowBehindBridge="",t.stringsBowBehindBridgeFourStrings="",t.stringsBowBehindBridgeOneString="",t.stringsBowBehindBridgeThreeStrings="",t.stringsBowBehindBridgeTwoStrings="",t.stringsBowOnBridge="",t.stringsBowOnTailpiece="",t.stringsChangeBowDirection="",t.stringsDownBow="",t.stringsDownBowAwayFromBody="",t.stringsDownBowBeyondBridge="",t.stringsDownBowTowardsBody="",t.stringsDownBowTurned="",t.stringsFouette="",t.stringsHalfHarmonic="",t.stringsHarmonic="",t.stringsJeteAbove="",t.stringsJeteBelow="",t.stringsMuteOff="",t.stringsMuteOn="",t.stringsOverpressureDownBow="",t.stringsOverpressureNoDirection="",t.stringsOverpressurePossibileDownBow="",t.stringsOverpressurePossibileUpBow="",t.stringsOverpressureUpBow="",t.stringsScrapeCircularClockwise="",t.stringsScrapeCircularCounterclockwise="",t.stringsScrapeParallelInward="",t.stringsScrapeParallelOutward="",t.stringsThumbPosition="",t.stringsThumbPositionTurned="",t.stringsTripleChopInward="",t.stringsTripleChopOutward="",t.stringsUpBow="",t.stringsUpBowAwayFromBody="",t.stringsUpBowBeyondBridge="",t.stringsUpBowTowardsBody="",t.stringsUpBowTurned="",t.stringsVibratoPulse="",t.swissRudimentsNoteheadBlackDouble="",t.swissRudimentsNoteheadBlackFlam="",t.swissRudimentsNoteheadHalfDouble="",t.swissRudimentsNoteheadHalfFlam="",t.systemDivider="",t.systemDividerExtraLong="",t.systemDividerLong="",t.textAugmentationDot="",t.textBlackNoteFrac16thLongStem="",t.textBlackNoteFrac16thShortStem="",t.textBlackNoteFrac32ndLongStem="",t.textBlackNoteFrac8thLongStem="",t.textBlackNoteFrac8thShortStem="",t.textBlackNoteLongStem="",t.textBlackNoteShortStem="",t.textCont16thBeamLongStem="",t.textCont16thBeamShortStem="",t.textCont32ndBeamLongStem="",t.textCont8thBeamLongStem="",t.textCont8thBeamShortStem="",t.textHeadlessBlackNoteFrac16thLongStem="",t.textHeadlessBlackNoteFrac16thShortStem="",t.textHeadlessBlackNoteFrac32ndLongStem="",t.textHeadlessBlackNoteFrac8thLongStem="",t.textHeadlessBlackNoteFrac8thShortStem="",t.textHeadlessBlackNoteLongStem="",t.textHeadlessBlackNoteShortStem="",t.textTie="",t.textTuplet3LongStem="",t.textTuplet3ShortStem="",t.textTupletBracketEndLongStem="",t.textTupletBracketEndShortStem="",t.textTupletBracketStartLongStem="",t.textTupletBracketStartShortStem="",t.timeSig0="",t.timeSig0Reversed="",t.timeSig0Turned="",t.timeSig1="",t.timeSig1Reversed="",t.timeSig1Turned="",t.timeSig2="",t.timeSig2Reversed="",t.timeSig2Turned="",t.timeSig3="",t.timeSig3Reversed="",t.timeSig3Turned="",t.timeSig4="",t.timeSig4Reversed="",t.timeSig4Turned="",t.timeSig5="",t.timeSig5Reversed="",t.timeSig5Turned="",t.timeSig6="",t.timeSig6Reversed="",t.timeSig6Turned="",t.timeSig7="",t.timeSig7Reversed="",t.timeSig7Turned="",t.timeSig8="",t.timeSig8Reversed="",t.timeSig8Turned="",t.timeSig9="",t.timeSig9Reversed="",t.timeSig9Turned="",t.timeSigBracketLeft="",t.timeSigBracketLeftSmall="",t.timeSigBracketRight="",t.timeSigBracketRightSmall="",t.timeSigCombDenominator="",t.timeSigCombNumerator="",t.timeSigComma="",t.timeSigCommon="",t.timeSigCommonReversed="",t.timeSigCommonTurned="",t.timeSigCut2="",t.timeSigCut3="",t.timeSigCutCommon="",t.timeSigCutCommonReversed="",t.timeSigCutCommonTurned="",t.timeSigEquals="",t.timeSigFractionHalf="",t.timeSigFractionOneThird="",t.timeSigFractionQuarter="",t.timeSigFractionThreeQuarters="",t.timeSigFractionTwoThirds="",t.timeSigFractionalSlash="",t.timeSigMinus="",t.timeSigMultiply="",t.timeSigOpenPenderecki="",t.timeSigParensLeft="",t.timeSigParensLeftSmall="",t.timeSigParensRight="",t.timeSigParensRightSmall="",t.timeSigPlus="",t.timeSigPlusSmall="",t.timeSigSlash="",t.timeSigX="",t.tremolo1="",t.tremolo2="",t.tremolo3="",t.tremolo4="",t.tremolo5="",t.tremoloDivisiDots2="",t.tremoloDivisiDots3="",t.tremoloDivisiDots4="",t.tremoloDivisiDots6="",t.tremoloFingered1="",t.tremoloFingered2="",t.tremoloFingered3="",t.tremoloFingered4="",t.tremoloFingered5="",t.tripleTongueAbove="",t.tripleTongueBelow="",t.tuplet0="",t.tuplet1="",t.tuplet2="",t.tuplet3="",t.tuplet4="",t.tuplet5="",t.tuplet6="",t.tuplet7="",t.tuplet8="",t.tuplet9="",t.tupletColon="",t.unmeasuredTremolo="",t.unmeasuredTremoloSimple="",t.unpitchedPercussionClef1="",t.unpitchedPercussionClef2="",t.ventiduesima="",t.ventiduesimaAlta="",t.ventiduesimaBassa="",t.ventiduesimaBassaMb="",t.vocalFingerClickStockhausen="",t.vocalHalbGesungen="",t.vocalMouthClosed="",t.vocalMouthOpen="",t.vocalMouthPursed="",t.vocalMouthSlightlyOpen="",t.vocalMouthWideOpen="",t.vocalNasalVoice="",t.vocalSprechgesang="",t.vocalTongueClickStockhausen="",t.vocalTongueFingerClickStockhausen="",t.vocalsSussurando="",t.wiggleArpeggiatoDown="",t.wiggleArpeggiatoDownArrow="",t.wiggleArpeggiatoDownSwash="",t.wiggleArpeggiatoUp="",t.wiggleArpeggiatoUpArrow="",t.wiggleArpeggiatoUpSwash="",t.wiggleCircular="",t.wiggleCircularConstant="",t.wiggleCircularConstantFlipped="",t.wiggleCircularConstantFlippedLarge="",t.wiggleCircularConstantLarge="",t.wiggleCircularEnd="",t.wiggleCircularLarge="",t.wiggleCircularLarger="",t.wiggleCircularLargerStill="",t.wiggleCircularLargest="",t.wiggleCircularSmall="",t.wiggleCircularStart="",t.wiggleGlissando="",t.wiggleGlissandoGroup1="",t.wiggleGlissandoGroup2="",t.wiggleGlissandoGroup3="",t.wiggleRandom1="",t.wiggleRandom2="",t.wiggleRandom3="",t.wiggleRandom4="",t.wiggleSawtooth="",t.wiggleSawtoothNarrow="",t.wiggleSawtoothWide="",t.wiggleSquareWave="",t.wiggleSquareWaveNarrow="",t.wiggleSquareWaveWide="",t.wiggleTrill="",t.wiggleTrillFast="",t.wiggleTrillFaster="",t.wiggleTrillFasterStill="",t.wiggleTrillFastest="",t.wiggleTrillSlow="",t.wiggleTrillSlower="",t.wiggleTrillSlowerStill="",t.wiggleTrillSlowest="",t.wiggleVIbratoLargestSlower="",t.wiggleVIbratoMediumSlower="",t.wiggleVibrato="",t.wiggleVibratoLargeFast="",t.wiggleVibratoLargeFaster="",t.wiggleVibratoLargeFasterStill="",t.wiggleVibratoLargeFastest="",t.wiggleVibratoLargeSlow="",t.wiggleVibratoLargeSlower="",t.wiggleVibratoLargeSlowest="",t.wiggleVibratoLargestFast="",t.wiggleVibratoLargestFaster="",t.wiggleVibratoLargestFasterStill="",t.wiggleVibratoLargestFastest="",t.wiggleVibratoLargestSlow="",t.wiggleVibratoLargestSlowest="",t.wiggleVibratoMediumFast="",t.wiggleVibratoMediumFaster="",t.wiggleVibratoMediumFasterStill="",t.wiggleVibratoMediumFastest="",t.wiggleVibratoMediumSlow="",t.wiggleVibratoMediumSlowest="",t.wiggleVibratoSmallFast="",t.wiggleVibratoSmallFaster="",t.wiggleVibratoSmallFasterStill="",t.wiggleVibratoSmallFastest="",t.wiggleVibratoSmallSlow="",t.wiggleVibratoSmallSlower="",t.wiggleVibratoSmallSlowest="",t.wiggleVibratoSmallestFast="",t.wiggleVibratoSmallestFaster="",t.wiggleVibratoSmallestFasterStill="",t.wiggleVibratoSmallestFastest="",t.wiggleVibratoSmallestSlow="",t.wiggleVibratoSmallestSlower="",t.wiggleVibratoSmallestSlowest="",t.wiggleVibratoStart="",t.wiggleVibratoWide="",t.wiggleWavy="",t.wiggleWavyNarrow="",t.wiggleWavyWide="",t.windClosedHole="",t.windFlatEmbouchure="",t.windHalfClosedHole1="",t.windHalfClosedHole2="",t.windHalfClosedHole3="",t.windLessRelaxedEmbouchure="",t.windLessTightEmbouchure="",t.windMouthpiecePop="",t.windMultiphonicsBlackStem="",t.windMultiphonicsBlackWhiteStem="",t.windMultiphonicsWhiteStem="",t.windOpenHole="",t.windReedPositionIn="",t.windReedPositionNormal="",t.windReedPositionOut="",t.windRelaxedEmbouchure="",t.windRimOnly="",t.windSharpEmbouchure="",t.windStrongAirPressure="",t.windThreeQuartersClosedHole="",t.windTightEmbouchure="",t.windTrillKey="",t.windVeryTightEmbouchure="",t.windWeakAirPressure=""}(O||(O={}));const R=16384,M={"1/2":32768,1:16384,2:8192,4:4096,8:2048,16:1024,32:512,64:256,128:128,256:64},I={w:"1",h:"2",q:"4",b:"256"},H={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},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}},W={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}},G={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}},U={"#":O.accidentalSharp,"##":O.accidentalDoubleSharp,b:O.accidentalFlat,bb:O.accidentalDoubleFlat,n:O.accidentalNatural,"{":O.accidentalParensLeft,"}":O.accidentalParensRight,db:O.accidentalThreeQuarterTonesFlatZimmermann,d:O.accidentalQuarterToneFlatStein,"++":O.accidentalThreeQuarterTonesSharpStein,"+":O.accidentalQuarterToneSharpStein,"+-":O.accidentalKucukMucennebSharp,bs:O.accidentalBakiyeFlat,bss:O.accidentalBuyukMucennebFlat,o:O.accidentalSori,k:O.accidentalKoron,bbs:O.accidentalBuyukMucennebSharp,"++-":O.accidentalBuyukMucennebSharp,ashs:O.accidentalBuyukMucennebSharp,afhf:O.accidentalBuyukMucennebSharp},V={"a.":{code:O.augmentationDot,betweenLines:!0},av:{aboveCode:O.articStaccatissimoAbove,belowCode:O.articStaccatissimoBelow,betweenLines:!0},"a>":{aboveCode:O.articAccentAbove,belowCode:O.articAccentBelow,betweenLines:!0},"a-":{aboveCode:O.articTenutoAbove,belowCode:O.articTenutoBelow,betweenLines:!0},"a^":{aboveCode:O.articMarcatoAbove,belowCode:O.articMarcatoBelow,betweenLines:!1},"a+":{code:O.pluckedLeftHandPizzicato,betweenLines:!1},ao:{aboveCode:O.pluckedSnapPizzicatoAbove,belowCode:O.pluckedSnapPizzicatoBelow,betweenLines:!1},ah:{code:O.stringsHarmonic,betweenLines:!1},"a@":{aboveCode:O.fermataAbove,belowCode:O.fermataBelow,betweenLines:!1},"a@a":{code:O.fermataAbove,betweenLines:!1},"a@u":{code:O.fermataBelow,betweenLines:!1},"a@s":{aboveCode:O.fermataShortAbove,belowCode:O.fermataShortBelow,betweenLines:!1},"a@as":{code:O.fermataShortAbove,betweenLines:!1},"a@us":{code:O.fermataShortBelow,betweenLines:!1},"a@l":{aboveCode:O.fermataLongAbove,belowCode:O.fermataLongBelow,betweenLines:!1},"a@al":{code:O.fermataLongAbove,betweenLines:!1},"a@ul":{code:O.fermataLongBelow,betweenLines:!1},"a@vl":{aboveCode:O.fermataVeryLongAbove,belowCode:O.fermataVeryLongBelow,betweenLines:!1},"a@avl":{code:O.fermataVeryLongAbove,betweenLines:!1},"a@uvl":{code:O.fermataVeryLongBelow,betweenLines:!1},"a|":{code:O.stringsUpBow,betweenLines:!1},am:{code:O.stringsDownBow,betweenLines:!1},"a,":{code:O.pictChokeCymbal,betweenLines:!1}},X={mordent:O.ornamentShortTrill,mordentInverted:O.ornamentMordent,turn:O.ornamentTurn,turnInverted:O.ornamentTurnSlash,tr:O.ornamentTrill,upprall:O.ornamentPrecompSlideTrillDAnglebert,downprall:O.ornamentPrecompDoubleCadenceUpperPrefix,prallup:O.ornamentPrecompTrillSuffixDandrieu,pralldown:O.ornamentPrecompTrillLowerSuffix,upmordent:O.ornamentPrecompSlideTrillBach,downmordent:O.ornamentPrecompDoubleCadenceUpperPrefixTurn,lineprall:O.ornamentPrecompAppoggTrill,prallprall:O.ornamentTremblement,scoop:O.brassScoop,doit:O.brassDoitMedium,fall:O.brassFallLipShort,doitLong:O.brassLiftMedium,fallLong:O.brassFallRoughMedium,bend:O.brassBend,plungerClosed:O.brassMuteClosed,plungerOpen:O.brassMuteOpen,flip:O.brassFlip,jazzTurn:O.brassJazzTurn,smear:O.brassSmear};class Y{static clefProperties(t){if(!t||!(t in W))throw new c("BadArgument","Invalid clef: "+t);return W[t]}static keyProperties(t,e="treble",i="N",s){let n={octaveShift:0,duration:"4"};"object"==typeof s&&(n=Object.assign(Object.assign({},n),s));const a=Y.sanitizeDuration(n.duration),o=t.split("/");if(o.length<2)throw new c("BadArguments",`First argument must be note/octave or note/octave/glyph-code: ${t}`);const r=o[0].toUpperCase();i=i.toUpperCase();const h=G[r];if(!h)throw new c("BadArguments","Invalid key name: "+r);let l=parseInt(o[1],10);l-=n.octaveShift;let d=(7*l-28+h.index)/2;d+=Y.clefProperties(e).lineShift;const u=void 0!==h.intVal?12*l+h.intVal:void 0;let g="",p="N";return p=o.length>2&&o[2]?o[2].toUpperCase():"N"!==i?i:r,g=this.codeNoteHead(p,a),{key:r,octave:l,line:d,intValue:u,code:g,displaced:!1}}static integerToNote(t){if(void 0===t||t<0||t>11)throw new c("BadArguments",`integerToNote() requires an integer in the range [0, 11]: ${t}`);const e={0:"C",1:"C#",2:"D",3:"D#",4:"E",5:"F",6:"F#",7:"G",8:"G#",9:"A",10:"A#",11:"B"}[t];if(!e)throw new c("BadArguments",`Unknown note value for integer: ${t}`);return e}static textWidth(t){return 7*t.toString().length}static articulationCodes(t){return V[t]}static accidentalCodes(t){var e;return null!==(e=U[t])&&void 0!==e?e:t}static ornamentCodes(t){var e;return null!==(e=X[t])&&void 0!==e?e:t}static keySignature(t){const e=H[t];if(!e)throw new c("BadKeySignature",`Bad key signature spec: '${t}'`);if(!e.accidental)return[];const i={b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]}[e.accidental],s=[];for(let t=0;t<e.num;++t){const n=i[t];s.push({type:e.accidental,line:n})}return s}static getKeySignatures(){return H}static hasKeySignature(t){return t in H}static sanitizeDuration(t){const e=I[t];if(void 0!==e&&(t=e),void 0===M[t])throw new c("BadArguments",`The provided duration is not valid: ${t}`);return t}static durationToFraction(t){return(new T).parse(Y.sanitizeDuration(t))}static durationToNumber(t){return Y.durationToFraction(t).value()}static durationToTicks(t){t=Y.sanitizeDuration(t);const e=M[t];if(void 0===e)throw new c("InvalidDuration");return e}static codeNoteHead(t,e){switch(t){case"D0":return O.noteheadDiamondWhole;case"D1":return O.noteheadDiamondHalf;case"D2":case"D3":return O.noteheadDiamondBlack;case"T0":return O.noteheadTriangleUpWhole;case"T1":return O.noteheadTriangleUpHalf;case"T2":case"T3":return O.noteheadTriangleUpBlack;case"X0":return O.noteheadXWhole;case"X1":return O.noteheadXHalf;case"X2":return O.noteheadXBlack;case"X3":return O.noteheadCircleX;case"S1":return O.noteheadSquareWhite;case"S2":return O.noteheadSquareBlack;case"R1":case"R2":return O.noteheadSquareWhite;case"DO":return O.noteheadTriangleUpBlack;case"RE":return O.noteheadMoonBlack;case"MI":return O.noteheadDiamondBlack;case"FA":return O.noteheadTriangleLeftBlack;case"FAUP":return O.noteheadTriangleRightBlack;case"SO":return O.noteheadBlack;case"LA":return O.noteheadSquareBlack;case"TI":return O.noteheadTriangleRoundDownBlack;case"DI":case"H":switch(e){case"1/2":return O.noteheadDiamondDoubleWhole;case"1":return O.noteheadDiamondWhole;case"2":return O.noteheadDiamondHalf;default:return O.noteheadDiamondBlack}case"X":case"M":switch(e){case"1/2":return O.noteheadXDoubleWhole;case"1":return O.noteheadXWhole;case"2":return O.noteheadXHalf;default:return O.noteheadXBlack}case"CX":switch(e){case"1/2":return O.noteheadCircleXDoubleWhole;case"1":return O.noteheadCircleXWhole;case"2":return O.noteheadCircleXHalf;default:return O.noteheadCircleX}case"CI":switch(e){case"1/2":return O.noteheadCircledDoubleWhole;case"1":return O.noteheadCircledWhole;case"2":return O.noteheadCircledHalf;default:return O.noteheadCircledBlack}case"SQ":switch(e){case"1/2":return O.noteheadDoubleWholeSquare;case"1":case"2":return O.noteheadSquareWhite;default:return O.noteheadSquareBlack}case"TU":switch(e){case"1/2":return O.noteheadTriangleUpDoubleWhole;case"1":return O.noteheadTriangleUpWhole;case"2":return O.noteheadTriangleUpHalf;default:return O.noteheadTriangleUpBlack}case"TD":switch(e){case"1/2":return O.noteheadTriangleDownDoubleWhole;case"1":return O.noteheadTriangleDownWhole;case"2":return O.noteheadTriangleDownHalf;default:return O.noteheadTriangleDownBlack}case"SF":switch(e){case"1/2":return O.noteheadSlashedDoubleWhole1;case"1":return O.noteheadSlashedWhole1;case"2":return O.noteheadSlashedHalf1;default:return O.noteheadSlashedBlack1}case"SB":switch(e){case"1/2":return O.noteheadSlashedDoubleWhole2;case"1":return O.noteheadSlashedWhole2;case"2":return O.noteheadSlashedHalf2;default:return O.noteheadSlashedBlack2}case"R":switch(e){case"1/2":return O.restDoubleWhole;case"1":return O.restWhole;case"2":return O.restHalf;case"4":return O.restQuarter;case"8":return O.rest8th;case"16":return O.rest16th;case"32":return O.rest32nd;case"64":return O.rest64th;case"128":return O.rest128th}break;case"S":switch(e){case"1/2":return O.noteheadSlashWhiteDoubleWhole;case"1":return O.noteheadSlashWhiteWhole;case"2":return O.noteheadSlashWhiteHalf;default:return O.noteheadSlashVerticalEnds}default:switch(e){case"1/2":return O.noteheadDoubleWhole;case"1":return O.noteheadWhole;case"2":return O.noteheadHalf;default:return O.noteheadBlack}}return O.null}}function _(...t){z.DEBUG&&g("VexFlow.Accidental",t)}Y.UNISON=!0,Y.SOFTMAX_FACTOR=10,Y.STEM_WIDTH=1.5,Y.STEM_HEIGHT=35,Y.STAVE_LINE_THICKNESS=1,Y.RENDER_PRECISION_PLACES=3,Y.RESOLUTION=R,Y.durationCodes={"1/2":{stem:!1},1:{stem:!1},2:{stem:!0},4:{stem:!0},8:{stem:!0,beamCount:1,stemBeamExtension:0,codeFlagUp:O.flag8thUp},16:{beamCount:2,stemBeamExtension:0,stem:!0,codeFlagUp:O.flag16thUp},32:{beamCount:3,stemBeamExtension:7.5,stem:!0,codeFlagUp:O.flag32ndUp},64:{beamCount:4,stemBeamExtension:15,stem:!0,codeFlagUp:O.flag64thUp},128:{beamCount:5,stemBeamExtension:22.5,stem:!0,codeFlagUp:O.flag128thUp}},Y.NOTATION_FONT_SCALE=39,Y.TABLATURE_FONT_SCALE=39,Y.SLASH_NOTEHEAD_WIDTH=15,Y.STAVE_LINE_DISTANCE=10,Y.TEXT_HEIGHT_OFFSET_HACK=1,Y.accidentalColumnsTable={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]}},Y.unicode={sharp:"♯",flat:"♭",natural:"♮",triangle:"△","o-with-slash":"ø",degrees:"°",circle:"○"},Y.validTypes={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"}},Y.TIME4_4={numBeats:4,beatValue:4,resolution:R};class z extends P{static get CATEGORY(){return l.Accidental}static format(t,e){if(!t||0===t.length)return;const i=w.get("Accidental.noteheadAccidentalPadding"),s=e.leftShift+i,n=w.get("Accidental.accidentalSpacing"),a=w.get("Accidental.leftPadding"),o=[];let r,h=0;for(let e=0;e<t.length;++e){const i=t[e],s=i.getNote(),n=s.getStave(),a=i.checkIndex(),l=s.getKeyProps()[a];if(s!==r){for(let t=0;t<s.keys.length;++t)h=Math.max(s.getLeftDisplacedHeadPx()-s.getXShift(),h);r=s}if(n){const t=n.getSpacingBetweenLines(),e=n.getYForLine(l.line),s=Math.round(e/t*2)/2;o.push({y:e,line:s,extraXSpaceNeeded:h,accidental:i,spacingBetweenStaveLines:t})}else o.push({line:l.line,extraXSpaceNeeded:h,accidental:i})}o.sort(((t,e)=>e.line-t.line));const l=[];let c=0;for(let t=0;t<o.length;t++){const e=o[t],i=e.accidental.type,s=l[l.length-1];let a;s&&(null==s?void 0:s.line)===e.line?a=s:(a={line:e.line,flatLine:!0,dblSharpLine:!0,numAcc:0,width:0,column:0},l.push(a)),"b"!==i&&"bb"!==i&&(a.flatLine=!1),"##"!==i&&(a.dblSharpLine=!1),a.numAcc++,a.width+=e.accidental.getWidth()+n,c=Math.max(e.extraXSpaceNeeded,c)}let d=0;for(let t=0;t<l.length;t++){let e=!1;const i=t;let s=t;for(;s+1<l.length&&!e;)this.checkCollision(l[s],l[s+1])?s++:e=!0;const n=t=>l[i+t],a=t=>t.map(n),o=(t,e)=>{const[i,s]=a([t,e]).map((t=>t.line));return i-s},r=(...t)=>t.map(a).every((([t,e])=>!this.checkCollision(t,e))),h=s-i+1;let c,u,g=this.checkCollision(l[i],l[s])?"a":"b";switch(h){case 3:"a"===g&&.5===o(1,2)&&.5!==o(0,1)&&(g="secondOnBottom");break;case 4:r([0,2],[1,3])&&(g="spacedOutTetrachord");break;case 5:"b"===g&&r([1,3])&&(g="spacedOutPentachord",r([0,2],[2,4])&&(g="verySpacedOutPentachord"));break;case 6:r([0,3],[1,4],[2,5])&&(g="spacedOutHexachord"),r([0,2],[2,4],[1,3],[3,5])&&(g="verySpacedOutHexachord")}if(h>=7){let e=2,i=!0;for(;!0===i;){i=!1;for(let t=0;t+e<l.length;t++)if(this.checkCollision(l[t],l[t+e])){i=!0,e++;break}}for(c=t;c<=s;c++)u=(c-t)%e+1,l[c].column=u,d=d>u?d:u}else for(c=t;c<=s;c++)u=Y.accidentalColumnsTable[h][g][c-t],l[c].column=u,d=d>u?d:u;t=s}const u=[],g=[];for(let t=0;t<=d;t++)u[t]=0,g[t]=0;u[0]=s+c,g[0]=s,l.forEach((t=>{t.width>u[t.column]&&(u[t.column]=t.width)}));for(let t=1;t<u.length;t++)g[t]=u[t]+g[t-1];const p=g[g.length-1];let m=0;l.forEach((t=>{let e=0;const i=m+t.numAcc;for(;m<i;m++){const i=g[t.column-1]+e+c;o[m].accidental.setXShift(i),e+=o[m].accidental.getWidth()+n,_("Line, accCount, shift: ",t.line,m,i)}})),e.leftShift=p+a}static checkCollision(t,e){let i=e.line-t.line,s=3;i>0?(s=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(i-=.5)):(s=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(i-=.5));const n=Math.abs(i)<s;return _("Line1, Line2, Collision: ",t.line,e.line,n),n}static applyAccidentals(t,e){const s=[],n={};t.forEach((t=>{const e=new T(0,1);t.getTickables().forEach((t=>{if(t.shouldIgnoreTicks())return;const i=n[e.value()];i?i.push(t):(s.push(e.value()),n[e.value()]=[t]),e.add(t.getTicks())}))}));const a=new A;e||(e="C");const r=a.createScaleMap(e),h={};s.forEach((t=>{const e=n[t],s=[],c=t=>{if(!o(t)||t.isRest()||t.shouldIgnoreTicks())return;const e=t;e.keys.forEach(((t,n)=>{const o=a.getNoteParts(t.split("/")[0]),c=t.split("/")[1],d=o.accidental||"n",u=o.root+d;h[o.root+c]||(h[o.root+c]=r[o.root]);const g=h[o.root+c]===u,p=s.indexOf(t)>-1;if(e.getModifiers().forEach(((t,s)=>{i(t,l.Accidental)&&t.type==d&&t.getIndex()==n&&e.getModifiers().splice(s,1)})),!g||g&&p){h[o.root+c]=u;const i=new z(d);e.addModifier(i,n),s.push(t)}})),e.getModifiers().forEach((t=>{i(t,l.GraceNoteGroup)&&t.getGraceNotes().forEach(c)}))};e.forEach(c)}))}constructor(t){super(),_("New accidental: ",t),this.type=t,this.position=P.Position.LEFT,this.cautionary=!1,this.reset()}reset(){this.text="",this.cautionary?(this.text+=Y.accidentalCodes("{"),this.text+=Y.accidentalCodes(this.type),this.text+=Y.accidentalCodes("}"),this.fontInfo.size=w.get("Accidental.cautionary.fontSize")):(this.text+=Y.accidentalCodes(this.type),this.fontInfo.size=w.get("Accidental.fontSize")),n(this.note)&&(this.fontInfo.size=w.get("Accidental.grace.fontSize"))}setNote(t){return u(t,"ArgumentError",`Bad note value: ${t}`),this.note=t,this.reset(),this}setAsCautionary(){return this.cautionary=!0,this.reset(),this}draw(){const{type:t,position:e,index:i}=this,s=this.checkContext(),n=this.checkAttachedNote();this.setRendered();const a=n.getModifierStartXY(e,i);this.x=a.x-this.width,this.y=a.y,_("Rendering: ",t,a.x,a.y),this.renderText(s,0,0)}}z.DEBUG=!1;class j extends N{static get CATEGORY(){return l.Stem}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return Y.STEM_WIDTH}static get HEIGHT(){return Y.STEM_HEIGHT}constructor(t){var e,i,s,n,a,o,r;super(),this.stemUpYOffset=0,this.stemDownYOffset=0,this.stemUpYBaseOffset=0,this.stemDownYBaseOffset=0,this.xBegin=null!==(e=null==t?void 0:t.xBegin)&&void 0!==e?e:0,this.xEnd=null!==(i=null==t?void 0:t.xEnd)&&void 0!==i?i:0,this.yTop=null!==(s=null==t?void 0:t.yTop)&&void 0!==s?s:0,this.yBottom=null!==(n=null==t?void 0:t.yBottom)&&void 0!==n?n:0,this.stemExtension=null!==(a=null==t?void 0:t.stemExtension)&&void 0!==a?a:0,this.stemDirection=null!==(o=null==t?void 0:t.stemDirection)&&void 0!==o?o:0,this.hide=(null==t?void 0:t.hide)||!1,this.isStemlet=(null==t?void 0:t.isStemlet)||!1,this.stemletHeight=null!==(r=null==t?void 0:t.stemletHeight)&&void 0!==r?r:0,this.renderHeightAdjustment=0,this.setOptions(t)}setOptions(t){var e,i,s,n;this.stemUpYOffset=null!==(e=null==t?void 0:t.stemUpYOffset)&&void 0!==e?e:0,this.stemDownYOffset=null!==(i=null==t?void 0:t.stemDownYOffset)&&void 0!==i?i:0,this.stemUpYBaseOffset=null!==(s=null==t?void 0:t.stemUpYBaseOffset)&&void 0!==s?s:0,this.stemDownYBaseOffset=null!==(n=null==t?void 0:t.stemDownYBaseOffset)&&void 0!==n?n:0}setNoteHeadXBounds(t,e){return this.xBegin=t,this.xEnd=e,this}setDirection(t){this.stemDirection=t}setExtension(t){this.stemExtension=t}getExtension(){return this.stemExtension}setYBounds(t,e){this.yTop=t,this.yBottom=e}getHeight(){const t=this.stemDirection===j.UP?this.stemUpYOffset:this.stemDownYOffset;return(this.yBottom-this.yTop+(j.HEIGHT-t+this.stemExtension))*this.stemDirection}getBoundingBox(){throw new c("NotImplemented","getBoundingBox() not implemented.")}getExtents(){const t=this.stemDirection===j.UP,e=[this.yTop,this.yBottom],i=j.HEIGHT+this.stemExtension,s=(t?Math.min:Math.max)(...e),n=(t?Math.max:Math.min)(...e);return{topY:s+i*-this.stemDirection,baseY:n}}setVisibility(t){return this.hide=!t,this}setStemlet(t,e){return this.isStemlet=t,this.stemletHeight=e,this}adjustHeightForFlag(){this.renderHeightAdjustment=w.get("Stem.heightAdjustmentForFlag",-3)}adjustHeightForBeam(){this.renderHeightAdjustment=-j.WIDTH/2}draw(){if(this.setRendered(),this.hide)return;const t=this.checkContext();let e,i;const s=this.stemDirection;let n=0;s===j.DOWN?(e=this.xBegin,i=this.yTop+this.stemDownYOffset,n=this.stemDownYBaseOffset):(e=this.xEnd,i=this.yBottom-this.stemUpYOffset,n=this.stemUpYBaseOffset);const a=this.getHeight();!function(...t){j.DEBUG&&g("VexFlow.Stem",t)}("Rendering stem - ","Top Y: ",this.yTop,"Bottom Y: ",this.yBottom);const o=this.isStemlet?a-this.stemletHeight*this.stemDirection:0;t.openGroup("stem",this.getAttribute("id")),t.beginPath(),t.setLineWidth(j.WIDTH),t.moveTo(e,i-o+n),t.lineTo(e,i-a-this.renderHeightAdjustment*s),t.stroke(),t.closeGroup()}}var q,K;j.DEBUG=!1,function(t){t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT",t[t.CENTER_STEM=4]="CENTER_STEM"}(q||(q={})),function(t){t[t.TOP=1]="TOP",t[t.CENTER=2]="CENTER",t[t.BOTTOM=3]="BOTTOM",t[t.CENTER_STEM=4]="CENTER_STEM"}(K||(K={}));class Q extends P{static get CATEGORY(){return l.Annotation}static get minAnnotationPadding(){return w.get("NoteHead.minPadding")}static format(t,e){if(!t||0===t.length)return!1;let i=0,s=0,n=0,a=0;for(let o=0;o<t.length;++o){const l=t[o];let c=(2+B.convertSizeToPixelValue(l.fontInfo.size))/Y.STAVE_LINE_DISTANCE;const d=l.checkAttachedNote(),u=d.getGlyphWidth(),g=l.getWidth();l.horizontalJustification===q.RIGHT?(n=Math.max(u,n),i=Math.max(i,g)+Q.minAnnotationPadding):l.horizontalJustification===q.LEFT?(a=Math.max(u,a),s=Math.max(s,g)):(i=Math.max(i,g/2)+Q.minAnnotationPadding,s=Math.max(s,g/2),n=Math.max(u/2,n),a=Math.max(u/2,a));const p=d.getStave(),m=d.hasStem()?d.getStemDirection():j.UP;let f=0,S=5;if(h(d))if(d.renderOptions.drawStem){const t=d.getStem();t&&(f=Math.abs(t.getHeight())/Y.STAVE_LINE_DISTANCE)}else f=0;else if(r(d)){const t=d.getStem();t&&"n"===d.getNoteType()&&(f=Math.abs(t.getHeight())/Y.STAVE_LINE_DISTANCE)}if(p&&(S=p.getNumLines()),l.verticalJustification===this.VerticalJustify.TOP){let t=d.getLineNumber(!0);h(d)&&(t=S-(d.leastString()-.5)),m===j.UP&&(t+=f);t+e.topTextLine+.5<S?(l.setTextLine(S-t),c+=S-t,e.topTextLine=c):(l.setTextLine(e.topTextLine),e.topTextLine+=c)}else if(l.verticalJustification===this.VerticalJustify.BOTTOM){let t=S-d.getLineNumber();h(d)&&(t=d.greatestString()-1),m===j.DOWN&&(t+=f);const i=t+e.textLine+1;i<S?(l.setTextLine(S-i),c+=S-i,e.textLine=c):(l.setTextLine(e.textLine),e.textLine+=c)}else l.setTextLine(e.textLine)}const o=Math.min(Math.max(s-a,0),Math.max(s-e.rightShift,0)),l=Math.min(Math.max(i-n,0),Math.max(i-e.leftShift,0));return e.leftShift+=l,e.rightShift+=o,!0}constructor(t){super(),this.text=t,this.horizontalJustification=q.CENTER,this.verticalJustification=K.TOP}setVerticalJustification(t){return this.verticalJustification="string"==typeof t?Q.VerticalJustifyString[t]:t,this}getJustification(){return this.horizontalJustification}setJustification(t){return this.horizontalJustification="string"==typeof t?Q.HorizontalJustifyString[t]:t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote(),i=e.hasStem()?e.getStemDirection():j.UP,s=e.getModifierStartXY(F.ABOVE,this.index);this.setRendered(),t.openGroup("annotation",this.getAttribute("id"));const n=this.getWidth(),a=B.convertSizeToPixelValue(this.fontInfo.size);let o,r;o=this.horizontalJustification===q.LEFT?s.x:this.horizontalJustification===q.RIGHT?s.x-n:this.horizontalJustification===q.CENTER?s.x-n/2:e.getStemX()-n/2;let h={},l=0;const c=e.hasStem(),d=e.checkStave();if(c&&(h=e.checkStem().getExtents(),l=d.getSpacingBetweenLines()),this.verticalJustification===K.BOTTOM){r=e.getYs().reduce(((t,e)=>t>e?t:e)),r+=(this.textLine+1)*Y.STAVE_LINE_DISTANCE+a,c&&i===j.DOWN&&(r=Math.max(r,h.topY+a+l*this.textLine))}else if(this.verticalJustification===K.CENTER){const t=e.getYForTopText(this.textLine)-1;r=t+(d.getYForBottomText(this.textLine)-t)/2+a/2}else if(this.verticalJustification===K.TOP){r=Math.min(...e.getYs())-(this.textLine+1)*Y.STAVE_LINE_DISTANCE,c&&i===j.UP&&(l=h.topY<d.getTopLineTopY()?Y.STAVE_LINE_DISTANCE:l,r=Math.min(r,h.topY-l*(this.textLine+1)))}else{const t=e.getStemExtents();r=t.topY+(t.baseY-t.topY)/2+a/2}!function(...t){Q.DEBUG&&g("VexFlow.Annotation",t)}("Rendering annotation: ",this.text,o,r),this.x=o,this.y=r,this.renderText(t,0,0),t.closeGroup()}}Q.DEBUG=!1,Q.HorizontalJustify=q,Q.HorizontalJustifyString={left:q.LEFT,right:q.RIGHT,center:q.CENTER,centerStem:q.CENTER_STEM},Q.VerticalJustify=K,Q.VerticalJustifyString={above:K.TOP,top:K.TOP,below:K.BOTTOM,bottom:K.BOTTOM,center:K.CENTER,centerStem:K.CENTER_STEM};const{ABOVE:$,BELOW:J}=P.Position;function Z(t,e){return.5*t(e/.5)}function tt(t,e){return e===$?t<=5:t>=1}function et(t,e){return tt(t,e)?e===$?Math.ceil:Math.floor:Math.round}const it=t=>o(t)||n(t);function st(t,e){const i=t.getStemDirection(),{topY:s,baseY:n}=t.getStemExtents();if(it(t))return t.hasStem()?i===j.UP?s:n:Math.min(...t.getYs());if(h(t))return t.hasStem()&&i===j.UP?s:t.checkStave().getYForTopText(e);throw new c("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")}function nt(t,e){const i=t.getStemDirection(),{topY:s,baseY:n}=t.getStemExtents();if(it(t))return t.hasStem()?i===j.UP?n:s:Math.max(...t.getYs());if(h(t))return t.hasStem()?i===j.UP?t.checkStave().getYForBottomText(e):s:t.checkStave().getYForBottomText(e);throw new c("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")}function at(t,e){const i=e===$&&t.getStemDirection()===j.UP||e===J&&t.getStemDirection()===j.DOWN;return it(t)?t.hasStem()&&i?.5:1:t.hasStem()&&i?1:0}class ot extends P{static get CATEGORY(){return l.Articulation}static format(t,e){if(!t||0===t.length)return!1;let i=0;const s=(t,e,i)=>Z(et(e,i),t.height/10+.5);t.forEach((t=>{const n=t.checkAttachedNote();i=Math.max(n.getGlyphWidth(),i);let a=5;const o=n.hasStem()?n.getStemDirection():j.UP;let h=0;if(r(n)){const t=n.getStem();t&&(h=Math.abs(t.getHeight())/Y.STAVE_LINE_DISTANCE)}const l=n.getStave();if(l&&(a=l.getNumLines()),t.getPosition()===$){let i=n.getLineNumber(!0);o===j.UP&&(i+=h);let r=s(t,e.topTextLine,$);const l=i+e.topTextLine+.5;!t.articulation.betweenLines&&l<a&&(r+=a-l),t.setTextLine(e.topTextLine),e.topTextLine+=r}else if(t.getPosition()===J){let i=Math.max(a-n.getLineNumber(),0);o===j.DOWN&&(i+=h);let r=s(t,e.textLine,J);const l=i+e.textLine+.5;!t.articulation.betweenLines&&l<a&&(r+=a-l),t.setTextLine(e.textLine),e.textLine+=r}}));const n=t.map((t=>t.getWidth())).reduce(((t,e)=>Math.max(e,t))),a=Math.min(Math.max(n-i,0),Math.max(n-(e.leftShift+e.rightShift),0));return e.leftShift+=a/2,e.rightShift+=a/2,!0}static easyScoreHook({articulations:t},e,i){if(!t)return;const s={staccato:"a.",tenuto:"a-",accent:"a>"};t.split(",").map((t=>t.trim().split("."))).map((([t,e])=>{const n={type:s[t]};return e&&(n.position=P.PositionString[e]),i.getFactory().Articulation(n)})).map((t=>e.addModifier(t,0)))}constructor(t){var e;super(),this.heightShift=0,this.type=t,this.position=$,Y.articulationCodes(this.type)||((null!==(e=this.type.codePointAt(0))&&void 0!==e?e:0)%2==0?this.position=$:this.position=J),this.articulation={betweenLines:!1},this.reset()}reset(){this.articulation=Y.articulationCodes(this.type),this.articulation||(this.articulation={code:this.type,betweenLines:!1});const t=(this.position===$?this.articulation.aboveCode:this.articulation.belowCode)||this.articulation.code||O.null;this.text=t}setBetweenLines(t=!0){return this.articulation.betweenLines=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=this.checkIndex(),{position:s,textLine:n}=this,a=this.articulation.betweenLines,o=e.checkStave(),r=o.getSpacingBetweenLines(),l=h(e),{x:c}=e.getModifierStartXY(s,i),d=!a||l,u=at(e,s);let p={[$]:()=>{this.setOrigin(.5,1);const t=st(e,n)-(n+u)*r;return d?Math.min(o.getYForTopText(ot.INITIAL_OFFSET),t):t},[J]:()=>{this.setOrigin(.5,0);const t=nt(e,n)+(n+u)*r;return d?Math.max(o.getYForBottomText(ot.INITIAL_OFFSET),t):t}}[s]();if(!l){const t=s===$?-1:1,n=e.getKeyProps()[i].line,o=(e.getYs()[i]-p)/r+Number(n),h=function(t,e,i,s){const n=Z(et(e,i),e);if(t&&tt(n,i)&&n%1==0)return n+.5*-s;return n}(a,o,s,t);tt(h,s)&&this.setOrigin(.5,.5),p+=Math.abs(h-o)*r*t}!function(...t){ot.DEBUG&&g("VexFlow.Articulation",t)}(`Rendering articulation at (x: ${c}, y: ${p})`),this.x=c,this.y=p,this.renderText(t,0,0)}}ot.DEBUG=!1,ot.INITIAL_OFFSET=-.5;class rt{static get CATEGORY(){return l.RenderContext}set font(t){this.setFont(t)}get font(){return this.getFont()}}class ht extends N{static get CATEGORY(){return l.Tickable}constructor(){super(),this._preFormatted=!1,this._postFormatted=!1,this.ticks=new T(0,1),this.intrinsicTicks=0,this.tickMultiplier=new T(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(t){return this.ignoreTicks=t,this}getWidth(){if(!this._preFormatted)throw new c("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(t){return this.centerXShift=t,this}isCenterAligned(){return this.alignCenter}setCenterAlignment(t){return this.alignCenter=t,this}getVoice(){return u(this.voice,"NoVoice","Tickable has no voice.")}setVoice(t){this.voice=t}getTuplet(){return this.tuplet}getTupletStack(){return this.tupletStack}resetTuplet(t){let e,i;if(t){const s=this.tupletStack.indexOf(t);return-1!==s&&(this.tupletStack.splice(s,1),e=t.getNoteCount(),i=t.getNotesOccupied(),this.applyTickMultiplier(e,i)),this}for(;this.tupletStack.length;)e=(t=this.tupletStack.pop()).getNoteCount(),i=t.getNotesOccupied(),this.applyTickMultiplier(e,i);return this}setTuplet(t){if(t){this.tupletStack.push(t);const e=t.getNoteCount(),i=t.getNotesOccupied();this.applyTickMultiplier(i,e)}return this.tuplet=t,this}addToModifierContext(t){this.modifierContext=t;for(let t=0;t<this.modifiers.length;++t)this.modifierContext.addMember(this.modifiers[t]);return this.modifierContext.addMember(this),this._preFormatted=!1,this}addModifier(t,e=0){return this.modifiers.push(t),this._preFormatted=!1,this}getModifiers(){return this.modifiers}setTickContext(t){this.tickContext=t,this._preFormatted=!1}checkTickContext(t="Tickable has no tick context."){return u(this.tickContext,"NoTickContext",t)}preFormat(){this._preFormatted||(this.width=0,this.modifierContext&&(this.modifierContext.preFormat(),this.width+=this.modifierContext.getWidth()))}set preFormatted(t){this._preFormatted=t}get preFormatted(){return this._preFormatted}postFormat(){return this._postFormatted||(this._postFormatted=!0),this}set postFormatted(t){this._postFormatted=t}get postFormatted(){return this._postFormatted}getIntrinsicTicks(){return this.intrinsicTicks}setIntrinsicTicks(t){this.intrinsicTicks=t,this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}getTickMultiplier(){return this.tickMultiplier}applyTickMultiplier(t,e){this.tickMultiplier.multiply(t,e),this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}setDuration(t){const e=t.numerator*(Y.RESOLUTION/t.denominator);this.ticks=this.tickMultiplier.clone().multiply(e),this.intrinsicTicks=this.ticks.value()}getAbsoluteX(){return this.checkTickContext("Can't getAbsoluteX() without a TickContext.").getX()}setModifierContext(t){return this.modifierContext=t,this}getModifierContext(){return this.modifierContext}checkModifierContext(){return u(this.modifierContext,"NoModifierContext","No modifier context attached to this tickable.")}}class lt extends ht{static get CATEGORY(){return l.Note}static getGlyphProps(t,e="n"){t=Y.sanitizeDuration(t);let i=Y.durationCodes[t];void 0===i&&(i=Y.durationCodes[4]);const s=Y.codeNoteHead(e.toUpperCase(),t);return s!==O.null&&(i=Object.assign(Object.assign({},i),{codeHead:s})),i}static plotMetrics(t,e,i){var s;const n=e.getMetrics(),a=e.getAbsoluteX()-n.modLeftPx-n.leftDisplacedHeadPx,o=e.getAbsoluteX()-n.leftDisplacedHeadPx,r=e.getAbsoluteX(),h=e.getAbsoluteX()+n.notePx,l=e.getAbsoluteX()+n.notePx+n.rightDisplacedHeadPx,c=e.getAbsoluteX()+n.notePx+n.rightDisplacedHeadPx+n.modRightPx,d=c+(null!==(s=e.getFormatterMetrics().freedom.right)&&void 0!==s?s:0),u=c-a;t.save(),t.setFont(w.get("fontFamily"),8),t.fillText(Math.round(u)+"px",a+e.getXShift(),i);const g=i+7;function p(i,s,n,a=g){t.beginPath(),t.setStrokeStyle(n),t.setFillStyle(n),t.setLineWidth(3),t.moveTo(i+e.getXShift(),a),t.lineTo(s+e.getXShift(),a),t.stroke()}p(a,o,"red"),p(o,r,"#999"),p(r,h,"green"),p(h,l,"#999"),p(l,c,"red"),p(c,d,"#DD0"),p(a-e.getXShift(),a,"#BBB"),function(t,e,i,s="#F55"){t.save(),t.setFillStyle(s),t.beginPath(),t.arc(e,i,3,0,2*Math.PI,!1),t.closePath(),t.fill(),t.restore()}(t,r+e.getXShift(),g,"blue");const m=e.getFormatterMetrics();if(m.iterations>0){const s=m.space.deviation,n=s>=0?"+":"";t.setFillStyle("red"),t.fillText(n+Math.round(s),r+e.getXShift(),i-10)}t.restore()}static parseDuration(t){if(!t)return;const e=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(t);if(!e)return;return{duration:e[1],dots:e[2].length,type:e[3]||"n"}}static parseNoteStruct(t){const e=lt.parseDuration(t.duration);if(!e)return;let i=t.type;if(i&&!Y.validTypes[i])return;const s=[];i||(i=e.type||"n",void 0!==t.keys&&t.keys.forEach(((t,e)=>{const n=t.split("/");s[e]=n&&3===n.length?n[2]:i})));let n=Y.durationToTicks(e.duration);if(!n)return;const a=t.dots?t.dots:e.dots;if("number"!=typeof a)return;let o=n;for(let t=0;t<a;t++){if(o<=1)return;o/=2,n+=o}return{duration:e.duration,type:i,customTypes:s,dots:a,ticks:n}}constructor(t){if(super(),!t)throw new c("BadArguments","Note must have valid initialization data to identify duration and type.");const e=lt.parseNoteStruct(t);if(!e)throw new c("BadArguments",`Invalid note initialization object: ${JSON.stringify(t)}`);this.keys=t.keys||[],this.keyProps=[],this.duration=e.duration,this.noteType=e.type,this.customTypes=e.customTypes,t.durationOverride?this.setDuration(t.durationOverride):this.setIntrinsicTicks(e.ticks),this.modifiers=[],this.glyphProps=lt.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map((t=>lt.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(t){return this.playNote=t,this}isRest(){return!1}addStroke(t,e){return e.setNote(this),e.setIndex(t),this.modifiers.push(e),this.preFormatted=!1,this}getStave(){return this.stave}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}setStave(t){return this.stave=t,this.setYs([t.getYForLine(0)]),this.setContext(this.stave.getContext()),this}getLeftDisplacedHeadPx(){return this.leftDisplacedHeadPx}getRightDisplacedHeadPx(){return this.rightDisplacedHeadPx}setLeftDisplacedHeadPx(t){return this.leftDisplacedHeadPx=t,this}setRightDisplacedHeadPx(t){return this.rightDisplacedHeadPx=t,this}shouldIgnoreTicks(){return this.ignoreTicks}getLineNumber(t){return 0}getLineForRest(){return 0}getGlyphProps(){return this.glyphProps}getGlyphWidth(){return 0}setYs(t){return this.ys=t,this}getYs(){if(0===this.ys.length)throw new c("NoYValues","No Y-values calculated for this note.");return this.ys}getYForTopText(t){return this.checkStave().getYForTopText(t)}getVoice(){if(!this.voice)throw new c("NoVoice","Note has no voice.");return this.voice}setVoice(t){return this.voice=t,this.preFormatted=!1,this}getTickContext(){return this.checkTickContext()}setTickContext(t){return this.tickContext=t,this.preFormatted=!1,this}getDuration(){return this.duration}isDotted(){return this.getModifiersByType(l.Dot).length>0}hasStem(){return!1}getNoteType(){return this.noteType}getBeam(){return this.beam}checkBeam(){return u(this.beam,"NoBeam","No beam attached to instance")}hasBeam(){return void 0!==this.beam}setBeam(t){return this.beam=t,this}addModifier(t,e=0){const i="Note.addModifier(modifier: Modifier, index: number=0)";if("string"==typeof e&&(e=parseInt(e),console.warn(i+" expected a number for `index`, but received a string.")),"object"!=typeof t||"number"!=typeof e)throw new c("WrongParams","Incorrect call signature. Use "+i+" instead.");return t.setNote(this),t.setIndex(e),super.addModifier(t),this}getModifiersByType(t){return this.modifiers.filter((e=>e.getCategory()===t))}getModifierStartXY(t,e,i){if(!this.preFormatted)throw new c("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");return{x:this.getAbsoluteX(),y:this.ys[0]}}getRightParenthesisPx(t){return this.getKeyProps()[t].displaced?this.getRightDisplacedHeadPx():0}getLeftParenthesisPx(t){return this.getKeyProps()[t].displaced?this.getLeftDisplacedHeadPx()-this.xShift:-this.xShift}getFirstDotPx(){let t=this.getRightDisplacedHeadPx();const e=this.checkModifierContext().getMembers("Parenthesis");return 0!==e.length&&(t+=e[0].getWidth()+1),t}getMetrics(){if(!this.preFormatted)throw new c("UnformattedNote","Can't call getMetrics on an unformatted note.");const t=this.modifierContext?this.modifierContext.getState().leftShift:0,e=this.modifierContext?this.modifierContext.getState().rightShift:0,i=this.getWidth();return{width:i,glyphWidth:this.getGlyphWidth(),notePx:i-t-e-this.leftDisplacedHeadPx-this.rightDisplacedHeadPx,modLeftPx:t,modRightPx:e,leftDisplacedHeadPx:this.leftDisplacedHeadPx,rightDisplacedHeadPx:this.rightDisplacedHeadPx,glyphPx:0}}getAbsoluteX(){let t=this.checkTickContext("Can't getAbsoluteX() without a TickContext.").getX();return this.stave&&(t+=this.stave.getNoteStartX()+w.get("Stave.padding",0)),this.isCenterAligned()&&(t+=this.getCenterXShift()),t}getStemDirection(){throw new c("NoStem","No stem attached to this note.")}getStemExtents(){throw new c("NoStem","No stem attached to this note.")}getTieRightX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()/2,t+=-this.width/2+this.width+2,t}getTieLeftX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()/2,t-=this.width/2+2,t}getKeys(){return this.keys}getKeyProps(){return this.keyProps}getBoundingBox(){const t=super.getBoundingBox();for(let e=0;e<this.modifiers.length;e++)t.mergeWith(this.modifiers[e].getBoundingBox());return t}}var ct,dt,ut,gt,pt;!function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.ABOVE=3]="ABOVE",t[t.BELOW=4]="BELOW",t[t.BEGIN=5]="BEGIN",t[t.END=6]="END"}(ct||(ct={}));class mt extends N{static get CATEGORY(){return l.StaveModifier}static get Position(){return ct}constructor(){super(),this.padding=10,this.position=ct.ABOVE}getPosition(){return this.position}setPosition(t){return this.position=t,this}getStave(){return this.stave}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}setStave(t){return this.stave=t,this}getPadding(t){return void 0!==t&&t<2?0:this.padding}setPadding(t){return this.padding=t,this}setLayoutMetrics(t){return this.layoutMetrics=t,this}getLayoutMetrics(){return this.layoutMetrics}}!function(t){t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE",t[t.END=3]="END",t[t.REPEAT_BEGIN=4]="REPEAT_BEGIN",t[t.REPEAT_END=5]="REPEAT_END",t[t.REPEAT_BOTH=6]="REPEAT_BOTH",t[t.NONE=7]="NONE"}(dt||(dt={}));class ft extends mt{static get CATEGORY(){return l.Barline}static get type(){return dt}static get typeString(){return{single:dt.SINGLE,double:dt.DOUBLE,end:dt.END,repeatBegin:dt.REPEAT_BEGIN,repeatEnd:dt.REPEAT_END,repeatBoth:dt.REPEAT_BOTH,none:dt.NONE}}constructor(t){super(),this.thickness=Y.STAVE_LINE_THICKNESS;const e=dt;this.widths={},this.widths[e.SINGLE]=5,this.widths[e.DOUBLE]=5,this.widths[e.END]=5,this.widths[e.REPEAT_BEGIN]=5,this.widths[e.REPEAT_END]=5,this.widths[e.REPEAT_BOTH]=5,this.widths[e.NONE]=5,this.paddings={},this.paddings[e.SINGLE]=0,this.paddings[e.DOUBLE]=0,this.paddings[e.END]=0,this.paddings[e.REPEAT_BEGIN]=15,this.paddings[e.REPEAT_END]=15,this.paddings[e.REPEAT_BOTH]=15,this.paddings[e.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[e.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(ct.BEGIN),this.setType(t)}getType(){return this.type}setType(t){return this.type="string"==typeof t?ft.typeString[t]:t,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(){const t=this.checkStave(),e=t.checkContext();switch(this.setRendered(),e.openGroup("stavebarline",this.getAttribute("id")),this.type){case dt.SINGLE:this.drawVerticalBar(t,this.x,!1);break;case dt.DOUBLE:this.drawVerticalBar(t,this.x,!0);break;case dt.END:this.drawVerticalEndBar(t,this.x);break;case dt.REPEAT_BEGIN:this.drawRepeatBar(t,this.x,!0),t.getX()!==this.x&&this.drawVerticalBar(t,t.getX());break;case dt.REPEAT_END:this.drawRepeatBar(t,this.x,!1);break;case dt.REPEAT_BOTH:this.drawRepeatBar(t,this.x,!1),this.drawRepeatBar(t,this.x,!0)}e.closeGroup()}drawVerticalBar(t,e,i){const s=t.checkContext(),n=t.getTopLineTopY(),a=t.getBottomLineBottomY();i&&s.fillRect(e-3,n,1,a-n),s.fillRect(e,n,1,a-n)}drawVerticalEndBar(t,e){const i=t.checkContext(),s=t.getTopLineTopY(),n=t.getBottomLineBottomY();i.fillRect(e-5,s,1,n-s),i.fillRect(e-2,s,3,n-s)}drawRepeatBar(t,e,i){const s=t.checkContext(),n=t.getTopLineTopY(),a=t.getBottomLineBottomY();let o=3;i||(o=-5),s.fillRect(e+o,n,1,a-n),s.fillRect(e-2,n,3,a-n);i?o+=4:o-=4;const r=e+o+1;let h=(t.getNumLines()-1)*t.getSpacingBetweenLines();h=h/2-t.getSpacingBetweenLines()/2;let l=n+h+1;s.beginPath(),s.arc(r,l,2,0,2*Math.PI,!1),s.fill(),l+=t.getSpacingBetweenLines(),s.beginPath(),s.arc(r,l,2,0,2*Math.PI,!1),s.fill()}}class St extends lt{static get CATEGORY(){return l.BarNote}constructor(t=dt.SINGLE){super({duration:"b"}),this.metrics={widths:{}};const e=dt;this.metrics.widths={[e.SINGLE]:8,[e.DOUBLE]:12,[e.END]:15,[e.REPEAT_BEGIN]:14,[e.REPEAT_END]:14,[e.REPEAT_BOTH]:18,[e.NONE]:0},this.ignoreTicks=!0,this.setType(t)}getType(){return this.type}setType(t){return this.type="string"==typeof t?ft.typeString[t]:t,this.setWidth(this.metrics.widths[this.type]),this}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkContext();!function(...t){St.DEBUG&&g("VexFlow.BarNote",t)}("Rendering bar line at: ",this.getAbsoluteX());const e=new ft(this.type);e.setX(this.getAbsoluteX()),e.setStave(this.checkStave()),e.setContext(t),e.drawWithStyle(),this.setRendered()}}St.DEBUG=!1;class Tt extends P{static get CATEGORY(){return l.Bend}static get UP(){return 0}static get DOWN(){return 1}static format(t,e){if(!t||0===t.length)return!1;let i=0;for(let s=0;s<t.length;++s){const n=t[s],a=n.checkAttachedNote();if(h(a)){const t=a.leastString()-1;e.topTextLine<t&&(e.topTextLine=t)}n.setXShift(i),i=n.getWidth(),n.setTextLine(e.topTextLine)}return e.rightShift+=i,e.topTextLine+=1,!0}setStyleLine(t){return this.styleLine=t,this}getStyleLine(){return this.styleLine}constructor(t){super(),this.styleLine=w.getStyle("Bend.line"),this.xShift=0,this.tap="",this.renderOptions={bendWidth:8,releaseWidth:8},this.phrase=t,this.updateWidth()}setXShift(t){return this.xShift=t,this.updateWidth(),this}setTap(t){return this.tap=t,this}getTextHeight(){const t=new N(l.Bend);return t.setText(this.phrase[0].text),t.getHeight()}updateWidth(){const t=t=>{const e=new N(l.Bend);return e.setText(t),e.getWidth()};let e=0;for(let i=0;i<this.phrase.length;++i){const s=this.phrase[i];if(void 0!==s.width)e+=s.width;else{const i=s.type===Tt.UP?this.renderOptions.bendWidth:this.renderOptions.releaseWidth;s.width=Math.max(i,t(s.text))+3,s.drawWidth=s.width/2,e+=s.width}}return this.setWidth(e+this.xShift),this}draw(){var t;const e=this.checkContext(),i=this.checkAttachedNote();this.setRendered();const s=i.getModifierStartXY(P.Position.RIGHT,this.index);s.x+=3,s.y+=.5;const n=this.xShift,a=i.checkStave().getSpacingBetweenLines(),o=i.getYs().reduce(((t,e)=>t<e?t:e)),r=s.y-((this.textLine+1)*a+s.y-o)+3,h=s.y-((this.textLine+1)*a+s.y-o)-1,l=(t,i,s,n)=>{const a=t+s,o=i;this.applyStyle(e,this.styleLine),e.beginPath(),e.moveTo(t,i),e.quadraticCurveTo(a,o,t+s,n),e.stroke()},d=(t,i,s,n)=>{this.applyStyle(e,this.styleLine),e.beginPath(),e.moveTo(t,n),e.quadraticCurveTo(t+s,n,t+s,i),e.stroke()},u=(t,i,s)=>{const n=i+4*s;e.beginPath(),e.moveTo(t,i),e.lineTo(t-4,n),e.lineTo(t+4,n),e.closePath(),e.fill()},g=(t,i)=>{e.setFont(this.fontInfo);const s=t-e.measureText(i).width/2;e.fillText(i,s,h)};let p,m=0,f=0;if(null===(t=this.tap)||void 0===t?void 0:t.length){g(i.getModifierStartXY(P.Position.CENTER,this.index).x,this.tap)}for(let t=0;t<this.phrase.length;++t){const e=this.phrase[t];e.drawWidth||(e.drawWidth=0),0===t&&(e.drawWidth+=n),f=e.drawWidth+m-(1===t?n:0),e.type===Tt.UP&&(p&&p.type===Tt.UP&&u(s.x,r,1),l(s.x,s.y,f,r)),e.type===Tt.DOWN&&(p&&p.type===Tt.UP&&d(s.x,s.y,f,r),p&&p.type===Tt.DOWN&&(u(s.x,s.y,-1),d(s.x,s.y,f,r)),p||(f=e.drawWidth,d(s.x,s.y,f,r))),g(s.x+f,e.text),p=e,m=e.drawWidth,p.x=s.x,s.x+=f}if(!p||void 0===p.x)throw new c("NoLastBendForBend","Internal error.");p.type===Tt.UP?u(p.x+f,r,1):p.type===Tt.DOWN&&u(p.x+f,s.y,-1)}}function xt(...t){bt.DEBUG&&g("VexFlow.ChordSymbol",t)}class wt extends N{constructor(t,e,i,s,n){super(),this.text=t,this.symbolModifier=e,this.xShift=i,this.yShift=s,this.vAlign=n}isSuperscript(){return this.symbolModifier===pt.SUPERSCRIPT}isSubscript(){return this.symbolModifier===pt.SUBSCRIPT}}!function(t){t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT",t[t.CENTER_STEM=4]="CENTER_STEM"}(ut||(ut={})),function(t){t[t.TOP=1]="TOP",t[t.BOTTOM=2]="BOTTOM"}(gt||(gt={})),function(t){t[t.NONE=1]="NONE",t[t.SUBSCRIPT=2]="SUBSCRIPT",t[t.SUPERSCRIPT=3]="SUPERSCRIPT"}(pt||(pt={}));class bt extends P{static get CATEGORY(){return l.ChordSymbol}static get superSubRatio(){return w.get("ChordSymbol.superSubRatio")}static get spacingBetweenBlocks(){return w.get("ChordSymbol.spacing")}static get superscriptOffset(){return w.get("ChordSymbol.superscriptOffset")}static get subscriptOffset(){return w.get("ChordSymbol.subscriptOffset")}static get minPadding(){return w.get("NoteHead.minPadding")}static format(t,e){if(!t||0===t.length)return!1;let i=0,s=0,n=0,a=0,o=0;for(const h of t){const t=h.checkAttachedNote();let l=1;for(let t=0;t<h.symbolBlocks.length;++t){const e=h.symbolBlocks[t],s=e.isSuperscript(),n=e.isSubscript();if(e.setXShift(i),(s||n)&&(l=2),n&&t>0){const s=h.symbolBlocks[t-1];s.isSuperscript()&&(e.setXShift(i-s.getWidth()-bt.minPadding),e.vAlign=!0,i+=-s.getWidth()-bt.minPadding+(s.getWidth()>e.getWidth()?s.getWidth()-e.getWidth():0))}i+=e.getWidth()+bt.minPadding}if(h.getVertical()===gt.TOP?(h.setTextLine(e.topTextLine),e.topTextLine+=l):(h.setTextLine(e.textLine+1),e.textLine+=l+1),h.getReportWidth()){if(r(t)){const e=t.getGlyphWidth();h.getHorizontal()===ut.RIGHT?(a=Math.max(e,a),s=Math.max(s,i)+bt.minPadding):h.getHorizontal()===ut.LEFT?(o=Math.max(e,o),n=Math.max(n,i)):(s=Math.max(s,i/2)+bt.minPadding,n=Math.max(n,i/2),a=Math.max(e/2,a),o=Math.max(e/2,o))}h.width=i}i=0}const h=Math.min(Math.max(n-o,0),Math.max(n-e.rightShift,0)),l=Math.min(Math.max(s-a,0),Math.max(s-e.leftShift,0));return e.leftShift+=l,e.rightShift+=h,!0}constructor(){super(),this.symbolBlocks=[],this.horizontal=ut.LEFT,this.vertical=gt.TOP,this.reportWidth=!0}get superscriptOffset(){return bt.superscriptOffset*B.convertSizeToPixelValue(this.fontInfo.size)}get subscriptOffset(){return bt.subscriptOffset*B.convertSizeToPixelValue(this.fontInfo.size)}setReportWidth(t){return this.reportWidth=t,this}getReportWidth(){return this.reportWidth}getSymbolBlock(t={}){var e,i;const s=new wt(null!==(e=t.text)&&void 0!==e?e:"",null!==(i=t.symbolModifier)&&void 0!==i?i:pt.NONE,0,0,!1);if(s.isSubscript()&&s.setYShift(this.subscriptOffset),s.isSuperscript()&&s.setYShift(this.superscriptOffset),s.isSubscript()||s.isSuperscript()){const{family:t,size:e,weight:i,style:n}=this.fontInfo,a=B.scaleSize(e,bt.superSubRatio);s.setFont(t,a,i,n)}else s.setFont(this.fontInfo);return s}addSymbolBlock(t){return this.symbolBlocks.push(this.getSymbolBlock(t)),this}addText(t,e={}){return this.addSymbolBlock(Object.assign(Object.assign({},e),{text:t}))}addTextSuperscript(t){const e=pt.SUPERSCRIPT;return this.addSymbolBlock({text:t,symbolModifier:e})}addTextSubscript(t){const e=pt.SUBSCRIPT;return this.addSymbolBlock({text:t,symbolModifier:e})}addGlyphSuperscript(t){return this.addTextSuperscript(bt.glyphs[t])}addGlyph(t,e={}){return this.addText(bt.glyphs[t],e)}addGlyphOrText(t,e={}){let i="";for(let e=0;e<t.length;++e){const s=t[e],n=bt.glyphs[s];i+=n||s}return i.length>0&&this.addText(i,e),this}addLine(t={}){return this.addText("",t)}setVertical(t){return this.vertical="string"==typeof t?bt.VerticalJustifyString[t]:t,this}getVertical(){return this.vertical}setHorizontal(t){return this.horizontal="string"==typeof t?bt.HorizontalJustifyString[t]:t,this}getHorizontal(){return this.horizontal}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered(),t.openGroup("chordsymbol",this.getAttribute("id"));const i=e.getModifierStartXY(P.Position.ABOVE,this.index);let s;t.setFont(this.fontInfo);const n=e.hasStem(),a=e.checkStave();if(this.vertical===gt.BOTTOM){if(s=a.getYForBottomText(this.textLine+Y.TEXT_HEIGHT_OFFSET_HACK),n){const t=e.checkStem().getExtents(),i=a.getSpacingBetweenLines(),n=1===e.getStemDirection()?t.baseY:t.topY;s=Math.max(s,n+i*(this.textLine+2))}}else{const t=Math.min(...e.getYs());if(s=Math.min(a.getYForTopText(this.textLine),t-10),n){const t=e.checkStem().getExtents(),i=a.getSpacingBetweenLines();s=Math.min(s,t.topY-5-i*this.textLine)}}let o=i.x;o=this.horizontal===ut.LEFT?i.x:this.horizontal===ut.RIGHT?i.x+this.getWidth():this.horizontal===ut.CENTER?i.x-this.getWidth()/2:e.getStemX()-this.getWidth()/2,xt("Rendering ChordSymbol: ",o,s),this.symbolBlocks.forEach((e=>{xt("Rendering Text: ",e.getText(),o+e.getXShift(),s+e.getYShift()),e.setX(o),e.setY(s),e.renderText(t,0,0)})),t.closeGroup()}getBoundingBox(){const t=this.symbolBlocks[0].getBoundingBox();for(let e=1;e<this.symbolBlocks.length;e++)t.mergeWith(this.symbolBlocks[e].getBoundingBox());return t}}bt.DEBUG=!1,bt.HorizontalJustify=ut,bt.HorizontalJustifyString={left:ut.LEFT,right:ut.RIGHT,center:ut.CENTER,centerStem:ut.CENTER_STEM},bt.VerticalJustify=gt,bt.VerticalJustifyString={top:gt.TOP,above:gt.TOP,below:gt.BOTTOM,bottom:gt.BOTTOM},bt.glyphs={diminished:O.csymDiminished,dim:O.csymDiminished,halfDiminished:O.csymHalfDiminished,"+":O.csymAugmented,augmented:O.csymAugmented,majorSeventh:O.csymMajorSeventh,minor:O.csymMinor,"-":O.csymMinor,"(":"(",leftParen:"(",")":")",rightParen:")",leftBracket:O.csymBracketLeftTall,rightBracket:O.csymBracketRightTall,leftParenTall:"(",rightParenTall:")","/":O.csymDiagonalArrangementSlash,over:O.csymDiagonalArrangementSlash,"#":O.csymAccidentalSharp,b:O.csymAccidentalFlat},bt.symbolModifiers=pt;class yt extends P{static get CATEGORY(){return l.Dot}static getDots(t){return t.getModifiersByType(yt.CATEGORY)}static buildAndAttach(t,e){for(const i of t)if(null==e?void 0:e.all)for(let t=0;t<i.keys.length;t++){const e=new yt;i.addModifier(e,t)}else if(void 0!==(null==e?void 0:e.index)){const t=new yt;i.addModifier(t,null==e?void 0:e.index)}else{const t=new yt;i.addModifier(t,0)}}static format(t,e){const i=e.rightShift;if(!t||0===t.length)return!1;const s=[],n={};for(let e=0;e<t.length;++e){const a=t[e],r=a.getNote();let l,d;if(o(r)){const t=a.checkIndex();l=r.getKeyProps()[t],d=r.getFirstDotPx()}else{if(!h(r))throw new c("Internal","Unexpected instance.");l={line:.5},d=i}const u=r.getAttribute("id");s.push({line:l.line,note:r,noteId:u,dot:a}),n[u]=Math.max(n[u]||d,d)}s.sort(((t,e)=>e.line-t.line));let a=i,r=0,l=null,d=null,u=null,g=0;for(let t=0;t<s.length;++t){const{dot:e,note:i,noteId:o,line:h}=s[t];h===l&&i===d||(a=n[o]),i.isRest()||h===l||(.5===Math.abs(h%1)?g=0:(g=.5,null===d||d.isRest()||null===l||l-h!=.5?h+g===u&&(g=-.5):g=-.5)),i.isRest()?e.dotShiftY+=-g:e.dotShiftY=-g,u=h+g,e.setXShift(a),a+=e.getWidth()+1,r=a>r?a:r,l=h,d=i}return e.rightShift+=r,!0}constructor(){super(),this.position=P.Position.RIGHT,this.setText(O.augmentationDot),this.dotShiftY=0}setNote(t){return this.note=t,this.font=t.font,this}setDotShiftY(t){return this.dotShiftY=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.checkStave().getSpacingBetweenLines(),s=e.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});h(e)&&(s.y=e.getStemExtents().baseY),this.x=s.x,this.y=s.y+this.dotShiftY*i,this.renderText(t,0,0)}}class Ct extends P{static get CATEGORY(){return l.FretHandFinger}static format(t,e){const{leftShift:i,rightShift:s}=e;if(!t||0===t.length)return!1;const n=[];let a=null,o=0,r=0;for(let h=0;h<t.length;++h){const l=t[h],c=l.getNote(),d=l.getPosition(),u=l.checkIndex(),g=c.getKeyProps()[u],p=w.get("FretHandFinger.fontSize");if(l.position===F.ABOVE&&(e.topTextLine+=p/Y.STAVE_LINE_DISTANCE+.5),l.position===F.BELOW&&(e.textLine+=p/Y.STAVE_LINE_DISTANCE+.5),c!==a){for(let t=0;t<c.keys.length;++t)0===i&&(o=Math.max(c.getLeftDisplacedHeadPx(),o)),0===s&&(r=Math.max(c.getRightDisplacedHeadPx(),r));a=c}n.push({note:c,num:l,pos:d,line:g.line,shiftL:o,shiftR:r})}n.sort(((t,e)=>e.line-t.line));let h=0,l=0,c=0,d=0,u=null,g=null;for(let t=0;t<n.length;++t){let e=0;const{note:a,pos:o,num:p,line:m,shiftL:f,shiftR:S}=n[t];m===u&&a===g||(h=i+f,l=s+S);const T=p.getWidth()+1;o===P.Position.LEFT?(p.setXShift(i+h),e=i+T,c=e>c?e:c):o===P.Position.RIGHT&&(p.setXShift(l),e=r+T,d=e>d?e:d),u=m,g=a}return e.leftShift+=c,e.rightShift+=d,!0}static easyScoreHook({fingerings:t}={},e,i){null==t||t.split(",").map((t=>{const e=t.trim().split("."),s={number:e[0]};return e[1]&&(s.position=e[1]),i.getFactory().Fingering(s)})).map(((t,i)=>e.addModifier(t,i)))}constructor(t){super(),this.setFretHandFinger(t),this.position=P.Position.LEFT,this.xOffset=0,this.yOffset=0}setFretHandFinger(t){return this.text=t,this}getFretHandFinger(){return this.text}setOffsetX(t){return this.xOffset=t,this}setOffsetY(t){return this.yOffset=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index);let s=i.x+this.xOffset,n=i.y+this.yOffset+5;switch(this.position){case P.Position.ABOVE:s-=4,n-=12;break;case P.Position.BELOW:s-=2,n+=10;break;case P.Position.LEFT:s-=this.width;break;case P.Position.RIGHT:s+=1;break;default:throw new c("InvalidPosition",`The position ${this.position} does not exist`)}this.renderText(t,s,n)}}class kt extends lt{static get CATEGORY(){return l.NoteHead}constructor(t){var e;super(t),this.customGlyph=!1,this.ledger={"":"","":""},this.index=t.index,this.x=t.x||0,this.y=t.y||0,t.noteType&&(this.noteType=t.noteType),this.displaced=t.displaced||!1,this.stemDirection=t.stemDirection||j.UP,this.line=t.line||0,this.glyphProps=lt.getGlyphProps(this.duration,this.noteType),u(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,t.customGlyphCode&&(this.customGlyph=!0,this.text=t.customGlyphCode),this.setStyle(null!==(e=t.style)&&void 0!==e?e:{}),this.slashed=t.slashed||!1,this.renderOptions=Object.assign({},this.renderOptions)}getWidth(){return this.width}isDisplaced(){return!0===this.displaced}getLine(){return this.line}setLine(t){return this.line=t,this}getAbsoluteX(){const t=this.preFormatted?super.getAbsoluteX():this.x,e=j.WIDTH/2;return t+(this.displaced?(this.width-e)*this.stemDirection:0)}setStave(t){const e=this.getLine();return this.stave=t,this.stave&&(this.setY(this.stave.getYForNote(e)),this.setContext(this.stave.getContext())),this}preFormat(){return this.preFormatted||(this.preFormatted=!0),this}draw(){var t;const e=this.checkContext();this.setRendered(),e.openGroup("notehead",this.getAttribute("id")),function(...t){kt.DEBUG&&g("VexFlow.NoteHead",t)}("Drawing note head '",this.noteType,this.duration,"' at",this.x,this.y),this.x=this.getAbsoluteX(),this.renderText(e,0,0),null===(t=this.parent)||void 0===t||t.drawModifiers(this),e.closeGroup()}}kt.DEBUG=!1;class Dt extends N{static get CATEGORY(){return l.Flag}draw(){const t=this.checkContext();this.setRendered(),t.openGroup("flag",this.getAttribute("id")),function(...t){Dt.DEBUG&&g("VexFlow.Flag",t)}("Drawing flag '",this.text,"' at",this.x,this.y),this.renderText(t,0,0),t.closeGroup()}}Dt.DEBUG=!1;class vt extends lt{static get CATEGORY(){return l.StemmableNote}constructor(t){super(t),this.flag=new Dt}getStem(){return this.stem}checkStem(){if(!this.stem)throw new c("NoStem","No stem attached to instance");return this.stem}setStem(t){return this.stem=t,this.addChild(t),this}buildStem(){const t=new j;return this.setStem(t),this}buildFlag(){var t,e,i;const{glyphProps:s}=this;if(this.hasFlag()){const n=this.getStemDirection()===j.DOWN?String.fromCodePoint((null!==(e=null===(t=s.codeFlagUp)||void 0===t?void 0:t.codePointAt(0))&&void 0!==e?e:-1)+1):null!==(i=s.codeFlagUp)&&void 0!==i?i:O.null;this.flag.setText(n),this.flag.fontInfo=this.fontInfo}}getBaseCustomNoteHeadGlyphProps(){return this.getStemDirection()===j.DOWN?this.customGlyphs[this.customGlyphs.length-1]:this.customGlyphs[0]}getStemLength(){return j.HEIGHT+this.getStemExtension()}getBeamCount(){const t=this.getGlyphProps();return t?t.beamCount:0}getStemMinimumLength(){const t=Y.durationToFraction(this.duration),e=void 0===this.beam;let i=t.value()<=1?0:20;switch(this.duration){case"8":case"16":i=e?35:25;break;case"32":i=e?45:35;break;case"64":i=e?50:40;break;case"128":i=e?55:45}return i}getStemDirection(){if(!this.stemDirection)throw new c("NoStem","No stem attached to this note.");return this.stemDirection}setStemDirection(t){if(t||(t=j.UP),t!==j.UP&&t!==j.DOWN)throw new c("BadArgument",`Invalid stem direction: ${t}`);return this.stemDirection=t,this.reset(),this.hasFlag()&&this.buildFlag(),this.beam=void 0,this.stem&&(this.stem.setDirection(t),this.stem.setExtension(this.getStemExtension())),this.preFormatted&&this.preFormat(),this}getStemX(){const t=this.getAbsoluteX()+this.xShift,e=this.getAbsoluteX()+this.xShift+this.getGlyphWidth();return this.stemDirection===j.DOWN?t:e}getCenterGlyphX(){return this.getAbsoluteX()+this.xShift+this.getGlyphWidth()/2}getStemExtension(){const t=this.getGlyphProps(),e=this.flag.getHeight(),i=this.getFontScale();return void 0!==this.stemExtensionOverride?this.stemExtensionOverride:this.beam?t.stemBeamExtension*i:e>j.HEIGHT*i?e-j.HEIGHT*i:0}setStemLength(t){return this.stemExtensionOverride=t-j.HEIGHT,this}getStemExtents(){if(!this.stem)throw new c("NoStem","No stem attached to this note.");return this.stem.getExtents()}getYForTopText(t){const e=this.checkStave();if(this.hasStem()){const i=this.getStemExtents();if(!i)throw new c("InvalidState","Stem does not have extents.");return Math.min(e.getYForTopText(t),i.topY-this.renderOptions.annotationSpacing*(t+1))}return e.getYForTopText(t)}getYForBottomText(t){const e=this.checkStave();if(this.hasStem()){const i=this.getStemExtents();if(!i)throw new c("InvalidState","Stem does not have extents.");return Math.max(e.getYForTopText(t),i.baseY+this.renderOptions.annotationSpacing*t)}return e.getYForBottomText(t)}hasFlag(){return void 0!==this.glyphProps.codeFlagUp&&!this.beam&&!this.isRest()}postFormat(){var t;return null===(t=this.beam)||void 0===t||t.postFormat(),this.postFormatted=!0,this}drawStem(t){var e;this.checkContext(),this.setRendered(),this.setStem(new j(t)),null===(e=this.stem)||void 0===e||e.setContext(this.getContext()).drawWithStyle()}}function Bt(t,e,i){const s=i;t.line+=s,t.maxLine+=s,t.minLine+=s,t.note.setKeyLine(0,t.note.getKeyLine(0)+s)}class Lt extends vt{static get CATEGORY(){return l.StaveNote}static get LEDGER_LINE_OFFSET(){return 3}static get minNoteheadPadding(){return w.get("NoteHead.minPadding")}static format(t,e){if(!t||t.length<2)return!1;const i=[];for(let e=0;e<t.length;e++){const s=t[e].sortedKeyProps,n=s[0].keyProps.line;let a=s[s.length-1].keyProps.line;const o=t[e].getStemDirection(),r=t[e].getStemLength()/10,h=t[e].getStemMinimumLength()/10;let l;t[e].isRest()?(l=n+Math.ceil(t[e]._noteHeads[0].getTextMetrics().actualBoundingBoxAscent/Y.STAVE_LINE_DISTANCE),a=n-Math.ceil(t[e]._noteHeads[0].getTextMetrics().actualBoundingBoxDescent/Y.STAVE_LINE_DISTANCE)):(l=1===o?s[s.length-1].keyProps.line+r:s[s.length-1].keyProps.line,a=1===o?s[0].keyProps.line:s[0].keyProps.line-r),i.push({line:s[0].keyProps.line,maxLine:l,minLine:a,isrest:t[e].isRest(),stemDirection:o,stemMax:r,stemMin:h,voiceShift:t[e].getVoiceShiftWidth(),isDisplaced:t[e].isDisplaced(),note:t[e]})}let s,n,a,o=0;const r=[!1,!1,!1];for(let t=0;t<i.length;t++)r[t]=!1!==i[t].note.renderOptions.draw;if(r[0]&&r[1]&&r[2])o=3,s=i[0],n=i[1],a=i[2];else if(r[0]&&r[1])o=2,s=i[0],a=i[1];else if(r[0]&&r[2])o=2,s=i[0],a=i[2];else{if(!r[1]||!r[2])return!0;o=2,s=i[1],a=i[2]}2===o&&-1===s.stemDirection&&1===a.stemDirection&&(s=i[1],a=i[0]);const h=Math.max(s.voiceShift,a.voiceShift);let d=0;if(2===o){const t=s.note.hasStem()&&a.note.hasStem()&&s.stemDirection===a.stemDirection?0:.5;if(a.isrest&&s.isrest&&s.note.duration===a.note.duration)a.note.renderOptions.draw=!1;else if(s.minLine<=a.maxLine+t)if(s.isrest)Bt(s,0,1);else if(a.isrest)Bt(a,0,-1);else{const t=Math.abs(s.line-a.line);if(s.note.hasStem()&&a.note.hasStem()){const e=s.note.sortedKeyProps[0].keyProps.code,i=a.note.sortedKeyProps[a.note.sortedKeyProps.length-1].keyProps.code;!Y.UNISON||e!==i||s.note.getModifiers().filter((t=>t.getCategory()===l.Dot&&0===t.getIndex())).length!==a.note.getModifiers().filter((t=>t.getCategory()===l.Dot&&0===t.getIndex())).length||t<1&&t>0||JSON.stringify(s.note.getStyle())!==JSON.stringify(a.note.getStyle())?(d=h+2,s.stemDirection===a.stemDirection?s.note.setXShift(d):a.note.setXShift(d)):s.note.voice!==a.note.voice&&s.stemDirection===a.stemDirection&&(s.line!==a.line?(d=h+2,s.note.setXShift(d)):1===a.stemDirection&&(a.stemDirection=-1,a.note.setStemDirection(-1)))}else t<1?(d=h+2,s.note.duration<a.note.duration?s.note.setXShift(d):a.note.setXShift(d)):s.note.hasStem()?(s.stemDirection=-s.note.getStemDirection(),s.note.setStemDirection(s.stemDirection)):a.note.hasStem()&&(a.stemDirection=-a.note.getStemDirection(),a.note.setStemDirection(a.stemDirection))}return e.rightShift+=d,!0}if(!n)throw new c("InvalidState","noteM not defined.");if(n.isrest&&!s.isrest&&!a.isrest&&(s.minLine<=n.maxLine||n.minLine<=a.maxLine)){return n.maxLine-n.minLine<s.minLine-a.maxLine?function(t,e,i){const s=t.line-p(e.minLine,i.maxLine);t.note.setKeyLine(0,t.note.getKeyLine(0)-s),t.line-=s,t.maxLine-=s,t.minLine-=s}(n,s,a):(d=h+2,n.note.setXShift(d),!1===a.note.hasBeam()&&(a.stemDirection=-1,a.note.setStemDirection(-1)),s.minLine<=a.maxLine&&!1===s.note.hasBeam()&&(s.stemDirection=1,s.note.setStemDirection(1))),e.rightShift+=d,!0}return s.isrest&&n.isrest&&a.isrest?(s.note.renderOptions.draw=!1,a.note.renderOptions.draw=!1,e.rightShift+=d,!0):(n.isrest&&s.isrest&&n.minLine<=a.maxLine&&(n.note.renderOptions.draw=!1),n.isrest&&a.isrest&&s.minLine<=n.maxLine&&(n.note.renderOptions.draw=!1),s.isrest&&s.minLine<=n.maxLine&&Bt(s,0,1),a.isrest&&n.minLine<=a.maxLine&&Bt(a,0,-1),(s.minLine<=n.maxLine+.5||n.minLine<=a.maxLine)&&(d=h+2,n.note.setXShift(d),!1===a.note.hasBeam()&&(a.stemDirection=-1,a.note.setStemDirection(-1)),s.minLine<=a.maxLine&&!1===s.note.hasBeam()&&(s.stemDirection=1,s.note.setStemDirection(1))),e.rightShift+=d,!0)}static postFormat(t){return!!t&&(t.forEach((t=>t.postFormat())),!0)}constructor(t){var e,i,s;super(t),this.minLine=0,this.maxLine=0,this.sortedKeyProps=[],this.ledgerLineStyle={},this.clef=null!==(e=t.clef)&&void 0!==e?e:"treble",this.octaveShift=null!==(i=t.octaveShift)&&void 0!==i?i:0,this.glyphProps=lt.getGlyphProps(this.duration,this.noteType),u(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=Object.assign(Object.assign({},this.renderOptions),{strokePx:t.strokePx||Lt.LEDGER_LINE_OFFSET}),this.calculateKeyProps(),this.buildStem(),t.autoStem?this.autoStem():this.setStemDirection(null!==(s=t.stemDirection)&&void 0!==s?s:j.UP),this.reset(),this.buildFlag()}reset(){super.reset();const t=this._noteHeads.map((t=>t.getStyle()));this.buildNoteHeads(),this._noteHeads.forEach(((e,i)=>{const s=t[i];s&&e.setStyle(s)}));const e=this.stave;return e&&this.setStave(e),this.calcNoteDisplacements(),this}setBeam(t){return this.beam=t,this.calcNoteDisplacements(),this.stem&&this.stem.setExtension(this.getStemExtension()),this}buildStem(){return this.setStem(new j({hide:this.isRest()})),this}buildNoteHeads(){this._noteHeads=[];const t=this.getStemDirection(),e=this.getKeys();let i,s,n,a,o,r=!1;t===j.UP?(n=0,a=e.length,o=1):(n=e.length-1,a=-1,o=-1);for(let e=n;e!==a;e+=o){const n=this.sortedKeyProps[e].keyProps,a=n.line;void 0===i?i=a:(s=Math.abs(i-a),0===s||.5===s?r=!r:(r=!1,this.useDefaultHeadX=!0)),i=a;const o=new kt({duration:this.duration,noteType:this.noteType,displaced:r,stemDirection:t,customGlyphCode:n.code,line:n.line});o.fontInfo=this.fontInfo,this.addChild(o),this._noteHeads[this.sortedKeyProps[e].index]=o}return this._noteHeads}autoStem(){this.setStemDirection(this.calculateOptimalStemDirection())}calculateOptimalStemDirection(){this.minLine=this.sortedKeyProps[0].keyProps.line,this.maxLine=this.sortedKeyProps[this.keyProps.length-1].keyProps.line;return(this.minLine+this.maxLine)/2<3?j.UP:j.DOWN}calculateKeyProps(){var t;let e;for(let i=0;i<this.keys.length;++i){const s=this.keys[i],n={octaveShift:null!==(t=this.octaveShift)&&void 0!==t?t:0,duration:this.duration},a=Y.keyProperties(s,this.clef,this.noteType,n);if(!a)throw new c("BadArguments",`Invalid key for note properties: ${s}`);"R"===a.key&&("1"===this.duration||"w"===this.duration?a.line=4:a.line=3);const o=a.line;void 0===e?e=o:Math.abs(e-o)<1&&(this.displaced=!0,a.displaced=!0,this.keyProps.length>0&&(this.keyProps[i-1].displaced=!0)),e=o,this.keyProps.push(a)}this.keyProps.forEach(((t,e)=>{this.sortedKeyProps.push({keyProps:t,index:e})})),this.sortedKeyProps.sort(((t,e)=>t.keyProps.line-e.keyProps.line))}getBoundingBox(){const t=new y(this.getAbsoluteX(),this.ys[0],0,0);this._noteHeads.forEach((e=>{t.mergeWith(e.getBoundingBox())}));const{yTop:e,yBottom:i}=this.getNoteHeadBounds();if(!this.isRest()&&this.hasStem()){const s=this.stem.getHeight(),n=this.getStemDirection()===j.DOWN?e-s-this.flag.getTextMetrics().actualBoundingBoxDescent:i-s+this.flag.getTextMetrics().actualBoundingBoxAscent;t.mergeWith(new y(this.getAbsoluteX(),n,0,0))}if(this.hasFlag()){const e=this.flag.getBoundingBox();t.mergeWith(e)}for(let e=0;e<this.modifiers.length;e++)t.mergeWith(this.modifiers[e].getBoundingBox());return t}getLineNumber(t){if(!this.keyProps.length)throw new c("NoKeyProps","Can't get bottom note line, because note is not initialized properly.");let e=this.keyProps[0].line;for(let i=0;i<this.keyProps.length;i++){const s=this.keyProps[i].line;t?s>e&&(e=s):s<e&&(e=s)}return e}isRest(){const t=this.glyphProps.codeHead;return t>=""&&t<=""}isChord(){return!this.isRest()&&this.keys.length>1}hasStem(){return this.glyphProps.stem}hasFlag(){return super.hasFlag()&&!this.isRest()}getStemX(){return"r"===this.noteType?this.getCenterGlyphX():super.getStemX()+(this.stemDirection?j.WIDTH/(2*-this.stemDirection):0)}getYForTopText(t){const e=this.getStemExtents();return Math.min(this.checkStave().getYForTopText(t),e.topY-this.renderOptions.annotationSpacing*(t+1))}getYForBottomText(t){const e=this.getStemExtents();return Math.max(this.checkStave().getYForTopText(t),e.baseY+this.renderOptions.annotationSpacing*t)}setStave(t){super.setStave(t);const e=this._noteHeads.map((e=>(e.setStave(t),e.getY())));if(this.setYs(e),this.stem){const{yTop:t,yBottom:e}=this.getNoteHeadBounds();this.stem.setYBounds(t,e)}return this}isDisplaced(){return this.displaced}setNoteDisplaced(t){return this.displaced=t,this}getTieRightX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()+this.xShift+this.rightDisplacedHeadPx,this.modifierContext&&(t+=this.modifierContext.getRightShift()),t}getTieLeftX(){let t=this.getAbsoluteX();return t+=this.xShift-this.leftDisplacedHeadPx,t}getLineForRest(){let t=this.keyProps[0].line;if(this.keyProps.length>1){const e=this.keyProps[this.keyProps.length-1].line;t=p(Math.max(t,e),Math.min(t,e))}return t}getModifierStartXY(t,e,i={}){if(!this.preFormatted)throw new c("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(0===this.ys.length)throw new c("NoYValues","No Y-Values calculated for this note.");const{ABOVE:s,BELOW:n,LEFT:a,RIGHT:o}=P.Position;let r=0;t===a?r=-2:t===o?(r=this.getGlyphWidth()+this.xShift+2,this.stemDirection===j.UP&&this.hasFlag()&&(i.forceFlagRight||((t,e)=>e===(t.getStemDirection()===j.UP?t.keyProps.length-1:0))(this,e))&&(r+=this.flag.getWidth())):t!==n&&t!==s||(r=this.getGlyphWidth()/2);let h=0;switch(this._noteHeads[e].getText()){case O.restDoubleWhole:case O.restWhole:h+=.5;break;case O.restHalf:case O.restQuarter:case O.rest8th:case O.rest16th:h-=.5;break;case O.rest32nd:case O.rest64th:h-=1.5;break;case O.rest128th:h-=2.5}return{x:this.getAbsoluteX()+r,y:this.ys[e]+h*this.checkStave().getSpacingBetweenLines()}}setStyle(t){return super.setGroupStyle(t)}setStemStyle(t){const e=this.getStem();return e&&e.setStyle(t),this}getStemStyle(){var t;return null===(t=this.stem)||void 0===t?void 0:t.getStyle()}setLedgerLineStyle(t){this.ledgerLineStyle=t}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(t){this.flag.setStyle(t)}getFlagStyle(){return this.flag.getStyle()}getGlyphWidth(){return this.noteHeads[0].getWidth()}setKeyStyle(t,e){return this._noteHeads[t].setStyle(e),this}setKeyLine(t,e){return this.keyProps[t].line=e,this.reset(),this}getKeyLine(t){return this.keyProps[t].line}getVoiceShiftWidth(){return this.getGlyphWidth()*(this.displaced?2:1)}calcNoteDisplacements(){this.setLeftDisplacedHeadPx(this.displaced&&this.stemDirection===j.DOWN?this.getGlyphWidth():0),this.setRightDisplacedHeadPx(!this.hasFlag()&&this.displaced&&this.stemDirection===j.UP?this.getGlyphWidth():0)}preFormat(){if(this.preFormatted)return;let t=0;this.modifierContext&&(this.modifierContext.preFormat(),0===this.modifierContext.getWidth()&&(t=Lt.minNoteheadPadding));let e=this.getGlyphWidth()+this.leftDisplacedHeadPx+this.rightDisplacedHeadPx+t;this.shouldDrawFlag()&&this.stemDirection===j.UP&&(e+=this.getGlyphWidth()),this.setWidth(e),this.preFormatted=!0}getNoteHeadBounds(){let t,e,i,s,n=1/0,a=-1/0,o=this.checkStave().getNumLines(),r=1,h=o,l=r;return this._noteHeads.forEach((c=>{const d=c.getLine(),u=c.getY();n=Math.min(u,n),a=Math.max(u,a),void 0===e&&c.isDisplaced()&&(e=c.getAbsoluteX()),void 0!==t||c.isDisplaced()||(t=c.getAbsoluteX()),o=Math.max(d,o),r=Math.min(d,r),c.isDisplaced()?(i=void 0===i?d:Math.max(d,i),s=void 0===s?d:Math.min(d,s)):(h=Math.max(d,h),l=Math.min(d,l))}),this),{yTop:n,yBottom:a,displacedX:e,nonDisplacedX:t,highestLine:o,lowestLine:r,highestDisplacedLine:i,lowestDisplacedLine:s,highestNonDisplacedLine:h,lowestNonDisplacedLine:l}}getNoteHeadBeginX(){return this.getAbsoluteX()+this.xShift}getNoteHeadEndX(){return this.getNoteHeadBeginX()+this.getGlyphWidth()}get noteHeads(){return this._noteHeads.slice()}drawLedgerLines(){const t=this.checkStave(),{renderOptions:{strokePx:e}}=this,i=this.checkContext(),s=this.getGlyphWidth()+2*e,n=2*(this.getGlyphWidth()+e)-j.WIDTH/2;if(this.isRest())return;if(!i)throw new c("NoCanvasContext","Can't draw without a canvas context.");const{highestLine:a,lowestLine:o,highestDisplacedLine:r,highestNonDisplacedLine:h,lowestDisplacedLine:l,lowestNonDisplacedLine:d,displacedX:u,nonDisplacedX:g}=this.getNoteHeadBounds();if(a<6&&o>0)return;const p=Math.min(null!=u?u:0,null!=g?g:0),m=(t,a,o)=>{let r;r=o&&a?p-e:a?(null!=g?g:0)-e:(null!=u?u:0)-e;const h=a&&o?n:s;i.beginPath(),i.moveTo(r,t),i.lineTo(r+h,t),i.stroke()},f=Object.assign(Object.assign({},t.getDefaultLedgerLineStyle()),this.getLedgerLineStyle());i.save(),this.applyStyle(i,f);for(let e=6;e<=a;++e){const i=void 0!==g&&e<=h,s=void 0!==r&&e<=r;m(t.getYForNote(e),i,s)}for(let e=0;e>=o;--e){const i=void 0!==g&&e>=d,s=void 0!==l&&e>=l;m(t.getYForNote(e),i,s)}i.restore()}drawModifiers(t){const e=this.checkContext();for(let i=0;i<this.modifiers.length;i++){const s=this.modifiers[i],n=s.checkIndex();this._noteHeads[n]===t&&(s.setContext(e),s.drawWithStyle())}}shouldDrawFlag(){const t=void 0!==this.stem,e=void 0!==this.glyphProps.codeFlagUp,i=void 0===this.beam;return t&&e&&i&&!this.isRest()}drawFlag(){const t=this.checkContext();if(!t)throw new c("NoCanvasContext","Can't draw without a canvas context.");if(this.shouldDrawFlag()){const{yTop:e,yBottom:i}=this.getNoteHeadBounds(),s=this.stem.getHeight(),n=this.getStemX()-Y.STEM_WIDTH/2,a=this.getStemDirection()===j.DOWN?e-s-this.flag.getTextMetrics().actualBoundingBoxDescent:i-s+this.flag.getTextMetrics().actualBoundingBoxAscent;this.flag.setContext(t).setX(n).setY(a).drawWithStyle()}}drawNoteHeads(){const t=this.checkContext();this._noteHeads.forEach((e=>{e.setContext(t).drawWithStyle()}))}drawStem(t){const e=this.checkContext();t&&this.setStem(new j(t)),this.shouldDrawFlag()&&this.stem&&this.stem.adjustHeightForFlag(),this.stem&&this.stem.setContext(e).drawWithStyle()}getStemExtension(){const t=super.getStemExtension();if(!this.glyphProps.stem)return t;const e=this.getStemDirection();if(e!==this.calculateOptimalStemDirection())return t;let i;i=e===j.UP?3-this.maxLine:this.minLine-3;const s=i-3.5;if(s<=0)return t;const n=this.getStave();let a=10;return void 0!==n&&(a=n.getSpacingBetweenLines()),t+s*a}draw(){if(!1===this.renderOptions.draw)return;if(0===this.ys.length)throw new c("NoYValues","Can't draw note without Y values.");const t=this.checkContext(),e=this.getNoteHeadBeginX(),i=this.hasStem()&&!this.beam;if(this._noteHeads.forEach((t=>t.setX(e))),this.stem){const t=this.getStemX();this.stem.setNoteHeadXBounds(t,t)}!function(...t){Lt.DEBUG&&g("VexFlow.StaveNote",t)}("Rendering ",this.isChord()?"chord :":"note :",this.keys),t.openGroup("stavenote",this.getAttribute("id")),this.drawLedgerLines(),i&&this.drawStem(),this.drawNoteHeads(),this.drawFlag();const s=this.getBoundingBox();t.pointerRect(s.getX(),s.getY(),s.getW(),s.getH()),t.closeGroup(),this.setRendered()}}Lt.DEBUG=!1;class Et extends N{static get CATEGORY(){return l.StaveTie}constructor(t,e=""){super(),this.setNotes(t),this.text=e,this.renderOptions={cp1:8,cp2:12,shortTieCutoff:10,cp1Short:2,cp2Short:8,textShiftX:0,firstXShift:0,lastXShift:0,yShift:7,tieSpacing:0}}getDirection(){return void 0!==this.direction&&null!==this.direction?this.direction:this.notes.lastNote?this.notes.lastNote.getStemDirection():this.notes.firstNote?this.notes.firstNote.getStemDirection():0}setDirection(t){return this.direction=t,this}setNotes(t){if(!t.firstNote&&!t.lastNote)throw new c("BadArguments","Tie needs to have either firstNote or lastNote set.");if(t.firstIndexes||(t.firstIndexes=[0]),t.lastIndexes||(t.lastIndexes=[0]),t.firstIndexes.length!==t.lastIndexes.length)throw new c("BadArguments","Tied notes must have same number of indexes.");return this.notes=t,this}isPartial(){return!this.notes.firstNote||!this.notes.lastNote}renderTie(t){if(0===t.firstYs.length||0===t.lastYs.length)throw new c("BadArguments","No Y-values to render");const e=this.checkContext();let i=this.renderOptions.cp1,s=this.renderOptions.cp2;Math.abs(t.lastX-t.firstX)<this.renderOptions.shortTieCutoff&&(i=this.renderOptions.cp1Short,s=this.renderOptions.cp2Short);const n=this.renderOptions.firstXShift,a=this.renderOptions.lastXShift,o=this.renderOptions.yShift*t.direction,r=this.notes.firstIndexes,h=this.notes.lastIndexes;e.openGroup("stavetie",this.getAttribute("id"));for(let l=0;l<r.length;++l){const d=(t.lastX+a+(t.firstX+n))/2,u=t.firstYs[r[l]]+o,g=t.lastYs[h[l]]+o;if(isNaN(u)||isNaN(g))throw new c("BadArguments","Bad indexes for tie rendering.");const p=(u+g)/2+i*t.direction,m=(u+g)/2+s*t.direction;e.beginPath(),e.moveTo(t.firstX+n,u),e.quadraticCurveTo(d,p,t.lastX+a,g),e.quadraticCurveTo(d,m,t.firstX+n,u),e.closePath(),e.fill()}e.closeGroup()}renderTieText(t,e){var i,s,n;const a=this.checkContext();let o=(t+e)/2;o-=a.measureText(this.text).width/2;const r=null!==(s=null===(i=this.notes.firstNote)||void 0===i?void 0:i.checkStave())&&void 0!==s?s:null===(n=this.notes.lastNote)||void 0===n?void 0:n.checkStave();r&&(a.setFont(this.fontInfo),a.fillText(this.text,o+this.renderOptions.textShiftX,r.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();const t=this.getFirstX(),e=this.getLastX();return this.renderTie({firstX:t,lastX:e,firstYs:this.getFirstYs(),lastYs:this.getLastYs(),direction:this.getDirection()}),this.renderTieText(t,e),!0}}class Nt extends Et{static get CATEGORY(){return l.TabTie}static createHammeron(t){return new Nt(t,"H")}static createPulloff(t){return new Nt(t,"P")}constructor(t,e){super(t,e),this.renderOptions.cp1=9,this.renderOptions.cp2=11,this.renderOptions.yShift=3,this.direction=-1}}var Ft;!function(t){t[t.STRICT=1]="STRICT",t[t.SOFT=2]="SOFT",t[t.FULL=3]="FULL"}(Ft||(Ft={}));class Ot extends N{static get CATEGORY(){return l.Voice}static get Mode(){return Ft}constructor(t){let e;if(super(),this.resolutionMultiplier=1,this.mode=Ft.STRICT,this.preFormatted=!1,this.ticksUsed=new T(0,1),this.largestTickWidth=0,this.tickables=[],this.options={softmaxFactor:Y.SOFTMAX_FACTOR},"string"==typeof t){const i=t.match(/(\d+)\/(\d+)/);i&&(e={numBeats:parseInt(i[1]),beatValue:parseInt(i[2])})}else e=t;this.time=Object.assign({numBeats:4,beatValue:4,resolution:Y.RESOLUTION},e),this.totalTicks=new T(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(t){return this.mode=t,this}getResolutionMultiplier(){return this.resolutionMultiplier}getActualResolution(){return this.resolutionMultiplier*this.time.resolution}setStave(t){return this.stave=t,this}getStave(){return this.stave}getBoundingBox(){const t=this.tickables[0].getBoundingBox();for(let e=1;e<this.tickables.length;++e){const i=this.tickables[e];!i.getStave()&&this.stave&&i.setStave(this.stave);const s=i.getBoundingBox();t.mergeWith(s)}return t}setStrict(t){return this.mode=t?Ft.STRICT:Ft.SOFT,this}isComplete(){return this.mode!==Ft.STRICT&&this.mode!==Ft.FULL||this.ticksUsed.equals(this.totalTicks)}setSoftmaxFactor(t){return this.options.softmaxFactor=t,this.expTicksUsed=0,this}reCalculateExpTicksUsed(){const t=this.ticksUsed.value();return this.expTicksUsed=S(this.tickables.map((e=>Math.pow(this.options.softmaxFactor,e.getTicks().value()/t)))),this.expTicksUsed}softmax(t){this.expTicksUsed||(this.expTicksUsed=this.reCalculateExpTicksUsed());const e=this.ticksUsed.value();return(t=>Math.pow(this.options.softmaxFactor,t/e))(t)/this.expTicksUsed}addTickable(t){if(!t.shouldIgnoreTicks()){const e=t.getTicks();if(this.ticksUsed.add(e),this.expTicksUsed=0,(this.mode===Ft.STRICT||this.mode===Ft.FULL)&&this.ticksUsed.greaterThan(this.totalTicks))throw this.ticksUsed.subtract(e),new c("BadArgument","Too many ticks.");e.lessThan(this.smallestTickCount)&&(this.smallestTickCount=e.clone()),this.resolutionMultiplier=this.ticksUsed.denominator,this.totalTicks.add(0,this.ticksUsed.denominator)}return this.tickables.push(t),t.setVoice(this),this}addTickables(t){for(let e=0;e<t.length;++e)this.addTickable(t[e]);return this}preFormat(){if(this.preFormatted)return this;const t=this.checkStave();return this.tickables.forEach((e=>{e.getStave()||e.setStave(t)})),this.preFormatted=!0,this}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}draw(t=this.checkContext(),e){e=null!=e?e:this.stave,this.setRendered();for(let i=0;i<this.tickables.length;++i){const s=this.tickables[i];e&&s.setStave(e),u(s.getStave(),"MissingStave","The voice cannot draw tickables without staves."),s.setContext(t),s.drawWithStyle()}}}class Pt extends P{static get CATEGORY(){return l.GraceNoteGroup}static format(t,e){if(!t||0===t.length)return!1;const i=[];let s=null,n=0;for(let e=0;e<t.length;++e){const a=t[e],r=a.getNote(),h=o(r),l=h?4:0;if(h&&r!==s){for(let t=0;t<r.keys.length;++t)n=Math.max(r.getLeftDisplacedHeadPx(),n);s=r}i.push({shift:n,gracenoteGroup:a,spacing:l})}let a,r=i[0].shift,h=!1,l=!1;for(let t=0;t<i.length;++t){const e=i[t].gracenoteGroup;e.position===P.Position.RIGHT?h=!0:l=!0,e.preFormat(),a=e.getWidth()+i[t].spacing,r=Math.max(a,r)}for(let t=0;t<i.length;++t){const e=i[t].gracenoteGroup;a=e.getWidth()+i[t].spacing,e.setSpacingFromNextModifier(r-Math.min(a,r)+Lt.minNoteheadPadding)}return h&&(e.rightShift+=r),l&&(e.leftShift+=r),!0}constructor(t,e){return super(),this.preFormatted=!1,this.position=P.Position.LEFT,this.graceNotes=t,this.width=0,this.showSlur=e,this.slur=void 0,this.voice=new Ot({numBeats:4,beatValue:4,resolution:Y.RESOLUTION}).setStrict(!1),this.renderOptions={slurYShift:0},this.beams=[],this.voice.addTickables(this.graceNotes),this}preFormat(){this.preFormatted||(this.formatter||(this.formatter=new pe),this.formatter.joinVoices([this.voice]).format([this.voice],0,{}),this.setWidth(this.formatter.getMinTotalWidth()),this.preFormatted=!0)}beamNotes(t){if((t=t||this.graceNotes).length>1){const e=new we(t);e.renderOptions.beamWidth=3,e.renderOptions.partialBeamLength=4,this.beams.push(e)}return this}setWidth(t){return this.width=t,this}getWidth(){return this.width+Lt.minNoteheadPadding}getGraceNotes(){return this.graceNotes}draw(){const t=this.checkContext(),e=this.checkAttachedNote();if(this.setRendered(),function(...t){Pt.DEBUG&&g("VexFlow.GraceNoteGroup",t)}("Drawing grace note group for:",e),this.alignSubNotesWithNote(this.getGraceNotes(),e,this.position),this.graceNotes.forEach((e=>e.setContext(t).drawWithStyle())),this.beams.forEach((e=>e.setContext(t).drawWithStyle())),this.showSlur){const i=o(e),s=i?Et:Nt;this.slur=new s({lastNote:this.graceNotes[0],firstNote:e,firstIndexes:[0],lastIndexes:[0]}),this.slur.renderOptions.cp2=12,this.slur.renderOptions.yShift=(i?7:5)+this.renderOptions.slurYShift,this.slur.setContext(t).drawWithStyle()}}}Pt.DEBUG=!1;class At extends P{static get CATEGORY(){return l.NoteSubGroup}static format(t,e){if(!t||0===t.length)return!1;let i=0;for(let e=0;e<t.length;++e){const s=t[e];s.preFormat(),i+=s.getWidth()}return e.leftShift+=i,!0}constructor(t){super(),this.preFormatted=!1,this.position=P.Position.LEFT,this.subNotes=t,this.subNotes.forEach((t=>{t.setIgnoreTicks(!1)})),this.width=0,this.formatter=new pe,this.voice=new Ot({numBeats:4,beatValue:4,resolution:Y.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()),this.preFormatted=!0)}setWidth(t){return this.width=t,this}getWidth(){return this.width}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered(),this.alignSubNotesWithNote(this.subNotes,e),this.subNotes.forEach((e=>e.setContext(t).drawWithStyle()))}}class Rt extends P{static get CATEGORY(){return l.Ornament}static get minPadding(){return w.get("NoteHead.minPadding")}static format(t,e){var i,s;if(!t||0===t.length)return!1;let n=0,a=e.rightShift,o=e.leftShift;for(let r=0;r<t.length;++r){const h=t[r],l=2;if(h.position===F.RIGHT)h.xShift+=a+2,a+=h.width+Rt.minPadding;else if(h.position===F.LEFT)h.xShift-=o+h.width+2,o+=h.width+Rt.minPadding;else if(h.position===F.ABOVE){n=Math.max(h.getWidth(),n);const t=h.getNote();let a=t.getLineNumber(!0)+e.topTextLine;const o=t.getStem();o&&t.getStemDirection()===j.UP&&(a+=Math.abs(o.getHeight())/Y.STAVE_LINE_DISTANCE);const r=null!==(s=null===(i=t.getStave())||void 0===i?void 0:i.getNumLines())&&void 0!==s?s:0;a<r&&(e.topTextLine+=r-a),h.setTextLine(e.topTextLine),e.topTextLine+=l}else n=Math.max(h.getWidth(),n),h.setTextLine(e.textLine),e.textLine+=l}return e.leftShift=o+n/2,e.rightShift=a+n/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=F.ABOVE,Rt.ornamentRight.indexOf(t)>=0&&(this.position=F.RIGHT),Rt.ornamentLeft.indexOf(t)>=0&&(this.position=F.LEFT),this.type=t,this.delayed=!1,this.renderOptions={accidentalLowerPadding:3,accidentalUpperPadding:3},this.adjustForStemDirection=!1,this.ornamentAlignWithNoteHead=Rt.ornamentAlignWithNoteHead.indexOf(this.type)>=0,Rt.ornamentNoteTransition.indexOf(this.type)>=0&&(this.delayed=!0),this.text=Y.ornamentCodes(this.type)}setNote(t){return super.setNote(t),Rt.ornamentArticulation.indexOf(this.type)>=0&&(t.getLineNumber()>=3?this.position=P.Position.ABOVE:this.position=P.Position.BELOW),this}setDelayed(t){return this.delayed=t,this}setUpperAccidental(t){return this.accidentalUpper=new N,this.accidentalUpper.setText(Y.accidentalCodes(t)),this}setLowerAccidental(t){return this.accidentalLower=new N,this.accidentalLower.setText(Y.accidentalCodes(t)),this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.checkStave();t.openGroup("ornament",this.getAttribute("id"));const s=e.getModifierStartXY(this.position,this.index);let n=s.x;const a=i.getSpacingBetweenLines(),o=at(e,this.position);let r=this.ornamentAlignWithNoteHead?s.y:0;if(this.position===F.ABOVE&&(r=st(e,this.textLine)-(this.textLine+o)*a),this.position===F.BELOW&&(r=nt(e,this.textLine)+(this.textLine+o+1.5)*a),this.delayed){let t=0;const s=e.getTickContext().getX();if(void 0!==this.delayXShift)t=this.delayXShift;else{const a=e.getVoice().getTickables(),o=a.indexOf(e),r=o+1<a.length?a[o+1].checkTickContext():void 0;t+=r?.5*(r.getX()-s):.5*(i.getX()+i.getWidth()-n),this.delayXShift=t}n+=t}!function(...t){Rt.DEBUG&&g("VexFlow.Ornament",t)}("Rendering ornament: ",this.text.charCodeAt(0),n,r),this.accidentalLower&&(this.accidentalLower.renderText(t,n+this.xShift-.5*this.accidentalLower.getWidth(),r+this.yShift-this.accidentalLower.getTextMetrics().actualBoundingBoxDescent),r-=this.accidentalLower.getHeight()+this.renderOptions.accidentalLowerPadding),Rt.ornamentYShift.indexOf(this.type)>=0&&(this.yShift+=this.getHeight()),this.x=n-(this.position===F.ABOVE||this.position===F.BELOW?.5*this.width:0),this.y=r,this.renderText(t,0,0),this.accidentalUpper&&(r-=this.getHeight()+this.renderOptions.accidentalUpperPadding,this.accidentalUpper.renderText(t,n+this.xShift-.5*this.accidentalUpper.getWidth(),r+this.yShift-this.accidentalUpper.getTextMetrics().actualBoundingBoxDescent)),t.closeGroup()}}Rt.DEBUG=!1;class Mt extends P{static get CATEGORY(){return l.Parenthesis}static buildAndAttach(t){for(const e of t)for(let t=0;t<e.keys.length;t++)e.addModifier(new Mt(F.LEFT),t),e.addModifier(new Mt(F.RIGHT),t)}static format(t,e){if(!t||0===t.length)return!1;let i=0,s=0;for(let e=0;e<t.length;++e){const n=t[e],a=n.getNote(),o=n.getPosition(),r=n.checkIndex();let h=0;o===F.RIGHT&&(h=a.getRightParenthesisPx(r),s=s>h+n.width?s:h+n.width),o===F.LEFT&&(h=a.getLeftParenthesisPx(r)+n.width,i=i>h+n.width?i:h+n.width),n.setXShift(h)}return e.leftShift+=i,e.rightShift+=s,!0}constructor(t){super(),this.position=null!=t?t:P.Position.LEFT,this.position===P.Position.RIGHT?this.text="":this.position===P.Position.LEFT&&(this.text="")}setNote(t){return this.note=t,this.setFont(t.getFont()),this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});this.renderText(t,i.x,i.y)}}function It(t){if(!t)return!1;const e=d();return"function"==typeof e.HTMLCanvasElement&&t instanceof e.HTMLCanvasElement||"function"==typeof t.getContext&&"function"==typeof t.toDataURL}class Ht extends rt{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static sanitizeCanvasDims(t,e){const i=this.CANVAS_BROWSER_SIZE_LIMIT;return Math.max(t,e)>i&&(!function(...t){const e=t.join(" "),i=new Error;d().console.log("Warning: ",e,i.stack)}("Canvas dimensions exceed browser limit. Cropping to "+i),t>i&&(t=i),e>i&&(e=i)),[t,e]}constructor(t){super(),this.textHeight=0,this.context2D=t,this.curTransfrom=t.getTransform(),t.canvas?this.canvas=t.canvas:this.canvas={width:Ht.WIDTH,height:Ht.HEIGHT}}clear(){this.context2D.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(t,e){}closeGroup(){}openRotation(t,e,i){this.curTransfrom=this.context2D.getTransform(),this.context2D.translate(e,i),this.context2D.rotate(t*Math.PI/180),this.context2D.translate(-e,-i)}closeRotation(){this.context2D.setTransform(this.curTransfrom)}add(t){}setFillStyle(t){return this.context2D.fillStyle=t,this}setBackgroundFillStyle(t){return this}setStrokeStyle(t){return this.context2D.strokeStyle=t,this}setShadowColor(t){return this.context2D.shadowColor=t,this}setShadowBlur(t){const e=this.context2D.getTransform(),i=Math.sqrt(e.a*e.a+e.b*e.b+e.c*e.c+e.d*e.d);return this.context2D.shadowBlur=i*t,this}setLineWidth(t){return this.context2D.lineWidth=t,this}setLineCap(t){return this.context2D.lineCap=t,this}setLineDash(t){return this.context2D.setLineDash(t),this}scale(t,e){return this.context2D.scale(t,e),this}resize(t,e,i){var s;const n=this.context2D.canvas,a=null!==(s=null!=i?i:d().devicePixelRatio)&&void 0!==s?s:1;return[t,e]=Ht.sanitizeCanvasDims(t*a,e*a),t=t/a|0,e=e/a|0,n.width=t*a,n.height=e*a,It(n)&&(n.style.width=t+"px",n.style.height=e+"px"),this.scale(a,a)}rect(t,e,i,s){return this.context2D.rect(t,e,i,s),this}fillRect(t,e,i,s){return this.context2D.fillRect(t,e,i,s),this}pointerRect(t,e,i,s){return this}clearRect(t,e,i,s){return this.context2D.clearRect(t,e,i,s),this}beginPath(){return this.context2D.beginPath(),this}moveTo(t,e){return this.context2D.moveTo(t,e),this}lineTo(t,e){return this.context2D.lineTo(t,e),this}bezierCurveTo(t,e,i,s,n,a){return this.context2D.bezierCurveTo(t,e,i,s,n,a),this}quadraticCurveTo(t,e,i,s){return this.context2D.quadraticCurveTo(t,e,i,s),this}arc(t,e,i,s,n,a){return this.context2D.arc(t,e,i,s,n,a),this}fill(){return this.context2D.fill(),this}stroke(){return this.context2D.stroke(),this}closePath(){return this.context2D.closePath(),this}measureText(t){const e=this.context2D.measureText(t);let i=0,s=0;return e.fontBoundingBoxAscent?(i=-e.fontBoundingBoxAscent,s=e.fontBoundingBoxDescent+e.fontBoundingBoxAscent):(i=-e.actualBoundingBoxAscent,s=e.actualBoundingBoxDescent+e.actualBoundingBoxAscent),{x:0,y:i,width:e.width,height:s}}fillText(t,e,i){return this.context2D.fillText(t,e,i),this}save(){return this.context2D.save(),this}restore(){return this.context2D.restore(),this}set fillStyle(t){this.context2D.fillStyle=t}get fillStyle(){return this.context2D.fillStyle}set strokeStyle(t){this.context2D.strokeStyle=t}get strokeStyle(){return this.context2D.strokeStyle}setFont(t,e,i,s){const n=B.validate(t,e,i,s);return this.context2D.font=B.toCSSString(n),this.textHeight=B.convertSizeToPixelValue(n.size),this}getFont(){return this.context2D.font}}const Wt={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}},Gt=2*Math.PI;class Ut extends rt{constructor(t){super(),this.width=0,this.height=0,this.precision=1,this.backgroundFillStyle="white",this.fontCSSString="",this.element=t,this.precision=Math.pow(10,Y.RENDER_PRECISION_PLACES);const e=this.create("svg");e.setAttribute("pointer-events","none"),this.element.appendChild(e),this.svg=e,this.parent=this.svg,this.groups=[this.svg],this.path="",this.pen={x:NaN,y:NaN};const i={"font-family":w.get("fontFamily"),"font-size":"10pt","font-weight":C.NORMAL,"font-style":k.NORMAL};this.state=Object.assign({scaleX:1,scaleY:1},i),this.attributes=Object.assign({"stroke-width":1,"stroke-dasharray":"none",fill:"black",stroke:"black",shadowBlur:0,shadowColor:"black"},i),this.groupAttributes=[],this.applyAttributes(e,this.attributes),this.groupAttributes.push(Object.assign({},this.attributes)),this.stateStack=[]}round(t){return Math.round(t*this.precision)/this.precision}create(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}openGroup(t,e){const i=this.create("g");return this.groups.push(i),this.parent.appendChild(i),this.parent=i,t&&i.setAttribute("class",m(t)),e&&i.setAttribute("id",m(e)),this.applyAttributes(i,this.attributes),this.groupAttributes.push(Object.assign(Object.assign({},this.groupAttributes[this.groupAttributes.length-1]),this.attributes)),i}closeGroup(){this.groups.pop(),this.groupAttributes.pop(),this.parent=this.groups[this.groups.length-1]}openRotation(t,e,i){this.openGroup().setAttribute("transform",`translate(${e},${i}) rotate(${t}) translate(-${e},-${i})`)}closeRotation(){this.closeGroup()}add(t){this.parent.appendChild(t)}setFillStyle(t){return this.attributes.fill=t,this}setBackgroundFillStyle(t){return this.backgroundFillStyle=t,this}setStrokeStyle(t){return this.attributes.stroke=t,this}setShadowColor(t){return this.attributes.shadowColor=t,this}setShadowBlur(t){return this.attributes.shadowBlur=t,this}setLineWidth(t){return this.attributes["stroke-width"]=t,this}setLineDash(t){if("[object Array]"===Object.prototype.toString.call(t))return this.attributes["stroke-dasharray"]=t.join(","),this;throw new c("ArgumentError","lineDash must be an array of integers.")}setLineCap(t){return this.attributes["stroke-linecap"]=t,this}resize(t,e){this.width=t,this.height=e,this.element.style.width=t.toString(),this.svg.style.width=t.toString(),this.svg.style.height=e.toString();const i={width:t,height:e};return this.applyAttributes(this.svg,i),this.scale(this.state.scaleX,this.state.scaleY),this}scale(t,e){this.state.scaleX=this.state.scaleX?this.state.scaleX*t:t,this.state.scaleY=this.state.scaleY?this.state.scaleY*e:e;const i=this.width/this.state.scaleX,s=this.height/this.state.scaleY;return this.setViewBox(0,0,i,s),this}setViewBox(t,e,i,s){if("string"==typeof t)this.svg.setAttribute("viewBox",t);else{const n=t+" "+e+" "+i+" "+s;this.svg.setAttribute("viewBox",n)}}applyAttributes(t,e){const i=Wt[t.nodeName];for(const s in e)i&&i[s]||!e[s]||0!==this.groupAttributes.length&&e[s]==this.groupAttributes[this.groupAttributes.length-1][s]||t.setAttributeNS(null,s,e[s]);return t}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild)}rect(t,e,i,s,n){s<0&&(e+=s,s*=-1);const a=this.create("rect");return n=null!=n?n:{fill:"none","stroke-width":this.attributes["stroke-width"],stroke:"black"},t=this.round(t),e=this.round(e),i=this.round(i),s=this.round(s),this.applyAttributes(a,Object.assign({x:t,y:e,width:i,height:s},n)),this.add(a),this}fillRect(t,e,i,s){const n={fill:this.attributes.fill,stroke:"none"};return this.rect(t,e,i,s,n),this}pointerRect(t,e,i,s){return this.rect(t,e,i,s,{opacity:"0","pointer-events":"auto"}),this}clearRect(t,e,i,s){return this.rect(t,e,i,s,{fill:this.backgroundFillStyle,stroke:"none"}),this}beginPath(){return this.path="",this.pen.x=NaN,this.pen.y=NaN,this}moveTo(t,e){return t=this.round(t),e=this.round(e),this.path+="M"+t+" "+e,this.pen.x=t,this.pen.y=e,this}lineTo(t,e){return t=this.round(t),e=this.round(e),this.path+="L"+t+" "+e,this.pen.x=t,this.pen.y=e,this}bezierCurveTo(t,e,i,s,n,a){return n=this.round(n),a=this.round(a),t=this.round(t),e=this.round(e),i=this.round(i),s=this.round(s),this.path+="C"+t+" "+e+","+i+" "+s+","+n+" "+a,this.pen.x=n,this.pen.y=a,this}quadraticCurveTo(t,e,i,s){return i=this.round(i),s=this.round(s),t=this.round(t),e=this.round(e),this.path+="Q"+t+" "+e+","+i+" "+s,this.pen.x=i,this.pen.y=s,this}arc(t,e,i,s,n,a){let o=t+i*Math.cos(s),r=e+i*Math.sin(s);o=this.round(o),r=this.round(r);const h=f(s),l=f(n);if(!a&&n-s>=Gt||a&&s-n>=Gt||h===l){let n=t+i*Math.cos(s+Math.PI),a=e+i*Math.sin(s+Math.PI);n=this.round(n),a=this.round(a),i=this.round(i),this.path+=`M${o} ${r} A${i} ${i} 0 0 0 ${n} ${a} `,this.path+=`A${i} ${i} 0 0 0 ${o} ${r}`,this.pen.x=o,this.pen.y=r}else{let c,d=t+i*Math.cos(n),u=e+i*Math.sin(n);s=h,n=l,c=Math.abs(n-s)<Math.PI?a:!a,s>n&&(c=!c);const g=!a;d=this.round(d),u=this.round(u),i=this.round(i),this.path+=`M${o} ${r} A${i} ${i} 0 ${+c} ${+g} ${d} ${u}`,this.pen.x=d,this.pen.y=u}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(t){const e=this.create("path");return void 0===t&&(t=Object.assign(Object.assign({},this.attributes),{stroke:"none"})),t.d=this.path,this.attributes.shadowBlur>0&&(t.style=this.getShadowStyle()),this.applyAttributes(e,t),this.add(e),this}stroke(){const t=this.create("path"),e=Object.assign(Object.assign({},this.attributes),{fill:"none",d:this.path});return this.attributes.shadowBlur>0&&(e.style=this.getShadowStyle()),this.applyAttributes(t,e),this.add(t),this}measureText(t){Ut.measureTextElement.setText(t),Ut.measureTextElement.setFont(this.attributes["font-family"],this.attributes["font-size"],this.attributes["font-weight"],this.attributes["font-style"]);const e=Ut.measureTextElement.getBoundingBox();return{x:e.x,y:e.y,width:e.w,height:e.h}}fillText(t,e,i){if(!t||t.length<=0)return this;e=this.round(e),i=this.round(i);const s=Object.assign(Object.assign({},this.attributes),{stroke:"none",x:e,y:i}),n=this.create("text");return n.textContent=t,this.applyAttributes(n,s),this.add(n),this}save(){return this.stateStack.push({state:structuredClone(this.state),attributes:structuredClone(this.attributes)}),this}restore(){const t=this.stateStack.pop();if(t){const e=t;this.state=structuredClone(e.state),this.attributes=structuredClone(e.attributes)}return this}set fillStyle(t){this.setFillStyle(t)}get fillStyle(){return this.attributes.fill}set strokeStyle(t){this.setStrokeStyle(t)}get strokeStyle(){return this.attributes.stroke}setFont(t,e,i,s){const n=B.validate(t,e,i,s);this.fontCSSString=B.toCSSString(n);const a={"font-family":n.family,"font-size":n.size,"font-weight":n.weight,"font-style":n.style};return this.attributes=Object.assign(Object.assign({},this.attributes),a),this.state=Object.assign(Object.assign({},this.state),a),this}getFont(){return this.fontCSSString}}var Vt,Xt,Yt,_t;Ut.measureTextElement=new N,function(t){t[t.CANVAS=1]="CANVAS",t[t.SVG=2]="SVG"}(Vt||(Vt={})),function(t){t[t.NONE=1]="NONE",t[t.UP=2]="UP",t[t.DOWN=3]="DOWN"}(Xt||(Xt={}));class zt{static buildContext(t,e,i,s,n="#FFF"){const a=new zt(t,e);i&&s&&a.resize(i,s);const o=a.getContext();return o.setBackgroundFillStyle(n),zt.lastContext=o,o}static getCanvasContext(t,e,i,s){return zt.buildContext(t,zt.Backends.CANVAS,e,i,s)}static getSVGContext(t,e,i,s){return zt.buildContext(t,zt.Backends.SVG,e,i,s)}static drawDashedLine(t,e,i,s,n,a){t.beginPath();const o=s-e,r=n-i,h=Math.atan2(r,o);let l=e,c=i;t.moveTo(e,i);let d=0,u=!0;for(;!(o<0?l<=s:l>=s)||!(r<0?c<=n:c>=n);){const e=a[d++%a.length],i=l+Math.cos(h)*e;l=o<0?Math.max(s,i):Math.min(s,i);const g=c+Math.sin(h)*e;c=r<0?Math.max(n,g):Math.min(n,g),u?t.lineTo(l,c):t.moveTo(l,c),u=!u}t.closePath(),t.stroke()}constructor(t,e){if(i(t,l.RenderContext))this.ctx=t;else{if(void 0===e)throw new c("InvalidArgument","Missing backend argument");const i=e;let s;if("string"==typeof t){const e=document.getElementById(t);if(!e)throw new c("BadElementId",`Can't find element with ID "${e}"`);s=e}else s=t;if(i===zt.Backends.CANVAS){if(!It(s))throw new c("BadElement","CANVAS context requires an HTMLCanvasElement.");const t=s.getContext("2d",{willReadFrequently:!0});if(!t)throw new c("BadElement","Can't get canvas context");this.ctx=new Ht(t)}else{if(i!==zt.Backends.SVG)throw new c("InvalidBackend",`No support for backend: ${i}`);if(!function(t){if(!t)return!1;const e=d();return"function"==typeof e.HTMLDivElement&&t instanceof e.HTMLDivElement||"function"==typeof t.appendChild&&"object"==typeof t.style}(s))throw new c("BadElement","SVG context requires an HTMLDivElement.");this.ctx=new Ut(s)}}}resize(t,e){return this.ctx.resize(t,e),this}getContext(){return this.ctx}}zt.Backends=Vt,zt.LineEndType=Xt,zt.lastContext=void 0;class jt extends P{static get CATEGORY(){return l.StringNumber}static format(t,e){const i=e.leftShift,s=e.rightShift;if(!t||0===t.length)return!1;const n=[];let a=null,r=0,h=0;for(let i=0;i<t.length;++i){const l=t[i],d=l.getNote(),u=l.getPosition();if(!o(d))throw new c("NoStaveNote");const g=l.checkIndex(),p=d.getKeyProps()[g],m=d.getModifierContext(),f=2*l.radius/Y.STAVE_LINE_DISTANCE+.5;if(m&&(u===F.ABOVE?(l.textLine=m.getState().topTextLine,e.topTextLine+=f):u===F.BELOW&&(l.textLine=m.getState().textLine,e.textLine+=f)),d!==a){for(let t=0;t<d.keys.length;++t)u===P.Position.LEFT&&(r=Math.max(d.getLeftDisplacedHeadPx(),r)),0===s&&(h=Math.max(d.getRightDisplacedHeadPx(),h));a=d}const S=p.line;n.push({pos:u,note:d,num:l,line:S,shiftL:r,shiftR:h})}n.sort(((t,e)=>e.line-t.line));let l=0,d=0,u=0,g=null,p=null;for(let t=0;t<n.length;++t){const e=n[t].note,a=n[t].pos,o=n[t].num,h=n[t].line,c=n[t].shiftR;h===g&&e===p||(l=s+c);const m=o.getWidth()+1;let f=0;a===P.Position.LEFT?(o.setXShift(i+r),f=m,d=Math.max(f,d)):a===P.Position.RIGHT&&(o.setXShift(l),f+=m,u=f>u?f:u),g=h,p=e}return e.leftShift+=d,e.rightShift+=u,!0}constructor(t){super(),this.stringNumber=t,this.position=P.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=zt.LineEndType.NONE,this.radius=8,this.drawCircle=!0,this.setWidth(2*this.radius+4)}setLineEndType(t){return t>=zt.LineEndType.NONE&&t<=zt.LineEndType.DOWN&&(this.leg=t),this}setStringNumber(t){return this.stringNumber=t,this}setOffsetX(t){return this.xOffset=t,this}setOffsetY(t){return this.yOffset=t,this}setLastNote(t){return this.lastNote=t,this}setDashed(t){return this.dashed=t,this}setDrawCircle(t){return this.drawCircle=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index),s=e.hasStem()?e.getStemDirection():j.UP;let n=i.x+this.xShift+this.xOffset,a={};e.hasStem()&&(a=e.checkStem().getExtents());let o=i.y+this.yShift+this.yOffset;switch(this.position){case P.Position.ABOVE:o=e.getYs().reduce(((t,e)=>t<e?t:e)),e.hasStem()&&s===j.UP&&(o=a.topY+w.get("StringNumber.stemPadding")),o-=this.radius+w.get("StringNumber.verticalPadding")+this.textLine*Y.STAVE_LINE_DISTANCE;break;case P.Position.BELOW:o=e.getYs().reduce(((t,e)=>t>e?t:e)),e.hasStem()&&s===j.DOWN&&(o=a.topY-w.get("StringNumber.stemPadding")),o+=this.radius+w.get("StringNumber.verticalPadding")+this.textLine*Y.STAVE_LINE_DISTANCE;break;case P.Position.LEFT:n-=this.radius/2+w.get("StringNumber.leftPadding");break;case P.Position.RIGHT:n+=this.radius/2+w.get("StringNumber.rightPadding");break;default:throw new c("InvalidPosition",`The position ${this.position} is invalid`)}this.drawCircle&&(t.beginPath(),t.arc(n,o,this.radius,0,2*Math.PI,!1),t.setLineWidth(1.5),t.stroke()),t.setFont(this.fontInfo);const h=n-t.measureText(this.stringNumber).width/2;t.fillText(""+this.stringNumber,h,o+4.5);const l=this.lastNote;if(r(l)){const i=l.getStemX()-e.getX()+5;let s,a;switch(t.setStrokeStyle("#000000"),t.setLineCap("round"),t.setLineWidth(.6),this.dashed?zt.drawDashedLine(t,n+10,o,n+i,o,[3,3]):zt.drawDashedLine(t,n+10,o,n+i,o,[3,0]),this.leg){case zt.LineEndType.UP:s=-10,a=this.dashed?[3,3]:[3,0],zt.drawDashedLine(t,n+i,o,n+i,o+s,a);break;case zt.LineEndType.DOWN:s=10,a=this.dashed?[3,3]:[3,0],zt.drawDashedLine(t,n+i,o,n+i,o+s,a)}}}}class qt extends P{static get CATEGORY(){return l.Stroke}static format(t,e){const i=e.leftShift;if(!t||0===t.length)return!1;const s=t.map((t=>{const e=t.getNote(),i=t.checkIndex();if(o(e)){const{line:s}=e.getKeyProps()[i];return{line:s,shift:e.getLeftDisplacedHeadPx(),stroke:t}}if(h(e)){const{str:s}=e.getPositions()[i];return{line:s,shift:0,stroke:t}}throw new c("Internal","Unexpected instance.")})),n=i,a=s.reduce(((t,{stroke:e,shift:i})=>(e.setXShift(n+i),Math.max(e.getWidth()+5,t))),0);return e.leftShift+=a,!0}constructor(t,e){super(),this.options=Object.assign({allVoices:!0},e),this.allVoices=this.options.allVoices,this.type=t,this.position=P.Position.LEFT,this.renderOptions={fontScale:w.get("Stroke.fontSize")},this.setXShift(0),this.setWidth(10)}getPosition(){return this.position}addEndNote(t){return this.noteEnd=t,this}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(this.position,this.index);let s=e.getYs(),n=i.y,o=i.y;const r=i.x-5,h=e.checkStave().getSpacingBetweenLines(),l=this.checkModifierContext().getMembers(e.getCategory());for(let t=0;t<l.length;t++){const e=l[t];if(a(e)){s=e.getYs();for(let e=0;e<s.length;e++)(this.note===l[t]||this.allVoices)&&(n=Math.min(n,s[e]),o=Math.max(o,s[e]))}}let d="",u=0,g=0;switch(this.type){case qt.Type.BRUSH_DOWN:case qt.Type.ROLL_DOWN:case qt.Type.RASGUEADO_DOWN:d=O.arrowheadBlackUp,u=n,n-=h/2,o+=h/2;break;case qt.Type.BRUSH_UP:case qt.Type.ROLL_UP:case qt.Type.RASGUEADO_UP:d=O.arrowheadBlackDown,u=o+h,n-=h/2;break;case qt.Type.ARPEGGIO_DIRECTIONLESS:n-=h/2,o+=h/2;break;default:throw new c("InvalidType",`The stroke type ${this.type} does not exist`)}if(this.type===qt.Type.BRUSH_DOWN||this.type===qt.Type.BRUSH_UP)t.fillRect(r+this.xShift,n,1,o-n);else{const e=d===O.arrowheadBlackDown?O.wiggleArpeggiatoDown:O.wiggleArpeggiatoUp;let i="";const s=new N;for(;s.getWidth()<o-n;)i+=e,s.setText(i);this.type===qt.Type.RASGUEADO_DOWN||this.type===qt.Type.ROLL_DOWN||this.type===qt.Type.ARPEGGIO_DIRECTIONLESS?(t.openRotation(90,r+this.xShift,n),s.renderText(t,r+this.xShift,n-s.getTextMetrics().actualBoundingBoxDescent+s.getHeight()/2),t.closeRotation(),g=n+s.getWidth()+5):(t.openRotation(-90,r+this.xShift,o),s.renderText(t,r+this.xShift,o-s.getTextMetrics().actualBoundingBoxDescent+s.getHeight()/2),t.closeRotation(),g=o-s.getWidth()-5)}if(0!==u){const e=new N;e.setText(d),e.renderText(t,r+this.xShift-e.getWidth()/2,u)}if(this.type===qt.Type.RASGUEADO_DOWN||this.type===qt.Type.RASGUEADO_UP){const e=new N("Stroke.text");e.setText("R"),e.renderText(t,r+this.xShift-e.getWidth()/2,g+(this.type===qt.Type.RASGUEADO_DOWN?e.getHeight():0))}}}qt.Type={BRUSH_DOWN:1,BRUSH_UP:2,ROLL_DOWN:3,ROLL_UP:4,RASGUEADO_DOWN:5,RASGUEADO_UP:6,ARPEGGIO_DIRECTIONLESS:7};class Kt extends P{static get CATEGORY(){return l.Vibrato}static format(t,e,i){if(!t||0===t.length)return!1;let s=e.topTextLine,n=0,a=e.rightShift-7;const o=i.getMembers(Tt.CATEGORY);if(o&&o.length>0){s-=o.map((t=>t.getTextHeight())).reduce(((t,e)=>t>e?t:e))/Y.STAVE_LINE_DISTANCE+1}else e.topTextLine+=1;for(let e=0;e<t.length;++e){const i=t[e];i.setXShift(a),i.setTextLine(s),n+=i.getWidth(),a+=n}return e.rightShift+=n,!0}constructor(){super(),this.position=P.Position.RIGHT,this.renderOptions={code:60080,width:20},this.setVibratoWidth(this.renderOptions.width)}setVibratoWidth(t){this.renderOptions.width=t,this.text=String.fromCodePoint(this.renderOptions.code);const e=this.getWidth();if(!e)throw new c("Cannot set vibrato width if width is 0");const i=Math.round(this.renderOptions.width/e);for(let t=1;t<i;t++)this.text+=String.fromCodePoint(this.renderOptions.code);return this}setVibratoCode(t){return this.renderOptions.code=t,this.setVibratoWidth(this.renderOptions.width)}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getModifierStartXY(P.Position.RIGHT,this.index).x,s=e.getYForTopText(this.textLine)+5;this.renderText(t,i,s)}}function Qt(...t){$t.DEBUG&&g("VexFlow.ModifierContext",t)}class $t{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}addModifier(t){return Qt("addModifier is deprecated, use addMember instead."),this.addMember(t)}addMember(t){const e=t.getCategory();return this.members[e]||(this.members[e]=[]),this.members[e].push(t),t.setModifierContext(this),this.preFormatted=!1,this}getModifiers(t){return Qt("getModifiers is deprecated, use getMembers instead."),this.getMembers(t)}getMembers(t){var e;return null!==(e=this.members[t])&&void 0!==e?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 c("UnformattedMember","Unformatted member has no metrics.");return{width:this.state.leftShift+this.state.rightShift+this.spacing,spacing:this.spacing}}preFormat(){if(this.preFormatted)return;Qt("Preformatting ModifierContext");const t=this.state,e=this.members;Lt.format(e[l.StaveNote],t),Mt.format(e[l.Parenthesis],t),yt.format(e[l.Dot],t),Ct.format(e[l.FretHandFinger],t),z.format(e[l.Accidental],t),qt.format(e[l.Stroke],t),Pt.format(e[l.GraceNoteGroup],t),At.format(e[l.NoteSubGroup],t),jt.format(e[l.StringNumber],t),ot.format(e[l.Articulation],t),Rt.format(e[l.Ornament],t),Q.format(e[l.Annotation],t),bt.format(e[l.ChordSymbol],t),Tt.format(e[l.Bend],t),Kt.format(e[l.Vibrato],t,this),this.width=t.leftShift+t.rightShift,this.preFormatted=!0}postFormat(){this.postFormatted||(Qt("Postformatting ModifierContext"),Lt.postFormat(this.getMembers(l.StaveNote)))}}$t.DEBUG=!1;class Jt extends mt{static get CATEGORY(){return l.Clef}static get types(){const{gClef:t,fClef:e,cClef:i,unpitchedPercussionClef1:s,sixStringTabClef:n}=O;return{treble:{code:t,line:3},bass:{code:e,line:1},alto:{code:i,line:2},tenor:{code:i,line:1},percussion:{code:s,line:2},soprano:{code:i,line:4},"mezzo-soprano":{code:i,line:3},"baritone-c":{code:i,line:0},"baritone-f":{code:e,line:2},subbass:{code:e,line:0},french:{code:t,line:4},tab:{code:n,line:2.5}}}constructor(t,e,i){super(),this.code=Jt.types.treble.code,this.line=Jt.types.treble.line,this.size="default",this.type="treble",this.setPosition(ct.BEGIN),this.setType(t,e,i),function(...t){Jt.DEBUG&&g("VexFlow.Clef",t)}("Creating clef:",t)}setType(t,e="default",i){return this.type=t,this.code=Jt.types[t].code,this.line=Jt.types[t].line,this.size=null!=e?e:"default","8va"===i&&(this.code===O.gClef&&(this.code=O.gClef8va),this.code===O.fClef&&(this.code=O.fClef8va)),"8vb"===i&&(this.code===O.gClef&&(this.code=O.gClef8vb),this.code===O.fClef&&(this.code=O.fClef8vb)),this.text=this.code,this.fontInfo.size=Math.floor(Jt.getPoint(this.size)),this}static getPoint(t){return"default"===t?w.get("fontSize"):2*w.get("fontSize")/3}setStave(t){return this.stave=t,this}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),e.openGroup("clef",this.getAttribute("id")),this.y=t.getYForLine(this.line),this.renderText(e,0,0),e.closeGroup()}}Jt.DEBUG=!1;class Zt extends mt{static get CATEGORY(){return l.KeySignature}constructor(t,e,i){super(),this.accList=[],this.setKeySig(t,e,i),this.setPosition(ct.BEGIN),this.children=[],this.paddingForced=!1}convertToGlyph(t,e,i){const s=Y.accidentalCodes(t.type),n=new N(l.KeySignature);n.setText(s);let a=1;if(n.setYShift(i.getYForLine(t.line)),this.children.length>0){const t=this.children[this.children.length-1],e=t=>t.getText()===O.accidentalNatural,i=(t,e)=>Math.abs(e.getYShift()-t.getYShift());(e(t)||e(n))&&i(t,n)<10&&(a=2),n.setXShift(t.getXShift()+t.getWidth()+a)}this.children.push(n),this.width+=n.getWidth()+a}cancelKey(t){return this.formatted=!1,this.cancelKeySpec=t,this}convertToCancelAccList(t){const e=Y.keySignature(t),i=this.accList.length>0&&e.length>0&&e[0].type!==this.accList[0].type,s=i?e.length:e.length-this.accList.length;if(s<1)return;const n=[];for(let t=0;t<s;t++){let a=t;i||(a=e.length-s+t);const o=e[a];n.push({type:"n",line:o.line})}return this.accList=n.concat(this.accList),{accList:n,type:e[0].type}}addToStave(t){return this.paddingForced=!0,t.addModifier(this),this}getBoundingBox(){return this.formatted||this.format(),super.getBoundingBox()}calculateDimensions(){let t;t=this.children.length>0?this.children[0].getBoundingBox():new y(this.x+this.xShift,this.y+this.yShift,0,0),this.children.forEach((e=>{t.mergeWith(e.getBoundingBox())})),this.width=t.getW(),this.height=t.getH(),this.y=t.getY()}convertAccLines(t,e,i=this.accList){let s,n,a=0;switch(t){case"soprano":"#"===e?s=[2.5,.5,2,0,1.5,-.5,1]:a=-1;break;case"mezzo-soprano":"b"===e?s=[0,2,.5,2.5,1,3,1.5]:a=1.5;break;case"alto":a=.5;break;case"tenor":"#"===e?s=[3,1,2.5,.5,2,0,1.5]:a=-.5;break;case"baritone-f":case"baritone-c":"b"===e?s=[.5,2.5,1,3,1.5,3.5,2]:a=2;break;case"bass":case"french":a=1}if(void 0!==s)for(n=0;n<i.length;++n)i[n].line=s[n];else if(0!==a)for(n=0;n<i.length;++n)i[n].line+=a}getPadding(t){return this.formatted||this.format(),0===this.children.length||!this.paddingForced&&t<2?0:this.padding}getWidth(){return this.formatted||this.format(),this.width}setKeySig(t,e,i){return this.formatted=!1,this.keySpec=t,this.cancelKeySpec=e,this.alterKeySpec=i,this}alterKey(t){return this.formatted=!1,this.alterKeySpec=t,this}convertToAlterAccList(t){const e=Math.min(t.length,this.accList.length);for(let i=0;i<e;++i)t[i]&&(this.accList[i].type=t[i])}format(){const t=this.checkStave();this.width=0,this.children=[],this.accList=Y.keySignature(u(this.keySpec));const e=this.accList,i=e.length>0?e[0].type:void 0;let s;if(this.cancelKeySpec&&(s=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){const n=(this.position===ct.END?t.getEndClef():t.getClef())||t.getClef();s&&this.convertAccLines(n,s.type,s.accList),this.convertAccLines(n,i,e);for(let e=0;e<this.accList.length;++e)this.convertToGlyph(this.accList[e],this.accList[e+1],t)}this.calculateDimensions(),this.formatted=!0}draw(){const t=this.checkStave().checkContext();this.formatted||this.format(),this.setRendered(),t.openGroup("keysignature",this.getAttribute("id"));for(let e=0;e<this.children.length;e++){this.children[e].renderText(t,this.x,0)}t.closeGroup()}}class te extends mt{static get CATEGORY(){return l.Repetition}constructor(t,e,i){super(),this.symbolType=t,this.x=e,this.xShift=0,this.yShift=i}setShiftX(t){return this.xShift=t,this}setShiftY(t){return this.yShift=t,this}draw(){const t=this.checkStave(),e=t.getModifierXShift(this.getPosition());switch(this.setRendered(),this.symbolType){case te.type.CODA_RIGHT:this.drawCodaFixed(t,e+t.getWidth());break;case te.type.CODA_LEFT:this.drawSymbolText(t,e,"Coda",!0);break;case te.type.SEGNO_LEFT:this.drawSegnoFixed(t,e);break;case te.type.SEGNO_RIGHT:this.drawSegnoFixed(t,e+t.getWidth());break;case te.type.DC:this.drawSymbolText(t,e,"D.C.",!1);break;case te.type.DC_AL_CODA:this.drawSymbolText(t,e,"D.C. al",!0);break;case te.type.DC_AL_FINE:this.drawSymbolText(t,e,"D.C. al Fine",!1);break;case te.type.DS:this.drawSymbolText(t,e,"D.S.",!1);break;case te.type.DS_AL_CODA:this.drawSymbolText(t,e,"D.S. al",!0);break;case te.type.DS_AL_FINE:this.drawSymbolText(t,e,"D.S. al Fine",!1);break;case te.type.FINE:this.drawSymbolText(t,e,"Fine",!1);break;case te.type.TO_CODA:this.drawSymbolText(t,e,"To",!0)}}drawCodaFixed(t,e){const i=t.getYForTopText(t.getNumLines());return this.text=O.coda,this.renderText(t.checkContext(),e,i+w.get("Repetition.coda.offsetY")),this}drawSegnoFixed(t,e){const i=t.getYForTopText(t.getNumLines());return this.text=O.segno,this.renderText(t.checkContext(),e,i+w.get("Repetition.segno.offsetY")),this}drawSymbolText(t,e,i,s){const n=t.checkContext();let a=0;switch(this.text=i,s&&(this.text+=" "),this.setFont(w.getFontInfo("Repetition.text")),this.symbolType){case te.type.CODA_LEFT:a=t.getVerticalBarWidth();break;case te.type.DC:case te.type.DC_AL_FINE:case te.type.DS:case te.type.DS_AL_FINE:case te.type.FINE:default:a=e-(t.getNoteStartX()-this.x)+t.getWidth()-this.width-w.get("Repetition.text.offsetX")}const o=t.getYForTopText(t.getNumLines())+w.get("Repetition.text.offsetY");return this.renderText(n,a,o),this}}te.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};class ee extends mt{static get CATEGORY(){return l.StaveSection}constructor(t,e=0,i=0,s=!0){super(),this.setText(t),this.x=e,this.yShift=i,this.drawRect=s,this.padding=w.get("StaveSection.padding")}setDrawRect(t){return this.drawRect=t,this}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),this.x=t.getX()+t.getModifierXShift(this.getPosition());const i=-1*this.textMetrics.actualBoundingBoxDescent,s=this.width+2*this.padding,n=this.height+2*this.padding,a=t.getYForTopText(1.5)+this.yShift,o=this.x+this.xShift;this.drawRect&&(e.beginPath(),e.rect(o,a-n+i,s,n),e.stroke()),this.renderText(e,this.xShift+this.padding,a-this.padding)}}class ie extends mt{static get CATEGORY(){return l.StaveTempo}constructor(t,e,i){super(),this.durationToCode={"1/4":O.metNoteDoubleWholeSquare,long:O.metNoteDoubleWholeSquare,"1/2":O.metNoteDoubleWhole,breve:O.metNoteDoubleWhole,1:O.metNoteWhole,whole:O.metNoteWhole,w:O.metNoteWhole,2:O.metNoteHalfUp,half:O.metNoteHalfUp,h:O.metNoteHalfUp,4:O.metNoteQuarterUp,quarter:O.metNoteQuarterUp,q:O.metNoteQuarterUp,8:O.metNote8thUp,eighth:O.metNote8thUp,16:O.metNote16thUp,"16th":O.metNote16thUp,32:O.metNote32ndUp,"32nd":O.metNote32ndUp,64:O.metNote64thUp,"64th":O.metNote64thUp,128:O.metNote128thUp,"128th":O.metNote128thUp,256:O.metNote256thUp,"256th":O.metNote256thUp,512:O.metNote512thUp,"512th":O.metNote512thUp,1024:O.metNote1024thUp,"1024th":O.metNote1024thUp},this.tempo=t,this.position=ct.ABOVE,this.x=e,this.setXShift(10),this.setYShift(i)}setTempo(t){return this.tempo=t,this}draw(){const t=this.checkStave(),e=t.getModifierXShift(this.getPosition()),i=t.checkContext();this.setRendered();const{name:s,duration:n,dots:a,bpm:o,duration2:r,dots2:h,parenthesis:l}=this.tempo;let c=this.x+e;const d=t.getYForTopText(1),u=new N("StaveTempo.glyph"),g=new N("StaveTempo");if(s&&(this.text=s,this.fontInfo=w.getFontInfo("StaveTempo.name"),this.renderText(i,e,d),c+=this.getWidth()+3),(s&&n||l)&&(g.setText("("),g.renderText(i,c+this.xShift,d+this.yShift),c+=g.getWidth()+3),n){if(u.setText(this.durationToCode[n]),u.renderText(i,c+this.xShift,d+this.yShift),c+=u.getWidth()+3,a){u.setText(O.metAugmentationDot);for(let t=0;t<a;t++)u.renderText(i,c+this.xShift,d+2+this.yShift),c+=u.getWidth()+3}if(g.setText("="),g.renderText(i,c+this.xShift,d+this.yShift),c+=g.getWidth()+3,r){if(u.setText(this.durationToCode[r]),u.renderText(i,c+this.xShift,d+this.yShift),c+=u.getWidth()+3,h){u.setText(O.metAugmentationDot);for(let t=0;t<h;t++)u.renderText(i,c+this.xShift,d+2+this.yShift),c+=u.getWidth()+3}}else o&&(g.setText(""+o),g.renderText(i,c+this.xShift,d+this.yShift),c+=g.getWidth()+3);(s||l)&&(g.setText(")"),g.renderText(i,c+this.xShift,d+this.yShift))}}}!function(t){t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(Yt||(Yt={}));class se extends lt{static get CATEGORY(){return l.TextNote}static get GLYPHS(){return{segno:O.segno,tr:O.ornamentTrill,mordent:O.ornamentMordent,mordentUpper:O.ornamentShortTrill,mordentLower:O.ornamentMordent,f:O.dynamicForte,p:O.dynamicPiano,m:O.dynamicMezzo,s:O.dynamicSforzando,z:O.dynamicZ,coda:O.coda,pedalOpen:O.keyboardPedalPed,pedalClose:O.keyboardPedalUp,caesuraStraight:O.caesura,caesuraCurved:O.caesuraCurved,breath:O.breathMarkComma,tick:O.breathMarkTick,turn:O.ornamentTurn,turnInverted:O.ornamentTurnSlash}}constructor(t){var e,i;super(t),this.text=null!==(e=t.text)&&void 0!==e?e:"",t.glyph&&(this.text+=se.GLYPHS[t.glyph]||t.glyph),t.font?this.setFont(t.font):void 0===t.glyph&&this.setFont(w.getFontInfo("TextNote.text.fontSize"));const s=.769231*B.convertSizeToPointValue(this.fontInfo.size);t.superscript&&(this.superscript=new N("TexNote.subSuper"),this.superscript.setText(t.superscript),this.superscript.setFontSize(s)),t.subscript&&(this.subscript=new N("TexNote.subSuper"),this.subscript.setText(t.subscript),this.subscript.setFontSize(s)),this.line=null!==(i=t.line)&&void 0!==i?i:0,this.smooth=t.smooth||!1,this.ignoreTicks=t.ignoreTicks||!1,this.justification=Yt.LEFT}setJustification(t){return this.justification=t,this}setLine(t){return this.line=t,this}getLine(){return this.line}preFormat(){if(this.preFormatted)return;const t=this.checkTickContext("Can't preformat without a TickContext.");this.justification===Yt.CENTER?this.leftDisplacedHeadPx=this.width/2:this.justification===Yt.RIGHT&&(this.leftDisplacedHeadPx=this.width),this.rightDisplacedHeadPx=t.getMetrics().glyphPx/2,this.preFormatted=!0}draw(){const t=this.checkContext(),e=this.checkStave(),i=this.checkTickContext("Can't draw without a TickContext.");this.setRendered();let s=this.getAbsoluteX()+i.getMetrics().glyphPx/2;const n=this.getWidth();this.justification===Yt.CENTER?s-=n/2:this.justification===Yt.RIGHT&&(s-=n);const a=e.getYForLine(this.line+-3);this.renderText(t,s,a);const o=this.getHeight();this.superscript&&this.superscript.renderText(t,s+this.width+2,a-o/2.2),this.subscript&&this.subscript.renderText(t,s+this.width+2,a+o/2.2-1)}}se.Justification=Yt;class ne extends mt{static get CATEGORY(){return l.StaveText}constructor(t,e,i={}){var s,n,a;super(),this.setText(t),this.setXShift(null!==(s=i.shiftX)&&void 0!==s?s:0),this.setYShift(null!==(n=i.shiftY)&&void 0!==n?n:0),this.position=e,this.justification=null!==(a=i.justification)&&void 0!==a?a:se.Justification.CENTER}draw(){const t=this.checkStave(),e=t.checkContext();let i,s;switch(this.setRendered(),this.position){case ct.LEFT:case ct.RIGHT:s=(t.getYForLine(0)+t.getBottomLineY())/2,i=this.position===ct.LEFT?t.getX()-this.width-24:t.getX()+t.getWidth()+24;break;case ct.ABOVE:case ct.BELOW:i=t.getX(),this.justification===Yt.CENTER?i+=t.getWidth()/2-this.width/2:this.justification===Yt.RIGHT&&(i+=t.getWidth()-this.width),s=this.position===ct.ABOVE?t.getYForTopText(2):t.getYForBottomText(2);break;default:throw new c("InvalidPosition","Value Must be in Modifier.Position.")}this.renderText(e,i,s+4)}}!function(t){t[t.NONE=1]="NONE",t[t.BEGIN=2]="BEGIN",t[t.MID=3]="MID",t[t.END=4]="END",t[t.BEGIN_END=5]="BEGIN_END"}(_t||(_t={}));class ae extends mt{static get CATEGORY(){return l.Volta}static get type(){return _t}constructor(t,e,i,s){super(),this.type=t,this.x=i,this.yShift=s,this.text=e}draw(){const t=this.checkStave(),e=t.getModifierXShift(this.getPosition()),i=t.checkContext();this.setRendered();let s=t.getWidth()-e;const n=t.getYForTopText(t.getNumLines())+this.yShift,a=1.5*t.getSpacingBetweenLines();switch(this.type){case _t.BEGIN:i.fillRect(this.x+e,n,1,a);break;case _t.END:s-=5,i.fillRect(this.x+e+s,n,1,a);break;case _t.BEGIN_END:s-=3,i.fillRect(this.x+e,n,1,a),i.fillRect(this.x+e+s,n,1,a)}this.type!==_t.BEGIN&&this.type!==_t.BEGIN_END||this.renderText(i,e+5,n-this.yShift+15),i.fillRect(this.x+e,n,s,1)}}class oe extends mt{static get CATEGORY(){return l.TimeSignature}constructor(t="4/4",e=15,i=!0){super(),this.timeSpec="4/4",this.line=0,this.isNumeric=!0,this.topStartX=0,this.botStartX=0,this.lineShift=0,this.topText=new N,this.botText=new N,this.validateArgs=i;const s=e;this.topLine=1,this.bottomLine=3,this.setPosition(ct.BEGIN),this.setTimeSig(t),this.setPadding(s)}static getTimeSigCode(t,e=!1){let i=O.null;switch(t){case"C":i=O.timeSigCommon;break;case"C|":i=O.timeSigCutCommon;break;case"+":i=e?O.timeSigPlusSmall:O.timeSigPlus;break;case"-":i=O.timeSigMinus;break;case"(":i=e?O.timeSigParensLeftSmall:O.timeSigParensLeft;break;case")":i=e?O.timeSigParensRightSmall:O.timeSigParensRight;break;default:i=String.fromCodePoint(57472+Number(t[0]))}return i}makeTimeSignatureGlyph(t,e){let i="",s=0,n=0;for(let s=0;s<t.length;++s){i+=oe.getTimeSigCode(t[s],e.length>0)}this.topText.setText(i),s=this.topText.getWidth(),n=this.topText.getHeight();let a=0;i="";for(let t=0;t<e.length;++t){i+=oe.getTimeSigCode(e[t],!0)}this.botText.setText(i),a=this.botText.getWidth(),n=Math.max(n,this.botText.getHeight()),this.lineShift=n>30?.5:0,this.width=Math.max(s,a),this.topStartX=(this.width-s)/2,this.botStartX=(this.width-a)/2}setTimeSig(t){var e,i;if(this.timeSpec=t,"C"===t||"C|"===t){const e=oe.getTimeSigCode(t);this.line=2,this.text=e,this.isNumeric=!1}else{this.validateArgs&&(t=>{t.split("/").forEach((e=>{if(!1===/^[0-9+\-()]+$/.test(e))throw new c("BadTimeSignature",`Invalid time spec: ${t}. Must contain valid signatures.`)}))})(t);const s=t.split("/");this.line=0,this.isNumeric=!0,this.makeTimeSignatureGlyph(null!==(e=s[0])&&void 0!==e?e:"",null!==(i=s[1])&&void 0!==i?i:"")}return this}getTimeSpec(){return this.timeSpec}getLine(){return this.line}setLine(t){this.line=t}getIsNumeric(){return this.isNumeric}setIsNumeric(t){this.isNumeric=t}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),e.openGroup("timesignature",this.getAttribute("id")),this.drawAt(e,t,this.x),e.closeGroup()}drawAt(t,e,i){if(this.setRendered(),this.isNumeric){let s=i+this.topStartX,n=0;n=this.botText.getText().length>0?e.getYForLine(this.topLine-this.lineShift):(e.getYForLine(this.topLine)+e.getYForLine(this.bottomLine))/2,this.topText.renderText(t,s,n),s=i+this.botStartX,n=e.getYForLine(this.bottomLine+this.lineShift),this.botText.renderText(t,s,n)}else this.renderText(t,i-this.x,e.getYForLine(this.line))}}const re={[ft.CATEGORY]:0,[Jt.CATEGORY]:1,[Zt.CATEGORY]:2,[oe.CATEGORY]:3},he={[oe.CATEGORY]:0,[Zt.CATEGORY]:1,[ft.CATEGORY]:2,[Jt.CATEGORY]:3};class le extends N{static get CATEGORY(){return l.Stave}static get defaultPadding(){return w.get("Stave.padding")+w.get("Stave.endPaddingMax")}static get rightPadding(){return w.get("Stave.endPaddingMax")}constructor(t,e,i,s){super(),this.x=t,this.y=e,this.width=i,this.formatted=!1,this.startX=t+5,this.endX=t+i,this.modifiers=[],this.measure=0,this.clef="treble",this.endClef=void 0,this.options=Object.assign({verticalBarWidth:10,numLines:5,leftBar:!0,rightBar:!0,spacingBetweenLinesPx:Y.STAVE_LINE_DISTANCE,spaceAboveStaffLn:4,spaceBelowStaffLn:4,topTextPosition:1,bottomTextPosition:4,lineConfig:[]},s),this.bounds={x:this.x,y:this.y,w:this.width,h:0},this.defaultLedgerLineStyle={strokeStyle:"#444",lineWidth:1.4},this.resetLines(),this.addModifier(new ft(this.options.leftBar?dt.SINGLE:dt.NONE)),this.addEndModifier(new ft(this.options.rightBar?dt.SINGLE:dt.NONE))}setDefaultLedgerLineStyle(t){this.defaultLedgerLineStyle=t}getDefaultLedgerLineStyle(){return Object.assign(Object.assign({},this.getStyle()),this.defaultLedgerLineStyle)}space(t){return this.options.spacingBetweenLinesPx*t}resetLines(){this.options.lineConfig=[];for(let t=0;t<this.options.numLines;t++)this.options.lineConfig.push({visible:!0});this.height=(this.options.numLines+this.options.spaceAboveStaffLn)*this.options.spacingBetweenLinesPx,this.options.bottomTextPosition=this.options.numLines}setNoteStartX(t){return this.formatted||this.format(),this.startX=t,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(t){return this.options.numLines=t,this.resetLines(),this}getTopLineTopY(){var t;return this.getYForLine(0)-(null!==(t=this.getStyle().lineWidth)&&void 0!==t?t:1)/2}getBottomLineBottomY(){var t;return this.getYForLine(this.getNumLines()-1)+(null!==(t=this.getStyle().lineWidth)&&void 0!==t?t:1)/2}setX(t){const e=t-this.x;this.formatted=!1,this.x=t,this.startX+=e,this.endX+=e;for(let t=0;t<this.modifiers.length;t++){const i=this.modifiers[t];i.setX(i.getX()+e)}return this}setWidth(t){return this.formatted=!1,this.width=t,this.endX=this.x+t,this}setMeasure(t){return this.measure=t,this}getMeasure(){return this.measure}getModifierXShift(t=0){if("number"!=typeof t)throw new c("InvalidIndex","Must be of number type");if(this.formatted||this.format(),1===this.getModifiers(ct.BEGIN).length)return 0;if(this.modifiers[t].getPosition()===ct.RIGHT)return 0;let e=this.startX-this.x;const i=this.modifiers[0];return i.getType()===dt.REPEAT_BEGIN&&e>i.getWidth()&&(e-=i.getWidth()),e}setRepetitionType(t,e=0){return this.modifiers.push(new te(t,this.x,e)),this}setVoltaType(t,e,i){return this.modifiers.push(new ae(t,e,this.x,i)),this}setSection(t,e,i=0,s,n=!0){const a=new ee(t).setYShift(e).setXShift(i).setDrawRect(n);return s&&a.setFontSize(s),this.addModifier(a),this}setTempo(t,e){return this.modifiers.push(new ie(t,this.x,e)),this}setStaveText(t,e,i={}){return this.modifiers.push(new ne(t,e,i)),this}getSpacingBetweenLines(){return this.options.spacingBetweenLinesPx}getBoundingBox(){return new y(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){const t=this.options,e=t.spacingBetweenLinesPx;return this.getYForLine(t.numLines)+t.spaceBelowStaffLn*e}getBottomLineY(){return this.getYForLine(this.options.numLines)}getYForLine(t){const e=this.options,i=e.spacingBetweenLinesPx,s=e.spaceAboveStaffLn;return this.y+t*i+s*i}getLineForY(t){const e=this.options,i=e.spacingBetweenLinesPx,s=e.spaceAboveStaffLn;return(t-this.y)/i-s}getYForTopText(t=0){return this.getYForLine(-t-this.options.topTextPosition)}getYForBottomText(t=0){return this.getYForLine(this.options.bottomTextPosition+t)}getYForNote(t){const e=this.options,i=e.spacingBetweenLinesPx,s=e.spaceAboveStaffLn;return this.y+s*i+5*i-t*i}getYForGlyphs(){return this.getYForLine(3)}addModifier(t,e){return void 0!==e&&t.setPosition(e),t.setStave(this),this.formatted=!1,this.modifiers.push(t),this}addEndModifier(t){return this.addModifier(t,ct.END),this}setBegBarType(t){const{SINGLE:e,REPEAT_BEGIN:i,NONE:s}=dt;return t!==e&&t!==i&&t!==s||(this.modifiers[0].setType(t),this.formatted=!1),this}setEndBarType(t){return t!==dt.REPEAT_BEGIN&&(this.modifiers[1].setType(t),this.formatted=!1),this}setClef(t,e,i,s){void 0===s&&(s=ct.BEGIN),s===ct.END?this.endClef=t:this.clef=t;const n=this.getModifiers(s,Jt.CATEGORY);return 0===n.length?this.addClef(t,e,i,s):n[0].setType(t,e,i),this}getClef(){return this.clef}setEndClef(t,e,i){return this.setClef(t,e,i,ct.END),this}getEndClef(){return this.endClef}setKeySignature(t,e,i){void 0===i&&(i=ct.BEGIN);const s=this.getModifiers(i,Zt.CATEGORY);return 0===s.length?this.addKeySignature(t,e,i):s[0].setKeySig(t,e),this}setEndKeySignature(t,e){return this.setKeySignature(t,e,ct.END),this}setTimeSignature(t,e,i){void 0===i&&(i=ct.BEGIN);const s=this.getModifiers(i,oe.CATEGORY);return 0===s.length?this.addTimeSignature(t,e,i):s[0].setTimeSig(t),this}setEndTimeSignature(t,e){return this.setTimeSignature(t,e,ct.END),this}addKeySignature(t,e,i){return void 0===i&&(i=ct.BEGIN),this.addModifier(new Zt(t,e).setPosition(i),i),this}addClef(t,e,i,s){return void 0===s||s===ct.BEGIN?this.clef=t:s===ct.END&&(this.endClef=t),this.addModifier(new Jt(t,e,i),s),this}addEndClef(t,e,i){return this.addClef(t,e,i,ct.END),this}addTimeSignature(t,e,i){return this.addModifier(new oe(t,e),i),this}addEndTimeSignature(t,e){return this.addTimeSignature(t,e,ct.END),this}addTrebleGlyph(){return this.addClef("treble"),this}getModifiers(t,e){const i=void 0===t,s=void 0===e;return i&&s?this.modifiers:i?this.modifiers.filter((t=>e===t.getCategory())):s?this.modifiers.filter((e=>t===e.getPosition())):this.modifiers.filter((i=>t===i.getPosition()&&e===i.getCategory()))}sortByCategory(t,e){for(let i=t.length-1;i>=0;i--)for(let s=0;s<i;s++)if(e[t[s].getCategory()]>e[t[s+1].getCategory()]){const e=t[s];t[s]=t[s+1],t[s+1]=e}}format(){var t,e,i,n;const a=this.modifiers[0],o=this.modifiers[1],r=this.getModifiers(ct.BEGIN),h=this.getModifiers(ct.END);let l,c,d;this.sortByCategory(r,re),this.sortByCategory(h,he),r.length>1&&a.getType()===dt.REPEAT_BEGIN&&(r.push(r.splice(0,1)[0]),r.splice(0,0,new ft(dt.SINGLE))),h.indexOf(o)>0&&h.splice(0,0,new ft(dt.NONE));let u=0,g=this.x;for(let t=0;t<r.length;t++)d=r[t],c=d.getPadding(t+u),l=d.getWidth(),g+=c,d.setX(g),g+=l,c+l===0&&u--;this.startX=g,g=this.x+this.width;const p={left:0,right:0,paddingRight:0,paddingLeft:0};let m=0;for(let a=0;a<h.length;a++){d=h[a],m=s(d)?a:m,p.right=0,p.left=0,p.paddingRight=0,p.paddingLeft=0;const o=d.getLayoutMetrics();o?(0!==a&&(p.right=null!==(t=o.xMax)&&void 0!==t?t:0,p.paddingRight=null!==(e=o.paddingRight)&&void 0!==e?e:0),p.left=-(null!==(i=o.xMin)&&void 0!==i?i:0),p.paddingLeft=null!==(n=o.paddingLeft)&&void 0!==n?n:0,a===h.length-1&&(p.paddingLeft=0)):(p.paddingRight=d.getPadding(a-m),0!==a&&(p.right=d.getWidth()),0===a&&(p.left=d.getWidth())),g-=p.paddingRight,g-=p.right,d.setX(g),g-=p.left,g-=p.paddingLeft}this.endX=1===h.length?this.x+this.width:g,this.formatted=!0}draw(){const t=this.checkContext();this.setRendered(),t.openGroup("stave",this.getAttribute("id")),this.formatted||this.format();const e=this.options.numLines,i=this.width,s=this.x;let n;for(let a=0;a<e;a++)n=this.getYForLine(a),this.options.lineConfig[a].visible&&(t.beginPath(),t.moveTo(s,n),t.lineTo(s+i,n),t.stroke());t.closeGroup();for(let e=0;e<this.modifiers.length;e++){const i=this.modifiers[e];i.setContext(t),i.setStave(this),i.drawWithStyle()}if(this.measure>0){t.setFont(this.fontInfo);const e=t.measureText(""+this.measure).width;n=this.getYForTopText(0)+3,t.fillText(""+this.measure,this.x-e/2,n)}}getVerticalBarWidth(){return this.options.verticalBarWidth}getConfigForLines(){return this.options.lineConfig}setConfigForLine(t,e){if(t>=this.options.numLines||t<0)throw new c("StaveConfigError","The line number must be within the range of the number of lines in the Stave.");if(void 0===e.visible)throw new c("StaveConfigError","The line configuration object is missing the 'visible' property.");if("boolean"!=typeof e.visible)throw new c("StaveConfigError","The line configuration objects 'visible' property must be true or false.");return this.options.lineConfig[t]=e,this}setConfigForLines(t){if(t.length!==this.options.numLines)throw new c("StaveConfigError","The length of the lines configuration array must match the number of lines in the Stave");for(const e in t)void 0===t[e].visible&&(t[e]=this.options.lineConfig[e]),this.options.lineConfig[e]=Object.assign(Object.assign({},this.options.lineConfig[e]),t[e]);return this.options.lineConfig=t,this}static formatBegModifiers(t){const e=e=>{let i=0;t.forEach((t=>{const s=t.getModifiers(ct.BEGIN,e);s.length>0&&s[0].getX()>i&&(i=s[0].getX())}));let s=0;t.forEach((t=>{s=0;t.getModifiers(ct.BEGIN,e).forEach((t=>{i-t.getX()>s&&(s=i-t.getX())}));const n=t.getModifiers(ct.BEGIN);let a=!1;n.forEach((t=>{t.getCategory()===e&&(a=!0),a&&s>0&&t.setX(t.getX()+s)})),t.setNoteStartX(t.getNoteStartX()+s)}))};t.forEach((t=>{t.formatted||t.format()})),e(l.Clef),e(l.KeySignature),e(l.TimeSignature);let i=0;t.forEach((t=>{t.getNoteStartX()>i&&(i=t.getNoteStartX())})),t.forEach((t=>{t.setNoteStartX(i)})),i=0,t.forEach((t=>{t.getModifiers(ct.BEGIN,l.Barline).forEach((t=>{t.getType()===dt.REPEAT_BEGIN&&t.getX()>i&&(i=t.getX())}))})),t.forEach((t=>{t.getModifiers(ct.BEGIN,l.Barline).forEach((t=>{t.getType()===dt.REPEAT_BEGIN&&t.setX(i)}))}))}}function ce(t,e,i,s,n){if(e!==de.type.BOLD_DOUBLE_LEFT&&e!==de.type.BOLD_DOUBLE_RIGHT)throw new c("InvalidConnector","A REPEAT_BEGIN or REPEAT_END type must be provided.");let a=3,o=3.5;e===de.type.BOLD_DOUBLE_RIGHT&&(a=-5,o=3),t.fillRect(i+a,s,1,n-s),t.fillRect(i-2,s,o,n-s)}class de extends N{static get CATEGORY(){return l.StaveConnector}constructor(t,e){super(),this.thickness=Y.STAVE_LINE_THICKNESS,this.topStave=t,this.bottomStave=e,this.type=de.type.DOUBLE,this.xShift=0,this.texts=[]}setType(t){const e="string"==typeof t?de.typeString[t]:t;return Object.values(de.type).includes(e)&&(this.type=e),this}getType(){return this.type}setText(t,e={}){var i,s;const n=new N("StaveConnector.text");return n.setText(t),n.setXShift(null!==(i=e.shiftX)&&void 0!==i?i:0),n.setYShift(null!==(s=e.shiftY)&&void 0!==s?s:0),this.texts.push(n),this}draw(){const t=this.checkContext();this.setRendered();let e=this.topStave.getYForLine(0),i=this.bottomStave.getYForLine(this.bottomStave.getNumLines()-1)+this.thickness,s=3,n=this.topStave.getX();(this.type===de.type.SINGLE_RIGHT||this.type===de.type.BOLD_DOUBLE_RIGHT||this.type===de.type.THIN_DOUBLE)&&(n=this.topStave.getX()+this.topStave.getWidth());let a=i-e;const o=new N;switch(this.type){case de.type.SINGLE:case de.type.SINGLE_LEFT:case de.type.SINGLE_RIGHT:s=1;break;case de.type.DOUBLE:n-=5,e-=this.thickness,a+=.5;break;case de.type.BRACE:{s=12;const n=this.topStave.getX()-2+this.xShift,o=e,r=n,h=i,l=n-s,c=o+a/2,d=l-.9*s,u=o+.2*a,g=n+1.1*s,p=c-.135*a,m=g,f=c+.135*a,S=d,T=h-.2*a,x=l-s,w=T,b=n+.4*s,y=c+.135*a,C=b,k=c-.135*a,D=x,v=u;t.beginPath(),t.moveTo(n,o),t.bezierCurveTo(d,u,g,p,l,c),t.bezierCurveTo(m,f,S,T,r,h),t.bezierCurveTo(x,w,b,y,l,c),t.bezierCurveTo(C,k,D,v,n,o),t.fill(),t.stroke();break}case de.type.BRACKET:e-=6,i+=6,a=i-e,o.setText(O.bracketTop),o.renderText(t,n-5,e),o.setText(O.bracketBottom),o.renderText(t,n-5,i),n-=5;break;case de.type.BOLD_DOUBLE_LEFT:ce(t,this.type,n+this.xShift,e,i-this.thickness);break;case de.type.BOLD_DOUBLE_RIGHT:ce(t,this.type,n,e,i-this.thickness);break;case de.type.THIN_DOUBLE:s=1,a-=this.thickness;break;case de.type.NONE:break;default:throw new c("InvalidType",`The provided StaveConnector.type (${this.type}) is invalid.`)}this.type!==de.type.BRACE&&this.type!==de.type.BOLD_DOUBLE_LEFT&&this.type!==de.type.BOLD_DOUBLE_RIGHT&&this.type!==de.type.NONE&&t.fillRect(n,e,s,a),this.type===de.type.THIN_DOUBLE&&t.fillRect(n-3,e,s,a);for(let e=0;e<this.texts.length;e++){const i=this.texts[e],s=this.topStave.getX()-i.getWidth()-24,n=(this.topStave.getYForLine(0)+this.bottomStave.getBottomLineY())/2;i.renderText(t,s,n+4)}}}de.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},de.typeString={singleRight:de.type.SINGLE_RIGHT,singleLeft:de.type.SINGLE_LEFT,single:de.type.SINGLE,double:de.type.DOUBLE,brace:de.type.BRACE,bracket:de.type.BRACKET,boldDoubleLeft:de.type.BOLD_DOUBLE_LEFT,boldDoubleRight:de.type.BOLD_DOUBLE_RIGHT,thinDouble:de.type.THIN_DOUBLE,none:de.type.NONE};class ue{static getNextContext(t){const e=t.tContexts,i=e.indexOf(t);if(i+1<e.length)return e[i+1]}constructor(t){var e;this.preFormatted=!1,this.postFormatted=!1,this.tickID=null!==(e=null==t?void 0:t.tickID)&&void 0!==e?e:0,this.currentTick=new T(0,1),this.maxTicks=new T(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(t){return this.x=t,this.xBase=t,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(t){this.xBase=t,this.x=t+this.xOffset}getXOffset(){return this.xOffset}setXOffset(t){this.xOffset=t,this.x=this.xBase+t}getWidth(){return this.width+2*this.padding}setPadding(t){return this.padding=t,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getMaxTickable(){return this.maxTickable}getMinTickable(){return this.minTickable}getTickables(){return this.tickables}getTickableForVoice(t){return this.tickablesByVoice[t]}getTickablesByVoice(){return this.tickablesByVoice}getCenterAlignedTickables(){return this.tickables.filter((t=>t.isCenterAligned()))}getMetrics(){const{width:t,glyphPx:e,notePx:i,leftDisplacedHeadPx:s,rightDisplacedHeadPx:n,modLeftPx:a,modRightPx:o,totalLeftPx:r,totalRightPx:h}=this;return{width:t,glyphPx:e,notePx:i,leftDisplacedHeadPx:s,rightDisplacedHeadPx:n,modLeftPx:a,modRightPx:o,totalLeftPx:r,totalRightPx:h}}getCurrentTick(){return this.currentTick}setCurrentTick(t){this.currentTick=t,this.preFormatted=!1}addTickable(t,e){if(!t)throw new c("BadArgument","Invalid tickable added.");if(!t.shouldIgnoreTicks()){const e=t.getTicks();e.greaterThan(this.maxTicks)&&(this.maxTicks=e.clone(),this.maxTickable=t),(void 0===this.minTicks||e.lessThan(this.minTicks))&&(this.minTicks=e.clone(),this.minTickable=t)}return t.setTickContext(this),this.tickables.push(t),this.tickablesByVoice[null!=e?e:0]=t,this.preFormatted=!1,this}preFormat(){var t;if(this.preFormatted)return this;for(let e=0;e<this.tickables.length;++e){const i=this.tickables[e];i.preFormat();const s=i.getMetrics();this.leftDisplacedHeadPx=Math.max(this.leftDisplacedHeadPx,s.leftDisplacedHeadPx),this.rightDisplacedHeadPx=Math.max(this.rightDisplacedHeadPx,s.rightDisplacedHeadPx),this.notePx=Math.max(this.notePx,s.notePx),this.glyphPx=Math.max(this.glyphPx,null!==(t=s.glyphWidth)&&void 0!==t?t:0),this.modLeftPx=Math.max(this.modLeftPx,s.modLeftPx),this.modRightPx=Math.max(this.modRightPx,s.modRightPx),this.totalLeftPx=Math.max(this.totalLeftPx,s.modLeftPx+s.leftDisplacedHeadPx),this.totalRightPx=Math.max(this.totalRightPx,s.modRightPx+s.rightDisplacedHeadPx),this.width=this.notePx+this.totalLeftPx+this.totalRightPx}return this}postFormat(){return this.postFormatted||(this.postFormatted=!0),this}getFormatterMetrics(){return this.formatterMetrics}move(t,e,i){this.setX(this.getX()+t),this.getFormatterMetrics().freedom.left+=t,this.getFormatterMetrics().freedom.right-=t,e&&(e.getFormatterMetrics().freedom.right+=t),i&&(i.getFormatterMetrics().freedom.left-=t)}getDeviationCost(){return S(this.tickables.map((t=>t.getFormatterMetrics().space.deviation)))}getAverageDeviationCost(){return this.tickables.length?this.getDeviationCost()/this.tickables.length:0}}function ge(t,e,i,s){let n=e;for(let e=i+1;e<t.length;e++){const i=t[e];if(a(i)&&!i.isRest()&&!i.shouldIgnoreTicks()){n=i.getLineForRest();break}}if(s&&e!==n){n=p(Math.max(e,n),Math.min(e,n))}return n}class pe{static SimpleFormat(t,e=0,{paddingBetween:i=10}={}){t.reduce(((t,e)=>{e.addToModifierContext(new $t);const s=(new ue).addTickable(e).preFormat(),n=s.getMetrics();return s.setX(t+n.totalLeftPx),t+s.getWidth()+n.totalRightPx+i}),e)}static plotDebugging(t,e,i,s,n,a){var o,r;const h=i+(a=Object.assign({stavePadding:w.get("Stave.padding")},a)).stavePadding,l=e.contextGaps;t.save(),t.setFont(w.get("fontFamily"),8),l.gaps.forEach((e=>{var i,a,o;i=h+e.x1,a=h+e.x2,o="rgba(100,200,100,0.4)",t.beginPath(),t.setStrokeStyle(o),t.setFillStyle(o),t.setLineWidth(1),t.fillRect(i,s,Math.max(a-i,0),n-s),t.setFillStyle("green"),t.fillText(Math.round(e.x2-e.x1).toString(),h+e.x1,n+12)})),t.setFillStyle("red"),t.fillText(`Loss: ${(null!==(o=e.totalCost)&&void 0!==o?o:0).toFixed(2)} Shift: ${(null!==(r=e.totalShift)&&void 0!==r?r:0).toFixed(2)} Gap: ${l.total.toFixed(2)}`,h-20,n+27),t.restore()}static FormatAndDraw(t,e,i,s){let n={autoBeam:!1,alignRests:!1};"object"==typeof s?n=Object.assign(Object.assign({},n),s):"boolean"==typeof s&&(n.autoBeam=s);const a=new Ot(Y.TIME4_4).setMode(Ot.Mode.SOFT).addTickables(i),o=n.autoBeam?we.applyAndGetBeams(a):[];return(new pe).joinVoices([a]).formatToStave([a],e,{alignRests:n.alignRests,stave:e}),a.setContext(t).setStave(e).drawWithStyle(),o.forEach((e=>e.setContext(t).drawWithStyle())),a.getBoundingBox()}static FormatAndDrawTab(t,e,i,s,n,a,o){let r={autoBeam:a,alignRests:!1};"object"==typeof o?r=Object.assign(Object.assign({},r),o):"boolean"==typeof o&&(r.autoBeam=o);const h=new Ot(Y.TIME4_4).setMode(Ot.Mode.SOFT).addTickables(n),l=new Ot(Y.TIME4_4).setMode(Ot.Mode.SOFT).addTickables(s),c=r.autoBeam?we.applyAndGetBeams(h):[];(new pe).joinVoices([h]).joinVoices([l]).formatToStave([h,l],i,{alignRests:r.alignRests}),h.draw(t,i),l.draw(t,e),c.forEach((e=>e.setContext(t).drawWithStyle())),new de(i,e).setContext(t).drawWithStyle()}static AlignRestsToNotes(t,e,i){t.forEach(((s,n)=>{if(o(s)&&s.isRest()){if(s.getTuplet()&&!i)return;if(3!==s.getLineForRest())return;if(e||s.getBeam()){const e=s.getKeyProps()[0];if(0===n)e.line=ge(t,e.line,n,!1);else if(n>0&&n<t.length){const i=t[n-1];if(o(i))if(i.isRest())e.line=i.getKeyProps()[0].line;else{const s=i.getLineForRest();e.line=ge(t,s,n,!0)}}s.setKeyLine(0,e.line)}}}))}constructor(t){this.formatterOptions=Object.assign({globalSoftmax:!1,softmaxFactor:Y.SOFTMAX_FACTOR,maxIterations:5},t),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,e){if(!t||!t.length)throw new c("BadArgument","No voices to format rests");t.forEach((t=>pe.AlignRestsToNotes(t.getTickables(),e)))}preCalculateMinTotalWidth(t){const e=w.get("Stave.unalignedNotePadding");let i=0,s=0,n=0;const a=[],o=[];if(this.hasMinTotalWidth)return this.minTotalWidth;if(!t)throw new c("BadArgument","'voices' required to run preCalculateMinTotalWidth");this.createTickContexts(t);const{list:r,map:h}=this.tickContexts;this.minTotalWidth=0,r.forEach((e=>{const r=h[e];r.preFormat(),r.getTickables().length<t.length&&(i+=1),r.getTickables().forEach((t=>{s+=t.getMetrics().width,n+=t.getTicks().value(),a.push(t.getMetrics().width),o.push(t.getTicks().value())}));const l=r.getWidth();this.minTotalWidth+=l})),this.hasMinTotalWidth=!0;const l=s>0?s/a.length:1/a.length,d=S(a.map((t=>Math.pow(t-l,2)))),u=Math.pow(d/a.length,.5)/l,g=n/o.length,p=S(o.map((t=>Math.pow(t-g,2)))),m=Math.pow(p/o.length,.5)/g,f=Math.max(m,u)*r.length*e,T=e*i;return this.minTotalWidth+Math.max(T,f)}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new c("NoMinTotalWidth","Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'");return this.minTotalWidth}static getResolutionMultiplier(t){if(!t||!t.length)throw new c("BadArgument","No voices to format");const e=t[0].getTotalTicks();return t.reduce(((t,i)=>{if(!i.getTotalTicks().equals(e))throw new c("TickMismatch","Voices should have same total note duration in ticks.");if(i.getMode()===Ot.Mode.STRICT&&!i.isComplete())throw new c("IncompleteVoice","Voice does not have enough notes.");return Math.max(t,T.LCM(t,i.getResolutionMultiplier()))}),1)}createModifierContexts(t){if(0===t.length)return;const e=pe.getResolutionMultiplier(t),i=new Map,s=[];t.forEach((t=>{const n=new T(0,e);t.getTickables().forEach((t=>{const e=n.numerator;let a=i.get(t.getStave());if(a||(i.set(t.getStave(),{}),a=i.get(t.getStave())),!(a?a[e]:void 0)){const t=new $t;s.push(t),a[e]=t}t.addToModifierContext(a[e]),n.add(t.getTicks())}))})),this.modifierContexts.push({map:i,array:s,resolutionMultiplier:e})}createTickContexts(t){const e=function(t,e,i){if(0===t.length)return{map:{},array:[],list:[],resolutionMultiplier:0};const s={},n=[],a=[],o=pe.getResolutionMultiplier(t);return t.forEach(((t,r)=>{const h=new T(0,o);t.getTickables().forEach((t=>{const o=h.numerator;if(!s[o]){const t=e({tickID:o});a.push(t),s[o]=t,n.push(o)}i(t,s[o],r),h.add(t.getTicks())}))})),{map:s,array:a,list:n.sort(((t,e)=>t-e)),resolutionMultiplier:o}}(t,(t=>new ue(t)),((t,e,i)=>e.addTickable(t,i)));this.tickContexts=e;const i=this.tickContexts.array;return i.forEach((t=>{t.tContexts=i})),e}getTickContexts(){return this.tickContexts}preFormat(t=0,e,i,s){const n=this.tickContexts;if(!n)throw new c("NoTickContexts","preFormat requires TickContexts");const{list:a,map:o}=n;this.lossHistory=[],i&&s&&i.forEach((t=>t.setStave(s).preFormat()));let r=0,h=0;this.minTotalWidth=0;let l=0;a.forEach((t=>{const e=o[t];e.preFormat();const i=e.getWidth();this.minTotalWidth+=i;const s=e.getMaxTicks().value();l+=s;const n=e.getMetrics();r=r+h+n.totalLeftPx,e.setX(r),h=i-n.totalLeftPx}));const{globalSoftmax:d,softmaxFactor:g,maxIterations:p}=this.formatterOptions,m=S(a.map((t=>Math.pow(g,o[t].getMaxTicks().value()/l))));if(this.minTotalWidth=r+h,this.hasMinTotalWidth=!0,t<=0)return this.evaluate();const f=o[a[0]],T=o[a[a.length-1]];function x(t){return a.map(((e,i)=>{const s=o[e],n=s.getTickablesByVoice();let r;if(i>0){const e=o[a[i-1]];for(let h=i-1;h>=0;h--){const i=o[a[h]].getTickablesByVoice(),c=[];if(Object.keys(n).forEach((t=>{i[t]&&c.push(t)})),c.length>0){let a=0,o=1/0,h=0;if(c.forEach((t=>{const e=i[t].getTicks().value();e>a&&(r=i[t],a=e);const s=n[t],h=s.getX()-(s.getMetrics().modLeftPx+s.getMetrics().leftDisplacedHeadPx),l=i[t].getMetrics(),c=i[t].getX()+l.notePx+l.modRightPx+l.rightDisplacedHeadPx;o=Math.min(o,h-c)})),o=Math.min(o,s.getX()-(e.getX()+.05*t)),d){const e=l;h=Math.pow(g,a/e)/m*t}else void 0!==r&&(h=r.getVoice().softmax(a)*t);return{expectedDistance:h,maxNegativeShiftPx:o,fromTickable:r}}}}return{expectedDistance:0,fromTickablePx:0,maxNegativeShiftPx:0}}))}function b(t){const e=y/2;let i=0;return a.forEach(((s,n)=>{const a=o[s];if(n>0){const e=a.getX(),s=t[n],o=u(s.fromTickable).getX()+s.expectedDistance-(e+i);let r=0;o>0?i+=o:o<0&&(r=Math.min(s.maxNegativeShiftPx,Math.abs(o)),i+=-r),a.setX(e+i)}a.getCenterAlignedTickables().forEach((t=>{t.setCenterXShift(e-a.getX())}))})),T.getX()-f.getX()}const y=t-T.getMetrics().notePx-T.getMetrics().totalRightPx-f.getMetrics().totalLeftPx,C=w.get("Stave.endPaddingMin"),k=w.get("Stave.endPaddingMax"),D=w.get("Stave.padding");let v=y;const B=x(v);let L=b(B);if(1===a.length)return 0;const E=((t,e)=>{let i=t/2;if(e.length>1)for(let t=1;t<e.length;++t)i=Math.min(e[t].expectedDistance/2,i);return i})(v,B),N=t=>{let e=0;const i=T&&T.getMaxTickable();if(i){const s=i.getVoice();if(s.getTicksUsed().value()>s.getTotalTicks().value())return 2*k<E?E:k;const n=i.getWidth();e=s.softmax(T.getMaxTicks().value())*t-(n+D)}return 2*k<e?e:k};let F=N(v),O=F-(k-C);const P=y-O;let A=p;for(;L>P&&A>0||L+F<P&&A>1;)v-=L-P,F=N(v),O=F-(k-C),L=b(x(v)),A--;return this.justifyWidth=t,this.evaluate()}evaluate(){const t=this.tickContexts,e=this.justifyWidth;this.contextGaps={total:0,gaps:[]},t.list.forEach(((e,i)=>{if(0===i)return;const s=t.list[i-1],n=t.map[s],a=t.map[e],o=n.getMetrics(),r=a.getMetrics(),h=n.getX()+o.notePx+o.totalRightPx,l=a.getX()-r.totalLeftPx,c=l-h;this.contextGaps.total+=c,this.contextGaps.gaps.push({x1:h,x2:l}),a.getFormatterMetrics().freedom.left=c,n.getFormatterMetrics().freedom.right=c})),this.durationStats={};const i=this.durationStats;this.voices.forEach((t=>{t.getTickables().forEach(((t,s,n)=>{const a=t.getTicks().clone().simplify().toString(),o=t.getMetrics(),r=t.getFormatterMetrics(),h=t.getX()+o.notePx+o.modRightPx+o.rightDisplacedHeadPx;let l=0;if(s<n.length-1){const e=n[s+1],i=e.getMetrics();l=e.getX()-i.modLeftPx-i.leftDisplacedHeadPx-h,r.space.used=e.getX()-t.getX(),e.getFormatterMetrics().freedom.left=l}else l=e-h,r.space.used=e-t.getX();r.freedom.right=l,function(t,e){const s=i[t];void 0===s?i[t]={mean:e,count:1,total:e}:(s.count+=1,s.total+=e,s.mean=s.total/s.count)}(a,r.space.used)}))}));let s=0;return this.voices.forEach((t=>{t.getTickables().forEach((t=>{const e=t.getTicks().clone().simplify().toString(),n=t.getFormatterMetrics();n.space.mean=i[e].mean,n.duration=e,n.iterations+=1,n.space.deviation=n.space.used-n.space.mean,s+=Math.pow(n.space.deviation,2)}))})),this.totalCost=Math.sqrt(s),this.lossHistory.push(this.totalCost),this.totalCost}tune(t){var e;const i=this.tickContexts;if(!i)return 0;const s=null!==(e=null==t?void 0:t.alpha)&&void 0!==e?e:.5;let n=0;return this.totalShift=0,i.list.forEach(((t,e,a)=>{const o=i.map[t],r=e>0?i.map[a[e-1]]:void 0,h=e<a.length-1?i.map[a[e+1]]:void 0;o.move(n,r,h);const l=-o.getDeviationCost();l>0?n=-Math.min(o.getFormatterMetrics().freedom.right,Math.abs(l)):l<0&&(n=h?Math.min(h.getFormatterMetrics().freedom.right,Math.abs(l)):0),n*=s,this.totalShift+=n})),this.evaluate()}postFormat(){return this.modifierContexts.forEach((t=>{t.array.forEach((t=>t.postFormat()))})),this.tickContexts.list.forEach((t=>{this.tickContexts.map[t].postFormat()})),this}joinVoices(t){return this.createModifierContexts(t),this.hasMinTotalWidth=!1,this}format(t,e,i){const s=Object.assign({alignRests:!1},i);this.voices=t;const n=this.formatterOptions.softmaxFactor;return n&&this.voices.forEach((t=>t.setSoftmaxFactor(n))),this.alignRests(t,s.alignRests),this.createTickContexts(t),this.preFormat(e,s.context,t,s.stave),s.stave&&this.postFormat(),this}formatToStave(t,e,i){const s=Object.assign({context:e.getContext()},i),n=e.getNoteEndX()-e.getNoteStartX()-le.defaultPadding;return function(...t){pe.DEBUG&&g("VexFlow.Formatter",t)}("Formatting voices to width: ",n),this.format(t,n,s)}getTickContext(t){var e;return null===(e=this.tickContexts)||void 0===e?void 0:e.map[t]}}var me;pe.DEBUG=!1,function(t){t[t.BOTTOM=-1]="BOTTOM",t[t.TOP=1]="TOP"}(me||(me={}));class fe extends N{static get CATEGORY(){return l.Tuplet}static get LOCATION_TOP(){return me.TOP}static get LOCATION_BOTTOM(){return me.BOTTOM}static get NESTING_OFFSET(){return 15}constructor(t,e={}){if(super(),!t||!t.length)throw new c("BadArguments","No notes provided for tuplet.");this.notes=t;const i=void 0!==e.numNotes?e.numNotes:t.length,s=e.notesOccupied||2,n=void 0!==e.bracketed?e.bracketed:t.some((t=>!t.hasBeam())),a=void 0!==e.ratioed?e.ratioed:Math.abs(s-i)>1,o=e.location||fe.LOCATION_TOP,r=e.yOffset||w.get("Tuplet.yOffset"),h=e.textYOffset||w.get("Tuplet.textYOffset");this.options={bracketed:n,location:o,notesOccupied:s,numNotes:i,ratioed:a,yOffset:r,textYOffset:h},this.textElement=new N("Tuplet"),this.setTupletLocation(o||fe.LOCATION_TOP),pe.AlignRestsToNotes(t,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let t=0;t<this.notes.length;t++){this.notes[t].setTuplet(this)}}detach(){for(let t=0;t<this.notes.length;t++){this.notes[t].resetTuplet(this)}}setBracketed(t){return this.options.bracketed=t,this}setRatioed(t){return this.options.ratioed=t,this}setTupletLocation(t){return t!==fe.LOCATION_TOP&&t!==fe.LOCATION_BOTTOM&&(console.warn(`Invalid tuplet location [${t}]. Using Tuplet.LOCATION_TOP.`),t=fe.LOCATION_TOP),this.options.location=t,this}getNotes(){return this.notes}getNoteCount(){return this.options.numNotes}getNotesOccupied(){return this.options.notesOccupied}setNotesOccupied(t){this.detach(),this.options.notesOccupied=t,this.resolveGlyphs(),this.attach()}resolveGlyphs(){let t="",e="",i=this.options.numNotes;for(;i>=1;)t=String.fromCharCode(59520+i%10)+t,i=Math.floor(i/10);if(this.options.ratioed){for(i=this.options.notesOccupied;i>=1;)e=String.fromCharCode(59520+i%10)+e,i=Math.floor(i/10);e=O.tupletColon+e}this.textElement.setText(t+e)}getNestedTupletCount(){const{location:t}=this.options,e=this.notes[0];let i=n(e,t),s=n(e,t);function n(t,e){return t.getTupletStack().filter((t=>t.options.location===e)).length}return this.notes.forEach((e=>{const a=n(e,t);i=a>i?a:i,s=a<s?a:s})),i-s}getYPosition(){var t;const e=this.getNestedTupletCount()*fe.NESTING_OFFSET*-this.options.location,i=null!==(t=this.options.yOffset)&&void 0!==t?t:0,s=this.notes[0];let n;if(this.options.location===fe.LOCATION_TOP){n=s.checkStave().getYForLine(0)-1.5*Y.STAVE_LINE_DISTANCE;for(let t=0;t<this.notes.length;++t){const e=this.notes[t];let i=0;const s=e.getModifierContext();s&&(i=Math.max(i,s.getState().topTextLine));const a=e.getYForTopText(i)-2*Y.STAVE_LINE_DISTANCE;if(e.hasStem()||e.isRest()){const t=e.getStemDirection()===j.UP?e.getStemExtents().topY-Y.STAVE_LINE_DISTANCE:e.getStemExtents().baseY-2*Y.STAVE_LINE_DISTANCE;n=Math.min(t,n),i>0&&(n=Math.min(a,n))}}}else{let t=4;this.notes.forEach((e=>{const i=e.getModifierContext();i&&(t=Math.max(t,i.getState().textLine+1))})),n=s.checkStave().getYForLine(t)+2*Y.STAVE_LINE_DISTANCE;for(let t=0;t<this.notes.length;++t)if(this.notes[t].hasStem()||this.notes[t].isRest()){const e=this.notes[t].getStemDirection()===j.UP?this.notes[t].getStemExtents().baseY+2*Y.STAVE_LINE_DISTANCE:this.notes[t].getStemExtents().topY+Y.STAVE_LINE_DISTANCE;e>n&&(n=e)}}return n+e+i}draw(){const{location:t,bracketed:e,textYOffset:i}=this.options,s=this.checkContext();let n=0,a=0;this.setRendered();const o=this.notes[0],r=this.notes[this.notes.length-1];e?(n=o.getTieLeftX()-5,this.width=r.getTieRightX()-n+5):(n=o.getStemX(),this.width=r.getStemX()-n),a=this.getYPosition();const h=n+this.width/2-this.textElement.getWidth()/2;if(e){const e=this.width/2-this.textElement.getWidth()/2-5;e>0&&(s.fillRect(n,a,e,1),s.fillRect(n+this.width/2+this.textElement.getWidth()/2+5,a,e,1),s.fillRect(n,a+(t===fe.LOCATION_BOTTOM?1:0),1,10*t),s.fillRect(n+this.width,a+(t===fe.LOCATION_BOTTOM?1:0),1,10*t))}this.textElement.renderText(s,h,a+this.textElement.getHeight()/2+(t===fe.LOCATION_TOP?-1:1)*i)}}function Se(t){let e=0;return t.forEach((t=>{t.keyProps&&t.keyProps.forEach((t=>{e+=t.line-3}))})),e>=0?j.DOWN:j.UP}const Te="L",xe="B";class we extends N{static get CATEGORY(){return l.Beam}getStemDirection(){return this._stemDirection}static getDefaultBeamGroups(t){t&&"c"!==t||(t="4/4");const e={"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"]}[t];if(void 0!==e)return e.map((t=>(new T).parse(t)));{const e=parseInt(t.split("/")[0],10),i=parseInt(t.split("/")[1],10);if(e%3==0)return[new T(3,i)];if(i>4)return[new T(2,i)];if(i<=4)return[new T(1,i)]}return[new T(1,4)]}static applyAndGetBeams(t,e,i){return we.generateBeams(t.getTickables(),{groups:i,stemDirection:e})}static generateBeams(t,e={}){e.groups&&e.groups.length||(e.groups=[new T(2,8)]);const i=e.groups.map((t=>{if(!t.multiply)throw new c("InvalidBeamGroups","The beam groups must be an array of VexFlow.Fractions");return t.clone().multiply(Y.RESOLUTION,1)})),s=t;let n=0,a=[],o=[];function r(){i.length-1>n?n+=1:n=0}!function(){let t=[],e=new T(0,1);s.forEach((s=>{if(t=[],s.shouldIgnoreTicks())return a.push(o),void(o=t);o.push(s);const h=i[n].clone(),l=function(t){return t.reduce(((t,e)=>e.getTicks().clone().add(t)),new T(0,1))}(o).add(e),c=Y.durationToNumber(s.getDuration())<8;if(c&&s.getTuplet()&&(h.numerator*=2),l.greaterThan(h)){if(!c){const e=o.pop();e&&t.push(e)}a.push(o);do{e=l.subtract(i[n]),r()}while(e.greaterThanEquals(i[n]));o=t}else l.equals(h)&&(a.push(o),e=new T(0,1),o=t,r())})),o.length>0&&a.push(o)}(),function(){const t=[];a.forEach((i=>{let s=[];i.forEach(((i,n,a)=>{const o=0===n||n===a.length-1,r=a[n-1],h=!e.beamRests&&i.isRest(),l=e.beamRests&&e.beamMiddleOnly&&i.isRest()&&o;let c=!1;if(e.maintainStemDirections&&r&&!i.isRest()&&!r.isRest()){const t=r.getStemDirection();c=i.getStemDirection()!==t}const d=parseInt(i.getDuration(),10)<8;h||l||c||d?(s.length>0&&t.push(s),s=c?[i]:[]):s.push(i)})),s.length>0&&t.push(s)})),a=t}(),a.forEach((t=>{let i;if(e.maintainStemDirections){const e=function(t){for(let e=0;e<t.length;e++){const i=t[e];if(!i.isRest())return i}return!1}(t);i=e?e.getStemDirection():j.UP}else i=e.stemDirection?e.stemDirection:Se(t);!function(t,e){t.forEach((t=>{t.setStemDirection(e)}))}(t,i)}));const h=a.filter((t=>{if(t.length>1){let e=!0;return t.forEach((t=>{t.getIntrinsicTicks()>=Y.durationToTicks("4")&&(e=!1)})),e}return!1})),l=function(){const t=[];return a.forEach((e=>{let i;e.forEach((e=>{const s=e.getTuplet();s&&i!==s&&(i=s,t.push(i))}))})),t}(),d=[];return h.forEach((t=>{const i=new we(t);e.showStemlets&&(i.renderOptions.showStemlets=!0),e.secondaryBreaks&&(i.renderOptions.secondaryBreakTicks=Y.durationToTicks(e.secondaryBreaks)),!0===e.flatBeams&&(i.renderOptions.flatBeams=!0,i.renderOptions.flatBeamOffset=e.flatBeamOffset),d.push(i)})),l.forEach((t=>{const e=t.notes[0].stemDirection===j.DOWN?me.BOTTOM:me.TOP;t.setTupletLocation(e);let i=!1;for(let e=0;e<t.notes.length;e++){if(!t.notes[e].hasBeam()){i=!0;break}}t.setBracketed(i)})),d}constructor(t,e=!1){if(super(),this.slope=0,this.yShift=0,this.forcedPartialDirections={},!t||0===t.length)throw new c("BadArguments","No notes provided for beam.");if(1===t.length)throw new c("BadArguments","Too few notes for beam.");if(this._ticks=t[0].getIntrinsicTicks(),this._ticks>=Y.durationToTicks("4"))throw new c("BadArguments","Beams can only be applied to notes shorter than a quarter note.");let i,s;this._stemDirection=t[0].getStemDirection();let n=this._stemDirection;if(e&&o(t[0]))n=Se(t);else if(e&&h(t[0])){const e=t.reduce(((t,e)=>t+e.getStemDirection()),0);n=e>-1?j.UP:j.DOWN}for(i=0;i<t.length;++i)s=t[i],e&&(s.setStemDirection(n),this._stemDirection=n),s.setBeam(this);this.postFormatted=!1,this.notes=t,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((t=>t.getGlyphProps().beamCount)).reduce(((t,e)=>e>t?e:t))}breakSecondaryAt(t){return this.breakOnIndexes=t,this}setPartialBeamSideAt(t,e){return this.forcedPartialDirections[t]=e,this}unsetPartialBeamSideAt(t){return delete this.forcedPartialDirections[t],this}getSlopeY(t,e,i,s){return i+(t-e)*s}calculateSlope(){const{notes:t,renderOptions:{maxSlope:e,minSlope:i,slopeIterations:s,slopeCost:n}}=this,a=this._stemDirection,o=t[0],r=function(t,e){const i=t.getStemExtents().topY,s=t.getStemX();return(e.getStemExtents().topY-i)/(e.getStemX()-s)}(o,t[t.length-1]),h=(e-i)/s;let l=Number.MAX_VALUE,c=0,d=0;for(let s=i;s<=e;s+=h){let e=0,i=0;for(let n=1;n<t.length;++n){const r=t[n];if(r.hasStem()||r.isRest()){const t=this.getSlopeY(r.getStemX(),o.getStemX(),o.getStemExtents().topY,s)+i,h=r.getStemExtents().topY;if(h*a<t*a){const s=Math.abs(h-t);i+=s*-a,e+=s*n}else e+=(h-t)*a}}const h=r/2,u=n*Math.abs(h-s)+Math.abs(e);u<l&&(l=u,c=s,d=i)}this.slope=c,this.yShift=d}calculateFlatSlope(){const{notes:t,renderOptions:{beamWidth:e,minFlatBeamOffset:i,flatBeamOffset:s}}=this,n=this._stemDirection;let a=0,o=0,r=0,h=0;for(let e=0;e<t.length;e++){const i=t[e],s=i.getStemExtents().topY;a+=s,n===j.DOWN&&h<s?(h=s,o=Math.max(...i.getYs()),r=i.getBeamCount()):n===j.UP&&(0===h||h>s)&&(h=s,o=Math.min(...i.getYs()),r=i.getBeamCount())}let l=a/t.length;const c=i+r*e*1.5,d=o+c*-n;n===j.DOWN&&l<d?l=o+c:n===j.UP&&l>d&&(l=o-c),s?(n===j.DOWN&&l>s||n===j.UP&&l<s)&&(this.renderOptions.flatBeamOffset=l):this.renderOptions.flatBeamOffset=l,this.slope=0,this.yShift=0}getBeamYToDraw(){let t=this.notes[0].getStemExtents().topY;return this.renderOptions.flatBeams&&this.renderOptions.flatBeamOffset&&(t=this.renderOptions.flatBeamOffset),t}applyStemExtensions(){const{notes:t,slope:e,renderOptions:{showStemlets:i,stemletExtension:s,beamWidth:n}}=this,a=this.yShift,o=this._beamCount,r=t[0],h=this.getBeamYToDraw(),l=r.getStemX();for(let r=0;r<t.length;++r){const c=t[r],d=c.getStem();if(d){const t=c.getStemX(),{topY:r}=c.getStemExtents(),u=this.getSlopeY(t,l,h,e)+a,g=d.getExtension(),p=c.getStemDirection()===j.UP?r-u:u-r;let m=0;if(c.getStemDirection()!==this._stemDirection){m=(1+1.5*(c.getGlyphProps().beamCount-1))*this.renderOptions.beamWidth}if(d.setExtension(g+p+m),d.adjustHeightForBeam(),c.isRest()&&i){const t=(o-1)*n*1.5+n;d.setVisibility(!0).setStemlet(!0,t+s)}}}}lookupBeamDirection(t,e,i,s,n){if("4"===t)return Te;const a=this.forcedPartialDirections[n];if(a)return a;const o=""+Y.durationToNumber(t)/2,r=e<Y.durationToTicks(o),h=s<Y.durationToTicks(o),l=i<Y.durationToTicks(o);return r&&h&&l?xe:r&&!h&&l?Te:!r&&h&&l?"R":this.lookupBeamDirection(o,e,i,s,n)}getBeamLines(t){const e=Y.durationToTicks(t);let i=!1;const s=[];let n;const a=this.renderOptions.partialBeamLength;let o=!1,r=0;for(let h=0;h<this.notes.length;++h){const l=this.notes[h];r+=l.getTicks().value();let c=!1;parseInt(t,10)>=8&&(c=-1!==this.breakOnIndexes.indexOf(h),this.renderOptions.secondaryBreakTicks&&r>=this.renderOptions.secondaryBreakTicks&&(r=0,c=!0));const d=l.getIntrinsicTicks()<e,u=l.getStemX()-j.WIDTH/2,g=this.notes[h-1],p=this.notes[h+1],m=p&&p.getIntrinsicTicks()<e,f=g&&g.getIntrinsicTicks()<e,S=g&&p&&d&&!f&&!m;if(d)if(i)n=s[s.length-1],n.end=u,c&&(i=!1,p&&!m&&void 0===n.end&&(n.end=n.start-a));else{if(n={start:u,end:void 0},i=!0,S){const e=g.getIntrinsicTicks(),i=p.getIntrinsicTicks(),s=l.getIntrinsicTicks(),o=this.lookupBeamDirection(t,e,s,i,h);[Te,xe].includes(o)?n.end=n.start-a:n.end=n.start+a}else m?c&&(n.end=n.start-a,i=!1):n.end=(o||0===h)&&p?n.start+a:n.start-a;s.push(n)}else i=!1;o=c}const h=s[s.length-1];return h&&void 0===h.end&&(h.end=h.start-a),s}drawStems(t){this.notes.forEach((e=>{const i=e.getStem();if(i){const s=e.getStemX();i.setNoteHeadXBounds(s,s),i.setContext(t).drawWithStyle()}}),this)}drawBeamLines(t){const e=["4","8","16","32","64"],i=this.notes[0];let s=this.getBeamYToDraw();const n=i.getStemX(),a=this.renderOptions.beamWidth*this._stemDirection;for(let i=0;i<e.length;++i){const o=e[i],r=this.getBeamLines(o);for(let e=0;e<r.length;++e){const i=r[e],o=i.start,h=this.getSlopeY(o,n,s,this.slope),l=i.end;if(!l)throw new c("NoLastBeamX","lastBeamX undefined.");{const e=this.getSlopeY(l,n,s,this.slope);t.beginPath(),t.moveTo(o,h),t.lineTo(o,h+a),t.lineTo(l+1,e+a),t.lineTo(l+1,e),t.closePath(),t.fill()}}s+=1.5*a}}preFormat(){return this}postFormat(){this.postFormatted||(h(this.notes[0])||this.renderOptions.flatBeams?this.calculateFlatSlope():this.calculateSlope(),this.applyStemExtensions(),this.postFormatted=!0)}draw(){const t=this.checkContext();this.setRendered(),this.unbeamable||(this.postFormatted||this.postFormat(),t.openGroup("beam",this.getAttribute("id")),this.drawStems(t),this.drawBeamLines(t),t.closeGroup())}}class be extends lt{static get CATEGORY(){return l.ClefNote}constructor(t,e="default",i){super({duration:"b"}),this.setType(t,e,i),this.ignoreTicks=!0}setType(t,e,i){return this.clef=new Jt(t,e,i),this.setWidth(this.clef.getWidth()),this}getClef(){return this.clef}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkStave(),e=this.checkContext();this.setRendered(),this.clef.setX(this.getAbsoluteX()),this.clef.setY(t.getYForLine(this.clef.line)),this.clef.renderText(e,0,0)}getBoundingBox(){return this.clef.getBoundingBox()}}class ye extends lt{static get CATEGORY(){return l.Crescendo}constructor(t){var e;super(t),this.options={extendLeft:0,extendRight:0,yShift:0},this.decrescendo=!1,this.line=null!==(e=t.line)&&void 0!==e?e:0,this.height=15}setLine(t){return this.line=t,this}setHeight(t){return this.height=t,this}setDecrescendo(t){return this.decrescendo=t,this}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkContext(),e=this.checkStave();this.setRendered();const i=this.getTickContext(),s=ue.getNextContext(i),n=this.getAbsoluteX(),a=s?s.getX():e.getX()+e.getWidth(),o=e.getYForLine(this.line+-3)+1;!function(...t){ye.DEBUG&&g("VexFlow.Crescendo",t)}("Drawing ",this.decrescendo?"decrescendo ":"crescendo ",this.height,"x",n-a),function(t,e){const i=e.beginX,s=e.endX,n=e.y,a=e.height/2;t.beginPath(),e.reverse?(t.moveTo(i,n-a),t.lineTo(s,n),t.lineTo(i,n+a)):(t.moveTo(s,n-a),t.lineTo(i,n),t.lineTo(s,n+a)),t.stroke(),t.closePath()}(t,{beginX:n-this.options.extendLeft,endX:a+this.options.extendRight,y:o+this.options.yShift,height:this.height,reverse:this.decrescendo})}}var Ce;ye.DEBUG=!1,function(t){t[t.NEAR_HEAD=1]="NEAR_HEAD",t[t.NEAR_TOP=2]="NEAR_TOP"}(Ce||(Ce={}));class ke extends N{static get CATEGORY(){return l.Curve}static get Position(){return Ce}static get PositionString(){return{nearHead:Ce.NEAR_HEAD,nearTop:Ce.NEAR_TOP}}constructor(t,e,i){super(),this.renderOptions=Object.assign({thickness:2,xShift:0,yShift:10,position:Ce.NEAR_HEAD,positionEnd:Ce.NEAR_HEAD,invert:!1,cps:[{x:0,y:10},{x:0,y:10}],openingDirection:"auto"},i),this.setNotes(t,e)}setNotes(t,e){if(!t&&!e)throw new c("BadArguments","Curve needs to have either `from` or `to` set.");return this.from=t,this.to=e,this}isPartial(){return!this.from||!this.to}renderCurve(t){var e,i;const s=this.checkContext(),n=this.renderOptions.xShift,a=this.renderOptions.yShift*t.direction,o=t.firstX+n,r=t.firstY+a,h=t.lastX-n,l=t.lastY+a,c=this.renderOptions.thickness,d=this.renderOptions.cps,{x:u,y:g}=d[0],{x:p,y:m}=d[1],f=(h-o)/(d.length+2);s.beginPath(),s.moveTo(o,r),s.bezierCurveTo(o+f+u,r+g*t.direction,h-f+p,l+m*t.direction,h,l),(null===(e=this.style)||void 0===e?void 0:e.lineDash)||s.bezierCurveTo(h-f+p,l+(m+c)*t.direction,o+f+u,r+(g+c)*t.direction,o,r),s.stroke(),s.closePath(),(null===(i=this.style)||void 0===i?void 0:i.lineDash)||s.fill()}draw(){this.checkContext(),this.setRendered();const t=this.from,e=this.to;let i,s,n,a,o=0,r="baseY",h="baseY";function l(t){return"string"==typeof t?ke.PositionString[t]:t}const c=l(this.renderOptions.position),d=l(this.renderOptions.positionEnd);if(c===Ce.NEAR_TOP&&(r="topY",h="topY"),d===Ce.NEAR_HEAD?h="baseY":d===Ce.NEAR_TOP&&(h="topY"),t)i=t.getTieRightX(),o=t.getStemDirection(),n=t.getStemExtents()[r];else{i=e.checkStave().getTieStartX(),n=e.getStemExtents()[r]}if(e)s=e.getTieLeftX(),o=e.getStemDirection(),a=e.getStemExtents()[h];else{s=t.checkStave().getTieEndX(),a=t.getStemExtents()[h]}return"up"===this.renderOptions.openingDirection&&(o=1),"down"===this.renderOptions.openingDirection&&(o=-1),this.renderCurve({firstX:i,lastX:s,firstY:n,lastY:a,direction:o*(!0===this.renderOptions.invert?-1:1)}),!0}}function De(...t){Be.DEBUG&&g("VexFlow.Parser",t)}function ve(t){if("matchedString"in t)return t.matchedString;if("results"in t)return ve(t.results);const e=t;return 1===e.length?ve(e[0]):0===e.length?null:e.map(ve)}class Be{constructor(t){this.grammar=t,this.line="",this.pos=0,this.errorPos=-1}parse(t){this.line=t,this.pos=0,this.errorPos=-1;const e=this.expect(this.grammar.begin());return e.errorPos=this.errorPos,e}matchFail(t){-1===this.errorPos&&(this.errorPos=this.pos),this.pos=t}matchSuccess(){this.errorPos=-1}matchToken(t,e=!1){const i=e?new RegExp("^(("+t+"))"):new RegExp("^(("+t+")\\s*)"),s=this.line.slice(this.pos).match(i);return null!==s?{success:!0,matchedString:s[2],incrementPos:s[1].length,pos:this.pos}:{success:!1,pos:this.pos}}expectOne(t,e=!1){const i=[],s=this.pos;let n=!0,a=!1;if(e=!0===e||!0===t.maybe,t.expect)for(const e of t.expect){const s=this.pos,o=this.expect(e);if(o.success){if(i.push(o),a=!0,t.or)break}else if(n=!1,!t.or){this.pos=s;break}}const o=t.or&&a||n,r=o||!0===e,h=o?1:0;return e&&!o&&(this.pos=s),r?this.matchSuccess():this.matchFail(s),{success:r,results:i,numMatches:h}}expectOneOrMore(t,e=!1){const i=[],s=this.pos;let n=0,a=!0;do{const e=this.expectOne(t);e.success&&e.results?(n++,i.push(e.results)):a=!1}while(a);const o=n>0||!0===e;return!e||n>0||(this.pos=s),o?this.matchSuccess():this.matchFail(s),{success:o,results:i,numMatches:n}}expectZeroOrMore(t){return this.expectOneOrMore(t,!0)}expect(t){if(De("Evaluating rule function:",t),!t)throw new c("Invalid rule function");let e;const i=t.bind(this.grammar)();if(i.token)e=this.matchToken(i.token,!0===i.noSpace),e.success&&(this.pos+=e.incrementPos);else{if(!i.expect)throw De(i),new c("Bad grammar! No `token` or `expect` property "+i);e=i.oneOrMore?this.expectOneOrMore(i):i.zeroOrMore?this.expectZeroOrMore(i):this.expectOne(i)}const s=[];return e.matches=s,e.results&&e.results.forEach((t=>s.push(ve(t)))),i.run&&e.success&&i.run({matches:s}),e}}function Le(...t){Re.DEBUG&&g("VexFlow.EasyScore",t)}Be.DEBUG=!1;class Ee{constructor(t){this.builder=t}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:t=>this.builder.addChord(t.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:t=>{const e=t;this.builder.addSingleNote(e.matches[0],e.matches[1],e.matches[2])}}}ACCIDENTAL(){return{expect:[this.MICROTONES,this.ACCIDENTALS],maybe:!0,or:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:t=>this.builder.setNoteDots(t.matches)}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:t=>this.builder.setNoteType(t.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:t=>this.builder.setNoteDuration(t.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(){return{expect:[this.KEY,this.EQUALS,this.VAL],run:t=>this.builder.addNoteOption(t.matches[0],t.matches[2].slice(1,-1))}}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:"$"}}}class Ne{constructor(t){this.chord=[],this.dots=0,this.options={},this.duration=t}}class Fe{constructor(t){this.commitHooks=[],this.factory=t,this.reset()}reset(t){this.options=Object.assign({stem:"auto",clef:"treble"},t),this.elements={notes:[],accidentals:[]},this.rollingDuration="8",this.resetPiece()}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(t){this.commitHooks.push(t)}resetPiece(){Le("resetPiece"),this.piece=new Ne(this.rollingDuration)}setNoteDots(t){Le("setNoteDots:",t),t&&(this.piece.dots=t.length)}setNoteDuration(t){Le("setNoteDuration:",t),this.rollingDuration=this.piece.duration=t||this.rollingDuration}setNoteType(t){Le("setNoteType:",t),t&&(this.piece.type=t)}addNoteOption(t,e){Le("addNoteOption: key:",t,"value:",e),this.piece.options[t]=e}addNote(t,e,i){Le("addNote:",t,e,i),this.piece.chord.push({key:t,accid:e,octave:i})}addSingleNote(t,e,i){Le("addSingleNote:",t,e,i),this.addNote(t,e,i)}addChord(t){Le("startChord"),"object"!=typeof t[0]?this.addSingleNote(t[0]):t.forEach((t=>{t&&this.addNote(...t)})),Le("endChord")}commitPiece(){Le("commitPiece");const{factory:t}=this;if(!t)return;const e=Object.assign(Object.assign({},this.options),this.piece.options),i=u(e.stem,"BadArguments","options.stem is not defined").toLowerCase(),s=u(e.clef,"BadArguments","options.clef is not defined").toLowerCase(),{chord:n,duration:a,dots:o,type:r}=this.piece,h=A.accidentals,l=n.map((t=>{var e;return t.key+(h.includes(null!==(e=t.accid)&&void 0!==e?e:"")?t.accid:"")+"/"+t.octave})),c="auto"===i,d="g"===(null==r?void 0:r.toLowerCase())?t.GhostNote({duration:a,dots:o}):t.StaveNote({keys:l,duration:a,dots:o,type:r,clef:s,autoStem:c});c||d.setStemDirection("up"===i?j.UP:j.DOWN);const g=[];n.forEach(((e,i)=>{const s=e.accid;if("string"==typeof s){const e=t.Accidental({type:s});d.addModifier(e,i),g.push(e)}else g.push(void 0)}));for(let t=0;t<o;t++)yt.buildAndAttach([d],{all:!0});this.commitHooks.forEach((t=>t(e,d,this))),this.elements.notes.push(d),this.elements.accidentals.push(g),this.resetPiece()}}function Oe(t,e){void 0!==t.id&&e.setAttribute("id",t.id)}const Pe=/\s*,\s*/;function Ae(t,e){void 0!==t.class&&t.class.split(Pe).forEach((t=>e.addClass(t)))}class Re{constructor(t={}){this.defaults={clef:"treble",time:"4/4",stem:"auto"},this.setOptions(t)}set(t){return this.defaults=Object.assign(Object.assign({},this.defaults),t),this}setOptions(t){var e,i;const s=t.factory,n=null!==(e=t.builder)&&void 0!==e?e:new Fe(s);return this.options=Object.assign(Object.assign({commitHooks:[Oe,Ae,ot.easyScoreHook,Ct.easyScoreHook],throwOnError:!1},t),{factory:s,builder:n}),this.factory=s,this.builder=n,this.grammar=new Ee(this.builder),this.parser=new Be(this.grammar),null===(i=this.options.commitHooks)||void 0===i||i.forEach((t=>this.addCommitHook(t))),this}setContext(t){return this.factory.setContext(t),this}parse(t,e={}){this.builder.reset(e);const i=this.parser.parse(t);if(!i.success&&this.options.throwOnError)throw Le(i),new c("Error parsing line: "+t);return i}beam(t,e){return this.factory.Beam({notes:t,options:e}),t}tuplet(t,e){return this.factory.Tuplet({notes:t,options:e}),t}notes(t,e={}){return e=Object.assign({clef:this.defaults.clef,stem:this.defaults.stem},e),this.parse(t,e),this.builder.getElements().notes}voice(t,e={}){return e=Object.assign({time:this.defaults.time},e),this.factory.Voice(e).addTickables(t)}addCommitHook(t){this.builder.addCommitHook(t)}}Re.DEBUG=!1;const Me="Ghost note must have valid initialization data to identify duration.";class Ie extends vt{static get CATEGORY(){return l.GhostNote}constructor(t){if(!t)throw new c("BadArguments",Me);let e;if("string"==typeof t)e={duration:t};else{if("object"!=typeof t)throw new c("BadArguments",Me);e=t}super(e),this.setWidth(0)}isRest(){return!0}setStave(t){return super.setStave(t),this}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this}draw(){this.setRendered();for(let t=0;t<this.modifiers.length;++t){const e=this.modifiers[t];i(e,l.Annotation)&&(e.setContext(this.getContext()),e.drawWithStyle())}}}class He extends lt{static get CATEGORY(){return l.GlyphNote}constructor(t,e,i){super(e),this.options=Object.assign({ignoreTicks:!1,line:2},i),this.ignoreTicks=this.options.ignoreTicks,this.setGlyph(t)}setGlyph(t){return this.text=t,this}preFormat(){return!this.preFormatted&&this.modifierContext&&this.modifierContext.preFormat(),this.preFormatted=!0,this}drawModifiers(){const t=this.checkContext();for(let e=0;e<this.modifiers.length;e++){const i=this.modifiers[e];i.setContext(t),i.drawWithStyle()}}draw(){const t=this.checkStave(),e=t.checkContext();this.setRendered(),e.openGroup("glyphNote",this.getAttribute("id")),this.x=this.isCenterAligned()?this.getAbsoluteX()-this.getWidth()/2:this.getAbsoluteX(),this.y=t.getYForLine(this.options.line),this.renderText(e,0,0),this.drawModifiers(),e.closeGroup()}}class We extends Lt{static get CATEGORY(){return l.GraceNote}static get LEDGER_LINE_OFFSET(){return 2}constructor(t){super(Object.assign({strokePx:We.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 t=super.getStemExtension();return t=j.HEIGHT*this.getFontScale()-j.HEIGHT+t,t}draw(){super.draw(),this.setRendered();const t=this.stem;if(this.slash&&t){const t=this.getFontScale();let e;const i=this.beam;if(i)i.postFormatted||i.postFormat(),e=this.calcBeamedNotesSlashBBox(8*t,8*t,{stem:6*t,beam:5*t});else{const i=this.getStemDirection(),s=this.getNoteHeadBounds(),n=this.noteHeads[0].getWidth(),a=i===j.DOWN?this.getAbsoluteX():this.getAbsoluteX()+n,o=Y.STEM_HEIGHT*t/2,r=i===j.DOWN?s.yBottom+o:s.yTop-o;e=i===j.DOWN?{x1:a-n,y1:r-n,x2:a+n,y2:r+n}:{x1:a-n,y1:r+n,x2:a+n,y2:r-n}}const s=this.checkContext();s.setLineWidth(1*t),s.beginPath(),s.moveTo(e.x1,e.y1),s.lineTo(e.x2,e.y2),s.closePath(),s.stroke()}}calcBeamedNotesSlashBBox(t,e,i){const s=this.beam;if(!s)throw new c("NoBeam","Can't calculate without a beam.");const n=s.slope,a=s.notes[s.notes.length-1]===this?-1:1,o=Math.atan(n*a),r=Math.cos(o)*e,h=Math.sin(o)*e;t*=this.getStemDirection();const l=Math.atan((h-t)/r),d=Math.cos(l)*i.stem*a,u=Math.sin(l)*i.stem,g=Math.cos(l)*i.beam*a,p=Math.sin(l)*i.beam,m=this.getStemX(),f=s.notes[0].getStemX(),S=s.getBeamYToDraw()+(m-f)*n;return{x1:m-d,y1:S+t-u,x2:m+r*a+g,y2:S+h+p}}}class Ge extends lt{static get CATEGORY(){return l.KeySigNote}constructor(t,e,i){super({duration:"b"}),this.keySignature=new Zt(t,e,i),this.ignoreTicks=!0}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this.keySignature.setStave(this.checkStave()),this.setWidth(this.keySignature.getWidth()),this}draw(){const t=this.checkStave().checkContext();this.setRendered(),this.keySignature.setX(this.getAbsoluteX()),this.keySignature.setContext(t),this.keySignature.drawWithStyle()}}class Ue extends N{static get CATEGORY(){return l.MultiMeasureRest}constructor(t,e){var i;super(),this.xs={left:NaN,right:NaN},this.hasPaddingLeft=!1,this.hasPaddingRight=!1,this.hasLineThickness=!1,this.hasSymbolSpacing=!1;const s=null!==(i=e.numberGlyphPoint)&&void 0!==i?i:w.get("MultiMeasureRest.fontSize");this.fontInfo.size=s,this.numberOfMeasures=t,this.text="";const n=`${this.numberOfMeasures}`;for(const t of n)this.text+=String.fromCodePoint(57472+Number(t));this.hasPaddingLeft="number"==typeof e.paddingLeft,this.hasPaddingRight="number"==typeof e.paddingRight,this.hasLineThickness="number"==typeof e.lineThickness,this.hasSymbolSpacing="number"==typeof e.symbolSpacing,this.renderOptions=Object.assign({useSymbols:!1,showNumber:!0,numberLine:-.5,numberGlyphPoint:s,line:2,spacingBetweenLinesPx:Y.STAVE_LINE_DISTANCE,serifThickness:2,semibreveRestGlyphScale:w.get("fontSize"),paddingLeft:0,paddingRight:0,lineThickness:5,symbolSpacing:0},e)}getXs(){return this.xs}setStave(t){return this.stave=t,this}getStave(){return this.stave}checkStave(){return u(this.stave,"NoStave","No stave attached to instance.")}drawLine(t,e,i,s){const n=this.renderOptions,a=t.getYForLine(n.line),o=.1*(s-i);i+=o,s-=o;let r="";const h=new N;h.setText(r);const l=h.getWidth();if(!l)throw new c("Cannot drawLine if width is 0");for(let t=1;(t+2)*l+i<=s;t++)r+="";r+="",h.setText(r),h.renderText(e,i+.5*(s-i)-.5*h.getWidth(),a)}drawSymbols(t,e,i,s){const n=Math.floor(this.numberOfMeasures/4),a=this.numberOfMeasures%4,o=Math.floor(a/2),r=a%2,h=this.renderOptions,l=new N;let c="";for(let t=0;t<n;++t)c+=O.restLonga+" ";for(let t=0;t<o;++t)c+=O.restDoubleWhole+" ";l.setText(c);const d=new N;c="";for(let t=0;t<r;++t)c+=O.restWhole+" ";d.setText(c);let u=i+.5*(s-i)-.5*(l.getWidth()+d.getWidth());const g=h.line,p=t.getYForLine(g-1),m=t.getYForLine(g);l.renderText(e,u,m),u+=l.getWidth(),d.renderText(e,u,p),u+=d.getWidth()}draw(){const t=this.checkContext();this.setRendered();const e=this.checkStave();let i=e.getNoteStartX(),n=e.getNoteEndX();const a=e.getModifiers(ct.BEGIN);1===a.length&&s(a[0])&&(i-=a[0].getWidth());const o=this.renderOptions;this.hasPaddingLeft&&(i=e.getX()+o.paddingLeft),this.hasPaddingRight&&(n=e.getX()+e.getWidth()-o.paddingRight),this.xs.left=i,this.xs.right=n,o.useSymbols?this.drawSymbols(e,t,i,n):this.drawLine(e,t,i,n),o.showNumber&&this.renderText(t,i+.5*(n-i)-.5*this.width,e.getYForLine(o.numberLine)-.5*this.height)}}class Ve extends N{static get CATEGORY(){return l.PedalMarking}static createSustain(t){return new Ve(t)}static createSostenuto(t){const e=new Ve(t);return e.setType(Ve.type.MIXED),e.setCustomText("Sost. Ped."),e}static createUnaCorda(t){const e=new Ve(t);return e.setType(Ve.type.TEXT),e.setCustomText("una corda","tre corda"),e}constructor(t){super(),this.notes=t,this.type=Ve.type.TEXT,this.line=0,this.depressText=Ve.GLYPHS.pedalDepress,this.releaseText=Ve.GLYPHS.pedalRelease,this.renderOptions={bracketHeight:10,textMarginRight:6,bracketLineWidth:1,color:"black"}}setType(t){return(t="string"==typeof t?Ve.typeString[t]:t)>=Ve.type.TEXT&&t<=Ve.type.MIXED&&(this.type=t),this}setCustomText(t,e){return this.depressText=t||"",this.releaseText=e||"",this.setFont(w.getFontInfo("PedalMarking.text")),this}setLine(t){return this.line=t,this}drawBracketed(){const t=this.checkContext();let e,i,s=!1,n=0;this.notes.forEach(((a,o,r)=>{var h,l,d,u;s=!s;const g=a.getAbsoluteX(),p=a.checkStave().getYForBottomText(this.line+3);if(g<e)throw new c("InvalidConfiguration","The notes provided must be in order of ascending x positions");const m=r[o+1]===a,f=r[o-1]===a;let S=0;if(s)S=f?5:0,this.type!==Ve.type.MIXED||f?(t.beginPath(),t.moveTo(g,p-this.renderOptions.bracketHeight),t.lineTo(g+S,p),t.stroke(),t.closePath()):(n=t.measureText(this.depressText).width,t.fillText(this.depressText,g,p),S=n+this.renderOptions.textMarginRight);else{const s=a.getVoice().getTickables().indexOf(a),n=s+1<a.getVoice().getTickables().length?a.getVoice().getTickables()[s+1].getAbsoluteX():(null!==(l=null===(h=a.getStave())||void 0===h?void 0:h.getX())&&void 0!==l?l:0)+(null!==(u=null===(d=a.getStave())||void 0===d?void 0:d.getWidth())&&void 0!==u?u:0);t.beginPath(),t.moveTo(e,i),t.lineTo(m?g-5:n-5,p),t.lineTo(m?g:n-5,p-this.renderOptions.bracketHeight),t.stroke(),t.closePath()}e=g+S,i=p}))}drawText(){const t=this.checkContext();let e=!1,i=0;this.notes.forEach((s=>{var n,a,o,r;e=!e;const h=s.checkStave(),l=s.getAbsoluteX(),c=h.getYForBottomText(this.line+3);if(e)i=t.measureText(this.depressText).width,t.fillText(this.depressText,l,c);else{const e=s.getVoice().getTickables().indexOf(s),h=e+1<s.getVoice().getTickables().length?s.getVoice().getTickables()[e+1].getAbsoluteX():(null!==(a=null===(n=s.getStave())||void 0===n?void 0:n.getX())&&void 0!==a?a:0)+(null!==(r=null===(o=s.getStave())||void 0===o?void 0:o.getWidth())&&void 0!==r?r:0);i=t.measureText(this.releaseText).width,t.fillText(this.releaseText,h-i,c)}}))}draw(){const t=this.checkContext();this.setRendered(),t.setStrokeStyle(this.renderOptions.color),t.setFillStyle(this.renderOptions.color),t.setFont(this.font),function(...t){Ve.DEBUG&&g("VexFlow.PedalMarking",t)}("Rendering Pedal Marking"),this.type===Ve.type.BRACKET||this.type===Ve.type.MIXED?(t.setLineWidth(this.renderOptions.bracketLineWidth),this.drawBracketed()):this.type===Ve.type.TEXT&&this.drawText()}}Ve.DEBUG=!1,Ve.GLYPHS={pedalDepress:O.keyboardPedalPed,pedalRelease:O.keyboardPedalUp},Ve.type={TEXT:1,BRACKET:2,MIXED:3},Ve.typeString={text:Ve.type.TEXT,bracket:Ve.type.BRACKET,mixed:Ve.type.MIXED};const Xe={1:O.repeat1Bar,2:O.repeat2Bars,4:O.repeat4Bars,slash:O.repeatBarSlash};class Ye extends He{static get CATEGORY(){return l.RepeatNote}constructor(t,e,i){super(Xe[t]||"",Object.assign({duration:"q",alignCenter:"slash"!==t},e),i)}}function _e(t,e,i,s,n,a,o){t.beginPath(),t.moveTo(e,i),t.lineTo(s,n),t.lineTo(a,o),t.lineTo(e,i),t.closePath(),t.fill()}class ze extends N{static get CATEGORY(){return l.StaveLine}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:ze.TextVerticalPosition.TOP,textJustification:ze.TextJustification.CENTER}}setText(t){return this.text=t,this}setNotes(t){if(!t.firstNote&&!t.lastNote)throw new c("BadArguments","Notes needs to have either firstNote or lastNote set.");if(t.firstIndexes||(t.firstIndexes=[0]),t.lastIndexes||(t.lastIndexes=[0]),t.firstIndexes.length!==t.lastIndexes.length)throw new c("BadArguments","Connected notes must have same number of indexes.");return this.notes=t,this.firstNote=t.firstNote,this.firstIndexes=t.firstIndexes,this.lastNote=t.lastNote,this.lastIndexes=t.lastIndexes,this}applyLineStyle(){const t=this.checkContext(),e=this.renderOptions;e.lineDash&&t.setLineDash(e.lineDash),e.lineWidth&&t.setLineWidth(e.lineWidth),e.roundedEnd?t.setLineCap("round"):t.setLineCap("square")}drawArrowLine(t,e,i){const s=this.renderOptions.drawStartArrow&&this.renderOptions.drawEndArrow,n=e.x,a=e.y,o=i.x,r=i.y,h=Math.sqrt((o-n)*(o-n)+(r-a)*(r-a)),l=(h-this.renderOptions.arrowheadLength/3)/h;let c,d,u,g;this.renderOptions.drawEndArrow||s?(c=Math.round(n+(o-n)*l),d=Math.round(a+(r-a)*l)):(c=o,d=r),this.renderOptions.drawStartArrow||s?(u=n+(o-n)*(1-l),g=a+(r-a)*(1-l)):(u=n,g=a),this.renderOptions.color&&(t.setStrokeStyle(this.renderOptions.color),t.setFillStyle(this.renderOptions.color)),t.beginPath(),t.moveTo(u,g),t.lineTo(c,d),t.stroke(),t.closePath();const p=Math.atan2(r-a,o-n),m=Math.abs(this.renderOptions.arrowheadLength/Math.cos(this.renderOptions.arrowheadAngle));let f,S,T,x,w,b;(this.renderOptions.drawEndArrow||s)&&(f=p+Math.PI+this.renderOptions.arrowheadAngle,T=o+Math.cos(f)*m,x=r+Math.sin(f)*m,S=p+Math.PI-this.renderOptions.arrowheadAngle,w=o+Math.cos(S)*m,b=r+Math.sin(S)*m,_e(t,T,x,o,r,w,b)),(this.renderOptions.drawStartArrow||s)&&(f=p+this.renderOptions.arrowheadAngle,T=n+Math.cos(f)*m,x=a+Math.sin(f)*m,S=p-this.renderOptions.arrowheadAngle,w=n+Math.cos(S)*m,b=a+Math.sin(S)*m,_e(t,T,x,n,a,w,b))}draw(){const t=this.checkContext();this.setRendered();const e=this.firstNote,i=this.lastNote,s=this.renderOptions;this.applyLineStyle();let n={x:0,y:0},a={x:0,y:0};this.firstIndexes.forEach(((o,r)=>{const h=this.lastIndexes[r];n=e.getModifierStartXY(2,o),a=i.getModifierStartXY(1,h);const l=n.y>a.y;n.x+=e.getMetrics().modRightPx+s.paddingLeft,a.x-=i.getMetrics().modLeftPx+s.paddingRight;const c=e.getGlyphWidth();e.getKeyProps()[o].displaced&&1===e.getStemDirection()&&(n.x+=c+s.paddingLeft);i.getKeyProps()[h].displaced&&-1===i.getStemDirection()&&(a.x-=c+s.paddingRight),n.y+=l?-3:1,a.y+=l?2:0,this.drawArrowLine(t,n,a)}));const o=this.width,r=s.textJustification;let h=0;if(r===ze.TextJustification.LEFT)h=n.x;else if(r===ze.TextJustification.CENTER){h=(a.x-n.x)/2+n.x-o/2}else r===ze.TextJustification.RIGHT&&(h=a.x-o);let l=0;const c=s.textPositionVertical;c===ze.TextVerticalPosition.TOP?l=e.checkStave().getYForTopText():c===ze.TextVerticalPosition.BOTTOM&&(l=e.checkStave().getYForBottomText(Y.TEXT_HEIGHT_OFFSET_HACK));const d=s.color;this.applyStyle(t,{fillStyle:d,strokeStyle:d}),this.renderText(t,h,l)}}ze.TextVerticalPosition={TOP:1,BOTTOM:2},ze.TextJustification=Yt;class je extends N{static get CATEGORY(){return l.System}constructor(t={}){super(),this.setOptions(t),this.partStaves=[],this.partStaveInfos=[],this.partVoices=[]}setOptions(t={}){if(!t.factory)throw new c("NoFactory","System.setOptions(options) requires a factory.");this.factory=t.factory,this.options=Object.assign(Object.assign({factory:this.factory,x:10,y:10,width:500,spaceBetweenStaves:12,autoWidth:!1,noJustification:!1,debugFormatter:!1,formatIterations:0,noPadding:!1},t),{details:Object.assign({alpha:.5},t.details),formatOptions:Object.assign({},t.formatOptions)}),!1===this.options.noJustification&&void 0===t.width&&(this.options.autoWidth=!0)}getX(){return this.options.x}setX(t){return this.options.x=t,this.partStaves.forEach((e=>{e.setX(t)})),this}getY(){return this.options.y}setY(t){return this.options.y=t,this.partStaves.forEach((e=>{e.setY(t)})),this}getStaves(){return this.partStaves}getVoices(){return this.partVoices}setContext(t){return super.setContext(t),this.factory.setContext(t),this}addConnector(t="double"){return this.connector=this.factory.StaveConnector({topStave:this.partStaves[0],bottomStave:this.partStaves[this.partStaves.length-1],type:t}),this.connector}addStave(t){var e;const i=Object.assign({leftBar:!1},t.options),s=null!==(e=t.stave)&&void 0!==e?e:this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:i}),n=Object.assign(Object.assign({spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,noJustification:!1},t),{options:i}),a=this.getContext();return n.voices.forEach((t=>{t.setContext(a).setStave(s).getTickables().forEach((t=>t.setStave(s))),this.partVoices.push(t)})),this.partStaves.push(s),this.partStaveInfos.push(n),s}addVoices(t){const e=this.getContext();t.forEach((t=>{t.setContext(e),this.partVoices.push(t)}))}format(){const t=this.options.details;let e=0;const i=new pe(t);this.formatter=i;let s=this.options.y,n=0;const a=[];this.partStaves.forEach(((t,e)=>{s+=t.space(this.partStaveInfos[e].spaceAbove),t.setY(s),s+=t.space(this.partStaveInfos[e].spaceBelow),s+=t.space(this.options.spaceBetweenStaves),this.partStaveInfos[e].debugNoteMetrics&&(a.push({y:s,stave:t}),s+=15),n=Math.max(n,t.getNoteStartX())})),this.partVoices.forEach((t=>{t.getTickables().forEach((t=>{const e=t.getStave();e&&t.setStave(e)}))})),i.joinVoices(this.partVoices),this.partStaves.forEach((t=>t.setNoteStartX(n))),this.options.autoWidth&&this.partVoices.length>0?(e=i.preCalculateMinTotalWidth(this.partVoices),this.options.width=e+le.rightPadding+(n-this.options.x),this.partStaves.forEach((t=>{t.setWidth(this.options.width)}))):e=this.options.noPadding?this.options.width-(n-this.options.x):this.options.width-(n-this.options.x)-le.defaultPadding,this.partVoices.length>0&&i.format(this.partVoices,this.options.noJustification?0:e,this.options.formatOptions),i.postFormat();for(let e=0;e<this.options.formatIterations;e++)i.tune(t);this.startX=n,this.debugNoteMetricsYs=a,this.lastY=s,le.formatBegModifiers(this.partStaves)}getBoundingBox(){var t;return new y(this.options.x,this.options.y,this.options.width,(null!==(t=this.lastY)&&void 0!==t?t:0)-this.options.y)}draw(){const t=this.checkContext();if(!(this.formatter&&this.startX&&this.lastY&&this.debugNoteMetricsYs))throw new c("NoFormatter","format() must be called before draw()");this.setRendered(),this.options.debugFormatter&&pe.plotDebugging(t,this.formatter,this.startX,this.options.y,this.lastY),this.debugNoteMetricsYs.forEach((e=>{this.partVoices.forEach((i=>{i.getTickables().forEach((i=>{i.getStave()===e.stave&&lt.plotMetrics(t,i,e.y)}))}))}))}}class qe extends vt{static get CATEGORY(){return l.TabNote}constructor(t,e=!1){super(t),this.fretElement=[],this.greatestString=()=>this.positions.map((t=>t.str)).reduce(((t,e)=>t>e?t:e)),this.leastString=()=>this.positions.map((t=>t.str)).reduce(((t,e)=>t<e?t:e)),this.ghost=!1,this.positions=t.positions||[],this.renderOptions=Object.assign(Object.assign({},this.renderOptions),{drawStem:e,drawDots:e,drawStemThroughStave:!1,yShift:0}),this.glyphProps=lt.getGlyphProps(this.duration,this.noteType),u(this.glyphProps,"BadArguments",`No glyph found for duration '${this.duration}' and type '${this.noteType}'`),this.buildStem(),t.stemDirection?this.setStemDirection(t.stemDirection):this.setStemDirection(j.UP),this.ghost=!1,this.updateWidth()}reset(){return super.reset(),this.stave&&this.setStave(this.stave),this}setGhost(t){return this.ghost=t,this.updateWidth(),this}hasStem(){return!!this.renderOptions.drawStem}getStemExtension(){return void 0!==this.stemExtensionOverride?this.stemExtensionOverride:this.flag.getHeight()>j.HEIGHT?this.flag.getHeight()-j.HEIGHT:0}static tabToElement(t){let e;return"X"===t.toUpperCase()?(e=new N("TabNote"),e.setText(O.accidentalDoubleSharp)):(e=new N("TabNote.text"),e.setText(t),e.setYShift(e.getHeight()/2)),e}updateWidth(){this.fretElement=[],this.width=0;for(let t=0;t<this.positions.length;++t){let e=this.positions[t].fret;this.ghost&&(e="("+e+")");const i=qe.tabToElement(e.toString());this.fretElement.push(i),this.width=Math.max(i.getWidth(),this.width)}}setStave(t){super.setStave(t);const e=t.getContext();this.setContext(e);const i=this.positions.map((({str:e})=>t.getYForLine(Number(e)-1)));return this.setYs(i),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}getModifierStartXY(t,e){if(!this.preFormatted)throw new c("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(0===this.ys.length)throw new c("NoYValues","No Y-Values calculated for this note.");let i=0;if(t===P.Position.LEFT)i=-2;else if(t===P.Position.RIGHT)i=this.width+2;else if(t===P.Position.BELOW||t===P.Position.ABOVE){i=this.width/2}return{x:this.getAbsoluteX()+i,y:this.ys[e]}}getLineForRest(){return Number(this.positions[0].str)}preFormat(){this.preFormatted||(this.modifierContext&&this.modifierContext.preFormat(),this.preFormatted=!0)}getStemX(){return this.getCenterGlyphX()}getStemY(){const t=this.checkStave().getNumLines()-.5,e=j.UP===this.stemDirection?-.5:t;return this.checkStave().getYForLine(e)}getStemExtents(){return this.checkStem().getExtents()}drawFlag(){const{beam:t,glyphProps:e,renderOptions:{drawStem:i}}=this,s=this.checkContext(),n=void 0===t&&i;if(e.codeFlagUp&&n){const t=this.getStemX(),e=this.getStemDirection()===j.DOWN?this.getStemY()-this.checkStem().getHeight()-this.getStemExtension():this.getStemY()-this.checkStem().getHeight()+this.getStemExtension();this.flag.setContext(s).setX(t).setY(e).drawWithStyle()}}drawModifiers(){this.modifiers.forEach((t=>{i(t,l.Dot)&&!this.renderOptions.drawDots||(t.setContext(this.getContext()),t.drawWithStyle())}))}drawStemThrough(){const t=this.getStemX(),e=this.getStemY(),i=this.checkContext(),s=this.renderOptions.drawStem,n=this.renderOptions.drawStemThroughStave;if(s&&n){const s=function(t,e){const i=[];let s=[];for(let n=1;n<=t;n++)e.indexOf(n)>-1?(i.push(s),s=[]):s.push(n);return s.length>0&&i.push(s),i}(this.checkStave().getNumLines(),this.positions.map((t=>Number(t.str)))),n=function(t,e,i,s){const n=1!==s,a=-1!==s,o=i.getSpacingBetweenLines(),r=i.getNumLines(),h=[];return e.forEach((e=>{const l=e.indexOf(r)>-1,c=e.indexOf(1)>-1;if(n&&c||a&&l)return;1===e.length&&e.push(e[0]);const d=[];e.forEach(((e,n,a)=>{const h=1===e,l=e===r;let c=i.getYForLine(e-1);0!==n||h?n!==a.length-1||l||(c+=o/2-1):c-=o/2-1,d.push(c),1===s&&h?d.push(t-2):-1===s&&l&&d.push(t+2)})),h.push(d.sort(((t,e)=>t-e)))})),h}(e,s,this.checkStave(),this.getStemDirection());i.setLineWidth(j.WIDTH),n.forEach((e=>{0!==e.length&&(i.beginPath(),i.moveTo(t,e[0]),i.lineTo(t,e[e.length-1]),i.stroke(),i.closePath())}))}}drawPositions(){const t=this.checkContext(),e=this.getAbsoluteX(),i=this.ys;for(let s=0;s<this.positions.length;++s){const n=i[s]+this.renderOptions.yShift,a=this.fretElement[s],o=e-a.getWidth()/2;t.clearRect(o-2,n-3,a.getWidth()+4,6),a.renderText(t,o,n)}}draw(){const t=this.checkContext();if(0===this.ys.length)throw new c("NoYValues","Can't draw note without Y values.");this.setRendered();const e=void 0===this.beam&&this.renderOptions.drawStem;if(t.openGroup("tabnote",this.getAttribute("id")),this.drawPositions(),this.drawStemThrough(),this.stem&&e){const e=this.getStemX();this.stem.setNoteHeadXBounds(e,e),this.stem.setContext(t).drawWithStyle()}this.drawFlag(),this.drawModifiers(),t.closeGroup()}}class Ke extends le{static get CATEGORY(){return l.TabStave}constructor(t,e,i,s){super(t,e,i,Object.assign({spacingBetweenLinesPx:13,numLines:6,topTextPosition:1},s))}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef("tab"),this}}var Qe;!function(t){t[t.TOP=1]="TOP",t[t.BOTTOM=-1]="BOTTOM"}(Qe||(Qe={}));class $e extends N{static get CATEGORY(){return l.TextBracket}static get Position(){return Qe}static get PositionString(){return{top:Qe.TOP,bottom:Qe.BOTTOM}}constructor({start:t,stop:e,text:i="",superscript:s="",position:n=Qe.TOP}){super(),this.start=t,this.stop=e,this.textElement=new N("TextBracket"),this.textElement.setText(i),this.superscriptElement=new N("TextBracket"),this.superscriptElement.setText(s);const a=B.scaleSize(this.fontInfo.size,.714286);this.superscriptElement.setFontSize(a),this.position="string"==typeof n?$e.PositionString[n]:n,this.line=1,this.renderOptions={dashed:!0,dash:[5],color:"black",lineWidth:1,showBracket:!0,bracketHeight:8,underlineSuperscript:!0}}applyStyle(t){this.textElement.setFont(this.fontInfo);const{family:e,size:i,weight:s,style:n}=this.fontInfo,a=B.scaleSize(i,.714286);this.superscriptElement.setFont(e,a,s,n);const o=this.renderOptions;return t.setStrokeStyle(o.color),t.setFillStyle(o.color),t.setLineWidth(o.lineWidth),this}setDashed(t,e){return this.renderOptions.dashed=t,e&&(this.renderOptions.dash=e),this}setLine(t){return this.line=t,this}draw(){const t=this.checkContext();this.setRendered();let e=0;switch(this.position){case Qe.TOP:e=this.start.checkStave().getYForTopText(this.line);break;case Qe.BOTTOM:e=this.start.checkStave().getYForBottomText(this.line+Y.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new c("InvalidPosition",`The position ${this.position} is invalid.`)}const i={x:this.start.getAbsoluteX(),y:e},s={x:this.stop.getAbsoluteX(),y:e};!function(...t){$e.DEBUG&&g("VexFlow.TextBracket",t)}("Rendering TextBracket: start:",i,"stop:",s,"y:",e);const n=this.renderOptions.bracketHeight*this.position;this.textElement.renderText(t,i.x,i.y);const a=this.textElement.getWidth(),o=this.textElement.getHeight(),r=i.y-o/2.5;this.superscriptElement.renderText(t,i.x+a+1,r);const h=this.superscriptElement.getWidth(),l=this.superscriptElement.getHeight();let d=i.x,u=r;const p=s.x+this.stop.getGlyphWidth();this.position===Qe.TOP?(d+=a+h+5,u-=l/2.7):this.position===Qe.BOTTOM&&(u+=l/2.7,d+=a+2,this.renderOptions.underlineSuperscript||(d+=h)),this.renderOptions.dashed?(zt.drawDashedLine(t,d,u,p,u,this.renderOptions.dash),this.renderOptions.showBracket&&zt.drawDashedLine(t,p,u+1*this.position,p,u+n,this.renderOptions.dash)):(t.beginPath(),t.moveTo(d,u),t.lineTo(p,u),this.renderOptions.showBracket&&t.lineTo(p,u+n),t.stroke(),t.closePath())}}function Je(...t){Ze.DEBUG&&g("VexFlow.TextDynamics",t)}$e.DEBUG=!1;class Ze extends lt{static get CATEGORY(){return l.TextDynamics}static get GLYPHS(){return{f:O.dynamicForte,p:O.dynamicPiano,m:O.dynamicMezzo,s:O.dynamicSforzando,z:O.dynamicZ,r:O.dynamicRinforzando}}constructor(t){var e,i;super(t),this.sequence=(null!==(e=t.text)&&void 0!==e?e:"").toLowerCase(),this.line=null!==(i=t.line)&&void 0!==i?i:0,this.text="",Je("New Dynamics Text: ",this.sequence)}setLine(t){return this.line=t,this}preFormat(){return this.text="",this.sequence.split("").forEach((t=>{const e=Ze.GLYPHS[t];if(!e)throw new c("Invalid dynamics character: "+t);this.text+=e})),this.preFormatted=!0,this}draw(){this.setRendered();const t=this.getAbsoluteX(),e=this.checkStave().getYForLine(this.line+-3);Je("Rendering Dynamics: ",this.sequence),this.renderText(this.checkContext(),t,e)}}Ze.DEBUG=!1;class ti extends lt{static get CATEGORY(){return l.TimeSigNote}constructor(t,e){super({duration:"b"}),this.timeSig=new oe(t,e),this.setWidth(this.timeSig.getWidth()),this.ignoreTicks=!0}addToModifierContext(t){return this}preFormat(){return this.preFormatted=!0,this}draw(){const t=this.checkStave(),e=this.checkContext();this.setRendered(),e.openGroup("timesignote",this.getAttribute("id")),this.timeSig.drawAt(e,t,this.getAbsoluteX()),e.closeGroup()}}class ei extends N{static get CATEGORY(){return l.VibratoBracket}constructor(t){super(),this.vibrato=new Kt,t.start&&(this.start=t.start),t.stop&&(this.stop=t.stop),this.line=1}setLine(t){return this.line=t,this}setVibratoCode(t){return this.vibrato.setVibratoCode(t),this}draw(){const t=this.checkContext();this.setRendered();const e=this.start&&this.start.checkStave().getYForTopText(this.line)||this.stop&&this.stop.checkStave().getYForTopText(this.line)||0,i=this.start&&this.start.getAbsoluteX()||this.stop&&this.stop.checkStave().getTieStartX()||0,s=this.stop&&this.stop.getAbsoluteX()-this.stop.getWidth()-5||this.start&&this.start.checkStave().getTieEndX()-10||0;this.vibrato.setVibratoWidth(s-i),function(...t){ei.DEBUG&&g("VexFlow.VibratoBracket",t)}("Rendering VibratoBracket: startX:",i,"stopX:",s,"y:",e),this.vibrato.renderText(t,i,e)}}function ii(...t){si.DEBUG&&g("VexFlow.Factory",t)}ei.DEBUG=!1;class si{static newFromElementId(t,e=500,i=200){return new si({renderer:{elementId:t,width:e,height:i}})}constructor(t={}){ii("New factory: ",t),this.options={stave:{space:10},renderer:{elementId:"",width:500,height:200,background:"#FFF"}},this.setOptions(t)}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=void 0}setOptions(t){this.options=Object.assign(Object.assign({},this.options),t),this.initRenderer(),this.reset()}initRenderer(){const{elementId:t,width:e,height:i,background:s}=this.options.renderer;if(null===t)return;if(""===t)throw ii(this),new c("renderer.elementId not set in FactoryOptions");let n=this.options.renderer.backend;if(void 0===n){n=It(document.getElementById(t))?zt.Backends.CANVAS:zt.Backends.SVG}this.context=zt.buildContext(t,n,e,i,s)}getContext(){return this.context}setContext(t){return this.context=t,this}getStave(){return this.stave}getVoices(){return this.voices}Stave(t){const e=this.options.stave.space,i=Object.assign({x:0,y:0,width:this.options.renderer.width-1*e,options:{spacingBetweenLinesPx:1*e}},t),s=new le(i.x,i.y,i.width,i.options);return this.staves.push(s),s.setContext(this.context),this.stave=s,s}TabStave(t){const e=this.options.stave.space,i=Object.assign({x:0,y:0,width:this.options.renderer.width-1*e,options:{spacingBetweenLinesPx:1.3*e}},t),s=new Ke(i.x,i.y,i.width,i.options);return this.staves.push(s),s.setContext(this.context),this.stave=s,s}StaveNote(t){const e=new Lt(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}GlyphNote(t,e,i){const s=new He(t,e,i);return this.stave&&s.setStave(this.stave),s.setContext(this.context),this.renderQ.push(s),s}RepeatNote(t,e,i){const s=new Ye(t,e,i);return this.stave&&s.setStave(this.stave),s.setContext(this.context),this.renderQ.push(s),s}GhostNote(t){const e=new Ie(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TextNote(t){const e=new se(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}BarNote(t={}){const e=new St(t.type);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}ClefNote(t){const e=Object.assign({type:"treble",options:{size:"default",annotation:void 0}},t),i=new be(e.type,e.options.size,e.options.annotation);return this.stave&&i.setStave(this.stave),i.setContext(this.context),this.renderQ.push(i),i}TimeSigNote(t){const e=Object.assign({time:"4/4"},t),i=new ti(e.time);return this.stave&&i.setStave(this.stave),i.setContext(this.context),this.renderQ.push(i),i}KeySigNote(t){const e=new Ge(t.key,t.cancelKey,t.alterKey);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TabNote(t){const e=new qe(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}GraceNote(t){const e=new We(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),e}GraceNoteGroup(t){const e=new Pt(t.notes,t.slur);return e.setContext(this.context),e}Accidental(t){const e=new z(t.type);return e.setContext(this.context),e}Annotation(t){const e=Object.assign({text:"p",hJustify:q.CENTER,vJustify:K.BOTTOM},t),i=new Q(e.text);return i.setJustification(e.hJustify),i.setVerticalJustification(e.vJustify),i.setFont(e.font),i.setContext(this.context),i}ChordSymbol(t){const e=Object.assign({vJustify:"top",hJustify:"center"},t),i=new bt;return i.setHorizontal(e.hJustify),i.setVertical(e.vJustify),"string"==typeof e.fontFamily&&"number"==typeof e.fontSize?"string"==typeof e.fontWeight?i.setFont(e.fontFamily,e.fontSize,e.fontWeight):i.setFont(e.fontFamily,e.fontSize,""):"number"==typeof e.fontSize&&i.setFontSize(e.fontSize),i.setContext(this.context),i}Articulation(t){var e;const i=new ot(null!==(e=null==t?void 0:t.type)&&void 0!==e?e:"a.");return void 0!==(null==t?void 0:t.position)&&i.setPosition(t.position),void 0!==(null==t?void 0:t.betweenLines)&&i.setBetweenLines(t.betweenLines),i.setContext(this.context),i}Ornament(t,e){const i=Object.assign({type:t,accidental:""},e),s=new Rt(t);return void 0!==(null==e?void 0:e.position)&&s.setPosition(e.position),i.upperAccidental&&s.setUpperAccidental(i.upperAccidental),i.lowerAccidental&&s.setLowerAccidental(i.lowerAccidental),void 0!==i.delayed&&s.setDelayed(i.delayed),s.setContext(this.context),s}TextDynamics(t){const e=Object.assign({text:"p",duration:"q",dots:0,line:0},t),i=new Ze({text:e.text,line:e.line,duration:e.duration,dots:e.dots});return this.stave&&i.setStave(this.stave),i.setContext(this.context),this.renderQ.push(i),i}Fingering(t){const e=Object.assign({number:"0",position:"left"},t),i=new Ct(e.number);return i.setPosition(e.position),i.setContext(this.context),i}StringNumber(t,e=!0){const i=new jt(t.number);return i.setPosition(t.position),i.setContext(this.context),i.setDrawCircle(e),i}TickContext(){return new ue}ModifierContext(){return new $t}MultiMeasureRest(t){const e=u(t.numberOfMeasures,"NoNumberOfMeasures"),i=new Ue(e,t);return i.setContext(this.context),this.renderQ.push(i),i}Voice(t){const e=Object.assign({time:"4/4"},t),i=new Ot(e.time);return this.voices.push(i),i}StaveConnector(t){const e=new de(t.topStave,t.bottomStave);return e.setType(t.type).setContext(this.context),this.renderQ.push(e),e}Formatter(t){return new pe(t)}Tuplet(t){const e=Object.assign({notes:[],options:{}},t),i=new fe(e.notes,e.options).setContext(this.context);return this.renderQ.push(i),i}Beam(t){var e,i,s,n,a;const o=new we(t.notes,null===(e=t.options)||void 0===e?void 0:e.autoStem).setContext(this.context);return o.breakSecondaryAt(null!==(s=null===(i=t.options)||void 0===i?void 0:i.secondaryBeamBreaks)&&void 0!==s?s:[]),(null===(n=t.options)||void 0===n?void 0:n.partialBeamDirections)&&Object.entries(null===(a=t.options)||void 0===a?void 0:a.partialBeamDirections).forEach((([t,e])=>{o.setPartialBeamSideAt(Number(t),e)})),this.renderQ.push(o),o}Curve(t){const e=new ke(t.from,t.to,t.options).setContext(this.context);return this.renderQ.push(e),e}StaveTie(t){var e;const i=new Et({firstNote:t.from,lastNote:t.to,firstIndexes:t.firstIndexes,lastIndexes:t.lastIndexes},t.text);return(null===(e=t.options)||void 0===e?void 0:e.direction)&&i.setDirection(t.options.direction),i.setContext(this.context),this.renderQ.push(i),i}StaveLine(t){var e,i;const s=new ze({firstNote:t.from,lastNote:t.to,firstIndexes:t.firstIndexes,lastIndexes:t.lastIndexes});return(null===(e=t.options)||void 0===e?void 0:e.text)&&s.setText(t.options.text),(null===(i=t.options)||void 0===i?void 0:i.font)&&s.setFont(t.options.font),s.setContext(this.context),this.renderQ.push(s),s}VibratoBracket(t){const e=new ei({start:t.from,stop:t.to});return t.options.line&&e.setLine(t.options.line),t.options.code&&e.setVibratoCode(t.options.code),e.setContext(this.context),this.renderQ.push(e),e}TextBracket(t){const e=new $e({start:t.from,stop:t.to,text:t.text,superscript:t.options.superscript,position:t.options.position});return t.options.line&&e.setLine(t.options.line),t.options.font&&e.setFont(t.options.font),e.setContext(this.context),this.renderQ.push(e),e}System(t={}){t.factory=this;const e=new je(t).setContext(this.context);return this.systems.push(e),e}EasyScore(t={}){return t.factory=this,new Re(t)}PedalMarking(t){const e=Object.assign({notes:[],options:{style:"mixed"}},t),i=new Ve(e.notes);return i.setType(Ve.typeString[e.options.style]),i.setContext(this.context),this.renderQ.push(i),i}NoteSubGroup(t){const e=Object.assign({notes:[]},t),i=new At(e.notes);return i.setContext(this.context),i}draw(){const t=this.context;this.systems.forEach((e=>e.setContext(t).format())),this.staves.forEach((e=>e.setContext(t).drawWithStyle())),this.voices.forEach((e=>e.setContext(t).drawWithStyle())),this.renderQ.forEach((e=>{e.isRendered()||e.setContext(t).drawWithStyle()})),this.systems.forEach((e=>e.setContext(t).drawWithStyle())),this.reset()}}si.DEBUG=!1;class ni extends N{static get CATEGORY(){return l.StaveHairpin}static FormatByTicksAndDraw(t,e,i,s,n,a){var o,r;const h=e.pixelsPerTick;if(null===h)throw new c("BadArguments","A valid Formatter must be provide to draw offsets by ticks.");const l=h*(null!==(o=a.leftShiftTicks)&&void 0!==o?o:0),d=h*(null!==(r=a.rightShiftTicks)&&void 0!==r?r:0),u={height:a.height,yShift:a.yShift,leftShiftPx:l,rightShiftPx:d,rightShiftTicks:0,leftShiftTicks:0};new ni({firstNote:i.firstNote,lastNote:i.lastNote},s).setContext(t).setRenderOptions(u).setPosition(n).drawWithStyle()}constructor(t,e){super(),this.setNotes(t),this.hairpin=e,this.position=P.Position.BELOW,this.renderOptions={height:10,yShift:0,leftShiftPx:0,rightShiftPx:0,rightShiftTicks:0,leftShiftTicks:0}}setPosition(t){return t!==P.Position.ABOVE&&t!==P.Position.BELOW||(this.position=t),this}setRenderOptions(t){return this.renderOptions=t,this}setNotes(t){if(!t.firstNote&&!t.lastNote)throw new c("BadArguments","Hairpin needs to have either firstNote or lastNote set.");return this.notes=t,this.firstNote=t.firstNote,this.lastNote=t.lastNote,this}renderHairpin(t){const e=this.checkContext();let i=this.renderOptions.yShift+20,s=t.firstY;this.position===P.Position.ABOVE&&(i=30-i,s=t.firstY-t.staffHeight);const n=this.renderOptions.leftShiftPx,a=this.renderOptions.rightShiftPx;switch(e.beginPath(),this.hairpin){case ni.type.CRESC:e.moveTo(t.lastX+a,s+i),e.lineTo(t.firstX+n,s+this.renderOptions.height/2+i),e.lineTo(t.lastX+a,s+this.renderOptions.height+i);break;case ni.type.DECRESC:e.moveTo(t.firstX+n,s+i),e.lineTo(t.lastX+a,s+this.renderOptions.height/2+i),e.lineTo(t.firstX+n,s+this.renderOptions.height+i)}e.stroke(),e.closePath()}draw(){this.checkContext(),this.setRendered();const t=this.firstNote,e=this.lastNote;if(!t||!e)throw new c("NoNote","Notes required to draw");const i=t.getModifierStartXY(this.position,0),s=e.getModifierStartXY(this.position,0);this.renderHairpin({firstX:i.x,lastX:s.x,firstY:t.checkStave().getY()+t.checkStave().getHeight(),lastY:e.checkStave().getY()+e.checkStave().getHeight(),staffHeight:t.checkStave().getHeight()})}}ni.type={CRESC:1,DECRESC:2};class ai extends Nt{static get CATEGORY(){return l.TabSlide}static get SLIDE_UP(){return 1}static get SLIDE_DOWN(){return-1}static createSlideUp(t){return new ai(t,ai.SLIDE_UP)}static createSlideDown(t){return new ai(t,ai.SLIDE_DOWN)}constructor(t,e){if(super(t,"sl."),!e){let i=t.firstNote.getPositions()[0].fret;"string"==typeof i&&(i=parseInt(i,10));let s=t.lastNote.getPositions()[0].fret;"string"==typeof s&&(s=parseInt(s,10)),e=isNaN(i)||isNaN(s)?ai.SLIDE_UP:i>s?ai.SLIDE_DOWN:ai.SLIDE_UP}this.direction=e,this.renderOptions.cp1=11,this.renderOptions.cp2=14,this.renderOptions.yShift=.5}renderTie(t){if(0===t.firstYs.length||0===t.lastYs.length)throw new c("BadArguments","No Y-values to render");const e=this.checkContext(),i=t.firstX,s=t.firstYs,n=t.lastX,a=t.direction;if(a!==ai.SLIDE_UP&&a!==ai.SLIDE_DOWN)throw new c("BadSlide","Invalid slide direction");const o=this.notes.firstIndexes;for(let t=0;t<o.length;++t){const r=s[o[t]]+this.renderOptions.yShift;if(isNaN(r))throw new c("BadArguments","Bad indexes for slide rendering.");e.beginPath(),e.moveTo(i,r+3*a),e.lineTo(n,r-3*a),e.closePath(),e.stroke()}this.setRendered()}}class oi{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(t="E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2"){this.tuningValues=[],this.setTuning(t)}noteToInteger(t){var e;return null!==(e=Y.keyProperties(t).intValue)&&void 0!==e?e:-1}setTuning(t){oi.names[t]&&(t=oi.names[t]),this.tuningValues=[];const e=t.split(/\s*,\s*/);if(0===e.length)throw new c("BadArguments",`Invalid tuning string: ${t}`);for(let t=0;t<e.length;++t)this.tuningValues[t]=this.noteToInteger(e[t])}getValueForString(t){const e=Number(t);if(e<1||e>this.tuningValues.length)throw new c("BadArguments",`String number must be between 1 and ${this.tuningValues.length}:${t}`);return this.tuningValues[e-1]}getValueForFret(t,e){const i=this.getValueForString(e),s=Number(t);if(s<0)throw new c("BadArguments",`Fret number must be 0 or higher: ${t}`);return i+s}getNoteForFret(t,e){const i=this.getValueForFret(t,e),s=Math.floor(i/12),n=i%12;return`${Y.integerToNote(n)}/${s}`}}var ri=function(t,e,i,s){return new(i||(i=Promise))((function(n,a){function o(t){try{h(s.next(t))}catch(t){a(t)}}function r(t){try{h(s.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}h((s=s.apply(t,e||[])).next())}))};class hi{static loadFonts(...t){return ri(this,void 0,void 0,(function*(){t||(t=Object.keys(B.FILES));const e=[];for(const i of t)e.push(B.load(i));yield Promise.all(e)}))}static setFonts(...t){b.fontFamily=t.join(","),w.clear()}static getFonts(){return w.get("fontFamily").split(",")}static get RENDER_PRECISION_PLACES(){return Y.RENDER_PRECISION_PLACES}static set RENDER_PRECISION_PLACES(t){Y.RENDER_PRECISION_PLACES=t}static get SOFTMAX_FACTOR(){return Y.SOFTMAX_FACTOR}static set SOFTMAX_FACTOR(t){Y.SOFTMAX_FACTOR=t}static get UNISON(){return Y.UNISON}static set UNISON(t){Y.UNISON=t}static get NOTATION_FONT_SCALE(){return Y.NOTATION_FONT_SCALE}static set NOTATION_FONT_SCALE(t){Y.NOTATION_FONT_SCALE=t}static get TABLATURE_FONT_SCALE(){return Y.TABLATURE_FONT_SCALE}static set TABLATURE_FONT_SCALE(t){Y.TABLATURE_FONT_SCALE=t}static get RESOLUTION(){return Y.RESOLUTION}static set RESOLUTION(t){Y.RESOLUTION=t}static get SLASH_NOTEHEAD_WIDTH(){return Y.SLASH_NOTEHEAD_WIDTH}static set SLASH_NOTEHEAD_WIDTH(t){Y.SLASH_NOTEHEAD_WIDTH=t}static get STAVE_LINE_DISTANCE(){return Y.STAVE_LINE_DISTANCE}static set STAVE_LINE_DISTANCE(t){Y.STAVE_LINE_DISTANCE=t}static get STAVE_LINE_THICKNESS(){return b.Stave.lineWidth}static set STAVE_LINE_THICKNESS(t){b.Stave.lineWidth=t,b.TabStave.lineWidth=t,w.clear("Stave"),w.clear("TabStave")}static get STEM_HEIGHT(){return Y.STEM_HEIGHT}static set STEM_HEIGHT(t){Y.STEM_HEIGHT=t}static get STEM_WIDTH(){return Y.STEM_WIDTH}static set STEM_WIDTH(t){Y.STEM_WIDTH=t}static get TIME4_4(){return Y.TIME4_4}static get unicode(){return Y.unicode}static keySignature(t){return Y.keySignature(t)}static hasKeySignature(t){return Y.hasKeySignature(t)}static getKeySignatures(){return Y.getKeySignatures()}static clefProperties(t){return Y.clefProperties(t)}static keyProperties(t,e,i){return Y.keyProperties(t,e,i)}static durationToTicks(t){return Y.durationToTicks(t)}}hi.BUILD={VERSION:"5.0.0-beta.0",ID:"2daeb4def8b685227f2a3c924177b40ddcc5bda3",DATE:"2024-09-12T19:16:57.446Z",INFO:""},hi.Accidental=z,hi.Annotation=Q,hi.Articulation=ot,hi.Barline=ft,hi.BarNote=St,hi.Beam=we,hi.Bend=Tt,hi.BoundingBox=y,hi.CanvasContext=Ht,hi.ChordSymbol=bt,hi.Clef=Jt,hi.ClefNote=be,hi.Crescendo=ye,hi.Curve=ke,hi.Dot=yt,hi.EasyScore=Re,hi.Element=N,hi.Factory=si,hi.Font=B,hi.Formatter=pe,hi.Fraction=T,hi.FretHandFinger=Ct,hi.GhostNote=Ie,hi.GlyphNote=He,hi.GraceNote=We,hi.GraceNoteGroup=Pt,hi.GraceTabNote=class extends qe{static get CATEGORY(){return l.GraceTabNote}constructor(t){super(t,!1),this.renderOptions=Object.assign(Object.assign({},this.renderOptions),{yShift:.3}),this.updateWidth()}},hi.KeyManager=class{constructor(t){this.music=new A,this.setKey(t)}setKey(t){return this.key=t,this.reset(),this}getKey(){return this.key}reset(){this.keyParts=this.music.getKeyParts(this.key),this.keyString=this.keyParts.root,this.keyParts.accidental&&(this.keyString+=this.keyParts.accidental);if(!A.scaleTypes[this.keyParts.type])throw new c("BadArguments",`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),A.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};const t=A.rootIndexes[this.keyParts.root];for(let e=0;e<A.roots.length;++e){const i=(t+e)%A.roots.length,s=A.roots[i],n=this.music.getRelativeNoteName(s,this.scale[e]);this.scaleMap[s]=n,this.scaleMapByValue[this.scale[e]]=n,this.originalScaleMapByValue[this.scale[e]]=n}return this}getAccidental(t){const e=this.music.getKeyParts(t).root,i=this.music.getNoteParts(this.scaleMap[e]);return{note:this.scaleMap[e],accidental:i.accidental}}selectNote(t){t=t.toLowerCase();const e=this.music.getNoteParts(t),i=this.scaleMap[e.root],s=this.music.getNoteParts(i);if(i===t)return{note:i,accidental:e.accidental,change:!1};const n=this.scaleMapByValue[this.music.getNoteValue(t)];if(void 0!==n)return{note:n,accidental:this.music.getNoteParts(n).accidental,change:!1};const a=this.originalScaleMapByValue[this.music.getNoteValue(t)];return void 0!==a?(this.scaleMap[s.root]=a,delete this.scaleMapByValue[this.music.getNoteValue(i)],this.scaleMapByValue[this.music.getNoteValue(t)]=a,{note:a,accidental:this.music.getNoteParts(a).accidental,change:!0}):s.root===t?(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[e.root])],this.scaleMapByValue[this.music.getNoteValue(s.root)]=s.root,this.scaleMap[s.root]=s.root,{note:s.root,accidental:void 0,change:!0}):(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[e.root])],this.scaleMapByValue[this.music.getNoteValue(t)]=t,delete this.scaleMap[s.root],this.scaleMap[s.root]=t,{note:t,accidental:e.accidental,change:!0})}},hi.KeySignature=Zt,hi.KeySigNote=Ge,hi.Modifier=P,hi.ModifierContext=$t,hi.MultiMeasureRest=Ue,hi.Music=A,hi.Note=lt,hi.NoteHead=kt,hi.NoteSubGroup=At,hi.Ornament=Rt,hi.Parenthesis=Mt,hi.Parser=Be,hi.PedalMarking=Ve,hi.Registry=E,hi.RenderContext=rt,hi.Renderer=zt,hi.RepeatNote=Ye,hi.Repetition=te,hi.Stave=le,hi.StaveConnector=de,hi.StaveHairpin=ni,hi.StaveLine=ze,hi.StaveModifier=mt,hi.StaveNote=Lt,hi.StaveTempo=ie,hi.StaveText=ne,hi.StaveTie=Et,hi.Stem=j,hi.StringNumber=jt,hi.Stroke=qt,hi.SVGContext=Ut,hi.System=je,hi.TabNote=qe,hi.TabSlide=ai,hi.TabStave=Ke,hi.TabTie=Nt,hi.TextBracket=$e,hi.TextDynamics=Ze,hi.TextNote=se,hi.TickContext=ue,hi.TimeSignature=oe,hi.TimeSigNote=ti,hi.Tremolo=class extends P{static get CATEGORY(){return l.Tremolo}constructor(t){super(),this.num=t,this.position=P.Position.CENTER,this.text=O.tremolo1}draw(){const t=this.checkContext(),e=this.checkAttachedNote();this.setRendered();const i=e.getStemDirection(),s=e.getFontScale(),n=w.get("Tremolo.spacing")*i*s,a=e.getAbsoluteX()+(i===j.UP?e.getGlyphWidth()-j.WIDTH/2:j.WIDTH/2);let o=e.getStemExtents().topY+(this.num<=3?n:0);this.fontInfo.size=w.get("Tremolo.fontSize")*s;for(let e=0;e<this.num;++e)this.renderText(t,a,o),o+=n}},hi.Tuning=oi,hi.Tuplet=fe,hi.Vibrato=Kt,hi.VibratoBracket=ei,hi.Voice=Ot,hi.Volta=ae,hi.RuntimeError=c,hi.Test=void 0,hi.AnnotationHorizontalJustify=q,hi.AnnotationVerticalJustify=K,hi.ChordSymbolHorizontalJustify=ut,hi.ChordSymbolVerticalJustify=gt,hi.SymbolModifiers=pt,hi.CurvePosition=Ce,hi.FontWeight=C,hi.FontStyle=k,hi.Glyphs=O,hi.ModifierPosition=F,hi.RendererBackends=Vt,hi.RendererLineEndType=Xt,hi.BarlineType=dt,hi.StaveModifierPosition=ct,hi.VoltaType=_t,hi.TextBracketPosition=Qe,hi.TextJustification=Yt,hi.VoiceMode=Ft,hi.BUILD.INFO="vexflow-core";const li=hi;return e=e.default})()));
6
6
  //# sourceMappingURL=vexflow-core.js.map