@hpcc-js/ddl-shim 2.17.20 → 2.17.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es6.js CHANGED
@@ -1,6 +1,21 @@
1
+ function _mergeNamespaces(n, m) {
2
+ m.forEach(function (e) {
3
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
4
+ if (k !== 'default' && !(k in n)) {
5
+ var d = Object.getOwnPropertyDescriptor(e, k);
6
+ Object.defineProperty(n, k, d.get ? d : {
7
+ enumerable: true,
8
+ get: function () { return e[k]; }
9
+ });
10
+ }
11
+ });
12
+ });
13
+ return Object.freeze(n);
14
+ }
15
+
1
16
  var PKG_NAME = "@hpcc-js/ddl-shim";
2
- var PKG_VERSION = "2.17.20";
3
- var BUILD_VERSION = "2.94.0";
17
+ var PKG_VERSION = "2.17.21";
18
+ var BUILD_VERSION = "2.97.0";
4
19
 
5
20
  function isWorkunitDatasource(ref) {
6
21
  return ref.WUID !== undefined;
@@ -95,7 +110,7 @@ function isLimitActivity(activity) {
95
110
  }
96
111
  var VisibilitySet = ["normal", "flyout"];
97
112
 
98
- var v2 = /*#__PURE__*/Object.freeze({
113
+ var v2$1 = /*#__PURE__*/Object.freeze({
99
114
  __proto__: null,
100
115
  isDatabombRef: isDatabombRef,
101
116
  isWUResultRef: isWUResultRef,
@@ -143,7 +158,7 @@ function __spreadArray(to, from, pack) {
143
158
  ar[i] = from[i];
144
159
  }
145
160
  }
146
- return to.concat(ar || from);
161
+ return to.concat(ar || Array.prototype.slice.call(from));
147
162
  }
148
163
 
149
164
  var classMappings = {
@@ -359,7 +374,7 @@ function apply_to_properties_layout(ddl2, dermObj) {
359
374
  });
360
375
  return retVal;
361
376
  }
362
- function upgrade(ddl2, dermObj) {
377
+ function upgrade$1(ddl2, dermObj) {
363
378
  apply_to_dataviews(ddl2, dermObj);
364
379
  return apply_to_properties_layout(ddl2, dermObj);
365
380
  }
@@ -579,7 +594,7 @@ var DDLUpgrade = /** @class */ (function () {
579
594
  break;
580
595
  default:
581
596
  groupByColumns.push(this.toLowerCase(field.id));
582
- throw new Error("Unhandled field function: " + field.properties.function);
597
+ throw new Error("Unhandled field function: ".concat(field.properties.function));
583
598
  }
584
599
  }
585
600
  else {
@@ -590,7 +605,7 @@ var DDLUpgrade = /** @class */ (function () {
590
605
  this._ddl2DataviewActivities[viz.id].project.transformations = projectTransformations;
591
606
  }
592
607
  if (aggrFields.length) {
593
- this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = __spreadArray([], groupByColumns);
608
+ this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = __spreadArray([], groupByColumns, true);
594
609
  this._ddl2DataviewActivities[viz.id].groupBy.aggregates = aggrFields;
595
610
  }
596
611
  }
@@ -608,7 +623,7 @@ var DDLUpgrade = /** @class */ (function () {
608
623
  case "MAX":
609
624
  return "max";
610
625
  }
611
- throw new Error("Unknown DDL1 Function Type: " + func);
626
+ throw new Error("Unknown DDL1 Function Type: ".concat(func));
612
627
  };
613
628
  DDLUpgrade.prototype.readMappings = function () {
614
629
  for (var _i = 0, _a = this._ddl.dashboards; _i < _a.length; _i++) {
@@ -635,7 +650,7 @@ var DDLUpgrade = /** @class */ (function () {
635
650
  this.readSliderMappings(viz);
636
651
  }
637
652
  else {
638
- throw new Error("Unkown DDL1 mapping type: " + viz.type);
653
+ throw new Error("Unkown DDL1 mapping type: ".concat(viz.type));
639
654
  }
640
655
  }
641
656
  }
@@ -750,7 +765,7 @@ var DDLUpgrade = /** @class */ (function () {
750
765
  var flag = _a[_i];
751
766
  if (flag.fieldid) {
752
767
  mappings.transformations.push({
753
- fieldID: "annotation_" + idx++,
768
+ fieldID: "annotation_".concat(idx++),
754
769
  type: "map",
755
770
  sourceFieldID: this.toLowerCase(flag.fieldid),
756
771
  default: {},
@@ -809,7 +824,7 @@ var DDLUpgrade = /** @class */ (function () {
809
824
  var mapping = update.mappings[key];
810
825
  var dsFilter = (mapping && dsFilters[mapping]) ? dsFilters[mapping].filter : undefined;
811
826
  if (!dsFilter) {
812
- console.warn("Select Mapping \"" + mapping + "\" in viz \"" + viz.id + "\" not found in filters for \"" + otherViz.id + "\"");
827
+ console.warn("Select Mapping \"".concat(mapping, "\" in viz \"").concat(viz.id, "\" not found in filters for \"").concat(otherViz.id, "\""));
813
828
  }
814
829
  else {
815
830
  condition.mappings.push({
@@ -1060,43 +1075,24 @@ var DDLUpgrade = /** @class */ (function () {
1060
1075
  };
1061
1076
  return DDLUpgrade;
1062
1077
  }());
1063
- function upgrade$1(ddl, baseUrl, wuid, toLowerCase, dermatologyJson) {
1078
+ function upgrade(ddl, baseUrl, wuid, toLowerCase, dermatologyJson) {
1064
1079
  if (toLowerCase === void 0) { toLowerCase = true; }
1065
1080
  if (dermatologyJson === void 0) { dermatologyJson = {}; }
1066
1081
  var ddlUp = new DDLUpgrade(ddl, baseUrl, wuid, toLowerCase);
1067
1082
  var retVal = ddlUp.write();
1068
- retVal.properties = upgrade(retVal, dermatologyJson);
1083
+ retVal.properties = upgrade$1(retVal, dermatologyJson);
1069
1084
  return retVal;
1070
1085
  }
1071
1086
 
1072
1087
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
1073
1088
 
1074
- function unwrapExports (x) {
1075
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1076
- }
1077
-
1078
- function createCommonjsModule(fn, basedir, module) {
1079
- return module = {
1080
- path: basedir,
1081
- exports: {},
1082
- require: function (path, base) {
1083
- return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
1084
- }
1085
- }, fn(module, module.exports), module.exports;
1086
- }
1089
+ var uri_all = {exports: {}};
1087
1090
 
1088
- function getCjsExportFromNamespace (n) {
1089
- return n && n['default'] || n;
1090
- }
1091
-
1092
- function commonjsRequire () {
1093
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
1094
- }
1095
-
1096
- var uri_all = createCommonjsModule(function (module, exports) {
1097
1091
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
1092
+
1093
+ (function (module, exports) {
1098
1094
  (function (global, factory) {
1099
- factory(exports) ;
1095
+ factory(exports) ;
1100
1096
  }(commonjsGlobal, (function (exports) {
1101
1097
  function merge() {
1102
1098
  for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
@@ -1150,10 +1146,10 @@ function buildExps(isIRI) {
1150
1146
  //subset, excludes bidi control characters
1151
1147
  IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
1152
1148
  //subset
1153
- UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
1154
- SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
1155
- USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
1156
- DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
1149
+ UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$);
1150
+ subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*");
1151
+ subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*");
1152
+ var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
1157
1153
  //relaxed parsing rules
1158
1154
  IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
1159
1155
  H16$ = subexp(HEXDIG$$ + "{1,4}"),
@@ -1177,14 +1173,14 @@ function buildExps(isIRI) {
1177
1173
  IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
1178
1174
  //[ *6( h16 ":" ) h16 ] "::"
1179
1175
  IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
1180
- ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
1176
+ ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+");
1181
1177
  //RFC 6874, with relaxed parsing rules
1182
- IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
1178
+ subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+");
1183
1179
  //RFC 6874
1184
- REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
1185
- PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
1186
- SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
1187
- QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
1180
+ subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*");
1181
+ var PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]"));
1182
+ subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+");
1183
+ subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
1188
1184
  return {
1189
1185
  NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
1190
1186
  NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
@@ -2298,7 +2294,7 @@ var handler$3 = {
2298
2294
 
2299
2295
  var O = {};
2300
2296
  //RFC 3986
2301
- var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ( "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
2297
+ var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
2302
2298
  var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
2303
2299
  var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
2304
2300
  //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
@@ -2496,9 +2492,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
2496
2492
 
2497
2493
  })));
2498
2494
 
2499
- });
2500
-
2501
- unwrapExports(uri_all);
2495
+ }(uri_all, uri_all.exports));
2502
2496
 
2503
2497
  var isArray = Array.isArray;
2504
2498
  var keyList = Object.keys;
@@ -2556,7 +2550,7 @@ var fastDeepEqual = function equal(a, b) {
2556
2550
 
2557
2551
  // https://mathiasbynens.be/notes/javascript-encoding
2558
2552
  // https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
2559
- var ucs2length = function ucs2length(str) {
2553
+ var ucs2length$1 = function ucs2length(str) {
2560
2554
  var length = 0
2561
2555
  , len = str.length
2562
2556
  , pos = 0
@@ -2573,16 +2567,16 @@ var ucs2length = function ucs2length(str) {
2573
2567
  return length;
2574
2568
  };
2575
2569
 
2576
- var util = {
2570
+ var util$5 = {
2577
2571
  copy: copy,
2578
2572
  checkDataType: checkDataType,
2579
2573
  checkDataTypes: checkDataTypes,
2580
2574
  coerceToTypes: coerceToTypes,
2581
- toHash: toHash,
2575
+ toHash: toHash$1,
2582
2576
  getProperty: getProperty,
2583
2577
  escapeQuotes: escapeQuotes,
2584
2578
  equal: fastDeepEqual,
2585
- ucs2length: ucs2length,
2579
+ ucs2length: ucs2length$1,
2586
2580
  varOccurences: varOccurences,
2587
2581
  varReplace: varReplace,
2588
2582
  cleanUpCode: cleanUpCode,
@@ -2632,7 +2626,7 @@ function checkDataTypes(dataTypes, data) {
2632
2626
  case 1: return checkDataType(dataTypes[0], data, true);
2633
2627
  default:
2634
2628
  var code = '';
2635
- var types = toHash(dataTypes);
2629
+ var types = toHash$1(dataTypes);
2636
2630
  if (types.array && types.object) {
2637
2631
  code = types.null ? '(': '(!' + data + ' || ';
2638
2632
  code += 'typeof ' + data + ' !== "object")';
@@ -2649,7 +2643,7 @@ function checkDataTypes(dataTypes, data) {
2649
2643
  }
2650
2644
 
2651
2645
 
2652
- var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
2646
+ var COERCE_TO_TYPES = toHash$1([ 'string', 'number', 'integer', 'boolean', 'null' ]);
2653
2647
  function coerceToTypes(optionCoerceTypes, dataTypes) {
2654
2648
  if (Array.isArray(dataTypes)) {
2655
2649
  var types = [];
@@ -2667,19 +2661,19 @@ function coerceToTypes(optionCoerceTypes, dataTypes) {
2667
2661
  }
2668
2662
 
2669
2663
 
2670
- function toHash(arr) {
2664
+ function toHash$1(arr) {
2671
2665
  var hash = {};
2672
2666
  for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
2673
2667
  return hash;
2674
2668
  }
2675
2669
 
2676
2670
 
2677
- var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
2671
+ var IDENTIFIER$1 = /^[a-z$_][a-z$_0-9]*$/i;
2678
2672
  var SINGLE_QUOTE = /'|\\/g;
2679
2673
  function getProperty(key) {
2680
2674
  return typeof key == 'number'
2681
2675
  ? '[' + key + ']'
2682
- : IDENTIFIER.test(key)
2676
+ : IDENTIFIER$1.test(key)
2683
2677
  ? '.' + key
2684
2678
  : "['" + escapeQuotes(key) + "']";
2685
2679
  }
@@ -2783,17 +2777,17 @@ function getPath(currentPath, prop, jsonPointers) {
2783
2777
  }
2784
2778
 
2785
2779
 
2786
- var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
2787
- var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
2780
+ var JSON_POINTER$1 = /^\/(?:[^~]|~0|~1)*$/;
2781
+ var RELATIVE_JSON_POINTER$1 = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
2788
2782
  function getData($data, lvl, paths) {
2789
2783
  var up, jsonPointer, data, matches;
2790
2784
  if ($data === '') return 'rootData';
2791
2785
  if ($data[0] == '/') {
2792
- if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
2786
+ if (!JSON_POINTER$1.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
2793
2787
  jsonPointer = $data;
2794
2788
  data = 'rootData';
2795
2789
  } else {
2796
- matches = $data.match(RELATIVE_JSON_POINTER);
2790
+ matches = $data.match(RELATIVE_JSON_POINTER$1);
2797
2791
  if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
2798
2792
  up = +matches[1];
2799
2793
  jsonPointer = matches[2];
@@ -2845,15 +2839,17 @@ function unescapeJsonPointer(str) {
2845
2839
  return str.replace(/~1/g, '/').replace(/~0/g, '~');
2846
2840
  }
2847
2841
 
2848
- var schema_obj = SchemaObject;
2842
+ var util$4 = util$5;
2843
+
2844
+ var schema_obj = SchemaObject$2;
2849
2845
 
2850
- function SchemaObject(obj) {
2851
- util.copy(obj, this);
2846
+ function SchemaObject$2(obj) {
2847
+ util$4.copy(obj, this);
2852
2848
  }
2853
2849
 
2854
- var jsonSchemaTraverse = createCommonjsModule(function (module) {
2850
+ var jsonSchemaTraverse = {exports: {}};
2855
2851
 
2856
- var traverse = module.exports = function (schema, opts, cb) {
2852
+ var traverse$1 = jsonSchemaTraverse.exports = function (schema, opts, cb) {
2857
2853
  // Legacy support for v0.3.1 and earlier.
2858
2854
  if (typeof opts == 'function') {
2859
2855
  cb = opts;
@@ -2868,7 +2864,7 @@ var traverse = module.exports = function (schema, opts, cb) {
2868
2864
  };
2869
2865
 
2870
2866
 
2871
- traverse.keywords = {
2867
+ traverse$1.keywords = {
2872
2868
  additionalItems: true,
2873
2869
  items: true,
2874
2870
  contains: true,
@@ -2877,21 +2873,21 @@ traverse.keywords = {
2877
2873
  not: true
2878
2874
  };
2879
2875
 
2880
- traverse.arrayKeywords = {
2876
+ traverse$1.arrayKeywords = {
2881
2877
  items: true,
2882
2878
  allOf: true,
2883
2879
  anyOf: true,
2884
2880
  oneOf: true
2885
2881
  };
2886
2882
 
2887
- traverse.propsKeywords = {
2883
+ traverse$1.propsKeywords = {
2888
2884
  definitions: true,
2889
2885
  properties: true,
2890
2886
  patternProperties: true,
2891
2887
  dependencies: true
2892
2888
  };
2893
2889
 
2894
- traverse.skipKeywords = {
2890
+ traverse$1.skipKeywords = {
2895
2891
  default: true,
2896
2892
  enum: true,
2897
2893
  const: true,
@@ -2919,16 +2915,16 @@ function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr,
2919
2915
  for (var key in schema) {
2920
2916
  var sch = schema[key];
2921
2917
  if (Array.isArray(sch)) {
2922
- if (key in traverse.arrayKeywords) {
2918
+ if (key in traverse$1.arrayKeywords) {
2923
2919
  for (var i=0; i<sch.length; i++)
2924
2920
  _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
2925
2921
  }
2926
- } else if (key in traverse.propsKeywords) {
2922
+ } else if (key in traverse$1.propsKeywords) {
2927
2923
  if (sch && typeof sch == 'object') {
2928
2924
  for (var prop in sch)
2929
2925
  _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
2930
2926
  }
2931
- } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
2927
+ } else if (key in traverse$1.keywords || (opts.allKeys && !(key in traverse$1.skipKeywords))) {
2932
2928
  _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
2933
2929
  }
2934
2930
  }
@@ -2940,16 +2936,21 @@ function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr,
2940
2936
  function escapeJsonPtr(str) {
2941
2937
  return str.replace(/~/g, '~0').replace(/\//g, '~1');
2942
2938
  }
2943
- });
2944
2939
 
2945
- var resolve_1 = resolve;
2940
+ var URI$1 = uri_all.exports
2941
+ , equal$1 = fastDeepEqual
2942
+ , util$3 = util$5
2943
+ , SchemaObject$1 = schema_obj
2944
+ , traverse = jsonSchemaTraverse.exports;
2945
+
2946
+ var resolve_1 = resolve$3;
2946
2947
 
2947
- resolve.normalizeId = normalizeId;
2948
- resolve.fullPath = getFullPath;
2949
- resolve.url = resolveUrl;
2950
- resolve.ids = resolveIds;
2951
- resolve.inlineRef = inlineRef;
2952
- resolve.schema = resolveSchema;
2948
+ resolve$3.normalizeId = normalizeId;
2949
+ resolve$3.fullPath = getFullPath;
2950
+ resolve$3.url = resolveUrl;
2951
+ resolve$3.ids = resolveIds;
2952
+ resolve$3.inlineRef = inlineRef;
2953
+ resolve$3.schema = resolveSchema;
2953
2954
 
2954
2955
  /**
2955
2956
  * [resolve and compile the references ($ref)]
@@ -2959,16 +2960,16 @@ resolve.schema = resolveSchema;
2959
2960
  * @param {String} ref reference to resolve
2960
2961
  * @return {Object|Function} schema object (if the schema can be inlined) or validation function
2961
2962
  */
2962
- function resolve(compile, root, ref) {
2963
+ function resolve$3(compile, root, ref) {
2963
2964
  /* jshint validthis: true */
2964
2965
  var refVal = this._refs[ref];
2965
2966
  if (typeof refVal == 'string') {
2966
2967
  if (this._refs[refVal]) refVal = this._refs[refVal];
2967
- else return resolve.call(this, compile, root, refVal);
2968
+ else return resolve$3.call(this, compile, root, refVal);
2968
2969
  }
2969
2970
 
2970
2971
  refVal = refVal || this._schemas[ref];
2971
- if (refVal instanceof schema_obj) {
2972
+ if (refVal instanceof SchemaObject$1) {
2972
2973
  return inlineRef(refVal.schema, this._opts.inlineRefs)
2973
2974
  ? refVal.schema
2974
2975
  : refVal.validate || this._compile(refVal);
@@ -2982,7 +2983,7 @@ function resolve(compile, root, ref) {
2982
2983
  baseId = res.baseId;
2983
2984
  }
2984
2985
 
2985
- if (schema instanceof schema_obj) {
2986
+ if (schema instanceof SchemaObject$1) {
2986
2987
  v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
2987
2988
  } else if (schema !== undefined) {
2988
2989
  v = inlineRef(schema, this._opts.inlineRefs)
@@ -3003,7 +3004,7 @@ function resolve(compile, root, ref) {
3003
3004
  */
3004
3005
  function resolveSchema(root, ref) {
3005
3006
  /* jshint validthis: true */
3006
- var p = uri_all.parse(ref)
3007
+ var p = URI$1.parse(ref)
3007
3008
  , refPath = _getFullPath(p)
3008
3009
  , baseId = getFullPath(this._getId(root.schema));
3009
3010
  if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
@@ -3011,12 +3012,12 @@ function resolveSchema(root, ref) {
3011
3012
  var refVal = this._refs[id];
3012
3013
  if (typeof refVal == 'string') {
3013
3014
  return resolveRecursive.call(this, root, refVal, p);
3014
- } else if (refVal instanceof schema_obj) {
3015
+ } else if (refVal instanceof SchemaObject$1) {
3015
3016
  if (!refVal.validate) this._compile(refVal);
3016
3017
  root = refVal;
3017
3018
  } else {
3018
3019
  refVal = this._schemas[id];
3019
- if (refVal instanceof schema_obj) {
3020
+ if (refVal instanceof SchemaObject$1) {
3020
3021
  if (!refVal.validate) this._compile(refVal);
3021
3022
  if (id == normalizeId(ref))
3022
3023
  return { schema: refVal, root: root, baseId: baseId };
@@ -3047,7 +3048,7 @@ function resolveRecursive(root, ref, parsedRef) {
3047
3048
  }
3048
3049
 
3049
3050
 
3050
- var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
3051
+ var PREVENT_SCOPE_CHANGE = util$3.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
3051
3052
  /* @this Ajv */
3052
3053
  function getJsonPointer(parsedRef, baseId, schema, root) {
3053
3054
  /* jshint validthis: true */
@@ -3058,7 +3059,7 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
3058
3059
  for (var i = 1; i < parts.length; i++) {
3059
3060
  var part = parts[i];
3060
3061
  if (part) {
3061
- part = util.unescapeFragment(part);
3062
+ part = util$3.unescapeFragment(part);
3062
3063
  schema = schema[part];
3063
3064
  if (schema === undefined) break;
3064
3065
  var id;
@@ -3082,7 +3083,7 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
3082
3083
  }
3083
3084
 
3084
3085
 
3085
- var SIMPLE_INLINED = util.toHash([
3086
+ var SIMPLE_INLINED = util$3.toHash([
3086
3087
  'type', 'format', 'pattern',
3087
3088
  'maxLength', 'minLength',
3088
3089
  'maxProperties', 'minProperties',
@@ -3142,13 +3143,13 @@ function countKeys(schema) {
3142
3143
 
3143
3144
  function getFullPath(id, normalize) {
3144
3145
  if (normalize !== false) id = normalizeId(id);
3145
- var p = uri_all.parse(id);
3146
+ var p = URI$1.parse(id);
3146
3147
  return _getFullPath(p);
3147
3148
  }
3148
3149
 
3149
3150
 
3150
3151
  function _getFullPath(p) {
3151
- return uri_all.serialize(p).split('#')[0] + '#';
3152
+ return URI$1.serialize(p).split('#')[0] + '#';
3152
3153
  }
3153
3154
 
3154
3155
 
@@ -3160,7 +3161,7 @@ function normalizeId(id) {
3160
3161
 
3161
3162
  function resolveUrl(baseId, id) {
3162
3163
  id = normalizeId(id);
3163
- return uri_all.resolve(baseId, id);
3164
+ return URI$1.resolve(baseId, id);
3164
3165
  }
3165
3166
 
3166
3167
 
@@ -3172,25 +3173,25 @@ function resolveIds(schema) {
3172
3173
  var localRefs = {};
3173
3174
  var self = this;
3174
3175
 
3175
- jsonSchemaTraverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
3176
+ traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
3176
3177
  if (jsonPtr === '') return;
3177
3178
  var id = self._getId(sch);
3178
3179
  var baseId = baseIds[parentJsonPtr];
3179
3180
  var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
3180
3181
  if (keyIndex !== undefined)
3181
- fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
3182
+ fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util$3.escapeFragment(keyIndex));
3182
3183
 
3183
3184
  if (typeof id == 'string') {
3184
- id = baseId = normalizeId(baseId ? uri_all.resolve(baseId, id) : id);
3185
+ id = baseId = normalizeId(baseId ? URI$1.resolve(baseId, id) : id);
3185
3186
 
3186
3187
  var refVal = self._refs[id];
3187
3188
  if (typeof refVal == 'string') refVal = self._refs[refVal];
3188
3189
  if (refVal && refVal.schema) {
3189
- if (!fastDeepEqual(sch, refVal.schema))
3190
+ if (!equal$1(sch, refVal.schema))
3190
3191
  throw new Error('id "' + id + '" resolves to more than one schema');
3191
3192
  } else if (id != normalizeId(fullPath)) {
3192
3193
  if (id[0] == '#') {
3193
- if (localRefs[id] && !fastDeepEqual(sch, localRefs[id]))
3194
+ if (localRefs[id] && !equal$1(sch, localRefs[id]))
3194
3195
  throw new Error('id "' + id + '" resolves to more than one schema');
3195
3196
  localRefs[id] = sch;
3196
3197
  } else {
@@ -3205,28 +3206,30 @@ function resolveIds(schema) {
3205
3206
  return localRefs;
3206
3207
  }
3207
3208
 
3209
+ var resolve$2 = resolve_1;
3210
+
3208
3211
  var error_classes = {
3209
- Validation: errorSubclass(ValidationError),
3210
- MissingRef: errorSubclass(MissingRefError)
3212
+ Validation: errorSubclass(ValidationError$1),
3213
+ MissingRef: errorSubclass(MissingRefError$1)
3211
3214
  };
3212
3215
 
3213
3216
 
3214
- function ValidationError(errors) {
3217
+ function ValidationError$1(errors) {
3215
3218
  this.message = 'validation failed';
3216
3219
  this.errors = errors;
3217
3220
  this.ajv = this.validation = true;
3218
3221
  }
3219
3222
 
3220
3223
 
3221
- MissingRefError.message = function (baseId, ref) {
3224
+ MissingRefError$1.message = function (baseId, ref) {
3222
3225
  return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
3223
3226
  };
3224
3227
 
3225
3228
 
3226
- function MissingRefError(baseId, ref, message) {
3227
- this.message = message || MissingRefError.message(baseId, ref);
3228
- this.missingRef = resolve_1.url(baseId, ref);
3229
- this.missingSchema = resolve_1.normalizeId(resolve_1.fullPath(this.missingRef));
3229
+ function MissingRefError$1(baseId, ref, message) {
3230
+ this.message = message || MissingRefError$1.message(baseId, ref);
3231
+ this.missingRef = resolve$2.url(baseId, ref);
3232
+ this.missingSchema = resolve$2.normalizeId(resolve$2.fullPath(this.missingRef));
3230
3233
  }
3231
3234
 
3232
3235
 
@@ -3294,7 +3297,7 @@ var fastJsonStableStringify = function (data, opts) {
3294
3297
  })(data);
3295
3298
  };
3296
3299
 
3297
- var validate = function generate_validate(it, $keyword, $ruleType) {
3300
+ var validate$1 = function generate_validate(it, $keyword, $ruleType) {
3298
3301
  var out = '';
3299
3302
  var $async = it.schema.$async === true,
3300
3303
  $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
@@ -3788,17 +3791,24 @@ var validate = function generate_validate(it, $keyword, $ruleType) {
3788
3791
  return out;
3789
3792
  };
3790
3793
 
3794
+ var resolve$1 = resolve_1
3795
+ , util$2 = util$5
3796
+ , errorClasses$1 = error_classes
3797
+ , stableStringify$1 = fastJsonStableStringify;
3798
+
3799
+ var validateGenerator = validate$1;
3800
+
3791
3801
  /**
3792
3802
  * Functions below are used inside compiled validations function
3793
3803
  */
3794
3804
 
3795
- var ucs2length$1 = util.ucs2length;
3796
-
3805
+ var ucs2length = util$2.ucs2length;
3806
+ var equal = fastDeepEqual;
3797
3807
 
3798
3808
  // this error is thrown by async schemas to return validation errors via exception
3799
- var ValidationError$1 = error_classes.Validation;
3809
+ var ValidationError = errorClasses$1.Validation;
3800
3810
 
3801
- var compile_1 = compile;
3811
+ var compile_1 = compile$1;
3802
3812
 
3803
3813
 
3804
3814
  /**
@@ -3810,7 +3820,7 @@ var compile_1 = compile;
3810
3820
  * @param {String} baseId base ID for IDs in the schema
3811
3821
  * @return {Function} validation function
3812
3822
  */
3813
- function compile(schema, root, localRefs, baseId) {
3823
+ function compile$1(schema, root, localRefs, baseId) {
3814
3824
  /* jshint validthis: true, evil: true */
3815
3825
  /* eslint no-shadow: 0 */
3816
3826
  var self = this
@@ -3862,11 +3872,11 @@ function compile(schema, root, localRefs, baseId) {
3862
3872
  function localCompile(_schema, _root, localRefs, baseId) {
3863
3873
  var isRoot = !_root || (_root && _root.schema == _schema);
3864
3874
  if (_root.schema != root.schema)
3865
- return compile.call(self, _schema, _root, localRefs, baseId);
3875
+ return compile$1.call(self, _schema, _root, localRefs, baseId);
3866
3876
 
3867
3877
  var $async = _schema.$async === true;
3868
3878
 
3869
- var sourceCode = validate({
3879
+ var sourceCode = validateGenerator({
3870
3880
  isTop: true,
3871
3881
  schema: _schema,
3872
3882
  isRoot: isRoot,
@@ -3875,11 +3885,11 @@ function compile(schema, root, localRefs, baseId) {
3875
3885
  schemaPath: '',
3876
3886
  errSchemaPath: '#',
3877
3887
  errorPath: '""',
3878
- MissingRefError: error_classes.MissingRef,
3888
+ MissingRefError: errorClasses$1.MissingRef,
3879
3889
  RULES: RULES,
3880
- validate: validate,
3881
- util: util,
3882
- resolve: resolve_1,
3890
+ validate: validateGenerator,
3891
+ util: util$2,
3892
+ resolve: resolve$1,
3883
3893
  resolveRef: resolveRef,
3884
3894
  usePattern: usePattern,
3885
3895
  useDefault: useDefault,
@@ -3891,12 +3901,12 @@ function compile(schema, root, localRefs, baseId) {
3891
3901
  });
3892
3902
 
3893
3903
  sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
3894
- + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
3904
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode$1)
3895
3905
  + sourceCode;
3896
3906
 
3897
3907
  if (opts.processCode) sourceCode = opts.processCode(sourceCode);
3898
3908
  // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
3899
- var validate$1;
3909
+ var validate;
3900
3910
  try {
3901
3911
  var makeValidate = new Function(
3902
3912
  'self',
@@ -3912,7 +3922,7 @@ function compile(schema, root, localRefs, baseId) {
3912
3922
  sourceCode
3913
3923
  );
3914
3924
 
3915
- validate$1 = makeValidate(
3925
+ validate = makeValidate(
3916
3926
  self,
3917
3927
  RULES,
3918
3928
  formats,
@@ -3920,36 +3930,36 @@ function compile(schema, root, localRefs, baseId) {
3920
3930
  refVal,
3921
3931
  defaults,
3922
3932
  customRules,
3923
- fastDeepEqual,
3924
- ucs2length$1,
3925
- ValidationError$1
3933
+ equal,
3934
+ ucs2length,
3935
+ ValidationError
3926
3936
  );
3927
3937
 
3928
- refVal[0] = validate$1;
3938
+ refVal[0] = validate;
3929
3939
  } catch(e) {
3930
3940
  self.logger.error('Error compiling schema, function code:', sourceCode);
3931
3941
  throw e;
3932
3942
  }
3933
3943
 
3934
- validate$1.schema = _schema;
3935
- validate$1.errors = null;
3936
- validate$1.refs = refs;
3937
- validate$1.refVal = refVal;
3938
- validate$1.root = isRoot ? validate$1 : _root;
3939
- if ($async) validate$1.$async = true;
3944
+ validate.schema = _schema;
3945
+ validate.errors = null;
3946
+ validate.refs = refs;
3947
+ validate.refVal = refVal;
3948
+ validate.root = isRoot ? validate : _root;
3949
+ if ($async) validate.$async = true;
3940
3950
  if (opts.sourceCode === true) {
3941
- validate$1.source = {
3951
+ validate.source = {
3942
3952
  code: sourceCode,
3943
3953
  patterns: patterns,
3944
3954
  defaults: defaults
3945
3955
  };
3946
3956
  }
3947
3957
 
3948
- return validate$1;
3958
+ return validate;
3949
3959
  }
3950
3960
 
3951
3961
  function resolveRef(baseId, ref, isRoot) {
3952
- ref = resolve_1.url(baseId, ref);
3962
+ ref = resolve$1.url(baseId, ref);
3953
3963
  var refIndex = refs[ref];
3954
3964
  var _refVal, refCode;
3955
3965
  if (refIndex !== undefined) {
@@ -3967,13 +3977,13 @@ function compile(schema, root, localRefs, baseId) {
3967
3977
  }
3968
3978
 
3969
3979
  refCode = addLocalRef(ref);
3970
- var v = resolve_1.call(self, localCompile, root, ref);
3980
+ var v = resolve$1.call(self, localCompile, root, ref);
3971
3981
  if (v === undefined) {
3972
3982
  var localSchema = localRefs && localRefs[ref];
3973
3983
  if (localSchema) {
3974
- v = resolve_1.inlineRef(localSchema, opts.inlineRefs)
3984
+ v = resolve$1.inlineRef(localSchema, opts.inlineRefs)
3975
3985
  ? localSchema
3976
- : compile.call(self, localSchema, root, localRefs, baseId);
3986
+ : compile$1.call(self, localSchema, root, localRefs, baseId);
3977
3987
  }
3978
3988
  }
3979
3989
 
@@ -4022,10 +4032,10 @@ function compile(schema, root, localRefs, baseId) {
4022
4032
  case 'number':
4023
4033
  return '' + value;
4024
4034
  case 'string':
4025
- return util.toQuotedString(value);
4035
+ return util$2.toQuotedString(value);
4026
4036
  case 'object':
4027
4037
  if (value === null) return 'null';
4028
- var valueStr = fastJsonStableStringify(value);
4038
+ var valueStr = stableStringify$1(value);
4029
4039
  var index = defaultsHash[valueStr];
4030
4040
  if (index === undefined) {
4031
4041
  index = defaultsHash[valueStr] = defaults.length;
@@ -4140,7 +4150,7 @@ function compIndex(schema, root, baseId) {
4140
4150
 
4141
4151
 
4142
4152
  function patternCode(i, patterns) {
4143
- return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
4153
+ return 'var pattern' + i + ' = new RegExp(' + util$2.toQuotedString(patterns[i]) + ');';
4144
4154
  }
4145
4155
 
4146
4156
 
@@ -4154,7 +4164,7 @@ function refValCode(i, refVal) {
4154
4164
  }
4155
4165
 
4156
4166
 
4157
- function customRuleCode(i) {
4167
+ function customRuleCode$1(i) {
4158
4168
  return 'var customRule' + i + ' = customRules[' + i + '];';
4159
4169
  }
4160
4170
 
@@ -4167,33 +4177,33 @@ function vars(arr, statement) {
4167
4177
  return code;
4168
4178
  }
4169
4179
 
4170
- var cache = createCommonjsModule(function (module) {
4180
+ var cache = {exports: {}};
4171
4181
 
4172
-
4173
- var Cache = module.exports = function Cache() {
4182
+ var Cache$1 = cache.exports = function Cache() {
4174
4183
  this._cache = {};
4175
4184
  };
4176
4185
 
4177
4186
 
4178
- Cache.prototype.put = function Cache_put(key, value) {
4187
+ Cache$1.prototype.put = function Cache_put(key, value) {
4179
4188
  this._cache[key] = value;
4180
4189
  };
4181
4190
 
4182
4191
 
4183
- Cache.prototype.get = function Cache_get(key) {
4192
+ Cache$1.prototype.get = function Cache_get(key) {
4184
4193
  return this._cache[key];
4185
4194
  };
4186
4195
 
4187
4196
 
4188
- Cache.prototype.del = function Cache_del(key) {
4197
+ Cache$1.prototype.del = function Cache_del(key) {
4189
4198
  delete this._cache[key];
4190
4199
  };
4191
4200
 
4192
4201
 
4193
- Cache.prototype.clear = function Cache_clear() {
4202
+ Cache$1.prototype.clear = function Cache_clear() {
4194
4203
  this._cache = {};
4195
4204
  };
4196
- });
4205
+
4206
+ var util$1 = util$5;
4197
4207
 
4198
4208
  var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
4199
4209
  var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
@@ -4209,20 +4219,20 @@ var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|
4209
4219
  // var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
4210
4220
  var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
4211
4221
  var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
4212
- var JSON_POINTER$1 = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
4222
+ var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
4213
4223
  var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
4214
- var RELATIVE_JSON_POINTER$1 = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
4224
+ var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
4215
4225
 
4216
4226
 
4217
- var formats_1 = formats;
4227
+ var formats_1 = formats$1;
4218
4228
 
4219
- function formats(mode) {
4229
+ function formats$1(mode) {
4220
4230
  mode = mode == 'full' ? 'full' : 'fast';
4221
- return util.copy(formats[mode]);
4231
+ return util$1.copy(formats$1[mode]);
4222
4232
  }
4223
4233
 
4224
4234
 
4225
- formats.fast = {
4235
+ formats$1.fast = {
4226
4236
  // date: http://tools.ietf.org/html/rfc3339#section-5.6
4227
4237
  date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
4228
4238
  // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
@@ -4247,14 +4257,14 @@ formats.fast = {
4247
4257
  uuid: UUID,
4248
4258
  // JSON-pointer: https://tools.ietf.org/html/rfc6901
4249
4259
  // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
4250
- 'json-pointer': JSON_POINTER$1,
4260
+ 'json-pointer': JSON_POINTER,
4251
4261
  'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
4252
4262
  // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
4253
- 'relative-json-pointer': RELATIVE_JSON_POINTER$1
4263
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
4254
4264
  };
4255
4265
 
4256
4266
 
4257
- formats.full = {
4267
+ formats$1.full = {
4258
4268
  date: date,
4259
4269
  time: time,
4260
4270
  'date-time': date_time,
@@ -4268,9 +4278,9 @@ formats.full = {
4268
4278
  ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
4269
4279
  regex: regex,
4270
4280
  uuid: UUID,
4271
- 'json-pointer': JSON_POINTER$1,
4281
+ 'json-pointer': JSON_POINTER,
4272
4282
  'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
4273
- 'relative-json-pointer': RELATIVE_JSON_POINTER$1
4283
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
4274
4284
  };
4275
4285
 
4276
4286
 
@@ -4586,7 +4596,7 @@ var comment = function generate_comment(it, $keyword, $ruleType) {
4586
4596
  var out = ' ';
4587
4597
  var $schema = it.schema[$keyword];
4588
4598
  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
4589
- var $breakOnError = !it.opts.allErrors;
4599
+ !it.opts.allErrors;
4590
4600
  var $comment = it.util.toQuotedString($schema);
4591
4601
  if (it.opts.$comment === true) {
4592
4602
  out += ' console.log(' + ($comment) + ');';
@@ -6057,7 +6067,7 @@ var pattern = function generate_pattern(it, $keyword, $ruleType) {
6057
6067
  return out;
6058
6068
  };
6059
6069
 
6060
- var properties = function generate_properties(it, $keyword, $ruleType) {
6070
+ var properties$2 = function generate_properties(it, $keyword, $ruleType) {
6061
6071
  var out = ' ';
6062
6072
  var $lvl = it.level;
6063
6073
  var $dataLvl = it.dataLevel;
@@ -6469,7 +6479,7 @@ var propertyNames = function generate_propertyNames(it, $keyword, $ruleType) {
6469
6479
  return out;
6470
6480
  };
6471
6481
 
6472
- var required = function generate_required(it, $keyword, $ruleType) {
6482
+ var required$1 = function generate_required(it, $keyword, $ruleType) {
6473
6483
  var out = ' ';
6474
6484
  var $lvl = it.level;
6475
6485
  var $dataLvl = it.dataLevel;
@@ -6846,16 +6856,17 @@ var dotjs = {
6846
6856
  not: not,
6847
6857
  oneOf: oneOf,
6848
6858
  pattern: pattern,
6849
- properties: properties,
6859
+ properties: properties$2,
6850
6860
  propertyNames: propertyNames,
6851
- required: required,
6861
+ required: required$1,
6852
6862
  uniqueItems: uniqueItems,
6853
- validate: validate
6863
+ validate: validate$1
6854
6864
  };
6855
6865
 
6856
- var toHash$1 = util.toHash;
6866
+ var ruleModules = dotjs
6867
+ , toHash = util$5.toHash;
6857
6868
 
6858
- var rules = function rules() {
6869
+ var rules$1 = function rules() {
6859
6870
  var RULES = [
6860
6871
  { type: 'number',
6861
6872
  rules: [ { 'maximum': ['exclusiveMaximum'] },
@@ -6879,8 +6890,8 @@ var rules = function rules() {
6879
6890
  'additionalItems', 'then', 'else'
6880
6891
  ];
6881
6892
  var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
6882
- RULES.all = toHash$1(ALL);
6883
- RULES.types = toHash$1(TYPES);
6893
+ RULES.all = toHash(ALL);
6894
+ RULES.types = toHash(TYPES);
6884
6895
 
6885
6896
  RULES.forEach(function (group) {
6886
6897
  group.rules = group.rules.map(function (keyword) {
@@ -6897,7 +6908,7 @@ var rules = function rules() {
6897
6908
  ALL.push(keyword);
6898
6909
  var rule = RULES.all[keyword] = {
6899
6910
  keyword: keyword,
6900
- code: dotjs[keyword],
6911
+ code: ruleModules[keyword],
6901
6912
  implements: implKeywords
6902
6913
  };
6903
6914
  return rule;
@@ -6905,13 +6916,13 @@ var rules = function rules() {
6905
6916
 
6906
6917
  RULES.all.$comment = {
6907
6918
  keyword: '$comment',
6908
- code: dotjs.$comment
6919
+ code: ruleModules.$comment
6909
6920
  };
6910
6921
 
6911
6922
  if (group.type) RULES.types[group.type] = group;
6912
6923
  });
6913
6924
 
6914
- RULES.keywords = toHash$1(ALL.concat(KEYWORDS));
6925
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
6915
6926
  RULES.custom = {};
6916
6927
 
6917
6928
  return RULES;
@@ -6965,7 +6976,7 @@ var data = function (metaSchema, keywordsJsonPointers) {
6965
6976
  return metaSchema;
6966
6977
  };
6967
6978
 
6968
- var MissingRefError$1 = error_classes.MissingRef;
6979
+ var MissingRefError = error_classes.MissingRef;
6969
6980
 
6970
6981
  var async = compileAsync;
6971
6982
 
@@ -7018,7 +7029,7 @@ function compileAsync(schema, meta, callback) {
7018
7029
  function _compileAsync(schemaObj) {
7019
7030
  try { return self._compile(schemaObj); }
7020
7031
  catch(e) {
7021
- if (e instanceof MissingRefError$1) return loadMissingSchema(e);
7032
+ if (e instanceof MissingRefError) return loadMissingSchema(e);
7022
7033
  throw e;
7023
7034
  }
7024
7035
 
@@ -7282,10 +7293,10 @@ var custom = function generate_custom(it, $keyword, $ruleType) {
7282
7293
  return out;
7283
7294
  };
7284
7295
 
7285
- var $schema = "http://json-schema.org/draft-07/schema#";
7286
- var $id = "http://json-schema.org/draft-07/schema#";
7296
+ var $schema$2 = "http://json-schema.org/draft-07/schema#";
7297
+ var $id$1 = "http://json-schema.org/draft-07/schema#";
7287
7298
  var title = "Core schema meta-schema";
7288
- var definitions = {
7299
+ var definitions$1 = {
7289
7300
  schemaArray: {
7290
7301
  type: "array",
7291
7302
  minItems: 1,
@@ -7328,7 +7339,7 @@ var definitions = {
7328
7339
  ]
7329
7340
  }
7330
7341
  };
7331
- var type = [
7342
+ var type$1 = [
7332
7343
  "object",
7333
7344
  "boolean"
7334
7345
  ];
@@ -7524,32 +7535,19 @@ var properties$1 = {
7524
7535
  $ref: "#"
7525
7536
  }
7526
7537
  };
7527
- var jsonSchemaDraft07 = {
7528
- $schema: $schema,
7529
- $id: $id,
7538
+ var require$$13 = {
7539
+ $schema: $schema$2,
7540
+ $id: $id$1,
7530
7541
  title: title,
7531
- definitions: definitions,
7532
- type: type,
7542
+ definitions: definitions$1,
7543
+ type: type$1,
7533
7544
  properties: properties$1,
7534
7545
  "default": true
7535
7546
  };
7536
7547
 
7537
- var jsonSchemaDraft07$1 = /*#__PURE__*/Object.freeze({
7538
- __proto__: null,
7539
- $schema: $schema,
7540
- $id: $id,
7541
- title: title,
7542
- definitions: definitions,
7543
- type: type,
7544
- properties: properties$1,
7545
- 'default': jsonSchemaDraft07
7546
- });
7547
-
7548
- var require$$2 = getCjsExportFromNamespace(jsonSchemaDraft07$1);
7549
-
7550
- var IDENTIFIER$1 = /^[a-z_$][a-z0-9_$-]*$/i;
7551
-
7552
- var metaSchema = require$$2;
7548
+ var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
7549
+ var customRuleCode = custom;
7550
+ var metaSchema = require$$13;
7553
7551
 
7554
7552
  var keyword = {
7555
7553
  add: addKeyword,
@@ -7605,7 +7603,7 @@ function addKeyword(keyword, definition) {
7605
7603
  if (RULES.keywords[keyword])
7606
7604
  throw new Error('Keyword ' + keyword + ' is already defined');
7607
7605
 
7608
- if (!IDENTIFIER$1.test(keyword))
7606
+ if (!IDENTIFIER.test(keyword))
7609
7607
  throw new Error('Keyword ' + keyword + ' is not a valid identifier');
7610
7608
 
7611
7609
  if (definition) {
@@ -7655,7 +7653,7 @@ function addKeyword(keyword, definition) {
7655
7653
  keyword: keyword,
7656
7654
  definition: definition,
7657
7655
  custom: true,
7658
- code: custom,
7656
+ code: customRuleCode,
7659
7657
  implements: definition.implements
7660
7658
  };
7661
7659
  ruleGroup.rules.push(rule);
@@ -7725,13 +7723,13 @@ function validateKeyword(definition, throwError) {
7725
7723
  }
7726
7724
 
7727
7725
  var $schema$1 = "http://json-schema.org/draft-07/schema#";
7728
- var $id$1 = "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#";
7726
+ var $id = "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#";
7729
7727
  var description = "Meta-schema for $data reference (JSON Schema extension proposal)";
7730
- var type$1 = "object";
7731
- var required$1 = [
7728
+ var type = "object";
7729
+ var required = [
7732
7730
  "$data"
7733
7731
  ];
7734
- var properties$2 = {
7732
+ var properties = {
7735
7733
  $data: {
7736
7734
  type: "string",
7737
7735
  anyOf: [
@@ -7745,56 +7743,52 @@ var properties$2 = {
7745
7743
  }
7746
7744
  };
7747
7745
  var additionalProperties = false;
7748
- var data$1 = {
7746
+ var require$$12 = {
7749
7747
  $schema: $schema$1,
7750
- $id: $id$1,
7748
+ $id: $id,
7751
7749
  description: description,
7752
- type: type$1,
7753
- required: required$1,
7754
- properties: properties$2,
7750
+ type: type,
7751
+ required: required,
7752
+ properties: properties,
7755
7753
  additionalProperties: additionalProperties
7756
7754
  };
7757
7755
 
7758
- var data$2 = /*#__PURE__*/Object.freeze({
7759
- __proto__: null,
7760
- $schema: $schema$1,
7761
- $id: $id$1,
7762
- description: description,
7763
- type: type$1,
7764
- required: required$1,
7765
- properties: properties$2,
7766
- additionalProperties: additionalProperties,
7767
- 'default': data$1
7768
- });
7769
-
7770
- var require$$1 = getCjsExportFromNamespace(data$2);
7771
-
7772
- var ajv = Ajv;
7773
-
7774
- Ajv.prototype.validate = validate$1;
7775
- Ajv.prototype.compile = compile$1;
7776
- Ajv.prototype.addSchema = addSchema;
7777
- Ajv.prototype.addMetaSchema = addMetaSchema;
7778
- Ajv.prototype.validateSchema = validateSchema;
7779
- Ajv.prototype.getSchema = getSchema;
7780
- Ajv.prototype.removeSchema = removeSchema;
7781
- Ajv.prototype.addFormat = addFormat;
7782
- Ajv.prototype.errorsText = errorsText;
7783
-
7784
- Ajv.prototype._addSchema = _addSchema;
7785
- Ajv.prototype._compile = _compile;
7786
-
7787
- Ajv.prototype.compileAsync = async;
7788
-
7789
- Ajv.prototype.addKeyword = keyword.add;
7790
- Ajv.prototype.getKeyword = keyword.get;
7791
- Ajv.prototype.removeKeyword = keyword.remove;
7792
- Ajv.prototype.validateKeyword = keyword.validate;
7793
-
7794
-
7795
- Ajv.ValidationError = error_classes.Validation;
7796
- Ajv.MissingRefError = error_classes.MissingRef;
7797
- Ajv.$dataMetaSchema = data;
7756
+ var compileSchema = compile_1
7757
+ , resolve = resolve_1
7758
+ , Cache = cache.exports
7759
+ , SchemaObject = schema_obj
7760
+ , stableStringify = fastJsonStableStringify
7761
+ , formats = formats_1
7762
+ , rules = rules$1
7763
+ , $dataMetaSchema = data
7764
+ , util = util$5;
7765
+
7766
+ var ajv = Ajv$1;
7767
+
7768
+ Ajv$1.prototype.validate = validate;
7769
+ Ajv$1.prototype.compile = compile;
7770
+ Ajv$1.prototype.addSchema = addSchema;
7771
+ Ajv$1.prototype.addMetaSchema = addMetaSchema;
7772
+ Ajv$1.prototype.validateSchema = validateSchema;
7773
+ Ajv$1.prototype.getSchema = getSchema;
7774
+ Ajv$1.prototype.removeSchema = removeSchema;
7775
+ Ajv$1.prototype.addFormat = addFormat;
7776
+ Ajv$1.prototype.errorsText = errorsText;
7777
+
7778
+ Ajv$1.prototype._addSchema = _addSchema;
7779
+ Ajv$1.prototype._compile = _compile;
7780
+
7781
+ Ajv$1.prototype.compileAsync = async;
7782
+ var customKeyword = keyword;
7783
+ Ajv$1.prototype.addKeyword = customKeyword.add;
7784
+ Ajv$1.prototype.getKeyword = customKeyword.get;
7785
+ Ajv$1.prototype.removeKeyword = customKeyword.remove;
7786
+ Ajv$1.prototype.validateKeyword = customKeyword.validate;
7787
+
7788
+ var errorClasses = error_classes;
7789
+ Ajv$1.ValidationError = errorClasses.Validation;
7790
+ Ajv$1.MissingRefError = errorClasses.MissingRef;
7791
+ Ajv$1.$dataMetaSchema = $dataMetaSchema;
7798
7792
 
7799
7793
  var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
7800
7794
 
@@ -7807,16 +7801,16 @@ var META_SUPPORT_DATA = ['/properties'];
7807
7801
  * @param {Object} opts optional options
7808
7802
  * @return {Object} ajv instance
7809
7803
  */
7810
- function Ajv(opts) {
7811
- if (!(this instanceof Ajv)) return new Ajv(opts);
7804
+ function Ajv$1(opts) {
7805
+ if (!(this instanceof Ajv$1)) return new Ajv$1(opts);
7812
7806
  opts = this._opts = util.copy(opts) || {};
7813
7807
  setLogger(this);
7814
7808
  this._schemas = {};
7815
7809
  this._refs = {};
7816
7810
  this._fragments = {};
7817
- this._formats = formats_1(opts.format);
7811
+ this._formats = formats(opts.format);
7818
7812
 
7819
- this._cache = opts.cache || new cache;
7813
+ this._cache = opts.cache || new Cache;
7820
7814
  this._loadingSchemas = {};
7821
7815
  this._compilations = [];
7822
7816
  this.RULES = rules();
@@ -7824,7 +7818,7 @@ function Ajv(opts) {
7824
7818
 
7825
7819
  opts.loopRequired = opts.loopRequired || Infinity;
7826
7820
  if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
7827
- if (opts.serialize === undefined) opts.serialize = fastJsonStableStringify;
7821
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
7828
7822
  this._metaOpts = getMetaSchemaOptions(this);
7829
7823
 
7830
7824
  if (opts.formats) addInitialFormats(this);
@@ -7844,7 +7838,7 @@ function Ajv(opts) {
7844
7838
  * @param {Any} data to be validated
7845
7839
  * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
7846
7840
  */
7847
- function validate$1(schemaKeyRef, data) {
7841
+ function validate(schemaKeyRef, data) {
7848
7842
  var v;
7849
7843
  if (typeof schemaKeyRef == 'string') {
7850
7844
  v = this.getSchema(schemaKeyRef);
@@ -7867,7 +7861,7 @@ function validate$1(schemaKeyRef, data) {
7867
7861
  * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
7868
7862
  * @return {Function} validating function
7869
7863
  */
7870
- function compile$1(schema, _meta) {
7864
+ function compile(schema, _meta) {
7871
7865
  var schemaObj = this._addSchema(schema, undefined, _meta);
7872
7866
  return schemaObj.validate || this._compile(schemaObj);
7873
7867
  }
@@ -7890,7 +7884,7 @@ function addSchema(schema, key, _skipValidation, _meta) {
7890
7884
  var id = this._getId(schema);
7891
7885
  if (id !== undefined && typeof id != 'string')
7892
7886
  throw new Error('schema id must be string');
7893
- key = resolve_1.normalizeId(key || id);
7887
+ key = resolve.normalizeId(key || id);
7894
7888
  checkUnique(this, key);
7895
7889
  this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
7896
7890
  return this;
@@ -7967,13 +7961,13 @@ function getSchema(keyRef) {
7967
7961
 
7968
7962
 
7969
7963
  function _getSchemaFragment(self, ref) {
7970
- var res = resolve_1.schema.call(self, { schema: {} }, ref);
7964
+ var res = resolve.schema.call(self, { schema: {} }, ref);
7971
7965
  if (res) {
7972
7966
  var schema = res.schema
7973
7967
  , root = res.root
7974
7968
  , baseId = res.baseId;
7975
- var v = compile_1.call(self, schema, root, undefined, baseId);
7976
- self._fragments[ref] = new schema_obj({
7969
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
7970
+ self._fragments[ref] = new SchemaObject({
7977
7971
  ref: ref,
7978
7972
  fragment: true,
7979
7973
  schema: schema,
@@ -7987,7 +7981,7 @@ function _getSchemaFragment(self, ref) {
7987
7981
 
7988
7982
 
7989
7983
  function _getSchemaObj(self, keyRef) {
7990
- keyRef = resolve_1.normalizeId(keyRef);
7984
+ keyRef = resolve.normalizeId(keyRef);
7991
7985
  return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
7992
7986
  }
7993
7987
 
@@ -8025,7 +8019,7 @@ function removeSchema(schemaKeyRef) {
8025
8019
  this._cache.del(cacheKey);
8026
8020
  var id = this._getId(schemaKeyRef);
8027
8021
  if (id) {
8028
- id = resolve_1.normalizeId(id);
8022
+ id = resolve.normalizeId(id);
8029
8023
  delete this._schemas[id];
8030
8024
  delete this._refs[id];
8031
8025
  }
@@ -8056,17 +8050,17 @@ function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
8056
8050
 
8057
8051
  shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
8058
8052
 
8059
- var id = resolve_1.normalizeId(this._getId(schema));
8053
+ var id = resolve.normalizeId(this._getId(schema));
8060
8054
  if (id && shouldAddSchema) checkUnique(this, id);
8061
8055
 
8062
8056
  var willValidate = this._opts.validateSchema !== false && !skipValidation;
8063
8057
  var recursiveMeta;
8064
- if (willValidate && !(recursiveMeta = id && id == resolve_1.normalizeId(schema.$schema)))
8058
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
8065
8059
  this.validateSchema(schema, true);
8066
8060
 
8067
- var localRefs = resolve_1.ids.call(this, schema);
8061
+ var localRefs = resolve.ids.call(this, schema);
8068
8062
 
8069
- var schemaObj = new schema_obj({
8063
+ var schemaObj = new SchemaObject({
8070
8064
  id: id,
8071
8065
  schema: schema,
8072
8066
  localRefs: localRefs,
@@ -8103,7 +8097,7 @@ function _compile(schemaObj, root) {
8103
8097
  }
8104
8098
 
8105
8099
  var v;
8106
- try { v = compile_1.call(this, schemaObj.schema, root, schemaObj.localRefs); }
8100
+ try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
8107
8101
  catch(e) {
8108
8102
  delete schemaObj.validate;
8109
8103
  throw e;
@@ -8199,12 +8193,12 @@ function addFormat(name, format) {
8199
8193
  function addDefaultMetaSchema(self) {
8200
8194
  var $dataSchema;
8201
8195
  if (self._opts.$data) {
8202
- $dataSchema = require$$1;
8196
+ $dataSchema = require$$12;
8203
8197
  self.addMetaSchema($dataSchema, $dataSchema.$id, true);
8204
8198
  }
8205
8199
  if (self._opts.meta === false) return;
8206
- var metaSchema = require$$2;
8207
- if (self._opts.$data) metaSchema = data(metaSchema, META_SUPPORT_DATA);
8200
+ var metaSchema = require$$13;
8201
+ if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
8208
8202
  self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
8209
8203
  self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
8210
8204
  }
@@ -8255,14 +8249,14 @@ function setLogger(self) {
8255
8249
 
8256
8250
  function noop() {}
8257
8251
 
8258
- var _Ajv = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), ajv, {
8259
- 'default': ajv,
8260
- __moduleExports: ajv
8261
- }));
8252
+ var _Ajv = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
8253
+ __proto__: null,
8254
+ 'default': ajv
8255
+ }, [ajv]));
8262
8256
 
8263
8257
  var $ref = "#/definitions/Schema";
8264
- var $schema$2 = "http://json-schema.org/draft-07/schema#";
8265
- var definitions$1 = {
8258
+ var $schema = "http://json-schema.org/draft-07/schema#";
8259
+ var definitions = {
8266
8260
  ActivityType: {
8267
8261
  anyOf: [
8268
8262
  {
@@ -9905,21 +9899,21 @@ var definitions$1 = {
9905
9899
  type: "string"
9906
9900
  }
9907
9901
  };
9908
- var v2$1 = {
9902
+ var v2 = {
9909
9903
  $ref: $ref,
9910
- $schema: $schema$2,
9911
- definitions: definitions$1
9904
+ $schema: $schema,
9905
+ definitions: definitions
9912
9906
  };
9913
9907
 
9914
9908
  var _ddl2Schema = /*#__PURE__*/Object.freeze({
9915
9909
  __proto__: null,
9916
9910
  $ref: $ref,
9917
- $schema: $schema$2,
9918
- definitions: definitions$1,
9919
- 'default': v2$1
9911
+ $schema: $schema,
9912
+ definitions: definitions,
9913
+ 'default': v2
9920
9914
  });
9921
9915
 
9922
- var Ajv$1 = ajv || _Ajv;
9916
+ var Ajv = ajv || _Ajv;
9923
9917
  var ddl2Schema = _ddl2Schema;
9924
9918
  var options = {
9925
9919
  allErrors: false,
@@ -9927,7 +9921,7 @@ var options = {
9927
9921
  jsonPointers: false
9928
9922
  };
9929
9923
  function doValidate(ddl, schema) {
9930
- var ajv = new Ajv$1(options);
9924
+ var ajv = new Ajv(options);
9931
9925
  var validate = ajv.compile(schema);
9932
9926
  var success = validate(ddl);
9933
9927
  return {
@@ -9943,5 +9937,5 @@ function isDDL2Schema(ref) {
9943
9937
  return ref.version !== undefined && ref.datasources !== undefined && ref.dataviews !== undefined;
9944
9938
  }
9945
9939
 
9946
- export { BUILD_VERSION, v1 as DDL1, v2 as DDL2, PKG_NAME, PKG_VERSION, ddl2Schema, isDDL2Schema, upgrade$1 as upgrade, validate2 };
9940
+ export { BUILD_VERSION, v1 as DDL1, v2$1 as DDL2, PKG_NAME, PKG_VERSION, ddl2Schema, isDDL2Schema, upgrade, validate2 };
9947
9941
  //# sourceMappingURL=index.es6.js.map