@hyperjump/json-schema 0.22.0 → 0.23.2

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.
@@ -6,7 +6,7 @@
6
6
 
7
7
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
8
 
9
- var justCurryIt = curry$a;
9
+ var justCurryIt$1 = curry$b;
10
10
 
11
11
  /*
12
12
  function add(a, b, c) {
@@ -31,7 +31,7 @@
31
31
  milesToKm(10); // 16.2
32
32
  */
33
33
 
34
- function curry$a(fn, arity) {
34
+ function curry$b(fn, arity) {
35
35
  return function curried() {
36
36
  if (arity == null) {
37
37
  arity = fn.length;
@@ -1902,12 +1902,12 @@
1902
1902
 
1903
1903
  var common$1 = { jsonTypeOf: jsonTypeOf$2, resolveUrl: resolveUrl$3, urlFragment: urlFragment$1, pathRelative: pathRelative$1 };
1904
1904
 
1905
- const curry$9 = justCurryIt;
1905
+ const curry$a = justCurryIt$1;
1906
1906
 
1907
1907
 
1908
1908
  const nil$2 = "";
1909
1909
 
1910
- const compile$P = (pointer) => {
1910
+ const compile$N = (pointer) => {
1911
1911
  if (pointer.length > 0 && pointer[0] !== "/") {
1912
1912
  throw Error("Invalid JSON Pointer");
1913
1913
  }
@@ -1915,8 +1915,8 @@
1915
1915
  return pointer.split("/").slice(1).map(unescape);
1916
1916
  };
1917
1917
 
1918
- const get$1 = (pointer, value = undefined) => {
1919
- const ptr = compile$P(pointer);
1918
+ const get$2 = (pointer, value = undefined) => {
1919
+ const ptr = compile$N(pointer);
1920
1920
 
1921
1921
  const fn = (value) => ptr.reduce(([value, pointer], segment) => {
1922
1922
  return [applySegment(value, segment, pointer), append(segment, pointer)];
@@ -1926,8 +1926,8 @@
1926
1926
  };
1927
1927
 
1928
1928
  const set = (pointer, subject = undefined, value = undefined) => {
1929
- const ptr = compile$P(pointer);
1930
- const fn = curry$9((subject, value) => _set(ptr, subject, value, nil$2));
1929
+ const ptr = compile$N(pointer);
1930
+ const fn = curry$a((subject, value) => _set(ptr, subject, value, nil$2));
1931
1931
  return subject === undefined ? fn : fn(subject, value);
1932
1932
  };
1933
1933
 
@@ -1935,8 +1935,15 @@
1935
1935
  if (pointer.length === 0) {
1936
1936
  return value;
1937
1937
  } else if (pointer.length > 1) {
1938
- const segment = pointer.shift();
1939
- return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1938
+ if (Array.isArray(subject)) {
1939
+ const index = pointer.shift();
1940
+ const clonedSubject = [...subject];
1941
+ clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
1942
+ return clonedSubject;
1943
+ } else {
1944
+ const segment = pointer.shift();
1945
+ return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1946
+ }
1940
1947
  } else if (Array.isArray(subject)) {
1941
1948
  const clonedSubject = [...subject];
1942
1949
  const segment = computeSegment(subject, pointer[0]);
@@ -1950,8 +1957,8 @@
1950
1957
  };
1951
1958
 
1952
1959
  const assign = (pointer, subject = undefined, value = undefined) => {
1953
- const ptr = compile$P(pointer);
1954
- const fn = curry$9((subject, value) => _assign(ptr, subject, value, nil$2));
1960
+ const ptr = compile$N(pointer);
1961
+ const fn = curry$a((subject, value) => _assign(ptr, subject, value, nil$2));
1955
1962
  return subject === undefined ? fn : fn(subject, value);
1956
1963
  };
1957
1964
 
@@ -1968,7 +1975,7 @@
1968
1975
  };
1969
1976
 
1970
1977
  const unset = (pointer, subject = undefined) => {
1971
- const ptr = compile$P(pointer);
1978
+ const ptr = compile$N(pointer);
1972
1979
  const fn = (subject) => _unset(ptr, subject, nil$2);
1973
1980
  return subject === undefined ? fn : fn(subject);
1974
1981
  };
@@ -1992,7 +1999,7 @@
1992
1999
  };
1993
2000
 
1994
2001
  const remove = (pointer, subject = undefined) => {
1995
- const ptr = compile$P(pointer);
2002
+ const ptr = compile$N(pointer);
1996
2003
  const fn = (subject) => _remove(ptr, subject, nil$2);
1997
2004
  return subject === undefined ? fn : fn(subject);
1998
2005
  };
@@ -2013,7 +2020,7 @@
2013
2020
  }
2014
2021
  };
2015
2022
 
2016
- const append = curry$9((segment, pointer) => pointer + "/" + escape(segment));
2023
+ const append = curry$a((segment, pointer) => pointer + "/" + escape(segment));
2017
2024
 
2018
2025
  const escape = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
2019
2026
  const unescape = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
@@ -2034,7 +2041,7 @@
2034
2041
 
2035
2042
  const isScalar = (value) => value === null || typeof value !== "object";
2036
2043
 
2037
- var lib$3 = { nil: nil$2, append, get: get$1, set, assign, unset, remove };
2044
+ var lib$3 = { nil: nil$2, append, get: get$2, set, assign, unset, remove };
2038
2045
 
2039
2046
  const $__value = Symbol("$__value");
2040
2047
  const $__href = Symbol("$__href");
@@ -2051,17 +2058,26 @@
2051
2058
  var reference = { cons: cons$1, isReference, href, value: value$2 };
2052
2059
 
2053
2060
  const JsonPointer$1 = lib$3;
2054
- const curry$8 = justCurryIt;
2061
+ const curry$9 = justCurryIt$1;
2055
2062
  const { resolveUrl: resolveUrl$2, jsonTypeOf: jsonTypeOf$1 } = common$1;
2056
2063
  const Reference$2 = reference;
2057
2064
 
2058
2065
 
2059
2066
  const nil$1 = Object.freeze({ id: "", pointer: "", instance: undefined, value: undefined });
2060
2067
  const cons = (instance, id = "") => Object.freeze({ ...nil$1, id: resolveUrl$2(id, ""), instance, value: instance });
2068
+
2069
+ const get$1 = (url, instance = nil$1) => {
2070
+ if (!url.startsWith("#")) {
2071
+ throw Error(`No JSON document found at '${url.split("#")[0]}'`);
2072
+ }
2073
+
2074
+ return Object.freeze({ ...instance, pointer: url.substr(1) });
2075
+ };
2076
+
2061
2077
  const uri$1 = (doc) => `${doc.id}#${encodeURI(doc.pointer)}`;
2062
2078
  const value$1 = (doc) => Reference$2.isReference(doc.value) ? Reference$2.value(doc.value) : doc.value;
2063
2079
  const has$1 = (key, doc) => key in value$1(doc);
2064
- const typeOf$1 = curry$8((doc, type) => jsonTypeOf$1(value$1(doc), type));
2080
+ const typeOf$1 = curry$9((doc, type) => jsonTypeOf$1(value$1(doc), type));
2065
2081
 
2066
2082
  const step$1 = (key, doc) => Object.freeze({
2067
2083
  ...doc,
@@ -2074,28 +2090,75 @@
2074
2090
 
2075
2091
  const keys$1 = (doc) => Object.keys(value$1(doc));
2076
2092
 
2077
- const map$4 = curry$8((fn, doc) => value$1(doc)
2093
+ const map$4 = curry$9((fn, doc) => value$1(doc)
2078
2094
  .map((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2079
2095
 
2080
- const filter$1 = curry$8((fn, doc) => value$1(doc)
2096
+ const forEach = curry$9((fn, doc) => value$1(doc)
2097
+ .forEach((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2098
+
2099
+ const filter$1 = curry$9((fn, doc) => value$1(doc)
2081
2100
  .map((item, ndx, array, thisArg) => step$1(ndx, doc))
2082
2101
  .filter((item, ndx, array, thisArg) => fn(item, ndx, array, thisArg)));
2083
2102
 
2084
- const reduce$3 = curry$8((fn, acc, doc) => value$1(doc)
2103
+ const reduce$3 = curry$9((fn, acc, doc) => value$1(doc)
2085
2104
  .reduce((acc, item, ndx) => fn(acc, step$1(ndx, doc), ndx), acc));
2086
2105
 
2087
- const every$1 = curry$8((fn, doc) => value$1(doc)
2106
+ const every$1 = curry$9((fn, doc) => value$1(doc)
2088
2107
  .every((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2089
2108
 
2090
- const some$1 = curry$8((fn, doc) => value$1(doc)
2109
+ const some$1 = curry$9((fn, doc) => value$1(doc)
2091
2110
  .some((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2092
2111
 
2093
2112
  const length$1 = (doc) => value$1(doc).length;
2094
2113
 
2095
- var instance = { nil: nil$1, cons, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, step: step$1, entries: entries$3, keys: keys$1, map: map$4, filter: filter$1, reduce: reduce$3, every: every$1, some: some$1, length: length$1 };
2114
+ var instance = {
2115
+ nil: nil$1, cons, get: get$1, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, length: length$1,
2116
+ step: step$1, entries: entries$3, keys: keys$1, map: map$4, forEach, filter: filter$1, reduce: reduce$3, every: every$1, some: some$1
2117
+ };
2096
2118
 
2097
2119
  var entries$2 = async (doc) => Object.entries(await doc);
2098
2120
 
2121
+ var justCurryIt = curry$8;
2122
+
2123
+ /*
2124
+ function add(a, b, c) {
2125
+ return a + b + c;
2126
+ }
2127
+ curry(add)(1)(2)(3); // 6
2128
+ curry(add)(1)(2)(2); // 5
2129
+ curry(add)(2)(4, 3); // 9
2130
+
2131
+ function add(...args) {
2132
+ return args.reduce((sum, n) => sum + n, 0)
2133
+ }
2134
+ var curryAdd4 = curry(add, 4)
2135
+ curryAdd4(1)(2, 3)(4); // 10
2136
+
2137
+ function converter(ratio, input) {
2138
+ return (input*ratio).toFixed(1);
2139
+ }
2140
+ const curriedConverter = curry(converter)
2141
+ const milesToKm = curriedConverter(1.62);
2142
+ milesToKm(35); // 56.7
2143
+ milesToKm(10); // 16.2
2144
+ */
2145
+
2146
+ function curry$8(fn, arity) {
2147
+ return function curried() {
2148
+ if (arity == null) {
2149
+ arity = fn.length;
2150
+ }
2151
+ var args = [].slice.call(arguments);
2152
+ if (args.length >= arity) {
2153
+ return fn.apply(this, args);
2154
+ } else {
2155
+ return function() {
2156
+ return curried.apply(this, args.concat([].slice.call(arguments)));
2157
+ };
2158
+ }
2159
+ };
2160
+ }
2161
+
2099
2162
  const curry$7 = justCurryIt;
2100
2163
 
2101
2164
 
@@ -2409,11 +2472,11 @@
2409
2472
  };
2410
2473
 
2411
2474
  const parse = (response) => {
2412
- const contentType = contentTypeParser.parse(response.headers.get("content-type")).type;
2413
- if (!(contentType in mediaTypePlugins)) {
2414
- throw Error(`${response.url} is not a schema. Found a document with media type: ${contentType}`);
2475
+ const contentType = contentTypeParser.parse(response.headers.get("content-type"));
2476
+ if (!(contentType.type in mediaTypePlugins)) {
2477
+ throw Error(`${response.url} is not a schema. Found a document with media type: ${contentType.type}`);
2415
2478
  }
2416
- return mediaTypePlugins[contentType].parse(response);
2479
+ return mediaTypePlugins[contentType.type].parse(response, contentType.parameters);
2417
2480
  };
2418
2481
 
2419
2482
  const getContentType = (path) => {
@@ -2428,7 +2491,7 @@
2428
2491
 
2429
2492
  var mediaTypes = { addPlugin, parse, getContentType };
2430
2493
 
2431
- const curry$1 = justCurryIt;
2494
+ const curry$1 = justCurryIt$1;
2432
2495
  const Pact$a = lib$2;
2433
2496
  const JsonPointer = lib$3;
2434
2497
  const { jsonTypeOf, resolveUrl: resolveUrl$1, urlFragment, pathRelative } = common$1;
@@ -2445,6 +2508,8 @@
2445
2508
  const dialectJsonSchemaVersion = {};
2446
2509
 
2447
2510
  const setConfig = (jsonSchemaVersion, key, value) => {
2511
+ dialectJsonSchemaVersion[jsonSchemaVersion] = jsonSchemaVersion;
2512
+
2448
2513
  if (!config[jsonSchemaVersion]) {
2449
2514
  config[jsonSchemaVersion] = {};
2450
2515
  }
@@ -2471,23 +2536,25 @@
2471
2536
  }
2472
2537
  delete schema["$schema"];
2473
2538
 
2474
- // JSON Schema version
2539
+ // Determine JSON Schema version
2475
2540
  if (!(dialectId in dialectJsonSchemaVersion)) {
2476
2541
  if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core201909Id)[0]) {
2542
+ // Self describing 2019-09 meta-schema
2477
2543
  dialectJsonSchemaVersion[dialectId] = core201909Id;
2478
2544
  } else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core202012Id)[0]) {
2545
+ // Self describing 2020-12 meta-schema
2479
2546
  dialectJsonSchemaVersion[dialectId] = core202012Id;
2480
- } else if (dialectId === getSchemaIdentifier(schema, externalId, dialectId)[0]) {
2481
- dialectJsonSchemaVersion[dialectId] = dialectId;
2482
- } else if (!(dialectId in schemaStore)) {
2483
- throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
2484
2547
  } else {
2548
+ // Need to look at meta-schema to determine version
2485
2549
  const metaSchema = schemaStore[dialectId];
2486
- if (metaSchema.vocabulary[core201909Id] === true) {
2550
+ if (!metaSchema) {
2551
+ throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
2552
+ } else if (metaSchema.vocabulary[core201909Id] === true) {
2487
2553
  dialectJsonSchemaVersion[dialectId] = core201909Id;
2488
2554
  } else if (metaSchema.vocabulary[core202012Id] === true) {
2489
2555
  dialectJsonSchemaVersion[dialectId] = core202012Id;
2490
2556
  } else {
2557
+ // Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
2491
2558
  dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
2492
2559
  }
2493
2560
  }
@@ -2626,7 +2693,23 @@
2626
2693
  throw Error(`Failed to retrieve schema with id: ${id}`);
2627
2694
  }
2628
2695
 
2629
- add$1(await MediaTypes$1.parse(response), id);
2696
+ const [schema, defaultDialectId] = await MediaTypes$1.parse(response);
2697
+
2698
+ let dialectId;
2699
+ if (schema.$schema) {
2700
+ dialectId = resolveUrl$1(schema.$schema, "");
2701
+ } else if (defaultDialectId) {
2702
+ dialectId = resolveUrl$1(id, defaultDialectId);
2703
+ } else {
2704
+ dialectId = "";
2705
+ }
2706
+
2707
+ // Make sure the meta-schema is loaded if this isn't a known dialect
2708
+ if (dialectId && id !== dialectId && !(dialectId in dialectJsonSchemaVersion)) {
2709
+ await get(dialectId);
2710
+ }
2711
+
2712
+ add$1(schema, id, dialectId);
2630
2713
  }
2631
2714
 
2632
2715
  const storedSchema = getStoredSchema(id);
@@ -2710,21 +2793,16 @@
2710
2793
  const dynamicAnchorToken = getConfig(schemaDoc.dialectId, "dynamicAnchorToken");
2711
2794
  Object.entries(schemaDoc.dynamicAnchors)
2712
2795
  .forEach(([anchor, uri]) => {
2713
- const pointer = urlFragment(uri);
2714
- JsonPointer.assign(pointer, schema, {
2715
- [dynamicAnchorToken]: anchor,
2716
- ...JsonPointer.get(pointer, schema)
2717
- });
2796
+ const pointer = JsonPointer.append(dynamicAnchorToken, urlFragment(uri));
2797
+ JsonPointer.assign(pointer, schema, anchor);
2718
2798
  });
2719
2799
 
2720
2800
  const anchorToken = getConfig(schemaDoc.dialectId, "anchorToken");
2721
2801
  Object.entries(schemaDoc.anchors)
2722
- .filter(([anchor]) => anchor !== "")
2802
+ .filter(([anchor]) => anchor !== "" && !(anchor in schemaDoc.dynamicAnchors))
2723
2803
  .forEach(([anchor, pointer]) => {
2724
- JsonPointer.assign(pointer, schema, {
2725
- [anchorToken]: anchor,
2726
- ...JsonPointer.get(pointer, schema)
2727
- });
2804
+ const anchorPointer = JsonPointer.append(anchorToken, pointer);
2805
+ JsonPointer.assign(anchorPointer, schema, anchor);
2728
2806
  });
2729
2807
 
2730
2808
  const baseToken = getConfig(schemaDoc.dialectId, "baseToken");
@@ -2763,19 +2841,19 @@
2763
2841
 
2764
2842
  var invalidSchemaError = InvalidSchemaError$3;
2765
2843
 
2766
- const Schema$R = schema$5;
2844
+ const Schema$P = schema$5;
2767
2845
 
2768
2846
 
2769
- const compile$O = (schema) => Schema$R.value(schema);
2770
- const interpret$O = () => true;
2847
+ const compile$M = (schema) => Schema$P.value(schema);
2848
+ const interpret$M = () => true;
2771
2849
 
2772
- var metaData$4 = { compile: compile$O, interpret: interpret$O };
2850
+ var metaData$4 = { compile: compile$M, interpret: interpret$M };
2773
2851
 
2774
- const curry = justCurryIt;
2852
+ const curry = justCurryIt$1;
2775
2853
  const PubSub$1 = pubsub.exports;
2776
2854
  const { resolveUrl } = common$1;
2777
- const Instance$E = instance;
2778
- const Schema$Q = schema$5;
2855
+ const Instance$C = instance;
2856
+ const Schema$O = schema$5;
2779
2857
  const InvalidSchemaError$2 = invalidSchemaError;
2780
2858
  const MediaTypes = mediaTypes;
2781
2859
  const metaData$3 = metaData$4;
@@ -2787,24 +2865,27 @@
2787
2865
  let shouldMetaValidate = true;
2788
2866
 
2789
2867
  MediaTypes.addPlugin("application/schema+json", {
2790
- parse: async (response) => await response.json(),
2868
+ parse: async (response, contentTypeParameters) => [
2869
+ await response.json(),
2870
+ contentTypeParameters.schema || contentTypeParameters.profile
2871
+ ],
2791
2872
  matcher: (path) => path.endsWith(".schema.json")
2792
2873
  });
2793
2874
 
2794
2875
  const validate$2 = async (schema, value = undefined, outputFormat = undefined) => {
2795
- const compiled = await compile$N(schema);
2796
- const interpretAst = (value, outputFormat) => interpret$N(compiled, Instance$E.cons(value), outputFormat);
2876
+ const compiled = await compile$L(schema);
2877
+ const interpretAst = (value, outputFormat) => interpret$L(compiled, Instance$C.cons(value), outputFormat);
2797
2878
 
2798
2879
  return value === undefined ? interpretAst : interpretAst(value, outputFormat);
2799
2880
  };
2800
2881
 
2801
- const compile$N = async (schema) => {
2882
+ const compile$L = async (schema) => {
2802
2883
  const ast = { metaData: {} };
2803
2884
  const schemaUri = await compileSchema(schema, ast);
2804
2885
  return { ast, schemaUri };
2805
2886
  };
2806
2887
 
2807
- const interpret$N = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
2888
+ const interpret$L = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
2808
2889
  if (![FLAG, BASIC, DETAILED, VERBOSE].includes(outputFormat)) {
2809
2890
  throw Error(`The '${outputFormat}' error format is not supported`);
2810
2891
  }
@@ -2879,10 +2960,10 @@
2879
2960
 
2880
2961
  // Vocabularies
2881
2962
  if (!hasKeyword(`${schema.dialectId}#validate`)) {
2882
- const metaSchema = await Schema$Q.get(schema.dialectId);
2963
+ const metaSchema = await Schema$O.get(schema.dialectId);
2883
2964
 
2884
2965
  // Check for mandatory vocabularies
2885
- const mandatoryVocabularies = Schema$Q.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
2966
+ const mandatoryVocabularies = Schema$O.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
2886
2967
  mandatoryVocabularies.forEach((vocabularyId) => {
2887
2968
  if (!metaSchema.vocabulary[vocabularyId]) {
2888
2969
  throw Error(`Vocabulary '${vocabularyId}' must be explicitly declared and required`);
@@ -2905,17 +2986,17 @@
2905
2986
 
2906
2987
  // Meta validation
2907
2988
  if (shouldMetaValidate && !schema.validated) {
2908
- Schema$Q.markValidated(schema.id);
2989
+ Schema$O.markValidated(schema.id);
2909
2990
 
2910
2991
  // Compile
2911
2992
  if (!(schema.dialectId in metaValidators)) {
2912
- const metaSchema = await Schema$Q.get(schema.dialectId);
2913
- const compiledSchema = await compile$N(metaSchema);
2914
- metaValidators[metaSchema.id] = interpret$N(compiledSchema);
2993
+ const metaSchema = await Schema$O.get(schema.dialectId);
2994
+ const compiledSchema = await compile$L(metaSchema);
2995
+ metaValidators[metaSchema.id] = interpret$L(compiledSchema);
2915
2996
  }
2916
2997
 
2917
2998
  // Interpret
2918
- const schemaInstance = Instance$E.cons(schema.schema, schema.id);
2999
+ const schemaInstance = Instance$C.cons(schema.schema, schema.id);
2919
3000
  const metaResults = metaValidators[schema.dialectId](schemaInstance, metaOutputFormat);
2920
3001
  if (!metaResults.valid) {
2921
3002
  throw new InvalidSchemaError$2(metaResults);
@@ -2934,7 +3015,7 @@
2934
3015
  };
2935
3016
 
2936
3017
  const followReferences = async (doc) => {
2937
- return Schema$Q.typeOf(doc, "string") ? followReferences(await Schema$Q.get(Schema$Q.value(doc), doc)) : doc;
3018
+ return Schema$O.typeOf(doc, "string") ? followReferences(await Schema$O.get(Schema$O.value(doc), doc)) : doc;
2938
3019
  };
2939
3020
 
2940
3021
  const interpretSchema = (schemaUri, instance, ast, dynamicAnchors) => {
@@ -2962,12 +3043,12 @@
2962
3043
  };
2963
3044
 
2964
3045
  const add = (schema, url = "", defaultSchemaVersion = "") => {
2965
- const id = Schema$Q.add(schema, url, defaultSchemaVersion);
3046
+ const id = Schema$O.add(schema, url, defaultSchemaVersion);
2966
3047
  delete metaValidators[id];
2967
3048
  };
2968
3049
 
2969
3050
  var core$2 = {
2970
- validate: validate$2, compile: compile$N, interpret: interpret$N,
3051
+ validate: validate$2, compile: compile$L, interpret: interpret$L,
2971
3052
  setMetaOutputFormat, setShouldMetaValidate, FLAG, BASIC, DETAILED, VERBOSE,
2972
3053
  add, getKeyword, hasKeyword, defineVocabulary,
2973
3054
  compileSchema, interpretSchema, collectEvaluatedProperties: collectEvaluatedProperties$e, collectEvaluatedItems: collectEvaluatedItems$f,
@@ -2977,30 +3058,30 @@
2977
3058
  const Pact$9 = lib$2;
2978
3059
  const PubSub = pubsub.exports;
2979
3060
  const Core$x = core$2;
2980
- const Instance$D = instance;
2981
- const Schema$P = schema$5;
3061
+ const Instance$B = instance;
3062
+ const Schema$N = schema$5;
2982
3063
 
2983
3064
 
2984
- const compile$M = async (schema, ast) => {
2985
- const url = Schema$P.uri(schema);
3065
+ const compile$K = async (schema, ast) => {
3066
+ const url = Schema$N.uri(schema);
2986
3067
  if (!(url in ast)) {
2987
3068
  ast[url] = false; // Place dummy entry in ast to avoid recursive loops
2988
3069
 
2989
- const schemaValue = Schema$P.value(schema);
3070
+ const schemaValue = Schema$N.value(schema);
2990
3071
  if (!["object", "boolean"].includes(typeof schemaValue)) {
2991
- throw Error(`No schema found at '${Schema$P.uri(schema)}'`);
3072
+ throw Error(`No schema found at '${Schema$N.uri(schema)}'`);
2992
3073
  }
2993
3074
 
2994
3075
  ast[url] = [
2995
3076
  `${schema.dialectId}#validate`,
2996
- Schema$P.uri(schema),
3077
+ Schema$N.uri(schema),
2997
3078
  typeof schemaValue === "boolean" ? schemaValue : await Pact$9.pipeline([
2998
- Schema$P.entries,
3079
+ Schema$N.entries,
2999
3080
  Pact$9.map(([keyword, keywordSchema]) => [`${schema.dialectId}#${keyword}`, keywordSchema]),
3000
3081
  Pact$9.filter(([keywordId]) => keywordId !== `${schema.dialectId}#validate`),
3001
3082
  Pact$9.map(async ([keywordId, keywordSchema]) => {
3002
3083
  const keywordAst = await Core$x.getKeyword(keywordId).compile(keywordSchema, ast, schema);
3003
- return [keywordId, Schema$P.uri(keywordSchema), keywordAst];
3084
+ return [keywordId, Schema$N.uri(keywordSchema), keywordAst];
3004
3085
  }),
3005
3086
  Pact$9.all
3006
3087
  ], schema)
@@ -3010,7 +3091,7 @@
3010
3091
  return url;
3011
3092
  };
3012
3093
 
3013
- const interpret$M = (uri, instance, ast, dynamicAnchors) => {
3094
+ const interpret$K = (uri, instance, ast, dynamicAnchors) => {
3014
3095
  const [keywordId, schemaUrl, nodes] = ast[uri];
3015
3096
 
3016
3097
  PubSub.publishSync("result.start");
@@ -3022,7 +3103,7 @@
3022
3103
  PubSub.publishSync("result", {
3023
3104
  keyword: keywordId,
3024
3105
  absoluteKeywordLocation: schemaUrl,
3025
- instanceLocation: Instance$D.uri(instance),
3106
+ instanceLocation: Instance$B.uri(instance),
3026
3107
  valid: isValid,
3027
3108
  ast: keywordValue
3028
3109
  });
@@ -3033,7 +3114,7 @@
3033
3114
  PubSub.publishSync("result", {
3034
3115
  keyword: keywordId,
3035
3116
  absoluteKeywordLocation: schemaUrl,
3036
- instanceLocation: Instance$D.uri(instance),
3117
+ instanceLocation: Instance$B.uri(instance),
3037
3118
  valid: isValid,
3038
3119
  ast: uri
3039
3120
  });
@@ -3071,7 +3152,7 @@
3071
3152
  }, new Set());
3072
3153
  };
3073
3154
 
3074
- var validate$1 = { compile: compile$M, interpret: interpret$M, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
3155
+ var validate$1 = { compile: compile$K, interpret: interpret$K, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
3075
3156
 
3076
3157
  const metaData$2 = metaData$4;
3077
3158
  const validate = validate$1;
@@ -3080,90 +3161,90 @@
3080
3161
  var keywords$6 = { metaData: metaData$2, validate };
3081
3162
 
3082
3163
  const Core$w = core$2;
3083
- const Schema$O = schema$5;
3084
- const Instance$C = instance;
3164
+ const Schema$M = schema$5;
3165
+ const Instance$A = instance;
3085
3166
  const Reference = reference;
3086
3167
  const Keywords$2 = keywords$6;
3087
3168
  const InvalidSchemaError$1 = invalidSchemaError;
3088
3169
 
3089
3170
 
3090
- var lib$1 = { Core: Core$w, Schema: Schema$O, Instance: Instance$C, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
3171
+ var lib$1 = { Core: Core$w, Schema: Schema$M, Instance: Instance$A, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
3091
3172
 
3092
- const { Core: Core$v, Schema: Schema$N, Instance: Instance$B } = lib$1;
3173
+ const { Core: Core$v, Schema: Schema$L, Instance: Instance$z } = lib$1;
3093
3174
 
3094
3175
 
3095
- const compile$L = async (schema, ast, parentSchema) => {
3096
- const items = await Schema$N.step("items", parentSchema);
3097
- const numberOfItems = Schema$N.typeOf(items, "array") ? Schema$N.length(items) : Number.MAX_SAFE_INTEGER;
3176
+ const compile$J = async (schema, ast, parentSchema) => {
3177
+ const items = await Schema$L.step("items", parentSchema);
3178
+ const numberOfItems = Schema$L.typeOf(items, "array") ? Schema$L.length(items) : Number.MAX_SAFE_INTEGER;
3098
3179
 
3099
- if (Schema$N.typeOf(schema, "boolean")) {
3100
- return [numberOfItems, Schema$N.value(schema)];
3180
+ if (Schema$L.typeOf(schema, "boolean")) {
3181
+ return [numberOfItems, Schema$L.value(schema)];
3101
3182
  } else {
3102
3183
  return [numberOfItems, await Core$v.compileSchema(schema, ast)];
3103
3184
  }
3104
3185
  };
3105
3186
 
3106
- const interpret$L = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3107
- if (!Instance$B.typeOf(instance, "array")) {
3187
+ const interpret$J = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3188
+ if (!Instance$z.typeOf(instance, "array")) {
3108
3189
  return true;
3109
3190
  }
3110
3191
 
3111
3192
  if (typeof additionalItems === "string") {
3112
- return Instance$B.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3193
+ return Instance$z.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3113
3194
  } else {
3114
- return Instance$B.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
3195
+ return Instance$z.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
3115
3196
  }
3116
3197
  };
3117
3198
 
3118
- var additionalItems = { compile: compile$L, interpret: interpret$L };
3199
+ var additionalItems = { compile: compile$J, interpret: interpret$J };
3119
3200
 
3120
- const { Core: Core$u, Schema: Schema$M, Instance: Instance$A } = lib$1;
3201
+ const { Core: Core$u, Schema: Schema$K, Instance: Instance$y } = lib$1;
3121
3202
 
3122
3203
 
3123
- const compile$K = async (schema, ast, parentSchema) => {
3124
- const items = await Schema$M.step("items", parentSchema);
3125
- const numberOfItems = Schema$M.typeOf(items, "array") ? Schema$M.length(items) : Number.MAX_SAFE_INTEGER;
3204
+ const compile$I = async (schema, ast, parentSchema) => {
3205
+ const items = await Schema$K.step("items", parentSchema);
3206
+ const numberOfItems = Schema$K.typeOf(items, "array") ? Schema$K.length(items) : Number.MAX_SAFE_INTEGER;
3126
3207
 
3127
3208
  return [numberOfItems, await Core$u.compileSchema(schema, ast)];
3128
3209
  };
3129
3210
 
3130
- const interpret$K = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3131
- if (!Instance$A.typeOf(instance, "array")) {
3211
+ const interpret$I = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3212
+ if (!Instance$y.typeOf(instance, "array")) {
3132
3213
  return true;
3133
3214
  }
3134
3215
 
3135
- return Instance$A.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3216
+ return Instance$y.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3136
3217
  };
3137
3218
 
3138
3219
  const collectEvaluatedItems$d = (keywordValue, instance, ast, dynamicAnchors) => {
3139
- return interpret$K(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$A.map((item, ndx) => ndx, instance));
3220
+ return interpret$I(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$y.map((item, ndx) => ndx, instance));
3140
3221
  };
3141
3222
 
3142
- var additionalItems6 = { compile: compile$K, interpret: interpret$K, collectEvaluatedItems: collectEvaluatedItems$d };
3223
+ var additionalItems6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedItems: collectEvaluatedItems$d };
3143
3224
 
3144
- const { Core: Core$t, Schema: Schema$L, Instance: Instance$z } = lib$1;
3225
+ const { Core: Core$t, Schema: Schema$J, Instance: Instance$x } = lib$1;
3145
3226
 
3146
3227
 
3147
- const compile$J = async (schema, ast, parentSchema) => {
3148
- const properties = await Schema$L.step("properties", parentSchema);
3149
- const propertyNames = Schema$L.typeOf(properties, "object") ? Schema$L.keys(properties) : [];
3228
+ const compile$H = async (schema, ast, parentSchema) => {
3229
+ const properties = await Schema$J.step("properties", parentSchema);
3230
+ const propertyNames = Schema$J.typeOf(properties, "object") ? Schema$J.keys(properties) : [];
3150
3231
 
3151
- const patternProperties = await Schema$L.step("patternProperties", parentSchema);
3152
- const propertyNamePatterns = Schema$L.typeOf(patternProperties, "object") ? Schema$L.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3232
+ const patternProperties = await Schema$J.step("patternProperties", parentSchema);
3233
+ const propertyNamePatterns = Schema$J.typeOf(patternProperties, "object") ? Schema$J.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3153
3234
 
3154
- if (Schema$L.typeOf(schema, "boolean")) {
3155
- return [propertyNames, propertyNamePatterns, Schema$L.value(schema)];
3235
+ if (Schema$J.typeOf(schema, "boolean")) {
3236
+ return [propertyNames, propertyNamePatterns, Schema$J.value(schema)];
3156
3237
  } else {
3157
3238
  return [propertyNames, propertyNamePatterns, await Core$t.compileSchema(schema, ast)];
3158
3239
  }
3159
3240
  };
3160
3241
 
3161
- const interpret$J = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3162
- if (!Instance$z.typeOf(instance, "object")) {
3242
+ const interpret$H = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3243
+ if (!Instance$x.typeOf(instance, "object")) {
3163
3244
  return true;
3164
3245
  }
3165
3246
 
3166
- const properties = Instance$z.entries(instance)
3247
+ const properties = Instance$x.entries(instance)
3167
3248
  .filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)));
3168
3249
 
3169
3250
  if (typeof additionalProperties === "string") {
@@ -3173,47 +3254,47 @@
3173
3254
  }
3174
3255
  };
3175
3256
 
3176
- var additionalProperties = { compile: compile$J, interpret: interpret$J };
3257
+ var additionalProperties = { compile: compile$H, interpret: interpret$H };
3177
3258
 
3178
- const { Core: Core$s, Schema: Schema$K, Instance: Instance$y } = lib$1;
3259
+ const { Core: Core$s, Schema: Schema$I, Instance: Instance$w } = lib$1;
3179
3260
 
3180
3261
 
3181
- const compile$I = async (schema, ast, parentSchema) => {
3182
- const propertiesSchema = await Schema$K.step("properties", parentSchema);
3183
- const propertyNames = Schema$K.typeOf(propertiesSchema, "object") ? Schema$K.keys(propertiesSchema) : [];
3262
+ const compile$G = async (schema, ast, parentSchema) => {
3263
+ const propertiesSchema = await Schema$I.step("properties", parentSchema);
3264
+ const propertyNames = Schema$I.typeOf(propertiesSchema, "object") ? Schema$I.keys(propertiesSchema) : [];
3184
3265
 
3185
- const patternProperties = await Schema$K.step("patternProperties", parentSchema);
3186
- const propertyNamePatterns = Schema$K.typeOf(patternProperties, "object") ? Schema$K.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3266
+ const patternProperties = await Schema$I.step("patternProperties", parentSchema);
3267
+ const propertyNamePatterns = Schema$I.typeOf(patternProperties, "object") ? Schema$I.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3187
3268
 
3188
3269
  return [propertyNames, propertyNamePatterns, await Core$s.compileSchema(schema, ast)];
3189
3270
  };
3190
3271
 
3191
- const interpret$I = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3192
- if (!Instance$y.typeOf(instance, "object")) {
3272
+ const interpret$G = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3273
+ if (!Instance$w.typeOf(instance, "object")) {
3193
3274
  return true;
3194
3275
  }
3195
3276
 
3196
- return Instance$y.entries(instance)
3277
+ return Instance$w.entries(instance)
3197
3278
  .filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)))
3198
3279
  .every(([, property]) => Core$s.interpretSchema(additionalProperties, property, ast, dynamicAnchors));
3199
3280
  };
3200
3281
 
3201
3282
  const collectEvaluatedProperties$c = (keywordValue, instance, ast, dynamicAnchors) => {
3202
- return interpret$I(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
3283
+ return interpret$G(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
3203
3284
  };
3204
3285
 
3205
- var additionalProperties6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedProperties: collectEvaluatedProperties$c };
3286
+ var additionalProperties6 = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$c };
3206
3287
 
3207
- const { Core: Core$r, Schema: Schema$J } = lib$1;
3288
+ const { Core: Core$r, Schema: Schema$H } = lib$1;
3208
3289
  const Pact$8 = lib$2;
3209
3290
 
3210
3291
 
3211
- const compile$H = (schema, ast) => Pact$8.pipeline([
3212
- Schema$J.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
3292
+ const compile$F = (schema, ast) => Pact$8.pipeline([
3293
+ Schema$H.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
3213
3294
  Pact$8.all
3214
3295
  ], schema);
3215
3296
 
3216
- const interpret$H = (allOf, instance, ast, dynamicAnchors) => {
3297
+ const interpret$F = (allOf, instance, ast, dynamicAnchors) => {
3217
3298
  return allOf.every((schemaUrl) => Core$r.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
3218
3299
  };
3219
3300
 
@@ -3231,18 +3312,18 @@
3231
3312
  }, new Set());
3232
3313
  };
3233
3314
 
3234
- var allOf = { compile: compile$H, interpret: interpret$H, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
3315
+ var allOf = { compile: compile$F, interpret: interpret$F, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
3235
3316
 
3236
- const { Core: Core$q, Schema: Schema$I } = lib$1;
3317
+ const { Core: Core$q, Schema: Schema$G } = lib$1;
3237
3318
  const Pact$7 = lib$2;
3238
3319
 
3239
3320
 
3240
- const compile$G = (schema, ast) => Pact$7.pipeline([
3241
- Schema$I.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
3321
+ const compile$E = (schema, ast) => Pact$7.pipeline([
3322
+ Schema$G.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
3242
3323
  Pact$7.all
3243
3324
  ], schema);
3244
3325
 
3245
- const interpret$G = (anyOf, instance, ast, dynamicAnchors) => {
3326
+ const interpret$E = (anyOf, instance, ast, dynamicAnchors) => {
3246
3327
  const matches = anyOf.filter((schemaUrl) => Core$q.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
3247
3328
  return matches.length > 0;
3248
3329
  };
@@ -3261,7 +3342,7 @@
3261
3342
  }, false);
3262
3343
  };
3263
3344
 
3264
- var anyOf = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
3345
+ var anyOf = { compile: compile$E, interpret: interpret$E, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
3265
3346
 
3266
3347
  var keyList = Object.keys;
3267
3348
  var native_stringify = JSON.stringify;
@@ -3322,92 +3403,92 @@
3322
3403
 
3323
3404
  var fastestStableStringify = function(obj) { return '' + stringify(obj, false); };
3324
3405
 
3325
- const { Schema: Schema$H, Instance: Instance$x } = lib$1;
3406
+ const { Schema: Schema$F, Instance: Instance$v } = lib$1;
3326
3407
  const jsonStringify$2 = fastestStableStringify;
3327
3408
 
3328
3409
 
3329
- const compile$F = (schema) => jsonStringify$2(Schema$H.value(schema));
3330
- const interpret$F = (const_, instance) => jsonStringify$2(Instance$x.value(instance)) === const_;
3410
+ const compile$D = (schema) => jsonStringify$2(Schema$F.value(schema));
3411
+ const interpret$D = (const_, instance) => jsonStringify$2(Instance$v.value(instance)) === const_;
3331
3412
 
3332
- var _const = { compile: compile$F, interpret: interpret$F };
3413
+ var _const = { compile: compile$D, interpret: interpret$D };
3333
3414
 
3334
- const { Core: Core$p, Instance: Instance$w } = lib$1;
3415
+ const { Core: Core$p, Instance: Instance$u } = lib$1;
3335
3416
 
3336
3417
 
3337
- const compile$E = (schema, ast) => Core$p.compileSchema(schema, ast);
3418
+ const compile$C = (schema, ast) => Core$p.compileSchema(schema, ast);
3338
3419
 
3339
- const interpret$E = (contains, instance, ast, dynamicAnchors) => {
3340
- return !Instance$w.typeOf(instance, "array") || Instance$w.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
3420
+ const interpret$C = (contains, instance, ast, dynamicAnchors) => {
3421
+ return !Instance$u.typeOf(instance, "array") || Instance$u.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
3341
3422
  };
3342
3423
 
3343
- var contains = { compile: compile$E, interpret: interpret$E };
3424
+ var contains = { compile: compile$C, interpret: interpret$C };
3344
3425
 
3345
- const { Core: Core$o, Schema: Schema$G, Instance: Instance$v } = lib$1;
3426
+ const { Core: Core$o, Schema: Schema$E, Instance: Instance$t } = lib$1;
3346
3427
 
3347
3428
 
3348
- const compile$D = async (schema, ast, parentSchema) => {
3429
+ const compile$B = async (schema, ast, parentSchema) => {
3349
3430
  const contains = await Core$o.compileSchema(schema, ast);
3350
3431
 
3351
- const minContainsSchema = await Schema$G.step("minContains", parentSchema);
3352
- const minContains = Schema$G.typeOf(minContainsSchema, "number") ? Schema$G.value(minContainsSchema) : 1;
3432
+ const minContainsSchema = await Schema$E.step("minContains", parentSchema);
3433
+ const minContains = Schema$E.typeOf(minContainsSchema, "number") ? Schema$E.value(minContainsSchema) : 1;
3353
3434
 
3354
- const maxContainsSchema = await Schema$G.step("maxContains", parentSchema);
3355
- const maxContains = Schema$G.typeOf(maxContainsSchema, "number") ? Schema$G.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
3435
+ const maxContainsSchema = await Schema$E.step("maxContains", parentSchema);
3436
+ const maxContains = Schema$E.typeOf(maxContainsSchema, "number") ? Schema$E.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
3356
3437
 
3357
3438
  return { contains, minContains, maxContains };
3358
3439
  };
3359
3440
 
3360
- const interpret$D = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
3361
- if (!Instance$v.typeOf(instance, "array")) {
3441
+ const interpret$B = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
3442
+ if (!Instance$t.typeOf(instance, "array")) {
3362
3443
  return true;
3363
3444
  }
3364
3445
 
3365
- const matches = Instance$v.reduce((matches, item) => {
3446
+ const matches = Instance$t.reduce((matches, item) => {
3366
3447
  return Core$o.interpretSchema(contains, item, ast, dynamicAnchors) ? matches + 1 : matches;
3367
3448
  }, 0, instance);
3368
3449
  return matches >= minContains && matches <= maxContains;
3369
3450
  };
3370
3451
 
3371
3452
  const collectEvaluatedItems$a = (keywordValue, instance, ast, dynamicAnchors) => {
3372
- return interpret$D(keywordValue, instance, ast, dynamicAnchors) && Instance$v.reduce((matchedIndexes, item, itemIndex) => {
3453
+ return interpret$B(keywordValue, instance, ast, dynamicAnchors) && Instance$t.reduce((matchedIndexes, item, itemIndex) => {
3373
3454
  return Core$o.interpretSchema(keywordValue.contains, item, ast, dynamicAnchors) ? matchedIndexes.add(itemIndex) : matchedIndexes;
3374
3455
  }, new Set(), instance);
3375
3456
  };
3376
3457
 
3377
- var containsMinContainsMaxContains = { compile: compile$D, interpret: interpret$D, collectEvaluatedItems: collectEvaluatedItems$a };
3458
+ var containsMinContainsMaxContains = { compile: compile$B, interpret: interpret$B, collectEvaluatedItems: collectEvaluatedItems$a };
3378
3459
 
3379
- const { Core: Core$n, Schema: Schema$F } = lib$1;
3460
+ const { Core: Core$n, Schema: Schema$D } = lib$1;
3380
3461
  const Pact$6 = lib$2;
3381
3462
 
3382
3463
 
3383
- const compile$C = async (schema, ast) => {
3464
+ const compile$A = async (schema, ast) => {
3384
3465
  await Pact$6.pipeline([
3385
- Schema$F.entries,
3466
+ Schema$D.entries,
3386
3467
  Pact$6.map(([, definitionSchema]) => Core$n.compileSchema(definitionSchema, ast)),
3387
3468
  Pact$6.all
3388
3469
  ], schema);
3389
3470
  };
3390
3471
 
3391
- const interpret$C = () => true;
3472
+ const interpret$A = () => true;
3392
3473
 
3393
- var definitions = { compile: compile$C, interpret: interpret$C };
3474
+ var definitions = { compile: compile$A, interpret: interpret$A };
3394
3475
 
3395
- const { Core: Core$m, Schema: Schema$E, Instance: Instance$u } = lib$1;
3476
+ const { Core: Core$m, Schema: Schema$C, Instance: Instance$s } = lib$1;
3396
3477
  const Pact$5 = lib$2;
3397
3478
 
3398
3479
 
3399
- const compile$B = (schema, ast) => Pact$5.pipeline([
3400
- Schema$E.entries,
3480
+ const compile$z = (schema, ast) => Pact$5.pipeline([
3481
+ Schema$C.entries,
3401
3482
  Pact$5.map(async ([key, dependency]) => {
3402
- return [key, Schema$E.typeOf(dependency, "array") ? Schema$E.value(dependency) : await Core$m.compileSchema(dependency, ast)];
3483
+ return [key, Schema$C.typeOf(dependency, "array") ? Schema$C.value(dependency) : await Core$m.compileSchema(dependency, ast)];
3403
3484
  }),
3404
3485
  Pact$5.all
3405
3486
  ], schema);
3406
3487
 
3407
- const interpret$B = (dependencies, instance, ast, dynamicAnchors) => {
3408
- const value = Instance$u.value(instance);
3488
+ const interpret$z = (dependencies, instance, ast, dynamicAnchors) => {
3489
+ const value = Instance$s.value(instance);
3409
3490
 
3410
- return !Instance$u.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
3491
+ return !Instance$s.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
3411
3492
  if (!(propertyName in value)) {
3412
3493
  return true;
3413
3494
  }
@@ -3420,49 +3501,49 @@
3420
3501
  });
3421
3502
  };
3422
3503
 
3423
- var dependencies = { compile: compile$B, interpret: interpret$B };
3504
+ var dependencies = { compile: compile$z, interpret: interpret$z };
3424
3505
 
3425
- const { Schema: Schema$D, Instance: Instance$t } = lib$1;
3506
+ const { Schema: Schema$B, Instance: Instance$r } = lib$1;
3426
3507
  const Pact$4 = lib$2;
3427
3508
 
3428
3509
 
3429
- const compile$A = (schema) => Pact$4.pipeline([
3430
- Schema$D.entries,
3431
- Pact$4.map(([key, dependentRequired]) => [key, Schema$D.value(dependentRequired)]),
3510
+ const compile$y = (schema) => Pact$4.pipeline([
3511
+ Schema$B.entries,
3512
+ Pact$4.map(([key, dependentRequired]) => [key, Schema$B.value(dependentRequired)]),
3432
3513
  Pact$4.all
3433
3514
  ], schema);
3434
3515
 
3435
- const interpret$A = (dependentRequired, instance) => {
3436
- const value = Instance$t.value(instance);
3516
+ const interpret$y = (dependentRequired, instance) => {
3517
+ const value = Instance$r.value(instance);
3437
3518
 
3438
- return !Instance$t.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
3519
+ return !Instance$r.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
3439
3520
  return !(propertyName in value) || required.every((key) => key in value);
3440
3521
  });
3441
3522
  };
3442
3523
 
3443
- var dependentRequired = { compile: compile$A, interpret: interpret$A };
3524
+ var dependentRequired = { compile: compile$y, interpret: interpret$y };
3444
3525
 
3445
- const { Core: Core$l, Schema: Schema$C, Instance: Instance$s } = lib$1;
3526
+ const { Core: Core$l, Schema: Schema$A, Instance: Instance$q } = lib$1;
3446
3527
  const Pact$3 = lib$2;
3447
3528
 
3448
3529
 
3449
- const compile$z = (schema, ast) => Pact$3.pipeline([
3450
- Schema$C.entries,
3530
+ const compile$x = (schema, ast) => Pact$3.pipeline([
3531
+ Schema$A.entries,
3451
3532
  Pact$3.map(async ([key, dependentSchema]) => [key, await Core$l.compileSchema(dependentSchema, ast)]),
3452
3533
  Pact$3.all
3453
3534
  ], schema);
3454
3535
 
3455
- const interpret$z = (dependentSchemas, instance, ast, dynamicAnchors) => {
3456
- const value = Instance$s.value(instance);
3536
+ const interpret$x = (dependentSchemas, instance, ast, dynamicAnchors) => {
3537
+ const value = Instance$q.value(instance);
3457
3538
 
3458
- return !Instance$s.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
3539
+ return !Instance$q.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
3459
3540
  return !(propertyName in value) || Core$l.interpretSchema(dependentSchema, instance, ast, dynamicAnchors);
3460
3541
  });
3461
3542
  };
3462
3543
 
3463
3544
  const collectEvaluatedProperties$9 = (dependentSchemas, instance, ast, dynamicAnchors) => {
3464
3545
  return dependentSchemas.reduce((acc, [propertyName, dependentSchema]) => {
3465
- if (!acc || !Instance$s.has(propertyName, instance)) {
3546
+ if (!acc || !Instance$q.has(propertyName, instance)) {
3466
3547
  return acc;
3467
3548
  }
3468
3549
 
@@ -3471,39 +3552,39 @@
3471
3552
  }, []);
3472
3553
  };
3473
3554
 
3474
- var dependentSchemas = { compile: compile$z, interpret: interpret$z, collectEvaluatedProperties: collectEvaluatedProperties$9 };
3555
+ var dependentSchemas = { compile: compile$x, interpret: interpret$x, collectEvaluatedProperties: collectEvaluatedProperties$9 };
3475
3556
 
3476
- const { Schema: Schema$B, Instance: Instance$r } = lib$1;
3557
+ const { Schema: Schema$z, Instance: Instance$p } = lib$1;
3477
3558
  const jsonStringify$1 = fastestStableStringify;
3478
3559
 
3479
3560
 
3480
- const compile$y = (schema) => Schema$B.value(schema).map(jsonStringify$1);
3481
- const interpret$y = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$r.value(instance)) === enumValue);
3561
+ const compile$w = (schema) => Schema$z.value(schema).map(jsonStringify$1);
3562
+ const interpret$w = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$p.value(instance)) === enumValue);
3482
3563
 
3483
- var _enum = { compile: compile$y, interpret: interpret$y };
3564
+ var _enum = { compile: compile$w, interpret: interpret$w };
3484
3565
 
3485
- const { Schema: Schema$A, Instance: Instance$q } = lib$1;
3566
+ const { Schema: Schema$y, Instance: Instance$o } = lib$1;
3486
3567
 
3487
3568
 
3488
- const compile$x = async (schema) => Schema$A.value(schema);
3489
- const interpret$x = (exclusiveMaximum, instance) => !Instance$q.typeOf(instance, "number") || Instance$q.value(instance) < exclusiveMaximum;
3569
+ const compile$v = async (schema) => Schema$y.value(schema);
3570
+ const interpret$v = (exclusiveMaximum, instance) => !Instance$o.typeOf(instance, "number") || Instance$o.value(instance) < exclusiveMaximum;
3490
3571
 
3491
- var exclusiveMaximum = { compile: compile$x, interpret: interpret$x };
3572
+ var exclusiveMaximum = { compile: compile$v, interpret: interpret$v };
3492
3573
 
3493
- const { Schema: Schema$z, Instance: Instance$p } = lib$1;
3574
+ const { Schema: Schema$x, Instance: Instance$n } = lib$1;
3494
3575
 
3495
3576
 
3496
- const compile$w = async (schema) => Schema$z.value(schema);
3497
- const interpret$w = (exclusiveMinimum, instance) => !Instance$p.typeOf(instance, "number") || Instance$p.value(instance) > exclusiveMinimum;
3577
+ const compile$u = async (schema) => Schema$x.value(schema);
3578
+ const interpret$u = (exclusiveMinimum, instance) => !Instance$n.typeOf(instance, "number") || Instance$n.value(instance) > exclusiveMinimum;
3498
3579
 
3499
- var exclusiveMinimum = { compile: compile$w, interpret: interpret$w };
3580
+ var exclusiveMinimum = { compile: compile$u, interpret: interpret$u };
3500
3581
 
3501
3582
  const { Core: Core$k } = lib$1;
3502
3583
 
3503
3584
 
3504
- const compile$v = (schema, ast) => Core$k.compileSchema(schema, ast);
3585
+ const compile$t = (schema, ast) => Core$k.compileSchema(schema, ast);
3505
3586
 
3506
- const interpret$v = (ifSchema, instance, ast, dynamicAnchors) => {
3587
+ const interpret$t = (ifSchema, instance, ast, dynamicAnchors) => {
3507
3588
  Core$k.interpretSchema(ifSchema, instance, ast, dynamicAnchors);
3508
3589
  return true;
3509
3590
  };
@@ -3516,21 +3597,21 @@
3516
3597
  return Core$k.collectEvaluatedItems(ifSchema, instance, ast, dynamicAnchors) || new Set();
3517
3598
  };
3518
3599
 
3519
- var _if = { compile: compile$v, interpret: interpret$v, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
3600
+ var _if = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
3520
3601
 
3521
- const { Core: Core$j, Schema: Schema$y } = lib$1;
3602
+ const { Core: Core$j, Schema: Schema$w } = lib$1;
3522
3603
 
3523
3604
 
3524
- const compile$u = async (schema, ast, parentSchema) => {
3525
- if (Schema$y.has("if", parentSchema)) {
3526
- const ifSchema = await Schema$y.step("if", parentSchema);
3605
+ const compile$s = async (schema, ast, parentSchema) => {
3606
+ if (Schema$w.has("if", parentSchema)) {
3607
+ const ifSchema = await Schema$w.step("if", parentSchema);
3527
3608
  return [await Core$j.compileSchema(ifSchema, ast), await Core$j.compileSchema(schema, ast)];
3528
3609
  } else {
3529
3610
  return [];
3530
3611
  }
3531
3612
  };
3532
3613
 
3533
- const interpret$u = ([guard, block], instance, ast, dynamicAnchors) => {
3614
+ const interpret$s = ([guard, block], instance, ast, dynamicAnchors) => {
3534
3615
  return guard === undefined || !quietInterpretSchema$1(guard, instance, ast, dynamicAnchors) || Core$j.interpretSchema(block, instance, ast, dynamicAnchors);
3535
3616
  };
3536
3617
 
@@ -3560,21 +3641,21 @@
3560
3641
  return Core$j.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
3561
3642
  };
3562
3643
 
3563
- var then = { compile: compile$u, interpret: interpret$u, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
3644
+ var then = { compile: compile$s, interpret: interpret$s, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
3564
3645
 
3565
- const { Core: Core$i, Schema: Schema$x } = lib$1;
3646
+ const { Core: Core$i, Schema: Schema$v } = lib$1;
3566
3647
 
3567
3648
 
3568
- const compile$t = async (schema, ast, parentSchema) => {
3569
- if (Schema$x.has("if", parentSchema)) {
3570
- const ifSchema = await Schema$x.step("if", parentSchema);
3649
+ const compile$r = async (schema, ast, parentSchema) => {
3650
+ if (Schema$v.has("if", parentSchema)) {
3651
+ const ifSchema = await Schema$v.step("if", parentSchema);
3571
3652
  return [await Core$i.compileSchema(ifSchema, ast), await Core$i.compileSchema(schema, ast)];
3572
3653
  } else {
3573
3654
  return [];
3574
3655
  }
3575
3656
  };
3576
3657
 
3577
- const interpret$t = ([guard, block], instance, ast, dynamicAnchors) => {
3658
+ const interpret$r = ([guard, block], instance, ast, dynamicAnchors) => {
3578
3659
  return guard === undefined || quietInterpretSchema(guard, instance, ast, dynamicAnchors) || Core$i.interpretSchema(block, instance, ast, dynamicAnchors);
3579
3660
  };
3580
3661
 
@@ -3604,140 +3685,124 @@
3604
3685
  return Core$i.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
3605
3686
  };
3606
3687
 
3607
- var _else = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
3688
+ var _else = { compile: compile$r, interpret: interpret$r, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
3608
3689
 
3609
- const { Core: Core$h, Schema: Schema$w, Instance: Instance$o } = lib$1;
3690
+ const { Core: Core$h, Schema: Schema$u, Instance: Instance$m } = lib$1;
3610
3691
 
3611
3692
 
3612
- const compile$s = async (schema, ast) => {
3613
- if (Schema$w.typeOf(schema, "array")) {
3614
- const tupleItems = await Schema$w.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
3693
+ const compile$q = async (schema, ast) => {
3694
+ if (Schema$u.typeOf(schema, "array")) {
3695
+ const tupleItems = await Schema$u.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
3615
3696
  return Promise.all(tupleItems);
3616
3697
  } else {
3617
3698
  return Core$h.compileSchema(schema, ast);
3618
3699
  }
3619
3700
  };
3620
3701
 
3621
- const interpret$s = (items, instance, ast, dynamicAnchors) => {
3622
- if (!Instance$o.typeOf(instance, "array")) {
3702
+ const interpret$q = (items, instance, ast, dynamicAnchors) => {
3703
+ if (!Instance$m.typeOf(instance, "array")) {
3623
3704
  return true;
3624
3705
  }
3625
3706
 
3626
3707
  if (typeof items === "string") {
3627
- return Instance$o.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
3708
+ return Instance$m.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
3628
3709
  } else {
3629
- return Instance$o.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
3710
+ return Instance$m.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
3630
3711
  }
3631
3712
  };
3632
3713
 
3633
3714
  const collectEvaluatedItems$6 = (items, instance, ast, dynamicAnchors) => {
3634
- return interpret$s(items, instance, ast, dynamicAnchors) && (typeof items === "string"
3635
- ? new Set(Instance$o.map((item, itemIndex) => itemIndex, instance))
3715
+ return interpret$q(items, instance, ast, dynamicAnchors) && (typeof items === "string"
3716
+ ? new Set(Instance$m.map((item, itemIndex) => itemIndex, instance))
3636
3717
  : new Set(items.map((item, itemIndex) => itemIndex)));
3637
3718
  };
3638
3719
 
3639
- var items = { compile: compile$s, interpret: interpret$s, collectEvaluatedItems: collectEvaluatedItems$6 };
3720
+ var items = { compile: compile$q, interpret: interpret$q, collectEvaluatedItems: collectEvaluatedItems$6 };
3640
3721
 
3641
- const { Core: Core$g, Schema: Schema$v, Instance: Instance$n } = lib$1;
3722
+ const { Core: Core$g, Schema: Schema$t, Instance: Instance$l } = lib$1;
3642
3723
 
3643
3724
 
3644
- const compile$r = async (schema, ast, parentSchema) => {
3645
- const items = await Schema$v.step("prefixItems", parentSchema);
3646
- const numberOfPrefixItems = Schema$v.typeOf(items, "array") ? Schema$v.length(items) : 0;
3725
+ const compile$p = async (schema, ast, parentSchema) => {
3726
+ const items = await Schema$t.step("prefixItems", parentSchema);
3727
+ const numberOfPrefixItems = Schema$t.typeOf(items, "array") ? Schema$t.length(items) : 0;
3647
3728
 
3648
3729
  return [numberOfPrefixItems, await Core$g.compileSchema(schema, ast)];
3649
3730
  };
3650
3731
 
3651
- const interpret$r = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
3652
- if (!Instance$n.typeOf(instance, "array")) {
3732
+ const interpret$p = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
3733
+ if (!Instance$l.typeOf(instance, "array")) {
3653
3734
  return true;
3654
3735
  }
3655
3736
 
3656
- return Instance$n.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
3737
+ return Instance$l.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
3657
3738
  };
3658
3739
 
3659
3740
  const collectEvaluatedItems$5 = (keywordValue, instance, ast, dynamicAnchors) => {
3660
- return interpret$r(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$n.map((item, ndx) => ndx, instance));
3741
+ return interpret$p(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$l.map((item, ndx) => ndx, instance));
3661
3742
  };
3662
3743
 
3663
- var items202012 = { compile: compile$r, interpret: interpret$r, collectEvaluatedItems: collectEvaluatedItems$5 };
3664
-
3665
- const { Schema: Schema$u, Instance: Instance$m } = lib$1;
3666
-
3667
-
3668
- const compile$q = (schema) => Schema$u.value(schema);
3669
- const interpret$q = (maxItems, instance) => !Instance$m.typeOf(instance, "array") || Instance$m.length(instance) <= maxItems;
3670
-
3671
- var maxItems = { compile: compile$q, interpret: interpret$q };
3672
-
3673
- const { Schema: Schema$t, Instance: Instance$l } = lib$1;
3674
-
3675
-
3676
- const compile$p = (schema) => Schema$t.value(schema);
3677
- const interpret$p = (maxLength, instance) => !Instance$l.typeOf(instance, "string") || Instance$l.length(instance) <= maxLength;
3678
-
3679
- var maxLength = { compile: compile$p, interpret: interpret$p };
3744
+ var items202012 = { compile: compile$p, interpret: interpret$p, collectEvaluatedItems: collectEvaluatedItems$5 };
3680
3745
 
3681
3746
  const { Schema: Schema$s, Instance: Instance$k } = lib$1;
3682
3747
 
3683
3748
 
3684
3749
  const compile$o = (schema) => Schema$s.value(schema);
3685
- const interpret$o = (maxLength, instance) => !Instance$k.typeOf(instance, "string") || [...Instance$k.value(instance)].length <= maxLength;
3750
+ const interpret$o = (maxItems, instance) => !Instance$k.typeOf(instance, "array") || Instance$k.length(instance) <= maxItems;
3686
3751
 
3687
- var maxLength6 = { compile: compile$o, interpret: interpret$o };
3752
+ var maxItems = { compile: compile$o, interpret: interpret$o };
3688
3753
 
3689
3754
  const { Schema: Schema$r, Instance: Instance$j } = lib$1;
3690
3755
 
3691
3756
 
3692
3757
  const compile$n = (schema) => Schema$r.value(schema);
3693
- const interpret$n = (maxProperties, instance) => !Instance$j.typeOf(instance, "object") || Instance$j.keys(instance).length <= maxProperties;
3758
+ const interpret$n = (maxLength, instance) => !Instance$j.typeOf(instance, "string") || [...Instance$j.value(instance)].length <= maxLength;
3694
3759
 
3695
- var maxProperties = { compile: compile$n, interpret: interpret$n };
3760
+ var maxLength = { compile: compile$n, interpret: interpret$n };
3696
3761
 
3697
3762
  const { Schema: Schema$q, Instance: Instance$i } = lib$1;
3698
3763
 
3699
3764
 
3700
- const compile$m = async (schema, ast, parentSchema) => {
3701
- const exclusiveMaximum = await Schema$q.step("exclusiveMaximum", parentSchema);
3702
- const isExclusive = Schema$q.value(exclusiveMaximum);
3765
+ const compile$m = (schema) => Schema$q.value(schema);
3766
+ const interpret$m = (maxProperties, instance) => !Instance$i.typeOf(instance, "object") || Instance$i.keys(instance).length <= maxProperties;
3767
+
3768
+ var maxProperties = { compile: compile$m, interpret: interpret$m };
3769
+
3770
+ const { Schema: Schema$p, Instance: Instance$h } = lib$1;
3771
+
3772
+
3773
+ const compile$l = async (schema, ast, parentSchema) => {
3774
+ const exclusiveMaximum = await Schema$p.step("exclusiveMaximum", parentSchema);
3775
+ const isExclusive = Schema$p.value(exclusiveMaximum);
3703
3776
 
3704
- return [Schema$q.value(schema), isExclusive];
3777
+ return [Schema$p.value(schema), isExclusive];
3705
3778
  };
3706
3779
 
3707
- const interpret$m = ([maximum, isExclusive], instance) => {
3708
- if (!Instance$i.typeOf(instance, "number")) {
3780
+ const interpret$l = ([maximum, isExclusive], instance) => {
3781
+ if (!Instance$h.typeOf(instance, "number")) {
3709
3782
  return true;
3710
3783
  }
3711
3784
 
3712
- const value = Instance$i.value(instance);
3785
+ const value = Instance$h.value(instance);
3713
3786
  return isExclusive ? value < maximum : value <= maximum;
3714
3787
  };
3715
3788
 
3716
- var maximumExclusiveMaximum = { compile: compile$m, interpret: interpret$m };
3717
-
3718
- const { Schema: Schema$p, Instance: Instance$h } = lib$1;
3719
-
3720
-
3721
- const compile$l = async (schema) => Schema$p.value(schema);
3722
- const interpret$l = (maximum, instance) => !Instance$h.typeOf(instance, "number") || Instance$h.value(instance) <= maximum;
3723
-
3724
- var maximum = { compile: compile$l, interpret: interpret$l };
3789
+ var maximumExclusiveMaximum = { compile: compile$l, interpret: interpret$l };
3725
3790
 
3726
3791
  const { Schema: Schema$o, Instance: Instance$g } = lib$1;
3727
3792
 
3728
3793
 
3729
- const compile$k = (schema) => Schema$o.value(schema);
3730
- const interpret$k = (minItems, instance) => !Instance$g.typeOf(instance, "array") || Instance$g.length(instance) >= minItems;
3794
+ const compile$k = async (schema) => Schema$o.value(schema);
3795
+ const interpret$k = (maximum, instance) => !Instance$g.typeOf(instance, "number") || Instance$g.value(instance) <= maximum;
3731
3796
 
3732
- var minItems = { compile: compile$k, interpret: interpret$k };
3797
+ var maximum = { compile: compile$k, interpret: interpret$k };
3733
3798
 
3734
3799
  const { Schema: Schema$n, Instance: Instance$f } = lib$1;
3735
3800
 
3736
3801
 
3737
3802
  const compile$j = (schema) => Schema$n.value(schema);
3738
- const interpret$j = (minLength, instance) => !Instance$f.typeOf(instance, "string") || Instance$f.length(instance) >= minLength;
3803
+ const interpret$j = (minItems, instance) => !Instance$f.typeOf(instance, "array") || Instance$f.length(instance) >= minItems;
3739
3804
 
3740
- var minLength = { compile: compile$j, interpret: interpret$j };
3805
+ var minItems = { compile: compile$j, interpret: interpret$j };
3741
3806
 
3742
3807
  const { Schema: Schema$m, Instance: Instance$e } = lib$1;
3743
3808
 
@@ -3745,7 +3810,7 @@
3745
3810
  const compile$i = (schema) => Schema$m.value(schema);
3746
3811
  const interpret$i = (minLength, instance) => !Instance$e.typeOf(instance, "string") || [...Instance$e.value(instance)].length >= minLength;
3747
3812
 
3748
- var minLength6 = { compile: compile$i, interpret: interpret$i };
3813
+ var minLength = { compile: compile$i, interpret: interpret$i };
3749
3814
 
3750
3815
  const { Schema: Schema$l, Instance: Instance$d } = lib$1;
3751
3816
 
@@ -4119,14 +4184,12 @@
4119
4184
  items202012: items202012,
4120
4185
  maxItems: maxItems,
4121
4186
  maxLength: maxLength,
4122
- maxLength6: maxLength6,
4123
4187
  maxProperties: maxProperties,
4124
4188
  maximumExclusiveMaximum: maximumExclusiveMaximum,
4125
4189
  maximum: maximum,
4126
4190
  metaData: Keywords$1.metaData,
4127
4191
  minItems: minItems,
4128
4192
  minLength: minLength,
4129
- minLength6: minLength6,
4130
4193
  minProperties: minProperties,
4131
4194
  minimumExclusiveMinimum: minimumExclusiveMinimum,
4132
4195
  minimum: minimum,
@@ -4532,11 +4595,11 @@
4532
4595
  "format": keywords$3.metaData,
4533
4596
  "items": keywords$3.items,
4534
4597
  "maxItems": keywords$3.maxItems,
4535
- "maxLength": keywords$3.maxLength6,
4598
+ "maxLength": keywords$3.maxLength,
4536
4599
  "maxProperties": keywords$3.maxProperties,
4537
4600
  "maximum": keywords$3.maximum,
4538
4601
  "minItems": keywords$3.minItems,
4539
- "minLength": keywords$3.minLength6,
4602
+ "minLength": keywords$3.minLength,
4540
4603
  "minProperties": keywords$3.minProperties,
4541
4604
  "minimum": keywords$3.minimum,
4542
4605
  "multipleOf": keywords$3.multipleOf,
@@ -4759,11 +4822,11 @@
4759
4822
  "else": keywords$2.else,
4760
4823
  "items": keywords$2.items,
4761
4824
  "maxItems": keywords$2.maxItems,
4762
- "maxLength": keywords$2.maxLength6,
4825
+ "maxLength": keywords$2.maxLength,
4763
4826
  "maxProperties": keywords$2.maxProperties,
4764
4827
  "maximum": keywords$2.maximum,
4765
4828
  "minItems": keywords$2.minItems,
4766
- "minLength": keywords$2.minLength6,
4829
+ "minLength": keywords$2.minLength,
4767
4830
  "minProperties": keywords$2.minProperties,
4768
4831
  "minimum": keywords$2.minimum,
4769
4832
  "multipleOf": keywords$2.multipleOf,
@@ -5167,11 +5230,11 @@
5167
5230
  "exclusiveMaximum": keywords$1.exclusiveMaximum,
5168
5231
  "exclusiveMinimum": keywords$1.exclusiveMinimum,
5169
5232
  "maxItems": keywords$1.maxItems,
5170
- "maxLength": keywords$1.maxLength6,
5233
+ "maxLength": keywords$1.maxLength,
5171
5234
  "maxProperties": keywords$1.maxProperties,
5172
5235
  "maximum": keywords$1.maximum,
5173
5236
  "minItems": keywords$1.minItems,
5174
- "minLength": keywords$1.minLength6,
5237
+ "minLength": keywords$1.minLength,
5175
5238
  "minProperties": keywords$1.minProperties,
5176
5239
  "minimum": keywords$1.minimum,
5177
5240
  "multipleOf": keywords$1.multipleOf,
@@ -5614,11 +5677,11 @@
5614
5677
  "exclusiveMaximum": keywords.exclusiveMaximum,
5615
5678
  "exclusiveMinimum": keywords.exclusiveMinimum,
5616
5679
  "maxItems": keywords.maxItems,
5617
- "maxLength": keywords.maxLength6,
5680
+ "maxLength": keywords.maxLength,
5618
5681
  "maxProperties": keywords.maxProperties,
5619
5682
  "maximum": keywords.maximum,
5620
5683
  "minItems": keywords.minItems,
5621
- "minLength": keywords.minLength6,
5684
+ "minLength": keywords.minLength,
5622
5685
  "minProperties": keywords.minProperties,
5623
5686
  "minimum": keywords.minimum,
5624
5687
  "multipleOf": keywords.multipleOf,