chordsheetjs 10.10.1 → 11.0.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.
package/lib/bundle.js CHANGED
@@ -6,7 +6,7 @@ var ChordSheetJS = (() => {
6
6
  };
7
7
 
8
8
  // lib/index.js
9
- var require_lib = __commonJS({
9
+ var require_index = __commonJS({
10
10
  "lib/index.js"(exports, module) {
11
11
  function $parcel$defineInteropFlag(a) {
12
12
  Object.defineProperty(a, "__esModule", { value: true, configurable: true });
@@ -14632,11 +14632,25 @@ to a key`);
14632
14632
  separator: ","
14633
14633
  };
14634
14634
  var $f1e1976743ced067$var$MetadataConfiguration = class {
14635
- constructor(metadataConfiguration = $f1e1976743ced067$export$a014e67b549cbef4) {
14636
- this.separator = metadataConfiguration.separator;
14635
+ constructor(metadataConfiguration = {}) {
14636
+ this.separator = metadataConfiguration.separator || $f1e1976743ced067$export$a014e67b549cbef4.separator;
14637
14637
  }
14638
14638
  };
14639
14639
  var $f1e1976743ced067$export$2e2bcd8739ae039 = $f1e1976743ced067$var$MetadataConfiguration;
14640
+ var $66494710ef677b2b$var$InstrumentConfiguration = class {
14641
+ constructor(instrumentConfiguration = {}) {
14642
+ this.type = instrumentConfiguration.type;
14643
+ this.description = instrumentConfiguration.description;
14644
+ }
14645
+ };
14646
+ var $66494710ef677b2b$export$2e2bcd8739ae039 = $66494710ef677b2b$var$InstrumentConfiguration;
14647
+ var $a911f47e3c49e507$var$UserConfiguration = class {
14648
+ constructor(userConfiguration = {}) {
14649
+ this.name = userConfiguration.name;
14650
+ this.fullname = userConfiguration.fullname;
14651
+ }
14652
+ };
14653
+ var $a911f47e3c49e507$export$2e2bcd8739ae039 = $a911f47e3c49e507$var$UserConfiguration;
14640
14654
  var $1900e9488433afb1$export$f152539e8297cacc = (string) => string;
14641
14655
  var $1900e9488433afb1$export$78c0028a34264234 = {
14642
14656
  evaluate: false,
@@ -14671,10 +14685,9 @@ to a key`);
14671
14685
  ...$1900e9488433afb1$export$78c0028a34264234.delegates,
14672
14686
  ...configuration.delegates
14673
14687
  };
14674
- this.configuration = {
14675
- configuration,
14676
- delegates: this.delegates
14677
- };
14688
+ this.instrument = configuration.instrument ? new (0, $66494710ef677b2b$export$2e2bcd8739ae039)(configuration.instrument) : void 0;
14689
+ this.user = configuration.user ? new (0, $a911f47e3c49e507$export$2e2bcd8739ae039)(configuration.user) : void 0;
14690
+ this.decapo = !!configuration.decapo;
14678
14691
  }
14679
14692
  };
14680
14693
  var $1900e9488433afb1$export$2e2bcd8739ae039 = $1900e9488433afb1$var$Configuration;
@@ -14862,8 +14875,8 @@ to a key`);
14862
14875
  return sanitizedName;
14863
14876
  };
14864
14877
  var $7251dad5f4a4c35f$var$Tag = class _$7251dad5f4a4c35f$var$Tag extends (0, $c5ce4fc4f57fe810$export$2e2bcd8739ae039) {
14865
- constructor(name, value = null, traceInfo = null, attributes = {}) {
14866
- super(traceInfo), this._isMetaTag = false, this._originalName = "", this._name = "", this._value = "", this.selector = null, /**
14878
+ constructor(name, value = null, traceInfo = null, attributes = {}, selector = null, isNegated = false) {
14879
+ super(traceInfo), this._isMetaTag = false, this._originalName = "", this._name = "", this._value = "", this.selector = null, this.isNegated = false, /**
14867
14880
  * The tag attributes. For example, section related tags can have a label:
14868
14881
  * `{start_of_verse: label="Verse 1"}`
14869
14882
  * @type {Record<string, string>}
@@ -14871,6 +14884,8 @@ to a key`);
14871
14884
  this.attributes = {};
14872
14885
  this.parseNameValue(name, value);
14873
14886
  this.attributes = attributes;
14887
+ this.selector = selector;
14888
+ this.isNegated = isNegated;
14874
14889
  }
14875
14890
  parseNameValue(name, value) {
14876
14891
  if (name === "meta") this.parseMetaTag(value);
@@ -15274,7 +15289,8 @@ to a key`);
15274
15289
  location: location.start,
15275
15290
  value: value?.value || "",
15276
15291
  attributes: value?.attributes || {},
15277
- selector
15292
+ selector: selector?.value,
15293
+ isNegated: selector?.isNegated
15278
15294
  };
15279
15295
  }
15280
15296
  function $51ced2cf8b50f946$export$4bae24da7c5e47c7(string, search, replaceMatch, replaceRest = (subString) => subString) {
@@ -15658,7 +15674,8 @@ to a key`);
15658
15674
  value: text2,
15659
15675
  chordDefinition,
15660
15676
  location: location().start,
15661
- selector
15677
+ selector: selector?.value,
15678
+ isNegated: selector?.isNegated
15662
15679
  };
15663
15680
  };
15664
15681
  const peg$c66 = function(tagName, selector, tagColonWithValue) {
@@ -15666,40 +15683,48 @@ to a key`);
15666
15683
  };
15667
15684
  const peg$c67 = "-";
15668
15685
  const peg$c68 = peg$literalExpectation("-", false);
15669
- const peg$c69 = function(value) {
15670
- return value;
15686
+ const peg$c69 = function(value, negator) {
15687
+ return {
15688
+ value,
15689
+ isNegated: !!negator
15690
+ };
15671
15691
  };
15672
- const peg$c70 = function(tagValue) {
15692
+ const peg$c70 = "!";
15693
+ const peg$c71 = peg$literalExpectation("!", false);
15694
+ const peg$c72 = function() {
15695
+ return true;
15696
+ };
15697
+ const peg$c73 = function(tagValue) {
15673
15698
  return tagValue;
15674
15699
  };
15675
- const peg$c71 = function(attributes) {
15700
+ const peg$c74 = function(attributes) {
15676
15701
  return {
15677
15702
  attributes
15678
15703
  };
15679
15704
  };
15680
- const peg$c72 = function(value) {
15705
+ const peg$c75 = function(value) {
15681
15706
  return {
15682
15707
  value
15683
15708
  };
15684
15709
  };
15685
- const peg$c73 = function(attributes) {
15710
+ const peg$c76 = function(attributes) {
15686
15711
  const obj = {};
15687
15712
  attributes.forEach((pair) => {
15688
15713
  obj[pair[0]] = pair[1];
15689
15714
  });
15690
15715
  return obj;
15691
15716
  };
15692
- const peg$c74 = function(attribute) {
15717
+ const peg$c77 = function(attribute) {
15693
15718
  return attribute;
15694
15719
  };
15695
- const peg$c75 = function(name, value) {
15720
+ const peg$c78 = function(name, value) {
15696
15721
  return [
15697
15722
  name,
15698
15723
  value
15699
15724
  ];
15700
15725
  };
15701
- const peg$c76 = /^[a-zA-Z_]/;
15702
- const peg$c77 = peg$classExpectation([
15726
+ const peg$c79 = /^[a-zA-Z_]/;
15727
+ const peg$c80 = peg$classExpectation([
15703
15728
  [
15704
15729
  "a",
15705
15730
  "z"
@@ -15710,18 +15735,18 @@ to a key`);
15710
15735
  ],
15711
15736
  "_"
15712
15737
  ], false, false);
