function e(e){return(e||``).toLowerCase().replace(/^[^a-z0-9]+/,``).replace(/^(the|a|an)\s+/,``)}function t(e){if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function n(e,n,r){let i=t(e),a=t(n);return i===null&&a===null?0:i===null?1:a===null?-1:r===`asc`?i-a:a-i}export{t as n,e as r,n as t};