import{_ as t,a as n,b as r,c as i}from"./p-3aa847d4.js";var o=t,e=/\s/,u=/^\s+/,f=n,a=r,c=function(t){return"symbol"==typeof t||a(t)&&"[object Symbol]"==f(t)},v=function(t){return t?t.slice(0,function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}(t)+1).replace(u,""):t},s=i,d=c,m=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,y=/^0o[0-7]+$/i,T=parseInt,b=i,l=function(){return o.Date.now()},h=function(t){if("number"==typeof t)return t;if(d(t))return NaN;if(s(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=s(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=v(t);var r=p.test(t);return r||y.test(t)?T(t.slice(2),r?2:8):m.test(t)?NaN:+t},x=Math.max,N=Math.min,$=function(t,n,r){var i,o,e,u,f,a,c=0,v=!1,s=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(n){var r=i,e=o;return i=o=void 0,c=n,u=t.apply(e,r)}function p(t){var r=t-a;return void 0===a||r>=n||r<0||s&&t-c>=e}function y(){var t=l();if(p(t))return T(t);f=setTimeout(y,function(t){var r=n-(t-a);return s?N(r,e-(t-c)):r}(t))}function T(t){return f=void 0,d&&i?m(t):(i=o=void 0,u)}function $(){var t=l(),r=p(t);if(i=arguments,o=this,a=t,r){if(void 0===f)return function(t){return c=t,f=setTimeout(y,n),v?m(t):u}(a);if(s)return clearTimeout(f),f=setTimeout(y,n),m(a)}return void 0===f&&(f=setTimeout(y,n)),u}return n=h(n)||0,b(r)&&(v=!!r.leading,e=(s="maxWait"in r)?x(h(r.maxWait)||0,n):e,d="trailing"in r?!!r.trailing:d),$.cancel=function(){void 0!==f&&clearTimeout(f),c=0,i=a=o=f=void 0},$.flush=function(){return void 0===f?u:T(l())},$};export{$ as d,c as i}