{"version":3,"sources":["jsdelivr-header.js","/npm/semver-truncate@3.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,sCCJe,SAAS,EAAe,EAAS,GAC/C,IAAK,CAAC,QAAS,QAAS,SAAS,SAAS,GACzC,MAAM,IAAI,UAAU,yBAAyB,KAK9C,KAFA,EAAU,EAAO,MAAM,EAAS,CAAC,OAAO,KAGvC,MAAM,IAAI,MAAM,WAAW,yBAe5B,OAZA,EAAQ,MAAQ,GAChB,EAAQ,WAAa,GAER,UAAT,IACH,EAAQ,MAAQ,GAGJ,UAAT,IACH,EAAQ,MAAQ,EAChB,EAAQ,MAAQ,GAGV,EAAQ,QAChB,Q","file":"/npm/semver-truncate@3.0.0/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/semver-truncate@3.0.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import semver from 'semver';\n\nexport default function semverTruncate(version, type) {\n\tif (!['major', 'minor', 'patch'].includes(type)) {\n\t\tthrow new TypeError(`Invalid version type: ${version}`);\n\t}\n\n\tversion = semver.parse(version, {loose: true});\n\n\tif (!version) {\n\t\tthrow new Error(`Version ${version} is not valid semver`);\n\t}\n\n\tversion.build = '';\n\tversion.prerelease = '';\n\n\tif (type === 'minor') {\n\t\tversion.patch = 0;\n\t}\n\n\tif (type === 'major') {\n\t\tversion.patch = 0;\n\t\tversion.minor = 0;\n\t}\n\n\treturn version.format();\n}\n"]}