import{VERSION_NOT_SPECIFIED as t}from"@redocly/theme/core/constants";import{compareVersionsDescending as f}from"../../../utils/version-compare.js";function s(n){return!n||n===t}function c(n,i){const e=s(n.version),r=s(i.version);if(e&&!r)return 1;if(!e&&r)return-1;const o=f(n.version??"",i.version??"");return o!==0?o:(i.revision??"").localeCompare(n.revision??"")}function a(n){const i=n.filter(e=>e.isCurrent||e.isDefaultVersion);if(!(i.length<=1)){i.sort(c);for(let e=1;e<i.length;e++)i[e].isCurrent=!1,i[e].isDefaultVersion=!1}}export{a as normalizeRevisionFlags};
