var{floor:f,abs:m,round:c,min:v,max:A,pow:w,sign:x}=Math,i=e=>Number.isNaN(e),o=e=>i(e)?0:e,k=(e,a)=>(e%a+a)%a,R=(e,a)=>(e%a+a)%a,I=(e,a,t)=>e===0?t:a[e-1],S=(e,a,t)=>e===a.length-1?t:a[e+1],y=(e,a)=>o(e)>=a,C=(e,a)=>o(e)<=a,D=(e,a,t)=>{const r=o(e),n=a==null||r>=a,u=t==null||r<=t;return n&&u},P=(e,a,t)=>c((o(e)-a)/t)*t+a,h=(e,a,t)=>v(A(o(e),a),t),F=e=>h(e,0,1),O=(e,a,t)=>(o(e)-a)/(t-a),j=(e,a,t,r)=>h(P(e*(t-a)+a,a,r),a,t),g=(e,a)=>{let t=e,r=a.toString(),n=r.indexOf("."),u=n>=0?r.length-n:0;if(u>0){let l=w(10,u);t=c(t*l)/l}return t},W=(e,a)=>typeof a=="number"?f(e*a+.5)/a:c(e),T=(e,a,t,r)=>{const n=a!=null?Number(a):0,u=Number(t),l=(e-n)%r;let s=m(l)*2>=r?e+x(l)*(r-m(l)):e-l;if(s=g(s,r),!i(n)&&s<n)s=n;else if(!i(u)&&s>u){const V=f((u-n)/r),p=n+V*r;s=V<=0||p<n?u:p}return g(s,r)},b=(e,a,t)=>e[a]===t?e:[...e.slice(0,a),t,...e.slice(a+1)];function M(e,a){const t=I(e,a.values,a.min),r=S(e,a.values,a.max);let n=a.values.slice();return function(l){let s=T(l,t,r,a.step);return n=b(n,e,l),n[e]=s,n}}function $(e,a){const t=a.values[e]+a.step;return M(e,a)(t)}function q(e,a){const t=a.values[e]-a.step;return M(e,a)(t)}var z=(e,a,t,r)=>e.map((n,u)=>({min:u===0?a:e[u-1]+r,max:u===e.length-1?t:e[u+1]-r,value:n})),B=(e,a)=>{const[t,r]=e,[n,u]=a;return l=>t===r||n===u?n:n+(u-n)/(r-t)*(l-t)},E=(e,a=0,t=10)=>{const r=Math.pow(t,a);return c(e*r)/r},d=e=>{if(!Number.isFinite(e))return 0;let a=1,t=0;for(;Math.round(e*a)/a!==e;)a*=10,t+=1;return t},N=(e,a,t)=>{let r=a==="+"?e+t:e-t;if(e%1!==0||t%1!==0){const n=10**Math.max(d(e),d(t));e=Math.round(e*n),t=Math.round(t*n),r=a==="+"?e+t:e-t,r/=n}return r},G=(e,a)=>N(o(e),"+",a),H=(e,a)=>N(o(e),"-",a),J=e=>typeof e=="number"?`${e}px`:e;export{j as a,F as b,h as c,J as d,B as e,z as f,O as g,$ as h,q as i,b as j,D as k,H as l,k as m,G as n,y as o,C as p,W as r,T as s,E as t,R as w};
