diff --git a/docs/_snowpack/link/repl/krill-parser.js b/docs/_snowpack/link/repl/krill-parser.js index db17b13f..568fc08b 100644 --- a/docs/_snowpack/link/repl/krill-parser.js +++ b/docs/_snowpack/link/repl/krill-parser.js @@ -177,30 +177,33 @@ function peg$parse(input, options) { var peg$c5 = "\""; var peg$c6 = "'"; var peg$c7 = "#"; - var peg$c8 = "["; - var peg$c9 = "]"; - var peg$c10 = "<"; - var peg$c11 = ">"; - var peg$c12 = "@"; - var peg$c13 = "("; - var peg$c14 = ")"; - var peg$c15 = "/"; - var peg$c16 = "*"; - var peg$c17 = "%"; - var peg$c18 = "struct"; - var peg$c19 = "target"; - var peg$c20 = "euclid"; - var peg$c21 = "slow"; - var peg$c22 = "rotL"; - var peg$c23 = "rotR"; - var peg$c24 = "fast"; - var peg$c25 = "scale"; - var peg$c26 = "//"; - var peg$c27 = "cat"; - var peg$c28 = "$"; - var peg$c29 = "setcps"; - var peg$c30 = "setbpm"; - var peg$c31 = "hush"; + var peg$c8 = "^"; + var peg$c9 = "_"; + var peg$c10 = "["; + var peg$c11 = "]"; + var peg$c12 = "<"; + var peg$c13 = ">"; + var peg$c14 = "@"; + var peg$c15 = "!"; + var peg$c16 = "("; + var peg$c17 = ")"; + var peg$c18 = "/"; + var peg$c19 = "*"; + var peg$c20 = "%"; + var peg$c21 = "struct"; + var peg$c22 = "target"; + var peg$c23 = "euclid"; + var peg$c24 = "slow"; + var peg$c25 = "rotL"; + var peg$c26 = "rotR"; + var peg$c27 = "fast"; + var peg$c28 = "scale"; + var peg$c29 = "//"; + var peg$c30 = "cat"; + var peg$c31 = "$"; + var peg$c32 = "setcps"; + var peg$c33 = "setbpm"; + var peg$c34 = "hush"; var peg$r0 = /^[1-9]/; var peg$r1 = /^[eE]/; @@ -224,63 +227,67 @@ function peg$parse(input, options) { var peg$e12 = peg$literalExpectation("'", false); var peg$e13 = peg$classExpectation([["0", "9"], ["a", "z"], ["A", "Z"], "~"], false, false); var peg$e14 = peg$literalExpectation("#", false); - var peg$e15 = peg$literalExpectation("[", false); - var peg$e16 = peg$literalExpectation("]", false); - var peg$e17 = peg$literalExpectation("<", false); - var peg$e18 = peg$literalExpectation(">", false); - var peg$e19 = peg$literalExpectation("@", false); - var peg$e20 = peg$literalExpectation("(", false); - var peg$e21 = peg$literalExpectation(")", false); - var peg$e22 = peg$literalExpectation("/", false); - var peg$e23 = peg$literalExpectation("*", false); - var peg$e24 = peg$literalExpectation("%", false); - var peg$e25 = peg$literalExpectation("struct", false); - var peg$e26 = peg$literalExpectation("target", false); - var peg$e27 = peg$literalExpectation("euclid", false); - var peg$e28 = peg$literalExpectation("slow", false); - var peg$e29 = peg$literalExpectation("rotL", false); - var peg$e30 = peg$literalExpectation("rotR", false); - var peg$e31 = peg$literalExpectation("fast", false); - var peg$e32 = peg$literalExpectation("scale", false); - var peg$e33 = peg$literalExpectation("//", false); - var peg$e34 = peg$classExpectation(["\n"], true, false); - var peg$e35 = peg$literalExpectation("cat", false); - var peg$e36 = peg$literalExpectation("$", false); - var peg$e37 = peg$literalExpectation("setcps", false); - var peg$e38 = peg$literalExpectation("setbpm", false); - var peg$e39 = peg$literalExpectation("hush", false); + var peg$e15 = peg$literalExpectation("^", false); + var peg$e16 = peg$literalExpectation("_", false); + var peg$e17 = peg$literalExpectation("[", false); + var peg$e18 = peg$literalExpectation("]", false); + var peg$e19 = peg$literalExpectation("<", false); + var peg$e20 = peg$literalExpectation(">", false); + var peg$e21 = peg$literalExpectation("@", false); + var peg$e22 = peg$literalExpectation("!", false); + var peg$e23 = peg$literalExpectation("(", false); + var peg$e24 = peg$literalExpectation(")", false); + var peg$e25 = peg$literalExpectation("/", false); + var peg$e26 = peg$literalExpectation("*", false); + var peg$e27 = peg$literalExpectation("%", false); + var peg$e28 = peg$literalExpectation("struct", false); + var peg$e29 = peg$literalExpectation("target", false); + var peg$e30 = peg$literalExpectation("euclid", false); + var peg$e31 = peg$literalExpectation("slow", false); + var peg$e32 = peg$literalExpectation("rotL", false); + var peg$e33 = peg$literalExpectation("rotR", false); + var peg$e34 = peg$literalExpectation("fast", false); + var peg$e35 = peg$literalExpectation("scale", false); + var peg$e36 = peg$literalExpectation("//", false); + var peg$e37 = peg$classExpectation(["\n"], true, false); + var peg$e38 = peg$literalExpectation("cat", false); + var peg$e39 = peg$literalExpectation("$", false); + var peg$e40 = peg$literalExpectation("setcps", false); + var peg$e41 = peg$literalExpectation("setbpm", false); + var peg$e42 = peg$literalExpectation("hush", false); var peg$f0 = function() { return parseFloat(text()); }; var peg$f1 = function(chars) { return chars.join("") }; var peg$f2 = function(s) { return s}; var peg$f3 = function(sc) { sc.arguments_.alignment = "t"; return sc;}; var peg$f4 = function(a) { return { weight: a} }; - var peg$f5 = function(p, s) { return { operator : { type_: "bjorklund", arguments_ :{ pulse: p, step:s } } } }; - var peg$f6 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:a } } } }; - var peg$f7 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:"1/"+a } } } }; - var peg$f8 = function(a) { return { operator : { type_: "fixed-step", arguments_ :{ amount:a } } } }; - var peg$f9 = function(s, o) { return new ElementStub(s, o);}; - var peg$f10 = function(s) { return new PatternStub(s,"h"); }; - var peg$f11 = function(c, v) { return v}; - var peg$f12 = function(c, cs) { if (cs.length == 0 && c instanceof Object) { return c;} else { cs.unshift(c); return new PatternStub(cs,"v");} }; - var peg$f13 = function(s) { return s; }; - var peg$f14 = function(s) { return { name: "struct", args: { sequence:s }}}; - var peg$f15 = function(s) { return { name: "target", args : { name:s}}}; - var peg$f16 = function(p, s) { return { name: "bjorklund", args :{ pulse: parseInt(p), step:parseInt(s) }}}; - var peg$f17 = function(a) { return { name: "stretch", args :{ amount: a}}}; - var peg$f18 = function(a) { return { name: "shift", args :{ amount: "-"+a}}}; - var peg$f19 = function(a) { return { name: "shift", args :{ amount: a}}}; - var peg$f20 = function(a) { return { name: "stretch", args :{ amount: "1/"+a}}}; - var peg$f21 = function(s) { return { name: "scale", args :{ scale: s.join("")}}}; - var peg$f22 = function(s, v) { return v}; - var peg$f23 = function(s, ss) { ss.unshift(s); return new PatternStub(ss,"t"); }; - var peg$f24 = function(sg) {return sg}; - var peg$f25 = function(o, soc) { return new OperatorStub(o.name,o.args,soc)}; - var peg$f26 = function(sc) { return sc }; - var peg$f27 = function(c) { return c }; - var peg$f28 = function(v) { return new CommandStub("setcps", { value: v})}; - var peg$f29 = function(v) { return new CommandStub("setcps", { value: (v/120/2)})}; - var peg$f30 = function() { return new CommandStub("hush")}; + var peg$f5 = function(a) { return { replicate: a } }; + var peg$f6 = function(p, s) { return { operator : { type_: "bjorklund", arguments_ :{ pulse: p, step:s } } } }; + var peg$f7 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:a } } } }; + var peg$f8 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:"1/"+a } } } }; + var peg$f9 = function(a) { return { operator : { type_: "fixed-step", arguments_ :{ amount:a } } } }; + var peg$f10 = function(s, o) { return new ElementStub(s, o);}; + var peg$f11 = function(s) { return new PatternStub(s,"h"); }; + var peg$f12 = function(c, v) { return v}; + var peg$f13 = function(c, cs) { if (cs.length == 0 && c instanceof Object) { return c;} else { cs.unshift(c); return new PatternStub(cs,"v");} }; + var peg$f14 = function(s) { return s; }; + var peg$f15 = function(s) { return { name: "struct", args: { sequence:s }}}; + var peg$f16 = function(s) { return { name: "target", args : { name:s}}}; + var peg$f17 = function(p, s) { return { name: "bjorklund", args :{ pulse: parseInt(p), step:parseInt(s) }}}; + var peg$f18 = function(a) { return { name: "stretch", args :{ amount: a}}}; + var peg$f19 = function(a) { return { name: "shift", args :{ amount: "-"+a}}}; + var peg$f20 = function(a) { return { name: "shift", args :{ amount: a}}}; + var peg$f21 = function(a) { return { name: "stretch", args :{ amount: "1/"+a}}}; + var peg$f22 = function(s) { return { name: "scale", args :{ scale: s.join("")}}}; + var peg$f23 = function(s, v) { return v}; + var peg$f24 = function(s, ss) { ss.unshift(s); return new PatternStub(ss,"t"); }; + var peg$f25 = function(sg) {return sg}; + var peg$f26 = function(o, soc) { return new OperatorStub(o.name,o.args,soc)}; + var peg$f27 = function(sc) { return sc }; + var peg$f28 = function(c) { return c }; + var peg$f29 = function(v) { return new CommandStub("setcps", { value: v})}; + var peg$f30 = function(v) { return new CommandStub("setcps", { value: (v/120/2)})}; + var peg$f31 = function() { return new CommandStub("hush")}; var peg$currPos = 0; var peg$savedPos = 0; @@ -781,6 +788,24 @@ function peg$parse(input, options) { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e1); } } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 94) { + s0 = peg$c8; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e15); } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 95) { + s0 = peg$c9; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e16); } + } + } + } } } } @@ -821,11 +846,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 91) { - s2 = peg$c8; + s2 = peg$c10; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } + if (peg$silentFails === 0) { peg$fail(peg$e17); } } if (s2 !== peg$FAILED) { s3 = peg$parsews(); @@ -833,11 +858,11 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 93) { - s6 = peg$c9; + s6 = peg$c11; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e16); } + if (peg$silentFails === 0) { peg$fail(peg$e18); } } if (s6 !== peg$FAILED) { s7 = peg$parsews(); @@ -865,11 +890,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 60) { - s2 = peg$c10; + s2 = peg$c12; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e17); } + if (peg$silentFails === 0) { peg$fail(peg$e19); } } if (s2 !== peg$FAILED) { s3 = peg$parsews(); @@ -877,11 +902,11 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 62) { - s6 = peg$c11; + s6 = peg$c13; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e18); } + if (peg$silentFails === 0) { peg$fail(peg$e20); } } if (s6 !== peg$FAILED) { s7 = peg$parsews(); @@ -929,6 +954,9 @@ function peg$parse(input, options) { s0 = peg$parseslice_fast(); if (s0 === peg$FAILED) { s0 = peg$parseslice_fixed_step(); + if (s0 === peg$FAILED) { + s0 = peg$parseslice_replicate(); + } } } } @@ -942,11 +970,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 64) { - s1 = peg$c12; + s1 = peg$c14; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e19); } + if (peg$silentFails === 0) { peg$fail(peg$e21); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); @@ -965,16 +993,44 @@ function peg$parse(input, options) { return s0; } + function peg$parseslice_replicate() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 33) { + s1 = peg$c15; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e22); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsenumber(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f5(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseslice_bjorklund() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c13; + s1 = peg$c16; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e20); } + if (peg$silentFails === 0) { peg$fail(peg$e23); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -988,15 +1044,15 @@ function peg$parse(input, options) { if (s7 !== peg$FAILED) { s8 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 41) { - s9 = peg$c14; + s9 = peg$c17; peg$currPos++; } else { s9 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e21); } + if (peg$silentFails === 0) { peg$fail(peg$e24); } } if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f5(s3, s7); + s0 = peg$f6(s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1026,39 +1082,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 47) { - s1 = peg$c15; + s1 = peg$c18; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e22); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f6(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseslice_fast() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c16; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e23); } + if (peg$silentFails === 0) { peg$fail(peg$e25); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); @@ -1077,16 +1105,16 @@ function peg$parse(input, options) { return s0; } - function peg$parseslice_fixed_step() { + function peg$parseslice_fast() { var s0, s1, s2; s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 37) { - s1 = peg$c17; + if (input.charCodeAt(peg$currPos) === 42) { + s1 = peg$c19; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e24); } + if (peg$silentFails === 0) { peg$fail(peg$e26); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); @@ -1105,6 +1133,34 @@ function peg$parse(input, options) { return s0; } + function peg$parseslice_fixed_step() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 37) { + s1 = peg$c20; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e27); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsenumber(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f9(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseslice_with_modifier() { var s0, s1, s2; @@ -1116,7 +1172,7 @@ function peg$parse(input, options) { s2 = null; } peg$savedPos = s0; - s0 = peg$f9(s1, s2); + s0 = peg$f10(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1141,7 +1197,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f10(s1); + s1 = peg$f11(s1); } s0 = s1; @@ -1161,7 +1217,7 @@ function peg$parse(input, options) { s5 = peg$parsesingle_cycle(); if (s5 !== peg$FAILED) { peg$savedPos = s3; - s3 = peg$f11(s1, s5); + s3 = peg$f12(s1, s5); } else { peg$currPos = s3; s3 = peg$FAILED; @@ -1178,7 +1234,7 @@ function peg$parse(input, options) { s5 = peg$parsesingle_cycle(); if (s5 !== peg$FAILED) { peg$savedPos = s3; - s3 = peg$f11(s1, s5); + s3 = peg$f12(s1, s5); } else { peg$currPos = s3; s3 = peg$FAILED; @@ -1189,7 +1245,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f12(s1, s2); + s0 = peg$f13(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1210,7 +1266,7 @@ function peg$parse(input, options) { s4 = peg$parsequote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f13(s3); + s0 = peg$f14(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1260,19 +1316,19 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c18) { - s1 = peg$c18; + if (input.substr(peg$currPos, 6) === peg$c21) { + s1 = peg$c21; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e25); } + if (peg$silentFails === 0) { peg$fail(peg$e28); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); s3 = peg$parsesequence_or_operator(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f14(s3); + s0 = peg$f15(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1289,12 +1345,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c19) { - s1 = peg$c19; + if (input.substr(peg$currPos, 6) === peg$c22) { + s1 = peg$c22; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e26); } + if (peg$silentFails === 0) { peg$fail(peg$e29); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1305,7 +1361,7 @@ function peg$parse(input, options) { s5 = peg$parsequote(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f15(s4); + s0 = peg$f16(s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1330,12 +1386,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c20) { - s1 = peg$c20; + if (input.substr(peg$currPos, 6) === peg$c23) { + s1 = peg$c23; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e27); } + if (peg$silentFails === 0) { peg$fail(peg$e30); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1345,7 +1401,7 @@ function peg$parse(input, options) { s5 = peg$parseint(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f16(s3, s5); + s0 = peg$f17(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1366,41 +1422,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c21) { - s1 = peg$c21; + if (input.substr(peg$currPos, 4) === peg$c24) { + s1 = peg$c24; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e28); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsews(); - s3 = peg$parsenumber(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f17(s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parserotL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c22) { - s1 = peg$c22; - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e29); } + if (peg$silentFails === 0) { peg$fail(peg$e31); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1420,16 +1447,16 @@ function peg$parse(input, options) { return s0; } - function peg$parserotR() { + function peg$parserotL() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c23) { - s1 = peg$c23; + if (input.substr(peg$currPos, 4) === peg$c25) { + s1 = peg$c25; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e30); } + if (peg$silentFails === 0) { peg$fail(peg$e32); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1449,16 +1476,16 @@ function peg$parse(input, options) { return s0; } - function peg$parsefast() { + function peg$parserotR() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c24) { - s1 = peg$c24; + if (input.substr(peg$currPos, 4) === peg$c26) { + s1 = peg$c26; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e31); } + if (peg$silentFails === 0) { peg$fail(peg$e33); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1478,16 +1505,45 @@ function peg$parse(input, options) { return s0; } + function peg$parsefast() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c27) { + s1 = peg$c27; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e34); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsews(); + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f21(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsescale() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c25) { - s1 = peg$c25; + if (input.substr(peg$currPos, 5) === peg$c28) { + s1 = peg$c28; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e32); } + if (peg$silentFails === 0) { peg$fail(peg$e35); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1507,7 +1563,7 @@ function peg$parse(input, options) { s5 = peg$parsequote(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f21(s4); + s0 = peg$f22(s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1532,12 +1588,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c26) { - s1 = peg$c26; + if (input.substr(peg$currPos, 2) === peg$c29) { + s1 = peg$c29; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e33); } + if (peg$silentFails === 0) { peg$fail(peg$e36); } } if (s1 !== peg$FAILED) { s2 = []; @@ -1546,7 +1602,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e34); } + if (peg$silentFails === 0) { peg$fail(peg$e37); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -1555,7 +1611,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e34); } + if (peg$silentFails === 0) { peg$fail(peg$e37); } } } s1 = [s1, s2]; @@ -1572,21 +1628,21 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c27) { - s1 = peg$c27; + if (input.substr(peg$currPos, 3) === peg$c30) { + s1 = peg$c30; peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e35); } + if (peg$silentFails === 0) { peg$fail(peg$e38); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 91) { - s3 = peg$c8; + s3 = peg$c10; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } + if (peg$silentFails === 0) { peg$fail(peg$e17); } } if (s3 !== peg$FAILED) { s4 = peg$parsews(); @@ -1599,7 +1655,7 @@ function peg$parse(input, options) { s9 = peg$parsesequence_or_operator(); if (s9 !== peg$FAILED) { peg$savedPos = s7; - s7 = peg$f22(s5, s9); + s7 = peg$f23(s5, s9); } else { peg$currPos = s7; s7 = peg$FAILED; @@ -1616,7 +1672,7 @@ function peg$parse(input, options) { s9 = peg$parsesequence_or_operator(); if (s9 !== peg$FAILED) { peg$savedPos = s7; - s7 = peg$f22(s5, s9); + s7 = peg$f23(s5, s9); } else { peg$currPos = s7; s7 = peg$FAILED; @@ -1628,15 +1684,15 @@ function peg$parse(input, options) { } s7 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 93) { - s8 = peg$c9; + s8 = peg$c11; peg$currPos++; } else { s8 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e16); } + if (peg$silentFails === 0) { peg$fail(peg$e18); } } if (s8 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f23(s5, s6); + s0 = peg$f24(s5, s6); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1682,7 +1738,7 @@ function peg$parse(input, options) { s4 = peg$parsecomment(); } peg$savedPos = s0; - s0 = peg$f24(s1); + s0 = peg$f25(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1693,18 +1749,18 @@ function peg$parse(input, options) { if (s1 !== peg$FAILED) { s2 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 36) { - s3 = peg$c28; + s3 = peg$c31; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e36); } + if (peg$silentFails === 0) { peg$fail(peg$e39); } } if (s3 !== peg$FAILED) { s4 = peg$parsews(); s5 = peg$parsesequence_or_operator(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f25(s1, s5); + s0 = peg$f26(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1729,7 +1785,7 @@ function peg$parse(input, options) { s1 = peg$parsesequence_or_operator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f26(s1); + s1 = peg$f27(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -1762,7 +1818,7 @@ function peg$parse(input, options) { if (s2 !== peg$FAILED) { s3 = peg$parsews(); peg$savedPos = s0; - s0 = peg$f27(s2); + s0 = peg$f28(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1775,41 +1831,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c29) { - s1 = peg$c29; + if (input.substr(peg$currPos, 6) === peg$c32) { + s1 = peg$c32; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e37); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsews(); - s3 = peg$parsenumber(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f28(s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parsesetbpm() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c30) { - s1 = peg$c30; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e38); } + if (peg$silentFails === 0) { peg$fail(peg$e40); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1829,20 +1856,49 @@ function peg$parse(input, options) { return s0; } + function peg$parsesetbpm() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c33) { + s1 = peg$c33; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e41); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsews(); + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f30(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsehush() { var s0, s1; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c31) { - s1 = peg$c31; + if (input.substr(peg$currPos, 4) === peg$c34) { + s1 = peg$c34; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e39); } + if (peg$silentFails === 0) { peg$fail(peg$e42); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f30(); + s1 = peg$f31(); } s0 = s1; diff --git a/docs/_snowpack/link/strudel.js b/docs/_snowpack/link/strudel.js index 96cc10c8..a1176c75 100644 --- a/docs/_snowpack/link/strudel.js +++ b/docs/_snowpack/link/strudel.js @@ -1,17 +1,26 @@ import Fraction from "../pkg/fractionjs.js"; +import {compose} from "../pkg/ramda.js"; const removeUndefineds = (xs) => xs.filter((x) => x != void 0); const flatten = (arr) => [].concat(...arr); const id = (a) => a; -function curry(func) { - return function curried(...args) { +export function curry(func, overload) { + const fn = function curried(...args) { if (args.length >= func.length) { return func.apply(this, args); } else { - return function(...args2) { + const partial = function(...args2) { return curried.apply(this, args.concat(args2)); }; + if (overload) { + overload(partial, args); + } + return partial; } }; + if (overload) { + overload(fn, []); + } + return fn; } Fraction.prototype.sam = function() { return Fraction(Math.floor(this)); @@ -73,6 +82,9 @@ class TimeSpan { withTime(func_time) { return new TimeSpan(func_time(this.begin), func_time(this.end)); } + withEnd(func_time) { + return new TimeSpan(this.begin, func_time(this.end)); + } intersection(other) { const intersect_begin = this.begin.max(other.begin); const intersect_end = this.end.min(other.end); @@ -132,8 +144,16 @@ class Hap { } } class Pattern { - constructor(query2) { - this.query = query2; + constructor(query) { + this.query = query; + const proto = Object.getPrototypeOf(this); + proto.patternified.forEach((prop) => { + this[prop] = (...args) => this._patternify(Pattern.prototype["_" + prop])(...args); + Object.assign(this[prop], Object.fromEntries(Object.entries(Pattern.prototype.factories).map(([type, func]) => [ + type, + (...args) => this[prop](func(...args)) + ]))); + }); } _splitQueries() { const pat = this; @@ -172,10 +192,10 @@ class Pattern { } _appWhole(whole_func, pat_val) { const pat_func = this; - query = function(span) { + const query = function(span) { const event_funcs = pat_func.query(span); const event_vals = pat_val.query(span); - apply = function(event_func, event_val) { + const apply = function(event_func, event_val) { const s = event_func.part.intersection(event_val.part); if (s == void 0) { return void 0; @@ -188,7 +208,7 @@ class Pattern { } appBoth(pat_val) { const whole_func = function(span_a, span_b) { - if (span_a == void 0 || span_B == void 0) { + if (span_a == void 0 || span_b == void 0) { return void 0; } return span_a.intersection_e(span_b); @@ -197,7 +217,7 @@ class Pattern { } appLeft(pat_val) { const pat_func = this; - const query2 = function(span) { + const query = function(span) { const haps = []; for (const hap_func of pat_func.query(span)) { const event_vals = pat_val.query(hap_func.part); @@ -211,11 +231,11 @@ class Pattern { } return haps; }; - return new Pattern(query2); + return new Pattern(query); } appRight(pat_val) { const pat_func = this; - const query2 = function(span) { + const query = function(span) { const haps = []; for (const hap_val of pat_val.query(span)) { const hap_funcs = pat_func.query(hap_val.part); @@ -229,7 +249,7 @@ class Pattern { } return haps; }; - return new Pattern(query2); + return new Pattern(query); } get firstCycle() { return this.query(new TimeSpan(Fraction(0), Fraction(1))); @@ -251,7 +271,7 @@ class Pattern { } _bindWhole(choose_whole, func) { const pat_val = this; - const query2 = function(span) { + const query = function(span) { const withWhole = function(a, b) { return new Hap(choose_whole(a.whole, b.whole), b.part, b.value); }; @@ -260,7 +280,7 @@ class Pattern { }; return flatten(pat_val.query(span).map((a) => match(a))); }; - return new Pattern(query2); + return new Pattern(query); } bind(func) { const whole_func = function(a, b) { @@ -321,28 +341,16 @@ class Pattern { const fastQuery = this.withQueryTime((t) => t.mul(factor)); return fastQuery.withEventTime((t) => t.div(factor)); } - fast(...factor) { - return this._patternify(Pattern.prototype._fast)(...factor); - } _slow(factor) { return this._fast(1 / factor); } - slow(...factor) { - return this._patternify(Pattern.prototype._slow)(...factor); - } _early(offset) { offset = Fraction(offset); return this.withQueryTime((t) => t.add(offset)).withEventTime((t) => t.sub(offset)); } - early(...factor) { - return this._patternify(Pattern.prototype._early)(...factor); - } _late(offset) { return this._early(0 - offset); } - late(...factor) { - return this._patternify(Pattern.prototype._late)(...factor); - } when(binary_pat, func) { const true_pat = binary_pat._filterValues(id); const false_pat = binary_pat._filterValues((val) => !val); @@ -354,16 +362,17 @@ class Pattern { return stack([this, func(this._early(time_pat))]); } every(n, func) { - const pats = Array(n - 1).fill(this); - pats.unshift(func(this)); - return slowcat(...pats); + const pat = this; + const pats = Array(n - 1).fill(pat); + pats.unshift(func(pat)); + return slowcatPrime(...pats); } append(other) { return fastcat(...[this, other]); } rev() { const pat = this; - const query2 = function(span) { + const query = function(span) { const cycle = span.begin.sam(); const next_cycle = span.begin.nextSam(); const reflect = function(to_reflect) { @@ -376,7 +385,7 @@ class Pattern { const haps = pat.query(reflect(span)); return haps.map((hap) => hap.withSpan(reflect)); }; - return new Pattern(query2)._splitQueries(); + return new Pattern(query)._splitQueries(); } jux(func, by = 1) { by /= 2; @@ -390,37 +399,70 @@ class Pattern { const right = this.withValue((val) => Object.assign({}, val, {pan: elem_or(val, "pan", 0.5) + by})); return stack([left, func(right)]); } + stack(...pats) { + return stack(this, ...pats); + } + sequence(...pats) { + return sequence(this, ...pats); + } + superimpose(...funcs) { + return this.stack(...funcs.map((func) => func(this))); + } + edit(...funcs) { + return stack(...funcs.map((func) => func(this))); + } + _bypass(on2) { + on2 = Boolean(parseInt(on2)); + return on2 ? silence : this; + } + hush() { + return silence; + } } +Pattern.prototype.patternified = ["fast", "slow", "early", "late"]; +Pattern.prototype.factories = {pure, stack, slowcat, fastcat, cat, timeCat, sequence, polymeter, pm, polyrhythm, pr}; const silence = new Pattern((_) => []); function pure(value) { - function query2(span) { + function query(span) { return span.spanCycles.map((subspan) => new Hap(Fraction(subspan.begin).wholeCycle(), subspan, value)); } - return new Pattern(query2); + return new Pattern(query); } function steady(value) { return new Pattern((span) => Hap(void 0, span, value)); } function reify(thing) { - if (thing.constructor.name == "Pattern") { + if (thing?.constructor?.name == "Pattern") { return thing; } return pure(thing); } function stack(...pats) { const reified = pats.map((pat) => reify(pat)); - const query2 = (span) => flatten(reified.map((pat) => pat.query(span))); - return new Pattern(query2); + const query = (span) => flatten(reified.map((pat) => pat.query(span))); + return new Pattern(query); } function slowcat(...pats) { pats = pats.map(reify); - const query2 = function(span) { + const query = function(span) { const pat_n = Math.floor(span.begin) % pats.length; const pat = pats[pat_n]; + if (!pat) { + return []; + } const offset = span.begin.floor().sub(span.begin.div(pats.length).floor()); return pat.withEventTime((t) => t.add(offset)).query(span.withTime((t) => t.sub(offset))); }; - return new Pattern(query2)._splitQueries(); + return new Pattern(query)._splitQueries(); +} +function slowcatPrime(...pats) { + pats = pats.map(reify); + const query = function(span) { + const pat_n = Math.floor(span.begin) % pats.length; + const pat = pats[pat_n]; + return pat.query(span); + }; + return new Pattern(query)._splitQueries(); } function fastcat(...pats) { return slowcat(...pats)._fast(pats.length); @@ -493,6 +535,46 @@ const slow = curry((a, pat) => pat.slow(a)); const early = curry((a, pat) => pat.early(a)); const late = curry((a, pat) => pat.late(a)); const rev = (pat) => pat.rev(); +const add = curry((a, pat) => pat.add(a)); +const sub = curry((a, pat) => pat.sub(a)); +const mul = curry((a, pat) => pat.mul(a)); +const div = curry((a, pat) => pat.div(a)); +const union = curry((a, pat) => pat.union(a)); +const every = curry((i, f, pat) => pat.every(i, f)); +const when = curry((binary, f, pat) => pat.when(binary, f)); +const off = curry((t, f, pat) => pat.off(t, f)); +const jux = curry((f, pat) => pat.jux(f)); +const append = curry((a, pat) => pat.append(a)); +const superimpose = curry((array, pat) => pat.superimpose(...array)); +Pattern.prototype.composable = {fast, slow, early, late, superimpose}; +export function makeComposable(func) { + Object.entries(Pattern.prototype.composable).forEach(([functionName, composable]) => { + func[functionName] = (...args) => { + const composition = compose(func, composable(...args)); + return makeComposable(composition); + }; + }); + return func; +} +Pattern.prototype.define = (name, func, options = {}) => { + if (options.composable) { + Pattern.prototype.composable[name] = func; + } + if (options.patternified) { + Pattern.prototype.patternified = Pattern.prototype.patternified.concat([name]); + } +}; +Pattern.prototype.define("hush", (pat) => pat.hush(), {patternified: false, composable: true}); +Pattern.prototype.define("bypass", (pat) => pat.bypass(on), {patternified: true, composable: true}); +Pattern.prototype.bootstrap = () => { + const bootstrapped = Object.fromEntries(Object.entries(Pattern.prototype.composable).map(([functionName, composable]) => { + if (Pattern.prototype[functionName]) { + Pattern.prototype[functionName] = makeComposable(Pattern.prototype[functionName]); + } + return [functionName, curry(composable, makeComposable)]; + })); + return bootstrapped; +}; export { Fraction, TimeSpan, @@ -515,5 +597,16 @@ export { slow, early, late, - rev + rev, + add, + sub, + mul, + div, + union, + every, + when, + off, + jux, + append, + superimpose }; diff --git a/docs/_snowpack/pkg/@tonaljs/tonal.js b/docs/_snowpack/pkg/@tonaljs/tonal.js index c8186d9b..3f54353e 100644 --- a/docs/_snowpack/pkg/@tonaljs/tonal.js +++ b/docs/_snowpack/pkg/@tonaljs/tonal.js @@ -1,1722 +1 @@ -/** - * Fill a string with a repeated character - * - * @param character - * @param repetition - */ -const fillStr = (s, n) => Array(Math.abs(n) + 1).join(s); -function deprecate(original, alternative, fn) { - return function (...args) { - // tslint:disable-next-line - console.warn(`${original} is deprecated. Use ${alternative}.`); - return fn.apply(this, args); - }; -} - -function isNamed(src) { - return src !== null && typeof src === "object" && typeof src.name === "string" - ? true - : false; -} - -function isPitch(pitch) { - return pitch !== null && - typeof pitch === "object" && - typeof pitch.step === "number" && - typeof pitch.alt === "number" - ? true - : false; -} -// The number of fifths of [C, D, E, F, G, A, B] -const FIFTHS = [0, 2, 4, -1, 1, 3, 5]; -// The number of octaves it span each step -const STEPS_TO_OCTS = FIFTHS.map((fifths) => Math.floor((fifths * 7) / 12)); -function encode(pitch) { - const { step, alt, oct, dir = 1 } = pitch; - const f = FIFTHS[step] + 7 * alt; - if (oct === undefined) { - return [dir * f]; - } - const o = oct - STEPS_TO_OCTS[step] - 4 * alt; - return [dir * f, dir * o]; -} -// We need to get the steps from fifths -// Fifths for CDEFGAB are [ 0, 2, 4, -1, 1, 3, 5 ] -// We add 1 to fifths to avoid negative numbers, so: -// for ["F", "C", "G", "D", "A", "E", "B"] we have: -const FIFTHS_TO_STEPS = [3, 0, 4, 1, 5, 2, 6]; -function decode(coord) { - const [f, o, dir] = coord; - const step = FIFTHS_TO_STEPS[unaltered(f)]; - const alt = Math.floor((f + 1) / 7); - if (o === undefined) { - return { step, alt, dir }; - } - const oct = o + 4 * alt + STEPS_TO_OCTS[step]; - return { step, alt, oct, dir }; -} -// Return the number of fifths as if it were unaltered -function unaltered(f) { - const i = (f + 1) % 7; - return i < 0 ? 7 + i : i; -} - -const NoNote = { empty: true, name: "", pc: "", acc: "" }; -const cache$1 = new Map(); -const stepToLetter = (step) => "CDEFGAB".charAt(step); -const altToAcc = (alt) => alt < 0 ? fillStr("b", -alt) : fillStr("#", alt); -const accToAlt = (acc) => acc[0] === "b" ? -acc.length : acc.length; -/** - * Given a note literal (a note name or a note object), returns the Note object - * @example - * note('Bb4') // => { name: "Bb4", midi: 70, chroma: 10, ... } - */ -function note(src) { - const cached = cache$1.get(src); - if (cached) { - return cached; - } - const value = typeof src === "string" - ? parse$1(src) - : isPitch(src) - ? note(pitchName$1(src)) - : isNamed(src) - ? note(src.name) - : NoNote; - cache$1.set(src, value); - return value; -} -const REGEX$1 = /^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/; -/** - * @private - */ -function tokenizeNote(str) { - const m = REGEX$1.exec(str); - return [m[1].toUpperCase(), m[2].replace(/x/g, "##"), m[3], m[4]]; -} -/** - * @private - */ -function coordToNote(noteCoord) { - return note(decode(noteCoord)); -} -const mod = (n, m) => ((n % m) + m) % m; -const SEMI = [0, 2, 4, 5, 7, 9, 11]; -function parse$1(noteName) { - const tokens = tokenizeNote(noteName); - if (tokens[0] === "" || tokens[3] !== "") { - return NoNote; - } - const letter = tokens[0]; - const acc = tokens[1]; - const octStr = tokens[2]; - const step = (letter.charCodeAt(0) + 3) % 7; - const alt = accToAlt(acc); - const oct = octStr.length ? +octStr : undefined; - const coord = encode({ step, alt, oct }); - const name = letter + acc + octStr; - const pc = letter + acc; - const chroma = (SEMI[step] + alt + 120) % 12; - const height = oct === undefined - ? mod(SEMI[step] + alt, 12) - 12 * 99 - : SEMI[step] + alt + 12 * (oct + 1); - const midi = height >= 0 && height <= 127 ? height : null; - const freq = oct === undefined ? null : Math.pow(2, (height - 69) / 12) * 440; - return { - empty: false, - acc, - alt, - chroma, - coord, - freq, - height, - letter, - midi, - name, - oct, - pc, - step, - }; -} -function pitchName$1(props) { - const { step, alt, oct } = props; - const letter = stepToLetter(step); - if (!letter) { - return ""; - } - const pc = letter + altToAcc(alt); - return oct || oct === 0 ? pc + oct : pc; -} - -const NoInterval = { empty: true, name: "", acc: "" }; -// shorthand tonal notation (with quality after number) -const INTERVAL_TONAL_REGEX = "([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})"; -// standard shorthand notation (with quality before number) -const INTERVAL_SHORTHAND_REGEX = "(AA|A|P|M|m|d|dd)([-+]?\\d+)"; -const REGEX = new RegExp("^" + INTERVAL_TONAL_REGEX + "|" + INTERVAL_SHORTHAND_REGEX + "$"); -/** - * @private - */ -function tokenizeInterval(str) { - const m = REGEX.exec(`${str}`); - if (m === null) { - return ["", ""]; - } - return m[1] ? [m[1], m[2]] : [m[4], m[3]]; -} -const cache = {}; -/** - * Get interval properties. It returns an object with: - * - * - name: the interval name - * - num: the interval number - * - type: 'perfectable' or 'majorable' - * - q: the interval quality (d, m, M, A) - * - dir: interval direction (1 ascending, -1 descending) - * - simple: the simplified number - * - semitones: the size in semitones - * - chroma: the interval chroma - * - * @param {string} interval - the interval name - * @return {Object} the interval properties - * - * @example - * import { interval } from '@tonaljs/core' - * interval('P5').semitones // => 7 - * interval('m3').type // => 'majorable' - */ -function interval(src) { - return typeof src === "string" - ? cache[src] || (cache[src] = parse(src)) - : isPitch(src) - ? interval(pitchName(src)) - : isNamed(src) - ? interval(src.name) - : NoInterval; -} -const SIZES = [0, 2, 4, 5, 7, 9, 11]; -const TYPES = "PMMPPMM"; -function parse(str) { - const tokens = tokenizeInterval(str); - if (tokens[0] === "") { - return NoInterval; - } - const num = +tokens[0]; - const q = tokens[1]; - const step = (Math.abs(num) - 1) % 7; - const t = TYPES[step]; - if (t === "M" && q === "P") { - return NoInterval; - } - const type = t === "M" ? "majorable" : "perfectable"; - const name = "" + num + q; - const dir = num < 0 ? -1 : 1; - const simple = num === 8 || num === -8 ? num : dir * (step + 1); - const alt = qToAlt(type, q); - const oct = Math.floor((Math.abs(num) - 1) / 7); - const semitones = dir * (SIZES[step] + alt + 12 * oct); - const chroma = (((dir * (SIZES[step] + alt)) % 12) + 12) % 12; - const coord = encode({ step, alt, oct, dir }); - return { - empty: false, - name, - num, - q, - step, - alt, - dir, - type, - simple, - semitones, - chroma, - coord, - oct, - }; -} -/** - * @private - * - * forceDescending is used in the case of unison (#243) - */ -function coordToInterval(coord, forceDescending) { - const [f, o = 0] = coord; - const isDescending = f * 7 + o * 12 < 0; - const ivl = forceDescending || isDescending ? [-f, -o, -1] : [f, o, 1]; - return interval(decode(ivl)); -} -function qToAlt(type, q) { - return (q === "M" && type === "majorable") || - (q === "P" && type === "perfectable") - ? 0 - : q === "m" && type === "majorable" - ? -1 - : /^A+$/.test(q) - ? q.length - : /^d+$/.test(q) - ? -1 * (type === "perfectable" ? q.length : q.length + 1) - : 0; -} -// return the interval name of a pitch -function pitchName(props) { - const { step, alt, oct = 0, dir } = props; - if (!dir) { - return ""; - } - const calcNum = step + 1 + 7 * oct; - // this is an edge case: descending pitch class unison (see #243) - const num = calcNum === 0 ? step + 1 : calcNum; - const d = dir < 0 ? "-" : ""; - const type = TYPES[step] === "M" ? "majorable" : "perfectable"; - const name = d + num + altToQ(type, alt); - return name; -} -function altToQ(type, alt) { - if (alt === 0) { - return type === "majorable" ? "M" : "P"; - } - else if (alt === -1 && type === "majorable") { - return "m"; - } - else if (alt > 0) { - return fillStr("A", alt); - } - else { - return fillStr("d", type === "perfectable" ? alt : alt + 1); - } -} - -/** - * Transpose a note by an interval. - * - * @param {string} note - the note or note name - * @param {string} interval - the interval or interval name - * @return {string} the transposed note name or empty string if not valid notes - * @example - * import { tranpose } from "@tonaljs/core" - * transpose("d3", "3M") // => "F#3" - * transpose("D", "3M") // => "F#" - * ["C", "D", "E", "F", "G"].map(pc => transpose(pc, "M3)) // => ["E", "F#", "G#", "A", "B"] - */ -function transpose(noteName, intervalName) { - const note$1 = note(noteName); - const interval$1 = interval(intervalName); - if (note$1.empty || interval$1.empty) { - return ""; - } - const noteCoord = note$1.coord; - const intervalCoord = interval$1.coord; - const tr = noteCoord.length === 1 - ? [noteCoord[0] + intervalCoord[0]] - : [noteCoord[0] + intervalCoord[0], noteCoord[1] + intervalCoord[1]]; - return coordToNote(tr).name; -} -/** - * Find the interval distance between two notes or coord classes. - * - * To find distance between coord classes, both notes must be coord classes and - * the interval is always ascending - * - * @param {Note|string} from - the note or note name to calculate distance from - * @param {Note|string} to - the note or note name to calculate distance to - * @return {string} the interval name or empty string if not valid notes - * - */ -function distance(fromNote, toNote) { - const from = note(fromNote); - const to = note(toNote); - if (from.empty || to.empty) { - return ""; - } - const fcoord = from.coord; - const tcoord = to.coord; - const fifths = tcoord[0] - fcoord[0]; - const octs = fcoord.length === 2 && tcoord.length === 2 - ? tcoord[1] - fcoord[1] - : -Math.floor((fifths * 7) / 12); - // If it's unison and not pitch class, it can be descending interval (#243) - const forceDescending = to.height === from.height && - to.midi !== null && - from.midi !== null && - from.step > to.step; - return coordToInterval([fifths, octs], forceDescending).name; -} - -// ascending range -function ascR(b, n) { - const a = []; - // tslint:disable-next-line:curly - for (; n--; a[n] = n + b) - ; - return a; -} -// descending range -function descR(b, n) { - const a = []; - // tslint:disable-next-line:curly - for (; n--; a[n] = b - n) - ; - return a; -} -/** - * Creates a numeric range - * - * @param {number} from - * @param {number} to - * @return {Array} - * - * @example - * range(-2, 2) // => [-2, -1, 0, 1, 2] - * range(2, -2) // => [2, 1, 0, -1, -2] - */ -function range(from, to) { - return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1); -} -/** - * Rotates a list a number of times. It"s completly agnostic about the - * contents of the list. - * - * @param {Integer} times - the number of rotations - * @param {Array} collection - * @return {Array} the rotated collection - * - * @example - * rotate(1, [1, 2, 3]) // => [2, 3, 1] - */ -function rotate(times, arr) { - const len = arr.length; - const n = ((times % len) + len) % len; - return arr.slice(n, len).concat(arr.slice(0, n)); -} -/** - * Return a copy of the collection with the null values removed - * @function - * @param {Array} collection - * @return {Array} - * - * @example - * compact(["a", "b", null, "c"]) // => ["a", "b", "c"] - */ -function compact(arr) { - return arr.filter((n) => n === 0 || n); -} - -const EmptyPcset = { - empty: true, - name: "", - setNum: 0, - chroma: "000000000000", - normalized: "000000000000", - intervals: [], -}; -// UTILITIES -const setNumToChroma = (num) => Number(num).toString(2); -const chromaToNumber = (chroma) => parseInt(chroma, 2); -const REGEX$2 = /^[01]{12}$/; -function isChroma(set) { - return REGEX$2.test(set); -} -const isPcsetNum = (set) => typeof set === "number" && set >= 0 && set <= 4095; -const isPcset = (set) => set && isChroma(set.chroma); -const cache$2 = { [EmptyPcset.chroma]: EmptyPcset }; -/** - * Get the pitch class set of a collection of notes or set number or chroma - */ -function get(src) { - const chroma = isChroma(src) - ? src - : isPcsetNum(src) - ? setNumToChroma(src) - : Array.isArray(src) - ? listToChroma(src) - : isPcset(src) - ? src.chroma - : EmptyPcset.chroma; - return (cache$2[chroma] = cache$2[chroma] || chromaToPcset(chroma)); -} -const IVLS = [ - "1P", - "2m", - "2M", - "3m", - "3M", - "4P", - "5d", - "5P", - "6m", - "6M", - "7m", - "7M", -]; -/** - * @private - * Get the intervals of a pcset *starting from C* - * @param {Set} set - the pitch class set - * @return {IntervalName[]} an array of interval names or an empty array - * if not a valid pitch class set - */ -function chromaToIntervals(chroma) { - const intervals = []; - for (let i = 0; i < 12; i++) { - // tslint:disable-next-line:curly - if (chroma.charAt(i) === "1") - intervals.push(IVLS[i]); - } - return intervals; -} -/** - * Given a a list of notes or a pcset chroma, produce the rotations - * of the chroma discarding the ones that starts with "0" - * - * This is used, for example, to get all the modes of a scale. - * - * @param {Array|string} set - the list of notes or pitchChr of the set - * @param {boolean} normalize - (Optional, true by default) remove all - * the rotations that starts with "0" - * @return {Array} an array with all the modes of the chroma - * - * @example - * Pcset.modes(["C", "D", "E"]).map(Pcset.intervals) - */ -function modes(set, normalize = true) { - const pcs = get(set); - const binary = pcs.chroma.split(""); - return compact(binary.map((_, i) => { - const r = rotate(i, binary); - return normalize && r[0] === "0" ? null : r.join(""); - })); -} -/** - * Create a function that test if a collection of notes is a - * subset of a given set - * - * The function is curryfied. - * - * @param {PcsetChroma|NoteName[]} set - the superset to test against (chroma or - * list of notes) - * @return{function(PcsetChroma|NoteNames[]): boolean} a function accepting a set - * to test against (chroma or list of notes) - * @example - * const inCMajor = Pcset.isSubsetOf(["C", "E", "G"]) - * inCMajor(["e6", "c4"]) // => true - * inCMajor(["e6", "c4", "d3"]) // => false - */ -function isSubsetOf(set) { - const s = get(set).setNum; - return (notes) => { - const o = get(notes).setNum; - // tslint:disable-next-line: no-bitwise - return s && s !== o && (o & s) === o; - }; -} -/** - * Create a function that test if a collection of notes is a - * superset of a given set (it contains all notes and at least one more) - * - * @param {Set} set - an array of notes or a chroma set string to test against - * @return {(subset: Set): boolean} a function that given a set - * returns true if is a subset of the first one - * @example - * const extendsCMajor = Pcset.isSupersetOf(["C", "E", "G"]) - * extendsCMajor(["e6", "a", "c4", "g2"]) // => true - * extendsCMajor(["c6", "e4", "g3"]) // => false - */ -function isSupersetOf(set) { - const s = get(set).setNum; - return (notes) => { - const o = get(notes).setNum; - // tslint:disable-next-line: no-bitwise - return s && s !== o && (o | s) === o; - }; -} -//// PRIVATE //// -function chromaRotations(chroma) { - const binary = chroma.split(""); - return binary.map((_, i) => rotate(i, binary).join("")); -} -function chromaToPcset(chroma) { - const setNum = chromaToNumber(chroma); - const normalizedNum = chromaRotations(chroma) - .map(chromaToNumber) - .filter((n) => n >= 2048) - .sort()[0]; - const normalized = setNumToChroma(normalizedNum); - const intervals = chromaToIntervals(chroma); - return { - empty: false, - name: "", - setNum, - chroma, - normalized, - intervals, - }; -} -function listToChroma(set) { - if (set.length === 0) { - return EmptyPcset.chroma; - } - let pitch; - const binary = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - // tslint:disable-next-line:prefer-for-of - for (let i = 0; i < set.length; i++) { - pitch = note(set[i]); - // tslint:disable-next-line: curly - if (pitch.empty) - pitch = interval(set[i]); - // tslint:disable-next-line: curly - if (!pitch.empty) - binary[pitch.chroma] = 1; - } - return binary.join(""); -} - -/** - * @private - * Chord List - * Source: https://en.wikibooks.org/wiki/Music_Theory/Complete_List_of_Chord_Patterns - * Format: ["intervals", "full name", "abrv1 abrv2"] - */ -const CHORDS = [ - // ==Major== - ["1P 3M 5P", "major", "M ^ "], - ["1P 3M 5P 7M", "major seventh", "maj7 Δ ma7 M7 Maj7 ^7"], - ["1P 3M 5P 7M 9M", "major ninth", "maj9 Δ9 ^9"], - ["1P 3M 5P 7M 9M 13M", "major thirteenth", "maj13 Maj13 ^13"], - ["1P 3M 5P 6M", "sixth", "6 add6 add13 M6"], - ["1P 3M 5P 6M 9M", "sixth/ninth", "6/9 69 M69"], - ["1P 3M 6m 7M", "major seventh flat sixth", "M7b6 ^7b6"], - [ - "1P 3M 5P 7M 11A", - "major seventh sharp eleventh", - "maj#4 Δ#4 Δ#11 M7#11 ^7#11 maj7#11", - ], - // ==Minor== - // '''Normal''' - ["1P 3m 5P", "minor", "m min -"], - ["1P 3m 5P 7m", "minor seventh", "m7 min7 mi7 -7"], - [ - "1P 3m 5P 7M", - "minor/major seventh", - "m/ma7 m/maj7 mM7 mMaj7 m/M7 -Δ7 mΔ -^7", - ], - ["1P 3m 5P 6M", "minor sixth", "m6 -6"], - ["1P 3m 5P 7m 9M", "minor ninth", "m9 -9"], - ["1P 3m 5P 7M 9M", "minor/major ninth", "mM9 mMaj9 -^9"], - ["1P 3m 5P 7m 9M 11P", "minor eleventh", "m11 -11"], - ["1P 3m 5P 7m 9M 13M", "minor thirteenth", "m13 -13"], - // '''Diminished''' - ["1P 3m 5d", "diminished", "dim ° o"], - ["1P 3m 5d 7d", "diminished seventh", "dim7 °7 o7"], - ["1P 3m 5d 7m", "half-diminished", "m7b5 ø -7b5 h7 h"], - // ==Dominant/Seventh== - // '''Normal''' - ["1P 3M 5P 7m", "dominant seventh", "7 dom"], - ["1P 3M 5P 7m 9M", "dominant ninth", "9"], - ["1P 3M 5P 7m 9M 13M", "dominant thirteenth", "13"], - ["1P 3M 5P 7m 11A", "lydian dominant seventh", "7#11 7#4"], - // '''Altered''' - ["1P 3M 5P 7m 9m", "dominant flat ninth", "7b9"], - ["1P 3M 5P 7m 9A", "dominant sharp ninth", "7#9"], - ["1P 3M 7m 9m", "altered", "alt7"], - // '''Suspended''' - ["1P 4P 5P", "suspended fourth", "sus4 sus"], - ["1P 2M 5P", "suspended second", "sus2"], - ["1P 4P 5P 7m", "suspended fourth seventh", "7sus4 7sus"], - ["1P 5P 7m 9M 11P", "eleventh", "11"], - [ - "1P 4P 5P 7m 9m", - "suspended fourth flat ninth", - "b9sus phryg 7b9sus 7b9sus4", - ], - // ==Other== - ["1P 5P", "fifth", "5"], - ["1P 3M 5A", "augmented", "aug + +5 ^#5"], - ["1P 3m 5A", "minor augmented", "m#5 -#5 m+"], - ["1P 3M 5A 7M", "augmented seventh", "maj7#5 maj7+5 +maj7 ^7#5"], - [ - "1P 3M 5P 7M 9M 11A", - "major sharp eleventh (lydian)", - "maj9#11 Δ9#11 ^9#11", - ], - // ==Legacy== - ["1P 2M 4P 5P", "", "sus24 sus4add9"], - ["1P 3M 5A 7M 9M", "", "maj9#5 Maj9#5"], - ["1P 3M 5A 7m", "", "7#5 +7 7+ 7aug aug7"], - ["1P 3M 5A 7m 9A", "", "7#5#9 7#9#5 7alt"], - ["1P 3M 5A 7m 9M", "", "9#5 9+"], - ["1P 3M 5A 7m 9M 11A", "", "9#5#11"], - ["1P 3M 5A 7m 9m", "", "7#5b9 7b9#5"], - ["1P 3M 5A 7m 9m 11A", "", "7#5b9#11"], - ["1P 3M 5A 9A", "", "+add#9"], - ["1P 3M 5A 9M", "", "M#5add9 +add9"], - ["1P 3M 5P 6M 11A", "", "M6#11 M6b5 6#11 6b5"], - ["1P 3M 5P 6M 7M 9M", "", "M7add13"], - ["1P 3M 5P 6M 9M 11A", "", "69#11"], - ["1P 3m 5P 6M 9M", "", "m69 -69"], - ["1P 3M 5P 6m 7m", "", "7b6"], - ["1P 3M 5P 7M 9A 11A", "", "maj7#9#11"], - ["1P 3M 5P 7M 9M 11A 13M", "", "M13#11 maj13#11 M13+4 M13#4"], - ["1P 3M 5P 7M 9m", "", "M7b9"], - ["1P 3M 5P 7m 11A 13m", "", "7#11b13 7b5b13"], - ["1P 3M 5P 7m 13M", "", "7add6 67 7add13"], - ["1P 3M 5P 7m 9A 11A", "", "7#9#11 7b5#9 7#9b5"], - ["1P 3M 5P 7m 9A 11A 13M", "", "13#9#11"], - ["1P 3M 5P 7m 9A 11A 13m", "", "7#9#11b13"], - ["1P 3M 5P 7m 9A 13M", "", "13#9"], - ["1P 3M 5P 7m 9A 13m", "", "7#9b13"], - ["1P 3M 5P 7m 9M 11A", "", "9#11 9+4 9#4"], - ["1P 3M 5P 7m 9M 11A 13M", "", "13#11 13+4 13#4"], - ["1P 3M 5P 7m 9M 11A 13m", "", "9#11b13 9b5b13"], - ["1P 3M 5P 7m 9m 11A", "", "7b9#11 7b5b9 7b9b5"], - ["1P 3M 5P 7m 9m 11A 13M", "", "13b9#11"], - ["1P 3M 5P 7m 9m 11A 13m", "", "7b9b13#11 7b9#11b13 7b5b9b13"], - ["1P 3M 5P 7m 9m 13M", "", "13b9"], - ["1P 3M 5P 7m 9m 13m", "", "7b9b13"], - ["1P 3M 5P 7m 9m 9A", "", "7b9#9"], - ["1P 3M 5P 9M", "", "Madd9 2 add9 add2"], - ["1P 3M 5P 9m", "", "Maddb9"], - ["1P 3M 5d", "", "Mb5"], - ["1P 3M 5d 6M 7m 9M", "", "13b5"], - ["1P 3M 5d 7M", "", "M7b5"], - ["1P 3M 5d 7M 9M", "", "M9b5"], - ["1P 3M 5d 7m", "", "7b5"], - ["1P 3M 5d 7m 9M", "", "9b5"], - ["1P 3M 7m", "", "7no5"], - ["1P 3M 7m 13m", "", "7b13"], - ["1P 3M 7m 9M", "", "9no5"], - ["1P 3M 7m 9M 13M", "", "13no5"], - ["1P 3M 7m 9M 13m", "", "9b13"], - ["1P 3m 4P 5P", "", "madd4"], - ["1P 3m 5P 6m 7M", "", "mMaj7b6"], - ["1P 3m 5P 6m 7M 9M", "", "mMaj9b6"], - ["1P 3m 5P 7m 11P", "", "m7add11 m7add4"], - ["1P 3m 5P 9M", "", "madd9"], - ["1P 3m 5d 6M 7M", "", "o7M7"], - ["1P 3m 5d 7M", "", "oM7"], - ["1P 3m 6m 7M", "", "mb6M7"], - ["1P 3m 6m 7m", "", "m7#5"], - ["1P 3m 6m 7m 9M", "", "m9#5"], - ["1P 3m 5A 7m 9M 11P", "", "m11A"], - ["1P 3m 6m 9m", "", "mb6b9"], - ["1P 2M 3m 5d 7m", "", "m9b5"], - ["1P 4P 5A 7M", "", "M7#5sus4"], - ["1P 4P 5A 7M 9M", "", "M9#5sus4"], - ["1P 4P 5A 7m", "", "7#5sus4"], - ["1P 4P 5P 7M", "", "M7sus4"], - ["1P 4P 5P 7M 9M", "", "M9sus4"], - ["1P 4P 5P 7m 9M", "", "9sus4 9sus"], - ["1P 4P 5P 7m 9M 13M", "", "13sus4 13sus"], - ["1P 4P 5P 7m 9m 13m", "", "7sus4b9b13 7b9b13sus4"], - ["1P 4P 7m 10m", "", "4 quartal"], - ["1P 5P 7m 9m 11P", "", "11b9"], -]; -let dictionary = []; -/** - * Return a list of all chord types - */ -function all() { - return dictionary.slice(); -} -/** - * Add a chord to the dictionary. - * @param intervals - * @param aliases - * @param [fullName] - */ -function add(intervals, aliases, fullName) { - const quality = getQuality(intervals); - const chord = { - ...get(intervals), - name: fullName || "", - quality, - intervals, - aliases, - }; - dictionary.push(chord); - chord.aliases.forEach((alias) => addAlias()); -} -function addAlias(chord, alias) { -} -function getQuality(intervals) { - const has = (interval) => intervals.indexOf(interval) !== -1; - return has("5A") - ? "Augmented" - : has("3M") - ? "Major" - : has("5d") - ? "Diminished" - : has("3m") - ? "Minor" - : "Unknown"; -} -CHORDS.forEach(([ivls, fullName, names]) => add(ivls.split(" "), names.split(" "), fullName)); -dictionary.sort((a, b) => a.setNum - b.setNum); - -// SCALES -// Format: ["intervals", "name", "alias1", "alias2", ...] -const SCALES = [ - // 5-note scales - ["1P 2M 3M 5P 6M", "major pentatonic", "pentatonic"], - ["1P 3M 4P 5P 7M", "ionian pentatonic"], - ["1P 3M 4P 5P 7m", "mixolydian pentatonic", "indian"], - ["1P 2M 4P 5P 6M", "ritusen"], - ["1P 2M 4P 5P 7m", "egyptian"], - ["1P 3M 4P 5d 7m", "neopolitan major pentatonic"], - ["1P 3m 4P 5P 6m", "vietnamese 1"], - ["1P 2m 3m 5P 6m", "pelog"], - ["1P 2m 4P 5P 6m", "kumoijoshi"], - ["1P 2M 3m 5P 6m", "hirajoshi"], - ["1P 2m 4P 5d 7m", "iwato"], - ["1P 2m 4P 5P 7m", "in-sen"], - ["1P 3M 4A 5P 7M", "lydian pentatonic", "chinese"], - ["1P 3m 4P 6m 7m", "malkos raga"], - ["1P 3m 4P 5d 7m", "locrian pentatonic", "minor seven flat five pentatonic"], - ["1P 3m 4P 5P 7m", "minor pentatonic", "vietnamese 2"], - ["1P 3m 4P 5P 6M", "minor six pentatonic"], - ["1P 2M 3m 5P 6M", "flat three pentatonic", "kumoi"], - ["1P 2M 3M 5P 6m", "flat six pentatonic"], - ["1P 2m 3M 5P 6M", "scriabin"], - ["1P 3M 5d 6m 7m", "whole tone pentatonic"], - ["1P 3M 4A 5A 7M", "lydian #5P pentatonic"], - ["1P 3M 4A 5P 7m", "lydian dominant pentatonic"], - ["1P 3m 4P 5P 7M", "minor #7M pentatonic"], - ["1P 3m 4d 5d 7m", "super locrian pentatonic"], - // 6-note scales - ["1P 2M 3m 4P 5P 7M", "minor hexatonic"], - ["1P 2A 3M 5P 5A 7M", "augmented"], - ["1P 2M 3m 3M 5P 6M", "major blues"], - ["1P 2M 4P 5P 6M 7m", "piongio"], - ["1P 2m 3M 4A 6M 7m", "prometheus neopolitan"], - ["1P 2M 3M 4A 6M 7m", "prometheus"], - ["1P 2m 3M 5d 6m 7m", "mystery #1"], - ["1P 2m 3M 4P 5A 6M", "six tone symmetric"], - ["1P 2M 3M 4A 5A 7m", "whole tone", "messiaen's mode #1"], - ["1P 2m 4P 4A 5P 7M", "messiaen's mode #5"], - ["1P 3m 4P 5d 5P 7m", "minor blues", "blues"], - // 7-note scales - ["1P 2M 3M 4P 5d 6m 7m", "locrian major", "arabian"], - ["1P 2m 3M 4A 5P 6m 7M", "double harmonic lydian"], - ["1P 2M 3m 4P 5P 6m 7M", "harmonic minor"], - [ - "1P 2m 2A 3M 4A 6m 7m", - "altered", - "super locrian", - "diminished whole tone", - "pomeroy", - ], - ["1P 2M 3m 4P 5d 6m 7m", "locrian #2", "half-diminished", "aeolian b5"], - [ - "1P 2M 3M 4P 5P 6m 7m", - "mixolydian b6", - "melodic minor fifth mode", - "hindu", - ], - ["1P 2M 3M 4A 5P 6M 7m", "lydian dominant", "lydian b7", "overtone"], - ["1P 2M 3M 4A 5P 6M 7M", "lydian"], - ["1P 2M 3M 4A 5A 6M 7M", "lydian augmented"], - [ - "1P 2m 3m 4P 5P 6M 7m", - "dorian b2", - "phrygian #6", - "melodic minor second mode", - ], - ["1P 2M 3m 4P 5P 6M 7M", "melodic minor"], - ["1P 2m 3m 4P 5d 6m 7m", "locrian"], - [ - "1P 2m 3m 4d 5d 6m 7d", - "ultralocrian", - "superlocrian bb7", - "superlocrian diminished", - ], - ["1P 2m 3m 4P 5d 6M 7m", "locrian 6", "locrian natural 6", "locrian sharp 6"], - ["1P 2A 3M 4P 5P 5A 7M", "augmented heptatonic"], - // Source https://en.wikipedia.org/wiki/Ukrainian_Dorian_scale - [ - "1P 2M 3m 4A 5P 6M 7m", - "dorian #4", - "ukrainian dorian", - "romanian minor", - "altered dorian", - ], - ["1P 2M 3m 4A 5P 6M 7M", "lydian diminished"], - ["1P 2m 3m 4P 5P 6m 7m", "phrygian"], - ["1P 2M 3M 4A 5A 7m 7M", "leading whole tone"], - ["1P 2M 3M 4A 5P 6m 7m", "lydian minor"], - ["1P 2m 3M 4P 5P 6m 7m", "phrygian dominant", "spanish", "phrygian major"], - ["1P 2m 3m 4P 5P 6m 7M", "balinese"], - ["1P 2m 3m 4P 5P 6M 7M", "neopolitan major"], - ["1P 2M 3m 4P 5P 6m 7m", "aeolian", "minor"], - ["1P 2M 3M 4P 5P 6m 7M", "harmonic major"], - ["1P 2m 3M 4P 5P 6m 7M", "double harmonic major", "gypsy"], - ["1P 2M 3m 4P 5P 6M 7m", "dorian"], - ["1P 2M 3m 4A 5P 6m 7M", "hungarian minor"], - ["1P 2A 3M 4A 5P 6M 7m", "hungarian major"], - ["1P 2m 3M 4P 5d 6M 7m", "oriental"], - ["1P 2m 3m 3M 4A 5P 7m", "flamenco"], - ["1P 2m 3m 4A 5P 6m 7M", "todi raga"], - ["1P 2M 3M 4P 5P 6M 7m", "mixolydian", "dominant"], - ["1P 2m 3M 4P 5d 6m 7M", "persian"], - ["1P 2M 3M 4P 5P 6M 7M", "major", "ionian"], - ["1P 2m 3M 5d 6m 7m 7M", "enigmatic"], - [ - "1P 2M 3M 4P 5A 6M 7M", - "major augmented", - "major #5", - "ionian augmented", - "ionian #5", - ], - ["1P 2A 3M 4A 5P 6M 7M", "lydian #9"], - // 8-note scales - ["1P 2m 2M 4P 4A 5P 6m 7M", "messiaen's mode #4"], - ["1P 2m 3M 4P 4A 5P 6m 7M", "purvi raga"], - ["1P 2m 3m 3M 4P 5P 6m 7m", "spanish heptatonic"], - ["1P 2M 3M 4P 5P 6M 7m 7M", "bebop"], - ["1P 2M 3m 3M 4P 5P 6M 7m", "bebop minor"], - ["1P 2M 3M 4P 5P 5A 6M 7M", "bebop major"], - ["1P 2m 3m 4P 5d 5P 6m 7m", "bebop locrian"], - ["1P 2M 3m 4P 5P 6m 7m 7M", "minor bebop"], - ["1P 2M 3m 4P 5d 6m 6M 7M", "diminished", "whole-half diminished"], - ["1P 2M 3M 4P 5d 5P 6M 7M", "ichikosucho"], - ["1P 2M 3m 4P 5P 6m 6M 7M", "minor six diminished"], - [ - "1P 2m 3m 3M 4A 5P 6M 7m", - "half-whole diminished", - "dominant diminished", - "messiaen's mode #2", - ], - ["1P 3m 3M 4P 5P 6M 7m 7M", "kafi raga"], - ["1P 2M 3M 4P 4A 5A 6A 7M", "messiaen's mode #6"], - // 9-note scales - ["1P 2M 3m 3M 4P 5d 5P 6M 7m", "composite blues"], - ["1P 2M 3m 3M 4A 5P 6m 7m 7M", "messiaen's mode #3"], - // 10-note scales - ["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M", "messiaen's mode #7"], - // 12-note scales - ["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M", "chromatic"], -]; - -const NoScaleType = { - ...EmptyPcset, - intervals: [], - aliases: [], -}; -let dictionary$1 = []; -let index = {}; -function names() { - return dictionary$1.map((scale) => scale.name); -} -/** - * Given a scale name or chroma, return the scale properties - * - * @param {string} type - scale name or pitch class set chroma - * @example - * import { get } from 'tonaljs/scale-type' - * get('major') // => { name: 'major', ... } - */ -function get$1(type) { - return index[type] || NoScaleType; -} -/** - * Return a list of all scale types - */ -function all$1() { - return dictionary$1.slice(); -} -/** - * Add a scale into dictionary - * @param intervals - * @param name - * @param aliases - */ -function add$1(intervals, name, aliases = []) { - const scale = { ...get(intervals), name, intervals, aliases }; - dictionary$1.push(scale); - index[scale.name] = scale; - index[scale.setNum] = scale; - index[scale.chroma] = scale; - scale.aliases.forEach((alias) => addAlias$1(scale, alias)); - return scale; -} -function addAlias$1(scale, alias) { - index[alias] = scale; -} -SCALES.forEach(([ivls, name, ...aliases]) => add$1(ivls.split(" "), name, aliases)); - -/** - * Get the natural list of names - */ -function names$1() { - return "1P 2M 3M 4P 5P 6m 7m".split(" "); -} -/** - * Get properties of an interval - * - * @function - * @example - * Interval.get('P4') // => {"alt": 0, "dir": 1, "name": "4P", "num": 4, "oct": 0, "q": "P", "semitones": 5, "simple": 4, "step": 3, "type": "perfectable"} - */ -const get$2 = interval; -/** - * Get name of an interval - * - * @function - * @example - * Interval.name('4P') // => "4P" - * Interval.name('P4') // => "4P" - * Interval.name('C4') // => "" - */ -const name = (name) => interval(name).name; -/** - * Get semitones of an interval - * @function - * @example - * Interval.semitones('P4') // => 5 - */ -const semitones = (name) => interval(name).semitones; -/** - * Get quality of an interval - * @function - * @example - * Interval.quality('P4') // => "P" - */ -const quality = (name) => interval(name).q; -/** - * Get number of an interval - * @function - * @example - * Interval.num('P4') // => 4 - */ -const num = (name) => interval(name).num; -/** - * Get the simplified version of an interval. - * - * @function - * @param {string} interval - the interval to simplify - * @return {string} the simplified interval - * - * @example - * Interval.simplify("9M") // => "2M" - * Interval.simplify("2M") // => "2M" - * Interval.simplify("-2M") // => "7m" - * ["8P", "9M", "10M", "11P", "12P", "13M", "14M", "15P"].map(Interval.simplify) - * // => [ "8P", "2M", "3M", "4P", "5P", "6M", "7M", "8P" ] - */ -function simplify(name) { - const i = interval(name); - return i.empty ? "" : i.simple + i.q; -} -/** - * Get the inversion (https://en.wikipedia.org/wiki/Inversion_(music)#Intervals) - * of an interval. - * - * @function - * @param {string} interval - the interval to invert in interval shorthand - * notation or interval array notation - * @return {string} the inverted interval - * - * @example - * Interval.invert("3m") // => "6M" - * Interval.invert("2M") // => "7m" - */ -function invert(name) { - const i = interval(name); - if (i.empty) { - return ""; - } - const step = (7 - i.step) % 7; - const alt = i.type === "perfectable" ? -i.alt : -(i.alt + 1); - return interval({ step, alt, oct: i.oct, dir: i.dir }).name; -} -// interval numbers -const IN = [1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7]; -// interval qualities -const IQ = "P m M m M P d P m M m M".split(" "); -/** - * Get interval name from semitones number. Since there are several interval - * names for the same number, the name it's arbitrary, but deterministic. - * - * @param {Integer} num - the number of semitones (can be negative) - * @return {string} the interval name - * @example - * Interval.fromSemitones(7) // => "5P" - * Interval.fromSemitones(-7) // => "-5P" - */ -function fromSemitones(semitones) { - const d = semitones < 0 ? -1 : 1; - const n = Math.abs(semitones); - const c = n % 12; - const o = Math.floor(n / 12); - return d * (IN[c] + 7 * o) + IQ[c]; -} -/** - * Find interval between two notes - * - * @example - * Interval.distance("C4", "G4"); // => "5P" - */ -const distance$1 = distance; -/** - * Adds two intervals - * - * @function - * @param {string} interval1 - * @param {string} interval2 - * @return {string} the added interval name - * @example - * Interval.add("3m", "5P") // => "7m" - */ -const add$2 = combinator((a, b) => [a[0] + b[0], a[1] + b[1]]); -/** - * Returns a function that adds an interval - * - * @function - * @example - * ['1P', '2M', '3M'].map(Interval.addTo('5P')) // => ["5P", "6M", "7M"] - */ -const addTo = (interval) => (other) => add$2(interval, other); -/** - * Subtracts two intervals - * - * @function - * @param {string} minuendInterval - * @param {string} subtrahendInterval - * @return {string} the substracted interval name - * @example - * Interval.substract('5P', '3M') // => '3m' - * Interval.substract('3M', '5P') // => '-3m' - */ -const substract = combinator((a, b) => [a[0] - b[0], a[1] - b[1]]); -function transposeFifths(interval, fifths) { - const ivl = get$2(interval); - if (ivl.empty) - return ""; - const [nFifths, nOcts, dir] = ivl.coord; - return coordToInterval([nFifths + fifths, nOcts, dir]).name; -} -var index$1 = { - names: names$1, - get: get$2, - name, - num, - semitones, - quality, - fromSemitones, - distance: distance$1, - invert, - simplify, - add: add$2, - addTo, - substract, - transposeFifths, -}; -function combinator(fn) { - return (a, b) => { - const coordA = interval(a).coord; - const coordB = interval(b).coord; - if (coordA && coordB) { - const coord = fn(coordA, coordB); - return coordToInterval(coord).name; - } - }; -} - -const L2 = Math.log(2); -const L440 = Math.log(440); -/** - * Get the midi number from a frequency in hertz. The midi number can - * contain decimals (with two digits precission) - * - * @param {number} frequency - * @return {number} - * @example - * import { freqToMidi} from '@tonaljs/midi' - * freqToMidi(220)); //=> 57 - * freqToMidi(261.62)); //=> 60 - * freqToMidi(261)); //=> 59.96 - */ -function freqToMidi(freq) { - const v = (12 * (Math.log(freq) - L440)) / L2 + 69; - return Math.round(v * 100) / 100; -} -const SHARPS = "C C# D D# E F F# G G# A A# B".split(" "); -const FLATS = "C Db D Eb E F Gb G Ab A Bb B".split(" "); -/** - * Given a midi number, returns a note name. The altered notes will have - * flats unless explicitly set with the optional `useSharps` parameter. - * - * @function - * @param {number} midi - the midi note number - * @param {Object} options = default: `{ sharps: false, pitchClass: false }` - * @param {boolean} useSharps - (Optional) set to true to use sharps instead of flats - * @return {string} the note name - * @example - * import { midiToNoteName } from '@tonaljs/midi' - * midiToNoteName(61) // => "Db4" - * midiToNoteName(61, { pitchClass: true }) // => "Db" - * midiToNoteName(61, { sharps: true }) // => "C#4" - * midiToNoteName(61, { pitchClass: true, sharps: true }) // => "C#" - * // it rounds to nearest note - * midiToNoteName(61.7) // => "D4" - */ -function midiToNoteName(midi, options = {}) { - if (isNaN(midi) || midi === -Infinity || midi === Infinity) - return ""; - midi = Math.round(midi); - const pcs = options.sharps === true ? SHARPS : FLATS; - const pc = pcs[midi % 12]; - if (options.pitchClass) { - return pc; - } - const o = Math.floor(midi / 12) - 1; - return pc + o; -} - -const NAMES = ["C", "D", "E", "F", "G", "A", "B"]; -const toName = (n) => n.name; -const onlyNotes = (array) => array.map(note).filter((n) => !n.empty); -/** - * Return the natural note names without octave - * @function - * @example - * Note.names(); // => ["C", "D", "E", "F", "G", "A", "B"] - */ -function names$2(array) { - if (array === undefined) { - return NAMES.slice(); - } - else if (!Array.isArray(array)) { - return []; - } - else { - return onlyNotes(array).map(toName); - } -} -/** - * Get a note from a note name - * - * @function - * @example - * Note.get('Bb4') // => { name: "Bb4", midi: 70, chroma: 10, ... } - */ -const get$3 = note; -/** - * Get the note name - * @function - */ -const name$1 = (note) => get$3(note).name; -/** - * Get the note pitch class name - * @function - */ -const pitchClass = (note) => get$3(note).pc; -/** - * Get the note accidentals - * @function - */ -const accidentals = (note) => get$3(note).acc; -/** - * Get the note octave - * @function - */ -const octave = (note) => get$3(note).oct; -/** - * Get the note midi - * @function - */ -const midi = (note) => get$3(note).midi; -/** - * Get the note midi - * @function - */ -const freq = (note) => get$3(note).freq; -/** - * Get the note chroma - * @function - */ -const chroma = (note) => get$3(note).chroma; -/** - * Given a midi number, returns a note name. Uses flats for altered notes. - * - * @function - * @param {number} midi - the midi note number - * @return {string} the note name - * @example - * Note.fromMidi(61) // => "Db4" - * Note.fromMidi(61.7) // => "D4" - */ -function fromMidi(midi) { - return midiToNoteName(midi); -} -/** - * Given a midi number, returns a note name. Uses flats for altered notes. - */ -function fromFreq(freq) { - return midiToNoteName(freqToMidi(freq)); -} -/** - * Given a midi number, returns a note name. Uses flats for altered notes. - */ -function fromFreqSharps(freq) { - return midiToNoteName(freqToMidi(freq), { sharps: true }); -} -/** - * Given a midi number, returns a note name. Uses flats for altered notes. - * - * @function - * @param {number} midi - the midi note number - * @return {string} the note name - * @example - * Note.fromMidiSharps(61) // => "C#4" - */ -function fromMidiSharps(midi) { - return midiToNoteName(midi, { sharps: true }); -} -/** - * Transpose a note by an interval - */ -const transpose$1 = transpose; -const tr = transpose; -/** - * Transpose by an interval. - * @function - * @param {string} interval - * @return {function} a function that transposes by the given interval - * @example - * ["C", "D", "E"].map(Note.transposeBy("5P")); - * // => ["G", "A", "B"] - */ -const transposeBy = (interval) => (note) => transpose$1(note, interval); -const trBy = transposeBy; -/** - * Transpose from a note - * @function - * @param {string} note - * @return {function} a function that transposes the the note by an interval - * ["1P", "3M", "5P"].map(Note.transposeFrom("C")); - * // => ["C", "E", "G"] - */ -const transposeFrom = (note) => (interval) => transpose$1(note, interval); -const trFrom = transposeFrom; -/** - * Transpose a note by a number of perfect fifths. - * - * @function - * @param {string} note - the note name - * @param {number} fifhts - the number of fifths - * @return {string} the transposed note name - * - * @example - * import { transposeFifths } from "@tonaljs/note" - * transposeFifths("G4", 1) // => "D" - * [0, 1, 2, 3, 4].map(fifths => transposeFifths("C", fifths)) // => ["C", "G", "D", "A", "E"] - */ -function transposeFifths$1(noteName, fifths) { - const note = get$3(noteName); - if (note.empty) { - return ""; - } - const [nFifths, nOcts] = note.coord; - const transposed = nOcts === undefined - ? coordToNote([nFifths + fifths]) - : coordToNote([nFifths + fifths, nOcts]); - return transposed.name; -} -const trFifths = transposeFifths$1; -const ascending = (a, b) => a.height - b.height; -const descending = (a, b) => b.height - a.height; -function sortedNames(notes, comparator) { - comparator = comparator || ascending; - return onlyNotes(notes).sort(comparator).map(toName); -} -function sortedUniqNames(notes) { - return sortedNames(notes, ascending).filter((n, i, a) => i === 0 || n !== a[i - 1]); -} -/** - * Simplify a note - * - * @function - * @param {string} note - the note to be simplified - * - sameAccType: default true. Use same kind of accidentals that source - * @return {string} the simplified note or '' if not valid note - * @example - * simplify("C##") // => "D" - * simplify("C###") // => "D#" - * simplify("C###") - * simplify("B#4") // => "C5" - */ -const simplify$1 = (noteName) => { - const note = get$3(noteName); - if (note.empty) { - return ""; - } - return midiToNoteName(note.midi || note.chroma, { - sharps: note.alt > 0, - pitchClass: note.midi === null, - }); -}; -/** - * Get enharmonic of a note - * - * @function - * @param {string} note - * @param [string] - [optional] Destination pitch class - * @return {string} the enharmonic note name or '' if not valid note - * @example - * Note.enharmonic("Db") // => "C#" - * Note.enharmonic("C") // => "C" - * Note.enharmonic("F2","E#") // => "E#2" - */ -function enharmonic(noteName, destName) { - const src = get$3(noteName); - if (src.empty) { - return ""; - } - // destination: use given or generate one - const dest = get$3(destName || - midiToNoteName(src.midi || src.chroma, { - sharps: src.alt < 0, - pitchClass: true, - })); - // ensure destination is valid - if (dest.empty || dest.chroma !== src.chroma) { - return ""; - } - // if src has no octave, no need to calculate anything else - if (src.oct === undefined) { - return dest.pc; - } - // detect any octave overflow - const srcChroma = src.chroma - src.alt; - const destChroma = dest.chroma - dest.alt; - const destOctOffset = srcChroma > 11 || destChroma < 0 - ? -1 - : srcChroma < 0 || destChroma > 11 - ? +1 - : 0; - // calculate the new octave - const destOct = src.oct + destOctOffset; - return dest.pc + destOct; -} -var index$2 = { - names: names$2, - get: get$3, - name: name$1, - pitchClass, - accidentals, - octave, - midi, - ascending, - descending, - sortedNames, - sortedUniqNames, - fromMidi, - fromMidiSharps, - freq, - fromFreq, - fromFreqSharps, - chroma, - transpose: transpose$1, - tr, - transposeBy, - trBy, - transposeFrom, - trFrom, - transposeFifths: transposeFifths$1, - trFifths, - simplify: simplify$1, - enharmonic, -}; - -const Empty = Object.freeze([]); - -const MODES = [ - [0, 2773, 0, "ionian", "", "Maj7", "major"], - [1, 2902, 2, "dorian", "m", "m7"], - [2, 3418, 4, "phrygian", "m", "m7"], - [3, 2741, -1, "lydian", "", "Maj7"], - [4, 2774, 1, "mixolydian", "", "7"], - [5, 2906, 3, "aeolian", "m", "m7", "minor"], - [6, 3434, 5, "locrian", "dim", "m7b5"], -]; -const NoMode = { - ...EmptyPcset, - name: "", - alt: 0, - modeNum: NaN, - triad: "", - seventh: "", - aliases: [], -}; -const modes$1 = MODES.map(toMode); -const index$3 = {}; -modes$1.forEach((mode) => { - index$3[mode.name] = mode; - mode.aliases.forEach((alias) => { - index$3[alias] = mode; - }); -}); -/** - * Get a Mode by it's name - * - * @example - * get('dorian') - * // => - * // { - * // intervals: [ '1P', '2M', '3m', '4P', '5P', '6M', '7m' ], - * // modeNum: 1, - * // chroma: '101101010110', - * // normalized: '101101010110', - * // name: 'dorian', - * // setNum: 2902, - * // alt: 2, - * // triad: 'm', - * // seventh: 'm7', - * // aliases: [] - * // } - */ -function get$4(name) { - return typeof name === "string" - ? index$3[name.toLowerCase()] || NoMode - : name && name.name - ? get$4(name.name) - : NoMode; -} -function toMode(mode) { - const [modeNum, setNum, alt, name, triad, seventh, alias] = mode; - const aliases = alias ? [alias] : []; - const chroma = Number(setNum).toString(2); - const intervals = get$1(name).intervals; - return { - empty: false, - intervals, - modeNum, - chroma, - normalized: chroma, - name, - setNum, - alt, - triad, - seventh, - aliases, - }; -} -function chords(chords) { - return (modeName, tonic) => { - const mode = get$4(modeName); - if (mode.empty) - return []; - const triads = rotate(mode.modeNum, chords); - const tonics = mode.intervals.map((i) => transpose(tonic, i)); - return triads.map((triad, i) => tonics[i] + triad); - }; -} -const triads = chords(MODES.map((x) => x[4])); -const seventhChords = chords(MODES.map((x) => x[5])); - -/** - * References: - * - https://www.researchgate.net/publication/327567188_An_Algorithm_for_Spelling_the_Pitches_of_Any_Musical_Scale - * @module scale - */ -const NoScale = { - empty: true, - name: "", - type: "", - tonic: null, - setNum: NaN, - chroma: "", - normalized: "", - aliases: [], - notes: [], - intervals: [], -}; -/** - * Given a string with a scale name and (optionally) a tonic, split - * that components. - * - * It retuns an array with the form [ name, tonic ] where tonic can be a - * note name or null and name can be any arbitrary string - * (this function doesn"t check if that scale name exists) - * - * @function - * @param {string} name - the scale name - * @return {Array} an array [tonic, name] - * @example - * tokenize("C mixolydean") // => ["C", "mixolydean"] - * tokenize("anything is valid") // => ["", "anything is valid"] - * tokenize() // => ["", ""] - */ -function tokenize(name) { - if (typeof name !== "string") { - return ["", ""]; - } - const i = name.indexOf(" "); - const tonic = note(name.substring(0, i)); - if (tonic.empty) { - const n = note(name); - return n.empty ? ["", name] : [n.name, ""]; - } - const type = name.substring(tonic.name.length + 1); - return [tonic.name, type.length ? type : ""]; -} -/** - * Get all scale names - * @function - */ -const names$3 = names; -/** - * Get a Scale from a scale name. - */ -function get$5(src) { - const tokens = Array.isArray(src) ? src : tokenize(src); - const tonic = note(tokens[0]).name; - const st = get$1(tokens[1]); - if (st.empty) { - return NoScale; - } - const type = st.name; - const notes = tonic - ? st.intervals.map((i) => transpose(tonic, i)) - : []; - const name = tonic ? tonic + " " + type : type; - return { ...st, name, type, tonic, notes }; -} -const scale = deprecate("Scale.scale", "Scale.get", get$5); -/** - * Get all chords that fits a given scale - * - * @function - * @param {string} name - the scale name - * @return {Array} - the chord names - * - * @example - * scaleChords("pentatonic") // => ["5", "64", "M", "M6", "Madd9", "Msus2"] - */ -function scaleChords(name) { - const s = get$5(name); - const inScale = isSubsetOf(s.chroma); - return all() - .filter((chord) => inScale(chord.chroma)) - .map((chord) => chord.aliases[0]); -} -/** - * Get all scales names that are a superset of the given one - * (has the same notes and at least one more) - * - * @function - * @param {string} name - * @return {Array} a list of scale names - * @example - * extended("major") // => ["bebop", "bebop dominant", "bebop major", "chromatic", "ichikosucho"] - */ -function extended(name) { - const s = get$5(name); - const isSuperset = isSupersetOf(s.chroma); - return all$1() - .filter((scale) => isSuperset(scale.chroma)) - .map((scale) => scale.name); -} -/** - * Find all scales names that are a subset of the given one - * (has less notes but all from the given scale) - * - * @function - * @param {string} name - * @return {Array} a list of scale names - * - * @example - * reduced("major") // => ["ionian pentatonic", "major pentatonic", "ritusen"] - */ -function reduced(name) { - const isSubset = isSubsetOf(get$5(name).chroma); - return all$1() - .filter((scale) => isSubset(scale.chroma)) - .map((scale) => scale.name); -} -/** - * Given an array of notes, return the scale: a pitch class set starting from - * the first note of the array - * - * @function - * @param {string[]} notes - * @return {string[]} pitch classes with same tonic - * @example - * scaleNotes(['C4', 'c3', 'C5', 'C4', 'c4']) // => ["C"] - * scaleNotes(['D4', 'c#5', 'A5', 'F#6']) // => ["D", "F#", "A", "C#"] - */ -function scaleNotes(notes) { - const pcset = notes.map((n) => note(n).pc).filter((x) => x); - const tonic = pcset[0]; - const scale = sortedUniqNames(pcset); - return rotate(scale.indexOf(tonic), scale); -} -/** - * Find mode names of a scale - * - * @function - * @param {string} name - scale name - * @example - * modeNames("C pentatonic") // => [ - * ["C", "major pentatonic"], - * ["D", "egyptian"], - * ["E", "malkos raga"], - * ["G", "ritusen"], - * ["A", "minor pentatonic"] - * ] - */ -function modeNames(name) { - const s = get$5(name); - if (s.empty) { - return []; - } - const tonics = s.tonic ? s.notes : s.intervals; - return modes(s.chroma) - .map((chroma, i) => { - const modeName = get$5(chroma).name; - return modeName ? [tonics[i], modeName] : ["", ""]; - }) - .filter((x) => x[0]); -} -function getNoteNameOf(scale) { - const names = Array.isArray(scale) ? scaleNotes(scale) : get$5(scale).notes; - const chromas = names.map((name) => note(name).chroma); - return (noteOrMidi) => { - const currNote = typeof noteOrMidi === "number" - ? note(fromMidi(noteOrMidi)) - : note(noteOrMidi); - const height = currNote.height; - if (height === undefined) - return undefined; - const chroma = height % 12; - const position = chromas.indexOf(chroma); - if (position === -1) - return undefined; - return enharmonic(currNote.name, names[position]); - }; -} -function rangeOf(scale) { - const getName = getNoteNameOf(scale); - return (fromNote, toNote) => { - const from = note(fromNote).height; - const to = note(toNote).height; - if (from === undefined || to === undefined) - return []; - return range(from, to) - .map(getName) - .filter((x) => x); - }; -} -var index$4 = { - get: get$5, - names: names$3, - extended, - modeNames, - reduced, - scaleChords, - scaleNotes, - tokenize, - rangeOf, - // deprecated - scale, -}; - -export { index$1 as Interval, index$2 as Note, index$4 as Scale }; +export { b as Interval, a as Note, i as Scale } from '../common/index.es-d2606df1.js'; diff --git a/docs/_snowpack/pkg/chord-voicings.js b/docs/_snowpack/pkg/chord-voicings.js new file mode 100644 index 00000000..243bf711 --- /dev/null +++ b/docs/_snowpack/pkg/chord-voicings.js @@ -0,0 +1,828 @@ +import { c as createCommonjsModule, a as commonjsGlobal, g as getDefaultExportFromCjs } from './common/_commonjsHelpers-8c19dec8.js'; +import { n as note, t as transpose$2, d as distance$1, m as modes, c as all, e as tokenizeNote, g as get$2, f as deprecate, h as isSupersetOf, j as all$1, k as isSubsetOf, l as get$3, o as interval, p as compact$1, q as toMidi, r as range$1, s as midiToNoteName, C as Core, u as index$5, v as index$1$1, w as index$1$2, x as index$6, y as index$7, b as index$8, z as index$9, A as index$a, B as index$1$3, a as index$b, D as index$c, i as index$d, E as accToAlt, F as altToAcc, G as coordToInterval, H as coordToNote, I as decode, J as encode, K as fillStr$1, L as isNamed, M as isPitch, N as stepToLetter, O as tokenizeInterval } from './common/index.es-d2606df1.js'; + +const fillStr = (character, times) => Array(times + 1).join(character); +const REGEX = /^(_{1,}|=|\^{1,}|)([abcdefgABCDEFG])([,']*)$/; +function tokenize(str) { + const m = REGEX.exec(str); + if (!m) { + return ["", "", ""]; + } + return [m[1], m[2], m[3]]; +} +/** + * Convert a (string) note in ABC notation into a (string) note in scientific notation + * + * @example + * abcToScientificNotation("c") // => "C5" + */ +function abcToScientificNotation(str) { + const [acc, letter, oct] = tokenize(str); + if (letter === "") { + return ""; + } + let o = 4; + for (let i = 0; i < oct.length; i++) { + o += oct.charAt(i) === "," ? -1 : 1; + } + const a = acc[0] === "_" + ? acc.replace(/_/g, "b") + : acc[0] === "^" + ? acc.replace(/\^/g, "#") + : ""; + return letter.charCodeAt(0) > 96 + ? letter.toUpperCase() + a + (o + 1) + : letter + a + o; +} +/** + * Convert a (string) note in scientific notation into a (string) note in ABC notation + * + * @example + * scientificToAbcNotation("C#4") // => "^C" + */ +function scientificToAbcNotation(str) { + const n = note(str); + if (n.empty || (!n.oct && n.oct !== 0)) { + return ""; + } + const { letter, acc, oct } = n; + const a = acc[0] === "b" ? acc.replace(/b/g, "_") : acc.replace(/#/g, "^"); + const l = oct > 4 ? letter.toLowerCase() : letter; + const o = oct === 5 ? "" : oct > 4 ? fillStr("'", oct - 5) : fillStr(",", 4 - oct); + return a + l + o; +} +function transpose(note, interval) { + return scientificToAbcNotation(transpose$2(abcToScientificNotation(note), interval)); +} +function distance(from, to) { + return distance$1(abcToScientificNotation(from), abcToScientificNotation(to)); +} +var index = { + abcToScientificNotation, + scientificToAbcNotation, + tokenize, + transpose, + distance, +}; + +// ascending range +function ascR(b, n) { + const a = []; + // tslint:disable-next-line:curly + for (; n--; a[n] = n + b) + ; + return a; +} +// descending range +function descR(b, n) { + const a = []; + // tslint:disable-next-line:curly + for (; n--; a[n] = b - n) + ; + return a; +} +/** + * Creates a numeric range + * + * @param {number} from + * @param {number} to + * @return {Array} + * + * @example + * range(-2, 2) // => [-2, -1, 0, 1, 2] + * range(2, -2) // => [2, 1, 0, -1, -2] + */ +function range(from, to) { + return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1); +} +/** + * Rotates a list a number of times. It"s completly agnostic about the + * contents of the list. + * + * @param {Integer} times - the number of rotations + * @param {Array} array + * @return {Array} the rotated array + * + * @example + * rotate(1, [1, 2, 3]) // => [2, 3, 1] + */ +function rotate(times, arr) { + const len = arr.length; + const n = ((times % len) + len) % len; + return arr.slice(n, len).concat(arr.slice(0, n)); +} +/** + * Return a copy of the array with the null values removed + * @function + * @param {Array} array + * @return {Array} + * + * @example + * compact(["a", "b", null, "c"]) // => ["a", "b", "c"] + */ +function compact(arr) { + return arr.filter((n) => n === 0 || n); +} +/** + * Sort an array of notes in ascending order. Pitch classes are listed + * before notes. Any string that is not a note is removed. + * + * @param {string[]} notes + * @return {string[]} sorted array of notes + * + * @example + * sortedNoteNames(['c2', 'c5', 'c1', 'c0', 'c6', 'c']) + * // => ['C', 'C0', 'C1', 'C2', 'C5', 'C6'] + * sortedNoteNames(['c', 'F', 'G', 'a', 'b', 'h', 'J']) + * // => ['C', 'F', 'G', 'A', 'B'] + */ +function sortedNoteNames(notes) { + const valid = notes.map((n) => note(n)).filter((n) => !n.empty); + return valid.sort((a, b) => a.height - b.height).map((n) => n.name); +} +/** + * Get sorted notes with duplicates removed. Pitch classes are listed + * before notes. + * + * @function + * @param {string[]} array + * @return {string[]} unique sorted notes + * + * @example + * Array.sortedUniqNoteNames(['a', 'b', 'c2', '1p', 'p2', 'c2', 'b', 'c', 'c3' ]) + * // => [ 'C', 'A', 'B', 'C2', 'C3' ] + */ +function sortedUniqNoteNames(arr) { + return sortedNoteNames(arr).filter((n, i, a) => i === 0 || n !== a[i - 1]); +} +/** + * Randomizes the order of the specified array in-place, using the Fisher–Yates shuffle. + * + * @function + * @param {Array} array + * @return {Array} the array shuffled + * + * @example + * shuffle(["C", "D", "E", "F"]) // => [...] + */ +function shuffle(arr, rnd = Math.random) { + let i; + let t; + let m = arr.length; + while (m) { + i = Math.floor(rnd() * m--); + t = arr[m]; + arr[m] = arr[i]; + arr[i] = t; + } + return arr; +} +/** + * Get all permutations of an array + * + * @param {Array} array - the array + * @return {Array} an array with all the permutations + * @example + * permutations(["a", "b", "c"])) // => + * [ + * ["a", "b", "c"], + * ["b", "a", "c"], + * ["b", "c", "a"], + * ["a", "c", "b"], + * ["c", "a", "b"], + * ["c", "b", "a"] + * ] + */ +function permutations(arr) { + if (arr.length === 0) { + return [[]]; + } + return permutations(arr.slice(1)).reduce((acc, perm) => { + return acc.concat(arr.map((e, pos) => { + const newPerm = perm.slice(); + newPerm.splice(pos, 0, arr[0]); + return newPerm; + })); + }, []); +} + +var index_es = /*#__PURE__*/Object.freeze({ + __proto__: null, + compact: compact, + permutations: permutations, + range: range, + rotate: rotate, + shuffle: shuffle, + sortedNoteNames: sortedNoteNames, + sortedUniqNoteNames: sortedUniqNoteNames +}); + +const namedSet = (notes) => { + const pcToName = notes.reduce((record, n) => { + const chroma = note(n).chroma; + if (chroma !== undefined) { + record[chroma] = record[chroma] || note(n).name; + } + return record; + }, {}); + return (chroma) => pcToName[chroma]; +}; +function detect(source) { + const notes = source.map((n) => note(n).pc).filter((x) => x); + if (note.length === 0) { + return []; + } + const found = findExactMatches(notes, 1); + return found + .filter((chord) => chord.weight) + .sort((a, b) => b.weight - a.weight) + .map((chord) => chord.name); +} +function findExactMatches(notes, weight) { + const tonic = notes[0]; + const tonicChroma = note(tonic).chroma; + const noteName = namedSet(notes); + // we need to test all chormas to get the correct baseNote + const allModes = modes(notes, false); + const found = []; + allModes.forEach((mode, index) => { + // some chords could have the same chroma but different interval spelling + const chordTypes = all().filter((chordType) => chordType.chroma === mode); + chordTypes.forEach((chordType) => { + const chordName = chordType.aliases[0]; + const baseNote = noteName(index); + const isInversion = index !== tonicChroma; + if (isInversion) { + found.push({ + weight: 0.5 * weight, + name: `${baseNote}${chordName}/${tonic}`, + }); + } + else { + found.push({ weight: 1 * weight, name: `${baseNote}${chordName}` }); + } + }); + }); + return found; +} + +const NoChord = { + empty: true, + name: "", + symbol: "", + root: "", + rootDegree: 0, + type: "", + tonic: null, + setNum: NaN, + quality: "Unknown", + chroma: "", + normalized: "", + aliases: [], + notes: [], + intervals: [], +}; +// 6, 64, 7, 9, 11 and 13 are consider part of the chord +// (see https://github.com/danigb/tonal/issues/55) +const NUM_TYPES = /^(6|64|7|9|11|13)$/; +/** + * Tokenize a chord name. It returns an array with the tonic and chord type + * If not tonic is found, all the name is considered the chord name. + * + * This function does NOT check if the chord type exists or not. It only tries + * to split the tonic and chord type. + * + * @function + * @param {string} name - the chord name + * @return {Array} an array with [tonic, type] + * @example + * tokenize("Cmaj7") // => [ "C", "maj7" ] + * tokenize("C7") // => [ "C", "7" ] + * tokenize("mMaj7") // => [ null, "mMaj7" ] + * tokenize("Cnonsense") // => [ null, "nonsense" ] + */ +function tokenize$1(name) { + const [letter, acc, oct, type] = tokenizeNote(name); + if (letter === "") { + return ["", name]; + } + // aug is augmented (see https://github.com/danigb/tonal/issues/55) + if (letter === "A" && type === "ug") { + return ["", "aug"]; + } + // see: https://github.com/tonaljs/tonal/issues/70 + if (!type && (oct === "4" || oct === "5")) { + return [letter + acc, oct]; + } + if (NUM_TYPES.test(oct)) { + return [letter + acc, oct + type]; + } + else { + return [letter + acc + oct, type]; + } +} +/** + * Get a Chord from a chord name. + */ +function get(src) { + if (src === "") { + return NoChord; + } + if (Array.isArray(src) && src.length === 2) { + return getChord(src[1], src[0]); + } + else { + const [tonic, type] = tokenize$1(src); + const chord = getChord(type, tonic); + return chord.empty ? getChord(src) : chord; + } +} +/** + * Get chord properties + * + * @param typeName - the chord type name + * @param [tonic] - Optional tonic + * @param [root] - Optional root (requires a tonic) + */ +function getChord(typeName, optionalTonic, optionalRoot) { + const type = get$2(typeName); + const tonic = note(optionalTonic || ""); + const root = note(optionalRoot || ""); + if (type.empty || + (optionalTonic && tonic.empty) || + (optionalRoot && root.empty)) { + return NoChord; + } + const rootInterval = distance$1(tonic.pc, root.pc); + const rootDegree = type.intervals.indexOf(rootInterval) + 1; + if (!root.empty && !rootDegree) { + return NoChord; + } + const intervals = Array.from(type.intervals); + for (let i = 1; i < rootDegree; i++) { + const num = intervals[0][0]; + const quality = intervals[0][1]; + const newNum = parseInt(num, 10) + 7; + intervals.push(`${newNum}${quality}`); + intervals.shift(); + } + const notes = tonic.empty + ? [] + : intervals.map((i) => transpose$2(tonic, i)); + typeName = type.aliases.indexOf(typeName) !== -1 ? typeName : type.aliases[0]; + const symbol = `${tonic.empty ? "" : tonic.pc}${typeName}${root.empty || rootDegree <= 1 ? "" : "/" + root.pc}`; + const name = `${optionalTonic ? tonic.pc + " " : ""}${type.name}${rootDegree > 1 && optionalRoot ? " over " + root.pc : ""}`; + return { + ...type, + name, + symbol, + type: type.name, + root: root.name, + intervals, + rootDegree, + tonic: tonic.name, + notes, + }; +} +const chord = deprecate("Chord.chord", "Chord.get", get); +/** + * Transpose a chord name + * + * @param {string} chordName - the chord name + * @return {string} the transposed chord + * + * @example + * transpose('Dm7', 'P4') // => 'Gm7 + */ +function transpose$1(chordName, interval) { + const [tonic, type] = tokenize$1(chordName); + if (!tonic) { + return chordName; + } + return transpose$2(tonic, interval) + type; +} +/** + * Get all scales where the given chord fits + * + * @example + * chordScales('C7b9') + * // => ["phrygian dominant", "flamenco", "spanish heptatonic", "half-whole diminished", "chromatic"] + */ +function chordScales(name) { + const s = get(name); + const isChordIncluded = isSupersetOf(s.chroma); + return all$1() + .filter((scale) => isChordIncluded(scale.chroma)) + .map((scale) => scale.name); +} +/** + * Get all chords names that are a superset of the given one + * (has the same notes and at least one more) + * + * @function + * @example + * extended("CMaj7") + * // => [ 'Cmaj#4', 'Cmaj7#9#11', 'Cmaj9', 'CM7add13', 'Cmaj13', 'Cmaj9#11', 'CM13#11', 'CM7b9' ] + */ +function extended(chordName) { + const s = get(chordName); + const isSuperset = isSupersetOf(s.chroma); + return all() + .filter((chord) => isSuperset(chord.chroma)) + .map((chord) => s.tonic + chord.aliases[0]); +} +/** + * Find all chords names that are a subset of the given one + * (has less notes but all from the given chord) + * + * @example + */ +function reduced(chordName) { + const s = get(chordName); + const isSubset = isSubsetOf(s.chroma); + return all() + .filter((chord) => isSubset(chord.chroma)) + .map((chord) => s.tonic + chord.aliases[0]); +} +var index$1 = { + getChord, + get, + detect, + chordScales, + extended, + reduced, + tokenize: tokenize$1, + transpose: transpose$1, + // deprecate + chord, +}; + +/** + * Given a tonic and a chord list expressed with roman numeral notation + * returns the progression expressed with leadsheet chords symbols notation + * @example + * fromRomanNumerals("C", ["I", "IIm7", "V7"]); + * // => ["C", "Dm7", "G7"] + */ +function fromRomanNumerals(tonic, chords) { + const romanNumerals = chords.map(get$3); + return romanNumerals.map((rn) => transpose$2(tonic, interval(rn)) + rn.chordType); +} +/** + * Given a tonic and a chord list with leadsheet symbols notation, + * return the chord list with roman numeral notation + * @example + * toRomanNumerals("C", ["CMaj7", "Dm7", "G7"]); + * // => ["IMaj7", "IIm7", "V7"] + */ +function toRomanNumerals(tonic, chords) { + return chords.map((chord) => { + const [note, chordType] = tokenize$1(chord); + const intervalName = distance$1(tonic, note); + const roman = get$3(interval(intervalName)); + return roman.name + chordType; + }); +} +var index$2 = { fromRomanNumerals, toRomanNumerals }; + +/** + * Create a numeric range. You supply a list of notes or numbers and it will + * be connected to create complex ranges. + * + * @param {Array} notes - the list of notes or midi numbers used + * @return {Array} an array of numbers or empty array if not valid parameters + * + * @example + * numeric(["C5", "C4"]) // => [ 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60 ] + * // it works midi notes + * numeric([10, 5]) // => [ 10, 9, 8, 7, 6, 5 ] + * // complex range + * numeric(["C4", "E4", "Bb3"]) // => [60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58] + */ +function numeric(notes) { + const midi = compact$1(notes.map(toMidi)); + if (!notes.length || midi.length !== notes.length) { + // there is no valid notes + return []; + } + return midi.reduce((result, note) => { + const last = result[result.length - 1]; + return result.concat(range$1(last, note).slice(1)); + }, [midi[0]]); +} +/** + * Create a range of chromatic notes. The altered notes will use flats. + * + * @function + * @param {Array} notes - the list of notes or midi note numbers to create a range from + * @param {Object} options - The same as `midiToNoteName` (`{ sharps: boolean, pitchClass: boolean }`) + * @return {Array} an array of note names + * + * @example + * Range.chromatic(["C2, "E2", "D2"]) // => ["C2", "Db2", "D2", "Eb2", "E2", "Eb2", "D2"] + * // with sharps + * Range.chromatic(["C2", "C3"], { sharps: true }) // => [ "C2", "C#2", "D2", "D#2", "E2", "F2", "F#2", "G2", "G#2", "A2", "A#2", "B2", "C3" ] + */ +function chromatic(notes, options) { + return numeric(notes).map((midi) => midiToNoteName(midi, options)); +} +var index$3 = { numeric, chromatic }; + +// CONSTANTS +const NONE = { + empty: true, + name: "", + upper: undefined, + lower: undefined, + type: undefined, + additive: [], +}; +const NAMES = ["4/4", "3/4", "2/4", "2/2", "12/8", "9/8", "6/8", "3/8"]; +// PUBLIC API +function names() { + return NAMES.slice(); +} +const REGEX$1 = /^(\d?\d(?:\+\d)*)\/(\d)$/; +const CACHE = new Map(); +function get$1(literal) { + const cached = CACHE.get(literal); + if (cached) { + return cached; + } + const ts = build(parse(literal)); + CACHE.set(literal, ts); + return ts; +} +function parse(literal) { + if (typeof literal === "string") { + const [_, up, low] = REGEX$1.exec(literal) || []; + return parse([up, low]); + } + const [up, down] = literal; + const denominator = +down; + if (typeof up === "number") { + return [up, denominator]; + } + const list = up.split("+").map((n) => +n); + return list.length === 1 ? [list[0], denominator] : [list, denominator]; +} +var index$4 = { names, parse, get: get$1 }; +// PRIVATE +function build([up, down]) { + const upper = Array.isArray(up) ? up.reduce((a, b) => a + b, 0) : up; + const lower = down; + if (upper === 0 || lower === 0) { + return NONE; + } + const name = Array.isArray(up) ? `${up.join("+")}/${down}` : `${up}/${down}`; + const additive = Array.isArray(up) ? up : []; + const type = lower === 4 || lower === 2 + ? "simple" + : lower === 8 && upper % 3 === 0 + ? "compound" + : "irregular"; + return { + empty: false, + name, + type, + upper, + lower, + additive, + }; +} + +// deprecated (backwards compatibility) +const Tonal = Core; +const PcSet = index$5; +const ChordDictionary = index$1$1; +const ScaleDictionary = index$1$2; + +var index_es$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Array: index_es, + Core: Core, + ChordDictionary: ChordDictionary, + PcSet: PcSet, + ScaleDictionary: ScaleDictionary, + Tonal: Tonal, + AbcNotation: index, + Chord: index$1, + ChordType: index$1$1, + Collection: index$6, + DurationValue: index$7, + Interval: index$8, + Key: index$9, + Midi: index$a, + Mode: index$1$3, + Note: index$b, + Pcset: index$5, + Progression: index$2, + Range: index$3, + RomanNumeral: index$c, + Scale: index$d, + ScaleType: index$1$2, + TimeSignature: index$4, + accToAlt: accToAlt, + altToAcc: altToAcc, + coordToInterval: coordToInterval, + coordToNote: coordToNote, + decode: decode, + deprecate: deprecate, + distance: distance$1, + encode: encode, + fillStr: fillStr$1, + interval: interval, + isNamed: isNamed, + isPitch: isPitch, + note: note, + stepToLetter: stepToLetter, + tokenizeInterval: tokenizeInterval, + tokenizeNote: tokenizeNote, + transpose: transpose$2 +}); + +var getBestVoicing_1 = createCommonjsModule(function (module, exports) { +exports.__esModule = true; +exports.getBestVoicing = void 0; +function getBestVoicing(voicingOptions) { + var chord = voicingOptions.chord, range = voicingOptions.range, finder = voicingOptions.finder, picker = voicingOptions.picker, lastVoicing = voicingOptions.lastVoicing; + var voicings = finder(chord, range); + if (!voicings.length) { + return []; + } + return picker(voicings, lastVoicing); +} +exports.getBestVoicing = getBestVoicing; + +}); + +var tokenizeChord_1 = createCommonjsModule(function (module, exports) { +exports.__esModule = true; +exports.tokenizeChord = void 0; +function tokenizeChord(chord) { + var match = (chord || '').match(/^([A-G][b#]*)([^\/]*)[\/]?([A-G][b#]*)?$/); + if (!match) { + // console.warn('could not tokenize chord', chord); + return []; + } + return match.slice(1); +} +exports.tokenizeChord = tokenizeChord; + +}); + +var voicingsInRange_1 = createCommonjsModule(function (module, exports) { +exports.__esModule = true; +exports.voicingsInRange = void 0; + + + +function voicingsInRange(chord, dictionary, range) { + if (dictionary === void 0) { dictionary = dictionaryVoicing_1.lefthand; } + if (range === void 0) { range = ['D3', 'A4']; } + var _a = (0, tokenizeChord_1.tokenizeChord)(chord), tonic = _a[0], symbol = _a[1]; + if (!dictionary[symbol]) { + return []; + } + // resolve array of interval arrays for the wanted symbol + var voicings = dictionary[symbol].map(function (intervals) { return intervals.split(' '); }); + var notesInRange = index_es$1.Range.chromatic(range); // gives array of notes inside range + return voicings.reduce(function (voiced, voicing) { + // transpose intervals relative to first interval (e.g. 3m 5P > 1P 3M) + var relativeIntervals = voicing.map(function (interval) { return index_es$1.Interval.substract(interval, voicing[0]); }); + // get enharmonic correct pitch class the bottom note + var bottomPitchClass = index_es$1.Note.transpose(tonic, voicing[0]); + // get all possible start notes for voicing + var starts = notesInRange + // only get the start notes: + .filter(function (note) { return index_es$1.Note.chroma(note) === index_es$1.Note.chroma(bottomPitchClass); }) + // filter out start notes that will overshoot the top end of the range + .filter(function (note) { + return index_es$1.Note.midi(index_es$1.Note.transpose(note, relativeIntervals[relativeIntervals.length - 1])) <= index_es$1.Note.midi(range[1]); + }) + // replace Range.chromatic notes with the correct enharmonic equivalents + .map(function (note) { return index_es$1.Note.enharmonic(note, bottomPitchClass); }); + // render one voicing for each start note + var notes = starts.map(function (start) { return relativeIntervals.map(function (interval) { return index_es$1.Note.transpose(start, interval); }); }); + return voiced.concat(notes); + }, []); +} +exports.voicingsInRange = voicingsInRange; + +}); + +var dictionaryVoicing_1 = createCommonjsModule(function (module, exports) { +var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (commonjsGlobal && commonjsGlobal.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +exports.__esModule = true; +exports.dictionaryVoicing = exports.dictionaryVoicingFinder = exports.triads = exports.guidetones = exports.lefthand = void 0; + + +exports.lefthand = { + m7: ['3m 5P 7m 9M', '7m 9M 10m 12P'], + '7': ['3M 6M 7m 9M', '7m 9M 10M 13M'], + '^7': ['3M 5P 7M 9M', '7M 9M 10M 12P'], + '69': ['3M 5P 6A 9M'], + m7b5: ['3m 5d 7m 8P', '7m 8P 10m 12d'], + '7b9': ['3M 6m 7m 9m', '7m 9m 10M 13m'], + '7b13': ['3M 6m 7m 9m', '7m 9m 10M 13m'], + o7: ['1P 3m 5d 6M', '5d 6M 8P 10m'], + '7#11': ['7m 9M 11A 13A'], + '7#9': ['3M 7m 9A'], + mM7: ['3m 5P 7M 9M', '7M 9M 10m 12P'], + m6: ['3m 5P 6M 9M', '6M 9M 10m 12P'] +}; +exports.guidetones = { + m7: ['3m 7m', '7m 10m'], + m9: ['3m 7m', '7m 10m'], + '7': ['3M 7m', '7m 10M'], + '^7': ['3M 7M', '7M 10M'], + '^9': ['3M 7M', '7M 10M'], + '69': ['3M 6M'], + '6': ['3M 6M', '6M 10M'], + m7b5: ['3m 7m', '7m 10m'], + '7b9': ['3M 7m', '7m 10M'], + '7b13': ['3M 7m', '7m 10M'], + o7: ['3m 6M', '6M 10m'], + '7#11': ['3M 7m', '7m 10M'], + '7#9': ['3M 7m', '7m 10M'], + mM7: ['3m 7M', '7M 10m'], + m6: ['3m 6M', '6M 10m'] +}; +exports.triads = { + M: ['1P 3M 5P', '3M 5P 8P', '5P 8P 10M'], + m: ['1P 3m 5P', '3m 5P 8P', '5P 8P 10m'], + o: ['1P 3m 5d', '3m 5d 8P', '5d 8P 10m'], + aug: ['1P 3m 5A', '3m 5A 8P', '5A 8P 10m'] +}; +var dictionaryVoicingFinder = function (dictionary) { return function (chordSymbol, range) { + return (0, voicingsInRange_1.voicingsInRange)(chordSymbol, dictionary, range); +}; }; +exports.dictionaryVoicingFinder = dictionaryVoicingFinder; +var dictionaryVoicing = function (props) { + var dictionary = props.dictionary, range = props.range, rest = __rest(props, ["dictionary", "range"]); + return (0, getBestVoicing_1.getBestVoicing)(__assign(__assign({}, rest), { range: range, finder: (0, exports.dictionaryVoicingFinder)(dictionary) })); +}; +exports.dictionaryVoicing = dictionaryVoicing; + +}); + +var minTopNoteDiff_1 = createCommonjsModule(function (module, exports) { +exports.__esModule = true; +exports.minTopNoteDiff = void 0; + +function minTopNoteDiff(voicings, lastVoicing) { + if (!lastVoicing) { + return voicings[0]; + } + var diff = function (voicing) { + return Math.abs(index_es$1.Note.midi(lastVoicing[lastVoicing.length - 1]) - index_es$1.Note.midi(voicing[voicing.length - 1])); + }; + return voicings.reduce(function (best, current) { return (diff(current) < diff(best) ? current : best); }, voicings[0]); +} +exports.minTopNoteDiff = minTopNoteDiff; + +}); + +var dist = createCommonjsModule(function (module, exports) { +exports.__esModule = true; + + + + +exports["default"] = { + tokenizeChord: tokenizeChord_1.tokenizeChord, + getBestVoicing: getBestVoicing_1.getBestVoicing, + dictionaryVoicing: dictionaryVoicing_1.dictionaryVoicing, + dictionaryVoicingFinder: dictionaryVoicing_1.dictionaryVoicingFinder, + lefthand: dictionaryVoicing_1.lefthand, + guidetones: dictionaryVoicing_1.guidetones, + triads: dictionaryVoicing_1.triads, + minTopNoteDiff: minTopNoteDiff_1.minTopNoteDiff +}; + +}); + +var __pika_web_default_export_for_treeshaking__ = /*@__PURE__*/getDefaultExportFromCjs(dist); + +export default __pika_web_default_export_for_treeshaking__; diff --git a/docs/_snowpack/pkg/common/index.es-d2606df1.js b/docs/_snowpack/pkg/common/index.es-d2606df1.js new file mode 100644 index 00000000..f2ed81ea --- /dev/null +++ b/docs/_snowpack/pkg/common/index.es-d2606df1.js @@ -0,0 +1,2364 @@ +/** + * Fill a string with a repeated character + * + * @param character + * @param repetition + */ +const fillStr = (s, n) => Array(Math.abs(n) + 1).join(s); +function deprecate(original, alternative, fn) { + return function (...args) { + // tslint:disable-next-line + console.warn(`${original} is deprecated. Use ${alternative}.`); + return fn.apply(this, args); + }; +} + +function isNamed(src) { + return src !== null && typeof src === "object" && typeof src.name === "string" + ? true + : false; +} + +function isPitch(pitch) { + return pitch !== null && + typeof pitch === "object" && + typeof pitch.step === "number" && + typeof pitch.alt === "number" + ? true + : false; +} +// The number of fifths of [C, D, E, F, G, A, B] +const FIFTHS = [0, 2, 4, -1, 1, 3, 5]; +// The number of octaves it span each step +const STEPS_TO_OCTS = FIFTHS.map((fifths) => Math.floor((fifths * 7) / 12)); +function encode(pitch) { + const { step, alt, oct, dir = 1 } = pitch; + const f = FIFTHS[step] + 7 * alt; + if (oct === undefined) { + return [dir * f]; + } + const o = oct - STEPS_TO_OCTS[step] - 4 * alt; + return [dir * f, dir * o]; +} +// We need to get the steps from fifths +// Fifths for CDEFGAB are [ 0, 2, 4, -1, 1, 3, 5 ] +// We add 1 to fifths to avoid negative numbers, so: +// for ["F", "C", "G", "D", "A", "E", "B"] we have: +const FIFTHS_TO_STEPS = [3, 0, 4, 1, 5, 2, 6]; +function decode(coord) { + const [f, o, dir] = coord; + const step = FIFTHS_TO_STEPS[unaltered(f)]; + const alt = Math.floor((f + 1) / 7); + if (o === undefined) { + return { step, alt, dir }; + } + const oct = o + 4 * alt + STEPS_TO_OCTS[step]; + return { step, alt, oct, dir }; +} +// Return the number of fifths as if it were unaltered +function unaltered(f) { + const i = (f + 1) % 7; + return i < 0 ? 7 + i : i; +} + +const NoNote = { empty: true, name: "", pc: "", acc: "" }; +const cache$1 = new Map(); +const stepToLetter = (step) => "CDEFGAB".charAt(step); +const altToAcc = (alt) => alt < 0 ? fillStr("b", -alt) : fillStr("#", alt); +const accToAlt = (acc) => acc[0] === "b" ? -acc.length : acc.length; +/** + * Given a note literal (a note name or a note object), returns the Note object + * @example + * note('Bb4') // => { name: "Bb4", midi: 70, chroma: 10, ... } + */ +function note(src) { + const cached = cache$1.get(src); + if (cached) { + return cached; + } + const value = typeof src === "string" + ? parse$1(src) + : isPitch(src) + ? note(pitchName$1(src)) + : isNamed(src) + ? note(src.name) + : NoNote; + cache$1.set(src, value); + return value; +} +const REGEX$1 = /^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/; +/** + * @private + */ +function tokenizeNote(str) { + const m = REGEX$1.exec(str); + return [m[1].toUpperCase(), m[2].replace(/x/g, "##"), m[3], m[4]]; +} +/** + * @private + */ +function coordToNote(noteCoord) { + return note(decode(noteCoord)); +} +const mod = (n, m) => ((n % m) + m) % m; +const SEMI = [0, 2, 4, 5, 7, 9, 11]; +function parse$1(noteName) { + const tokens = tokenizeNote(noteName); + if (tokens[0] === "" || tokens[3] !== "") { + return NoNote; + } + const letter = tokens[0]; + const acc = tokens[1]; + const octStr = tokens[2]; + const step = (letter.charCodeAt(0) + 3) % 7; + const alt = accToAlt(acc); + const oct = octStr.length ? +octStr : undefined; + const coord = encode({ step, alt, oct }); + const name = letter + acc + octStr; + const pc = letter + acc; + const chroma = (SEMI[step] + alt + 120) % 12; + const height = oct === undefined + ? mod(SEMI[step] + alt, 12) - 12 * 99 + : SEMI[step] + alt + 12 * (oct + 1); + const midi = height >= 0 && height <= 127 ? height : null; + const freq = oct === undefined ? null : Math.pow(2, (height - 69) / 12) * 440; + return { + empty: false, + acc, + alt, + chroma, + coord, + freq, + height, + letter, + midi, + name, + oct, + pc, + step, + }; +} +function pitchName$1(props) { + const { step, alt, oct } = props; + const letter = stepToLetter(step); + if (!letter) { + return ""; + } + const pc = letter + altToAcc(alt); + return oct || oct === 0 ? pc + oct : pc; +} + +const NoInterval = { empty: true, name: "", acc: "" }; +// shorthand tonal notation (with quality after number) +const INTERVAL_TONAL_REGEX = "([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})"; +// standard shorthand notation (with quality before number) +const INTERVAL_SHORTHAND_REGEX = "(AA|A|P|M|m|d|dd)([-+]?\\d+)"; +const REGEX = new RegExp("^" + INTERVAL_TONAL_REGEX + "|" + INTERVAL_SHORTHAND_REGEX + "$"); +/** + * @private + */ +function tokenizeInterval(str) { + const m = REGEX.exec(`${str}`); + if (m === null) { + return ["", ""]; + } + return m[1] ? [m[1], m[2]] : [m[4], m[3]]; +} +const cache = {}; +/** + * Get interval properties. It returns an object with: + * + * - name: the interval name + * - num: the interval number + * - type: 'perfectable' or 'majorable' + * - q: the interval quality (d, m, M, A) + * - dir: interval direction (1 ascending, -1 descending) + * - simple: the simplified number + * - semitones: the size in semitones + * - chroma: the interval chroma + * + * @param {string} interval - the interval name + * @return {Object} the interval properties + * + * @example + * import { interval } from '@tonaljs/core' + * interval('P5').semitones // => 7 + * interval('m3').type // => 'majorable' + */ +function interval(src) { + return typeof src === "string" + ? cache[src] || (cache[src] = parse(src)) + : isPitch(src) + ? interval(pitchName(src)) + : isNamed(src) + ? interval(src.name) + : NoInterval; +} +const SIZES = [0, 2, 4, 5, 7, 9, 11]; +const TYPES = "PMMPPMM"; +function parse(str) { + const tokens = tokenizeInterval(str); + if (tokens[0] === "") { + return NoInterval; + } + const num = +tokens[0]; + const q = tokens[1]; + const step = (Math.abs(num) - 1) % 7; + const t = TYPES[step]; + if (t === "M" && q === "P") { + return NoInterval; + } + const type = t === "M" ? "majorable" : "perfectable"; + const name = "" + num + q; + const dir = num < 0 ? -1 : 1; + const simple = num === 8 || num === -8 ? num : dir * (step + 1); + const alt = qToAlt(type, q); + const oct = Math.floor((Math.abs(num) - 1) / 7); + const semitones = dir * (SIZES[step] + alt + 12 * oct); + const chroma = (((dir * (SIZES[step] + alt)) % 12) + 12) % 12; + const coord = encode({ step, alt, oct, dir }); + return { + empty: false, + name, + num, + q, + step, + alt, + dir, + type, + simple, + semitones, + chroma, + coord, + oct, + }; +} +/** + * @private + * + * forceDescending is used in the case of unison (#243) + */ +function coordToInterval(coord, forceDescending) { + const [f, o = 0] = coord; + const isDescending = f * 7 + o * 12 < 0; + const ivl = forceDescending || isDescending ? [-f, -o, -1] : [f, o, 1]; + return interval(decode(ivl)); +} +function qToAlt(type, q) { + return (q === "M" && type === "majorable") || + (q === "P" && type === "perfectable") + ? 0 + : q === "m" && type === "majorable" + ? -1 + : /^A+$/.test(q) + ? q.length + : /^d+$/.test(q) + ? -1 * (type === "perfectable" ? q.length : q.length + 1) + : 0; +} +// return the interval name of a pitch +function pitchName(props) { + const { step, alt, oct = 0, dir } = props; + if (!dir) { + return ""; + } + const calcNum = step + 1 + 7 * oct; + // this is an edge case: descending pitch class unison (see #243) + const num = calcNum === 0 ? step + 1 : calcNum; + const d = dir < 0 ? "-" : ""; + const type = TYPES[step] === "M" ? "majorable" : "perfectable"; + const name = d + num + altToQ(type, alt); + return name; +} +function altToQ(type, alt) { + if (alt === 0) { + return type === "majorable" ? "M" : "P"; + } + else if (alt === -1 && type === "majorable") { + return "m"; + } + else if (alt > 0) { + return fillStr("A", alt); + } + else { + return fillStr("d", type === "perfectable" ? alt : alt + 1); + } +} + +/** + * Transpose a note by an interval. + * + * @param {string} note - the note or note name + * @param {string} interval - the interval or interval name + * @return {string} the transposed note name or empty string if not valid notes + * @example + * import { tranpose } from "@tonaljs/core" + * transpose("d3", "3M") // => "F#3" + * transpose("D", "3M") // => "F#" + * ["C", "D", "E", "F", "G"].map(pc => transpose(pc, "M3)) // => ["E", "F#", "G#", "A", "B"] + */ +function transpose(noteName, intervalName) { + const note$1 = note(noteName); + const interval$1 = interval(intervalName); + if (note$1.empty || interval$1.empty) { + return ""; + } + const noteCoord = note$1.coord; + const intervalCoord = interval$1.coord; + const tr = noteCoord.length === 1 + ? [noteCoord[0] + intervalCoord[0]] + : [noteCoord[0] + intervalCoord[0], noteCoord[1] + intervalCoord[1]]; + return coordToNote(tr).name; +} +/** + * Find the interval distance between two notes or coord classes. + * + * To find distance between coord classes, both notes must be coord classes and + * the interval is always ascending + * + * @param {Note|string} from - the note or note name to calculate distance from + * @param {Note|string} to - the note or note name to calculate distance to + * @return {string} the interval name or empty string if not valid notes + * + */ +function distance(fromNote, toNote) { + const from = note(fromNote); + const to = note(toNote); + if (from.empty || to.empty) { + return ""; + } + const fcoord = from.coord; + const tcoord = to.coord; + const fifths = tcoord[0] - fcoord[0]; + const octs = fcoord.length === 2 && tcoord.length === 2 + ? tcoord[1] - fcoord[1] + : -Math.floor((fifths * 7) / 12); + // If it's unison and not pitch class, it can be descending interval (#243) + const forceDescending = to.height === from.height && + to.midi !== null && + from.midi !== null && + from.step > to.step; + return coordToInterval([fifths, octs], forceDescending).name; +} + +var Core = /*#__PURE__*/Object.freeze({ + __proto__: null, + accToAlt: accToAlt, + altToAcc: altToAcc, + coordToInterval: coordToInterval, + coordToNote: coordToNote, + decode: decode, + deprecate: deprecate, + distance: distance, + encode: encode, + fillStr: fillStr, + interval: interval, + isNamed: isNamed, + isPitch: isPitch, + note: note, + stepToLetter: stepToLetter, + tokenizeInterval: tokenizeInterval, + tokenizeNote: tokenizeNote, + transpose: transpose +}); + +// ascending range +function ascR(b, n) { + const a = []; + // tslint:disable-next-line:curly + for (; n--; a[n] = n + b) + ; + return a; +} +// descending range +function descR(b, n) { + const a = []; + // tslint:disable-next-line:curly + for (; n--; a[n] = b - n) + ; + return a; +} +/** + * Creates a numeric range + * + * @param {number} from + * @param {number} to + * @return {Array} + * + * @example + * range(-2, 2) // => [-2, -1, 0, 1, 2] + * range(2, -2) // => [2, 1, 0, -1, -2] + */ +function range(from, to) { + return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1); +} +/** + * Rotates a list a number of times. It"s completly agnostic about the + * contents of the list. + * + * @param {Integer} times - the number of rotations + * @param {Array} collection + * @return {Array} the rotated collection + * + * @example + * rotate(1, [1, 2, 3]) // => [2, 3, 1] + */ +function rotate(times, arr) { + const len = arr.length; + const n = ((times % len) + len) % len; + return arr.slice(n, len).concat(arr.slice(0, n)); +} +/** + * Return a copy of the collection with the null values removed + * @function + * @param {Array} collection + * @return {Array} + * + * @example + * compact(["a", "b", null, "c"]) // => ["a", "b", "c"] + */ +function compact(arr) { + return arr.filter((n) => n === 0 || n); +} +/** + * Randomizes the order of the specified collection in-place, using the Fisher–Yates shuffle. + * + * @function + * @param {Array} collection + * @return {Array} the collection shuffled + * + * @example + * shuffle(["C", "D", "E", "F"]) // => [...] + */ +function shuffle(arr, rnd = Math.random) { + let i; + let t; + let m = arr.length; + while (m) { + i = Math.floor(rnd() * m--); + t = arr[m]; + arr[m] = arr[i]; + arr[i] = t; + } + return arr; +} +/** + * Get all permutations of an collection + * + * @param {Array} collection - the collection + * @return {Array} an collection with all the permutations + * @example + * permutations(["a", "b", "c"])) // => + * [ + * ["a", "b", "c"], + * ["b", "a", "c"], + * ["b", "c", "a"], + * ["a", "c", "b"], + * ["c", "a", "b"], + * ["c", "b", "a"] + * ] + */ +function permutations(arr) { + if (arr.length === 0) { + return [[]]; + } + return permutations(arr.slice(1)).reduce((acc, perm) => { + return acc.concat(arr.map((e, pos) => { + const newPerm = perm.slice(); + newPerm.splice(pos, 0, arr[0]); + return newPerm; + })); + }, []); +} +var index = { + compact, + permutations, + range, + rotate, + shuffle, +}; + +const EmptyPcset = { + empty: true, + name: "", + setNum: 0, + chroma: "000000000000", + normalized: "000000000000", + intervals: [], +}; +// UTILITIES +const setNumToChroma = (num) => Number(num).toString(2); +const chromaToNumber = (chroma) => parseInt(chroma, 2); +const REGEX$2 = /^[01]{12}$/; +function isChroma(set) { + return REGEX$2.test(set); +} +const isPcsetNum = (set) => typeof set === "number" && set >= 0 && set <= 4095; +const isPcset = (set) => set && isChroma(set.chroma); +const cache$2 = { [EmptyPcset.chroma]: EmptyPcset }; +/** + * Get the pitch class set of a collection of notes or set number or chroma + */ +function get(src) { + const chroma = isChroma(src) + ? src + : isPcsetNum(src) + ? setNumToChroma(src) + : Array.isArray(src) + ? listToChroma(src) + : isPcset(src) + ? src.chroma + : EmptyPcset.chroma; + return (cache$2[chroma] = cache$2[chroma] || chromaToPcset(chroma)); +} +/** + * Use Pcset.properties + * @function + * @deprecated + */ +const pcset = deprecate("Pcset.pcset", "Pcset.get", get); +/** + * Get pitch class set chroma + * @function + * @example + * Pcset.chroma(["c", "d", "e"]); //=> "101010000000" + */ +const chroma = (set) => get(set).chroma; +/** + * Get intervals (from C) of a set + * @function + * @example + * Pcset.intervals(["c", "d", "e"]); //=> + */ +const intervals = (set) => get(set).intervals; +/** + * Get pitch class set number + * @function + * @example + * Pcset.num(["c", "d", "e"]); //=> 2192 + */ +const num = (set) => get(set).setNum; +const IVLS = [ + "1P", + "2m", + "2M", + "3m", + "3M", + "4P", + "5d", + "5P", + "6m", + "6M", + "7m", + "7M", +]; +/** + * @private + * Get the intervals of a pcset *starting from C* + * @param {Set} set - the pitch class set + * @return {IntervalName[]} an array of interval names or an empty array + * if not a valid pitch class set + */ +function chromaToIntervals(chroma) { + const intervals = []; + for (let i = 0; i < 12; i++) { + // tslint:disable-next-line:curly + if (chroma.charAt(i) === "1") + intervals.push(IVLS[i]); + } + return intervals; +} +/** + * Get a list of all possible pitch class sets (all possible chromas) *having + * C as root*. There are 2048 different chromas. If you want them with another + * note you have to transpose it + * + * @see http://allthescales.org/ + * @return {Array} an array of possible chromas from '10000000000' to '11111111111' + */ +function chromas() { + return range(2048, 4095).map(setNumToChroma); +} +/** + * Given a a list of notes or a pcset chroma, produce the rotations + * of the chroma discarding the ones that starts with "0" + * + * This is used, for example, to get all the modes of a scale. + * + * @param {Array|string} set - the list of notes or pitchChr of the set + * @param {boolean} normalize - (Optional, true by default) remove all + * the rotations that starts with "0" + * @return {Array} an array with all the modes of the chroma + * + * @example + * Pcset.modes(["C", "D", "E"]).map(Pcset.intervals) + */ +function modes(set, normalize = true) { + const pcs = get(set); + const binary = pcs.chroma.split(""); + return compact(binary.map((_, i) => { + const r = rotate(i, binary); + return normalize && r[0] === "0" ? null : r.join(""); + })); +} +/** + * Test if two pitch class sets are numentical + * + * @param {Array|string} set1 - one of the pitch class sets + * @param {Array|string} set2 - the other pitch class set + * @return {boolean} true if they are equal + * @example + * Pcset.isEqual(["c2", "d3"], ["c5", "d2"]) // => true + */ +function isEqual(s1, s2) { + return get(s1).setNum === get(s2).setNum; +} +/** + * Create a function that test if a collection of notes is a + * subset of a given set + * + * The function is curryfied. + * + * @param {PcsetChroma|NoteName[]} set - the superset to test against (chroma or + * list of notes) + * @return{function(PcsetChroma|NoteNames[]): boolean} a function accepting a set + * to test against (chroma or list of notes) + * @example + * const inCMajor = Pcset.isSubsetOf(["C", "E", "G"]) + * inCMajor(["e6", "c4"]) // => true + * inCMajor(["e6", "c4", "d3"]) // => false + */ +function isSubsetOf(set) { + const s = get(set).setNum; + return (notes) => { + const o = get(notes).setNum; + // tslint:disable-next-line: no-bitwise + return s && s !== o && (o & s) === o; + }; +} +/** + * Create a function that test if a collection of notes is a + * superset of a given set (it contains all notes and at least one more) + * + * @param {Set} set - an array of notes or a chroma set string to test against + * @return {(subset: Set): boolean} a function that given a set + * returns true if is a subset of the first one + * @example + * const extendsCMajor = Pcset.isSupersetOf(["C", "E", "G"]) + * extendsCMajor(["e6", "a", "c4", "g2"]) // => true + * extendsCMajor(["c6", "e4", "g3"]) // => false + */ +function isSupersetOf(set) { + const s = get(set).setNum; + return (notes) => { + const o = get(notes).setNum; + // tslint:disable-next-line: no-bitwise + return s && s !== o && (o | s) === o; + }; +} +/** + * Test if a given pitch class set includes a note + * + * @param {Array} set - the base set to test against + * @param {string} note - the note to test + * @return {boolean} true if the note is included in the pcset + * + * Can be partially applied + * + * @example + * const isNoteInCMajor = isNoteIncludedIn(['C', 'E', 'G']) + * isNoteInCMajor('C4') // => true + * isNoteInCMajor('C#4') // => false + */ +function isNoteIncludedIn(set) { + const s = get(set); + return (noteName) => { + const n = note(noteName); + return s && !n.empty && s.chroma.charAt(n.chroma) === "1"; + }; +} +/** + * Filter a list with a pitch class set + * + * @param {Array|string} set - the pitch class set notes + * @param {Array|string} notes - the note list to be filtered + * @return {Array} the filtered notes + * + * @example + * Pcset.filter(["C", "D", "E"], ["c2", "c#2", "d2", "c3", "c#3", "d3"]) // => [ "c2", "d2", "c3", "d3" ]) + * Pcset.filter(["C2"], ["c2", "c#2", "d2", "c3", "c#3", "d3"]) // => [ "c2", "c3" ]) + */ +function filter(set) { + const isIncluded = isNoteIncludedIn(set); + return (notes) => { + return notes.filter(isIncluded); + }; +} +var index$1 = { + get, + chroma, + num, + intervals, + chromas, + isSupersetOf, + isSubsetOf, + isNoteIncludedIn, + isEqual, + filter, + modes, + // deprecated + pcset, +}; +//// PRIVATE //// +function chromaRotations(chroma) { + const binary = chroma.split(""); + return binary.map((_, i) => rotate(i, binary).join("")); +} +function chromaToPcset(chroma) { + const setNum = chromaToNumber(chroma); + const normalizedNum = chromaRotations(chroma) + .map(chromaToNumber) + .filter((n) => n >= 2048) + .sort()[0]; + const normalized = setNumToChroma(normalizedNum); + const intervals = chromaToIntervals(chroma); + return { + empty: false, + name: "", + setNum, + chroma, + normalized, + intervals, + }; +} +function listToChroma(set) { + if (set.length === 0) { + return EmptyPcset.chroma; + } + let pitch; + const binary = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + // tslint:disable-next-line:prefer-for-of + for (let i = 0; i < set.length; i++) { + pitch = note(set[i]); + // tslint:disable-next-line: curly + if (pitch.empty) + pitch = interval(set[i]); + // tslint:disable-next-line: curly + if (!pitch.empty) + binary[pitch.chroma] = 1; + } + return binary.join(""); +} + +/** + * @private + * Chord List + * Source: https://en.wikibooks.org/wiki/Music_Theory/Complete_List_of_Chord_Patterns + * Format: ["intervals", "full name", "abrv1 abrv2"] + */ +const CHORDS = [ + // ==Major== + ["1P 3M 5P", "major", "M ^ "], + ["1P 3M 5P 7M", "major seventh", "maj7 Δ ma7 M7 Maj7 ^7"], + ["1P 3M 5P 7M 9M", "major ninth", "maj9 Δ9 ^9"], + ["1P 3M 5P 7M 9M 13M", "major thirteenth", "maj13 Maj13 ^13"], + ["1P 3M 5P 6M", "sixth", "6 add6 add13 M6"], + ["1P 3M 5P 6M 9M", "sixth/ninth", "6/9 69 M69"], + ["1P 3M 6m 7M", "major seventh flat sixth", "M7b6 ^7b6"], + [ + "1P 3M 5P 7M 11A", + "major seventh sharp eleventh", + "maj#4 Δ#4 Δ#11 M7#11 ^7#11 maj7#11", + ], + // ==Minor== + // '''Normal''' + ["1P 3m 5P", "minor", "m min -"], + ["1P 3m 5P 7m", "minor seventh", "m7 min7 mi7 -7"], + [ + "1P 3m 5P 7M", + "minor/major seventh", + "m/ma7 m/maj7 mM7 mMaj7 m/M7 -Δ7 mΔ -^7", + ], + ["1P 3m 5P 6M", "minor sixth", "m6 -6"], + ["1P 3m 5P 7m 9M", "minor ninth", "m9 -9"], + ["1P 3m 5P 7M 9M", "minor/major ninth", "mM9 mMaj9 -^9"], + ["1P 3m 5P 7m 9M 11P", "minor eleventh", "m11 -11"], + ["1P 3m 5P 7m 9M 13M", "minor thirteenth", "m13 -13"], + // '''Diminished''' + ["1P 3m 5d", "diminished", "dim ° o"], + ["1P 3m 5d 7d", "diminished seventh", "dim7 °7 o7"], + ["1P 3m 5d 7m", "half-diminished", "m7b5 ø -7b5 h7 h"], + // ==Dominant/Seventh== + // '''Normal''' + ["1P 3M 5P 7m", "dominant seventh", "7 dom"], + ["1P 3M 5P 7m 9M", "dominant ninth", "9"], + ["1P 3M 5P 7m 9M 13M", "dominant thirteenth", "13"], + ["1P 3M 5P 7m 11A", "lydian dominant seventh", "7#11 7#4"], + // '''Altered''' + ["1P 3M 5P 7m 9m", "dominant flat ninth", "7b9"], + ["1P 3M 5P 7m 9A", "dominant sharp ninth", "7#9"], + ["1P 3M 7m 9m", "altered", "alt7"], + // '''Suspended''' + ["1P 4P 5P", "suspended fourth", "sus4 sus"], + ["1P 2M 5P", "suspended second", "sus2"], + ["1P 4P 5P 7m", "suspended fourth seventh", "7sus4 7sus"], + ["1P 5P 7m 9M 11P", "eleventh", "11"], + [ + "1P 4P 5P 7m 9m", + "suspended fourth flat ninth", + "b9sus phryg 7b9sus 7b9sus4", + ], + // ==Other== + ["1P 5P", "fifth", "5"], + ["1P 3M 5A", "augmented", "aug + +5 ^#5"], + ["1P 3m 5A", "minor augmented", "m#5 -#5 m+"], + ["1P 3M 5A 7M", "augmented seventh", "maj7#5 maj7+5 +maj7 ^7#5"], + [ + "1P 3M 5P 7M 9M 11A", + "major sharp eleventh (lydian)", + "maj9#11 Δ9#11 ^9#11", + ], + // ==Legacy== + ["1P 2M 4P 5P", "", "sus24 sus4add9"], + ["1P 3M 5A 7M 9M", "", "maj9#5 Maj9#5"], + ["1P 3M 5A 7m", "", "7#5 +7 7+ 7aug aug7"], + ["1P 3M 5A 7m 9A", "", "7#5#9 7#9#5 7alt"], + ["1P 3M 5A 7m 9M", "", "9#5 9+"], + ["1P 3M 5A 7m 9M 11A", "", "9#5#11"], + ["1P 3M 5A 7m 9m", "", "7#5b9 7b9#5"], + ["1P 3M 5A 7m 9m 11A", "", "7#5b9#11"], + ["1P 3M 5A 9A", "", "+add#9"], + ["1P 3M 5A 9M", "", "M#5add9 +add9"], + ["1P 3M 5P 6M 11A", "", "M6#11 M6b5 6#11 6b5"], + ["1P 3M 5P 6M 7M 9M", "", "M7add13"], + ["1P 3M 5P 6M 9M 11A", "", "69#11"], + ["1P 3m 5P 6M 9M", "", "m69 -69"], + ["1P 3M 5P 6m 7m", "", "7b6"], + ["1P 3M 5P 7M 9A 11A", "", "maj7#9#11"], + ["1P 3M 5P 7M 9M 11A 13M", "", "M13#11 maj13#11 M13+4 M13#4"], + ["1P 3M 5P 7M 9m", "", "M7b9"], + ["1P 3M 5P 7m 11A 13m", "", "7#11b13 7b5b13"], + ["1P 3M 5P 7m 13M", "", "7add6 67 7add13"], + ["1P 3M 5P 7m 9A 11A", "", "7#9#11 7b5#9 7#9b5"], + ["1P 3M 5P 7m 9A 11A 13M", "", "13#9#11"], + ["1P 3M 5P 7m 9A 11A 13m", "", "7#9#11b13"], + ["1P 3M 5P 7m 9A 13M", "", "13#9"], + ["1P 3M 5P 7m 9A 13m", "", "7#9b13"], + ["1P 3M 5P 7m 9M 11A", "", "9#11 9+4 9#4"], + ["1P 3M 5P 7m 9M 11A 13M", "", "13#11 13+4 13#4"], + ["1P 3M 5P 7m 9M 11A 13m", "", "9#11b13 9b5b13"], + ["1P 3M 5P 7m 9m 11A", "", "7b9#11 7b5b9 7b9b5"], + ["1P 3M 5P 7m 9m 11A 13M", "", "13b9#11"], + ["1P 3M 5P 7m 9m 11A 13m", "", "7b9b13#11 7b9#11b13 7b5b9b13"], + ["1P 3M 5P 7m 9m 13M", "", "13b9"], + ["1P 3M 5P 7m 9m 13m", "", "7b9b13"], + ["1P 3M 5P 7m 9m 9A", "", "7b9#9"], + ["1P 3M 5P 9M", "", "Madd9 2 add9 add2"], + ["1P 3M 5P 9m", "", "Maddb9"], + ["1P 3M 5d", "", "Mb5"], + ["1P 3M 5d 6M 7m 9M", "", "13b5"], + ["1P 3M 5d 7M", "", "M7b5"], + ["1P 3M 5d 7M 9M", "", "M9b5"], + ["1P 3M 5d 7m", "", "7b5"], + ["1P 3M 5d 7m 9M", "", "9b5"], + ["1P 3M 7m", "", "7no5"], + ["1P 3M 7m 13m", "", "7b13"], + ["1P 3M 7m 9M", "", "9no5"], + ["1P 3M 7m 9M 13M", "", "13no5"], + ["1P 3M 7m 9M 13m", "", "9b13"], + ["1P 3m 4P 5P", "", "madd4"], + ["1P 3m 5P 6m 7M", "", "mMaj7b6"], + ["1P 3m 5P 6m 7M 9M", "", "mMaj9b6"], + ["1P 3m 5P 7m 11P", "", "m7add11 m7add4"], + ["1P 3m 5P 9M", "", "madd9"], + ["1P 3m 5d 6M 7M", "", "o7M7"], + ["1P 3m 5d 7M", "", "oM7"], + ["1P 3m 6m 7M", "", "mb6M7"], + ["1P 3m 6m 7m", "", "m7#5"], + ["1P 3m 6m 7m 9M", "", "m9#5"], + ["1P 3m 5A 7m 9M 11P", "", "m11A"], + ["1P 3m 6m 9m", "", "mb6b9"], + ["1P 2M 3m 5d 7m", "", "m9b5"], + ["1P 4P 5A 7M", "", "M7#5sus4"], + ["1P 4P 5A 7M 9M", "", "M9#5sus4"], + ["1P 4P 5A 7m", "", "7#5sus4"], + ["1P 4P 5P 7M", "", "M7sus4"], + ["1P 4P 5P 7M 9M", "", "M9sus4"], + ["1P 4P 5P 7m 9M", "", "9sus4 9sus"], + ["1P 4P 5P 7m 9M 13M", "", "13sus4 13sus"], + ["1P 4P 5P 7m 9m 13m", "", "7sus4b9b13 7b9b13sus4"], + ["1P 4P 7m 10m", "", "4 quartal"], + ["1P 5P 7m 9m 11P", "", "11b9"], +]; + +const NoChordType = { + ...EmptyPcset, + name: "", + quality: "Unknown", + intervals: [], + aliases: [], +}; +let dictionary = []; +let index$2 = {}; +/** + * Given a chord name or chroma, return the chord properties + * @param {string} source - chord name or pitch class set chroma + * @example + * import { get } from 'tonaljs/chord-type' + * get('major') // => { name: 'major', ... } + */ +function get$1(type) { + return index$2[type] || NoChordType; +} +const chordType = deprecate("ChordType.chordType", "ChordType.get", get$1); +/** + * Get all chord (long) names + */ +function names() { + return dictionary.map((chord) => chord.name).filter((x) => x); +} +/** + * Get all chord symbols + */ +function symbols() { + return dictionary.map((chord) => chord.aliases[0]).filter((x) => x); +} +/** + * Keys used to reference chord types + */ +function keys() { + return Object.keys(index$2); +} +/** + * Return a list of all chord types + */ +function all() { + return dictionary.slice(); +} +const entries = deprecate("ChordType.entries", "ChordType.all", all); +/** + * Clear the dictionary + */ +function removeAll() { + dictionary = []; + index$2 = {}; +} +/** + * Add a chord to the dictionary. + * @param intervals + * @param aliases + * @param [fullName] + */ +function add(intervals, aliases, fullName) { + const quality = getQuality(intervals); + const chord = { + ...get(intervals), + name: fullName || "", + quality, + intervals, + aliases, + }; + dictionary.push(chord); + if (chord.name) { + index$2[chord.name] = chord; + } + index$2[chord.setNum] = chord; + index$2[chord.chroma] = chord; + chord.aliases.forEach((alias) => addAlias(chord, alias)); +} +function addAlias(chord, alias) { + index$2[alias] = chord; +} +function getQuality(intervals) { + const has = (interval) => intervals.indexOf(interval) !== -1; + return has("5A") + ? "Augmented" + : has("3M") + ? "Major" + : has("5d") + ? "Diminished" + : has("3m") + ? "Minor" + : "Unknown"; +} +CHORDS.forEach(([ivls, fullName, names]) => add(ivls.split(" "), names.split(" "), fullName)); +dictionary.sort((a, b) => a.setNum - b.setNum); +var index$1$1 = { + names, + symbols, + get: get$1, + all, + add, + removeAll, + keys, + // deprecated + entries, + chordType, +}; + +// SCALES +// Format: ["intervals", "name", "alias1", "alias2", ...] +const SCALES = [ + // 5-note scales + ["1P 2M 3M 5P 6M", "major pentatonic", "pentatonic"], + ["1P 3M 4P 5P 7M", "ionian pentatonic"], + ["1P 3M 4P 5P 7m", "mixolydian pentatonic", "indian"], + ["1P 2M 4P 5P 6M", "ritusen"], + ["1P 2M 4P 5P 7m", "egyptian"], + ["1P 3M 4P 5d 7m", "neopolitan major pentatonic"], + ["1P 3m 4P 5P 6m", "vietnamese 1"], + ["1P 2m 3m 5P 6m", "pelog"], + ["1P 2m 4P 5P 6m", "kumoijoshi"], + ["1P 2M 3m 5P 6m", "hirajoshi"], + ["1P 2m 4P 5d 7m", "iwato"], + ["1P 2m 4P 5P 7m", "in-sen"], + ["1P 3M 4A 5P 7M", "lydian pentatonic", "chinese"], + ["1P 3m 4P 6m 7m", "malkos raga"], + ["1P 3m 4P 5d 7m", "locrian pentatonic", "minor seven flat five pentatonic"], + ["1P 3m 4P 5P 7m", "minor pentatonic", "vietnamese 2"], + ["1P 3m 4P 5P 6M", "minor six pentatonic"], + ["1P 2M 3m 5P 6M", "flat three pentatonic", "kumoi"], + ["1P 2M 3M 5P 6m", "flat six pentatonic"], + ["1P 2m 3M 5P 6M", "scriabin"], + ["1P 3M 5d 6m 7m", "whole tone pentatonic"], + ["1P 3M 4A 5A 7M", "lydian #5P pentatonic"], + ["1P 3M 4A 5P 7m", "lydian dominant pentatonic"], + ["1P 3m 4P 5P 7M", "minor #7M pentatonic"], + ["1P 3m 4d 5d 7m", "super locrian pentatonic"], + // 6-note scales + ["1P 2M 3m 4P 5P 7M", "minor hexatonic"], + ["1P 2A 3M 5P 5A 7M", "augmented"], + ["1P 2M 3m 3M 5P 6M", "major blues"], + ["1P 2M 4P 5P 6M 7m", "piongio"], + ["1P 2m 3M 4A 6M 7m", "prometheus neopolitan"], + ["1P 2M 3M 4A 6M 7m", "prometheus"], + ["1P 2m 3M 5d 6m 7m", "mystery #1"], + ["1P 2m 3M 4P 5A 6M", "six tone symmetric"], + ["1P 2M 3M 4A 5A 7m", "whole tone", "messiaen's mode #1"], + ["1P 2m 4P 4A 5P 7M", "messiaen's mode #5"], + ["1P 3m 4P 5d 5P 7m", "minor blues", "blues"], + // 7-note scales + ["1P 2M 3M 4P 5d 6m 7m", "locrian major", "arabian"], + ["1P 2m 3M 4A 5P 6m 7M", "double harmonic lydian"], + ["1P 2M 3m 4P 5P 6m 7M", "harmonic minor"], + [ + "1P 2m 2A 3M 4A 6m 7m", + "altered", + "super locrian", + "diminished whole tone", + "pomeroy", + ], + ["1P 2M 3m 4P 5d 6m 7m", "locrian #2", "half-diminished", "aeolian b5"], + [ + "1P 2M 3M 4P 5P 6m 7m", + "mixolydian b6", + "melodic minor fifth mode", + "hindu", + ], + ["1P 2M 3M 4A 5P 6M 7m", "lydian dominant", "lydian b7", "overtone"], + ["1P 2M 3M 4A 5P 6M 7M", "lydian"], + ["1P 2M 3M 4A 5A 6M 7M", "lydian augmented"], + [ + "1P 2m 3m 4P 5P 6M 7m", + "dorian b2", + "phrygian #6", + "melodic minor second mode", + ], + ["1P 2M 3m 4P 5P 6M 7M", "melodic minor"], + ["1P 2m 3m 4P 5d 6m 7m", "locrian"], + [ + "1P 2m 3m 4d 5d 6m 7d", + "ultralocrian", + "superlocrian bb7", + "superlocrian diminished", + ], + ["1P 2m 3m 4P 5d 6M 7m", "locrian 6", "locrian natural 6", "locrian sharp 6"], + ["1P 2A 3M 4P 5P 5A 7M", "augmented heptatonic"], + // Source https://en.wikipedia.org/wiki/Ukrainian_Dorian_scale + [ + "1P 2M 3m 4A 5P 6M 7m", + "dorian #4", + "ukrainian dorian", + "romanian minor", + "altered dorian", + ], + ["1P 2M 3m 4A 5P 6M 7M", "lydian diminished"], + ["1P 2m 3m 4P 5P 6m 7m", "phrygian"], + ["1P 2M 3M 4A 5A 7m 7M", "leading whole tone"], + ["1P 2M 3M 4A 5P 6m 7m", "lydian minor"], + ["1P 2m 3M 4P 5P 6m 7m", "phrygian dominant", "spanish", "phrygian major"], + ["1P 2m 3m 4P 5P 6m 7M", "balinese"], + ["1P 2m 3m 4P 5P 6M 7M", "neopolitan major"], + ["1P 2M 3m 4P 5P 6m 7m", "aeolian", "minor"], + ["1P 2M 3M 4P 5P 6m 7M", "harmonic major"], + ["1P 2m 3M 4P 5P 6m 7M", "double harmonic major", "gypsy"], + ["1P 2M 3m 4P 5P 6M 7m", "dorian"], + ["1P 2M 3m 4A 5P 6m 7M", "hungarian minor"], + ["1P 2A 3M 4A 5P 6M 7m", "hungarian major"], + ["1P 2m 3M 4P 5d 6M 7m", "oriental"], + ["1P 2m 3m 3M 4A 5P 7m", "flamenco"], + ["1P 2m 3m 4A 5P 6m 7M", "todi raga"], + ["1P 2M 3M 4P 5P 6M 7m", "mixolydian", "dominant"], + ["1P 2m 3M 4P 5d 6m 7M", "persian"], + ["1P 2M 3M 4P 5P 6M 7M", "major", "ionian"], + ["1P 2m 3M 5d 6m 7m 7M", "enigmatic"], + [ + "1P 2M 3M 4P 5A 6M 7M", + "major augmented", + "major #5", + "ionian augmented", + "ionian #5", + ], + ["1P 2A 3M 4A 5P 6M 7M", "lydian #9"], + // 8-note scales + ["1P 2m 2M 4P 4A 5P 6m 7M", "messiaen's mode #4"], + ["1P 2m 3M 4P 4A 5P 6m 7M", "purvi raga"], + ["1P 2m 3m 3M 4P 5P 6m 7m", "spanish heptatonic"], + ["1P 2M 3M 4P 5P 6M 7m 7M", "bebop"], + ["1P 2M 3m 3M 4P 5P 6M 7m", "bebop minor"], + ["1P 2M 3M 4P 5P 5A 6M 7M", "bebop major"], + ["1P 2m 3m 4P 5d 5P 6m 7m", "bebop locrian"], + ["1P 2M 3m 4P 5P 6m 7m 7M", "minor bebop"], + ["1P 2M 3m 4P 5d 6m 6M 7M", "diminished", "whole-half diminished"], + ["1P 2M 3M 4P 5d 5P 6M 7M", "ichikosucho"], + ["1P 2M 3m 4P 5P 6m 6M 7M", "minor six diminished"], + [ + "1P 2m 3m 3M 4A 5P 6M 7m", + "half-whole diminished", + "dominant diminished", + "messiaen's mode #2", + ], + ["1P 3m 3M 4P 5P 6M 7m 7M", "kafi raga"], + ["1P 2M 3M 4P 4A 5A 6A 7M", "messiaen's mode #6"], + // 9-note scales + ["1P 2M 3m 3M 4P 5d 5P 6M 7m", "composite blues"], + ["1P 2M 3m 3M 4A 5P 6m 7m 7M", "messiaen's mode #3"], + // 10-note scales + ["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M", "messiaen's mode #7"], + // 12-note scales + ["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M", "chromatic"], +]; + +const NoScaleType = { + ...EmptyPcset, + intervals: [], + aliases: [], +}; +let dictionary$1 = []; +let index$3 = {}; +function names$1() { + return dictionary$1.map((scale) => scale.name); +} +/** + * Given a scale name or chroma, return the scale properties + * + * @param {string} type - scale name or pitch class set chroma + * @example + * import { get } from 'tonaljs/scale-type' + * get('major') // => { name: 'major', ... } + */ +function get$2(type) { + return index$3[type] || NoScaleType; +} +const scaleType = deprecate("ScaleDictionary.scaleType", "ScaleType.get", get$2); +/** + * Return a list of all scale types + */ +function all$1() { + return dictionary$1.slice(); +} +const entries$1 = deprecate("ScaleDictionary.entries", "ScaleType.all", all$1); +/** + * Keys used to reference scale types + */ +function keys$1() { + return Object.keys(index$3); +} +/** + * Clear the dictionary + */ +function removeAll$1() { + dictionary$1 = []; + index$3 = {}; +} +/** + * Add a scale into dictionary + * @param intervals + * @param name + * @param aliases + */ +function add$1(intervals, name, aliases = []) { + const scale = { ...get(intervals), name, intervals, aliases }; + dictionary$1.push(scale); + index$3[scale.name] = scale; + index$3[scale.setNum] = scale; + index$3[scale.chroma] = scale; + scale.aliases.forEach((alias) => addAlias$1(scale, alias)); + return scale; +} +function addAlias$1(scale, alias) { + index$3[alias] = scale; +} +SCALES.forEach(([ivls, name, ...aliases]) => add$1(ivls.split(" "), name, aliases)); +var index$1$2 = { + names: names$1, + get: get$2, + all: all$1, + add: add$1, + removeAll: removeAll$1, + keys: keys$1, + // deprecated + entries: entries$1, + scaleType, +}; + +// source: https://en.wikipedia.org/wiki/Note_value +const DATA = [ + [ + 0.125, + "dl", + ["large", "duplex longa", "maxima", "octuple", "octuple whole"], + ], + [0.25, "l", ["long", "longa"]], + [0.5, "d", ["double whole", "double", "breve"]], + [1, "w", ["whole", "semibreve"]], + [2, "h", ["half", "minim"]], + [4, "q", ["quarter", "crotchet"]], + [8, "e", ["eighth", "quaver"]], + [16, "s", ["sixteenth", "semiquaver"]], + [32, "t", ["thirty-second", "demisemiquaver"]], + [64, "sf", ["sixty-fourth", "hemidemisemiquaver"]], + [128, "h", ["hundred twenty-eighth"]], + [256, "th", ["two hundred fifty-sixth"]], +]; + +const VALUES = []; +DATA.forEach(([denominator, shorthand, names]) => add$2(denominator, shorthand, names)); +const NoDuration = { + empty: true, + name: "", + value: 0, + fraction: [0, 0], + shorthand: "", + dots: "", + names: [], +}; +function names$2() { + return VALUES.reduce((names, duration) => { + duration.names.forEach((name) => names.push(name)); + return names; + }, []); +} +function shorthands() { + return VALUES.map((dur) => dur.shorthand); +} +const REGEX$3 = /^([^.]+)(\.*)$/; +function get$3(name) { + const [_, simple, dots] = REGEX$3.exec(name) || []; + const base = VALUES.find((dur) => dur.shorthand === simple || dur.names.includes(simple)); + if (!base) { + return NoDuration; + } + const fraction = calcDots(base.fraction, dots.length); + const value = fraction[0] / fraction[1]; + return { ...base, name, dots, value, fraction }; +} +const value = (name) => get$3(name).value; +const fraction = (name) => get$3(name).fraction; +var index$4 = { names: names$2, shorthands, get: get$3, value, fraction }; +//// PRIVATE //// +function add$2(denominator, shorthand, names) { + VALUES.push({ + empty: false, + dots: "", + name: "", + value: 1 / denominator, + fraction: denominator < 1 ? [1 / denominator, 1] : [1, denominator], + shorthand, + names, + }); +} +function calcDots(fraction, dots) { + const pow = Math.pow(2, dots); + let numerator = fraction[0] * pow; + let denominator = fraction[1] * pow; + const base = numerator; + // add fractions + for (let i = 0; i < dots; i++) { + numerator += base / Math.pow(2, i + 1); + } + // simplify + while (numerator % 2 === 0 && denominator % 2 === 0) { + numerator /= 2; + denominator /= 2; + } + return [numerator, denominator]; +} + +/** + * Get the natural list of names + */ +function names$3() { + return "1P 2M 3M 4P 5P 6m 7m".split(" "); +} +/** + * Get properties of an interval + * + * @function + * @example + * Interval.get('P4') // => {"alt": 0, "dir": 1, "name": "4P", "num": 4, "oct": 0, "q": "P", "semitones": 5, "simple": 4, "step": 3, "type": "perfectable"} + */ +const get$4 = interval; +/** + * Get name of an interval + * + * @function + * @example + * Interval.name('4P') // => "4P" + * Interval.name('P4') // => "4P" + * Interval.name('C4') // => "" + */ +const name = (name) => interval(name).name; +/** + * Get semitones of an interval + * @function + * @example + * Interval.semitones('P4') // => 5 + */ +const semitones = (name) => interval(name).semitones; +/** + * Get quality of an interval + * @function + * @example + * Interval.quality('P4') // => "P" + */ +const quality = (name) => interval(name).q; +/** + * Get number of an interval + * @function + * @example + * Interval.num('P4') // => 4 + */ +const num$1 = (name) => interval(name).num; +/** + * Get the simplified version of an interval. + * + * @function + * @param {string} interval - the interval to simplify + * @return {string} the simplified interval + * + * @example + * Interval.simplify("9M") // => "2M" + * Interval.simplify("2M") // => "2M" + * Interval.simplify("-2M") // => "7m" + * ["8P", "9M", "10M", "11P", "12P", "13M", "14M", "15P"].map(Interval.simplify) + * // => [ "8P", "2M", "3M", "4P", "5P", "6M", "7M", "8P" ] + */ +function simplify(name) { + const i = interval(name); + return i.empty ? "" : i.simple + i.q; +} +/** + * Get the inversion (https://en.wikipedia.org/wiki/Inversion_(music)#Intervals) + * of an interval. + * + * @function + * @param {string} interval - the interval to invert in interval shorthand + * notation or interval array notation + * @return {string} the inverted interval + * + * @example + * Interval.invert("3m") // => "6M" + * Interval.invert("2M") // => "7m" + */ +function invert(name) { + const i = interval(name); + if (i.empty) { + return ""; + } + const step = (7 - i.step) % 7; + const alt = i.type === "perfectable" ? -i.alt : -(i.alt + 1); + return interval({ step, alt, oct: i.oct, dir: i.dir }).name; +} +// interval numbers +const IN = [1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7]; +// interval qualities +const IQ = "P m M m M P d P m M m M".split(" "); +/** + * Get interval name from semitones number. Since there are several interval + * names for the same number, the name it's arbitrary, but deterministic. + * + * @param {Integer} num - the number of semitones (can be negative) + * @return {string} the interval name + * @example + * Interval.fromSemitones(7) // => "5P" + * Interval.fromSemitones(-7) // => "-5P" + */ +function fromSemitones(semitones) { + const d = semitones < 0 ? -1 : 1; + const n = Math.abs(semitones); + const c = n % 12; + const o = Math.floor(n / 12); + return d * (IN[c] + 7 * o) + IQ[c]; +} +/** + * Find interval between two notes + * + * @example + * Interval.distance("C4", "G4"); // => "5P" + */ +const distance$1 = distance; +/** + * Adds two intervals + * + * @function + * @param {string} interval1 + * @param {string} interval2 + * @return {string} the added interval name + * @example + * Interval.add("3m", "5P") // => "7m" + */ +const add$3 = combinator((a, b) => [a[0] + b[0], a[1] + b[1]]); +/** + * Returns a function that adds an interval + * + * @function + * @example + * ['1P', '2M', '3M'].map(Interval.addTo('5P')) // => ["5P", "6M", "7M"] + */ +const addTo = (interval) => (other) => add$3(interval, other); +/** + * Subtracts two intervals + * + * @function + * @param {string} minuendInterval + * @param {string} subtrahendInterval + * @return {string} the substracted interval name + * @example + * Interval.substract('5P', '3M') // => '3m' + * Interval.substract('3M', '5P') // => '-3m' + */ +const substract = combinator((a, b) => [a[0] - b[0], a[1] - b[1]]); +function transposeFifths(interval, fifths) { + const ivl = get$4(interval); + if (ivl.empty) + return ""; + const [nFifths, nOcts, dir] = ivl.coord; + return coordToInterval([nFifths + fifths, nOcts, dir]).name; +} +var index$5 = { + names: names$3, + get: get$4, + name, + num: num$1, + semitones, + quality, + fromSemitones, + distance: distance$1, + invert, + simplify, + add: add$3, + addTo, + substract, + transposeFifths, +}; +function combinator(fn) { + return (a, b) => { + const coordA = interval(a).coord; + const coordB = interval(b).coord; + if (coordA && coordB) { + const coord = fn(coordA, coordB); + return coordToInterval(coord).name; + } + }; +} + +function isMidi(arg) { + return +arg >= 0 && +arg <= 127; +} +/** + * Get the note midi number (a number between 0 and 127) + * + * It returns undefined if not valid note name + * + * @function + * @param {string|number} note - the note name or midi number + * @return {Integer} the midi number or undefined if not valid note + * @example + * import { toMidi } from '@tonaljs/midi' + * toMidi("C4") // => 60 + * toMidi(60) // => 60 + * toMidi('60') // => 60 + */ +function toMidi(note$1) { + if (isMidi(note$1)) { + return +note$1; + } + const n = note(note$1); + return n.empty ? null : n.midi; +} +/** + * Get the frequency in hertzs from midi number + * + * @param {number} midi - the note midi number + * @param {number} [tuning = 440] - A4 tuning frequency in Hz (440 by default) + * @return {number} the frequency or null if not valid note midi + * @example + * import { midiToFreq} from '@tonaljs/midi' + * midiToFreq(69) // => 440 + */ +function midiToFreq(midi, tuning = 440) { + return Math.pow(2, (midi - 69) / 12) * tuning; +} +const L2 = Math.log(2); +const L440 = Math.log(440); +/** + * Get the midi number from a frequency in hertz. The midi number can + * contain decimals (with two digits precission) + * + * @param {number} frequency + * @return {number} + * @example + * import { freqToMidi} from '@tonaljs/midi' + * freqToMidi(220)); //=> 57 + * freqToMidi(261.62)); //=> 60 + * freqToMidi(261)); //=> 59.96 + */ +function freqToMidi(freq) { + const v = (12 * (Math.log(freq) - L440)) / L2 + 69; + return Math.round(v * 100) / 100; +} +const SHARPS = "C C# D D# E F F# G G# A A# B".split(" "); +const FLATS = "C Db D Eb E F Gb G Ab A Bb B".split(" "); +/** + * Given a midi number, returns a note name. The altered notes will have + * flats unless explicitly set with the optional `useSharps` parameter. + * + * @function + * @param {number} midi - the midi note number + * @param {Object} options = default: `{ sharps: false, pitchClass: false }` + * @param {boolean} useSharps - (Optional) set to true to use sharps instead of flats + * @return {string} the note name + * @example + * import { midiToNoteName } from '@tonaljs/midi' + * midiToNoteName(61) // => "Db4" + * midiToNoteName(61, { pitchClass: true }) // => "Db" + * midiToNoteName(61, { sharps: true }) // => "C#4" + * midiToNoteName(61, { pitchClass: true, sharps: true }) // => "C#" + * // it rounds to nearest note + * midiToNoteName(61.7) // => "D4" + */ +function midiToNoteName(midi, options = {}) { + if (isNaN(midi) || midi === -Infinity || midi === Infinity) + return ""; + midi = Math.round(midi); + const pcs = options.sharps === true ? SHARPS : FLATS; + const pc = pcs[midi % 12]; + if (options.pitchClass) { + return pc; + } + const o = Math.floor(midi / 12) - 1; + return pc + o; +} +var index$6 = { isMidi, toMidi, midiToFreq, midiToNoteName, freqToMidi }; + +const NAMES = ["C", "D", "E", "F", "G", "A", "B"]; +const toName = (n) => n.name; +const onlyNotes = (array) => array.map(note).filter((n) => !n.empty); +/** + * Return the natural note names without octave + * @function + * @example + * Note.names(); // => ["C", "D", "E", "F", "G", "A", "B"] + */ +function names$4(array) { + if (array === undefined) { + return NAMES.slice(); + } + else if (!Array.isArray(array)) { + return []; + } + else { + return onlyNotes(array).map(toName); + } +} +/** + * Get a note from a note name + * + * @function + * @example + * Note.get('Bb4') // => { name: "Bb4", midi: 70, chroma: 10, ... } + */ +const get$5 = note; +/** + * Get the note name + * @function + */ +const name$1 = (note) => get$5(note).name; +/** + * Get the note pitch class name + * @function + */ +const pitchClass = (note) => get$5(note).pc; +/** + * Get the note accidentals + * @function + */ +const accidentals = (note) => get$5(note).acc; +/** + * Get the note octave + * @function + */ +const octave = (note) => get$5(note).oct; +/** + * Get the note midi + * @function + */ +const midi = (note) => get$5(note).midi; +/** + * Get the note midi + * @function + */ +const freq = (note) => get$5(note).freq; +/** + * Get the note chroma + * @function + */ +const chroma$1 = (note) => get$5(note).chroma; +/** + * Given a midi number, returns a note name. Uses flats for altered notes. + * + * @function + * @param {number} midi - the midi note number + * @return {string} the note name + * @example + * Note.fromMidi(61) // => "Db4" + * Note.fromMidi(61.7) // => "D4" + */ +function fromMidi(midi) { + return midiToNoteName(midi); +} +/** + * Given a midi number, returns a note name. Uses flats for altered notes. + */ +function fromFreq(freq) { + return midiToNoteName(freqToMidi(freq)); +} +/** + * Given a midi number, returns a note name. Uses flats for altered notes. + */ +function fromFreqSharps(freq) { + return midiToNoteName(freqToMidi(freq), { sharps: true }); +} +/** + * Given a midi number, returns a note name. Uses flats for altered notes. + * + * @function + * @param {number} midi - the midi note number + * @return {string} the note name + * @example + * Note.fromMidiSharps(61) // => "C#4" + */ +function fromMidiSharps(midi) { + return midiToNoteName(midi, { sharps: true }); +} +/** + * Transpose a note by an interval + */ +const transpose$1 = transpose; +const tr = transpose; +/** + * Transpose by an interval. + * @function + * @param {string} interval + * @return {function} a function that transposes by the given interval + * @example + * ["C", "D", "E"].map(Note.transposeBy("5P")); + * // => ["G", "A", "B"] + */ +const transposeBy = (interval) => (note) => transpose$1(note, interval); +const trBy = transposeBy; +/** + * Transpose from a note + * @function + * @param {string} note + * @return {function} a function that transposes the the note by an interval + * ["1P", "3M", "5P"].map(Note.transposeFrom("C")); + * // => ["C", "E", "G"] + */ +const transposeFrom = (note) => (interval) => transpose$1(note, interval); +const trFrom = transposeFrom; +/** + * Transpose a note by a number of perfect fifths. + * + * @function + * @param {string} note - the note name + * @param {number} fifhts - the number of fifths + * @return {string} the transposed note name + * + * @example + * import { transposeFifths } from "@tonaljs/note" + * transposeFifths("G4", 1) // => "D" + * [0, 1, 2, 3, 4].map(fifths => transposeFifths("C", fifths)) // => ["C", "G", "D", "A", "E"] + */ +function transposeFifths$1(noteName, fifths) { + const note = get$5(noteName); + if (note.empty) { + return ""; + } + const [nFifths, nOcts] = note.coord; + const transposed = nOcts === undefined + ? coordToNote([nFifths + fifths]) + : coordToNote([nFifths + fifths, nOcts]); + return transposed.name; +} +const trFifths = transposeFifths$1; +const ascending = (a, b) => a.height - b.height; +const descending = (a, b) => b.height - a.height; +function sortedNames(notes, comparator) { + comparator = comparator || ascending; + return onlyNotes(notes).sort(comparator).map(toName); +} +function sortedUniqNames(notes) { + return sortedNames(notes, ascending).filter((n, i, a) => i === 0 || n !== a[i - 1]); +} +/** + * Simplify a note + * + * @function + * @param {string} note - the note to be simplified + * - sameAccType: default true. Use same kind of accidentals that source + * @return {string} the simplified note or '' if not valid note + * @example + * simplify("C##") // => "D" + * simplify("C###") // => "D#" + * simplify("C###") + * simplify("B#4") // => "C5" + */ +const simplify$1 = (noteName) => { + const note = get$5(noteName); + if (note.empty) { + return ""; + } + return midiToNoteName(note.midi || note.chroma, { + sharps: note.alt > 0, + pitchClass: note.midi === null, + }); +}; +/** + * Get enharmonic of a note + * + * @function + * @param {string} note + * @param [string] - [optional] Destination pitch class + * @return {string} the enharmonic note name or '' if not valid note + * @example + * Note.enharmonic("Db") // => "C#" + * Note.enharmonic("C") // => "C" + * Note.enharmonic("F2","E#") // => "E#2" + */ +function enharmonic(noteName, destName) { + const src = get$5(noteName); + if (src.empty) { + return ""; + } + // destination: use given or generate one + const dest = get$5(destName || + midiToNoteName(src.midi || src.chroma, { + sharps: src.alt < 0, + pitchClass: true, + })); + // ensure destination is valid + if (dest.empty || dest.chroma !== src.chroma) { + return ""; + } + // if src has no octave, no need to calculate anything else + if (src.oct === undefined) { + return dest.pc; + } + // detect any octave overflow + const srcChroma = src.chroma - src.alt; + const destChroma = dest.chroma - dest.alt; + const destOctOffset = srcChroma > 11 || destChroma < 0 + ? -1 + : srcChroma < 0 || destChroma > 11 + ? +1 + : 0; + // calculate the new octave + const destOct = src.oct + destOctOffset; + return dest.pc + destOct; +} +var index$7 = { + names: names$4, + get: get$5, + name: name$1, + pitchClass, + accidentals, + octave, + midi, + ascending, + descending, + sortedNames, + sortedUniqNames, + fromMidi, + fromMidiSharps, + freq, + fromFreq, + fromFreqSharps, + chroma: chroma$1, + transpose: transpose$1, + tr, + transposeBy, + trBy, + transposeFrom, + trFrom, + transposeFifths: transposeFifths$1, + trFifths, + simplify: simplify$1, + enharmonic, +}; + +const NoRomanNumeral = { empty: true, name: "", chordType: "" }; +const cache$3 = {}; +/** + * Get properties of a roman numeral string + * + * @function + * @param {string} - the roman numeral string (can have type, like: Imaj7) + * @return {Object} - the roman numeral properties + * @param {string} name - the roman numeral (tonic) + * @param {string} type - the chord type + * @param {string} num - the number (1 = I, 2 = II...) + * @param {boolean} major - major or not + * + * @example + * romanNumeral("VIIb5") // => { name: "VII", type: "b5", num: 7, major: true } + */ +function get$6(src) { + return typeof src === "string" + ? cache$3[src] || (cache$3[src] = parse$2(src)) + : typeof src === "number" + ? get$6(NAMES$1[src] || "") + : isPitch(src) + ? fromPitch(src) + : isNamed(src) + ? get$6(src.name) + : NoRomanNumeral; +} +const romanNumeral = deprecate("RomanNumeral.romanNumeral", "RomanNumeral.get", get$6); +/** + * Get roman numeral names + * + * @function + * @param {boolean} [isMajor=true] + * @return {Array} + * + * @example + * names() // => ["I", "II", "III", "IV", "V", "VI", "VII"] + */ +function names$5(major = true) { + return (major ? NAMES$1 : NAMES_MINOR).slice(); +} +function fromPitch(pitch) { + return get$6(altToAcc(pitch.alt) + NAMES$1[pitch.step]); +} +const REGEX$4 = /^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/; +function tokenize(str) { + return (REGEX$4.exec(str) || ["", "", "", ""]); +} +const ROMANS = "I II III IV V VI VII"; +const NAMES$1 = ROMANS.split(" "); +const NAMES_MINOR = ROMANS.toLowerCase().split(" "); +function parse$2(src) { + const [name, acc, roman, chordType] = tokenize(src); + if (!roman) { + return NoRomanNumeral; + } + const upperRoman = roman.toUpperCase(); + const step = NAMES$1.indexOf(upperRoman); + const alt = accToAlt(acc); + const dir = 1; + return { + empty: false, + name, + roman, + interval: interval({ step, alt, dir }).name, + acc, + chordType, + alt, + step, + major: roman === upperRoman, + oct: 0, + dir, + }; +} +var index$8 = { + names: names$5, + get: get$6, + // deprecated + romanNumeral, +}; + +const Empty = Object.freeze([]); +const NoKey = { + type: "major", + tonic: "", + alteration: 0, + keySignature: "", +}; +const NoKeyScale = { + tonic: "", + grades: Empty, + intervals: Empty, + scale: Empty, + chords: Empty, + chordsHarmonicFunction: Empty, + chordScales: Empty, +}; +const NoMajorKey = { + ...NoKey, + ...NoKeyScale, + type: "major", + minorRelative: "", + scale: Empty, + secondaryDominants: Empty, + secondaryDominantsMinorRelative: Empty, + substituteDominants: Empty, + substituteDominantsMinorRelative: Empty, +}; +const NoMinorKey = { + ...NoKey, + type: "minor", + relativeMajor: "", + natural: NoKeyScale, + harmonic: NoKeyScale, + melodic: NoKeyScale, +}; +const mapScaleToType = (scale, list, sep = "") => list.map((type, i) => `${scale[i]}${sep}${type}`); +function keyScale(grades, chords, harmonicFunctions, chordScales) { + return (tonic) => { + const intervals = grades.map((gr) => get$6(gr).interval || ""); + const scale = intervals.map((interval) => transpose(tonic, interval)); + return { + tonic, + grades, + intervals, + scale, + chords: mapScaleToType(scale, chords), + chordsHarmonicFunction: harmonicFunctions.slice(), + chordScales: mapScaleToType(scale, chordScales, " "), + }; + }; +} +const distInFifths = (from, to) => { + const f = note(from); + const t = note(to); + return f.empty || t.empty ? 0 : t.coord[0] - f.coord[0]; +}; +const MajorScale = keyScale("I II III IV V VI VII".split(" "), "maj7 m7 m7 maj7 7 m7 m7b5".split(" "), "T SD T SD D T D".split(" "), "major,dorian,phrygian,lydian,mixolydian,minor,locrian".split(",")); +const NaturalScale = keyScale("I II bIII IV V bVI bVII".split(" "), "m7 m7b5 maj7 m7 m7 maj7 7".split(" "), "T SD T SD D SD SD".split(" "), "minor,locrian,major,dorian,phrygian,lydian,mixolydian".split(",")); +const HarmonicScale = keyScale("I II bIII IV V bVI VII".split(" "), "mMaj7 m7b5 +maj7 m7 7 maj7 o7".split(" "), "T SD T SD D SD D".split(" "), "harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian".split(",")); +const MelodicScale = keyScale("I II bIII IV V VI VII".split(" "), "m6 m7 +maj7 7 7 m7b5 m7b5".split(" "), "T SD T SD D ".split(" "), "melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered".split(",")); +/** + * Get a major key properties in a given tonic + * @param tonic + */ +function majorKey(tonic) { + const pc = note(tonic).pc; + if (!pc) + return NoMajorKey; + const keyScale = MajorScale(pc); + const alteration = distInFifths("C", pc); + const romanInTonic = (src) => { + const r = get$6(src); + if (r.empty) + return ""; + return transpose(tonic, r.interval) + r.chordType; + }; + return { + ...keyScale, + type: "major", + minorRelative: transpose(pc, "-3m"), + alteration, + keySignature: altToAcc(alteration), + secondaryDominants: "- VI7 VII7 I7 II7 III7 -".split(" ").map(romanInTonic), + secondaryDominantsMinorRelative: "- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -" + .split(" ") + .map(romanInTonic), + substituteDominants: "- bIII7 IV7 bV7 bVI7 bVII7 -" + .split(" ") + .map(romanInTonic), + substituteDominantsMinorRelative: "- IIIm7 Im7 IIbm7 VIm7 IVm7 -" + .split(" ") + .map(romanInTonic), + }; +} +/** + * Get minor key properties in a given tonic + * @param tonic + */ +function minorKey(tnc) { + const pc = note(tnc).pc; + if (!pc) + return NoMinorKey; + const alteration = distInFifths("C", pc) - 3; + return { + type: "minor", + tonic: pc, + relativeMajor: transpose(pc, "3m"), + alteration, + keySignature: altToAcc(alteration), + natural: NaturalScale(pc), + harmonic: HarmonicScale(pc), + melodic: MelodicScale(pc), + }; +} +/** + * Given a key signature, returns the tonic of the major key + * @param sigature + * @example + * majorTonicFromKeySignature('###') // => 'A' + */ +function majorTonicFromKeySignature(sig) { + if (typeof sig === "number") { + return transposeFifths$1("C", sig); + } + else if (typeof sig === "string" && /^b+|#+$/.test(sig)) { + return transposeFifths$1("C", accToAlt(sig)); + } + return null; +} +var index$9 = { majorKey, majorTonicFromKeySignature, minorKey }; + +const MODES = [ + [0, 2773, 0, "ionian", "", "Maj7", "major"], + [1, 2902, 2, "dorian", "m", "m7"], + [2, 3418, 4, "phrygian", "m", "m7"], + [3, 2741, -1, "lydian", "", "Maj7"], + [4, 2774, 1, "mixolydian", "", "7"], + [5, 2906, 3, "aeolian", "m", "m7", "minor"], + [6, 3434, 5, "locrian", "dim", "m7b5"], +]; +const NoMode = { + ...EmptyPcset, + name: "", + alt: 0, + modeNum: NaN, + triad: "", + seventh: "", + aliases: [], +}; +const modes$1 = MODES.map(toMode); +const index$a = {}; +modes$1.forEach((mode) => { + index$a[mode.name] = mode; + mode.aliases.forEach((alias) => { + index$a[alias] = mode; + }); +}); +/** + * Get a Mode by it's name + * + * @example + * get('dorian') + * // => + * // { + * // intervals: [ '1P', '2M', '3m', '4P', '5P', '6M', '7m' ], + * // modeNum: 1, + * // chroma: '101101010110', + * // normalized: '101101010110', + * // name: 'dorian', + * // setNum: 2902, + * // alt: 2, + * // triad: 'm', + * // seventh: 'm7', + * // aliases: [] + * // } + */ +function get$7(name) { + return typeof name === "string" + ? index$a[name.toLowerCase()] || NoMode + : name && name.name + ? get$7(name.name) + : NoMode; +} +const mode = deprecate("Mode.mode", "Mode.get", get$7); +/** + * Get a list of all modes + */ +function all$2() { + return modes$1.slice(); +} +const entries$2 = deprecate("Mode.mode", "Mode.all", all$2); +/** + * Get a list of all mode names + */ +function names$6() { + return modes$1.map((mode) => mode.name); +} +function toMode(mode) { + const [modeNum, setNum, alt, name, triad, seventh, alias] = mode; + const aliases = alias ? [alias] : []; + const chroma = Number(setNum).toString(2); + const intervals = get$2(name).intervals; + return { + empty: false, + intervals, + modeNum, + chroma, + normalized: chroma, + name, + setNum, + alt, + triad, + seventh, + aliases, + }; +} +function notes(modeName, tonic) { + return get$7(modeName).intervals.map((ivl) => transpose(tonic, ivl)); +} +function chords(chords) { + return (modeName, tonic) => { + const mode = get$7(modeName); + if (mode.empty) + return []; + const triads = rotate(mode.modeNum, chords); + const tonics = mode.intervals.map((i) => transpose(tonic, i)); + return triads.map((triad, i) => tonics[i] + triad); + }; +} +const triads = chords(MODES.map((x) => x[4])); +const seventhChords = chords(MODES.map((x) => x[5])); +function distance$2(destination, source) { + const from = get$7(source); + const to = get$7(destination); + if (from.empty || to.empty) + return ""; + return simplify(transposeFifths("1P", to.alt - from.alt)); +} +function relativeTonic(destination, source, tonic) { + return transpose(tonic, distance$2(destination, source)); +} +var index$1$3 = { + get: get$7, + names: names$6, + all: all$2, + distance: distance$2, + relativeTonic, + notes, + triads, + seventhChords, + // deprecated + entries: entries$2, + mode, +}; + +/** + * References: + * - https://www.researchgate.net/publication/327567188_An_Algorithm_for_Spelling_the_Pitches_of_Any_Musical_Scale + * @module scale + */ +const NoScale = { + empty: true, + name: "", + type: "", + tonic: null, + setNum: NaN, + chroma: "", + normalized: "", + aliases: [], + notes: [], + intervals: [], +}; +/** + * Given a string with a scale name and (optionally) a tonic, split + * that components. + * + * It retuns an array with the form [ name, tonic ] where tonic can be a + * note name or null and name can be any arbitrary string + * (this function doesn"t check if that scale name exists) + * + * @function + * @param {string} name - the scale name + * @return {Array} an array [tonic, name] + * @example + * tokenize("C mixolydean") // => ["C", "mixolydean"] + * tokenize("anything is valid") // => ["", "anything is valid"] + * tokenize() // => ["", ""] + */ +function tokenize$1(name) { + if (typeof name !== "string") { + return ["", ""]; + } + const i = name.indexOf(" "); + const tonic = note(name.substring(0, i)); + if (tonic.empty) { + const n = note(name); + return n.empty ? ["", name] : [n.name, ""]; + } + const type = name.substring(tonic.name.length + 1); + return [tonic.name, type.length ? type : ""]; +} +/** + * Get all scale names + * @function + */ +const names$7 = names$1; +/** + * Get a Scale from a scale name. + */ +function get$8(src) { + const tokens = Array.isArray(src) ? src : tokenize$1(src); + const tonic = note(tokens[0]).name; + const st = get$2(tokens[1]); + if (st.empty) { + return NoScale; + } + const type = st.name; + const notes = tonic + ? st.intervals.map((i) => transpose(tonic, i)) + : []; + const name = tonic ? tonic + " " + type : type; + return { ...st, name, type, tonic, notes }; +} +const scale = deprecate("Scale.scale", "Scale.get", get$8); +/** + * Get all chords that fits a given scale + * + * @function + * @param {string} name - the scale name + * @return {Array} - the chord names + * + * @example + * scaleChords("pentatonic") // => ["5", "64", "M", "M6", "Madd9", "Msus2"] + */ +function scaleChords(name) { + const s = get$8(name); + const inScale = isSubsetOf(s.chroma); + return all() + .filter((chord) => inScale(chord.chroma)) + .map((chord) => chord.aliases[0]); +} +/** + * Get all scales names that are a superset of the given one + * (has the same notes and at least one more) + * + * @function + * @param {string} name + * @return {Array} a list of scale names + * @example + * extended("major") // => ["bebop", "bebop dominant", "bebop major", "chromatic", "ichikosucho"] + */ +function extended(name) { + const s = get$8(name); + const isSuperset = isSupersetOf(s.chroma); + return all$1() + .filter((scale) => isSuperset(scale.chroma)) + .map((scale) => scale.name); +} +/** + * Find all scales names that are a subset of the given one + * (has less notes but all from the given scale) + * + * @function + * @param {string} name + * @return {Array} a list of scale names + * + * @example + * reduced("major") // => ["ionian pentatonic", "major pentatonic", "ritusen"] + */ +function reduced(name) { + const isSubset = isSubsetOf(get$8(name).chroma); + return all$1() + .filter((scale) => isSubset(scale.chroma)) + .map((scale) => scale.name); +} +/** + * Given an array of notes, return the scale: a pitch class set starting from + * the first note of the array + * + * @function + * @param {string[]} notes + * @return {string[]} pitch classes with same tonic + * @example + * scaleNotes(['C4', 'c3', 'C5', 'C4', 'c4']) // => ["C"] + * scaleNotes(['D4', 'c#5', 'A5', 'F#6']) // => ["D", "F#", "A", "C#"] + */ +function scaleNotes(notes) { + const pcset = notes.map((n) => note(n).pc).filter((x) => x); + const tonic = pcset[0]; + const scale = sortedUniqNames(pcset); + return rotate(scale.indexOf(tonic), scale); +} +/** + * Find mode names of a scale + * + * @function + * @param {string} name - scale name + * @example + * modeNames("C pentatonic") // => [ + * ["C", "major pentatonic"], + * ["D", "egyptian"], + * ["E", "malkos raga"], + * ["G", "ritusen"], + * ["A", "minor pentatonic"] + * ] + */ +function modeNames(name) { + const s = get$8(name); + if (s.empty) { + return []; + } + const tonics = s.tonic ? s.notes : s.intervals; + return modes(s.chroma) + .map((chroma, i) => { + const modeName = get$8(chroma).name; + return modeName ? [tonics[i], modeName] : ["", ""]; + }) + .filter((x) => x[0]); +} +function getNoteNameOf(scale) { + const names = Array.isArray(scale) ? scaleNotes(scale) : get$8(scale).notes; + const chromas = names.map((name) => note(name).chroma); + return (noteOrMidi) => { + const currNote = typeof noteOrMidi === "number" + ? note(fromMidi(noteOrMidi)) + : note(noteOrMidi); + const height = currNote.height; + if (height === undefined) + return undefined; + const chroma = height % 12; + const position = chromas.indexOf(chroma); + if (position === -1) + return undefined; + return enharmonic(currNote.name, names[position]); + }; +} +function rangeOf(scale) { + const getName = getNoteNameOf(scale); + return (fromNote, toNote) => { + const from = note(fromNote).height; + const to = note(toNote).height; + if (from === undefined || to === undefined) + return []; + return range(from, to) + .map(getName) + .filter((x) => x); + }; +} +var index$b = { + get: get$8, + names: names$7, + extended, + modeNames, + reduced, + scaleChords, + scaleNotes, + tokenize: tokenize$1, + rangeOf, + // deprecated + scale, +}; + +export { index$6 as A, index$1$3 as B, Core as C, index$8 as D, accToAlt as E, altToAcc as F, coordToInterval as G, coordToNote as H, decode as I, encode as J, fillStr as K, isNamed as L, isPitch as M, stepToLetter as N, tokenizeInterval as O, index$7 as a, index$5 as b, all as c, distance as d, tokenizeNote as e, deprecate as f, get$1 as g, isSupersetOf as h, index$b as i, all$1 as j, isSubsetOf as k, get$6 as l, modes as m, note as n, interval as o, compact as p, toMidi as q, range as r, midiToNoteName as s, transpose as t, index$1 as u, index$1$1 as v, index$1$2 as w, index as x, index$4 as y, index$9 as z }; diff --git a/docs/_snowpack/pkg/import-map.json b/docs/_snowpack/pkg/import-map.json index 3a2eaeed..dc8f9809 100644 --- a/docs/_snowpack/pkg/import-map.json +++ b/docs/_snowpack/pkg/import-map.json @@ -1,6 +1,7 @@ { "imports": { "@tonaljs/tonal": "./@tonaljs/tonal.js", + "chord-voicings": "./chord-voicings.js", "codemirror/lib/codemirror.css": "./codemirror/lib/codemirror.css", "codemirror/mode/javascript/javascript.js": "./codemirror/mode/javascript/javascript.js", "codemirror/mode/pegjs/pegjs.js": "./codemirror/mode/pegjs/pegjs.js", @@ -8,6 +9,7 @@ "estraverse": "./estraverse.js", "fraction.js": "./fractionjs.js", "multimap": "./multimap.js", + "ramda": "./ramda.js", "react": "./react.js", "react-codemirror2": "./react-codemirror2.js", "react-dom": "./react-dom.js", diff --git a/docs/_snowpack/pkg/ramda.js b/docs/_snowpack/pkg/ramda.js new file mode 100644 index 00000000..4ddeeb90 --- /dev/null +++ b/docs/_snowpack/pkg/ramda.js @@ -0,0 +1,606 @@ +function _isPlaceholder(a) { + return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; +} + +/** + * Optimized internal one-arity curry function. + * + * @private + * @category Function + * @param {Function} fn The function to curry. + * @return {Function} The curried function. + */ + +function _curry1(fn) { + return function f1(a) { + if (arguments.length === 0 || _isPlaceholder(a)) { + return f1; + } else { + return fn.apply(this, arguments); + } + }; +} + +/** + * Optimized internal two-arity curry function. + * + * @private + * @category Function + * @param {Function} fn The function to curry. + * @return {Function} The curried function. + */ + +function _curry2(fn) { + return function f2(a, b) { + switch (arguments.length) { + case 0: + return f2; + + case 1: + return _isPlaceholder(a) ? f2 : _curry1(function (_b) { + return fn(a, _b); + }); + + default: + return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) { + return fn(_a, b); + }) : _isPlaceholder(b) ? _curry1(function (_b) { + return fn(a, _b); + }) : fn(a, b); + } + }; +} + +function _arity(n, fn) { + /* eslint-disable no-unused-vars */ + switch (n) { + case 0: + return function () { + return fn.apply(this, arguments); + }; + + case 1: + return function (a0) { + return fn.apply(this, arguments); + }; + + case 2: + return function (a0, a1) { + return fn.apply(this, arguments); + }; + + case 3: + return function (a0, a1, a2) { + return fn.apply(this, arguments); + }; + + case 4: + return function (a0, a1, a2, a3) { + return fn.apply(this, arguments); + }; + + case 5: + return function (a0, a1, a2, a3, a4) { + return fn.apply(this, arguments); + }; + + case 6: + return function (a0, a1, a2, a3, a4, a5) { + return fn.apply(this, arguments); + }; + + case 7: + return function (a0, a1, a2, a3, a4, a5, a6) { + return fn.apply(this, arguments); + }; + + case 8: + return function (a0, a1, a2, a3, a4, a5, a6, a7) { + return fn.apply(this, arguments); + }; + + case 9: + return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { + return fn.apply(this, arguments); + }; + + case 10: + return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + return fn.apply(this, arguments); + }; + + default: + throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); + } +} + +/** + * Optimized internal three-arity curry function. + * + * @private + * @category Function + * @param {Function} fn The function to curry. + * @return {Function} The curried function. + */ + +function _curry3(fn) { + return function f3(a, b, c) { + switch (arguments.length) { + case 0: + return f3; + + case 1: + return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { + return fn(a, _b, _c); + }); + + case 2: + return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { + return fn(_a, b, _c); + }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { + return fn(a, _b, _c); + }) : _curry1(function (_c) { + return fn(a, b, _c); + }); + + default: + return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { + return fn(_a, _b, c); + }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { + return fn(_a, b, _c); + }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { + return fn(a, _b, _c); + }) : _isPlaceholder(a) ? _curry1(function (_a) { + return fn(_a, b, c); + }) : _isPlaceholder(b) ? _curry1(function (_b) { + return fn(a, _b, c); + }) : _isPlaceholder(c) ? _curry1(function (_c) { + return fn(a, b, _c); + }) : fn(a, b, c); + } + }; +} + +/** + * Tests whether or not an object is an array. + * + * @private + * @param {*} val The object to test. + * @return {Boolean} `true` if `val` is an array, `false` otherwise. + * @example + * + * _isArray([]); //=> true + * _isArray(null); //=> false + * _isArray({}); //=> false + */ +var _isArray = Array.isArray || function _isArray(val) { + return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; +}; + +function _isString(x) { + return Object.prototype.toString.call(x) === '[object String]'; +} + +/** + * Tests whether or not an object is similar to an array. + * + * @private + * @category Type + * @category List + * @sig * -> Boolean + * @param {*} x The object to test. + * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. + * @example + * + * _isArrayLike([]); //=> true + * _isArrayLike(true); //=> false + * _isArrayLike({}); //=> false + * _isArrayLike({length: 10}); //=> false + * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true + * _isArrayLike({nodeType: 1, length: 1}) // => false + */ + +var _isArrayLike = +/*#__PURE__*/ +_curry1(function isArrayLike(x) { + if (_isArray(x)) { + return true; + } + + if (!x) { + return false; + } + + if (typeof x !== 'object') { + return false; + } + + if (_isString(x)) { + return false; + } + + if (x.length === 0) { + return true; + } + + if (x.length > 0) { + return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); + } + + return false; +}); + +var XWrap = +/*#__PURE__*/ +function () { + function XWrap(fn) { + this.f = fn; + } + + XWrap.prototype['@@transducer/init'] = function () { + throw new Error('init not implemented on XWrap'); + }; + + XWrap.prototype['@@transducer/result'] = function (acc) { + return acc; + }; + + XWrap.prototype['@@transducer/step'] = function (acc, x) { + return this.f(acc, x); + }; + + return XWrap; +}(); + +function _xwrap(fn) { + return new XWrap(fn); +} + +/** + * Creates a function that is bound to a context. + * Note: `R.bind` does not provide the additional argument-binding capabilities of + * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). + * + * @func + * @memberOf R + * @since v0.6.0 + * @category Function + * @category Object + * @sig (* -> *) -> {*} -> (* -> *) + * @param {Function} fn The function to bind to context + * @param {Object} thisObj The context to bind `fn` to + * @return {Function} A function that will execute in the context of `thisObj`. + * @see R.partial + * @example + * + * const log = R.bind(console.log, console); + * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} + * // logs {a: 2} + * @symb R.bind(f, o)(a, b) = f.call(o, a, b) + */ + +var bind = +/*#__PURE__*/ +_curry2(function bind(fn, thisObj) { + return _arity(fn.length, function () { + return fn.apply(thisObj, arguments); + }); +}); + +function _arrayReduce(xf, acc, list) { + var idx = 0; + var len = list.length; + + while (idx < len) { + acc = xf['@@transducer/step'](acc, list[idx]); + + if (acc && acc['@@transducer/reduced']) { + acc = acc['@@transducer/value']; + break; + } + + idx += 1; + } + + return xf['@@transducer/result'](acc); +} + +function _iterableReduce(xf, acc, iter) { + var step = iter.next(); + + while (!step.done) { + acc = xf['@@transducer/step'](acc, step.value); + + if (acc && acc['@@transducer/reduced']) { + acc = acc['@@transducer/value']; + break; + } + + step = iter.next(); + } + + return xf['@@transducer/result'](acc); +} + +function _methodReduce(xf, acc, obj, methodName) { + return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc)); +} + +var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; +function _reduce(fn, acc, list) { + if (typeof fn === 'function') { + fn = _xwrap(fn); + } + + if (_isArrayLike(list)) { + return _arrayReduce(fn, acc, list); + } + + if (typeof list['fantasy-land/reduce'] === 'function') { + return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); + } + + if (list[symIterator] != null) { + return _iterableReduce(fn, acc, list[symIterator]()); + } + + if (typeof list.next === 'function') { + return _iterableReduce(fn, acc, list); + } + + if (typeof list.reduce === 'function') { + return _methodReduce(fn, acc, list, 'reduce'); + } + + throw new TypeError('reduce: list must be array or iterable'); +} + +/** + * Returns a single item by iterating through the list, successively calling + * the iterator function and passing it an accumulator value and the current + * value from the array, and then passing the result to the next call. + * + * The iterator function receives two values: *(acc, value)*. It may use + * [`R.reduced`](#reduced) to shortcut the iteration. + * + * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function + * is *(value, acc)*. + * + * Note: `R.reduce` does not skip deleted or unassigned indices (sparse + * arrays), unlike the native `Array.prototype.reduce` method. For more details + * on this behavior, see: + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description + * + * Dispatches to the `reduce` method of the third argument, if present. When + * doing so, it is up to the user to handle the [`R.reduced`](#reduced) + * shortcuting, as this is not implemented by `reduce`. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig ((a, b) -> a) -> a -> [b] -> a + * @param {Function} fn The iterator function. Receives two values, the accumulator and the + * current element from the array. + * @param {*} acc The accumulator value. + * @param {Array} list The list to iterate over. + * @return {*} The final, accumulated value. + * @see R.reduced, R.addIndex, R.reduceRight + * @example + * + * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 + * // - -10 + * // / \ / \ + * // - 4 -6 4 + * // / \ / \ + * // - 3 ==> -3 3 + * // / \ / \ + * // - 2 -1 2 + * // / \ / \ + * // 0 1 0 1 + * + * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) + */ + +var reduce = +/*#__PURE__*/ +_curry3(_reduce); + +function _pipe(f, g) { + return function () { + return g.call(this, f.apply(this, arguments)); + }; +} + +/** + * This checks whether a function has a [methodname] function. If it isn't an + * array it will execute that function otherwise it will default to the ramda + * implementation. + * + * @private + * @param {Function} fn ramda implementation + * @param {String} methodname property to check for a custom implementation + * @return {Object} Whatever the return value of the method is. + */ + +function _checkForMethod(methodname, fn) { + return function () { + var length = arguments.length; + + if (length === 0) { + return fn(); + } + + var obj = arguments[length - 1]; + return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); + }; +} + +/** + * Returns the elements of the given list or string (or object with a `slice` + * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). + * + * Dispatches to the `slice` method of the third argument, if present. + * + * @func + * @memberOf R + * @since v0.1.4 + * @category List + * @sig Number -> Number -> [a] -> [a] + * @sig Number -> Number -> String -> String + * @param {Number} fromIndex The start index (inclusive). + * @param {Number} toIndex The end index (exclusive). + * @param {*} list + * @return {*} + * @example + * + * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] + * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] + * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] + * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] + * R.slice(0, 3, 'ramda'); //=> 'ram' + */ + +var slice = +/*#__PURE__*/ +_curry3( +/*#__PURE__*/ +_checkForMethod('slice', function slice(fromIndex, toIndex, list) { + return Array.prototype.slice.call(list, fromIndex, toIndex); +})); + +/** + * Returns all but the first element of the given list or string (or object + * with a `tail` method). + * + * Dispatches to the `slice` method of the first argument, if present. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig [a] -> [a] + * @sig String -> String + * @param {*} list + * @return {*} + * @see R.head, R.init, R.last + * @example + * + * R.tail([1, 2, 3]); //=> [2, 3] + * R.tail([1, 2]); //=> [2] + * R.tail([1]); //=> [] + * R.tail([]); //=> [] + * + * R.tail('abc'); //=> 'bc' + * R.tail('ab'); //=> 'b' + * R.tail('a'); //=> '' + * R.tail(''); //=> '' + */ + +var tail = +/*#__PURE__*/ +_curry1( +/*#__PURE__*/ +_checkForMethod('tail', +/*#__PURE__*/ +slice(1, Infinity))); + +/** + * Performs left-to-right function composition. The first argument may have + * any arity; the remaining arguments must be unary. + * + * In some libraries this function is named `sequence`. + * + * **Note:** The result of pipe is not automatically curried. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Function + * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) + * @param {...Function} functions + * @return {Function} + * @see R.compose + * @example + * + * const f = R.pipe(Math.pow, R.negate, R.inc); + * + * f(3, 4); // -(3^4) + 1 + * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) + * @symb R.pipe(f, g, h)(a)(b) = h(g(f(a)))(b) + */ + +function pipe() { + if (arguments.length === 0) { + throw new Error('pipe requires at least one argument'); + } + + return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); +} + +/** + * Returns a new list or string with the elements or characters in reverse + * order. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig [a] -> [a] + * @sig String -> String + * @param {Array|String} list + * @return {Array|String} + * @example + * + * R.reverse([1, 2, 3]); //=> [3, 2, 1] + * R.reverse([1, 2]); //=> [2, 1] + * R.reverse([1]); //=> [1] + * R.reverse([]); //=> [] + * + * R.reverse('abc'); //=> 'cba' + * R.reverse('ab'); //=> 'ba' + * R.reverse('a'); //=> 'a' + * R.reverse(''); //=> '' + */ + +var reverse = +/*#__PURE__*/ +_curry1(function reverse(list) { + return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); +}); + +/** + * Performs right-to-left function composition. The last argument may have + * any arity; the remaining arguments must be unary. + * + * **Note:** The result of compose is not automatically curried. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Function + * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) + * @param {...Function} ...functions The functions to compose + * @return {Function} + * @see R.pipe + * @example + * + * const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName + * const yellGreeting = R.compose(R.toUpper, classyGreeting); + * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" + * + * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 + * + * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) + * @symb R.compose(f, g, h)(a)(b) = f(g(h(a)))(b) + */ + +function compose() { + if (arguments.length === 0) { + throw new Error('compose requires at least one argument'); + } + + return pipe.apply(this, reverse(arguments)); +} + +export { compose }; diff --git a/docs/_snowpack/pkg/react.js b/docs/_snowpack/pkg/react.js index 564097ea..017ce3a6 100644 --- a/docs/_snowpack/pkg/react.js +++ b/docs/_snowpack/pkg/react.js @@ -8,6 +8,7 @@ import './common/index-d01087d6.js'; var useCallback = react.useCallback; var useEffect = react.useEffect; var useLayoutEffect = react.useLayoutEffect; +var useMemo = react.useMemo; var useRef = react.useRef; var useState = react.useState; -export { useCallback, useEffect, useLayoutEffect, useRef, useState }; +export { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState }; diff --git a/docs/dist/App.js b/docs/dist/App.js index 937b4d06..49899b55 100644 --- a/docs/dist/App.js +++ b/docs/dist/App.js @@ -1,114 +1,57 @@ -import React, {useCallback, useEffect, useLayoutEffect, useRef, useState} from "../_snowpack/pkg/react.js"; -import logo from "./logo.svg.proxy.js"; -import cx from "./cx.js"; +import React, {useCallback, useLayoutEffect, useRef} from "../_snowpack/pkg/react.js"; import * as Tone from "../_snowpack/pkg/tone.js"; -import useCycle from "./useCycle.js"; -import * as tunes from "./tunes.js"; -import * as parser from "./parse.js"; import CodeMirror from "./CodeMirror.js"; -import hot from "../hot.js"; -import {isNote} from "../_snowpack/pkg/tone.js"; +import cx from "./cx.js"; +import {evaluate} from "./evaluate.js"; +import logo from "./logo.svg.proxy.js"; import {useWebMidi} from "./midi.js"; -const {tetris, tetrisRev, shapeShifted} = tunes; -const {parse} = parser; -const getHotCode = async () => { - return fetch("/hot.js").then((res) => res.text()).then((src) => { - return src.split("export default").slice(-1)[0].trim(); - }); -}; -const defaultSynth = new Tone.PolySynth().toDestination(); +import * as tunes from "./tunes.js"; +import useRepl from "./useRepl.js"; +const [_, codeParam] = window.location.href.split("#"); +let decoded; +try { + decoded = atob(decodeURIComponent(codeParam || "")); +} catch (err) { + console.warn("failed to decode", err); +} +const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.Destination); defaultSynth.set({ oscillator: {type: "triangle"}, envelope: { release: 0.01 } }); +function getRandomTune() { + const allTunes = Object.values(tunes); + const randomItem = (arr) => arr[Math.floor(Math.random() * arr.length)]; + return randomItem(allTunes); +} +const randomTune = getRandomTune(); function App() { - const [mode, setMode] = useState("javascript"); - const [code, setCode] = useState(shapeShifted); - const [log, setLog] = useState(""); - const logBox = useRef(); - const [error, setError] = useState(); - const [pattern, setPattern] = useState(); - const [activePattern, setActivePattern] = useState(); - const [isHot, setIsHot] = useState(false); - const pushLog = (message) => setLog((log2) => log2 + `${log2 ? "\n\n" : ""}${message}`); - const logCycle = (_events, cycle2) => { - if (_events.length) { - pushLog(`# cycle ${cycle2} -` + _events.map((e) => e.show()).join("\n")); - } - }; - const cycle = useCycle({ - onEvent: useCallback((time, event) => { - try { - if (typeof event.value === "string") { - if (!isNote(event.value)) { - throw new Error("not a note: " + event.value); - } - defaultSynth.triggerAttackRelease(event.value, event.duration, time); - } else { - const {onTrigger} = event.value; - onTrigger(time, event); - } - } catch (err) { - console.warn(err); - err.message = "unplayable event: " + err?.message; - pushLog(err.message); - } - }, []), - onQuery: useCallback((span) => { - try { - return activePattern?.query(span) || []; - } catch (err) { - setError(err); - return []; - } - }, [activePattern]), - onSchedule: useCallback((_events, cycle2) => logCycle(_events, cycle2), [activePattern]), - ready: !!activePattern + const {setCode, setPattern, error, code, cycle, dirty, log, togglePlay, activateCode, pattern, pushLog} = useRepl({ + tune: decoded || randomTune, + defaultSynth }); + const logBox = useRef(); + useLayoutEffect(() => { + logBox.current.scrollTop = logBox.current?.scrollHeight; + }, [log]); useLayoutEffect(() => { const handleKeyPress = (e) => { - if (e.ctrlKey && e.code === "Enter") { - setActivePattern(() => pattern); - !cycle.started && cycle.start(); + if (e.ctrlKey || e.altKey) { + switch (e.code) { + case "Enter": + activateCode(); + !cycle.started && cycle.start(); + break; + case "Period": + cycle.stop(); + } } }; document.addEventListener("keypress", handleKeyPress); return () => document.removeEventListener("keypress", handleKeyPress); - }, [pattern]); - useEffect(() => { - let _code = code; - if (isHot) { - if (typeof hot !== "string") { - getHotCode().then((_code2) => { - setCode(_code2); - setMode("javascript"); - }); - setActivePattern(hot); - return; - } else { - _code = hot; - setCode(_code); - } - } - try { - const parsed = parse(_code); - setPattern(() => parsed.pattern); - if (!activePattern || isHot) { - setActivePattern(() => parsed.pattern); - } - setMode(parsed.mode); - setError(void 0); - } catch (err) { - console.warn(err); - setError(err); - } - }, [code, isHot]); - useLayoutEffect(() => { - logBox.current.scrollTop = logBox.current?.scrollHeight; - }, [log]); + }, [pattern, code]); useWebMidi({ ready: useCallback(({outputs}) => { pushLog(`WebMidi ready! Just add .midi(${outputs.map((o) => `"${o.name}"`).join(" | ")}) to the pattern. `); @@ -121,7 +64,7 @@ function App() { }, []) }); return /* @__PURE__ */ React.createElement("div", { - className: "h-screen bg-slate-900 flex flex-col" + className: "min-h-screen bg-[#2A3236] flex flex-col" }, /* @__PURE__ */ React.createElement("header", { className: "flex-none w-full h-16 px-2 flex border-b border-gray-200 bg-white justify-between" }, /* @__PURE__ */ React.createElement("div", { @@ -132,42 +75,43 @@ function App() { alt: "logo" }), /* @__PURE__ */ React.createElement("h1", { className: "text-2xl" - }, "Strudel REPL")), window.location.href.includes("http://localhost:8080") && /* @__PURE__ */ React.createElement("button", { + }, "Strudel REPL")), /* @__PURE__ */ React.createElement("div", { + className: "flex space-x-4" + }, /* @__PURE__ */ React.createElement("button", { onClick: () => { - if (isHot || confirm("Really switch? You might loose your current pattern..")) { - setIsHot((h) => !h); - } + const _code = getRandomTune(); + console.log("tune", _code); + setCode(_code); + const parsed = evaluate(_code); + setPattern(parsed.pattern); } - }, isHot ? "🔥" : " ", " toggle hot mode")), /* @__PURE__ */ React.createElement("section", { - className: "grow flex flex-col p-2 text-gray-100" + }, "🎲 random tune"), /* @__PURE__ */ React.createElement("button", null, /* @__PURE__ */ React.createElement("a", { + href: "./tutorial" + }, "📚 tutorial")))), /* @__PURE__ */ React.createElement("section", { + className: "grow flex flex-col text-gray-100" }, /* @__PURE__ */ React.createElement("div", { className: "grow relative" }, /* @__PURE__ */ React.createElement("div", { - className: cx("h-full bg-[#2A3236]", error ? "focus:ring-red-500" : "focus:ring-slate-800") + className: cx("h-full bg-[#2A3236]", error ? "focus:ring-red-500" : "focus:ring-slate-800") }, /* @__PURE__ */ React.createElement(CodeMirror, { value: code, - readOnly: isHot, options: { - mode, + mode: "javascript", theme: "material", lineNumbers: true }, - onChange: (_, __, value) => { - if (!isHot) { - setCode(value); - } - } + onChange: (_2, __, value) => setCode(value) }), /* @__PURE__ */ React.createElement("span", { - className: "p-4 absolute bottom-0 left-0 text-xs whitespace-pre" + className: "p-4 absolute top-0 right-0 text-xs whitespace-pre text-right" }, !cycle.started ? `press ctrl+enter to play -` : !isHot && activePattern !== pattern ? `ctrl+enter to update -` : "no changes\n", !isHot && /* @__PURE__ */ React.createElement(React.Fragment, null, {pegjs: "mini"}[mode] || mode, " mode"), isHot && "🔥 hot mode: go to hot.js to edit pattern, then save")), error && /* @__PURE__ */ React.createElement("div", { - className: "absolute right-2 bottom-2 text-red-500" +` : dirty ? `ctrl+enter to update +` : "no changes\n")), error && /* @__PURE__ */ React.createElement("div", { + className: cx("absolute right-2 bottom-2", "text-red-500") }, error?.message || "unknown error")), /* @__PURE__ */ React.createElement("button", { className: "flex-none w-full border border-gray-700 p-2 bg-slate-700 hover:bg-slate-500", - onClick: () => cycle.toggle() + onClick: () => togglePlay() }, cycle.started ? "pause" : "play"), /* @__PURE__ */ React.createElement("textarea", { - className: "grow bg-[#283237] border-0 text-xs", + className: "grow bg-[#283237] border-0 text-xs min-h-[200px]", value: log, readOnly: true, ref: logBox, diff --git a/docs/dist/evaluate.js b/docs/dist/evaluate.js new file mode 100644 index 00000000..f1d871bc --- /dev/null +++ b/docs/dist/evaluate.js @@ -0,0 +1,36 @@ +import * as strudel from "../_snowpack/link/strudel.js"; +import "./tone.js"; +import "./midi.js"; +import "./voicings.js"; +import "./tonal.js"; +import "./groove.js"; +import shapeshifter from "./shapeshifter.js"; +import {minify} from "./parse.js"; +import * as Tone from "../_snowpack/pkg/tone.js"; +import * as toneHelpers from "./tone.js"; +const bootstrapped = {...strudel, ...strudel.Pattern.prototype.bootstrap()}; +function hackLiteral(literal, names, func) { + names.forEach((name) => { + Object.defineProperty(literal.prototype, name, { + get: function() { + return func(String(this)); + } + }); + }); +} +hackLiteral(String, ["mini", "m"], bootstrapped.mini); +hackLiteral(String, ["pure", "p"], bootstrapped.pure); +Object.assign(globalThis, bootstrapped, Tone, toneHelpers); +export const evaluate = (code) => { + const shapeshifted = shapeshifter(code); + let evaluated = eval(shapeshifted); + if (typeof evaluated === "function") { + evaluated = evaluated(); + } + const pattern = minify(evaluated); + if (pattern?.constructor?.name !== "Pattern") { + const message = `got "${typeof pattern}" instead of pattern`; + throw new Error(message + (typeof pattern === "function" ? ", did you forget to call a function?" : ".")); + } + return {mode: "javascript", pattern}; +}; diff --git a/docs/dist/groove.js b/docs/dist/groove.js new file mode 100644 index 00000000..2a874048 --- /dev/null +++ b/docs/dist/groove.js @@ -0,0 +1,6 @@ +import {Pattern as _Pattern} from "../_snowpack/link/strudel.js"; +const Pattern = _Pattern; +Pattern.prototype.groove = function(groove) { + return groove.fmap(() => (v) => v).appLeft(this); +}; +Pattern.prototype.define("groove", (groove, pat) => pat.groove(groove), {composable: true}); diff --git a/docs/dist/midi.js b/docs/dist/midi.js index 5294c81c..89cb0037 100644 --- a/docs/dist/midi.js +++ b/docs/dist/midi.js @@ -24,6 +24,7 @@ Pattern.prototype.midi = function(output, channel = 1) { return this.fmap((value) => ({ ...value, onTrigger: (time, event) => { + value = value.value || value; if (!isNote(value)) { throw new Error("not a note: " + value); } @@ -41,7 +42,7 @@ Pattern.prototype.midi = function(output, channel = 1) { time = time * 1e3 + timingOffset; device.playNote(value, channel, { time, - duration: event.duration * 1e3, + duration: event.duration * 1e3 - 5, velocity: 0.9 }); } diff --git a/docs/dist/parse.js b/docs/dist/parse.js index 62021d60..3586b2b1 100644 --- a/docs/dist/parse.js +++ b/docs/dist/parse.js @@ -1,38 +1,7 @@ import * as krill from "../_snowpack/link/repl/krill-parser.js"; import * as strudel from "../_snowpack/link/strudel.js"; import {Scale, Note, Interval} from "../_snowpack/pkg/@tonaljs/tonal.js"; -import "./tone.js"; -import "./midi.js"; -import * as toneStuff from "./tone.js"; -import shapeshifter from "./shapeshifter.js"; -const { - pure, - stack, - slowcat, - fastcat, - cat, - sequence, - polymeter, - pm, - polyrhythm, - pr, - silence, - Fraction, - timeCat -} = strudel; -const {autofilter, filter, gain} = toneStuff; -function reify(thing) { - if (thing?.constructor?.name === "Pattern") { - return thing; - } - return pure(thing); -} -function minify(thing) { - if (typeof thing === "string") { - return mini(thing); - } - return reify(thing); -} +const {pure, Pattern, Fraction, stack, slowcat, sequence, timeCat, silence} = strudel; const applyOptions = (parent) => (pat, i) => { const ast = parent.source_[i]; const options = ast.options_; @@ -54,16 +23,56 @@ const applyOptions = (parent) => (pat, i) => { } return pat; }; +function resolveReplications(ast) { + ast.source_ = ast.source_.map((child) => { + const {replicate, ...options} = child.options_ || {}; + if (replicate) { + return { + ...child, + options_: {...options, weight: replicate}, + source_: { + type_: "pattern", + arguments_: { + alignment: "h" + }, + source_: [ + { + type_: "element", + source_: child.source_, + options_: { + operator: { + type_: "stretch", + arguments_: {amount: String(new Fraction(replicate).inverse().valueOf())} + } + } + } + ] + } + }; + } + return child; + }); +} export function patternifyAST(ast) { switch (ast.type_) { case "pattern": + resolveReplications(ast); const children = ast.source_.map(patternifyAST).map(applyOptions(ast)); - if (ast.arguments_.alignment === "v") { + const alignment = ast.arguments_.alignment; + if (alignment === "v") { return stack(...children); } const weightedChildren = ast.source_.some((child) => !!child.options_?.weight); + if (!weightedChildren && alignment === "t") { + return slowcat(...children); + } if (weightedChildren) { - return timeCat(...ast.source_.map((child, i) => [child.options_?.weight || 1, children[i]])); + const pat = timeCat(...ast.source_.map((child, i) => [child.options_?.weight || 1, children[i]])); + if (alignment === "t") { + const weightSum = ast.source_.reduce((sum, child) => sum + (child.options_?.weight || 1), 0); + return pat._slow(weightSum); + } + return pat; } return sequence(...children); case "element": @@ -89,7 +98,7 @@ export function patternifyAST(ast) { return step; } const octaves = Math.floor(step / intervals.length); - const mod = (n, m2) => n < 0 ? mod(n + m2, m2) : n % m2; + const mod = (n, m) => n < 0 ? mod(n + m, m) : n % m; const index = mod(step, intervals.length); const interval = Interval.add(intervals[index], Interval.fromSemitones(octaves * 12)); return Note.transpose(tonic, interval || "1P"); @@ -100,35 +109,28 @@ export function patternifyAST(ast) { } } export const mini = (...strings) => { - const pattern = sequence(...strings.map((str) => { + const pats = strings.map((str) => { const ast = krill.parse(`"${str}"`); return patternifyAST(ast); - })); - return pattern; -}; -const m = mini; -const s = (...strings) => { - const patternified = strings.map((s2) => minify(s2)); - return stack(...patternified); + }); + return sequence(...pats); }; export const h = (string) => { const ast = krill.parse(string); return patternifyAST(ast); }; -export const parse = (code) => { - let _pattern; - let mode; - try { - _pattern = h(code); - mode = "pegjs"; - } catch (err) { - mode = "javascript"; - code = shapeshifter(code); - _pattern = eval(code); - if (_pattern?.constructor?.name !== "Pattern") { - const message = `got "${typeof _pattern}" instead of pattern`; - throw new Error(message + (typeof _pattern === "function" ? ", did you forget to call a function?" : ".")); - } +Pattern.prototype.define("mini", mini, {composable: true}); +Pattern.prototype.define("m", mini, {composable: true}); +Pattern.prototype.define("h", h, {composable: true}); +export function reify(thing) { + if (thing?.constructor?.name === "Pattern") { + return thing; } - return {mode, pattern: _pattern}; -}; + return pure(thing); +} +export function minify(thing) { + if (typeof thing === "string") { + return mini(thing); + } + return reify(thing); +} diff --git a/docs/dist/shapeshifter.js b/docs/dist/shapeshifter.js index a37cd15d..5123d24f 100644 --- a/docs/dist/shapeshifter.js +++ b/docs/dist/shapeshifter.js @@ -24,3 +24,7 @@ export default (code) => { }); return codegen(shifted); }; + +// TODO: turn x.groove['[~ x]*2'] into x.groove('[~ x]*2'.m) +// and ['c1*2'].xx into 'c1*2'.m.xx ?? +// or just all templated strings?? x.groove(`[~ x]*2`) \ No newline at end of file diff --git a/docs/dist/tonal.js b/docs/dist/tonal.js new file mode 100644 index 00000000..12113872 --- /dev/null +++ b/docs/dist/tonal.js @@ -0,0 +1,71 @@ +import {Note, Interval, Scale} from "../_snowpack/pkg/@tonaljs/tonal.js"; +import {Pattern as _Pattern} from "../_snowpack/link/strudel.js"; +const Pattern = _Pattern; +function toNoteEvent(event) { + if (typeof event === "string") { + return {value: event}; + } + if (event.value) { + return event; + } + throw new Error("not a valid note event: " + JSON.stringify(event)); +} +const mod = (n, m) => n < 0 ? mod(n + m, m) : n % m; +export function intervalDirection(from, to, direction = 1) { + const sign = Math.sign(direction); + const interval = sign < 0 ? Interval.distance(to, from) : Interval.distance(from, to); + return (sign < 0 ? "-" : "") + interval; +} +function scaleTranspose(scale, offset, note) { + let [tonic, scaleName] = Scale.tokenize(scale); + const {notes} = Scale.get(`${tonic} ${scaleName}`); + offset = Number(offset); + if (isNaN(offset)) { + throw new Error(`scale offset "${offset}" not a number`); + } + const {pc: fromPc, oct = 3} = Note.get(note); + const noteIndex = notes.indexOf(fromPc); + if (noteIndex === -1) { + throw new Error(`note "${note}" is not in scale "${scale}"`); + } + let i = noteIndex, o = oct, n = fromPc; + const direction = Math.sign(offset); + while (Math.abs(i - noteIndex) < Math.abs(offset)) { + i += direction; + const index = mod(i, notes.length); + if (direction < 0 && n === "C") { + o += direction; + } + n = notes[index]; + if (direction > 0 && n === "C") { + o += direction; + } + } + return n + o; +} +Pattern.prototype._mapNotes = function(func) { + return this.fmap((event) => { + const noteEvent = toNoteEvent(event); + return {...noteEvent, ...func(noteEvent)}; + }); +}; +Pattern.prototype._transpose = function(intervalOrSemitones) { + return this._mapNotes(({value, scale}) => { + const interval = !isNaN(Number(intervalOrSemitones)) ? Interval.fromSemitones(intervalOrSemitones) : String(intervalOrSemitones); + return {value: Note.transpose(value, interval), scale}; + }); +}; +Pattern.prototype._scaleTranspose = function(offset) { + return this._mapNotes(({value, scale}) => { + if (!scale) { + throw new Error("can only use scaleOffset after .scale"); + } + return {value: scaleTranspose(scale, Number(offset), value), scale}; + }); +}; +Pattern.prototype._scale = function(scale) { + return this._mapNotes((value) => ({...value, scale})); +}; +Pattern.prototype.define("transpose", (a, pat) => pat.transpose(a), {composable: true, patternified: true}); +Pattern.prototype.define("scale", (a, pat) => pat.scale(a), {composable: true, patternified: true}); +Pattern.prototype.define("scaleTranspose", (a, pat) => pat.scaleTranspose(a), {composable: true, patternified: true}); diff --git a/docs/dist/tone.js b/docs/dist/tone.js index 7bdd9560..ca38194a 100644 --- a/docs/dist/tone.js +++ b/docs/dist/tone.js @@ -1,6 +1,62 @@ import {Pattern as _Pattern} from "../_snowpack/link/strudel.js"; -import {AutoFilter, Destination, Filter, Gain, isNote, Synth} from "../_snowpack/pkg/tone.js"; +import {AutoFilter, Destination, Filter, Gain, isNote, Synth, PolySynth} from "../_snowpack/pkg/tone.js"; const Pattern = _Pattern; +Pattern.prototype.tone = function(instrument) { + return this.fmap((value) => { + value = typeof value !== "object" && !Array.isArray(value) ? {value} : value; + const onTrigger = (time, event) => { + if (instrument.constructor.name === "PluckSynth") { + instrument.triggerAttack(value.value, time); + } else if (instrument.constructor.name === "NoiseSynth") { + instrument.triggerAttackRelease(event.duration, time); + } else { + instrument.triggerAttackRelease(value.value, event.duration, time); + } + }; + return {...value, instrument, onTrigger}; + }); +}; +Pattern.prototype.define("tone", (type, pat) => pat.tone(type), {composable: true, patternified: false}); +export const vol = (v) => new Gain(v); +export const lowpass = (v) => new Filter(v, "lowpass"); +export const highpass = (v) => new Filter(v, "highpass"); +export const adsr = (a, d = 0.1, s = 0.4, r = 0.01) => ({envelope: {attack: a, decay: d, sustain: s, release: r}}); +export const osc = (type) => ({oscillator: {type}}); +export const out = Destination; +const chainable = function(instr) { + const _chain = instr.chain.bind(instr); + let chained = []; + instr.chain = (...args) => { + chained = chained.concat(args); + instr.disconnect(); + return _chain(...chained, Destination); + }; + instr.filter = (freq = 1e3, type = "lowpass") => instr.chain(new Filter(freq, type)); + instr.gain = (gain2 = 0.9) => instr.chain(new Gain(gain2)); + return instr; +}; +export const poly = (type) => { + const s = new PolySynth(Synth, {oscillator: {type}}).toDestination(); + return chainable(s); +}; +Pattern.prototype._poly = function(type = "triangle") { + const instrumentConfig = { + oscillator: {type}, + envelope: {attack: 0.01, decay: 0.01, sustain: 0.6, release: 0.01} + }; + if (!this.instrument) { + this.instrument = poly(type); + } + return this.fmap((value) => { + value = typeof value !== "object" && !Array.isArray(value) ? {value} : value; + const onTrigger = (time, event) => { + this.instrument.set(instrumentConfig); + this.instrument.triggerAttackRelease(value.value, event.duration, time); + }; + return {...value, instrumentConfig, onTrigger}; + }); +}; +Pattern.prototype.define("poly", (type, pat) => pat.poly(type), {composable: true, patternified: true}); const getTrigger = (getChain, value) => (time, event) => { const chain = getChain(); if (!isNote(value)) { @@ -27,9 +83,6 @@ Pattern.prototype._synth = function(type = "triangle") { return {...value, getInstrument, instrumentConfig, onTrigger}; }); }; -Pattern.prototype.synth = function(type = "triangle") { - return this._patternify(Pattern.prototype._synth)(type); -}; Pattern.prototype.adsr = function(attack = 0.01, decay = 0.01, sustain = 0.6, release = 0.01) { return this.fmap((value) => { if (!value?.getInstrument) { @@ -65,15 +118,12 @@ export const gain = (gain2 = 0.9) => () => new Gain(gain2); Pattern.prototype._gain = function(g) { return this.chain(gain(g)); }; -Pattern.prototype.gain = function(g) { - return this._patternify(Pattern.prototype._gain)(g); -}; Pattern.prototype._filter = function(freq, q, type = "lowpass") { return this.chain(filter(freq, q, type)); }; -Pattern.prototype.filter = function(freq) { - return this._patternify(Pattern.prototype._filter)(freq); -}; Pattern.prototype.autofilter = function(g) { return this.chain(autofilter(g)); }; +Pattern.prototype.define("synth", (type, pat) => pat.synth(type), {composable: true, patternified: true}); +Pattern.prototype.define("gain", (gain2, pat) => pat.synth(gain2), {composable: true, patternified: true}); +Pattern.prototype.define("filter", (cutoff, pat) => pat.filter(cutoff), {composable: true, patternified: true}); diff --git a/docs/dist/tunes.js b/docs/dist/tunes.js index 33ada3c5..6d0ea802 100644 --- a/docs/dist/tunes.js +++ b/docs/dist/tunes.js @@ -1,7 +1,7 @@ -export const timeCatMini = `s( - 'c3@3 [eb3, g3, [c4 d4]/2]', - 'c2 g2', - m('[eb4@5 [f4 eb4 d4]@3] [eb4 c4]/2').slow(8) +export const timeCatMini = `stack( + 'c3@3 [eb3, g3, [c4 d4]/2]'.mini, + 'c2 g2'.mini, + '[eb4@5 [f4 eb4 d4]@3] [eb4 c4]/2'.mini.slow(8) )`; export const timeCat = `stack( timeCat([3, c3], [1, stack(eb3, g3, m(c4, d4).slow(2))]), @@ -32,8 +32,7 @@ export const shapeShifted = `stack( b1, b2, b1, b2, e2, e3, e2, e3, a1, a2, a1, a2, a1, a2, a1, a2, ).rev() -).slow(16).rev()`; -export const tetrisMidi = `${shapeShifted}.midi('IAC-Treiber Bus 1')`; +).slow(16)`; export const tetrisWithFunctions = `stack(sequence( 'e5', sequence('b4', 'c5'), 'd5', sequence('c5', 'b4'), 'a4', sequence('a4', 'c5'), 'e5', sequence('d5', 'c5'), @@ -53,9 +52,8 @@ export const tetrisWithFunctions = `stack(sequence( 'b1', 'b2', 'b1', 'b2', 'e2', 'e3', 'e2', 'e3', 'a1', 'a2', 'a1', 'a2', 'a1', 'a2', 'a1', 'a2', ) -)._slow(16)`; +).slow(16)`; export const tetris = `stack( - sequence( mini( 'e5 [b4 c5] d5 [c5 b4]', 'a4 [a4 c5] e5 [d5 c5]', @@ -65,9 +63,7 @@ export const tetris = `stack( 'e5 [~ c5] e5 [d5 c5]', 'b4 [b4 c5] d5 e5', 'c5 a4 a4 ~' - ) - ), - sequence( + ), mini( 'e2 e3 e2 e3 e2 e3 e2 e3', 'a2 a3 a2 a3 a2 a3 a2 a3', @@ -77,13 +73,9 @@ export const tetris = `stack( 'c2 c3 c2 c3 c2 c3 c2 c3', 'b1 b2 b1 b2 e2 e3 e2 e3', 'a1 a2 a1 a2 a1 a2 a1 a2' - ) ) -).slow(16).synth({ - oscillator: {type: 'sawtooth'} -})`; +).slow(16)`; export const tetrisRev = `stack( - sequence( mini( 'e5 [b4 c5] d5 [c5 b4]', 'a4 [a4 c5] e5 [d5 c5]', @@ -93,9 +85,7 @@ export const tetrisRev = `stack( 'e5 [~ c5] e5 [d5 c5]', 'b4 [b4 c5] d5 e5', 'c5 a4 a4 ~' - ).rev() - ), - sequence( + ).rev(), mini( 'e2 e3 e2 e3 e2 e3 e2 e3', 'a2 a3 a2 a3 a2 a3 a2 a3', @@ -106,10 +96,8 @@ export const tetrisRev = `stack( 'b1 b2 b1 b2 e2 e3 e2 e3', 'a1 a2 a1 a2 a1 a2 a1 a2' ).rev() - ) -).slow(16).synth('sawtooth').filter(1000).gain(0.6)`; -export const tetrisMini1 = `m\`[[e5 [b4 c5] d5 [c5 b4]] [a4 [a4 c5] e5 [d5 c5]] [b4 [~ c5] d5 e5] [c5 a4 a4 ~] [[~ d5] [~ f5] a5 [g5 f5]] [e5 [~ c5] e5 [d5 c5]] [b4 [b4 c5] d5 e5] [c5 a4 a4 ~]],[[e2 e3 e2 e3 e2 e3 e2 e3] [a2 a3 a2 a3 a2 a3 a2 a3] [g#2 g#3 g#2 g#3 e2 e3 e2 e3] [a2 a3 a2 a3 a2 a3 b1 c2] [d2 d3 d2 d3 d2 d3 d2 d3] [c2 c3 c2 c3 c2 c3 c2 c3] [b1 b2 b1 b2 e2 e3 e2 e3] [a1 a2 a1 a2 a1 a2 a1 a2]]')._slow(16)\``; -export const tetrisMini = `m\`[[e5 [b4 c5] d5 [c5 b4]] +).slow(16)`; +export const tetrisMini = `\`[[e5 [b4 c5] d5 [c5 b4]] [a4 [a4 c5] e5 [d5 c5]] [b4 [~ c5] d5 e5] [c5 a4 a4 ~] @@ -124,50 +112,309 @@ export const tetrisMini = `m\`[[e5 [b4 c5] d5 [c5 b4]] [[d2 d3]*4] [[c2 c3]*4] [[b1 b2]*2 [e2 e3]*2] -[[a1 a2]*4]\`._slow(16); -`; -export const tetrisHaskellH = `h(\`slow 16 $ "[[e5 [b4 c5] d5 [c5 b4]] -[a4 [a4 c5] e5 [d5 c5]] -[b4 [~ c5] d5 e5] -[c5 a4 a4 ~] -[[~ d5] [~ f5] a5 [g5 f5]] -[e5 [~ c5] e5 [d5 c5]] -[b4 [b4 c5] d5 e5] -[c5 a4 a4 ~]], -[[e2 e3]*4] -[[a2 a3]*4] -[[g#2 g#3]*2 [e2 e3]*2] -[a2 a3 a2 a3 a2 a3 b1 c2] -[[d2 d3]*4] -[[c2 c3]*4] -[[b1 b2]*2 [e2 e3]*2] -[[a1 a2]*4]"\`) -`; -export const tetrisHaskell = `slow 16 $ "[[e5 [b4 c5] d5 [c5 b4]] -[a4 [a4 c5] e5 [d5 c5]] -[b4 [~ c5] d5 e5] -[c5 a4 a4 ~] -[[~ d5] [~ f5] a5 [g5 f5]] -[e5 [~ c5] e5 [d5 c5]] -[b4 [b4 c5] d5 e5] -[c5 a4 a4 ~]], -[[e2 e3]*4] -[[a2 a3]*4] -[[g#2 g#3]*2 [e2 e3]*2] -[a2 a3 a2 a3 a2 a3 b1 c2] -[[d2 d3]*4] -[[c2 c3]*4] -[[b1 b2]*2 [e2 e3]*2] -[[a1 a2]*4]" +[[a1 a2]*4]\`.mini.slow(16) `; export const spanish = `slowcat( - stack('c4','eb4','g4'), - stack('bb3','d4','f4'), - stack('ab3','c4','eb4'), - stack('g3','b3','d4') - )`; + stack(c4,eb4,g4), + stack(bb3,d4,f4), + stack(ab3,c4,eb4), + stack(g3,b3,d4) +)`; export const whirlyStrudel = `mini("[e4 [b2 b3] c4]") - .every(4, x => x.fast(2)) - .every(3, x => x.slow(1.5)) - .fast(slowcat(1.25,1,1.5)) - .every(2, _ => mini("e4 ~ e3 d4 ~"))`; +.every(4, fast(2)) +.every(3, slow(1.5)) +.fast(slowcat(1.25, 1, 1.5)) +.every(2, _ => mini("e4 ~ e3 d4 ~"))`; +export const swimming = `stack( + mini( + '~', + '~', + '~', + 'A5 [F5@2 C5] [D5@2 F5] F5', + '[C5@2 F5] [F5@2 C6] A5 G5', + 'A5 [F5@2 C5] [D5@2 F5] F5', + '[C5@2 F5] [Bb5 A5 G5] F5@2', + 'A5 [F5@2 C5] [D5@2 F5] F5', + '[C5@2 F5] [F5@2 C6] A5 G5', + 'A5 [F5@2 C5] [D5@2 F5] F5', + '[C5@2 F5] [Bb5 A5 G5] F5@2', + 'A5 [F5@2 C5] A5 F5', + 'Ab5 [F5@2 Ab5] G5@2', + 'A5 [F5@2 C5] A5 F5', + 'Ab5 [F5@2 C5] C6@2', + 'A5 [F5@2 C5] [D5@2 F5] F5', + '[C5@2 F5] [Bb5 A5 G5] F5@2' + ), + mini( + '[F4,Bb4,D5] [[D4,G4,Bb4]@2 [Bb3,D4,F4]] [[G3,C4,E4]@2 [[Ab3,F4] [A3,Gb4]]] [Bb3,E4,G4]', + '[~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, Bb3, Db3] [F3, Bb3, Db3]]', + '[~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, B3, D3] [F3, B3, D3]]', + '[~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, B3, D3] [F3, B3, D3]]', + '[~ [A3, C4, E4] [A3, C4, E4]] [~ [Ab3, C4, Eb4] [Ab3, C4, Eb4]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [G3, C4, E4] [G3, C4, E4]]', + '[~ [F3, A3, C4] [F3, A3, C4]] [~ [F3, A3, C4] [F3, A3, C4]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, B3, D3] [F3, B3, D3]]', + '[~ [F3, Bb3, D4] [F3, Bb3, D4]] [~ [F3, Bb3, C4] [F3, Bb3, C4]] [~ [F3, A3, C4] [F3, A3, C4]] [~ [F3, A3, C4] [F3, A3, C4]]', + '[~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, B3, D3] [F3, B3, D3]]', + '[~ [A3, C4, E4] [A3, C4, E4]] [~ [Ab3, C4, Eb4] [Ab3, C4, Eb4]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [G3, C4, E4] [G3, C4, E4]]', + '[~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, B3, D3] [F3, B3, D3]]', + '[~ [F3, Bb3, D4] [F3, Bb3, D4]] [~ [F3, Bb3, C4] [F3, Bb3, C4]] [~ [F3, A3, C4] [F3, A3, C4]] [~ [F3, A3, C4] [F3, A3, C4]]', + '[~ [Bb3, D3, F4] [Bb3, D3, F4]] [~ [Bb3, D3, F4] [Bb3, D3, F4]] [~ [A3, C4, F4] [A3, C4, F4]] [~ [A3, C4, F4] [A3, C4, F4]]', + '[~ [Ab3, B3, F4] [Ab3, B3, F4]] [~ [Ab3, B3, F4] [Ab3, B3, F4]] [~ [G3, Bb3, F4] [G3, Bb3, F4]] [~ [G3, Bb3, E4] [G3, Bb3, E4]]', + '[~ [Bb3, D3, F4] [Bb3, D3, F4]] [~ [Bb3, D3, F4] [Bb3, D3, F4]] [~ [A3, C4, F4] [A3, C4, F4]] [~ [A3, C4, F4] [A3, C4, F4]]', + '[~ [Ab3, B3, F4] [Ab3, B3, F4]] [~ [Ab3, B3, F4] [Ab3, B3, F4]] [~ [G3, Bb3, F4] [G3, Bb3, F4]] [~ [G3, Bb3, E4] [G3, Bb3, E4]]', + '[~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, A3, C3] [F3, A3, C3]] [~ [F3, Bb3, D3] [F3, Bb3, D3]] [~ [F3, B3, D3] [F3, B3, D3]]', + '[~ [F3, Bb3, D4] [F3, Bb3, D4]] [~ [F3, Bb3, C4] [F3, Bb3, C4]] [~ [F3, A3, C4] [F3, A3, C4]] [~ [F3, A3, C4] [F3, A3, C4]]' + ), + mini( + '[G3 G3 C3 E3]', + '[F2 D2 G2 C2]', + '[F2 D2 G2 C2]', + '[F2 A2 Bb2 B2]', + '[A2 Ab2 G2 C2]', + '[F2 A2 Bb2 B2]', + '[G2 C2 F2 F2]', + '[F2 A2 Bb2 B2]', + '[A2 Ab2 G2 C2]', + '[F2 A2 Bb2 B2]', + '[G2 C2 F2 F2]', + '[Bb2 Bb2 A2 A2]', + '[Ab2 Ab2 G2 [C2 D2 E2]]', + '[Bb2 Bb2 A2 A2]', + '[Ab2 Ab2 G2 [C2 D2 E2]]', + '[F2 A2 Bb2 B2]', + '[G2 C2 F2 F2]' + ) +).slow(51); +`; +export const giantSteps = `stack( + // melody + mini( + '[F#5 D5] [B4 G4] Bb4 [B4 A4]', + '[D5 Bb4] [G4 Eb4] F#4 [G4 F4]', + 'Bb4 [B4 A4] D5 [D#5 C#5]', + 'F#5 [G5 F5] Bb5 [F#5 F#5]', + ), + // chords + mini( + '[B^7 D7] [G^7 Bb7] Eb^7 [Am7 D7]', + '[G^7 Bb7] [Eb^7 F#7] B^7 [Fm7 Bb7]', + 'Eb^7 [Am7 D7] G^7 [C#m7 F#7]', + 'B^7 [Fm7 Bb7] Eb^7 [C#m7 F#7]' + ).voicings(['E3', 'G4']), + // bass + mini( + '[B2 D2] [G2 Bb2] [Eb2 Bb3] [A2 D2]', + '[G2 Bb2] [Eb2 F#2] [B2 F#2] [F2 Bb2]', + '[Eb2 Bb2] [A2 D2] [G2 D2] [C#2 F#2]', + '[B2 F#2] [F2 Bb2] [Eb2 Bb3] [C#2 F#2]' + ) +).slow(20);`; +export const giantStepsReggae = `stack( + // melody + mini( + '[F#5 D5] [B4 G4] Bb4 [B4 A4]', + '[D5 Bb4] [G4 Eb4] F#4 [G4 F4]', + 'Bb4 [B4 A4] D5 [D#5 C#5]', + 'F#5 [G5 F5] Bb5 [F#5 [F#5 ~@3]]', + ), + // chords + mini( + '[B^7 D7] [G^7 Bb7] Eb^7 [Am7 D7]', + '[G^7 Bb7] [Eb^7 F#7] B^7 [Fm7 Bb7]', + 'Eb^7 [Am7 D7] G^7 [C#m7 F#7]', + 'B^7 [Fm7 Bb7] Eb^7 [C#m7 F#7]' + ) + .groove('~ [x ~]'.m.fast(4*8)) + .voicings(['E3', 'G4']), + // bass + mini( + '[B2 D2] [G2 D2] [Eb2 Bb2] [A2 D2]', + '[G2 Bb2] [Eb2 F#2] [B2 F#2] [F2 Bb2]', + '[Eb2 Bb2] [A2 D2] [G2 D2] [C#2 F#2]', + '[B2 F#2] [F2 Bb2] [Eb2 Bb2] [C#2 F#2]' + ) + .groove('x ~'.m.fast(4*8)) +).slow(25)`; +export const transposedChordsHacked = `stack( + 'c2 eb2 g2'.mini, + 'Cm7'.pure.voicings(['g2','c4']).slow(2) +).transpose( + slowcat(1, 2, 3, 2).slow(2) +).transpose(5)`; +export const scaleTranspose = `stack(f2, f3, c4, ab4) +.scale(sequence('F minor', 'F harmonic minor').slow(4)) +.scaleTranspose(sequence(0, -1, -2, -3).slow(4)) +.transpose(sequence(0, 1).slow(16))`; +export const groove = `stack( + 'c2 g2 a2 [e2@2 eb2] d2 a2 g2 [d2 ~ db2]'.mini, + '[C^7 A7] [Dm7 G7]'.mini.groove('[x@2 x] [~@2 x] [~ x@2]@2 [x ~@2] ~ [~@2 x@4]@2'.mini) + .voicings(['G3','A4']) +).slow(4)`; +export const magicSofa = `stack( + ' '.m + .every(2, fast(2)) + .voicings(), + ' '.m +).slow(1).transpose.slowcat(0, 2, 3, 4)`; +export const confusedPhoneDynamic = `stack('[g2 ~@1.3] [c3 ~@1.3]'.mini.slow(2)) +.superimpose( + ...[-12,7,10,12,24].slice(0,5).map((t,i,{length}) => x => transpose(t,x).late(i/length)) +) +.scale(sequence('C dorian', 'C mixolydian').slow(4)) +.scaleTranspose(slowcat(0,1,2,1).slow(2)) +.synth('triangle').gain(0.5).filter(1500)`; +export const confusedPhone = `'[g2 ~@1.3] [c3 ~@1.3]'.mini +.superimpose( + transpose(-12).late(0), + transpose(7).late(0.1), + transpose(10).late(0.2), + transpose(12).late(0.3), + transpose(24).late(0.4) +) +.scale(slowcat('C dorian', 'C mixolydian')) +.scaleTranspose(slowcat(0,1,2,1)) +.slow(2)`; +export const zeldasRescue = `stack( + // melody + \`[B3@2 D4] [A3@2 [G3 A3]] [B3@2 D4] [A3] + [B3@2 D4] [A4@2 G4] [D4@2 [C4 B3]] [A3] + [B3@2 D4] [A3@2 [G3 A3]] [B3@2 D4] [A3] + [B3@2 D4] [A4@2 G4] D5@2 + [D5@2 [C5 B4]] [[C5 B4] G4@2] [C5@2 [B4 A4]] [[B4 A4] E4@2] + [D5@2 [C5 B4]] [[C5 B4] G4 C5] [G5] [~ ~ B3]\`.mini, + // bass + \`[[C2 G2] E3@2] [[C2 G2] F#3@2] [[C2 G2] E3@2] [[C2 G2] F#3@2] + [[B1 D3] G3@2] [[Bb1 Db3] G3@2] [[A1 C3] G3@2] [[D2 C3] F#3@2] + [[C2 G2] E3@2] [[C2 G2] F#3@2] [[C2 G2] E3@2] [[C2 G2] F#3@2] + [[B1 D3] G3@2] [[Bb1 Db3] G3@2] [[A1 C3] G3@2] [[D2 C3] F#3@2] + [[F2 C3] E3@2] [[E2 B2] D3@2] [[D2 A2] C3@2] [[C2 G2] B2@2] + [[F2 C3] E3@2] [[E2 B2] D3@2] [[Eb2 Bb2] Db3@2] [[D2 A2] C3 [F3,G2]]\`.mini +).transpose(12).slow(48).tone( + new PolySynth().chain( + new Gain(0.3), + new Chorus(2, 2.5, 0.5).start(), + new Freeverb(), + Destination) +)`; +export const technoDrums = `stack( + 'c1*2'.m.tone(new Tone.MembraneSynth().toDestination()), + '~ x'.m.tone(new Tone.NoiseSynth().toDestination()), + '[~ c4]*2'.m.tone(new Tone.MetalSynth().set({envelope:{decay:0.06,sustain:0}}).chain(new Gain(0.5),Destination)) +)`; +export const loungerave = `() => { + const delay = new FeedbackDelay(1/8, .2).chain(vol(0.5), out); + const kick = new MembraneSynth().chain(vol(.8), out); + const snare = new NoiseSynth().chain(vol(.8), out); + const hihat = new MetalSynth().set(adsr(0, .08, 0, .1)).chain(vol(.3).connect(delay),out); + const bass = new Synth().set({ ...osc('sawtooth'), ...adsr(0, .1, .4) }).chain(lowpass(900), vol(.5), out); + const keys = new PolySynth().set({ ...osc('sawtooth'), ...adsr(0, .5, .2, .7) }).chain(lowpass(1200), vol(.5), out); + + const drums = stack( + 'c1*2'.m.tone(kick).bypass('<0@7 1>/8'.m), + '~ '.m.tone(snare).bypass('<0@7 1>/4'.m), + '[~ c4]*2'.m.tone(hihat) + ); + + const thru = (x) => x.transpose('<0 1>/8'.m).transpose(1); + const synths = stack( + '/2'.m.groove('[x [~ x] <[~ [~ x]]!3 [x x]>@2]/2'.m).edit(thru).tone(bass), + '/2'.m.groove('~ [x@0.1 ~]'.m).voicings().edit(thru).every(2, early(1/4)).tone(keys).bypass('<0@7 1>/8'.m.early(1/4)) + ) + return stack( + drums, + synths + ) + //.bypass('<0 1>*4'.m) + //.early('0.25 0'.m); +}`; +export const caverave = `() => { + const delay = new FeedbackDelay(1/8, .4).chain(vol(0.5), out); + const kick = new MembraneSynth().chain(vol(.8), out); + const snare = new NoiseSynth().chain(vol(.8), out); + const hihat = new MetalSynth().set(adsr(0, .08, 0, .1)).chain(vol(.3).connect(delay),out); + const bass = new Synth().set({ ...osc('sawtooth'), ...adsr(0, .1, .4) }).chain(lowpass(900), vol(.5), out); + const keys = new PolySynth().set({ ...osc('sawtooth'), ...adsr(0, .5, .2, .7) }).chain(lowpass(1200), vol(.5), out); + + const drums = stack( + 'c1*2'.m.tone(kick).bypass('<0@7 1>/8'.m), + '~ '.m.tone(snare).bypass('<0@7 1>/4'.m), + '[~ c4]*2'.m.tone(hihat) + ); + + const thru = (x) => x.transpose('<0 1>/8'.m).transpose(-1); + const synths = stack( + '/2'.m.scale(timeCat([3,'C minor'],[1,'C melodic minor']).slow(8)).groove('[~ x]*2'.m) + .edit( + scaleTranspose(0).early(0), + scaleTranspose(2).early(1/8), + scaleTranspose(7).early(1/4), + scaleTranspose(8).early(3/8) + ).edit(thru).tone(keys).bypass('<1 0>/16'.m), + '/2'.m.groove('[x [~ x] <[~ [~ x]]!3 [x x]>@2]/2'.m.fast(2)).edit(thru).tone(bass), + '/2'.m.groove('~ [x@0.1 ~]'.m.fast(2)).voicings().edit(thru).every(2, early(1/8)).tone(keys).bypass('<0@7 1>/8'.m.early(1/4)) + ) + return stack( + drums.fast(2), + synths + ).slow(2); +}`; +export const caveravefuture = `() => { + const delay = new FeedbackDelay(1/8, .4).chain(vol(0.5), out); + const kick = new MembraneSynth().chain(vol(.8), out); + const snare = new NoiseSynth().chain(vol(.8), out); + const hihat = new MetalSynth().set(adsr(0, .08, 0, .1)).chain(vol(.3).connect(delay),out); + const bass = new Synth().set({ ...osc('sawtooth'), ...adsr(0, .1, .4) }).chain(lowpass(900), vol(.5), out); + const keys = new PolySynth().set({ ...osc('sawtooth'), ...adsr(0, .5, .2, .7) }).chain(lowpass(1200), vol(.5), out); + + const drums = stack( + \`c1*2\`.tone(kick).bypass(\`<0@7 1>/8\`), + \`~ \`.tone(snare).bypass(\`<0@7 1>/4\`), + \`[~ c4]*2\`.tone(hihat) + ); + + const thru = (x) => x.transpose(\`<0 1>/8\`).transpose(-1); + const synths = stack( + \`/2\`.scale(timeCat([3,'C minor'],[1,'C melodic minor']).slow(8)).groove(\`[~ x]*2\`) + .edit( + scaleTranspose(0).early(0), + scaleTranspose(2).early(1/8), + scaleTranspose(7).early(1/4), + scaleTranspose(8).early(3/8) + ).edit(thru).tone(keys).bypass(\`<1 0>/16\`), + \`/2\`.groove(\`x [~ x] <[~ [~ x]]!3 [x x]>@2\`).edit(thru).tone(bass), + \`/2\`.groove(\`~ [x@0.5 ~]\`.fast(2)).voicings().edit(thru).every(2, early(1/8)).tone(keys).bypass(\`<0@7 1>/8\`.early(1/4)), + ) + return stack( + drums.fast(2), + synths + ).slow(2); +}`; +export const caveravefuture2 = `const delay = new FeedbackDelay(1/8, .4).chain(vol(0.5), out); +const kick = new MembraneSynth().chain(vol(.8), out); +const snare = new NoiseSynth().chain(vol(.8), out); +const hihat = new MetalSynth().set(adsr(0, .08, 0, .1)).chain(vol(.3).connect(delay),out); +const bass = new Synth().set({ ...osc('sawtooth'), ...adsr(0, .1, .4) }).chain(lowpass(900), vol(.5), out); +const keys = new PolySynth().set({ ...osc('sawtooth'), ...adsr(0, .5, .2, .7) }).chain(lowpass(1200), vol(.5), out); + +const drums = stack( + "c1*2".tone(kick).bypass("<0@7 1>/8"), + "~ ".tone(snare).bypass("<0@7 1>/4"), + "[~ c4]*2".tone(hihat) +); + +const thru = (x) => x.transpose("<0 1>/8").transpose(-1); +const synths = stack( + "/2".scale(timeCat([3, 'C minor'], [1, 'C melodic minor']).slow(8)).groove("[~ x]*2") + .edit( + scaleTranspose(0).early(0), + scaleTranspose(2).early(1/8), + scaleTranspose(7).early(1/4), + scaleTranspose(8).early(3/8) + ).edit(thru).tone(keys).bypass("<1 0>/16"), + "/2".groove("x [~ x] <[~ [~ x]]!3 [x x]>@2").edit(thru).tone(bass), + "/2".groove("~ [x@0.5 ~]".fast(2)).voicings().edit(thru).every(2, early(1/8)).tone(keys).bypass("<0@7 1>/8".early(1/4)), +) +$: stack( + drums.fast(2), + synths +).slow(2); +`; diff --git a/docs/dist/useCycle.js b/docs/dist/useCycle.js index 3fd48ffc..c039c698 100644 --- a/docs/dist/useCycle.js +++ b/docs/dist/useCycle.js @@ -8,28 +8,20 @@ function useCycle(props) { const activeCycle = () => Math.floor(Tone.Transport.seconds / cycleDuration); const query = (cycle = activeCycle()) => { const timespan = new TimeSpan(cycle, cycle + 1); - const _events = onQuery?.(timespan) || []; - onSchedule?.(_events, cycle); - schedule(_events, cycle); - }; - const schedule = (events, cycle = activeCycle()) => { - const timespan = new TimeSpan(cycle, cycle + 1); + const events = onQuery?.(timespan) || []; + onSchedule?.(events, cycle); const cancelFrom = timespan.begin.valueOf(); Tone.Transport.cancel(cancelFrom); - const queryNextTime = (cycle + 1) * cycleDuration - 0.1; - const delta = queryNextTime - Tone.Transport.seconds; - if (delta < 0.2) { + const queryNextTime = (cycle + 1) * cycleDuration - 0.5; + const t = Math.max(Tone.Transport.seconds, queryNextTime) + 0.1; + Tone.Transport.schedule(() => { query(cycle + 1); - } else { - Tone.Transport.schedule(() => { - query(cycle + 1); - }, queryNextTime); - } + }, t); events?.filter((event) => event.part.begin.valueOf() === event.whole.begin.valueOf()).forEach((event) => { Tone.Transport.schedule((time) => { const toneEvent = { time: event.part.begin.valueOf(), - duration: event.whole.end.valueOf() - event.whole.begin.valueOf(), + duration: event.whole.end.sub(event.whole.begin).valueOf(), value: event.value }; onEvent(time, toneEvent); @@ -38,9 +30,8 @@ function useCycle(props) { }; useEffect(() => { ready && query(); - }, [onEvent, onSchedule, onQuery]); + }, [onEvent, onSchedule, onQuery, ready]); const start = async () => { - console.log("start"); setStarted(true); await Tone.start(); Tone.Transport.start("+0.1"); @@ -51,6 +42,6 @@ function useCycle(props) { Tone.Transport.pause(); }; const toggle = () => started ? stop() : start(); - return {start, stop, onEvent, started, toggle, schedule, query, activeCycle}; + return {start, stop, setStarted, onEvent, started, toggle, query, activeCycle}; } export default useCycle; diff --git a/docs/dist/usePostMessage.js b/docs/dist/usePostMessage.js new file mode 100644 index 00000000..05bc17ab --- /dev/null +++ b/docs/dist/usePostMessage.js @@ -0,0 +1,9 @@ +import {useEffect} from "../_snowpack/pkg/react.js"; +function usePostMessage(listener) { + useEffect(() => { + window.addEventListener("message", listener); + return () => window.removeEventListener("message", listener); + }, [listener]); + return (data) => window.postMessage(data, "*"); +} +export default usePostMessage; diff --git a/docs/dist/useRepl.js b/docs/dist/useRepl.js new file mode 100644 index 00000000..2838cc5e --- /dev/null +++ b/docs/dist/useRepl.js @@ -0,0 +1,105 @@ +import {useCallback, useState, useMemo} from "../_snowpack/pkg/react.js"; +import {isNote} from "../_snowpack/pkg/tone.js"; +import {evaluate} from "./evaluate.js"; +import useCycle from "./useCycle.js"; +import usePostMessage from "./usePostMessage.js"; +let s4 = () => { + return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1); +}; +function useRepl({tune, defaultSynth, autolink = true}) { + const id = useMemo(() => s4(), []); + const [code, setCode] = useState(tune); + const [activeCode, setActiveCode] = useState(); + const [log, setLog] = useState(""); + const [error, setError] = useState(); + const [pattern, setPattern] = useState(); + const dirty = code !== activeCode; + const activateCode = (_code = code) => { + !cycle.started && cycle.start(); + broadcast({type: "start", from: id}); + if (activeCode && !dirty) { + setError(void 0); + return; + } + try { + const parsed = evaluate(_code); + setPattern(() => parsed.pattern); + if (autolink) { + window.location.hash = "#" + encodeURIComponent(btoa(code)); + } + setError(void 0); + setActiveCode(_code); + } catch (err) { + setError(err); + } + }; + const pushLog = (message) => setLog((log2) => log2 + `${log2 ? "\n\n" : ""}${message}`); + const logCycle = (_events, cycle2) => { + if (_events.length) { + pushLog(`# cycle ${cycle2} +` + _events.map((e) => e.show()).join("\n")); + } + }; + const cycle = useCycle({ + onEvent: useCallback((time, event) => { + try { + if (!event.value?.onTrigger) { + const note = event.value?.value || event.value; + if (!isNote(note)) { + throw new Error("not a note: " + note); + } + if (defaultSynth) { + defaultSynth.triggerAttackRelease(note, event.duration, time); + } else { + throw new Error("no defaultSynth passed to useRepl."); + } + } else { + const {onTrigger} = event.value; + onTrigger(time, event); + } + } catch (err) { + console.warn(err); + err.message = "unplayable event: " + err?.message; + pushLog(err.message); + } + }, []), + onQuery: useCallback((span) => { + try { + return pattern?.query(span) || []; + } catch (err) { + setError(err); + return []; + } + }, [pattern]), + onSchedule: useCallback((_events, cycle2) => logCycle(_events, cycle2), [pattern]), + ready: !!pattern + }); + const broadcast = usePostMessage(({data: {from, type}}) => { + if (type === "start" && from !== id) { + cycle.setStarted(false); + setActiveCode(void 0); + } + }); + const togglePlay = () => { + if (!cycle.started) { + activateCode(); + } else { + cycle.stop(); + } + }; + return { + code, + setCode, + pattern, + error, + cycle, + setPattern, + dirty, + log, + togglePlay, + activateCode, + activeCode, + pushLog + }; +} +export default useRepl; diff --git a/docs/dist/voicings.js b/docs/dist/voicings.js new file mode 100644 index 00000000..c03cd252 --- /dev/null +++ b/docs/dist/voicings.js @@ -0,0 +1,37 @@ +import {Pattern as _Pattern, stack, Hap, reify} from "../_snowpack/link/strudel.js"; +import _voicings from "../_snowpack/pkg/chord-voicings.js"; +const {dictionaryVoicing, minTopNoteDiff, lefthand} = _voicings; +const getVoicing = (chord, lastVoicing, range = ["F3", "A4"]) => dictionaryVoicing({ + chord, + dictionary: lefthand, + range, + picker: minTopNoteDiff, + lastVoicing +}); +const Pattern = _Pattern; +Pattern.prototype.fmapNested = function(func) { + return new Pattern((span) => this.query(span).map((event) => reify(func(event)).query(span).map((hap) => new Hap(event.whole, event.part, hap.value))).flat()); +}; +Pattern.prototype.voicings = function(range) { + let lastVoicing; + if (!range?.length) { + range = ["F3", "A4"]; + } + return this.fmapNested((event) => { + lastVoicing = getVoicing(event.value, lastVoicing, range); + return stack(...lastVoicing); + }); +}; +Pattern.prototype.chordBass = function() { + return this._mapNotes((value) => { + console.log("value", value); + const [_, root] = value.value.match(/^([a-gC-G])[b#]?.*$/); + const bassNote = root + "2"; + return {...value, value: bassNote}; + }); +}; +Pattern.prototype.define("voicings", (range, pat) => pat.voicings(range), {composable: true}); +Pattern.prototype.define("chordBass", (pat) => { + console.log("call chordBass ...", pat); + return pat.chordBass(); +}, {composable: true}); diff --git a/docs/global.css b/docs/global.css index dd9fb0ca..1c756783 100644 --- a/docs/global.css +++ b/docs/global.css @@ -590,6 +590,343 @@ select { --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; } +.prose { + color: var(--tw-prose-body); + max-width: 65ch; +} +.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-lead); + font-size: 1.25em; + line-height: 1.6; + margin-top: 1.2em; + margin-bottom: 1.2em; +} +.prose :where(a):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-links); + text-decoration: underline; + font-weight: 500; +} +.prose :where(strong):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-bold); + font-weight: 600; +} +.prose :where(ol):not(:where([class~="not-prose"] *)) { + list-style-type: decimal; + padding-left: 1.625em; +} +.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-alpha; +} +.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-alpha; +} +.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-alpha; +} +.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-alpha; +} +.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-roman; +} +.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-roman; +} +.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-roman; +} +.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-roman; +} +.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)) { + list-style-type: decimal; +} +.prose :where(ul):not(:where([class~="not-prose"] *)) { + list-style-type: disc; + padding-left: 1.625em; +} +.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); +} +.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker { + color: var(--tw-prose-bullets); +} +.prose :where(hr):not(:where([class~="not-prose"] *)) { + border-color: var(--tw-prose-hr); + border-top-width: 1px; + margin-top: 3em; + margin-bottom: 3em; +} +.prose :where(blockquote):not(:where([class~="not-prose"] *)) { + font-weight: 500; + font-style: italic; + color: var(--tw-prose-quotes); + border-left-width: 0.25rem; + border-left-color: var(--tw-prose-quote-borders); + quotes: "\201C""\201D""\2018""\2019"; + margin-top: 1.6em; + margin-bottom: 1.6em; + padding-left: 1em; +} +.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"] *))::before { + content: open-quote; +} +.prose :where(blockquote p:last-of-type):not(:where([class~="not-prose"] *))::after { + content: close-quote; +} +.prose :where(h1):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 800; + font-size: 2.25em; + margin-top: 0; + margin-bottom: 0.8888889em; + line-height: 1.1111111; +} +.prose :where(h1 strong):not(:where([class~="not-prose"] *)) { + font-weight: 900; +} +.prose :where(h2):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 700; + font-size: 1.5em; + margin-top: 2em; + margin-bottom: 1em; + line-height: 1.3333333; +} +.prose :where(h2 strong):not(:where([class~="not-prose"] *)) { + font-weight: 800; +} +.prose :where(h3):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + font-size: 1.25em; + margin-top: 1.6em; + margin-bottom: 0.6em; + line-height: 1.6; +} +.prose :where(h3 strong):not(:where([class~="not-prose"] *)) { + font-weight: 700; +} +.prose :where(h4):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + margin-top: 1.5em; + margin-bottom: 0.5em; + line-height: 1.5; +} +.prose :where(h4 strong):not(:where([class~="not-prose"] *)) { + font-weight: 700; +} +.prose :where(figure > *):not(:where([class~="not-prose"] *)) { + margin-top: 0; + margin-bottom: 0; +} +.prose :where(figcaption):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-captions); + font-size: 0.875em; + line-height: 1.4285714; + margin-top: 0.8571429em; +} +.prose :where(code):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-code); + font-weight: 600; + font-size: 0.875em; +} +.prose :where(code):not(:where([class~="not-prose"] *))::before { + content: "`"; +} +.prose :where(code):not(:where([class~="not-prose"] *))::after { + content: "`"; +} +.prose :where(a code):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-links); +} +.prose :where(pre):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-pre-code); + background-color: var(--tw-prose-pre-bg); + overflow-x: auto; + font-weight: 400; + font-size: 0.875em; + line-height: 1.7142857; + margin-top: 1.7142857em; + margin-bottom: 1.7142857em; + border-radius: 0.375rem; + padding-top: 0.8571429em; + padding-right: 1.1428571em; + padding-bottom: 0.8571429em; + padding-left: 1.1428571em; +} +.prose :where(pre code):not(:where([class~="not-prose"] *)) { + background-color: transparent; + border-width: 0; + border-radius: 0; + padding: 0; + font-weight: inherit; + color: inherit; + font-size: inherit; + font-family: inherit; + line-height: inherit; +} +.prose :where(pre code):not(:where([class~="not-prose"] *))::before { + content: none; +} +.prose :where(pre code):not(:where([class~="not-prose"] *))::after { + content: none; +} +.prose :where(table):not(:where([class~="not-prose"] *)) { + width: 100%; + table-layout: auto; + text-align: left; + margin-top: 2em; + margin-bottom: 2em; + font-size: 0.875em; + line-height: 1.7142857; +} +.prose :where(thead):not(:where([class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-th-borders); +} +.prose :where(thead th):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + vertical-align: bottom; + padding-right: 0.5714286em; + padding-bottom: 0.5714286em; + padding-left: 0.5714286em; +} +.prose :where(tbody tr):not(:where([class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-td-borders); +} +.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)) { + border-bottom-width: 0; +} +.prose :where(tbody td):not(:where([class~="not-prose"] *)) { + vertical-align: baseline; + padding-top: 0.5714286em; + padding-right: 0.5714286em; + padding-bottom: 0.5714286em; + padding-left: 0.5714286em; +} +.prose { + --tw-prose-body: #374151; + --tw-prose-headings: #111827; + --tw-prose-lead: #4b5563; + --tw-prose-links: #111827; + --tw-prose-bold: #111827; + --tw-prose-counters: #6b7280; + --tw-prose-bullets: #d1d5db; + --tw-prose-hr: #e5e7eb; + --tw-prose-quotes: #111827; + --tw-prose-quote-borders: #e5e7eb; + --tw-prose-captions: #6b7280; + --tw-prose-code: #111827; + --tw-prose-pre-code: #e5e7eb; + --tw-prose-pre-bg: #1f2937; + --tw-prose-th-borders: #d1d5db; + --tw-prose-td-borders: #e5e7eb; + --tw-prose-invert-body: #d1d5db; + --tw-prose-invert-headings: #fff; + --tw-prose-invert-lead: #9ca3af; + --tw-prose-invert-links: #fff; + --tw-prose-invert-bold: #fff; + --tw-prose-invert-counters: #9ca3af; + --tw-prose-invert-bullets: #4b5563; + --tw-prose-invert-hr: #374151; + --tw-prose-invert-quotes: #f3f4f6; + --tw-prose-invert-quote-borders: #374151; + --tw-prose-invert-captions: #9ca3af; + --tw-prose-invert-code: #fff; + --tw-prose-invert-pre-code: #d1d5db; + --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); + --tw-prose-invert-th-borders: #4b5563; + --tw-prose-invert-td-borders: #374151; + font-size: 1rem; + line-height: 1.75; +} +.prose :where(p):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; +} +.prose :where(img):not(:where([class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} +.prose :where(video):not(:where([class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} +.prose :where(figure):not(:where([class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} +.prose :where(h2 code):not(:where([class~="not-prose"] *)) { + font-size: 0.875em; +} +.prose :where(h3 code):not(:where([class~="not-prose"] *)) { + font-size: 0.9em; +} +.prose :where(li):not(:where([class~="not-prose"] *)) { + margin-top: 0.5em; + margin-bottom: 0.5em; +} +.prose :where(ol > li):not(:where([class~="not-prose"] *)) { + padding-left: 0.375em; +} +.prose :where(ul > li):not(:where([class~="not-prose"] *)) { + padding-left: 0.375em; +} +.prose > :where(ul > li p):not(:where([class~="not-prose"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} +.prose > :where(ul > li > *:first-child):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; +} +.prose > :where(ul > li > *:last-child):not(:where([class~="not-prose"] *)) { + margin-bottom: 1.25em; +} +.prose > :where(ol > li > *:first-child):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; +} +.prose > :where(ol > li > *:last-child):not(:where([class~="not-prose"] *)) { + margin-bottom: 1.25em; +} +.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} +.prose :where(hr + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +} +.prose :where(h2 + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +} +.prose :where(h3 + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +} +.prose :where(h4 + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +} +.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)) { + padding-left: 0; +} +.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)) { + padding-right: 0; +} +.prose :where(tbody td:first-child):not(:where([class~="not-prose"] *)) { + padding-left: 0; +} +.prose :where(tbody td:last-child):not(:where([class~="not-prose"] *)) { + padding-right: 0; +} +.prose > :where(:first-child):not(:where([class~="not-prose"] *)) { + margin-top: 0; +} +.prose > :where(:last-child):not(:where([class~="not-prose"] *)) { + margin-bottom: 0; +} .static { position: static; } @@ -603,11 +940,11 @@ select { position: -webkit-sticky; position: sticky; } -.bottom-0 { - bottom: 0px; +.top-0 { + top: 0px; } -.left-0 { - left: 0px; +.right-0 { + right: 0px; } .right-2 { right: 0.5rem; @@ -621,8 +958,8 @@ select { .flex { display: flex; } -.h-screen { - height: 100vh; +.contents { + display: contents; } .h-16 { height: 4rem; @@ -630,24 +967,42 @@ select { .h-full { height: 100%; } +.min-h-screen { + min-height: 100vh; +} +.min-h-\[200px\] { + min-height: 200px; +} .w-full { width: 100%; } .w-16 { width: 4rem; } +.max-w-3xl { + max-width: 48rem; +} .flex-none { flex: none; } .grow { flex-grow: 1; } +.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.cursor-not-allowed { + cursor: not-allowed; +} .flex-col { flex-direction: column; } .items-center { align-items: center; } +.justify-center { + justify-content: center; +} .justify-between { justify-content: space-between; } @@ -656,6 +1011,19 @@ select { margin-right: calc(0.5rem * var(--tw-space-x-reverse)); margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); } +.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); +} +.overflow-auto { + overflow: auto; +} .whitespace-pre { white-space: pre; } @@ -676,18 +1044,18 @@ select { --tw-border-opacity: 1; border-color: rgb(55 65 81 / var(--tw-border-opacity)); } -.bg-slate-900 { - --tw-bg-opacity: 1; - background-color: rgb(15 23 42 / var(--tw-bg-opacity)); -} -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +.border-slate-500 { + --tw-border-opacity: 1; + border-color: rgb(100 116 139 / var(--tw-border-opacity)); } .bg-\[\#2A3236\] { --tw-bg-opacity: 1; background-color: rgb(42 50 54 / var(--tw-bg-opacity)); } +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} .bg-slate-700 { --tw-bg-opacity: 1; background-color: rgb(51 65 85 / var(--tw-bg-opacity)); @@ -696,16 +1064,23 @@ select { --tw-bg-opacity: 1; background-color: rgb(40 50 55 / var(--tw-bg-opacity)); } -.p-2 { - padding: 0.5rem; +.bg-slate-600 { + --tw-bg-opacity: 1; + background-color: rgb(71 85 105 / var(--tw-bg-opacity)); } .p-4 { padding: 1rem; } +.p-2 { + padding: 0.5rem; +} .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } +.text-right { + text-align: right; +} .text-2xl { font-size: 1.5rem; line-height: 2rem; @@ -722,6 +1097,14 @@ select { --tw-text-opacity: 1; color: rgb(239 68 68 / var(--tw-text-opacity)); } +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} +.text-slate-400 { + --tw-text-opacity: 1; + color: rgb(148 163 184 / var(--tw-text-opacity)); +} .filter { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } @@ -736,6 +1119,11 @@ select { background-color: rgb(100 116 139 / var(--tw-bg-opacity)); } +.hover\:bg-slate-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(71 85 105 / var(--tw-bg-opacity)); +} + .focus\:ring-red-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); diff --git a/docs/tutorial/favicon.e3ab9dd9.ico b/docs/tutorial/favicon.e3ab9dd9.ico new file mode 100644 index 00000000..7a9d261f Binary files /dev/null and b/docs/tutorial/favicon.e3ab9dd9.ico differ diff --git a/docs/tutorial/index.1e09ac22.css b/docs/tutorial/index.1e09ac22.css new file mode 100644 index 00000000..f13c9b00 --- /dev/null +++ b/docs/tutorial/index.1e09ac22.css @@ -0,0 +1,1312 @@ +/* +! tailwindcss v3.0.18 | MIT License | https://tailwindcss.com +*//* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/*, +::before, +::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: #e5e7eb; /* 2 */ +}::before, +::after { + --tw-content: ''; +}/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +*/html { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -moz-tab-size: 4; /* 3 */ + -o-tab-size: 4; + tab-size: 4; /* 3 */ + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ +}/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/body { + margin: 0; /* 1 */ + line-height: inherit; /* 2 */ +}/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +}/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +}/* +Remove the default font size and weight for headings. +*/h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +}/* +Reset links to optimize for opt-in styling instead of opt-out. +*/a { + color: inherit; + text-decoration: inherit; +}/* +Add the correct font weight in Edge and Safari. +*/b, +strong { + font-weight: bolder; +}/* +1. Use the user's configured `mono` font family by default. +2. Correct the odd `em` font sizing in all browsers. +*/code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ + font-size: 1em; /* 2 */ +}/* +Add the correct font size in all browsers. +*/small { + font-size: 80%; +}/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +}sub { + bottom: -0.25em; +}sup { + top: -0.5em; +}/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +}/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ +}/* +Remove the inheritance of text transform in Edge and Firefox. +*/button, +select { + text-transform: none; +}/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ +}/* +Use the modern Firefox focus style for all focusable elements. +*/:-moz-focusring { + outline: auto; +}/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/:-moz-ui-invalid { + box-shadow: none; +}/* +Add the correct vertical alignment in Chrome and Firefox. +*/progress { + vertical-align: baseline; +}/* +Correct the cursor style of increment and decrement buttons in Safari. +*/::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +}/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +}/* +Remove the inner padding in Chrome and Safari on macOS. +*/::-webkit-search-decoration { + -webkit-appearance: none; +}/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +}/* +Add the correct display in Chrome and Safari. +*/summary { + display: list-item; +}/* +Removes the default spacing and border for appropriate elements. +*/blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +}fieldset { + margin: 0; + padding: 0; +}legend { + padding: 0; +}ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +}/* +Prevent resizing textareas horizontally by default. +*/textarea { + resize: vertical; +}/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; /* 1 */ + color: #9ca3af; /* 2 */ +}input:-ms-input-placeholder, textarea:-ms-input-placeholder { + opacity: 1; /* 1 */ + color: #9ca3af; /* 2 */ +}input::placeholder, +textarea::placeholder { + opacity: 1; /* 1 */ + color: #9ca3af; /* 2 */ +}/* +Set the default cursor for buttons. +*/button, +[role="button"] { + cursor: pointer; +}/* +Make sure disabled buttons don't get the pointer cursor. +*/:disabled { + cursor: default; +}/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +}/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/img, +video { + max-width: 100%; + height: auto; +}/* +Ensure the default browser behavior of the `hidden` attribute. +*/[hidden] { + display: none; +}[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; +}[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + border-color: #2563eb; +}input::-moz-placeholder, textarea::-moz-placeholder { + color: #6b7280; + opacity: 1; +}input:-ms-input-placeholder, textarea:-ms-input-placeholder { + color: #6b7280; + opacity: 1; +}input::placeholder,textarea::placeholder { + color: #6b7280; + opacity: 1; +}::-webkit-datetime-edit-fields-wrapper { + padding: 0; +}::-webkit-date-and-time-value { + min-height: 1.5em; +}select { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); + background-position: right 0.5rem center; + background-repeat: no-repeat; + background-size: 1.5em 1.5em; + padding-right: 2.5rem; + -webkit-print-color-adjust: exact; + color-adjust: exact; +}[multiple] { + background-image: initial; + background-position: initial; + background-repeat: unset; + background-size: initial; + padding-right: 0.75rem; + -webkit-print-color-adjust: unset; + color-adjust: unset; +}[type='checkbox'],[type='radio'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #2563eb; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; +}[type='checkbox'] { + border-radius: 0px; +}[type='radio'] { + border-radius: 100%; +}[type='checkbox']:focus,[type='radio']:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); +}[type='checkbox']:checked,[type='radio']:checked { + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +}[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); +}[type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); +}[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus { + border-color: transparent; + background-color: currentColor; +}[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +}[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +}[type='file'] { + background: unset; + border-color: inherit; + border-width: 0; + border-radius: 0; + padding: 0; + font-size: unset; + line-height: inherit; +}[type='file']:focus { + outline: 1px auto -webkit-focus-ring-color; +}*, ::before, ::after { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +}.prose { + color: var(--tw-prose-body); + max-width: 65ch; +}.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-lead); + font-size: 1.25em; + line-height: 1.6; + margin-top: 1.2em; + margin-bottom: 1.2em; +}.prose :where(a):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-links); + text-decoration: underline; + font-weight: 500; +}.prose :where(strong):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-bold); + font-weight: 600; +}.prose :where(ol):not(:where([class~="not-prose"] *)) { + list-style-type: decimal; + padding-left: 1.625em; +}.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-alpha; +}.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-alpha; +}.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-alpha; +}.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-alpha; +}.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-roman; +}.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-roman; +}.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)) { + list-style-type: upper-roman; +}.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)) { + list-style-type: lower-roman; +}.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)) { + list-style-type: decimal; +}.prose :where(ul):not(:where([class~="not-prose"] *)) { + list-style-type: disc; + padding-left: 1.625em; +}.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); +}.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker { + color: var(--tw-prose-bullets); +}.prose :where(hr):not(:where([class~="not-prose"] *)) { + border-color: var(--tw-prose-hr); + border-top-width: 1px; + margin-top: 3em; + margin-bottom: 3em; +}.prose :where(blockquote):not(:where([class~="not-prose"] *)) { + font-weight: 500; + font-style: italic; + color: var(--tw-prose-quotes); + border-left-width: 0.25rem; + border-left-color: var(--tw-prose-quote-borders); + quotes: "\201C""\201D""\2018""\2019"; + margin-top: 1.6em; + margin-bottom: 1.6em; + padding-left: 1em; +}.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"] *))::before { + content: open-quote; +}.prose :where(blockquote p:last-of-type):not(:where([class~="not-prose"] *))::after { + content: close-quote; +}.prose :where(h1):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 800; + font-size: 2.25em; + margin-top: 0; + margin-bottom: 0.8888889em; + line-height: 1.1111111; +}.prose :where(h1 strong):not(:where([class~="not-prose"] *)) { + font-weight: 900; +}.prose :where(h2):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 700; + font-size: 1.5em; + margin-top: 2em; + margin-bottom: 1em; + line-height: 1.3333333; +}.prose :where(h2 strong):not(:where([class~="not-prose"] *)) { + font-weight: 800; +}.prose :where(h3):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + font-size: 1.25em; + margin-top: 1.6em; + margin-bottom: 0.6em; + line-height: 1.6; +}.prose :where(h3 strong):not(:where([class~="not-prose"] *)) { + font-weight: 700; +}.prose :where(h4):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + margin-top: 1.5em; + margin-bottom: 0.5em; + line-height: 1.5; +}.prose :where(h4 strong):not(:where([class~="not-prose"] *)) { + font-weight: 700; +}.prose :where(figure > *):not(:where([class~="not-prose"] *)) { + margin-top: 0; + margin-bottom: 0; +}.prose :where(figcaption):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-captions); + font-size: 0.875em; + line-height: 1.4285714; + margin-top: 0.8571429em; +}.prose :where(code):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-code); + font-weight: 600; + font-size: 0.875em; +}.prose :where(code):not(:where([class~="not-prose"] *))::before { + content: "`"; +}.prose :where(code):not(:where([class~="not-prose"] *))::after { + content: "`"; +}.prose :where(a code):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-links); +}.prose :where(pre):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-pre-code); + background-color: var(--tw-prose-pre-bg); + overflow-x: auto; + font-weight: 400; + font-size: 0.875em; + line-height: 1.7142857; + margin-top: 1.7142857em; + margin-bottom: 1.7142857em; + border-radius: 0.375rem; + padding-top: 0.8571429em; + padding-right: 1.1428571em; + padding-bottom: 0.8571429em; + padding-left: 1.1428571em; +}.prose :where(pre code):not(:where([class~="not-prose"] *)) { + background-color: transparent; + border-width: 0; + border-radius: 0; + padding: 0; + font-weight: inherit; + color: inherit; + font-size: inherit; + font-family: inherit; + line-height: inherit; +}.prose :where(pre code):not(:where([class~="not-prose"] *))::before { + content: none; +}.prose :where(pre code):not(:where([class~="not-prose"] *))::after { + content: none; +}.prose :where(table):not(:where([class~="not-prose"] *)) { + width: 100%; + table-layout: auto; + text-align: left; + margin-top: 2em; + margin-bottom: 2em; + font-size: 0.875em; + line-height: 1.7142857; +}.prose :where(thead):not(:where([class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-th-borders); +}.prose :where(thead th):not(:where([class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + vertical-align: bottom; + padding-right: 0.5714286em; + padding-bottom: 0.5714286em; + padding-left: 0.5714286em; +}.prose :where(tbody tr):not(:where([class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-td-borders); +}.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)) { + border-bottom-width: 0; +}.prose :where(tbody td):not(:where([class~="not-prose"] *)) { + vertical-align: baseline; + padding-top: 0.5714286em; + padding-right: 0.5714286em; + padding-bottom: 0.5714286em; + padding-left: 0.5714286em; +}.prose { + --tw-prose-body: #374151; + --tw-prose-headings: #111827; + --tw-prose-lead: #4b5563; + --tw-prose-links: #111827; + --tw-prose-bold: #111827; + --tw-prose-counters: #6b7280; + --tw-prose-bullets: #d1d5db; + --tw-prose-hr: #e5e7eb; + --tw-prose-quotes: #111827; + --tw-prose-quote-borders: #e5e7eb; + --tw-prose-captions: #6b7280; + --tw-prose-code: #111827; + --tw-prose-pre-code: #e5e7eb; + --tw-prose-pre-bg: #1f2937; + --tw-prose-th-borders: #d1d5db; + --tw-prose-td-borders: #e5e7eb; + --tw-prose-invert-body: #d1d5db; + --tw-prose-invert-headings: #fff; + --tw-prose-invert-lead: #9ca3af; + --tw-prose-invert-links: #fff; + --tw-prose-invert-bold: #fff; + --tw-prose-invert-counters: #9ca3af; + --tw-prose-invert-bullets: #4b5563; + --tw-prose-invert-hr: #374151; + --tw-prose-invert-quotes: #f3f4f6; + --tw-prose-invert-quote-borders: #374151; + --tw-prose-invert-captions: #9ca3af; + --tw-prose-invert-code: #fff; + --tw-prose-invert-pre-code: #d1d5db; + --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); + --tw-prose-invert-th-borders: #4b5563; + --tw-prose-invert-td-borders: #374151; + font-size: 1rem; + line-height: 1.75; +}.prose :where(p):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; +}.prose :where(img):not(:where([class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +}.prose :where(video):not(:where([class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +}.prose :where(figure):not(:where([class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +}.prose :where(h2 code):not(:where([class~="not-prose"] *)) { + font-size: 0.875em; +}.prose :where(h3 code):not(:where([class~="not-prose"] *)) { + font-size: 0.9em; +}.prose :where(li):not(:where([class~="not-prose"] *)) { + margin-top: 0.5em; + margin-bottom: 0.5em; +}.prose :where(ol > li):not(:where([class~="not-prose"] *)) { + padding-left: 0.375em; +}.prose :where(ul > li):not(:where([class~="not-prose"] *)) { + padding-left: 0.375em; +}.prose > :where(ul > li p):not(:where([class~="not-prose"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +}.prose > :where(ul > li > *:first-child):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; +}.prose > :where(ul > li > *:last-child):not(:where([class~="not-prose"] *)) { + margin-bottom: 1.25em; +}.prose > :where(ol > li > *:first-child):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; +}.prose > :where(ol > li > *:last-child):not(:where([class~="not-prose"] *)) { + margin-bottom: 1.25em; +}.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +}.prose :where(hr + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +}.prose :where(h2 + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +}.prose :where(h3 + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +}.prose :where(h4 + *):not(:where([class~="not-prose"] *)) { + margin-top: 0; +}.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)) { + padding-left: 0; +}.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)) { + padding-right: 0; +}.prose :where(tbody td:first-child):not(:where([class~="not-prose"] *)) { + padding-left: 0; +}.prose :where(tbody td:last-child):not(:where([class~="not-prose"] *)) { + padding-right: 0; +}.prose > :where(:first-child):not(:where([class~="not-prose"] *)) { + margin-top: 0; +}.prose > :where(:last-child):not(:where([class~="not-prose"] *)) { + margin-bottom: 0; +}.static { + position: static; +}.absolute { + position: absolute; +}.relative { + position: relative; +}.sticky { + position: -webkit-sticky; + position: sticky; +}.top-0 { + top: 0px; +}.right-0 { + right: 0px; +}.right-2 { + right: 0.5rem; +}.bottom-2 { + bottom: 0.5rem; +}.block { + display: block; +}.flex { + display: flex; +}.contents { + display: contents; +}.h-16 { + height: 4rem; +}.h-full { + height: 100%; +}.min-h-screen { + min-height: 100vh; +}.min-h-\[200px\] { + min-height: 200px; +}.w-full { + width: 100%; +}.w-16 { + width: 4rem; +}.max-w-3xl { + max-width: 48rem; +}.flex-none { + flex: none; +}.grow { + flex-grow: 1; +}.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +}.cursor-not-allowed { + cursor: not-allowed; +}.flex-col { + flex-direction: column; +}.items-center { + align-items: center; +}.justify-center { + justify-content: center; +}.justify-between { + justify-content: space-between; +}.space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); +}.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +}.space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); +}.overflow-auto { + overflow: auto; +}.whitespace-pre { + white-space: pre; +}.border { + border-width: 1px; +}.border-0 { + border-width: 0px; +}.border-b { + border-bottom-width: 1px; +}.border-gray-200 { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +}.border-gray-700 { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +}.border-slate-500 { + --tw-border-opacity: 1; + border-color: rgb(100 116 139 / var(--tw-border-opacity)); +}.bg-\[\#2A3236\] { + --tw-bg-opacity: 1; + background-color: rgb(42 50 54 / var(--tw-bg-opacity)); +}.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +}.bg-slate-700 { + --tw-bg-opacity: 1; + background-color: rgb(51 65 85 / var(--tw-bg-opacity)); +}.bg-\[\#283237\] { + --tw-bg-opacity: 1; + background-color: rgb(40 50 55 / var(--tw-bg-opacity)); +}.bg-slate-600 { + --tw-bg-opacity: 1; + background-color: rgb(71 85 105 / var(--tw-bg-opacity)); +}.p-4 { + padding: 1rem; +}.p-2 { + padding: 0.5rem; +}.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +}.text-right { + text-align: right; +}.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +}.text-xs { + font-size: 0.75rem; + line-height: 1rem; +}.text-gray-100 { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +}.text-red-500 { + --tw-text-opacity: 1; + color: rgb(239 68 68 / var(--tw-text-opacity)); +}.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +}.text-slate-400 { + --tw-text-opacity: 1; + color: rgb(148 163 184 / var(--tw-text-opacity)); +}.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +}.react-codemirror2, +.CodeMirror { + width: 100% !important; + height: inherit !important; +}.justify-center { + justify-content: center; +}.hover\:bg-slate-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(100 116 139 / var(--tw-bg-opacity)); +}.hover\:bg-slate-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(71 85 105 / var(--tw-bg-opacity)); +}.focus\:ring-red-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); +}.focus\:ring-slate-800:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(30 41 59 / var(--tw-ring-opacity)); +} + +/* + Name: material + Author: Mattia Astorino (http://github.com/equinusocio) + Website: https://material-theme.site/ +*/ + +.cm-s-material.CodeMirror { + background-color: #263238; + color: #EEFFFF; +} + +.cm-s-material .CodeMirror-gutters { + background: #263238; + color: #546E7A; + border: none; +} + +.cm-s-material .CodeMirror-guttermarker, +.cm-s-material .CodeMirror-guttermarker-subtle, +.cm-s-material .CodeMirror-linenumber { + color: #546E7A; +} + +.cm-s-material .CodeMirror-cursor { + border-left: 1px solid #FFCC00; +} +.cm-s-material.cm-fat-cursor .CodeMirror-cursor { + background-color: #5d6d5c80 !important; +} +.cm-s-material .cm-animate-fat-cursor { + background-color: #5d6d5c80 !important; +} + +.cm-s-material div.CodeMirror-selected { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material.CodeMirror-focused div.CodeMirror-selected { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material .CodeMirror-line::selection, +.cm-s-material .CodeMirror-line>span::selection, +.cm-s-material .CodeMirror-line>span>span::selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material .CodeMirror-line::-moz-selection, +.cm-s-material .CodeMirror-line>span::-moz-selection, +.cm-s-material .CodeMirror-line>span>span::-moz-selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.5); +} + +.cm-s-material .cm-keyword { + color: #C792EA; +} + +.cm-s-material .cm-operator { + color: #89DDFF; +} + +.cm-s-material .cm-variable-2 { + color: #EEFFFF; +} + +.cm-s-material .cm-variable-3, +.cm-s-material .cm-type { + color: #f07178; +} + +.cm-s-material .cm-builtin { + color: #FFCB6B; +} + +.cm-s-material .cm-atom { + color: #F78C6C; +} + +.cm-s-material .cm-number { + color: #FF5370; +} + +.cm-s-material .cm-def { + color: #82AAFF; +} + +.cm-s-material .cm-string { + color: #C3E88D; +} + +.cm-s-material .cm-string-2 { + color: #f07178; +} + +.cm-s-material .cm-comment { + color: #546E7A; +} + +.cm-s-material .cm-variable { + color: #f07178; +} + +.cm-s-material .cm-tag { + color: #FF5370; +} + +.cm-s-material .cm-meta { + color: #FFCB6B; +} + +.cm-s-material .cm-attribute { + color: #C792EA; +} + +.cm-s-material .cm-property { + color: #C792EA; +} + +.cm-s-material .cm-qualifier { + color: #DECB6B; +} + +.cm-s-material .cm-variable-3, +.cm-s-material .cm-type { + color: #DECB6B; +} + + +.cm-s-material .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #FF5370; +} + +.cm-s-material .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} + +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; + direction: ltr; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0 !important; + background: #7e7; +} +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} +.cm-fat-cursor .CodeMirror-line::selection, +.cm-fat-cursor .CodeMirror-line > span::selection, +.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; } +.cm-fat-cursor .CodeMirror-line::-moz-selection, +.cm-fat-cursor .CodeMirror-line > span::-moz-selection, +.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; } +.cm-fat-cursor { caret-color: transparent; } +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor {} + +.cm-tab { display: inline-block; text-decoration: inherit; } + +.CodeMirror-rulers { + position: absolute; + left: 0; right: 0; top: -50px; bottom: 0; + overflow: hidden; +} +.CodeMirror-ruler { + border-left: 1px solid #ccc; + top: 0; bottom: 0; + position: absolute; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-s-default .cm-error {color: #f00;} +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 50px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -50px; margin-right: -50px; + padding-bottom: 50px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; + z-index: 0; +} +.CodeMirror-sizer { + position: relative; + border-right: 50px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; + outline: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + min-height: 100%; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -50px; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} +.CodeMirror-gutter-wrapper ::selection { background-color: transparent } +.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; +} +.CodeMirror-wrap pre.CodeMirror-line, +.CodeMirror-wrap pre.CodeMirror-line-like { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + padding: 0.1px; /* Force widget margins to stay inside of the container */ +} + +.CodeMirror-widget {} + +.CodeMirror-rtl pre { direction: rtl; } + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { + position: absolute; + pointer-events: none; +} +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } +.CodeMirror-crosshair { cursor: crosshair; } +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + +.cm-searching { + background-color: #ffa; + background-color: rgba(255, 255, 0, .4); +} + +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } + +/*# sourceMappingURL=index.1e09ac22.css.map */ diff --git a/docs/tutorial/index.1e09ac22.css.map b/docs/tutorial/index.1e09ac22.css.map new file mode 100644 index 00000000..65fcb98b --- /dev/null +++ b/docs/tutorial/index.1e09ac22.css.map @@ -0,0 +1 @@ +{"mappings":"AAAA;;CAAc,CAAd;;;CAAc,CAAd;;;EAQE,sBAAsB,EAAE,MAAM;EAC9B,eAAe,EAAE,MAAM;EACvB,mBAAmB,EAAE,MAAM;EAC3B,qBAA0D,EAAE,MAAM;AAXtD,CAAd;;EAgBE,gBAAgB;AAhBJ,CAAd;;;;;CAAc,CAAd;EA2BE,gBAAgB,EAAE,MAAM;EACxB,8BAA8B,EAAE,MAAM;EACtC,gBAAgB,EAAE,MAAM;EACxB,cAAW;KAAX,WAAW,EAAE,MAAM;EACnB,4NAAsP,EAAE,MAAM;AA/BlP,CAAd;;;CAAc,CAAd;EAwCE,SAAS,EAAE,MAAM;EACjB,oBAAoB,EAAE,MAAM;AAzChB,CAAd;;;;CAAc,CAAd;EAmDE,SAAS,EAAE,MAAM;EACjB,cAAc,EAAE,MAAM;EACtB,qBAAqB,EAAE,MAAM;AArDjB,CAAd;;CAAc,CAAd;EA6DE,yCAAiC;UAAjC,iCAAiC;AA7DrB,CAAd;;CAAc,CAAd;;;;;;EA0EE,kBAAkB;EAClB,oBAAoB;AA3ER,CAAd;;CAAc,CAAd;EAmFE,cAAc;EACd,wBAAwB;AApFZ,CAAd;;CAAc,CAAd;;EA6FE,mBAAmB;AA7FP,CAAd;;;CAAc,CAAd;;;;EAyGE,+GAAyI,EAAE,MAAM;EACjJ,cAAc,EAAE,MAAM;AA1GV,CAAd;;CAAc,CAAd;EAkHE,cAAc;AAlHF,CAAd;;CAAc,CAAd;;EA2HE,cAAc;EACd,cAAc;EACd,kBAAkB;EAClB,wBAAwB;AA9HZ,CAAd;EAkIE,eAAe;AAlIH,CAAd;EAsIE,WAAW;AAtIC,CAAd;;;;CAAc,CAAd;EAgJE,cAAc,EAAE,MAAM;EACtB,qBAAqB,EAAE,MAAM;EAC7B,yBAAyB,EAAE,MAAM;AAlJrB,CAAd;;;;CAAc,CAAd;;;;;EAgKE,oBAAoB,EAAE,MAAM;EAC5B,eAAe,EAAE,MAAM;EACvB,oBAAoB,EAAE,MAAM;EAC5B,cAAc,EAAE,MAAM;EACtB,SAAS,EAAE,MAAM;EACjB,UAAU,EAAE,MAAM;AArKN,CAAd;;CAAc,CAAd;;EA8KE,oBAAoB;AA9KR,CAAd;;;CAAc,CAAd;;;;EA0LE,0BAA0B,EAAE,MAAM;EAClC,6BAA6B,EAAE,MAAM;EACrC,sBAAsB,EAAE,MAAM;AA5LlB,CAAd;;CAAc,CAAd;EAoME,aAAa;AApMD,CAAd;;CAAc,CAAd;EA4ME,gBAAgB;AA5MJ,CAAd;;CAAc,CAAd;EAoNE,wBAAwB;AApNZ,CAAd;;CAAc,CAAd;;EA6NE,YAAY;AA7NA,CAAd;;;CAAc,CAAd;EAsOE,6BAA6B,EAAE,MAAM;EACrC,oBAAoB,EAAE,MAAM;AAvOhB,CAAd;;CAAc,CAAd;EA+OE,wBAAwB;AA/OZ,CAAd;;;CAAc,CAAd;EAwPE,0BAA0B,EAAE,MAAM;EAClC,aAAa,EAAE,MAAM;AAzPT,CAAd;;CAAc,CAAd;EAiQE,kBAAkB;AAjQN,CAAd;;CAAc,CAAd;;;;;;;;;;;;;EAqRE,SAAS;AArRG,CAAd;EAyRE,SAAS;EACT,UAAU;AA1RE,CAAd;EA8RE,UAAU;AA9RE,CAAd;;;EAoSE,gBAAgB;EAChB,SAAS;EACT,UAAU;AAtSE,CAAd;;CAAc,CAAd;EA8SE,gBAAgB;AA9SJ,CAAd;;;CAAc,CAAd;EAwTE,UAAU,EAAE,MAAM;EAClB,cAAwC,EAAE,MAAM;AAzTpC,CAAd;EAwTE,UAAU,EAAE,MAAM;EAClB,cAAwC,EAAE,MAAM;AAzTpC,CAAd;;EAwTE,UAAU,EAAE,MAAM;EAClB,cAAwC,EAAE,MAAM;AAzTpC,CAAd;;CAAc,CAAd;;EAkUE,eAAe;AAlUH,CAAd;;CAAc,CAAd;EAyUE,eAAe;AAzUH,CAAd;;;;CAAc,CAAd;;;;;;;;EA0VE,cAAc,EAAE,MAAM;EACtB,sBAAsB,EAAE,MAAM;AA3VlB,CAAd;;CAAc,CAAd;;EAoWE,eAAe;EACf,YAAY;AArWA,CAAd;;CAAc,CAAd;EA6WE,aAAa;AA7WD,CAAd;ECAA,yBAAA;KAAA,sBAAA;UAAA,iBAAA;UAAA,uBAAA;UAAA,sBAAA;UAAA,kBAAA;UAAA,mBAAA;UAAA,oBAAA;UAAA,uBAAA;UAAA,uBAAA;UAAA,sBAAA;UAAA,gBAAA;UAAA,oBAAA;UAAA,uBAAA;ADAc,CAAd;ECAA,+BAAA;EAAA,oBAAA;EAAA,6CAAA;EAAA,4BAAA;EAAA,6BAAA;EAAA,yBAAA;EAAA,4GAAA;EAAA,0GAAA;EAAA,kFAAA;EAAA;ADAc,CAAd;ECAA,eAAA;EAAA;ADAc,CAAd;ECAA,eAAA;EAAA;ADAc,CAAd;ECAA,eAAA;EAAA;ADAc,CAAd;ECAA;ADAc,CAAd;ECAA;ADAc,CAAd;ECAA,0CAAA;EAAA,yCAAA;EAAA,6BAAA;EAAA,6BAAA;EAAA,sBAAA;EAAA,kCAAA;UAAA;ADAc,CAAd;ECAA,0BAAA;EAAA,6BAAA;EAAA,yBAAA;EAAA,yBAAA;EAAA,uBAAA;EAAA,kCAAA;UAAA;ADAc,CAAd;ECAA,yBAAA;KAAA,sBAAA;UAAA,iBAAA;UAAA,WAAA;EAAA,kCAAA;UAAA,oBAAA;UAAA,sBAAA;UAAA,uBAAA;UAAA,8BAAA;EAAA,0BAAA;KAAA,uBAAA;MAAA,sBAAA;UAAA,kBAAA;UAAA,eAAA;UAAA,aAAA;UAAA,YAAA;UAAA,eAAA;UAAA,uBAAA;UAAA,sBAAA;UAAA,kBAAA;UAAA;ADAc,CAAd;ECAA;ADAc,CAAd;ECAA;ADAc,CAAd;ECAA,+BAAA;EAAA,oBAAA;EAAA,6CAAA;EAAA,4BAAA;EAAA,6BAAA;EAAA,yBAAA;EAAA,4GAAA;EAAA,0GAAA;EAAA;ADAc,CAAd;ECAA,0BAAA;EAAA,+BAAA;EAAA,2BAAA;EAAA,4BAAA;EAAA;ADAc,CAAd;ECAA;ADAc,CAAd;ECAA;ADAc,CAAd;ECAA,0BAAA;EAAA;ADAc,CAAd;ECAA,0CAAA;EAAA,0BAAA;EAAA,+BAAA;EAAA,2BAAA;EAAA,4BAAA;EAAA;ADAc,CAAd;ECAA,0BAAA;EAAA;ADAc,CAAd;ECAA,kBAAA;EAAA,sBAAA;EAAA,gBAAA;EAAA,iBAAA;EAAA,WAAA;EAAA,iBAAA;EAAA;ADAc,CAAd;ECAA;ADAc,CCAd;EAAA,oBAAA;EAAA,oBAAA;EAAA,eAAA;EAAA,eAAA;EAAA,eAAA;EAAA,gBAAA;EAAA,gBAAA;EAAA,cAAA;EAAA,cAAA;EAAA,mBAAA;EAAA,uCAAA;EAAA,gBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAA,wBAAA;EAAA,yBAAA;EAAA,mBAAA;EAAA,4BAAA;EAAA,6BAAA;EAAA,uCAAA;EAAA,mCAAA;EAAA,4BAAA;EAAA,uBAAA;EAAA,+BAAA;EAAA,aAAA;EAAA,mBAAA;EAAA,iBAAA;EAAA,kBAAA;EAAA,mBAAA;EAAA,eAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,oBAAA;EAAA,sBAAA;EAAA,4BAAA;EAAA,0BAAA;EAAA,2BAAA;EAAA,4BAAA;EAAA,wBAAA;EAAA,yBAAA;EAAA,0BAAA;EAAA;CAAA,ADCA;ECDA,4BAAA;EAAA,gBAAA;ADCoB,CAApB;ECDA,4BAAA;EAAA,kBAAA;EAAA,iBAAA;EAAA,kBAAA;EAAA;ADCoB,CAApB;ECDA,6BAAA;EAAA,2BAAA;EAAA;ADCoB,CAApB;ECDA,4BAAA;EAAA;ADCoB,CAApB;ECDA,yBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,sBAAA;EAAA;ADCoB,CAApB;ECDA,iBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,iCAAA;EAAA,sBAAA;EAAA,gBAAA;EAAA;ADCoB,CAApB;ECDA,iBAAA;EAAA,mBAAA;EAAA,8BAAA;EAAA,2BAAA;EAAA,iDAAA;EAAA,qCAAA;EAAA,kBAAA;EAAA,qBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,gCAAA;EAAA,iBAAA;EAAA,kBAAA;EAAA,cAAA;EAAA,2BAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,gCAAA;EAAA,iBAAA;EAAA,iBAAA;EAAA,gBAAA;EAAA,mBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,gCAAA;EAAA,iBAAA;EAAA,kBAAA;EAAA,kBAAA;EAAA,qBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,gCAAA;EAAA,iBAAA;EAAA,kBAAA;EAAA,qBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,cAAA;EAAA;ADCoB,CAApB;ECDA,gCAAA;EAAA,mBAAA;EAAA,uBAAA;EAAA;ADCoB,CAApB;ECDA,4BAAA;EAAA,iBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,gCAAA;EAAA,yCAAA;EAAA,iBAAA;EAAA,iBAAA;EAAA,mBAAA;EAAA,uBAAA;EAAA,wBAAA;EAAA,2BAAA;EAAA,wBAAA;EAAA,yBAAA;EAAA,2BAAA;EAAA,4BAAA;EAAA;ADCoB,CAApB;ECDA,8BAAA;EAAA,gBAAA;EAAA,iBAAA;EAAA,WAAA;EAAA,qBAAA;EAAA,eAAA;EAAA,mBAAA;EAAA,qBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,YAAA;EAAA,mBAAA;EAAA,iBAAA;EAAA,gBAAA;EAAA,mBAAA;EAAA,mBAAA;EAAA;ADCoB,CAApB;ECDA,yBAAA;EAAA;ADCoB,CAApB;ECDA,gCAAA;EAAA,iBAAA;EAAA,uBAAA;EAAA,2BAAA;EAAA,4BAAA;EAAA;ADCoB,CAApB;ECDA,yBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,yBAAA;EAAA,yBAAA;EAAA,2BAAA;EAAA,4BAAA;EAAA;ADCoB,CAApB;ECDA,yBAAA;EAAA,6BAAA;EAAA,yBAAA;EAAA,0BAAA;EAAA,yBAAA;EAAA,6BAAA;EAAA,4BAAA;EAAA,uBAAA;EAAA,2BAAA;EAAA,kCAAA;EAAA,6BAAA;EAAA,yBAAA;EAAA,6BAAA;EAAA,2BAAA;EAAA,+BAAA;EAAA,+BAAA;EAAA,gCAAA;EAAA,iCAAA;EAAA,gCAAA;EAAA,8BAAA;EAAA,6BAAA;EAAA,oCAAA;EAAA,mCAAA;EAAA,8BAAA;EAAA,kCAAA;EAAA,yCAAA;EAAA,oCAAA;EAAA,6BAAA;EAAA,oCAAA;EAAA,2CAAA;EAAA,sCAAA;EAAA,sCAAA;EAAA,gBAAA;EAAA;ADCoB,CAApB;ECDA,mBAAA;EAAA;ADCoB,CAApB;ECDA,gBAAA;EAAA;ADCoB,CAApB;ECDA,gBAAA;EAAA;ADCoB,CAApB;ECDA,gBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,kBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,mBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA,mBAAA;EAAA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CAApB;ECDA;ADCoB,CACpB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA,yBAAA;EAAA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA,wBAAA;EAAA,uDAAA;EAAA;ADEmB,CAAnB;ECFA,wBAAA;EAAA,qDAAA;EAAA;ADEmB,CAAnB;ECFA,wBAAA;EAAA,4DAAA;EAAA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA,uBAAA;EAAA;ADEmB,CAAnB;ECFA,uBAAA;EAAA;ADEmB,CAAnB;ECFA,uBAAA;EAAA;ADEmB,CAAnB;ECFA,mBAAA;EAAA;ADEmB,CAAnB;ECFA,mBAAA;EAAA;ADEmB,CAAnB;ECFA,mBAAA;EAAA;ADEmB,CAAnB;ECFA,mBAAA;EAAA;ADEmB,CAAnB;ECFA,mBAAA;EAAA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA,qBAAA;EAAA;ADEmB,CAAnB;ECFA;ADEmB,CAAnB;ECFA,kBAAA;EAAA;ADEmB,CAAnB;ECFA,mBAAA;EAAA;ADEmB,CAAnB;ECFA,qBAAA;EAAA;ADEmB,CAAnB;ECFA,qBAAA;EAAA;ADEmB,CAAnB;ECFA,qBAAA;EAAA;ADEmB,CAAnB;ECFA,qBAAA;EAAA;ADEmB,CAAnB;ECFA;ADEmB,CAEnB;;EAEE,sBAAsB;EACtB,0BAA0B;AAC5B,CAEA;EACE,uBAAuB;AACzB,CAZA;ECAA,mBAAA;EAAA;CAAA,ADAA;ECAA,mBAAA;EAAA;CAAA,ADAA;ECAA,qBAAA;EAAA;CAAA,ADAA;ECAA,qBAAA;EAAA;CAAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["src/tutorial/style.css","","node_modules/codemirror/theme/material.css","node_modules/codemirror/lib/codemirror.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n.react-codemirror2,\n.CodeMirror {\n width: 100% !important;\n height: inherit !important;\n}\n\n.justify-center {\n justify-content: center;\n}\n",null,"/*\n Name: material\n Author: Mattia Astorino (http://github.com/equinusocio)\n Website: https://material-theme.site/\n*/\n\n.cm-s-material.CodeMirror {\n background-color: #263238;\n color: #EEFFFF;\n}\n\n.cm-s-material .CodeMirror-gutters {\n background: #263238;\n color: #546E7A;\n border: none;\n}\n\n.cm-s-material .CodeMirror-guttermarker,\n.cm-s-material .CodeMirror-guttermarker-subtle,\n.cm-s-material .CodeMirror-linenumber {\n color: #546E7A;\n}\n\n.cm-s-material .CodeMirror-cursor {\n border-left: 1px solid #FFCC00;\n}\n.cm-s-material.cm-fat-cursor .CodeMirror-cursor {\n background-color: #5d6d5c80 !important;\n}\n.cm-s-material .cm-animate-fat-cursor {\n background-color: #5d6d5c80 !important;\n}\n\n.cm-s-material div.CodeMirror-selected {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material.CodeMirror-focused div.CodeMirror-selected {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material .CodeMirror-line::selection,\n.cm-s-material .CodeMirror-line>span::selection,\n.cm-s-material .CodeMirror-line>span>span::selection {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material .CodeMirror-line::-moz-selection,\n.cm-s-material .CodeMirror-line>span::-moz-selection,\n.cm-s-material .CodeMirror-line>span>span::-moz-selection {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material .CodeMirror-activeline-background {\n background: rgba(0, 0, 0, 0.5);\n}\n\n.cm-s-material .cm-keyword {\n color: #C792EA;\n}\n\n.cm-s-material .cm-operator {\n color: #89DDFF;\n}\n\n.cm-s-material .cm-variable-2 {\n color: #EEFFFF;\n}\n\n.cm-s-material .cm-variable-3,\n.cm-s-material .cm-type {\n color: #f07178;\n}\n\n.cm-s-material .cm-builtin {\n color: #FFCB6B;\n}\n\n.cm-s-material .cm-atom {\n color: #F78C6C;\n}\n\n.cm-s-material .cm-number {\n color: #FF5370;\n}\n\n.cm-s-material .cm-def {\n color: #82AAFF;\n}\n\n.cm-s-material .cm-string {\n color: #C3E88D;\n}\n\n.cm-s-material .cm-string-2 {\n color: #f07178;\n}\n\n.cm-s-material .cm-comment {\n color: #546E7A;\n}\n\n.cm-s-material .cm-variable {\n color: #f07178;\n}\n\n.cm-s-material .cm-tag {\n color: #FF5370;\n}\n\n.cm-s-material .cm-meta {\n color: #FFCB6B;\n}\n\n.cm-s-material .cm-attribute {\n color: #C792EA;\n}\n\n.cm-s-material .cm-property {\n color: #C792EA;\n}\n\n.cm-s-material .cm-qualifier {\n color: #DECB6B;\n}\n\n.cm-s-material .cm-variable-3,\n.cm-s-material .cm-type {\n color: #DECB6B;\n}\n\n\n.cm-s-material .cm-error {\n color: rgba(255, 255, 255, 1.0);\n background-color: #FF5370;\n}\n\n.cm-s-material .CodeMirror-matchingbracket {\n text-decoration: underline;\n color: white !important;\n}\n","/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n.cm-fat-cursor .CodeMirror-line::selection,\n.cm-fat-cursor .CodeMirror-line > span::selection, \n.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; }\n.cm-fat-cursor .CodeMirror-line::-moz-selection,\n.cm-fat-cursor .CodeMirror-line > span::-moz-selection,\n.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; }\n.cm-fat-cursor { caret-color: transparent; }\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: 0;\n overflow: hidden;\n}\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 50px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -50px; margin-right: -50px;\n padding-bottom: 50px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n z-index: 0;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n outline: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -50px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background-color: #ffa;\n background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n"],"names":[],"version":3,"file":"index.1e09ac22.css.map"} \ No newline at end of file diff --git a/docs/tutorial/index.a1b5cf57.js b/docs/tutorial/index.a1b5cf57.js new file mode 100644 index 00000000..d49e14e2 --- /dev/null +++ b/docs/tutorial/index.a1b5cf57.js @@ -0,0 +1,108738 @@ +// modules are defined as an array +// [ module function, map of requires ] +// +// map of requires is short require name -> numeric require +// +// anything defined in a previous bundle is accessed via the +// orig method which is the require for previous bundles + +(function (modules, entry, mainEntry, parcelRequireName, globalName) { + /* eslint-disable no-undef */ + var globalObject = + typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; + /* eslint-enable no-undef */ + + // Save the require from previous bundle to this closure if any + var previousRequire = + typeof globalObject[parcelRequireName] === 'function' && + globalObject[parcelRequireName]; + + var cache = previousRequire.cache || {}; + // Do not use `require` to prevent Webpack from trying to bundle this call + var nodeRequire = + typeof module !== 'undefined' && + typeof module.require === 'function' && + module.require.bind(module); + + function newRequire(name, jumped) { + if (!cache[name]) { + if (!modules[name]) { + // if we cannot find the module within our internal map or + // cache jump to the current global require ie. the last bundle + // that was added to the page. + var currentRequire = + typeof globalObject[parcelRequireName] === 'function' && + globalObject[parcelRequireName]; + if (!jumped && currentRequire) { + return currentRequire(name, true); + } + + // If there are other bundles on this page the require from the + // previous one is saved to 'previousRequire'. Repeat this as + // many times as there are bundles until the module is found or + // we exhaust the require chain. + if (previousRequire) { + return previousRequire(name, true); + } + + // Try the node require function if it exists. + if (nodeRequire && typeof name === 'string') { + return nodeRequire(name); + } + + var err = new Error("Cannot find module '" + name + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + + localRequire.resolve = resolve; + localRequire.cache = {}; + + var module = (cache[name] = new newRequire.Module(name)); + + modules[name][0].call( + module.exports, + localRequire, + module, + module.exports, + this + ); + } + + return cache[name].exports; + + function localRequire(x) { + var res = localRequire.resolve(x); + return res === false ? {} : newRequire(res); + } + + function resolve(x) { + var id = modules[name][1][x]; + return id != null ? id : x; + } + } + + function Module(moduleName) { + this.id = moduleName; + this.bundle = newRequire; + this.exports = {}; + } + + newRequire.isParcelRequire = true; + newRequire.Module = Module; + newRequire.modules = modules; + newRequire.cache = cache; + newRequire.parent = previousRequire; + newRequire.register = function (id, exports) { + modules[id] = [ + function (require, module) { + module.exports = exports; + }, + {}, + ]; + }; + + Object.defineProperty(newRequire, 'root', { + get: function () { + return globalObject[parcelRequireName]; + }, + }); + + globalObject[parcelRequireName] = newRequire; + + for (var i = 0; i < entry.length; i++) { + newRequire(entry[i]); + } + + if (mainEntry) { + // Expose entry point to Node, AMD or browser globals + // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js + var mainExports = newRequire(mainEntry); + + // CommonJS + if (typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = mainExports; + + // RequireJS + } else if (typeof define === 'function' && define.amd) { + define(function () { + return mainExports; + }); + + // + + diff --git a/repl/.gitignore b/repl/.gitignore index a08cc243..bc71ec9d 100644 --- a/repl/.gitignore +++ b/repl/.gitignore @@ -1,4 +1,5 @@ .snowpack build node_modules -.DS_Store \ No newline at end of file +.DS_Store +.parcel-cache \ No newline at end of file diff --git a/repl/README.md b/repl/README.md index db8fde66..e399d2df 100644 --- a/repl/README.md +++ b/repl/README.md @@ -1,16 +1,5 @@ # Strudel REPL -## TODO - -### mini notation ([krill docs](https://github.com/Mdashdotdashn/krill#general-principles)) - -- "@" aka elongation / weight: how to write in strudel? -- "%" fixed step: how to write in strudel? -- "struct" not sure how to do this -- "c3(5,8)" bjorklund algorithm -- more [mini notation features](https://tidalcycles.org/docs/patternlib/tutorials/mini_notation) -- not tested - ## Default Snowpack Readme > ✨ Bootstrapped with Create Snowpack App (CSA). diff --git a/repl/krill-parser.js b/repl/krill-parser.js index db17b13f..568fc08b 100644 --- a/repl/krill-parser.js +++ b/repl/krill-parser.js @@ -177,30 +177,33 @@ function peg$parse(input, options) { var peg$c5 = "\""; var peg$c6 = "'"; var peg$c7 = "#"; - var peg$c8 = "["; - var peg$c9 = "]"; - var peg$c10 = "<"; - var peg$c11 = ">"; - var peg$c12 = "@"; - var peg$c13 = "("; - var peg$c14 = ")"; - var peg$c15 = "/"; - var peg$c16 = "*"; - var peg$c17 = "%"; - var peg$c18 = "struct"; - var peg$c19 = "target"; - var peg$c20 = "euclid"; - var peg$c21 = "slow"; - var peg$c22 = "rotL"; - var peg$c23 = "rotR"; - var peg$c24 = "fast"; - var peg$c25 = "scale"; - var peg$c26 = "//"; - var peg$c27 = "cat"; - var peg$c28 = "$"; - var peg$c29 = "setcps"; - var peg$c30 = "setbpm"; - var peg$c31 = "hush"; + var peg$c8 = "^"; + var peg$c9 = "_"; + var peg$c10 = "["; + var peg$c11 = "]"; + var peg$c12 = "<"; + var peg$c13 = ">"; + var peg$c14 = "@"; + var peg$c15 = "!"; + var peg$c16 = "("; + var peg$c17 = ")"; + var peg$c18 = "/"; + var peg$c19 = "*"; + var peg$c20 = "%"; + var peg$c21 = "struct"; + var peg$c22 = "target"; + var peg$c23 = "euclid"; + var peg$c24 = "slow"; + var peg$c25 = "rotL"; + var peg$c26 = "rotR"; + var peg$c27 = "fast"; + var peg$c28 = "scale"; + var peg$c29 = "//"; + var peg$c30 = "cat"; + var peg$c31 = "$"; + var peg$c32 = "setcps"; + var peg$c33 = "setbpm"; + var peg$c34 = "hush"; var peg$r0 = /^[1-9]/; var peg$r1 = /^[eE]/; @@ -224,63 +227,67 @@ function peg$parse(input, options) { var peg$e12 = peg$literalExpectation("'", false); var peg$e13 = peg$classExpectation([["0", "9"], ["a", "z"], ["A", "Z"], "~"], false, false); var peg$e14 = peg$literalExpectation("#", false); - var peg$e15 = peg$literalExpectation("[", false); - var peg$e16 = peg$literalExpectation("]", false); - var peg$e17 = peg$literalExpectation("<", false); - var peg$e18 = peg$literalExpectation(">", false); - var peg$e19 = peg$literalExpectation("@", false); - var peg$e20 = peg$literalExpectation("(", false); - var peg$e21 = peg$literalExpectation(")", false); - var peg$e22 = peg$literalExpectation("/", false); - var peg$e23 = peg$literalExpectation("*", false); - var peg$e24 = peg$literalExpectation("%", false); - var peg$e25 = peg$literalExpectation("struct", false); - var peg$e26 = peg$literalExpectation("target", false); - var peg$e27 = peg$literalExpectation("euclid", false); - var peg$e28 = peg$literalExpectation("slow", false); - var peg$e29 = peg$literalExpectation("rotL", false); - var peg$e30 = peg$literalExpectation("rotR", false); - var peg$e31 = peg$literalExpectation("fast", false); - var peg$e32 = peg$literalExpectation("scale", false); - var peg$e33 = peg$literalExpectation("//", false); - var peg$e34 = peg$classExpectation(["\n"], true, false); - var peg$e35 = peg$literalExpectation("cat", false); - var peg$e36 = peg$literalExpectation("$", false); - var peg$e37 = peg$literalExpectation("setcps", false); - var peg$e38 = peg$literalExpectation("setbpm", false); - var peg$e39 = peg$literalExpectation("hush", false); + var peg$e15 = peg$literalExpectation("^", false); + var peg$e16 = peg$literalExpectation("_", false); + var peg$e17 = peg$literalExpectation("[", false); + var peg$e18 = peg$literalExpectation("]", false); + var peg$e19 = peg$literalExpectation("<", false); + var peg$e20 = peg$literalExpectation(">", false); + var peg$e21 = peg$literalExpectation("@", false); + var peg$e22 = peg$literalExpectation("!", false); + var peg$e23 = peg$literalExpectation("(", false); + var peg$e24 = peg$literalExpectation(")", false); + var peg$e25 = peg$literalExpectation("/", false); + var peg$e26 = peg$literalExpectation("*", false); + var peg$e27 = peg$literalExpectation("%", false); + var peg$e28 = peg$literalExpectation("struct", false); + var peg$e29 = peg$literalExpectation("target", false); + var peg$e30 = peg$literalExpectation("euclid", false); + var peg$e31 = peg$literalExpectation("slow", false); + var peg$e32 = peg$literalExpectation("rotL", false); + var peg$e33 = peg$literalExpectation("rotR", false); + var peg$e34 = peg$literalExpectation("fast", false); + var peg$e35 = peg$literalExpectation("scale", false); + var peg$e36 = peg$literalExpectation("//", false); + var peg$e37 = peg$classExpectation(["\n"], true, false); + var peg$e38 = peg$literalExpectation("cat", false); + var peg$e39 = peg$literalExpectation("$", false); + var peg$e40 = peg$literalExpectation("setcps", false); + var peg$e41 = peg$literalExpectation("setbpm", false); + var peg$e42 = peg$literalExpectation("hush", false); var peg$f0 = function() { return parseFloat(text()); }; var peg$f1 = function(chars) { return chars.join("") }; var peg$f2 = function(s) { return s}; var peg$f3 = function(sc) { sc.arguments_.alignment = "t"; return sc;}; var peg$f4 = function(a) { return { weight: a} }; - var peg$f5 = function(p, s) { return { operator : { type_: "bjorklund", arguments_ :{ pulse: p, step:s } } } }; - var peg$f6 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:a } } } }; - var peg$f7 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:"1/"+a } } } }; - var peg$f8 = function(a) { return { operator : { type_: "fixed-step", arguments_ :{ amount:a } } } }; - var peg$f9 = function(s, o) { return new ElementStub(s, o);}; - var peg$f10 = function(s) { return new PatternStub(s,"h"); }; - var peg$f11 = function(c, v) { return v}; - var peg$f12 = function(c, cs) { if (cs.length == 0 && c instanceof Object) { return c;} else { cs.unshift(c); return new PatternStub(cs,"v");} }; - var peg$f13 = function(s) { return s; }; - var peg$f14 = function(s) { return { name: "struct", args: { sequence:s }}}; - var peg$f15 = function(s) { return { name: "target", args : { name:s}}}; - var peg$f16 = function(p, s) { return { name: "bjorklund", args :{ pulse: parseInt(p), step:parseInt(s) }}}; - var peg$f17 = function(a) { return { name: "stretch", args :{ amount: a}}}; - var peg$f18 = function(a) { return { name: "shift", args :{ amount: "-"+a}}}; - var peg$f19 = function(a) { return { name: "shift", args :{ amount: a}}}; - var peg$f20 = function(a) { return { name: "stretch", args :{ amount: "1/"+a}}}; - var peg$f21 = function(s) { return { name: "scale", args :{ scale: s.join("")}}}; - var peg$f22 = function(s, v) { return v}; - var peg$f23 = function(s, ss) { ss.unshift(s); return new PatternStub(ss,"t"); }; - var peg$f24 = function(sg) {return sg}; - var peg$f25 = function(o, soc) { return new OperatorStub(o.name,o.args,soc)}; - var peg$f26 = function(sc) { return sc }; - var peg$f27 = function(c) { return c }; - var peg$f28 = function(v) { return new CommandStub("setcps", { value: v})}; - var peg$f29 = function(v) { return new CommandStub("setcps", { value: (v/120/2)})}; - var peg$f30 = function() { return new CommandStub("hush")}; + var peg$f5 = function(a) { return { replicate: a } }; + var peg$f6 = function(p, s) { return { operator : { type_: "bjorklund", arguments_ :{ pulse: p, step:s } } } }; + var peg$f7 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:a } } } }; + var peg$f8 = function(a) { return { operator : { type_: "stretch", arguments_ :{ amount:"1/"+a } } } }; + var peg$f9 = function(a) { return { operator : { type_: "fixed-step", arguments_ :{ amount:a } } } }; + var peg$f10 = function(s, o) { return new ElementStub(s, o);}; + var peg$f11 = function(s) { return new PatternStub(s,"h"); }; + var peg$f12 = function(c, v) { return v}; + var peg$f13 = function(c, cs) { if (cs.length == 0 && c instanceof Object) { return c;} else { cs.unshift(c); return new PatternStub(cs,"v");} }; + var peg$f14 = function(s) { return s; }; + var peg$f15 = function(s) { return { name: "struct", args: { sequence:s }}}; + var peg$f16 = function(s) { return { name: "target", args : { name:s}}}; + var peg$f17 = function(p, s) { return { name: "bjorklund", args :{ pulse: parseInt(p), step:parseInt(s) }}}; + var peg$f18 = function(a) { return { name: "stretch", args :{ amount: a}}}; + var peg$f19 = function(a) { return { name: "shift", args :{ amount: "-"+a}}}; + var peg$f20 = function(a) { return { name: "shift", args :{ amount: a}}}; + var peg$f21 = function(a) { return { name: "stretch", args :{ amount: "1/"+a}}}; + var peg$f22 = function(s) { return { name: "scale", args :{ scale: s.join("")}}}; + var peg$f23 = function(s, v) { return v}; + var peg$f24 = function(s, ss) { ss.unshift(s); return new PatternStub(ss,"t"); }; + var peg$f25 = function(sg) {return sg}; + var peg$f26 = function(o, soc) { return new OperatorStub(o.name,o.args,soc)}; + var peg$f27 = function(sc) { return sc }; + var peg$f28 = function(c) { return c }; + var peg$f29 = function(v) { return new CommandStub("setcps", { value: v})}; + var peg$f30 = function(v) { return new CommandStub("setcps", { value: (v/120/2)})}; + var peg$f31 = function() { return new CommandStub("hush")}; var peg$currPos = 0; var peg$savedPos = 0; @@ -781,6 +788,24 @@ function peg$parse(input, options) { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e1); } } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 94) { + s0 = peg$c8; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e15); } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 95) { + s0 = peg$c9; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e16); } + } + } + } } } } @@ -821,11 +846,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 91) { - s2 = peg$c8; + s2 = peg$c10; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } + if (peg$silentFails === 0) { peg$fail(peg$e17); } } if (s2 !== peg$FAILED) { s3 = peg$parsews(); @@ -833,11 +858,11 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 93) { - s6 = peg$c9; + s6 = peg$c11; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e16); } + if (peg$silentFails === 0) { peg$fail(peg$e18); } } if (s6 !== peg$FAILED) { s7 = peg$parsews(); @@ -865,11 +890,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 60) { - s2 = peg$c10; + s2 = peg$c12; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e17); } + if (peg$silentFails === 0) { peg$fail(peg$e19); } } if (s2 !== peg$FAILED) { s3 = peg$parsews(); @@ -877,11 +902,11 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 62) { - s6 = peg$c11; + s6 = peg$c13; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e18); } + if (peg$silentFails === 0) { peg$fail(peg$e20); } } if (s6 !== peg$FAILED) { s7 = peg$parsews(); @@ -929,6 +954,9 @@ function peg$parse(input, options) { s0 = peg$parseslice_fast(); if (s0 === peg$FAILED) { s0 = peg$parseslice_fixed_step(); + if (s0 === peg$FAILED) { + s0 = peg$parseslice_replicate(); + } } } } @@ -942,11 +970,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 64) { - s1 = peg$c12; + s1 = peg$c14; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e19); } + if (peg$silentFails === 0) { peg$fail(peg$e21); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); @@ -965,16 +993,44 @@ function peg$parse(input, options) { return s0; } + function peg$parseslice_replicate() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 33) { + s1 = peg$c15; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e22); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsenumber(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f5(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseslice_bjorklund() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c13; + s1 = peg$c16; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e20); } + if (peg$silentFails === 0) { peg$fail(peg$e23); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -988,15 +1044,15 @@ function peg$parse(input, options) { if (s7 !== peg$FAILED) { s8 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 41) { - s9 = peg$c14; + s9 = peg$c17; peg$currPos++; } else { s9 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e21); } + if (peg$silentFails === 0) { peg$fail(peg$e24); } } if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f5(s3, s7); + s0 = peg$f6(s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1026,39 +1082,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 47) { - s1 = peg$c15; + s1 = peg$c18; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e22); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f6(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseslice_fast() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c16; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e23); } + if (peg$silentFails === 0) { peg$fail(peg$e25); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); @@ -1077,16 +1105,16 @@ function peg$parse(input, options) { return s0; } - function peg$parseslice_fixed_step() { + function peg$parseslice_fast() { var s0, s1, s2; s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 37) { - s1 = peg$c17; + if (input.charCodeAt(peg$currPos) === 42) { + s1 = peg$c19; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e24); } + if (peg$silentFails === 0) { peg$fail(peg$e26); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); @@ -1105,6 +1133,34 @@ function peg$parse(input, options) { return s0; } + function peg$parseslice_fixed_step() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 37) { + s1 = peg$c20; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e27); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsenumber(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f9(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseslice_with_modifier() { var s0, s1, s2; @@ -1116,7 +1172,7 @@ function peg$parse(input, options) { s2 = null; } peg$savedPos = s0; - s0 = peg$f9(s1, s2); + s0 = peg$f10(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1141,7 +1197,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f10(s1); + s1 = peg$f11(s1); } s0 = s1; @@ -1161,7 +1217,7 @@ function peg$parse(input, options) { s5 = peg$parsesingle_cycle(); if (s5 !== peg$FAILED) { peg$savedPos = s3; - s3 = peg$f11(s1, s5); + s3 = peg$f12(s1, s5); } else { peg$currPos = s3; s3 = peg$FAILED; @@ -1178,7 +1234,7 @@ function peg$parse(input, options) { s5 = peg$parsesingle_cycle(); if (s5 !== peg$FAILED) { peg$savedPos = s3; - s3 = peg$f11(s1, s5); + s3 = peg$f12(s1, s5); } else { peg$currPos = s3; s3 = peg$FAILED; @@ -1189,7 +1245,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f12(s1, s2); + s0 = peg$f13(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1210,7 +1266,7 @@ function peg$parse(input, options) { s4 = peg$parsequote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f13(s3); + s0 = peg$f14(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1260,19 +1316,19 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c18) { - s1 = peg$c18; + if (input.substr(peg$currPos, 6) === peg$c21) { + s1 = peg$c21; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e25); } + if (peg$silentFails === 0) { peg$fail(peg$e28); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); s3 = peg$parsesequence_or_operator(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f14(s3); + s0 = peg$f15(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1289,12 +1345,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c19) { - s1 = peg$c19; + if (input.substr(peg$currPos, 6) === peg$c22) { + s1 = peg$c22; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e26); } + if (peg$silentFails === 0) { peg$fail(peg$e29); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1305,7 +1361,7 @@ function peg$parse(input, options) { s5 = peg$parsequote(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f15(s4); + s0 = peg$f16(s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1330,12 +1386,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c20) { - s1 = peg$c20; + if (input.substr(peg$currPos, 6) === peg$c23) { + s1 = peg$c23; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e27); } + if (peg$silentFails === 0) { peg$fail(peg$e30); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1345,7 +1401,7 @@ function peg$parse(input, options) { s5 = peg$parseint(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f16(s3, s5); + s0 = peg$f17(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1366,41 +1422,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c21) { - s1 = peg$c21; + if (input.substr(peg$currPos, 4) === peg$c24) { + s1 = peg$c24; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e28); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsews(); - s3 = peg$parsenumber(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f17(s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parserotL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c22) { - s1 = peg$c22; - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e29); } + if (peg$silentFails === 0) { peg$fail(peg$e31); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1420,16 +1447,16 @@ function peg$parse(input, options) { return s0; } - function peg$parserotR() { + function peg$parserotL() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c23) { - s1 = peg$c23; + if (input.substr(peg$currPos, 4) === peg$c25) { + s1 = peg$c25; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e30); } + if (peg$silentFails === 0) { peg$fail(peg$e32); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1449,16 +1476,16 @@ function peg$parse(input, options) { return s0; } - function peg$parsefast() { + function peg$parserotR() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c24) { - s1 = peg$c24; + if (input.substr(peg$currPos, 4) === peg$c26) { + s1 = peg$c26; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e31); } + if (peg$silentFails === 0) { peg$fail(peg$e33); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1478,16 +1505,45 @@ function peg$parse(input, options) { return s0; } + function peg$parsefast() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c27) { + s1 = peg$c27; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e34); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsews(); + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f21(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsescale() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c25) { - s1 = peg$c25; + if (input.substr(peg$currPos, 5) === peg$c28) { + s1 = peg$c28; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e32); } + if (peg$silentFails === 0) { peg$fail(peg$e35); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1507,7 +1563,7 @@ function peg$parse(input, options) { s5 = peg$parsequote(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f21(s4); + s0 = peg$f22(s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1532,12 +1588,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c26) { - s1 = peg$c26; + if (input.substr(peg$currPos, 2) === peg$c29) { + s1 = peg$c29; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e33); } + if (peg$silentFails === 0) { peg$fail(peg$e36); } } if (s1 !== peg$FAILED) { s2 = []; @@ -1546,7 +1602,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e34); } + if (peg$silentFails === 0) { peg$fail(peg$e37); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -1555,7 +1611,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e34); } + if (peg$silentFails === 0) { peg$fail(peg$e37); } } } s1 = [s1, s2]; @@ -1572,21 +1628,21 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c27) { - s1 = peg$c27; + if (input.substr(peg$currPos, 3) === peg$c30) { + s1 = peg$c30; peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e35); } + if (peg$silentFails === 0) { peg$fail(peg$e38); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 91) { - s3 = peg$c8; + s3 = peg$c10; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } + if (peg$silentFails === 0) { peg$fail(peg$e17); } } if (s3 !== peg$FAILED) { s4 = peg$parsews(); @@ -1599,7 +1655,7 @@ function peg$parse(input, options) { s9 = peg$parsesequence_or_operator(); if (s9 !== peg$FAILED) { peg$savedPos = s7; - s7 = peg$f22(s5, s9); + s7 = peg$f23(s5, s9); } else { peg$currPos = s7; s7 = peg$FAILED; @@ -1616,7 +1672,7 @@ function peg$parse(input, options) { s9 = peg$parsesequence_or_operator(); if (s9 !== peg$FAILED) { peg$savedPos = s7; - s7 = peg$f22(s5, s9); + s7 = peg$f23(s5, s9); } else { peg$currPos = s7; s7 = peg$FAILED; @@ -1628,15 +1684,15 @@ function peg$parse(input, options) { } s7 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 93) { - s8 = peg$c9; + s8 = peg$c11; peg$currPos++; } else { s8 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e16); } + if (peg$silentFails === 0) { peg$fail(peg$e18); } } if (s8 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f23(s5, s6); + s0 = peg$f24(s5, s6); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1682,7 +1738,7 @@ function peg$parse(input, options) { s4 = peg$parsecomment(); } peg$savedPos = s0; - s0 = peg$f24(s1); + s0 = peg$f25(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1693,18 +1749,18 @@ function peg$parse(input, options) { if (s1 !== peg$FAILED) { s2 = peg$parsews(); if (input.charCodeAt(peg$currPos) === 36) { - s3 = peg$c28; + s3 = peg$c31; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e36); } + if (peg$silentFails === 0) { peg$fail(peg$e39); } } if (s3 !== peg$FAILED) { s4 = peg$parsews(); s5 = peg$parsesequence_or_operator(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f25(s1, s5); + s0 = peg$f26(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1729,7 +1785,7 @@ function peg$parse(input, options) { s1 = peg$parsesequence_or_operator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f26(s1); + s1 = peg$f27(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -1762,7 +1818,7 @@ function peg$parse(input, options) { if (s2 !== peg$FAILED) { s3 = peg$parsews(); peg$savedPos = s0; - s0 = peg$f27(s2); + s0 = peg$f28(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -1775,41 +1831,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c29) { - s1 = peg$c29; + if (input.substr(peg$currPos, 6) === peg$c32) { + s1 = peg$c32; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e37); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsews(); - s3 = peg$parsenumber(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f28(s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parsesetbpm() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c30) { - s1 = peg$c30; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e38); } + if (peg$silentFails === 0) { peg$fail(peg$e40); } } if (s1 !== peg$FAILED) { s2 = peg$parsews(); @@ -1829,20 +1856,49 @@ function peg$parse(input, options) { return s0; } + function peg$parsesetbpm() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c33) { + s1 = peg$c33; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e41); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsews(); + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f30(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsehush() { var s0, s1; s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c31) { - s1 = peg$c31; + if (input.substr(peg$currPos, 4) === peg$c34) { + s1 = peg$c34; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e39); } + if (peg$silentFails === 0) { peg$fail(peg$e42); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f30(); + s1 = peg$f31(); } s0 = s1; diff --git a/repl/krill.pegjs b/repl/krill.pegjs index e32a9763..132a82d7 100644 --- a/repl/krill.pegjs +++ b/repl/krill.pegjs @@ -80,7 +80,7 @@ quote = '"' / "'" // ------------------ steps and cycles --------------------------- // single step definition (e.g bd) -step_char = [0-9a-zA-Z~] / "-" / "#" / "." +step_char = [0-9a-zA-Z~] / "-" / "#" / "." / "^" / "_" step = ws chars:step_char+ ws { return chars.join("") } // define a sub cycle e.g. [1 2, 3 [4]] @@ -95,10 +95,13 @@ slice = step / sub_cycle / timeline // slice modifier affects the timing/size of a slice (e.g. [a b c]@3) // at this point, we assume we can represent them as regular sequence operators -slice_modifier = slice_weight / slice_bjorklund / slice_slow / slice_fast / slice_fixed_step +slice_modifier = slice_weight / slice_bjorklund / slice_slow / slice_fast / slice_fixed_step / slice_replicate slice_weight = "@" a:number { return { weight: a} } + +slice_replicate = "!"a:number + { return { replicate: a } } slice_bjorklund = "(" ws p:number ws comma ws s:number ws")" { return { operator : { type_: "bjorklund", arguments_ :{ pulse: p, step:s } } } } diff --git a/repl/package-lock.json b/repl/package-lock.json index e6ab44ab..5f440701 100644 --- a/repl/package-lock.json +++ b/repl/package-lock.json @@ -6,9 +6,11 @@ "": { "dependencies": { "@tonaljs/tonal": "^4.6.5", + "chord-voicings": "^0.0.1", "codemirror": "^5.65.1", "estraverse": "^5.3.0", "multimap": "^1.1.0", + "ramda": "^0.28.0", "react": "^17.0.2", "react-codemirror2": "^7.2.1", "react-dom": "^17.0.2", @@ -20,12 +22,15 @@ "webmidi": "^2.5.2" }, "devDependencies": { + "@mdx-js/react": "^1.6.22", + "@parcel/transformer-mdx": "^2.3.1", "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-postcss": "^1.4.3", "@snowpack/plugin-react-refresh": "^2.5.0", "@snowpack/plugin-typescript": "^1.2.1", "@snowpack/web-test-runner-plugin": "^0.2.2", "@tailwindcss/forms": "^0.4.0", + "@tailwindcss/typography": "^0.5.2", "@testing-library/react": "^11.2.6", "@types/chai": "^4.2.17", "@types/mocha": "^8.2.2", @@ -35,6 +40,7 @@ "@web/test-runner": "^0.13.3", "autoprefixer": "^10.4.2", "chai": "^4.3.4", + "parcel": "^2.3.1", "peggy": "^1.2.0", "postcss": "^8.4.6", "prettier": "^2.2.1", @@ -311,6 +317,20 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", @@ -323,6 +343,45 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/runtime": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.0.tgz", @@ -512,6 +571,100 @@ "sourcemap-codec": "1.4.8" } }, + "node_modules/@mdx-js/mdx": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz", + "integrity": "sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==", + "dev": true, + "dependencies": { + "@babel/core": "7.12.9", + "@babel/plugin-syntax-jsx": "7.12.1", + "@babel/plugin-syntax-object-rest-spread": "7.8.3", + "@mdx-js/util": "1.6.22", + "babel-plugin-apply-mdx-type-prop": "1.6.22", + "babel-plugin-extract-import-names": "1.6.22", + "camelcase-css": "2.0.1", + "detab": "2.0.4", + "hast-util-raw": "6.0.1", + "lodash.uniq": "4.5.0", + "mdast-util-to-hast": "10.0.1", + "remark-footnotes": "2.0.0", + "remark-mdx": "1.6.22", + "remark-parse": "8.0.3", + "remark-squeeze-paragraphs": "4.0.0", + "style-to-object": "0.3.0", + "unified": "9.2.0", + "unist-builder": "2.0.3", + "unist-util-visit": "2.0.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mdx-js/mdx/node_modules/@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@mdx-js/mdx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@mdx-js/react": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz", + "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0" + } + }, + "node_modules/@mdx-js/util": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", + "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -779,6 +932,1564 @@ "read-package-json-fast": "^2.0.1" } }, + "node_modules/@parcel/bundler-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.3.1.tgz", + "integrity": "sha512-NFPI3UgWA3wD057ZXdoI9xM+JfM5aooPDJEvBateUQibwPzb96k9Bw7AfKnB/UAsASgtXeNAZXDqhXq5zrXeYQ==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/cache": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.3.1.tgz", + "integrity": "sha512-8Wvm0VERtocUepIfkZ6xVs1LHZqttnzdrM7oSc0bXhwtz8kZB++N88g0rQskbUchW87314eYdzBtEL0aiq0bgQ==", + "dev": true, + "dependencies": { + "@parcel/fs": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/utils": "2.3.1", + "lmdb": "^2.0.2" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.3.1" + } + }, + "node_modules/@parcel/codeframe": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.3.1.tgz", + "integrity": "sha512-sdNvbg9qYS2pwzqyyyt+wZfNGuy7EslzDLbzQclFZmhD6e770mcYoi8/7i7D/AONbXiI15vwNmgOdcUIXtPxbA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/codeframe/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@parcel/codeframe/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@parcel/codeframe/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@parcel/codeframe/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@parcel/codeframe/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/codeframe/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/compressor-raw": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.3.1.tgz", + "integrity": "sha512-a294CarNzmy5mqTYnoO6clUxzVN/+HuUMAz1Y7EmsXwS6pJMCdhrE1Lra3upslFj4YMwp9N6+skzkptSCArkTQ==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/config-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.3.1.tgz", + "integrity": "sha512-EEu8GPHAlHchyIu5AD1uPbOC/wPoAOS/ni2+yBmJWq3MJ6hwjnAdZJVYs8qVD9n2lcu3kcpO4vYxL8kv+i1mTQ==", + "dev": true, + "dependencies": { + "@parcel/bundler-default": "2.3.1", + "@parcel/compressor-raw": "2.3.1", + "@parcel/namer-default": "2.3.1", + "@parcel/optimizer-cssnano": "2.3.1", + "@parcel/optimizer-htmlnano": "2.3.1", + "@parcel/optimizer-image": "2.3.1", + "@parcel/optimizer-svgo": "2.3.1", + "@parcel/optimizer-terser": "2.3.1", + "@parcel/packager-css": "2.3.1", + "@parcel/packager-html": "2.3.1", + "@parcel/packager-js": "2.3.1", + "@parcel/packager-raw": "2.3.1", + "@parcel/packager-svg": "2.3.1", + "@parcel/reporter-dev-server": "2.3.1", + "@parcel/resolver-default": "2.3.1", + "@parcel/runtime-browser-hmr": "2.3.1", + "@parcel/runtime-js": "2.3.1", + "@parcel/runtime-react-refresh": "2.3.1", + "@parcel/runtime-service-worker": "2.3.1", + "@parcel/transformer-babel": "2.3.1", + "@parcel/transformer-css": "2.3.1", + "@parcel/transformer-html": "2.3.1", + "@parcel/transformer-image": "2.3.1", + "@parcel/transformer-js": "2.3.1", + "@parcel/transformer-json": "2.3.1", + "@parcel/transformer-postcss": "2.3.1", + "@parcel/transformer-posthtml": "2.3.1", + "@parcel/transformer-raw": "2.3.1", + "@parcel/transformer-react-refresh-wrap": "2.3.1", + "@parcel/transformer-svg": "2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.3.1" + } + }, + "node_modules/@parcel/core": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.3.1.tgz", + "integrity": "sha512-Fzj8OxICQ0dKqu+haq1LP/yxmE1ryALIddZrgmn4JSoNiZVtPJMOxidozyl+3bnEq0mRyH5i38CDFRUWl9dqKQ==", + "dev": true, + "dependencies": { + "@parcel/cache": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/events": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/graph": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/package-manager": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "abortcontroller-polyfill": "^1.1.9", + "base-x": "^3.0.8", + "browserslist": "^4.6.6", + "clone": "^2.1.1", + "dotenv": "^7.0.0", + "dotenv-expand": "^5.1.0", + "json-source-map": "^0.6.1", + "json5": "^2.2.0", + "msgpackr": "^1.5.1", + "nullthrows": "^1.1.1", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/core/node_modules/dotenv": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", + "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@parcel/core/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/diagnostic": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.3.1.tgz", + "integrity": "sha512-hBMcg4WVMdSIy6RpI4gSto5dZ3OoUbnrCZzVw3J1tzQJn7x9na/+014IaE58vJtAqJ8/jc/TqWIcwsSLe898rA==", + "dev": true, + "dependencies": { + "json-source-map": "^0.6.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/events": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.3.1.tgz", + "integrity": "sha512-J2rWKGl1Z2IvwwDwWYz/4gUxC1P4LsioUyOo1HYGT+N5+r41P8ZB5CM/aosI2qu5mMsH8rTpclOv5E36vCSQxw==", + "dev": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/fs": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.3.1.tgz", + "integrity": "sha512-FKqyf8KF0zOw8gfj/feEAMj4Kzqkgt9Zxa2A7UDdMWRvxLR8znqnWjD++xqq6rxJp2Y1zm4fH3JOTK4CRddUSg==", + "dev": true, + "dependencies": { + "@parcel/fs-search": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/watcher": "^2.0.0", + "@parcel/workers": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.3.1" + } + }, + "node_modules/@parcel/fs-search": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/fs-search/-/fs-search-2.3.1.tgz", + "integrity": "sha512-JsBIDttjmgJIMD6Q6MV83M+mwr5NqUm55iA+SewimboiWzSPzIJxRaegniSsNfsrBASJ6nSZFHcLPd/VJ5iqJw==", + "dev": true, + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/graph": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.3.1.tgz", + "integrity": "sha512-KdoPJM+d5LlCFZ46iapXXCwL+WD8/QYRkb/lFpmwHIT0xdY2sAU+rDFbSB3XeI8guol5zPZrGHSj38U1o+tSFA==", + "dev": true, + "dependencies": { + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/hash": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.3.1.tgz", + "integrity": "sha512-IYhSQE+CIKWjPfiLmsrXHupkNd+hMlTlI9DR5qLiD8ydyPwg0XE/bOYTcbdsSl6HTackY0XYVSJwTtEgvtYVfw==", + "dev": true, + "dependencies": { + "detect-libc": "^1.0.3", + "xxhash-wasm": "^0.4.2" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/logger": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.3.1.tgz", + "integrity": "sha512-swNPInULCJrpCJCLOgZcf+xNcUF0NjD7LyNcB349BkyO7i6st14nfBjXf6eAJJu0z7RMmi6zp9CQB47e4cI6+g==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/events": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/markdown-ansi": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.3.1.tgz", + "integrity": "sha512-M4Hi25pKtSh1KF/ppMDBk5QuLpYAQjgB/MSP+nz7NzXQlYPCN5oEk9TUkrmQ9J+vOvVwefxfy7ahSErEuQbTFw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/markdown-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@parcel/markdown-ansi/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@parcel/markdown-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@parcel/markdown-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@parcel/markdown-ansi/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/markdown-ansi/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/namer-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.3.1.tgz", + "integrity": "sha512-huIb47vri76MhfuvmKtQqalqDfIwMfaPyjrbaoHysZ4fRUjvmrx0NPy0dNrTSLvA96iBc7EG2Zzw+Qn3voAiwg==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/node-resolver-core": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-2.3.1.tgz", + "integrity": "sha512-iEeilPoeiOyWLeF1NERZByOWe3IqUnNuoHkGbn8qZWlZXYO+k+w/X8Auv0KKsLVGe4XdljwsWbTWuhQJZ8BpIg==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-cssnano": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.3.1.tgz", + "integrity": "sha512-e/YfTbMzn71CgSyyL/e+MZ/aQTPcUXoQ/EtqcuDlS3kcp2tw1aHgP0xmZT7dSPv+L+I0gY3aQSMM7IqgIzfkLQ==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "cssnano": "^5.0.15", + "postcss": "^8.4.5" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-htmlnano": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.3.1.tgz", + "integrity": "sha512-zE76grrE5KlWwooH9AnkKRU4QNgcWUtHpJUWba5JYXuCfaqCG2XpN5ARBmRqtmrEke7PlCt/1F0E47PPhZeWiw==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "htmlnano": "^2.0.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "svgo": "^2.4.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-htmlnano/node_modules/htmlnano": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-2.0.0.tgz", + "integrity": "sha512-thKQfhcp2xgtsWNE27A2bliEeqVL5xjAgGn0wajyttvFFsvFWWah1ntV9aEX61gz0T6MBQ5xK/1lXuEumhJTcg==", + "dev": true, + "dependencies": { + "cosmiconfig": "^7.0.1", + "posthtml": "^0.16.5", + "timsort": "^0.3.0" + }, + "peerDependencies": { + "cssnano": "^5.0.11", + "postcss": "^8.3.11", + "purgecss": "^4.0.3", + "relateurl": "^0.2.7", + "srcset": "^5.0.0", + "svgo": "^2.8.0", + "terser": "^5.10.0", + "uncss": "^0.17.3" + }, + "peerDependenciesMeta": { + "cssnano": { + "optional": true + }, + "postcss": { + "optional": true + }, + "purgecss": { + "optional": true + }, + "relateurl": { + "optional": true + }, + "srcset": { + "optional": true + }, + "svgo": { + "optional": true + }, + "terser": { + "optional": true + }, + "uncss": { + "optional": true + } + } + }, + "node_modules/@parcel/optimizer-image": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.3.1.tgz", + "integrity": "sha512-vBnyWaaqljASMi/vDkVdv855/G/BaJYzZklsc5xjGUwZq8nbH4sZPc9NDdl99/WU3yGR8QtA67BdTRkRLf8rKQ==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "detect-libc": "^1.0.3" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-svgo": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-svgo/-/optimizer-svgo-2.3.1.tgz", + "integrity": "sha512-PwEXmmZ9z7WNs8n/lWkbwRdw62MJqYzKDUUJPF+KCQb7NG1OAZy1jVj+TyiCuMtxIKhNtei8OrMOlvulQgixcg==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "svgo": "^2.4.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-terser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-terser/-/optimizer-terser-2.3.1.tgz", + "integrity": "sha512-uDJghBgwCKhq6m1y/vw/tRZKS4kqNXhXaZIYtEyRdrxJ/pqGTGmHVYO5ItXpgGugM49C8TrqVVlcgIIgR/p1yw==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "terser": "^5.2.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-terser/node_modules/acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/@parcel/optimizer-terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/@parcel/optimizer-terser/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@parcel/optimizer-terser/node_modules/terser": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "dev": true, + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "acorn": "^8.5.0" + }, + "peerDependenciesMeta": { + "acorn": { + "optional": true + } + } + }, + "node_modules/@parcel/package-manager": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.3.1.tgz", + "integrity": "sha512-w2XOkD3SU8RxhUDW+Soy/TjvEVvfUsBmHy02asllt4b/ZtyZVAsQmonGExHDDkRn3TNDR6Y96Yw6M7purt+b9w==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.3.1" + } + }, + "node_modules/@parcel/package-manager/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/packager-css": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.3.1.tgz", + "integrity": "sha512-gvrGNw4tiIyi6SO7at7RJvfCDQIAuy9xJhFtuouuFAl6A1EMhkoL5amcmavfdbN166LJ/3s74t1LYoPeYCnb2Q==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-html": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.3.1.tgz", + "integrity": "sha512-dOPEB0KEyLzDl5zEXjRCo/J/fsc1wVw0gUa+N0A5LAZeYmTOPJgTHhb/ZeNcPKWQT75eGUSEaDXX+oBs1B17xw==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.3.1.tgz", + "integrity": "sha512-7TikegHYgwiuUQ9bFikG3H47wTms7nVpDQEwBYHmPhDLvwlKCq17HJ39eQKS4740G6umIvQkG5t7mcR1XTXYtg==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "globals": "^13.2.0", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-js/node_modules/globals": { + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@parcel/packager-js/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@parcel/packager-raw": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.3.1.tgz", + "integrity": "sha512-Gy4WfZPy64+E7Gvvdw3/HG5EFzuBbC64MbLv0AgQNIDub5LG76dPdLLgJ/TS72gXsA43Q2ApaXMHBOC/G0yECA==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-svg": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.3.1.tgz", + "integrity": "sha512-lUx+DXymTNKhvxdoNhnb6or4qjGLbXBTAiyfp4q8QlFXJHKVbEEoVgLc9rda9TLIG18Pn4NR9QE+o/nyzwcibQ==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "posthtml": "^0.16.4" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/plugin": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.3.1.tgz", + "integrity": "sha512-ROOWbgFze7BCF3RkEh8VbcKGlR5UGBuJ8lfCaFrG1VOk7Rxgl8Bmk96TRbZREm/1jB74p2O8twVKyPSC13riow==", + "dev": true, + "dependencies": { + "@parcel/types": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-cli": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.3.1.tgz", + "integrity": "sha512-rLDxD1SJIiAhd/N3CiRiNKz/NVVyh25tPEOFCNFgoTVC8wJKfzeUEgVuTJQ8lRLrzk0PfY51KyGmWdLqti8jag==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "chalk": "^4.1.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-cli/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@parcel/reporter-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@parcel/reporter-cli/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@parcel/reporter-cli/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@parcel/reporter-cli/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/reporter-cli/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/reporter-dev-server": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.3.1.tgz", + "integrity": "sha512-ramEx+dFMcgqus2We7jlonQgCo3/xwnjdXUsC+iuJXSKGW7eMCZ5f+fjETkeq2eOt8YYzAML54u7Qkt1gSX39Q==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/resolver-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.3.1.tgz", + "integrity": "sha512-fScU5ZG/VmdqoqPPArTLHXC7LgsfSVKA6mpZpkpkAyFTMZimPv6HuFwMhIj7jabeWRQKShjpT07Ygq31UBl/Cw==", + "dev": true, + "dependencies": { + "@parcel/node-resolver-core": "2.3.1", + "@parcel/plugin": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-browser-hmr": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.3.1.tgz", + "integrity": "sha512-Zd6fzBaNNhLBqROy1Jtwsddf5/E2I7zVecHPWutAUT9L4xX3XMH7Yv3W6vmLLq3X0mdfmoRtVnQseAMPAyfNog==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.3.1.tgz", + "integrity": "sha512-Nmgbo+v5p5g1DSHbmZni22ZsHhcAsi7z6Qk9cdXrt/fW2VbQRu+yBKebeinwUnWGd5Lwu5UZ2mwn2nSaSV8Spw==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-react-refresh": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.3.1.tgz", + "integrity": "sha512-42ldT80UZ8fqm0M5td3YviBn6fFYwcva3PdWLfwC5b1woug/5/FevMna+ndNBSFjt+xbFLUFf6bDxnV7vlWHHw==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "react-refresh": "^0.9.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-service-worker": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.3.1.tgz", + "integrity": "sha512-kTt1DqMIQt5eNAJZTxeegLgGxHC4qXSaBrfQanezp+1fmRi1TOWvKgM7lzKwY9IaXfyCV/DR+Wy95iR6r1P70A==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/source-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.0.2.tgz", + "integrity": "sha512-NnUrPYLpYB6qyx2v6bcRPn/gVigmGG6M6xL8wIg/i0dP1GLkuY1nf+Hqdf63FzPTqqT7K3k6eE5yHPQVMO5jcA==", + "dev": true, + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": "^12.18.3 || >=14" + } + }, + "node_modules/@parcel/transformer-babel": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.3.1.tgz", + "integrity": "sha512-KEyuFNQJYFMP39XvhTu2ZzsD+gdQKyA3X+5DViH2bSgZeEjCIfAhAjg7mSfKeD/u8ZVBmIDq2M/QjDO+taM0KQ==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "browserslist": "^4.6.6", + "json5": "^2.2.0", + "nullthrows": "^1.1.1", + "semver": "^5.7.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-babel/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/transformer-css": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.3.1.tgz", + "integrity": "sha512-InuEbSu7yLp3jjnmVB0MzO8WjG0123EJqGVVlB5WbEBUxzLN3bgTJDKP5O7xGgipjhNIpFUjx2SU7eeSb6iFog==", + "dev": true, + "dependencies": { + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "postcss": "^8.4.5", + "postcss-value-parser": "^4.2.0", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-css/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/transformer-html": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.3.1.tgz", + "integrity": "sha512-23Z7kuSDnLzB8Du88pua2VjgOh7ZUpW1hedX1FubV2PfUGpZvAg7XBTdTGp+7Tmy8PIGyZrP3CP1UNQkjLO8bQ==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-html/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/transformer-image": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.3.1.tgz", + "integrity": "sha512-8A+XnUhDnEAbfc7GCBRvCsSiv/6Ro5+vd1sZ5tQJmajcc0nfIbolZQuztEHZMDPjEr+WIcOCJZ5re5bCG3NhZA==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/workers": "2.3.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + } + }, + "node_modules/@parcel/transformer-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.3.1.tgz", + "integrity": "sha512-9mHpfw008l00cW8QW21Nhfax/aOqZ+CozNXj5gWV0uJ9is5x0TumKYXtYUsuP9LunAra/ZenvpQjCFibTXe51Q==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "@swc/helpers": "^0.2.11", + "browserslist": "^4.6.6", + "detect-libc": "^1.0.3", + "nullthrows": "^1.1.1", + "regenerator-runtime": "^0.13.7", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-js/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/transformer-json": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.3.1.tgz", + "integrity": "sha512-usaoro1uH5hxI57x7Qve4Y6Tsf5GitVh6gC3e5TaJFc3mnr5pn3KKviWC0g0haeluv9NCPK++alQuzmpgIooWQ==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "json5": "^2.2.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-mdx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-mdx/-/transformer-mdx-2.3.1.tgz", + "integrity": "sha512-RhLVqetkR8eNHBIXHk9vgy90HA5qPVfhoycL9PvKj/tE12CKY5pkI1aKf6AWhbNWFhaxkpmXvS2ZvtfrkGWIJg==", + "dev": true, + "dependencies": { + "@mdx-js/mdx": "^1.6.22", + "@parcel/plugin": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@mdx-js/react": "^1.6.22" + } + }, + "node_modules/@parcel/transformer-postcss": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.3.1.tgz", + "integrity": "sha512-rpoEGpStj1THw/NH3CuujrKan84h6SEnDBem8l/GAE7/cRDQs/O/JnJKP+oXcKOGH1KNdcuPWYb8ORW9Pe+Z5w==", + "dev": true, + "dependencies": { + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "clone": "^2.1.1", + "nullthrows": "^1.1.1", + "postcss-value-parser": "^4.2.0", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-postcss/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/transformer-posthtml": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.3.1.tgz", + "integrity": "sha512-ahFLfV8zdm6lH6gGSZxgUvFbP0qsclucV53ubRIRV+croGp1KhMCstbMY5GKGYHWoI6RRrxnbriJwVcbX9tUVQ==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-posthtml/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/transformer-raw": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.3.1.tgz", + "integrity": "sha512-45ObmhBJ2wdlOGTsIEy9T+FOoQWY+x8HN2Cw9/ZhMWOpLtof56om5xk5u7hmsMMe/4Jaqxzkw3vInqOJR6bc1Q==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-react-refresh-wrap": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.3.1.tgz", + "integrity": "sha512-4uufhCCneMFpx6YaP2/ae/Ilpna5GSYuUXijlFHy4qcAIYkdtrHWRJuLBUBD4qktkmG22wTWgRwGHMk4seRDzg==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "react-refresh": "^0.9.0" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-svg": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.3.1.tgz", + "integrity": "sha512-3V9LIpR+p8NEr8rnHHIa9PKUwQ4fEkhSo0S8g+FH32/f7y6IMuTy7hn0leYdfATNVi1Nx7d4boN4XSyUuORQfw==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-svg/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@parcel/types": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.3.1.tgz", + "integrity": "sha512-i2UyUoA4DzyYxe9rZRDuMAZ6TD3Mq3tTTqeJ2/zA6w83Aon3cqdE9va91peu1fKRGyRqE5lwWRtA7ktF1A2SVA==", + "dev": true, + "dependencies": { + "@parcel/cache": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/package-manager": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/workers": "2.3.1", + "utility-types": "^3.10.0" + } + }, + "node_modules/@parcel/utils": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.3.1.tgz", + "integrity": "sha512-OFdh/HuAcce753/U3QoORzYU3N5oZqCfQNRb0i3onuz/qpli5TyxUl/k1BuTqlKYr6Px3kj05g6GFi9kRBOMbw==", + "dev": true, + "dependencies": { + "@parcel/codeframe": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/markdown-ansi": "2.3.1", + "@parcel/source-map": "^2.0.0", + "chalk": "^4.1.0" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/utils/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@parcel/utils/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@parcel/utils/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@parcel/utils/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@parcel/utils/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/utils/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.0.5.tgz", + "integrity": "sha512-x0hUbjv891omnkcHD7ZOhiyyUqUUR6MNjq89JhEI3BxppeKWAm6NPQsqqRrAkCJBogdT/o/My21sXtTI9rJIsw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^3.2.1", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/workers": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.3.1.tgz", + "integrity": "sha512-e2P/9p5AYBLfNRs8n+57ChGrn5171oHwY54dz/jj0CrXKN1q0b+rNwzYsPaAtOicBoqmm1s5I3cjfO6GfJP65A==", + "dev": true, + "dependencies": { + "@parcel/diagnostic": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "chrome-trace-event": "^1.0.2", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.3.1" + } + }, "node_modules/@rollup/plugin-commonjs": { "version": "16.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz", @@ -963,6 +2674,12 @@ "snowpack": "^3.0.0" } }, + "node_modules/@swc/helpers": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.2.14.tgz", + "integrity": "sha512-wpCQMhf5p5GhNg2MmGKXzUNwxe7zRiCsmqYsamez2beP7mKPCSiu+BjZcdN95yYSzO857kr0VfQewmGpS77nqA==", + "dev": true + }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -987,6 +2704,20 @@ "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.2.tgz", + "integrity": "sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw==", + "dev": true, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || insiders" + } + }, "node_modules/@testing-library/dom": { "version": "7.31.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz", @@ -1301,6 +3032,15 @@ "node": ">= 6" } }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/@types/accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", @@ -1434,6 +3174,15 @@ "@types/range-parser": "*" } }, + "node_modules/@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/http-assert": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.3.tgz", @@ -1516,6 +3265,15 @@ "@types/koa": "*" } }, + "node_modules/@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -1624,6 +3382,12 @@ "integrity": "sha512-zYzMb2aMyzXW5VgOQHy+FgI8N5tLFb+tIsUqk35CIgSr9pT4pji2GR8BCOTMdniusVuRHIp/DaYQNQGYGLVZHQ==", "dev": true }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, "node_modules/@types/ws": { "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", @@ -1933,6 +3697,12 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "node_modules/abortcontroller-polyfill": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", + "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==", + "dev": true + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2274,12 +4044,73 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "node_modules/babel-plugin-apply-mdx-type-prop": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz", + "integrity": "sha512-VefL+8o+F/DfK24lPZMtJctrCVOfgbqLAGZSkxwhazQv4VxPg3Za/i40fu22KR2m8eEda+IfSOlPLUSIiLcnCQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "7.10.4", + "@mdx-js/util": "1.6.22" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@babel/core": "^7.11.6" + } + }, + "node_modules/babel-plugin-apply-mdx-type-prop/node_modules/@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "node_modules/babel-plugin-extract-import-names": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz", + "integrity": "sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "7.10.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/babel-plugin-extract-import-names/node_modules/@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2462,6 +4293,12 @@ "node": "*" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, "node_modules/bufferutil": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", @@ -2638,6 +4475,18 @@ "node": ">= 6" } }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001307", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001307.tgz", @@ -2654,6 +4503,16 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "node_modules/ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chai": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", @@ -2686,6 +4545,36 @@ "node": ">=4" } }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -2759,6 +4648,14 @@ "fsevents": "~2.3.2" } }, + "node_modules/chord-voicings": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/chord-voicings/-/chord-voicings-0.0.1.tgz", + "integrity": "sha512-SutgB/4ynkkuiK6qdQ/k3QvCFcH0Vj8Ch4t6LbRyRQbVzP/TOztiCk3kvXd516UZ6fqk7ijDRELEFcKN+6V8sA==", + "dependencies": { + "@tonaljs/tonal": "^4.6.5" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -2798,6 +4695,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -2903,6 +4809,16 @@ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.1.tgz", "integrity": "sha512-s6aac+DD+4O2u1aBmdxhB7yz2XU7tG3snOyQ05Kxifahz7hoxnfxIRHxiCSEv3TUC38dIVH8G+lZH9UWSfGQxA==" }, + "node_modules/collapse-white-space": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2918,6 +4834,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "node_modules/colord": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", + "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==", + "dev": true + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2930,6 +4852,16 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/command-line-args": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", @@ -2978,6 +4910,15 @@ "node": ">=8" } }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", @@ -3124,6 +5065,21 @@ "node": ">= 8" } }, + "node_modules/css-declaration-sorter": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.4.tgz", + "integrity": "sha512-lpfkqS0fctcmZotJGhnxkIyJWvBXgpyi2wsFd4J8VB7wzyrT6Ch/3Q+FMNJpjK4gu1+GN5khOnpU2ZVKrLbhCw==", + "dev": true, + "dependencies": { + "timsort": "^0.3.0" + }, + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, "node_modules/css-select": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", @@ -3140,6 +5096,28 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-tree/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/css-what": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", @@ -3164,6 +5142,94 @@ "node": ">=4" } }, + "node_modules/cssnano": { + "version": "5.0.17", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.0.17.tgz", + "integrity": "sha512-fmjLP7k8kL18xSspeXTzRhaFtRI7DL9b8IcXR80JgtnWBpvAzHT7sCR/6qdn0tnxIaINUN6OEQu83wF57Gs3Xw==", + "dev": true, + "dependencies": { + "cssnano-preset-default": "^5.1.12", + "lilconfig": "^2.0.3", + "yaml": "^1.10.2" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-preset-default": { + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.1.12.tgz", + "integrity": "sha512-rO/JZYyjW1QNkWBxMGV28DW7d98UDLaF759frhli58QFehZ+D/LSmwQ2z/ylBAe2hUlsIWTq6NYGfQPq65EF9w==", + "dev": true, + "dependencies": { + "css-declaration-sorter": "^6.0.3", + "cssnano-utils": "^3.0.2", + "postcss-calc": "^8.2.0", + "postcss-colormin": "^5.2.5", + "postcss-convert-values": "^5.0.4", + "postcss-discard-comments": "^5.0.3", + "postcss-discard-duplicates": "^5.0.3", + "postcss-discard-empty": "^5.0.3", + "postcss-discard-overridden": "^5.0.4", + "postcss-merge-longhand": "^5.0.6", + "postcss-merge-rules": "^5.0.6", + "postcss-minify-font-values": "^5.0.4", + "postcss-minify-gradients": "^5.0.6", + "postcss-minify-params": "^5.0.5", + "postcss-minify-selectors": "^5.1.3", + "postcss-normalize-charset": "^5.0.3", + "postcss-normalize-display-values": "^5.0.3", + "postcss-normalize-positions": "^5.0.4", + "postcss-normalize-repeat-style": "^5.0.4", + "postcss-normalize-string": "^5.0.4", + "postcss-normalize-timing-functions": "^5.0.3", + "postcss-normalize-unicode": "^5.0.4", + "postcss-normalize-url": "^5.0.5", + "postcss-normalize-whitespace": "^5.0.4", + "postcss-ordered-values": "^5.0.5", + "postcss-reduce-initial": "^5.0.3", + "postcss-reduce-transforms": "^5.0.4", + "postcss-svgo": "^5.0.4", + "postcss-unique-selectors": "^5.0.4" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-utils": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.0.2.tgz", + "integrity": "sha512-KhprijuQv2sP4kT92sSQwhlK3SJTbDIsxcfIEySB0O+3m9esFOai7dP9bMx5enHAh2MwarVIcnwiWoOm01RIbQ==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/csstype": { "version": "3.0.10", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", @@ -3358,6 +5424,31 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detab": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detab/-/detab-2.0.4.tgz", + "integrity": "sha512-8zdsQA5bIkoRECvCrNKPla84lyoR7DSAyf7p0YgXzBO9PDJx8KntPUay7NS6yp+KdxdVtiE5SpHKtbp2ZQyA9g==", + "dev": true, + "dependencies": { + "repeat-string": "^1.5.4" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/detect-port": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", @@ -4147,6 +6238,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -4337,6 +6437,115 @@ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, + "node_modules/hast-to-hyperscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "property-information": "^5.3.0", + "space-separated-tokens": "^1.0.0", + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", + "dev": true, + "dependencies": { + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", + "property-information": "^5.0.0", + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5/node_modules/@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==", + "dev": true + }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.1.tgz", + "integrity": "sha512-ZMuiYA+UF7BXBtsTBNcLBF5HzXzkyE6MLzJnL605LKE8GJylNjGc4jjxazAHUtcwT5/CEt6afRKViYB4X66dig==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", + "html-void-elements": "^1.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", + "dev": true, + "dependencies": { + "hast-to-hyperscript": "^9.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", @@ -4355,6 +6564,16 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/html-void-elements": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/htmlparser2": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", @@ -4642,12 +6861,42 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", + "dev": true + }, "node_modules/ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "dev": true }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -4666,6 +6915,29 @@ "node": ">=8" } }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, "node_modules/is-core-module": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", @@ -4678,6 +6950,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -4738,6 +7020,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-json": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", + "integrity": "sha1-a+Fm0USCihMdaGiRuYPfYsOUkf8=", + "dev": true + }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -4759,6 +7057,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -4804,6 +7111,26 @@ "assert": "^1.4.1" } }, + "node_modules/is-whitespace-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", + "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-word-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", + "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -4950,6 +7277,12 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/json-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/json-source-map/-/json-source-map-0.6.1.tgz", + "integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==", + "dev": true + }, "node_modules/json-stringify-nice": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", @@ -5193,6 +7526,20 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/lmdb": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.2.1.tgz", + "integrity": "sha512-tUlIjyJvbd4mqdotI9Xe+3PZt/jqPx70VKFDrKMYu09MtBWOT3y2PbuTajX+bJFDjbgLkQC0cTx2n6dithp/zQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "msgpackr": "^1.5.4", + "nan": "^2.14.2", + "node-gyp-build": "^4.2.3", + "ordered-binary": "^1.2.4", + "weak-lru-cache": "^1.2.2" + } + }, "node_modules/loader-utils": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz", @@ -5226,6 +7573,36 @@ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU=", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, "node_modules/log-update": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", @@ -5345,12 +7722,80 @@ "node": ">= 10" } }, + "node_modules/markdown-escapes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", + "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/marky": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.2.tgz", "integrity": "sha512-k1dB2HNeaNyORco8ulVEhctyEGkKHb2YWAhDsxeFlW2nROIirsctBYzKwwS3Vza+sKTS1zO4Z+n9/+9WbGLIxQ==", "dev": true }, + "node_modules/mdast-squeeze-paragraphs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-zxdPn69hkQ1rm4J+2Cs2j6wDEv7O17TfXTJ33tl/+JPIoEmtV9t2ZzBM5LPHE8QlHsmVD8t3vPKCyY3oH+H8MQ==", + "dev": true, + "dependencies": { + "unist-util-remove": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-definitions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", + "dev": true, + "dependencies": { + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", + "mdurl": "^1.0.0", + "unist-builder": "^2.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -5601,11 +8046,38 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/msgpackr": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.5.4.tgz", + "integrity": "sha512-Z7w5Jg+2Q9z9gJxeM68d7tSuWZZGnFIRhZnyqcZCa/1dKkhOCNvR1TUV3zzJ3+vj78vlwKRzUgVDlW4jiSOeDA==", + "dev": true, + "optionalDependencies": { + "msgpackr-extract": "^1.0.14" + } + }, + "node_modules/msgpackr-extract": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-1.0.16.tgz", + "integrity": "sha512-fxdRfQUxPrL/TizyfYfMn09dK58e+d65bRD/fcaVH4052vj30QOzzqxcQIS7B0NsqlypEQ/6Du3QmP2DhWFfCA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.14.2", + "node-gyp-build": "^4.2.3" + } + }, "node_modules/multimap": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz", "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==" }, + "node_modules/nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true + }, "node_modules/nanocolors": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.13.tgz", @@ -5633,6 +8105,12 @@ "node": ">= 0.6" } }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true + }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -5945,6 +8423,12 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/nullthrows": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "dev": true + }, "node_modules/number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -6048,6 +8532,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ordered-binary": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.4.tgz", + "integrity": "sha512-A/csN0d3n+igxBPfUrjbV5GC69LWj2pjZzAAeeHXLukQ4+fytfP4T1Lg0ju7MSPSwq7KtHkGaiwO8URZN5IpLg==", + "dev": true + }, "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -6187,6 +8677,108 @@ "node": ">=10" } }, + "node_modules/parcel": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.3.1.tgz", + "integrity": "sha512-YDzKpWcO1tEqk7ENPTitE8zbDfYDjo7nsoT7Oun+7eZadwsiNds1+mbhCO0exGq4SJekto+dkMdrLMcbOWJznQ==", + "dev": true, + "dependencies": { + "@parcel/config-default": "2.3.1", + "@parcel/core": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/events": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/package-manager": "2.3.1", + "@parcel/reporter-cli": "2.3.1", + "@parcel/reporter-dev-server": "2.3.1", + "@parcel/utils": "2.3.1", + "chalk": "^4.1.0", + "commander": "^7.0.0", + "get-port": "^4.2.0", + "v8-compile-cache": "^2.0.0" + }, + "bin": { + "parcel": "lib/bin.js" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/parcel/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/parcel/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/parcel/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/parcel/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/parcel/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/parcel/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6210,6 +8802,24 @@ "just-diff-apply": "^3.0.0" } }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -6435,6 +9045,100 @@ "url": "https://opencollective.com/postcss/" } }, + "node_modules/postcss-calc": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": "^8.2.2" + } + }, + "node_modules/postcss-colormin": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.5.tgz", + "integrity": "sha512-+X30aDaGYq81mFqwyPpnYInsZQnNpdxMX0ajlY7AExCexEFkPVV+KrO7kXwayqEWL2xwEbNQ4nUO0ZsRWGnevg==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-convert-values": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.4.tgz", + "integrity": "sha512-bugzSAyjIexdObovsPZu/sBCTHccImJxLyFgeV0MmNBm/Lw5h5XnjfML6gzEmJ3A6nyfCW7hb1JXzcsA4Zfbdw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-comments": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.3.tgz", + "integrity": "sha512-6W5BemziRoqIdAKT+1QjM4bNcJAQ7z7zk073730NHg4cUXh3/rQHHj7pmYxUB9aGhuRhBiUf0pXvIHkRwhQP0Q==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.3.tgz", + "integrity": "sha512-vPtm1Mf+kp7iAENTG7jI1MN1lk+fBqL5y+qxyi4v3H+lzsXEdfS3dwUZD45KVhgzDEgduur8ycB4hMegyMTeRw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-empty": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.3.tgz", + "integrity": "sha512-xGJugpaXKakwKI7sSdZjUuN4V3zSzb2Y0LOlmTajFbNinEjTfVs9PFW2lmKBaC/E64WwYppfqLD03P8l9BuueA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.4.tgz", + "integrity": "sha512-3j9QH0Qh1KkdxwiZOW82cId7zdwXVQv/gRXYDnwx5pBtR1sTkU4cXRK9lp5dSdiM0r0OICO/L8J6sV1/7m0kHg==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, "node_modules/postcss-js": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz", @@ -6479,6 +9183,104 @@ } } }, + "node_modules/postcss-merge-longhand": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.0.6.tgz", + "integrity": "sha512-rkmoPwQO6ymJSmWsX6l2hHeEBQa7C4kJb9jyi5fZB1sE8nSCv7sqchoYPixRwX/yvLoZP2y6FA5kcjiByeJqDg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.0.3" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-merge-rules": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.0.6.tgz", + "integrity": "sha512-nzJWJ9yXWp8AOEpn/HFAW72WKVGD2bsLiAmgw4hDchSij27bt6TF+sIK0cJUBAYT3SGcjtGGsOR89bwkkMuMgQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^3.0.2", + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.0.4.tgz", + "integrity": "sha512-RN6q3tyuEesvyCYYFCRGJ41J1XFvgV+dvYGHr0CeHv8F00yILlN8Slf4t8XW4IghlfZYCeyRrANO6HpJ948ieA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.0.6.tgz", + "integrity": "sha512-E/dT6oVxB9nLGUTiY/rG5dX9taugv9cbLNTFad3dKxOO+BQg25Q/xo2z2ddG+ZB1CbkZYaVwx5blY8VC7R/43A==", + "dev": true, + "dependencies": { + "colord": "^2.9.1", + "cssnano-utils": "^3.0.2", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-params": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.0.5.tgz", + "integrity": "sha512-YBNuq3Rz5LfLFNHb9wrvm6t859b8qIqfXsWeK7wROm3jSKNpO1Y5e8cOyBv6Acji15TgSrAwb3JkVNCqNyLvBg==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "cssnano-utils": "^3.0.2", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.1.3.tgz", + "integrity": "sha512-9RJfTiQEKA/kZhMaEXND893nBqmYQ8qYa/G+uPdVnXF6D/FzpfI6kwBtWEcHx5FqDbA79O9n6fQJfrIj6M8jvQ==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, "node_modules/postcss-modules": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.0.tgz", @@ -6576,6 +9378,187 @@ "postcss": "^8.2.14" } }, + "node_modules/postcss-normalize-charset": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.3.tgz", + "integrity": "sha512-iKEplDBco9EfH7sx4ut7R2r/dwTnUqyfACf62Unc9UiyFuI7uUqZZtY+u+qp7g8Qszl/U28HIfcsI3pEABWFfA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.3.tgz", + "integrity": "sha512-FIV5FY/qs4Ja32jiDb5mVj5iWBlS3N8tFcw2yg98+8MkRgyhtnBgSC0lxU+16AMHbjX5fbSJgw5AXLMolonuRQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.0.4.tgz", + "integrity": "sha512-qynirjBX0Lc73ROomZE3lzzmXXTu48/QiEzKgMeqh28+MfuHLsuqC9po4kj84igZqqFGovz8F8hf44hA3dPYmQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.4.tgz", + "integrity": "sha512-Innt+wctD7YpfeDR7r5Ik6krdyppyAg2HBRpX88fo5AYzC1Ut/l3xaxACG0KsbX49cO2n5EB13clPwuYVt8cMA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-string": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.4.tgz", + "integrity": "sha512-Dfk42l0+A1CDnVpgE606ENvdmksttLynEqTQf5FL3XGQOyqxjbo25+pglCUvziicTxjtI2NLUR6KkxyUWEVubQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.3.tgz", + "integrity": "sha512-QRfjvFh11moN4PYnJ7hia4uJXeFotyK3t2jjg8lM9mswleGsNw2Lm3I5wO+l4k1FzK96EFwEVn8X8Ojrp2gP4g==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.4.tgz", + "integrity": "sha512-W79Regn+a+eXTzB+oV/8XJ33s3pDyFTND2yDuUCo0Xa3QSy1HtNIfRVPXNubHxjhlqmMFADr3FSCHT84ITW3ig==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-url": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.0.5.tgz", + "integrity": "sha512-Ws3tX+PcekYlXh+ycAt0wyzqGthkvVtZ9SZLutMVvHARxcpu4o7vvXcNoiNKyjKuWecnjS6HDI3fjBuDr5MQxQ==", + "dev": true, + "dependencies": { + "normalize-url": "^6.0.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.4.tgz", + "integrity": "sha512-wsnuHolYZjMwWZJoTC9jeI2AcjA67v4UuidDrPN9RnX8KIZfE+r2Nd6XZRwHVwUiHmRvKQtxiqo64K+h8/imaw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-ordered-values": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.0.5.tgz", + "integrity": "sha512-mfY7lXpq+8bDEHfP+muqibDPhZ5eP9zgBEF9XRvoQgXcQe2Db3G1wcvjbnfjXG6wYsl+0UIjikqq4ym1V2jGMQ==", + "dev": true, + "dependencies": { + "cssnano-utils": "^3.0.2", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.0.3.tgz", + "integrity": "sha512-c88TkSnQ/Dnwgb4OZbKPOBbCaauwEjbECP5uAuFPOzQ+XdjNjRH7SG0dteXrpp1LlIFEKK76iUGgmw2V0xeieA==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.4.tgz", + "integrity": "sha512-VIJB9SFSaL8B/B7AXb7KHL6/GNNbbCHslgdzS9UDfBZYIA2nx8NLY7iD/BXFSO/1sRUILzBTfHCoW5inP37C5g==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, "node_modules/postcss-selector-parser": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", @@ -6589,12 +9572,111 @@ "node": ">=4" } }, + "node_modules/postcss-svgo": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.0.4.tgz", + "integrity": "sha512-yDKHvULbnZtIrRqhZoA+rxreWpee28JSRH/gy9727u0UCgtpv1M/9WEWY3xySlFa0zQJcqf6oCBJPR5NwkmYpg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.0.4.tgz", + "integrity": "sha512-5ampwoSDJCxDPoANBIlMgoBcYUHnhaiuLYJR5pj1DLnYQvMRVyFuTA5C3Bvt+aHtiqWpJkD/lXT50Vo1D0ZsAQ==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/posthtml": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.5.tgz", + "integrity": "sha512-1qOuPsywVlvymhTFIBniDXwUDwvlDri5KUQuBqjmCc8Jj4b/HDSVWU//P6rTWke5rzrk+vj7mms2w8e1vD0nnw==", + "dev": true, + "dependencies": { + "posthtml-parser": "^0.10.0", + "posthtml-render": "^3.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/posthtml-parser": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.2.tgz", + "integrity": "sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==", + "dev": true, + "dependencies": { + "htmlparser2": "^7.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/posthtml-parser/node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/posthtml-parser/node_modules/htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" + } + }, + "node_modules/posthtml-render": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", + "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", + "dev": true, + "dependencies": { + "is-json": "^2.0.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/prettier": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", @@ -6713,6 +9795,19 @@ "node": ">=10" } }, + "node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dev": true, + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -6852,6 +9947,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } + }, "node_modules/raw-body": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", @@ -6988,6 +10092,132 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" }, + "node_modules/remark-footnotes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz", + "integrity": "sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz", + "integrity": "sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ==", + "dev": true, + "dependencies": { + "@babel/core": "7.12.9", + "@babel/helper-plugin-utils": "7.10.4", + "@babel/plugin-proposal-object-rest-spread": "7.12.1", + "@babel/plugin-syntax-jsx": "7.12.1", + "@mdx-js/util": "1.6.22", + "is-alphabetical": "1.0.4", + "remark-parse": "8.0.3", + "unified": "9.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx/node_modules/@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/remark-mdx/node_modules/@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "node_modules/remark-mdx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/remark-parse": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz", + "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==", + "dev": true, + "dependencies": { + "ccount": "^1.0.0", + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^2.0.0", + "vfile-location": "^3.0.0", + "xtend": "^4.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-squeeze-paragraphs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-8qRqmL9F4nuLPIgl92XUuxI3pFxize+F1H0e/W3llTk0UsjJaj01+RrirkMw7P21RKe4X6goQhYRSvNWX+70Rw==", + "dev": true, + "dependencies": { + "mdast-squeeze-paragraphs": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -7719,12 +10949,41 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -7762,6 +11021,12 @@ "node": ">= 8" } }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, "node_modules/standardized-audio-context": { "version": "25.3.20", "resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.20.tgz", @@ -7772,6 +11037,16 @@ "tslib": "^2.3.1" } }, + "node_modules/state-toggle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", + "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -7873,6 +11148,31 @@ "node": ">=6" } }, + "node_modules/style-to-object": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", + "dev": true, + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, + "node_modules/stylehacks": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.3.tgz", + "integrity": "sha512-ENcUdpf4yO0E1rubu8rkxI+JGQk4CgjchynZ4bDBJDfqdy+uhTRSWb8/F3Jtu+Bw5MW45Po3/aQGeIyyxgQtxg==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -7897,6 +11197,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "dev": true, + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -8122,6 +11443,12 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "node_modules/timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -8192,6 +11519,32 @@ "integrity": "sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==", "dev": true }, + "node_modules/trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", + "dev": true + }, + "node_modules/trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -8299,6 +11652,20 @@ "through": "^2.3.8" } }, + "node_modules/unherit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", + "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.0", + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -8335,6 +11702,24 @@ "node": ">=4" } }, + "node_modules/unified": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", + "dev": true, + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -8353,6 +11738,114 @@ "imurmurhash": "^0.1.4" } }, + "node_modules/unist-builder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-2.1.0.tgz", + "integrity": "sha512-J8NYPyBm4baYLdCbjmf1bhPu45Cr1MWTm77qd9istEkzWpnN6O9tMsEbB2JhNnBCqGENRqEWomQ+He6au0B27Q==", + "dev": true, + "dependencies": { + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove-position": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz", + "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==", + "dev": true, + "dependencies": { + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -8417,6 +11910,15 @@ "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", "dev": true }, + "node_modules/utility-types": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", + "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -8427,6 +11929,12 @@ "uuid": "bin/uuid" } }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -8488,6 +11996,46 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vm2": { "version": "3.9.5", "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.5.tgz", @@ -8506,6 +12054,22 @@ "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", "dev": true }, + "node_modules/weak-lru-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", + "dev": true + }, + "node_modules/web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -8697,6 +12261,12 @@ "node": ">=0.4" } }, + "node_modules/xxhash-wasm": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", + "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==", + "dev": true + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -8751,6 +12321,16 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } }, "dependencies": { @@ -8952,6 +12532,17 @@ "integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==", "dev": true }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.1" + } + }, "@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", @@ -8961,6 +12552,33 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-jsx": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, "@babel/runtime": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.0.tgz", @@ -9110,6 +12728,78 @@ "sourcemap-codec": "1.4.8" } }, + "@mdx-js/mdx": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz", + "integrity": "sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==", + "dev": true, + "requires": { + "@babel/core": "7.12.9", + "@babel/plugin-syntax-jsx": "7.12.1", + "@babel/plugin-syntax-object-rest-spread": "7.8.3", + "@mdx-js/util": "1.6.22", + "babel-plugin-apply-mdx-type-prop": "1.6.22", + "babel-plugin-extract-import-names": "1.6.22", + "camelcase-css": "2.0.1", + "detab": "2.0.4", + "hast-util-raw": "6.0.1", + "lodash.uniq": "4.5.0", + "mdast-util-to-hast": "10.0.1", + "remark-footnotes": "2.0.0", + "remark-mdx": "1.6.22", + "remark-parse": "8.0.3", + "remark-squeeze-paragraphs": "4.0.0", + "style-to-object": "0.3.0", + "unified": "9.2.0", + "unist-builder": "2.0.3", + "unist-util-visit": "2.0.3" + }, + "dependencies": { + "@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@mdx-js/react": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz", + "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==", + "dev": true, + "requires": {} + }, + "@mdx-js/util": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", + "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==", + "dev": true + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -9331,6 +13021,1014 @@ "read-package-json-fast": "^2.0.1" } }, + "@parcel/bundler-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.3.1.tgz", + "integrity": "sha512-NFPI3UgWA3wD057ZXdoI9xM+JfM5aooPDJEvBateUQibwPzb96k9Bw7AfKnB/UAsASgtXeNAZXDqhXq5zrXeYQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/cache": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.3.1.tgz", + "integrity": "sha512-8Wvm0VERtocUepIfkZ6xVs1LHZqttnzdrM7oSc0bXhwtz8kZB++N88g0rQskbUchW87314eYdzBtEL0aiq0bgQ==", + "dev": true, + "requires": { + "@parcel/fs": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/utils": "2.3.1", + "lmdb": "^2.0.2" + } + }, + "@parcel/codeframe": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.3.1.tgz", + "integrity": "sha512-sdNvbg9qYS2pwzqyyyt+wZfNGuy7EslzDLbzQclFZmhD6e770mcYoi8/7i7D/AONbXiI15vwNmgOdcUIXtPxbA==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@parcel/compressor-raw": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.3.1.tgz", + "integrity": "sha512-a294CarNzmy5mqTYnoO6clUxzVN/+HuUMAz1Y7EmsXwS6pJMCdhrE1Lra3upslFj4YMwp9N6+skzkptSCArkTQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1" + } + }, + "@parcel/config-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.3.1.tgz", + "integrity": "sha512-EEu8GPHAlHchyIu5AD1uPbOC/wPoAOS/ni2+yBmJWq3MJ6hwjnAdZJVYs8qVD9n2lcu3kcpO4vYxL8kv+i1mTQ==", + "dev": true, + "requires": { + "@parcel/bundler-default": "2.3.1", + "@parcel/compressor-raw": "2.3.1", + "@parcel/namer-default": "2.3.1", + "@parcel/optimizer-cssnano": "2.3.1", + "@parcel/optimizer-htmlnano": "2.3.1", + "@parcel/optimizer-image": "2.3.1", + "@parcel/optimizer-svgo": "2.3.1", + "@parcel/optimizer-terser": "2.3.1", + "@parcel/packager-css": "2.3.1", + "@parcel/packager-html": "2.3.1", + "@parcel/packager-js": "2.3.1", + "@parcel/packager-raw": "2.3.1", + "@parcel/packager-svg": "2.3.1", + "@parcel/reporter-dev-server": "2.3.1", + "@parcel/resolver-default": "2.3.1", + "@parcel/runtime-browser-hmr": "2.3.1", + "@parcel/runtime-js": "2.3.1", + "@parcel/runtime-react-refresh": "2.3.1", + "@parcel/runtime-service-worker": "2.3.1", + "@parcel/transformer-babel": "2.3.1", + "@parcel/transformer-css": "2.3.1", + "@parcel/transformer-html": "2.3.1", + "@parcel/transformer-image": "2.3.1", + "@parcel/transformer-js": "2.3.1", + "@parcel/transformer-json": "2.3.1", + "@parcel/transformer-postcss": "2.3.1", + "@parcel/transformer-posthtml": "2.3.1", + "@parcel/transformer-raw": "2.3.1", + "@parcel/transformer-react-refresh-wrap": "2.3.1", + "@parcel/transformer-svg": "2.3.1" + } + }, + "@parcel/core": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.3.1.tgz", + "integrity": "sha512-Fzj8OxICQ0dKqu+haq1LP/yxmE1ryALIddZrgmn4JSoNiZVtPJMOxidozyl+3bnEq0mRyH5i38CDFRUWl9dqKQ==", + "dev": true, + "requires": { + "@parcel/cache": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/events": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/graph": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/package-manager": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "abortcontroller-polyfill": "^1.1.9", + "base-x": "^3.0.8", + "browserslist": "^4.6.6", + "clone": "^2.1.1", + "dotenv": "^7.0.0", + "dotenv-expand": "^5.1.0", + "json-source-map": "^0.6.1", + "json5": "^2.2.0", + "msgpackr": "^1.5.1", + "nullthrows": "^1.1.1", + "semver": "^5.7.1" + }, + "dependencies": { + "dotenv": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", + "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/diagnostic": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.3.1.tgz", + "integrity": "sha512-hBMcg4WVMdSIy6RpI4gSto5dZ3OoUbnrCZzVw3J1tzQJn7x9na/+014IaE58vJtAqJ8/jc/TqWIcwsSLe898rA==", + "dev": true, + "requires": { + "json-source-map": "^0.6.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/events": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.3.1.tgz", + "integrity": "sha512-J2rWKGl1Z2IvwwDwWYz/4gUxC1P4LsioUyOo1HYGT+N5+r41P8ZB5CM/aosI2qu5mMsH8rTpclOv5E36vCSQxw==", + "dev": true + }, + "@parcel/fs": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.3.1.tgz", + "integrity": "sha512-FKqyf8KF0zOw8gfj/feEAMj4Kzqkgt9Zxa2A7UDdMWRvxLR8znqnWjD++xqq6rxJp2Y1zm4fH3JOTK4CRddUSg==", + "dev": true, + "requires": { + "@parcel/fs-search": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/watcher": "^2.0.0", + "@parcel/workers": "2.3.1" + } + }, + "@parcel/fs-search": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/fs-search/-/fs-search-2.3.1.tgz", + "integrity": "sha512-JsBIDttjmgJIMD6Q6MV83M+mwr5NqUm55iA+SewimboiWzSPzIJxRaegniSsNfsrBASJ6nSZFHcLPd/VJ5iqJw==", + "dev": true, + "requires": { + "detect-libc": "^1.0.3" + } + }, + "@parcel/graph": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.3.1.tgz", + "integrity": "sha512-KdoPJM+d5LlCFZ46iapXXCwL+WD8/QYRkb/lFpmwHIT0xdY2sAU+rDFbSB3XeI8guol5zPZrGHSj38U1o+tSFA==", + "dev": true, + "requires": { + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/hash": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.3.1.tgz", + "integrity": "sha512-IYhSQE+CIKWjPfiLmsrXHupkNd+hMlTlI9DR5qLiD8ydyPwg0XE/bOYTcbdsSl6HTackY0XYVSJwTtEgvtYVfw==", + "dev": true, + "requires": { + "detect-libc": "^1.0.3", + "xxhash-wasm": "^0.4.2" + } + }, + "@parcel/logger": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.3.1.tgz", + "integrity": "sha512-swNPInULCJrpCJCLOgZcf+xNcUF0NjD7LyNcB349BkyO7i6st14nfBjXf6eAJJu0z7RMmi6zp9CQB47e4cI6+g==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/events": "2.3.1" + } + }, + "@parcel/markdown-ansi": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.3.1.tgz", + "integrity": "sha512-M4Hi25pKtSh1KF/ppMDBk5QuLpYAQjgB/MSP+nz7NzXQlYPCN5oEk9TUkrmQ9J+vOvVwefxfy7ahSErEuQbTFw==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@parcel/namer-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.3.1.tgz", + "integrity": "sha512-huIb47vri76MhfuvmKtQqalqDfIwMfaPyjrbaoHysZ4fRUjvmrx0NPy0dNrTSLvA96iBc7EG2Zzw+Qn3voAiwg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/node-resolver-core": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-2.3.1.tgz", + "integrity": "sha512-iEeilPoeiOyWLeF1NERZByOWe3IqUnNuoHkGbn8qZWlZXYO+k+w/X8Auv0KKsLVGe4XdljwsWbTWuhQJZ8BpIg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/optimizer-cssnano": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.3.1.tgz", + "integrity": "sha512-e/YfTbMzn71CgSyyL/e+MZ/aQTPcUXoQ/EtqcuDlS3kcp2tw1aHgP0xmZT7dSPv+L+I0gY3aQSMM7IqgIzfkLQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "cssnano": "^5.0.15", + "postcss": "^8.4.5" + } + }, + "@parcel/optimizer-htmlnano": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.3.1.tgz", + "integrity": "sha512-zE76grrE5KlWwooH9AnkKRU4QNgcWUtHpJUWba5JYXuCfaqCG2XpN5ARBmRqtmrEke7PlCt/1F0E47PPhZeWiw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "htmlnano": "^2.0.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "svgo": "^2.4.0" + }, + "dependencies": { + "htmlnano": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-2.0.0.tgz", + "integrity": "sha512-thKQfhcp2xgtsWNE27A2bliEeqVL5xjAgGn0wajyttvFFsvFWWah1ntV9aEX61gz0T6MBQ5xK/1lXuEumhJTcg==", + "dev": true, + "requires": { + "cosmiconfig": "^7.0.1", + "posthtml": "^0.16.5", + "timsort": "^0.3.0" + } + } + } + }, + "@parcel/optimizer-image": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.3.1.tgz", + "integrity": "sha512-vBnyWaaqljASMi/vDkVdv855/G/BaJYzZklsc5xjGUwZq8nbH4sZPc9NDdl99/WU3yGR8QtA67BdTRkRLf8rKQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "detect-libc": "^1.0.3" + } + }, + "@parcel/optimizer-svgo": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-svgo/-/optimizer-svgo-2.3.1.tgz", + "integrity": "sha512-PwEXmmZ9z7WNs8n/lWkbwRdw62MJqYzKDUUJPF+KCQb7NG1OAZy1jVj+TyiCuMtxIKhNtei8OrMOlvulQgixcg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "svgo": "^2.4.0" + } + }, + "@parcel/optimizer-terser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-terser/-/optimizer-terser-2.3.1.tgz", + "integrity": "sha512-uDJghBgwCKhq6m1y/vw/tRZKS4kqNXhXaZIYtEyRdrxJ/pqGTGmHVYO5ItXpgGugM49C8TrqVVlcgIIgR/p1yw==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "terser": "^5.2.0" + }, + "dependencies": { + "acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, + "optional": true, + "peer": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "terser": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" + } + } + } + }, + "@parcel/package-manager": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.3.1.tgz", + "integrity": "sha512-w2XOkD3SU8RxhUDW+Soy/TjvEVvfUsBmHy02asllt4b/ZtyZVAsQmonGExHDDkRn3TNDR6Y96Yw6M7purt+b9w==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/packager-css": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.3.1.tgz", + "integrity": "sha512-gvrGNw4tiIyi6SO7at7RJvfCDQIAuy9xJhFtuouuFAl6A1EMhkoL5amcmavfdbN166LJ/3s74t1LYoPeYCnb2Q==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/packager-html": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.3.1.tgz", + "integrity": "sha512-dOPEB0KEyLzDl5zEXjRCo/J/fsc1wVw0gUa+N0A5LAZeYmTOPJgTHhb/ZeNcPKWQT75eGUSEaDXX+oBs1B17xw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5" + } + }, + "@parcel/packager-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.3.1.tgz", + "integrity": "sha512-7TikegHYgwiuUQ9bFikG3H47wTms7nVpDQEwBYHmPhDLvwlKCq17HJ39eQKS4740G6umIvQkG5t7mcR1XTXYtg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "globals": "^13.2.0", + "nullthrows": "^1.1.1" + }, + "dependencies": { + "globals": { + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@parcel/packager-raw": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.3.1.tgz", + "integrity": "sha512-Gy4WfZPy64+E7Gvvdw3/HG5EFzuBbC64MbLv0AgQNIDub5LG76dPdLLgJ/TS72gXsA43Q2ApaXMHBOC/G0yECA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1" + } + }, + "@parcel/packager-svg": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.3.1.tgz", + "integrity": "sha512-lUx+DXymTNKhvxdoNhnb6or4qjGLbXBTAiyfp4q8QlFXJHKVbEEoVgLc9rda9TLIG18Pn4NR9QE+o/nyzwcibQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "posthtml": "^0.16.4" + } + }, + "@parcel/plugin": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.3.1.tgz", + "integrity": "sha512-ROOWbgFze7BCF3RkEh8VbcKGlR5UGBuJ8lfCaFrG1VOk7Rxgl8Bmk96TRbZREm/1jB74p2O8twVKyPSC13riow==", + "dev": true, + "requires": { + "@parcel/types": "2.3.1" + } + }, + "@parcel/reporter-cli": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.3.1.tgz", + "integrity": "sha512-rLDxD1SJIiAhd/N3CiRiNKz/NVVyh25tPEOFCNFgoTVC8wJKfzeUEgVuTJQ8lRLrzk0PfY51KyGmWdLqti8jag==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "chalk": "^4.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@parcel/reporter-dev-server": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.3.1.tgz", + "integrity": "sha512-ramEx+dFMcgqus2We7jlonQgCo3/xwnjdXUsC+iuJXSKGW7eMCZ5f+fjETkeq2eOt8YYzAML54u7Qkt1gSX39Q==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1" + } + }, + "@parcel/resolver-default": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.3.1.tgz", + "integrity": "sha512-fScU5ZG/VmdqoqPPArTLHXC7LgsfSVKA6mpZpkpkAyFTMZimPv6HuFwMhIj7jabeWRQKShjpT07Ygq31UBl/Cw==", + "dev": true, + "requires": { + "@parcel/node-resolver-core": "2.3.1", + "@parcel/plugin": "2.3.1" + } + }, + "@parcel/runtime-browser-hmr": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.3.1.tgz", + "integrity": "sha512-Zd6fzBaNNhLBqROy1Jtwsddf5/E2I7zVecHPWutAUT9L4xX3XMH7Yv3W6vmLLq3X0mdfmoRtVnQseAMPAyfNog==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1" + } + }, + "@parcel/runtime-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.3.1.tgz", + "integrity": "sha512-Nmgbo+v5p5g1DSHbmZni22ZsHhcAsi7z6Qk9cdXrt/fW2VbQRu+yBKebeinwUnWGd5Lwu5UZ2mwn2nSaSV8Spw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/runtime-react-refresh": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.3.1.tgz", + "integrity": "sha512-42ldT80UZ8fqm0M5td3YviBn6fFYwcva3PdWLfwC5b1woug/5/FevMna+ndNBSFjt+xbFLUFf6bDxnV7vlWHHw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "react-refresh": "^0.9.0" + } + }, + "@parcel/runtime-service-worker": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.3.1.tgz", + "integrity": "sha512-kTt1DqMIQt5eNAJZTxeegLgGxHC4qXSaBrfQanezp+1fmRi1TOWvKgM7lzKwY9IaXfyCV/DR+Wy95iR6r1P70A==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/source-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.0.2.tgz", + "integrity": "sha512-NnUrPYLpYB6qyx2v6bcRPn/gVigmGG6M6xL8wIg/i0dP1GLkuY1nf+Hqdf63FzPTqqT7K3k6eE5yHPQVMO5jcA==", + "dev": true, + "requires": { + "detect-libc": "^1.0.3" + } + }, + "@parcel/transformer-babel": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.3.1.tgz", + "integrity": "sha512-KEyuFNQJYFMP39XvhTu2ZzsD+gdQKyA3X+5DViH2bSgZeEjCIfAhAjg7mSfKeD/u8ZVBmIDq2M/QjDO+taM0KQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "browserslist": "^4.6.6", + "json5": "^2.2.0", + "nullthrows": "^1.1.1", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-css": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.3.1.tgz", + "integrity": "sha512-InuEbSu7yLp3jjnmVB0MzO8WjG0123EJqGVVlB5WbEBUxzLN3bgTJDKP5O7xGgipjhNIpFUjx2SU7eeSb6iFog==", + "dev": true, + "requires": { + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "postcss": "^8.4.5", + "postcss-value-parser": "^4.2.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-html": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.3.1.tgz", + "integrity": "sha512-23Z7kuSDnLzB8Du88pua2VjgOh7ZUpW1hedX1FubV2PfUGpZvAg7XBTdTGp+7Tmy8PIGyZrP3CP1UNQkjLO8bQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-image": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.3.1.tgz", + "integrity": "sha512-8A+XnUhDnEAbfc7GCBRvCsSiv/6Ro5+vd1sZ5tQJmajcc0nfIbolZQuztEHZMDPjEr+WIcOCJZ5re5bCG3NhZA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/workers": "2.3.1", + "nullthrows": "^1.1.1" + } + }, + "@parcel/transformer-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.3.1.tgz", + "integrity": "sha512-9mHpfw008l00cW8QW21Nhfax/aOqZ+CozNXj5gWV0uJ9is5x0TumKYXtYUsuP9LunAra/ZenvpQjCFibTXe51Q==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.3.1", + "@parcel/workers": "2.3.1", + "@swc/helpers": "^0.2.11", + "browserslist": "^4.6.6", + "detect-libc": "^1.0.3", + "nullthrows": "^1.1.1", + "regenerator-runtime": "^0.13.7", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-json": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.3.1.tgz", + "integrity": "sha512-usaoro1uH5hxI57x7Qve4Y6Tsf5GitVh6gC3e5TaJFc3mnr5pn3KKviWC0g0haeluv9NCPK++alQuzmpgIooWQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "json5": "^2.2.0" + } + }, + "@parcel/transformer-mdx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-mdx/-/transformer-mdx-2.3.1.tgz", + "integrity": "sha512-RhLVqetkR8eNHBIXHk9vgy90HA5qPVfhoycL9PvKj/tE12CKY5pkI1aKf6AWhbNWFhaxkpmXvS2ZvtfrkGWIJg==", + "dev": true, + "requires": { + "@mdx-js/mdx": "^1.6.22", + "@parcel/plugin": "2.3.1" + } + }, + "@parcel/transformer-postcss": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.3.1.tgz", + "integrity": "sha512-rpoEGpStj1THw/NH3CuujrKan84h6SEnDBem8l/GAE7/cRDQs/O/JnJKP+oXcKOGH1KNdcuPWYb8ORW9Pe+Z5w==", + "dev": true, + "requires": { + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "clone": "^2.1.1", + "nullthrows": "^1.1.1", + "postcss-value-parser": "^4.2.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-posthtml": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.3.1.tgz", + "integrity": "sha512-ahFLfV8zdm6lH6gGSZxgUvFbP0qsclucV53ubRIRV+croGp1KhMCstbMY5GKGYHWoI6RRrxnbriJwVcbX9tUVQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-raw": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.3.1.tgz", + "integrity": "sha512-45ObmhBJ2wdlOGTsIEy9T+FOoQWY+x8HN2Cw9/ZhMWOpLtof56om5xk5u7hmsMMe/4Jaqxzkw3vInqOJR6bc1Q==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1" + } + }, + "@parcel/transformer-react-refresh-wrap": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.3.1.tgz", + "integrity": "sha512-4uufhCCneMFpx6YaP2/ae/Ilpna5GSYuUXijlFHy4qcAIYkdtrHWRJuLBUBD4qktkmG22wTWgRwGHMk4seRDzg==", + "dev": true, + "requires": { + "@parcel/plugin": "2.3.1", + "@parcel/utils": "2.3.1", + "react-refresh": "^0.9.0" + } + }, + "@parcel/transformer-svg": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.3.1.tgz", + "integrity": "sha512-3V9LIpR+p8NEr8rnHHIa9PKUwQ4fEkhSo0S8g+FH32/f7y6IMuTy7hn0leYdfATNVi1Nx7d4boN4XSyUuORQfw==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/plugin": "2.3.1", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/types": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.3.1.tgz", + "integrity": "sha512-i2UyUoA4DzyYxe9rZRDuMAZ6TD3Mq3tTTqeJ2/zA6w83Aon3cqdE9va91peu1fKRGyRqE5lwWRtA7ktF1A2SVA==", + "dev": true, + "requires": { + "@parcel/cache": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/package-manager": "2.3.1", + "@parcel/source-map": "^2.0.0", + "@parcel/workers": "2.3.1", + "utility-types": "^3.10.0" + } + }, + "@parcel/utils": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.3.1.tgz", + "integrity": "sha512-OFdh/HuAcce753/U3QoORzYU3N5oZqCfQNRb0i3onuz/qpli5TyxUl/k1BuTqlKYr6Px3kj05g6GFi9kRBOMbw==", + "dev": true, + "requires": { + "@parcel/codeframe": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/hash": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/markdown-ansi": "2.3.1", + "@parcel/source-map": "^2.0.0", + "chalk": "^4.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@parcel/watcher": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.0.5.tgz", + "integrity": "sha512-x0hUbjv891omnkcHD7ZOhiyyUqUUR6MNjq89JhEI3BxppeKWAm6NPQsqqRrAkCJBogdT/o/My21sXtTI9rJIsw==", + "dev": true, + "requires": { + "node-addon-api": "^3.2.1", + "node-gyp-build": "^4.3.0" + } + }, + "@parcel/workers": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.3.1.tgz", + "integrity": "sha512-e2P/9p5AYBLfNRs8n+57ChGrn5171oHwY54dz/jj0CrXKN1q0b+rNwzYsPaAtOicBoqmm1s5I3cjfO6GfJP65A==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/types": "2.3.1", + "@parcel/utils": "2.3.1", + "chrome-trace-event": "^1.0.2", + "nullthrows": "^1.1.1" + } + }, "@rollup/plugin-commonjs": { "version": "16.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz", @@ -9473,6 +14171,12 @@ "dev": true, "requires": {} }, + "@swc/helpers": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.2.14.tgz", + "integrity": "sha512-wpCQMhf5p5GhNg2MmGKXzUNwxe7zRiCsmqYsamez2beP7mKPCSiu+BjZcdN95yYSzO857kr0VfQewmGpS77nqA==", + "dev": true + }, "@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -9491,6 +14195,17 @@ "mini-svg-data-uri": "^1.2.3" } }, + "@tailwindcss/typography": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.2.tgz", + "integrity": "sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw==", + "dev": true, + "requires": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2" + } + }, "@testing-library/dom": { "version": "7.31.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz", @@ -9773,6 +14488,12 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true + }, "@types/accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", @@ -9906,6 +14627,15 @@ "@types/range-parser": "*" } }, + "@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/http-assert": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.3.tgz", @@ -9988,6 +14718,15 @@ "@types/koa": "*" } }, + "@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -10096,6 +14835,12 @@ "integrity": "sha512-zYzMb2aMyzXW5VgOQHy+FgI8N5tLFb+tIsUqk35CIgSr9pT4pji2GR8BCOTMdniusVuRHIp/DaYQNQGYGLVZHQ==", "dev": true }, + "@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, "@types/ws": { "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", @@ -10355,6 +15100,12 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "abortcontroller-polyfill": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", + "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==", + "dev": true + }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -10615,12 +15366,62 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "babel-plugin-apply-mdx-type-prop": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz", + "integrity": "sha512-VefL+8o+F/DfK24lPZMtJctrCVOfgbqLAGZSkxwhazQv4VxPg3Za/i40fu22KR2m8eEda+IfSOlPLUSIiLcnCQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.10.4", + "@mdx-js/util": "1.6.22" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "babel-plugin-extract-import-names": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz", + "integrity": "sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.10.4" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -10749,6 +15550,12 @@ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, "bufferutil": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", @@ -10878,6 +15685,18 @@ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", "dev": true }, + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, "caniuse-lite": { "version": "1.0.30001307", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001307.tgz", @@ -10890,6 +15709,12 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true + }, "chai": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", @@ -10916,6 +15741,24 @@ "supports-color": "^5.3.0" } }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -10966,6 +15809,14 @@ "readdirp": "~3.6.0" } }, + "chord-voicings": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/chord-voicings/-/chord-voicings-0.0.1.tgz", + "integrity": "sha512-SutgB/4ynkkuiK6qdQ/k3QvCFcH0Vj8Ch4t6LbRyRQbVzP/TOztiCk3kvXd516UZ6fqk7ijDRELEFcKN+6V8sA==", + "requires": { + "@tonaljs/tonal": "^4.6.5" + } + }, "chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -10992,6 +15843,12 @@ } } }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, "cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -11072,6 +15929,12 @@ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.1.tgz", "integrity": "sha512-s6aac+DD+4O2u1aBmdxhB7yz2XU7tG3snOyQ05Kxifahz7hoxnfxIRHxiCSEv3TUC38dIVH8G+lZH9UWSfGQxA==" }, + "collapse-white-space": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -11087,6 +15950,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colord": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", + "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -11096,6 +15965,12 @@ "delayed-stream": "~1.0.0" } }, + "comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "dev": true + }, "command-line-args": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", @@ -11134,6 +16009,12 @@ } } }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + }, "common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", @@ -11245,6 +16126,15 @@ "which": "^2.0.1" } }, + "css-declaration-sorter": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.4.tgz", + "integrity": "sha512-lpfkqS0fctcmZotJGhnxkIyJWvBXgpyi2wsFd4J8VB7wzyrT6Ch/3Q+FMNJpjK4gu1+GN5khOnpU2ZVKrLbhCw==", + "dev": true, + "requires": { + "timsort": "^0.3.0" + } + }, "css-select": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", @@ -11258,6 +16148,24 @@ "nth-check": "^2.0.1" } }, + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "css-what": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", @@ -11270,6 +16178,70 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, + "cssnano": { + "version": "5.0.17", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.0.17.tgz", + "integrity": "sha512-fmjLP7k8kL18xSspeXTzRhaFtRI7DL9b8IcXR80JgtnWBpvAzHT7sCR/6qdn0tnxIaINUN6OEQu83wF57Gs3Xw==", + "dev": true, + "requires": { + "cssnano-preset-default": "^5.1.12", + "lilconfig": "^2.0.3", + "yaml": "^1.10.2" + } + }, + "cssnano-preset-default": { + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.1.12.tgz", + "integrity": "sha512-rO/JZYyjW1QNkWBxMGV28DW7d98UDLaF759frhli58QFehZ+D/LSmwQ2z/ylBAe2hUlsIWTq6NYGfQPq65EF9w==", + "dev": true, + "requires": { + "css-declaration-sorter": "^6.0.3", + "cssnano-utils": "^3.0.2", + "postcss-calc": "^8.2.0", + "postcss-colormin": "^5.2.5", + "postcss-convert-values": "^5.0.4", + "postcss-discard-comments": "^5.0.3", + "postcss-discard-duplicates": "^5.0.3", + "postcss-discard-empty": "^5.0.3", + "postcss-discard-overridden": "^5.0.4", + "postcss-merge-longhand": "^5.0.6", + "postcss-merge-rules": "^5.0.6", + "postcss-minify-font-values": "^5.0.4", + "postcss-minify-gradients": "^5.0.6", + "postcss-minify-params": "^5.0.5", + "postcss-minify-selectors": "^5.1.3", + "postcss-normalize-charset": "^5.0.3", + "postcss-normalize-display-values": "^5.0.3", + "postcss-normalize-positions": "^5.0.4", + "postcss-normalize-repeat-style": "^5.0.4", + "postcss-normalize-string": "^5.0.4", + "postcss-normalize-timing-functions": "^5.0.3", + "postcss-normalize-unicode": "^5.0.4", + "postcss-normalize-url": "^5.0.5", + "postcss-normalize-whitespace": "^5.0.4", + "postcss-ordered-values": "^5.0.5", + "postcss-reduce-initial": "^5.0.3", + "postcss-reduce-transforms": "^5.0.4", + "postcss-svgo": "^5.0.4", + "postcss-unique-selectors": "^5.0.4" + } + }, + "cssnano-utils": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.0.2.tgz", + "integrity": "sha512-KhprijuQv2sP4kT92sSQwhlK3SJTbDIsxcfIEySB0O+3m9esFOai7dP9bMx5enHAh2MwarVIcnwiWoOm01RIbQ==", + "dev": true, + "requires": {} + }, + "csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + } + }, "csstype": { "version": "3.0.10", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", @@ -11409,6 +16381,21 @@ "integrity": "sha512-R5QZrOXxSs0JDUIU/VANvRJlQVMts9C0L76HToQdPdlftfZCE7W6dyH0G4GZ5UW9fRqUOhAoCE2aGekuu+3HjQ==", "dev": true }, + "detab": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detab/-/detab-2.0.4.tgz", + "integrity": "sha512-8zdsQA5bIkoRECvCrNKPla84lyoR7DSAyf7p0YgXzBO9PDJx8KntPUay7NS6yp+KdxdVtiE5SpHKtbp2ZQyA9g==", + "dev": true, + "requires": { + "repeat-string": "^1.5.4" + } + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true + }, "detect-port": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", @@ -12035,6 +17022,12 @@ "has-symbols": "^1.0.1" } }, + "get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true + }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -12170,6 +17163,93 @@ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, + "hast-to-hyperscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "property-information": "^5.3.0", + "space-separated-tokens": "^1.0.0", + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + } + }, + "hast-util-from-parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", + "dev": true, + "requires": { + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", + "property-information": "^5.0.0", + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + }, + "dependencies": { + "@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==", + "dev": true + } + } + }, + "hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "dev": true + }, + "hast-util-raw": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.1.tgz", + "integrity": "sha512-ZMuiYA+UF7BXBtsTBNcLBF5HzXzkyE6MLzJnL605LKE8GJylNjGc4jjxazAHUtcwT5/CEt6afRKViYB4X66dig==", + "dev": true, + "requires": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", + "html-void-elements": "^1.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + } + }, + "hast-util-to-parse5": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", + "dev": true, + "requires": { + "hast-to-hyperscript": "^9.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + } + }, + "hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dev": true, + "requires": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + } + }, "hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", @@ -12185,6 +17265,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "html-void-elements": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", + "dev": true + }, "htmlparser2": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", @@ -12398,12 +17484,34 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", + "dev": true + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "dev": true }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -12419,6 +17527,12 @@ "binary-extensions": "^2.0.0" } }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, "is-core-module": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", @@ -12428,6 +17542,12 @@ "has": "^1.0.3" } }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true + }, "is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -12464,6 +17584,18 @@ "is-extglob": "^2.1.1" } }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true + }, + "is-json": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", + "integrity": "sha1-a+Fm0USCihMdaGiRuYPfYsOUkf8=", + "dev": true + }, "is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -12482,6 +17614,12 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, "is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -12518,6 +17656,18 @@ "assert": "^1.4.1" } }, + "is-whitespace-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", + "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", + "dev": true + }, + "is-word-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", + "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", + "dev": true + }, "is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -12636,6 +17786,12 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/json-source-map/-/json-source-map-0.6.1.tgz", + "integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==", + "dev": true + }, "json-stringify-nice": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", @@ -12844,6 +18000,19 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "lmdb": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.2.1.tgz", + "integrity": "sha512-tUlIjyJvbd4mqdotI9Xe+3PZt/jqPx70VKFDrKMYu09MtBWOT3y2PbuTajX+bJFDjbgLkQC0cTx2n6dithp/zQ==", + "dev": true, + "requires": { + "msgpackr": "^1.5.4", + "nan": "^2.14.2", + "node-gyp-build": "^4.2.3", + "ordered-binary": "^1.2.4", + "weak-lru-cache": "^1.2.2" + } + }, "loader-utils": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz", @@ -12871,6 +18040,36 @@ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, + "lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, "log-update": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", @@ -12963,12 +18162,64 @@ "ssri": "^8.0.0" } }, + "markdown-escapes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", + "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", + "dev": true + }, "marky": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.2.tgz", "integrity": "sha512-k1dB2HNeaNyORco8ulVEhctyEGkKHb2YWAhDsxeFlW2nROIirsctBYzKwwS3Vza+sKTS1zO4Z+n9/+9WbGLIxQ==", "dev": true }, + "mdast-squeeze-paragraphs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-zxdPn69hkQ1rm4J+2Cs2j6wDEv7O17TfXTJ33tl/+JPIoEmtV9t2ZzBM5LPHE8QlHsmVD8t3vPKCyY3oH+H8MQ==", + "dev": true, + "requires": { + "unist-util-remove": "^2.0.0" + } + }, + "mdast-util-definitions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", + "dev": true, + "requires": { + "unist-util-visit": "^2.0.0" + } + }, + "mdast-util-to-hast": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", + "mdurl": "^1.0.0", + "unist-builder": "^2.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -13157,11 +18408,37 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "msgpackr": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.5.4.tgz", + "integrity": "sha512-Z7w5Jg+2Q9z9gJxeM68d7tSuWZZGnFIRhZnyqcZCa/1dKkhOCNvR1TUV3zzJ3+vj78vlwKRzUgVDlW4jiSOeDA==", + "dev": true, + "requires": { + "msgpackr-extract": "^1.0.14" + } + }, + "msgpackr-extract": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-1.0.16.tgz", + "integrity": "sha512-fxdRfQUxPrL/TizyfYfMn09dK58e+d65bRD/fcaVH4052vj30QOzzqxcQIS7B0NsqlypEQ/6Du3QmP2DhWFfCA==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.14.2", + "node-gyp-build": "^4.2.3" + } + }, "multimap": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz", "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==" }, + "nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true + }, "nanocolors": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.13.tgz", @@ -13180,6 +18457,12 @@ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true + }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -13417,6 +18700,12 @@ "boolbase": "^1.0.0" } }, + "nullthrows": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "dev": true + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -13490,6 +18779,12 @@ "is-wsl": "^2.2.0" } }, + "ordered-binary": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.4.tgz", + "integrity": "sha512-A/csN0d3n+igxBPfUrjbV5GC69LWj2pjZzAAeeHXLukQ4+fytfP4T1Lg0ju7MSPSwq7KtHkGaiwO8URZN5IpLg==", + "dev": true + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -13587,6 +18882,79 @@ "tar": "^6.1.0" } }, + "parcel": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.3.1.tgz", + "integrity": "sha512-YDzKpWcO1tEqk7ENPTitE8zbDfYDjo7nsoT7Oun+7eZadwsiNds1+mbhCO0exGq4SJekto+dkMdrLMcbOWJznQ==", + "dev": true, + "requires": { + "@parcel/config-default": "2.3.1", + "@parcel/core": "2.3.1", + "@parcel/diagnostic": "2.3.1", + "@parcel/events": "2.3.1", + "@parcel/fs": "2.3.1", + "@parcel/logger": "2.3.1", + "@parcel/package-manager": "2.3.1", + "@parcel/reporter-cli": "2.3.1", + "@parcel/reporter-dev-server": "2.3.1", + "@parcel/utils": "2.3.1", + "chalk": "^4.1.0", + "commander": "^7.0.0", + "get-port": "^4.2.0", + "v8-compile-cache": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -13607,6 +18975,20 @@ "just-diff-apply": "^3.0.0" } }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -13781,6 +19163,65 @@ "source-map-js": "^1.0.2" } }, + "postcss-calc": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-colormin": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.5.tgz", + "integrity": "sha512-+X30aDaGYq81mFqwyPpnYInsZQnNpdxMX0ajlY7AExCexEFkPVV+KrO7kXwayqEWL2xwEbNQ4nUO0ZsRWGnevg==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-convert-values": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.4.tgz", + "integrity": "sha512-bugzSAyjIexdObovsPZu/sBCTHccImJxLyFgeV0MmNBm/Lw5h5XnjfML6gzEmJ3A6nyfCW7hb1JXzcsA4Zfbdw==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-discard-comments": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.3.tgz", + "integrity": "sha512-6W5BemziRoqIdAKT+1QjM4bNcJAQ7z7zk073730NHg4cUXh3/rQHHj7pmYxUB9aGhuRhBiUf0pXvIHkRwhQP0Q==", + "dev": true, + "requires": {} + }, + "postcss-discard-duplicates": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.3.tgz", + "integrity": "sha512-vPtm1Mf+kp7iAENTG7jI1MN1lk+fBqL5y+qxyi4v3H+lzsXEdfS3dwUZD45KVhgzDEgduur8ycB4hMegyMTeRw==", + "dev": true, + "requires": {} + }, + "postcss-discard-empty": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.3.tgz", + "integrity": "sha512-xGJugpaXKakwKI7sSdZjUuN4V3zSzb2Y0LOlmTajFbNinEjTfVs9PFW2lmKBaC/E64WwYppfqLD03P8l9BuueA==", + "dev": true, + "requires": {} + }, + "postcss-discard-overridden": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.4.tgz", + "integrity": "sha512-3j9QH0Qh1KkdxwiZOW82cId7zdwXVQv/gRXYDnwx5pBtR1sTkU4cXRK9lp5dSdiM0r0OICO/L8J6sV1/7m0kHg==", + "dev": true, + "requires": {} + }, "postcss-js": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz", @@ -13800,6 +19241,68 @@ "yaml": "^1.10.2" } }, + "postcss-merge-longhand": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.0.6.tgz", + "integrity": "sha512-rkmoPwQO6ymJSmWsX6l2hHeEBQa7C4kJb9jyi5fZB1sE8nSCv7sqchoYPixRwX/yvLoZP2y6FA5kcjiByeJqDg==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.0.3" + } + }, + "postcss-merge-rules": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.0.6.tgz", + "integrity": "sha512-nzJWJ9yXWp8AOEpn/HFAW72WKVGD2bsLiAmgw4hDchSij27bt6TF+sIK0cJUBAYT3SGcjtGGsOR89bwkkMuMgQ==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^3.0.2", + "postcss-selector-parser": "^6.0.5" + } + }, + "postcss-minify-font-values": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.0.4.tgz", + "integrity": "sha512-RN6q3tyuEesvyCYYFCRGJ41J1XFvgV+dvYGHr0CeHv8F00yILlN8Slf4t8XW4IghlfZYCeyRrANO6HpJ948ieA==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-minify-gradients": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.0.6.tgz", + "integrity": "sha512-E/dT6oVxB9nLGUTiY/rG5dX9taugv9cbLNTFad3dKxOO+BQg25Q/xo2z2ddG+ZB1CbkZYaVwx5blY8VC7R/43A==", + "dev": true, + "requires": { + "colord": "^2.9.1", + "cssnano-utils": "^3.0.2", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-minify-params": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.0.5.tgz", + "integrity": "sha512-YBNuq3Rz5LfLFNHb9wrvm6t859b8qIqfXsWeK7wROm3jSKNpO1Y5e8cOyBv6Acji15TgSrAwb3JkVNCqNyLvBg==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "cssnano-utils": "^3.0.2", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-minify-selectors": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.1.3.tgz", + "integrity": "sha512-9RJfTiQEKA/kZhMaEXND893nBqmYQ8qYa/G+uPdVnXF6D/FzpfI6kwBtWEcHx5FqDbA79O9n6fQJfrIj6M8jvQ==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.5" + } + }, "postcss-modules": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.0.tgz", @@ -13861,6 +19364,116 @@ "postcss-selector-parser": "^6.0.6" } }, + "postcss-normalize-charset": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.3.tgz", + "integrity": "sha512-iKEplDBco9EfH7sx4ut7R2r/dwTnUqyfACf62Unc9UiyFuI7uUqZZtY+u+qp7g8Qszl/U28HIfcsI3pEABWFfA==", + "dev": true, + "requires": {} + }, + "postcss-normalize-display-values": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.3.tgz", + "integrity": "sha512-FIV5FY/qs4Ja32jiDb5mVj5iWBlS3N8tFcw2yg98+8MkRgyhtnBgSC0lxU+16AMHbjX5fbSJgw5AXLMolonuRQ==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-positions": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.0.4.tgz", + "integrity": "sha512-qynirjBX0Lc73ROomZE3lzzmXXTu48/QiEzKgMeqh28+MfuHLsuqC9po4kj84igZqqFGovz8F8hf44hA3dPYmQ==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-repeat-style": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.4.tgz", + "integrity": "sha512-Innt+wctD7YpfeDR7r5Ik6krdyppyAg2HBRpX88fo5AYzC1Ut/l3xaxACG0KsbX49cO2n5EB13clPwuYVt8cMA==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-string": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.4.tgz", + "integrity": "sha512-Dfk42l0+A1CDnVpgE606ENvdmksttLynEqTQf5FL3XGQOyqxjbo25+pglCUvziicTxjtI2NLUR6KkxyUWEVubQ==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-timing-functions": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.3.tgz", + "integrity": "sha512-QRfjvFh11moN4PYnJ7hia4uJXeFotyK3t2jjg8lM9mswleGsNw2Lm3I5wO+l4k1FzK96EFwEVn8X8Ojrp2gP4g==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-unicode": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.4.tgz", + "integrity": "sha512-W79Regn+a+eXTzB+oV/8XJ33s3pDyFTND2yDuUCo0Xa3QSy1HtNIfRVPXNubHxjhlqmMFADr3FSCHT84ITW3ig==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-url": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.0.5.tgz", + "integrity": "sha512-Ws3tX+PcekYlXh+ycAt0wyzqGthkvVtZ9SZLutMVvHARxcpu4o7vvXcNoiNKyjKuWecnjS6HDI3fjBuDr5MQxQ==", + "dev": true, + "requires": { + "normalize-url": "^6.0.1", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-whitespace": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.4.tgz", + "integrity": "sha512-wsnuHolYZjMwWZJoTC9jeI2AcjA67v4UuidDrPN9RnX8KIZfE+r2Nd6XZRwHVwUiHmRvKQtxiqo64K+h8/imaw==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-ordered-values": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.0.5.tgz", + "integrity": "sha512-mfY7lXpq+8bDEHfP+muqibDPhZ5eP9zgBEF9XRvoQgXcQe2Db3G1wcvjbnfjXG6wYsl+0UIjikqq4ym1V2jGMQ==", + "dev": true, + "requires": { + "cssnano-utils": "^3.0.2", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-reduce-initial": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.0.3.tgz", + "integrity": "sha512-c88TkSnQ/Dnwgb4OZbKPOBbCaauwEjbECP5uAuFPOzQ+XdjNjRH7SG0dteXrpp1LlIFEKK76iUGgmw2V0xeieA==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.4.tgz", + "integrity": "sha512-VIJB9SFSaL8B/B7AXb7KHL6/GNNbbCHslgdzS9UDfBZYIA2nx8NLY7iD/BXFSO/1sRUILzBTfHCoW5inP37C5g==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, "postcss-selector-parser": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", @@ -13871,12 +19484,79 @@ "util-deprecate": "^1.0.2" } }, + "postcss-svgo": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.0.4.tgz", + "integrity": "sha512-yDKHvULbnZtIrRqhZoA+rxreWpee28JSRH/gy9727u0UCgtpv1M/9WEWY3xySlFa0zQJcqf6oCBJPR5NwkmYpg==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" + } + }, + "postcss-unique-selectors": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.0.4.tgz", + "integrity": "sha512-5ampwoSDJCxDPoANBIlMgoBcYUHnhaiuLYJR5pj1DLnYQvMRVyFuTA5C3Bvt+aHtiqWpJkD/lXT50Vo1D0ZsAQ==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.5" + } + }, "postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "posthtml": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.5.tgz", + "integrity": "sha512-1qOuPsywVlvymhTFIBniDXwUDwvlDri5KUQuBqjmCc8Jj4b/HDSVWU//P6rTWke5rzrk+vj7mms2w8e1vD0nnw==", + "dev": true, + "requires": { + "posthtml-parser": "^0.10.0", + "posthtml-render": "^3.0.0" + } + }, + "posthtml-parser": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.2.tgz", + "integrity": "sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==", + "dev": true, + "requires": { + "htmlparser2": "^7.1.1" + }, + "dependencies": { + "entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true + }, + "htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" + } + } + } + }, + "posthtml-render": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", + "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", + "dev": true, + "requires": { + "is-json": "^2.0.1" + } + }, "prettier": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", @@ -13967,6 +19647,15 @@ "retry": "^0.12.0" } }, + "property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dev": true, + "requires": { + "xtend": "^4.0.0" + } + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -14054,6 +19743,11 @@ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true }, + "ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==" + }, "raw-body": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", @@ -14166,6 +19860,105 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" }, + "remark-footnotes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz", + "integrity": "sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ==", + "dev": true + }, + "remark-mdx": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz", + "integrity": "sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ==", + "dev": true, + "requires": { + "@babel/core": "7.12.9", + "@babel/helper-plugin-utils": "7.10.4", + "@babel/plugin-proposal-object-rest-spread": "7.12.1", + "@babel/plugin-syntax-jsx": "7.12.1", + "@mdx-js/util": "1.6.22", + "is-alphabetical": "1.0.4", + "remark-parse": "8.0.3", + "unified": "9.2.0" + }, + "dependencies": { + "@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "remark-parse": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz", + "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==", + "dev": true, + "requires": { + "ccount": "^1.0.0", + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^2.0.0", + "vfile-location": "^3.0.0", + "xtend": "^4.0.1" + } + }, + "remark-squeeze-paragraphs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-8qRqmL9F4nuLPIgl92XUuxI3pFxize+F1H0e/W3llTk0UsjJaj01+RrirkMw7P21RKe4X6goQhYRSvNWX+70Rw==", + "dev": true, + "requires": { + "mdast-squeeze-paragraphs": "^4.0.0" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -14726,12 +20519,36 @@ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "dev": true + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -14758,6 +20575,12 @@ "minipass": "^3.1.1" } }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, "standardized-audio-context": { "version": "25.3.20", "resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.20.tgz", @@ -14768,6 +20591,12 @@ "tslib": "^2.3.1" } }, + "state-toggle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", + "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", + "dev": true + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -14847,6 +20676,25 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "style-to-object": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", + "dev": true, + "requires": { + "inline-style-parser": "0.1.1" + } + }, + "stylehacks": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.3.tgz", + "integrity": "sha512-ENcUdpf4yO0E1rubu8rkxI+JGQk4CgjchynZ4bDBJDfqdy+uhTRSWb8/F3Jtu+Bw5MW45Po3/aQGeIyyxgQtxg==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "postcss-selector-parser": "^6.0.4" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -14862,6 +20710,21 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "dev": true, + "requires": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + } + }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -15042,6 +20905,12 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -15097,6 +20966,24 @@ "integrity": "sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==", "dev": true }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", + "dev": true + }, + "trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", + "dev": true + }, + "trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -15176,6 +21063,16 @@ "through": "^2.3.8" } }, + "unherit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", + "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", + "dev": true, + "requires": { + "inherits": "^2.0.0", + "xtend": "^4.0.0" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -15200,6 +21097,20 @@ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==" }, + "unified": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + } + }, "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -15218,6 +21129,78 @@ "imurmurhash": "^0.1.4" } }, + "unist-builder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", + "dev": true + }, + "unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "dev": true + }, + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true + }, + "unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", + "dev": true + }, + "unist-util-remove": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-2.1.0.tgz", + "integrity": "sha512-J8NYPyBm4baYLdCbjmf1bhPu45Cr1MWTm77qd9istEkzWpnN6O9tMsEbB2JhNnBCqGENRqEWomQ+He6au0B27Q==", + "dev": true, + "requires": { + "unist-util-is": "^4.0.0" + } + }, + "unist-util-remove-position": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz", + "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==", + "dev": true, + "requires": { + "unist-util-visit": "^2.0.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, + "unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -15274,12 +21257,24 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "utility-types": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", + "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", + "dev": true + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -15333,6 +21328,34 @@ } } }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, "vm2": { "version": "3.9.5", "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.5.tgz", @@ -15345,6 +21368,18 @@ "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", "dev": true }, + "weak-lru-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", + "dev": true + }, + "web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "dev": true + }, "webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -15487,6 +21522,12 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "xxhash-wasm": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", + "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -15526,6 +21567,12 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true } } } diff --git a/repl/package.json b/repl/package.json index 27414e0f..fa9fcfa2 100644 --- a/repl/package.json +++ b/repl/package.json @@ -1,18 +1,22 @@ { "scripts": { "start": "snowpack dev", - "build": "snowpack build && cp ./public/.nojekyll ../docs", + "build": "snowpack build && cp ./public/.nojekyll ../docs && npm run build-tutorial", "static": "npx serve ../docs", "test": "web-test-runner \"src/**/*.test.tsx\"", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", "lint": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"", - "peggy": "peggy -o krill-parser.js --format es ./krill.pegjs" + "peggy": "peggy -o krill-parser.js --format es ./krill.pegjs", + "tutorial": "parcel src/tutorial/index.html", + "build-tutorial": "parcel build src/tutorial/index.html --dist-dir ../docs/tutorial --public-url /tutorial --no-optimize --no-scope-hoist --no-cache" }, "dependencies": { "@tonaljs/tonal": "^4.6.5", + "chord-voicings": "^0.0.1", "codemirror": "^5.65.1", "estraverse": "^5.3.0", "multimap": "^1.1.0", + "ramda": "^0.28.0", "react": "^17.0.2", "react-codemirror2": "^7.2.1", "react-dom": "^17.0.2", @@ -24,12 +28,15 @@ "webmidi": "^2.5.2" }, "devDependencies": { + "@mdx-js/react": "^1.6.22", + "@parcel/transformer-mdx": "^2.3.1", "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-postcss": "^1.4.3", "@snowpack/plugin-react-refresh": "^2.5.0", "@snowpack/plugin-typescript": "^1.2.1", "@snowpack/web-test-runner-plugin": "^0.2.2", "@tailwindcss/forms": "^0.4.0", + "@tailwindcss/typography": "^0.5.2", "@testing-library/react": "^11.2.6", "@types/chai": "^4.2.17", "@types/mocha": "^8.2.2", @@ -39,6 +46,7 @@ "@web/test-runner": "^0.13.3", "autoprefixer": "^10.4.2", "chai": "^4.3.4", + "parcel": "^2.3.1", "peggy": "^1.2.0", "postcss": "^8.4.6", "prettier": "^2.2.1", diff --git a/repl/snowpack.config.mjs b/repl/snowpack.config.mjs index 9fa4cf7a..96bffd51 100644 --- a/repl/snowpack.config.mjs +++ b/repl/snowpack.config.mjs @@ -21,6 +21,7 @@ export default { /* Enable an SPA Fallback in development: */ // {"match": "routes", "src": ".*", "dest": "/index.html"}, ], + exclude: ['**/node_modules/**/*', '**/tutorial/**/*'], optimize: { /* Example: Bundle your final build: */ // "bundle": true, diff --git a/repl/src/App.tsx b/repl/src/App.tsx index 375e29cd..03b9ad90 100644 --- a/repl/src/App.tsx +++ b/repl/src/App.tsx @@ -1,28 +1,24 @@ -import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'; -import logo from './logo.svg'; -import cx from './cx'; +import React, { useCallback, useLayoutEffect, useRef } from 'react'; import * as Tone from 'tone'; -import useCycle from './useCycle'; -import type { Pattern } from './types'; -import * as tunes from './tunes'; -import * as parser from './parse'; import CodeMirror from './CodeMirror'; -import hot from '../public/hot'; -import { isNote } from 'tone'; +import cx from './cx'; +import { evaluate } from './evaluate'; +import logo from './logo.svg'; import { useWebMidi } from './midi'; +import * as tunes from './tunes'; +import useRepl from './useRepl'; -const { tetris, tetrisRev, shapeShifted } = tunes; -const { parse } = parser; +// TODO: use https://www.npmjs.com/package/@monaco-editor/react -const getHotCode = async () => { - return fetch('/hot.js') - .then((res) => res.text()) - .then((src) => { - return src.split('export default').slice(-1)[0].trim(); - }); -}; +const [_, codeParam] = window.location.href.split('#'); +let decoded; +try { + decoded = atob(decodeURIComponent(codeParam || '')); +} catch (err) { + console.warn('failed to decode', err); +} -const defaultSynth = new Tone.PolySynth().toDestination(); +const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.Destination); defaultSynth.set({ oscillator: { type: 'triangle' }, envelope: { @@ -30,109 +26,44 @@ defaultSynth.set({ }, }); +function getRandomTune() { + const allTunes = Object.values(tunes); + const randomItem = (arr: any[]) => arr[Math.floor(Math.random() * arr.length)]; + return randomItem(allTunes); +} + +const randomTune = getRandomTune(); + function App() { - const [mode, setMode] = useState('javascript'); - const [code, setCode] = useState(shapeShifted); - const [log, setLog] = useState(''); - const logBox = useRef(); - const [error, setError] = useState(); - const [pattern, setPattern] = useState(); - const [activePattern, setActivePattern] = useState(); - const [isHot, setIsHot] = useState(false); // set to true to enable live coding in hot.js, using dev server - const pushLog = (message: string) => setLog((log) => log + `${log ? '\n\n' : ''}${message}`); - // logs events of cycle - const logCycle = (_events: any, cycle: any) => { - if (_events.length) { - pushLog(`# cycle ${cycle}\n` + _events.map((e: any) => e.show()).join('\n')); - } - }; - // cycle hook to control scheduling - const cycle = useCycle({ - onEvent: useCallback((time, event) => { - try { - if (typeof event.value === 'string') { - if (!isNote(event.value)) { - throw new Error('not a note: ' + event.value); - } - defaultSynth.triggerAttackRelease(event.value, event.duration, time); - /* console.warn('no instrument chosen', event); - throw new Error(`no instrument chosen for ${JSON.stringify(event)}`); */ - } else { - const { onTrigger } = event.value; - onTrigger(time, event); - } - } catch (err: any) { - console.warn(err); - err.message = 'unplayable event: ' + err?.message; - pushLog(err.message); // not with setError, because then we would have to setError(undefined) on next playable event - } - }, []), - onQuery: useCallback( - (span) => { - try { - return activePattern?.query(span) || []; - } catch (err: any) { - setError(err); - return []; - } - }, - [activePattern] - ), - onSchedule: useCallback((_events, cycle) => logCycle(_events, cycle), [activePattern]), - ready: !!activePattern, + const { setCode, setPattern, error, code, cycle, dirty, log, togglePlay, activateCode, pattern, pushLog } = useRepl({ + tune: decoded || randomTune, + defaultSynth, }); - - // set active pattern on ctrl+enter - useLayoutEffect(() => { - const handleKeyPress = (e: any) => { - if (e.ctrlKey && e.code === 'Enter') { - setActivePattern(() => pattern); - !cycle.started && cycle.start(); - } - }; - document.addEventListener('keypress', handleKeyPress); - return () => document.removeEventListener('keypress', handleKeyPress); - }, [pattern]); - - // parse pattern when code changes - useEffect(() => { - let _code = code; - // handle hot mode - if (isHot) { - if (typeof hot !== 'string') { - getHotCode().then((_code) => { - setCode(_code); - setMode('javascript'); - }); // if using HMR, just use changed file - setActivePattern(hot); - return; - } else { - _code = hot; - setCode(_code); - } - } - // normal mode - try { - const parsed = parse(_code); - // need arrow function here! otherwise if user returns a function, react will think it's a state reducer - // only first time, then need ctrl+enter - setPattern(() => parsed.pattern); - if (!activePattern || isHot) { - setActivePattern(() => parsed.pattern); - } - setMode(parsed.mode); - setError(undefined); - } catch (err: any) { - console.warn(err); - setError(err); - } - }, [code, isHot]); - + const logBox = useRef(); // scroll log box to bottom when log changes useLayoutEffect(() => { logBox.current.scrollTop = logBox.current?.scrollHeight; }, [log]); + // set active pattern on ctrl+enter + useLayoutEffect(() => { + // TODO: make sure this is only fired when editor has focus + const handleKeyPress = (e: any) => { + if (e.ctrlKey || e.altKey) { + switch (e.code) { + case 'Enter': + activateCode(); + !cycle.started && cycle.start(); + break; + case 'Period': + cycle.stop(); + } + } + }; + document.addEventListener('keypress', handleKeyPress); + return () => document.removeEventListener('keypress', handleKeyPress); + }, [pattern, code]); + useWebMidi({ ready: useCallback(({ outputs }) => { pushLog(`WebMidi ready! Just add .midi(${outputs.map((o) => `"${o.name}"`).join(' | ')}) to the pattern. `); @@ -146,62 +77,58 @@ function App() { }); return ( -
+
logo

Strudel REPL

- {window.location.href.includes('http://localhost:8080') && ( +
- )} + +
-
+
-
+
{ - if (!isHot) { - // setLog((log) => log + `${log ? '\n\n' : ''}✏️ edit\n${code}\n${value}`); - setCode(value); - } - }} + onChange={(_: any, __: any, value: any) => setCode(value)} /> - - {!cycle.started - ? `press ctrl+enter to play\n` - : !isHot && activePattern !== pattern - ? `ctrl+enter to update\n` - : 'no changes\n'} - {!isHot && <>{{ pegjs: 'mini' }[mode] || mode} mode} - {isHot && '🔥 hot mode: go to hot.js to edit pattern, then save'} + + {!cycle.started ? `press ctrl+enter to play\n` : dirty ? `ctrl+enter to update\n` : 'no changes\n'}
- {error &&
{error?.message || 'unknown error'}
} + {error && ( +
{error?.message || 'unknown error'}
+ )}