/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const _SV=require("semver");function SemVer(){this._reference=null};SemVer.prototype.parse=function(semver){return _SV.parse(semver)};SemVer.prototype.match=function(semver){return _SV.satisfies(this._reference,semver)};SemVer.prototype.isValid=function(semver){var ret;try{ret=!!_SV.valid(semver)}catch(e){ret=false};return ret};SemVer.prototype.isValidRange=function(range){var ret;try{ret=!!_SV.validRange(range)}catch(e){ret=false};return ret};SemVer.prototype.satisfiesRange=function(semver,range){var ret;try{ret=_SV.satisfies(semver,range)}catch(e){ret=false};return ret};SemVer.prototype.minVersion=function(semver){var ret;try{ret=_SV.minVersion(semver)}catch(e){ret=null}return ret};SemVer.prototype.prerelease=function(semver){var ret;try{ret=_SV.prerelease(semver)}catch(e){ret=null}return ret};SemVer.prototype.eq=function(semver1,semver2){return _SV.eq(semver1,semver2)};SemVer.prototype.lt=function(semver1,semver2){return _SV.lt(semver1,semver2)};SemVer.prototype.lte=function(semver1,semver2){return _SV.lte(semver1,semver2)};SemVer.prototype.gt=function(semver1,semver2){return _SV.gt(semver1,semver2)};SemVer.prototype.gte=function(semver1,semver2){return _SV.gte(semver1,semver2)};SemVer.prototype.getReference=function(){return this._reference};SemVer.prototype.setReference=function(refSemVer,minSemVer){var ret=_SV.satisfies(refSemVer,">="+minSemVer);if(ret){this._reference=refSemVer}return ret};SemVer.prototype.major=function(semVer){return _SV.major(semVer)};SemVer.prototype.minor=function(semVer){return _SV.minor(semVer)};SemVer.prototype.patch=function(semVer){return _SV.patch(semVer)};module.exports=SemVer;