@hyperjump/json-schema 0.23.3 → 0.23.5

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.
@@ -46,7 +46,11 @@ System.register('JsonSchema', [], (function (exports) {
46
46
  };
47
47
  }
48
48
 
49
- var pubsub = {exports: {}};
49
+ var pubsubExports = {};
50
+ var pubsub = {
51
+ get exports(){ return pubsubExports; },
52
+ set exports(v){ pubsubExports = v; },
53
+ };
50
54
 
51
55
  /**
52
56
  * Copyright (c) 2010,2011,2012,2013,2014 Morgan Roderick http://roderick.dk
@@ -400,9 +404,13 @@ System.register('JsonSchema', [], (function (exports) {
400
404
  return result;
401
405
  };
402
406
  }));
403
- } (pubsub, pubsub.exports));
407
+ } (pubsub, pubsubExports));
404
408
 
405
- var uri_all = {exports: {}};
409
+ var uri_allExports = {};
410
+ var uri_all = {
411
+ get exports(){ return uri_allExports; },
412
+ set exports(v){ uri_allExports = v; },
413
+ };
406
414
 
407
415
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
408
416
 
@@ -1808,9 +1816,9 @@ System.register('JsonSchema', [], (function (exports) {
1808
1816
 
1809
1817
  })));
1810
1818
 
1811
- } (uri_all, uri_all.exports));
1819
+ } (uri_all, uri_allExports));
1812
1820
 
1813
- const URI = uri_all.exports;
1821
+ const URI = uri_allExports;
1814
1822
 
1815
1823
 
1816
1824
  const isObject$1 = (value) => typeof value === "object" && !Array.isArray(value) && value !== null;
@@ -1906,116 +1914,138 @@ System.register('JsonSchema', [], (function (exports) {
1906
1914
 
1907
1915
  const nil$2 = "";
1908
1916
 
1909
- const compile$N = (pointer) => {
1917
+ const EXISTS = Symbol("EXISTS");
1918
+
1919
+ const segmentGenerator = (pointer) => {
1910
1920
  if (pointer.length > 0 && pointer[0] !== "/") {
1911
1921
  throw Error("Invalid JSON Pointer");
1912
1922
  }
1913
1923
 
1914
- return pointer.split("/").slice(1).map(unescape);
1915
- };
1924
+ let segmentStart = 1;
1925
+ let segmentEnd = 0;
1916
1926
 
1917
- const get$2 = (pointer, value = undefined) => {
1918
- const ptr = compile$N(pointer);
1927
+ return (mode) => {
1928
+ if (mode === EXISTS) {
1929
+ return segmentEnd < pointer.length;
1930
+ }
1931
+
1932
+ if (segmentEnd >= pointer.length) {
1933
+ return;
1934
+ }
1919
1935
 
1920
- const fn = (value) => ptr.reduce(([value, pointer], segment) => {
1921
- return [applySegment(value, segment, pointer), append(segment, pointer)];
1922
- }, [value, ""])[0];
1936
+ const position = pointer.indexOf("/", segmentStart);
1937
+ segmentEnd = position === -1 ? pointer.length : position;
1938
+ const segment = unescape(pointer.slice(segmentStart, segmentEnd));
1939
+ segmentStart = segmentEnd + 1;
1940
+
1941
+ return segment;
1942
+ };
1943
+ };
1944
+
1945
+ const get$2 = (pointer, subject = undefined) => {
1946
+ const nextSegment = segmentGenerator(pointer);
1947
+ const fn = (subject) => _get(nextSegment, subject, nil$2);
1948
+ return subject === undefined ? fn : fn(subject);
1949
+ };
1923
1950
 
1924
- return value === undefined ? fn : fn(value);
1951
+ const _get = (nextSegment, subject, cursor) => {
1952
+ if (!nextSegment(EXISTS)) {
1953
+ return subject;
1954
+ } else {
1955
+ const segment = nextSegment();
1956
+ return _get(nextSegment, applySegment(subject, segment, cursor), append(segment, cursor));
1957
+ }
1925
1958
  };
1926
1959
 
1927
1960
  const set = (pointer, subject = undefined, value = undefined) => {
1928
- const ptr = compile$N(pointer);
1929
- const fn = curry$a((subject, value) => _set(ptr, subject, value, nil$2));
1961
+ const nextSegment = segmentGenerator(pointer);
1962
+ const fn = curry$a((subject, value) => _set(nextSegment, subject, value, nil$2));
1930
1963
  return subject === undefined ? fn : fn(subject, value);
1931
1964
  };
1932
1965
 
1933
- const _set = (pointer, subject, value, cursor) => {
1934
- if (pointer.length === 0) {
1966
+ const _set = (nextSegment, subject, value, cursor) => {
1967
+ const segment = nextSegment();
1968
+ if (segment === undefined) {
1935
1969
  return value;
1936
- } else if (pointer.length > 1) {
1970
+ } else if (nextSegment(EXISTS)) {
1937
1971
  if (Array.isArray(subject)) {
1938
- const index = pointer.shift();
1939
1972
  const clonedSubject = [...subject];
1940
- clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
1973
+ clonedSubject[segment] = _set(nextSegment, applySegment(subject, segment, cursor), value, append(segment, cursor));
1941
1974
  return clonedSubject;
1942
1975
  } else {
1943
- const segment = pointer.shift();
1944
- return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1976
+ return { ...subject, [segment]: _set(nextSegment, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1945
1977
  }
1946
1978
  } else if (Array.isArray(subject)) {
1947
1979
  const clonedSubject = [...subject];
1948
- const segment = computeSegment(subject, pointer[0]);
1949
- clonedSubject[segment] = value;
1980
+ clonedSubject[computeSegment(subject, segment)] = value;
1950
1981
  return clonedSubject;
1951
1982
  } else if (typeof subject === "object" && subject !== null) {
1952
- return { ...subject, [pointer[0]]: value };
1983
+ return { ...subject, [segment]: value };
1953
1984
  } else {
1954
- return applySegment(subject, pointer[0], cursor);
1985
+ return applySegment(subject, segment, cursor);
1955
1986
  }
1956
1987
  };
1957
1988
 
1958
1989
  const assign = (pointer, subject = undefined, value = undefined) => {
1959
- const ptr = compile$N(pointer);
1960
- const fn = curry$a((subject, value) => _assign(ptr, subject, value, nil$2));
1990
+ const nextSegment = segmentGenerator(pointer);
1991
+ const fn = curry$a((subject, value) => _assign(nextSegment, subject, value, nil$2));
1961
1992
  return subject === undefined ? fn : fn(subject, value);
1962
1993
  };
1963
1994
 
1964
- const _assign = (pointer, subject, value, cursor) => {
1965
- if (pointer.length === 0) {
1995
+ const _assign = (nextSegment, subject, value, cursor) => {
1996
+ const segment = nextSegment();
1997
+ if (segment === undefined) {
1966
1998
  return;
1967
- } else if (pointer.length === 1 && !isScalar(subject)) {
1968
- const segment = computeSegment(subject, pointer[0]);
1969
- subject[segment] = value;
1999
+ } else if (!nextSegment(EXISTS) && !isScalar(subject)) {
2000
+ subject[computeSegment(subject, segment)] = value;
1970
2001
  } else {
1971
- const segment = pointer.shift();
1972
- _assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
2002
+ _assign(nextSegment, applySegment(subject, segment, cursor), value, append(segment, cursor));
1973
2003
  }
1974
2004
  };
1975
2005
 
1976
2006
  const unset = (pointer, subject = undefined) => {
1977
- const ptr = compile$N(pointer);
1978
- const fn = (subject) => _unset(ptr, subject, nil$2);
2007
+ const nextSegment = segmentGenerator(pointer);
2008
+ const fn = (subject) => _unset(nextSegment, subject, nil$2);
1979
2009
  return subject === undefined ? fn : fn(subject);
1980
2010
  };
1981
2011
 
1982
- const _unset = (pointer, subject, cursor) => {
1983
- if (pointer.length == 0) {
1984
- return undefined;
1985
- } else if (pointer.length > 1) {
1986
- const segment = pointer.shift();
2012
+ const _unset = (nextSegment, subject, cursor) => {
2013
+ const segment = nextSegment();
2014
+ if (segment === undefined) {
2015
+ return;
2016
+ } else if (nextSegment(EXISTS)) {
1987
2017
  const value = applySegment(subject, segment, cursor);
1988
- return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
2018
+ return { ...subject, [segment]: _unset(nextSegment, value, append(segment, cursor)) };
1989
2019
  } else if (Array.isArray(subject)) {
1990
- return subject.filter((_, ndx) => ndx != pointer[0]);
2020
+ const clonedSubject = [...subject];
2021
+ delete clonedSubject[computeSegment(subject, segment)];
2022
+ return clonedSubject;
1991
2023
  } else if (typeof subject === "object" && subject !== null) {
1992
2024
  // eslint-disable-next-line no-unused-vars
1993
- const { [pointer[0]]: _, ...result } = subject;
2025
+ const { [segment]: _, ...result } = subject;
1994
2026
  return result;
1995
2027
  } else {
1996
- return applySegment(subject, pointer[0], cursor);
2028
+ return applySegment(subject, segment, cursor);
1997
2029
  }
1998
2030
  };
1999
2031
 
2000
2032
  const remove = (pointer, subject = undefined) => {
2001
- const ptr = compile$N(pointer);
2002
- const fn = (subject) => _remove(ptr, subject, nil$2);
2033
+ const nextSegment = segmentGenerator(pointer);
2034
+ const fn = (subject) => _remove(nextSegment, subject, nil$2);
2003
2035
  return subject === undefined ? fn : fn(subject);
2004
2036
  };
2005
2037
 
2006
- const _remove = (pointer, subject, cursor) => {
2007
- if (pointer.length === 0) {
2038
+ const _remove = (nextSegment, subject, cursor) => {
2039
+ const segment = nextSegment();
2040
+ if (segment === undefined) {
2008
2041
  return;
2009
- } else if (pointer.length > 1) {
2010
- const segment = pointer.shift();
2042
+ } else if (nextSegment(EXISTS)) {
2011
2043
  const value = applySegment(subject, segment, cursor);
2012
- _remove(pointer, value, append(segment, cursor));
2013
- } else if (Array.isArray(subject)) {
2014
- subject.splice(pointer[0], 1);
2015
- } else if (typeof subject === "object" && subject !== null) {
2016
- delete subject[pointer[0]];
2044
+ _remove(nextSegment, value, append(segment, cursor));
2045
+ } else if (!isScalar(subject)) {
2046
+ delete subject[segment];
2017
2047
  } else {
2018
- applySegment(subject, pointer[0], cursor);
2048
+ applySegment(subject, segment, cursor);
2019
2049
  }
2020
2050
  };
2021
2051
 
@@ -2236,7 +2266,11 @@ System.register('JsonSchema', [], (function (exports) {
2236
2266
  allValues: allValues
2237
2267
  };
2238
2268
 
2239
- var moo$1 = {exports: {}};
2269
+ var mooExports = {};
2270
+ var moo$1 = {
2271
+ get exports(){ return mooExports; },
2272
+ set exports(v){ mooExports = v; },
2273
+ };
2240
2274
 
2241
2275
  (function (module) {
2242
2276
  (function(root, factory) {
@@ -2291,6 +2325,38 @@ System.register('JsonSchema', [], (function (exports) {
2291
2325
  }
2292
2326
  }
2293
2327
 
2328
+ function pad(s, length) {
2329
+ if (s.length > length) {
2330
+ return s
2331
+ }
2332
+ return Array(length - s.length + 1).join(" ") + s
2333
+ }
2334
+
2335
+ function lastNLines(string, numLines) {
2336
+ var position = string.length;
2337
+ var lineBreaks = 0;
2338
+ while (true) {
2339
+ var idx = string.lastIndexOf("\n", position - 1);
2340
+ if (idx === -1) {
2341
+ break;
2342
+ } else {
2343
+ lineBreaks++;
2344
+ }
2345
+ position = idx;
2346
+ if (lineBreaks === numLines) {
2347
+ break;
2348
+ }
2349
+ if (position === 0) {
2350
+ break;
2351
+ }
2352
+ }
2353
+ var startPosition =
2354
+ lineBreaks < numLines ?
2355
+ 0 :
2356
+ position + 1;
2357
+ return string.substring(startPosition).split("\n")
2358
+ }
2359
+
2294
2360
  function objectToRules(object) {
2295
2361
  var keys = Object.getOwnPropertyNames(object);
2296
2362
  var result = [];
@@ -2573,39 +2639,31 @@ System.register('JsonSchema', [], (function (exports) {
2573
2639
  }
2574
2640
 
2575
2641
  function keywordTransform(map) {
2576
- var reverseMap = Object.create(null);
2577
- var byLength = Object.create(null);
2642
+
2643
+ // Use a JavaScript Map to map keywords to their corresponding token type
2644
+ // unless Map is unsupported, then fall back to using an Object:
2645
+ var isMap = typeof Map !== 'undefined';
2646
+ var reverseMap = isMap ? new Map : Object.create(null);
2647
+
2578
2648
  var types = Object.getOwnPropertyNames(map);
2579
2649
  for (var i = 0; i < types.length; i++) {
2580
2650
  var tokenType = types[i];
2581
2651
  var item = map[tokenType];
2582
2652
  var keywordList = Array.isArray(item) ? item : [item];
2583
2653
  keywordList.forEach(function(keyword) {
2584
- (byLength[keyword.length] = byLength[keyword.length] || []).push(keyword);
2585
2654
  if (typeof keyword !== 'string') {
2586
2655
  throw new Error("keyword must be string (in keyword '" + tokenType + "')")
2587
2656
  }
2588
- reverseMap[keyword] = tokenType;
2657
+ if (isMap) {
2658
+ reverseMap.set(keyword, tokenType);
2659
+ } else {
2660
+ reverseMap[keyword] = tokenType;
2661
+ }
2589
2662
  });
2590
2663
  }
2591
-
2592
- // fast string lookup
2593
- // https://jsperf.com/string-lookups
2594
- function str(x) { return JSON.stringify(x) }
2595
- var source = '';
2596
- source += 'switch (value.length) {\n';
2597
- for (var length in byLength) {
2598
- var keywords = byLength[length];
2599
- source += 'case ' + length + ':\n';
2600
- source += 'switch (value) {\n';
2601
- keywords.forEach(function(keyword) {
2602
- var tokenType = reverseMap[keyword];
2603
- source += 'case ' + str(keyword) + ': return ' + str(tokenType) + '\n';
2604
- });
2605
- source += '}\n';
2664
+ return function(k) {
2665
+ return isMap ? reverseMap.get(k) : reverseMap[k]
2606
2666
  }
2607
- source += '}\n';
2608
- return Function('value', source) // type
2609
2667
  }
2610
2668
 
2611
2669
  /***************************************************************************/
@@ -2624,6 +2682,7 @@ System.register('JsonSchema', [], (function (exports) {
2624
2682
  this.line = info ? info.line : 1;
2625
2683
  this.col = info ? info.col : 1;
2626
2684
  this.queuedToken = info ? info.queuedToken : null;
2685
+ this.queuedText = info ? info.queuedText: "";
2627
2686
  this.queuedThrow = info ? info.queuedThrow : null;
2628
2687
  this.setState(info ? info.state : this.startState);
2629
2688
  this.stack = info && info.stack ? info.stack.slice() : [];
@@ -2637,6 +2696,7 @@ System.register('JsonSchema', [], (function (exports) {
2637
2696
  state: this.state,
2638
2697
  stack: this.stack.slice(),
2639
2698
  queuedToken: this.queuedToken,
2699
+ queuedText: this.queuedText,
2640
2700
  queuedThrow: this.queuedThrow,
2641
2701
  }
2642
2702
  };
@@ -2768,7 +2828,8 @@ System.register('JsonSchema', [], (function (exports) {
2768
2828
 
2769
2829
  // throw, if no rule with {error: true}
2770
2830
  if (group.shouldThrow) {
2771
- throw new Error(this.formatError(token, "invalid syntax"))
2831
+ var err = new Error(this.formatError(token, "invalid syntax"));
2832
+ throw err;
2772
2833
  }
2773
2834
 
2774
2835
  if (group.pop) this.popState();
@@ -2809,13 +2870,28 @@ System.register('JsonSchema', [], (function (exports) {
2809
2870
  col: this.col,
2810
2871
  };
2811
2872
  }
2812
- var start = Math.max(0, token.offset - token.col + 1);
2813
- var eol = token.lineBreaks ? token.text.indexOf('\n') : token.text.length;
2814
- var firstLine = this.buffer.substring(start, token.offset + eol);
2815
- message += " at line " + token.line + " col " + token.col + ":\n\n";
2816
- message += " " + firstLine + "\n";
2817
- message += " " + Array(token.col).join(" ") + "^";
2818
- return message
2873
+
2874
+ var numLinesAround = 2;
2875
+ var firstDisplayedLine = Math.max(token.line - numLinesAround, 1);
2876
+ var lastDisplayedLine = token.line + numLinesAround;
2877
+ var lastLineDigits = String(lastDisplayedLine).length;
2878
+ var displayedLines = lastNLines(
2879
+ this.buffer,
2880
+ (this.line - token.line) + numLinesAround + 1
2881
+ )
2882
+ .slice(0, 5);
2883
+ var errorLines = [];
2884
+ errorLines.push(message + " at line " + token.line + " col " + token.col + ":");
2885
+ errorLines.push("");
2886
+ for (var i = 0; i < displayedLines.length; i++) {
2887
+ var line = displayedLines[i];
2888
+ var lineNo = firstDisplayedLine + i;
2889
+ errorLines.push(pad(String(lineNo), lastLineDigits) + " " + line);
2890
+ if (lineNo === token.line) {
2891
+ errorLines.push(pad("", lastLineDigits + token.col + 1) + "^");
2892
+ }
2893
+ }
2894
+ return errorLines.join("\n")
2819
2895
  };
2820
2896
 
2821
2897
  Lexer.prototype.clone = function() {
@@ -2838,7 +2914,7 @@ System.register('JsonSchema', [], (function (exports) {
2838
2914
  }));
2839
2915
  } (moo$1));
2840
2916
 
2841
- const moo = moo$1.exports;
2917
+ const moo = mooExports;
2842
2918
 
2843
2919
 
2844
2920
  const digit = `[0-9]`;
@@ -3101,8 +3177,8 @@ System.register('JsonSchema', [], (function (exports) {
3101
3177
  * obs-text = %x80-FF
3102
3178
  * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
3103
3179
  */
3104
- var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
3105
- var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
3180
+ var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g; // eslint-disable-line no-control-regex
3181
+ var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/; // eslint-disable-line no-control-regex
3106
3182
  var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
3107
3183
 
3108
3184
  /**
@@ -3111,7 +3187,7 @@ System.register('JsonSchema', [], (function (exports) {
3111
3187
  * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
3112
3188
  * obs-text = %x80-FF
3113
3189
  */
3114
- var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
3190
+ var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g; // eslint-disable-line no-control-regex
3115
3191
 
3116
3192
  /**
3117
3193
  * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
@@ -3200,7 +3276,7 @@ System.register('JsonSchema', [], (function (exports) {
3200
3276
 
3201
3277
  var index = header.indexOf(';');
3202
3278
  var type = index !== -1
3203
- ? header.substr(0, index).trim()
3279
+ ? header.slice(0, index).trim()
3204
3280
  : header.trim();
3205
3281
 
3206
3282
  if (!TYPE_REGEXP.test(type)) {
@@ -3226,11 +3302,14 @@ System.register('JsonSchema', [], (function (exports) {
3226
3302
  key = match[1].toLowerCase();
3227
3303
  value = match[2];
3228
3304
 
3229
- if (value[0] === '"') {
3230
- // remove quotes and escapes
3231
- value = value
3232
- .substr(1, value.length - 2)
3233
- .replace(QESC_REGEXP, '$1');
3305
+ if (value.charCodeAt(0) === 0x22 /* " */) {
3306
+ // remove quotes
3307
+ value = value.slice(1, -1);
3308
+
3309
+ // remove escapes
3310
+ if (value.indexOf('\\') !== -1) {
3311
+ value = value.replace(QESC_REGEXP, '$1');
3312
+ }
3234
3313
  }
3235
3314
 
3236
3315
  obj.parameters[key] = value;
@@ -3679,13 +3758,13 @@ System.register('JsonSchema', [], (function (exports) {
3679
3758
  toSchema
3680
3759
  };
3681
3760
 
3682
- class InvalidSchemaError$3 extends Error {
3761
+ let InvalidSchemaError$3 = class InvalidSchemaError extends Error {
3683
3762
  constructor(output) {
3684
3763
  super("Invalid Schema");
3685
3764
  this.name = this.constructor.name;
3686
3765
  this.output = output;
3687
3766
  }
3688
- }
3767
+ };
3689
3768
 
3690
3769
  var invalidSchemaError = InvalidSchemaError$3;
3691
3770
 
@@ -3698,7 +3777,7 @@ System.register('JsonSchema', [], (function (exports) {
3698
3777
  var metaData$4 = { compile: compile$M, interpret: interpret$M };
3699
3778
 
3700
3779
  const curry = justCurryIt$1;
3701
- const PubSub$1 = pubsub.exports;
3780
+ const PubSub$1 = pubsubExports;
3702
3781
  const { resolveUrl } = common$1;
3703
3782
  const Instance$C = instance;
3704
3783
  const Schema$O = schema$5;
@@ -3787,7 +3866,13 @@ System.register('JsonSchema', [], (function (exports) {
3787
3866
  };
3788
3867
 
3789
3868
  const _keywords = {};
3790
- const getKeyword = (id) => _keywords[id] || metaData$3;
3869
+ const getKeyword = (id) => {
3870
+ if (!_keywords[id]) {
3871
+ addKeyword(id, metaData$3);
3872
+ }
3873
+
3874
+ return _keywords[id];
3875
+ };
3791
3876
  const hasKeyword = (id) => id in _keywords;
3792
3877
  const addKeyword = (id, keywordHandler) => {
3793
3878
  _keywords[id] = {
@@ -3904,7 +3989,7 @@ System.register('JsonSchema', [], (function (exports) {
3904
3989
  };
3905
3990
 
3906
3991
  const Pact$9 = lib$3;
3907
- const PubSub = pubsub.exports;
3992
+ const PubSub = pubsubExports;
3908
3993
  const Core$x = core$2;
3909
3994
  const Instance$B = instance;
3910
3995
  const Schema$N = schema$5;
@@ -4065,7 +4150,16 @@ System.register('JsonSchema', [], (function (exports) {
4065
4150
  };
4066
4151
 
4067
4152
  const collectEvaluatedItems$d = (keywordValue, instance, ast, dynamicAnchors) => {
4068
- return interpret$I(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$y.map((item, ndx) => ndx, instance));
4153
+ if (!interpret$I(keywordValue, instance, ast, dynamicAnchors)) {
4154
+ return false;
4155
+ }
4156
+
4157
+ const evaluatedIndexes = new Set();
4158
+ for (let ndx = keywordValue[0]; ndx < Instance$y.length(instance); ndx++) {
4159
+ evaluatedIndexes.add(ndx);
4160
+ }
4161
+
4162
+ return evaluatedIndexes;
4069
4163
  };
4070
4164
 
4071
4165
  var additionalItems6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedItems: collectEvaluatedItems$d };
@@ -4864,15 +4958,14 @@ System.register('JsonSchema', [], (function (exports) {
4864
4958
  const [, fragment] = splitUrl(Schema$d.value(dynamicRef));
4865
4959
  const referencedSchema = await Schema$d.get(Schema$d.value(dynamicRef), dynamicRef);
4866
4960
  await Core$a.compileSchema(referencedSchema, ast);
4867
- return [referencedSchema.id, fragment];
4961
+ return [referencedSchema.id, fragment, Schema$d.uri(referencedSchema)];
4868
4962
  };
4869
4963
 
4870
- const interpret$7 = ([id, fragment], instance, ast, dynamicAnchors) => {
4964
+ const interpret$7 = ([id, fragment, ref], instance, ast, dynamicAnchors) => {
4871
4965
  if (fragment in ast.metaData[id].dynamicAnchors) {
4872
4966
  return Core$a.interpretSchema(dynamicAnchors[fragment], instance, ast, dynamicAnchors);
4873
4967
  } else {
4874
- const pointer = Schema$d.getAnchorPointer(ast.metaData[id], fragment);
4875
- return Core$a.interpretSchema(`${id}#${encodeURI(pointer)}`, instance, ast, dynamicAnchors);
4968
+ return Core$a.interpretSchema(ref, instance, ast, dynamicAnchors);
4876
4969
  }
4877
4970
  };
4878
4971