import{sortBy as r}from"lodash";import t from"numeral";function o(t){return t&&0!==t.length?r(t,"pos").map((function(r){var t=r.color,o=r.pos;return"".concat(t," ").concat(o,"%")})).join(","):"none"}var a=function(r,o){var a=o.fromValue,e=o.toValue;if(a===e)return String(a);var h=e-a,i=n(h),M=u(a+h*(r/100),i);if(Math.abs(i)>=1)return t(M).format("0,00");var f=Math.ceil(-Math.log10(i));return M.toFixed(Math.max(f,0))},n=function(r){var t=Math.pow(10,Math.floor(Math.log10(r)))/100;return r/t>=500&&(t*=5),r/t>250&&(t*=2),t>1?Math.round(t):1/Math.round(1/t)},u=function(r,t){return e(Math.round(r/t)*t)},e=function(r){if(!r)return r;var t=Math.ceil(Math.log10(Math.abs(r))),o=Math.round(Math.pow(10,15-t));return Math.round(r*o)/o};export{o as calcGradientStyle,n as getRangeStep,a as getStopText,e as reasonableRealValue,u as roundToStep};
//# sourceMappingURL=GradientPicker.utils.js.map
