const f=/\d/,p=["-","_","/","."];function C(e=""){if(!f.test(e))return e!==e.toLowerCase()}function h(e,n){const u=n??p,i=[];if(!e||typeof e!="string")return i;let t="",r,a;for(const s of e){const c=u.includes(s);if(c===!0){i.push(t),t="",r=void 0;continue}const o=C(s);if(a===!1){if(r===!1&&o===!0){i.push(t),t=s,r=o;continue}if(r===!0&&o===!1&&t.length>1){const l=t.at(-1);i.push(t.slice(0,Math.max(0,t.length-1))),t=l+s,r=o;continue}}t+=s,r=o,a=c}return i.push(t),i}function R(e){return e?e[0].toUpperCase()+e.slice(1):""}function S(e){return e?e[0].toLowerCase()+e.slice(1):""}function U(e,n){return e?(Array.isArray(e)?e:h(e)).map(u=>R(n!=null&&n.normalize?u.toLowerCase():u)).join(""):""}function d(e,n){return S(U(e||"",n))}export{d as c,R as u};
