{"version":3,"file":"constants.cjs","names":[],"sources":["../../../src/utils/semver/constants.ts"],"sourcesContent":["// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts\n// those constants are based on https://www.rubydoc.info/gems/semantic_range/3.0.0/SemanticRange#BUILDIDENTIFIER-constant\n// Copyright (c)\n// vite-plugin-federation is licensed under Mulan PSL v2.\n// You can use this software according to the terms and conditions of the Mulan PSL v2.\n// You may obtain a copy of Mulan PSL v2 at:\n//      http://license.coscl.org.cn/MulanPSL2\n// THIS SOFTWARE IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.\n// See the Mulan PSL v2 for more details.\n\nconst buildIdentifier = '[0-9A-Za-z-]+';\nconst build = `(?:\\\\+(${buildIdentifier}(?:\\\\.${buildIdentifier})*))`;\nconst numericIdentifier = '0|[1-9]\\\\d*';\nconst numericIdentifierLoose = '[0-9]+';\nconst nonNumericIdentifier = '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*';\nconst preReleaseIdentifierLoose = `(?:${numericIdentifierLoose}|${nonNumericIdentifier})`;\nconst preReleaseLoose = `(?:-?(${preReleaseIdentifierLoose}(?:\\\\.${preReleaseIdentifierLoose})*))`;\nconst preReleaseIdentifier = `(?:${numericIdentifier}|${nonNumericIdentifier})`;\nconst preRelease = `(?:-(${preReleaseIdentifier}(?:\\\\.${preReleaseIdentifier})*))`;\nconst xRangeIdentifier = `${numericIdentifier}|x|X|\\\\*`;\nconst xRangePlain = `[v=\\\\s]*(${xRangeIdentifier})(?:\\\\.(${xRangeIdentifier})(?:\\\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`;\nexport const hyphenRange = `^\\\\s*(${xRangePlain})\\\\s+-\\\\s+(${xRangePlain})\\\\s*$`;\nconst mainVersionLoose = `(${numericIdentifierLoose})\\\\.(${numericIdentifierLoose})\\\\.(${numericIdentifierLoose})`;\nconst loosePlain = `[v=\\\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`;\nconst gtlt = '((?:<|>)?=?)';\nexport const comparatorTrim = `(\\\\s*)${gtlt}\\\\s*(${loosePlain}|${xRangePlain})`;\nconst loneTilde = '(?:~>?)';\nexport const tildeTrim = `(\\\\s*)${loneTilde}\\\\s+`;\nconst loneCaret = '(?:\\\\^)';\nexport const caretTrim = `(\\\\s*)${loneCaret}\\\\s+`;\nexport const star = '(<|>)?=?\\\\s*\\\\*';\nexport const caret = `^${loneCaret}${xRangePlain}$`;\nconst mainVersion = `(${numericIdentifier})\\\\.(${numericIdentifier})\\\\.(${numericIdentifier})`;\nconst fullPlain = `v?${mainVersion}${preRelease}?${build}?`;\nexport const tilde = `^${loneTilde}${xRangePlain}$`;\nexport const xRange = `^${gtlt}\\\\s*${xRangePlain}$`;\nexport const comparator = `^${gtlt}\\\\s*(${fullPlain})$|^$`;\n// copy from semver package\nexport const gte0 = '^\\\\s*>=\\\\s*0.0.0\\\\s*$';\n"],"mappings":";;AAUA,MAAM,kBAAkB;AACxB,MAAM,QAAQ,UAAU,gBAAgB,QAAQ,gBAAgB;AAChE,MAAM,oBAAoB;AAC1B,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAC7B,MAAM,4BAA4B,MAAM,uBAAuB,GAAG,qBAAqB;AACvF,MAAM,kBAAkB,SAAS,0BAA0B,QAAQ,0BAA0B;AAC7F,MAAM,uBAAuB,MAAM,kBAAkB,GAAG,qBAAqB;AAC7E,MAAM,aAAa,QAAQ,qBAAqB,QAAQ,qBAAqB;AAC7E,MAAM,mBAAmB,GAAG,kBAAkB;AAC9C,MAAM,cAAc,YAAY,iBAAiB,UAAU,iBAAiB,UAAU,iBAAiB,MAAM,WAAW,IAAI,MAAM;AAClI,MAAa,cAAc,SAAS,YAAY,aAAa,YAAY;AAEzE,MAAM,aAAa,WADM,IAAI,uBAAuB,OAAO,uBAAuB,OAAO,uBAAuB,KAC/D,gBAAgB,GAAG,MAAM;AAC1E,MAAM,OAAO;AACb,MAAa,iBAAiB,SAAS,KAAK,OAAO,WAAW,GAAG,YAAY;AAC7E,MAAM,YAAY;AAClB,MAAa,YAAY,SAAS,UAAU;AAC5C,MAAM,YAAY;AAClB,MAAa,YAAY,SAAS,UAAU;AAC5C,MAAa,OAAO;AACpB,MAAa,QAAQ,IAAI,YAAY,YAAY;AAEjD,MAAM,YAAY,KADE,IAAI,kBAAkB,OAAO,kBAAkB,OAAO,kBAAkB,KACvD,WAAW,GAAG,MAAM;AACzD,MAAa,QAAQ,IAAI,YAAY,YAAY;AACjD,MAAa,SAAS,IAAI,KAAK,MAAM,YAAY;AACjD,MAAa,aAAa,IAAI,KAAK,OAAO,UAAU;AAEpD,MAAa,OAAO"}