UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

1 lines 965 B
{"version":3,"file":"get.cjs","sources":["../../../../../../../../../.yarn/berry/cache/chroma-js-npm-3.2.0-d5c39f5077-10c0.zip/node_modules/chroma-js/src/ops/get.js"],"sourcesContent":["import Color from '../Color.js';\n\nColor.prototype.get = function (mc) {\n const [mode, channel] = mc.split('.');\n const src = this[mode]();\n if (channel) {\n const i = mode.indexOf(channel) - (mode.substr(0, 2) === 'ok' ? 2 : 0);\n if (i > -1) return src[i];\n throw new Error(`unknown channel ${channel} in mode ${mode}`);\n } else {\n return src;\n }\n};\n"],"names":[],"mappings":";;AAEA,MAAM,UAAU,MAAM,SAAU,IAAI;AAChC,QAAM,CAAC,MAAM,OAAO,IAAI,GAAG,MAAM,GAAG;AACpC,QAAM,MAAM,KAAK,IAAI,EAAC;AACtB,MAAI,SAAS;AACT,UAAM,IAAI,KAAK,QAAQ,OAAO,KAAK,KAAK,OAAO,GAAG,CAAC,MAAM,OAAO,IAAI;AACpE,QAAI,IAAI,GAAI,QAAO,IAAI,CAAC;AACxB,UAAM,IAAI,MAAM,mBAAmB,OAAO,YAAY,IAAI,EAAE;AAAA,EAChE,OAAO;AACH,WAAO;AAAA,EACX;AACJ;","x_google_ignoreList":[0]}