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EAAU,KAAK,EAAI,YAAY,KAAK,OAEhB,MAAlB,EAAa,SACf,EAAU,KAAK,gBAAkB,EAAa,QAAI,KAEhD,EAAU,OAAS,GACrB,EAAM,KAAK,+BAAoC,EAAU,KAAK,MAAS,aAEzE,QAAQ,IAAI,EAAM,KAAK,KACD,MAAlB,EAAI,WAEN,IAAK,KADL,EAAO,EAAI,WAET,EAAI,EAAK,GACT,EAAM,EAAG,EAAG,EAAS,MAGzB,GAAiB,MAAb,EAAI,MACN,OAAO,EAAM,aAAc,EAAI,MAAO,EAAS,KAGrD,GAEI,KAAM,EAAM,IAK3B,GAAE,KAAK","file":"/npm/json-spec@0.5.0/lib/json-spec.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/json-spec@0.5.0/lib/json-spec.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Generated by CoffeeScript 1.8.0\n(function() {\n  var ErrorCollector, ErrorListener, ErrorReporter, EventEmitter, ISO_8601_REGEXP, JSONSpec, SINGLE_LINE_REGEXP, URI_REGEXP, Util, data, enum_to_string, fs, json_spec, path, spec, visit,\n    __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n    __slice = [].slice,\n    __hasProp = {}.hasOwnProperty,\n    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n\n  EventEmitter = require('events').EventEmitter;\n\n  fs = require('fs');\n\n  Util = require('inote-util').Util;\n\n  SINGLE_LINE_REGEXP = /\\n/;\n\n  ISO_8601_REGEXP = Util.iso_8601_regexp();\n\n  URI_REGEXP = /^[a-z]+\\:.+/;\n\n  ErrorListener = (function() {\n    function ErrorListener() {\n      this.on_errors = __bind(this.on_errors, this);\n      this.on_error = __bind(this.on_error, this);\n      this.has_error = __bind(this.has_error, this);\n      this.error_count = __bind(this.error_count, this);\n    }\n\n    ErrorListener.prototype._error_count = 0;\n\n    ErrorListener.prototype.error_count = function() {\n      return this._error_count;\n    };\n\n    ErrorListener.prototype.has_error = function() {\n      return this._error_count > 0;\n    };\n\n    ErrorListener.prototype.on_error = function() {\n      var message, tail, type;\n      type = arguments[0], message = arguments[1], tail = 3 <= arguments.length ? __slice.call(arguments, 2) : [];\n      throw new Error(\"Not implemented\");\n    };\n\n    ErrorListener.prototype.on_errors = function(errors) {\n      var error, _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = errors.length; _i < _len; _i++) {\n        error = errors[_i];\n        _results.push(this.on_error.apply(this, error));\n      }\n      return _results;\n    };\n\n    return ErrorListener;\n\n  })();\n\n  ErrorReporter = (function(_super) {\n    __extends(ErrorReporter, _super);\n\n    function ErrorReporter() {\n      this.on_error = __bind(this.on_error, this);\n      return ErrorReporter.__super__.constructor.apply(this, arguments);\n    }\n\n    ErrorReporter.prototype.on_error = function() {\n      var message, tail, type;\n      type = arguments[0], message = arguments[1], tail = 3 <= arguments.length ? __slice.call(arguments, 2) : [];\n      console.error.apply(console, [type, message].concat(__slice.call(tail)));\n      return this._error_count++;\n    };\n\n    return ErrorReporter;\n\n  })(ErrorListener);\n\n  ErrorCollector = (function(_super) {\n    __extends(ErrorCollector, _super);\n\n    function ErrorCollector() {\n      this.on_error = __bind(this.on_error, this);\n      return ErrorCollector.__super__.constructor.apply(this, arguments);\n    }\n\n    ErrorCollector.prototype.errors = [];\n\n    ErrorCollector.prototype.on_error = function() {\n      var message, tail, type;\n      type = arguments[0], message = arguments[1], tail = 3 <= arguments.length ? __slice.call(arguments, 2) : [];\n      return this.errors.push([type, message].concat(__slice.call(tail)));\n    };\n\n    return ErrorCollector;\n\n  })(ErrorListener);\n\n  enum_to_string = function(options) {\n    if (options.length === 1) {\n      return options[0];\n    } else {\n      return \"one of \" + Util.smart_join(options, \", \", \" or \");\n    }\n  };\n\n  JSONSpec = (function(_super) {\n    __extends(JSONSpec, _super);\n\n    function JSONSpec() {\n      this._make_validation_error_message = __bind(this._make_validation_error_message, this);\n      this._emit_validation_error = __bind(this._emit_validation_error, this);\n      this._debug = __bind(this._debug, this);\n      this._validate_attribute = __bind(this._validate_attribute, this);\n      this.validate = __bind(this.validate, this);\n      this._normalize_attributes = __bind(this._normalize_attributes, this);\n      this.normalize = __bind(this.normalize, this);\n      this.parse_spec = __bind(this.parse_spec, this);\n      this.load_spec = __bind(this.load_spec, this);\n      return JSONSpec.__super__.constructor.apply(this, arguments);\n    }\n\n    JSONSpec.prototype.load_spec = function(file) {\n      var err, src;\n      try {\n        src = fs.readFileSync(file);\n      } catch (_error) {\n        err = _error;\n        throw new Error(\"Error loading JSON file at \\\"\" + file + \"\\\".\", err);\n      }\n      try {\n        return this.parse_spec(src.toString());\n      } catch (_error) {\n        err = _error;\n        throw err;\n      }\n    };\n\n    JSONSpec.prototype.parse_spec = function(src) {\n      var err;\n      if (typeof src === 'string') {\n        try {\n          src = JSON.parse(src);\n        } catch (_error) {\n          err = _error;\n          throw new Error(\"Error parsing JSON document.\", err);\n        }\n      }\n      return this.normalize(src);\n    };\n\n    JSONSpec.prototype.normalize = function(src) {\n      var dst, k, v;\n      if (src.datatype != null) {\n        return this._normalize_attributes(src);\n      } else {\n        dst = {};\n        for (k in src) {\n          v = src[k];\n          dst[k] = this._normalize_attributes(v);\n        }\n        return dst;\n      }\n    };\n\n    JSONSpec.prototype._normalize_attributes = function(src) {\n      var dst, e, err, k, s, v, _i, _j, _len, _len1;\n      if (Array.isArray(src)) {\n        dst = [];\n        for (_i = 0, _len = src.length; _i < _len; _i++) {\n          s = src[_i];\n          dst.push(this._normalize_attributes(s));\n        }\n        return dst;\n      } else {\n        dst = {};\n        for (k in src) {\n          v = src[k];\n          switch (k) {\n            case 'datatype':\n            case 'default':\n            case 'description':\n              dst[k] = v;\n              break;\n            case 'attributes':\n              dst[k] = this.normalize(v);\n              break;\n            case 'items':\n              dst[k] = this._normalize_attributes(v);\n              break;\n            case 'enum':\n            case 'constraints':\n            case 'format':\n              if (!Array.isArray(v)) {\n                v = [v];\n              }\n              if (k === 'format') {\n                for (_j = 0, _len1 = v.length; _j < _len1; _j++) {\n                  e = v[_j];\n                  if (typeof e === 'object') {\n                    if ((e.matching != null) && typeof e.matching === 'string') {\n                      e.matching = new RegExp(e.matching);\n                    } else if ((e['not-matching'] != null) && typeof e['not-matching'] === 'string') {\n                      e['not-matching'] = new RegExp(e['not-matching']);\n                    }\n                  }\n                }\n              }\n              dst[k] = v;\n              break;\n            case 'range':\n              if (v.length < 3) {\n                v.push(\"inclusive\");\n              }\n              dst[k] = v;\n              break;\n            default:\n              err = new Error(\"Specification Error: Found unexpected parameter \\\"\" + k + \"\\\" = \\\"\" + v + \"\\\" in \\\"\" + src + \"\\\".\");\n              console.error(err);\n              throw err;\n          }\n        }\n        if ((dst.items != null) && !dst.datatype === 'array') {\n          err = new Error(\"Specification Error: Found 'items' for non-array datatype \\\"\" + dst.datatype + \"\\\".\");\n          console.error(err);\n          throw err;\n        }\n        return dst;\n      }\n    };\n\n    JSONSpec.prototype.validate = function(spec, data, path, error_listener) {\n      var k, p, s, v, valid, _ref, _results;\n      if (path == null) {\n        path = [];\n      }\n      if (error_listener == null) {\n        error_listener = new ErrorReporter();\n      }\n      valid = true;\n      if (path == null) {\n        path = [];\n      }\n      if (spec.datatype != null) {\n        if (!this._validate_attribute(spec, data, path, error_listener)) {\n          valid = false;\n        }\n        return valid;\n      } else {\n        _results = [];\n        for (k in data) {\n          v = data[k];\n          p = [].concat(path);\n          p.push(k);\n          s = (_ref = spec[k]) != null ? _ref : spec['*'];\n          if (s != null) {\n            if (!this._validate_attribute(s, v, p, error_listener)) {\n              _results.push(valid = false);\n            } else {\n              _results.push(void 0);\n            }\n          } else {\n            _results.push(this._emit_validation_error(error_listener, data, spec, 'unexpected', path, v, k));\n          }\n        }\n        return _results;\n      }\n    };\n\n    JSONSpec.prototype._validate_attribute = function(spec, attr, path, error_listener) {\n      var alt, elt, error_collector, f, i, k, p, s, v, valid, _i, _j, _k, _len, _len1, _len2, _ref, _ref1;\n      if (Array.isArray(spec)) {\n        error_collector = new ErrorCollector();\n        for (i = _i = 0, _len = spec.length; _i < _len; i = ++_i) {\n          alt = spec[i];\n          if (this._validate_attribute(alt, attr, path, error_collector)) {\n            return true;\n          }\n        }\n        this._emit_validation_error(error_listener, attr, spec, 'no-matching-alt', path, attr, \"\\n\\t\" + error_collector.errors.join(\"\\n\\t\"));\n        return false;\n      } else {\n        valid = true;\n        if (attr == null) {\n          if (((spec != null ? spec.constraints : void 0) != null) && __indexOf.call(spec.constraints, 'required') >= 0) {\n            this._emit_validation_error(error_listener, attr, spec, 'required', path, attr);\n            valid = false;\n          } else {\n            this._debug(\"ok\", \"(null)\", path);\n          }\n        } else {\n          switch (spec.datatype) {\n            case 'string':\n              if (typeof attr !== 'string') {\n                this._emit_validation_error(error_listener, attr, spec, 'datatype', path, attr, 'string');\n                valid = false;\n              } else {\n                this._debug(\"ok\", \"(string)\", path);\n              }\n              break;\n            case 'number':\n              if (typeof attr !== 'number') {\n                this._emit_validation_error(error_listener, attr, spec, 'datatype', path, attr, 'number');\n                valid = false;\n              } else {\n                this._debug(\"ok\", \"(number)\", path);\n              }\n              break;\n            case 'array':\n              if (!Array.isArray(attr)) {\n                this._emit_validation_error(error_listener, attr, spec, 'datatype', path, attr, 'array');\n                valid = false;\n              } else {\n                this._debug(\"ok\", \"(array)\", path);\n                for (i = _j = 0, _len1 = attr.length; _j < _len1; i = ++_j) {\n                  elt = attr[i];\n                  p = [].concat(path);\n                  p.push(\"[\" + i + \"]\");\n                  if (!this._validate_attribute(spec.items, elt, p, error_listener)) {\n                    valid = false;\n                  }\n                }\n              }\n              break;\n            case 'map':\n              if (typeof attr !== 'object') {\n                this._emit_validation_error(error_listener, attr, spec, 'datatype', path, attr, 'object');\n              } else {\n                this._debug(\"ok\", \"(map)\", path, spec);\n                for (k in attr) {\n                  v = attr[k];\n                  p = [].concat(path);\n                  p.push(k);\n                  s = (_ref = spec.attributes[k]) != null ? _ref : spec.attributes['*'];\n                  if (s != null) {\n                    if (!this._validate_attribute(s, v, p, error_listener)) {\n                      valid = false;\n                    }\n                  } else {\n                    valid = false;\n                    this._emit_validation_error(error_listener, data, spec, 'unexpected', path, v, k);\n                  }\n                }\n              }\n              break;\n            default:\n              this._emit_validation_error(error_listener, attr, spec, 'not-supported', path, spec.datatype);\n              valid = false;\n          }\n          if (spec[\"enum\"] != null) {\n            if (__indexOf.call(spec[\"enum\"], attr) < 0) {\n              this._emit_validation_error(error_listener, attr, spec, 'enum', path, attr, spec[\"enum\"]);\n              valid = false;\n            } else {\n              this._debug(\"ok\", \"(enum)\", path);\n            }\n          }\n          if (spec.range != null) {\n            if (spec.range.length === 2 || spec.range[2] === 'inclusive') {\n              if (!((spec.range[0] <= attr && attr <= spec.range[1]))) {\n                this._emit_validation_error(error_listener, attr, spec, \"range\", path, attr, spec.range);\n                valid = false;\n              } else {\n                this._debug(\"ok\", \"(range)\", path);\n              }\n            } else {\n              if (!((spec.range[0] < attr && attr < spec.range[1]))) {\n                this._emit_validation_error(error_listener, attr, spec, \"range\", path, attr, spec.range);\n                valid = false;\n              } else {\n                this._debug(\"ok\", \"(range)\", path);\n              }\n            }\n          }\n          if (spec.format != null) {\n            _ref1 = spec.format;\n            for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {\n              f = _ref1[_k];\n              if (typeof f === 'string') {\n                switch (f) {\n                  case 'singleline':\n                    if (SINGLE_LINE_REGEXP.test(attr)) {\n                      this._emit_validation_error(error_listener, attr, spec, \"format-forbidden\", path, attr, SINGLE_LINE_REGEXP);\n                      valid = false;\n                    } else {\n                      this._debug(\"ok\", \"(singleline)\", path);\n                    }\n                    break;\n                  case 'iso8601date':\n                    if (!ISO_8601_REGEXP.test(attr)) {\n                      this._emit_validation_error(error_listener, attr, spec, \"format-required\", path, attr, ISO_8601_REGEXP);\n                      valid = false;\n                    } else {\n                      this._debug(\"ok\", \"(iso8601date)\", path);\n                    }\n                    break;\n                  case 'uri':\n                    if (!URI_REGEXP.test(attr)) {\n                      this._emit_validation_error(error_listener, attr, spec, \"format-required\", path, attr, URI_REGEXP);\n                      valid = false;\n                    } else {\n                      this._debug(\"ok\", \"(uri)\", path);\n                    }\n                }\n              } else if (f.matching != null) {\n                if (!f.matching.test(attr)) {\n                  this._emit_validation_error(error_listener, attr, spec, \"format-required\", path, attr, f.matching);\n                }\n              } else if (f['not-matching'] != null) {\n                if (f['not-matching'].test(attr)) {\n                  this._emit_validation_error(error_listener, attr, spec, \"format-forbidden\", path, attr, f['not-matching']);\n                }\n              }\n            }\n          }\n        }\n        this._debug(\"returning\", valid, path);\n        return valid;\n      }\n    };\n\n    JSONSpec.prototype._debug = function() {\n      var message, tail, type;\n      type = arguments[0], message = arguments[1], tail = 3 <= arguments.length ? __slice.call(arguments, 2) : [];\n    };\n\n    JSONSpec.prototype._emit_validation_error = function(listener, data, spec, message_id, path, value, expected) {\n      var message;\n      message = this._make_validation_error_message(data, spec, message_id, path, value, expected);\n      if (message_id === 'no-matching-alt') {\n        return listener != null ? listener.on_error(\"validation-error\", message, expected) : void 0;\n      } else {\n        return listener != null ? listener.on_error(\"validation-error\", message) : void 0;\n      }\n    };\n\n    JSONSpec.prototype._make_validation_error_message = function(data, spec, message_id, path, value, expected) {\n      var message, _ref;\n      path = \"`\" + (path.join('.')) + \"`\";\n      switch (message_id) {\n        case 'required':\n          message = \"Required attribute not found at \" + path + \".\";\n          break;\n        case 'datatype':\n          message = \"Expected datatype \\\"\" + expected + \"\\\" but found \" + (typeof value) + \" at \" + path + \".\";\n          break;\n        case 'enum':\n          message = \"Expected \" + enum_to_string(expected.map(function(x) {\n            return \"\\\"\" + x + \"\\\"\";\n          })) + (\" but found \\\"\" + value + \"\\\" at \" + path + \".\");\n          break;\n        case 'range':\n          message = \"Expected value between \" + expected[0] + \" and \" + expected[1] + \" (\" + ((_ref = expected[2]) != null ? _ref : 'inclusive') + \") but found \" + value + \" at \" + path + \".\";\n          break;\n        case 'format-required':\n          message = \"Expected value to match \" + expected + \" but found \\\"\" + value + \"\\\" at \" + path + \".\";\n          break;\n        case 'format-forbidden':\n          message = \"Expected value not to match \" + expected + \" but found \\\"\" + value + \"\\\" at \" + path + \".\";\n          break;\n        case 'unexpected':\n          message = \"Unexpected attribute \" + expected + \" at \" + path + \".\";\n          break;\n        case 'no-matching-alt':\n          message = \"No matching alternative at \" + path + \".\";\n          break;\n        default:\n          message = \"Validation error (\" + message_id + \").\";\n          if (expected != null) {\n            message += \" Expected \\\"\" + expected + \"\\\".\";\n          }\n          if (value != null) {\n            message += \" Found \\\"\" + (JSON.stringify(value)) + \"\\\".\";\n          }\n          message += \" At \" + path;\n      }\n      return message;\n    };\n\n    return JSONSpec;\n\n  })(EventEmitter);\n\n  exports.JSONSpec = JSONSpec;\n\n  if (require.main === module) {\n    if (process.argv.length < 3 || /^-?-?h(elp)?$/.test(process.argv[2])) {\n      path = require('path');\n      console.error(\"Use: \" + (path.basename(process.argv[1])) + \" validate SPEC.JSON DATA.JSON\");\n      console.error(\" or: cat DATA.JSON | \" + (path.basename(process.argv[1])) + \" validate SPEC.JSON\");\n      process.exit(1);\n    } else {\n      json_spec = new JSONSpec();\n      spec = json_spec.load_spec(process.argv[3]);\n      switch (process.argv[2]) {\n        case 'validate':\n          if (process.argv.length >= 4) {\n            data = Util.load_json_file_sync(process.argv[4]);\n          } else {\n            data = Util.load_json_stdin_sync();\n          }\n          if (!json_spec.validate(spec, data)) {\n            process.exit(2);\n          }\n          break;\n        case 'normalize':\n          console.log(JSON.stringify(spec, null, 2));\n          break;\n        case 'to-text':\n          visit = (function(_this) {\n            return function(key, elt, indent) {\n              var bracketed, e, i, k, parts, v, _i, _len, _ref, _results;\n              if (Array.isArray(elt)) {\n                console.log(\"\" + indent + \" (alternative formats allowed)\");\n                indent += \"  \";\n                _results = [];\n                for (i = _i = 0, _len = elt.length; _i < _len; i = ++_i) {\n                  e = elt[i];\n                  _results.push(visit(\"(alternative #\" + (i + 1) + \")\", e, indent));\n                }\n                return _results;\n              } else {\n                parts = [];\n                if (indent.length > 0) {\n                  parts.push(indent);\n                }\n                if (key != null) {\n                  parts.push(key);\n                  parts.push(\" - \");\n                }\n                if (elt.description != null) {\n                  parts.push(elt.description + \" \");\n                }\n                bracketed = [];\n                if (elt.datatype != null) {\n                  bracketed.push(elt.datatype);\n                }\n                if (elt.format != null) {\n                  bracketed.push((elt.format.map(function(x) {\n                    if (x.matching != null) {\n                      return \"matching \" + x.matching;\n                    } else if (x['not-matching']) {\n                      return \"not matching \" + x['not-matching'];\n                    } else {\n                      return x;\n                    }\n                  })).join(','));\n                }\n                if (elt[\"enum\"] != null) {\n                  bracketed.push(enum_to_string(elt[\"enum\"].map(function(x) {\n                    return \"\\\"\" + x + \"\\\"\";\n                  })));\n                }\n                if (elt.constraints != null) {\n                  bracketed.push(elt.constraints.join(', '));\n                }\n                if (bracketed.length > 0) {\n                  parts.push(\"[\" + (bracketed.join(', ')) + \"]\");\n                }\n                console.log(parts.join(\"\"));\n                if (elt.attributes != null) {\n                  _ref = elt.attributes;\n                  for (k in _ref) {\n                    v = _ref[k];\n                    visit(k, v, indent + \"  \");\n                  }\n                }\n                if (elt.items != null) {\n                  return visit(\"(elements)\", elt.items, indent + \"  \");\n                }\n              }\n            };\n          })(this);\n          visit(null, spec, \"\");\n          break;\n        case 'to-markdown':\n          visit = (function(_this) {\n            return function(key, elt, indent) {\n              var bracketed, e, i, k, parts, v, _i, _len, _ref, _results;\n              parts = [];\n              if (indent.length > 0) {\n                parts.push(indent);\n                parts.push(\" * \");\n              }\n              if (key != null) {\n                if (key === \"*\") {\n                  parts.push(\"*(any key)*\");\n                } else if (key === \"(elements)\") {\n                  parts.push(\"*(elements)*\");\n                } else {\n                  parts.push(\"**`\" + key + \"`**\");\n                }\n                parts.push(\" - \");\n              } else {\n                parts.push(\"# \");\n              }\n              if (Array.isArray(elt)) {\n                parts.push(\"(alternative formats allowed)\");\n                console.log(parts.join(\"\"));\n                indent += \"  \";\n                _results = [];\n                for (i = _i = 0, _len = elt.length; _i < _len; i = ++_i) {\n                  e = elt[i];\n                  _results.push(visit(\"(alternative #\" + (i + 1) + \")\", e, indent));\n                }\n                return _results;\n              } else {\n                if (elt.description != null) {\n                  parts.push(\"*\" + elt.description + \"* \");\n                }\n                bracketed = [];\n                if (elt.datatype != null) {\n                  bracketed.push(elt.datatype);\n                }\n                if (elt.format != null) {\n                  bracketed.push((elt.format.map(function(x) {\n                    if (x.matching != null) {\n                      return \"matching `\" + x.matching + \"`\";\n                    } else if (x['not-matching']) {\n                      return \"not matching `\" + x['not-matching'] + \"`\";\n                    } else {\n                      return x;\n                    }\n                  })).join(', '));\n                }\n                if (elt[\"enum\"] != null) {\n                  bracketed.push(enum_to_string(elt[\"enum\"].map(function(x) {\n                    return \"\\\"\" + x + \"\\\"\";\n                  })));\n                }\n                if (elt.range != null) {\n                  bracketed.push(\"between \" + elt.range[0] + \" and \" + elt.range[1] + \", \" + elt.range[2]);\n                }\n                if (elt.constraints != null) {\n                  bracketed.push(elt.constraints.join(', '));\n                }\n                if (elt[\"default\"] != null) {\n                  bracketed.push(\"defaults to `\" + elt[\"default\"] + \"`\");\n                }\n                if (bracketed.length > 0) {\n                  parts.push(\"<small style=\\\"color:#666;\\\">[\" + (bracketed.join(', ')) + \"]</small>\");\n                }\n                console.log(parts.join(\"\"));\n                if (elt.attributes != null) {\n                  _ref = elt.attributes;\n                  for (k in _ref) {\n                    v = _ref[k];\n                    visit(k, v, indent + \"  \");\n                  }\n                }\n                if (elt.items != null) {\n                  return visit(\"(elements)\", elt.items, indent + \"  \");\n                }\n              }\n            };\n          })(this);\n          visit(null, spec, \"\");\n      }\n    }\n  }\n\n}).call(this);\n"]}