@viritura/score-engine 0.2.1-next.39 → 0.2.1-next.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +263 -193
- package/dist/index.js.map +2 -2
- package/dist/wasm/viritura_wasm_bg.wasm +0 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2231,9 +2231,9 @@ function interpolateBeatAnchors(bounds, beat, endX) {
|
|
|
2231
2231
|
|
|
2232
2232
|
// packages/score-engine/src/buildInfo.ts
|
|
2233
2233
|
init_define_import_meta_env();
|
|
2234
|
-
var PACKAGE_VERSION = "0.2.1-next.
|
|
2234
|
+
var PACKAGE_VERSION = "0.2.1-next.40", BUNDLE_WORKER_FILE = "score-engine.worker.js";
|
|
2235
2235
|
function buildCommit() {
|
|
2236
|
-
return "
|
|
2236
|
+
return "aa2b59d2a29c0334fa5cf09255eae831c99f366d";
|
|
2237
2237
|
}
|
|
2238
2238
|
function bundledAssetBase() {
|
|
2239
2239
|
let moduleUrl = import.meta.url;
|
|
@@ -9202,7 +9202,7 @@ function validate371(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
9202
9202
|
}
|
|
9203
9203
|
validate371.evaluated = { props: !0, dynamicProps: !1, dynamicItems: !1 };
|
|
9204
9204
|
var measureGlobalExtensions = validate401;
|
|
9205
|
-
var schema378 = { type: "object", description: "Unified tempo marking. BPM and value
|
|
9205
|
+
var schema378 = { type: "object", description: "Unified tempo marking. BPM and value occur together; BPM-free markings carry explicit swing or nonempty cosmetic text.", properties: { bpm: { type: "number", exclusiveMinimum: 0 }, value: { type: "object", required: ["base"], properties: { base: { type: "string", enum: ["duplexMaxima", "maxima", "longa", "breve", "whole", "half", "quarter", "eighth", "16th", "32nd", "64th", "128th", "256th", "512th", "1024th", "2048th", "4096th"] }, dots: { type: "integer", minimum: 0 } }, additionalProperties: !1 }, location: { type: "object", required: ["fraction"], properties: { fraction: { type: "array", prefixItems: [{ type: "integer", minimum: 0, maximum: 9007199254740991 }, { type: "integer", minimum: 1, maximum: 9007199254740991 }], items: !1, minItems: 2, maxItems: 2 } }, additionalProperties: !1 }, swing: { $ref: "#/$defs/swing" }, text: { $ref: "#/$defs/text-content" }, showMetronomeMark: { type: "boolean" }, showText: { type: "boolean" }, manualOffset: { $ref: "#/$defs/sp-delta" }, avoidCollisions: { type: "boolean" } }, oneOf: [{ required: ["bpm", "value"] }, { required: ["swing"], not: { anyOf: [{ required: ["bpm"] }, { required: ["value"] }] } }, { required: ["text"], properties: { text: { minItems: 1 } }, not: { anyOf: [{ required: ["bpm"] }, { required: ["value"] }, { required: ["swing"] }] } }], additionalProperties: !1 }, schema379 = { description: "Explicit rhythm instruction, independent of the metronome beat unit. Omission means inherit; straight explicitly resets swing.", oneOf: [{ type: "object", required: ["mode"], properties: { mode: { const: "straight", type: "string" } }, additionalProperties: !1 }, { type: "object", required: ["mode", "subdivision", "ratio"], properties: { mode: { const: "swing", type: "string" }, subdivision: { type: "string", enum: ["eighth", "16th"] }, ratio: { type: "array", items: { type: "integer", minimum: 1, maximum: 9007199254740991 }, minItems: 2, maxItems: 2, description: "Exact positive long:short ratio, not a percentage or a guessed source value." } }, additionalProperties: !1 }] };
|
|
9206
9206
|
var schema382 = { type: "object", description: "Inline text formatting. Omitted fields inherit the owning text role's style.", properties: { font: { type: "string", enum: ["serif", "sans-serif", "monospace"] }, size: { type: "number", exclusiveMinimum: 0, maximum: 12, description: "Relative size as a multiple of the owning text role's resolved size (the CSS 'em' equivalent), not an absolute point size. Distinct from text-style.size, which counts staff spaces for a whole role." }, weight: { oneOf: [{ type: "string", enum: ["normal", "bold"] }, { type: "number", minimum: 1, maximum: 1e3 }] }, fontStyle: { type: "string", enum: ["normal", "italic", "oblique"] }, decorations: { type: "array", description: "Line decorations applied together. A set rather than a single value, because both MusicXML and Finale treat underline, overline and strikethrough as independent.", items: { type: "string", enum: ["underline", "overline", "strikethrough"] }, uniqueItems: !0, minItems: 1 }, enclosure: { type: "string", enum: ["box", "circle"] }, color: { type: "string", pattern: "^#[0-9a-fA-F]{6}$" } }, additionalProperties: !1 };
|
|
9207
9207
|
function validate404(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
9208
9208
|
let vErrors = null, errors = 0, evaluated0 = validate404.evaluated;
|
|
@@ -9796,297 +9796,364 @@ function validate402(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
9796
9796
|
vErrors === null ? vErrors = [err6] : vErrors.push(err6), errors++;
|
|
9797
9797
|
}
|
|
9798
9798
|
var _valid0 = _errs3 === errors;
|
|
9799
|
-
if (_valid0 && valid0
|
|
9799
|
+
if (_valid0 && valid0)
|
|
9800
|
+
valid0 = !1, passing0 = [passing0, 1];
|
|
9801
|
+
else {
|
|
9802
|
+
_valid0 && (valid0 = !0, passing0 = 1);
|
|
9803
|
+
let _errs9 = errors, _errs10 = errors, _errs11 = errors, _errs12 = errors, valid4 = !1, _errs13 = errors;
|
|
9804
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9805
|
+
let missing2;
|
|
9806
|
+
if (data.bpm === void 0 && (missing2 = "bpm")) {
|
|
9807
|
+
let err7 = {};
|
|
9808
|
+
vErrors === null ? vErrors = [err7] : vErrors.push(err7), errors++;
|
|
9809
|
+
}
|
|
9810
|
+
}
|
|
9811
|
+
var _valid2 = _errs13 === errors;
|
|
9812
|
+
valid4 = valid4 || _valid2;
|
|
9813
|
+
let _errs14 = errors;
|
|
9814
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9815
|
+
let missing3;
|
|
9816
|
+
if (data.value === void 0 && (missing3 = "value")) {
|
|
9817
|
+
let err8 = {};
|
|
9818
|
+
vErrors === null ? vErrors = [err8] : vErrors.push(err8), errors++;
|
|
9819
|
+
}
|
|
9820
|
+
}
|
|
9821
|
+
var _valid2 = _errs14 === errors;
|
|
9822
|
+
valid4 = valid4 || _valid2;
|
|
9823
|
+
let _errs15 = errors;
|
|
9824
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9825
|
+
let missing4;
|
|
9826
|
+
if (data.swing === void 0 && (missing4 = "swing")) {
|
|
9827
|
+
let err9 = {};
|
|
9828
|
+
vErrors === null ? vErrors = [err9] : vErrors.push(err9), errors++;
|
|
9829
|
+
}
|
|
9830
|
+
}
|
|
9831
|
+
var _valid2 = _errs15 === errors;
|
|
9832
|
+
if (valid4 = valid4 || _valid2, valid4)
|
|
9833
|
+
errors = _errs12, vErrors !== null && (_errs12 ? vErrors.length = _errs12 : vErrors = null);
|
|
9834
|
+
else {
|
|
9835
|
+
let err10 = {};
|
|
9836
|
+
vErrors === null ? vErrors = [err10] : vErrors.push(err10), errors++;
|
|
9837
|
+
}
|
|
9838
|
+
var valid3 = _errs11 === errors;
|
|
9839
|
+
if (valid3) {
|
|
9840
|
+
let err11 = { instancePath, schemaPath: "#/oneOf/2/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
9841
|
+
vErrors === null ? vErrors = [err11] : vErrors.push(err11), errors++;
|
|
9842
|
+
} else
|
|
9843
|
+
errors = _errs10, vErrors !== null && (_errs10 ? vErrors.length = _errs10 : vErrors = null);
|
|
9844
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9845
|
+
if (data.text === void 0) {
|
|
9846
|
+
let err12 = { instancePath, schemaPath: "#/oneOf/2/required", keyword: "required", params: { missingProperty: "text" }, message: "must have required property 'text'" };
|
|
9847
|
+
vErrors === null ? vErrors = [err12] : vErrors.push(err12), errors++;
|
|
9848
|
+
}
|
|
9849
|
+
if (data.text !== void 0) {
|
|
9850
|
+
let data0 = data.text;
|
|
9851
|
+
if (Array.isArray(data0) && data0.length < 1) {
|
|
9852
|
+
let err13 = { instancePath: instancePath + "/text", schemaPath: "#/oneOf/2/properties/text/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
9853
|
+
vErrors === null ? vErrors = [err13] : vErrors.push(err13), errors++;
|
|
9854
|
+
}
|
|
9855
|
+
}
|
|
9856
|
+
}
|
|
9857
|
+
var _valid0 = _errs9 === errors;
|
|
9858
|
+
if (_valid0 && valid0)
|
|
9859
|
+
valid0 = !1, passing0 = [passing0, 2];
|
|
9860
|
+
else if (_valid0) {
|
|
9861
|
+
valid0 = !0, passing0 = 2;
|
|
9862
|
+
var props0 = {};
|
|
9863
|
+
props0.text = !0;
|
|
9864
|
+
}
|
|
9865
|
+
}
|
|
9866
|
+
if (valid0)
|
|
9800
9867
|
errors = _errs1, vErrors !== null && (_errs1 ? vErrors.length = _errs1 : vErrors = null);
|
|
9801
9868
|
else {
|
|
9802
|
-
let
|
|
9803
|
-
vErrors === null ? vErrors = [
|
|
9869
|
+
let err14 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
9870
|
+
vErrors === null ? vErrors = [err14] : vErrors.push(err14), errors++;
|
|
9804
9871
|
}
|
|
9805
9872
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9806
9873
|
for (let key0 in data)
|
|
9807
9874
|
if (!func1.call(schema378.properties, key0)) {
|
|
9808
|
-
let
|
|
9809
|
-
vErrors === null ? vErrors = [
|
|
9875
|
+
let err15 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
9876
|
+
vErrors === null ? vErrors = [err15] : vErrors.push(err15), errors++;
|
|
9810
9877
|
}
|
|
9811
9878
|
if (data.bpm !== void 0) {
|
|
9812
|
-
let
|
|
9813
|
-
if (typeof
|
|
9814
|
-
if (
|
|
9815
|
-
let
|
|
9816
|
-
vErrors === null ? vErrors = [
|
|
9879
|
+
let data1 = data.bpm;
|
|
9880
|
+
if (typeof data1 == "number") {
|
|
9881
|
+
if (data1 <= 0 || isNaN(data1)) {
|
|
9882
|
+
let err16 = { instancePath: instancePath + "/bpm", schemaPath: "#/properties/bpm/exclusiveMinimum", keyword: "exclusiveMinimum", params: { comparison: ">", limit: 0 }, message: "must be > 0" };
|
|
9883
|
+
vErrors === null ? vErrors = [err16] : vErrors.push(err16), errors++;
|
|
9817
9884
|
}
|
|
9818
9885
|
} else {
|
|
9819
|
-
let
|
|
9820
|
-
vErrors === null ? vErrors = [
|
|
9886
|
+
let err17 = { instancePath: instancePath + "/bpm", schemaPath: "#/properties/bpm/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
9887
|
+
vErrors === null ? vErrors = [err17] : vErrors.push(err17), errors++;
|
|
9821
9888
|
}
|
|
9822
9889
|
}
|
|
9823
9890
|
if (data.value !== void 0) {
|
|
9824
|
-
let
|
|
9825
|
-
if (
|
|
9826
|
-
if (
|
|
9827
|
-
let
|
|
9828
|
-
vErrors === null ? vErrors = [
|
|
9891
|
+
let data2 = data.value;
|
|
9892
|
+
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
9893
|
+
if (data2.base === void 0) {
|
|
9894
|
+
let err18 = { instancePath: instancePath + "/value", schemaPath: "#/properties/value/required", keyword: "required", params: { missingProperty: "base" }, message: "must have required property 'base'" };
|
|
9895
|
+
vErrors === null ? vErrors = [err18] : vErrors.push(err18), errors++;
|
|
9829
9896
|
}
|
|
9830
|
-
for (let key1 in
|
|
9897
|
+
for (let key1 in data2)
|
|
9831
9898
|
if (!(key1 === "base" || key1 === "dots")) {
|
|
9832
|
-
let
|
|
9833
|
-
vErrors === null ? vErrors = [
|
|
9899
|
+
let err19 = { instancePath: instancePath + "/value", schemaPath: "#/properties/value/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
9900
|
+
vErrors === null ? vErrors = [err19] : vErrors.push(err19), errors++;
|
|
9834
9901
|
}
|
|
9835
|
-
if (
|
|
9836
|
-
let
|
|
9837
|
-
if (typeof
|
|
9838
|
-
let
|
|
9839
|
-
vErrors === null ? vErrors = [
|
|
9902
|
+
if (data2.base !== void 0) {
|
|
9903
|
+
let data3 = data2.base;
|
|
9904
|
+
if (typeof data3 != "string") {
|
|
9905
|
+
let err20 = { instancePath: instancePath + "/value/base", schemaPath: "#/properties/value/properties/base/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9906
|
+
vErrors === null ? vErrors = [err20] : vErrors.push(err20), errors++;
|
|
9840
9907
|
}
|
|
9841
|
-
if (!(
|
|
9842
|
-
let
|
|
9843
|
-
vErrors === null ? vErrors = [
|
|
9908
|
+
if (!(data3 === "duplexMaxima" || data3 === "maxima" || data3 === "longa" || data3 === "breve" || data3 === "whole" || data3 === "half" || data3 === "quarter" || data3 === "eighth" || data3 === "16th" || data3 === "32nd" || data3 === "64th" || data3 === "128th" || data3 === "256th" || data3 === "512th" || data3 === "1024th" || data3 === "2048th" || data3 === "4096th")) {
|
|
9909
|
+
let err21 = { instancePath: instancePath + "/value/base", schemaPath: "#/properties/value/properties/base/enum", keyword: "enum", params: { allowedValues: schema378.properties.value.properties.base.enum }, message: "must be equal to one of the allowed values" };
|
|
9910
|
+
vErrors === null ? vErrors = [err21] : vErrors.push(err21), errors++;
|
|
9844
9911
|
}
|
|
9845
9912
|
}
|
|
9846
|
-
if (
|
|
9847
|
-
let
|
|
9848
|
-
if (!(typeof
|
|
9849
|
-
let
|
|
9850
|
-
vErrors === null ? vErrors = [
|
|
9913
|
+
if (data2.dots !== void 0) {
|
|
9914
|
+
let data4 = data2.dots;
|
|
9915
|
+
if (!(typeof data4 == "number" && !(data4 % 1) && !isNaN(data4))) {
|
|
9916
|
+
let err22 = { instancePath: instancePath + "/value/dots", schemaPath: "#/properties/value/properties/dots/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
9917
|
+
vErrors === null ? vErrors = [err22] : vErrors.push(err22), errors++;
|
|
9851
9918
|
}
|
|
9852
|
-
if (typeof
|
|
9853
|
-
let
|
|
9854
|
-
vErrors === null ? vErrors = [
|
|
9919
|
+
if (typeof data4 == "number" && (data4 < 0 || isNaN(data4))) {
|
|
9920
|
+
let err23 = { instancePath: instancePath + "/value/dots", schemaPath: "#/properties/value/properties/dots/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
9921
|
+
vErrors === null ? vErrors = [err23] : vErrors.push(err23), errors++;
|
|
9855
9922
|
}
|
|
9856
9923
|
}
|
|
9857
9924
|
} else {
|
|
9858
|
-
let
|
|
9859
|
-
vErrors === null ? vErrors = [
|
|
9925
|
+
let err24 = { instancePath: instancePath + "/value", schemaPath: "#/properties/value/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9926
|
+
vErrors === null ? vErrors = [err24] : vErrors.push(err24), errors++;
|
|
9860
9927
|
}
|
|
9861
9928
|
}
|
|
9862
9929
|
if (data.location !== void 0) {
|
|
9863
|
-
let
|
|
9864
|
-
if (
|
|
9865
|
-
if (
|
|
9866
|
-
let
|
|
9867
|
-
vErrors === null ? vErrors = [
|
|
9930
|
+
let data5 = data.location;
|
|
9931
|
+
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
9932
|
+
if (data5.fraction === void 0) {
|
|
9933
|
+
let err25 = { instancePath: instancePath + "/location", schemaPath: "#/properties/location/required", keyword: "required", params: { missingProperty: "fraction" }, message: "must have required property 'fraction'" };
|
|
9934
|
+
vErrors === null ? vErrors = [err25] : vErrors.push(err25), errors++;
|
|
9868
9935
|
}
|
|
9869
|
-
for (let key2 in
|
|
9936
|
+
for (let key2 in data5)
|
|
9870
9937
|
if (key2 !== "fraction") {
|
|
9871
|
-
let
|
|
9872
|
-
vErrors === null ? vErrors = [
|
|
9938
|
+
let err26 = { instancePath: instancePath + "/location", schemaPath: "#/properties/location/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
9939
|
+
vErrors === null ? vErrors = [err26] : vErrors.push(err26), errors++;
|
|
9873
9940
|
}
|
|
9874
|
-
if (
|
|
9875
|
-
let
|
|
9876
|
-
if (Array.isArray(
|
|
9877
|
-
if (
|
|
9878
|
-
let
|
|
9879
|
-
vErrors === null ? vErrors = [
|
|
9941
|
+
if (data5.fraction !== void 0) {
|
|
9942
|
+
let data6 = data5.fraction;
|
|
9943
|
+
if (Array.isArray(data6)) {
|
|
9944
|
+
if (data6.length > 2) {
|
|
9945
|
+
let err27 = { instancePath: instancePath + "/location/fraction", schemaPath: "#/properties/location/properties/fraction/maxItems", keyword: "maxItems", params: { limit: 2 }, message: "must NOT have more than 2 items" };
|
|
9946
|
+
vErrors === null ? vErrors = [err27] : vErrors.push(err27), errors++;
|
|
9880
9947
|
}
|
|
9881
|
-
if (
|
|
9882
|
-
let
|
|
9883
|
-
vErrors === null ? vErrors = [
|
|
9948
|
+
if (data6.length < 2) {
|
|
9949
|
+
let err28 = { instancePath: instancePath + "/location/fraction", schemaPath: "#/properties/location/properties/fraction/minItems", keyword: "minItems", params: { limit: 2 }, message: "must NOT have fewer than 2 items" };
|
|
9950
|
+
vErrors === null ? vErrors = [err28] : vErrors.push(err28), errors++;
|
|
9884
9951
|
}
|
|
9885
|
-
let len0 =
|
|
9952
|
+
let len0 = data6.length;
|
|
9886
9953
|
if (len0 > 0) {
|
|
9887
|
-
let
|
|
9888
|
-
if (!(typeof
|
|
9889
|
-
let
|
|
9890
|
-
vErrors === null ? vErrors = [
|
|
9954
|
+
let data7 = data6[0];
|
|
9955
|
+
if (!(typeof data7 == "number" && !(data7 % 1) && !isNaN(data7))) {
|
|
9956
|
+
let err29 = { instancePath: instancePath + "/location/fraction/0", schemaPath: "#/properties/location/properties/fraction/prefixItems/0/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
9957
|
+
vErrors === null ? vErrors = [err29] : vErrors.push(err29), errors++;
|
|
9891
9958
|
}
|
|
9892
|
-
if (typeof
|
|
9893
|
-
if (
|
|
9894
|
-
let
|
|
9895
|
-
vErrors === null ? vErrors = [
|
|
9959
|
+
if (typeof data7 == "number") {
|
|
9960
|
+
if (data7 > 9007199254740991 || isNaN(data7)) {
|
|
9961
|
+
let err30 = { instancePath: instancePath + "/location/fraction/0", schemaPath: "#/properties/location/properties/fraction/prefixItems/0/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
|
|
9962
|
+
vErrors === null ? vErrors = [err30] : vErrors.push(err30), errors++;
|
|
9896
9963
|
}
|
|
9897
|
-
if (
|
|
9898
|
-
let
|
|
9899
|
-
vErrors === null ? vErrors = [
|
|
9964
|
+
if (data7 < 0 || isNaN(data7)) {
|
|
9965
|
+
let err31 = { instancePath: instancePath + "/location/fraction/0", schemaPath: "#/properties/location/properties/fraction/prefixItems/0/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
9966
|
+
vErrors === null ? vErrors = [err31] : vErrors.push(err31), errors++;
|
|
9900
9967
|
}
|
|
9901
9968
|
}
|
|
9902
9969
|
}
|
|
9903
9970
|
if (len0 > 1) {
|
|
9904
|
-
let
|
|
9905
|
-
if (!(typeof
|
|
9906
|
-
let
|
|
9907
|
-
vErrors === null ? vErrors = [
|
|
9971
|
+
let data8 = data6[1];
|
|
9972
|
+
if (!(typeof data8 == "number" && !(data8 % 1) && !isNaN(data8))) {
|
|
9973
|
+
let err32 = { instancePath: instancePath + "/location/fraction/1", schemaPath: "#/properties/location/properties/fraction/prefixItems/1/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
9974
|
+
vErrors === null ? vErrors = [err32] : vErrors.push(err32), errors++;
|
|
9908
9975
|
}
|
|
9909
|
-
if (typeof
|
|
9910
|
-
if (
|
|
9911
|
-
let
|
|
9912
|
-
vErrors === null ? vErrors = [
|
|
9976
|
+
if (typeof data8 == "number") {
|
|
9977
|
+
if (data8 > 9007199254740991 || isNaN(data8)) {
|
|
9978
|
+
let err33 = { instancePath: instancePath + "/location/fraction/1", schemaPath: "#/properties/location/properties/fraction/prefixItems/1/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
|
|
9979
|
+
vErrors === null ? vErrors = [err33] : vErrors.push(err33), errors++;
|
|
9913
9980
|
}
|
|
9914
|
-
if (
|
|
9915
|
-
let
|
|
9916
|
-
vErrors === null ? vErrors = [
|
|
9981
|
+
if (data8 < 1 || isNaN(data8)) {
|
|
9982
|
+
let err34 = { instancePath: instancePath + "/location/fraction/1", schemaPath: "#/properties/location/properties/fraction/prefixItems/1/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
|
|
9983
|
+
vErrors === null ? vErrors = [err34] : vErrors.push(err34), errors++;
|
|
9917
9984
|
}
|
|
9918
9985
|
}
|
|
9919
9986
|
}
|
|
9920
|
-
if (!(
|
|
9921
|
-
let
|
|
9922
|
-
vErrors === null ? vErrors = [
|
|
9987
|
+
if (!(data6.length <= 2)) {
|
|
9988
|
+
let err35 = { instancePath: instancePath + "/location/fraction", schemaPath: "#/properties/location/properties/fraction/items", keyword: "items", params: { limit: 2 }, message: "must NOT have more than 2 items" };
|
|
9989
|
+
vErrors === null ? vErrors = [err35] : vErrors.push(err35), errors++;
|
|
9923
9990
|
}
|
|
9924
9991
|
} else {
|
|
9925
|
-
let
|
|
9926
|
-
vErrors === null ? vErrors = [
|
|
9992
|
+
let err36 = { instancePath: instancePath + "/location/fraction", schemaPath: "#/properties/location/properties/fraction/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
9993
|
+
vErrors === null ? vErrors = [err36] : vErrors.push(err36), errors++;
|
|
9927
9994
|
}
|
|
9928
9995
|
}
|
|
9929
9996
|
} else {
|
|
9930
|
-
let
|
|
9931
|
-
vErrors === null ? vErrors = [
|
|
9997
|
+
let err37 = { instancePath: instancePath + "/location", schemaPath: "#/properties/location/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9998
|
+
vErrors === null ? vErrors = [err37] : vErrors.push(err37), errors++;
|
|
9932
9999
|
}
|
|
9933
10000
|
}
|
|
9934
10001
|
if (data.swing !== void 0) {
|
|
9935
|
-
let
|
|
9936
|
-
if (
|
|
9937
|
-
if (
|
|
9938
|
-
let
|
|
9939
|
-
vErrors === null ? vErrors = [
|
|
10002
|
+
let data9 = data.swing, _errs38 = errors, valid11 = !1, passing1 = null, _errs39 = errors;
|
|
10003
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
10004
|
+
if (data9.mode === void 0) {
|
|
10005
|
+
let err38 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/0/required", keyword: "required", params: { missingProperty: "mode" }, message: "must have required property 'mode'" };
|
|
10006
|
+
vErrors === null ? vErrors = [err38] : vErrors.push(err38), errors++;
|
|
9940
10007
|
}
|
|
9941
|
-
for (let key3 in
|
|
10008
|
+
for (let key3 in data9)
|
|
9942
10009
|
if (key3 !== "mode") {
|
|
9943
|
-
let
|
|
9944
|
-
vErrors === null ? vErrors = [
|
|
10010
|
+
let err39 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
|
|
10011
|
+
vErrors === null ? vErrors = [err39] : vErrors.push(err39), errors++;
|
|
9945
10012
|
}
|
|
9946
|
-
if (
|
|
9947
|
-
let
|
|
9948
|
-
if (typeof
|
|
9949
|
-
let
|
|
9950
|
-
vErrors === null ? vErrors = [
|
|
10013
|
+
if (data9.mode !== void 0) {
|
|
10014
|
+
let data10 = data9.mode;
|
|
10015
|
+
if (typeof data10 != "string") {
|
|
10016
|
+
let err40 = { instancePath: instancePath + "/swing/mode", schemaPath: "#/$defs/swing/oneOf/0/properties/mode/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10017
|
+
vErrors === null ? vErrors = [err40] : vErrors.push(err40), errors++;
|
|
9951
10018
|
}
|
|
9952
|
-
if (
|
|
9953
|
-
let
|
|
9954
|
-
vErrors === null ? vErrors = [
|
|
10019
|
+
if (data10 !== "straight") {
|
|
10020
|
+
let err41 = { instancePath: instancePath + "/swing/mode", schemaPath: "#/$defs/swing/oneOf/0/properties/mode/const", keyword: "const", params: { allowedValue: "straight" }, message: "must be equal to constant" };
|
|
10021
|
+
vErrors === null ? vErrors = [err41] : vErrors.push(err41), errors++;
|
|
9955
10022
|
}
|
|
9956
10023
|
}
|
|
9957
10024
|
} else {
|
|
9958
|
-
let
|
|
9959
|
-
vErrors === null ? vErrors = [
|
|
10025
|
+
let err42 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10026
|
+
vErrors === null ? vErrors = [err42] : vErrors.push(err42), errors++;
|
|
9960
10027
|
}
|
|
9961
|
-
var
|
|
9962
|
-
if (
|
|
9963
|
-
|
|
9964
|
-
var
|
|
10028
|
+
var _valid3 = _errs39 === errors;
|
|
10029
|
+
if (_valid3) {
|
|
10030
|
+
valid11 = !0, passing1 = 0;
|
|
10031
|
+
var props1 = !0;
|
|
9965
10032
|
}
|
|
9966
|
-
let
|
|
9967
|
-
if (
|
|
9968
|
-
if (
|
|
9969
|
-
let
|
|
9970
|
-
vErrors === null ? vErrors = [
|
|
10033
|
+
let _errs44 = errors;
|
|
10034
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
10035
|
+
if (data9.mode === void 0) {
|
|
10036
|
+
let err43 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/1/required", keyword: "required", params: { missingProperty: "mode" }, message: "must have required property 'mode'" };
|
|
10037
|
+
vErrors === null ? vErrors = [err43] : vErrors.push(err43), errors++;
|
|
9971
10038
|
}
|
|
9972
|
-
if (
|
|
9973
|
-
let
|
|
9974
|
-
vErrors === null ? vErrors = [
|
|
10039
|
+
if (data9.subdivision === void 0) {
|
|
10040
|
+
let err44 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/1/required", keyword: "required", params: { missingProperty: "subdivision" }, message: "must have required property 'subdivision'" };
|
|
10041
|
+
vErrors === null ? vErrors = [err44] : vErrors.push(err44), errors++;
|
|
9975
10042
|
}
|
|
9976
|
-
if (
|
|
9977
|
-
let
|
|
9978
|
-
vErrors === null ? vErrors = [
|
|
10043
|
+
if (data9.ratio === void 0) {
|
|
10044
|
+
let err45 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/1/required", keyword: "required", params: { missingProperty: "ratio" }, message: "must have required property 'ratio'" };
|
|
10045
|
+
vErrors === null ? vErrors = [err45] : vErrors.push(err45), errors++;
|
|
9979
10046
|
}
|
|
9980
|
-
for (let key4 in
|
|
10047
|
+
for (let key4 in data9)
|
|
9981
10048
|
if (!(key4 === "mode" || key4 === "subdivision" || key4 === "ratio")) {
|
|
9982
|
-
let
|
|
9983
|
-
vErrors === null ? vErrors = [
|
|
10049
|
+
let err46 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
|
|
10050
|
+
vErrors === null ? vErrors = [err46] : vErrors.push(err46), errors++;
|
|
9984
10051
|
}
|
|
9985
|
-
if (
|
|
9986
|
-
let
|
|
9987
|
-
if (typeof
|
|
9988
|
-
let
|
|
9989
|
-
vErrors === null ? vErrors = [
|
|
10052
|
+
if (data9.mode !== void 0) {
|
|
10053
|
+
let data11 = data9.mode;
|
|
10054
|
+
if (typeof data11 != "string") {
|
|
10055
|
+
let err47 = { instancePath: instancePath + "/swing/mode", schemaPath: "#/$defs/swing/oneOf/1/properties/mode/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10056
|
+
vErrors === null ? vErrors = [err47] : vErrors.push(err47), errors++;
|
|
9990
10057
|
}
|
|
9991
|
-
if (
|
|
9992
|
-
let
|
|
9993
|
-
vErrors === null ? vErrors = [
|
|
10058
|
+
if (data11 !== "swing") {
|
|
10059
|
+
let err48 = { instancePath: instancePath + "/swing/mode", schemaPath: "#/$defs/swing/oneOf/1/properties/mode/const", keyword: "const", params: { allowedValue: "swing" }, message: "must be equal to constant" };
|
|
10060
|
+
vErrors === null ? vErrors = [err48] : vErrors.push(err48), errors++;
|
|
9994
10061
|
}
|
|
9995
10062
|
}
|
|
9996
|
-
if (
|
|
9997
|
-
let
|
|
9998
|
-
if (typeof
|
|
9999
|
-
let
|
|
10000
|
-
vErrors === null ? vErrors = [
|
|
10063
|
+
if (data9.subdivision !== void 0) {
|
|
10064
|
+
let data12 = data9.subdivision;
|
|
10065
|
+
if (typeof data12 != "string") {
|
|
10066
|
+
let err49 = { instancePath: instancePath + "/swing/subdivision", schemaPath: "#/$defs/swing/oneOf/1/properties/subdivision/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10067
|
+
vErrors === null ? vErrors = [err49] : vErrors.push(err49), errors++;
|
|
10001
10068
|
}
|
|
10002
|
-
if (!(
|
|
10003
|
-
let
|
|
10004
|
-
vErrors === null ? vErrors = [
|
|
10069
|
+
if (!(data12 === "eighth" || data12 === "16th")) {
|
|
10070
|
+
let err50 = { instancePath: instancePath + "/swing/subdivision", schemaPath: "#/$defs/swing/oneOf/1/properties/subdivision/enum", keyword: "enum", params: { allowedValues: schema379.oneOf[1].properties.subdivision.enum }, message: "must be equal to one of the allowed values" };
|
|
10071
|
+
vErrors === null ? vErrors = [err50] : vErrors.push(err50), errors++;
|
|
10005
10072
|
}
|
|
10006
10073
|
}
|
|
10007
|
-
if (
|
|
10008
|
-
let
|
|
10009
|
-
if (Array.isArray(
|
|
10010
|
-
if (
|
|
10011
|
-
let
|
|
10012
|
-
vErrors === null ? vErrors = [
|
|
10074
|
+
if (data9.ratio !== void 0) {
|
|
10075
|
+
let data13 = data9.ratio;
|
|
10076
|
+
if (Array.isArray(data13)) {
|
|
10077
|
+
if (data13.length > 2) {
|
|
10078
|
+
let err51 = { instancePath: instancePath + "/swing/ratio", schemaPath: "#/$defs/swing/oneOf/1/properties/ratio/maxItems", keyword: "maxItems", params: { limit: 2 }, message: "must NOT have more than 2 items" };
|
|
10079
|
+
vErrors === null ? vErrors = [err51] : vErrors.push(err51), errors++;
|
|
10013
10080
|
}
|
|
10014
|
-
if (
|
|
10015
|
-
let
|
|
10016
|
-
vErrors === null ? vErrors = [
|
|
10081
|
+
if (data13.length < 2) {
|
|
10082
|
+
let err52 = { instancePath: instancePath + "/swing/ratio", schemaPath: "#/$defs/swing/oneOf/1/properties/ratio/minItems", keyword: "minItems", params: { limit: 2 }, message: "must NOT have fewer than 2 items" };
|
|
10083
|
+
vErrors === null ? vErrors = [err52] : vErrors.push(err52), errors++;
|
|
10017
10084
|
}
|
|
10018
|
-
let len2 =
|
|
10085
|
+
let len2 = data13.length;
|
|
10019
10086
|
for (let i0 = 0; i0 < len2; i0++) {
|
|
10020
|
-
let
|
|
10021
|
-
if (!(typeof
|
|
10022
|
-
let
|
|
10023
|
-
vErrors === null ? vErrors = [
|
|
10087
|
+
let data14 = data13[i0];
|
|
10088
|
+
if (!(typeof data14 == "number" && !(data14 % 1) && !isNaN(data14))) {
|
|
10089
|
+
let err53 = { instancePath: instancePath + "/swing/ratio/" + i0, schemaPath: "#/$defs/swing/oneOf/1/properties/ratio/items/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
10090
|
+
vErrors === null ? vErrors = [err53] : vErrors.push(err53), errors++;
|
|
10024
10091
|
}
|
|
10025
|
-
if (typeof
|
|
10026
|
-
if (
|
|
10027
|
-
let
|
|
10028
|
-
vErrors === null ? vErrors = [
|
|
10092
|
+
if (typeof data14 == "number") {
|
|
10093
|
+
if (data14 > 9007199254740991 || isNaN(data14)) {
|
|
10094
|
+
let err54 = { instancePath: instancePath + "/swing/ratio/" + i0, schemaPath: "#/$defs/swing/oneOf/1/properties/ratio/items/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
|
|
10095
|
+
vErrors === null ? vErrors = [err54] : vErrors.push(err54), errors++;
|
|
10029
10096
|
}
|
|
10030
|
-
if (
|
|
10031
|
-
let
|
|
10032
|
-
vErrors === null ? vErrors = [
|
|
10097
|
+
if (data14 < 1 || isNaN(data14)) {
|
|
10098
|
+
let err55 = { instancePath: instancePath + "/swing/ratio/" + i0, schemaPath: "#/$defs/swing/oneOf/1/properties/ratio/items/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
|
|
10099
|
+
vErrors === null ? vErrors = [err55] : vErrors.push(err55), errors++;
|
|
10033
10100
|
}
|
|
10034
10101
|
}
|
|
10035
10102
|
}
|
|
10036
10103
|
} else {
|
|
10037
|
-
let
|
|
10038
|
-
vErrors === null ? vErrors = [
|
|
10104
|
+
let err56 = { instancePath: instancePath + "/swing/ratio", schemaPath: "#/$defs/swing/oneOf/1/properties/ratio/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
10105
|
+
vErrors === null ? vErrors = [err56] : vErrors.push(err56), errors++;
|
|
10039
10106
|
}
|
|
10040
10107
|
}
|
|
10041
10108
|
} else {
|
|
10042
|
-
let
|
|
10043
|
-
vErrors === null ? vErrors = [
|
|
10109
|
+
let err57 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10110
|
+
vErrors === null ? vErrors = [err57] : vErrors.push(err57), errors++;
|
|
10044
10111
|
}
|
|
10045
|
-
var
|
|
10046
|
-
if (
|
|
10047
|
-
errors =
|
|
10112
|
+
var _valid3 = _errs44 === errors;
|
|
10113
|
+
if (_valid3 && valid11 ? (valid11 = !1, passing1 = [passing1, 1]) : _valid3 && (valid11 = !0, passing1 = 1, props1 !== !0 && (props1 = !0)), valid11)
|
|
10114
|
+
errors = _errs38, vErrors !== null && (_errs38 ? vErrors.length = _errs38 : vErrors = null);
|
|
10048
10115
|
else {
|
|
10049
|
-
let
|
|
10050
|
-
vErrors === null ? vErrors = [
|
|
10116
|
+
let err58 = { instancePath: instancePath + "/swing", schemaPath: "#/$defs/swing/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
|
|
10117
|
+
vErrors === null ? vErrors = [err58] : vErrors.push(err58), errors++;
|
|
10051
10118
|
}
|
|
10052
10119
|
}
|
|
10053
10120
|
if (data.text !== void 0 && (validate403(data.text, { instancePath: instancePath + "/text", parentData: data, parentDataProperty: "text", rootData, dynamicAnchors }) || (vErrors = vErrors === null ? validate403.errors : vErrors.concat(validate403.errors), errors = vErrors.length)), data.showMetronomeMark !== void 0 && typeof data.showMetronomeMark != "boolean") {
|
|
10054
|
-
let
|
|
10055
|
-
vErrors === null ? vErrors = [
|
|
10121
|
+
let err59 = { instancePath: instancePath + "/showMetronomeMark", schemaPath: "#/properties/showMetronomeMark/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
10122
|
+
vErrors === null ? vErrors = [err59] : vErrors.push(err59), errors++;
|
|
10056
10123
|
}
|
|
10057
10124
|
if (data.showText !== void 0 && typeof data.showText != "boolean") {
|
|
10058
|
-
let
|
|
10059
|
-
vErrors === null ? vErrors = [
|
|
10125
|
+
let err60 = { instancePath: instancePath + "/showText", schemaPath: "#/properties/showText/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
10126
|
+
vErrors === null ? vErrors = [err60] : vErrors.push(err60), errors++;
|
|
10060
10127
|
}
|
|
10061
10128
|
if (data.manualOffset !== void 0) {
|
|
10062
|
-
let
|
|
10063
|
-
if (Array.isArray(
|
|
10064
|
-
if (
|
|
10065
|
-
let
|
|
10066
|
-
vErrors === null ? vErrors = [
|
|
10129
|
+
let data18 = data.manualOffset;
|
|
10130
|
+
if (Array.isArray(data18)) {
|
|
10131
|
+
if (data18.length > 2) {
|
|
10132
|
+
let err61 = { instancePath: instancePath + "/manualOffset", schemaPath: "#/$defs/sp-delta/maxItems", keyword: "maxItems", params: { limit: 2 }, message: "must NOT have more than 2 items" };
|
|
10133
|
+
vErrors === null ? vErrors = [err61] : vErrors.push(err61), errors++;
|
|
10067
10134
|
}
|
|
10068
|
-
if (
|
|
10069
|
-
let
|
|
10070
|
-
vErrors === null ? vErrors = [
|
|
10135
|
+
if (data18.length < 2) {
|
|
10136
|
+
let err62 = { instancePath: instancePath + "/manualOffset", schemaPath: "#/$defs/sp-delta/minItems", keyword: "minItems", params: { limit: 2 }, message: "must NOT have fewer than 2 items" };
|
|
10137
|
+
vErrors === null ? vErrors = [err62] : vErrors.push(err62), errors++;
|
|
10071
10138
|
}
|
|
10072
|
-
let len3 =
|
|
10139
|
+
let len3 = data18.length;
|
|
10073
10140
|
for (let i1 = 0; i1 < len3; i1++)
|
|
10074
|
-
if (typeof
|
|
10075
|
-
let
|
|
10076
|
-
vErrors === null ? vErrors = [
|
|
10141
|
+
if (typeof data18[i1] != "number") {
|
|
10142
|
+
let err63 = { instancePath: instancePath + "/manualOffset/" + i1, schemaPath: "#/$defs/sp-delta/items/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
10143
|
+
vErrors === null ? vErrors = [err63] : vErrors.push(err63), errors++;
|
|
10077
10144
|
}
|
|
10078
10145
|
} else {
|
|
10079
|
-
let
|
|
10080
|
-
vErrors === null ? vErrors = [
|
|
10146
|
+
let err64 = { instancePath: instancePath + "/manualOffset", schemaPath: "#/$defs/sp-delta/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
10147
|
+
vErrors === null ? vErrors = [err64] : vErrors.push(err64), errors++;
|
|
10081
10148
|
}
|
|
10082
10149
|
}
|
|
10083
10150
|
if (data.avoidCollisions !== void 0 && typeof data.avoidCollisions != "boolean") {
|
|
10084
|
-
let
|
|
10085
|
-
vErrors === null ? vErrors = [
|
|
10151
|
+
let err65 = { instancePath: instancePath + "/avoidCollisions", schemaPath: "#/properties/avoidCollisions/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
10152
|
+
vErrors === null ? vErrors = [err65] : vErrors.push(err65), errors++;
|
|
10086
10153
|
}
|
|
10087
10154
|
} else {
|
|
10088
|
-
let
|
|
10089
|
-
vErrors === null ? vErrors = [
|
|
10155
|
+
let err66 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10156
|
+
vErrors === null ? vErrors = [err66] : vErrors.push(err66), errors++;
|
|
10090
10157
|
}
|
|
10091
10158
|
return validate402.errors = vErrors, errors === 0;
|
|
10092
10159
|
}
|
|
@@ -15610,7 +15677,10 @@ function parseVendorTempos(raw, viritura) {
|
|
|
15610
15677
|
value: parseTempoNoteValue(instruction.value),
|
|
15611
15678
|
swing: instruction.swing === void 0 ? void 0 : parseSwing(instruction.swing)
|
|
15612
15679
|
};
|
|
15613
|
-
if (!instruction.swing)
|
|
15680
|
+
if (!instruction.swing) {
|
|
15681
|
+
if (!instruction.text?.length) throw new Error("A BPM-free tempo requires swing or nonempty text.");
|
|
15682
|
+
return { ...presentation, text: instruction.text };
|
|
15683
|
+
}
|
|
15614
15684
|
return { ...presentation, swing: parseSwing(instruction.swing) };
|
|
15615
15685
|
});
|
|
15616
15686
|
}
|