@cruglobal/godtools-shared 1.0.2-SNAPSHOT.1558 → 1.1.0-PR638-SNAPSHOT.1575
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/Kermit-kermit-core.js +65 -66
- package/Kermit-kermit-core.js.map +1 -1
- package/Kermit-kermit.js +17 -18
- package/Kermit-kermit.js.map +1 -1
- package/KustomExport-lib-coroutines.js +3 -3
- package/KustomExport-lib.js +3 -3
- package/android-gto-support-gto-support-androidx-annotation.js +3 -3
- package/android-gto-support-gto-support-fluidsonic-locale.js +3 -3
- package/antlr-kotlin-antlr-kotlin-runtime.js +4229 -4369
- package/antlr-kotlin-antlr-kotlin-runtime.js.map +1 -1
- package/colormath-root-colormath.js +1365 -1097
- package/colormath-root-colormath.js.map +1 -1
- package/fluid-locale.js +239 -228
- package/fluid-locale.js.map +1 -1
- package/kotlin-js.js +44 -45
- package/kotlin-js.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +9041 -6900
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlinx-atomicfu-runtime.js +3 -3
- package/kotlin-mpp-godtools-tool-parser-module-common.js +32 -7
- package/kotlin-mpp-godtools-tool-parser-module-common.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js +532 -585
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser.js +3508 -4030
- package/kotlin-mpp-godtools-tool-parser-module-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-state.js +297 -271
- package/kotlin-mpp-godtools-tool-parser-module-state.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.d.ts +142 -93
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.js +11 -7
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
- package/kotlinx-atomicfu.js +36 -37
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +3246 -3277
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
- package/seskar-core.js +3 -3
- package/seskar-react.js +3 -3
|
@@ -1,158 +1,163 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
3
|
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
5
|
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'colormath-root-colormath'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'colormath-root-colormath'.");
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
globalThis['colormath-root-colormath'] = factory(typeof globalThis['colormath-root-colormath'] === 'undefined' ? {} : globalThis['colormath-root-colormath'], globalThis['kotlin-kotlin-stdlib']);
|
|
11
11
|
}
|
|
12
|
-
}(
|
|
12
|
+
}(function (_, kotlin_kotlin) {
|
|
13
13
|
'use strict';
|
|
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
|
|
20
|
-
var
|
|
21
|
-
var toString = kotlin_kotlin.$_$.x6;
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.d7;
|
|
18
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.p6;
|
|
19
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.r6;
|
|
20
|
+
var toString = kotlin_kotlin.$_$.g7;
|
|
22
21
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
23
|
-
var
|
|
24
|
-
var emptyMap = kotlin_kotlin.$_$.
|
|
22
|
+
var initMetadataForClass = kotlin_kotlin.$_$.o6;
|
|
23
|
+
var emptyMap = kotlin_kotlin.$_$.u3;
|
|
25
24
|
var VOID = kotlin_kotlin.$_$.d;
|
|
26
25
|
var Companion_instance = kotlin_kotlin.$_$.m2;
|
|
27
26
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.y1;
|
|
28
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
27
|
+
var createFailure = kotlin_kotlin.$_$.y9;
|
|
29
28
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.b2;
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
29
|
+
var THROW_CCE = kotlin_kotlin.$_$.s9;
|
|
31
30
|
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.a2;
|
|
32
|
-
var startsWith = kotlin_kotlin.$_$.
|
|
31
|
+
var startsWith = kotlin_kotlin.$_$.q8;
|
|
33
32
|
var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
var initMetadataForObject = kotlin_kotlin.$_$.t6;
|
|
34
|
+
var endsWith = kotlin_kotlin.$_$.c8;
|
|
35
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.i3;
|
|
36
36
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
37
|
-
var checkIndexOverflow = kotlin_kotlin.$_$.
|
|
38
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
39
|
-
var get_lastIndex = kotlin_kotlin.$_$.
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var equals = kotlin_kotlin.$_$.b6;
|
|
37
|
+
var checkIndexOverflow = kotlin_kotlin.$_$.h3;
|
|
38
|
+
var Unit_instance = kotlin_kotlin.$_$.n2;
|
|
39
|
+
var get_lastIndex = kotlin_kotlin.$_$.j4;
|
|
40
|
+
var dropLast = kotlin_kotlin.$_$.b8;
|
|
41
|
+
var toDouble = kotlin_kotlin.$_$.v8;
|
|
42
|
+
var charSequenceLength = kotlin_kotlin.$_$.e6;
|
|
43
|
+
var coerceIn = kotlin_kotlin.$_$.o7;
|
|
44
|
+
var FloatCompanionObject_instance = kotlin_kotlin.$_$.l2;
|
|
45
|
+
var Enum = kotlin_kotlin.$_$.i9;
|
|
46
|
+
var equals = kotlin_kotlin.$_$.h6;
|
|
48
47
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
49
|
-
var dropLast_0 = kotlin_kotlin.$_$.
|
|
50
|
-
var joinTo = kotlin_kotlin.$_$.
|
|
51
|
-
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.
|
|
52
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
53
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
48
|
+
var dropLast_0 = kotlin_kotlin.$_$.s3;
|
|
49
|
+
var joinTo = kotlin_kotlin.$_$.h4;
|
|
50
|
+
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.e2;
|
|
51
|
+
var numberToInt = kotlin_kotlin.$_$.b7;
|
|
52
|
+
var roundToInt = kotlin_kotlin.$_$.i7;
|
|
54
53
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
|
|
55
|
-
var padStart = kotlin_kotlin.$_$.
|
|
56
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
57
|
-
var trimEnd = kotlin_kotlin.$_$.
|
|
58
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
59
|
-
var joinTo_0 = kotlin_kotlin.$_$.
|
|
60
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
61
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
62
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
54
|
+
var padStart = kotlin_kotlin.$_$.k8;
|
|
55
|
+
var charArrayOf = kotlin_kotlin.$_$.c6;
|
|
56
|
+
var trimEnd = kotlin_kotlin.$_$.c9;
|
|
57
|
+
var isNaN_0 = kotlin_kotlin.$_$.aa;
|
|
58
|
+
var joinTo_0 = kotlin_kotlin.$_$.g4;
|
|
59
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.ca;
|
|
60
|
+
var numberToDouble = kotlin_kotlin.$_$.a7;
|
|
61
|
+
var getStringHashCode = kotlin_kotlin.$_$.m6;
|
|
63
62
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;
|
|
64
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
63
|
+
var charSequenceGet = kotlin_kotlin.$_$.d6;
|
|
65
64
|
var toString_0 = kotlin_kotlin.$_$.x1;
|
|
66
65
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
67
|
-
var listOf = kotlin_kotlin.$_$.
|
|
68
|
-
var to = kotlin_kotlin.$_$.
|
|
69
|
-
var mapOf = kotlin_kotlin.$_$.
|
|
70
|
-
var withSign = kotlin_kotlin.$_$.
|
|
71
|
-
var get_PI = kotlin_kotlin.$_$.
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
66
|
+
var listOf = kotlin_kotlin.$_$.n4;
|
|
67
|
+
var to = kotlin_kotlin.$_$.ha;
|
|
68
|
+
var mapOf = kotlin_kotlin.$_$.p4;
|
|
69
|
+
var withSign = kotlin_kotlin.$_$.j7;
|
|
70
|
+
var get_PI = kotlin_kotlin.$_$.h7;
|
|
71
|
+
var trimMargin = kotlin_kotlin.$_$.d9;
|
|
72
|
+
var hashCode = kotlin_kotlin.$_$.n6;
|
|
73
|
+
var coerceAtLeast = kotlin_kotlin.$_$.k7;
|
|
74
|
+
var getNumberHashCode = kotlin_kotlin.$_$.k6;
|
|
75
|
+
var isInterface = kotlin_kotlin.$_$.w6;
|
|
76
|
+
var objectCreate = kotlin_kotlin.$_$.c7;
|
|
77
|
+
var DoubleCompanionObject_instance = kotlin_kotlin.$_$.k2;
|
|
78
|
+
var Char = kotlin_kotlin.$_$.f9;
|
|
79
|
+
var toInt = kotlin_kotlin.$_$.z8;
|
|
80
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.x6;
|
|
81
|
+
var slice = kotlin_kotlin.$_$.m8;
|
|
82
|
+
var contentEquals = kotlin_kotlin.$_$.m3;
|
|
83
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.m7;
|
|
84
|
+
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.f2;
|
|
85
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.g2;
|
|
86
|
+
var coerceIn_0 = kotlin_kotlin.$_$.p7;
|
|
87
|
+
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.d2;
|
|
88
|
+
var uintToDouble = kotlin_kotlin.$_$.ja;
|
|
89
|
+
var toByte = kotlin_kotlin.$_$.e7;
|
|
88
90
|
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.c2;
|
|
91
|
+
var UInt = kotlin_kotlin.$_$.u9;
|
|
92
|
+
var UInt__hashCode_impl_z2mhuw = kotlin_kotlin.$_$.h2;
|
|
89
93
|
//endregion
|
|
90
94
|
//region block: pre-declaration
|
|
91
|
-
|
|
95
|
+
initMetadataForCompanion(Companion);
|
|
92
96
|
function toHSL() {
|
|
93
|
-
return this.
|
|
97
|
+
return this.i1m().j1m();
|
|
94
98
|
}
|
|
95
99
|
function toXYZ() {
|
|
96
|
-
return this.
|
|
100
|
+
return this.i1m().p1m();
|
|
97
101
|
}
|
|
98
102
|
function toLAB() {
|
|
99
|
-
return this.
|
|
103
|
+
return this.p1m().q1m();
|
|
100
104
|
}
|
|
101
105
|
function toLCHab() {
|
|
102
|
-
return this.
|
|
106
|
+
return this.q1m().w1m();
|
|
103
107
|
}
|
|
104
108
|
function toHWB() {
|
|
105
|
-
return this.
|
|
109
|
+
return this.i1m().c1n();
|
|
106
110
|
}
|
|
107
111
|
function toOklab() {
|
|
108
|
-
return this.
|
|
112
|
+
return this.p1m().d1n();
|
|
109
113
|
}
|
|
110
114
|
function toOklch() {
|
|
111
|
-
return this.
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
115
|
+
return this.d1n().e1n();
|
|
116
|
+
}
|
|
117
|
+
initMetadataForInterface(Color, 'Color');
|
|
118
|
+
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
119
|
+
initMetadataForInterface(WhitePointColorSpace, 'WhitePointColorSpace');
|
|
120
|
+
initMetadataForObject(PATTERNS, 'PATTERNS');
|
|
121
|
+
initMetadataForClass(RenderCondition, 'RenderCondition', VOID, Enum);
|
|
122
|
+
initMetadataForClass(AngleUnit, 'AngleUnit', VOID, Enum);
|
|
123
|
+
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
124
|
+
initMetadataForObject(Illuminant, 'Illuminant');
|
|
125
|
+
initMetadataForObject(CssColors, 'CssColors');
|
|
126
|
+
initMetadataForClass(Matrix, 'Matrix');
|
|
127
|
+
initMetadataForCompanion(Companion_0);
|
|
128
|
+
initMetadataForClass(HSL, 'HSL', VOID, VOID, [Color]);
|
|
129
|
+
initMetadataForCompanion(Companion_1);
|
|
130
|
+
initMetadataForClass(HWB, 'HWB', VOID, VOID, [Color]);
|
|
131
|
+
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
132
|
+
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
128
133
|
function invoke(l, a, b, alpha) {
|
|
129
|
-
return this.
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
134
|
+
return this.k1o(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
135
|
+
}
|
|
136
|
+
initMetadataForInterface(LABColorSpace, 'LABColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
137
|
+
initMetadataForCompanion(Companion_2, VOID, [LABColorSpace]);
|
|
138
|
+
initMetadataForClass(LAB, 'LAB', VOID, VOID, [Color]);
|
|
139
|
+
initMetadataForObject(LABColorSpaces, 'LABColorSpaces');
|
|
140
|
+
initMetadataForClass(LABColorSpaceImpl, 'LABColorSpaceImpl', VOID, VOID, [LABColorSpace]);
|
|
141
|
+
initMetadataForInterface(LCHabColorSpace, 'LCHabColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
142
|
+
initMetadataForCompanion(Companion_3, VOID, [LCHabColorSpace]);
|
|
143
|
+
initMetadataForClass(LCHab, 'LCHab', VOID, VOID, [Color]);
|
|
144
|
+
initMetadataForObject(LCHabColorSpaces, 'LCHabColorSpaces');
|
|
145
|
+
initMetadataForClass(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', VOID, VOID, [LCHabColorSpace]);
|
|
146
|
+
initMetadataForCompanion(Companion_4);
|
|
147
|
+
initMetadataForClass(Oklab, 'Oklab', VOID, VOID, [Color]);
|
|
148
|
+
initMetadataForCompanion(Companion_5);
|
|
149
|
+
initMetadataForClass(Oklch, 'Oklch', VOID, VOID, [Color]);
|
|
150
|
+
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
151
|
+
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
147
152
|
function invoke_0(r, g, b, alpha) {
|
|
148
|
-
return this.
|
|
153
|
+
return this.k1o(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
149
154
|
}
|
|
150
155
|
function from255(r, g, b, alpha) {
|
|
151
|
-
return this.
|
|
156
|
+
return this.k1o(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
152
157
|
}
|
|
153
158
|
function from255$default(r, g, b, alpha, $super) {
|
|
154
159
|
alpha = alpha === VOID ? 255 : alpha;
|
|
155
|
-
return $super === VOID ? this.
|
|
160
|
+
return $super === VOID ? this.o1q(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
156
161
|
}
|
|
157
162
|
function invoke_1(hex) {
|
|
158
163
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -163,38 +168,40 @@
|
|
|
163
168
|
// Inline function 'kotlin.contracts.contract' call
|
|
164
169
|
// Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
|
|
165
170
|
var it = get_hexLength(hex);
|
|
166
|
-
if (it === 4
|
|
171
|
+
if (it === 4 || it === 8) {
|
|
167
172
|
tmp_2 = parseHex(hex, 3);
|
|
168
173
|
} else {
|
|
169
174
|
tmp_2 = 255;
|
|
170
175
|
}
|
|
171
|
-
return this.
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
return this.o1q(tmp, tmp_0, tmp_1, tmp_2);
|
|
177
|
+
}
|
|
178
|
+
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
179
|
+
initMetadataForCompanion(Companion_6, VOID, [RGBColorSpace]);
|
|
180
|
+
initMetadataForClass(RGB, 'RGB', VOID, VOID, [Color]);
|
|
181
|
+
initMetadataForObject(RGBColorSpaces, 'RGBColorSpaces');
|
|
182
|
+
initMetadataForObject(SRGB, 'SRGB', VOID, VOID, [RGBColorSpace]);
|
|
183
|
+
initMetadataForClass(RGBColorSpaceImpl, 'RGBColorSpaceImpl', VOID, VOID, [RGBColorSpace]);
|
|
184
|
+
initMetadataForObject(SRGBTransferFunctions, 'SRGBTransferFunctions');
|
|
185
|
+
initMetadataForObject(ACESccTransferFunctions, 'ACESccTransferFunctions');
|
|
186
|
+
initMetadataForObject(ACEScctTransferFunctions, 'ACEScctTransferFunctions');
|
|
187
|
+
initMetadataForObject(BT2020TransferFunctions, 'BT2020TransferFunctions');
|
|
188
|
+
initMetadataForObject(BT709TransferFunctions, 'BT709TransferFunctions');
|
|
189
|
+
initMetadataForObject(ROMMTransferFunctions, 'ROMMTransferFunctions');
|
|
190
|
+
initMetadataForCompanion(Companion_7);
|
|
191
|
+
initMetadataForClass(RGBInt, 'RGBInt', VOID, VOID, [Color]);
|
|
185
192
|
function invoke_2(x, y, z, alpha) {
|
|
186
|
-
return this.
|
|
193
|
+
return this.k1o(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
187
194
|
}
|
|
188
195
|
function invoke$default(x, y, z, alpha, $super) {
|
|
189
196
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
190
|
-
return $super === VOID ? this.
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
return $super === VOID ? this.j1r(x, y, z, alpha) : invoke_2(x, y, z, alpha);
|
|
198
|
+
}
|
|
199
|
+
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
200
|
+
initMetadataForCompanion(Companion_8, VOID, [XYZColorSpace]);
|
|
201
|
+
initMetadataForClass(XYZ, 'XYZ', VOID, VOID, [Color]);
|
|
202
|
+
initMetadataForObject(XYZColorSpaces, 'XYZColorSpaces');
|
|
203
|
+
initMetadataForClass(XYZColorSpaceImpl, 'XYZColorSpaceImpl', VOID, VOID, [XYZColorSpace]);
|
|
204
|
+
initMetadataForClass(xyY, 'xyY');
|
|
198
205
|
//endregion
|
|
199
206
|
function Companion() {
|
|
200
207
|
}
|
|
@@ -205,16 +212,16 @@
|
|
|
205
212
|
function Color() {
|
|
206
213
|
}
|
|
207
214
|
function convertTo(_this__u8e3s4, space) {
|
|
208
|
-
return space.
|
|
215
|
+
return space.j1n(_this__u8e3s4);
|
|
209
216
|
}
|
|
210
217
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
211
|
-
this.
|
|
212
|
-
this.
|
|
213
|
-
this.
|
|
214
|
-
this.
|
|
218
|
+
this.k1n_1 = name;
|
|
219
|
+
this.l1n_1 = isPolar;
|
|
220
|
+
this.m1n_1 = min;
|
|
221
|
+
this.n1n_1 = max;
|
|
215
222
|
// Inline function 'kotlin.require' call
|
|
216
223
|
// Inline function 'kotlin.contracts.contract' call
|
|
217
|
-
if (!(this.
|
|
224
|
+
if (!(this.m1n_1 <= this.n1n_1)) {
|
|
218
225
|
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
219
226
|
var message = 'min must be less than or equal to max';
|
|
220
227
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
@@ -235,7 +242,7 @@
|
|
|
235
242
|
}
|
|
236
243
|
function parseOrNull(_this__u8e3s4, color_0, customColorSpaces) {
|
|
237
244
|
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
238
|
-
var keywordColor = CssColors_getInstance().
|
|
245
|
+
var keywordColor = CssColors_getInstance().r1n_1.k2(color_0);
|
|
239
246
|
var tmp;
|
|
240
247
|
if (!(keywordColor == null)) {
|
|
241
248
|
tmp = keywordColor;
|
|
@@ -246,7 +253,7 @@
|
|
|
246
253
|
try {
|
|
247
254
|
// Inline function 'kotlin.Companion.success' call
|
|
248
255
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
249
|
-
var value = Companion_getInstance_6().
|
|
256
|
+
var value = Companion_getInstance_6().j1o(color_0);
|
|
250
257
|
tmp_0 = _Result___init__impl__xyqfz8(value);
|
|
251
258
|
} catch ($p) {
|
|
252
259
|
var tmp_1;
|
|
@@ -269,7 +276,7 @@
|
|
|
269
276
|
}
|
|
270
277
|
tmp = tmp_2;
|
|
271
278
|
} else {
|
|
272
|
-
var tmp0_safe_receiver = PATTERNS_getInstance().
|
|
279
|
+
var tmp0_safe_receiver = PATTERNS_getInstance().y1n_1.wc(color_0);
|
|
273
280
|
var tmp_4;
|
|
274
281
|
if (tmp0_safe_receiver == null) {
|
|
275
282
|
tmp_4 = null;
|
|
@@ -282,7 +289,7 @@
|
|
|
282
289
|
var tmp2_elvis_lhs = tmp_4;
|
|
283
290
|
var tmp_5;
|
|
284
291
|
if (tmp2_elvis_lhs == null) {
|
|
285
|
-
var tmp1_safe_receiver = PATTERNS_getInstance().
|
|
292
|
+
var tmp1_safe_receiver = PATTERNS_getInstance().z1n_1.wc(color_0);
|
|
286
293
|
var tmp_6;
|
|
287
294
|
if (tmp1_safe_receiver == null) {
|
|
288
295
|
tmp_6 = null;
|
|
@@ -299,7 +306,7 @@
|
|
|
299
306
|
var tmp4_elvis_lhs = tmp_5;
|
|
300
307
|
var tmp_7;
|
|
301
308
|
if (tmp4_elvis_lhs == null) {
|
|
302
|
-
var tmp3_safe_receiver = PATTERNS_getInstance().
|
|
309
|
+
var tmp3_safe_receiver = PATTERNS_getInstance().a1o_1.wc(color_0);
|
|
303
310
|
var tmp_8;
|
|
304
311
|
if (tmp3_safe_receiver == null) {
|
|
305
312
|
tmp_8 = null;
|
|
@@ -316,7 +323,7 @@
|
|
|
316
323
|
var tmp6_elvis_lhs = tmp_7;
|
|
317
324
|
var tmp_9;
|
|
318
325
|
if (tmp6_elvis_lhs == null) {
|
|
319
|
-
var tmp5_safe_receiver = PATTERNS_getInstance().
|
|
326
|
+
var tmp5_safe_receiver = PATTERNS_getInstance().b1o_1.wc(color_0);
|
|
320
327
|
var tmp_10;
|
|
321
328
|
if (tmp5_safe_receiver == null) {
|
|
322
329
|
tmp_10 = null;
|
|
@@ -333,7 +340,7 @@
|
|
|
333
340
|
var tmp8_elvis_lhs = tmp_9;
|
|
334
341
|
var tmp_11;
|
|
335
342
|
if (tmp8_elvis_lhs == null) {
|
|
336
|
-
var tmp7_safe_receiver = PATTERNS_getInstance().
|
|
343
|
+
var tmp7_safe_receiver = PATTERNS_getInstance().c1o_1.wc(color_0);
|
|
337
344
|
var tmp_12;
|
|
338
345
|
if (tmp7_safe_receiver == null) {
|
|
339
346
|
tmp_12 = null;
|
|
@@ -350,7 +357,7 @@
|
|
|
350
357
|
var tmp10_elvis_lhs = tmp_11;
|
|
351
358
|
var tmp_13;
|
|
352
359
|
if (tmp10_elvis_lhs == null) {
|
|
353
|
-
var tmp9_safe_receiver = PATTERNS_getInstance().
|
|
360
|
+
var tmp9_safe_receiver = PATTERNS_getInstance().d1o_1.wc(color_0);
|
|
354
361
|
var tmp_14;
|
|
355
362
|
if (tmp9_safe_receiver == null) {
|
|
356
363
|
tmp_14 = null;
|
|
@@ -367,7 +374,7 @@
|
|
|
367
374
|
var tmp12_elvis_lhs = tmp_13;
|
|
368
375
|
var tmp_15;
|
|
369
376
|
if (tmp12_elvis_lhs == null) {
|
|
370
|
-
var tmp11_safe_receiver = PATTERNS_getInstance().
|
|
377
|
+
var tmp11_safe_receiver = PATTERNS_getInstance().e1o_1.wc(color_0);
|
|
371
378
|
var tmp_16;
|
|
372
379
|
if (tmp11_safe_receiver == null) {
|
|
373
380
|
tmp_16 = null;
|
|
@@ -384,7 +391,7 @@
|
|
|
384
391
|
var tmp14_elvis_lhs = tmp_15;
|
|
385
392
|
var tmp_17;
|
|
386
393
|
if (tmp14_elvis_lhs == null) {
|
|
387
|
-
var tmp13_safe_receiver = PATTERNS_getInstance().
|
|
394
|
+
var tmp13_safe_receiver = PATTERNS_getInstance().f1o_1.wc(color_0);
|
|
388
395
|
var tmp_18;
|
|
389
396
|
if (tmp13_safe_receiver == null) {
|
|
390
397
|
tmp_18 = null;
|
|
@@ -401,7 +408,7 @@
|
|
|
401
408
|
var tmp16_elvis_lhs = tmp_17;
|
|
402
409
|
var tmp_19;
|
|
403
410
|
if (tmp16_elvis_lhs == null) {
|
|
404
|
-
var tmp15_safe_receiver = PATTERNS_getInstance().
|
|
411
|
+
var tmp15_safe_receiver = PATTERNS_getInstance().g1o_1.wc(color_0);
|
|
405
412
|
var tmp_20;
|
|
406
413
|
if (tmp15_safe_receiver == null) {
|
|
407
414
|
tmp_20 = null;
|
|
@@ -418,7 +425,7 @@
|
|
|
418
425
|
var tmp18_elvis_lhs = tmp_19;
|
|
419
426
|
var tmp_21;
|
|
420
427
|
if (tmp18_elvis_lhs == null) {
|
|
421
|
-
var tmp17_safe_receiver = PATTERNS_getInstance().
|
|
428
|
+
var tmp17_safe_receiver = PATTERNS_getInstance().h1o_1.wc(color_0);
|
|
422
429
|
var tmp_22;
|
|
423
430
|
if (tmp17_safe_receiver == null) {
|
|
424
431
|
tmp_22 = null;
|
|
@@ -438,22 +445,22 @@
|
|
|
438
445
|
}
|
|
439
446
|
function PATTERNS() {
|
|
440
447
|
PATTERNS_instance = this;
|
|
441
|
-
this.
|
|
442
|
-
this.
|
|
443
|
-
this.
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
449
|
-
this.
|
|
450
|
-
this.
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
448
|
+
this.s1n_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
449
|
+
this.t1n_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)';
|
|
450
|
+
this.u1n_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
451
|
+
this.v1n_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
452
|
+
this.w1n_1 = '\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
453
|
+
this.x1n_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)';
|
|
454
|
+
this.y1n_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
455
|
+
this.z1n_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
456
|
+
this.a1o_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
457
|
+
this.b1o_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
458
|
+
this.c1o_1 = Regex_init_$Create$('lab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
459
|
+
this.d1o_1 = Regex_init_$Create$('lch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
460
|
+
this.e1o_1 = Regex_init_$Create$('hwb\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
461
|
+
this.f1o_1 = Regex_init_$Create$('oklab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
462
|
+
this.g1o_1 = Regex_init_$Create$('oklch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
463
|
+
this.h1o_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)(?:\\s+(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
457
464
|
}
|
|
458
465
|
var PATTERNS_instance;
|
|
459
466
|
function PATTERNS_getInstance() {
|
|
@@ -462,98 +469,98 @@
|
|
|
462
469
|
return PATTERNS_instance;
|
|
463
470
|
}
|
|
464
471
|
function rgb(match) {
|
|
465
|
-
var r = percentOrNumber(match.
|
|
466
|
-
var g = percentOrNumber(match.
|
|
467
|
-
var b = percentOrNumber(match.
|
|
468
|
-
var a = alpha(match.
|
|
472
|
+
var r = percentOrNumber(match.ud().o(1), Companion_getInstance_6().p1n().o(0).n1n_1);
|
|
473
|
+
var g = percentOrNumber(match.ud().o(2), Companion_getInstance_6().p1n().o(1).n1n_1);
|
|
474
|
+
var b = percentOrNumber(match.ud().o(3), Companion_getInstance_6().p1n().o(2).n1n_1);
|
|
475
|
+
var a = alpha(match.ud().o(4));
|
|
469
476
|
var tmp;
|
|
470
|
-
if (endsWith(match.
|
|
471
|
-
tmp = Companion_getInstance_6().
|
|
477
|
+
if (endsWith(match.ud().o(1), '%')) {
|
|
478
|
+
tmp = Companion_getInstance_6().k1o(r, g, b, a);
|
|
472
479
|
} else {
|
|
473
|
-
tmp = Companion_getInstance_6().
|
|
480
|
+
tmp = Companion_getInstance_6().k1o(r / 255.0, g / 255.0, b / 255.0, a);
|
|
474
481
|
}
|
|
475
482
|
return tmp;
|
|
476
483
|
}
|
|
477
484
|
function hsl(match) {
|
|
478
|
-
var h = hue(match.
|
|
479
|
-
var s = percentOrNumber(match.
|
|
480
|
-
var l = percentOrNumber(match.
|
|
481
|
-
var a = alpha(match.
|
|
485
|
+
var h = hue(match.ud().o(1));
|
|
486
|
+
var s = percentOrNumber(match.ud().o(2), Companion_getInstance_0().l1o_1.o(1).n1n_1);
|
|
487
|
+
var l = percentOrNumber(match.ud().o(3), Companion_getInstance_0().l1o_1.o(2).n1n_1);
|
|
488
|
+
var a = alpha(match.ud().o(4));
|
|
482
489
|
return new HSL(h, s, l, a);
|
|
483
490
|
}
|
|
484
491
|
function lab(match) {
|
|
485
|
-
var l = percentOrNumber(match.
|
|
486
|
-
var a = percentOrNumber(match.
|
|
487
|
-
var b = percentOrNumber(match.
|
|
488
|
-
var alpha_0 = alpha(match.
|
|
489
|
-
return LABColorSpaces_getInstance().
|
|
492
|
+
var l = percentOrNumber(match.ud().o(1), Companion_getInstance_2().p1n().o(0).n1n_1);
|
|
493
|
+
var a = percentOrNumber(match.ud().o(2), Companion_getInstance_2().p1n().o(1).n1n_1);
|
|
494
|
+
var b = percentOrNumber(match.ud().o(3), Companion_getInstance_2().p1n().o(2).n1n_1);
|
|
495
|
+
var alpha_0 = alpha(match.ud().o(4));
|
|
496
|
+
return LABColorSpaces_getInstance().o1o_1.k1o(l, a, b, alpha_0);
|
|
490
497
|
}
|
|
491
498
|
function lch(match) {
|
|
492
|
-
var l = percentOrNumber(match.
|
|
493
|
-
var c = percentOrNumber(match.
|
|
494
|
-
var h = hue(match.
|
|
495
|
-
var a = alpha(match.
|
|
496
|
-
return LCHabColorSpaces_getInstance().
|
|
499
|
+
var l = percentOrNumber(match.ud().o(1), Companion_getInstance_3().p1n().o(0).n1n_1);
|
|
500
|
+
var c = percentOrNumber(match.ud().o(2), Companion_getInstance_3().p1n().o(1).n1n_1);
|
|
501
|
+
var h = hue(match.ud().o(3));
|
|
502
|
+
var a = alpha(match.ud().o(4));
|
|
503
|
+
return LCHabColorSpaces_getInstance().r1o_1.k1o(l, c, h, a);
|
|
497
504
|
}
|
|
498
505
|
function hwb(match) {
|
|
499
|
-
var h = hue(match.
|
|
500
|
-
var w = percentOrNumber(match.
|
|
501
|
-
var b = percentOrNumber(match.
|
|
502
|
-
var a = alpha(match.
|
|
506
|
+
var h = hue(match.ud().o(1));
|
|
507
|
+
var w = percentOrNumber(match.ud().o(2), Companion_getInstance_1().s1o_1.o(1).n1n_1);
|
|
508
|
+
var b = percentOrNumber(match.ud().o(3), Companion_getInstance_1().s1o_1.o(2).n1n_1);
|
|
509
|
+
var a = alpha(match.ud().o(4));
|
|
503
510
|
return new HWB(h, w, b, a);
|
|
504
511
|
}
|
|
505
512
|
function oklab(match) {
|
|
506
|
-
var l = percentOrNumber(match.
|
|
507
|
-
var a = percentOrNumber(match.
|
|
508
|
-
var b = percentOrNumber(match.
|
|
509
|
-
var alpha_0 = alpha(match.
|
|
513
|
+
var l = percentOrNumber(match.ud().o(1), Companion_getInstance_4().t1o_1.o(0).n1n_1);
|
|
514
|
+
var a = percentOrNumber(match.ud().o(2), Companion_getInstance_4().t1o_1.o(1).n1n_1);
|
|
515
|
+
var b = percentOrNumber(match.ud().o(3), Companion_getInstance_4().t1o_1.o(2).n1n_1);
|
|
516
|
+
var alpha_0 = alpha(match.ud().o(4));
|
|
510
517
|
return new Oklab(l, a, b, alpha_0);
|
|
511
518
|
}
|
|
512
519
|
function oklch(match) {
|
|
513
|
-
var l = percentOrNumber(match.
|
|
514
|
-
var c = percentOrNumber(match.
|
|
515
|
-
var h = hue(match.
|
|
516
|
-
var a = alpha(match.
|
|
520
|
+
var l = percentOrNumber(match.ud().o(1), Companion_getInstance_5().u1o_1.o(0).n1n_1);
|
|
521
|
+
var c = percentOrNumber(match.ud().o(2), Companion_getInstance_5().u1o_1.o(1).n1n_1);
|
|
522
|
+
var h = hue(match.ud().o(3));
|
|
523
|
+
var a = alpha(match.ud().o(4));
|
|
517
524
|
return new Oklch(l, c, h, a);
|
|
518
525
|
}
|
|
519
526
|
function color(match, customColorSpaces) {
|
|
520
|
-
var name = match.
|
|
527
|
+
var name = match.ud().o(1);
|
|
521
528
|
var tmp;
|
|
522
529
|
switch (name) {
|
|
523
530
|
case 'srgb':
|
|
524
531
|
tmp = SRGB_getInstance();
|
|
525
532
|
break;
|
|
526
533
|
case 'srgb-linear':
|
|
527
|
-
tmp = RGBColorSpaces_getInstance().
|
|
534
|
+
tmp = RGBColorSpaces_getInstance().w1o_1;
|
|
528
535
|
break;
|
|
529
536
|
case 'display-p3':
|
|
530
|
-
tmp = RGBColorSpaces_getInstance().
|
|
537
|
+
tmp = RGBColorSpaces_getInstance().f1p_1;
|
|
531
538
|
break;
|
|
532
539
|
case 'a98-rgb':
|
|
533
|
-
tmp = RGBColorSpaces_getInstance().
|
|
540
|
+
tmp = RGBColorSpaces_getInstance().b1p_1;
|
|
534
541
|
break;
|
|
535
542
|
case 'prophoto-rgb':
|
|
536
|
-
tmp = RGBColorSpaces_getInstance().
|
|
543
|
+
tmp = RGBColorSpaces_getInstance().g1p_1;
|
|
537
544
|
break;
|
|
538
545
|
case 'rec2020':
|
|
539
|
-
tmp = RGBColorSpaces_getInstance().
|
|
546
|
+
tmp = RGBColorSpaces_getInstance().c1p_1;
|
|
540
547
|
break;
|
|
541
548
|
case 'xyz':
|
|
542
549
|
case 'xyz-d50':
|
|
543
|
-
tmp = XYZColorSpaces_getInstance().
|
|
550
|
+
tmp = XYZColorSpaces_getInstance().i1p_1;
|
|
544
551
|
break;
|
|
545
552
|
case 'xyz-d65':
|
|
546
|
-
tmp = XYZColorSpaces_getInstance().
|
|
553
|
+
tmp = XYZColorSpaces_getInstance().h1p_1;
|
|
547
554
|
break;
|
|
548
555
|
default:
|
|
549
556
|
var tmp$ret$1;
|
|
550
557
|
$l$block: {
|
|
551
558
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
552
|
-
var tmp0_iterator = customColorSpaces.
|
|
553
|
-
while (tmp0_iterator.
|
|
554
|
-
var element = tmp0_iterator.
|
|
559
|
+
var tmp0_iterator = customColorSpaces.n2().j();
|
|
560
|
+
while (tmp0_iterator.k()) {
|
|
561
|
+
var element = tmp0_iterator.l();
|
|
555
562
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
556
|
-
if (element.
|
|
563
|
+
if (element.g2() === name) {
|
|
557
564
|
tmp$ret$1 = element;
|
|
558
565
|
break $l$block;
|
|
559
566
|
}
|
|
@@ -562,7 +569,7 @@
|
|
|
562
569
|
}
|
|
563
570
|
|
|
564
571
|
var tmp0_safe_receiver = tmp$ret$1;
|
|
565
|
-
tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
572
|
+
tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h2();
|
|
566
573
|
break;
|
|
567
574
|
}
|
|
568
575
|
var tmp1_elvis_lhs = tmp;
|
|
@@ -575,31 +582,32 @@
|
|
|
575
582
|
var space = tmp_0;
|
|
576
583
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
577
584
|
// Inline function 'kotlin.text.split' call
|
|
578
|
-
var this_0 = match.
|
|
579
|
-
var this_1 = Regex_init_$Create$('\\s+').
|
|
585
|
+
var this_0 = match.ud().o(2);
|
|
586
|
+
var this_1 = Regex_init_$Create$('\\s+').cd(this_0, 0);
|
|
580
587
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
581
588
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
582
589
|
var index = 0;
|
|
583
|
-
var tmp0_iterator_0 = this_1.
|
|
584
|
-
while (tmp0_iterator_0.
|
|
585
|
-
var item = tmp0_iterator_0.
|
|
590
|
+
var tmp0_iterator_0 = this_1.j();
|
|
591
|
+
while (tmp0_iterator_0.k()) {
|
|
592
|
+
var item = tmp0_iterator_0.l();
|
|
586
593
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
587
594
|
var tmp1 = index;
|
|
588
595
|
index = tmp1 + 1 | 0;
|
|
589
596
|
var i = checkIndexOverflow(tmp1);
|
|
590
|
-
var tmp$ret$3 = percentOrNumber(item, space.
|
|
591
|
-
destination.
|
|
597
|
+
var tmp$ret$3 = percentOrNumber(item, space.p1n().o(i).n1n_1);
|
|
598
|
+
destination.e(tmp$ret$3);
|
|
592
599
|
}
|
|
593
600
|
var values = destination;
|
|
594
601
|
var tmp_1 = 0;
|
|
595
|
-
var tmp_2 = space.
|
|
602
|
+
var tmp_2 = space.p1n().m();
|
|
596
603
|
var tmp_3 = new Float32Array(tmp_2);
|
|
597
604
|
while (tmp_1 < tmp_2) {
|
|
598
605
|
var tmp_4 = tmp_1;
|
|
599
606
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
607
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
600
608
|
var tmp_5;
|
|
601
|
-
if (
|
|
602
|
-
tmp_5 = values.
|
|
609
|
+
if (0 <= tmp_4 ? tmp_4 < values.m() : false) {
|
|
610
|
+
tmp_5 = values.o(tmp_4);
|
|
603
611
|
} else {
|
|
604
612
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
605
613
|
tmp_5 = 0.0;
|
|
@@ -608,8 +616,8 @@
|
|
|
608
616
|
tmp_1 = tmp_1 + 1 | 0;
|
|
609
617
|
}
|
|
610
618
|
var components = tmp_3;
|
|
611
|
-
components[
|
|
612
|
-
return space.
|
|
619
|
+
components[get_lastIndex(components)] = alpha(match.ud().o(3));
|
|
620
|
+
return space.q1n(components);
|
|
613
621
|
}
|
|
614
622
|
function percentOrNumber(str, max) {
|
|
615
623
|
var tmp;
|
|
@@ -736,11 +744,11 @@
|
|
|
736
744
|
var tmp$ret$1;
|
|
737
745
|
$l$block: {
|
|
738
746
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
739
|
-
var tmp0_iterator = customColorSpaces.
|
|
740
|
-
while (tmp0_iterator.
|
|
741
|
-
var element = tmp0_iterator.
|
|
747
|
+
var tmp0_iterator = customColorSpaces.n2().j();
|
|
748
|
+
while (tmp0_iterator.k()) {
|
|
749
|
+
var element = tmp0_iterator.l();
|
|
742
750
|
// Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
|
|
743
|
-
if (equals(element.
|
|
751
|
+
if (equals(element.h2(), _this__u8e3s4.h1m())) {
|
|
744
752
|
tmp$ret$1 = element;
|
|
745
753
|
break $l$block;
|
|
746
754
|
}
|
|
@@ -748,7 +756,7 @@
|
|
|
748
756
|
tmp$ret$1 = null;
|
|
749
757
|
}
|
|
750
758
|
var tmp0_safe_receiver = tmp$ret$1;
|
|
751
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
759
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g2();
|
|
752
760
|
var tmp;
|
|
753
761
|
if (tmp1_safe_receiver == null) {
|
|
754
762
|
tmp = null;
|
|
@@ -763,17 +771,17 @@
|
|
|
763
771
|
if (tmp5_elvis_lhs == null) {
|
|
764
772
|
var tmp_1;
|
|
765
773
|
if (_this__u8e3s4 instanceof RGB) {
|
|
766
|
-
var tmp3_subject = _this__u8e3s4.
|
|
767
|
-
tmp_1 = equals(tmp3_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().
|
|
774
|
+
var tmp3_subject = _this__u8e3s4.o1m_1;
|
|
775
|
+
tmp_1 = equals(tmp3_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().f1p_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().b1p_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().g1p_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().c1p_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().w1o_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
768
776
|
} else {
|
|
769
777
|
if (_this__u8e3s4 instanceof HSL) {
|
|
770
778
|
tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
771
779
|
} else {
|
|
772
780
|
if (_this__u8e3s4 instanceof LAB) {
|
|
773
|
-
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
781
|
+
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().o1o_1), alphaPercent, renderAlpha);
|
|
774
782
|
} else {
|
|
775
783
|
if (_this__u8e3s4 instanceof LCHab) {
|
|
776
|
-
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
784
|
+
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().r1o_1), hueUnit, alphaPercent, renderAlpha);
|
|
777
785
|
} else {
|
|
778
786
|
if (_this__u8e3s4 instanceof HWB) {
|
|
779
787
|
tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
@@ -785,7 +793,7 @@
|
|
|
785
793
|
tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
786
794
|
} else {
|
|
787
795
|
if (_this__u8e3s4 instanceof XYZ) {
|
|
788
|
-
tmp_1 = _this__u8e3s4.
|
|
796
|
+
tmp_1 = _this__u8e3s4.v1m_1.o1n().equals(Illuminant_getInstance().p1p_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.j1p(XYZColorSpaces_getInstance().i1p_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
789
797
|
} else {
|
|
790
798
|
tmp_1 = null;
|
|
791
799
|
}
|
|
@@ -809,40 +817,40 @@
|
|
|
809
817
|
var this_0 = StringBuilder_init_$Create$();
|
|
810
818
|
// Inline function 'kotlin.contracts.contract' call
|
|
811
819
|
// Inline function 'com.github.ajalt.colormath.renderFn.<anonymous>' call
|
|
812
|
-
this_0.
|
|
813
|
-
var tmp = dropLast_0(_this__u8e3s4.
|
|
820
|
+
this_0.r8('color(').r8(name).r8(' ');
|
|
821
|
+
var tmp = dropLast_0(_this__u8e3s4.b6(), 1);
|
|
814
822
|
joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderFn$lambda(unitsPercent));
|
|
815
|
-
this_0.
|
|
816
|
-
this_0.
|
|
823
|
+
this_0.r8(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
824
|
+
this_0.r8(')');
|
|
817
825
|
return this_0.toString();
|
|
818
826
|
}
|
|
819
827
|
function get_dashName(_this__u8e3s4) {
|
|
820
828
|
// Inline function 'kotlin.text.lowercase' call
|
|
821
829
|
// Inline function 'kotlin.text.replace' call
|
|
822
|
-
var this_0 = _this__u8e3s4.
|
|
830
|
+
var this_0 = _this__u8e3s4.h1m().q2();
|
|
823
831
|
// Inline function 'kotlin.js.asDynamic' call
|
|
824
|
-
return '--' + Regex_init_$Create$('\\W').
|
|
832
|
+
return '--' + Regex_init_$Create$('\\W').xc(this_0, '-').toLowerCase();
|
|
825
833
|
}
|
|
826
834
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
827
|
-
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
835
|
+
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.k1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.s1p())), rgbPercent ? render(_this__u8e3s4.l1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.s1p())), rgbPercent ? render(_this__u8e3s4.m1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.s1p()))], alphaPercent, renderAlpha, commas);
|
|
828
836
|
}
|
|
829
837
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
830
|
-
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
838
|
+
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.u1p_1, true), render(_this__u8e3s4.v1p_1, true)], alphaPercent, renderAlpha, commas);
|
|
831
839
|
}
|
|
832
840
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
833
|
-
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
841
|
+
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.x1m_1 / 100, true), render(_this__u8e3s4.y1m_1), render(_this__u8e3s4.z1m_1)], alphaPercent, renderAlpha);
|
|
834
842
|
}
|
|
835
843
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
836
|
-
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
844
|
+
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.x1p_1 / 100, true), render(_this__u8e3s4.y1p_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
837
845
|
}
|
|
838
846
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
839
|
-
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
847
|
+
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.d1q_1, true), render(_this__u8e3s4.e1q_1, true)], alphaPercent, renderAlpha);
|
|
840
848
|
}
|
|
841
849
|
function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
842
|
-
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.
|
|
850
|
+
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.f1n_1, true), render(_this__u8e3s4.g1n_1), render(_this__u8e3s4.h1n_1)], alphaPercent, renderAlpha);
|
|
843
851
|
}
|
|
844
852
|
function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
845
|
-
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.
|
|
853
|
+
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.g1q_1, true), render(_this__u8e3s4.h1q_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
846
854
|
}
|
|
847
855
|
function render(_this__u8e3s4, percent, precision) {
|
|
848
856
|
percent = percent === VOID ? false : percent;
|
|
@@ -858,7 +866,7 @@
|
|
|
858
866
|
// Inline function 'kotlin.math.absoluteValue' call
|
|
859
867
|
var abs = Math.abs(_this__u8e3s4);
|
|
860
868
|
var i = numberToInt(abs);
|
|
861
|
-
var sgn = _this__u8e3s4 < 0
|
|
869
|
+
var sgn = _this__u8e3s4 < 0 ? '-' : '';
|
|
862
870
|
var tmp_0 = abs - i;
|
|
863
871
|
// Inline function 'kotlin.math.pow' call
|
|
864
872
|
var tmp$ret$2 = Math.pow(10.0, precision);
|
|
@@ -869,8 +877,8 @@
|
|
|
869
877
|
}
|
|
870
878
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
871
879
|
var tmp;
|
|
872
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance())
|
|
873
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
880
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.g1m()) && !(_this__u8e3s4.g1m() === 1.0))) {
|
|
881
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.g1m()), alphaPercent);
|
|
874
882
|
} else {
|
|
875
883
|
tmp = '';
|
|
876
884
|
}
|
|
@@ -885,24 +893,24 @@
|
|
|
885
893
|
// Inline function 'kotlin.contracts.contract' call
|
|
886
894
|
// Inline function 'com.github.ajalt.colormath.renderColorFn.<anonymous>' call
|
|
887
895
|
var sep = commas ? ', ' : ' ';
|
|
888
|
-
this_0.
|
|
896
|
+
this_0.r8(name).r8('(');
|
|
889
897
|
joinTo_0(components, this_0, sep);
|
|
890
|
-
this_0.
|
|
891
|
-
this_0.
|
|
898
|
+
this_0.r8(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
899
|
+
this_0.r8(')');
|
|
892
900
|
return this_0.toString();
|
|
893
901
|
}
|
|
894
902
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
895
903
|
var tmp;
|
|
896
|
-
if (isNaN_0(_this__u8e3s4.
|
|
904
|
+
if (isNaN_0(_this__u8e3s4.k1q())) {
|
|
897
905
|
tmp = 'none';
|
|
898
906
|
} else {
|
|
899
907
|
var tmp_0;
|
|
900
|
-
switch (hueUnit.
|
|
908
|
+
switch (hueUnit.p2_1) {
|
|
901
909
|
case 0:
|
|
902
|
-
tmp_0 = render(_this__u8e3s4.
|
|
910
|
+
tmp_0 = render(_this__u8e3s4.k1q());
|
|
903
911
|
break;
|
|
904
912
|
case 1:
|
|
905
|
-
tmp_0 = render(_this__u8e3s4.
|
|
913
|
+
tmp_0 = render(_this__u8e3s4.k1q()) + 'deg';
|
|
906
914
|
break;
|
|
907
915
|
case 2:
|
|
908
916
|
tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -939,27 +947,27 @@
|
|
|
939
947
|
return AngleUnit_AUTO_instance;
|
|
940
948
|
}
|
|
941
949
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
942
|
-
return isNaN_0(_this__u8e3s4.
|
|
950
|
+
return isNaN_0(_this__u8e3s4.k1q()) ? numberToDouble(whenNaN) : _this__u8e3s4.k1q();
|
|
943
951
|
}
|
|
944
952
|
function hueAsRad(_this__u8e3s4) {
|
|
945
|
-
return degToRad(_this__u8e3s4.
|
|
953
|
+
return degToRad(_this__u8e3s4.k1q());
|
|
946
954
|
}
|
|
947
955
|
function hueAsGrad(_this__u8e3s4) {
|
|
948
|
-
return degToGrad(_this__u8e3s4.
|
|
956
|
+
return degToGrad(_this__u8e3s4.k1q());
|
|
949
957
|
}
|
|
950
958
|
function hueAsTurns(_this__u8e3s4) {
|
|
951
|
-
return degToTurns(_this__u8e3s4.
|
|
959
|
+
return degToTurns(_this__u8e3s4.k1q());
|
|
952
960
|
}
|
|
953
961
|
function WhitePoint(name, chromaticity) {
|
|
954
|
-
this.
|
|
955
|
-
this.
|
|
962
|
+
this.l1q_1 = name;
|
|
963
|
+
this.m1q_1 = chromaticity;
|
|
956
964
|
}
|
|
957
965
|
protoOf(WhitePoint).toString = function () {
|
|
958
|
-
return this.
|
|
966
|
+
return this.l1q_1;
|
|
959
967
|
};
|
|
960
968
|
protoOf(WhitePoint).hashCode = function () {
|
|
961
|
-
var result = getStringHashCode(this.
|
|
962
|
-
result = imul(result, 31) + this.
|
|
969
|
+
var result = getStringHashCode(this.l1q_1);
|
|
970
|
+
result = imul(result, 31) + this.m1q_1.hashCode() | 0;
|
|
963
971
|
return result;
|
|
964
972
|
};
|
|
965
973
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -968,22 +976,22 @@
|
|
|
968
976
|
if (!(other instanceof WhitePoint))
|
|
969
977
|
return false;
|
|
970
978
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
971
|
-
if (!(this.
|
|
979
|
+
if (!(this.l1q_1 === tmp0_other_with_cast.l1q_1))
|
|
972
980
|
return false;
|
|
973
|
-
if (!this.
|
|
981
|
+
if (!this.m1q_1.equals(tmp0_other_with_cast.m1q_1))
|
|
974
982
|
return false;
|
|
975
983
|
return true;
|
|
976
984
|
};
|
|
977
985
|
function Illuminant() {
|
|
978
986
|
Illuminant_instance = this;
|
|
979
|
-
this.
|
|
980
|
-
this.
|
|
981
|
-
this.
|
|
982
|
-
this.
|
|
983
|
-
this.
|
|
984
|
-
this.
|
|
985
|
-
this.
|
|
986
|
-
this.
|
|
987
|
+
this.k1p_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
988
|
+
this.l1p_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
989
|
+
this.m1p_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
990
|
+
this.n1p_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
991
|
+
this.o1p_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
992
|
+
this.p1p_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
993
|
+
this.q1p_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
994
|
+
this.r1p_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
987
995
|
}
|
|
988
996
|
var Illuminant_instance;
|
|
989
997
|
function Illuminant_getInstance() {
|
|
@@ -1012,10 +1020,10 @@
|
|
|
1012
1020
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1013
1021
|
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
|
|
1014
1022
|
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
|
|
1015
|
-
this_0.
|
|
1023
|
+
this_0.e(tmp$ret$0);
|
|
1016
1024
|
}
|
|
1017
|
-
this_0.
|
|
1018
|
-
return this_0.
|
|
1025
|
+
this_0.e(get_alphaInfo());
|
|
1026
|
+
return this_0.p3();
|
|
1019
1027
|
}
|
|
1020
1028
|
function threeComponentInfo(n1, l1, r1, n2, l2, r2, n3, l3, r3) {
|
|
1021
1029
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -1037,10 +1045,10 @@
|
|
|
1037
1045
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1038
1046
|
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
|
|
1039
1047
|
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), item === _Char___init__impl__6a9atx(72), item === _Char___init__impl__6a9atx(72) ? 0.0 : l, item === _Char___init__impl__6a9atx(72) ? 360.0 : r);
|
|
1040
|
-
this_0.
|
|
1048
|
+
this_0.e(tmp$ret$0);
|
|
1041
1049
|
}
|
|
1042
|
-
this_0.
|
|
1043
|
-
return this_0.
|
|
1050
|
+
this_0.e(get_alphaInfo());
|
|
1051
|
+
return this_0.p3();
|
|
1044
1052
|
}
|
|
1045
1053
|
function componentInfoList(c) {
|
|
1046
1054
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -1085,7 +1093,7 @@
|
|
|
1085
1093
|
}
|
|
1086
1094
|
function CssColors() {
|
|
1087
1095
|
CssColors_instance = this;
|
|
1088
|
-
this.
|
|
1096
|
+
this.r1n_1 = mapOf([to('black', Companion_getInstance_6().n1q(0, 0, 0)), to('silver', Companion_getInstance_6().n1q(192, 192, 192)), to('gray', Companion_getInstance_6().n1q(128, 128, 128)), to('white', Companion_getInstance_6().n1q(255, 255, 255)), to('maroon', Companion_getInstance_6().n1q(128, 0, 0)), to('red', Companion_getInstance_6().n1q(255, 0, 0)), to('purple', Companion_getInstance_6().n1q(128, 0, 128)), to('fuchsia', Companion_getInstance_6().n1q(255, 0, 255)), to('green', Companion_getInstance_6().n1q(0, 128, 0)), to('lime', Companion_getInstance_6().n1q(0, 255, 0)), to('olive', Companion_getInstance_6().n1q(128, 128, 0)), to('yellow', Companion_getInstance_6().n1q(255, 255, 0)), to('navy', Companion_getInstance_6().n1q(0, 0, 128)), to('blue', Companion_getInstance_6().n1q(0, 0, 255)), to('teal', Companion_getInstance_6().n1q(0, 128, 128)), to('aqua', Companion_getInstance_6().n1q(0, 255, 255)), to('orange', Companion_getInstance_6().n1q(255, 165, 0)), to('aliceblue', Companion_getInstance_6().n1q(240, 248, 255)), to('antiquewhite', Companion_getInstance_6().n1q(250, 235, 215)), to('aquamarine', Companion_getInstance_6().n1q(127, 255, 212)), to('azure', Companion_getInstance_6().n1q(240, 255, 255)), to('beige', Companion_getInstance_6().n1q(245, 245, 220)), to('bisque', Companion_getInstance_6().n1q(255, 228, 196)), to('blanchedalmond', Companion_getInstance_6().n1q(255, 235, 205)), to('blueviolet', Companion_getInstance_6().n1q(138, 43, 226)), to('brown', Companion_getInstance_6().n1q(165, 42, 42)), to('burlywood', Companion_getInstance_6().n1q(222, 184, 135)), to('cadetblue', Companion_getInstance_6().n1q(95, 158, 160)), to('chartreuse', Companion_getInstance_6().n1q(127, 255, 0)), to('chocolate', Companion_getInstance_6().n1q(210, 105, 30)), to('coral', Companion_getInstance_6().n1q(255, 127, 80)), to('cornflowerblue', Companion_getInstance_6().n1q(100, 149, 237)), to('cornsilk', Companion_getInstance_6().n1q(255, 248, 220)), to('crimson', Companion_getInstance_6().n1q(220, 20, 60)), to('cyan', Companion_getInstance_6().n1q(0, 255, 255)), to('darkblue', Companion_getInstance_6().n1q(0, 0, 139)), to('darkcyan', Companion_getInstance_6().n1q(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_6().n1q(184, 134, 11)), to('darkgray', Companion_getInstance_6().n1q(169, 169, 169)), to('darkgreen', Companion_getInstance_6().n1q(0, 100, 0)), to('darkgrey', Companion_getInstance_6().n1q(169, 169, 169)), to('darkkhaki', Companion_getInstance_6().n1q(189, 183, 107)), to('darkmagenta', Companion_getInstance_6().n1q(139, 0, 139)), to('darkolivegreen', Companion_getInstance_6().n1q(85, 107, 47)), to('darkorange', Companion_getInstance_6().n1q(255, 140, 0)), to('darkorchid', Companion_getInstance_6().n1q(153, 50, 204)), to('darkred', Companion_getInstance_6().n1q(139, 0, 0)), to('darksalmon', Companion_getInstance_6().n1q(233, 150, 122)), to('darkseagreen', Companion_getInstance_6().n1q(143, 188, 143)), to('darkslateblue', Companion_getInstance_6().n1q(72, 61, 139)), to('darkslategray', Companion_getInstance_6().n1q(47, 79, 79)), to('darkslategrey', Companion_getInstance_6().n1q(47, 79, 79)), to('darkturquoise', Companion_getInstance_6().n1q(0, 206, 209)), to('darkviolet', Companion_getInstance_6().n1q(148, 0, 211)), to('deeppink', Companion_getInstance_6().n1q(255, 20, 147)), to('deepskyblue', Companion_getInstance_6().n1q(0, 191, 255)), to('dimgray', Companion_getInstance_6().n1q(105, 105, 105)), to('dimgrey', Companion_getInstance_6().n1q(105, 105, 105)), to('dodgerblue', Companion_getInstance_6().n1q(30, 144, 255)), to('firebrick', Companion_getInstance_6().n1q(178, 34, 34)), to('floralwhite', Companion_getInstance_6().n1q(255, 250, 240)), to('forestgreen', Companion_getInstance_6().n1q(34, 139, 34)), to('gainsboro', Companion_getInstance_6().n1q(220, 220, 220)), to('ghostwhite', Companion_getInstance_6().n1q(248, 248, 255)), to('gold', Companion_getInstance_6().n1q(255, 215, 0)), to('goldenrod', Companion_getInstance_6().n1q(218, 165, 32)), to('greenyellow', Companion_getInstance_6().n1q(173, 255, 47)), to('grey', Companion_getInstance_6().n1q(128, 128, 128)), to('honeydew', Companion_getInstance_6().n1q(240, 255, 240)), to('hotpink', Companion_getInstance_6().n1q(255, 105, 180)), to('indianred', Companion_getInstance_6().n1q(205, 92, 92)), to('indigo', Companion_getInstance_6().n1q(75, 0, 130)), to('ivory', Companion_getInstance_6().n1q(255, 255, 240)), to('khaki', Companion_getInstance_6().n1q(240, 230, 140)), to('lavender', Companion_getInstance_6().n1q(230, 230, 250)), to('lavenderblush', Companion_getInstance_6().n1q(255, 240, 245)), to('lawngreen', Companion_getInstance_6().n1q(124, 252, 0)), to('lemonchiffon', Companion_getInstance_6().n1q(255, 250, 205)), to('lightblue', Companion_getInstance_6().n1q(173, 216, 230)), to('lightcoral', Companion_getInstance_6().n1q(240, 128, 128)), to('lightcyan', Companion_getInstance_6().n1q(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_6().n1q(250, 250, 210)), to('lightgray', Companion_getInstance_6().n1q(211, 211, 211)), to('lightgreen', Companion_getInstance_6().n1q(144, 238, 144)), to('lightgrey', Companion_getInstance_6().n1q(211, 211, 211)), to('lightpink', Companion_getInstance_6().n1q(255, 182, 193)), to('lightsalmon', Companion_getInstance_6().n1q(255, 160, 122)), to('lightseagreen', Companion_getInstance_6().n1q(32, 178, 170)), to('lightskyblue', Companion_getInstance_6().n1q(135, 206, 250)), to('lightslategray', Companion_getInstance_6().n1q(119, 136, 153)), to('lightslategrey', Companion_getInstance_6().n1q(119, 136, 153)), to('lightsteelblue', Companion_getInstance_6().n1q(176, 196, 222)), to('lightyellow', Companion_getInstance_6().n1q(255, 255, 224)), to('limegreen', Companion_getInstance_6().n1q(50, 205, 50)), to('linen', Companion_getInstance_6().n1q(250, 240, 230)), to('magenta', Companion_getInstance_6().n1q(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_6().n1q(102, 205, 170)), to('mediumblue', Companion_getInstance_6().n1q(0, 0, 205)), to('mediumorchid', Companion_getInstance_6().n1q(186, 85, 211)), to('mediumpurple', Companion_getInstance_6().n1q(147, 112, 219)), to('mediumseagreen', Companion_getInstance_6().n1q(60, 179, 113)), to('mediumslateblue', Companion_getInstance_6().n1q(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_6().n1q(0, 250, 154)), to('mediumturquoise', Companion_getInstance_6().n1q(72, 209, 204)), to('mediumvioletred', Companion_getInstance_6().n1q(199, 21, 133)), to('midnightblue', Companion_getInstance_6().n1q(25, 25, 112)), to('mintcream', Companion_getInstance_6().n1q(245, 255, 250)), to('mistyrose', Companion_getInstance_6().n1q(255, 228, 225)), to('moccasin', Companion_getInstance_6().n1q(255, 228, 181)), to('navajowhite', Companion_getInstance_6().n1q(255, 222, 173)), to('oldlace', Companion_getInstance_6().n1q(253, 245, 230)), to('olivedrab', Companion_getInstance_6().n1q(107, 142, 35)), to('orangered', Companion_getInstance_6().n1q(255, 69, 0)), to('orchid', Companion_getInstance_6().n1q(218, 112, 214)), to('palegoldenrod', Companion_getInstance_6().n1q(238, 232, 170)), to('palegreen', Companion_getInstance_6().n1q(152, 251, 152)), to('paleturquoise', Companion_getInstance_6().n1q(175, 238, 238)), to('palevioletred', Companion_getInstance_6().n1q(219, 112, 147)), to('papayawhip', Companion_getInstance_6().n1q(255, 239, 213)), to('peachpuff', Companion_getInstance_6().n1q(255, 218, 185)), to('peru', Companion_getInstance_6().n1q(205, 133, 63)), to('pink', Companion_getInstance_6().n1q(255, 192, 203)), to('plum', Companion_getInstance_6().n1q(221, 160, 221)), to('powderblue', Companion_getInstance_6().n1q(176, 224, 230)), to('rosybrown', Companion_getInstance_6().n1q(188, 143, 143)), to('royalblue', Companion_getInstance_6().n1q(65, 105, 225)), to('saddlebrown', Companion_getInstance_6().n1q(139, 69, 19)), to('salmon', Companion_getInstance_6().n1q(250, 128, 114)), to('sandybrown', Companion_getInstance_6().n1q(244, 164, 96)), to('seagreen', Companion_getInstance_6().n1q(46, 139, 87)), to('seashell', Companion_getInstance_6().n1q(255, 245, 238)), to('sienna', Companion_getInstance_6().n1q(160, 82, 45)), to('skyblue', Companion_getInstance_6().n1q(135, 206, 235)), to('slateblue', Companion_getInstance_6().n1q(106, 90, 205)), to('slategray', Companion_getInstance_6().n1q(112, 128, 144)), to('slategrey', Companion_getInstance_6().n1q(112, 128, 144)), to('snow', Companion_getInstance_6().n1q(255, 250, 250)), to('springgreen', Companion_getInstance_6().n1q(0, 255, 127)), to('steelblue', Companion_getInstance_6().n1q(70, 130, 180)), to('tan', Companion_getInstance_6().n1q(210, 180, 140)), to('thistle', Companion_getInstance_6().n1q(216, 191, 216)), to('tomato', Companion_getInstance_6().n1q(255, 99, 71)), to('turquoise', Companion_getInstance_6().n1q(64, 224, 208)), to('violet', Companion_getInstance_6().n1q(238, 130, 238)), to('wheat', Companion_getInstance_6().n1q(245, 222, 179)), to('whitesmoke', Companion_getInstance_6().n1q(245, 245, 245)), to('yellowgreen', Companion_getInstance_6().n1q(154, 205, 50)), to('rebeccapurple', Companion_getInstance_6().n1q(102, 51, 153)), to('transparent', Companion_getInstance_6().o1q(0, 0, 0, 0))]);
|
|
1089
1097
|
}
|
|
1090
1098
|
var CssColors_instance;
|
|
1091
1099
|
function CssColors_getInstance() {
|
|
@@ -1162,6 +1170,32 @@
|
|
|
1162
1170
|
function Matrix__set_impl_s2l54c_0($this, x, y, value) {
|
|
1163
1171
|
return Matrix__set_impl_s2l54c($this, x, y, value);
|
|
1164
1172
|
}
|
|
1173
|
+
function Matrix__toString_impl_l0abk0($this) {
|
|
1174
|
+
return trimMargin('Mat3(\n | ' + Matrix__get_impl_xogbpk($this, 0, 0) + ', ' + Matrix__get_impl_xogbpk($this, 1, 0) + ', ' + Matrix__get_impl_xogbpk($this, 2, 0) + ', \n | ' + Matrix__get_impl_xogbpk($this, 0, 1) + ', ' + Matrix__get_impl_xogbpk($this, 1, 1) + ', ' + Matrix__get_impl_xogbpk($this, 2, 1) + ', \n | ' + Matrix__get_impl_xogbpk($this, 0, 2) + ', ' + Matrix__get_impl_xogbpk($this, 1, 2) + ', ' + Matrix__get_impl_xogbpk($this, 2, 2) + ', \n |)\n ');
|
|
1175
|
+
}
|
|
1176
|
+
function Matrix__hashCode_impl_s9ntm9($this) {
|
|
1177
|
+
return hashCode($this);
|
|
1178
|
+
}
|
|
1179
|
+
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
1180
|
+
if (!(other instanceof Matrix))
|
|
1181
|
+
return false;
|
|
1182
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.p1q_1 : THROW_CCE();
|
|
1183
|
+
if (!equals($this, tmp0_other_with_cast))
|
|
1184
|
+
return false;
|
|
1185
|
+
return true;
|
|
1186
|
+
}
|
|
1187
|
+
function Matrix(rowMajor) {
|
|
1188
|
+
this.p1q_1 = rowMajor;
|
|
1189
|
+
}
|
|
1190
|
+
protoOf(Matrix).toString = function () {
|
|
1191
|
+
return Matrix__toString_impl_l0abk0(this.p1q_1);
|
|
1192
|
+
};
|
|
1193
|
+
protoOf(Matrix).hashCode = function () {
|
|
1194
|
+
return Matrix__hashCode_impl_s9ntm9(this.p1q_1);
|
|
1195
|
+
};
|
|
1196
|
+
protoOf(Matrix).equals = function (other) {
|
|
1197
|
+
return Matrix__equals_impl_g5p8p9(this.p1q_1, other);
|
|
1198
|
+
};
|
|
1165
1199
|
function inverse(_this__u8e3s4, inPlace) {
|
|
1166
1200
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
1167
1201
|
var a = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0);
|
|
@@ -1231,28 +1265,31 @@
|
|
|
1231
1265
|
}
|
|
1232
1266
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
1233
1267
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1234
|
-
|
|
1268
|
+
var p0 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0) * v2;
|
|
1269
|
+
var p1 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1) * v2;
|
|
1270
|
+
var p2 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2) * v2;
|
|
1271
|
+
return _Vector___init__impl__y7x4qq_0(p0, p1, p2);
|
|
1235
1272
|
}
|
|
1236
1273
|
function dot$f($this_dot, $other, x, y) {
|
|
1237
1274
|
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);
|
|
1238
1275
|
}
|
|
1239
1276
|
function Companion_0() {
|
|
1240
1277
|
Companion_instance_1 = this;
|
|
1241
|
-
this.
|
|
1278
|
+
this.l1o_1 = polarComponentInfo('HSL', 0.0, 1.0);
|
|
1242
1279
|
}
|
|
1243
|
-
protoOf(Companion_0).
|
|
1280
|
+
protoOf(Companion_0).q2 = function () {
|
|
1244
1281
|
return 'HSL';
|
|
1245
1282
|
};
|
|
1246
|
-
protoOf(Companion_0).
|
|
1247
|
-
return this.
|
|
1283
|
+
protoOf(Companion_0).p1n = function () {
|
|
1284
|
+
return this.l1o_1;
|
|
1248
1285
|
};
|
|
1249
|
-
protoOf(Companion_0).
|
|
1250
|
-
return color.
|
|
1286
|
+
protoOf(Companion_0).j1n = function (color) {
|
|
1287
|
+
return color.j1m();
|
|
1251
1288
|
};
|
|
1252
|
-
protoOf(Companion_0).
|
|
1289
|
+
protoOf(Companion_0).q1n = function (components) {
|
|
1253
1290
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1254
1291
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1255
|
-
var size = this.
|
|
1292
|
+
var size = this.p1n().m();
|
|
1256
1293
|
// Inline function 'kotlin.require' call
|
|
1257
1294
|
var containsLower = size - 1 | 0;
|
|
1258
1295
|
var containsArg = components.length;
|
|
@@ -1263,19 +1300,20 @@
|
|
|
1263
1300
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1264
1301
|
}
|
|
1265
1302
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1266
|
-
var
|
|
1267
|
-
var
|
|
1268
|
-
var
|
|
1303
|
+
var p0 = components[0];
|
|
1304
|
+
var p1 = components[1];
|
|
1305
|
+
var p2 = components[2];
|
|
1269
1306
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1307
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1308
|
+
var tmp;
|
|
1309
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1310
|
+
tmp = components[3];
|
|
1273
1311
|
} else {
|
|
1274
1312
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1275
|
-
|
|
1313
|
+
tmp = 1.0;
|
|
1276
1314
|
}
|
|
1277
|
-
var
|
|
1278
|
-
return new HSL(
|
|
1315
|
+
var p3 = tmp;
|
|
1316
|
+
return new HSL(p0, p1, p2, p3);
|
|
1279
1317
|
};
|
|
1280
1318
|
var Companion_instance_1;
|
|
1281
1319
|
function Companion_getInstance_0() {
|
|
@@ -1297,53 +1335,53 @@
|
|
|
1297
1335
|
function HSL(h, s, l, alpha) {
|
|
1298
1336
|
Companion_getInstance_0();
|
|
1299
1337
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1300
|
-
this.
|
|
1301
|
-
this.
|
|
1302
|
-
this.
|
|
1303
|
-
this.
|
|
1338
|
+
this.t1p_1 = h;
|
|
1339
|
+
this.u1p_1 = s;
|
|
1340
|
+
this.v1p_1 = l;
|
|
1341
|
+
this.w1p_1 = alpha;
|
|
1304
1342
|
}
|
|
1305
|
-
protoOf(HSL).
|
|
1306
|
-
return this.
|
|
1343
|
+
protoOf(HSL).k1q = function () {
|
|
1344
|
+
return this.t1p_1;
|
|
1307
1345
|
};
|
|
1308
|
-
protoOf(HSL).
|
|
1309
|
-
return this.
|
|
1346
|
+
protoOf(HSL).g1m = function () {
|
|
1347
|
+
return this.w1p_1;
|
|
1310
1348
|
};
|
|
1311
|
-
protoOf(HSL).
|
|
1349
|
+
protoOf(HSL).h1m = function () {
|
|
1312
1350
|
return Companion_getInstance_0();
|
|
1313
1351
|
};
|
|
1314
|
-
protoOf(HSL).
|
|
1315
|
-
if (this.
|
|
1316
|
-
return Companion_getInstance_6().
|
|
1352
|
+
protoOf(HSL).i1m = function () {
|
|
1353
|
+
if (this.u1p_1 < 1.0E-7)
|
|
1354
|
+
return Companion_getInstance_6().k1o(this.v1p_1, this.v1p_1, this.v1p_1, this.w1p_1);
|
|
1317
1355
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1318
|
-
var s = this.
|
|
1319
|
-
var l = this.
|
|
1320
|
-
return SRGB_getInstance().
|
|
1356
|
+
var s = this.u1p_1;
|
|
1357
|
+
var l = this.v1p_1;
|
|
1358
|
+
return SRGB_getInstance().k1o(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.w1p_1);
|
|
1321
1359
|
};
|
|
1322
|
-
protoOf(HSL).
|
|
1360
|
+
protoOf(HSL).j1m = function () {
|
|
1323
1361
|
return this;
|
|
1324
1362
|
};
|
|
1325
|
-
protoOf(HSL).
|
|
1363
|
+
protoOf(HSL).b6 = function () {
|
|
1326
1364
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1327
|
-
return new Float32Array([this.
|
|
1365
|
+
return new Float32Array([this.t1p_1, this.u1p_1, this.v1p_1, this.w1p_1]);
|
|
1328
1366
|
};
|
|
1329
|
-
protoOf(HSL).
|
|
1367
|
+
protoOf(HSL).r1q = function (h, s, l, alpha) {
|
|
1330
1368
|
return new HSL(h, s, l, alpha);
|
|
1331
1369
|
};
|
|
1332
|
-
protoOf(HSL).
|
|
1333
|
-
h = h === VOID ? this.
|
|
1334
|
-
s = s === VOID ? this.
|
|
1335
|
-
l = l === VOID ? this.
|
|
1336
|
-
alpha = alpha === VOID ? this.
|
|
1337
|
-
return $super === VOID ? this.
|
|
1370
|
+
protoOf(HSL).s1q = function (h, s, l, alpha, $super) {
|
|
1371
|
+
h = h === VOID ? this.t1p_1 : h;
|
|
1372
|
+
s = s === VOID ? this.u1p_1 : s;
|
|
1373
|
+
l = l === VOID ? this.v1p_1 : l;
|
|
1374
|
+
alpha = alpha === VOID ? this.w1p_1 : alpha;
|
|
1375
|
+
return $super === VOID ? this.r1q(h, s, l, alpha) : $super.r1q.call(this, h, s, l, alpha);
|
|
1338
1376
|
};
|
|
1339
1377
|
protoOf(HSL).toString = function () {
|
|
1340
|
-
return 'HSL(h=' + this.
|
|
1378
|
+
return 'HSL(h=' + this.t1p_1 + ', s=' + this.u1p_1 + ', l=' + this.v1p_1 + ', alpha=' + this.w1p_1 + ')';
|
|
1341
1379
|
};
|
|
1342
1380
|
protoOf(HSL).hashCode = function () {
|
|
1343
|
-
var result = getNumberHashCode(this.
|
|
1344
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1345
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1346
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1381
|
+
var result = getNumberHashCode(this.t1p_1);
|
|
1382
|
+
result = imul(result, 31) + getNumberHashCode(this.u1p_1) | 0;
|
|
1383
|
+
result = imul(result, 31) + getNumberHashCode(this.v1p_1) | 0;
|
|
1384
|
+
result = imul(result, 31) + getNumberHashCode(this.w1p_1) | 0;
|
|
1347
1385
|
return result;
|
|
1348
1386
|
};
|
|
1349
1387
|
protoOf(HSL).equals = function (other) {
|
|
@@ -1352,33 +1390,33 @@
|
|
|
1352
1390
|
if (!(other instanceof HSL))
|
|
1353
1391
|
return false;
|
|
1354
1392
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1355
|
-
if (!equals(this.
|
|
1393
|
+
if (!equals(this.t1p_1, tmp0_other_with_cast.t1p_1))
|
|
1356
1394
|
return false;
|
|
1357
|
-
if (!equals(this.
|
|
1395
|
+
if (!equals(this.u1p_1, tmp0_other_with_cast.u1p_1))
|
|
1358
1396
|
return false;
|
|
1359
|
-
if (!equals(this.
|
|
1397
|
+
if (!equals(this.v1p_1, tmp0_other_with_cast.v1p_1))
|
|
1360
1398
|
return false;
|
|
1361
|
-
if (!equals(this.
|
|
1399
|
+
if (!equals(this.w1p_1, tmp0_other_with_cast.w1p_1))
|
|
1362
1400
|
return false;
|
|
1363
1401
|
return true;
|
|
1364
1402
|
};
|
|
1365
1403
|
function Companion_1() {
|
|
1366
1404
|
Companion_instance_2 = this;
|
|
1367
|
-
this.
|
|
1405
|
+
this.s1o_1 = polarComponentInfo('HWB', 0.0, 1.0);
|
|
1368
1406
|
}
|
|
1369
|
-
protoOf(Companion_1).
|
|
1407
|
+
protoOf(Companion_1).q2 = function () {
|
|
1370
1408
|
return 'HWB';
|
|
1371
1409
|
};
|
|
1372
|
-
protoOf(Companion_1).
|
|
1373
|
-
return this.
|
|
1410
|
+
protoOf(Companion_1).p1n = function () {
|
|
1411
|
+
return this.s1o_1;
|
|
1374
1412
|
};
|
|
1375
|
-
protoOf(Companion_1).
|
|
1376
|
-
return color.
|
|
1413
|
+
protoOf(Companion_1).j1n = function (color) {
|
|
1414
|
+
return color.c1n();
|
|
1377
1415
|
};
|
|
1378
|
-
protoOf(Companion_1).
|
|
1416
|
+
protoOf(Companion_1).q1n = function (components) {
|
|
1379
1417
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1380
1418
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1381
|
-
var size = this.
|
|
1419
|
+
var size = this.p1n().m();
|
|
1382
1420
|
// Inline function 'kotlin.require' call
|
|
1383
1421
|
var containsLower = size - 1 | 0;
|
|
1384
1422
|
var containsArg = components.length;
|
|
@@ -1389,19 +1427,20 @@
|
|
|
1389
1427
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1390
1428
|
}
|
|
1391
1429
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1392
|
-
var
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1430
|
+
var p0 = components[0];
|
|
1431
|
+
var p1 = components[1];
|
|
1432
|
+
var p2 = components[2];
|
|
1395
1433
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1434
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1435
|
+
var tmp;
|
|
1436
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1437
|
+
tmp = components[3];
|
|
1399
1438
|
} else {
|
|
1400
1439
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1401
|
-
|
|
1440
|
+
tmp = 1.0;
|
|
1402
1441
|
}
|
|
1403
|
-
var
|
|
1404
|
-
return new HWB(
|
|
1442
|
+
var p3 = tmp;
|
|
1443
|
+
return new HWB(p0, p1, p2, p3);
|
|
1405
1444
|
};
|
|
1406
1445
|
var Companion_instance_2;
|
|
1407
1446
|
function Companion_getInstance_1() {
|
|
@@ -1412,28 +1451,28 @@
|
|
|
1412
1451
|
function HWB(h, w, b, alpha) {
|
|
1413
1452
|
Companion_getInstance_1();
|
|
1414
1453
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1415
|
-
this.
|
|
1416
|
-
this.
|
|
1417
|
-
this.
|
|
1418
|
-
this.
|
|
1454
|
+
this.c1q_1 = h;
|
|
1455
|
+
this.d1q_1 = w;
|
|
1456
|
+
this.e1q_1 = b;
|
|
1457
|
+
this.f1q_1 = alpha;
|
|
1419
1458
|
}
|
|
1420
|
-
protoOf(HWB).
|
|
1421
|
-
return this.
|
|
1459
|
+
protoOf(HWB).k1q = function () {
|
|
1460
|
+
return this.c1q_1;
|
|
1422
1461
|
};
|
|
1423
|
-
protoOf(HWB).
|
|
1424
|
-
return this.
|
|
1462
|
+
protoOf(HWB).g1m = function () {
|
|
1463
|
+
return this.f1q_1;
|
|
1425
1464
|
};
|
|
1426
|
-
protoOf(HWB).
|
|
1465
|
+
protoOf(HWB).h1m = function () {
|
|
1427
1466
|
return Companion_getInstance_1();
|
|
1428
1467
|
};
|
|
1429
|
-
protoOf(HWB).
|
|
1430
|
-
var h = this.
|
|
1431
|
-
var w = this.
|
|
1432
|
-
var b = this.
|
|
1433
|
-
var a = this.
|
|
1434
|
-
if (w + b >= 1
|
|
1468
|
+
protoOf(HWB).i1m = function () {
|
|
1469
|
+
var h = this.c1q_1 / 60.0;
|
|
1470
|
+
var w = this.d1q_1;
|
|
1471
|
+
var b = this.e1q_1;
|
|
1472
|
+
var a = this.f1q_1;
|
|
1473
|
+
if (w + b >= 1) {
|
|
1435
1474
|
var gray = w / (w + b);
|
|
1436
|
-
return Companion_getInstance_6().
|
|
1475
|
+
return Companion_getInstance_6().k1o(gray, gray, gray, a);
|
|
1437
1476
|
}
|
|
1438
1477
|
var v = 1 - b;
|
|
1439
1478
|
var i = numberToInt(h);
|
|
@@ -1441,34 +1480,34 @@
|
|
|
1441
1480
|
var n = w + f * (v - w);
|
|
1442
1481
|
switch (i) {
|
|
1443
1482
|
case 1:
|
|
1444
|
-
return Companion_getInstance_6().
|
|
1483
|
+
return Companion_getInstance_6().k1o(n, v, w, a);
|
|
1445
1484
|
case 2:
|
|
1446
|
-
return Companion_getInstance_6().
|
|
1485
|
+
return Companion_getInstance_6().k1o(w, v, n, a);
|
|
1447
1486
|
case 3:
|
|
1448
|
-
return Companion_getInstance_6().
|
|
1487
|
+
return Companion_getInstance_6().k1o(w, n, v, a);
|
|
1449
1488
|
case 4:
|
|
1450
|
-
return Companion_getInstance_6().
|
|
1489
|
+
return Companion_getInstance_6().k1o(n, w, v, a);
|
|
1451
1490
|
case 5:
|
|
1452
|
-
return Companion_getInstance_6().
|
|
1491
|
+
return Companion_getInstance_6().k1o(v, w, n, a);
|
|
1453
1492
|
default:
|
|
1454
|
-
return Companion_getInstance_6().
|
|
1493
|
+
return Companion_getInstance_6().k1o(v, n, w, a);
|
|
1455
1494
|
}
|
|
1456
1495
|
};
|
|
1457
|
-
protoOf(HWB).
|
|
1496
|
+
protoOf(HWB).c1n = function () {
|
|
1458
1497
|
return this;
|
|
1459
1498
|
};
|
|
1460
|
-
protoOf(HWB).
|
|
1499
|
+
protoOf(HWB).b6 = function () {
|
|
1461
1500
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1462
|
-
return new Float32Array([this.
|
|
1501
|
+
return new Float32Array([this.c1q_1, this.d1q_1, this.e1q_1, this.f1q_1]);
|
|
1463
1502
|
};
|
|
1464
1503
|
protoOf(HWB).toString = function () {
|
|
1465
|
-
return 'HWB(h=' + this.
|
|
1504
|
+
return 'HWB(h=' + this.c1q_1 + ', w=' + this.d1q_1 + ', b=' + this.e1q_1 + ', alpha=' + this.f1q_1 + ')';
|
|
1466
1505
|
};
|
|
1467
1506
|
protoOf(HWB).hashCode = function () {
|
|
1468
|
-
var result = getNumberHashCode(this.
|
|
1469
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1470
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1471
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1507
|
+
var result = getNumberHashCode(this.c1q_1);
|
|
1508
|
+
result = imul(result, 31) + getNumberHashCode(this.d1q_1) | 0;
|
|
1509
|
+
result = imul(result, 31) + getNumberHashCode(this.e1q_1) | 0;
|
|
1510
|
+
result = imul(result, 31) + getNumberHashCode(this.f1q_1) | 0;
|
|
1472
1511
|
return result;
|
|
1473
1512
|
};
|
|
1474
1513
|
protoOf(HWB).equals = function (other) {
|
|
@@ -1477,13 +1516,13 @@
|
|
|
1477
1516
|
if (!(other instanceof HWB))
|
|
1478
1517
|
return false;
|
|
1479
1518
|
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1480
|
-
if (!equals(this.
|
|
1519
|
+
if (!equals(this.c1q_1, tmp0_other_with_cast.c1q_1))
|
|
1481
1520
|
return false;
|
|
1482
|
-
if (!equals(this.
|
|
1521
|
+
if (!equals(this.d1q_1, tmp0_other_with_cast.d1q_1))
|
|
1483
1522
|
return false;
|
|
1484
|
-
if (!equals(this.
|
|
1523
|
+
if (!equals(this.e1q_1, tmp0_other_with_cast.e1q_1))
|
|
1485
1524
|
return false;
|
|
1486
|
-
if (!equals(this.
|
|
1525
|
+
if (!equals(this.f1q_1, tmp0_other_with_cast.f1q_1))
|
|
1487
1526
|
return false;
|
|
1488
1527
|
return true;
|
|
1489
1528
|
};
|
|
@@ -1525,47 +1564,51 @@
|
|
|
1525
1564
|
var ICTCP_LMS_TO_XYZ;
|
|
1526
1565
|
function ICtCp() {
|
|
1527
1566
|
}
|
|
1528
|
-
protoOf(ICtCp).
|
|
1529
|
-
var fo = RGBColorSpaces_getInstance().
|
|
1567
|
+
protoOf(ICtCp).x1q = function () {
|
|
1568
|
+
var fo = RGBColorSpaces_getInstance().c1p_1.y1q();
|
|
1530
1569
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1531
1570
|
var this_0 = get_ICTCP_ICTCP_to_LMS();
|
|
1532
|
-
var v0 = this.
|
|
1533
|
-
var v1 = this.
|
|
1534
|
-
var v2 = this.
|
|
1571
|
+
var v0 = this.t1q_1;
|
|
1572
|
+
var v1 = this.u1q_1;
|
|
1573
|
+
var v2 = this.v1q_1;
|
|
1535
1574
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
1536
1575
|
var l = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
1537
1576
|
var m = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
1538
1577
|
var s = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
1539
1578
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1540
1579
|
var this_1 = get_ICTCP_LMS_to_RGB();
|
|
1541
|
-
var v0_0 = PqNonlinearity_instance.
|
|
1542
|
-
var v1_0 = PqNonlinearity_instance.
|
|
1543
|
-
var v2_0 = PqNonlinearity_instance.
|
|
1580
|
+
var v0_0 = PqNonlinearity_instance.h1r(l);
|
|
1581
|
+
var v1_0 = PqNonlinearity_instance.h1r(m);
|
|
1582
|
+
var v2_0 = PqNonlinearity_instance.h1r(s);
|
|
1544
1583
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
1545
1584
|
var r = Matrix__get_impl_xogbpk(this_1, 0, 0) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 0) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 0) * v2_0;
|
|
1546
1585
|
var g = Matrix__get_impl_xogbpk(this_1, 0, 1) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 1) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 1) * v2_0;
|
|
1547
1586
|
var b = Matrix__get_impl_xogbpk(this_1, 0, 2) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 2) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 2) * v2_0;
|
|
1548
|
-
return RGBColorSpaces_getInstance().
|
|
1587
|
+
return RGBColorSpaces_getInstance().c1p_1.k1o(fo.i1r(r), fo.i1r(g), fo.i1r(b), this.w1q_1);
|
|
1549
1588
|
};
|
|
1550
1589
|
function PqNonlinearity() {
|
|
1551
|
-
this.
|
|
1552
|
-
this.
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1555
|
-
this.
|
|
1556
|
-
this.
|
|
1557
|
-
this.
|
|
1558
|
-
this.
|
|
1559
|
-
}
|
|
1560
|
-
protoOf(PqNonlinearity).
|
|
1590
|
+
this.z1q_1 = 0.1593017578125;
|
|
1591
|
+
this.a1r_1 = 78.84375;
|
|
1592
|
+
this.b1r_1 = 0.8359375;
|
|
1593
|
+
this.c1r_1 = 18.8515625;
|
|
1594
|
+
this.d1r_1 = 18.6875;
|
|
1595
|
+
this.e1r_1 = 10000.0;
|
|
1596
|
+
this.f1r_1 = 6.277394636015326;
|
|
1597
|
+
this.g1r_1 = 0.012683313515655966;
|
|
1598
|
+
}
|
|
1599
|
+
protoOf(PqNonlinearity).h1r = function (x) {
|
|
1561
1600
|
var vp = spow(x, 0.012683313515655966);
|
|
1562
1601
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
1563
|
-
var
|
|
1602
|
+
var tmp = n / (18.8515625 - 18.6875 * vp);
|
|
1603
|
+
var l = spow_0(tmp, 6.277394636015326);
|
|
1564
1604
|
return 10000.0 * l;
|
|
1565
1605
|
};
|
|
1566
|
-
protoOf(PqNonlinearity).
|
|
1567
|
-
var
|
|
1568
|
-
|
|
1606
|
+
protoOf(PqNonlinearity).i1r = function (x) {
|
|
1607
|
+
var tmp = x / 10000.0;
|
|
1608
|
+
var yp = spow_0(tmp, 0.1593017578125);
|
|
1609
|
+
var tmp_0 = 0.8359375 + 18.8515625 * yp;
|
|
1610
|
+
var tmp_1 = tmp_0 / (1.0 + 18.6875 * yp);
|
|
1611
|
+
return spow_0(tmp_1, 78.84375);
|
|
1569
1612
|
};
|
|
1570
1613
|
var PqNonlinearity_instance;
|
|
1571
1614
|
function PqNonlinearity_getInstance() {
|
|
@@ -1587,34 +1630,34 @@
|
|
|
1587
1630
|
}
|
|
1588
1631
|
function Companion_2() {
|
|
1589
1632
|
Companion_instance_3 = this;
|
|
1590
|
-
this.
|
|
1633
|
+
this.m1o_1 = LABColorSpaces_getInstance().n1o_1;
|
|
1591
1634
|
}
|
|
1592
|
-
protoOf(Companion_2).
|
|
1593
|
-
return this.
|
|
1635
|
+
protoOf(Companion_2).p1n = function () {
|
|
1636
|
+
return this.m1o_1.p1n();
|
|
1594
1637
|
};
|
|
1595
|
-
protoOf(Companion_2).
|
|
1596
|
-
return this.
|
|
1638
|
+
protoOf(Companion_2).q2 = function () {
|
|
1639
|
+
return this.m1o_1.q2();
|
|
1597
1640
|
};
|
|
1598
|
-
protoOf(Companion_2).
|
|
1599
|
-
return this.
|
|
1641
|
+
protoOf(Companion_2).o1n = function () {
|
|
1642
|
+
return this.m1o_1.o1n();
|
|
1600
1643
|
};
|
|
1601
|
-
protoOf(Companion_2).
|
|
1602
|
-
return this.
|
|
1644
|
+
protoOf(Companion_2).j1n = function (color) {
|
|
1645
|
+
return this.m1o_1.j1n(color);
|
|
1603
1646
|
};
|
|
1604
|
-
protoOf(Companion_2).
|
|
1605
|
-
return this.
|
|
1647
|
+
protoOf(Companion_2).q1n = function (components) {
|
|
1648
|
+
return this.m1o_1.q1n(components);
|
|
1606
1649
|
};
|
|
1607
|
-
protoOf(Companion_2).
|
|
1608
|
-
return this.
|
|
1650
|
+
protoOf(Companion_2).k1o = function (l, a, b, alpha) {
|
|
1651
|
+
return this.m1o_1.k1o(l, a, b, alpha);
|
|
1609
1652
|
};
|
|
1610
|
-
protoOf(Companion_2).
|
|
1611
|
-
return this.
|
|
1653
|
+
protoOf(Companion_2).j1r = function (l, a, b, alpha) {
|
|
1654
|
+
return this.m1o_1.j1r(l, a, b, alpha);
|
|
1612
1655
|
};
|
|
1613
1656
|
protoOf(Companion_2).equals = function (other) {
|
|
1614
|
-
return equals(LABColorSpaces_getInstance().
|
|
1657
|
+
return equals(LABColorSpaces_getInstance().n1o_1, other);
|
|
1615
1658
|
};
|
|
1616
1659
|
protoOf(Companion_2).hashCode = function () {
|
|
1617
|
-
return hashCode(LABColorSpaces_getInstance().
|
|
1660
|
+
return hashCode(LABColorSpaces_getInstance().n1o_1);
|
|
1618
1661
|
};
|
|
1619
1662
|
var Companion_instance_3;
|
|
1620
1663
|
function Companion_getInstance_2() {
|
|
@@ -1624,34 +1667,34 @@
|
|
|
1624
1667
|
}
|
|
1625
1668
|
function LAB(l, a, b, alpha, space) {
|
|
1626
1669
|
Companion_getInstance_2();
|
|
1627
|
-
this.
|
|
1628
|
-
this.
|
|
1629
|
-
this.
|
|
1630
|
-
this.
|
|
1631
|
-
this.
|
|
1632
|
-
}
|
|
1633
|
-
protoOf(LAB).
|
|
1634
|
-
return this.
|
|
1635
|
-
};
|
|
1636
|
-
protoOf(LAB).
|
|
1637
|
-
return this.
|
|
1638
|
-
};
|
|
1639
|
-
protoOf(LAB).
|
|
1640
|
-
return this.
|
|
1641
|
-
};
|
|
1642
|
-
protoOf(LAB).
|
|
1643
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
1644
|
-
if (this.
|
|
1645
|
-
return xyzSpace.
|
|
1646
|
-
var fy = (this.
|
|
1647
|
-
var fz = fy - this.
|
|
1648
|
-
var fx = this.
|
|
1670
|
+
this.x1m_1 = l;
|
|
1671
|
+
this.y1m_1 = a;
|
|
1672
|
+
this.z1m_1 = b;
|
|
1673
|
+
this.a1n_1 = alpha;
|
|
1674
|
+
this.b1n_1 = space;
|
|
1675
|
+
}
|
|
1676
|
+
protoOf(LAB).g1m = function () {
|
|
1677
|
+
return this.a1n_1;
|
|
1678
|
+
};
|
|
1679
|
+
protoOf(LAB).h1m = function () {
|
|
1680
|
+
return this.b1n_1;
|
|
1681
|
+
};
|
|
1682
|
+
protoOf(LAB).i1m = function () {
|
|
1683
|
+
return this.x1m_1 === 0.0 ? Companion_getInstance_6().k1o(0.0, 0.0, 0.0, this.a1n_1) : this.p1m().i1m();
|
|
1684
|
+
};
|
|
1685
|
+
protoOf(LAB).p1m = function () {
|
|
1686
|
+
var xyzSpace = XYZColorSpace_0(this.b1n_1.o1n());
|
|
1687
|
+
if (this.x1m_1 === 0.0)
|
|
1688
|
+
return xyzSpace.k1r(0.0, 0.0, 0.0);
|
|
1689
|
+
var fy = (this.x1m_1 + 16) / 116.0;
|
|
1690
|
+
var fz = fy - this.z1m_1 / 200.0;
|
|
1691
|
+
var fx = this.y1m_1 / 500.0 + fy;
|
|
1649
1692
|
var tmp;
|
|
1650
|
-
if (this.
|
|
1693
|
+
if (this.x1m_1 > get_CIE_E_times_K()) {
|
|
1651
1694
|
// Inline function 'kotlin.math.pow' call
|
|
1652
1695
|
tmp = Math.pow(fy, 3);
|
|
1653
1696
|
} else {
|
|
1654
|
-
tmp = this.
|
|
1697
|
+
tmp = this.x1m_1 / get_CIE_K();
|
|
1655
1698
|
}
|
|
1656
1699
|
var yr = tmp;
|
|
1657
1700
|
// Inline function 'kotlin.let' call
|
|
@@ -1666,18 +1709,18 @@
|
|
|
1666
1709
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
|
|
1667
1710
|
var it_0 = Math.pow(fx, 3);
|
|
1668
1711
|
var xr = it_0 > get_CIE_E() ? it_0 : (116 * fx - 16) / get_CIE_K();
|
|
1669
|
-
var wp = this.
|
|
1670
|
-
return xyzSpace.
|
|
1712
|
+
var wp = this.b1n_1.o1n().m1q_1;
|
|
1713
|
+
return xyzSpace.j1r(xr * wp.o1r(), yr * wp.n1r_1, zr * wp.p1r(), this.a1n_1);
|
|
1671
1714
|
};
|
|
1672
|
-
protoOf(LAB).
|
|
1715
|
+
protoOf(LAB).w1m = function () {
|
|
1673
1716
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
1674
|
-
var a = this.
|
|
1675
|
-
var b = this.
|
|
1717
|
+
var a = this.y1m_1;
|
|
1718
|
+
var b = this.z1m_1;
|
|
1676
1719
|
// Inline function 'kotlin.math.sqrt' call
|
|
1677
1720
|
var x = a * a + b * b;
|
|
1678
1721
|
var c = Math.sqrt(x);
|
|
1679
1722
|
var tmp;
|
|
1680
|
-
if (c > -1.0E-7
|
|
1723
|
+
if (c > -1.0E-7 && c < 1.0E-7) {
|
|
1681
1724
|
tmp = NaN;
|
|
1682
1725
|
} else {
|
|
1683
1726
|
// Inline function 'kotlin.math.atan2' call
|
|
@@ -1687,24 +1730,24 @@
|
|
|
1687
1730
|
var h = tmp;
|
|
1688
1731
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
1689
1732
|
var h_0 = normalizeDeg_0(h);
|
|
1690
|
-
return LCHabColorSpace_0(this.
|
|
1733
|
+
return LCHabColorSpace_0(this.b1n_1.o1n()).k1o(this.x1m_1, c, h_0, this.a1n_1);
|
|
1691
1734
|
};
|
|
1692
|
-
protoOf(LAB).
|
|
1735
|
+
protoOf(LAB).q1m = function () {
|
|
1693
1736
|
return this;
|
|
1694
1737
|
};
|
|
1695
|
-
protoOf(LAB).
|
|
1738
|
+
protoOf(LAB).b6 = function () {
|
|
1696
1739
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1697
|
-
return new Float32Array([this.
|
|
1740
|
+
return new Float32Array([this.x1m_1, this.y1m_1, this.z1m_1, this.a1n_1]);
|
|
1698
1741
|
};
|
|
1699
1742
|
protoOf(LAB).toString = function () {
|
|
1700
|
-
return 'LAB(l=' + this.
|
|
1743
|
+
return 'LAB(l=' + this.x1m_1 + ', a=' + this.y1m_1 + ', b=' + this.z1m_1 + ', alpha=' + this.a1n_1 + ', space=' + toString(this.b1n_1) + ')';
|
|
1701
1744
|
};
|
|
1702
1745
|
protoOf(LAB).hashCode = function () {
|
|
1703
|
-
var result = getNumberHashCode(this.
|
|
1704
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1705
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1706
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1707
|
-
result = imul(result, 31) + hashCode(this.
|
|
1746
|
+
var result = getNumberHashCode(this.x1m_1);
|
|
1747
|
+
result = imul(result, 31) + getNumberHashCode(this.y1m_1) | 0;
|
|
1748
|
+
result = imul(result, 31) + getNumberHashCode(this.z1m_1) | 0;
|
|
1749
|
+
result = imul(result, 31) + getNumberHashCode(this.a1n_1) | 0;
|
|
1750
|
+
result = imul(result, 31) + hashCode(this.b1n_1) | 0;
|
|
1708
1751
|
return result;
|
|
1709
1752
|
};
|
|
1710
1753
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1713,27 +1756,27 @@
|
|
|
1713
1756
|
if (!(other instanceof LAB))
|
|
1714
1757
|
return false;
|
|
1715
1758
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1716
|
-
if (!equals(this.
|
|
1759
|
+
if (!equals(this.x1m_1, tmp0_other_with_cast.x1m_1))
|
|
1717
1760
|
return false;
|
|
1718
|
-
if (!equals(this.
|
|
1761
|
+
if (!equals(this.y1m_1, tmp0_other_with_cast.y1m_1))
|
|
1719
1762
|
return false;
|
|
1720
|
-
if (!equals(this.
|
|
1763
|
+
if (!equals(this.z1m_1, tmp0_other_with_cast.z1m_1))
|
|
1721
1764
|
return false;
|
|
1722
|
-
if (!equals(this.
|
|
1765
|
+
if (!equals(this.a1n_1, tmp0_other_with_cast.a1n_1))
|
|
1723
1766
|
return false;
|
|
1724
|
-
if (!equals(this.
|
|
1767
|
+
if (!equals(this.b1n_1, tmp0_other_with_cast.b1n_1))
|
|
1725
1768
|
return false;
|
|
1726
1769
|
return true;
|
|
1727
1770
|
};
|
|
1728
1771
|
function LABColorSpace() {
|
|
1729
1772
|
}
|
|
1730
1773
|
function LABColorSpace_0(whitePoint) {
|
|
1731
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1774
|
+
return whitePoint.equals(Illuminant_getInstance().p1p_1) ? LABColorSpaces_getInstance().n1o_1 : whitePoint.equals(Illuminant_getInstance().n1p_1) ? LABColorSpaces_getInstance().o1o_1 : new LABColorSpaceImpl(whitePoint);
|
|
1732
1775
|
}
|
|
1733
1776
|
function LABColorSpaces() {
|
|
1734
1777
|
LABColorSpaces_instance = this;
|
|
1735
|
-
this.
|
|
1736
|
-
this.
|
|
1778
|
+
this.n1o_1 = new LABColorSpaceImpl(Illuminant_getInstance().p1p_1);
|
|
1779
|
+
this.o1o_1 = new LABColorSpaceImpl(Illuminant_getInstance().n1p_1);
|
|
1737
1780
|
}
|
|
1738
1781
|
var LABColorSpaces_instance;
|
|
1739
1782
|
function LABColorSpaces_getInstance() {
|
|
@@ -1742,37 +1785,37 @@
|
|
|
1742
1785
|
return LABColorSpaces_instance;
|
|
1743
1786
|
}
|
|
1744
1787
|
function LABColorSpaceImpl(whitePoint) {
|
|
1745
|
-
this.
|
|
1746
|
-
this.
|
|
1788
|
+
this.q1r_1 = whitePoint;
|
|
1789
|
+
this.r1r_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
|
|
1747
1790
|
}
|
|
1748
|
-
protoOf(LABColorSpaceImpl).
|
|
1749
|
-
return this.
|
|
1791
|
+
protoOf(LABColorSpaceImpl).o1n = function () {
|
|
1792
|
+
return this.q1r_1;
|
|
1750
1793
|
};
|
|
1751
|
-
protoOf(LABColorSpaceImpl).
|
|
1794
|
+
protoOf(LABColorSpaceImpl).q2 = function () {
|
|
1752
1795
|
return 'LAB';
|
|
1753
1796
|
};
|
|
1754
|
-
protoOf(LABColorSpaceImpl).
|
|
1755
|
-
return this.
|
|
1797
|
+
protoOf(LABColorSpaceImpl).p1n = function () {
|
|
1798
|
+
return this.r1r_1;
|
|
1756
1799
|
};
|
|
1757
|
-
protoOf(LABColorSpaceImpl).
|
|
1800
|
+
protoOf(LABColorSpaceImpl).j1n = function (color) {
|
|
1758
1801
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1759
1802
|
var tmp;
|
|
1760
|
-
var tmp_0 = color.
|
|
1803
|
+
var tmp_0 = color.h1m();
|
|
1761
1804
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1762
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1763
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1805
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o1n();
|
|
1806
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().p1p_1 : tmp1_elvis_lhs).equals(this.o1n())) {
|
|
1764
1807
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1765
|
-
tmp = color.
|
|
1808
|
+
tmp = color.q1m();
|
|
1766
1809
|
} else {
|
|
1767
1810
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1768
|
-
tmp = color.
|
|
1811
|
+
tmp = color.p1m().j1p(XYZColorSpace_0(this.o1n())).q1m();
|
|
1769
1812
|
}
|
|
1770
1813
|
return tmp;
|
|
1771
1814
|
};
|
|
1772
|
-
protoOf(LABColorSpaceImpl).
|
|
1815
|
+
protoOf(LABColorSpaceImpl).q1n = function (components) {
|
|
1773
1816
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1774
1817
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1775
|
-
var size = this.
|
|
1818
|
+
var size = this.p1n().m();
|
|
1776
1819
|
// Inline function 'kotlin.require' call
|
|
1777
1820
|
var containsLower = size - 1 | 0;
|
|
1778
1821
|
var containsArg = components.length;
|
|
@@ -1783,33 +1826,34 @@
|
|
|
1783
1826
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1784
1827
|
}
|
|
1785
1828
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1786
|
-
var
|
|
1787
|
-
var
|
|
1788
|
-
var
|
|
1829
|
+
var p0 = components[0];
|
|
1830
|
+
var p1 = components[1];
|
|
1831
|
+
var p2 = components[2];
|
|
1789
1832
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1833
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1834
|
+
var tmp;
|
|
1835
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1836
|
+
tmp = components[3];
|
|
1793
1837
|
} else {
|
|
1794
1838
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1795
|
-
|
|
1839
|
+
tmp = 1.0;
|
|
1796
1840
|
}
|
|
1797
|
-
var
|
|
1798
|
-
return this.
|
|
1841
|
+
var p3 = tmp;
|
|
1842
|
+
return this.k1o(p0, p1, p2, p3);
|
|
1799
1843
|
};
|
|
1800
1844
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1801
|
-
return 'LABColorSpace(' + this.
|
|
1845
|
+
return 'LABColorSpace(' + this.q1r_1.toString() + ')';
|
|
1802
1846
|
};
|
|
1803
|
-
protoOf(LABColorSpaceImpl).
|
|
1847
|
+
protoOf(LABColorSpaceImpl).k1o = function (l, a, b, alpha) {
|
|
1804
1848
|
return new LAB(l, a, b, alpha, this);
|
|
1805
1849
|
};
|
|
1806
1850
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1807
|
-
return this.
|
|
1851
|
+
return this.q1r_1.hashCode();
|
|
1808
1852
|
};
|
|
1809
1853
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1810
1854
|
var tmp;
|
|
1811
1855
|
if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
|
|
1812
|
-
tmp = this.
|
|
1856
|
+
tmp = this.q1r_1.equals(other.o1n());
|
|
1813
1857
|
} else {
|
|
1814
1858
|
tmp = false;
|
|
1815
1859
|
}
|
|
@@ -1817,31 +1861,31 @@
|
|
|
1817
1861
|
};
|
|
1818
1862
|
function Companion_3() {
|
|
1819
1863
|
Companion_instance_4 = this;
|
|
1820
|
-
this.
|
|
1864
|
+
this.p1o_1 = LCHabColorSpaces_getInstance().q1o_1;
|
|
1821
1865
|
}
|
|
1822
|
-
protoOf(Companion_3).
|
|
1823
|
-
return this.
|
|
1866
|
+
protoOf(Companion_3).p1n = function () {
|
|
1867
|
+
return this.p1o_1.p1n();
|
|
1824
1868
|
};
|
|
1825
|
-
protoOf(Companion_3).
|
|
1826
|
-
return this.
|
|
1869
|
+
protoOf(Companion_3).q2 = function () {
|
|
1870
|
+
return this.p1o_1.q2();
|
|
1827
1871
|
};
|
|
1828
|
-
protoOf(Companion_3).
|
|
1829
|
-
return this.
|
|
1872
|
+
protoOf(Companion_3).o1n = function () {
|
|
1873
|
+
return this.p1o_1.o1n();
|
|
1830
1874
|
};
|
|
1831
|
-
protoOf(Companion_3).
|
|
1832
|
-
return this.
|
|
1875
|
+
protoOf(Companion_3).j1n = function (color) {
|
|
1876
|
+
return this.p1o_1.j1n(color);
|
|
1833
1877
|
};
|
|
1834
|
-
protoOf(Companion_3).
|
|
1835
|
-
return this.
|
|
1878
|
+
protoOf(Companion_3).q1n = function (components) {
|
|
1879
|
+
return this.p1o_1.q1n(components);
|
|
1836
1880
|
};
|
|
1837
|
-
protoOf(Companion_3).
|
|
1838
|
-
return this.
|
|
1881
|
+
protoOf(Companion_3).k1o = function (l, c, h, alpha) {
|
|
1882
|
+
return this.p1o_1.k1o(l, c, h, alpha);
|
|
1839
1883
|
};
|
|
1840
1884
|
protoOf(Companion_3).equals = function (other) {
|
|
1841
|
-
return equals(LCHabColorSpaces_getInstance().
|
|
1885
|
+
return equals(LCHabColorSpaces_getInstance().q1o_1, other);
|
|
1842
1886
|
};
|
|
1843
1887
|
protoOf(Companion_3).hashCode = function () {
|
|
1844
|
-
return hashCode(LCHabColorSpaces_getInstance().
|
|
1888
|
+
return hashCode(LCHabColorSpaces_getInstance().q1o_1);
|
|
1845
1889
|
};
|
|
1846
1890
|
var Companion_instance_4;
|
|
1847
1891
|
function Companion_getInstance_3() {
|
|
@@ -1851,55 +1895,55 @@
|
|
|
1851
1895
|
}
|
|
1852
1896
|
function LCHab(l, c, h, alpha, space) {
|
|
1853
1897
|
Companion_getInstance_3();
|
|
1854
|
-
this.
|
|
1855
|
-
this.
|
|
1856
|
-
this.
|
|
1857
|
-
this.
|
|
1858
|
-
this.
|
|
1898
|
+
this.x1p_1 = l;
|
|
1899
|
+
this.y1p_1 = c;
|
|
1900
|
+
this.z1p_1 = h;
|
|
1901
|
+
this.a1q_1 = alpha;
|
|
1902
|
+
this.b1q_1 = space;
|
|
1859
1903
|
}
|
|
1860
|
-
protoOf(LCHab).
|
|
1861
|
-
return this.
|
|
1904
|
+
protoOf(LCHab).k1q = function () {
|
|
1905
|
+
return this.z1p_1;
|
|
1862
1906
|
};
|
|
1863
|
-
protoOf(LCHab).
|
|
1864
|
-
return this.
|
|
1907
|
+
protoOf(LCHab).g1m = function () {
|
|
1908
|
+
return this.a1q_1;
|
|
1865
1909
|
};
|
|
1866
|
-
protoOf(LCHab).
|
|
1867
|
-
return this.
|
|
1910
|
+
protoOf(LCHab).h1m = function () {
|
|
1911
|
+
return this.b1q_1;
|
|
1868
1912
|
};
|
|
1869
|
-
protoOf(LCHab).
|
|
1870
|
-
return this.
|
|
1913
|
+
protoOf(LCHab).i1m = function () {
|
|
1914
|
+
return this.q1m().i1m();
|
|
1871
1915
|
};
|
|
1872
|
-
protoOf(LCHab).
|
|
1873
|
-
return this.
|
|
1916
|
+
protoOf(LCHab).p1m = function () {
|
|
1917
|
+
return this.q1m().p1m();
|
|
1874
1918
|
};
|
|
1875
|
-
protoOf(LCHab).
|
|
1919
|
+
protoOf(LCHab).q1m = function () {
|
|
1876
1920
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1877
|
-
var c = this.
|
|
1878
|
-
var h = this.
|
|
1921
|
+
var c = this.y1p_1;
|
|
1922
|
+
var h = this.z1p_1;
|
|
1879
1923
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
1880
1924
|
// Inline function 'kotlin.math.cos' call
|
|
1881
1925
|
var a = c * Math.cos(hDegrees);
|
|
1882
1926
|
// Inline function 'kotlin.math.sin' call
|
|
1883
1927
|
var b = c * Math.sin(hDegrees);
|
|
1884
1928
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1885
|
-
return LABColorSpace_0(this.
|
|
1929
|
+
return LABColorSpace_0(this.b1q_1.o1n()).k1o(this.x1p_1, a, b, this.a1q_1);
|
|
1886
1930
|
};
|
|
1887
|
-
protoOf(LCHab).
|
|
1931
|
+
protoOf(LCHab).w1m = function () {
|
|
1888
1932
|
return this;
|
|
1889
1933
|
};
|
|
1890
|
-
protoOf(LCHab).
|
|
1934
|
+
protoOf(LCHab).b6 = function () {
|
|
1891
1935
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1892
|
-
return new Float32Array([this.
|
|
1936
|
+
return new Float32Array([this.x1p_1, this.y1p_1, this.z1p_1, this.a1q_1]);
|
|
1893
1937
|
};
|
|
1894
1938
|
protoOf(LCHab).toString = function () {
|
|
1895
|
-
return 'LCHab(l=' + this.
|
|
1939
|
+
return 'LCHab(l=' + this.x1p_1 + ', c=' + this.y1p_1 + ', h=' + this.z1p_1 + ', alpha=' + this.a1q_1 + ', space=' + toString(this.b1q_1) + ')';
|
|
1896
1940
|
};
|
|
1897
1941
|
protoOf(LCHab).hashCode = function () {
|
|
1898
|
-
var result = getNumberHashCode(this.
|
|
1899
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1900
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1901
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1902
|
-
result = imul(result, 31) + hashCode(this.
|
|
1942
|
+
var result = getNumberHashCode(this.x1p_1);
|
|
1943
|
+
result = imul(result, 31) + getNumberHashCode(this.y1p_1) | 0;
|
|
1944
|
+
result = imul(result, 31) + getNumberHashCode(this.z1p_1) | 0;
|
|
1945
|
+
result = imul(result, 31) + getNumberHashCode(this.a1q_1) | 0;
|
|
1946
|
+
result = imul(result, 31) + hashCode(this.b1q_1) | 0;
|
|
1903
1947
|
return result;
|
|
1904
1948
|
};
|
|
1905
1949
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1908,27 +1952,27 @@
|
|
|
1908
1952
|
if (!(other instanceof LCHab))
|
|
1909
1953
|
return false;
|
|
1910
1954
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1911
|
-
if (!equals(this.
|
|
1955
|
+
if (!equals(this.x1p_1, tmp0_other_with_cast.x1p_1))
|
|
1912
1956
|
return false;
|
|
1913
|
-
if (!equals(this.
|
|
1957
|
+
if (!equals(this.y1p_1, tmp0_other_with_cast.y1p_1))
|
|
1914
1958
|
return false;
|
|
1915
|
-
if (!equals(this.
|
|
1959
|
+
if (!equals(this.z1p_1, tmp0_other_with_cast.z1p_1))
|
|
1916
1960
|
return false;
|
|
1917
|
-
if (!equals(this.
|
|
1961
|
+
if (!equals(this.a1q_1, tmp0_other_with_cast.a1q_1))
|
|
1918
1962
|
return false;
|
|
1919
|
-
if (!equals(this.
|
|
1963
|
+
if (!equals(this.b1q_1, tmp0_other_with_cast.b1q_1))
|
|
1920
1964
|
return false;
|
|
1921
1965
|
return true;
|
|
1922
1966
|
};
|
|
1923
1967
|
function LCHabColorSpace() {
|
|
1924
1968
|
}
|
|
1925
1969
|
function LCHabColorSpace_0(whitePoint) {
|
|
1926
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1970
|
+
return whitePoint.equals(Illuminant_getInstance().p1p_1) ? LCHabColorSpaces_getInstance().q1o_1 : whitePoint.equals(Illuminant_getInstance().n1p_1) ? LCHabColorSpaces_getInstance().r1o_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1927
1971
|
}
|
|
1928
1972
|
function LCHabColorSpaces() {
|
|
1929
1973
|
LCHabColorSpaces_instance = this;
|
|
1930
|
-
this.
|
|
1931
|
-
this.
|
|
1974
|
+
this.q1o_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().p1p_1);
|
|
1975
|
+
this.r1o_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().n1p_1);
|
|
1932
1976
|
}
|
|
1933
1977
|
var LCHabColorSpaces_instance;
|
|
1934
1978
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1937,37 +1981,37 @@
|
|
|
1937
1981
|
return LCHabColorSpaces_instance;
|
|
1938
1982
|
}
|
|
1939
1983
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1940
|
-
this.
|
|
1941
|
-
this.
|
|
1984
|
+
this.s1r_1 = whitePoint;
|
|
1985
|
+
this.t1r_1 = componentInfoList([new ColorComponentInfo('L', false, 0.0, 100.0), new ColorComponentInfo('C', false, 0.0, 150.0), new ColorComponentInfo('H', true, 0.0, 360.0)]);
|
|
1942
1986
|
}
|
|
1943
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1944
|
-
return this.
|
|
1987
|
+
protoOf(LCHabColorSpaceImpl).o1n = function () {
|
|
1988
|
+
return this.s1r_1;
|
|
1945
1989
|
};
|
|
1946
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1990
|
+
protoOf(LCHabColorSpaceImpl).q2 = function () {
|
|
1947
1991
|
return 'LCHab';
|
|
1948
1992
|
};
|
|
1949
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1950
|
-
return this.
|
|
1993
|
+
protoOf(LCHabColorSpaceImpl).p1n = function () {
|
|
1994
|
+
return this.t1r_1;
|
|
1951
1995
|
};
|
|
1952
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1996
|
+
protoOf(LCHabColorSpaceImpl).j1n = function (color) {
|
|
1953
1997
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1954
1998
|
var tmp;
|
|
1955
|
-
var tmp_0 = color.
|
|
1999
|
+
var tmp_0 = color.h1m();
|
|
1956
2000
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1957
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1958
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
2001
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o1n();
|
|
2002
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().p1p_1 : tmp1_elvis_lhs).equals(this.o1n())) {
|
|
1959
2003
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1960
|
-
tmp = color.
|
|
2004
|
+
tmp = color.w1m();
|
|
1961
2005
|
} else {
|
|
1962
2006
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1963
|
-
tmp = color.
|
|
2007
|
+
tmp = color.p1m().j1p(XYZColorSpace_0(this.o1n())).w1m();
|
|
1964
2008
|
}
|
|
1965
2009
|
return tmp;
|
|
1966
2010
|
};
|
|
1967
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2011
|
+
protoOf(LCHabColorSpaceImpl).q1n = function (components) {
|
|
1968
2012
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1969
2013
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1970
|
-
var size = this.
|
|
2014
|
+
var size = this.p1n().m();
|
|
1971
2015
|
// Inline function 'kotlin.require' call
|
|
1972
2016
|
var containsLower = size - 1 | 0;
|
|
1973
2017
|
var containsArg = components.length;
|
|
@@ -1978,33 +2022,34 @@
|
|
|
1978
2022
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1979
2023
|
}
|
|
1980
2024
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1981
|
-
var
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
2025
|
+
var p0 = components[0];
|
|
2026
|
+
var p1 = components[1];
|
|
2027
|
+
var p2 = components[2];
|
|
1984
2028
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
2029
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2030
|
+
var tmp;
|
|
2031
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2032
|
+
tmp = components[3];
|
|
1988
2033
|
} else {
|
|
1989
2034
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1990
|
-
|
|
2035
|
+
tmp = 1.0;
|
|
1991
2036
|
}
|
|
1992
|
-
var
|
|
1993
|
-
return this.
|
|
2037
|
+
var p3 = tmp;
|
|
2038
|
+
return this.k1o(p0, p1, p2, p3);
|
|
1994
2039
|
};
|
|
1995
2040
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1996
|
-
return 'LCHabColorSpace(' + this.
|
|
2041
|
+
return 'LCHabColorSpace(' + this.s1r_1.toString() + ')';
|
|
1997
2042
|
};
|
|
1998
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2043
|
+
protoOf(LCHabColorSpaceImpl).k1o = function (l, c, h, alpha) {
|
|
1999
2044
|
return new LCHab(l, c, h, alpha, this);
|
|
2000
2045
|
};
|
|
2001
2046
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
2002
|
-
return this.
|
|
2047
|
+
return this.s1r_1.hashCode();
|
|
2003
2048
|
};
|
|
2004
2049
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
2005
2050
|
var tmp;
|
|
2006
2051
|
if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
|
|
2007
|
-
tmp = this.
|
|
2052
|
+
tmp = this.s1r_1.equals(other.o1n());
|
|
2008
2053
|
} else {
|
|
2009
2054
|
tmp = false;
|
|
2010
2055
|
}
|
|
@@ -2012,21 +2057,21 @@
|
|
|
2012
2057
|
};
|
|
2013
2058
|
function Companion_4() {
|
|
2014
2059
|
Companion_instance_5 = this;
|
|
2015
|
-
this.
|
|
2060
|
+
this.t1o_1 = threeComponentInfo('l', 0.0, 1.0, 'a', -0.4, 0.4, 'b', -0.4, 0.4);
|
|
2016
2061
|
}
|
|
2017
|
-
protoOf(Companion_4).
|
|
2062
|
+
protoOf(Companion_4).q2 = function () {
|
|
2018
2063
|
return 'Oklab';
|
|
2019
2064
|
};
|
|
2020
|
-
protoOf(Companion_4).
|
|
2021
|
-
return this.
|
|
2065
|
+
protoOf(Companion_4).p1n = function () {
|
|
2066
|
+
return this.t1o_1;
|
|
2022
2067
|
};
|
|
2023
|
-
protoOf(Companion_4).
|
|
2024
|
-
return color.
|
|
2068
|
+
protoOf(Companion_4).j1n = function (color) {
|
|
2069
|
+
return color.d1n();
|
|
2025
2070
|
};
|
|
2026
|
-
protoOf(Companion_4).
|
|
2071
|
+
protoOf(Companion_4).q1n = function (components) {
|
|
2027
2072
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2028
2073
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2029
|
-
var size = this.
|
|
2074
|
+
var size = this.p1n().m();
|
|
2030
2075
|
// Inline function 'kotlin.require' call
|
|
2031
2076
|
var containsLower = size - 1 | 0;
|
|
2032
2077
|
var containsArg = components.length;
|
|
@@ -2037,19 +2082,20 @@
|
|
|
2037
2082
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2038
2083
|
}
|
|
2039
2084
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2040
|
-
var
|
|
2041
|
-
var
|
|
2042
|
-
var
|
|
2085
|
+
var p0 = components[0];
|
|
2086
|
+
var p1 = components[1];
|
|
2087
|
+
var p2 = components[2];
|
|
2043
2088
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2089
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2090
|
+
var tmp;
|
|
2091
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2092
|
+
tmp = components[3];
|
|
2047
2093
|
} else {
|
|
2048
2094
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2049
|
-
|
|
2095
|
+
tmp = 1.0;
|
|
2050
2096
|
}
|
|
2051
|
-
var
|
|
2052
|
-
return new Oklab(
|
|
2097
|
+
var p3 = tmp;
|
|
2098
|
+
return new Oklab(p0, p1, p2, p3);
|
|
2053
2099
|
};
|
|
2054
2100
|
var Companion_instance_5;
|
|
2055
2101
|
function Companion_getInstance_4() {
|
|
@@ -2068,50 +2114,50 @@
|
|
|
2068
2114
|
function Oklab(l, a, b, alpha) {
|
|
2069
2115
|
Companion_getInstance_4();
|
|
2070
2116
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2071
|
-
this.
|
|
2072
|
-
this.
|
|
2073
|
-
this.
|
|
2074
|
-
this.
|
|
2117
|
+
this.f1n_1 = l;
|
|
2118
|
+
this.g1n_1 = a;
|
|
2119
|
+
this.h1n_1 = b;
|
|
2120
|
+
this.i1n_1 = alpha;
|
|
2075
2121
|
}
|
|
2076
|
-
protoOf(Oklab).
|
|
2077
|
-
return this.
|
|
2122
|
+
protoOf(Oklab).g1m = function () {
|
|
2123
|
+
return this.i1n_1;
|
|
2078
2124
|
};
|
|
2079
|
-
protoOf(Oklab).
|
|
2125
|
+
protoOf(Oklab).h1m = function () {
|
|
2080
2126
|
return Companion_getInstance_4();
|
|
2081
2127
|
};
|
|
2082
|
-
protoOf(Oklab).
|
|
2128
|
+
protoOf(Oklab).i1m = function () {
|
|
2083
2129
|
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2084
|
-
var ll = this.
|
|
2085
|
-
var mm = this.
|
|
2086
|
-
var ss = this.
|
|
2130
|
+
var ll = this.f1n_1 + 0.3963377774 * this.g1n_1 + 0.2158037573 * this.h1n_1;
|
|
2131
|
+
var mm = this.f1n_1 - 0.1055613458 * this.g1n_1 - 0.0638541728 * this.h1n_1;
|
|
2132
|
+
var ss = this.f1n_1 - 0.0894841775 * this.g1n_1 - 1.291485548 * this.h1n_1;
|
|
2087
2133
|
var l = ll * ll * ll;
|
|
2088
2134
|
var m = mm * mm * mm;
|
|
2089
2135
|
var s = ss * ss * ss;
|
|
2090
2136
|
var r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
2091
2137
|
var g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
|
|
2092
2138
|
var b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
|
|
2093
|
-
var f = Companion_getInstance_6().
|
|
2094
|
-
return Companion_getInstance_6().
|
|
2139
|
+
var f = Companion_getInstance_6().y1q();
|
|
2140
|
+
return Companion_getInstance_6().k1o(f.i1r(r), f.i1r(g), f.i1r(b), this.i1n_1);
|
|
2095
2141
|
};
|
|
2096
|
-
protoOf(Oklab).
|
|
2142
|
+
protoOf(Oklab).p1m = function () {
|
|
2097
2143
|
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2098
|
-
var ll = this.
|
|
2099
|
-
var mm = this.
|
|
2100
|
-
var ss = this.
|
|
2144
|
+
var ll = this.f1n_1 + 0.3963377774 * this.g1n_1 + 0.2158037573 * this.h1n_1;
|
|
2145
|
+
var mm = this.f1n_1 - 0.1055613458 * this.g1n_1 - 0.0638541728 * this.h1n_1;
|
|
2146
|
+
var ss = this.f1n_1 - 0.0894841775 * this.g1n_1 - 1.291485548 * this.h1n_1;
|
|
2101
2147
|
var l = ll * ll * ll;
|
|
2102
2148
|
var m = mm * mm * mm;
|
|
2103
2149
|
var s = ss * ss * ss;
|
|
2104
|
-
return
|
|
2150
|
+
return Companion_getInstance_8().j1r(1.2270138511 * l - 0.5577999807 * m + 0.281256149 * s, -0.0405801784 * l + 1.1122568696 * m - 0.0716766787 * s, -0.0763812845 * l - 0.4214819784 * m + 1.5861632204 * s, this.i1n_1);
|
|
2105
2151
|
};
|
|
2106
|
-
protoOf(Oklab).
|
|
2152
|
+
protoOf(Oklab).e1n = function () {
|
|
2107
2153
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
2108
|
-
var a = this.
|
|
2109
|
-
var b = this.
|
|
2154
|
+
var a = this.g1n_1;
|
|
2155
|
+
var b = this.h1n_1;
|
|
2110
2156
|
// Inline function 'kotlin.math.sqrt' call
|
|
2111
2157
|
var x = a * a + b * b;
|
|
2112
2158
|
var c = Math.sqrt(x);
|
|
2113
2159
|
var tmp;
|
|
2114
|
-
if (c > -1.0E-7
|
|
2160
|
+
if (c > -1.0E-7 && c < 1.0E-7) {
|
|
2115
2161
|
tmp = NaN;
|
|
2116
2162
|
} else {
|
|
2117
2163
|
// Inline function 'kotlin.math.atan2' call
|
|
@@ -2121,23 +2167,23 @@
|
|
|
2121
2167
|
var h = tmp;
|
|
2122
2168
|
// Inline function 'com.github.ajalt.colormath.model.Oklab.toOklch.<anonymous>' call
|
|
2123
2169
|
var h_0 = normalizeDeg_0(h);
|
|
2124
|
-
return new Oklch(this.
|
|
2170
|
+
return new Oklch(this.f1n_1, c, h_0, this.i1n_1);
|
|
2125
2171
|
};
|
|
2126
|
-
protoOf(Oklab).
|
|
2172
|
+
protoOf(Oklab).d1n = function () {
|
|
2127
2173
|
return this;
|
|
2128
2174
|
};
|
|
2129
|
-
protoOf(Oklab).
|
|
2175
|
+
protoOf(Oklab).b6 = function () {
|
|
2130
2176
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2131
|
-
return new Float32Array([this.
|
|
2177
|
+
return new Float32Array([this.f1n_1, this.g1n_1, this.h1n_1, this.i1n_1]);
|
|
2132
2178
|
};
|
|
2133
2179
|
protoOf(Oklab).toString = function () {
|
|
2134
|
-
return 'Oklab(l=' + this.
|
|
2180
|
+
return 'Oklab(l=' + this.f1n_1 + ', a=' + this.g1n_1 + ', b=' + this.h1n_1 + ', alpha=' + this.i1n_1 + ')';
|
|
2135
2181
|
};
|
|
2136
2182
|
protoOf(Oklab).hashCode = function () {
|
|
2137
|
-
var result = getNumberHashCode(this.
|
|
2138
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2139
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2140
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2183
|
+
var result = getNumberHashCode(this.f1n_1);
|
|
2184
|
+
result = imul(result, 31) + getNumberHashCode(this.g1n_1) | 0;
|
|
2185
|
+
result = imul(result, 31) + getNumberHashCode(this.h1n_1) | 0;
|
|
2186
|
+
result = imul(result, 31) + getNumberHashCode(this.i1n_1) | 0;
|
|
2141
2187
|
return result;
|
|
2142
2188
|
};
|
|
2143
2189
|
protoOf(Oklab).equals = function (other) {
|
|
@@ -2146,33 +2192,33 @@
|
|
|
2146
2192
|
if (!(other instanceof Oklab))
|
|
2147
2193
|
return false;
|
|
2148
2194
|
var tmp0_other_with_cast = other instanceof Oklab ? other : THROW_CCE();
|
|
2149
|
-
if (!equals(this.
|
|
2195
|
+
if (!equals(this.f1n_1, tmp0_other_with_cast.f1n_1))
|
|
2150
2196
|
return false;
|
|
2151
|
-
if (!equals(this.
|
|
2197
|
+
if (!equals(this.g1n_1, tmp0_other_with_cast.g1n_1))
|
|
2152
2198
|
return false;
|
|
2153
|
-
if (!equals(this.
|
|
2199
|
+
if (!equals(this.h1n_1, tmp0_other_with_cast.h1n_1))
|
|
2154
2200
|
return false;
|
|
2155
|
-
if (!equals(this.
|
|
2201
|
+
if (!equals(this.i1n_1, tmp0_other_with_cast.i1n_1))
|
|
2156
2202
|
return false;
|
|
2157
2203
|
return true;
|
|
2158
2204
|
};
|
|
2159
2205
|
function Companion_5() {
|
|
2160
2206
|
Companion_instance_6 = this;
|
|
2161
|
-
this.
|
|
2207
|
+
this.u1o_1 = componentInfoList([new ColorComponentInfo('l', false, 0.0, 1.0), new ColorComponentInfo('c', false, 0.0, 0.4), new ColorComponentInfo('h', true, 0.0, 360.0)]);
|
|
2162
2208
|
}
|
|
2163
|
-
protoOf(Companion_5).
|
|
2209
|
+
protoOf(Companion_5).q2 = function () {
|
|
2164
2210
|
return 'Oklch';
|
|
2165
2211
|
};
|
|
2166
|
-
protoOf(Companion_5).
|
|
2167
|
-
return this.
|
|
2212
|
+
protoOf(Companion_5).p1n = function () {
|
|
2213
|
+
return this.u1o_1;
|
|
2168
2214
|
};
|
|
2169
|
-
protoOf(Companion_5).
|
|
2170
|
-
return color.
|
|
2215
|
+
protoOf(Companion_5).j1n = function (color) {
|
|
2216
|
+
return color.e1n();
|
|
2171
2217
|
};
|
|
2172
|
-
protoOf(Companion_5).
|
|
2218
|
+
protoOf(Companion_5).q1n = function (components) {
|
|
2173
2219
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2174
2220
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2175
|
-
var size = this.
|
|
2221
|
+
var size = this.p1n().m();
|
|
2176
2222
|
// Inline function 'kotlin.require' call
|
|
2177
2223
|
var containsLower = size - 1 | 0;
|
|
2178
2224
|
var containsArg = components.length;
|
|
@@ -2183,19 +2229,20 @@
|
|
|
2183
2229
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2184
2230
|
}
|
|
2185
2231
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2186
|
-
var
|
|
2187
|
-
var
|
|
2188
|
-
var
|
|
2232
|
+
var p0 = components[0];
|
|
2233
|
+
var p1 = components[1];
|
|
2234
|
+
var p2 = components[2];
|
|
2189
2235
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2236
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2237
|
+
var tmp;
|
|
2238
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2239
|
+
tmp = components[3];
|
|
2193
2240
|
} else {
|
|
2194
2241
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2195
|
-
|
|
2242
|
+
tmp = 1.0;
|
|
2196
2243
|
}
|
|
2197
|
-
var
|
|
2198
|
-
return new Oklch(
|
|
2244
|
+
var p3 = tmp;
|
|
2245
|
+
return new Oklch(p0, p1, p2, p3);
|
|
2199
2246
|
};
|
|
2200
2247
|
var Companion_instance_6;
|
|
2201
2248
|
function Companion_getInstance_5() {
|
|
@@ -2206,53 +2253,53 @@
|
|
|
2206
2253
|
function Oklch(l, c, h, alpha) {
|
|
2207
2254
|
Companion_getInstance_5();
|
|
2208
2255
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2209
|
-
this.
|
|
2210
|
-
this.
|
|
2211
|
-
this.
|
|
2212
|
-
this.
|
|
2256
|
+
this.g1q_1 = l;
|
|
2257
|
+
this.h1q_1 = c;
|
|
2258
|
+
this.i1q_1 = h;
|
|
2259
|
+
this.j1q_1 = alpha;
|
|
2213
2260
|
}
|
|
2214
|
-
protoOf(Oklch).
|
|
2215
|
-
return this.
|
|
2261
|
+
protoOf(Oklch).k1q = function () {
|
|
2262
|
+
return this.i1q_1;
|
|
2216
2263
|
};
|
|
2217
|
-
protoOf(Oklch).
|
|
2218
|
-
return this.
|
|
2264
|
+
protoOf(Oklch).g1m = function () {
|
|
2265
|
+
return this.j1q_1;
|
|
2219
2266
|
};
|
|
2220
|
-
protoOf(Oklch).
|
|
2267
|
+
protoOf(Oklch).h1m = function () {
|
|
2221
2268
|
return Companion_getInstance_5();
|
|
2222
2269
|
};
|
|
2223
|
-
protoOf(Oklch).
|
|
2224
|
-
return this.
|
|
2270
|
+
protoOf(Oklch).i1m = function () {
|
|
2271
|
+
return this.d1n().i1m();
|
|
2225
2272
|
};
|
|
2226
|
-
protoOf(Oklch).
|
|
2227
|
-
return this.
|
|
2273
|
+
protoOf(Oklch).p1m = function () {
|
|
2274
|
+
return this.d1n().p1m();
|
|
2228
2275
|
};
|
|
2229
|
-
protoOf(Oklch).
|
|
2276
|
+
protoOf(Oklch).d1n = function () {
|
|
2230
2277
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
2231
|
-
var c = this.
|
|
2232
|
-
var h = this.
|
|
2278
|
+
var c = this.h1q_1;
|
|
2279
|
+
var h = this.i1q_1;
|
|
2233
2280
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
2234
2281
|
// Inline function 'kotlin.math.cos' call
|
|
2235
2282
|
var a = c * Math.cos(hDegrees);
|
|
2236
2283
|
// Inline function 'kotlin.math.sin' call
|
|
2237
2284
|
var b = c * Math.sin(hDegrees);
|
|
2238
2285
|
// Inline function 'com.github.ajalt.colormath.model.Oklch.toOklab.<anonymous>' call
|
|
2239
|
-
return new Oklab(this.
|
|
2286
|
+
return new Oklab(this.g1q_1, a, b, this.j1q_1);
|
|
2240
2287
|
};
|
|
2241
|
-
protoOf(Oklch).
|
|
2288
|
+
protoOf(Oklch).e1n = function () {
|
|
2242
2289
|
return this;
|
|
2243
2290
|
};
|
|
2244
|
-
protoOf(Oklch).
|
|
2291
|
+
protoOf(Oklch).b6 = function () {
|
|
2245
2292
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2246
|
-
return new Float32Array([this.
|
|
2293
|
+
return new Float32Array([this.g1q_1, this.h1q_1, this.i1q_1, this.j1q_1]);
|
|
2247
2294
|
};
|
|
2248
2295
|
protoOf(Oklch).toString = function () {
|
|
2249
|
-
return 'Oklch(l=' + this.
|
|
2296
|
+
return 'Oklch(l=' + this.g1q_1 + ', c=' + this.h1q_1 + ', h=' + this.i1q_1 + ', alpha=' + this.j1q_1 + ')';
|
|
2250
2297
|
};
|
|
2251
2298
|
protoOf(Oklch).hashCode = function () {
|
|
2252
|
-
var result = getNumberHashCode(this.
|
|
2253
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2254
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2255
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2299
|
+
var result = getNumberHashCode(this.g1q_1);
|
|
2300
|
+
result = imul(result, 31) + getNumberHashCode(this.h1q_1) | 0;
|
|
2301
|
+
result = imul(result, 31) + getNumberHashCode(this.i1q_1) | 0;
|
|
2302
|
+
result = imul(result, 31) + getNumberHashCode(this.j1q_1) | 0;
|
|
2256
2303
|
return result;
|
|
2257
2304
|
};
|
|
2258
2305
|
protoOf(Oklch).equals = function (other) {
|
|
@@ -2261,30 +2308,30 @@
|
|
|
2261
2308
|
if (!(other instanceof Oklch))
|
|
2262
2309
|
return false;
|
|
2263
2310
|
var tmp0_other_with_cast = other instanceof Oklch ? other : THROW_CCE();
|
|
2264
|
-
if (!equals(this.
|
|
2311
|
+
if (!equals(this.g1q_1, tmp0_other_with_cast.g1q_1))
|
|
2265
2312
|
return false;
|
|
2266
|
-
if (!equals(this.
|
|
2313
|
+
if (!equals(this.h1q_1, tmp0_other_with_cast.h1q_1))
|
|
2267
2314
|
return false;
|
|
2268
|
-
if (!equals(this.
|
|
2315
|
+
if (!equals(this.i1q_1, tmp0_other_with_cast.i1q_1))
|
|
2269
2316
|
return false;
|
|
2270
|
-
if (!equals(this.
|
|
2317
|
+
if (!equals(this.j1q_1, tmp0_other_with_cast.j1q_1))
|
|
2271
2318
|
return false;
|
|
2272
2319
|
return true;
|
|
2273
2320
|
};
|
|
2274
2321
|
function GammaTransferFunctions(gamma) {
|
|
2275
|
-
this.
|
|
2322
|
+
this.v1r_1 = gamma;
|
|
2276
2323
|
}
|
|
2277
|
-
protoOf(GammaTransferFunctions).
|
|
2278
|
-
return spow(x, this.
|
|
2324
|
+
protoOf(GammaTransferFunctions).h1r = function (x) {
|
|
2325
|
+
return spow(x, this.v1r_1);
|
|
2279
2326
|
};
|
|
2280
|
-
protoOf(GammaTransferFunctions).
|
|
2281
|
-
return spow(x, 1.0 / this.
|
|
2327
|
+
protoOf(GammaTransferFunctions).i1r = function (x) {
|
|
2328
|
+
return spow(x, 1.0 / this.v1r_1);
|
|
2282
2329
|
};
|
|
2283
2330
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
2284
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
2331
|
+
return 'GammaTransferFunctions(gamma=' + this.v1r_1 + ')';
|
|
2285
2332
|
};
|
|
2286
2333
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
2287
|
-
return getNumberHashCode(this.
|
|
2334
|
+
return getNumberHashCode(this.v1r_1);
|
|
2288
2335
|
};
|
|
2289
2336
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
2290
2337
|
if (this === other)
|
|
@@ -2292,16 +2339,16 @@
|
|
|
2292
2339
|
if (!(other instanceof GammaTransferFunctions))
|
|
2293
2340
|
return false;
|
|
2294
2341
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
2295
|
-
if (!equals(this.
|
|
2342
|
+
if (!equals(this.v1r_1, tmp0_other_with_cast.v1r_1))
|
|
2296
2343
|
return false;
|
|
2297
2344
|
return true;
|
|
2298
2345
|
};
|
|
2299
2346
|
function LinearTransferFunctions() {
|
|
2300
2347
|
}
|
|
2301
|
-
protoOf(LinearTransferFunctions).
|
|
2348
|
+
protoOf(LinearTransferFunctions).h1r = function (x) {
|
|
2302
2349
|
return x;
|
|
2303
2350
|
};
|
|
2304
|
-
protoOf(LinearTransferFunctions).
|
|
2351
|
+
protoOf(LinearTransferFunctions).i1r = function (x) {
|
|
2305
2352
|
return x;
|
|
2306
2353
|
};
|
|
2307
2354
|
var LinearTransferFunctions_instance;
|
|
@@ -2312,49 +2359,49 @@
|
|
|
2312
2359
|
}
|
|
2313
2360
|
function Companion_6() {
|
|
2314
2361
|
Companion_instance_7 = this;
|
|
2315
|
-
this.
|
|
2362
|
+
this.i1o_1 = RGBColorSpaces_getInstance().v1o_1;
|
|
2316
2363
|
}
|
|
2317
|
-
protoOf(Companion_6).
|
|
2318
|
-
return this.
|
|
2364
|
+
protoOf(Companion_6).p1n = function () {
|
|
2365
|
+
return this.i1o_1.p1n();
|
|
2319
2366
|
};
|
|
2320
|
-
protoOf(Companion_6).
|
|
2321
|
-
return this.
|
|
2367
|
+
protoOf(Companion_6).x1r = function () {
|
|
2368
|
+
return this.i1o_1.x1r();
|
|
2322
2369
|
};
|
|
2323
|
-
protoOf(Companion_6).
|
|
2324
|
-
return this.
|
|
2370
|
+
protoOf(Companion_6).w1r = function () {
|
|
2371
|
+
return this.i1o_1.w1r();
|
|
2325
2372
|
};
|
|
2326
|
-
protoOf(Companion_6).
|
|
2327
|
-
return this.
|
|
2373
|
+
protoOf(Companion_6).q2 = function () {
|
|
2374
|
+
return this.i1o_1.q2();
|
|
2328
2375
|
};
|
|
2329
|
-
protoOf(Companion_6).
|
|
2330
|
-
return this.
|
|
2376
|
+
protoOf(Companion_6).y1q = function () {
|
|
2377
|
+
return this.i1o_1.y1q();
|
|
2331
2378
|
};
|
|
2332
|
-
protoOf(Companion_6).
|
|
2333
|
-
return this.
|
|
2379
|
+
protoOf(Companion_6).o1n = function () {
|
|
2380
|
+
return this.i1o_1.o1n();
|
|
2334
2381
|
};
|
|
2335
|
-
protoOf(Companion_6).
|
|
2336
|
-
return this.
|
|
2382
|
+
protoOf(Companion_6).j1n = function (color) {
|
|
2383
|
+
return this.i1o_1.j1n(color);
|
|
2337
2384
|
};
|
|
2338
|
-
protoOf(Companion_6).
|
|
2339
|
-
return this.
|
|
2385
|
+
protoOf(Companion_6).q1n = function (components) {
|
|
2386
|
+
return this.i1o_1.q1n(components);
|
|
2340
2387
|
};
|
|
2341
|
-
protoOf(Companion_6).
|
|
2342
|
-
return this.
|
|
2388
|
+
protoOf(Companion_6).o1q = function (r, g, b, alpha) {
|
|
2389
|
+
return this.i1o_1.o1q(r, g, b, alpha);
|
|
2343
2390
|
};
|
|
2344
|
-
protoOf(Companion_6).
|
|
2345
|
-
return this.
|
|
2391
|
+
protoOf(Companion_6).k1o = function (r, g, b, alpha) {
|
|
2392
|
+
return this.i1o_1.k1o(r, g, b, alpha);
|
|
2346
2393
|
};
|
|
2347
|
-
protoOf(Companion_6).
|
|
2348
|
-
return this.
|
|
2394
|
+
protoOf(Companion_6).j1r = function (r, g, b, alpha) {
|
|
2395
|
+
return this.i1o_1.j1r(r, g, b, alpha);
|
|
2349
2396
|
};
|
|
2350
|
-
protoOf(Companion_6).
|
|
2351
|
-
return this.
|
|
2397
|
+
protoOf(Companion_6).j1o = function (hex) {
|
|
2398
|
+
return this.i1o_1.j1o(hex);
|
|
2352
2399
|
};
|
|
2353
2400
|
protoOf(Companion_6).equals = function (other) {
|
|
2354
|
-
return equals(RGBColorSpaces_getInstance().
|
|
2401
|
+
return equals(RGBColorSpaces_getInstance().v1o_1, other);
|
|
2355
2402
|
};
|
|
2356
2403
|
protoOf(Companion_6).hashCode = function () {
|
|
2357
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
2404
|
+
return hashCode(RGBColorSpaces_getInstance().v1o_1);
|
|
2358
2405
|
};
|
|
2359
2406
|
var Companion_instance_7;
|
|
2360
2407
|
function Companion_getInstance_6() {
|
|
@@ -2364,37 +2411,37 @@
|
|
|
2364
2411
|
}
|
|
2365
2412
|
function RGB(r, g, b, alpha, space) {
|
|
2366
2413
|
Companion_getInstance_6();
|
|
2367
|
-
this.
|
|
2368
|
-
this.
|
|
2369
|
-
this.
|
|
2370
|
-
this.
|
|
2371
|
-
this.
|
|
2414
|
+
this.k1m_1 = r;
|
|
2415
|
+
this.l1m_1 = g;
|
|
2416
|
+
this.m1m_1 = b;
|
|
2417
|
+
this.n1m_1 = alpha;
|
|
2418
|
+
this.o1m_1 = space;
|
|
2372
2419
|
}
|
|
2373
|
-
protoOf(RGB).
|
|
2374
|
-
return this.
|
|
2420
|
+
protoOf(RGB).g1m = function () {
|
|
2421
|
+
return this.n1m_1;
|
|
2375
2422
|
};
|
|
2376
|
-
protoOf(RGB).
|
|
2377
|
-
return this.
|
|
2423
|
+
protoOf(RGB).h1m = function () {
|
|
2424
|
+
return this.o1m_1;
|
|
2378
2425
|
};
|
|
2379
|
-
protoOf(RGB).
|
|
2426
|
+
protoOf(RGB).s1p = function () {
|
|
2380
2427
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2381
2428
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
2382
|
-
var $this$toSRGB = this.
|
|
2383
|
-
return _RGBInt___init__impl__lqova7_1($this$toSRGB.
|
|
2429
|
+
var $this$toSRGB = this.y1r(SRGB_getInstance());
|
|
2430
|
+
return _RGBInt___init__impl__lqova7_1($this$toSRGB.k1m_1, $this$toSRGB.l1m_1, $this$toSRGB.m1m_1, nanToOne($this$toSRGB.n1m_1));
|
|
2384
2431
|
};
|
|
2385
|
-
protoOf(RGB).
|
|
2386
|
-
var f = SRGB_getInstance().
|
|
2387
|
-
return equals(this.
|
|
2432
|
+
protoOf(RGB).y1r = function (space) {
|
|
2433
|
+
var f = SRGB_getInstance().y1q();
|
|
2434
|
+
return equals(this.o1m_1, space) ? this : equals(this.o1m_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().w1o_1) ? space.k1o(f.h1r(this.k1m_1), f.h1r(this.l1m_1), f.h1r(this.m1m_1), this.n1m_1) : equals(this.o1m_1, RGBColorSpaces_getInstance().w1o_1) && equals(space, SRGB_getInstance()) ? space.k1o(f.i1r(this.k1m_1), f.i1r(this.l1m_1), f.i1r(this.m1m_1), this.n1m_1) : this.p1m().a1s(space);
|
|
2388
2435
|
};
|
|
2389
|
-
protoOf(RGB).
|
|
2436
|
+
protoOf(RGB).j1m = function () {
|
|
2390
2437
|
var tmp$ret$3;
|
|
2391
2438
|
$l$block: {
|
|
2392
2439
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2393
2440
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2394
|
-
var $this$toSRGB = this.
|
|
2395
|
-
var r = $this$toSRGB.
|
|
2396
|
-
var g = $this$toSRGB.
|
|
2397
|
-
var b = $this$toSRGB.
|
|
2441
|
+
var $this$toSRGB = this.y1r(SRGB_getInstance());
|
|
2442
|
+
var r = $this$toSRGB.k1m_1;
|
|
2443
|
+
var g = $this$toSRGB.l1m_1;
|
|
2444
|
+
var b = $this$toSRGB.m1m_1;
|
|
2398
2445
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2399
2446
|
var min = Math.min(r, g, b);
|
|
2400
2447
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -2417,33 +2464,33 @@
|
|
|
2417
2464
|
var h_0 = normalizeDeg(h);
|
|
2418
2465
|
var l = (min + max) / 2.0;
|
|
2419
2466
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
2420
|
-
tmp$ret$3 = new HSL(h_0, s, l, this.
|
|
2467
|
+
tmp$ret$3 = new HSL(h_0, s, l, this.n1m_1);
|
|
2421
2468
|
break $l$block;
|
|
2422
2469
|
}
|
|
2423
2470
|
return tmp$ret$3;
|
|
2424
2471
|
};
|
|
2425
|
-
protoOf(RGB).
|
|
2426
|
-
var f = this.
|
|
2472
|
+
protoOf(RGB).p1m = function () {
|
|
2473
|
+
var f = this.o1m_1.y1q();
|
|
2427
2474
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2428
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.
|
|
2429
|
-
var v0 = f.
|
|
2430
|
-
var v1 = f.
|
|
2431
|
-
var v2 = f.
|
|
2475
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.o1m_1.w1r());
|
|
2476
|
+
var v0 = f.h1r(this.k1m_1);
|
|
2477
|
+
var v1 = f.h1r(this.l1m_1);
|
|
2478
|
+
var v2 = f.h1r(this.m1m_1);
|
|
2432
2479
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
2433
2480
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
2434
2481
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
2435
2482
|
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
2436
|
-
return XYZColorSpace_0(this.
|
|
2483
|
+
return XYZColorSpace_0(this.o1m_1.o1n()).k1o(x, y, z, this.n1m_1);
|
|
2437
2484
|
};
|
|
2438
|
-
protoOf(RGB).
|
|
2485
|
+
protoOf(RGB).c1n = function () {
|
|
2439
2486
|
var tmp$ret$3;
|
|
2440
2487
|
$l$block: {
|
|
2441
2488
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2442
2489
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2443
|
-
var $this$toSRGB = this.
|
|
2444
|
-
var r = $this$toSRGB.
|
|
2445
|
-
var g = $this$toSRGB.
|
|
2446
|
-
var b = $this$toSRGB.
|
|
2490
|
+
var $this$toSRGB = this.y1r(SRGB_getInstance());
|
|
2491
|
+
var r = $this$toSRGB.k1m_1;
|
|
2492
|
+
var g = $this$toSRGB.l1m_1;
|
|
2493
|
+
var b = $this$toSRGB.m1m_1;
|
|
2447
2494
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2448
2495
|
var min = Math.min(r, g, b);
|
|
2449
2496
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -2464,17 +2511,17 @@
|
|
|
2464
2511
|
var h = tmp * 60;
|
|
2465
2512
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHWB.<anonymous>' call
|
|
2466
2513
|
var hue = normalizeDeg(h);
|
|
2467
|
-
tmp$ret$3 = new HWB(hue, min, 1.0 - max, this.
|
|
2514
|
+
tmp$ret$3 = new HWB(hue, min, 1.0 - max, this.n1m_1);
|
|
2468
2515
|
break $l$block;
|
|
2469
2516
|
}
|
|
2470
2517
|
return tmp$ret$3;
|
|
2471
2518
|
};
|
|
2472
|
-
protoOf(RGB).
|
|
2473
|
-
if (!equals(this.
|
|
2474
|
-
return this.
|
|
2475
|
-
var r = this.
|
|
2476
|
-
var g = this.
|
|
2477
|
-
var b = this.
|
|
2519
|
+
protoOf(RGB).d1n = function () {
|
|
2520
|
+
if (!equals(this.o1m_1, RGBColorSpaces_getInstance().v1o_1))
|
|
2521
|
+
return this.p1m().d1n();
|
|
2522
|
+
var r = this.o1m_1.y1q().h1r(this.k1m_1);
|
|
2523
|
+
var g = this.o1m_1.y1q().h1r(this.l1m_1);
|
|
2524
|
+
var b = this.o1m_1.y1q().h1r(this.m1m_1);
|
|
2478
2525
|
var l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
|
|
2479
2526
|
var m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
|
|
2480
2527
|
var s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
|
|
@@ -2484,24 +2531,24 @@
|
|
|
2484
2531
|
var mm = Math.cbrt(m);
|
|
2485
2532
|
// Inline function 'kotlin.math.cbrt' call
|
|
2486
2533
|
var ss = Math.cbrt(s);
|
|
2487
|
-
return Oklab_init_$Create$(0.21045426 * ll + 0.7936178 * mm - 0.004072047 * ss, 1.9779985 * ll - 2.4285922 * mm + 0.4505937 * ss, 0.025904037 * ll + 0.78277177 * mm - 0.80867577 * ss, this.
|
|
2534
|
+
return Oklab_init_$Create$(0.21045426 * ll + 0.7936178 * mm - 0.004072047 * ss, 1.9779985 * ll - 2.4285922 * mm + 0.4505937 * ss, 0.025904037 * ll + 0.78277177 * mm - 0.80867577 * ss, this.n1m_1);
|
|
2488
2535
|
};
|
|
2489
|
-
protoOf(RGB).
|
|
2490
|
-
return this.
|
|
2536
|
+
protoOf(RGB).i1m = function () {
|
|
2537
|
+
return this.y1r(RGBColorSpaces_getInstance().v1o_1);
|
|
2491
2538
|
};
|
|
2492
|
-
protoOf(RGB).
|
|
2539
|
+
protoOf(RGB).b6 = function () {
|
|
2493
2540
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2494
|
-
return new Float32Array([this.
|
|
2541
|
+
return new Float32Array([this.k1m_1, this.l1m_1, this.m1m_1, this.n1m_1]);
|
|
2495
2542
|
};
|
|
2496
2543
|
protoOf(RGB).toString = function () {
|
|
2497
|
-
return 'RGB(r=' + this.
|
|
2544
|
+
return 'RGB(r=' + this.k1m_1 + ', g=' + this.l1m_1 + ', b=' + this.m1m_1 + ', alpha=' + this.n1m_1 + ', space=' + toString(this.o1m_1) + ')';
|
|
2498
2545
|
};
|
|
2499
2546
|
protoOf(RGB).hashCode = function () {
|
|
2500
|
-
var result = getNumberHashCode(this.
|
|
2501
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2502
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2503
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2504
|
-
result = imul(result, 31) + hashCode(this.
|
|
2547
|
+
var result = getNumberHashCode(this.k1m_1);
|
|
2548
|
+
result = imul(result, 31) + getNumberHashCode(this.l1m_1) | 0;
|
|
2549
|
+
result = imul(result, 31) + getNumberHashCode(this.m1m_1) | 0;
|
|
2550
|
+
result = imul(result, 31) + getNumberHashCode(this.n1m_1) | 0;
|
|
2551
|
+
result = imul(result, 31) + hashCode(this.o1m_1) | 0;
|
|
2505
2552
|
return result;
|
|
2506
2553
|
};
|
|
2507
2554
|
protoOf(RGB).equals = function (other) {
|
|
@@ -2510,15 +2557,15 @@
|
|
|
2510
2557
|
if (!(other instanceof RGB))
|
|
2511
2558
|
return false;
|
|
2512
2559
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
2513
|
-
if (!equals(this.
|
|
2560
|
+
if (!equals(this.k1m_1, tmp0_other_with_cast.k1m_1))
|
|
2514
2561
|
return false;
|
|
2515
|
-
if (!equals(this.
|
|
2562
|
+
if (!equals(this.l1m_1, tmp0_other_with_cast.l1m_1))
|
|
2516
2563
|
return false;
|
|
2517
|
-
if (!equals(this.
|
|
2564
|
+
if (!equals(this.m1m_1, tmp0_other_with_cast.m1m_1))
|
|
2518
2565
|
return false;
|
|
2519
|
-
if (!equals(this.
|
|
2566
|
+
if (!equals(this.n1m_1, tmp0_other_with_cast.n1m_1))
|
|
2520
2567
|
return false;
|
|
2521
|
-
if (!equals(this.
|
|
2568
|
+
if (!equals(this.o1m_1, tmp0_other_with_cast.o1m_1))
|
|
2522
2569
|
return false;
|
|
2523
2570
|
return true;
|
|
2524
2571
|
};
|
|
@@ -2619,17 +2666,17 @@
|
|
|
2619
2666
|
}
|
|
2620
2667
|
var ACES_AP1_B;
|
|
2621
2668
|
function RGBColorSpaces$SRGB$lambda($this$$receiver, it) {
|
|
2622
|
-
return it.
|
|
2669
|
+
return it.i1m();
|
|
2623
2670
|
}
|
|
2624
2671
|
function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
|
|
2625
2672
|
var tmp;
|
|
2626
2673
|
if (color instanceof RGB) {
|
|
2627
|
-
tmp = color.
|
|
2674
|
+
tmp = color.y1r($this$$receiver);
|
|
2628
2675
|
} else {
|
|
2629
2676
|
if (color instanceof ICtCp) {
|
|
2630
|
-
tmp = color.
|
|
2677
|
+
tmp = color.x1q();
|
|
2631
2678
|
} else {
|
|
2632
|
-
tmp = color.
|
|
2679
|
+
tmp = color.p1m().a1s($this$$receiver);
|
|
2633
2680
|
}
|
|
2634
2681
|
}
|
|
2635
2682
|
return tmp;
|
|
@@ -2637,29 +2684,29 @@
|
|
|
2637
2684
|
function RGBColorSpaces() {
|
|
2638
2685
|
RGBColorSpaces_instance = this;
|
|
2639
2686
|
var tmp = this;
|
|
2640
|
-
var tmp_0 = Illuminant_getInstance().
|
|
2687
|
+
var tmp_0 = Illuminant_getInstance().p1p_1;
|
|
2641
2688
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
2642
2689
|
var tmp_2 = get_SRGB_R();
|
|
2643
2690
|
var tmp_3 = get_SRGB_G();
|
|
2644
2691
|
var tmp_4 = get_SRGB_B();
|
|
2645
|
-
tmp.
|
|
2646
|
-
this.
|
|
2647
|
-
this.
|
|
2648
|
-
this.
|
|
2649
|
-
this.
|
|
2650
|
-
this.
|
|
2651
|
-
this.
|
|
2692
|
+
tmp.v1o_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
2693
|
+
this.w1o_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().p1p_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
2694
|
+
this.x1o_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
2695
|
+
this.y1o_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2696
|
+
this.z1o_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2697
|
+
this.a1p_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2698
|
+
this.b1p_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().p1p_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));
|
|
2652
2699
|
var tmp_5 = this;
|
|
2653
|
-
var tmp_6 = Illuminant_getInstance().
|
|
2700
|
+
var tmp_6 = Illuminant_getInstance().p1p_1;
|
|
2654
2701
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
2655
2702
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
2656
2703
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
2657
2704
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
2658
|
-
tmp_5.
|
|
2659
|
-
this.
|
|
2660
|
-
this.
|
|
2661
|
-
this.
|
|
2662
|
-
this.
|
|
2705
|
+
tmp_5.c1p_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
2706
|
+
this.d1p_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().p1p_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
2707
|
+
this.e1p_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));
|
|
2708
|
+
this.f1p_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().p1p_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2709
|
+
this.g1p_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().n1p_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
2663
2710
|
}
|
|
2664
2711
|
var RGBColorSpaces_instance;
|
|
2665
2712
|
function RGBColorSpaces_getInstance() {
|
|
@@ -2669,49 +2716,49 @@
|
|
|
2669
2716
|
}
|
|
2670
2717
|
function SRGB() {
|
|
2671
2718
|
SRGB_instance = this;
|
|
2672
|
-
this.
|
|
2719
|
+
this.q1q_1 = RGBColorSpaces_getInstance().v1o_1;
|
|
2673
2720
|
}
|
|
2674
|
-
protoOf(SRGB).
|
|
2675
|
-
return this.
|
|
2721
|
+
protoOf(SRGB).p1n = function () {
|
|
2722
|
+
return this.q1q_1.p1n();
|
|
2676
2723
|
};
|
|
2677
|
-
protoOf(SRGB).
|
|
2678
|
-
return this.
|
|
2724
|
+
protoOf(SRGB).x1r = function () {
|
|
2725
|
+
return this.q1q_1.x1r();
|
|
2679
2726
|
};
|
|
2680
|
-
protoOf(SRGB).
|
|
2681
|
-
return this.
|
|
2727
|
+
protoOf(SRGB).w1r = function () {
|
|
2728
|
+
return this.q1q_1.w1r();
|
|
2682
2729
|
};
|
|
2683
|
-
protoOf(SRGB).
|
|
2684
|
-
return this.
|
|
2730
|
+
protoOf(SRGB).q2 = function () {
|
|
2731
|
+
return this.q1q_1.q2();
|
|
2685
2732
|
};
|
|
2686
|
-
protoOf(SRGB).
|
|
2687
|
-
return this.
|
|
2733
|
+
protoOf(SRGB).y1q = function () {
|
|
2734
|
+
return this.q1q_1.y1q();
|
|
2688
2735
|
};
|
|
2689
|
-
protoOf(SRGB).
|
|
2690
|
-
return this.
|
|
2736
|
+
protoOf(SRGB).o1n = function () {
|
|
2737
|
+
return this.q1q_1.o1n();
|
|
2691
2738
|
};
|
|
2692
|
-
protoOf(SRGB).
|
|
2693
|
-
return this.
|
|
2739
|
+
protoOf(SRGB).j1n = function (color) {
|
|
2740
|
+
return this.q1q_1.j1n(color);
|
|
2694
2741
|
};
|
|
2695
|
-
protoOf(SRGB).
|
|
2696
|
-
return this.
|
|
2742
|
+
protoOf(SRGB).q1n = function (components) {
|
|
2743
|
+
return this.q1q_1.q1n(components);
|
|
2697
2744
|
};
|
|
2698
|
-
protoOf(SRGB).
|
|
2699
|
-
return this.
|
|
2745
|
+
protoOf(SRGB).o1q = function (r, g, b, alpha) {
|
|
2746
|
+
return this.q1q_1.o1q(r, g, b, alpha);
|
|
2700
2747
|
};
|
|
2701
|
-
protoOf(SRGB).
|
|
2702
|
-
return this.
|
|
2748
|
+
protoOf(SRGB).k1o = function (r, g, b, alpha) {
|
|
2749
|
+
return this.q1q_1.k1o(r, g, b, alpha);
|
|
2703
2750
|
};
|
|
2704
|
-
protoOf(SRGB).
|
|
2705
|
-
return this.
|
|
2751
|
+
protoOf(SRGB).j1r = function (r, g, b, alpha) {
|
|
2752
|
+
return this.q1q_1.j1r(r, g, b, alpha);
|
|
2706
2753
|
};
|
|
2707
|
-
protoOf(SRGB).
|
|
2708
|
-
return this.
|
|
2754
|
+
protoOf(SRGB).j1o = function (hex) {
|
|
2755
|
+
return this.q1q_1.j1o(hex);
|
|
2709
2756
|
};
|
|
2710
2757
|
protoOf(SRGB).equals = function (other) {
|
|
2711
|
-
return equals(RGBColorSpaces_getInstance().
|
|
2758
|
+
return equals(RGBColorSpaces_getInstance().v1o_1, other);
|
|
2712
2759
|
};
|
|
2713
2760
|
protoOf(SRGB).hashCode = function () {
|
|
2714
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
2761
|
+
return hashCode(RGBColorSpaces_getInstance().v1o_1);
|
|
2715
2762
|
};
|
|
2716
2763
|
protoOf(SRGB).toString = function () {
|
|
2717
2764
|
return 'sRGB';
|
|
@@ -2723,36 +2770,36 @@
|
|
|
2723
2770
|
return SRGB_instance;
|
|
2724
2771
|
}
|
|
2725
2772
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
2726
|
-
this.
|
|
2727
|
-
this.
|
|
2728
|
-
this.
|
|
2729
|
-
this.
|
|
2730
|
-
this.
|
|
2731
|
-
this.
|
|
2732
|
-
this.
|
|
2733
|
-
this.
|
|
2734
|
-
this.
|
|
2735
|
-
this.
|
|
2736
|
-
}
|
|
2737
|
-
protoOf(RGBColorSpaceImpl).
|
|
2738
|
-
return this.
|
|
2739
|
-
};
|
|
2740
|
-
protoOf(RGBColorSpaceImpl).w1l = function () {
|
|
2741
|
-
return this.i1q_1;
|
|
2773
|
+
this.b1s_1 = name;
|
|
2774
|
+
this.c1s_1 = whitePoint;
|
|
2775
|
+
this.d1s_1 = transferFunctions;
|
|
2776
|
+
this.e1s_1 = r;
|
|
2777
|
+
this.f1s_1 = g;
|
|
2778
|
+
this.g1s_1 = b;
|
|
2779
|
+
this.h1s_1 = convertImpl;
|
|
2780
|
+
this.i1s_1 = zeroOneComponentInfo('RGB');
|
|
2781
|
+
this.j1s_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.c1s_1, this.e1s_1, this.f1s_1, this.g1s_1));
|
|
2782
|
+
this.k1s_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.j1s_1)));
|
|
2783
|
+
}
|
|
2784
|
+
protoOf(RGBColorSpaceImpl).q2 = function () {
|
|
2785
|
+
return this.b1s_1;
|
|
2742
2786
|
};
|
|
2743
|
-
protoOf(RGBColorSpaceImpl).
|
|
2744
|
-
return this.
|
|
2787
|
+
protoOf(RGBColorSpaceImpl).o1n = function () {
|
|
2788
|
+
return this.c1s_1;
|
|
2745
2789
|
};
|
|
2746
|
-
protoOf(RGBColorSpaceImpl).
|
|
2747
|
-
return this.
|
|
2790
|
+
protoOf(RGBColorSpaceImpl).y1q = function () {
|
|
2791
|
+
return this.d1s_1;
|
|
2748
2792
|
};
|
|
2749
|
-
protoOf(RGBColorSpaceImpl).
|
|
2750
|
-
return this.
|
|
2793
|
+
protoOf(RGBColorSpaceImpl).p1n = function () {
|
|
2794
|
+
return this.i1s_1;
|
|
2751
2795
|
};
|
|
2752
|
-
protoOf(RGBColorSpaceImpl).
|
|
2796
|
+
protoOf(RGBColorSpaceImpl).j1n = function (color) {
|
|
2797
|
+
return this.h1s_1(this, color);
|
|
2798
|
+
};
|
|
2799
|
+
protoOf(RGBColorSpaceImpl).q1n = function (components) {
|
|
2753
2800
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2754
2801
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2755
|
-
var size = this.
|
|
2802
|
+
var size = this.p1n().m();
|
|
2756
2803
|
// Inline function 'kotlin.require' call
|
|
2757
2804
|
var containsLower = size - 1 | 0;
|
|
2758
2805
|
var containsArg = components.length;
|
|
@@ -2763,30 +2810,31 @@
|
|
|
2763
2810
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2764
2811
|
}
|
|
2765
2812
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2766
|
-
var
|
|
2767
|
-
var
|
|
2768
|
-
var
|
|
2813
|
+
var p0 = components[0];
|
|
2814
|
+
var p1 = components[1];
|
|
2815
|
+
var p2 = components[2];
|
|
2769
2816
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2817
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2818
|
+
var tmp;
|
|
2819
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2820
|
+
tmp = components[3];
|
|
2773
2821
|
} else {
|
|
2774
2822
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2775
|
-
|
|
2823
|
+
tmp = 1.0;
|
|
2776
2824
|
}
|
|
2777
|
-
var
|
|
2778
|
-
return this.
|
|
2825
|
+
var p3 = tmp;
|
|
2826
|
+
return this.k1o(p0, p1, p2, p3);
|
|
2779
2827
|
};
|
|
2780
|
-
protoOf(RGBColorSpaceImpl).
|
|
2781
|
-
return this.
|
|
2828
|
+
protoOf(RGBColorSpaceImpl).w1r = function () {
|
|
2829
|
+
return this.j1s_1;
|
|
2782
2830
|
};
|
|
2783
|
-
protoOf(RGBColorSpaceImpl).
|
|
2784
|
-
return this.
|
|
2831
|
+
protoOf(RGBColorSpaceImpl).x1r = function () {
|
|
2832
|
+
return this.k1s_1;
|
|
2785
2833
|
};
|
|
2786
2834
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2787
|
-
return this.
|
|
2835
|
+
return this.b1s_1;
|
|
2788
2836
|
};
|
|
2789
|
-
protoOf(RGBColorSpaceImpl).
|
|
2837
|
+
protoOf(RGBColorSpaceImpl).k1o = function (r, g, b, alpha) {
|
|
2790
2838
|
return new RGB(r, g, b, alpha, this);
|
|
2791
2839
|
};
|
|
2792
2840
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -2794,42 +2842,42 @@
|
|
|
2794
2842
|
return true;
|
|
2795
2843
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
2796
2844
|
return false;
|
|
2797
|
-
if (!(this.
|
|
2845
|
+
if (!(this.b1s_1 === other.q2()))
|
|
2798
2846
|
return false;
|
|
2799
|
-
if (!this.
|
|
2847
|
+
if (!this.c1s_1.equals(other.o1n()))
|
|
2800
2848
|
return false;
|
|
2801
|
-
if (!equals(this.
|
|
2849
|
+
if (!equals(this.d1s_1, other.y1q()))
|
|
2802
2850
|
return false;
|
|
2803
2851
|
if (other instanceof RGBColorSpaceImpl) {
|
|
2804
|
-
if (!this.
|
|
2852
|
+
if (!this.e1s_1.equals(other.e1s_1))
|
|
2805
2853
|
return false;
|
|
2806
|
-
if (!this.
|
|
2854
|
+
if (!this.f1s_1.equals(other.f1s_1))
|
|
2807
2855
|
return false;
|
|
2808
|
-
if (!this.
|
|
2856
|
+
if (!this.g1s_1.equals(other.g1s_1))
|
|
2809
2857
|
return false;
|
|
2810
2858
|
} else {
|
|
2811
|
-
if (!contentEquals(this.
|
|
2859
|
+
if (!contentEquals(this.j1s_1, other.w1r()))
|
|
2812
2860
|
return false;
|
|
2813
|
-
if (!contentEquals(this.
|
|
2861
|
+
if (!contentEquals(this.k1s_1, other.x1r()))
|
|
2814
2862
|
return false;
|
|
2815
2863
|
}
|
|
2816
2864
|
return true;
|
|
2817
2865
|
};
|
|
2818
2866
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2819
|
-
var result = getStringHashCode(this.
|
|
2820
|
-
result = imul(31, result) + this.
|
|
2821
|
-
result = imul(31, result) + hashCode(this.
|
|
2822
|
-
result = imul(31, result) + this.
|
|
2823
|
-
result = imul(31, result) + this.
|
|
2824
|
-
result = imul(31, result) + this.
|
|
2867
|
+
var result = getStringHashCode(this.b1s_1);
|
|
2868
|
+
result = imul(31, result) + this.c1s_1.hashCode() | 0;
|
|
2869
|
+
result = imul(31, result) + hashCode(this.d1s_1) | 0;
|
|
2870
|
+
result = imul(31, result) + this.e1s_1.hashCode() | 0;
|
|
2871
|
+
result = imul(31, result) + this.f1s_1.hashCode() | 0;
|
|
2872
|
+
result = imul(31, result) + this.g1s_1.hashCode() | 0;
|
|
2825
2873
|
return result;
|
|
2826
2874
|
};
|
|
2827
2875
|
function SRGBTransferFunctions() {
|
|
2828
2876
|
}
|
|
2829
|
-
protoOf(SRGBTransferFunctions).
|
|
2830
|
-
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x,
|
|
2877
|
+
protoOf(SRGBTransferFunctions).i1r = function (x) {
|
|
2878
|
+
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
2831
2879
|
};
|
|
2832
|
-
protoOf(SRGBTransferFunctions).
|
|
2880
|
+
protoOf(SRGBTransferFunctions).h1r = function (x) {
|
|
2833
2881
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2834
2882
|
};
|
|
2835
2883
|
var SRGBTransferFunctions_instance;
|
|
@@ -2842,30 +2890,39 @@
|
|
|
2842
2890
|
}
|
|
2843
2891
|
function ACESccTransferFunctions() {
|
|
2844
2892
|
ACESccTransferFunctions_instance = this;
|
|
2845
|
-
this.
|
|
2846
|
-
this.
|
|
2847
|
-
this.
|
|
2893
|
+
this.l1s_1 = 3.0517578125E-5;
|
|
2894
|
+
this.m1s_1 = 1.52587890625E-5;
|
|
2895
|
+
this.n1s_1 = -0.3013698630136986;
|
|
2848
2896
|
var tmp = this;
|
|
2849
2897
|
// Inline function 'kotlin.math.log2' call
|
|
2850
|
-
tmp.
|
|
2898
|
+
tmp.o1s_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2851
2899
|
}
|
|
2852
|
-
protoOf(ACESccTransferFunctions).
|
|
2900
|
+
protoOf(ACESccTransferFunctions).h1r = function (x) {
|
|
2853
2901
|
var tmp;
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
tmp =
|
|
2902
|
+
var tmp_0 = x;
|
|
2903
|
+
ACESccTransferFunctions_getInstance();
|
|
2904
|
+
if (tmp_0 <= -0.3013698630136986) {
|
|
2905
|
+
var tmp_1 = spow_0(2.0, x * 17.52 - 9.72);
|
|
2906
|
+
ACESccTransferFunctions_getInstance();
|
|
2907
|
+
tmp = (tmp_1 - 1.52587890625E-5) * 2.0;
|
|
2860
2908
|
} else {
|
|
2861
|
-
|
|
2909
|
+
if (x < this.o1s_1) {
|
|
2910
|
+
// Inline function 'kotlin.math.pow' call
|
|
2911
|
+
var x_0 = x * 17.52 - 9.72;
|
|
2912
|
+
tmp = Math.pow(2.0, x_0);
|
|
2913
|
+
} else {
|
|
2914
|
+
tmp = 65504.0;
|
|
2915
|
+
}
|
|
2862
2916
|
}
|
|
2863
2917
|
return tmp;
|
|
2864
2918
|
};
|
|
2865
|
-
protoOf(ACESccTransferFunctions).
|
|
2919
|
+
protoOf(ACESccTransferFunctions).i1r = function (x) {
|
|
2866
2920
|
var tmp;
|
|
2867
|
-
|
|
2921
|
+
var tmp_0 = x;
|
|
2922
|
+
ACESccTransferFunctions_getInstance();
|
|
2923
|
+
if (tmp_0 < 3.0517578125E-5) {
|
|
2868
2924
|
// Inline function 'kotlin.math.log2' call
|
|
2925
|
+
ACESccTransferFunctions_getInstance();
|
|
2869
2926
|
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
2870
2927
|
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
2871
2928
|
} else {
|
|
@@ -2882,17 +2939,20 @@
|
|
|
2882
2939
|
}
|
|
2883
2940
|
function ACEScctTransferFunctions() {
|
|
2884
2941
|
ACEScctTransferFunctions_instance = this;
|
|
2885
|
-
this.
|
|
2886
|
-
this.
|
|
2942
|
+
this.p1s_1 = 10.5402377416545;
|
|
2943
|
+
this.q1s_1 = 0.0729055341958355;
|
|
2887
2944
|
var tmp = this;
|
|
2888
2945
|
// Inline function 'kotlin.math.log2' call
|
|
2889
|
-
tmp.
|
|
2946
|
+
tmp.r1s_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2890
2947
|
}
|
|
2891
|
-
protoOf(ACEScctTransferFunctions).
|
|
2948
|
+
protoOf(ACEScctTransferFunctions).h1r = function (x) {
|
|
2892
2949
|
var tmp;
|
|
2893
2950
|
if (x <= 0.155251141552511) {
|
|
2894
|
-
|
|
2895
|
-
|
|
2951
|
+
ACEScctTransferFunctions_getInstance();
|
|
2952
|
+
var tmp_0 = x - 0.0729055341958355;
|
|
2953
|
+
ACEScctTransferFunctions_getInstance();
|
|
2954
|
+
tmp = tmp_0 / 10.5402377416545;
|
|
2955
|
+
} else if (x < this.r1s_1) {
|
|
2896
2956
|
// Inline function 'kotlin.math.pow' call
|
|
2897
2957
|
var x_0 = x * 17.52 - 9.72;
|
|
2898
2958
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2901,10 +2961,13 @@
|
|
|
2901
2961
|
}
|
|
2902
2962
|
return tmp;
|
|
2903
2963
|
};
|
|
2904
|
-
protoOf(ACEScctTransferFunctions).
|
|
2964
|
+
protoOf(ACEScctTransferFunctions).i1r = function (x) {
|
|
2905
2965
|
var tmp;
|
|
2906
2966
|
if (x < 0.0078125) {
|
|
2907
|
-
|
|
2967
|
+
ACEScctTransferFunctions_getInstance();
|
|
2968
|
+
var tmp_0 = 10.5402377416545 * x;
|
|
2969
|
+
ACEScctTransferFunctions_getInstance();
|
|
2970
|
+
tmp = tmp_0 + 0.0729055341958355;
|
|
2908
2971
|
} else {
|
|
2909
2972
|
// Inline function 'kotlin.math.log2' call
|
|
2910
2973
|
tmp = (log2(x) + 9.72) / 17.52;
|
|
@@ -2919,17 +2982,41 @@
|
|
|
2919
2982
|
}
|
|
2920
2983
|
function BT2020TransferFunctions() {
|
|
2921
2984
|
BT2020TransferFunctions_instance = this;
|
|
2922
|
-
this.
|
|
2923
|
-
this.
|
|
2985
|
+
this.s1s_1 = 1.0993;
|
|
2986
|
+
this.t1s_1 = 0.0181;
|
|
2924
2987
|
var tmp = this;
|
|
2988
|
+
BT2020TransferFunctions_getInstance();
|
|
2925
2989
|
// Inline function 'kotlin.math.pow' call
|
|
2926
|
-
|
|
2990
|
+
BT2020TransferFunctions_getInstance();
|
|
2991
|
+
var tmp_0 = 1.0993 * Math.pow(0.0181, 0.45);
|
|
2992
|
+
BT2020TransferFunctions_getInstance();
|
|
2993
|
+
tmp.u1s_1 = tmp_0 - (1.0993 - 1);
|
|
2927
2994
|
}
|
|
2928
|
-
protoOf(BT2020TransferFunctions).
|
|
2929
|
-
|
|
2995
|
+
protoOf(BT2020TransferFunctions).h1r = function (x) {
|
|
2996
|
+
var tmp;
|
|
2997
|
+
if (x < this.u1s_1) {
|
|
2998
|
+
tmp = x / 4.5;
|
|
2999
|
+
} else {
|
|
3000
|
+
BT2020TransferFunctions_getInstance();
|
|
3001
|
+
var tmp_0 = x + (1.0993 - 1);
|
|
3002
|
+
BT2020TransferFunctions_getInstance();
|
|
3003
|
+
tmp = spow_0(tmp_0 / 1.0993, 1 / 0.45);
|
|
3004
|
+
}
|
|
3005
|
+
return numberToDouble(tmp);
|
|
2930
3006
|
};
|
|
2931
|
-
protoOf(BT2020TransferFunctions).
|
|
2932
|
-
|
|
3007
|
+
protoOf(BT2020TransferFunctions).i1r = function (x) {
|
|
3008
|
+
var tmp;
|
|
3009
|
+
var tmp_0 = x;
|
|
3010
|
+
BT2020TransferFunctions_getInstance();
|
|
3011
|
+
if (tmp_0 < 0.0181) {
|
|
3012
|
+
tmp = 4.5 * x;
|
|
3013
|
+
} else {
|
|
3014
|
+
BT2020TransferFunctions_getInstance();
|
|
3015
|
+
var tmp_1 = 1.0993 * spow(x, 0.45);
|
|
3016
|
+
BT2020TransferFunctions_getInstance();
|
|
3017
|
+
tmp = tmp_1 - (1.0993 - 1);
|
|
3018
|
+
}
|
|
3019
|
+
return tmp;
|
|
2933
3020
|
};
|
|
2934
3021
|
var BT2020TransferFunctions_instance;
|
|
2935
3022
|
function BT2020TransferFunctions_getInstance() {
|
|
@@ -2939,12 +3026,12 @@
|
|
|
2939
3026
|
}
|
|
2940
3027
|
function BT709TransferFunctions() {
|
|
2941
3028
|
BT709TransferFunctions_instance = this;
|
|
2942
|
-
this.
|
|
3029
|
+
this.v1s_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
2943
3030
|
}
|
|
2944
|
-
protoOf(BT709TransferFunctions).
|
|
2945
|
-
return numberToDouble(x < this.
|
|
3031
|
+
protoOf(BT709TransferFunctions).h1r = function (x) {
|
|
3032
|
+
return numberToDouble(x < this.v1s_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
2946
3033
|
};
|
|
2947
|
-
protoOf(BT709TransferFunctions).
|
|
3034
|
+
protoOf(BT709TransferFunctions).i1r = function (x) {
|
|
2948
3035
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
2949
3036
|
};
|
|
2950
3037
|
var BT709TransferFunctions_instance;
|
|
@@ -2954,13 +3041,27 @@
|
|
|
2954
3041
|
return BT709TransferFunctions_instance;
|
|
2955
3042
|
}
|
|
2956
3043
|
function ROMMTransferFunctions() {
|
|
2957
|
-
this.
|
|
3044
|
+
this.w1s_1 = 0.001953;
|
|
2958
3045
|
}
|
|
2959
|
-
protoOf(ROMMTransferFunctions).
|
|
2960
|
-
|
|
3046
|
+
protoOf(ROMMTransferFunctions).h1r = function (x) {
|
|
3047
|
+
var tmp;
|
|
3048
|
+
var tmp_0 = x;
|
|
3049
|
+
if (tmp_0 < 16 * 0.001953) {
|
|
3050
|
+
tmp = x / 16.0;
|
|
3051
|
+
} else {
|
|
3052
|
+
tmp = spow(x, 1.8);
|
|
3053
|
+
}
|
|
3054
|
+
return tmp;
|
|
2961
3055
|
};
|
|
2962
|
-
protoOf(ROMMTransferFunctions).
|
|
2963
|
-
|
|
3056
|
+
protoOf(ROMMTransferFunctions).i1r = function (x) {
|
|
3057
|
+
var tmp;
|
|
3058
|
+
var tmp_0 = x;
|
|
3059
|
+
if (tmp_0 < 0.001953) {
|
|
3060
|
+
tmp = x * 16.0;
|
|
3061
|
+
} else {
|
|
3062
|
+
tmp = spow(x, 1.0 / 1.8);
|
|
3063
|
+
}
|
|
3064
|
+
return tmp;
|
|
2964
3065
|
};
|
|
2965
3066
|
var ROMMTransferFunctions_instance;
|
|
2966
3067
|
function ROMMTransferFunctions_getInstance() {
|
|
@@ -2968,13 +3069,13 @@
|
|
|
2968
3069
|
}
|
|
2969
3070
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
2970
3071
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2971
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
2972
|
-
var wp = whitePoint.
|
|
3072
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.l1r_1, g.l1r_1, b.l1r_1, r.m1r_1, g.m1r_1, b.m1r_1, r.x1s(), g.x1s(), b.x1s());
|
|
3073
|
+
var wp = whitePoint.m1q_1;
|
|
2973
3074
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2974
3075
|
var this_0 = inverse(primaries);
|
|
2975
|
-
var v0 = wp.
|
|
2976
|
-
var v1 = wp.
|
|
2977
|
-
var v2 = wp.
|
|
3076
|
+
var v0 = wp.o1r();
|
|
3077
|
+
var v1 = wp.n1r_1;
|
|
3078
|
+
var v2 = wp.p1r();
|
|
2978
3079
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
2979
3080
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
2980
3081
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
@@ -2985,9 +3086,9 @@
|
|
|
2985
3086
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2986
3087
|
var tmp;
|
|
2987
3088
|
if (color instanceof RGB) {
|
|
2988
|
-
tmp = color.
|
|
3089
|
+
tmp = color.y1r($this$$receiver);
|
|
2989
3090
|
} else {
|
|
2990
|
-
tmp = color.
|
|
3091
|
+
tmp = color.p1m().a1s($this$$receiver);
|
|
2991
3092
|
}
|
|
2992
3093
|
return tmp;
|
|
2993
3094
|
}
|
|
@@ -3013,6 +3114,61 @@
|
|
|
3013
3114
|
function _RGBInt___get_argb__impl__xiee7i($this) {
|
|
3014
3115
|
return $this;
|
|
3015
3116
|
}
|
|
3117
|
+
function Companion_7() {
|
|
3118
|
+
Companion_instance_8 = this;
|
|
3119
|
+
this.y1s_1 = threeComponentInfo('R', 0.0, 255.0, 'G', 0.0, 255.0, 'B', 0.0, 255.0);
|
|
3120
|
+
}
|
|
3121
|
+
protoOf(Companion_7).q2 = function () {
|
|
3122
|
+
return 'RGBInt';
|
|
3123
|
+
};
|
|
3124
|
+
protoOf(Companion_7).p1n = function () {
|
|
3125
|
+
return this.y1s_1;
|
|
3126
|
+
};
|
|
3127
|
+
protoOf(Companion_7).z1s = function (color) {
|
|
3128
|
+
return color.i1m().s1p();
|
|
3129
|
+
};
|
|
3130
|
+
protoOf(Companion_7).j1n = function (color) {
|
|
3131
|
+
return new RGBInt(this.z1s(color));
|
|
3132
|
+
};
|
|
3133
|
+
protoOf(Companion_7).a1t = function (components) {
|
|
3134
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3135
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3136
|
+
var size = this.p1n().m();
|
|
3137
|
+
// Inline function 'kotlin.require' call
|
|
3138
|
+
var containsLower = size - 1 | 0;
|
|
3139
|
+
var containsArg = components.length;
|
|
3140
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3141
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
3142
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
3143
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
3144
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3145
|
+
}
|
|
3146
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
3147
|
+
// Inline function 'com.github.ajalt.colormath.model.Companion.create.<anonymous>' call
|
|
3148
|
+
var r = components[0];
|
|
3149
|
+
var g = components[1];
|
|
3150
|
+
var b = components[2];
|
|
3151
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
3152
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3153
|
+
var tmp;
|
|
3154
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
3155
|
+
tmp = components[3];
|
|
3156
|
+
} else {
|
|
3157
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
3158
|
+
tmp = 1.0;
|
|
3159
|
+
}
|
|
3160
|
+
var a = tmp;
|
|
3161
|
+
return _RGBInt___init__impl__lqova7_0(numberToInt(r), numberToInt(g), numberToInt(b), numberToInt(a));
|
|
3162
|
+
};
|
|
3163
|
+
protoOf(Companion_7).q1n = function (components) {
|
|
3164
|
+
return new RGBInt(this.a1t(components));
|
|
3165
|
+
};
|
|
3166
|
+
var Companion_instance_8;
|
|
3167
|
+
function Companion_getInstance_7() {
|
|
3168
|
+
if (Companion_instance_8 == null)
|
|
3169
|
+
new Companion_7();
|
|
3170
|
+
return Companion_instance_8;
|
|
3171
|
+
}
|
|
3016
3172
|
function _RGBInt___init__impl__lqova7_0(r, g, b, alpha) {
|
|
3017
3173
|
alpha = alpha === VOID ? 255 : alpha;
|
|
3018
3174
|
// Inline function 'kotlin.UInt.or' call
|
|
@@ -3074,6 +3230,17 @@
|
|
|
3074
3230
|
var tmp$ret$3 = roundToInt(this_3);
|
|
3075
3231
|
return _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4, coerceIn_0(tmp$ret$3, 0, 255));
|
|
3076
3232
|
}
|
|
3233
|
+
function _RGBInt___get_alpha__impl__yl2tay($this) {
|
|
3234
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3235
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3236
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3237
|
+
var this_0 = _RGBInt___get_a__impl__6mfe7x($this);
|
|
3238
|
+
var value = _UByte___get_data__impl__jof9qr(this_0) & 255;
|
|
3239
|
+
return uintToDouble(value) / 255.0;
|
|
3240
|
+
}
|
|
3241
|
+
function _RGBInt___get_space__impl__emgnsy($this) {
|
|
3242
|
+
return Companion_getInstance_7();
|
|
3243
|
+
}
|
|
3077
3244
|
function _RGBInt___get_r__impl__dulq0e($this) {
|
|
3078
3245
|
// Inline function 'kotlin.UInt.toUByte' call
|
|
3079
3246
|
// Inline function 'kotlin.UInt.shr' call
|
|
@@ -3101,56 +3268,149 @@
|
|
|
3101
3268
|
var this_2 = _UInt___get_data__impl__f0vqqw(this_1);
|
|
3102
3269
|
return _UByte___init__impl__g9hnc4(toByte(this_2));
|
|
3103
3270
|
}
|
|
3104
|
-
function
|
|
3105
|
-
|
|
3106
|
-
|
|
3271
|
+
function _RGBInt___get_a__impl__6mfe7x($this) {
|
|
3272
|
+
// Inline function 'kotlin.UInt.toUByte' call
|
|
3273
|
+
// Inline function 'kotlin.UInt.shr' call
|
|
3274
|
+
var this_0 = _RGBInt___get_argb__impl__xiee7i($this);
|
|
3275
|
+
var this_1 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(this_0) >>> 24 | 0);
|
|
3276
|
+
// Inline function 'kotlin.toUByte' call
|
|
3277
|
+
var this_2 = _UInt___get_data__impl__f0vqqw(this_1);
|
|
3278
|
+
return _UByte___init__impl__g9hnc4(toByte(this_2));
|
|
3279
|
+
}
|
|
3280
|
+
function _RGBInt___get_redFloat__impl__lnt6cx($this) {
|
|
3281
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3282
|
+
var this_0 = _RGBInt___get_r__impl__dulq0e($this);
|
|
3283
|
+
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3284
|
+
}
|
|
3285
|
+
function _RGBInt___get_greenFloat__impl__opq1mn($this) {
|
|
3286
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3287
|
+
var this_0 = _RGBInt___get_g__impl__o93c71($this);
|
|
3288
|
+
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3289
|
+
}
|
|
3290
|
+
function _RGBInt___get_blueFloat__impl__jt6mw2($this) {
|
|
3291
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3292
|
+
var this_0 = _RGBInt___get_b__impl__m772ua($this);
|
|
3293
|
+
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3107
3294
|
}
|
|
3108
|
-
|
|
3109
|
-
return
|
|
3295
|
+
function RGBInt__toSRGB_impl_m0acyy($this) {
|
|
3296
|
+
return Companion_getInstance_6().k1o(_RGBInt___get_redFloat__impl__lnt6cx($this), _RGBInt___get_greenFloat__impl__opq1mn($this), _RGBInt___get_blueFloat__impl__jt6mw2($this), _RGBInt___get_alpha__impl__yl2tay($this));
|
|
3297
|
+
}
|
|
3298
|
+
function RGBInt__toArray_impl_73rlu9($this) {
|
|
3299
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
3300
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3301
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3302
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3303
|
+
var this_0 = _RGBInt___get_r__impl__dulq0e($this);
|
|
3304
|
+
var value = _UByte___get_data__impl__jof9qr(this_0) & 255;
|
|
3305
|
+
var tmp = uintToDouble(value);
|
|
3306
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3307
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3308
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3309
|
+
var this_1 = _RGBInt___get_g__impl__o93c71($this);
|
|
3310
|
+
var value_0 = _UByte___get_data__impl__jof9qr(this_1) & 255;
|
|
3311
|
+
var tmp_0 = uintToDouble(value_0);
|
|
3312
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3313
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3314
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3315
|
+
var this_2 = _RGBInt___get_b__impl__m772ua($this);
|
|
3316
|
+
var value_1 = _UByte___get_data__impl__jof9qr(this_2) & 255;
|
|
3317
|
+
var tmp_1 = uintToDouble(value_1);
|
|
3318
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3319
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3320
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3321
|
+
var this_3 = _RGBInt___get_a__impl__6mfe7x($this);
|
|
3322
|
+
var value_2 = _UByte___get_data__impl__jof9qr(this_3) & 255;
|
|
3323
|
+
var tmp$ret$11 = uintToDouble(value_2);
|
|
3324
|
+
return new Float32Array([tmp, tmp_0, tmp_1, tmp$ret$11]);
|
|
3325
|
+
}
|
|
3326
|
+
function RGBInt__toString_impl_cf5r29($this) {
|
|
3327
|
+
return 'RGBInt(argb=' + new UInt($this) + ')';
|
|
3328
|
+
}
|
|
3329
|
+
function RGBInt__hashCode_impl_y6bnv4($this) {
|
|
3330
|
+
return UInt__hashCode_impl_z2mhuw($this);
|
|
3331
|
+
}
|
|
3332
|
+
function RGBInt__equals_impl_qmmpmc($this, other) {
|
|
3333
|
+
if (!(other instanceof RGBInt))
|
|
3334
|
+
return false;
|
|
3335
|
+
if (!($this === (other instanceof RGBInt ? other.z1r_1 : THROW_CCE())))
|
|
3336
|
+
return false;
|
|
3337
|
+
return true;
|
|
3338
|
+
}
|
|
3339
|
+
function RGBInt(argb) {
|
|
3340
|
+
Companion_getInstance_7();
|
|
3341
|
+
this.z1r_1 = argb;
|
|
3342
|
+
}
|
|
3343
|
+
protoOf(RGBInt).g1m = function () {
|
|
3344
|
+
return _RGBInt___get_alpha__impl__yl2tay(this.z1r_1);
|
|
3110
3345
|
};
|
|
3111
|
-
protoOf(
|
|
3112
|
-
return this.
|
|
3346
|
+
protoOf(RGBInt).h1m = function () {
|
|
3347
|
+
return _RGBInt___get_space__impl__emgnsy(this.z1r_1);
|
|
3113
3348
|
};
|
|
3114
|
-
protoOf(
|
|
3115
|
-
return this.
|
|
3349
|
+
protoOf(RGBInt).i1m = function () {
|
|
3350
|
+
return RGBInt__toSRGB_impl_m0acyy(this.z1r_1);
|
|
3116
3351
|
};
|
|
3117
|
-
protoOf(
|
|
3118
|
-
return this.
|
|
3352
|
+
protoOf(RGBInt).b6 = function () {
|
|
3353
|
+
return RGBInt__toArray_impl_73rlu9(this.z1r_1);
|
|
3119
3354
|
};
|
|
3120
|
-
protoOf(
|
|
3121
|
-
return this.
|
|
3355
|
+
protoOf(RGBInt).toString = function () {
|
|
3356
|
+
return RGBInt__toString_impl_cf5r29(this.z1r_1);
|
|
3122
3357
|
};
|
|
3123
|
-
protoOf(
|
|
3124
|
-
return this.
|
|
3358
|
+
protoOf(RGBInt).hashCode = function () {
|
|
3359
|
+
return RGBInt__hashCode_impl_y6bnv4(this.z1r_1);
|
|
3125
3360
|
};
|
|
3126
|
-
protoOf(
|
|
3127
|
-
return this.
|
|
3361
|
+
protoOf(RGBInt).equals = function (other) {
|
|
3362
|
+
return RGBInt__equals_impl_qmmpmc(this.z1r_1, other);
|
|
3128
3363
|
};
|
|
3129
|
-
|
|
3130
|
-
|
|
3364
|
+
function Companion_8() {
|
|
3365
|
+
Companion_instance_9 = this;
|
|
3366
|
+
this.u1r_1 = XYZColorSpaces_getInstance().h1p_1;
|
|
3367
|
+
}
|
|
3368
|
+
protoOf(Companion_8).p1n = function () {
|
|
3369
|
+
return this.u1r_1.p1n();
|
|
3131
3370
|
};
|
|
3132
|
-
protoOf(
|
|
3133
|
-
return
|
|
3371
|
+
protoOf(Companion_8).q2 = function () {
|
|
3372
|
+
return this.u1r_1.q2();
|
|
3134
3373
|
};
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
return
|
|
3374
|
+
protoOf(Companion_8).o1n = function () {
|
|
3375
|
+
return this.u1r_1.o1n();
|
|
3376
|
+
};
|
|
3377
|
+
protoOf(Companion_8).j1n = function (color) {
|
|
3378
|
+
return this.u1r_1.j1n(color);
|
|
3379
|
+
};
|
|
3380
|
+
protoOf(Companion_8).q1n = function (components) {
|
|
3381
|
+
return this.u1r_1.q1n(components);
|
|
3382
|
+
};
|
|
3383
|
+
protoOf(Companion_8).k1o = function (x, y, z, alpha) {
|
|
3384
|
+
return this.u1r_1.k1o(x, y, z, alpha);
|
|
3385
|
+
};
|
|
3386
|
+
protoOf(Companion_8).j1r = function (x, y, z, alpha) {
|
|
3387
|
+
return this.u1r_1.j1r(x, y, z, alpha);
|
|
3388
|
+
};
|
|
3389
|
+
protoOf(Companion_8).hashCode = function () {
|
|
3390
|
+
return hashCode(XYZColorSpaces_getInstance().h1p_1);
|
|
3391
|
+
};
|
|
3392
|
+
protoOf(Companion_8).equals = function (other) {
|
|
3393
|
+
return equals(XYZColorSpaces_getInstance().h1p_1, other);
|
|
3394
|
+
};
|
|
3395
|
+
var Companion_instance_9;
|
|
3396
|
+
function Companion_getInstance_8() {
|
|
3397
|
+
if (Companion_instance_9 == null)
|
|
3398
|
+
new Companion_8();
|
|
3399
|
+
return Companion_instance_9;
|
|
3140
3400
|
}
|
|
3141
3401
|
function adaptToM($this, space, m, mi) {
|
|
3142
|
-
if (space.
|
|
3402
|
+
if (space.o1n().equals($this.v1m_1.o1n()))
|
|
3143
3403
|
return $this;
|
|
3144
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
3404
|
+
var transform = chromaticAdaptationMatrix(space, $this.v1m_1.o1n().m1q_1, m, mi);
|
|
3145
3405
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3146
|
-
var v0 = $this.
|
|
3147
|
-
var v1 = $this.
|
|
3148
|
-
var v2 = $this.
|
|
3406
|
+
var v0 = $this.r1m_1;
|
|
3407
|
+
var v1 = $this.s1m_1;
|
|
3408
|
+
var v2 = $this.t1m_1;
|
|
3149
3409
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
3150
3410
|
var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
3151
3411
|
var yy = Matrix__get_impl_xogbpk(transform, 0, 1) * v0 + Matrix__get_impl_xogbpk(transform, 1, 1) * v1 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
3152
3412
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * v0 + Matrix__get_impl_xogbpk(transform, 1, 2) * v1 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
3153
|
-
return space.
|
|
3413
|
+
return space.k1o(xx, yy, zz, $this.u1m_1);
|
|
3154
3414
|
}
|
|
3155
3415
|
function toLAB$f(t) {
|
|
3156
3416
|
var tmp;
|
|
@@ -3163,101 +3423,101 @@
|
|
|
3163
3423
|
return tmp;
|
|
3164
3424
|
}
|
|
3165
3425
|
function XYZ(x, y, z, alpha, space) {
|
|
3166
|
-
|
|
3167
|
-
this.
|
|
3168
|
-
this.
|
|
3169
|
-
this.
|
|
3170
|
-
this.
|
|
3171
|
-
this.
|
|
3426
|
+
Companion_getInstance_8();
|
|
3427
|
+
this.r1m_1 = x;
|
|
3428
|
+
this.s1m_1 = y;
|
|
3429
|
+
this.t1m_1 = z;
|
|
3430
|
+
this.u1m_1 = alpha;
|
|
3431
|
+
this.v1m_1 = space;
|
|
3172
3432
|
}
|
|
3173
|
-
protoOf(XYZ).
|
|
3174
|
-
return this.
|
|
3433
|
+
protoOf(XYZ).g1m = function () {
|
|
3434
|
+
return this.u1m_1;
|
|
3175
3435
|
};
|
|
3176
|
-
protoOf(XYZ).
|
|
3177
|
-
return this.
|
|
3436
|
+
protoOf(XYZ).h1m = function () {
|
|
3437
|
+
return this.v1m_1;
|
|
3178
3438
|
};
|
|
3179
|
-
protoOf(XYZ).
|
|
3439
|
+
protoOf(XYZ).j1p = function (space) {
|
|
3180
3440
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
3181
3441
|
};
|
|
3182
|
-
protoOf(XYZ).
|
|
3183
|
-
var tmp0_container = this.
|
|
3184
|
-
var x = tmp0_container.
|
|
3185
|
-
var y = tmp0_container.
|
|
3186
|
-
var z = tmp0_container.
|
|
3187
|
-
var f = space.
|
|
3442
|
+
protoOf(XYZ).a1s = function (space) {
|
|
3443
|
+
var tmp0_container = this.j1p(XYZColorSpace_0(space.o1n()));
|
|
3444
|
+
var x = tmp0_container.sf();
|
|
3445
|
+
var y = tmp0_container.tf();
|
|
3446
|
+
var z = tmp0_container.b1t();
|
|
3447
|
+
var f = space.y1q();
|
|
3188
3448
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3189
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
3449
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.x1r());
|
|
3190
3450
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
3191
3451
|
var r = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
3192
3452
|
var g = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
|
|
3193
3453
|
var b = Matrix__get_impl_xogbpk(this_0, 0, 2) * x + Matrix__get_impl_xogbpk(this_0, 1, 2) * y + Matrix__get_impl_xogbpk(this_0, 2, 2) * z;
|
|
3194
|
-
return space.
|
|
3454
|
+
return space.k1o(f.i1r(r), f.i1r(g), f.i1r(b), this.u1m_1);
|
|
3195
3455
|
};
|
|
3196
|
-
protoOf(XYZ).
|
|
3197
|
-
return this.
|
|
3456
|
+
protoOf(XYZ).i1m = function () {
|
|
3457
|
+
return this.a1s(RGBColorSpaces_getInstance().v1o_1);
|
|
3198
3458
|
};
|
|
3199
|
-
protoOf(XYZ).
|
|
3200
|
-
var fx = toLAB$f(this.
|
|
3201
|
-
var fy = toLAB$f(this.
|
|
3202
|
-
var fz = toLAB$f(this.
|
|
3459
|
+
protoOf(XYZ).q1m = function () {
|
|
3460
|
+
var fx = toLAB$f(this.r1m_1 / this.v1m_1.o1n().m1q_1.o1r());
|
|
3461
|
+
var fy = toLAB$f(this.s1m_1 / this.v1m_1.o1n().m1q_1.n1r_1);
|
|
3462
|
+
var fz = toLAB$f(this.t1m_1 / this.v1m_1.o1n().m1q_1.p1r());
|
|
3203
3463
|
var l = 116 * fy - 16;
|
|
3204
3464
|
var a = 500 * (fx - fy);
|
|
3205
3465
|
var b = 200 * (fy - fz);
|
|
3206
|
-
return LABColorSpace_0(this.
|
|
3466
|
+
return LABColorSpace_0(this.v1m_1.o1n()).j1r(l, a, b, this.u1m_1);
|
|
3207
3467
|
};
|
|
3208
|
-
protoOf(XYZ).
|
|
3468
|
+
protoOf(XYZ).d1n = function () {
|
|
3209
3469
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toD65' call
|
|
3210
3470
|
var tmp;
|
|
3211
|
-
if (equals(this.
|
|
3212
|
-
var l = 0.8189330101 * this.
|
|
3213
|
-
var m = 0.0329845436 * this.
|
|
3214
|
-
var s = 0.0482003018 * this.
|
|
3471
|
+
if (equals(this.v1m_1, XYZColorSpaces_getInstance().h1p_1)) {
|
|
3472
|
+
var l = 0.8189330101 * this.r1m_1 + 0.3618667424 * this.s1m_1 - 0.1288597137 * this.t1m_1;
|
|
3473
|
+
var m = 0.0329845436 * this.r1m_1 + 0.9293118715 * this.s1m_1 + 0.0361456387 * this.t1m_1;
|
|
3474
|
+
var s = 0.0482003018 * this.r1m_1 + 0.2643662691 * this.s1m_1 + 0.633851707 * this.t1m_1;
|
|
3215
3475
|
// Inline function 'kotlin.math.cbrt' call
|
|
3216
3476
|
var ll = Math.cbrt(l);
|
|
3217
3477
|
// Inline function 'kotlin.math.cbrt' call
|
|
3218
3478
|
var mm = Math.cbrt(m);
|
|
3219
3479
|
// Inline function 'kotlin.math.cbrt' call
|
|
3220
3480
|
var ss = Math.cbrt(s);
|
|
3221
|
-
return Oklab_init_$Create$(0.2104542553 * ll + 0.793617785 * mm - 0.0040720468 * ss, 1.9779984951 * ll - 2.428592205 * mm + 0.4505937099 * ss, 0.0259040371 * ll + 0.7827717662 * mm - 0.808675766 * ss, this.
|
|
3481
|
+
return Oklab_init_$Create$(0.2104542553 * ll + 0.793617785 * mm - 0.0040720468 * ss, 1.9779984951 * ll - 2.428592205 * mm + 0.4505937099 * ss, 0.0259040371 * ll + 0.7827717662 * mm - 0.808675766 * ss, this.u1m_1);
|
|
3222
3482
|
} else {
|
|
3223
|
-
var $this$toD65 = this.
|
|
3224
|
-
var l_0 = 0.8189330101 * $this$toD65.
|
|
3225
|
-
var m_0 = 0.0329845436 * $this$toD65.
|
|
3226
|
-
var s_0 = 0.0482003018 * $this$toD65.
|
|
3483
|
+
var $this$toD65 = this.j1p(XYZColorSpaces_getInstance().h1p_1);
|
|
3484
|
+
var l_0 = 0.8189330101 * $this$toD65.r1m_1 + 0.3618667424 * $this$toD65.s1m_1 - 0.1288597137 * $this$toD65.t1m_1;
|
|
3485
|
+
var m_0 = 0.0329845436 * $this$toD65.r1m_1 + 0.9293118715 * $this$toD65.s1m_1 + 0.0361456387 * $this$toD65.t1m_1;
|
|
3486
|
+
var s_0 = 0.0482003018 * $this$toD65.r1m_1 + 0.2643662691 * $this$toD65.s1m_1 + 0.633851707 * $this$toD65.t1m_1;
|
|
3227
3487
|
// Inline function 'kotlin.math.cbrt' call
|
|
3228
3488
|
var ll_0 = Math.cbrt(l_0);
|
|
3229
3489
|
// Inline function 'kotlin.math.cbrt' call
|
|
3230
3490
|
var mm_0 = Math.cbrt(m_0);
|
|
3231
3491
|
// Inline function 'kotlin.math.cbrt' call
|
|
3232
3492
|
var ss_0 = Math.cbrt(s_0);
|
|
3233
|
-
return Oklab_init_$Create$(0.2104542553 * ll_0 + 0.793617785 * mm_0 - 0.0040720468 * ss_0, 1.9779984951 * ll_0 - 2.428592205 * mm_0 + 0.4505937099 * ss_0, 0.0259040371 * ll_0 + 0.7827717662 * mm_0 - 0.808675766 * ss_0, $this$toD65.
|
|
3493
|
+
return Oklab_init_$Create$(0.2104542553 * ll_0 + 0.793617785 * mm_0 - 0.0040720468 * ss_0, 1.9779984951 * ll_0 - 2.428592205 * mm_0 + 0.4505937099 * ss_0, 0.0259040371 * ll_0 + 0.7827717662 * mm_0 - 0.808675766 * ss_0, $this$toD65.u1m_1);
|
|
3234
3494
|
}
|
|
3235
3495
|
};
|
|
3236
|
-
protoOf(XYZ).
|
|
3496
|
+
protoOf(XYZ).p1m = function () {
|
|
3237
3497
|
return this;
|
|
3238
3498
|
};
|
|
3239
|
-
protoOf(XYZ).
|
|
3499
|
+
protoOf(XYZ).b6 = function () {
|
|
3240
3500
|
// Inline function 'kotlin.floatArrayOf' call
|
|
3241
|
-
return new Float32Array([this.
|
|
3501
|
+
return new Float32Array([this.r1m_1, this.s1m_1, this.t1m_1, this.u1m_1]);
|
|
3242
3502
|
};
|
|
3243
|
-
protoOf(XYZ).
|
|
3244
|
-
return this.
|
|
3503
|
+
protoOf(XYZ).sf = function () {
|
|
3504
|
+
return this.r1m_1;
|
|
3245
3505
|
};
|
|
3246
|
-
protoOf(XYZ).
|
|
3247
|
-
return this.
|
|
3506
|
+
protoOf(XYZ).tf = function () {
|
|
3507
|
+
return this.s1m_1;
|
|
3248
3508
|
};
|
|
3249
|
-
protoOf(XYZ).
|
|
3250
|
-
return this.
|
|
3509
|
+
protoOf(XYZ).b1t = function () {
|
|
3510
|
+
return this.t1m_1;
|
|
3251
3511
|
};
|
|
3252
3512
|
protoOf(XYZ).toString = function () {
|
|
3253
|
-
return 'XYZ(x=' + this.
|
|
3513
|
+
return 'XYZ(x=' + this.r1m_1 + ', y=' + this.s1m_1 + ', z=' + this.t1m_1 + ', alpha=' + this.u1m_1 + ', space=' + toString(this.v1m_1) + ')';
|
|
3254
3514
|
};
|
|
3255
3515
|
protoOf(XYZ).hashCode = function () {
|
|
3256
|
-
var result = getNumberHashCode(this.
|
|
3257
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3258
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3259
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3260
|
-
result = imul(result, 31) + hashCode(this.
|
|
3516
|
+
var result = getNumberHashCode(this.r1m_1);
|
|
3517
|
+
result = imul(result, 31) + getNumberHashCode(this.s1m_1) | 0;
|
|
3518
|
+
result = imul(result, 31) + getNumberHashCode(this.t1m_1) | 0;
|
|
3519
|
+
result = imul(result, 31) + getNumberHashCode(this.u1m_1) | 0;
|
|
3520
|
+
result = imul(result, 31) + hashCode(this.v1m_1) | 0;
|
|
3261
3521
|
return result;
|
|
3262
3522
|
};
|
|
3263
3523
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -3266,27 +3526,27 @@
|
|
|
3266
3526
|
if (!(other instanceof XYZ))
|
|
3267
3527
|
return false;
|
|
3268
3528
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
3269
|
-
if (!equals(this.
|
|
3529
|
+
if (!equals(this.r1m_1, tmp0_other_with_cast.r1m_1))
|
|
3270
3530
|
return false;
|
|
3271
|
-
if (!equals(this.
|
|
3531
|
+
if (!equals(this.s1m_1, tmp0_other_with_cast.s1m_1))
|
|
3272
3532
|
return false;
|
|
3273
|
-
if (!equals(this.
|
|
3533
|
+
if (!equals(this.t1m_1, tmp0_other_with_cast.t1m_1))
|
|
3274
3534
|
return false;
|
|
3275
|
-
if (!equals(this.
|
|
3535
|
+
if (!equals(this.u1m_1, tmp0_other_with_cast.u1m_1))
|
|
3276
3536
|
return false;
|
|
3277
|
-
if (!equals(this.
|
|
3537
|
+
if (!equals(this.v1m_1, tmp0_other_with_cast.v1m_1))
|
|
3278
3538
|
return false;
|
|
3279
3539
|
return true;
|
|
3280
3540
|
};
|
|
3281
3541
|
function XYZColorSpace() {
|
|
3282
3542
|
}
|
|
3283
3543
|
function XYZColorSpace_0(whitePoint) {
|
|
3284
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
3544
|
+
return whitePoint.equals(Illuminant_getInstance().p1p_1) ? XYZColorSpaces_getInstance().h1p_1 : whitePoint.equals(Illuminant_getInstance().n1p_1) ? XYZColorSpaces_getInstance().i1p_1 : new XYZColorSpaceImpl(whitePoint);
|
|
3285
3545
|
}
|
|
3286
3546
|
function XYZColorSpaces() {
|
|
3287
3547
|
XYZColorSpaces_instance = this;
|
|
3288
|
-
this.
|
|
3289
|
-
this.
|
|
3548
|
+
this.h1p_1 = new XYZColorSpaceImpl(Illuminant_getInstance().p1p_1);
|
|
3549
|
+
this.i1p_1 = new XYZColorSpaceImpl(Illuminant_getInstance().n1p_1);
|
|
3290
3550
|
}
|
|
3291
3551
|
var XYZColorSpaces_instance;
|
|
3292
3552
|
function XYZColorSpaces_getInstance() {
|
|
@@ -3297,31 +3557,31 @@
|
|
|
3297
3557
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
3298
3558
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
3299
3559
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
3300
|
-
var dstWp = _this__u8e3s4.
|
|
3301
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
3302
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
3560
|
+
var dstWp = _this__u8e3s4.o1n().m1q_1;
|
|
3561
|
+
var src = dot_0(xyzToLms, srcWp.o1r(), srcWp.n1r_1, srcWp.p1r());
|
|
3562
|
+
var dst = dot_0(xyzToLms, dstWp.o1r(), dstWp.n1r_1, dstWp.p1r());
|
|
3303
3563
|
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);
|
|
3304
3564
|
}
|
|
3305
3565
|
function XYZColorSpaceImpl(whitePoint) {
|
|
3306
|
-
this.
|
|
3307
|
-
this.
|
|
3566
|
+
this.c1t_1 = whitePoint;
|
|
3567
|
+
this.d1t_1 = zeroOneComponentInfo('XYZ');
|
|
3308
3568
|
}
|
|
3309
|
-
protoOf(XYZColorSpaceImpl).
|
|
3310
|
-
return this.
|
|
3569
|
+
protoOf(XYZColorSpaceImpl).o1n = function () {
|
|
3570
|
+
return this.c1t_1;
|
|
3311
3571
|
};
|
|
3312
|
-
protoOf(XYZColorSpaceImpl).
|
|
3572
|
+
protoOf(XYZColorSpaceImpl).q2 = function () {
|
|
3313
3573
|
return 'XYZ';
|
|
3314
3574
|
};
|
|
3315
|
-
protoOf(XYZColorSpaceImpl).
|
|
3316
|
-
return this.
|
|
3575
|
+
protoOf(XYZColorSpaceImpl).p1n = function () {
|
|
3576
|
+
return this.d1t_1;
|
|
3317
3577
|
};
|
|
3318
|
-
protoOf(XYZColorSpaceImpl).
|
|
3319
|
-
return color.
|
|
3578
|
+
protoOf(XYZColorSpaceImpl).j1n = function (color) {
|
|
3579
|
+
return color.p1m().j1p(this);
|
|
3320
3580
|
};
|
|
3321
|
-
protoOf(XYZColorSpaceImpl).
|
|
3581
|
+
protoOf(XYZColorSpaceImpl).q1n = function (components) {
|
|
3322
3582
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3323
3583
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3324
|
-
var size = this.
|
|
3584
|
+
var size = this.p1n().m();
|
|
3325
3585
|
// Inline function 'kotlin.require' call
|
|
3326
3586
|
var containsLower = size - 1 | 0;
|
|
3327
3587
|
var containsArg = components.length;
|
|
@@ -3332,33 +3592,34 @@
|
|
|
3332
3592
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3333
3593
|
}
|
|
3334
3594
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
3335
|
-
var
|
|
3336
|
-
var
|
|
3337
|
-
var
|
|
3595
|
+
var p0 = components[0];
|
|
3596
|
+
var p1 = components[1];
|
|
3597
|
+
var p2 = components[2];
|
|
3338
3598
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3599
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3600
|
+
var tmp;
|
|
3601
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
3602
|
+
tmp = components[3];
|
|
3342
3603
|
} else {
|
|
3343
3604
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
3344
|
-
|
|
3605
|
+
tmp = 1.0;
|
|
3345
3606
|
}
|
|
3346
|
-
var
|
|
3347
|
-
return this.
|
|
3607
|
+
var p3 = tmp;
|
|
3608
|
+
return this.k1o(p0, p1, p2, p3);
|
|
3348
3609
|
};
|
|
3349
3610
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
3350
|
-
return 'XYZColorSpace(' + this.
|
|
3611
|
+
return 'XYZColorSpace(' + this.c1t_1.toString() + ')';
|
|
3351
3612
|
};
|
|
3352
|
-
protoOf(XYZColorSpaceImpl).
|
|
3613
|
+
protoOf(XYZColorSpaceImpl).k1o = function (x, y, z, alpha) {
|
|
3353
3614
|
return new XYZ(x, y, z, alpha, this);
|
|
3354
3615
|
};
|
|
3355
3616
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
3356
|
-
return this.
|
|
3617
|
+
return this.c1t_1.hashCode();
|
|
3357
3618
|
};
|
|
3358
3619
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
3359
3620
|
var tmp;
|
|
3360
3621
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
3361
|
-
tmp = this.
|
|
3622
|
+
tmp = this.c1t_1.equals(other.o1n());
|
|
3362
3623
|
} else {
|
|
3363
3624
|
tmp = false;
|
|
3364
3625
|
}
|
|
@@ -3374,26 +3635,26 @@
|
|
|
3374
3635
|
}
|
|
3375
3636
|
function xyY(x, y, Y) {
|
|
3376
3637
|
Y = Y === VOID ? 1.0 : Y;
|
|
3377
|
-
this.
|
|
3378
|
-
this.
|
|
3379
|
-
this.
|
|
3638
|
+
this.l1r_1 = x;
|
|
3639
|
+
this.m1r_1 = y;
|
|
3640
|
+
this.n1r_1 = Y;
|
|
3380
3641
|
}
|
|
3381
|
-
protoOf(xyY).
|
|
3382
|
-
return 1 - this.
|
|
3642
|
+
protoOf(xyY).x1s = function () {
|
|
3643
|
+
return 1 - this.l1r_1 - this.m1r_1;
|
|
3383
3644
|
};
|
|
3384
|
-
protoOf(xyY).
|
|
3385
|
-
return this.
|
|
3645
|
+
protoOf(xyY).o1r = function () {
|
|
3646
|
+
return this.l1r_1 * this.n1r_1 / this.m1r_1;
|
|
3386
3647
|
};
|
|
3387
|
-
protoOf(xyY).
|
|
3388
|
-
return (1 - this.
|
|
3648
|
+
protoOf(xyY).p1r = function () {
|
|
3649
|
+
return (1 - this.l1r_1 - this.m1r_1) * this.n1r_1 / this.m1r_1;
|
|
3389
3650
|
};
|
|
3390
3651
|
protoOf(xyY).toString = function () {
|
|
3391
|
-
return 'xyY(x=' + this.
|
|
3652
|
+
return 'xyY(x=' + this.l1r_1 + ', y=' + this.m1r_1 + ', Y=' + this.n1r_1 + ')';
|
|
3392
3653
|
};
|
|
3393
3654
|
protoOf(xyY).hashCode = function () {
|
|
3394
|
-
var result = getNumberHashCode(this.
|
|
3395
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3396
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3655
|
+
var result = getNumberHashCode(this.l1r_1);
|
|
3656
|
+
result = imul(result, 31) + getNumberHashCode(this.m1r_1) | 0;
|
|
3657
|
+
result = imul(result, 31) + getNumberHashCode(this.n1r_1) | 0;
|
|
3397
3658
|
return result;
|
|
3398
3659
|
};
|
|
3399
3660
|
protoOf(xyY).equals = function (other) {
|
|
@@ -3402,60 +3663,67 @@
|
|
|
3402
3663
|
if (!(other instanceof xyY))
|
|
3403
3664
|
return false;
|
|
3404
3665
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
3405
|
-
if (!equals(this.
|
|
3666
|
+
if (!equals(this.l1r_1, tmp0_other_with_cast.l1r_1))
|
|
3406
3667
|
return false;
|
|
3407
|
-
if (!equals(this.
|
|
3668
|
+
if (!equals(this.m1r_1, tmp0_other_with_cast.m1r_1))
|
|
3408
3669
|
return false;
|
|
3409
|
-
if (!equals(this.
|
|
3670
|
+
if (!equals(this.n1r_1, tmp0_other_with_cast.n1r_1))
|
|
3410
3671
|
return false;
|
|
3411
3672
|
return true;
|
|
3412
3673
|
};
|
|
3413
3674
|
//region block: post-declaration
|
|
3414
|
-
protoOf(HSL).
|
|
3415
|
-
protoOf(HSL).
|
|
3416
|
-
protoOf(HSL).
|
|
3417
|
-
protoOf(HSL).
|
|
3418
|
-
protoOf(HSL).
|
|
3419
|
-
protoOf(HSL).
|
|
3420
|
-
protoOf(HWB).
|
|
3421
|
-
protoOf(HWB).
|
|
3422
|
-
protoOf(HWB).
|
|
3423
|
-
protoOf(HWB).
|
|
3424
|
-
protoOf(HWB).
|
|
3425
|
-
protoOf(HWB).
|
|
3426
|
-
protoOf(LAB).
|
|
3427
|
-
protoOf(LAB).
|
|
3428
|
-
protoOf(LAB).
|
|
3429
|
-
protoOf(LAB).
|
|
3430
|
-
protoOf(LABColorSpaceImpl).
|
|
3431
|
-
protoOf(LCHab).
|
|
3432
|
-
protoOf(LCHab).
|
|
3433
|
-
protoOf(LCHab).
|
|
3434
|
-
protoOf(LCHab).
|
|
3435
|
-
protoOf(Oklab).
|
|
3436
|
-
protoOf(Oklab).
|
|
3437
|
-
protoOf(Oklab).
|
|
3438
|
-
protoOf(Oklab).
|
|
3439
|
-
protoOf(Oklch).
|
|
3440
|
-
protoOf(Oklch).
|
|
3441
|
-
protoOf(Oklch).
|
|
3442
|
-
protoOf(Oklch).
|
|
3443
|
-
protoOf(Companion_6).
|
|
3444
|
-
protoOf(RGB).
|
|
3445
|
-
protoOf(RGB).
|
|
3446
|
-
protoOf(RGB).
|
|
3447
|
-
protoOf(SRGB).
|
|
3448
|
-
protoOf(RGBColorSpaceImpl).
|
|
3449
|
-
protoOf(RGBColorSpaceImpl).
|
|
3450
|
-
protoOf(RGBColorSpaceImpl).
|
|
3451
|
-
protoOf(RGBColorSpaceImpl).
|
|
3452
|
-
protoOf(
|
|
3453
|
-
protoOf(
|
|
3454
|
-
protoOf(
|
|
3455
|
-
protoOf(
|
|
3456
|
-
protoOf(
|
|
3457
|
-
protoOf(
|
|
3458
|
-
protoOf(
|
|
3675
|
+
protoOf(HSL).p1m = toXYZ;
|
|
3676
|
+
protoOf(HSL).q1m = toLAB;
|
|
3677
|
+
protoOf(HSL).w1m = toLCHab;
|
|
3678
|
+
protoOf(HSL).c1n = toHWB;
|
|
3679
|
+
protoOf(HSL).d1n = toOklab;
|
|
3680
|
+
protoOf(HSL).e1n = toOklch;
|
|
3681
|
+
protoOf(HWB).j1m = toHSL;
|
|
3682
|
+
protoOf(HWB).p1m = toXYZ;
|
|
3683
|
+
protoOf(HWB).q1m = toLAB;
|
|
3684
|
+
protoOf(HWB).w1m = toLCHab;
|
|
3685
|
+
protoOf(HWB).d1n = toOklab;
|
|
3686
|
+
protoOf(HWB).e1n = toOklch;
|
|
3687
|
+
protoOf(LAB).j1m = toHSL;
|
|
3688
|
+
protoOf(LAB).c1n = toHWB;
|
|
3689
|
+
protoOf(LAB).d1n = toOklab;
|
|
3690
|
+
protoOf(LAB).e1n = toOklch;
|
|
3691
|
+
protoOf(LABColorSpaceImpl).j1r = invoke;
|
|
3692
|
+
protoOf(LCHab).j1m = toHSL;
|
|
3693
|
+
protoOf(LCHab).c1n = toHWB;
|
|
3694
|
+
protoOf(LCHab).d1n = toOklab;
|
|
3695
|
+
protoOf(LCHab).e1n = toOklch;
|
|
3696
|
+
protoOf(Oklab).j1m = toHSL;
|
|
3697
|
+
protoOf(Oklab).q1m = toLAB;
|
|
3698
|
+
protoOf(Oklab).w1m = toLCHab;
|
|
3699
|
+
protoOf(Oklab).c1n = toHWB;
|
|
3700
|
+
protoOf(Oklch).j1m = toHSL;
|
|
3701
|
+
protoOf(Oklch).q1m = toLAB;
|
|
3702
|
+
protoOf(Oklch).w1m = toLCHab;
|
|
3703
|
+
protoOf(Oklch).c1n = toHWB;
|
|
3704
|
+
protoOf(Companion_6).n1q = from255$default;
|
|
3705
|
+
protoOf(RGB).q1m = toLAB;
|
|
3706
|
+
protoOf(RGB).w1m = toLCHab;
|
|
3707
|
+
protoOf(RGB).e1n = toOklch;
|
|
3708
|
+
protoOf(SRGB).n1q = from255$default;
|
|
3709
|
+
protoOf(RGBColorSpaceImpl).j1r = invoke_0;
|
|
3710
|
+
protoOf(RGBColorSpaceImpl).j1o = invoke_1;
|
|
3711
|
+
protoOf(RGBColorSpaceImpl).o1q = from255;
|
|
3712
|
+
protoOf(RGBColorSpaceImpl).n1q = from255$default;
|
|
3713
|
+
protoOf(RGBInt).j1m = toHSL;
|
|
3714
|
+
protoOf(RGBInt).p1m = toXYZ;
|
|
3715
|
+
protoOf(RGBInt).q1m = toLAB;
|
|
3716
|
+
protoOf(RGBInt).w1m = toLCHab;
|
|
3717
|
+
protoOf(RGBInt).c1n = toHWB;
|
|
3718
|
+
protoOf(RGBInt).d1n = toOklab;
|
|
3719
|
+
protoOf(RGBInt).e1n = toOklch;
|
|
3720
|
+
protoOf(Companion_8).k1r = invoke$default;
|
|
3721
|
+
protoOf(XYZ).j1m = toHSL;
|
|
3722
|
+
protoOf(XYZ).w1m = toLCHab;
|
|
3723
|
+
protoOf(XYZ).c1n = toHWB;
|
|
3724
|
+
protoOf(XYZ).e1n = toOklch;
|
|
3725
|
+
protoOf(XYZColorSpaceImpl).j1r = invoke_2;
|
|
3726
|
+
protoOf(XYZColorSpaceImpl).k1r = invoke$default;
|
|
3459
3727
|
//endregion
|
|
3460
3728
|
//region block: init
|
|
3461
3729
|
Companion_instance_0 = new Companion();
|