15713
- const peg$c78 = function(chars) {
15738
+ const peg$c81 = function(chars) {
15714
15739
  return chars.map((c) => c.char || c).join("");
15715
15740
  };
15716
- const peg$c79 = /^[^}\\\r\n]/;
15717
- const peg$c80 = peg$classExpectation([
15741
+ const peg$c82 = /^[^}\\\r\n]/;
15742
+ const peg$c83 = peg$classExpectation([
15718
15743
  "}",
15719
15744
  "\\",
15720
15745
  "\r",
15721
15746
  "\n"
15722
15747
  ], true, false);
15723
- const peg$c81 = /^[a-zA-Z\-_]/;
15724
- const peg$c82 = peg$classExpectation([
15748
+ const peg$c84 = /^[a-zA-Z\-_]/;
15749
+ const peg$c85 = peg$classExpectation([
15725
15750
  [
15726
15751
  "a",
15727
15752
  "z"
@@ -15733,22 +15758,25 @@ to a key`);
15733
15758
  "-",
15734
15759
  "_"
15735
15760
  ], false, false);
15736
- const peg$c83 = '"';
15737
- const peg$c84 = peg$literalExpectation('"', false);
15738
- const peg$c85 = /^[^"}]/;
15739
- const peg$c86 = peg$classExpectation([
15761
+ const peg$c86 = '"';
15762
+ const peg$c87 = peg$literalExpectation('"', false);
15763
+ const peg$c88 = function(value) {
15764
+ return value;
15765
+ };
15766
+ const peg$c89 = /^[^"}]/;
15767
+ const peg$c90 = peg$classExpectation([
15740
15768
  '"',
15741
15769
  "}"
15742
15770
  ], true, false);
15743
- const peg$c87 = function() {
15771
+ const peg$c91 = function() {
15744
15772
  return {
15745
15773
  type: "char",
15746
15774
  char: '"'
15747
15775
  };
15748
15776
  };
15749
- const peg$c88 = "frets";
15750
- const peg$c89 = peg$literalExpectation("frets", false);
15751
- const peg$c90 = function(name, baseFret, frets, fingers) {
15777
+ const peg$c92 = "frets";
15778
+ const peg$c93 = peg$literalExpectation("frets", false);
15779
+ const peg$c94 = function(name, baseFret, frets, fingers) {
15752
15780
  return {
15753
15781
  name,
15754
15782
  baseFret: baseFret || 1,
@@ -15757,10 +15785,10 @@ to a key`);
15757
15785
  text: text()
15758
15786
  };
15759
15787
  };
15760
- const peg$c91 = "/";
15761
- const peg$c92 = peg$literalExpectation("/", false);
15762
- const peg$c93 = /^[A-Ga-g]/;
15763
- const peg$c94 = peg$classExpectation([
15788
+ const peg$c95 = "/";
15789
+ const peg$c96 = peg$literalExpectation("/", false);
15790
+ const peg$c97 = /^[A-Ga-g]/;
15791
+ const peg$c98 = peg$classExpectation([
15764
15792
  [
15765
15793
  "A",
15766
15794
  "G"
@@ -15770,21 +15798,21 @@ to a key`);
15770
15798
  "g"
15771
15799
  ]
15772
15800
  ], false, false);
15773
- const peg$c95 = /^[b#\u266D\u266F]/;
15774
- const peg$c96 = peg$classExpectation([
15801
+ const peg$c99 = /^[b#\u266D\u266F]/;
15802
+ const peg$c100 = peg$classExpectation([
15775
15803
  "b",
15776
15804
  "#",
15777
15805
  "\u266D",
15778
15806
  "\u266F"
15779
15807
  ], false, false);
15780
- const peg$c97 = "es";
15781
- const peg$c98 = peg$literalExpectation("es", false);
15782
- const peg$c99 = "s";
15783
- const peg$c100 = peg$literalExpectation("s", false);
15784
- const peg$c101 = "is";
15785
- const peg$c102 = peg$literalExpectation("is", false);
15786
- const peg$c103 = /^[a-zA-Z0-9#\u266Fb\u266D()+\-\/\xF8\u0394\u2212]/;
15787
- const peg$c104 = peg$classExpectation([
15808
+ const peg$c101 = "es";
15809
+ const peg$c102 = peg$literalExpectation("es", false);
15810
+ const peg$c103 = "s";
15811
+ const peg$c104 = peg$literalExpectation("s", false);
15812
+ const peg$c105 = "is";
15813
+ const peg$c106 = peg$literalExpectation("is", false);
15814
+ const peg$c107 = /^[a-zA-Z0-9#\u266Fb\u266D()+\-\/\xF8\u0394\u2212]/;
15815
+ const peg$c108 = peg$classExpectation([
15788
15816
  [
15789
15817
  "a",
15790
15818
  "z"
@@ -15810,21 +15838,21 @@ to a key`);
15810
15838
  "\u0394",
15811
15839
  "\u2212"
15812
15840
  ], false, false);
15813
- const peg$c105 = "base-fret";
15814
- const peg$c106 = peg$literalExpectation("base-fret", false);
15815
- const peg$c107 = function(baseFret) {
15841
+ const peg$c109 = "base-fret";
15842
+ const peg$c110 = peg$literalExpectation("base-fret", false);
15843
+ const peg$c111 = function(baseFret) {
15816
15844
  return baseFret;
15817
15845
  };
15818
- const peg$c108 = "fingers";
15819
- const peg$c109 = peg$literalExpectation("fingers", false);
15820
- const peg$c110 = function(fingers) {
15846
+ const peg$c112 = "fingers";
15847
+ const peg$c113 = peg$literalExpectation("fingers", false);
15848
+ const peg$c114 = function(fingers) {
15821
15849
  return fingers;
15822
15850
  };
15823
- const peg$c111 = function(finger) {
15851
+ const peg$c115 = function(finger) {
15824
15852
  return finger;
15825
15853
  };
15826
- const peg$c112 = /^[\-A-Za-z]/;
15827
- const peg$c113 = peg$classExpectation([
15854
+ const peg$c116 = /^[\-A-Za-z]/;
15855
+ const peg$c117 = peg$classExpectation([
15828
15856
  "-",
15829
15857
  [
15830
15858
  "A",
@@ -15835,18 +15863,18 @@ to a key`);
15835
15863
  "z"
15836
15864
  ]
15837
15865
  ], false, false);
15838
- const peg$c114 = /^[0-9]/;
15839
- const peg$c115 = peg$classExpectation([
15866
+ const peg$c118 = /^[0-9]/;
15867
+ const peg$c119 = peg$classExpectation([
15840
15868
  [
15841
15869
  "0",
15842
15870
  "9"
15843
15871
  ]
15844
15872
  ], false, false);
15845
- const peg$c116 = function(number) {
15873
+ const peg$c120 = function(number) {
15846
15874
  return parseInt(number, 10);
15847
15875
  };
15848
- const peg$c117 = /^[a-zA-Z]/;
15849
- const peg$c118 = peg$classExpectation([
15876
+ const peg$c121 = /^[a-zA-Z]/;
15877
+ const peg$c122 = peg$classExpectation([
15850
15878
  [
15851
15879
  "a",
15852
15880
  "z"
@@ -15856,93 +15884,93 @@ to a key`);
15856
15884
  "Z"
15857
15885
  ]
15858
15886
  ], false, false);
15859
- const peg$c119 = /^[\-NXnx]/;
15860
- const peg$c120 = peg$classExpectation([
15887
+ const peg$c123 = /^[\-NXnx]/;
15888
+ const peg$c124 = peg$classExpectation([
15861
15889
  "-",
15862
15890
  "N",
15863
15891
  "X",
15864
15892
  "n",
15865
15893
  "x"
15866
15894
  ], false, false);
15867
- const peg$c121 = function(fret) {
15895
+ const peg$c125 = function(fret) {
15868
15896
  return fret;
15869
15897
  };
15870
- const peg$c122 = /^[1-9]/;
15871
- const peg$c123 = peg$classExpectation([
15898
+ const peg$c126 = /^[1-9]/;
15899
+ const peg$c127 = peg$classExpectation([
15872
15900
  [
15873
15901
  "1",
15874
15902
  "9"
15875
15903
  ]
15876
15904
  ], false, false);
15877
- const peg$c124 = "0";
15878
- const peg$c125 = peg$literalExpectation("0", false);
15879
- const peg$c126 = function() {
15905
+ const peg$c128 = "0";
15906
+ const peg$c129 = peg$literalExpectation("0", false);
15907
+ const peg$c130 = function() {
15880
15908
  return 0;
15881
15909
  };
15882
- const peg$c127 = "-1";
15883
- const peg$c128 = peg$literalExpectation("-1", false);
15884
- const peg$c129 = /^[NXnx]/;
15885
- const peg$c130 = peg$classExpectation([
15910
+ const peg$c131 = "-1";
15911
+ const peg$c132 = peg$literalExpectation("-1", false);
15912
+ const peg$c133 = /^[NXnx]/;
15913
+ const peg$c134 = peg$classExpectation([
15886
15914
  "N",
15887
15915
  "X",
15888
15916
  "n",
15889
15917
  "x"
15890
15918
  ], false, false);
15891
- const peg$c131 = function(startTag, content, endTag) {
15919
+ const peg$c135 = function(startTag, content, endTag) {
15892
15920
  return $51ced2cf8b50f946$export$665e0f4515a68234(startTag, endTag, content);
15893
15921
  };
15894
- const peg$c132 = "start_of_abc";
15895
- const peg$c133 = peg$literalExpectation("start_of_abc", false);
15896
- const peg$c134 = "end_of_abc";
15897
- const peg$c135 = peg$literalExpectation("end_of_abc", false);
15898
- const peg$c136 = function(tagName) {
15922
+ const peg$c136 = "start_of_abc";
15923
+ const peg$c137 = peg$literalExpectation("start_of_abc", false);
15924
+ const peg$c138 = "end_of_abc";
15925
+ const peg$c139 = peg$literalExpectation("end_of_abc", false);
15926
+ const peg$c140 = function(tagName) {
15899
15927
  return $51ced2cf8b50f946$export$4478cda40be33ba2(tagName, null, null, location());
15900
15928
  };
15901
- const peg$c137 = "start_of_grid";
15902
- const peg$c138 = peg$literalExpectation("start_of_grid", false);
15903
- const peg$c139 = "sog";
15904
- const peg$c140 = peg$literalExpectation("sog", false);
15905
- const peg$c141 = "end_of_grid";
15906
- const peg$c142 = peg$literalExpectation("end_of_grid", false);
15907
- const peg$c143 = "eog";
15908
- const peg$c144 = peg$literalExpectation("eog", false);
15909
- const peg$c145 = "start_of_ly";
15910
- const peg$c146 = peg$literalExpectation("start_of_ly", false);
15911
- const peg$c147 = "end_of_ly";
15912
- const peg$c148 = peg$literalExpectation("end_of_ly", false);
15913
- const peg$c149 = "start_of_tab";
15914
- const peg$c150 = peg$literalExpectation("start_of_tab", false);
15915
- const peg$c151 = "sot";
15916
- const peg$c152 = peg$literalExpectation("sot", false);
15917
- const peg$c153 = "end_of_tab";
15918
- const peg$c154 = peg$literalExpectation("end_of_tab", false);
15919
- const peg$c155 = "eot";
15920
- const peg$c156 = peg$literalExpectation("eot", false);
15921
- const peg$c157 = peg$anyExpectation();
15922
- const peg$c158 = peg$otherExpectation("whitespace");
15923
- const peg$c159 = peg$otherExpectation("optional whitespace");
15924
- const peg$c160 = /^[ \t\n\r]/;
15925
- const peg$c161 = peg$classExpectation([
15929
+ const peg$c141 = "start_of_grid";
15930
+ const peg$c142 = peg$literalExpectation("start_of_grid", false);
15931
+ const peg$c143 = "sog";
15932
+ const peg$c144 = peg$literalExpectation("sog", false);
15933
+ const peg$c145 = "end_of_grid";
15934
+ const peg$c146 = peg$literalExpectation("end_of_grid", false);
15935
+ const peg$c147 = "eog";
15936
+ const peg$c148 = peg$literalExpectation("eog", false);
15937
+ const peg$c149 = "start_of_ly";
15938
+ const peg$c150 = peg$literalExpectation("start_of_ly", false);
15939
+ const peg$c151 = "end_of_ly";
15940
+ const peg$c152 = peg$literalExpectation("end_of_ly", false);
15941
+ const peg$c153 = "start_of_tab";
15942
+ const peg$c154 = peg$literalExpectation("start_of_tab", false);
15943
+ const peg$c155 = "sot";
15944
+ const peg$c156 = peg$literalExpectation("sot", false);
15945
+ const peg$c157 = "end_of_tab";
15946
+ const peg$c158 = peg$literalExpectation("end_of_tab", false);
15947
+ const peg$c159 = "eot";
15948
+ const peg$c160 = peg$literalExpectation("eot", false);
15949
+ const peg$c161 = peg$anyExpectation();
15950
+ const peg$c162 = peg$otherExpectation("whitespace");
15951
+ const peg$c163 = peg$otherExpectation("optional whitespace");
15952
+ const peg$c164 = /^[ \t\n\r]/;
15953
+ const peg$c165 = peg$classExpectation([
15926
15954
  " ",
15927
15955
  " ",
15928
15956
  "\n",
15929
15957
  "\r"
15930
15958
  ], false, false);
15931
- const peg$c162 = peg$otherExpectation("space");
15932
- const peg$c163 = /^[ \t]/;
15933
- const peg$c164 = peg$classExpectation([
15959
+ const peg$c166 = peg$otherExpectation("space");
15960
+ const peg$c167 = /^[ \t]/;
15961
+ const peg$c168 = peg$classExpectation([
15934
15962
  " ",
15935
15963
  " "
15936
15964
  ], false, false);
15937
- const peg$c165 = /^[\n\r]/;
15938
- const peg$c166 = peg$classExpectation([
15965
+ const peg$c169 = /^[\n\r]/;
15966
+ const peg$c170 = peg$classExpectation([
15939
15967
  "\n",
15940
15968
  "\r"
15941
15969
  ], false, false);
15942
- const peg$c167 = "\n";
15943
- const peg$c168 = peg$literalExpectation("\n", false);
15944
- const peg$c169 = "\r";
15945
- const peg$c170 = peg$literalExpectation("\r", false);
15970
+ const peg$c171 = "\n";
15971
+ const peg$c172 = peg$literalExpectation("\n", false);
15972
+ const peg$c173 = "\r";
15973
+ const peg$c174 = peg$literalExpectation("\r", false);
15946
15974
  let peg$currPos = 0;
15947
15975
  let peg$savedPos = 0;
15948
15976
  const peg$posDetailsCache = [
@@ -17222,7 +17250,7 @@ to a key`);
17222
17250
  return s0;
17223
17251
  }
17224
17252
  function peg$parseTagSelector() {
17225
- let s0, s1, s2;
17253
+ let s0, s1, s2, s3;
17226
17254
  s0 = peg$currPos;
17227
17255
  if (input.charCodeAt(peg$currPos) === 45) {
17228
17256
  s1 = peg$c67;
@@ -17234,9 +17262,16 @@ to a key`);
17234
17262
  if (s1 !== peg$FAILED) {
17235
17263
  s2 = peg$parseTagSelectorValue();
17236
17264
  if (s2 !== peg$FAILED) {
17237
- peg$savedPos = s0;
17238
- s1 = peg$c69(s2);
17239
- s0 = s1;
17265
+ s3 = peg$parseTagSelectorNegator();
17266
+ if (s3 === peg$FAILED) s3 = null;
17267
+ if (s3 !== peg$FAILED) {
17268
+ peg$savedPos = s0;
17269
+ s1 = peg$c69(s2, s3);
17270
+ s0 = s1;
17271
+ } else {
17272
+ peg$currPos = s0;
17273
+ s0 = peg$FAILED;
17274
+ }
17240
17275
  } else {
17241
17276
  peg$currPos = s0;
17242
17277
  s0 = peg$FAILED;
@@ -17247,6 +17282,23 @@ to a key`);
17247
17282
  }
17248
17283
  return s0;
17249
17284
  }
17285
+ function peg$parseTagSelectorNegator() {
17286
+ let s0, s1;
17287
+ s0 = peg$currPos;
17288
+ if (input.charCodeAt(peg$currPos) === 33) {
17289
+ s1 = peg$c70;
17290
+ peg$currPos++;
17291
+ } else {
17292
+ s1 = peg$FAILED;
17293
+ if (peg$silentFails === 0) peg$fail(peg$c71);
17294
+ }
17295
+ if (s1 !== peg$FAILED) {
17296
+ peg$savedPos = s0;
17297
+ s1 = peg$c72();
17298
+ }
17299
+ s0 = s1;
17300
+ return s0;
17301
+ }
17250
17302
  function peg$parseTagSelectorValue() {
17251
17303
  let s0, s1, s2;
17252
17304
  s0 = peg$currPos;
@@ -17287,7 +17339,7 @@ to a key`);
17287
17339
  s2 = peg$parseTagValue();
17288
17340
  if (s2 !== peg$FAILED) {
17289
17341
  peg$savedPos = s0;
17290
- s1 = peg$c70(s2);
17342
+ s1 = peg$c73(s2);
17291
17343
  s0 = s1;
17292
17344
  } else {
17293
17345
  peg$currPos = s0;
@@ -17305,7 +17357,7 @@ to a key`);
17305
17357
  s1 = peg$parseTagAttributes();
17306
17358
  if (s1 !== peg$FAILED) {
17307
17359
  peg$savedPos = s0;
17308
- s1 = peg$c71(s1);
17360
+ s1 = peg$c74(s1);
17309
17361
  }
17310
17362
  s0 = s1;
17311
17363
  if (s0 === peg$FAILED) {
@@ -17313,7 +17365,7 @@ to a key`);
17313
17365
  s1 = peg$parseTagSimpleValue();
17314
17366
  if (s1 !== peg$FAILED) {
17315
17367
  peg$savedPos = s0;
17316
- s1 = peg$c72(s1);
17368
+ s1 = peg$c75(s1);
17317
17369
  }
17318
17370
  s0 = s1;
17319
17371
  }
@@ -17331,7 +17383,7 @@ to a key`);
17331
17383
  else s1 = peg$FAILED;
17332
17384
  if (s1 !== peg$FAILED) {
17333
17385
  peg$savedPos = s0;
17334
- s1 = peg$c73(s1);
17386
+ s1 = peg$c76(s1);
17335
17387
  }
17336
17388
  s0 = s1;
17337
17389
  return s0;
@@ -17344,7 +17396,7 @@ to a key`);
17344
17396
  s2 = peg$parseTagAttribute();
17345
17397
  if (s2 !== peg$FAILED) {
17346
17398
  peg$savedPos = s0;
17347
- s1 = peg$c74(s2);
17399
+ s1 = peg$c77(s2);
17348
17400
  s0 = s1;
17349
17401
  } else {
17350
17402
  peg$currPos = s0;
@@ -17376,7 +17428,7 @@ to a key`);
17376
17428
  s5 = peg$parseTagAttributeValue();
17377
17429
  if (s5 !== peg$FAILED) {
17378
17430
  peg$savedPos = s0;
17379
- s1 = peg$c75(s1, s5);
17431
+ s1 = peg$c78(s1, s5);
17380
17432
  s0 = s1;
17381
17433
  } else {
17382
17434
  peg$currPos = s0;
@@ -17403,21 +17455,21 @@ to a key`);
17403
17455
  function peg$parseTagName() {
17404
17456
  let s0, s1;
17405
17457
  s0 = [];
17406
- if (peg$c76.test(input.charAt(peg$currPos))) {
17458
+ if (peg$c79.test(input.charAt(peg$currPos))) {
17407
17459
  s1 = input.charAt(peg$currPos);
17408
17460
  peg$currPos++;
17409
17461
  } else {
17410
17462
  s1 = peg$FAILED;
17411
- if (peg$silentFails === 0) peg$fail(peg$c77);
17463
+ if (peg$silentFails === 0) peg$fail(peg$c80);
17412
17464
  }
17413
17465
  if (s1 !== peg$FAILED) while (s1 !== peg$FAILED) {
17414
17466
  s0.push(s1);
17415
- if (peg$c76.test(input.charAt(peg$currPos))) {
17467
+ if (peg$c79.test(input.charAt(peg$currPos))) {
17416
17468
  s1 = input.charAt(peg$currPos);
17417
17469
  peg$currPos++;
17418
17470
  } else {
17419
17471
  s1 = peg$FAILED;
17420
- if (peg$silentFails === 0) peg$fail(peg$c77);
17472
+ if (peg$silentFails === 0) peg$fail(peg$c80);
17421
17473
  }
17422
17474
  }
17423
17475
  else s0 = peg$FAILED;
@@ -17436,7 +17488,7 @@ to a key`);
17436
17488
  }
17437
17489
  if (s2 !== peg$FAILED) {
17438
17490
  peg$savedPos = s0;
17439
- s1 = peg$c78(s2);
17491
+ s1 = peg$c81(s2);
17440
17492
  s0 = s1;
17441
17493
  } else {
17442
17494
  peg$currPos = s0;
@@ -17450,12 +17502,12 @@ to a key`);
17450
17502
  }
17451
17503
  function peg$parseTagValueChar() {
17452
17504
  let s0, s1, s2, s3;
17453
- if (peg$c79.test(input.charAt(peg$currPos))) {
17505
+ if (peg$c82.test(input.charAt(peg$currPos))) {
17454
17506
  s0 = input.charAt(peg$currPos);
17455
17507
  peg$currPos++;
17456
17508
  } else {
17457
17509
  s0 = peg$FAILED;
17458
- if (peg$silentFails === 0) peg$fail(peg$c80);
17510
+ if (peg$silentFails === 0) peg$fail(peg$c83);
17459
17511
  }
17460
17512
  if (s0 === peg$FAILED) {
17461
17513
  s0 = peg$currPos;
@@ -17523,21 +17575,21 @@ to a key`);
17523
17575
  let s0, s1, s2;
17524
17576
  s0 = peg$currPos;
17525
17577
  s1 = [];
17526
- if (peg$c81.test(input.charAt(peg$currPos))) {
17578
+ if (peg$c84.test(input.charAt(peg$currPos))) {
17527
17579
  s2 = input.charAt(peg$currPos);
17528
17580
  peg$currPos++;
17529
17581
  } else {
17530
17582
  s2 = peg$FAILED;
17531
- if (peg$silentFails === 0) peg$fail(peg$c82);
17583
+ if (peg$silentFails === 0) peg$fail(peg$c85);
17532
17584
  }
17533
17585
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
17534
17586
  s1.push(s2);
17535
- if (peg$c81.test(input.charAt(peg$currPos))) {
17587
+ if (peg$c84.test(input.charAt(peg$currPos))) {
17536
17588
  s2 = input.charAt(peg$currPos);
17537
17589
  peg$currPos++;
17538
17590
  } else {
17539
17591
  s2 = peg$FAILED;
17540
- if (peg$silentFails === 0) peg$fail(peg$c82);
17592
+ if (peg$silentFails === 0) peg$fail(peg$c85);
17541
17593
  }
17542
17594
  }
17543
17595
  else s1 = peg$FAILED;
@@ -17549,11 +17601,11 @@ to a key`);
17549
17601
  let s0, s1, s2, s3, s4;
17550
17602
  s0 = peg$currPos;
17551
17603
  if (input.charCodeAt(peg$currPos) === 34) {
17552
- s1 = peg$c83;
17604
+ s1 = peg$c86;
17553
17605
  peg$currPos++;
17554
17606
  } else {
17555
17607
  s1 = peg$FAILED;
17556
- if (peg$silentFails === 0) peg$fail(peg$c84);
17608
+ if (peg$silentFails === 0) peg$fail(peg$c87);
17557
17609
  }
17558
17610
  if (s1 !== peg$FAILED) {
17559
17611
  s2 = peg$currPos;
@@ -17567,15 +17619,15 @@ to a key`);
17567
17619
  else s2 = s3;
17568
17620
  if (s2 !== peg$FAILED) {
17569
17621
  if (input.charCodeAt(peg$currPos) === 34) {
17570
- s3 = peg$c83;
17622
+ s3 = peg$c86;
17571
17623
  peg$currPos++;
17572
17624
  } else {
17573
17625
  s3 = peg$FAILED;
17574
- if (peg$silentFails === 0) peg$fail(peg$c84);
17626
+ if (peg$silentFails === 0) peg$fail(peg$c87);
17575
17627
  }
17576
17628
  if (s3 !== peg$FAILED) {
17577
17629
  peg$savedPos = s0;
17578
- s1 = peg$c69(s2);
17630
+ s1 = peg$c88(s2);
17579
17631
  s0 = s1;
17580
17632
  } else {
17581
17633
  peg$currPos = s0;
@@ -17593,12 +17645,12 @@ to a key`);
17593
17645
  }
17594
17646
  function peg$parseTagAttributeValueChar() {
17595
17647
  let s0, s1, s2, s3;
17596
- if (peg$c85.test(input.charAt(peg$currPos))) {
17648
+ if (peg$c89.test(input.charAt(peg$currPos))) {
17597
17649
  s0 = input.charAt(peg$currPos);
17598
17650
  peg$currPos++;
17599
17651
  } else {
17600
17652
  s0 = peg$FAILED;
17601
- if (peg$silentFails === 0) peg$fail(peg$c86);
17653
+ if (peg$silentFails === 0) peg$fail(peg$c90);
17602
17654
  }
17603
17655
  if (s0 === peg$FAILED) {
17604
17656
  s0 = peg$currPos;
@@ -17634,15 +17686,15 @@ to a key`);
17634
17686
  if (s2 === peg$FAILED) {
17635
17687
  s2 = peg$currPos;
17636
17688
  if (input.charCodeAt(peg$currPos) === 34) {
17637
- s3 = peg$c83;
17689
+ s3 = peg$c86;
17638
17690
  peg$currPos++;
17639
17691
  } else {
17640
17692
  s3 = peg$FAILED;
17641
- if (peg$silentFails === 0) peg$fail(peg$c84);
17693
+ if (peg$silentFails === 0) peg$fail(peg$c87);
17642
17694
  }
17643
17695
  if (s3 !== peg$FAILED) {
17644
17696
  peg$savedPos = s2;
17645
- s3 = peg$c87();
17697
+ s3 = peg$c91();
17646
17698
  }
17647
17699
  s2 = s3;
17648
17700
  }
@@ -17672,12 +17724,12 @@ to a key`);
17672
17724
  s3 = peg$parseBaseFret();
17673
17725
  if (s3 === peg$FAILED) s3 = null;
17674
17726
  if (s3 !== peg$FAILED) {
17675
- if (input.substr(peg$currPos, 5) === peg$c88) {
17676
- s4 = peg$c88;
17727
+ if (input.substr(peg$currPos, 5) === peg$c92) {
17728
+ s4 = peg$c92;
17677
17729
  peg$currPos += 5;
17678
17730
  } else {
17679
17731
  s4 = peg$FAILED;
17680
- if (peg$silentFails === 0) peg$fail(peg$c89);
17732
+ if (peg$silentFails === 0) peg$fail(peg$c93);
17681
17733
  }
17682
17734
  if (s4 !== peg$FAILED) {
17683
17735
  s5 = [];
@@ -17692,7 +17744,7 @@ to a key`);
17692
17744
  if (s6 === peg$FAILED) s6 = null;
17693
17745
  if (s6 !== peg$FAILED) {
17694
17746
  peg$savedPos = s0;
17695
- s1 = peg$c90(s1, s3, s5, s6);
17747
+ s1 = peg$c94(s1, s3, s5, s6);
17696
17748
  s0 = s1;
17697
17749
  } else {
17698
17750
  peg$currPos = s0;
@@ -17777,11 +17829,11 @@ to a key`);
17777
17829
  s0 = peg$currPos;
17778
17830
  s1 = peg$currPos;
17779
17831
  if (input.charCodeAt(peg$currPos) === 47) {
17780
- s2 = peg$c91;
17832
+ s2 = peg$c95;
17781
17833
  peg$currPos++;
17782
17834
  } else {
17783
17835
  s2 = peg$FAILED;
17784
- if (peg$silentFails === 0) peg$fail(peg$c92);
17836
+ if (peg$silentFails === 0) peg$fail(peg$c96);
17785
17837
  }
17786
17838
  if (s2 !== peg$FAILED) {
17787
17839
  s3 = peg$parseChordDefinitionNote();
@@ -17807,44 +17859,44 @@ to a key`);
17807
17859
  let s0, s1, s2, s3;
17808
17860
  s0 = peg$currPos;
17809
17861
  s1 = peg$currPos;
17810
- if (peg$c93.test(input.charAt(peg$currPos))) {
17862
+ if (peg$c97.test(input.charAt(peg$currPos))) {
17811
17863
  s2 = input.charAt(peg$currPos);
17812
17864
  peg$currPos++;
17813
17865
  } else {
17814
17866
  s2 = peg$FAILED;
17815
- if (peg$silentFails === 0) peg$fail(peg$c94);
17867
+ if (peg$silentFails === 0) peg$fail(peg$c98);
17816
17868
  }
17817
17869
  if (s2 !== peg$FAILED) {
17818
- if (peg$c95.test(input.charAt(peg$currPos))) {
17870
+ if (peg$c99.test(input.charAt(peg$currPos))) {
17819
17871
  s3 = input.charAt(peg$currPos);
17820
17872
  peg$currPos++;
17821
17873
  } else {
17822
17874
  s3 = peg$FAILED;
17823
- if (peg$silentFails === 0) peg$fail(peg$c96);
17875
+ if (peg$silentFails === 0) peg$fail(peg$c100);
17824
17876
  }
17825
17877
  if (s3 === peg$FAILED) {
17826
- if (input.substr(peg$currPos, 2) === peg$c97) {
17827
- s3 = peg$c97;
17878
+ if (input.substr(peg$currPos, 2) === peg$c101) {
17879
+ s3 = peg$c101;
17828
17880
  peg$currPos += 2;
17829
17881
  } else {
17830
17882
  s3 = peg$FAILED;
17831
- if (peg$silentFails === 0) peg$fail(peg$c98);
17883
+ if (peg$silentFails === 0) peg$fail(peg$c102);
17832
17884
  }
17833
17885
  if (s3 === peg$FAILED) {
17834
17886
  if (input.charCodeAt(peg$currPos) === 115) {
17835
- s3 = peg$c99;
17887
+ s3 = peg$c103;
17836
17888
  peg$currPos++;
17837
17889
  } else {
17838
17890
  s3 = peg$FAILED;
17839
- if (peg$silentFails === 0) peg$fail(peg$c100);
17891
+ if (peg$silentFails === 0) peg$fail(peg$c104);
17840
17892
  }
17841
17893
  if (s3 === peg$FAILED) {
17842
- if (input.substr(peg$currPos, 2) === peg$c101) {
17843
- s3 = peg$c101;
17894
+ if (input.substr(peg$currPos, 2) === peg$c105) {
17895
+ s3 = peg$c105;
17844
17896
  peg$currPos += 2;
17845
17897
  } else {
17846
17898
  s3 = peg$FAILED;
17847
- if (peg$silentFails === 0) peg$fail(peg$c102);
17899
+ if (peg$silentFails === 0) peg$fail(peg$c106);
17848
17900
  }
17849
17901
  }
17850
17902
  }
@@ -17872,21 +17924,21 @@ to a key`);
17872
17924
  let s0, s1, s2;
17873
17925
  s0 = peg$currPos;
17874
17926
  s1 = [];
17875
- if (peg$c103.test(input.charAt(peg$currPos))) {
17927
+ if (peg$c107.test(input.charAt(peg$currPos))) {
17876
17928
  s2 = input.charAt(peg$currPos);
17877
17929
  peg$currPos++;
17878
17930
  } else {
17879
17931
  s2 = peg$FAILED;
17880
- if (peg$silentFails === 0) peg$fail(peg$c104);
17932
+ if (peg$silentFails === 0) peg$fail(peg$c108);
17881
17933
  }
17882
17934
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
17883
17935
  s1.push(s2);
17884
- if (peg$c103.test(input.charAt(peg$currPos))) {
17936
+ if (peg$c107.test(input.charAt(peg$currPos))) {
17885
17937
  s2 = input.charAt(peg$currPos);
17886
17938
  peg$currPos++;
17887
17939
  } else {
17888
17940
  s2 = peg$FAILED;
17889
- if (peg$silentFails === 0) peg$fail(peg$c104);
17941
+ if (peg$silentFails === 0) peg$fail(peg$c108);
17890
17942
  }
17891
17943
  }
17892
17944
  else s1 = peg$FAILED;
@@ -17897,12 +17949,12 @@ to a key`);
17897
17949
  function peg$parseBaseFret() {
17898
17950
  let s0, s1, s2, s3, s4;
17899
17951
  s0 = peg$currPos;
17900
- if (input.substr(peg$currPos, 9) === peg$c105) {
17901
- s1 = peg$c105;
17952
+ if (input.substr(peg$currPos, 9) === peg$c109) {
17953
+ s1 = peg$c109;
17902
17954
  peg$currPos += 9;
17903
17955
  } else {
17904
17956
  s1 = peg$FAILED;
17905
- if (peg$silentFails === 0) peg$fail(peg$c106);
17957
+ if (peg$silentFails === 0) peg$fail(peg$c110);
17906
17958
  }
17907
17959
  if (s1 !== peg$FAILED) {
17908
17960
  s2 = peg$parse__();
@@ -17912,7 +17964,7 @@ to a key`);
17912
17964
  s4 = peg$parse__();
17913
17965
  if (s4 !== peg$FAILED) {
17914
17966
  peg$savedPos = s0;
17915
- s1 = peg$c107(s3);
17967
+ s1 = peg$c111(s3);
17916
17968
  s0 = s1;
17917
17969
  } else {
17918
17970
  peg$currPos = s0;
@@ -17937,12 +17989,12 @@ to a key`);
17937
17989
  s0 = peg$currPos;
17938
17990
  s1 = peg$parse__();
17939
17991
  if (s1 !== peg$FAILED) {
17940
- if (input.substr(peg$currPos, 7) === peg$c108) {
17941
- s2 = peg$c108;
17992
+ if (input.substr(peg$currPos, 7) === peg$c112) {
17993
+ s2 = peg$c112;
17942
17994
  peg$currPos += 7;
17943
17995
  } else {
17944
17996
  s2 = peg$FAILED;
17945
- if (peg$silentFails === 0) peg$fail(peg$c109);
17997
+ if (peg$silentFails === 0) peg$fail(peg$c113);
17946
17998
  }
17947
17999
  if (s2 !== peg$FAILED) {
17948
18000
  s3 = [];
@@ -17954,7 +18006,7 @@ to a key`);
17954
18006
  else s3 = peg$FAILED;
17955
18007
  if (s3 !== peg$FAILED) {
17956
18008
  peg$savedPos = s0;
17957
- s1 = peg$c110(s3);
18009
+ s1 = peg$c114(s3);
17958
18010
  s0 = s1;
17959
18011
  } else {
17960
18012
  peg$currPos = s0;
@@ -17978,7 +18030,7 @@ to a key`);
17978
18030
  s2 = peg$parseFinger();
17979
18031
  if (s2 !== peg$FAILED) {
17980
18032
  peg$savedPos = s0;
17981
- s1 = peg$c111(s2);
18033
+ s1 = peg$c115(s2);
17982
18034
  s0 = s1;
17983
18035
  } else {
17984
18036
  peg$currPos = s0;
@@ -17994,12 +18046,12 @@ to a key`);
17994
18046
  let s0;
17995
18047
  s0 = peg$parseFingerNumber();
17996
18048
  if (s0 === peg$FAILED) {
17997
- if (peg$c112.test(input.charAt(peg$currPos))) {
18049
+ if (peg$c116.test(input.charAt(peg$currPos))) {
17998
18050
  s0 = input.charAt(peg$currPos);
17999
18051
  peg$currPos++;
18000
18052
  } else {
18001
18053
  s0 = peg$FAILED;
18002
- if (peg$silentFails === 0) peg$fail(peg$c113);
18054
+ if (peg$silentFails === 0) peg$fail(peg$c117);
18003
18055
  }
18004
18056
  }
18005
18057
  return s0;
@@ -18007,39 +18059,39 @@ to a key`);
18007
18059
  function peg$parseFingerNumber() {
18008
18060
  let s0, s1;
18009
18061
  s0 = peg$currPos;
18010
- if (peg$c114.test(input.charAt(peg$currPos))) {
18062
+ if (peg$c118.test(input.charAt(peg$currPos))) {
18011
18063
  s1 = input.charAt(peg$currPos);
18012
18064
  peg$currPos++;
18013
18065
  } else {
18014
18066
  s1 = peg$FAILED;
18015
- if (peg$silentFails === 0) peg$fail(peg$c115);
18067
+ if (peg$silentFails === 0) peg$fail(peg$c119);
18016
18068
  }
18017
18069
  if (s1 !== peg$FAILED) {
18018
18070
  peg$savedPos = s0;
18019
- s1 = peg$c116(s1);
18071
+ s1 = peg$c120(s1);
18020
18072
  }
18021
18073
  s0 = s1;
18022
18074
  return s0;
18023
18075
  }
18024
18076
  function peg$parseFingerLetter() {
18025
18077
  let s0;
18026
- if (peg$c117.test(input.charAt(peg$currPos))) {
18078
+ if (peg$c121.test(input.charAt(peg$currPos))) {
18027
18079
  s0 = input.charAt(peg$currPos);
18028
18080
  peg$currPos++;
18029
18081
  } else {
18030
18082
  s0 = peg$FAILED;
18031
- if (peg$silentFails === 0) peg$fail(peg$c118);
18083
+ if (peg$silentFails === 0) peg$fail(peg$c122);
18032
18084
  }
18033
18085
  return s0;
18034
18086
  }
18035
18087
  function peg$parseNoFingerSetting() {
18036
18088
  let s0;
18037
- if (peg$c119.test(input.charAt(peg$currPos))) {
18089
+ if (peg$c123.test(input.charAt(peg$currPos))) {
18038
18090
  s0 = input.charAt(peg$currPos);
18039
18091
  peg$currPos++;
18040
18092
  } else {
18041
18093
  s0 = peg$FAILED;
18042
- if (peg$silentFails === 0) peg$fail(peg$c120);
18094
+ if (peg$silentFails === 0) peg$fail(peg$c124);
18043
18095
  }
18044
18096
  return s0;
18045
18097
  }
@@ -18051,7 +18103,7 @@ to a key`);
18051
18103
  s2 = peg$parseFret();
18052
18104
  if (s2 !== peg$FAILED) {
18053
18105
  peg$savedPos = s0;
18054
- s1 = peg$c121(s2);
18106
+ s1 = peg$c125(s2);
18055
18107
  s0 = s1;
18056
18108
  } else {
18057
18109
  peg$currPos = s0;
@@ -18075,7 +18127,7 @@ to a key`);
18075
18127
  }
18076
18128
  if (s2 !== peg$FAILED) {
18077
18129
  peg$savedPos = s0;
18078
- s1 = peg$c121(s2);
18130
+ s1 = peg$c125(s2);
18079
18131
  s0 = s1;
18080
18132
  } else {
18081
18133
  peg$currPos = s0;
@@ -18090,16 +18142,16 @@ to a key`);
18090
18142
  function peg$parseFretNumber() {
18091
18143
  let s0, s1;
18092
18144
  s0 = peg$currPos;
18093
- if (peg$c122.test(input.charAt(peg$currPos))) {
18145
+ if (peg$c126.test(input.charAt(peg$currPos))) {
18094
18146
  s1 = input.charAt(peg$currPos);
18095
18147
  peg$currPos++;
18096
18148
  } else {
18097
18149
  s1 = peg$FAILED;
18098
- if (peg$silentFails === 0) peg$fail(peg$c123);
18150
+ if (peg$silentFails === 0) peg$fail(peg$c127);
18099
18151
  }
18100
18152
  if (s1 !== peg$FAILED) {
18101
18153
  peg$savedPos = s0;
18102
- s1 = peg$c116(s1);
18154
+ s1 = peg$c120(s1);
18103
18155
  }
18104
18156
  s0 = s1;
18105
18157
  return s0;
@@ -18108,35 +18160,35 @@ to a key`);
18108
18160
  let s0, s1;
18109
18161
  s0 = peg$currPos;
18110
18162
  if (input.charCodeAt(peg$currPos) === 48) {
18111
- s1 = peg$c124;
18163
+ s1 = peg$c128;
18112
18164
  peg$currPos++;
18113
18165
  } else {
18114
18166
  s1 = peg$FAILED;
18115
- if (peg$silentFails === 0) peg$fail(peg$c125);
18167
+ if (peg$silentFails === 0) peg$fail(peg$c129);
18116
18168
  }
18117
18169
  if (s1 !== peg$FAILED) {
18118
18170
  peg$savedPos = s0;
18119
- s1 = peg$c126();
18171
+ s1 = peg$c130();
18120
18172
  }
18121
18173
  s0 = s1;
18122
18174
  return s0;
18123
18175
  }
18124
18176
  function peg$parseNonSoundingString() {
18125
18177
  let s0;
18126
- if (input.substr(peg$currPos, 2) === peg$c127) {
18127
- s0 = peg$c127;
18178
+ if (input.substr(peg$currPos, 2) === peg$c131) {
18179
+ s0 = peg$c131;
18128
18180
  peg$currPos += 2;
18129
18181
  } else {
18130
18182
  s0 = peg$FAILED;
18131
- if (peg$silentFails === 0) peg$fail(peg$c128);
18183
+ if (peg$silentFails === 0) peg$fail(peg$c132);
18132
18184
  }
18133
18185
  if (s0 === peg$FAILED) {
18134
- if (peg$c129.test(input.charAt(peg$currPos))) {
18186
+ if (peg$c133.test(input.charAt(peg$currPos))) {
18135
18187
  s0 = input.charAt(peg$currPos);
18136
18188
  peg$currPos++;
18137
18189
  } else {
18138
18190
  s0 = peg$FAILED;
18139
- if (peg$silentFails === 0) peg$fail(peg$c130);
18191
+ if (peg$silentFails === 0) peg$fail(peg$c134);
18140
18192
  }
18141
18193
  }
18142
18194
  return s0;
@@ -18223,7 +18275,7 @@ to a key`);
18223
18275
  s4 = peg$parseAbcEndTag();
18224
18276
  if (s4 !== peg$FAILED) {
18225
18277
  peg$savedPos = s0;
18226
- s1 = peg$c131(s1, s3, s4);
18278
+ s1 = peg$c135(s1, s3, s4);
18227
18279
  s0 = s1;
18228
18280
  } else {
18229
18281
  peg$currPos = s0;
@@ -18256,12 +18308,12 @@ to a key`);
18256
18308
  if (s1 !== peg$FAILED) {
18257
18309
  s2 = peg$parse_();
18258
18310
  if (s2 !== peg$FAILED) {
18259
- if (input.substr(peg$currPos, 12) === peg$c132) {
18260
- s3 = peg$c132;
18311
+ if (input.substr(peg$currPos, 12) === peg$c136) {
18312
+ s3 = peg$c136;
18261
18313
  peg$currPos += 12;
18262
18314
  } else {
18263
18315
  s3 = peg$FAILED;
18264
- if (peg$silentFails === 0) peg$fail(peg$c133);
18316
+ if (peg$silentFails === 0) peg$fail(peg$c137);
18265
18317
  }
18266
18318
  if (s3 !== peg$FAILED) {
18267
18319
  s4 = peg$parseTagSelector();
@@ -18332,12 +18384,12 @@ to a key`);
18332
18384
  if (s1 !== peg$FAILED) {
18333
18385
  s2 = peg$parse_();
18334
18386
  if (s2 !== peg$FAILED) {
18335
- if (input.substr(peg$currPos, 10) === peg$c134) {
18336
- s3 = peg$c134;
18387
+ if (input.substr(peg$currPos, 10) === peg$c138) {
18388
+ s3 = peg$c138;
18337
18389
  peg$currPos += 10;
18338
18390
  } else {
18339
18391
  s3 = peg$FAILED;
18340
- if (peg$silentFails === 0) peg$fail(peg$c135);
18392
+ if (peg$silentFails === 0) peg$fail(peg$c139);
18341
18393
  }
18342
18394
  if (s3 !== peg$FAILED) {
18343
18395
  s4 = peg$parse_();
@@ -18351,7 +18403,7 @@ to a key`);
18351
18403
  }
18352
18404
  if (s5 !== peg$FAILED) {
18353
18405
  peg$savedPos = s0;
18354
- s1 = peg$c136(s3);
18406
+ s1 = peg$c140(s3);
18355
18407
  s0 = s1;
18356
18408
  } else {
18357
18409
  peg$currPos = s0;
@@ -18445,7 +18497,7 @@ to a key`);
18445
18497
  s4 = peg$parseGridEndTag();
18446
18498
  if (s4 !== peg$FAILED) {
18447
18499
  peg$savedPos = s0;
18448
- s1 = peg$c131(s1, s3, s4);
18500
+ s1 = peg$c135(s1, s3, s4);
18449
18501
  s0 = s1;
18450
18502
  } else {
18451
18503
  peg$currPos = s0;
@@ -18478,20 +18530,20 @@ to a key`);
18478
18530
  if (s1 !== peg$FAILED) {
18479
18531
  s2 = peg$parse_();
18480
18532
  if (s2 !== peg$FAILED) {
18481
- if (input.substr(peg$currPos, 13) === peg$c137) {
18482
- s3 = peg$c137;
18533
+ if (input.substr(peg$currPos, 13) === peg$c141) {
18534
+ s3 = peg$c141;
18483
18535
  peg$currPos += 13;
18484
18536
  } else {
18485
18537
  s3 = peg$FAILED;
18486
- if (peg$silentFails === 0) peg$fail(peg$c138);
18538
+ if (peg$silentFails === 0) peg$fail(peg$c142);
18487
18539
  }
18488
18540
  if (s3 === peg$FAILED) {
18489
- if (input.substr(peg$currPos, 3) === peg$c139) {
18490
- s3 = peg$c139;
18541
+ if (input.substr(peg$currPos, 3) === peg$c143) {
18542
+ s3 = peg$c143;
18491
18543
  peg$currPos += 3;
18492
18544
  } else {
18493
18545
  s3 = peg$FAILED;
18494
- if (peg$silentFails === 0) peg$fail(peg$c140);
18546
+ if (peg$silentFails === 0) peg$fail(peg$c144);
18495
18547
  }
18496
18548
  }
18497
18549
  if (s3 !== peg$FAILED) {
@@ -18563,20 +18615,20 @@ to a key`);
18563
18615
  if (s1 !== peg$FAILED) {
18564
18616
  s2 = peg$parse_();
18565
18617
  if (s2 !== peg$FAILED) {
18566
- if (input.substr(peg$currPos, 11) === peg$c141) {
18567
- s3 = peg$c141;
18618
+ if (input.substr(peg$currPos, 11) === peg$c145) {
18619
+ s3 = peg$c145;
18568
18620
  peg$currPos += 11;
18569
18621
  } else {
18570
18622
  s3 = peg$FAILED;
18571
- if (peg$silentFails === 0) peg$fail(peg$c142);
18623
+ if (peg$silentFails === 0) peg$fail(peg$c146);
18572
18624
  }
18573
18625
  if (s3 === peg$FAILED) {
18574
- if (input.substr(peg$currPos, 3) === peg$c143) {
18575
- s3 = peg$c143;
18626
+ if (input.substr(peg$currPos, 3) === peg$c147) {
18627
+ s3 = peg$c147;
18576
18628
  peg$currPos += 3;
18577
18629
  } else {
18578
18630
  s3 = peg$FAILED;
18579
- if (peg$silentFails === 0) peg$fail(peg$c144);
18631
+ if (peg$silentFails === 0) peg$fail(peg$c148);
18580
18632
  }
18581
18633
  }
18582
18634
  if (s3 !== peg$FAILED) {
@@ -18591,7 +18643,7 @@ to a key`);
18591
18643
  }
18592
18644
  if (s5 !== peg$FAILED) {
18593
18645
  peg$savedPos = s0;
18594
- s1 = peg$c136(s3);
18646
+ s1 = peg$c140(s3);
18595
18647
  s0 = s1;
18596
18648
  } else {
18597
18649
  peg$currPos = s0;
@@ -18685,7 +18737,7 @@ to a key`);
18685
18737
  s4 = peg$parseLyEndTag();
18686
18738
  if (s4 !== peg$FAILED) {
18687
18739
  peg$savedPos = s0;
18688
- s1 = peg$c131(s1, s3, s4);
18740
+ s1 = peg$c135(s1, s3, s4);
18689
18741
  s0 = s1;
18690
18742
  } else {
18691
18743
  peg$currPos = s0;
@@ -18718,12 +18770,12 @@ to a key`);
18718
18770
  if (s1 !== peg$FAILED) {
18719
18771
  s2 = peg$parse_();
18720
18772
  if (s2 !== peg$FAILED) {
18721
- if (input.substr(peg$currPos, 11) === peg$c145) {
18722
- s3 = peg$c145;
18773
+ if (input.substr(peg$currPos, 11) === peg$c149) {
18774
+ s3 = peg$c149;
18723
18775
  peg$currPos += 11;
18724
18776
  } else {
18725
18777
  s3 = peg$FAILED;
18726
- if (peg$silentFails === 0) peg$fail(peg$c146);
18778
+ if (peg$silentFails === 0) peg$fail(peg$c150);
18727
18779
  }
18728
18780
  if (s3 !== peg$FAILED) {
18729
18781
  s4 = peg$parseTagSelector();
@@ -18794,12 +18846,12 @@ to a key`);
18794
18846
  if (s1 !== peg$FAILED) {
18795
18847
  s2 = peg$parse_();
18796
18848
  if (s2 !== peg$FAILED) {
18797
- if (input.substr(peg$currPos, 9) === peg$c147) {
18798
- s3 = peg$c147;
18849
+ if (input.substr(peg$currPos, 9) === peg$c151) {
18850
+ s3 = peg$c151;
18799
18851
  peg$currPos += 9;
18800
18852
  } else {
18801
18853
  s3 = peg$FAILED;
18802
- if (peg$silentFails === 0) peg$fail(peg$c148);
18854
+ if (peg$silentFails === 0) peg$fail(peg$c152);
18803
18855
  }
18804
18856
  if (s3 !== peg$FAILED) {
18805
18857
  s4 = peg$parse_();
@@ -18813,7 +18865,7 @@ to a key`);
18813
18865
  }
18814
18866
  if (s5 !== peg$FAILED) {
18815
18867
  peg$savedPos = s0;
18816
- s1 = peg$c136(s3);
18868
+ s1 = peg$c140(s3);
18817
18869
  s0 = s1;
18818
18870
  } else {
18819
18871
  peg$currPos = s0;
@@ -18907,7 +18959,7 @@ to a key`);
18907
18959
  s4 = peg$parseTabEndTag();
18908
18960
  if (s4 !== peg$FAILED) {
18909
18961
  peg$savedPos = s0;
18910
- s1 = peg$c131(s1, s3, s4);
18962
+ s1 = peg$c135(s1, s3, s4);
18911
18963
  s0 = s1;
18912
18964
  } else {
18913
18965
  peg$currPos = s0;
@@ -18940,20 +18992,20 @@ to a key`);
18940
18992
  if (s1 !== peg$FAILED) {
18941
18993
  s2 = peg$parse_();
18942
18994
  if (s2 !== peg$FAILED) {
18943
- if (input.substr(peg$currPos, 12) === peg$c149) {
18944
- s3 = peg$c149;
18995
+ if (input.substr(peg$currPos, 12) === peg$c153) {
18996
+ s3 = peg$c153;
18945
18997
  peg$currPos += 12;
18946
18998
  } else {
18947
18999
  s3 = peg$FAILED;
18948
- if (peg$silentFails === 0) peg$fail(peg$c150);
19000
+ if (peg$silentFails === 0) peg$fail(peg$c154);
18949
19001
  }
18950
19002
  if (s3 === peg$FAILED) {
18951
- if (input.substr(peg$currPos, 3) === peg$c151) {
18952
- s3 = peg$c151;
19003
+ if (input.substr(peg$currPos, 3) === peg$c155) {
19004
+ s3 = peg$c155;
18953
19005
  peg$currPos += 3;
18954
19006
  } else {
18955
19007
  s3 = peg$FAILED;
18956
- if (peg$silentFails === 0) peg$fail(peg$c152);
19008
+ if (peg$silentFails === 0) peg$fail(peg$c156);
18957
19009
  }
18958
19010
  }
18959
19011
  if (s3 !== peg$FAILED) {
@@ -19025,20 +19077,20 @@ to a key`);
19025
19077
  if (s1 !== peg$FAILED) {
19026
19078
  s2 = peg$parse_();
19027
19079
  if (s2 !== peg$FAILED) {
19028
- if (input.substr(peg$currPos, 10) === peg$c153) {
19029
- s3 = peg$c153;
19080
+ if (input.substr(peg$currPos, 10) === peg$c157) {
19081
+ s3 = peg$c157;
19030
19082
  peg$currPos += 10;
19031
19083
  } else {
19032
19084
  s3 = peg$FAILED;
19033
- if (peg$silentFails === 0) peg$fail(peg$c154);
19085
+ if (peg$silentFails === 0) peg$fail(peg$c158);
19034
19086
  }
19035
19087
  if (s3 === peg$FAILED) {
19036
- if (input.substr(peg$currPos, 3) === peg$c155) {
19037
- s3 = peg$c155;
19088
+ if (input.substr(peg$currPos, 3) === peg$c159) {
19089
+ s3 = peg$c159;
19038
19090
  peg$currPos += 3;
19039
19091
  } else {
19040
19092
  s3 = peg$FAILED;
19041
- if (peg$silentFails === 0) peg$fail(peg$c156);
19093
+ if (peg$silentFails === 0) peg$fail(peg$c160);
19042
19094
  }
19043
19095
  }
19044
19096
  if (s3 !== peg$FAILED) {
@@ -19053,7 +19105,7 @@ to a key`);
19053
19105
  }
19054
19106
  if (s5 !== peg$FAILED) {
19055
19107
  peg$savedPos = s0;
19056
- s1 = peg$c136(s3);
19108
+ s1 = peg$c140(s3);
19057
19109
  s0 = s1;
19058
19110
  } else {
19059
19111
  peg$currPos = s0;
@@ -19084,7 +19136,7 @@ to a key`);
19084
19136
  peg$currPos++;
19085
19137
  } else {
19086
19138
  s0 = peg$FAILED;
19087
- if (peg$silentFails === 0) peg$fail(peg$c157);
19139
+ if (peg$silentFails === 0) peg$fail(peg$c161);
19088
19140
  }
19089
19141
  return s0;
19090
19142
  }
@@ -19101,7 +19153,7 @@ to a key`);
19101
19153
  peg$silentFails--;
19102
19154
  if (s0 === peg$FAILED) {
19103
19155
  s1 = peg$FAILED;
19104
- if (peg$silentFails === 0) peg$fail(peg$c158);
19156
+ if (peg$silentFails === 0) peg$fail(peg$c162);
19105
19157
  }
19106
19158
  return s0;
19107
19159
  }
@@ -19117,18 +19169,18 @@ to a key`);
19117
19169
  peg$silentFails--;
19118
19170
  if (s0 === peg$FAILED) {
19119
19171
  s1 = peg$FAILED;
19120
- if (peg$silentFails === 0) peg$fail(peg$c159);
19172
+ if (peg$silentFails === 0) peg$fail(peg$c163);
19121
19173
  }
19122
19174
  return s0;
19123
19175
  }
19124
19176
  function peg$parseWhitespaceCharacter() {
19125
19177
  let s0;
19126
- if (peg$c160.test(input.charAt(peg$currPos))) {
19178
+ if (peg$c164.test(input.charAt(peg$currPos))) {
19127
19179
  s0 = input.charAt(peg$currPos);
19128
19180
  peg$currPos++;
19129
19181
  } else {
19130
19182
  s0 = peg$FAILED;
19131
- if (peg$silentFails === 0) peg$fail(peg$c161);
19183
+ if (peg$silentFails === 0) peg$fail(peg$c165);
19132
19184
  }
19133
19185
  return s0;
19134
19186
  }
@@ -19137,21 +19189,21 @@ to a key`);
19137
19189
  peg$silentFails++;
19138
19190
  s0 = peg$currPos;
19139
19191
  s1 = [];
19140
- if (peg$c163.test(input.charAt(peg$currPos))) {
19192
+ if (peg$c167.test(input.charAt(peg$currPos))) {
19141
19193
  s2 = input.charAt(peg$currPos);
19142
19194
  peg$currPos++;
19143
19195
  } else {
19144
19196
  s2 = peg$FAILED;
19145
- if (peg$silentFails === 0) peg$fail(peg$c164);
19197
+ if (peg$silentFails === 0) peg$fail(peg$c168);
19146
19198
  }
19147
19199
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
19148
19200
  s1.push(s2);
19149
- if (peg$c163.test(input.charAt(peg$currPos))) {
19201
+ if (peg$c167.test(input.charAt(peg$currPos))) {
19150
19202
  s2 = input.charAt(peg$currPos);
19151
19203
  peg$currPos++;
19152
19204
  } else {
19153
19205
  s2 = peg$FAILED;
19154
- if (peg$silentFails === 0) peg$fail(peg$c164);
19206
+ if (peg$silentFails === 0) peg$fail(peg$c168);
19155
19207
  }
19156
19208
  }
19157
19209
  else s1 = peg$FAILED;
@@ -19160,18 +19212,18 @@ to a key`);
19160
19212
  peg$silentFails--;
19161
19213
  if (s0 === peg$FAILED) {
19162
19214
  s1 = peg$FAILED;
19163
- if (peg$silentFails === 0) peg$fail(peg$c162);
19215
+ if (peg$silentFails === 0) peg$fail(peg$c166);
19164
19216
  }
19165
19217
  return s0;
19166
19218
  }
19167
19219
  function peg$parseNewLine() {
19168
19220
  let s0;
19169
- if (peg$c165.test(input.charAt(peg$currPos))) {
19221
+ if (peg$c169.test(input.charAt(peg$currPos))) {
19170
19222
  s0 = input.charAt(peg$currPos);
19171
19223
  peg$currPos++;
19172
19224
  } else {
19173
19225
  s0 = peg$FAILED;
19174
- if (peg$silentFails === 0) peg$fail(peg$c166);
19226
+ if (peg$silentFails === 0) peg$fail(peg$c170);
19175
19227
  }
19176
19228
  if (s0 === peg$FAILED) s0 = peg$parseCarriageReturnLineFeed();
19177
19229
  return s0;
@@ -19201,22 +19253,22 @@ to a key`);
19201
19253
  function peg$parseLineFeed() {
19202
19254
  let s0;
19203
19255
  if (input.charCodeAt(peg$currPos) === 10) {
19204
- s0 = peg$c167;
19256
+ s0 = peg$c171;
19205
19257
  peg$currPos++;
19206
19258
  } else {
19207
19259
  s0 = peg$FAILED;
19208
- if (peg$silentFails === 0) peg$fail(peg$c168);
19260
+ if (peg$silentFails === 0) peg$fail(peg$c172);
19209
19261
  }
19210
19262
  return s0;
19211
19263
  }
19212
19264
  function peg$parseCarriageReturn() {
19213
19265
  let s0;
19214
19266
  if (input.charCodeAt(peg$currPos) === 13) {
19215
- s0 = peg$c169;
19267
+ s0 = peg$c173;
19216
19268
  peg$currPos++;
19217
19269
  } else {
19218
19270
  s0 = peg$FAILED;
19219
- if (peg$silentFails === 0) peg$fail(peg$c170);
19271
+ if (peg$silentFails === 0) peg$fail(peg$c174);
19220
19272
  }
19221
19273
  return s0;
19222
19274
  }
@@ -19918,6 +19970,54 @@ to a key`);
19918
19970
  }
19919
19971
  };
19920
19972
  var $69c885ea9d252cfd$export$2e2bcd8739ae039 = $69c885ea9d252cfd$var$SongBuilder;
19973
+ function $2ce1086ce25c9ac0$export$fd31a53e6281557e(transposeKey, songKey) {
19974
+ if (/^\d+$/.test(transposeKey)) return parseInt(transposeKey, 10);
19975
+ return (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).distance(songKey, transposeKey);
19976
+ }
19977
+ function $2ce1086ce25c9ac0$var$chordTransposeDistance(capo, transposeKey, songKey, renderKey) {
19978
+ let transpose = -1 * (capo || 0);
19979
+ if (songKey) {
19980
+ if (transposeKey) transpose += $2ce1086ce25c9ac0$export$fd31a53e6281557e(transposeKey, songKey);
19981
+ if (renderKey) transpose += (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).distance(songKey, renderKey);
19982
+ }
19983
+ return transpose;
19984
+ }
19985
+ function $2ce1086ce25c9ac0$var$changeChordType(chord, type, referenceKey) {
19986
+ switch (type) {
19987
+ case "symbol":
19988
+ return chord.toChordSymbol(referenceKey);
19989
+ case "solfege":
19990
+ return chord.toChordSolfege(referenceKey);
19991
+ case "numeral":
19992
+ return chord.toNumeral(referenceKey);
19993
+ case "number":
19994
+ return chord.toNumeric(referenceKey);
19995
+ default:
19996
+ return chord;
19997
+ }
19998
+ }
19999
+ function $2ce1086ce25c9ac0$export$596ec52955da9472(chordString, line, song, { renderKey = null, useUnicodeModifier = false, normalizeChords = true, decapo = false } = {}) {
20000
+ const chord = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(chordString);
20001
+ const songKey = song.key;
20002
+ const capoString = song.metadata.getSingle((0, $7251dad5f4a4c35f$export$866f445d49bad88e));
20003
+ const capo = decapo && capoString ? parseInt(capoString, 10) : null;
20004
+ const chordStyle = song.metadata.getSingle((0, $7251dad5f4a4c35f$export$d8cbdf44b1f66df1));
20005
+ if (!chord) return chordString;
20006
+ const effectiveTransposeDistance = $2ce1086ce25c9ac0$var$chordTransposeDistance(capo, line.transposeKey, songKey, renderKey);
20007
+ const effectiveKey = renderKey || (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).wrap(line.key || song.key)?.transpose(effectiveTransposeDistance) || null;
20008
+ const transposedChord = chord.transpose(effectiveTransposeDistance);
20009
+ const normalizedChord = normalizeChords ? transposedChord.normalize(effectiveKey) : transposedChord;
20010
+ return $2ce1086ce25c9ac0$var$changeChordType(normalizedChord, chordStyle, effectiveKey).toString({
20011
+ useUnicodeModifier
20012
+ });
20013
+ }
20014
+ function $2ce1086ce25c9ac0$export$efb38dd75b8e2957({ selector, isNegated }, { configuration, metadata }) {
20015
+ if (selector === configuration.instrument?.type) return !isNegated;
20016
+ if (selector === configuration.user?.name) return !isNegated;
20017
+ const metadataValue = metadata.getSingle(selector);
20018
+ const metadataValueTruthy = metadataValue && metadataValue !== "";
20019
+ return isNegated ? !metadataValueTruthy : !!metadataValueTruthy;
20020
+ }
19921
20021
  var $c53141c05fae8382$var$Song = class _$c53141c05fae8382$var$Song extends (0, $9047ab737bb447ce$export$2e2bcd8739ae039) {
19922
20022
  /**
19923
20023
  * Creates a new {Song} instance
@@ -20240,11 +20340,15 @@ Or set the song key before changing key:
20240
20340
  * @see https://chordpro.org/chordpro/directives-define/
20241
20341
  * @see https://chordpro.org/chordpro/directives-chord/
20242
20342
  */
20243
- getChordDefinitions() {
20343
+ getChordDefinitions(context) {
20244
20344
  const chordDefinitions = {};
20245
20345
  this.foreachItem((item) => {
20246
20346
  if (!(item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039))) return;
20247
- const { chordDefinition } = item;
20347
+ const { chordDefinition, selector, isNegated } = item;
20348
+ if (selector && context && !(0, $2ce1086ce25c9ac0$export$efb38dd75b8e2957)({
20349
+ selector,
20350
+ isNegated
20351
+ }, context)) return;
20248
20352
  if (chordDefinition) chordDefinitions[chordDefinition.name] = chordDefinition.clone();
20249
20353
  });
20250
20354
  return chordDefinitions;
@@ -20439,13 +20543,14 @@ Or set the song key before changing key:
20439
20543
  return new (0, $551a223fc13b5c10$export$2e2bcd8739ae039)(chord ? new (0, $177a605b8569b31c$export$2e2bcd8739ae039)(chord).toString() : chords, lyrics, annotation);
20440
20544
  }
20441
20545
  parseTag(astComponent) {
20442
- const { name, value, location: { offset = null, line = null, column = null } = {}, chordDefinition, attributes, selector } = astComponent;
20546
+ const { name, value, location: { offset = null, line = null, column = null } = {}, chordDefinition, attributes, selector, isNegated } = astComponent;
20443
20547
  const tag = new (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039)(name, value, {
20444
20548
  line,
20445
20549
  column,
20446
20550
  offset
20447
20551
  }, attributes);
20448
20552
  tag.selector = selector || null;
20553
+ tag.isNegated = isNegated || false;
20449
20554
  if (chordDefinition) tag.chordDefinition = new (0, $36ec5eba476f1300$export$2e2bcd8739ae039)(chordDefinition.name, chordDefinition.baseFret, chordDefinition.frets, chordDefinition.fingers);
20450
20555
  return tag;
20451
20556
  }
@@ -20622,47 +20727,6 @@ Or set the song key before changing key:
20622
20727
  }
20623
20728
  };
20624
20729
  var $e136d63bbe28a4e0$export$2e2bcd8739ae039 = $e136d63bbe28a4e0$var$ChordSheetParser;
20625
- function $2ce1086ce25c9ac0$export$fd31a53e6281557e(transposeKey, songKey) {
20626
- if (/^\d+$/.test(transposeKey)) return parseInt(transposeKey, 10);
20627
- return (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).distance(songKey, transposeKey);
20628
- }
20629
- function $2ce1086ce25c9ac0$var$chordTransposeDistance(capo, transposeKey, songKey, renderKey) {
20630
- let transpose = -1 * (capo || 0);
20631
- if (songKey) {
20632
- if (transposeKey) transpose += $2ce1086ce25c9ac0$export$fd31a53e6281557e(transposeKey, songKey);
20633
- if (renderKey) transpose += (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).distance(songKey, renderKey);
20634
- }
20635
- return transpose;
20636
- }
20637
- function $2ce1086ce25c9ac0$var$changeChordType(chord, type, referenceKey) {
20638
- switch (type) {
20639
- case "symbol":
20640
- return chord.toChordSymbol(referenceKey);
20641
- case "solfege":
20642
- return chord.toChordSolfege(referenceKey);
20643
- case "numeral":
20644
- return chord.toNumeral(referenceKey);
20645
- case "number":
20646
- return chord.toNumeric(referenceKey);
20647
- default:
20648
- return chord;
20649
- }
20650
- }
20651
- function $2ce1086ce25c9ac0$export$596ec52955da9472(chordString, line, song, { renderKey = null, useUnicodeModifier = false, normalizeChords = true } = {}) {
20652
- const chord = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(chordString);
20653
- const songKey = song.key;
20654
- const capoString = song.metadata.getSingle((0, $7251dad5f4a4c35f$export$866f445d49bad88e));
20655
- const capo = capoString ? parseInt(capoString, 10) : null;
20656
- const chordStyle = song.metadata.getSingle((0, $7251dad5f4a4c35f$export$d8cbdf44b1f66df1));
20657
- if (!chord) return chordString;
20658
- const effectiveTransposeDistance = $2ce1086ce25c9ac0$var$chordTransposeDistance(capo, line.transposeKey, songKey, renderKey);
20659
- const effectiveKey = renderKey || (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).wrap(line.key || song.key)?.transpose(effectiveTransposeDistance) || null;
20660
- const transposedChord = chord.transpose(effectiveTransposeDistance);
20661
- const normalizedChord = normalizeChords ? transposedChord.normalize(effectiveKey) : transposedChord;
20662
- return $2ce1086ce25c9ac0$var$changeChordType(normalizedChord, chordStyle, effectiveKey).toString({
20663
- useUnicodeModifier
20664
- });
20665
- }
20666
20730
  var $15ddd1c5134545c8$var$WhenClause = class {
20667
20731
  constructor(condition, callback) {
20668
20732
  this.condition = !!condition;
@@ -20841,7 +20905,8 @@ Or set the song key before changing key:
20841
20905
  renderChord(item, line) {
20842
20906
  return (0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chords, line, this.song, {
20843
20907
  renderKey: this.configuration.key,
20844
- normalizeChords: this.configuration.normalizeChords
20908
+ normalizeChords: this.configuration.normalizeChords,
20909
+ decapo: this.configuration.decapo
20845
20910
  });
20846
20911
  }
20847
20912
  formatLineBottom(line, metadata) {
@@ -32997,10 +33062,13 @@ Or set the song key before changing key:
32997
33062
  ${(0, $f9c5006b26957916$export$79b2f7037acddd43)(bodyParagraphs, (paragraph) => `
32998
33063
  <div class="${(0, $f9c5006b26957916$export$dcd1550c9709312c)(paragraph)}">
32999
33064
  ${(0, $f9c5006b26957916$export$a55877ca9db47377)(paragraph.isLiteral(), () => `
33000
- <div class="row">
33001
- ${(0, $f9c5006b26957916$export$a55877ca9db47377)((0, $28a2fcb6fb95a147$export$ee27c052bca048fb)(paragraph.label), () => `
33065
+ ${(0, $f9c5006b26957916$export$a55877ca9db47377)((0, $28a2fcb6fb95a147$export$ee27c052bca048fb)(paragraph.label), () => `
33066
+ <div class="row">
33002
33067
  <h3 class="label">${paragraph.label}</h3>
33003
- `)}
33068
+ </div>
33069
+ `)}
33070
+
33071
+ <div class="row">
33004
33072
  <div class="literal">${(0, $f9c5006b26957916$export$e2953cc935d48476)((0, $f9c5006b26957916$export$4c0287abd2ec956e)(paragraph, configuration))}</div>
33005
33073
  </div>
33006
33074
  `).else(() => `
@@ -33017,7 +33085,8 @@ Or set the song key before changing key:
33017
33085
  ${(0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chords, line, song, {
33018
33086
  renderKey: key,
33019
33087
  useUnicodeModifier: configuration.useUnicodeModifiers,
33020
- normalizeChords: configuration.normalizeChords
33088
+ normalizeChords: configuration.normalizeChords,
33089
+ decapo: configuration.decapo
33021
33090
  })}
33022
33091
  </div>
33023
33092
  `)}
@@ -33083,11 +33152,18 @@ Or set the song key before changing key:
33083
33152
  ${(0, $f9c5006b26957916$export$79b2f7037acddd43)(bodyParagraphs, (paragraph) => `
33084
33153
  <div class="${(0, $f9c5006b26957916$export$dcd1550c9709312c)(paragraph)}">
33085
33154
  ${(0, $f9c5006b26957916$export$a55877ca9db47377)(paragraph.isLiteral(), () => `
33155
+ ${(0, $f9c5006b26957916$export$a55877ca9db47377)((0, $28a2fcb6fb95a147$export$ee27c052bca048fb)(paragraph.label), () => `
33156
+ <table class="row">
33157
+ <tr>
33158
+ <td>
33159
+ <h3 class="label">${paragraph.label}</h3>
33160
+ </td>
33161
+ </tr>
33162
+ </table>
33163
+ `)}
33164
+
33086
33165
  <table class="literal">
33087
33166
  <tr>
33088
- ${(0, $f9c5006b26957916$export$a55877ca9db47377)((0, $28a2fcb6fb95a147$export$ee27c052bca048fb)(paragraph.label), () => `
33089
- <td class="label">${paragraph.label}</td>
33090
- `)}
33091
33167
  <td class="contents">${(0, $f9c5006b26957916$export$e2953cc935d48476)((0, $f9c5006b26957916$export$4c0287abd2ec956e)(paragraph, configuration))}</td>
33092
33168
  </tr>
33093
33169
  </table>
@@ -33105,7 +33181,8 @@ Or set the song key before changing key:
33105
33181
  <td class="chord"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.chordFont)}>${(0, $2ce1086ce25c9ac0$export$596ec52955da9472)(item.chords, line, song, {
33106
33182
  renderKey: key,
33107
33183
  useUnicodeModifier: configuration.useUnicodeModifiers,
33108
- normalizeChords: configuration.normalizeChords
33184
+ normalizeChords: configuration.normalizeChords,
33185
+ decapo: configuration.decapo
33109
33186
  })}</td>
33110
33187
  `)}
33111
33188
  `)}
@@ -33242,7 +33319,8 @@ Or set the song key before changing key:
33242
33319
  const chords = (0, $2ce1086ce25c9ac0$export$596ec52955da9472)(chordLyricsPair.chords, line, this.song, {
33243
33320
  renderKey: this.configuration.key,
33244
33321
  useUnicodeModifier: this.configuration.useUnicodeModifiers,
33245
- normalizeChords: this.configuration.normalizeChords
33322
+ normalizeChords: this.configuration.normalizeChords,
33323
+ decapo: this.configuration.decapo
33246
33324
  });
33247
33325
  return chords;
33248
33326
  }
@@ -33392,5 +33470,5 @@ Or set the song key before changing key:
33392
33470
  };
33393
33471
  }
33394
33472
  });
33395
- return require_lib();
33473
+ return require_index();
33396
33474
  })();