import{t as s,b as l}from"./toString.9a2ec6a1.js";import{b as f}from"./_baseTrim.8725856f.js";import{s as i,c as p}from"./_stringToArray.4de3b1f3.js";import{d}from"./deburr.40d916cf.js";function m(n,e,t,r){for(var u=n.length,o=t+(r?1:-1);r?o--:++o<u;)if(e(n[o],o,n))return o;return-1}function x(n){return n!==n}function _(n,e,t){for(var r=t-1,u=n.length;++r<u;)if(n[r]===e)return r;return-1}function a(n,e,t){return e===e?_(n,e,t):m(n,x,t)}function g(n,e){for(var t=n.length;t--&&a(e,n[t],0)>-1;);return t}function h(n,e){for(var t=-1,r=n.length;++t<r&&a(e,n[t],0)>-1;);return t}function b(n,e,t){if(n=s(n),n&&(t||e===void 0))return f(n);if(!n||!(e=l(e)))return n;var r=i(n),u=i(e),o=h(r,u),c=g(r,u)+1;return p(r,o,c).join("")}function A(n){return n?b(d(n).replace(/[\s./]+/g,"-").replace(/[^\w-]+/g,"").replace(/-+/g,"-").toLowerCase(),"-"):""}export{m as a,a as b,A as c};
