e104736d7ddc04d7f849c24012240dde.json
2.56 KB
{"ast":null,"code":"import { rgbaToArgbHex } from './conversion';\nimport { TinyColor } from './index';\n/**\n * Returns the color represented as a Microsoft filter for use in old versions of IE.\n */\n\nexport function toMsFilter(firstColor, secondColor) {\n var color = new TinyColor(firstColor);\n var hex8String = '#' + rgbaToArgbHex(color.r, color.g, color.b, color.a);\n var secondHex8String = hex8String;\n var gradientType = color.gradientType ? 'GradientType = 1, ' : '';\n\n if (secondColor) {\n var s = new TinyColor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s.r, s.g, s.b, s.a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\" + gradientType + \"startColorstr=\" + hex8String + \",endColorstr=\" + secondHex8String + \")\";\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ctrl/tinycolor/dist/module/to-ms-filter.js"],"names":["rgbaToArgbHex","TinyColor","toMsFilter","firstColor","secondColor","color","hex8String","r","g","b","a","secondHex8String","gradientType","s"],"mappings":"AAAA,SAASA,aAAT,QAA8B,cAA9B;AACA,SAASC,SAAT,QAA0B,SAA1B;AACA;AACA;AACA;;AACA,OAAO,SAASC,UAAT,CAAoBC,UAApB,EAAgCC,WAAhC,EAA6C;AAChD,MAAIC,KAAK,GAAG,IAAIJ,SAAJ,CAAcE,UAAd,CAAZ;AACA,MAAIG,UAAU,GAAG,MAAMN,aAAa,CAACK,KAAK,CAACE,CAAP,EAAUF,KAAK,CAACG,CAAhB,EAAmBH,KAAK,CAACI,CAAzB,EAA4BJ,KAAK,CAACK,CAAlC,CAApC;AACA,MAAIC,gBAAgB,GAAGL,UAAvB;AACA,MAAIM,YAAY,GAAGP,KAAK,CAACO,YAAN,GAAqB,oBAArB,GAA4C,EAA/D;;AACA,MAAIR,WAAJ,EAAiB;AACb,QAAIS,CAAC,GAAG,IAAIZ,SAAJ,CAAcG,WAAd,CAAR;AACAO,IAAAA,gBAAgB,GAAG,MAAMX,aAAa,CAACa,CAAC,CAACN,CAAH,EAAMM,CAAC,CAACL,CAAR,EAAWK,CAAC,CAACJ,CAAb,EAAgBI,CAAC,CAACH,CAAlB,CAAtC;AACH;;AACD,SAAO,gDAAgDE,YAAhD,GAA+D,gBAA/D,GAAkFN,UAAlF,GAA+F,eAA/F,GAAiHK,gBAAjH,GAAoI,GAA3I;AACH","sourcesContent":["import { rgbaToArgbHex } from './conversion';\nimport { TinyColor } from './index';\n/**\n * Returns the color represented as a Microsoft filter for use in old versions of IE.\n */\nexport function toMsFilter(firstColor, secondColor) {\n var color = new TinyColor(firstColor);\n var hex8String = '#' + rgbaToArgbHex(color.r, color.g, color.b, color.a);\n var secondHex8String = hex8String;\n var gradientType = color.gradientType ? 'GradientType = 1, ' : '';\n if (secondColor) {\n var s = new TinyColor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s.r, s.g, s.b, s.a);\n }\n return \"progid:DXImageTransform.Microsoft.gradient(\" + gradientType + \"startColorstr=\" + hex8String + \",endColorstr=\" + secondHex8String + \")\";\n}\n"]},"metadata":{},"sourceType":"module"}