import{t as s,b as l}from"./toString.dd8wo7ge.js";import{b as f}from"./_baseTrim.ohbpllmu.js";import{s as i,c as p}from"./_stringToArray.mpukyt2g.js";import{d}from"./deburr.h0pzx1ve.js";function m(n,r,t,e){for(var o=n.length,u=t+-1;++u<o;)if(r(n[u],u,n))return u;return-1}function g(n){return n!==n}function h(n,r,t){for(var e=t-1,o=n.length;++e<o;)if(n[e]===r)return e;return-1}function a(n,r,t){return r===r?h(n,r,t):m(n,g,t)}function x(n,r){for(var t=n.length;t--&&a(r,n[t],0)>-1;);return t}function _(n,r){for(var t=-1,e=n.length;++t<e&&a(r,n[t],0)>-1;);return t}function b(n,r,t){if(n=s(n),n&&r===void 0)return f(n);if(!n||!(r=l(r)))return n;var e=i(n),o=i(r),u=_(e,o),c=x(e,o)+1;return p(e,u,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};
