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