@cruglobal/godtools-shared 0.9.0-SNAPSHOT.1254 → 0.9.0-SNAPSHOT.1263
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/88b0986a7186d029-atomicfu-js-ir.js +12 -12
- package/Napier-napier-js-ir.js +42 -42
- package/antlr-kotlin-antlr-kotlin-runtime-js-ir.js +3160 -3160
- package/colormath-root-colormath-js-ir.js +1898 -601
- package/colormath-root-colormath-js-ir.js.map +1 -1
- package/fluid-locale-js-ir.js +161 -161
- package/kotlin-kotlin-stdlib-js-ir.js +1430 -1260
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-npm.d.ts +190 -8
- package/kotlin-mpp-godtools-tool-parser-parser-expressions.js +434 -434
- package/kotlin-mpp-godtools-tool-parser-parser.js +3308 -2945
- package/kotlin-mpp-godtools-tool-parser-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-state.js +241 -241
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +2986 -2067
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,98 +14,157 @@
|
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var
|
|
19
|
-
var VOID = kotlin_kotlin.$_$.
|
|
20
|
-
var setMetadataFor = kotlin_kotlin.$_$.
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.p6;
|
|
18
|
+
var objectMeta = kotlin_kotlin.$_$.o6;
|
|
19
|
+
var VOID = kotlin_kotlin.$_$.s9;
|
|
20
|
+
var setMetadataFor = kotlin_kotlin.$_$.q6;
|
|
21
|
+
var interfaceMeta = kotlin_kotlin.$_$.c6;
|
|
22
|
+
var classMeta = kotlin_kotlin.$_$.t5;
|
|
23
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
24
|
+
var Unit_getInstance = kotlin_kotlin.$_$.k2;
|
|
25
|
+
var Companion_getInstance = kotlin_kotlin.$_$.i2;
|
|
26
|
+
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.t1;
|
|
27
|
+
var createFailure = kotlin_kotlin.$_$.i9;
|
|
28
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.w1;
|
|
29
|
+
var THROW_CCE = kotlin_kotlin.$_$.c9;
|
|
30
|
+
var isObject = kotlin_kotlin.$_$.h6;
|
|
31
|
+
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.v1;
|
|
32
|
+
var startsWith = kotlin_kotlin.$_$.z7;
|
|
28
33
|
var Regex_init_$Create$ = kotlin_kotlin.$_$.o;
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;
|
|
33
|
-
var indexOf = kotlin_kotlin.$_$.f7;
|
|
34
|
-
var take = kotlin_kotlin.$_$.o7;
|
|
35
|
-
var charArrayOf = kotlin_kotlin.$_$.j5;
|
|
36
|
-
var trimEnd = kotlin_kotlin.$_$.y7;
|
|
37
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.y8;
|
|
38
|
-
var isNaN_0 = kotlin_kotlin.$_$.w8;
|
|
39
|
-
var joinTo_0 = kotlin_kotlin.$_$.o3;
|
|
40
|
-
var getStringHashCode = kotlin_kotlin.$_$.t5;
|
|
41
|
-
var THROW_CCE = kotlin_kotlin.$_$.o8;
|
|
42
|
-
var objectMeta = kotlin_kotlin.$_$.g6;
|
|
43
|
-
var charSequenceLength = kotlin_kotlin.$_$.l5;
|
|
34
|
+
var endsWith = kotlin_kotlin.$_$.n7;
|
|
35
|
+
var coerceAtLeast = kotlin_kotlin.$_$.z6;
|
|
36
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.w2;
|
|
44
37
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.c;
|
|
45
|
-
var
|
|
38
|
+
var get_lastIndex = kotlin_kotlin.$_$.t3;
|
|
39
|
+
var charSequenceLength = kotlin_kotlin.$_$.s5;
|
|
40
|
+
var coerceIn = kotlin_kotlin.$_$.b7;
|
|
41
|
+
var roundToInt = kotlin_kotlin.$_$.v6;
|
|
42
|
+
var coerceIn_0 = kotlin_kotlin.$_$.c7;
|
|
43
|
+
var toDouble = kotlin_kotlin.$_$.f8;
|
|
44
|
+
var dropLast = kotlin_kotlin.$_$.m7;
|
|
45
|
+
var Enum = kotlin_kotlin.$_$.r8;
|
|
46
|
+
var equals = kotlin_kotlin.$_$.w5;
|
|
47
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
48
|
+
var dropLast_0 = kotlin_kotlin.$_$.e3;
|
|
49
|
+
var joinTo = kotlin_kotlin.$_$.s3;
|
|
50
|
+
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.y1;
|
|
51
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;
|
|
52
|
+
var indexOf = kotlin_kotlin.$_$.r7;
|
|
53
|
+
var take = kotlin_kotlin.$_$.b8;
|
|
54
|
+
var charArrayOf = kotlin_kotlin.$_$.q5;
|
|
55
|
+
var trimEnd = kotlin_kotlin.$_$.m8;
|
|
56
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.m9;
|
|
57
|
+
var isNaN_0 = kotlin_kotlin.$_$.k9;
|
|
58
|
+
var joinTo_0 = kotlin_kotlin.$_$.r3;
|
|
59
|
+
var numberToDouble = kotlin_kotlin.$_$.l6;
|
|
60
|
+
var getStringHashCode = kotlin_kotlin.$_$.a6;
|
|
61
|
+
var charSequenceGet = kotlin_kotlin.$_$.r5;
|
|
46
62
|
var toString = kotlin_kotlin.$_$.s1;
|
|
47
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
48
|
-
var Char = kotlin_kotlin.$_$.
|
|
49
|
-
var plus = kotlin_kotlin.$_$.
|
|
50
|
-
var asList = kotlin_kotlin.$_$.
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
63
|
+
var copyToArray = kotlin_kotlin.$_$.d3;
|
|
64
|
+
var Char = kotlin_kotlin.$_$.o8;
|
|
65
|
+
var plus = kotlin_kotlin.$_$.e4;
|
|
66
|
+
var asList = kotlin_kotlin.$_$.u2;
|
|
67
|
+
var to = kotlin_kotlin.$_$.q9;
|
|
68
|
+
var mapOf = kotlin_kotlin.$_$.b4;
|
|
69
|
+
var withSign = kotlin_kotlin.$_$.w6;
|
|
70
|
+
var get_PI = kotlin_kotlin.$_$.u6;
|
|
71
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.x6;
|
|
72
|
+
var getNumberHashCode = kotlin_kotlin.$_$.y5;
|
|
73
|
+
var numberToInt = kotlin_kotlin.$_$.m6;
|
|
74
|
+
var FloatCompanionObject_getInstance = kotlin_kotlin.$_$.e2;
|
|
75
|
+
var hashCode = kotlin_kotlin.$_$.b6;
|
|
76
|
+
var isInterface = kotlin_kotlin.$_$.f6;
|
|
77
|
+
var toString_0 = kotlin_kotlin.$_$.t6;
|
|
78
|
+
var get_lastIndex_0 = kotlin_kotlin.$_$.v3;
|
|
79
|
+
var DoubleCompanionObject_getInstance = kotlin_kotlin.$_$.d2;
|
|
80
|
+
var toInt = kotlin_kotlin.$_$.i8;
|
|
81
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.i6;
|
|
82
|
+
var slice = kotlin_kotlin.$_$.v7;
|
|
83
|
+
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.z1;
|
|
84
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.a2;
|
|
85
|
+
var toByte = kotlin_kotlin.$_$.r6;
|
|
86
|
+
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.x1;
|
|
87
|
+
var objectCreate = kotlin_kotlin.$_$.n6;
|
|
88
|
+
var isNumber = kotlin_kotlin.$_$.g6;
|
|
68
89
|
//endregion
|
|
69
90
|
//region block: pre-declaration
|
|
91
|
+
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
92
|
+
function toHSL() {
|
|
93
|
+
return this.g2l().h2l();
|
|
94
|
+
}
|
|
70
95
|
function toXYZ() {
|
|
71
|
-
return this.
|
|
96
|
+
return this.g2l().n2l();
|
|
72
97
|
}
|
|
73
98
|
function toLAB() {
|
|
74
|
-
return this.
|
|
99
|
+
return this.n2l().o2l();
|
|
75
100
|
}
|
|
76
101
|
function toLCHab() {
|
|
77
|
-
return this.
|
|
102
|
+
return this.o2l().u2l();
|
|
103
|
+
}
|
|
104
|
+
function toHWB() {
|
|
105
|
+
return this.g2l().a2m();
|
|
78
106
|
}
|
|
79
107
|
setMetadataFor(Color, 'Color', interfaceMeta);
|
|
80
108
|
setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
|
|
81
109
|
setMetadataFor(ColorComponentInfo, 'ColorComponentInfo', classMeta);
|
|
110
|
+
setMetadataFor(PATTERNS, 'PATTERNS', objectMeta);
|
|
82
111
|
setMetadataFor(RenderCondition, 'RenderCondition', classMeta, Enum);
|
|
83
112
|
setMetadataFor(AngleUnit, 'AngleUnit', classMeta, Enum);
|
|
84
113
|
setMetadataFor(WhitePoint, 'WhitePoint', classMeta);
|
|
85
114
|
setMetadataFor(Illuminant, 'Illuminant', objectMeta);
|
|
115
|
+
setMetadataFor(CssColors, 'CssColors', objectMeta);
|
|
116
|
+
setMetadataFor(Companion_0, 'Companion', objectMeta);
|
|
86
117
|
setMetadataFor(HSL, 'HSL', classMeta, VOID, [Color]);
|
|
118
|
+
setMetadataFor(Companion_1, 'Companion', objectMeta);
|
|
87
119
|
setMetadataFor(HWB, 'HWB', classMeta, VOID, [Color]);
|
|
88
120
|
setMetadataFor(ICtCp, 'ICtCp', classMeta, VOID, [Color]);
|
|
89
121
|
setMetadataFor(PqNonlinearity, 'PqNonlinearity', objectMeta);
|
|
90
122
|
function invoke(l, a, b, alpha) {
|
|
91
|
-
return this.
|
|
123
|
+
return this.z2m(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
92
124
|
}
|
|
93
125
|
setMetadataFor(LABColorSpace, 'LABColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
94
|
-
setMetadataFor(
|
|
126
|
+
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [LABColorSpace]);
|
|
95
127
|
setMetadataFor(LAB, 'LAB', classMeta, VOID, [Color]);
|
|
96
128
|
setMetadataFor(LABColorSpaces, 'LABColorSpaces', objectMeta);
|
|
97
129
|
setMetadataFor(LABColorSpaceImpl, 'LABColorSpaceImpl', classMeta, VOID, [LABColorSpace]);
|
|
98
|
-
setMetadataFor(
|
|
130
|
+
setMetadataFor(Companion_3, 'Companion', objectMeta, VOID, [WhitePointColorSpace]);
|
|
99
131
|
setMetadataFor(LCHab, 'LCHab', classMeta, VOID, [Color]);
|
|
100
132
|
setMetadataFor(LCHabColorSpaces, 'LCHabColorSpaces', objectMeta);
|
|
101
133
|
setMetadataFor(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', classMeta, VOID, [WhitePointColorSpace]);
|
|
102
134
|
setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
|
|
103
135
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
104
136
|
function invoke_0(r, g, b, alpha) {
|
|
105
|
-
return this.
|
|
137
|
+
return this.z2m(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
138
|
+
}
|
|
139
|
+
function from255(r, g, b, alpha) {
|
|
140
|
+
return this.z2m(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
141
|
+
}
|
|
142
|
+
function from255$default(r, g, b, alpha, $super) {
|
|
143
|
+
alpha = alpha === VOID ? 255 : alpha;
|
|
144
|
+
return $super === VOID ? this.v2o(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
145
|
+
}
|
|
146
|
+
function invoke_1(hex) {
|
|
147
|
+
var tmp = parseHex(validateHex(hex), 0);
|
|
148
|
+
var tmp_0 = parseHex(hex, 1);
|
|
149
|
+
var tmp_1 = parseHex(hex, 2);
|
|
150
|
+
var tmp_2;
|
|
151
|
+
var tmp$ret$1;
|
|
152
|
+
// Inline function 'kotlin.let' call
|
|
153
|
+
var tmp0_let = get_hexLength(hex);
|
|
154
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
155
|
+
var tmp$ret$0;
|
|
156
|
+
// Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
|
|
157
|
+
tmp$ret$0 = tmp0_let === 4 ? true : tmp0_let === 8;
|
|
158
|
+
tmp$ret$1 = tmp$ret$0;
|
|
159
|
+
if (tmp$ret$1) {
|
|
160
|
+
tmp_2 = parseHex(hex, 3);
|
|
161
|
+
} else {
|
|
162
|
+
tmp_2 = 255;
|
|
163
|
+
}
|
|
164
|
+
return this.v2o(tmp, tmp_0, tmp_1, tmp_2);
|
|
106
165
|
}
|
|
107
166
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
108
|
-
setMetadataFor(
|
|
167
|
+
setMetadataFor(Companion_4, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
109
168
|
setMetadataFor(RGB, 'RGB', classMeta, VOID, [Color]);
|
|
110
169
|
setMetadataFor(RGBColorSpaces, 'RGBColorSpaces', objectMeta);
|
|
111
170
|
setMetadataFor(SRGB, 'SRGB', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -117,30 +176,586 @@
|
|
|
117
176
|
setMetadataFor(ROMMTransferFunctions, 'ROMMTransferFunctions', objectMeta);
|
|
118
177
|
setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
|
|
119
178
|
setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
|
|
120
|
-
function
|
|
121
|
-
return this.
|
|
179
|
+
function invoke_2(x, y, z, alpha) {
|
|
180
|
+
return this.z2m(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
122
181
|
}
|
|
123
182
|
function invoke$default(x, y, z, alpha, $super) {
|
|
124
183
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
125
|
-
return $super === VOID ? this.
|
|
184
|
+
return $super === VOID ? this.x2p(x, y, z, alpha) : invoke_2(x, y, z, alpha);
|
|
126
185
|
}
|
|
127
186
|
setMetadataFor(XYZColorSpace, 'XYZColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
128
|
-
setMetadataFor(
|
|
187
|
+
setMetadataFor(Companion_5, 'Companion', objectMeta, VOID, [XYZColorSpace]);
|
|
129
188
|
setMetadataFor(XYZ, 'XYZ', classMeta, VOID, [Color]);
|
|
130
189
|
setMetadataFor(XYZColorSpaces, 'XYZColorSpaces', objectMeta);
|
|
131
190
|
setMetadataFor(XYZColorSpaceImpl, 'XYZColorSpaceImpl', classMeta, VOID, [XYZColorSpace]);
|
|
132
191
|
setMetadataFor(xyY, 'xyY', classMeta);
|
|
133
192
|
//endregion
|
|
193
|
+
function Companion() {
|
|
194
|
+
Companion_instance = this;
|
|
195
|
+
}
|
|
196
|
+
var Companion_instance;
|
|
197
|
+
function Companion_getInstance_0() {
|
|
198
|
+
if (Companion_instance == null)
|
|
199
|
+
new Companion();
|
|
200
|
+
return Companion_instance;
|
|
201
|
+
}
|
|
134
202
|
function Color() {
|
|
135
203
|
}
|
|
136
204
|
function convertTo(_this__u8e3s4, space) {
|
|
137
|
-
return space.
|
|
205
|
+
return space.b2m(_this__u8e3s4);
|
|
138
206
|
}
|
|
139
207
|
function WhitePointColorSpace() {
|
|
140
208
|
}
|
|
141
209
|
function ColorComponentInfo(name, isPolar) {
|
|
142
|
-
this.
|
|
143
|
-
this.
|
|
210
|
+
this.e2m_1 = name;
|
|
211
|
+
this.f2m_1 = isPolar;
|
|
212
|
+
}
|
|
213
|
+
function parse(_this__u8e3s4, color) {
|
|
214
|
+
var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color);
|
|
215
|
+
var tmp;
|
|
216
|
+
if (tmp0_elvis_lhs == null) {
|
|
217
|
+
throw IllegalArgumentException_init_$Create$('Invalid color: ' + color);
|
|
218
|
+
} else {
|
|
219
|
+
tmp = tmp0_elvis_lhs;
|
|
220
|
+
}
|
|
221
|
+
return tmp;
|
|
222
|
+
}
|
|
223
|
+
function parseOrNull(_this__u8e3s4, color_0) {
|
|
224
|
+
var keywordColor = CssColors_getInstance().g2m_1.f2(color_0);
|
|
225
|
+
var tmp;
|
|
226
|
+
if (!(keywordColor == null)) {
|
|
227
|
+
tmp = keywordColor;
|
|
228
|
+
} else if (startsWith(color_0, '#')) {
|
|
229
|
+
var tmp$ret$4;
|
|
230
|
+
// Inline function 'kotlin.Result.getOrNull' call
|
|
231
|
+
var tmp$ret$3;
|
|
232
|
+
// Inline function 'kotlin.runCatching' call
|
|
233
|
+
var tmp_0;
|
|
234
|
+
try {
|
|
235
|
+
var tmp$ret$1;
|
|
236
|
+
// Inline function 'kotlin.Companion.success' call
|
|
237
|
+
var tmp0_success = Companion_getInstance();
|
|
238
|
+
var tmp$ret$0;
|
|
239
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
240
|
+
tmp$ret$0 = Companion_getInstance_5().y2m(color_0);
|
|
241
|
+
var tmp1_success = tmp$ret$0;
|
|
242
|
+
tmp$ret$1 = _Result___init__impl__xyqfz8(tmp1_success);
|
|
243
|
+
tmp_0 = tmp$ret$1;
|
|
244
|
+
} catch ($p) {
|
|
245
|
+
var tmp_1;
|
|
246
|
+
if ($p instanceof Error) {
|
|
247
|
+
var e = $p;
|
|
248
|
+
var tmp$ret$2;
|
|
249
|
+
// Inline function 'kotlin.Companion.failure' call
|
|
250
|
+
var tmp2_failure = Companion_getInstance();
|
|
251
|
+
tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
252
|
+
tmp_1 = tmp$ret$2;
|
|
253
|
+
} else {
|
|
254
|
+
throw $p;
|
|
255
|
+
}
|
|
256
|
+
tmp_0 = tmp_1;
|
|
257
|
+
}
|
|
258
|
+
tmp$ret$3 = tmp_0;
|
|
259
|
+
var tmp3_getOrNull = tmp$ret$3;
|
|
260
|
+
var tmp_2;
|
|
261
|
+
if (_Result___get_isFailure__impl__jpiriv(tmp3_getOrNull)) {
|
|
262
|
+
tmp_2 = null;
|
|
263
|
+
} else {
|
|
264
|
+
var tmp_3 = _Result___get_value__impl__bjfvqg(tmp3_getOrNull);
|
|
265
|
+
tmp_2 = (tmp_3 == null ? true : isObject(tmp_3)) ? tmp_3 : THROW_CCE();
|
|
266
|
+
}
|
|
267
|
+
tmp$ret$4 = tmp_2;
|
|
268
|
+
tmp = tmp$ret$4;
|
|
269
|
+
} else {
|
|
270
|
+
var tmp0_safe_receiver = PATTERNS_getInstance().n2m_1.bc(color_0);
|
|
271
|
+
var tmp_4;
|
|
272
|
+
if (tmp0_safe_receiver == null) {
|
|
273
|
+
tmp_4 = null;
|
|
274
|
+
} else {
|
|
275
|
+
var tmp$ret$6;
|
|
276
|
+
// Inline function 'kotlin.let' call
|
|
277
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
278
|
+
var tmp$ret$5;
|
|
279
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
280
|
+
tmp$ret$5 = rgb(tmp0_safe_receiver);
|
|
281
|
+
tmp$ret$6 = tmp$ret$5;
|
|
282
|
+
tmp_4 = tmp$ret$6;
|
|
283
|
+
}
|
|
284
|
+
var tmp2_elvis_lhs = tmp_4;
|
|
285
|
+
var tmp_5;
|
|
286
|
+
if (tmp2_elvis_lhs == null) {
|
|
287
|
+
var tmp1_safe_receiver = PATTERNS_getInstance().o2m_1.bc(color_0);
|
|
288
|
+
var tmp_6;
|
|
289
|
+
if (tmp1_safe_receiver == null) {
|
|
290
|
+
tmp_6 = null;
|
|
291
|
+
} else {
|
|
292
|
+
var tmp$ret$8;
|
|
293
|
+
// Inline function 'kotlin.let' call
|
|
294
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
295
|
+
var tmp$ret$7;
|
|
296
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
297
|
+
tmp$ret$7 = rgb(tmp1_safe_receiver);
|
|
298
|
+
tmp$ret$8 = tmp$ret$7;
|
|
299
|
+
tmp_6 = tmp$ret$8;
|
|
300
|
+
}
|
|
301
|
+
tmp_5 = tmp_6;
|
|
302
|
+
} else {
|
|
303
|
+
tmp_5 = tmp2_elvis_lhs;
|
|
304
|
+
}
|
|
305
|
+
var tmp4_elvis_lhs = tmp_5;
|
|
306
|
+
var tmp_7;
|
|
307
|
+
if (tmp4_elvis_lhs == null) {
|
|
308
|
+
var tmp3_safe_receiver = PATTERNS_getInstance().p2m_1.bc(color_0);
|
|
309
|
+
var tmp_8;
|
|
310
|
+
if (tmp3_safe_receiver == null) {
|
|
311
|
+
tmp_8 = null;
|
|
312
|
+
} else {
|
|
313
|
+
var tmp$ret$10;
|
|
314
|
+
// Inline function 'kotlin.let' call
|
|
315
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
316
|
+
var tmp$ret$9;
|
|
317
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
318
|
+
tmp$ret$9 = rgb(tmp3_safe_receiver);
|
|
319
|
+
tmp$ret$10 = tmp$ret$9;
|
|
320
|
+
tmp_8 = tmp$ret$10;
|
|
321
|
+
}
|
|
322
|
+
tmp_7 = tmp_8;
|
|
323
|
+
} else {
|
|
324
|
+
tmp_7 = tmp4_elvis_lhs;
|
|
325
|
+
}
|
|
326
|
+
var tmp6_elvis_lhs = tmp_7;
|
|
327
|
+
var tmp_9;
|
|
328
|
+
if (tmp6_elvis_lhs == null) {
|
|
329
|
+
var tmp5_safe_receiver = PATTERNS_getInstance().q2m_1.bc(color_0);
|
|
330
|
+
var tmp_10;
|
|
331
|
+
if (tmp5_safe_receiver == null) {
|
|
332
|
+
tmp_10 = null;
|
|
333
|
+
} else {
|
|
334
|
+
var tmp$ret$12;
|
|
335
|
+
// Inline function 'kotlin.let' call
|
|
336
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
337
|
+
var tmp$ret$11;
|
|
338
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
339
|
+
tmp$ret$11 = rgb(tmp5_safe_receiver);
|
|
340
|
+
tmp$ret$12 = tmp$ret$11;
|
|
341
|
+
tmp_10 = tmp$ret$12;
|
|
342
|
+
}
|
|
343
|
+
tmp_9 = tmp_10;
|
|
344
|
+
} else {
|
|
345
|
+
tmp_9 = tmp6_elvis_lhs;
|
|
346
|
+
}
|
|
347
|
+
var tmp8_elvis_lhs = tmp_9;
|
|
348
|
+
var tmp_11;
|
|
349
|
+
if (tmp8_elvis_lhs == null) {
|
|
350
|
+
var tmp7_safe_receiver = PATTERNS_getInstance().r2m_1.bc(color_0);
|
|
351
|
+
var tmp_12;
|
|
352
|
+
if (tmp7_safe_receiver == null) {
|
|
353
|
+
tmp_12 = null;
|
|
354
|
+
} else {
|
|
355
|
+
var tmp$ret$14;
|
|
356
|
+
// Inline function 'kotlin.let' call
|
|
357
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
358
|
+
var tmp$ret$13;
|
|
359
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
360
|
+
tmp$ret$13 = hsl(tmp7_safe_receiver);
|
|
361
|
+
tmp$ret$14 = tmp$ret$13;
|
|
362
|
+
tmp_12 = tmp$ret$14;
|
|
363
|
+
}
|
|
364
|
+
tmp_11 = tmp_12;
|
|
365
|
+
} else {
|
|
366
|
+
tmp_11 = tmp8_elvis_lhs;
|
|
367
|
+
}
|
|
368
|
+
var tmp10_elvis_lhs = tmp_11;
|
|
369
|
+
var tmp_13;
|
|
370
|
+
if (tmp10_elvis_lhs == null) {
|
|
371
|
+
var tmp9_safe_receiver = PATTERNS_getInstance().s2m_1.bc(color_0);
|
|
372
|
+
var tmp_14;
|
|
373
|
+
if (tmp9_safe_receiver == null) {
|
|
374
|
+
tmp_14 = null;
|
|
375
|
+
} else {
|
|
376
|
+
var tmp$ret$16;
|
|
377
|
+
// Inline function 'kotlin.let' call
|
|
378
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
379
|
+
var tmp$ret$15;
|
|
380
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
381
|
+
tmp$ret$15 = hsl(tmp9_safe_receiver);
|
|
382
|
+
tmp$ret$16 = tmp$ret$15;
|
|
383
|
+
tmp_14 = tmp$ret$16;
|
|
384
|
+
}
|
|
385
|
+
tmp_13 = tmp_14;
|
|
386
|
+
} else {
|
|
387
|
+
tmp_13 = tmp10_elvis_lhs;
|
|
388
|
+
}
|
|
389
|
+
var tmp12_elvis_lhs = tmp_13;
|
|
390
|
+
var tmp_15;
|
|
391
|
+
if (tmp12_elvis_lhs == null) {
|
|
392
|
+
var tmp11_safe_receiver = PATTERNS_getInstance().t2m_1.bc(color_0);
|
|
393
|
+
var tmp_16;
|
|
394
|
+
if (tmp11_safe_receiver == null) {
|
|
395
|
+
tmp_16 = null;
|
|
396
|
+
} else {
|
|
397
|
+
var tmp$ret$18;
|
|
398
|
+
// Inline function 'kotlin.let' call
|
|
399
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
400
|
+
var tmp$ret$17;
|
|
401
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
402
|
+
tmp$ret$17 = lab(tmp11_safe_receiver);
|
|
403
|
+
tmp$ret$18 = tmp$ret$17;
|
|
404
|
+
tmp_16 = tmp$ret$18;
|
|
405
|
+
}
|
|
406
|
+
tmp_15 = tmp_16;
|
|
407
|
+
} else {
|
|
408
|
+
tmp_15 = tmp12_elvis_lhs;
|
|
409
|
+
}
|
|
410
|
+
var tmp14_elvis_lhs = tmp_15;
|
|
411
|
+
var tmp_17;
|
|
412
|
+
if (tmp14_elvis_lhs == null) {
|
|
413
|
+
var tmp13_safe_receiver = PATTERNS_getInstance().u2m_1.bc(color_0);
|
|
414
|
+
var tmp_18;
|
|
415
|
+
if (tmp13_safe_receiver == null) {
|
|
416
|
+
tmp_18 = null;
|
|
417
|
+
} else {
|
|
418
|
+
var tmp$ret$20;
|
|
419
|
+
// Inline function 'kotlin.let' call
|
|
420
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
421
|
+
var tmp$ret$19;
|
|
422
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
423
|
+
tmp$ret$19 = lch(tmp13_safe_receiver);
|
|
424
|
+
tmp$ret$20 = tmp$ret$19;
|
|
425
|
+
tmp_18 = tmp$ret$20;
|
|
426
|
+
}
|
|
427
|
+
tmp_17 = tmp_18;
|
|
428
|
+
} else {
|
|
429
|
+
tmp_17 = tmp14_elvis_lhs;
|
|
430
|
+
}
|
|
431
|
+
var tmp16_elvis_lhs = tmp_17;
|
|
432
|
+
var tmp_19;
|
|
433
|
+
if (tmp16_elvis_lhs == null) {
|
|
434
|
+
var tmp15_safe_receiver = PATTERNS_getInstance().v2m_1.bc(color_0);
|
|
435
|
+
var tmp_20;
|
|
436
|
+
if (tmp15_safe_receiver == null) {
|
|
437
|
+
tmp_20 = null;
|
|
438
|
+
} else {
|
|
439
|
+
var tmp$ret$22;
|
|
440
|
+
// Inline function 'kotlin.let' call
|
|
441
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
442
|
+
var tmp$ret$21;
|
|
443
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
444
|
+
tmp$ret$21 = hwb(tmp15_safe_receiver);
|
|
445
|
+
tmp$ret$22 = tmp$ret$21;
|
|
446
|
+
tmp_20 = tmp$ret$22;
|
|
447
|
+
}
|
|
448
|
+
tmp_19 = tmp_20;
|
|
449
|
+
} else {
|
|
450
|
+
tmp_19 = tmp16_elvis_lhs;
|
|
451
|
+
}
|
|
452
|
+
var tmp18_elvis_lhs = tmp_19;
|
|
453
|
+
var tmp_21;
|
|
454
|
+
if (tmp18_elvis_lhs == null) {
|
|
455
|
+
var tmp17_safe_receiver = PATTERNS_getInstance().w2m_1.bc(color_0);
|
|
456
|
+
var tmp_22;
|
|
457
|
+
if (tmp17_safe_receiver == null) {
|
|
458
|
+
tmp_22 = null;
|
|
459
|
+
} else {
|
|
460
|
+
var tmp$ret$24;
|
|
461
|
+
// Inline function 'kotlin.let' call
|
|
462
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
463
|
+
var tmp$ret$23;
|
|
464
|
+
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
465
|
+
tmp$ret$23 = color(tmp17_safe_receiver);
|
|
466
|
+
tmp$ret$24 = tmp$ret$23;
|
|
467
|
+
tmp_22 = tmp$ret$24;
|
|
468
|
+
}
|
|
469
|
+
tmp_21 = tmp_22;
|
|
470
|
+
} else {
|
|
471
|
+
tmp_21 = tmp18_elvis_lhs;
|
|
472
|
+
}
|
|
473
|
+
tmp = tmp_21;
|
|
474
|
+
}
|
|
475
|
+
return tmp;
|
|
476
|
+
}
|
|
477
|
+
function PATTERNS() {
|
|
478
|
+
PATTERNS_instance = this;
|
|
479
|
+
this.h2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
480
|
+
this.i2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%';
|
|
481
|
+
this.j2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
482
|
+
this.k2m_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
483
|
+
this.l2m_1 = '(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
484
|
+
this.m2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?';
|
|
485
|
+
this.n2m_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
486
|
+
this.o2m_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
487
|
+
this.p2m_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
488
|
+
this.q2m_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
489
|
+
this.r2m_1 = Regex_init_$Create$('hsla?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
490
|
+
this.s2m_1 = Regex_init_$Create$('hsla?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
491
|
+
this.t2m_1 = Regex_init_$Create$('lab\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
492
|
+
this.u2m_1 = Regex_init_$Create$('lch\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
493
|
+
this.v2m_1 = Regex_init_$Create$('hwb\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
494
|
+
this.w2m_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?(?:\\s+[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
495
|
+
}
|
|
496
|
+
var PATTERNS_instance;
|
|
497
|
+
function PATTERNS_getInstance() {
|
|
498
|
+
if (PATTERNS_instance == null)
|
|
499
|
+
new PATTERNS();
|
|
500
|
+
return PATTERNS_instance;
|
|
501
|
+
}
|
|
502
|
+
function rgb(match) {
|
|
503
|
+
var r = percentOrNumber(match.wc().j(1));
|
|
504
|
+
var g = percentOrNumber(match.wc().j(2));
|
|
505
|
+
var b = percentOrNumber(match.wc().j(3));
|
|
506
|
+
var a = alpha(match.wc().j(4));
|
|
507
|
+
var tmp;
|
|
508
|
+
if (endsWith(match.wc().j(1), '%')) {
|
|
509
|
+
tmp = Companion_getInstance_5().z2m(clampF(r), clampF(g), clampF(b), a);
|
|
510
|
+
} else {
|
|
511
|
+
tmp = Companion_getInstance_5().z2m(clampInt(r) / 255.0, clampInt(g) / 255.0, clampInt(b) / 255.0, a);
|
|
512
|
+
}
|
|
513
|
+
return tmp;
|
|
514
|
+
}
|
|
515
|
+
function hsl(match) {
|
|
516
|
+
var h = hue(match.wc().j(1));
|
|
517
|
+
var s = percent(match.wc().j(2));
|
|
518
|
+
var l = percent(match.wc().j(3));
|
|
519
|
+
var a = alpha(match.wc().j(4));
|
|
520
|
+
return new HSL(h, clampF(s), clampF(l), clampF(a));
|
|
521
|
+
}
|
|
522
|
+
function lab(match) {
|
|
523
|
+
var l = percent(match.wc().j(1));
|
|
524
|
+
var a = number(match.wc().j(2));
|
|
525
|
+
var b = number(match.wc().j(3));
|
|
526
|
+
var alpha_0 = alpha(match.wc().j(4));
|
|
527
|
+
return Companion_getInstance_3().z2m(coerceAtLeast(l, 0.0) * 100.0, a, b, alpha_0);
|
|
528
|
+
}
|
|
529
|
+
function lch(match) {
|
|
530
|
+
var l = percent(match.wc().j(1));
|
|
531
|
+
var c = number(match.wc().j(2));
|
|
532
|
+
var h = hue(match.wc().j(3));
|
|
533
|
+
var a = alpha(match.wc().j(4));
|
|
534
|
+
return Companion_getInstance_4().z2m(coerceAtLeast(l, 0.0) * 100.0, coerceAtLeast(c, 0.0), h, a);
|
|
535
|
+
}
|
|
536
|
+
function hwb(match) {
|
|
537
|
+
var h = hue(match.wc().j(1));
|
|
538
|
+
var w = percent(match.wc().j(2));
|
|
539
|
+
var b = percent(match.wc().j(3));
|
|
540
|
+
var a = alpha(match.wc().j(4));
|
|
541
|
+
return new HWB(h, clampF(w), clampF(b), a);
|
|
542
|
+
}
|
|
543
|
+
function color(match) {
|
|
544
|
+
var tmp0_subject = match.wc().j(1);
|
|
545
|
+
var tmp;
|
|
546
|
+
switch (tmp0_subject) {
|
|
547
|
+
case 'srgb':
|
|
548
|
+
tmp = SRGB_getInstance();
|
|
549
|
+
break;
|
|
550
|
+
case 'display-p3':
|
|
551
|
+
tmp = RGBColorSpaces_getInstance().m2n_1;
|
|
552
|
+
break;
|
|
553
|
+
case 'a98-rgb':
|
|
554
|
+
tmp = RGBColorSpaces_getInstance().i2n_1;
|
|
555
|
+
break;
|
|
556
|
+
case 'prophoto-rgb':
|
|
557
|
+
tmp = RGBColorSpaces_getInstance().n2n_1;
|
|
558
|
+
break;
|
|
559
|
+
case 'rec2020':
|
|
560
|
+
tmp = RGBColorSpaces_getInstance().j2n_1;
|
|
561
|
+
break;
|
|
562
|
+
case 'xyz':
|
|
563
|
+
tmp = XYZColorSpaces_getInstance().p2n_1;
|
|
564
|
+
break;
|
|
565
|
+
default:
|
|
566
|
+
return null;
|
|
567
|
+
}
|
|
568
|
+
var space = tmp;
|
|
569
|
+
var tmp$ret$3;
|
|
570
|
+
// Inline function 'kotlin.collections.map' call
|
|
571
|
+
var tmp$ret$0;
|
|
572
|
+
// Inline function 'kotlin.text.split' call
|
|
573
|
+
var tmp0_split = match.wc().j(2);
|
|
574
|
+
var tmp1_split = Regex_init_$Create$('\\s+');
|
|
575
|
+
tmp$ret$0 = tmp1_split.fc(tmp0_split, 0);
|
|
576
|
+
var tmp3_map = tmp$ret$0;
|
|
577
|
+
var tmp$ret$2;
|
|
578
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
579
|
+
var tmp2_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp3_map, 10));
|
|
580
|
+
var tmp0_iterator = tmp3_map.f();
|
|
581
|
+
while (tmp0_iterator.g()) {
|
|
582
|
+
var item = tmp0_iterator.h();
|
|
583
|
+
var tmp$ret$1;
|
|
584
|
+
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
585
|
+
tmp$ret$1 = clampF(percentOrNumber(item));
|
|
586
|
+
tmp2_mapTo.b(tmp$ret$1);
|
|
587
|
+
}
|
|
588
|
+
tmp$ret$2 = tmp2_mapTo;
|
|
589
|
+
tmp$ret$3 = tmp$ret$2;
|
|
590
|
+
var values = tmp$ret$3;
|
|
591
|
+
var tmp$ret$10;
|
|
592
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
593
|
+
var tmp$ret$5;
|
|
594
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
595
|
+
var tmp_0;
|
|
596
|
+
if (0 <= get_lastIndex(values)) {
|
|
597
|
+
tmp_0 = values.j(0);
|
|
598
|
+
} else {
|
|
599
|
+
var tmp$ret$4;
|
|
600
|
+
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
601
|
+
tmp$ret$4 = 0.0;
|
|
602
|
+
tmp_0 = tmp$ret$4;
|
|
603
|
+
}
|
|
604
|
+
tmp$ret$5 = tmp_0;
|
|
605
|
+
var tmp_1 = tmp$ret$5;
|
|
606
|
+
var tmp$ret$7;
|
|
607
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
608
|
+
var tmp_2;
|
|
609
|
+
if (1 <= get_lastIndex(values)) {
|
|
610
|
+
tmp_2 = values.j(1);
|
|
611
|
+
} else {
|
|
612
|
+
var tmp$ret$6;
|
|
613
|
+
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
614
|
+
tmp$ret$6 = 0.0;
|
|
615
|
+
tmp_2 = tmp$ret$6;
|
|
616
|
+
}
|
|
617
|
+
tmp$ret$7 = tmp_2;
|
|
618
|
+
var tmp_3 = tmp$ret$7;
|
|
619
|
+
var tmp$ret$9;
|
|
620
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
621
|
+
var tmp_4;
|
|
622
|
+
if (2 <= get_lastIndex(values)) {
|
|
623
|
+
tmp_4 = values.j(2);
|
|
624
|
+
} else {
|
|
625
|
+
var tmp$ret$8;
|
|
626
|
+
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
627
|
+
tmp$ret$8 = 0.0;
|
|
628
|
+
tmp_4 = tmp$ret$8;
|
|
629
|
+
}
|
|
630
|
+
tmp$ret$9 = tmp_4;
|
|
631
|
+
var tmp4_floatArrayOf = new Float32Array([tmp_1, tmp_3, tmp$ret$9, alpha(match.wc().j(3))]);
|
|
632
|
+
tmp$ret$10 = tmp4_floatArrayOf;
|
|
633
|
+
return space.d2m(tmp$ret$10);
|
|
634
|
+
}
|
|
635
|
+
function percentOrNumber(str) {
|
|
636
|
+
return endsWith(str, '%') ? percent(str) : number(str);
|
|
637
|
+
}
|
|
638
|
+
function alpha(str) {
|
|
639
|
+
var tmp;
|
|
640
|
+
var tmp$ret$0;
|
|
641
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
642
|
+
tmp$ret$0 = charSequenceLength(str) === 0;
|
|
643
|
+
if (tmp$ret$0) {
|
|
644
|
+
tmp = 1.0;
|
|
645
|
+
} else {
|
|
646
|
+
tmp = percentOrNumber(str);
|
|
647
|
+
}
|
|
648
|
+
return clampF(tmp);
|
|
649
|
+
}
|
|
650
|
+
function clampF(_this__u8e3s4, min, max) {
|
|
651
|
+
min = min === VOID ? 0.0 : min;
|
|
652
|
+
max = max === VOID ? 1.0 : max;
|
|
653
|
+
return coerceIn(_this__u8e3s4, min, max);
|
|
654
|
+
}
|
|
655
|
+
function clampInt(_this__u8e3s4, min, max) {
|
|
656
|
+
min = min === VOID ? 0 : min;
|
|
657
|
+
max = max === VOID ? 255 : max;
|
|
658
|
+
var tmp$ret$0;
|
|
659
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
660
|
+
tmp$ret$0 = roundToInt(_this__u8e3s4);
|
|
661
|
+
return coerceIn_0(tmp$ret$0, min, max);
|
|
662
|
+
}
|
|
663
|
+
function hue(str) {
|
|
664
|
+
var tmp;
|
|
665
|
+
if (endsWith(str, 'deg')) {
|
|
666
|
+
var tmp$ret$2;
|
|
667
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
668
|
+
var tmp1_toFloat = dropLast(str, 3);
|
|
669
|
+
var tmp$ret$1;
|
|
670
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
671
|
+
var tmp0_unsafeCast = toDouble(tmp1_toFloat);
|
|
672
|
+
var tmp$ret$0;
|
|
673
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
674
|
+
tmp$ret$0 = tmp0_unsafeCast;
|
|
675
|
+
tmp$ret$1 = tmp$ret$0;
|
|
676
|
+
tmp$ret$2 = tmp$ret$1;
|
|
677
|
+
tmp = tmp$ret$2;
|
|
678
|
+
} else if (endsWith(str, 'grad')) {
|
|
679
|
+
var tmp$ret$5;
|
|
680
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
681
|
+
var tmp3_toFloat = dropLast(str, 4);
|
|
682
|
+
var tmp$ret$4;
|
|
683
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
684
|
+
var tmp2_unsafeCast = toDouble(tmp3_toFloat);
|
|
685
|
+
var tmp$ret$3;
|
|
686
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
687
|
+
tmp$ret$3 = tmp2_unsafeCast;
|
|
688
|
+
tmp$ret$4 = tmp$ret$3;
|
|
689
|
+
tmp$ret$5 = tmp$ret$4;
|
|
690
|
+
tmp = gradToDeg(tmp$ret$5);
|
|
691
|
+
} else if (endsWith(str, 'rad')) {
|
|
692
|
+
var tmp$ret$8;
|
|
693
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
694
|
+
var tmp5_toFloat = dropLast(str, 3);
|
|
695
|
+
var tmp$ret$7;
|
|
696
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
697
|
+
var tmp4_unsafeCast = toDouble(tmp5_toFloat);
|
|
698
|
+
var tmp$ret$6;
|
|
699
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
700
|
+
tmp$ret$6 = tmp4_unsafeCast;
|
|
701
|
+
tmp$ret$7 = tmp$ret$6;
|
|
702
|
+
tmp$ret$8 = tmp$ret$7;
|
|
703
|
+
tmp = radToDeg(tmp$ret$8);
|
|
704
|
+
} else if (endsWith(str, 'turn')) {
|
|
705
|
+
var tmp$ret$11;
|
|
706
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
707
|
+
var tmp7_toFloat = dropLast(str, 4);
|
|
708
|
+
var tmp$ret$10;
|
|
709
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
710
|
+
var tmp6_unsafeCast = toDouble(tmp7_toFloat);
|
|
711
|
+
var tmp$ret$9;
|
|
712
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
713
|
+
tmp$ret$9 = tmp6_unsafeCast;
|
|
714
|
+
tmp$ret$10 = tmp$ret$9;
|
|
715
|
+
tmp$ret$11 = tmp$ret$10;
|
|
716
|
+
tmp = turnToDeg(tmp$ret$11);
|
|
717
|
+
} else {
|
|
718
|
+
var tmp$ret$14;
|
|
719
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
720
|
+
var tmp$ret$13;
|
|
721
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
722
|
+
var tmp8_unsafeCast = toDouble(str);
|
|
723
|
+
var tmp$ret$12;
|
|
724
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
725
|
+
tmp$ret$12 = tmp8_unsafeCast;
|
|
726
|
+
tmp$ret$13 = tmp$ret$12;
|
|
727
|
+
tmp$ret$14 = tmp$ret$13;
|
|
728
|
+
tmp = tmp$ret$14;
|
|
729
|
+
}
|
|
730
|
+
var deg = tmp;
|
|
731
|
+
return normalizeDeg_0(deg);
|
|
732
|
+
}
|
|
733
|
+
function percent(str) {
|
|
734
|
+
var tmp$ret$2;
|
|
735
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
736
|
+
var tmp1_toFloat = dropLast(str, 1);
|
|
737
|
+
var tmp$ret$1;
|
|
738
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
739
|
+
var tmp0_unsafeCast = toDouble(tmp1_toFloat);
|
|
740
|
+
var tmp$ret$0;
|
|
741
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
742
|
+
tmp$ret$0 = tmp0_unsafeCast;
|
|
743
|
+
tmp$ret$1 = tmp$ret$0;
|
|
744
|
+
tmp$ret$2 = tmp$ret$1;
|
|
745
|
+
return tmp$ret$2 / 100.0;
|
|
746
|
+
}
|
|
747
|
+
function number(str) {
|
|
748
|
+
var tmp$ret$2;
|
|
749
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
750
|
+
var tmp$ret$1;
|
|
751
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
752
|
+
var tmp0_unsafeCast = toDouble(str);
|
|
753
|
+
var tmp$ret$0;
|
|
754
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
755
|
+
tmp$ret$0 = tmp0_unsafeCast;
|
|
756
|
+
tmp$ret$1 = tmp$ret$0;
|
|
757
|
+
tmp$ret$2 = tmp$ret$1;
|
|
758
|
+
return tmp$ret$2;
|
|
144
759
|
}
|
|
145
760
|
var RenderCondition_ALWAYS_instance;
|
|
146
761
|
var RenderCondition_NEVER_instance;
|
|
@@ -196,23 +811,23 @@
|
|
|
196
811
|
var tmp0_subject = _this__u8e3s4;
|
|
197
812
|
var tmp;
|
|
198
813
|
if (tmp0_subject instanceof RGB) {
|
|
199
|
-
var tmp1_subject = _this__u8e3s4.
|
|
200
|
-
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().
|
|
814
|
+
var tmp1_subject = _this__u8e3s4.m2l_1;
|
|
815
|
+
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().m2n_1) ? renderColorFunction(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().i2n_1) ? renderColorFunction(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().n2n_1) ? renderColorFunction(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().j2n_1) ? renderColorFunction(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
201
816
|
} else {
|
|
202
817
|
if (tmp0_subject instanceof HSL) {
|
|
203
818
|
tmp = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
204
819
|
} else {
|
|
205
820
|
if (tmp0_subject instanceof LAB) {
|
|
206
|
-
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
821
|
+
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().u2n_1), alphaPercent, renderAlpha);
|
|
207
822
|
} else {
|
|
208
823
|
if (tmp0_subject instanceof LCHab) {
|
|
209
|
-
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
824
|
+
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().s2n_1), hueUnit, alphaPercent, renderAlpha);
|
|
210
825
|
} else {
|
|
211
826
|
if (tmp0_subject instanceof HWB) {
|
|
212
827
|
tmp = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
213
828
|
} else {
|
|
214
829
|
if (tmp0_subject instanceof XYZ) {
|
|
215
|
-
tmp = renderColorFunction(_this__u8e3s4.
|
|
830
|
+
tmp = renderColorFunction(_this__u8e3s4.q2n(XYZColorSpaces_getInstance().p2n_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
216
831
|
} else {
|
|
217
832
|
tmp = null;
|
|
218
833
|
}
|
|
@@ -232,11 +847,11 @@
|
|
|
232
847
|
var tmp0_apply = StringBuilder_init_$Create$();
|
|
233
848
|
// Inline function 'kotlin.contracts.contract' call
|
|
234
849
|
// Inline function 'com.github.ajalt.colormath.renderColorFunction.<anonymous>' call
|
|
235
|
-
tmp0_apply.
|
|
236
|
-
var tmp =
|
|
850
|
+
tmp0_apply.kb('color(').kb(name).kb(' ');
|
|
851
|
+
var tmp = dropLast_0(_this__u8e3s4.x7(), 1);
|
|
237
852
|
joinTo(tmp, tmp0_apply, ' ', VOID, VOID, VOID, VOID, renderColorFunction$lambda(unitsPercent));
|
|
238
|
-
tmp0_apply.
|
|
239
|
-
tmp0_apply.
|
|
853
|
+
tmp0_apply.kb(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
854
|
+
tmp0_apply.kb(')');
|
|
240
855
|
tmp$ret$0 = tmp0_apply;
|
|
241
856
|
tmp$ret$1 = tmp$ret$0.toString();
|
|
242
857
|
return tmp$ret$1;
|
|
@@ -246,9 +861,9 @@
|
|
|
246
861
|
// Inline function 'kotlin.text.lowercase' call
|
|
247
862
|
var tmp$ret$0;
|
|
248
863
|
// Inline function 'kotlin.text.replace' call
|
|
249
|
-
var tmp0_replace = _this__u8e3s4.
|
|
864
|
+
var tmp0_replace = _this__u8e3s4.f2l().kd();
|
|
250
865
|
var tmp1_replace = Regex_init_$Create$('\\W');
|
|
251
|
-
tmp$ret$0 = tmp1_replace.
|
|
866
|
+
tmp$ret$0 = tmp1_replace.cc(tmp0_replace, '-');
|
|
252
867
|
var tmp2_lowercase = tmp$ret$0;
|
|
253
868
|
var tmp$ret$1;
|
|
254
869
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -257,19 +872,19 @@
|
|
|
257
872
|
return '--' + tmp$ret$2;
|
|
258
873
|
}
|
|
259
874
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
260
|
-
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
875
|
+
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.i2l_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.v2n())), rgbPercent ? render(_this__u8e3s4.j2l_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.v2n())), rgbPercent ? render(_this__u8e3s4.k2l_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.v2n()))], alphaPercent, renderAlpha, commas);
|
|
261
876
|
}
|
|
262
877
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
263
|
-
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
878
|
+
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.x2n_1, true), render(_this__u8e3s4.y2n_1, true)], alphaPercent, renderAlpha, commas);
|
|
264
879
|
}
|
|
265
880
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
266
|
-
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
881
|
+
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.v2l_1 / 100, true), render(_this__u8e3s4.w2l_1), render(_this__u8e3s4.x2l_1)], alphaPercent, renderAlpha);
|
|
267
882
|
}
|
|
268
883
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
269
|
-
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
884
|
+
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.a2o_1 / 100, true), render(_this__u8e3s4.b2o_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
270
885
|
}
|
|
271
886
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
272
|
-
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
887
|
+
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.g2o_1, true), render(_this__u8e3s4.h2o_1, true)], alphaPercent, renderAlpha);
|
|
273
888
|
}
|
|
274
889
|
function render(_this__u8e3s4, percent) {
|
|
275
890
|
percent = percent === VOID ? false : percent;
|
|
@@ -312,8 +927,8 @@
|
|
|
312
927
|
}
|
|
313
928
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
314
929
|
var tmp;
|
|
315
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.
|
|
316
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
930
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.e2l()) : false) ? !(_this__u8e3s4.e2l() === 1.0) : false) {
|
|
931
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.e2l()), alphaPercent);
|
|
317
932
|
} else {
|
|
318
933
|
tmp = '';
|
|
319
934
|
}
|
|
@@ -330,24 +945,24 @@
|
|
|
330
945
|
// Inline function 'kotlin.contracts.contract' call
|
|
331
946
|
// Inline function 'com.github.ajalt.colormath.renderFunction.<anonymous>' call
|
|
332
947
|
var sep = commas ? ', ' : ' ';
|
|
333
|
-
tmp0_apply.
|
|
948
|
+
tmp0_apply.kb(name).kb('(');
|
|
334
949
|
joinTo_0(components, tmp0_apply, sep);
|
|
335
|
-
tmp0_apply.
|
|
336
|
-
tmp0_apply.
|
|
950
|
+
tmp0_apply.kb(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
951
|
+
tmp0_apply.kb(')');
|
|
337
952
|
tmp$ret$0 = tmp0_apply;
|
|
338
953
|
tmp$ret$1 = tmp$ret$0.toString();
|
|
339
954
|
return tmp$ret$1;
|
|
340
955
|
}
|
|
341
956
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
342
957
|
var tmp0_subject = hueUnit;
|
|
343
|
-
var tmp0 = tmp0_subject.
|
|
958
|
+
var tmp0 = tmp0_subject.i4_1;
|
|
344
959
|
var tmp;
|
|
345
960
|
switch (tmp0) {
|
|
346
961
|
case 0:
|
|
347
|
-
tmp = render(_this__u8e3s4.
|
|
962
|
+
tmp = render(_this__u8e3s4.j2o());
|
|
348
963
|
break;
|
|
349
964
|
case 1:
|
|
350
|
-
tmp = render(_this__u8e3s4.
|
|
965
|
+
tmp = render(_this__u8e3s4.j2o()) + 'deg';
|
|
351
966
|
break;
|
|
352
967
|
case 2:
|
|
353
968
|
tmp = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -381,25 +996,28 @@
|
|
|
381
996
|
AngleUnit_initEntries();
|
|
382
997
|
return AngleUnit_AUTO_instance;
|
|
383
998
|
}
|
|
999
|
+
function hueOr(_this__u8e3s4, whenNaN) {
|
|
1000
|
+
return isNaN_0(_this__u8e3s4.j2o()) ? numberToDouble(whenNaN) : _this__u8e3s4.j2o();
|
|
1001
|
+
}
|
|
384
1002
|
function hueAsRad(_this__u8e3s4) {
|
|
385
|
-
return degToRad(_this__u8e3s4.
|
|
1003
|
+
return degToRad(_this__u8e3s4.j2o());
|
|
386
1004
|
}
|
|
387
1005
|
function hueAsGrad(_this__u8e3s4) {
|
|
388
|
-
return degToGrad(_this__u8e3s4.
|
|
1006
|
+
return degToGrad(_this__u8e3s4.j2o());
|
|
389
1007
|
}
|
|
390
1008
|
function hueAsTurns(_this__u8e3s4) {
|
|
391
|
-
return degToTurns(_this__u8e3s4.
|
|
1009
|
+
return degToTurns(_this__u8e3s4.j2o());
|
|
392
1010
|
}
|
|
393
1011
|
function WhitePoint(name, chromaticity) {
|
|
394
|
-
this.
|
|
395
|
-
this.
|
|
1012
|
+
this.k2o_1 = name;
|
|
1013
|
+
this.l2o_1 = chromaticity;
|
|
396
1014
|
}
|
|
397
1015
|
protoOf(WhitePoint).toString = function () {
|
|
398
|
-
return this.
|
|
1016
|
+
return this.k2o_1;
|
|
399
1017
|
};
|
|
400
1018
|
protoOf(WhitePoint).hashCode = function () {
|
|
401
|
-
var result = getStringHashCode(this.
|
|
402
|
-
result = imul(result, 31) + this.
|
|
1019
|
+
var result = getStringHashCode(this.k2o_1);
|
|
1020
|
+
result = imul(result, 31) + this.l2o_1.hashCode() | 0;
|
|
403
1021
|
return result;
|
|
404
1022
|
};
|
|
405
1023
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -408,22 +1026,22 @@
|
|
|
408
1026
|
if (!(other instanceof WhitePoint))
|
|
409
1027
|
return false;
|
|
410
1028
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
411
|
-
if (!(this.
|
|
1029
|
+
if (!(this.k2o_1 === tmp0_other_with_cast.k2o_1))
|
|
412
1030
|
return false;
|
|
413
|
-
if (!this.
|
|
1031
|
+
if (!this.l2o_1.equals(tmp0_other_with_cast.l2o_1))
|
|
414
1032
|
return false;
|
|
415
1033
|
return true;
|
|
416
1034
|
};
|
|
417
1035
|
function Illuminant() {
|
|
418
1036
|
Illuminant_instance = this;
|
|
419
|
-
this.
|
|
420
|
-
this.
|
|
421
|
-
this.
|
|
422
|
-
this.
|
|
423
|
-
this.
|
|
424
|
-
this.
|
|
425
|
-
this.
|
|
426
|
-
this.
|
|
1037
|
+
this.m2o_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
1038
|
+
this.n2o_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
1039
|
+
this.o2o_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
1040
|
+
this.p2o_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
1041
|
+
this.q2o_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
1042
|
+
this.r2o_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
1043
|
+
this.s2o_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
1044
|
+
this.t2o_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
427
1045
|
}
|
|
428
1046
|
var Illuminant_instance;
|
|
429
1047
|
function Illuminant_getInstance() {
|
|
@@ -527,12 +1145,25 @@
|
|
|
527
1145
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
528
1146
|
}
|
|
529
1147
|
}
|
|
1148
|
+
function CssColors() {
|
|
1149
|
+
CssColors_instance = this;
|
|
1150
|
+
this.g2m_1 = mapOf([to('black', Companion_getInstance_5().u2o(0, 0, 0)), to('silver', Companion_getInstance_5().u2o(192, 192, 192)), to('gray', Companion_getInstance_5().u2o(128, 128, 128)), to('white', Companion_getInstance_5().u2o(255, 255, 255)), to('maroon', Companion_getInstance_5().u2o(128, 0, 0)), to('red', Companion_getInstance_5().u2o(255, 0, 0)), to('purple', Companion_getInstance_5().u2o(128, 0, 128)), to('fuchsia', Companion_getInstance_5().u2o(255, 0, 255)), to('green', Companion_getInstance_5().u2o(0, 128, 0)), to('lime', Companion_getInstance_5().u2o(0, 255, 0)), to('olive', Companion_getInstance_5().u2o(128, 128, 0)), to('yellow', Companion_getInstance_5().u2o(255, 255, 0)), to('navy', Companion_getInstance_5().u2o(0, 0, 128)), to('blue', Companion_getInstance_5().u2o(0, 0, 255)), to('teal', Companion_getInstance_5().u2o(0, 128, 128)), to('aqua', Companion_getInstance_5().u2o(0, 255, 255)), to('orange', Companion_getInstance_5().u2o(255, 165, 0)), to('aliceblue', Companion_getInstance_5().u2o(240, 248, 255)), to('antiquewhite', Companion_getInstance_5().u2o(250, 235, 215)), to('aquamarine', Companion_getInstance_5().u2o(127, 255, 212)), to('azure', Companion_getInstance_5().u2o(240, 255, 255)), to('beige', Companion_getInstance_5().u2o(245, 245, 220)), to('bisque', Companion_getInstance_5().u2o(255, 228, 196)), to('blanchedalmond', Companion_getInstance_5().u2o(255, 235, 205)), to('blueviolet', Companion_getInstance_5().u2o(138, 43, 226)), to('brown', Companion_getInstance_5().u2o(165, 42, 42)), to('burlywood', Companion_getInstance_5().u2o(222, 184, 135)), to('cadetblue', Companion_getInstance_5().u2o(95, 158, 160)), to('chartreuse', Companion_getInstance_5().u2o(127, 255, 0)), to('chocolate', Companion_getInstance_5().u2o(210, 105, 30)), to('coral', Companion_getInstance_5().u2o(255, 127, 80)), to('cornflowerblue', Companion_getInstance_5().u2o(100, 149, 237)), to('cornsilk', Companion_getInstance_5().u2o(255, 248, 220)), to('crimson', Companion_getInstance_5().u2o(220, 20, 60)), to('cyan', Companion_getInstance_5().u2o(0, 255, 255)), to('darkblue', Companion_getInstance_5().u2o(0, 0, 139)), to('darkcyan', Companion_getInstance_5().u2o(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_5().u2o(184, 134, 11)), to('darkgray', Companion_getInstance_5().u2o(169, 169, 169)), to('darkgreen', Companion_getInstance_5().u2o(0, 100, 0)), to('darkgrey', Companion_getInstance_5().u2o(169, 169, 169)), to('darkkhaki', Companion_getInstance_5().u2o(189, 183, 107)), to('darkmagenta', Companion_getInstance_5().u2o(139, 0, 139)), to('darkolivegreen', Companion_getInstance_5().u2o(85, 107, 47)), to('darkorange', Companion_getInstance_5().u2o(255, 140, 0)), to('darkorchid', Companion_getInstance_5().u2o(153, 50, 204)), to('darkred', Companion_getInstance_5().u2o(139, 0, 0)), to('darksalmon', Companion_getInstance_5().u2o(233, 150, 122)), to('darkseagreen', Companion_getInstance_5().u2o(143, 188, 143)), to('darkslateblue', Companion_getInstance_5().u2o(72, 61, 139)), to('darkslategray', Companion_getInstance_5().u2o(47, 79, 79)), to('darkslategrey', Companion_getInstance_5().u2o(47, 79, 79)), to('darkturquoise', Companion_getInstance_5().u2o(0, 206, 209)), to('darkviolet', Companion_getInstance_5().u2o(148, 0, 211)), to('deeppink', Companion_getInstance_5().u2o(255, 20, 147)), to('deepskyblue', Companion_getInstance_5().u2o(0, 191, 255)), to('dimgray', Companion_getInstance_5().u2o(105, 105, 105)), to('dimgrey', Companion_getInstance_5().u2o(105, 105, 105)), to('dodgerblue', Companion_getInstance_5().u2o(30, 144, 255)), to('firebrick', Companion_getInstance_5().u2o(178, 34, 34)), to('floralwhite', Companion_getInstance_5().u2o(255, 250, 240)), to('forestgreen', Companion_getInstance_5().u2o(34, 139, 34)), to('gainsboro', Companion_getInstance_5().u2o(220, 220, 220)), to('ghostwhite', Companion_getInstance_5().u2o(248, 248, 255)), to('gold', Companion_getInstance_5().u2o(255, 215, 0)), to('goldenrod', Companion_getInstance_5().u2o(218, 165, 32)), to('greenyellow', Companion_getInstance_5().u2o(173, 255, 47)), to('grey', Companion_getInstance_5().u2o(128, 128, 128)), to('honeydew', Companion_getInstance_5().u2o(240, 255, 240)), to('hotpink', Companion_getInstance_5().u2o(255, 105, 180)), to('indianred', Companion_getInstance_5().u2o(205, 92, 92)), to('indigo', Companion_getInstance_5().u2o(75, 0, 130)), to('ivory', Companion_getInstance_5().u2o(255, 255, 240)), to('khaki', Companion_getInstance_5().u2o(240, 230, 140)), to('lavender', Companion_getInstance_5().u2o(230, 230, 250)), to('lavenderblush', Companion_getInstance_5().u2o(255, 240, 245)), to('lawngreen', Companion_getInstance_5().u2o(124, 252, 0)), to('lemonchiffon', Companion_getInstance_5().u2o(255, 250, 205)), to('lightblue', Companion_getInstance_5().u2o(173, 216, 230)), to('lightcoral', Companion_getInstance_5().u2o(240, 128, 128)), to('lightcyan', Companion_getInstance_5().u2o(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_5().u2o(250, 250, 210)), to('lightgray', Companion_getInstance_5().u2o(211, 211, 211)), to('lightgreen', Companion_getInstance_5().u2o(144, 238, 144)), to('lightgrey', Companion_getInstance_5().u2o(211, 211, 211)), to('lightpink', Companion_getInstance_5().u2o(255, 182, 193)), to('lightsalmon', Companion_getInstance_5().u2o(255, 160, 122)), to('lightseagreen', Companion_getInstance_5().u2o(32, 178, 170)), to('lightskyblue', Companion_getInstance_5().u2o(135, 206, 250)), to('lightslategray', Companion_getInstance_5().u2o(119, 136, 153)), to('lightslategrey', Companion_getInstance_5().u2o(119, 136, 153)), to('lightsteelblue', Companion_getInstance_5().u2o(176, 196, 222)), to('lightyellow', Companion_getInstance_5().u2o(255, 255, 224)), to('limegreen', Companion_getInstance_5().u2o(50, 205, 50)), to('linen', Companion_getInstance_5().u2o(250, 240, 230)), to('magenta', Companion_getInstance_5().u2o(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_5().u2o(102, 205, 170)), to('mediumblue', Companion_getInstance_5().u2o(0, 0, 205)), to('mediumorchid', Companion_getInstance_5().u2o(186, 85, 211)), to('mediumpurple', Companion_getInstance_5().u2o(147, 112, 219)), to('mediumseagreen', Companion_getInstance_5().u2o(60, 179, 113)), to('mediumslateblue', Companion_getInstance_5().u2o(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_5().u2o(0, 250, 154)), to('mediumturquoise', Companion_getInstance_5().u2o(72, 209, 204)), to('mediumvioletred', Companion_getInstance_5().u2o(199, 21, 133)), to('midnightblue', Companion_getInstance_5().u2o(25, 25, 112)), to('mintcream', Companion_getInstance_5().u2o(245, 255, 250)), to('mistyrose', Companion_getInstance_5().u2o(255, 228, 225)), to('moccasin', Companion_getInstance_5().u2o(255, 228, 181)), to('navajowhite', Companion_getInstance_5().u2o(255, 222, 173)), to('oldlace', Companion_getInstance_5().u2o(253, 245, 230)), to('olivedrab', Companion_getInstance_5().u2o(107, 142, 35)), to('orangered', Companion_getInstance_5().u2o(255, 69, 0)), to('orchid', Companion_getInstance_5().u2o(218, 112, 214)), to('palegoldenrod', Companion_getInstance_5().u2o(238, 232, 170)), to('palegreen', Companion_getInstance_5().u2o(152, 251, 152)), to('paleturquoise', Companion_getInstance_5().u2o(175, 238, 238)), to('palevioletred', Companion_getInstance_5().u2o(219, 112, 147)), to('papayawhip', Companion_getInstance_5().u2o(255, 239, 213)), to('peachpuff', Companion_getInstance_5().u2o(255, 218, 185)), to('peru', Companion_getInstance_5().u2o(205, 133, 63)), to('pink', Companion_getInstance_5().u2o(255, 192, 203)), to('plum', Companion_getInstance_5().u2o(221, 160, 221)), to('powderblue', Companion_getInstance_5().u2o(176, 224, 230)), to('rosybrown', Companion_getInstance_5().u2o(188, 143, 143)), to('royalblue', Companion_getInstance_5().u2o(65, 105, 225)), to('saddlebrown', Companion_getInstance_5().u2o(139, 69, 19)), to('salmon', Companion_getInstance_5().u2o(250, 128, 114)), to('sandybrown', Companion_getInstance_5().u2o(244, 164, 96)), to('seagreen', Companion_getInstance_5().u2o(46, 139, 87)), to('seashell', Companion_getInstance_5().u2o(255, 245, 238)), to('sienna', Companion_getInstance_5().u2o(160, 82, 45)), to('skyblue', Companion_getInstance_5().u2o(135, 206, 235)), to('slateblue', Companion_getInstance_5().u2o(106, 90, 205)), to('slategray', Companion_getInstance_5().u2o(112, 128, 144)), to('slategrey', Companion_getInstance_5().u2o(112, 128, 144)), to('snow', Companion_getInstance_5().u2o(255, 250, 250)), to('springgreen', Companion_getInstance_5().u2o(0, 255, 127)), to('steelblue', Companion_getInstance_5().u2o(70, 130, 180)), to('tan', Companion_getInstance_5().u2o(210, 180, 140)), to('thistle', Companion_getInstance_5().u2o(216, 191, 216)), to('tomato', Companion_getInstance_5().u2o(255, 99, 71)), to('turquoise', Companion_getInstance_5().u2o(64, 224, 208)), to('violet', Companion_getInstance_5().u2o(238, 130, 238)), to('wheat', Companion_getInstance_5().u2o(245, 222, 179)), to('whitesmoke', Companion_getInstance_5().u2o(245, 245, 245)), to('yellowgreen', Companion_getInstance_5().u2o(154, 205, 50)), to('rebeccapurple', Companion_getInstance_5().u2o(102, 51, 153)), to('transparent', Companion_getInstance_5().v2o(0, 0, 0, 0))]);
|
|
1151
|
+
}
|
|
1152
|
+
var CssColors_instance;
|
|
1153
|
+
function CssColors_getInstance() {
|
|
1154
|
+
if (CssColors_instance == null)
|
|
1155
|
+
new CssColors();
|
|
1156
|
+
return CssColors_instance;
|
|
1157
|
+
}
|
|
530
1158
|
function spow(_this__u8e3s4, p) {
|
|
531
1159
|
return spow_0(_this__u8e3s4, p);
|
|
532
1160
|
}
|
|
533
1161
|
function nanToOne(_this__u8e3s4) {
|
|
534
1162
|
return isNaN_0(_this__u8e3s4) ? 1.0 : _this__u8e3s4;
|
|
535
1163
|
}
|
|
1164
|
+
function normalizeDeg(_this__u8e3s4) {
|
|
1165
|
+
return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
|
|
1166
|
+
}
|
|
536
1167
|
function spow_0(_this__u8e3s4, p) {
|
|
537
1168
|
var tmp$ret$1;
|
|
538
1169
|
// Inline function 'kotlin.math.pow' call
|
|
@@ -543,7 +1174,7 @@
|
|
|
543
1174
|
tmp$ret$1 = Math.pow(tmp0_pow, p);
|
|
544
1175
|
return withSign(tmp$ret$1, _this__u8e3s4);
|
|
545
1176
|
}
|
|
546
|
-
function
|
|
1177
|
+
function normalizeDeg_0(_this__u8e3s4) {
|
|
547
1178
|
return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
|
|
548
1179
|
}
|
|
549
1180
|
function radToDeg(_this__u8e3s4) {
|
|
@@ -558,6 +1189,12 @@
|
|
|
558
1189
|
function degToRad_0(_this__u8e3s4) {
|
|
559
1190
|
return _this__u8e3s4 * get_PI() / 180.0;
|
|
560
1191
|
}
|
|
1192
|
+
function gradToDeg(_this__u8e3s4) {
|
|
1193
|
+
return _this__u8e3s4 * 0.9;
|
|
1194
|
+
}
|
|
1195
|
+
function turnToDeg(_this__u8e3s4) {
|
|
1196
|
+
return _this__u8e3s4 * 360.0;
|
|
1197
|
+
}
|
|
561
1198
|
function degToGrad(_this__u8e3s4) {
|
|
562
1199
|
return _this__u8e3s4 * 200.0 / 180.0;
|
|
563
1200
|
}
|
|
@@ -676,10 +1313,211 @@
|
|
|
676
1313
|
function dot$f($this_dot, $other, x, y) {
|
|
677
1314
|
return Matrix__get_impl_xogbpk($this_dot, 0, y) * Matrix__get_impl_xogbpk($other, x, 0) + Matrix__get_impl_xogbpk($this_dot, 1, y) * Matrix__get_impl_xogbpk($other, x, 1) + Matrix__get_impl_xogbpk($this_dot, 2, y) * Matrix__get_impl_xogbpk($other, x, 2);
|
|
678
1315
|
}
|
|
679
|
-
function
|
|
1316
|
+
function Companion_0() {
|
|
1317
|
+
Companion_instance_0 = this;
|
|
1318
|
+
this.w2o_1 = polarComponentInfo('HSL');
|
|
1319
|
+
}
|
|
1320
|
+
protoOf(Companion_0).kd = function () {
|
|
1321
|
+
return 'HSL';
|
|
1322
|
+
};
|
|
1323
|
+
protoOf(Companion_0).x2o = function () {
|
|
1324
|
+
return this.w2o_1;
|
|
1325
|
+
};
|
|
1326
|
+
protoOf(Companion_0).b2m = function (color) {
|
|
1327
|
+
return color.h2l();
|
|
1328
|
+
};
|
|
1329
|
+
var Companion_instance_0;
|
|
1330
|
+
function Companion_getInstance_1() {
|
|
1331
|
+
if (Companion_instance_0 == null)
|
|
1332
|
+
new Companion_0();
|
|
1333
|
+
return Companion_instance_0;
|
|
1334
|
+
}
|
|
1335
|
+
function toSRGB$f(h, s, l, n) {
|
|
1336
|
+
var k = (n + h) % 12.0;
|
|
1337
|
+
var tmp$ret$0;
|
|
1338
|
+
// Inline function 'kotlin.math.min' call
|
|
1339
|
+
var tmp0_min = 1 - l;
|
|
1340
|
+
tmp$ret$0 = Math.min(l, tmp0_min);
|
|
1341
|
+
var a = s * tmp$ret$0;
|
|
1342
|
+
var tmp$ret$1;
|
|
1343
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
1344
|
+
var tmp1_minOf = k - 3;
|
|
1345
|
+
var tmp2_minOf = 9 - k;
|
|
1346
|
+
tmp$ret$1 = Math.min(tmp1_minOf, tmp2_minOf, 1.0);
|
|
1347
|
+
return l - a * coerceAtLeast_0(tmp$ret$1, -1.0);
|
|
1348
|
+
}
|
|
1349
|
+
function HSL(h, s, l, alpha) {
|
|
1350
|
+
Companion_getInstance_1();
|
|
1351
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1352
|
+
this.w2n_1 = h;
|
|
1353
|
+
this.x2n_1 = s;
|
|
1354
|
+
this.y2n_1 = l;
|
|
1355
|
+
this.z2n_1 = alpha;
|
|
1356
|
+
}
|
|
1357
|
+
protoOf(HSL).j2o = function () {
|
|
1358
|
+
return this.w2n_1;
|
|
1359
|
+
};
|
|
1360
|
+
protoOf(HSL).e2l = function () {
|
|
1361
|
+
return this.z2n_1;
|
|
1362
|
+
};
|
|
1363
|
+
protoOf(HSL).f2l = function () {
|
|
1364
|
+
return Companion_getInstance_1();
|
|
1365
|
+
};
|
|
1366
|
+
protoOf(HSL).g2l = function () {
|
|
1367
|
+
if (this.x2n_1 < 1.0E-7)
|
|
1368
|
+
return Companion_getInstance_5().z2m(this.y2n_1, this.y2n_1, this.y2n_1, this.z2n_1);
|
|
1369
|
+
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1370
|
+
var s = this.x2n_1;
|
|
1371
|
+
var l = this.y2n_1;
|
|
1372
|
+
return SRGB_getInstance().z2m(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.z2n_1);
|
|
1373
|
+
};
|
|
1374
|
+
protoOf(HSL).h2l = function () {
|
|
1375
|
+
return this;
|
|
1376
|
+
};
|
|
1377
|
+
protoOf(HSL).x7 = function () {
|
|
1378
|
+
var tmp$ret$0;
|
|
1379
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
1380
|
+
var tmp0_floatArrayOf = new Float32Array([this.w2n_1, this.x2n_1, this.y2n_1, this.z2n_1]);
|
|
1381
|
+
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1382
|
+
return tmp$ret$0;
|
|
1383
|
+
};
|
|
1384
|
+
protoOf(HSL).e2p = function (h, s, l, alpha) {
|
|
1385
|
+
return new HSL(h, s, l, alpha);
|
|
1386
|
+
};
|
|
1387
|
+
protoOf(HSL).f2p = function (h, s, l, alpha, $super) {
|
|
1388
|
+
h = h === VOID ? this.w2n_1 : h;
|
|
1389
|
+
s = s === VOID ? this.x2n_1 : s;
|
|
1390
|
+
l = l === VOID ? this.y2n_1 : l;
|
|
1391
|
+
alpha = alpha === VOID ? this.z2n_1 : alpha;
|
|
1392
|
+
return $super === VOID ? this.e2p(h, s, l, alpha) : $super.e2p.call(this, h, s, l, alpha);
|
|
1393
|
+
};
|
|
1394
|
+
protoOf(HSL).toString = function () {
|
|
1395
|
+
return 'HSL(h=' + this.w2n_1 + ', s=' + this.x2n_1 + ', l=' + this.y2n_1 + ', alpha=' + this.z2n_1 + ')';
|
|
1396
|
+
};
|
|
1397
|
+
protoOf(HSL).hashCode = function () {
|
|
1398
|
+
var result = getNumberHashCode(this.w2n_1);
|
|
1399
|
+
result = imul(result, 31) + getNumberHashCode(this.x2n_1) | 0;
|
|
1400
|
+
result = imul(result, 31) + getNumberHashCode(this.y2n_1) | 0;
|
|
1401
|
+
result = imul(result, 31) + getNumberHashCode(this.z2n_1) | 0;
|
|
1402
|
+
return result;
|
|
1403
|
+
};
|
|
1404
|
+
protoOf(HSL).equals = function (other) {
|
|
1405
|
+
if (this === other)
|
|
1406
|
+
return true;
|
|
1407
|
+
if (!(other instanceof HSL))
|
|
1408
|
+
return false;
|
|
1409
|
+
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1410
|
+
if (!equals(this.w2n_1, tmp0_other_with_cast.w2n_1))
|
|
1411
|
+
return false;
|
|
1412
|
+
if (!equals(this.x2n_1, tmp0_other_with_cast.x2n_1))
|
|
1413
|
+
return false;
|
|
1414
|
+
if (!equals(this.y2n_1, tmp0_other_with_cast.y2n_1))
|
|
1415
|
+
return false;
|
|
1416
|
+
if (!equals(this.z2n_1, tmp0_other_with_cast.z2n_1))
|
|
1417
|
+
return false;
|
|
1418
|
+
return true;
|
|
1419
|
+
};
|
|
1420
|
+
function Companion_1() {
|
|
1421
|
+
Companion_instance_1 = this;
|
|
1422
|
+
this.g2p_1 = polarComponentInfo('HWB');
|
|
680
1423
|
}
|
|
681
|
-
function
|
|
1424
|
+
protoOf(Companion_1).kd = function () {
|
|
1425
|
+
return 'HWB';
|
|
1426
|
+
};
|
|
1427
|
+
protoOf(Companion_1).x2o = function () {
|
|
1428
|
+
return this.g2p_1;
|
|
1429
|
+
};
|
|
1430
|
+
protoOf(Companion_1).b2m = function (color) {
|
|
1431
|
+
return color.a2m();
|
|
1432
|
+
};
|
|
1433
|
+
var Companion_instance_1;
|
|
1434
|
+
function Companion_getInstance_2() {
|
|
1435
|
+
if (Companion_instance_1 == null)
|
|
1436
|
+
new Companion_1();
|
|
1437
|
+
return Companion_instance_1;
|
|
682
1438
|
}
|
|
1439
|
+
function HWB(h, w, b, alpha) {
|
|
1440
|
+
Companion_getInstance_2();
|
|
1441
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1442
|
+
this.f2o_1 = h;
|
|
1443
|
+
this.g2o_1 = w;
|
|
1444
|
+
this.h2o_1 = b;
|
|
1445
|
+
this.i2o_1 = alpha;
|
|
1446
|
+
}
|
|
1447
|
+
protoOf(HWB).j2o = function () {
|
|
1448
|
+
return this.f2o_1;
|
|
1449
|
+
};
|
|
1450
|
+
protoOf(HWB).e2l = function () {
|
|
1451
|
+
return this.i2o_1;
|
|
1452
|
+
};
|
|
1453
|
+
protoOf(HWB).f2l = function () {
|
|
1454
|
+
return Companion_getInstance_2();
|
|
1455
|
+
};
|
|
1456
|
+
protoOf(HWB).g2l = function () {
|
|
1457
|
+
var h = this.f2o_1 / 60.0;
|
|
1458
|
+
var w = this.g2o_1;
|
|
1459
|
+
var b = this.h2o_1;
|
|
1460
|
+
var a = this.i2o_1;
|
|
1461
|
+
if (w + b >= 1) {
|
|
1462
|
+
var gray = w / (w + b);
|
|
1463
|
+
return Companion_getInstance_5().z2m(gray, gray, gray, a);
|
|
1464
|
+
}
|
|
1465
|
+
var v = 1 - b;
|
|
1466
|
+
var i = numberToInt(h);
|
|
1467
|
+
var f = (i % 2 | 0) === 1 ? 1 - (h - i) : h - i;
|
|
1468
|
+
var n = w + f * (v - w);
|
|
1469
|
+
var tmp0_subject = i;
|
|
1470
|
+
switch (tmp0_subject) {
|
|
1471
|
+
case 1:
|
|
1472
|
+
return Companion_getInstance_5().z2m(n, v, w, a);
|
|
1473
|
+
case 2:
|
|
1474
|
+
return Companion_getInstance_5().z2m(w, v, n, a);
|
|
1475
|
+
case 3:
|
|
1476
|
+
return Companion_getInstance_5().z2m(w, n, v, a);
|
|
1477
|
+
case 4:
|
|
1478
|
+
return Companion_getInstance_5().z2m(n, w, v, a);
|
|
1479
|
+
case 5:
|
|
1480
|
+
return Companion_getInstance_5().z2m(v, w, n, a);
|
|
1481
|
+
default:
|
|
1482
|
+
return Companion_getInstance_5().z2m(v, n, w, a);
|
|
1483
|
+
}
|
|
1484
|
+
};
|
|
1485
|
+
protoOf(HWB).a2m = function () {
|
|
1486
|
+
return this;
|
|
1487
|
+
};
|
|
1488
|
+
protoOf(HWB).x7 = function () {
|
|
1489
|
+
var tmp$ret$0;
|
|
1490
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
1491
|
+
var tmp0_floatArrayOf = new Float32Array([this.f2o_1, this.g2o_1, this.h2o_1, this.i2o_1]);
|
|
1492
|
+
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1493
|
+
return tmp$ret$0;
|
|
1494
|
+
};
|
|
1495
|
+
protoOf(HWB).toString = function () {
|
|
1496
|
+
return 'HWB(h=' + this.f2o_1 + ', w=' + this.g2o_1 + ', b=' + this.h2o_1 + ', alpha=' + this.i2o_1 + ')';
|
|
1497
|
+
};
|
|
1498
|
+
protoOf(HWB).hashCode = function () {
|
|
1499
|
+
var result = getNumberHashCode(this.f2o_1);
|
|
1500
|
+
result = imul(result, 31) + getNumberHashCode(this.g2o_1) | 0;
|
|
1501
|
+
result = imul(result, 31) + getNumberHashCode(this.h2o_1) | 0;
|
|
1502
|
+
result = imul(result, 31) + getNumberHashCode(this.i2o_1) | 0;
|
|
1503
|
+
return result;
|
|
1504
|
+
};
|
|
1505
|
+
protoOf(HWB).equals = function (other) {
|
|
1506
|
+
if (this === other)
|
|
1507
|
+
return true;
|
|
1508
|
+
if (!(other instanceof HWB))
|
|
1509
|
+
return false;
|
|
1510
|
+
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1511
|
+
if (!equals(this.f2o_1, tmp0_other_with_cast.f2o_1))
|
|
1512
|
+
return false;
|
|
1513
|
+
if (!equals(this.g2o_1, tmp0_other_with_cast.g2o_1))
|
|
1514
|
+
return false;
|
|
1515
|
+
if (!equals(this.h2o_1, tmp0_other_with_cast.h2o_1))
|
|
1516
|
+
return false;
|
|
1517
|
+
if (!equals(this.i2o_1, tmp0_other_with_cast.i2o_1))
|
|
1518
|
+
return false;
|
|
1519
|
+
return true;
|
|
1520
|
+
};
|
|
683
1521
|
function get_ICTCP_RGB_TO_LMS() {
|
|
684
1522
|
_init_properties_ICtCp_kt__7vx7or();
|
|
685
1523
|
return ICTCP_RGB_TO_LMS;
|
|
@@ -718,14 +1556,14 @@
|
|
|
718
1556
|
var ICTCP_LMS_TO_XYZ;
|
|
719
1557
|
function ICtCp() {
|
|
720
1558
|
}
|
|
721
|
-
protoOf(ICtCp).
|
|
722
|
-
var fo = RGBColorSpaces_getInstance().
|
|
1559
|
+
protoOf(ICtCp).l2p = function () {
|
|
1560
|
+
var fo = RGBColorSpaces_getInstance().j2n_1.m2p();
|
|
723
1561
|
var tmp$ret$3;
|
|
724
1562
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
725
1563
|
var tmp0_dot = get_ICTCP_ICTCP_to_LMS();
|
|
726
|
-
var tmp1_dot = this.
|
|
727
|
-
var tmp2_dot = this.
|
|
728
|
-
var tmp3_dot = this.
|
|
1564
|
+
var tmp1_dot = this.h2p_1;
|
|
1565
|
+
var tmp2_dot = this.i2p_1;
|
|
1566
|
+
var tmp3_dot = this.j2p_1;
|
|
729
1567
|
var tmp$ret$2;
|
|
730
1568
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
731
1569
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
@@ -734,15 +1572,15 @@
|
|
|
734
1572
|
var tmp$ret$1;
|
|
735
1573
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
736
1574
|
var tmp0_dot_0 = get_ICTCP_LMS_to_RGB();
|
|
737
|
-
var tmp1_dot_0 = PqNonlinearity_getInstance().
|
|
738
|
-
var tmp2_dot_0 = PqNonlinearity_getInstance().
|
|
739
|
-
var tmp3_dot_0 = PqNonlinearity_getInstance().
|
|
1575
|
+
var tmp1_dot_0 = PqNonlinearity_getInstance().v2p(tmp4__anonymous__pkmkx7);
|
|
1576
|
+
var tmp2_dot_0 = PqNonlinearity_getInstance().v2p(tmp5__anonymous__kpxxpo);
|
|
1577
|
+
var tmp3_dot_0 = PqNonlinearity_getInstance().v2p(tmp6__anonymous__fv9ai5);
|
|
740
1578
|
var tmp$ret$0;
|
|
741
1579
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
742
1580
|
var tmp4__anonymous__pkmkx7_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 0) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 0) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 0) * tmp3_dot_0;
|
|
743
1581
|
var tmp5__anonymous__kpxxpo_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 1) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 1) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 1) * tmp3_dot_0;
|
|
744
1582
|
var tmp6__anonymous__fv9ai5_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 2) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 2) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 2) * tmp3_dot_0;
|
|
745
|
-
tmp$ret$0 = RGBColorSpaces_getInstance().
|
|
1583
|
+
tmp$ret$0 = RGBColorSpaces_getInstance().j2n_1.z2m(fo.w2p(tmp4__anonymous__pkmkx7_0), fo.w2p(tmp5__anonymous__kpxxpo_0), fo.w2p(tmp6__anonymous__fv9ai5_0), this.k2p_1);
|
|
746
1584
|
tmp$ret$1 = tmp$ret$0;
|
|
747
1585
|
tmp$ret$2 = tmp$ret$1;
|
|
748
1586
|
tmp$ret$3 = tmp$ret$2;
|
|
@@ -750,22 +1588,22 @@
|
|
|
750
1588
|
};
|
|
751
1589
|
function PqNonlinearity() {
|
|
752
1590
|
PqNonlinearity_instance = this;
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
755
|
-
this.
|
|
756
|
-
this.
|
|
757
|
-
this.
|
|
758
|
-
this.
|
|
759
|
-
this.
|
|
760
|
-
this.
|
|
761
|
-
}
|
|
762
|
-
protoOf(PqNonlinearity).
|
|
1591
|
+
this.n2p_1 = 0.1593017578125;
|
|
1592
|
+
this.o2p_1 = 78.84375;
|
|
1593
|
+
this.p2p_1 = 0.8359375;
|
|
1594
|
+
this.q2p_1 = 18.8515625;
|
|
1595
|
+
this.r2p_1 = 18.6875;
|
|
1596
|
+
this.s2p_1 = 10000.0;
|
|
1597
|
+
this.t2p_1 = 6.277394636015326;
|
|
1598
|
+
this.u2p_1 = 0.012683313515655966;
|
|
1599
|
+
}
|
|
1600
|
+
protoOf(PqNonlinearity).v2p = function (x) {
|
|
763
1601
|
var vp = spow(x, 0.012683313515655966);
|
|
764
|
-
var n =
|
|
1602
|
+
var n = coerceAtLeast_0(vp - 0.8359375, 0.0);
|
|
765
1603
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
766
1604
|
return 10000.0 * l;
|
|
767
1605
|
};
|
|
768
|
-
protoOf(PqNonlinearity).
|
|
1606
|
+
protoOf(PqNonlinearity).w2p = function (x) {
|
|
769
1607
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
770
1608
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
771
1609
|
};
|
|
@@ -790,64 +1628,70 @@
|
|
|
790
1628
|
ICTCP_LMS_TO_XYZ = inverse(get_ICTCP_XYZ_TO_LMS());
|
|
791
1629
|
}
|
|
792
1630
|
}
|
|
793
|
-
function
|
|
794
|
-
|
|
795
|
-
this.
|
|
1631
|
+
function Companion_2() {
|
|
1632
|
+
Companion_instance_2 = this;
|
|
1633
|
+
this.a2n_1 = LABColorSpaces_getInstance().t2n_1;
|
|
796
1634
|
}
|
|
797
|
-
protoOf(
|
|
798
|
-
return this.
|
|
1635
|
+
protoOf(Companion_2).x2o = function () {
|
|
1636
|
+
return this.a2n_1.x2o();
|
|
799
1637
|
};
|
|
800
|
-
protoOf(
|
|
801
|
-
return this.
|
|
1638
|
+
protoOf(Companion_2).kd = function () {
|
|
1639
|
+
return this.a2n_1.kd();
|
|
802
1640
|
};
|
|
803
|
-
protoOf(
|
|
804
|
-
return this.
|
|
1641
|
+
protoOf(Companion_2).c2m = function () {
|
|
1642
|
+
return this.a2n_1.c2m();
|
|
805
1643
|
};
|
|
806
|
-
protoOf(
|
|
807
|
-
return this.
|
|
1644
|
+
protoOf(Companion_2).b2m = function (color) {
|
|
1645
|
+
return this.a2n_1.b2m(color);
|
|
808
1646
|
};
|
|
809
|
-
protoOf(
|
|
810
|
-
return this.
|
|
1647
|
+
protoOf(Companion_2).d2m = function (components) {
|
|
1648
|
+
return this.a2n_1.d2m(components);
|
|
811
1649
|
};
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
return
|
|
1650
|
+
protoOf(Companion_2).z2m = function (l, a, b, alpha) {
|
|
1651
|
+
return this.a2n_1.z2m(l, a, b, alpha);
|
|
1652
|
+
};
|
|
1653
|
+
protoOf(Companion_2).x2p = function (l, a, b, alpha) {
|
|
1654
|
+
return this.a2n_1.x2p(l, a, b, alpha);
|
|
1655
|
+
};
|
|
1656
|
+
var Companion_instance_2;
|
|
1657
|
+
function Companion_getInstance_3() {
|
|
1658
|
+
if (Companion_instance_2 == null)
|
|
1659
|
+
new Companion_2();
|
|
1660
|
+
return Companion_instance_2;
|
|
817
1661
|
}
|
|
818
1662
|
function LAB(l, a, b, alpha, space) {
|
|
819
|
-
|
|
820
|
-
this.
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
823
|
-
this.
|
|
824
|
-
this.
|
|
825
|
-
}
|
|
826
|
-
protoOf(LAB).
|
|
827
|
-
return this.
|
|
828
|
-
};
|
|
829
|
-
protoOf(LAB).
|
|
830
|
-
return this.
|
|
831
|
-
};
|
|
832
|
-
protoOf(LAB).
|
|
833
|
-
var tmp0_subject = this.
|
|
834
|
-
return tmp0_subject === 0.0 ?
|
|
835
|
-
};
|
|
836
|
-
protoOf(LAB).
|
|
837
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
838
|
-
if (this.
|
|
839
|
-
return xyzSpace.
|
|
840
|
-
var fy = (this.
|
|
841
|
-
var fz = fy - this.
|
|
842
|
-
var fx = this.
|
|
1663
|
+
Companion_getInstance_3();
|
|
1664
|
+
this.v2l_1 = l;
|
|
1665
|
+
this.w2l_1 = a;
|
|
1666
|
+
this.x2l_1 = b;
|
|
1667
|
+
this.y2l_1 = alpha;
|
|
1668
|
+
this.z2l_1 = space;
|
|
1669
|
+
}
|
|
1670
|
+
protoOf(LAB).e2l = function () {
|
|
1671
|
+
return this.y2l_1;
|
|
1672
|
+
};
|
|
1673
|
+
protoOf(LAB).f2l = function () {
|
|
1674
|
+
return this.z2l_1;
|
|
1675
|
+
};
|
|
1676
|
+
protoOf(LAB).g2l = function () {
|
|
1677
|
+
var tmp0_subject = this.v2l_1;
|
|
1678
|
+
return tmp0_subject === 0.0 ? Companion_getInstance_5().z2m(0.0, 0.0, 0.0, this.y2l_1) : this.n2l().g2l();
|
|
1679
|
+
};
|
|
1680
|
+
protoOf(LAB).n2l = function () {
|
|
1681
|
+
var xyzSpace = XYZColorSpace_0(this.z2l_1.c2m());
|
|
1682
|
+
if (this.v2l_1 === 0.0)
|
|
1683
|
+
return xyzSpace.y2p(0.0, 0.0, 0.0);
|
|
1684
|
+
var fy = (this.v2l_1 + 16) / 116.0;
|
|
1685
|
+
var fz = fy - this.x2l_1 / 200.0;
|
|
1686
|
+
var fx = this.w2l_1 / 500.0 + fy;
|
|
843
1687
|
var tmp;
|
|
844
|
-
if (this.
|
|
1688
|
+
if (this.v2l_1 > get_CIE_E_times_K()) {
|
|
845
1689
|
var tmp$ret$0;
|
|
846
1690
|
// Inline function 'kotlin.math.pow' call
|
|
847
1691
|
tmp$ret$0 = Math.pow(fy, 3.0);
|
|
848
1692
|
tmp = tmp$ret$0;
|
|
849
1693
|
} else {
|
|
850
|
-
tmp = this.
|
|
1694
|
+
tmp = this.v2l_1 / get_CIE_K();
|
|
851
1695
|
}
|
|
852
1696
|
var yr = tmp;
|
|
853
1697
|
var tmp$ret$3;
|
|
@@ -874,14 +1718,14 @@
|
|
|
874
1718
|
tmp$ret$5 = tmp1_let > get_CIE_E() ? tmp1_let : (116 * fx - 16) / get_CIE_K();
|
|
875
1719
|
tmp$ret$6 = tmp$ret$5;
|
|
876
1720
|
var xr = tmp$ret$6;
|
|
877
|
-
var wp = this.
|
|
878
|
-
return xyzSpace.
|
|
1721
|
+
var wp = this.z2l_1.c2m().l2o_1;
|
|
1722
|
+
return xyzSpace.x2p(xr * wp.c2q(), yr * wp.b2q_1, zr * wp.d2q(), this.y2l_1);
|
|
879
1723
|
};
|
|
880
|
-
protoOf(LAB).
|
|
1724
|
+
protoOf(LAB).u2l = function () {
|
|
881
1725
|
var tmp$ret$3;
|
|
882
1726
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
883
|
-
var tmp1_toPolarModel = this.
|
|
884
|
-
var tmp2_toPolarModel = this.
|
|
1727
|
+
var tmp1_toPolarModel = this.w2l_1;
|
|
1728
|
+
var tmp2_toPolarModel = this.x2l_1;
|
|
885
1729
|
var tmp$ret$0;
|
|
886
1730
|
// Inline function 'kotlin.math.sqrt' call
|
|
887
1731
|
var tmp0_sqrt = tmp1_toPolarModel * tmp1_toPolarModel + tmp2_toPolarModel * tmp2_toPolarModel;
|
|
@@ -900,30 +1744,30 @@
|
|
|
900
1744
|
var h = tmp;
|
|
901
1745
|
var tmp$ret$2;
|
|
902
1746
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
903
|
-
var tmp3__anonymous__ufb84q =
|
|
904
|
-
tmp$ret$2 = LCHabColorSpace(this.
|
|
1747
|
+
var tmp3__anonymous__ufb84q = normalizeDeg_0(h);
|
|
1748
|
+
tmp$ret$2 = LCHabColorSpace(this.z2l_1.c2m()).z2m(this.v2l_1, c, tmp3__anonymous__ufb84q, this.y2l_1);
|
|
905
1749
|
tmp$ret$3 = tmp$ret$2;
|
|
906
1750
|
return tmp$ret$3;
|
|
907
1751
|
};
|
|
908
|
-
protoOf(LAB).
|
|
1752
|
+
protoOf(LAB).o2l = function () {
|
|
909
1753
|
return this;
|
|
910
1754
|
};
|
|
911
|
-
protoOf(LAB).
|
|
1755
|
+
protoOf(LAB).x7 = function () {
|
|
912
1756
|
var tmp$ret$0;
|
|
913
1757
|
// Inline function 'kotlin.floatArrayOf' call
|
|
914
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1758
|
+
var tmp0_floatArrayOf = new Float32Array([this.v2l_1, this.w2l_1, this.x2l_1, this.y2l_1]);
|
|
915
1759
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
916
1760
|
return tmp$ret$0;
|
|
917
1761
|
};
|
|
918
1762
|
protoOf(LAB).toString = function () {
|
|
919
|
-
return 'LAB(l=' + this.
|
|
1763
|
+
return 'LAB(l=' + this.v2l_1 + ', a=' + this.w2l_1 + ', b=' + this.x2l_1 + ', alpha=' + this.y2l_1 + ', space=' + this.z2l_1 + ')';
|
|
920
1764
|
};
|
|
921
1765
|
protoOf(LAB).hashCode = function () {
|
|
922
|
-
var result = getNumberHashCode(this.
|
|
923
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
924
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
925
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
926
|
-
result = imul(result, 31) + hashCode(this.
|
|
1766
|
+
var result = getNumberHashCode(this.v2l_1);
|
|
1767
|
+
result = imul(result, 31) + getNumberHashCode(this.w2l_1) | 0;
|
|
1768
|
+
result = imul(result, 31) + getNumberHashCode(this.x2l_1) | 0;
|
|
1769
|
+
result = imul(result, 31) + getNumberHashCode(this.y2l_1) | 0;
|
|
1770
|
+
result = imul(result, 31) + hashCode(this.z2l_1) | 0;
|
|
927
1771
|
return result;
|
|
928
1772
|
};
|
|
929
1773
|
protoOf(LAB).equals = function (other) {
|
|
@@ -932,15 +1776,15 @@
|
|
|
932
1776
|
if (!(other instanceof LAB))
|
|
933
1777
|
return false;
|
|
934
1778
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
935
|
-
if (!equals(this.
|
|
1779
|
+
if (!equals(this.v2l_1, tmp0_other_with_cast.v2l_1))
|
|
936
1780
|
return false;
|
|
937
|
-
if (!equals(this.
|
|
1781
|
+
if (!equals(this.w2l_1, tmp0_other_with_cast.w2l_1))
|
|
938
1782
|
return false;
|
|
939
|
-
if (!equals(this.
|
|
1783
|
+
if (!equals(this.x2l_1, tmp0_other_with_cast.x2l_1))
|
|
940
1784
|
return false;
|
|
941
|
-
if (!equals(this.
|
|
1785
|
+
if (!equals(this.y2l_1, tmp0_other_with_cast.y2l_1))
|
|
942
1786
|
return false;
|
|
943
|
-
if (!equals(this.
|
|
1787
|
+
if (!equals(this.z2l_1, tmp0_other_with_cast.z2l_1))
|
|
944
1788
|
return false;
|
|
945
1789
|
return true;
|
|
946
1790
|
};
|
|
@@ -948,12 +1792,12 @@
|
|
|
948
1792
|
}
|
|
949
1793
|
function LABColorSpace_0(whitePoint) {
|
|
950
1794
|
var tmp0_subject = whitePoint;
|
|
951
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
1795
|
+
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? LABColorSpaces_getInstance().t2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? LABColorSpaces_getInstance().u2n_1 : new LABColorSpaceImpl(whitePoint);
|
|
952
1796
|
}
|
|
953
1797
|
function LABColorSpaces() {
|
|
954
1798
|
LABColorSpaces_instance = this;
|
|
955
|
-
this.
|
|
956
|
-
this.
|
|
1799
|
+
this.t2n_1 = new LABColorSpaceImpl(Illuminant_getInstance().r2o_1);
|
|
1800
|
+
this.u2n_1 = new LABColorSpaceImpl(Illuminant_getInstance().p2o_1);
|
|
957
1801
|
}
|
|
958
1802
|
var LABColorSpaces_instance;
|
|
959
1803
|
function LABColorSpaces_getInstance() {
|
|
@@ -962,45 +1806,88 @@
|
|
|
962
1806
|
return LABColorSpaces_instance;
|
|
963
1807
|
}
|
|
964
1808
|
function LABColorSpaceImpl(whitePoint) {
|
|
965
|
-
this.
|
|
966
|
-
this.
|
|
1809
|
+
this.e2q_1 = whitePoint;
|
|
1810
|
+
this.f2q_1 = rectangularComponentInfo('LAB');
|
|
967
1811
|
}
|
|
968
|
-
protoOf(LABColorSpaceImpl).
|
|
969
|
-
return this.
|
|
1812
|
+
protoOf(LABColorSpaceImpl).c2m = function () {
|
|
1813
|
+
return this.e2q_1;
|
|
970
1814
|
};
|
|
971
|
-
protoOf(LABColorSpaceImpl).
|
|
1815
|
+
protoOf(LABColorSpaceImpl).kd = function () {
|
|
972
1816
|
return 'LAB';
|
|
973
1817
|
};
|
|
974
|
-
protoOf(LABColorSpaceImpl).
|
|
1818
|
+
protoOf(LABColorSpaceImpl).x2o = function () {
|
|
1819
|
+
return this.f2q_1;
|
|
1820
|
+
};
|
|
1821
|
+
protoOf(LABColorSpaceImpl).b2m = function (color) {
|
|
975
1822
|
var tmp$ret$2;
|
|
976
1823
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
977
1824
|
var tmp;
|
|
978
|
-
var tmp_0 = color.
|
|
1825
|
+
var tmp_0 = color.f2l();
|
|
979
1826
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
980
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
981
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1827
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c2m();
|
|
1828
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().r2o_1 : tmp1_elvis_lhs).equals(this.c2m())) {
|
|
982
1829
|
var tmp$ret$0;
|
|
983
1830
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
984
|
-
tmp$ret$0 = color.
|
|
1831
|
+
tmp$ret$0 = color.o2l();
|
|
985
1832
|
tmp = tmp$ret$0;
|
|
986
1833
|
} else {
|
|
987
1834
|
var tmp$ret$1;
|
|
988
1835
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
989
|
-
var tmp0__anonymous__q1qw7t = color.
|
|
990
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.
|
|
1836
|
+
var tmp0__anonymous__q1qw7t = color.n2l().q2n(XYZColorSpace_0(this.c2m()));
|
|
1837
|
+
tmp$ret$1 = tmp0__anonymous__q1qw7t.o2l();
|
|
991
1838
|
tmp = tmp$ret$1;
|
|
992
1839
|
}
|
|
993
1840
|
tmp$ret$2 = tmp;
|
|
994
1841
|
return tmp$ret$2;
|
|
995
1842
|
};
|
|
1843
|
+
protoOf(LABColorSpaceImpl).d2m = function (components) {
|
|
1844
|
+
var tmp$ret$5;
|
|
1845
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1846
|
+
var tmp$ret$4;
|
|
1847
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1848
|
+
var size = this.x2o().i();
|
|
1849
|
+
// Inline function 'kotlin.require' call
|
|
1850
|
+
var containsLower = size - 1 | 0;
|
|
1851
|
+
var containsArg = components.length;
|
|
1852
|
+
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
1853
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1854
|
+
if (!tmp0_require) {
|
|
1855
|
+
var tmp$ret$0;
|
|
1856
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
1857
|
+
tmp$ret$0 = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1858
|
+
var message = tmp$ret$0;
|
|
1859
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
1860
|
+
}
|
|
1861
|
+
var tmp$ret$3;
|
|
1862
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1863
|
+
var tmp = components[0];
|
|
1864
|
+
var tmp_0 = components[1];
|
|
1865
|
+
var tmp_1 = components[2];
|
|
1866
|
+
var tmp$ret$2;
|
|
1867
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
1868
|
+
var tmp_2;
|
|
1869
|
+
if (3 <= get_lastIndex_0(components)) {
|
|
1870
|
+
tmp_2 = components[3];
|
|
1871
|
+
} else {
|
|
1872
|
+
var tmp$ret$1;
|
|
1873
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1874
|
+
tmp$ret$1 = 1.0;
|
|
1875
|
+
tmp_2 = tmp$ret$1;
|
|
1876
|
+
}
|
|
1877
|
+
tmp$ret$2 = tmp_2;
|
|
1878
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1879
|
+
tmp$ret$4 = tmp$ret$3;
|
|
1880
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1881
|
+
return tmp$ret$5;
|
|
1882
|
+
};
|
|
996
1883
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
997
|
-
return 'LABColorSpace(' + this.
|
|
1884
|
+
return 'LABColorSpace(' + this.e2q_1 + ')';
|
|
998
1885
|
};
|
|
999
|
-
protoOf(LABColorSpaceImpl).
|
|
1886
|
+
protoOf(LABColorSpaceImpl).z2m = function (l, a, b, alpha) {
|
|
1000
1887
|
return new LAB(l, a, b, alpha, this);
|
|
1001
1888
|
};
|
|
1002
1889
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1003
|
-
return this.
|
|
1890
|
+
return this.e2q_1.hashCode();
|
|
1004
1891
|
};
|
|
1005
1892
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1006
1893
|
if (this === other)
|
|
@@ -1008,60 +1895,66 @@
|
|
|
1008
1895
|
if (!(other instanceof LABColorSpaceImpl))
|
|
1009
1896
|
return false;
|
|
1010
1897
|
var tmp0_other_with_cast = other instanceof LABColorSpaceImpl ? other : THROW_CCE();
|
|
1011
|
-
if (!this.
|
|
1898
|
+
if (!this.e2q_1.equals(tmp0_other_with_cast.e2q_1))
|
|
1012
1899
|
return false;
|
|
1013
1900
|
return true;
|
|
1014
1901
|
};
|
|
1015
|
-
function
|
|
1016
|
-
|
|
1017
|
-
this.
|
|
1902
|
+
function Companion_3() {
|
|
1903
|
+
Companion_instance_3 = this;
|
|
1904
|
+
this.b2n_1 = LCHabColorSpaces_getInstance().r2n_1;
|
|
1018
1905
|
}
|
|
1019
|
-
protoOf(
|
|
1020
|
-
return this.
|
|
1906
|
+
protoOf(Companion_3).x2o = function () {
|
|
1907
|
+
return this.b2n_1.x2o();
|
|
1021
1908
|
};
|
|
1022
|
-
protoOf(
|
|
1023
|
-
return this.
|
|
1909
|
+
protoOf(Companion_3).kd = function () {
|
|
1910
|
+
return this.b2n_1.kd();
|
|
1024
1911
|
};
|
|
1025
|
-
protoOf(
|
|
1026
|
-
return this.
|
|
1912
|
+
protoOf(Companion_3).c2m = function () {
|
|
1913
|
+
return this.b2n_1.c2m();
|
|
1027
1914
|
};
|
|
1028
|
-
protoOf(
|
|
1029
|
-
return this.
|
|
1915
|
+
protoOf(Companion_3).b2m = function (color) {
|
|
1916
|
+
return this.b2n_1.b2m(color);
|
|
1030
1917
|
};
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
return
|
|
1918
|
+
protoOf(Companion_3).d2m = function (components) {
|
|
1919
|
+
return this.b2n_1.d2m(components);
|
|
1920
|
+
};
|
|
1921
|
+
protoOf(Companion_3).z2m = function (l, c, h, alpha) {
|
|
1922
|
+
return this.b2n_1.z2m(l, c, h, alpha);
|
|
1923
|
+
};
|
|
1924
|
+
var Companion_instance_3;
|
|
1925
|
+
function Companion_getInstance_4() {
|
|
1926
|
+
if (Companion_instance_3 == null)
|
|
1927
|
+
new Companion_3();
|
|
1928
|
+
return Companion_instance_3;
|
|
1036
1929
|
}
|
|
1037
1930
|
function LCHab(l, c, h, alpha, space) {
|
|
1038
|
-
|
|
1039
|
-
this.
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
1931
|
+
Companion_getInstance_4();
|
|
1932
|
+
this.a2o_1 = l;
|
|
1933
|
+
this.b2o_1 = c;
|
|
1934
|
+
this.c2o_1 = h;
|
|
1935
|
+
this.d2o_1 = alpha;
|
|
1936
|
+
this.e2o_1 = space;
|
|
1044
1937
|
}
|
|
1045
|
-
protoOf(LCHab).
|
|
1046
|
-
return this.
|
|
1938
|
+
protoOf(LCHab).j2o = function () {
|
|
1939
|
+
return this.c2o_1;
|
|
1047
1940
|
};
|
|
1048
|
-
protoOf(LCHab).
|
|
1049
|
-
return this.
|
|
1941
|
+
protoOf(LCHab).e2l = function () {
|
|
1942
|
+
return this.d2o_1;
|
|
1050
1943
|
};
|
|
1051
|
-
protoOf(LCHab).
|
|
1052
|
-
return this.
|
|
1944
|
+
protoOf(LCHab).f2l = function () {
|
|
1945
|
+
return this.e2o_1;
|
|
1053
1946
|
};
|
|
1054
|
-
protoOf(LCHab).
|
|
1055
|
-
return this.
|
|
1947
|
+
protoOf(LCHab).g2l = function () {
|
|
1948
|
+
return this.o2l().g2l();
|
|
1056
1949
|
};
|
|
1057
|
-
protoOf(LCHab).
|
|
1058
|
-
return this.
|
|
1950
|
+
protoOf(LCHab).n2l = function () {
|
|
1951
|
+
return this.o2l().n2l();
|
|
1059
1952
|
};
|
|
1060
|
-
protoOf(LCHab).
|
|
1953
|
+
protoOf(LCHab).o2l = function () {
|
|
1061
1954
|
var tmp$ret$3;
|
|
1062
1955
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1063
|
-
var tmp0_fromPolarModel = this.
|
|
1064
|
-
var tmp1_fromPolarModel = this.
|
|
1956
|
+
var tmp0_fromPolarModel = this.b2o_1;
|
|
1957
|
+
var tmp1_fromPolarModel = this.c2o_1;
|
|
1065
1958
|
var hDegrees = isNaN_0(tmp1_fromPolarModel) ? 0.0 : degToRad(tmp1_fromPolarModel);
|
|
1066
1959
|
var tmp$ret$0;
|
|
1067
1960
|
// Inline function 'kotlin.math.cos' call
|
|
@@ -1073,29 +1966,29 @@
|
|
|
1073
1966
|
var b = tmp0_fromPolarModel * tmp$ret$1;
|
|
1074
1967
|
var tmp$ret$2;
|
|
1075
1968
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1076
|
-
tmp$ret$2 = LABColorSpace_0(this.
|
|
1969
|
+
tmp$ret$2 = LABColorSpace_0(this.e2o_1.c2m()).z2m(this.a2o_1, a, b, this.d2o_1);
|
|
1077
1970
|
tmp$ret$3 = tmp$ret$2;
|
|
1078
1971
|
return tmp$ret$3;
|
|
1079
1972
|
};
|
|
1080
|
-
protoOf(LCHab).
|
|
1973
|
+
protoOf(LCHab).u2l = function () {
|
|
1081
1974
|
return this;
|
|
1082
1975
|
};
|
|
1083
|
-
protoOf(LCHab).
|
|
1976
|
+
protoOf(LCHab).x7 = function () {
|
|
1084
1977
|
var tmp$ret$0;
|
|
1085
1978
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1086
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1979
|
+
var tmp0_floatArrayOf = new Float32Array([this.a2o_1, this.b2o_1, this.c2o_1, this.d2o_1]);
|
|
1087
1980
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1088
1981
|
return tmp$ret$0;
|
|
1089
1982
|
};
|
|
1090
1983
|
protoOf(LCHab).toString = function () {
|
|
1091
|
-
return 'LCHab(l=' + this.
|
|
1984
|
+
return 'LCHab(l=' + this.a2o_1 + ', c=' + this.b2o_1 + ', h=' + this.c2o_1 + ', alpha=' + this.d2o_1 + ', space=' + this.e2o_1 + ')';
|
|
1092
1985
|
};
|
|
1093
1986
|
protoOf(LCHab).hashCode = function () {
|
|
1094
|
-
var result = getNumberHashCode(this.
|
|
1095
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1096
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1097
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1098
|
-
result = imul(result, 31) + hashCode(this.
|
|
1987
|
+
var result = getNumberHashCode(this.a2o_1);
|
|
1988
|
+
result = imul(result, 31) + getNumberHashCode(this.b2o_1) | 0;
|
|
1989
|
+
result = imul(result, 31) + getNumberHashCode(this.c2o_1) | 0;
|
|
1990
|
+
result = imul(result, 31) + getNumberHashCode(this.d2o_1) | 0;
|
|
1991
|
+
result = imul(result, 31) + hashCode(this.e2o_1) | 0;
|
|
1099
1992
|
return result;
|
|
1100
1993
|
};
|
|
1101
1994
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1104,26 +1997,26 @@
|
|
|
1104
1997
|
if (!(other instanceof LCHab))
|
|
1105
1998
|
return false;
|
|
1106
1999
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1107
|
-
if (!equals(this.
|
|
2000
|
+
if (!equals(this.a2o_1, tmp0_other_with_cast.a2o_1))
|
|
1108
2001
|
return false;
|
|
1109
|
-
if (!equals(this.
|
|
2002
|
+
if (!equals(this.b2o_1, tmp0_other_with_cast.b2o_1))
|
|
1110
2003
|
return false;
|
|
1111
|
-
if (!equals(this.
|
|
2004
|
+
if (!equals(this.c2o_1, tmp0_other_with_cast.c2o_1))
|
|
1112
2005
|
return false;
|
|
1113
|
-
if (!equals(this.
|
|
2006
|
+
if (!equals(this.d2o_1, tmp0_other_with_cast.d2o_1))
|
|
1114
2007
|
return false;
|
|
1115
|
-
if (!equals(this.
|
|
2008
|
+
if (!equals(this.e2o_1, tmp0_other_with_cast.e2o_1))
|
|
1116
2009
|
return false;
|
|
1117
2010
|
return true;
|
|
1118
2011
|
};
|
|
1119
2012
|
function LCHabColorSpace(whitePoint) {
|
|
1120
2013
|
var tmp0_subject = whitePoint;
|
|
1121
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
2014
|
+
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? LCHabColorSpaces_getInstance().r2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? LCHabColorSpaces_getInstance().s2n_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1122
2015
|
}
|
|
1123
2016
|
function LCHabColorSpaces() {
|
|
1124
2017
|
LCHabColorSpaces_instance = this;
|
|
1125
|
-
this.
|
|
1126
|
-
this.
|
|
2018
|
+
this.r2n_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().r2o_1);
|
|
2019
|
+
this.s2n_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().p2o_1);
|
|
1127
2020
|
}
|
|
1128
2021
|
var LCHabColorSpaces_instance;
|
|
1129
2022
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1132,45 +2025,88 @@
|
|
|
1132
2025
|
return LCHabColorSpaces_instance;
|
|
1133
2026
|
}
|
|
1134
2027
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1135
|
-
this.
|
|
1136
|
-
this.
|
|
2028
|
+
this.g2q_1 = whitePoint;
|
|
2029
|
+
this.h2q_1 = polarComponentInfo('LCH');
|
|
1137
2030
|
}
|
|
1138
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1139
|
-
return this.
|
|
2031
|
+
protoOf(LCHabColorSpaceImpl).c2m = function () {
|
|
2032
|
+
return this.g2q_1;
|
|
1140
2033
|
};
|
|
1141
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2034
|
+
protoOf(LCHabColorSpaceImpl).kd = function () {
|
|
1142
2035
|
return 'LCHab';
|
|
1143
2036
|
};
|
|
1144
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2037
|
+
protoOf(LCHabColorSpaceImpl).x2o = function () {
|
|
2038
|
+
return this.h2q_1;
|
|
2039
|
+
};
|
|
2040
|
+
protoOf(LCHabColorSpaceImpl).b2m = function (color) {
|
|
1145
2041
|
var tmp$ret$2;
|
|
1146
2042
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1147
2043
|
var tmp;
|
|
1148
|
-
var tmp_0 = color.
|
|
2044
|
+
var tmp_0 = color.f2l();
|
|
1149
2045
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1150
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1151
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
2046
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c2m();
|
|
2047
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().r2o_1 : tmp1_elvis_lhs).equals(this.c2m())) {
|
|
1152
2048
|
var tmp$ret$0;
|
|
1153
2049
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1154
|
-
tmp$ret$0 = color.
|
|
2050
|
+
tmp$ret$0 = color.u2l();
|
|
1155
2051
|
tmp = tmp$ret$0;
|
|
1156
2052
|
} else {
|
|
1157
2053
|
var tmp$ret$1;
|
|
1158
2054
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1159
|
-
var tmp0__anonymous__q1qw7t = color.
|
|
1160
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.
|
|
2055
|
+
var tmp0__anonymous__q1qw7t = color.n2l().q2n(XYZColorSpace_0(this.c2m()));
|
|
2056
|
+
tmp$ret$1 = tmp0__anonymous__q1qw7t.u2l();
|
|
1161
2057
|
tmp = tmp$ret$1;
|
|
1162
2058
|
}
|
|
1163
2059
|
tmp$ret$2 = tmp;
|
|
1164
2060
|
return tmp$ret$2;
|
|
1165
2061
|
};
|
|
2062
|
+
protoOf(LCHabColorSpaceImpl).d2m = function (components) {
|
|
2063
|
+
var tmp$ret$5;
|
|
2064
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2065
|
+
var tmp$ret$4;
|
|
2066
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2067
|
+
var size = this.x2o().i();
|
|
2068
|
+
// Inline function 'kotlin.require' call
|
|
2069
|
+
var containsLower = size - 1 | 0;
|
|
2070
|
+
var containsArg = components.length;
|
|
2071
|
+
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2072
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2073
|
+
if (!tmp0_require) {
|
|
2074
|
+
var tmp$ret$0;
|
|
2075
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2076
|
+
tmp$ret$0 = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2077
|
+
var message = tmp$ret$0;
|
|
2078
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2079
|
+
}
|
|
2080
|
+
var tmp$ret$3;
|
|
2081
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2082
|
+
var tmp = components[0];
|
|
2083
|
+
var tmp_0 = components[1];
|
|
2084
|
+
var tmp_1 = components[2];
|
|
2085
|
+
var tmp$ret$2;
|
|
2086
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
2087
|
+
var tmp_2;
|
|
2088
|
+
if (3 <= get_lastIndex_0(components)) {
|
|
2089
|
+
tmp_2 = components[3];
|
|
2090
|
+
} else {
|
|
2091
|
+
var tmp$ret$1;
|
|
2092
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2093
|
+
tmp$ret$1 = 1.0;
|
|
2094
|
+
tmp_2 = tmp$ret$1;
|
|
2095
|
+
}
|
|
2096
|
+
tmp$ret$2 = tmp_2;
|
|
2097
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2098
|
+
tmp$ret$4 = tmp$ret$3;
|
|
2099
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2100
|
+
return tmp$ret$5;
|
|
2101
|
+
};
|
|
1166
2102
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1167
|
-
return 'LCHabColorSpace(' + this.
|
|
2103
|
+
return 'LCHabColorSpace(' + this.g2q_1 + ')';
|
|
1168
2104
|
};
|
|
1169
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2105
|
+
protoOf(LCHabColorSpaceImpl).z2m = function (l, c, h, alpha) {
|
|
1170
2106
|
return new LCHab(l, c, h, alpha, this);
|
|
1171
2107
|
};
|
|
1172
2108
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
1173
|
-
return this.
|
|
2109
|
+
return this.g2q_1.hashCode();
|
|
1174
2110
|
};
|
|
1175
2111
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
1176
2112
|
if (this === other)
|
|
@@ -1178,24 +2114,24 @@
|
|
|
1178
2114
|
if (!(other instanceof LCHabColorSpaceImpl))
|
|
1179
2115
|
return false;
|
|
1180
2116
|
var tmp0_other_with_cast = other instanceof LCHabColorSpaceImpl ? other : THROW_CCE();
|
|
1181
|
-
if (!this.
|
|
2117
|
+
if (!this.g2q_1.equals(tmp0_other_with_cast.g2q_1))
|
|
1182
2118
|
return false;
|
|
1183
2119
|
return true;
|
|
1184
2120
|
};
|
|
1185
2121
|
function GammaTransferFunctions(gamma) {
|
|
1186
|
-
this.
|
|
2122
|
+
this.i2q_1 = gamma;
|
|
1187
2123
|
}
|
|
1188
|
-
protoOf(GammaTransferFunctions).
|
|
1189
|
-
return spow(x, this.
|
|
2124
|
+
protoOf(GammaTransferFunctions).v2p = function (x) {
|
|
2125
|
+
return spow(x, this.i2q_1);
|
|
1190
2126
|
};
|
|
1191
|
-
protoOf(GammaTransferFunctions).
|
|
1192
|
-
return spow(x, 1.0 / this.
|
|
2127
|
+
protoOf(GammaTransferFunctions).w2p = function (x) {
|
|
2128
|
+
return spow(x, 1.0 / this.i2q_1);
|
|
1193
2129
|
};
|
|
1194
2130
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
1195
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
2131
|
+
return 'GammaTransferFunctions(gamma=' + this.i2q_1 + ')';
|
|
1196
2132
|
};
|
|
1197
2133
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
1198
|
-
return getNumberHashCode(this.
|
|
2134
|
+
return getNumberHashCode(this.i2q_1);
|
|
1199
2135
|
};
|
|
1200
2136
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
1201
2137
|
if (this === other)
|
|
@@ -1203,17 +2139,17 @@
|
|
|
1203
2139
|
if (!(other instanceof GammaTransferFunctions))
|
|
1204
2140
|
return false;
|
|
1205
2141
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
1206
|
-
if (!equals(this.
|
|
2142
|
+
if (!equals(this.i2q_1, tmp0_other_with_cast.i2q_1))
|
|
1207
2143
|
return false;
|
|
1208
2144
|
return true;
|
|
1209
2145
|
};
|
|
1210
2146
|
function LinearTransferFunctions() {
|
|
1211
2147
|
LinearTransferFunctions_instance = this;
|
|
1212
2148
|
}
|
|
1213
|
-
protoOf(LinearTransferFunctions).
|
|
2149
|
+
protoOf(LinearTransferFunctions).v2p = function (x) {
|
|
1214
2150
|
return x;
|
|
1215
2151
|
};
|
|
1216
|
-
protoOf(LinearTransferFunctions).
|
|
2152
|
+
protoOf(LinearTransferFunctions).w2p = function (x) {
|
|
1217
2153
|
return x;
|
|
1218
2154
|
};
|
|
1219
2155
|
var LinearTransferFunctions_instance;
|
|
@@ -1224,104 +2160,204 @@
|
|
|
1224
2160
|
}
|
|
1225
2161
|
function RGBColorSpace() {
|
|
1226
2162
|
}
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1229
|
-
this.
|
|
2163
|
+
function Companion_4() {
|
|
2164
|
+
Companion_instance_4 = this;
|
|
2165
|
+
this.x2m_1 = RGBColorSpaces_getInstance().c2n_1;
|
|
1230
2166
|
}
|
|
1231
|
-
protoOf(
|
|
1232
|
-
return this.
|
|
2167
|
+
protoOf(Companion_4).x2o = function () {
|
|
2168
|
+
return this.x2m_1.x2o();
|
|
1233
2169
|
};
|
|
1234
|
-
protoOf(
|
|
1235
|
-
return this.
|
|
2170
|
+
protoOf(Companion_4).k2q = function () {
|
|
2171
|
+
return this.x2m_1.k2q();
|
|
1236
2172
|
};
|
|
1237
|
-
protoOf(
|
|
1238
|
-
return this.
|
|
2173
|
+
protoOf(Companion_4).j2q = function () {
|
|
2174
|
+
return this.x2m_1.j2q();
|
|
1239
2175
|
};
|
|
1240
|
-
protoOf(
|
|
1241
|
-
return this.
|
|
2176
|
+
protoOf(Companion_4).kd = function () {
|
|
2177
|
+
return this.x2m_1.kd();
|
|
1242
2178
|
};
|
|
1243
|
-
protoOf(
|
|
1244
|
-
return this.
|
|
2179
|
+
protoOf(Companion_4).m2p = function () {
|
|
2180
|
+
return this.x2m_1.m2p();
|
|
1245
2181
|
};
|
|
1246
|
-
protoOf(
|
|
1247
|
-
return this.
|
|
2182
|
+
protoOf(Companion_4).c2m = function () {
|
|
2183
|
+
return this.x2m_1.c2m();
|
|
1248
2184
|
};
|
|
1249
|
-
protoOf(
|
|
1250
|
-
return this.
|
|
2185
|
+
protoOf(Companion_4).b2m = function (color) {
|
|
2186
|
+
return this.x2m_1.b2m(color);
|
|
1251
2187
|
};
|
|
1252
|
-
protoOf(
|
|
1253
|
-
return this.
|
|
2188
|
+
protoOf(Companion_4).d2m = function (components) {
|
|
2189
|
+
return this.x2m_1.d2m(components);
|
|
1254
2190
|
};
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
return
|
|
2191
|
+
protoOf(Companion_4).v2o = function (r, g, b, alpha) {
|
|
2192
|
+
return this.x2m_1.v2o(r, g, b, alpha);
|
|
2193
|
+
};
|
|
2194
|
+
protoOf(Companion_4).z2m = function (r, g, b, alpha) {
|
|
2195
|
+
return this.x2m_1.z2m(r, g, b, alpha);
|
|
2196
|
+
};
|
|
2197
|
+
protoOf(Companion_4).x2p = function (r, g, b, alpha) {
|
|
2198
|
+
return this.x2m_1.x2p(r, g, b, alpha);
|
|
2199
|
+
};
|
|
2200
|
+
protoOf(Companion_4).y2m = function (hex) {
|
|
2201
|
+
return this.x2m_1.y2m(hex);
|
|
2202
|
+
};
|
|
2203
|
+
var Companion_instance_4;
|
|
2204
|
+
function Companion_getInstance_5() {
|
|
2205
|
+
if (Companion_instance_4 == null)
|
|
2206
|
+
new Companion_4();
|
|
2207
|
+
return Companion_instance_4;
|
|
1260
2208
|
}
|
|
1261
2209
|
function RGB(r, g, b, alpha, space) {
|
|
1262
|
-
|
|
1263
|
-
this.
|
|
1264
|
-
this.
|
|
1265
|
-
this.
|
|
1266
|
-
this.
|
|
1267
|
-
this.
|
|
2210
|
+
Companion_getInstance_5();
|
|
2211
|
+
this.i2l_1 = r;
|
|
2212
|
+
this.j2l_1 = g;
|
|
2213
|
+
this.k2l_1 = b;
|
|
2214
|
+
this.l2l_1 = alpha;
|
|
2215
|
+
this.m2l_1 = space;
|
|
1268
2216
|
}
|
|
1269
|
-
protoOf(RGB).
|
|
1270
|
-
return this.
|
|
2217
|
+
protoOf(RGB).e2l = function () {
|
|
2218
|
+
return this.l2l_1;
|
|
1271
2219
|
};
|
|
1272
|
-
protoOf(RGB).
|
|
1273
|
-
return this.
|
|
2220
|
+
protoOf(RGB).f2l = function () {
|
|
2221
|
+
return this.m2l_1;
|
|
1274
2222
|
};
|
|
1275
|
-
protoOf(RGB).
|
|
2223
|
+
protoOf(RGB).v2n = function () {
|
|
1276
2224
|
var tmp$ret$1;
|
|
1277
2225
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1278
2226
|
var tmp$ret$0;
|
|
1279
2227
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
1280
|
-
var tmp0__anonymous__q1qw7t = this.
|
|
1281
|
-
tmp$ret$0 = _RGBInt___init__impl__lqova7_1(tmp0__anonymous__q1qw7t.
|
|
2228
|
+
var tmp0__anonymous__q1qw7t = this.l2q(SRGB_getInstance());
|
|
2229
|
+
tmp$ret$0 = _RGBInt___init__impl__lqova7_1(tmp0__anonymous__q1qw7t.i2l_1, tmp0__anonymous__q1qw7t.j2l_1, tmp0__anonymous__q1qw7t.k2l_1, nanToOne(tmp0__anonymous__q1qw7t.l2l_1));
|
|
1282
2230
|
tmp$ret$1 = tmp$ret$0;
|
|
1283
2231
|
return tmp$ret$1;
|
|
1284
2232
|
};
|
|
1285
|
-
protoOf(RGB).
|
|
1286
|
-
var f = SRGB_getInstance().
|
|
1287
|
-
return equals(this.
|
|
2233
|
+
protoOf(RGB).l2q = function (space) {
|
|
2234
|
+
var f = SRGB_getInstance().b2p_1;
|
|
2235
|
+
return equals(this.m2l_1, space) ? this : (equals(this.m2l_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().d2n_1) : false) ? space.z2m(f.v2p(this.i2l_1), f.v2p(this.j2l_1), f.v2p(this.k2l_1), this.l2l_1) : (equals(this.m2l_1, RGBColorSpaces_getInstance().d2n_1) ? equals(space, SRGB_getInstance()) : false) ? space.z2m(f.w2p(this.i2l_1), f.w2p(this.j2l_1), f.w2p(this.k2l_1), this.l2l_1) : this.n2l().m2q(space);
|
|
1288
2236
|
};
|
|
1289
|
-
protoOf(RGB).
|
|
1290
|
-
var
|
|
2237
|
+
protoOf(RGB).h2l = function () {
|
|
2238
|
+
var tmp$ret$3;
|
|
2239
|
+
$l$block: {
|
|
2240
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2241
|
+
var tmp$ret$4;
|
|
2242
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2243
|
+
var tmp0__anonymous__q1qw7t = this.l2q(SRGB_getInstance());
|
|
2244
|
+
var r = tmp0__anonymous__q1qw7t.i2l_1;
|
|
2245
|
+
var g = tmp0__anonymous__q1qw7t.j2l_1;
|
|
2246
|
+
var b = tmp0__anonymous__q1qw7t.k2l_1;
|
|
2247
|
+
var tmp$ret$0;
|
|
2248
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
2249
|
+
tmp$ret$0 = Math.min(r, g, b);
|
|
2250
|
+
var min = tmp$ret$0;
|
|
2251
|
+
var tmp$ret$1;
|
|
2252
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2253
|
+
tmp$ret$1 = Math.max(r, g, b);
|
|
2254
|
+
var max = tmp$ret$1;
|
|
2255
|
+
var chroma = max - min;
|
|
2256
|
+
var tmp;
|
|
2257
|
+
if (chroma < 1.0E-7) {
|
|
2258
|
+
DoubleCompanionObject_getInstance();
|
|
2259
|
+
tmp = NaN;
|
|
2260
|
+
} else if (r === max) {
|
|
2261
|
+
tmp = (g - b) / chroma;
|
|
2262
|
+
} else if (g === max) {
|
|
2263
|
+
tmp = 2 + (b - r) / chroma;
|
|
2264
|
+
} else if (b === max) {
|
|
2265
|
+
tmp = 4 + (r - g) / chroma;
|
|
2266
|
+
} else {
|
|
2267
|
+
tmp = 0.0;
|
|
2268
|
+
}
|
|
2269
|
+
var h = tmp * 60;
|
|
2270
|
+
var tmp$ret$2;
|
|
2271
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSL.<anonymous>' call
|
|
2272
|
+
var tmp1__anonymous__uwfjfc = normalizeDeg(h);
|
|
2273
|
+
var l = (min + max) / 2.0;
|
|
2274
|
+
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
2275
|
+
tmp$ret$2 = new HSL(tmp1__anonymous__uwfjfc, s, l, this.l2l_1);
|
|
2276
|
+
tmp$ret$3 = tmp$ret$2;
|
|
2277
|
+
break $l$block;
|
|
2278
|
+
tmp$ret$3 = tmp$ret$4;
|
|
2279
|
+
}
|
|
2280
|
+
return tmp$ret$3;
|
|
2281
|
+
};
|
|
2282
|
+
protoOf(RGB).n2l = function () {
|
|
2283
|
+
var f = this.m2l_1.m2p();
|
|
1291
2284
|
var tmp$ret$1;
|
|
1292
2285
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1293
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.
|
|
1294
|
-
var tmp1_dot = f.
|
|
1295
|
-
var tmp2_dot = f.
|
|
1296
|
-
var tmp3_dot = f.
|
|
2286
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.m2l_1.j2q());
|
|
2287
|
+
var tmp1_dot = f.v2p(this.i2l_1);
|
|
2288
|
+
var tmp2_dot = f.v2p(this.j2l_1);
|
|
2289
|
+
var tmp3_dot = f.v2p(this.k2l_1);
|
|
1297
2290
|
var tmp$ret$0;
|
|
1298
2291
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
1299
2292
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
1300
2293
|
var tmp5__anonymous__kpxxpo = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
1301
2294
|
var tmp6__anonymous__fv9ai5 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
1302
|
-
tmp$ret$0 = XYZColorSpace_0(this.
|
|
2295
|
+
tmp$ret$0 = XYZColorSpace_0(this.m2l_1.c2m()).z2m(tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, tmp6__anonymous__fv9ai5, this.l2l_1);
|
|
1303
2296
|
tmp$ret$1 = tmp$ret$0;
|
|
1304
2297
|
return tmp$ret$1;
|
|
1305
2298
|
};
|
|
1306
|
-
protoOf(RGB).
|
|
1307
|
-
|
|
2299
|
+
protoOf(RGB).a2m = function () {
|
|
2300
|
+
var tmp$ret$3;
|
|
2301
|
+
$l$block: {
|
|
2302
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2303
|
+
var tmp$ret$4;
|
|
2304
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2305
|
+
var tmp0__anonymous__q1qw7t = this.l2q(SRGB_getInstance());
|
|
2306
|
+
var r = tmp0__anonymous__q1qw7t.i2l_1;
|
|
2307
|
+
var g = tmp0__anonymous__q1qw7t.j2l_1;
|
|
2308
|
+
var b = tmp0__anonymous__q1qw7t.k2l_1;
|
|
2309
|
+
var tmp$ret$0;
|
|
2310
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
2311
|
+
tmp$ret$0 = Math.min(r, g, b);
|
|
2312
|
+
var min = tmp$ret$0;
|
|
2313
|
+
var tmp$ret$1;
|
|
2314
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2315
|
+
tmp$ret$1 = Math.max(r, g, b);
|
|
2316
|
+
var max = tmp$ret$1;
|
|
2317
|
+
var chroma = max - min;
|
|
2318
|
+
var tmp;
|
|
2319
|
+
if (chroma < 1.0E-7) {
|
|
2320
|
+
DoubleCompanionObject_getInstance();
|
|
2321
|
+
tmp = NaN;
|
|
2322
|
+
} else if (r === max) {
|
|
2323
|
+
tmp = (g - b) / chroma;
|
|
2324
|
+
} else if (g === max) {
|
|
2325
|
+
tmp = 2 + (b - r) / chroma;
|
|
2326
|
+
} else if (b === max) {
|
|
2327
|
+
tmp = 4 + (r - g) / chroma;
|
|
2328
|
+
} else {
|
|
2329
|
+
tmp = 0.0;
|
|
2330
|
+
}
|
|
2331
|
+
var h = tmp * 60;
|
|
2332
|
+
var tmp$ret$2;
|
|
2333
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toHWB.<anonymous>' call
|
|
2334
|
+
var tmp1__anonymous__uwfjfc = normalizeDeg(h);
|
|
2335
|
+
tmp$ret$2 = new HWB(tmp1__anonymous__uwfjfc, min, 1.0 - max, this.l2l_1);
|
|
2336
|
+
tmp$ret$3 = tmp$ret$2;
|
|
2337
|
+
break $l$block;
|
|
2338
|
+
tmp$ret$3 = tmp$ret$4;
|
|
2339
|
+
}
|
|
2340
|
+
return tmp$ret$3;
|
|
2341
|
+
};
|
|
2342
|
+
protoOf(RGB).g2l = function () {
|
|
2343
|
+
return this.l2q(RGBColorSpaces_getInstance().c2n_1);
|
|
1308
2344
|
};
|
|
1309
|
-
protoOf(RGB).
|
|
2345
|
+
protoOf(RGB).x7 = function () {
|
|
1310
2346
|
var tmp$ret$0;
|
|
1311
2347
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1312
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
2348
|
+
var tmp0_floatArrayOf = new Float32Array([this.i2l_1, this.j2l_1, this.k2l_1, this.l2l_1]);
|
|
1313
2349
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1314
2350
|
return tmp$ret$0;
|
|
1315
2351
|
};
|
|
1316
2352
|
protoOf(RGB).toString = function () {
|
|
1317
|
-
return 'RGB(r=' + this.
|
|
2353
|
+
return 'RGB(r=' + this.i2l_1 + ', g=' + this.j2l_1 + ', b=' + this.k2l_1 + ', alpha=' + this.l2l_1 + ', space=' + this.m2l_1 + ')';
|
|
1318
2354
|
};
|
|
1319
2355
|
protoOf(RGB).hashCode = function () {
|
|
1320
|
-
var result = getNumberHashCode(this.
|
|
1321
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1322
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1323
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1324
|
-
result = imul(result, 31) + hashCode(this.
|
|
2356
|
+
var result = getNumberHashCode(this.i2l_1);
|
|
2357
|
+
result = imul(result, 31) + getNumberHashCode(this.j2l_1) | 0;
|
|
2358
|
+
result = imul(result, 31) + getNumberHashCode(this.k2l_1) | 0;
|
|
2359
|
+
result = imul(result, 31) + getNumberHashCode(this.l2l_1) | 0;
|
|
2360
|
+
result = imul(result, 31) + hashCode(this.m2l_1) | 0;
|
|
1325
2361
|
return result;
|
|
1326
2362
|
};
|
|
1327
2363
|
protoOf(RGB).equals = function (other) {
|
|
@@ -1330,18 +2366,75 @@
|
|
|
1330
2366
|
if (!(other instanceof RGB))
|
|
1331
2367
|
return false;
|
|
1332
2368
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
1333
|
-
if (!equals(this.
|
|
2369
|
+
if (!equals(this.i2l_1, tmp0_other_with_cast.i2l_1))
|
|
1334
2370
|
return false;
|
|
1335
|
-
if (!equals(this.
|
|
2371
|
+
if (!equals(this.j2l_1, tmp0_other_with_cast.j2l_1))
|
|
1336
2372
|
return false;
|
|
1337
|
-
if (!equals(this.
|
|
2373
|
+
if (!equals(this.k2l_1, tmp0_other_with_cast.k2l_1))
|
|
1338
2374
|
return false;
|
|
1339
|
-
if (!equals(this.
|
|
2375
|
+
if (!equals(this.l2l_1, tmp0_other_with_cast.l2l_1))
|
|
1340
2376
|
return false;
|
|
1341
|
-
if (!equals(this.
|
|
2377
|
+
if (!equals(this.m2l_1, tmp0_other_with_cast.m2l_1))
|
|
1342
2378
|
return false;
|
|
1343
2379
|
return true;
|
|
1344
2380
|
};
|
|
2381
|
+
function parseHex(_this__u8e3s4, startIndex) {
|
|
2382
|
+
var tmp;
|
|
2383
|
+
if (get_hexLength(_this__u8e3s4) > 4) {
|
|
2384
|
+
var i = equals(new Char(charSequenceGet(_this__u8e3s4, 0)), new Char(_Char___init__impl__6a9atx(35))) ? imul(startIndex, 2) + 1 | 0 : imul(startIndex, 2);
|
|
2385
|
+
tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
|
|
2386
|
+
} else {
|
|
2387
|
+
var i_0 = equals(new Char(charSequenceGet(_this__u8e3s4, 0)), new Char(_Char___init__impl__6a9atx(35))) ? startIndex + 1 | 0 : startIndex;
|
|
2388
|
+
var tmp$ret$1;
|
|
2389
|
+
// Inline function 'kotlin.let' call
|
|
2390
|
+
var tmp0_let = charSequenceGet(_this__u8e3s4, i_0);
|
|
2391
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2392
|
+
var tmp$ret$0;
|
|
2393
|
+
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
2394
|
+
tmp$ret$0 = '' + new Char(tmp0_let) + new Char(tmp0_let);
|
|
2395
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2396
|
+
tmp = toInt(tmp$ret$1, 16);
|
|
2397
|
+
}
|
|
2398
|
+
return tmp;
|
|
2399
|
+
}
|
|
2400
|
+
function validateHex(_this__u8e3s4) {
|
|
2401
|
+
var tmp$ret$3;
|
|
2402
|
+
// Inline function 'kotlin.apply' call
|
|
2403
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2404
|
+
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>' call
|
|
2405
|
+
// Inline function 'kotlin.require' call
|
|
2406
|
+
var tmp$ret$1;
|
|
2407
|
+
// Inline function 'kotlin.let' call
|
|
2408
|
+
var tmp0_let = get_hexLength(_this__u8e3s4);
|
|
2409
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2410
|
+
var tmp$ret$0;
|
|
2411
|
+
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
2412
|
+
switch (tmp0_let) {
|
|
2413
|
+
case 3:
|
|
2414
|
+
case 4:
|
|
2415
|
+
case 6:
|
|
2416
|
+
tmp$ret$0 = true;
|
|
2417
|
+
break;
|
|
2418
|
+
default:
|
|
2419
|
+
tmp$ret$0 = tmp0_let === 8;
|
|
2420
|
+
break;
|
|
2421
|
+
}
|
|
2422
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2423
|
+
var tmp1_require = tmp$ret$1;
|
|
2424
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2425
|
+
if (!tmp1_require) {
|
|
2426
|
+
var tmp$ret$2;
|
|
2427
|
+
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
2428
|
+
tmp$ret$2 = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
2429
|
+
var message = tmp$ret$2;
|
|
2430
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2431
|
+
}
|
|
2432
|
+
tmp$ret$3 = _this__u8e3s4;
|
|
2433
|
+
return tmp$ret$3;
|
|
2434
|
+
}
|
|
2435
|
+
function get_hexLength(_this__u8e3s4) {
|
|
2436
|
+
return startsWith(_this__u8e3s4, '#') ? _this__u8e3s4.length - 1 | 0 : _this__u8e3s4.length;
|
|
2437
|
+
}
|
|
1345
2438
|
function get_SRGB_R() {
|
|
1346
2439
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1347
2440
|
return SRGB_R;
|
|
@@ -1394,18 +2487,18 @@
|
|
|
1394
2487
|
var ACES_AP1_B;
|
|
1395
2488
|
function RGBColorSpaces() {
|
|
1396
2489
|
RGBColorSpaces_instance = this;
|
|
1397
|
-
this.
|
|
1398
|
-
this.
|
|
1399
|
-
this.
|
|
1400
|
-
this.
|
|
1401
|
-
this.
|
|
1402
|
-
this.
|
|
1403
|
-
this.
|
|
1404
|
-
this.
|
|
1405
|
-
this.
|
|
1406
|
-
this.
|
|
1407
|
-
this.
|
|
1408
|
-
this.
|
|
2490
|
+
this.c2n_1 = SRGB_getInstance();
|
|
2491
|
+
this.d2n_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().r2o_1, LinearTransferFunctions_getInstance(), get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
2492
|
+
this.e2n_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
2493
|
+
this.f2n_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2494
|
+
this.g2n_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2495
|
+
this.h2n_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2496
|
+
this.i2n_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().r2o_1, new GammaTransferFunctions(2.19921875), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.21, 0.71), xyY_init_$Create$(0.15, 0.06));
|
|
2497
|
+
this.j2n_1 = BT2020Space_getInstance();
|
|
2498
|
+
this.k2n_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().r2o_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
2499
|
+
this.l2n_1 = RGBColorSpace_0('DCI P3', new WhitePoint('DCI P3', xyY_init_$Create$(0.314, 0.351)), new GammaTransferFunctions(2.6), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2500
|
+
this.m2n_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().r2o_1, SRGBTransferFunctions_getInstance(), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2501
|
+
this.n2n_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().p2o_1, ROMMTransferFunctions_getInstance(), xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
1409
2502
|
}
|
|
1410
2503
|
var RGBColorSpaces_instance;
|
|
1411
2504
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1415,35 +2508,78 @@
|
|
|
1415
2508
|
}
|
|
1416
2509
|
function SRGB() {
|
|
1417
2510
|
SRGB_instance = this;
|
|
1418
|
-
this.
|
|
1419
|
-
this.
|
|
1420
|
-
this.
|
|
1421
|
-
this.
|
|
1422
|
-
this.
|
|
1423
|
-
this.
|
|
2511
|
+
this.y2o_1 = 'sRGB';
|
|
2512
|
+
this.z2o_1 = rectangularComponentInfo('RGB');
|
|
2513
|
+
this.a2p_1 = Illuminant_getInstance().r2o_1;
|
|
2514
|
+
this.b2p_1 = SRGBTransferFunctions_getInstance();
|
|
2515
|
+
this.c2p_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.a2p_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
2516
|
+
this.d2p_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.c2p_1)));
|
|
1424
2517
|
}
|
|
1425
|
-
protoOf(SRGB).
|
|
1426
|
-
return this.
|
|
2518
|
+
protoOf(SRGB).kd = function () {
|
|
2519
|
+
return this.y2o_1;
|
|
1427
2520
|
};
|
|
1428
|
-
protoOf(SRGB).
|
|
1429
|
-
return this.
|
|
2521
|
+
protoOf(SRGB).x2o = function () {
|
|
2522
|
+
return this.z2o_1;
|
|
1430
2523
|
};
|
|
1431
|
-
protoOf(SRGB).
|
|
1432
|
-
return this.
|
|
2524
|
+
protoOf(SRGB).c2m = function () {
|
|
2525
|
+
return this.a2p_1;
|
|
1433
2526
|
};
|
|
1434
|
-
protoOf(SRGB).
|
|
1435
|
-
return this.
|
|
2527
|
+
protoOf(SRGB).m2p = function () {
|
|
2528
|
+
return this.b2p_1;
|
|
1436
2529
|
};
|
|
1437
|
-
protoOf(SRGB).
|
|
1438
|
-
return this.
|
|
2530
|
+
protoOf(SRGB).j2q = function () {
|
|
2531
|
+
return this.c2p_1;
|
|
1439
2532
|
};
|
|
1440
|
-
protoOf(SRGB).
|
|
1441
|
-
return
|
|
2533
|
+
protoOf(SRGB).k2q = function () {
|
|
2534
|
+
return this.d2p_1;
|
|
2535
|
+
};
|
|
2536
|
+
protoOf(SRGB).b2m = function (color) {
|
|
2537
|
+
return color.g2l();
|
|
2538
|
+
};
|
|
2539
|
+
protoOf(SRGB).d2m = function (components) {
|
|
2540
|
+
var tmp$ret$5;
|
|
2541
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2542
|
+
var tmp$ret$4;
|
|
2543
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2544
|
+
var size = this.x2o().i();
|
|
2545
|
+
// Inline function 'kotlin.require' call
|
|
2546
|
+
var containsLower = size - 1 | 0;
|
|
2547
|
+
var containsArg = components.length;
|
|
2548
|
+
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2549
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2550
|
+
if (!tmp0_require) {
|
|
2551
|
+
var tmp$ret$0;
|
|
2552
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2553
|
+
tmp$ret$0 = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2554
|
+
var message = tmp$ret$0;
|
|
2555
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2556
|
+
}
|
|
2557
|
+
var tmp$ret$3;
|
|
2558
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2559
|
+
var tmp = components[0];
|
|
2560
|
+
var tmp_0 = components[1];
|
|
2561
|
+
var tmp_1 = components[2];
|
|
2562
|
+
var tmp$ret$2;
|
|
2563
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
2564
|
+
var tmp_2;
|
|
2565
|
+
if (3 <= get_lastIndex_0(components)) {
|
|
2566
|
+
tmp_2 = components[3];
|
|
2567
|
+
} else {
|
|
2568
|
+
var tmp$ret$1;
|
|
2569
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2570
|
+
tmp$ret$1 = 1.0;
|
|
2571
|
+
tmp_2 = tmp$ret$1;
|
|
2572
|
+
}
|
|
2573
|
+
tmp$ret$2 = tmp_2;
|
|
2574
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2575
|
+
tmp$ret$4 = tmp$ret$3;
|
|
2576
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2577
|
+
return tmp$ret$5;
|
|
1442
2578
|
};
|
|
1443
2579
|
protoOf(SRGB).toString = function () {
|
|
1444
|
-
return this.
|
|
2580
|
+
return this.y2o_1;
|
|
1445
2581
|
};
|
|
1446
|
-
protoOf(SRGB).
|
|
2582
|
+
protoOf(SRGB).z2m = function (r, g, b, alpha) {
|
|
1447
2583
|
return new RGB(r, g, b, alpha, this);
|
|
1448
2584
|
};
|
|
1449
2585
|
var SRGB_instance;
|
|
@@ -1458,20 +2594,20 @@
|
|
|
1458
2594
|
}
|
|
1459
2595
|
function ACESccTransferFunctions() {
|
|
1460
2596
|
ACESccTransferFunctions_instance = this;
|
|
1461
|
-
this.
|
|
1462
|
-
this.
|
|
1463
|
-
this.
|
|
2597
|
+
this.n2q_1 = 3.0517578125E-5;
|
|
2598
|
+
this.o2q_1 = 1.52587890625E-5;
|
|
2599
|
+
this.p2q_1 = -0.3013698630136986;
|
|
1464
2600
|
var tmp = this;
|
|
1465
2601
|
var tmp$ret$0;
|
|
1466
2602
|
// Inline function 'kotlin.math.log2' call
|
|
1467
2603
|
tmp$ret$0 = log2(65504.0);
|
|
1468
|
-
tmp.
|
|
2604
|
+
tmp.q2q_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
1469
2605
|
}
|
|
1470
|
-
protoOf(ACESccTransferFunctions).
|
|
2606
|
+
protoOf(ACESccTransferFunctions).v2p = function (x) {
|
|
1471
2607
|
var tmp;
|
|
1472
2608
|
if (x <= -0.3013698630136986) {
|
|
1473
2609
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1474
|
-
} else if (x < this.
|
|
2610
|
+
} else if (x < this.q2q_1) {
|
|
1475
2611
|
var tmp$ret$0;
|
|
1476
2612
|
// Inline function 'kotlin.math.pow' call
|
|
1477
2613
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
@@ -1482,12 +2618,12 @@
|
|
|
1482
2618
|
}
|
|
1483
2619
|
return tmp;
|
|
1484
2620
|
};
|
|
1485
|
-
protoOf(ACESccTransferFunctions).
|
|
2621
|
+
protoOf(ACESccTransferFunctions).w2p = function (x) {
|
|
1486
2622
|
var tmp;
|
|
1487
2623
|
if (x < 3.0517578125E-5) {
|
|
1488
2624
|
var tmp$ret$0;
|
|
1489
2625
|
// Inline function 'kotlin.math.log2' call
|
|
1490
|
-
var tmp0_log2 = 1.52587890625E-5 +
|
|
2626
|
+
var tmp0_log2 = 1.52587890625E-5 + coerceAtLeast(x, 0.0) / 2.0;
|
|
1491
2627
|
tmp$ret$0 = log2(tmp0_log2);
|
|
1492
2628
|
tmp = (tmp$ret$0 + 9.72) / 17.52;
|
|
1493
2629
|
} else {
|
|
@@ -1506,19 +2642,19 @@
|
|
|
1506
2642
|
}
|
|
1507
2643
|
function ACEScctTransferFunctions() {
|
|
1508
2644
|
ACEScctTransferFunctions_instance = this;
|
|
1509
|
-
this.
|
|
1510
|
-
this.
|
|
2645
|
+
this.r2q_1 = 10.5402377416545;
|
|
2646
|
+
this.s2q_1 = 0.0729055341958355;
|
|
1511
2647
|
var tmp = this;
|
|
1512
2648
|
var tmp$ret$0;
|
|
1513
2649
|
// Inline function 'kotlin.math.log2' call
|
|
1514
2650
|
tmp$ret$0 = log2(65504.0);
|
|
1515
|
-
tmp.
|
|
2651
|
+
tmp.t2q_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
1516
2652
|
}
|
|
1517
|
-
protoOf(ACEScctTransferFunctions).
|
|
2653
|
+
protoOf(ACEScctTransferFunctions).v2p = function (x) {
|
|
1518
2654
|
var tmp;
|
|
1519
2655
|
if (x <= 0.155251141552511) {
|
|
1520
2656
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1521
|
-
} else if (x < this.
|
|
2657
|
+
} else if (x < this.t2q_1) {
|
|
1522
2658
|
var tmp$ret$0;
|
|
1523
2659
|
// Inline function 'kotlin.math.pow' call
|
|
1524
2660
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
@@ -1529,7 +2665,7 @@
|
|
|
1529
2665
|
}
|
|
1530
2666
|
return tmp;
|
|
1531
2667
|
};
|
|
1532
|
-
protoOf(ACEScctTransferFunctions).
|
|
2668
|
+
protoOf(ACEScctTransferFunctions).w2p = function (x) {
|
|
1533
2669
|
var tmp;
|
|
1534
2670
|
if (x < 0.0078125) {
|
|
1535
2671
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -1549,47 +2685,90 @@
|
|
|
1549
2685
|
}
|
|
1550
2686
|
function BT2020Space() {
|
|
1551
2687
|
BT2020Space_instance = this;
|
|
1552
|
-
this.
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1555
|
-
this.
|
|
1556
|
-
this.
|
|
1557
|
-
this.
|
|
2688
|
+
this.u2q_1 = 'BT.2020';
|
|
2689
|
+
this.v2q_1 = rectangularComponentInfo('RGB');
|
|
2690
|
+
this.w2q_1 = Illuminant_getInstance().r2o_1;
|
|
2691
|
+
this.x2q_1 = BT2020TransferFunctions_getInstance();
|
|
2692
|
+
this.y2q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.w2q_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
2693
|
+
this.z2q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.y2q_1)));
|
|
1558
2694
|
}
|
|
1559
|
-
protoOf(BT2020Space).
|
|
1560
|
-
return this.
|
|
2695
|
+
protoOf(BT2020Space).kd = function () {
|
|
2696
|
+
return this.u2q_1;
|
|
1561
2697
|
};
|
|
1562
|
-
protoOf(BT2020Space).
|
|
1563
|
-
return this.
|
|
2698
|
+
protoOf(BT2020Space).x2o = function () {
|
|
2699
|
+
return this.v2q_1;
|
|
1564
2700
|
};
|
|
1565
|
-
protoOf(BT2020Space).
|
|
1566
|
-
return this.
|
|
2701
|
+
protoOf(BT2020Space).c2m = function () {
|
|
2702
|
+
return this.w2q_1;
|
|
1567
2703
|
};
|
|
1568
|
-
protoOf(BT2020Space).
|
|
2704
|
+
protoOf(BT2020Space).m2p = function () {
|
|
2705
|
+
return this.x2q_1;
|
|
2706
|
+
};
|
|
2707
|
+
protoOf(BT2020Space).z2m = function (r, g, b, alpha) {
|
|
1569
2708
|
return new RGB(r, g, b, alpha, this);
|
|
1570
2709
|
};
|
|
1571
|
-
protoOf(BT2020Space).
|
|
2710
|
+
protoOf(BT2020Space).b2m = function (color) {
|
|
1572
2711
|
var tmp0_subject = color;
|
|
1573
2712
|
var tmp;
|
|
1574
2713
|
if (tmp0_subject instanceof RGB) {
|
|
1575
|
-
tmp = color.
|
|
2714
|
+
tmp = color.l2q(this);
|
|
1576
2715
|
} else {
|
|
1577
2716
|
if (tmp0_subject instanceof ICtCp) {
|
|
1578
|
-
tmp = color.
|
|
2717
|
+
tmp = color.l2p();
|
|
1579
2718
|
} else {
|
|
1580
|
-
tmp = color.
|
|
2719
|
+
tmp = color.n2l().m2q(this);
|
|
1581
2720
|
}
|
|
1582
2721
|
}
|
|
1583
2722
|
return tmp;
|
|
1584
2723
|
};
|
|
1585
|
-
protoOf(BT2020Space).
|
|
1586
|
-
|
|
2724
|
+
protoOf(BT2020Space).d2m = function (components) {
|
|
2725
|
+
var tmp$ret$5;
|
|
2726
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2727
|
+
var tmp$ret$4;
|
|
2728
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2729
|
+
var size = this.x2o().i();
|
|
2730
|
+
// Inline function 'kotlin.require' call
|
|
2731
|
+
var containsLower = size - 1 | 0;
|
|
2732
|
+
var containsArg = components.length;
|
|
2733
|
+
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2734
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2735
|
+
if (!tmp0_require) {
|
|
2736
|
+
var tmp$ret$0;
|
|
2737
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2738
|
+
tmp$ret$0 = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2739
|
+
var message = tmp$ret$0;
|
|
2740
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2741
|
+
}
|
|
2742
|
+
var tmp$ret$3;
|
|
2743
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2744
|
+
var tmp = components[0];
|
|
2745
|
+
var tmp_0 = components[1];
|
|
2746
|
+
var tmp_1 = components[2];
|
|
2747
|
+
var tmp$ret$2;
|
|
2748
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
2749
|
+
var tmp_2;
|
|
2750
|
+
if (3 <= get_lastIndex_0(components)) {
|
|
2751
|
+
tmp_2 = components[3];
|
|
2752
|
+
} else {
|
|
2753
|
+
var tmp$ret$1;
|
|
2754
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2755
|
+
tmp$ret$1 = 1.0;
|
|
2756
|
+
tmp_2 = tmp$ret$1;
|
|
2757
|
+
}
|
|
2758
|
+
tmp$ret$2 = tmp_2;
|
|
2759
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2760
|
+
tmp$ret$4 = tmp$ret$3;
|
|
2761
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2762
|
+
return tmp$ret$5;
|
|
2763
|
+
};
|
|
2764
|
+
protoOf(BT2020Space).j2q = function () {
|
|
2765
|
+
return this.y2q_1;
|
|
1587
2766
|
};
|
|
1588
|
-
protoOf(BT2020Space).
|
|
1589
|
-
return this.
|
|
2767
|
+
protoOf(BT2020Space).k2q = function () {
|
|
2768
|
+
return this.z2q_1;
|
|
1590
2769
|
};
|
|
1591
2770
|
protoOf(BT2020Space).toString = function () {
|
|
1592
|
-
return this.
|
|
2771
|
+
return this.u2q_1;
|
|
1593
2772
|
};
|
|
1594
2773
|
var BT2020Space_instance;
|
|
1595
2774
|
function BT2020Space_getInstance() {
|
|
@@ -1599,12 +2778,12 @@
|
|
|
1599
2778
|
}
|
|
1600
2779
|
function BT709TransferFunctions() {
|
|
1601
2780
|
BT709TransferFunctions_instance = this;
|
|
1602
|
-
this.
|
|
2781
|
+
this.a2r_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1603
2782
|
}
|
|
1604
|
-
protoOf(BT709TransferFunctions).
|
|
1605
|
-
return numberToDouble(x < this.
|
|
2783
|
+
protoOf(BT709TransferFunctions).v2p = function (x) {
|
|
2784
|
+
return numberToDouble(x < this.a2r_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
1606
2785
|
};
|
|
1607
|
-
protoOf(BT709TransferFunctions).
|
|
2786
|
+
protoOf(BT709TransferFunctions).w2p = function (x) {
|
|
1608
2787
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1609
2788
|
};
|
|
1610
2789
|
var BT709TransferFunctions_instance;
|
|
@@ -1616,10 +2795,10 @@
|
|
|
1616
2795
|
function SRGBTransferFunctions() {
|
|
1617
2796
|
SRGBTransferFunctions_instance = this;
|
|
1618
2797
|
}
|
|
1619
|
-
protoOf(SRGBTransferFunctions).
|
|
2798
|
+
protoOf(SRGBTransferFunctions).w2p = function (x) {
|
|
1620
2799
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
1621
2800
|
};
|
|
1622
|
-
protoOf(SRGBTransferFunctions).
|
|
2801
|
+
protoOf(SRGBTransferFunctions).v2p = function (x) {
|
|
1623
2802
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1624
2803
|
};
|
|
1625
2804
|
var SRGBTransferFunctions_instance;
|
|
@@ -1630,12 +2809,12 @@
|
|
|
1630
2809
|
}
|
|
1631
2810
|
function ROMMTransferFunctions() {
|
|
1632
2811
|
ROMMTransferFunctions_instance = this;
|
|
1633
|
-
this.
|
|
2812
|
+
this.b2r_1 = 0.001953;
|
|
1634
2813
|
}
|
|
1635
|
-
protoOf(ROMMTransferFunctions).
|
|
2814
|
+
protoOf(ROMMTransferFunctions).v2p = function (x) {
|
|
1636
2815
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
1637
2816
|
};
|
|
1638
|
-
protoOf(ROMMTransferFunctions).
|
|
2817
|
+
protoOf(ROMMTransferFunctions).w2p = function (x) {
|
|
1639
2818
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
1640
2819
|
};
|
|
1641
2820
|
var ROMMTransferFunctions_instance;
|
|
@@ -1646,14 +2825,14 @@
|
|
|
1646
2825
|
}
|
|
1647
2826
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1648
2827
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1649
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1650
|
-
var wp = whitePoint.
|
|
2828
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.z2p_1, g.z2p_1, b.z2p_1, r.a2q_1, g.a2q_1, b.a2q_1, r.c2r(), g.c2r(), b.c2r());
|
|
2829
|
+
var wp = whitePoint.l2o_1;
|
|
1651
2830
|
var tmp$ret$1;
|
|
1652
2831
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1653
2832
|
var tmp0_dot = inverse(primaries);
|
|
1654
|
-
var tmp1_dot = wp.
|
|
1655
|
-
var tmp2_dot = wp.
|
|
1656
|
-
var tmp3_dot = wp.
|
|
2833
|
+
var tmp1_dot = wp.c2q();
|
|
2834
|
+
var tmp2_dot = wp.b2q_1;
|
|
2835
|
+
var tmp3_dot = wp.d2q();
|
|
1657
2836
|
var tmp$ret$0;
|
|
1658
2837
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1659
2838
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
@@ -1664,53 +2843,96 @@
|
|
|
1664
2843
|
return tmp$ret$1;
|
|
1665
2844
|
}
|
|
1666
2845
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
this.
|
|
1670
|
-
this.
|
|
1671
|
-
this.
|
|
1672
|
-
this.
|
|
1673
|
-
this.
|
|
1674
|
-
this.
|
|
1675
|
-
this.
|
|
1676
|
-
}
|
|
1677
|
-
protoOf(RGBColorSpaceImpl).
|
|
1678
|
-
return this.
|
|
1679
|
-
};
|
|
1680
|
-
protoOf(RGBColorSpaceImpl).
|
|
1681
|
-
return this.
|
|
1682
|
-
};
|
|
1683
|
-
protoOf(RGBColorSpaceImpl).
|
|
1684
|
-
return this.
|
|
1685
|
-
};
|
|
1686
|
-
protoOf(RGBColorSpaceImpl).
|
|
2846
|
+
this.d2r_1 = name;
|
|
2847
|
+
this.e2r_1 = whitePoint;
|
|
2848
|
+
this.f2r_1 = transferFunctions;
|
|
2849
|
+
this.g2r_1 = r;
|
|
2850
|
+
this.h2r_1 = g;
|
|
2851
|
+
this.i2r_1 = b;
|
|
2852
|
+
this.j2r_1 = rectangularComponentInfo('RGB');
|
|
2853
|
+
this.k2r_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.e2r_1, this.g2r_1, this.h2r_1, this.i2r_1));
|
|
2854
|
+
this.l2r_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.k2r_1)));
|
|
2855
|
+
}
|
|
2856
|
+
protoOf(RGBColorSpaceImpl).kd = function () {
|
|
2857
|
+
return this.d2r_1;
|
|
2858
|
+
};
|
|
2859
|
+
protoOf(RGBColorSpaceImpl).c2m = function () {
|
|
2860
|
+
return this.e2r_1;
|
|
2861
|
+
};
|
|
2862
|
+
protoOf(RGBColorSpaceImpl).m2p = function () {
|
|
2863
|
+
return this.f2r_1;
|
|
2864
|
+
};
|
|
2865
|
+
protoOf(RGBColorSpaceImpl).x2o = function () {
|
|
2866
|
+
return this.j2r_1;
|
|
2867
|
+
};
|
|
2868
|
+
protoOf(RGBColorSpaceImpl).b2m = function (color) {
|
|
1687
2869
|
var tmp;
|
|
1688
2870
|
if (color instanceof RGB) {
|
|
1689
|
-
tmp = color.
|
|
2871
|
+
tmp = color.l2q(this);
|
|
1690
2872
|
} else {
|
|
1691
|
-
tmp = color.
|
|
2873
|
+
tmp = color.n2l().m2q(this);
|
|
1692
2874
|
}
|
|
1693
2875
|
return tmp;
|
|
1694
2876
|
};
|
|
1695
|
-
protoOf(RGBColorSpaceImpl).
|
|
1696
|
-
|
|
2877
|
+
protoOf(RGBColorSpaceImpl).d2m = function (components) {
|
|
2878
|
+
var tmp$ret$5;
|
|
2879
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2880
|
+
var tmp$ret$4;
|
|
2881
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2882
|
+
var size = this.x2o().i();
|
|
2883
|
+
// Inline function 'kotlin.require' call
|
|
2884
|
+
var containsLower = size - 1 | 0;
|
|
2885
|
+
var containsArg = components.length;
|
|
2886
|
+
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2887
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2888
|
+
if (!tmp0_require) {
|
|
2889
|
+
var tmp$ret$0;
|
|
2890
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2891
|
+
tmp$ret$0 = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2892
|
+
var message = tmp$ret$0;
|
|
2893
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2894
|
+
}
|
|
2895
|
+
var tmp$ret$3;
|
|
2896
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2897
|
+
var tmp = components[0];
|
|
2898
|
+
var tmp_0 = components[1];
|
|
2899
|
+
var tmp_1 = components[2];
|
|
2900
|
+
var tmp$ret$2;
|
|
2901
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
2902
|
+
var tmp_2;
|
|
2903
|
+
if (3 <= get_lastIndex_0(components)) {
|
|
2904
|
+
tmp_2 = components[3];
|
|
2905
|
+
} else {
|
|
2906
|
+
var tmp$ret$1;
|
|
2907
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2908
|
+
tmp$ret$1 = 1.0;
|
|
2909
|
+
tmp_2 = tmp$ret$1;
|
|
2910
|
+
}
|
|
2911
|
+
tmp$ret$2 = tmp_2;
|
|
2912
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2913
|
+
tmp$ret$4 = tmp$ret$3;
|
|
2914
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2915
|
+
return tmp$ret$5;
|
|
2916
|
+
};
|
|
2917
|
+
protoOf(RGBColorSpaceImpl).j2q = function () {
|
|
2918
|
+
return this.k2r_1;
|
|
1697
2919
|
};
|
|
1698
|
-
protoOf(RGBColorSpaceImpl).
|
|
1699
|
-
return this.
|
|
2920
|
+
protoOf(RGBColorSpaceImpl).k2q = function () {
|
|
2921
|
+
return this.l2r_1;
|
|
1700
2922
|
};
|
|
1701
2923
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1702
|
-
return this.
|
|
2924
|
+
return this.d2r_1;
|
|
1703
2925
|
};
|
|
1704
|
-
protoOf(RGBColorSpaceImpl).
|
|
2926
|
+
protoOf(RGBColorSpaceImpl).z2m = function (r, g, b, alpha) {
|
|
1705
2927
|
return new RGB(r, g, b, alpha, this);
|
|
1706
2928
|
};
|
|
1707
2929
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1708
|
-
var result = getStringHashCode(this.
|
|
1709
|
-
result = imul(result, 31) + this.
|
|
1710
|
-
result = imul(result, 31) + hashCode(this.
|
|
1711
|
-
result = imul(result, 31) + this.
|
|
1712
|
-
result = imul(result, 31) + this.
|
|
1713
|
-
result = imul(result, 31) + this.
|
|
2930
|
+
var result = getStringHashCode(this.d2r_1);
|
|
2931
|
+
result = imul(result, 31) + this.e2r_1.hashCode() | 0;
|
|
2932
|
+
result = imul(result, 31) + hashCode(this.f2r_1) | 0;
|
|
2933
|
+
result = imul(result, 31) + this.g2r_1.hashCode() | 0;
|
|
2934
|
+
result = imul(result, 31) + this.h2r_1.hashCode() | 0;
|
|
2935
|
+
result = imul(result, 31) + this.i2r_1.hashCode() | 0;
|
|
1714
2936
|
return result;
|
|
1715
2937
|
};
|
|
1716
2938
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1719,35 +2941,35 @@
|
|
|
1719
2941
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
1720
2942
|
return false;
|
|
1721
2943
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
1722
|
-
if (!(this.
|
|
2944
|
+
if (!(this.d2r_1 === tmp0_other_with_cast.d2r_1))
|
|
1723
2945
|
return false;
|
|
1724
|
-
if (!this.
|
|
2946
|
+
if (!this.e2r_1.equals(tmp0_other_with_cast.e2r_1))
|
|
1725
2947
|
return false;
|
|
1726
|
-
if (!equals(this.
|
|
2948
|
+
if (!equals(this.f2r_1, tmp0_other_with_cast.f2r_1))
|
|
1727
2949
|
return false;
|
|
1728
|
-
if (!this.
|
|
2950
|
+
if (!this.g2r_1.equals(tmp0_other_with_cast.g2r_1))
|
|
1729
2951
|
return false;
|
|
1730
|
-
if (!this.
|
|
2952
|
+
if (!this.h2r_1.equals(tmp0_other_with_cast.h2r_1))
|
|
1731
2953
|
return false;
|
|
1732
|
-
if (!this.
|
|
2954
|
+
if (!this.i2r_1.equals(tmp0_other_with_cast.i2r_1))
|
|
1733
2955
|
return false;
|
|
1734
2956
|
return true;
|
|
1735
2957
|
};
|
|
1736
2958
|
function BT2020TransferFunctions() {
|
|
1737
2959
|
BT2020TransferFunctions_instance = this;
|
|
1738
|
-
this.
|
|
1739
|
-
this.
|
|
2960
|
+
this.m2r_1 = 1.0993;
|
|
2961
|
+
this.n2r_1 = 0.0181;
|
|
1740
2962
|
var tmp = this;
|
|
1741
2963
|
var tmp$ret$0;
|
|
1742
2964
|
// Inline function 'kotlin.math.pow' call
|
|
1743
2965
|
var tmp0_pow = 0.0181;
|
|
1744
2966
|
tmp$ret$0 = Math.pow(tmp0_pow, 0.45);
|
|
1745
|
-
tmp.
|
|
2967
|
+
tmp.o2r_1 = 1.0993 * tmp$ret$0 - 0.09929999999999994;
|
|
1746
2968
|
}
|
|
1747
|
-
protoOf(BT2020TransferFunctions).
|
|
1748
|
-
return numberToDouble(x < this.
|
|
2969
|
+
protoOf(BT2020TransferFunctions).v2p = function (x) {
|
|
2970
|
+
return numberToDouble(x < this.o2r_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
1749
2971
|
};
|
|
1750
|
-
protoOf(BT2020TransferFunctions).
|
|
2972
|
+
protoOf(BT2020TransferFunctions).w2p = function (x) {
|
|
1751
2973
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
1752
2974
|
};
|
|
1753
2975
|
var BT2020TransferFunctions_instance;
|
|
@@ -1833,7 +3055,7 @@
|
|
|
1833
3055
|
// Inline function 'kotlin.math.roundToInt' call
|
|
1834
3056
|
var tmp0_roundToInt = r * 255;
|
|
1835
3057
|
tmp$ret$0 = roundToInt(tmp0_roundToInt);
|
|
1836
|
-
tmp =
|
|
3058
|
+
tmp = coerceIn_0(tmp$ret$0, 0, 255);
|
|
1837
3059
|
}
|
|
1838
3060
|
var tmp_0 = tmp;
|
|
1839
3061
|
var tmp_1;
|
|
@@ -1844,7 +3066,7 @@
|
|
|
1844
3066
|
// Inline function 'kotlin.math.roundToInt' call
|
|
1845
3067
|
var tmp1_roundToInt = g * 255;
|
|
1846
3068
|
tmp$ret$1 = roundToInt(tmp1_roundToInt);
|
|
1847
|
-
tmp_1 =
|
|
3069
|
+
tmp_1 = coerceIn_0(tmp$ret$1, 0, 255);
|
|
1848
3070
|
}
|
|
1849
3071
|
var tmp_2 = tmp_1;
|
|
1850
3072
|
var tmp_3;
|
|
@@ -1855,14 +3077,14 @@
|
|
|
1855
3077
|
// Inline function 'kotlin.math.roundToInt' call
|
|
1856
3078
|
var tmp2_roundToInt = b * 255;
|
|
1857
3079
|
tmp$ret$2 = roundToInt(tmp2_roundToInt);
|
|
1858
|
-
tmp_3 =
|
|
3080
|
+
tmp_3 = coerceIn_0(tmp$ret$2, 0, 255);
|
|
1859
3081
|
}
|
|
1860
3082
|
var tmp_4 = tmp_3;
|
|
1861
3083
|
var tmp$ret$3;
|
|
1862
3084
|
// Inline function 'kotlin.math.roundToInt' call
|
|
1863
3085
|
var tmp3_roundToInt = alpha * 255;
|
|
1864
3086
|
tmp$ret$3 = roundToInt(tmp3_roundToInt);
|
|
1865
|
-
var tmp_5 = _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4,
|
|
3087
|
+
var tmp_5 = _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4, coerceIn_0(tmp$ret$3, 0, 255));
|
|
1866
3088
|
return tmp_5;
|
|
1867
3089
|
}
|
|
1868
3090
|
function _RGBInt___get_r__impl__dulq0e($this) {
|
|
@@ -1910,46 +3132,52 @@
|
|
|
1910
3132
|
tmp$ret$2 = tmp$ret$1;
|
|
1911
3133
|
return tmp$ret$2;
|
|
1912
3134
|
}
|
|
1913
|
-
function
|
|
1914
|
-
|
|
1915
|
-
this.
|
|
3135
|
+
function Companion_5() {
|
|
3136
|
+
Companion_instance_5 = this;
|
|
3137
|
+
this.p2r_1 = XYZColorSpaces_getInstance().o2n_1;
|
|
1916
3138
|
}
|
|
1917
|
-
protoOf(
|
|
1918
|
-
return this.
|
|
3139
|
+
protoOf(Companion_5).x2o = function () {
|
|
3140
|
+
return this.p2r_1.x2o();
|
|
1919
3141
|
};
|
|
1920
|
-
protoOf(
|
|
1921
|
-
return this.
|
|
3142
|
+
protoOf(Companion_5).kd = function () {
|
|
3143
|
+
return this.p2r_1.kd();
|
|
1922
3144
|
};
|
|
1923
|
-
protoOf(
|
|
1924
|
-
return this.
|
|
3145
|
+
protoOf(Companion_5).c2m = function () {
|
|
3146
|
+
return this.p2r_1.c2m();
|
|
1925
3147
|
};
|
|
1926
|
-
protoOf(
|
|
1927
|
-
return this.
|
|
3148
|
+
protoOf(Companion_5).b2m = function (color) {
|
|
3149
|
+
return this.p2r_1.b2m(color);
|
|
1928
3150
|
};
|
|
1929
|
-
protoOf(
|
|
1930
|
-
return this.
|
|
3151
|
+
protoOf(Companion_5).d2m = function (components) {
|
|
3152
|
+
return this.p2r_1.d2m(components);
|
|
1931
3153
|
};
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
return
|
|
3154
|
+
protoOf(Companion_5).z2m = function (x, y, z, alpha) {
|
|
3155
|
+
return this.p2r_1.z2m(x, y, z, alpha);
|
|
3156
|
+
};
|
|
3157
|
+
protoOf(Companion_5).x2p = function (x, y, z, alpha) {
|
|
3158
|
+
return this.p2r_1.x2p(x, y, z, alpha);
|
|
3159
|
+
};
|
|
3160
|
+
var Companion_instance_5;
|
|
3161
|
+
function Companion_getInstance_6() {
|
|
3162
|
+
if (Companion_instance_5 == null)
|
|
3163
|
+
new Companion_5();
|
|
3164
|
+
return Companion_instance_5;
|
|
1937
3165
|
}
|
|
1938
3166
|
function adaptToM($this, space, m, mi) {
|
|
1939
|
-
if (space.
|
|
3167
|
+
if (space.c2m().equals($this.t2l_1.c2m()))
|
|
1940
3168
|
return $this;
|
|
1941
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
3169
|
+
var transform = chromaticAdaptationMatrix(space, $this.t2l_1.c2m().l2o_1, m, mi);
|
|
1942
3170
|
var tmp$ret$1;
|
|
1943
3171
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1944
|
-
var tmp0_dot = $this.
|
|
1945
|
-
var tmp1_dot = $this.
|
|
1946
|
-
var tmp2_dot = $this.
|
|
3172
|
+
var tmp0_dot = $this.p2l_1;
|
|
3173
|
+
var tmp1_dot = $this.q2l_1;
|
|
3174
|
+
var tmp2_dot = $this.r2l_1;
|
|
1947
3175
|
var tmp$ret$0;
|
|
1948
3176
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1949
3177
|
var tmp3__anonymous__ufb84q = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 0) * tmp2_dot;
|
|
1950
3178
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 1) * tmp2_dot;
|
|
1951
3179
|
var tmp5__anonymous__kpxxpo = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 2) * tmp2_dot;
|
|
1952
|
-
tmp$ret$0 = space.
|
|
3180
|
+
tmp$ret$0 = space.z2m(tmp3__anonymous__ufb84q, tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, $this.s2l_1);
|
|
1953
3181
|
tmp$ret$1 = tmp$ret$0;
|
|
1954
3182
|
return tmp$ret$1;
|
|
1955
3183
|
}
|
|
@@ -1957,80 +3185,80 @@
|
|
|
1957
3185
|
return t > get_CIE_E() ? cbrt(t) : (t * get_CIE_K() + 16) / 116;
|
|
1958
3186
|
}
|
|
1959
3187
|
function XYZ(x, y, z, alpha, space) {
|
|
1960
|
-
|
|
1961
|
-
this.
|
|
1962
|
-
this.
|
|
1963
|
-
this.
|
|
1964
|
-
this.
|
|
1965
|
-
this.
|
|
3188
|
+
Companion_getInstance_6();
|
|
3189
|
+
this.p2l_1 = x;
|
|
3190
|
+
this.q2l_1 = y;
|
|
3191
|
+
this.r2l_1 = z;
|
|
3192
|
+
this.s2l_1 = alpha;
|
|
3193
|
+
this.t2l_1 = space;
|
|
1966
3194
|
}
|
|
1967
|
-
protoOf(XYZ).
|
|
1968
|
-
return this.
|
|
3195
|
+
protoOf(XYZ).e2l = function () {
|
|
3196
|
+
return this.s2l_1;
|
|
1969
3197
|
};
|
|
1970
|
-
protoOf(XYZ).
|
|
1971
|
-
return this.
|
|
3198
|
+
protoOf(XYZ).f2l = function () {
|
|
3199
|
+
return this.t2l_1;
|
|
1972
3200
|
};
|
|
1973
|
-
protoOf(XYZ).
|
|
3201
|
+
protoOf(XYZ).q2n = function (space) {
|
|
1974
3202
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1975
3203
|
};
|
|
1976
|
-
protoOf(XYZ).
|
|
1977
|
-
var tmp0_container = this.
|
|
1978
|
-
var x = tmp0_container.
|
|
1979
|
-
var y = tmp0_container.
|
|
1980
|
-
var z = tmp0_container.
|
|
1981
|
-
var f = space.
|
|
3204
|
+
protoOf(XYZ).m2q = function (space) {
|
|
3205
|
+
var tmp0_container = this.q2n(XYZColorSpace_0(space.c2m()));
|
|
3206
|
+
var x = tmp0_container.x2();
|
|
3207
|
+
var y = tmp0_container.y2();
|
|
3208
|
+
var z = tmp0_container.q2r();
|
|
3209
|
+
var f = space.m2p();
|
|
1982
3210
|
var tmp$ret$1;
|
|
1983
3211
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1984
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.
|
|
3212
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.k2q());
|
|
1985
3213
|
var tmp$ret$0;
|
|
1986
3214
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1987
3215
|
var tmp1__anonymous__uwfjfc = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * z;
|
|
1988
3216
|
var tmp2__anonymous__z9zvc9 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * z;
|
|
1989
3217
|
var tmp3__anonymous__ufb84q = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * z;
|
|
1990
|
-
tmp$ret$0 = space.
|
|
3218
|
+
tmp$ret$0 = space.z2m(f.w2p(tmp1__anonymous__uwfjfc), f.w2p(tmp2__anonymous__z9zvc9), f.w2p(tmp3__anonymous__ufb84q), this.s2l_1);
|
|
1991
3219
|
tmp$ret$1 = tmp$ret$0;
|
|
1992
3220
|
return tmp$ret$1;
|
|
1993
3221
|
};
|
|
1994
|
-
protoOf(XYZ).
|
|
1995
|
-
return this.
|
|
3222
|
+
protoOf(XYZ).g2l = function () {
|
|
3223
|
+
return this.m2q(RGBColorSpaces_getInstance().c2n_1);
|
|
1996
3224
|
};
|
|
1997
|
-
protoOf(XYZ).
|
|
1998
|
-
var fx = toLAB$f(this.
|
|
1999
|
-
var fy = toLAB$f(this.
|
|
2000
|
-
var fz = toLAB$f(this.
|
|
3225
|
+
protoOf(XYZ).o2l = function () {
|
|
3226
|
+
var fx = toLAB$f(this.p2l_1 / this.t2l_1.c2m().l2o_1.c2q());
|
|
3227
|
+
var fy = toLAB$f(this.q2l_1 / this.t2l_1.c2m().l2o_1.b2q_1);
|
|
3228
|
+
var fz = toLAB$f(this.r2l_1 / this.t2l_1.c2m().l2o_1.d2q());
|
|
2001
3229
|
var l = 116 * fy - 16;
|
|
2002
3230
|
var a = 500 * (fx - fy);
|
|
2003
3231
|
var b = 200 * (fy - fz);
|
|
2004
|
-
return LABColorSpace_0(this.
|
|
3232
|
+
return LABColorSpace_0(this.t2l_1.c2m()).x2p(l, a, b, this.s2l_1);
|
|
2005
3233
|
};
|
|
2006
|
-
protoOf(XYZ).
|
|
3234
|
+
protoOf(XYZ).n2l = function () {
|
|
2007
3235
|
return this;
|
|
2008
3236
|
};
|
|
2009
|
-
protoOf(XYZ).
|
|
3237
|
+
protoOf(XYZ).x7 = function () {
|
|
2010
3238
|
var tmp$ret$0;
|
|
2011
3239
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2012
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
3240
|
+
var tmp0_floatArrayOf = new Float32Array([this.p2l_1, this.q2l_1, this.r2l_1, this.s2l_1]);
|
|
2013
3241
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
2014
3242
|
return tmp$ret$0;
|
|
2015
3243
|
};
|
|
2016
|
-
protoOf(XYZ).
|
|
2017
|
-
return this.
|
|
3244
|
+
protoOf(XYZ).x2 = function () {
|
|
3245
|
+
return this.p2l_1;
|
|
2018
3246
|
};
|
|
2019
|
-
protoOf(XYZ).
|
|
2020
|
-
return this.
|
|
3247
|
+
protoOf(XYZ).y2 = function () {
|
|
3248
|
+
return this.q2l_1;
|
|
2021
3249
|
};
|
|
2022
|
-
protoOf(XYZ).
|
|
2023
|
-
return this.
|
|
3250
|
+
protoOf(XYZ).q2r = function () {
|
|
3251
|
+
return this.r2l_1;
|
|
2024
3252
|
};
|
|
2025
3253
|
protoOf(XYZ).toString = function () {
|
|
2026
|
-
return 'XYZ(x=' + this.
|
|
3254
|
+
return 'XYZ(x=' + this.p2l_1 + ', y=' + this.q2l_1 + ', z=' + this.r2l_1 + ', alpha=' + this.s2l_1 + ', space=' + this.t2l_1 + ')';
|
|
2027
3255
|
};
|
|
2028
3256
|
protoOf(XYZ).hashCode = function () {
|
|
2029
|
-
var result = getNumberHashCode(this.
|
|
2030
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2031
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2032
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2033
|
-
result = imul(result, 31) + hashCode(this.
|
|
3257
|
+
var result = getNumberHashCode(this.p2l_1);
|
|
3258
|
+
result = imul(result, 31) + getNumberHashCode(this.q2l_1) | 0;
|
|
3259
|
+
result = imul(result, 31) + getNumberHashCode(this.r2l_1) | 0;
|
|
3260
|
+
result = imul(result, 31) + getNumberHashCode(this.s2l_1) | 0;
|
|
3261
|
+
result = imul(result, 31) + hashCode(this.t2l_1) | 0;
|
|
2034
3262
|
return result;
|
|
2035
3263
|
};
|
|
2036
3264
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -2039,15 +3267,15 @@
|
|
|
2039
3267
|
if (!(other instanceof XYZ))
|
|
2040
3268
|
return false;
|
|
2041
3269
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
2042
|
-
if (!equals(this.
|
|
3270
|
+
if (!equals(this.p2l_1, tmp0_other_with_cast.p2l_1))
|
|
2043
3271
|
return false;
|
|
2044
|
-
if (!equals(this.
|
|
3272
|
+
if (!equals(this.q2l_1, tmp0_other_with_cast.q2l_1))
|
|
2045
3273
|
return false;
|
|
2046
|
-
if (!equals(this.
|
|
3274
|
+
if (!equals(this.r2l_1, tmp0_other_with_cast.r2l_1))
|
|
2047
3275
|
return false;
|
|
2048
|
-
if (!equals(this.
|
|
3276
|
+
if (!equals(this.s2l_1, tmp0_other_with_cast.s2l_1))
|
|
2049
3277
|
return false;
|
|
2050
|
-
if (!equals(this.
|
|
3278
|
+
if (!equals(this.t2l_1, tmp0_other_with_cast.t2l_1))
|
|
2051
3279
|
return false;
|
|
2052
3280
|
return true;
|
|
2053
3281
|
};
|
|
@@ -2055,12 +3283,12 @@
|
|
|
2055
3283
|
}
|
|
2056
3284
|
function XYZColorSpace_0(whitePoint) {
|
|
2057
3285
|
var tmp0_subject = whitePoint;
|
|
2058
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
3286
|
+
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? XYZColorSpaces_getInstance().o2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? XYZColorSpaces_getInstance().p2n_1 : new XYZColorSpaceImpl(whitePoint);
|
|
2059
3287
|
}
|
|
2060
3288
|
function XYZColorSpaces() {
|
|
2061
3289
|
XYZColorSpaces_instance = this;
|
|
2062
|
-
this.
|
|
2063
|
-
this.
|
|
3290
|
+
this.o2n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().r2o_1);
|
|
3291
|
+
this.p2n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().p2o_1);
|
|
2064
3292
|
}
|
|
2065
3293
|
var XYZColorSpaces_instance;
|
|
2066
3294
|
function XYZColorSpaces_getInstance() {
|
|
@@ -2071,32 +3299,75 @@
|
|
|
2071
3299
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
2072
3300
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
2073
3301
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
2074
|
-
var dstWp = _this__u8e3s4.
|
|
2075
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
2076
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
3302
|
+
var dstWp = _this__u8e3s4.c2m().l2o_1;
|
|
3303
|
+
var src = dot_0(xyzToLms, srcWp.c2q(), srcWp.b2q_1, srcWp.d2q());
|
|
3304
|
+
var dst = dot_0(xyzToLms, dstWp.c2q(), dstWp.b2q_1, dstWp.d2q());
|
|
2077
3305
|
return dot(dotDiagonal(lmsToXyz, _Vector___get_l__impl__envr1l(dst) / _Vector___get_l__impl__envr1l(src), _Vector___get_m__impl__e5qq0m(dst) / _Vector___get_m__impl__e5qq0m(src), _Vector___get_s__impl__pzuljk(dst) / _Vector___get_s__impl__pzuljk(src)), xyzToLms);
|
|
2078
3306
|
}
|
|
2079
3307
|
function XYZColorSpaceImpl(whitePoint) {
|
|
2080
|
-
this.
|
|
2081
|
-
this.
|
|
3308
|
+
this.r2r_1 = whitePoint;
|
|
3309
|
+
this.s2r_1 = rectangularComponentInfo('XYZ');
|
|
2082
3310
|
}
|
|
2083
|
-
protoOf(XYZColorSpaceImpl).
|
|
2084
|
-
return this.
|
|
3311
|
+
protoOf(XYZColorSpaceImpl).c2m = function () {
|
|
3312
|
+
return this.r2r_1;
|
|
2085
3313
|
};
|
|
2086
|
-
protoOf(XYZColorSpaceImpl).
|
|
3314
|
+
protoOf(XYZColorSpaceImpl).kd = function () {
|
|
2087
3315
|
return 'XYZ';
|
|
2088
3316
|
};
|
|
2089
|
-
protoOf(XYZColorSpaceImpl).
|
|
2090
|
-
return
|
|
3317
|
+
protoOf(XYZColorSpaceImpl).x2o = function () {
|
|
3318
|
+
return this.s2r_1;
|
|
3319
|
+
};
|
|
3320
|
+
protoOf(XYZColorSpaceImpl).b2m = function (color) {
|
|
3321
|
+
return color.n2l().q2n(this);
|
|
3322
|
+
};
|
|
3323
|
+
protoOf(XYZColorSpaceImpl).d2m = function (components) {
|
|
3324
|
+
var tmp$ret$5;
|
|
3325
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3326
|
+
var tmp$ret$4;
|
|
3327
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3328
|
+
var size = this.x2o().i();
|
|
3329
|
+
// Inline function 'kotlin.require' call
|
|
3330
|
+
var containsLower = size - 1 | 0;
|
|
3331
|
+
var containsArg = components.length;
|
|
3332
|
+
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
3333
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3334
|
+
if (!tmp0_require) {
|
|
3335
|
+
var tmp$ret$0;
|
|
3336
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
3337
|
+
tmp$ret$0 = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
3338
|
+
var message = tmp$ret$0;
|
|
3339
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
3340
|
+
}
|
|
3341
|
+
var tmp$ret$3;
|
|
3342
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
3343
|
+
var tmp = components[0];
|
|
3344
|
+
var tmp_0 = components[1];
|
|
3345
|
+
var tmp_1 = components[2];
|
|
3346
|
+
var tmp$ret$2;
|
|
3347
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
3348
|
+
var tmp_2;
|
|
3349
|
+
if (3 <= get_lastIndex_0(components)) {
|
|
3350
|
+
tmp_2 = components[3];
|
|
3351
|
+
} else {
|
|
3352
|
+
var tmp$ret$1;
|
|
3353
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
3354
|
+
tmp$ret$1 = 1.0;
|
|
3355
|
+
tmp_2 = tmp$ret$1;
|
|
3356
|
+
}
|
|
3357
|
+
tmp$ret$2 = tmp_2;
|
|
3358
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
3359
|
+
tmp$ret$4 = tmp$ret$3;
|
|
3360
|
+
tmp$ret$5 = tmp$ret$4;
|
|
3361
|
+
return tmp$ret$5;
|
|
2091
3362
|
};
|
|
2092
3363
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
2093
|
-
return 'XYZColorSpace(' + this.
|
|
3364
|
+
return 'XYZColorSpace(' + this.r2r_1 + ')';
|
|
2094
3365
|
};
|
|
2095
|
-
protoOf(XYZColorSpaceImpl).
|
|
3366
|
+
protoOf(XYZColorSpaceImpl).z2m = function (x, y, z, alpha) {
|
|
2096
3367
|
return new XYZ(x, y, z, alpha, this);
|
|
2097
3368
|
};
|
|
2098
3369
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
2099
|
-
return this.
|
|
3370
|
+
return this.r2r_1.hashCode();
|
|
2100
3371
|
};
|
|
2101
3372
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
2102
3373
|
if (this === other)
|
|
@@ -2104,7 +3375,7 @@
|
|
|
2104
3375
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
2105
3376
|
return false;
|
|
2106
3377
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
2107
|
-
if (!this.
|
|
3378
|
+
if (!this.r2r_1.equals(tmp0_other_with_cast.r2r_1))
|
|
2108
3379
|
return false;
|
|
2109
3380
|
return true;
|
|
2110
3381
|
};
|
|
@@ -2118,26 +3389,26 @@
|
|
|
2118
3389
|
}
|
|
2119
3390
|
function xyY(x, y, Y) {
|
|
2120
3391
|
Y = Y === VOID ? 1.0 : Y;
|
|
2121
|
-
this.
|
|
2122
|
-
this.
|
|
2123
|
-
this.
|
|
3392
|
+
this.z2p_1 = x;
|
|
3393
|
+
this.a2q_1 = y;
|
|
3394
|
+
this.b2q_1 = Y;
|
|
2124
3395
|
}
|
|
2125
|
-
protoOf(xyY).
|
|
2126
|
-
return 1 - this.
|
|
3396
|
+
protoOf(xyY).c2r = function () {
|
|
3397
|
+
return 1 - this.z2p_1 - this.a2q_1;
|
|
2127
3398
|
};
|
|
2128
|
-
protoOf(xyY).
|
|
2129
|
-
return this.
|
|
3399
|
+
protoOf(xyY).c2q = function () {
|
|
3400
|
+
return this.z2p_1 * this.b2q_1 / this.a2q_1;
|
|
2130
3401
|
};
|
|
2131
|
-
protoOf(xyY).
|
|
2132
|
-
return (1 - this.
|
|
3402
|
+
protoOf(xyY).d2q = function () {
|
|
3403
|
+
return (1 - this.z2p_1 - this.a2q_1) * this.b2q_1 / this.a2q_1;
|
|
2133
3404
|
};
|
|
2134
3405
|
protoOf(xyY).toString = function () {
|
|
2135
|
-
return 'xyY(x=' + this.
|
|
3406
|
+
return 'xyY(x=' + this.z2p_1 + ', y=' + this.a2q_1 + ', Y=' + this.b2q_1 + ')';
|
|
2136
3407
|
};
|
|
2137
3408
|
protoOf(xyY).hashCode = function () {
|
|
2138
|
-
var result = getNumberHashCode(this.
|
|
2139
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2140
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3409
|
+
var result = getNumberHashCode(this.z2p_1);
|
|
3410
|
+
result = imul(result, 31) + getNumberHashCode(this.a2q_1) | 0;
|
|
3411
|
+
result = imul(result, 31) + getNumberHashCode(this.b2q_1) | 0;
|
|
2141
3412
|
return result;
|
|
2142
3413
|
};
|
|
2143
3414
|
protoOf(xyY).equals = function (other) {
|
|
@@ -2146,11 +3417,11 @@
|
|
|
2146
3417
|
if (!(other instanceof xyY))
|
|
2147
3418
|
return false;
|
|
2148
3419
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
2149
|
-
if (!equals(this.
|
|
3420
|
+
if (!equals(this.z2p_1, tmp0_other_with_cast.z2p_1))
|
|
2150
3421
|
return false;
|
|
2151
|
-
if (!equals(this.
|
|
3422
|
+
if (!equals(this.a2q_1, tmp0_other_with_cast.a2q_1))
|
|
2152
3423
|
return false;
|
|
2153
|
-
if (!equals(this.
|
|
3424
|
+
if (!equals(this.b2q_1, tmp0_other_with_cast.b2q_1))
|
|
2154
3425
|
return false;
|
|
2155
3426
|
return true;
|
|
2156
3427
|
};
|
|
@@ -2159,16 +3430,40 @@
|
|
|
2159
3430
|
return numberToDouble(isNumber(tmp) ? tmp : THROW_CCE());
|
|
2160
3431
|
}
|
|
2161
3432
|
//region block: post-declaration
|
|
2162
|
-
protoOf(
|
|
2163
|
-
protoOf(
|
|
2164
|
-
protoOf(
|
|
2165
|
-
protoOf(
|
|
2166
|
-
protoOf(
|
|
2167
|
-
protoOf(
|
|
2168
|
-
protoOf(
|
|
2169
|
-
protoOf(
|
|
2170
|
-
protoOf(
|
|
2171
|
-
protoOf(
|
|
3433
|
+
protoOf(HSL).n2l = toXYZ;
|
|
3434
|
+
protoOf(HSL).o2l = toLAB;
|
|
3435
|
+
protoOf(HSL).u2l = toLCHab;
|
|
3436
|
+
protoOf(HSL).a2m = toHWB;
|
|
3437
|
+
protoOf(HWB).h2l = toHSL;
|
|
3438
|
+
protoOf(HWB).n2l = toXYZ;
|
|
3439
|
+
protoOf(HWB).o2l = toLAB;
|
|
3440
|
+
protoOf(HWB).u2l = toLCHab;
|
|
3441
|
+
protoOf(LAB).h2l = toHSL;
|
|
3442
|
+
protoOf(LAB).a2m = toHWB;
|
|
3443
|
+
protoOf(LABColorSpaceImpl).x2p = invoke;
|
|
3444
|
+
protoOf(LCHab).h2l = toHSL;
|
|
3445
|
+
protoOf(LCHab).a2m = toHWB;
|
|
3446
|
+
protoOf(Companion_4).u2o = from255$default;
|
|
3447
|
+
protoOf(RGB).o2l = toLAB;
|
|
3448
|
+
protoOf(RGB).u2l = toLCHab;
|
|
3449
|
+
protoOf(SRGB).x2p = invoke_0;
|
|
3450
|
+
protoOf(SRGB).y2m = invoke_1;
|
|
3451
|
+
protoOf(SRGB).v2o = from255;
|
|
3452
|
+
protoOf(SRGB).u2o = from255$default;
|
|
3453
|
+
protoOf(BT2020Space).x2p = invoke_0;
|
|
3454
|
+
protoOf(BT2020Space).y2m = invoke_1;
|
|
3455
|
+
protoOf(BT2020Space).v2o = from255;
|
|
3456
|
+
protoOf(BT2020Space).u2o = from255$default;
|
|
3457
|
+
protoOf(RGBColorSpaceImpl).x2p = invoke_0;
|
|
3458
|
+
protoOf(RGBColorSpaceImpl).y2m = invoke_1;
|
|
3459
|
+
protoOf(RGBColorSpaceImpl).v2o = from255;
|
|
3460
|
+
protoOf(RGBColorSpaceImpl).u2o = from255$default;
|
|
3461
|
+
protoOf(Companion_5).y2p = invoke$default;
|
|
3462
|
+
protoOf(XYZ).h2l = toHSL;
|
|
3463
|
+
protoOf(XYZ).u2l = toLCHab;
|
|
3464
|
+
protoOf(XYZ).a2m = toHWB;
|
|
3465
|
+
protoOf(XYZColorSpaceImpl).x2p = invoke_2;
|
|
3466
|
+
protoOf(XYZColorSpaceImpl).y2p = invoke$default;
|
|
2172
3467
|
//endregion
|
|
2173
3468
|
//region block: init
|
|
2174
3469
|
CIE_E = 0.008856451679035631;
|
|
@@ -2178,8 +3473,10 @@
|
|
|
2178
3473
|
//region block: exports
|
|
2179
3474
|
_.$_$ = _.$_$ || {};
|
|
2180
3475
|
_.$_$.a = formatCssString;
|
|
2181
|
-
_.$_$.b =
|
|
2182
|
-
_.$_$.c =
|
|
3476
|
+
_.$_$.b = parse;
|
|
3477
|
+
_.$_$.c = RenderCondition_ALWAYS_getInstance;
|
|
3478
|
+
_.$_$.d = Companion_getInstance_5;
|
|
3479
|
+
_.$_$.e = Companion_getInstance_0;
|
|
2183
3480
|
//endregion
|
|
2184
3481
|
return _;
|
|
2185
3482
|
}));
|