var{defineProperty:D,getOwnPropertyNames:W,getOwnPropertyDescriptor:Y}=Object,Z=Object.prototype.hasOwnProperty;function $(q){return this[q]}var _=(q)=>{var w=(Q??=new WeakMap).get(q),z;if(w)return w;if(w=D({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var C of W(q))if(!Z.call(w,C))D(w,C,{get:$.bind(q,C),enumerable:!(z=Y(q,C))||z.enumerable})}return Q.set(q,w),w},Q;var G=(q)=>q;function M(q,w){this[q]=G.bind(null,w)}var j=(q,w)=>{for(var z in w)D(q,z,{get:w[z],enumerable:!0,configurable:!0,set:M.bind(w,z)})};var N=(q,w)=>()=>(q&&(w=q(q=0)),w);var X=/^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*))?(?:\+([a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*))?$/;function I(q){let w=q.trim().match(X);if(!w)return null;let z=w[1],C=w[2],K=w[3],L=w[4],O=w[5];if(!z||!C||!K)return null;return{major:parseInt(z,10),minor:parseInt(C,10),patch:parseInt(K,10),...L&&{prerelease:L},...O&&{build:O}}}function H(q){let w=I(q);if(!w)throw Error(`Invalid semantic version: "${q}"`);return w}function F(q){let w=`${q.major}.${q.minor}.${q.patch}`;if(q.prerelease)w+=`-${q.prerelease}`;if(q.build)w+=`+${q.build}`;return w}function J(q,w){let z=H(q),C=H(w);if(z.major!==C.major)return z.major>C.major?1:-1;if(z.minor!==C.minor)return z.minor>C.minor?1:-1;if(z.patch!==C.patch)return z.patch>C.patch?1:-1;if(z.prerelease&&!C.prerelease)return-1;if(!z.prerelease&&C.prerelease)return 1;if(z.prerelease&&C.prerelease)return z.prerelease<C.prerelease?-1:z.prerelease>C.prerelease?1:0;return 0}function R(q,w){return J(q,w)===1}function f(q,w){return J(q,w)===-1}function k(q,w){return J(q,w)===0}function x(q,w){let z=H(q);switch(w){case"major":return F({major:z.major+1,minor:0,patch:0});case"minor":return F({major:z.major,minor:z.minor+1,patch:0});case"patch":return F({major:z.major,minor:z.minor,patch:z.patch+1})}}function E(q,w){if(q)return"major";if(w)return"minor";return"patch"}function U(q){switch(q){case"major":return 3;case"minor":return 2;case"patch":return 1}}function d(q){if(q.length===0)return null;return q.reduce((w,z)=>U(z)>U(w)?z:w)}function g(q){return I(q)!==null}function l(q){let w=[];if(!q||typeof q!=="string")return w.push("Version must be a non-empty string"),w;let z=q.trim();if(z!==q)w.push("Version should not have leading or trailing whitespace");if(!I(z))w.push(`Invalid semantic version format: "${q}". Expected format: MAJOR.MINOR.PATCH[-prerelease][+build]`);return w}export{l as validateVersion,H as parseVersionStrict,I as parseVersion,f as isVersionLess,R as isVersionGreater,k as isVersionEqual,g as isValidVersion,d as getMaxBumpType,U as getBumpTypePriority,F as formatVersion,E as determineBumpType,J as compareVersions,x as bumpVersion};
