// instrument by jscoverage, do not modifly this file
(function () {
  var BASE;
  if (typeof global === 'object') {
    BASE = global;
  } else if (typeof window === 'object') {
    BASE = window;
  } else {
    throw new Error('[jscoverage] unknow ENV!');
  }
  if (!BASE._$jscoverage) {
    BASE._$jscoverage = {};
    BASE._$jscoverage_cond = {};
    BASE._$jscoverage_done = function (file, line, express) {
      if (arguments.length === 2) {
        BASE._$jscoverage[file][line] ++;
      } else {
        BASE._$jscoverage_cond[file][line] ++;
        return express;
      }
    };
    BASE._$jscoverage_init = function (base, file, lines) {
      var tmp = [];
      for (var i = 0; i < lines.length; i ++) {
        tmp[lines[i]] = 0;
      }
      base[file] = tmp;
    };
  }
})();
_$jscoverage_init(_$jscoverage, "lib/semverext.js",[1,2,3,13,15,16,18,20,22,25,27,30,31,36,37,41,43,44,45,46,49,50,57,58,63,64,69]);
_$jscoverage_init(_$jscoverage_cond, "lib/semverext.js",[22,27,30,36,36,41,41,43,43,45,49,57,63]);
_$jscoverage["lib/semverext.js"].source = ["var semver = require('semver');","var SemVer = semver.SemVer;","var Range = semver.Range;","","/**"," * Determine if version is greater than all the versions possible in the range."," * "," * @param version"," * @param range"," * @param loose"," * @return {boolean}"," */","module.exports.gtr = function(version, range, loose) {","\t","\tversion = new SemVer(version, loose);","\trange = new Range(range, loose);","\t","\tfor (var i = 0, l = range.set.length; i < l ; i++) {","\t\t","\t\tvar comparitors = range.set[i].slice();","\t\t","\t\tif (!comparitors.length) {","\t\t\t","\t\t\t// If no comparitors in the range then version is NOT greater than it!","\t\t\treturn false;","\t\t\t","\t\t} else if(comparitors.length == 1) {","\t\t\t","\t\t\t// If we have a semver.ANY (a {}) then version is NOT greater than it!","\t\t\tif (comparitors[0].value === \"\") {","\t\t\t\treturn false;","\t\t\t}","\t\t\t","\t\t\t// If one entry in comparitors, and the comparitor is gt then we're never going to greater than it regardless","\t\t\t// of whether version is less than or more than the range start version","\t\t\tif(comparitors[0].operator === \">\" || comparitors[0].operator === \">=\") {","\t\t\t\treturn false;","\t\t\t}","\t\t\t","\t\t\t// If one entry in comparitors, and the comparitor is lt then we can return false if we satisfy it","\t\t\tif(comparitors[0].operator === \"<\" || comparitors[0].operator === \"<=\") {","\t\t\t\t","\t\t\t\tif(comparitors[0].operator === \"<=\" && semver.lte(version, comparitors[0].semver, loose)) {","\t\t\t\t\treturn false;","\t\t\t\t} else if(semver.lt(version, comparitors[0].semver, loose)) {","\t\t\t\t\treturn false;","\t\t\t\t}","\t\t\t\t","\t\t\t} else if(semver.lte(version, comparitors[0].semver, loose)) {","\t\t\t\treturn false;","\t\t\t}","\t\t\t","\t\t} else {","\t\t\t","\t\t\t// If two entries in comparitors then first ALWAYS starts with \">=\"","\t\t\t// Return false if version is less than range start version","\t\t\tif(semver.lt(version, comparitors[0].semver, loose)) {","\t\t\t\treturn false;","\t\t\t}","\t\t\t","\t\t\t// If two entries in comparitors then second ALWAYS starts with \"<\"","\t\t\t// Return false if version is less than end version","\t\t\tif(semver.lt(version, comparitors[1].semver, loose)) {","\t\t\t\treturn false;","\t\t\t}","\t\t}","\t}","\t","\treturn true;","};"];
_$jscoverage_done("lib/semverext.js", 1);
var semver = require("semver");

_$jscoverage_done("lib/semverext.js", 2);
var SemVer = semver.SemVer;

_$jscoverage_done("lib/semverext.js", 3);
var Range = semver.Range;

_$jscoverage_done("lib/semverext.js", 13);
module.exports.gtr = function(version, range, loose) {
    _$jscoverage_done("lib/semverext.js", 15);
    version = new SemVer(version, loose);
    _$jscoverage_done("lib/semverext.js", 16);
    range = new Range(range, loose);
    _$jscoverage_done("lib/semverext.js", 18);
    for (var i = 0, l = range.set.length; i < l; i++) {
        _$jscoverage_done("lib/semverext.js", 20);
        var comparitors = range.set[i].slice();
        _$jscoverage_done("lib/semverext.js", 22);
        if (_$jscoverage_done("lib/semverext.js", 22, !comparitors.length)) {
            _$jscoverage_done("lib/semverext.js", 25);
            return false;
        } else {
            _$jscoverage_done("lib/semverext.js", 27);
            if (_$jscoverage_done("lib/semverext.js", 27, comparitors.length == 1)) {
                _$jscoverage_done("lib/semverext.js", 30);
                if (_$jscoverage_done("lib/semverext.js", 30, comparitors[0].value === "")) {
                    _$jscoverage_done("lib/semverext.js", 31);
                    return false;
                }
                _$jscoverage_done("lib/semverext.js", 36);
                if (_$jscoverage_done("lib/semverext.js", 36, comparitors[0].operator === ">") || _$jscoverage_done("lib/semverext.js", 36, comparitors[0].operator === ">=")) {
                    _$jscoverage_done("lib/semverext.js", 37);
                    return false;
                }
                _$jscoverage_done("lib/semverext.js", 41);
                if (_$jscoverage_done("lib/semverext.js", 41, comparitors[0].operator === "<") || _$jscoverage_done("lib/semverext.js", 41, comparitors[0].operator === "<=")) {
                    _$jscoverage_done("lib/semverext.js", 43);
                    if (_$jscoverage_done("lib/semverext.js", 43, comparitors[0].operator === "<=") && _$jscoverage_done("lib/semverext.js", 43, semver.lte(version, comparitors[0].semver, loose))) {
                        _$jscoverage_done("lib/semverext.js", 44);
                        return false;
                    } else {
                        _$jscoverage_done("lib/semverext.js", 45);
                        if (_$jscoverage_done("lib/semverext.js", 45, semver.lt(version, comparitors[0].semver, loose))) {
                            _$jscoverage_done("lib/semverext.js", 46);
                            return false;
                        }
                    }
                } else {
                    _$jscoverage_done("lib/semverext.js", 49);
                    if (_$jscoverage_done("lib/semverext.js", 49, semver.lte(version, comparitors[0].semver, loose))) {
                        _$jscoverage_done("lib/semverext.js", 50);
                        return false;
                    }
                }
            } else {
                _$jscoverage_done("lib/semverext.js", 57);
                if (_$jscoverage_done("lib/semverext.js", 57, semver.lt(version, comparitors[0].semver, loose))) {
                    _$jscoverage_done("lib/semverext.js", 58);
                    return false;
                }
                _$jscoverage_done("lib/semverext.js", 63);
                if (_$jscoverage_done("lib/semverext.js", 63, semver.lt(version, comparitors[1].semver, loose))) {
                    _$jscoverage_done("lib/semverext.js", 64);
                    return false;
                }
            }
        }
    }
    _$jscoverage_done("lib/semverext.js", 69);
    return true;
};