"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../../../../@ant-design_fast-color@2.0.6/node_modules/@ant-design/fast-color/es/FastColor.js");var s=2,l=.16,c=.05,S=.05,b=.15,h=5,x=4,F=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function m(r,e,n){var t;return Math.round(r.h)>=60&&Math.round(r.h)<=240?t=n?Math.round(r.h)-s*e:Math.round(r.h)+s*e:t=n?Math.round(r.h)+s*e:Math.round(r.h)-s*e,t<0?t+=360:t>=360&&(t-=360),t}function f(r,e,n){if(r.h===0&&r.s===0)return r.s;var t;return n?t=r.s-l*e:e===x?t=r.s+l:t=r.s+c*e,t>1&&(t=1),n&&e===h&&t>.1&&(t=.1),t<.06&&(t=.06),Math.round(t*100)/100}function v(r,e,n){var t;return n?t=r.v+S*e:t=r.v-b*e,t=Math.max(0,Math.min(1,t)),Math.round(t*100)/100}function k(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],t=new i.FastColor(r),a=t.toHsv(),o=h;o>0;o-=1){var p=new i.FastColor({h:m(a,o,!0),s:f(a,o,!0),v:v(a,o,!0)});n.push(p)}n.push(t);for(var u=1;u<=x;u+=1){var g=new i.FastColor({h:m(a,u),s:f(a,u),v:v(a,u)});n.push(g)}return e.theme==="dark"?F.map(function(d){var M=d.index,C=d.amount;return new i.FastColor(e.backgroundColor||"#141414").mix(n[M],C).toHexString()}):n.map(function(d){return d.toHexString()})}exports.default=k;
