@cruglobal/godtools-shared 0.9.0-SNAPSHOT.1176 → 0.9.0-SNAPSHOT.1177
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/Napier-napier-js-ir.js +26 -26
- package/antlr-kotlin-antlr-kotlin-runtime-js-ir.js +3013 -2951
- package/antlr-kotlin-antlr-kotlin-runtime-js-ir.js.map +1 -1
- package/colormath-root-colormath-js-ir.js +473 -473
- package/fluid-locale-js-ir.js +125 -125
- package/kotlin-mpp-godtools-tool-parser-npm.d.ts +61 -8
- package/kotlin-mpp-godtools-tool-parser-parser-expressions.js +647 -322
- package/kotlin-mpp-godtools-tool-parser-parser-expressions.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-parser.js +1911 -1714
- package/kotlin-mpp-godtools-tool-parser-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-state.js +90 -90
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +244 -72
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
- package/package.json +1 -1
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
//endregion
|
|
69
69
|
//region block: pre-declaration
|
|
70
70
|
function toXYZ() {
|
|
71
|
-
return this.
|
|
71
|
+
return this.h2g().i2g();
|
|
72
72
|
}
|
|
73
73
|
function toLAB() {
|
|
74
|
-
return this.
|
|
74
|
+
return this.i2g().o2g();
|
|
75
75
|
}
|
|
76
76
|
function toLCHab() {
|
|
77
|
-
return this.
|
|
77
|
+
return this.o2g().u2g();
|
|
78
78
|
}
|
|
79
79
|
setMetadataFor(Color, 'Color', interfaceMeta);
|
|
80
80
|
setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
setMetadataFor(ICtCp, 'ICtCp', classMeta, VOID, [Color]);
|
|
89
89
|
setMetadataFor(PqNonlinearity, 'PqNonlinearity', objectMeta);
|
|
90
90
|
function invoke(l, a, b, alpha) {
|
|
91
|
-
return this.
|
|
91
|
+
return this.i2j(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
92
92
|
}
|
|
93
93
|
setMetadataFor(LABColorSpace, 'LABColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
94
94
|
setMetadataFor(Companion, 'Companion', objectMeta, VOID, [LABColorSpace]);
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
|
|
103
103
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
104
104
|
function invoke_0(r, g, b, alpha) {
|
|
105
|
-
return this.
|
|
105
|
+
return this.i2j(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
106
106
|
}
|
|
107
107
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
108
108
|
setMetadataFor(Companion_1, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
|
|
119
119
|
setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
|
|
120
120
|
function invoke_1(x, y, z, alpha) {
|
|
121
|
-
return this.
|
|
121
|
+
return this.i2j(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
122
122
|
}
|
|
123
123
|
function invoke$default(x, y, z, alpha, $super) {
|
|
124
124
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
125
|
-
return $super === VOID ? this.
|
|
125
|
+
return $super === VOID ? this.k2j(x, y, z, alpha) : invoke_1(x, y, z, alpha);
|
|
126
126
|
}
|
|
127
127
|
setMetadataFor(XYZColorSpace, 'XYZColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
128
128
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [XYZColorSpace]);
|
|
@@ -134,13 +134,13 @@
|
|
|
134
134
|
function Color() {
|
|
135
135
|
}
|
|
136
136
|
function convertTo(_this__u8e3s4, space) {
|
|
137
|
-
return space.
|
|
137
|
+
return space.a2h(_this__u8e3s4);
|
|
138
138
|
}
|
|
139
139
|
function WhitePointColorSpace() {
|
|
140
140
|
}
|
|
141
141
|
function ColorComponentInfo(name, isPolar) {
|
|
142
|
-
this.
|
|
143
|
-
this.
|
|
142
|
+
this.c2h_1 = name;
|
|
143
|
+
this.d2h_1 = isPolar;
|
|
144
144
|
}
|
|
145
145
|
var RenderCondition_ALWAYS_instance;
|
|
146
146
|
var RenderCondition_NEVER_instance;
|
|
@@ -196,23 +196,23 @@
|
|
|
196
196
|
var tmp0_subject = _this__u8e3s4;
|
|
197
197
|
var tmp;
|
|
198
198
|
if (tmp0_subject instanceof RGB) {
|
|
199
|
-
var tmp1_subject = _this__u8e3s4.
|
|
200
|
-
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().
|
|
199
|
+
var tmp1_subject = _this__u8e3s4.n2g_1;
|
|
200
|
+
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().v2h_1) ? renderColorFunction(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().r2h_1) ? renderColorFunction(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().w2h_1) ? renderColorFunction(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().s2h_1) ? renderColorFunction(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
201
201
|
} else {
|
|
202
202
|
if (tmp0_subject instanceof HSL) {
|
|
203
203
|
tmp = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
204
204
|
} else {
|
|
205
205
|
if (tmp0_subject instanceof LAB) {
|
|
206
|
-
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
206
|
+
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().k2h_1), alphaPercent, renderAlpha);
|
|
207
207
|
} else {
|
|
208
208
|
if (tmp0_subject instanceof LCHab) {
|
|
209
|
-
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
209
|
+
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().i2h_1), hueUnit, alphaPercent, renderAlpha);
|
|
210
210
|
} else {
|
|
211
211
|
if (tmp0_subject instanceof HWB) {
|
|
212
212
|
tmp = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
213
213
|
} else {
|
|
214
214
|
if (tmp0_subject instanceof XYZ) {
|
|
215
|
-
tmp = renderColorFunction(_this__u8e3s4.
|
|
215
|
+
tmp = renderColorFunction(_this__u8e3s4.g2h(XYZColorSpaces_getInstance().f2h_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
216
216
|
} else {
|
|
217
217
|
tmp = null;
|
|
218
218
|
}
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
// Inline function 'kotlin.text.lowercase' call
|
|
247
247
|
var tmp$ret$0;
|
|
248
248
|
// Inline function 'kotlin.text.replace' call
|
|
249
|
-
var tmp0_replace = _this__u8e3s4.
|
|
249
|
+
var tmp0_replace = _this__u8e3s4.g2g().id();
|
|
250
250
|
var tmp1_replace = Regex_init_$Create$('\\W');
|
|
251
251
|
tmp$ret$0 = tmp1_replace.ac(tmp0_replace, '-');
|
|
252
252
|
var tmp2_lowercase = tmp$ret$0;
|
|
@@ -257,19 +257,19 @@
|
|
|
257
257
|
return '--' + tmp$ret$2;
|
|
258
258
|
}
|
|
259
259
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
260
|
-
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
260
|
+
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.j2g_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.x2h())), rgbPercent ? render(_this__u8e3s4.k2g_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.x2h())), rgbPercent ? render(_this__u8e3s4.l2g_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.x2h()))], alphaPercent, renderAlpha, commas);
|
|
261
261
|
}
|
|
262
262
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
263
|
-
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
263
|
+
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.y2h_1, true), render(_this__u8e3s4.z2h_1, true)], alphaPercent, renderAlpha, commas);
|
|
264
264
|
}
|
|
265
265
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
266
|
-
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
266
|
+
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.v2g_1 / 100, true), render(_this__u8e3s4.w2g_1), render(_this__u8e3s4.x2g_1)], alphaPercent, renderAlpha);
|
|
267
267
|
}
|
|
268
268
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
269
|
-
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
269
|
+
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.a2i_1 / 100, true), render(_this__u8e3s4.b2i_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
270
270
|
}
|
|
271
271
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
272
|
-
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
272
|
+
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.f2i_1, true), render(_this__u8e3s4.g2i_1, true)], alphaPercent, renderAlpha);
|
|
273
273
|
}
|
|
274
274
|
function render(_this__u8e3s4, percent) {
|
|
275
275
|
percent = percent === VOID ? false : percent;
|
|
@@ -312,8 +312,8 @@
|
|
|
312
312
|
}
|
|
313
313
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
314
314
|
var tmp;
|
|
315
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.
|
|
316
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
315
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.f2g()) : false) ? !(_this__u8e3s4.f2g() === 1.0) : false) {
|
|
316
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.f2g()), alphaPercent);
|
|
317
317
|
} else {
|
|
318
318
|
tmp = '';
|
|
319
319
|
}
|
|
@@ -344,10 +344,10 @@
|
|
|
344
344
|
var tmp;
|
|
345
345
|
switch (tmp0) {
|
|
346
346
|
case 0:
|
|
347
|
-
tmp = render(_this__u8e3s4.
|
|
347
|
+
tmp = render(_this__u8e3s4.h2i());
|
|
348
348
|
break;
|
|
349
349
|
case 1:
|
|
350
|
-
tmp = render(_this__u8e3s4.
|
|
350
|
+
tmp = render(_this__u8e3s4.h2i()) + 'deg';
|
|
351
351
|
break;
|
|
352
352
|
case 2:
|
|
353
353
|
tmp = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -382,24 +382,24 @@
|
|
|
382
382
|
return AngleUnit_AUTO_instance;
|
|
383
383
|
}
|
|
384
384
|
function hueAsRad(_this__u8e3s4) {
|
|
385
|
-
return degToRad(_this__u8e3s4.
|
|
385
|
+
return degToRad(_this__u8e3s4.h2i());
|
|
386
386
|
}
|
|
387
387
|
function hueAsGrad(_this__u8e3s4) {
|
|
388
|
-
return degToGrad(_this__u8e3s4.
|
|
388
|
+
return degToGrad(_this__u8e3s4.h2i());
|
|
389
389
|
}
|
|
390
390
|
function hueAsTurns(_this__u8e3s4) {
|
|
391
|
-
return degToTurns(_this__u8e3s4.
|
|
391
|
+
return degToTurns(_this__u8e3s4.h2i());
|
|
392
392
|
}
|
|
393
393
|
function WhitePoint(name, chromaticity) {
|
|
394
|
-
this.
|
|
395
|
-
this.
|
|
394
|
+
this.i2i_1 = name;
|
|
395
|
+
this.j2i_1 = chromaticity;
|
|
396
396
|
}
|
|
397
397
|
protoOf(WhitePoint).toString = function () {
|
|
398
|
-
return this.
|
|
398
|
+
return this.i2i_1;
|
|
399
399
|
};
|
|
400
400
|
protoOf(WhitePoint).hashCode = function () {
|
|
401
|
-
var result = getStringHashCode(this.
|
|
402
|
-
result = imul(result, 31) + this.
|
|
401
|
+
var result = getStringHashCode(this.i2i_1);
|
|
402
|
+
result = imul(result, 31) + this.j2i_1.hashCode() | 0;
|
|
403
403
|
return result;
|
|
404
404
|
};
|
|
405
405
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -408,22 +408,22 @@
|
|
|
408
408
|
if (!(other instanceof WhitePoint))
|
|
409
409
|
return false;
|
|
410
410
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
411
|
-
if (!(this.
|
|
411
|
+
if (!(this.i2i_1 === tmp0_other_with_cast.i2i_1))
|
|
412
412
|
return false;
|
|
413
|
-
if (!this.
|
|
413
|
+
if (!this.j2i_1.equals(tmp0_other_with_cast.j2i_1))
|
|
414
414
|
return false;
|
|
415
415
|
return true;
|
|
416
416
|
};
|
|
417
417
|
function Illuminant() {
|
|
418
418
|
Illuminant_instance = this;
|
|
419
|
-
this.
|
|
420
|
-
this.
|
|
421
|
-
this.
|
|
422
|
-
this.
|
|
423
|
-
this.
|
|
424
|
-
this.
|
|
425
|
-
this.
|
|
426
|
-
this.
|
|
419
|
+
this.k2i_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
420
|
+
this.l2i_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
421
|
+
this.m2i_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
422
|
+
this.n2i_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
423
|
+
this.o2i_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
424
|
+
this.p2i_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
425
|
+
this.q2i_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
426
|
+
this.r2i_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
427
427
|
}
|
|
428
428
|
var Illuminant_instance;
|
|
429
429
|
function Illuminant_getInstance() {
|
|
@@ -718,14 +718,14 @@
|
|
|
718
718
|
var ICTCP_LMS_TO_XYZ;
|
|
719
719
|
function ICtCp() {
|
|
720
720
|
}
|
|
721
|
-
protoOf(ICtCp).
|
|
722
|
-
var fo = RGBColorSpaces_getInstance().
|
|
721
|
+
protoOf(ICtCp).w2i = function () {
|
|
722
|
+
var fo = RGBColorSpaces_getInstance().s2h_1.x2i();
|
|
723
723
|
var tmp$ret$3;
|
|
724
724
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
725
725
|
var tmp0_dot = get_ICTCP_ICTCP_to_LMS();
|
|
726
|
-
var tmp1_dot = this.
|
|
727
|
-
var tmp2_dot = this.
|
|
728
|
-
var tmp3_dot = this.
|
|
726
|
+
var tmp1_dot = this.s2i_1;
|
|
727
|
+
var tmp2_dot = this.t2i_1;
|
|
728
|
+
var tmp3_dot = this.u2i_1;
|
|
729
729
|
var tmp$ret$2;
|
|
730
730
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
731
731
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
@@ -734,15 +734,15 @@
|
|
|
734
734
|
var tmp$ret$1;
|
|
735
735
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
736
736
|
var tmp0_dot_0 = get_ICTCP_LMS_to_RGB();
|
|
737
|
-
var tmp1_dot_0 = PqNonlinearity_getInstance().
|
|
738
|
-
var tmp2_dot_0 = PqNonlinearity_getInstance().
|
|
739
|
-
var tmp3_dot_0 = PqNonlinearity_getInstance().
|
|
737
|
+
var tmp1_dot_0 = PqNonlinearity_getInstance().g2j(tmp4__anonymous__pkmkx7);
|
|
738
|
+
var tmp2_dot_0 = PqNonlinearity_getInstance().g2j(tmp5__anonymous__kpxxpo);
|
|
739
|
+
var tmp3_dot_0 = PqNonlinearity_getInstance().g2j(tmp6__anonymous__fv9ai5);
|
|
740
740
|
var tmp$ret$0;
|
|
741
741
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
742
742
|
var tmp4__anonymous__pkmkx7_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 0) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 0) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 0) * tmp3_dot_0;
|
|
743
743
|
var tmp5__anonymous__kpxxpo_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 1) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 1) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 1) * tmp3_dot_0;
|
|
744
744
|
var tmp6__anonymous__fv9ai5_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 2) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 2) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 2) * tmp3_dot_0;
|
|
745
|
-
tmp$ret$0 = RGBColorSpaces_getInstance().
|
|
745
|
+
tmp$ret$0 = RGBColorSpaces_getInstance().s2h_1.i2j(fo.h2j(tmp4__anonymous__pkmkx7_0), fo.h2j(tmp5__anonymous__kpxxpo_0), fo.h2j(tmp6__anonymous__fv9ai5_0), this.v2i_1);
|
|
746
746
|
tmp$ret$1 = tmp$ret$0;
|
|
747
747
|
tmp$ret$2 = tmp$ret$1;
|
|
748
748
|
tmp$ret$3 = tmp$ret$2;
|
|
@@ -750,22 +750,22 @@
|
|
|
750
750
|
};
|
|
751
751
|
function PqNonlinearity() {
|
|
752
752
|
PqNonlinearity_instance = this;
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
755
|
-
this.
|
|
756
|
-
this.
|
|
757
|
-
this.
|
|
758
|
-
this.
|
|
759
|
-
this.
|
|
760
|
-
this.
|
|
761
|
-
}
|
|
762
|
-
protoOf(PqNonlinearity).
|
|
753
|
+
this.y2i_1 = 0.1593017578125;
|
|
754
|
+
this.z2i_1 = 78.84375;
|
|
755
|
+
this.a2j_1 = 0.8359375;
|
|
756
|
+
this.b2j_1 = 18.8515625;
|
|
757
|
+
this.c2j_1 = 18.6875;
|
|
758
|
+
this.d2j_1 = 10000.0;
|
|
759
|
+
this.e2j_1 = 6.277394636015326;
|
|
760
|
+
this.f2j_1 = 0.012683313515655966;
|
|
761
|
+
}
|
|
762
|
+
protoOf(PqNonlinearity).g2j = function (x) {
|
|
763
763
|
var vp = spow(x, 0.012683313515655966);
|
|
764
764
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
765
765
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
766
766
|
return 10000.0 * l;
|
|
767
767
|
};
|
|
768
|
-
protoOf(PqNonlinearity).
|
|
768
|
+
protoOf(PqNonlinearity).h2j = function (x) {
|
|
769
769
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
770
770
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
771
771
|
};
|
|
@@ -792,22 +792,22 @@
|
|
|
792
792
|
}
|
|
793
793
|
function Companion() {
|
|
794
794
|
Companion_instance = this;
|
|
795
|
-
this.
|
|
795
|
+
this.j2j_1 = LABColorSpaces_getInstance().j2h_1;
|
|
796
796
|
}
|
|
797
797
|
protoOf(Companion).id = function () {
|
|
798
|
-
return this.
|
|
798
|
+
return this.j2j_1.id();
|
|
799
799
|
};
|
|
800
|
-
protoOf(Companion).
|
|
801
|
-
return this.
|
|
800
|
+
protoOf(Companion).b2h = function () {
|
|
801
|
+
return this.j2j_1.b2h();
|
|
802
802
|
};
|
|
803
|
-
protoOf(Companion).
|
|
804
|
-
return this.
|
|
803
|
+
protoOf(Companion).a2h = function (color) {
|
|
804
|
+
return this.j2j_1.a2h(color);
|
|
805
805
|
};
|
|
806
|
-
protoOf(Companion).
|
|
807
|
-
return this.
|
|
806
|
+
protoOf(Companion).i2j = function (l, a, b, alpha) {
|
|
807
|
+
return this.j2j_1.i2j(l, a, b, alpha);
|
|
808
808
|
};
|
|
809
|
-
protoOf(Companion).
|
|
810
|
-
return this.
|
|
809
|
+
protoOf(Companion).k2j = function (l, a, b, alpha) {
|
|
810
|
+
return this.j2j_1.k2j(l, a, b, alpha);
|
|
811
811
|
};
|
|
812
812
|
var Companion_instance;
|
|
813
813
|
function Companion_getInstance() {
|
|
@@ -817,37 +817,37 @@
|
|
|
817
817
|
}
|
|
818
818
|
function LAB(l, a, b, alpha, space) {
|
|
819
819
|
Companion_getInstance();
|
|
820
|
-
this.
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
823
|
-
this.
|
|
824
|
-
this.
|
|
825
|
-
}
|
|
826
|
-
protoOf(LAB).
|
|
827
|
-
return this.
|
|
828
|
-
};
|
|
829
|
-
protoOf(LAB).
|
|
830
|
-
return this.
|
|
831
|
-
};
|
|
832
|
-
protoOf(LAB).
|
|
833
|
-
var tmp0_subject = this.
|
|
834
|
-
return tmp0_subject === 0.0 ? Companion_getInstance_1().
|
|
835
|
-
};
|
|
836
|
-
protoOf(LAB).
|
|
837
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
838
|
-
if (this.
|
|
839
|
-
return xyzSpace.
|
|
840
|
-
var fy = (this.
|
|
841
|
-
var fz = fy - this.
|
|
842
|
-
var fx = this.
|
|
820
|
+
this.v2g_1 = l;
|
|
821
|
+
this.w2g_1 = a;
|
|
822
|
+
this.x2g_1 = b;
|
|
823
|
+
this.y2g_1 = alpha;
|
|
824
|
+
this.z2g_1 = space;
|
|
825
|
+
}
|
|
826
|
+
protoOf(LAB).f2g = function () {
|
|
827
|
+
return this.y2g_1;
|
|
828
|
+
};
|
|
829
|
+
protoOf(LAB).g2g = function () {
|
|
830
|
+
return this.z2g_1;
|
|
831
|
+
};
|
|
832
|
+
protoOf(LAB).h2g = function () {
|
|
833
|
+
var tmp0_subject = this.v2g_1;
|
|
834
|
+
return tmp0_subject === 0.0 ? Companion_getInstance_1().i2j(0.0, 0.0, 0.0, this.y2g_1) : this.i2g().h2g();
|
|
835
|
+
};
|
|
836
|
+
protoOf(LAB).i2g = function () {
|
|
837
|
+
var xyzSpace = XYZColorSpace_0(this.z2g_1.b2h());
|
|
838
|
+
if (this.v2g_1 === 0.0)
|
|
839
|
+
return xyzSpace.m2j(0.0, 0.0, 0.0);
|
|
840
|
+
var fy = (this.v2g_1 + 16) / 116.0;
|
|
841
|
+
var fz = fy - this.x2g_1 / 200.0;
|
|
842
|
+
var fx = this.w2g_1 / 500.0 + fy;
|
|
843
843
|
var tmp;
|
|
844
|
-
if (this.
|
|
844
|
+
if (this.v2g_1 > get_CIE_E_times_K()) {
|
|
845
845
|
var tmp$ret$0;
|
|
846
846
|
// Inline function 'kotlin.math.pow' call
|
|
847
847
|
tmp$ret$0 = Math.pow(fy, 3.0);
|
|
848
848
|
tmp = tmp$ret$0;
|
|
849
849
|
} else {
|
|
850
|
-
tmp = this.
|
|
850
|
+
tmp = this.v2g_1 / get_CIE_K();
|
|
851
851
|
}
|
|
852
852
|
var yr = tmp;
|
|
853
853
|
var tmp$ret$3;
|
|
@@ -874,14 +874,14 @@
|
|
|
874
874
|
tmp$ret$5 = tmp1_let > get_CIE_E() ? tmp1_let : (116 * fx - 16) / get_CIE_K();
|
|
875
875
|
tmp$ret$6 = tmp$ret$5;
|
|
876
876
|
var xr = tmp$ret$6;
|
|
877
|
-
var wp = this.
|
|
878
|
-
return xyzSpace.
|
|
877
|
+
var wp = this.z2g_1.b2h().j2i_1;
|
|
878
|
+
return xyzSpace.k2j(xr * wp.q2j(), yr * wp.p2j_1, zr * wp.r2j(), this.y2g_1);
|
|
879
879
|
};
|
|
880
|
-
protoOf(LAB).
|
|
880
|
+
protoOf(LAB).u2g = function () {
|
|
881
881
|
var tmp$ret$3;
|
|
882
882
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
883
|
-
var tmp1_toPolarModel = this.
|
|
884
|
-
var tmp2_toPolarModel = this.
|
|
883
|
+
var tmp1_toPolarModel = this.w2g_1;
|
|
884
|
+
var tmp2_toPolarModel = this.x2g_1;
|
|
885
885
|
var tmp$ret$0;
|
|
886
886
|
// Inline function 'kotlin.math.sqrt' call
|
|
887
887
|
var tmp0_sqrt = tmp1_toPolarModel * tmp1_toPolarModel + tmp2_toPolarModel * tmp2_toPolarModel;
|
|
@@ -901,29 +901,29 @@
|
|
|
901
901
|
var tmp$ret$2;
|
|
902
902
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
903
903
|
var tmp3__anonymous__ufb84q = normalizeDeg(h);
|
|
904
|
-
tmp$ret$2 = LCHabColorSpace(this.
|
|
904
|
+
tmp$ret$2 = LCHabColorSpace(this.z2g_1.b2h()).i2j(this.v2g_1, c, tmp3__anonymous__ufb84q, this.y2g_1);
|
|
905
905
|
tmp$ret$3 = tmp$ret$2;
|
|
906
906
|
return tmp$ret$3;
|
|
907
907
|
};
|
|
908
|
-
protoOf(LAB).
|
|
908
|
+
protoOf(LAB).o2g = function () {
|
|
909
909
|
return this;
|
|
910
910
|
};
|
|
911
911
|
protoOf(LAB).v7 = function () {
|
|
912
912
|
var tmp$ret$0;
|
|
913
913
|
// Inline function 'kotlin.floatArrayOf' call
|
|
914
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
914
|
+
var tmp0_floatArrayOf = new Float32Array([this.v2g_1, this.w2g_1, this.x2g_1, this.y2g_1]);
|
|
915
915
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
916
916
|
return tmp$ret$0;
|
|
917
917
|
};
|
|
918
918
|
protoOf(LAB).toString = function () {
|
|
919
|
-
return 'LAB(l=' + this.
|
|
919
|
+
return 'LAB(l=' + this.v2g_1 + ', a=' + this.w2g_1 + ', b=' + this.x2g_1 + ', alpha=' + this.y2g_1 + ', space=' + this.z2g_1 + ')';
|
|
920
920
|
};
|
|
921
921
|
protoOf(LAB).hashCode = function () {
|
|
922
|
-
var result = getNumberHashCode(this.
|
|
923
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
924
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
925
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
926
|
-
result = imul(result, 31) + hashCode(this.
|
|
922
|
+
var result = getNumberHashCode(this.v2g_1);
|
|
923
|
+
result = imul(result, 31) + getNumberHashCode(this.w2g_1) | 0;
|
|
924
|
+
result = imul(result, 31) + getNumberHashCode(this.x2g_1) | 0;
|
|
925
|
+
result = imul(result, 31) + getNumberHashCode(this.y2g_1) | 0;
|
|
926
|
+
result = imul(result, 31) + hashCode(this.z2g_1) | 0;
|
|
927
927
|
return result;
|
|
928
928
|
};
|
|
929
929
|
protoOf(LAB).equals = function (other) {
|
|
@@ -932,15 +932,15 @@
|
|
|
932
932
|
if (!(other instanceof LAB))
|
|
933
933
|
return false;
|
|
934
934
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
935
|
-
if (!equals(this.
|
|
935
|
+
if (!equals(this.v2g_1, tmp0_other_with_cast.v2g_1))
|
|
936
936
|
return false;
|
|
937
|
-
if (!equals(this.
|
|
937
|
+
if (!equals(this.w2g_1, tmp0_other_with_cast.w2g_1))
|
|
938
938
|
return false;
|
|
939
|
-
if (!equals(this.
|
|
939
|
+
if (!equals(this.x2g_1, tmp0_other_with_cast.x2g_1))
|
|
940
940
|
return false;
|
|
941
|
-
if (!equals(this.
|
|
941
|
+
if (!equals(this.y2g_1, tmp0_other_with_cast.y2g_1))
|
|
942
942
|
return false;
|
|
943
|
-
if (!equals(this.
|
|
943
|
+
if (!equals(this.z2g_1, tmp0_other_with_cast.z2g_1))
|
|
944
944
|
return false;
|
|
945
945
|
return true;
|
|
946
946
|
};
|
|
@@ -948,12 +948,12 @@
|
|
|
948
948
|
}
|
|
949
949
|
function LABColorSpace_0(whitePoint) {
|
|
950
950
|
var tmp0_subject = whitePoint;
|
|
951
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
951
|
+
return tmp0_subject.equals(Illuminant_getInstance().p2i_1) ? LABColorSpaces_getInstance().j2h_1 : tmp0_subject.equals(Illuminant_getInstance().n2i_1) ? LABColorSpaces_getInstance().k2h_1 : new LABColorSpaceImpl(whitePoint);
|
|
952
952
|
}
|
|
953
953
|
function LABColorSpaces() {
|
|
954
954
|
LABColorSpaces_instance = this;
|
|
955
|
-
this.
|
|
956
|
-
this.
|
|
955
|
+
this.j2h_1 = new LABColorSpaceImpl(Illuminant_getInstance().p2i_1);
|
|
956
|
+
this.k2h_1 = new LABColorSpaceImpl(Illuminant_getInstance().n2i_1);
|
|
957
957
|
}
|
|
958
958
|
var LABColorSpaces_instance;
|
|
959
959
|
function LABColorSpaces_getInstance() {
|
|
@@ -962,45 +962,45 @@
|
|
|
962
962
|
return LABColorSpaces_instance;
|
|
963
963
|
}
|
|
964
964
|
function LABColorSpaceImpl(whitePoint) {
|
|
965
|
-
this.
|
|
966
|
-
this.
|
|
965
|
+
this.s2j_1 = whitePoint;
|
|
966
|
+
this.t2j_1 = rectangularComponentInfo('LAB');
|
|
967
967
|
}
|
|
968
|
-
protoOf(LABColorSpaceImpl).
|
|
969
|
-
return this.
|
|
968
|
+
protoOf(LABColorSpaceImpl).b2h = function () {
|
|
969
|
+
return this.s2j_1;
|
|
970
970
|
};
|
|
971
971
|
protoOf(LABColorSpaceImpl).id = function () {
|
|
972
972
|
return 'LAB';
|
|
973
973
|
};
|
|
974
|
-
protoOf(LABColorSpaceImpl).
|
|
974
|
+
protoOf(LABColorSpaceImpl).a2h = function (color) {
|
|
975
975
|
var tmp$ret$2;
|
|
976
976
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
977
977
|
var tmp;
|
|
978
|
-
var tmp_0 = color.
|
|
978
|
+
var tmp_0 = color.g2g();
|
|
979
979
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
980
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
981
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
980
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b2h();
|
|
981
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().p2i_1 : tmp1_elvis_lhs).equals(this.b2h())) {
|
|
982
982
|
var tmp$ret$0;
|
|
983
983
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
984
|
-
tmp$ret$0 = color.
|
|
984
|
+
tmp$ret$0 = color.o2g();
|
|
985
985
|
tmp = tmp$ret$0;
|
|
986
986
|
} else {
|
|
987
987
|
var tmp$ret$1;
|
|
988
988
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
989
|
-
var tmp0__anonymous__q1qw7t = color.
|
|
990
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.
|
|
989
|
+
var tmp0__anonymous__q1qw7t = color.i2g().g2h(XYZColorSpace_0(this.b2h()));
|
|
990
|
+
tmp$ret$1 = tmp0__anonymous__q1qw7t.o2g();
|
|
991
991
|
tmp = tmp$ret$1;
|
|
992
992
|
}
|
|
993
993
|
tmp$ret$2 = tmp;
|
|
994
994
|
return tmp$ret$2;
|
|
995
995
|
};
|
|
996
996
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
997
|
-
return 'LABColorSpace(' + this.
|
|
997
|
+
return 'LABColorSpace(' + this.s2j_1 + ')';
|
|
998
998
|
};
|
|
999
|
-
protoOf(LABColorSpaceImpl).
|
|
999
|
+
protoOf(LABColorSpaceImpl).i2j = function (l, a, b, alpha) {
|
|
1000
1000
|
return new LAB(l, a, b, alpha, this);
|
|
1001
1001
|
};
|
|
1002
1002
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1003
|
-
return this.
|
|
1003
|
+
return this.s2j_1.hashCode();
|
|
1004
1004
|
};
|
|
1005
1005
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1006
1006
|
if (this === other)
|
|
@@ -1008,25 +1008,25 @@
|
|
|
1008
1008
|
if (!(other instanceof LABColorSpaceImpl))
|
|
1009
1009
|
return false;
|
|
1010
1010
|
var tmp0_other_with_cast = other instanceof LABColorSpaceImpl ? other : THROW_CCE();
|
|
1011
|
-
if (!this.
|
|
1011
|
+
if (!this.s2j_1.equals(tmp0_other_with_cast.s2j_1))
|
|
1012
1012
|
return false;
|
|
1013
1013
|
return true;
|
|
1014
1014
|
};
|
|
1015
1015
|
function Companion_0() {
|
|
1016
1016
|
Companion_instance_0 = this;
|
|
1017
|
-
this.
|
|
1017
|
+
this.u2j_1 = LCHabColorSpaces_getInstance().h2h_1;
|
|
1018
1018
|
}
|
|
1019
1019
|
protoOf(Companion_0).id = function () {
|
|
1020
|
-
return this.
|
|
1020
|
+
return this.u2j_1.id();
|
|
1021
1021
|
};
|
|
1022
|
-
protoOf(Companion_0).
|
|
1023
|
-
return this.
|
|
1022
|
+
protoOf(Companion_0).b2h = function () {
|
|
1023
|
+
return this.u2j_1.b2h();
|
|
1024
1024
|
};
|
|
1025
|
-
protoOf(Companion_0).
|
|
1026
|
-
return this.
|
|
1025
|
+
protoOf(Companion_0).a2h = function (color) {
|
|
1026
|
+
return this.u2j_1.a2h(color);
|
|
1027
1027
|
};
|
|
1028
|
-
protoOf(Companion_0).
|
|
1029
|
-
return this.
|
|
1028
|
+
protoOf(Companion_0).i2j = function (l, c, h, alpha) {
|
|
1029
|
+
return this.u2j_1.i2j(l, c, h, alpha);
|
|
1030
1030
|
};
|
|
1031
1031
|
var Companion_instance_0;
|
|
1032
1032
|
function Companion_getInstance_0() {
|
|
@@ -1036,32 +1036,32 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
function LCHab(l, c, h, alpha, space) {
|
|
1038
1038
|
Companion_getInstance_0();
|
|
1039
|
-
this.
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
1039
|
+
this.a2i_1 = l;
|
|
1040
|
+
this.b2i_1 = c;
|
|
1041
|
+
this.c2i_1 = h;
|
|
1042
|
+
this.d2i_1 = alpha;
|
|
1043
|
+
this.e2i_1 = space;
|
|
1044
1044
|
}
|
|
1045
|
-
protoOf(LCHab).
|
|
1046
|
-
return this.
|
|
1045
|
+
protoOf(LCHab).h2i = function () {
|
|
1046
|
+
return this.c2i_1;
|
|
1047
1047
|
};
|
|
1048
|
-
protoOf(LCHab).
|
|
1049
|
-
return this.
|
|
1048
|
+
protoOf(LCHab).f2g = function () {
|
|
1049
|
+
return this.d2i_1;
|
|
1050
1050
|
};
|
|
1051
|
-
protoOf(LCHab).
|
|
1052
|
-
return this.
|
|
1051
|
+
protoOf(LCHab).g2g = function () {
|
|
1052
|
+
return this.e2i_1;
|
|
1053
1053
|
};
|
|
1054
|
-
protoOf(LCHab).
|
|
1055
|
-
return this.
|
|
1054
|
+
protoOf(LCHab).h2g = function () {
|
|
1055
|
+
return this.o2g().h2g();
|
|
1056
1056
|
};
|
|
1057
|
-
protoOf(LCHab).
|
|
1058
|
-
return this.
|
|
1057
|
+
protoOf(LCHab).i2g = function () {
|
|
1058
|
+
return this.o2g().i2g();
|
|
1059
1059
|
};
|
|
1060
|
-
protoOf(LCHab).
|
|
1060
|
+
protoOf(LCHab).o2g = function () {
|
|
1061
1061
|
var tmp$ret$3;
|
|
1062
1062
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1063
|
-
var tmp0_fromPolarModel = this.
|
|
1064
|
-
var tmp1_fromPolarModel = this.
|
|
1063
|
+
var tmp0_fromPolarModel = this.b2i_1;
|
|
1064
|
+
var tmp1_fromPolarModel = this.c2i_1;
|
|
1065
1065
|
var hDegrees = isNaN_0(tmp1_fromPolarModel) ? 0.0 : degToRad(tmp1_fromPolarModel);
|
|
1066
1066
|
var tmp$ret$0;
|
|
1067
1067
|
// Inline function 'kotlin.math.cos' call
|
|
@@ -1073,29 +1073,29 @@
|
|
|
1073
1073
|
var b = tmp0_fromPolarModel * tmp$ret$1;
|
|
1074
1074
|
var tmp$ret$2;
|
|
1075
1075
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1076
|
-
tmp$ret$2 = LABColorSpace_0(this.
|
|
1076
|
+
tmp$ret$2 = LABColorSpace_0(this.e2i_1.b2h()).i2j(this.a2i_1, a, b, this.d2i_1);
|
|
1077
1077
|
tmp$ret$3 = tmp$ret$2;
|
|
1078
1078
|
return tmp$ret$3;
|
|
1079
1079
|
};
|
|
1080
|
-
protoOf(LCHab).
|
|
1080
|
+
protoOf(LCHab).u2g = function () {
|
|
1081
1081
|
return this;
|
|
1082
1082
|
};
|
|
1083
1083
|
protoOf(LCHab).v7 = function () {
|
|
1084
1084
|
var tmp$ret$0;
|
|
1085
1085
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1086
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1086
|
+
var tmp0_floatArrayOf = new Float32Array([this.a2i_1, this.b2i_1, this.c2i_1, this.d2i_1]);
|
|
1087
1087
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1088
1088
|
return tmp$ret$0;
|
|
1089
1089
|
};
|
|
1090
1090
|
protoOf(LCHab).toString = function () {
|
|
1091
|
-
return 'LCHab(l=' + this.
|
|
1091
|
+
return 'LCHab(l=' + this.a2i_1 + ', c=' + this.b2i_1 + ', h=' + this.c2i_1 + ', alpha=' + this.d2i_1 + ', space=' + this.e2i_1 + ')';
|
|
1092
1092
|
};
|
|
1093
1093
|
protoOf(LCHab).hashCode = function () {
|
|
1094
|
-
var result = getNumberHashCode(this.
|
|
1095
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1096
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1097
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1098
|
-
result = imul(result, 31) + hashCode(this.
|
|
1094
|
+
var result = getNumberHashCode(this.a2i_1);
|
|
1095
|
+
result = imul(result, 31) + getNumberHashCode(this.b2i_1) | 0;
|
|
1096
|
+
result = imul(result, 31) + getNumberHashCode(this.c2i_1) | 0;
|
|
1097
|
+
result = imul(result, 31) + getNumberHashCode(this.d2i_1) | 0;
|
|
1098
|
+
result = imul(result, 31) + hashCode(this.e2i_1) | 0;
|
|
1099
1099
|
return result;
|
|
1100
1100
|
};
|
|
1101
1101
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1104,26 +1104,26 @@
|
|
|
1104
1104
|
if (!(other instanceof LCHab))
|
|
1105
1105
|
return false;
|
|
1106
1106
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1107
|
-
if (!equals(this.
|
|
1107
|
+
if (!equals(this.a2i_1, tmp0_other_with_cast.a2i_1))
|
|
1108
1108
|
return false;
|
|
1109
|
-
if (!equals(this.
|
|
1109
|
+
if (!equals(this.b2i_1, tmp0_other_with_cast.b2i_1))
|
|
1110
1110
|
return false;
|
|
1111
|
-
if (!equals(this.
|
|
1111
|
+
if (!equals(this.c2i_1, tmp0_other_with_cast.c2i_1))
|
|
1112
1112
|
return false;
|
|
1113
|
-
if (!equals(this.
|
|
1113
|
+
if (!equals(this.d2i_1, tmp0_other_with_cast.d2i_1))
|
|
1114
1114
|
return false;
|
|
1115
|
-
if (!equals(this.
|
|
1115
|
+
if (!equals(this.e2i_1, tmp0_other_with_cast.e2i_1))
|
|
1116
1116
|
return false;
|
|
1117
1117
|
return true;
|
|
1118
1118
|
};
|
|
1119
1119
|
function LCHabColorSpace(whitePoint) {
|
|
1120
1120
|
var tmp0_subject = whitePoint;
|
|
1121
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
1121
|
+
return tmp0_subject.equals(Illuminant_getInstance().p2i_1) ? LCHabColorSpaces_getInstance().h2h_1 : tmp0_subject.equals(Illuminant_getInstance().n2i_1) ? LCHabColorSpaces_getInstance().i2h_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1122
1122
|
}
|
|
1123
1123
|
function LCHabColorSpaces() {
|
|
1124
1124
|
LCHabColorSpaces_instance = this;
|
|
1125
|
-
this.
|
|
1126
|
-
this.
|
|
1125
|
+
this.h2h_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().p2i_1);
|
|
1126
|
+
this.i2h_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().n2i_1);
|
|
1127
1127
|
}
|
|
1128
1128
|
var LCHabColorSpaces_instance;
|
|
1129
1129
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1132,45 +1132,45 @@
|
|
|
1132
1132
|
return LCHabColorSpaces_instance;
|
|
1133
1133
|
}
|
|
1134
1134
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1135
|
-
this.
|
|
1136
|
-
this.
|
|
1135
|
+
this.v2j_1 = whitePoint;
|
|
1136
|
+
this.w2j_1 = polarComponentInfo('LCH');
|
|
1137
1137
|
}
|
|
1138
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1139
|
-
return this.
|
|
1138
|
+
protoOf(LCHabColorSpaceImpl).b2h = function () {
|
|
1139
|
+
return this.v2j_1;
|
|
1140
1140
|
};
|
|
1141
1141
|
protoOf(LCHabColorSpaceImpl).id = function () {
|
|
1142
1142
|
return 'LCHab';
|
|
1143
1143
|
};
|
|
1144
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1144
|
+
protoOf(LCHabColorSpaceImpl).a2h = function (color) {
|
|
1145
1145
|
var tmp$ret$2;
|
|
1146
1146
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1147
1147
|
var tmp;
|
|
1148
|
-
var tmp_0 = color.
|
|
1148
|
+
var tmp_0 = color.g2g();
|
|
1149
1149
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1150
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1151
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1150
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b2h();
|
|
1151
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().p2i_1 : tmp1_elvis_lhs).equals(this.b2h())) {
|
|
1152
1152
|
var tmp$ret$0;
|
|
1153
1153
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1154
|
-
tmp$ret$0 = color.
|
|
1154
|
+
tmp$ret$0 = color.u2g();
|
|
1155
1155
|
tmp = tmp$ret$0;
|
|
1156
1156
|
} else {
|
|
1157
1157
|
var tmp$ret$1;
|
|
1158
1158
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1159
|
-
var tmp0__anonymous__q1qw7t = color.
|
|
1160
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.
|
|
1159
|
+
var tmp0__anonymous__q1qw7t = color.i2g().g2h(XYZColorSpace_0(this.b2h()));
|
|
1160
|
+
tmp$ret$1 = tmp0__anonymous__q1qw7t.u2g();
|
|
1161
1161
|
tmp = tmp$ret$1;
|
|
1162
1162
|
}
|
|
1163
1163
|
tmp$ret$2 = tmp;
|
|
1164
1164
|
return tmp$ret$2;
|
|
1165
1165
|
};
|
|
1166
1166
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1167
|
-
return 'LCHabColorSpace(' + this.
|
|
1167
|
+
return 'LCHabColorSpace(' + this.v2j_1 + ')';
|
|
1168
1168
|
};
|
|
1169
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1169
|
+
protoOf(LCHabColorSpaceImpl).i2j = function (l, c, h, alpha) {
|
|
1170
1170
|
return new LCHab(l, c, h, alpha, this);
|
|
1171
1171
|
};
|
|
1172
1172
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
1173
|
-
return this.
|
|
1173
|
+
return this.v2j_1.hashCode();
|
|
1174
1174
|
};
|
|
1175
1175
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
1176
1176
|
if (this === other)
|
|
@@ -1178,24 +1178,24 @@
|
|
|
1178
1178
|
if (!(other instanceof LCHabColorSpaceImpl))
|
|
1179
1179
|
return false;
|
|
1180
1180
|
var tmp0_other_with_cast = other instanceof LCHabColorSpaceImpl ? other : THROW_CCE();
|
|
1181
|
-
if (!this.
|
|
1181
|
+
if (!this.v2j_1.equals(tmp0_other_with_cast.v2j_1))
|
|
1182
1182
|
return false;
|
|
1183
1183
|
return true;
|
|
1184
1184
|
};
|
|
1185
1185
|
function GammaTransferFunctions(gamma) {
|
|
1186
|
-
this.
|
|
1186
|
+
this.x2j_1 = gamma;
|
|
1187
1187
|
}
|
|
1188
|
-
protoOf(GammaTransferFunctions).
|
|
1189
|
-
return spow(x, this.
|
|
1188
|
+
protoOf(GammaTransferFunctions).g2j = function (x) {
|
|
1189
|
+
return spow(x, this.x2j_1);
|
|
1190
1190
|
};
|
|
1191
|
-
protoOf(GammaTransferFunctions).
|
|
1192
|
-
return spow(x, 1.0 / this.
|
|
1191
|
+
protoOf(GammaTransferFunctions).h2j = function (x) {
|
|
1192
|
+
return spow(x, 1.0 / this.x2j_1);
|
|
1193
1193
|
};
|
|
1194
1194
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
1195
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
1195
|
+
return 'GammaTransferFunctions(gamma=' + this.x2j_1 + ')';
|
|
1196
1196
|
};
|
|
1197
1197
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
1198
|
-
return getNumberHashCode(this.
|
|
1198
|
+
return getNumberHashCode(this.x2j_1);
|
|
1199
1199
|
};
|
|
1200
1200
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
1201
1201
|
if (this === other)
|
|
@@ -1203,17 +1203,17 @@
|
|
|
1203
1203
|
if (!(other instanceof GammaTransferFunctions))
|
|
1204
1204
|
return false;
|
|
1205
1205
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
1206
|
-
if (!equals(this.
|
|
1206
|
+
if (!equals(this.x2j_1, tmp0_other_with_cast.x2j_1))
|
|
1207
1207
|
return false;
|
|
1208
1208
|
return true;
|
|
1209
1209
|
};
|
|
1210
1210
|
function LinearTransferFunctions() {
|
|
1211
1211
|
LinearTransferFunctions_instance = this;
|
|
1212
1212
|
}
|
|
1213
|
-
protoOf(LinearTransferFunctions).
|
|
1213
|
+
protoOf(LinearTransferFunctions).g2j = function (x) {
|
|
1214
1214
|
return x;
|
|
1215
1215
|
};
|
|
1216
|
-
protoOf(LinearTransferFunctions).
|
|
1216
|
+
protoOf(LinearTransferFunctions).h2j = function (x) {
|
|
1217
1217
|
return x;
|
|
1218
1218
|
};
|
|
1219
1219
|
var LinearTransferFunctions_instance;
|
|
@@ -1226,31 +1226,31 @@
|
|
|
1226
1226
|
}
|
|
1227
1227
|
function Companion_1() {
|
|
1228
1228
|
Companion_instance_1 = this;
|
|
1229
|
-
this.
|
|
1229
|
+
this.l2j_1 = RGBColorSpaces_getInstance().l2h_1;
|
|
1230
1230
|
}
|
|
1231
|
-
protoOf(Companion_1).
|
|
1232
|
-
return this.
|
|
1231
|
+
protoOf(Companion_1).z2j = function () {
|
|
1232
|
+
return this.l2j_1.z2j();
|
|
1233
1233
|
};
|
|
1234
|
-
protoOf(Companion_1).
|
|
1235
|
-
return this.
|
|
1234
|
+
protoOf(Companion_1).y2j = function () {
|
|
1235
|
+
return this.l2j_1.y2j();
|
|
1236
1236
|
};
|
|
1237
1237
|
protoOf(Companion_1).id = function () {
|
|
1238
|
-
return this.
|
|
1238
|
+
return this.l2j_1.id();
|
|
1239
1239
|
};
|
|
1240
|
-
protoOf(Companion_1).
|
|
1241
|
-
return this.
|
|
1240
|
+
protoOf(Companion_1).x2i = function () {
|
|
1241
|
+
return this.l2j_1.x2i();
|
|
1242
1242
|
};
|
|
1243
|
-
protoOf(Companion_1).
|
|
1244
|
-
return this.
|
|
1243
|
+
protoOf(Companion_1).b2h = function () {
|
|
1244
|
+
return this.l2j_1.b2h();
|
|
1245
1245
|
};
|
|
1246
|
-
protoOf(Companion_1).
|
|
1247
|
-
return this.
|
|
1246
|
+
protoOf(Companion_1).a2h = function (color) {
|
|
1247
|
+
return this.l2j_1.a2h(color);
|
|
1248
1248
|
};
|
|
1249
|
-
protoOf(Companion_1).
|
|
1250
|
-
return this.
|
|
1249
|
+
protoOf(Companion_1).i2j = function (r, g, b, alpha) {
|
|
1250
|
+
return this.l2j_1.i2j(r, g, b, alpha);
|
|
1251
1251
|
};
|
|
1252
|
-
protoOf(Companion_1).
|
|
1253
|
-
return this.
|
|
1252
|
+
protoOf(Companion_1).k2j = function (r, g, b, alpha) {
|
|
1253
|
+
return this.l2j_1.k2j(r, g, b, alpha);
|
|
1254
1254
|
};
|
|
1255
1255
|
var Companion_instance_1;
|
|
1256
1256
|
function Companion_getInstance_1() {
|
|
@@ -1260,68 +1260,68 @@
|
|
|
1260
1260
|
}
|
|
1261
1261
|
function RGB(r, g, b, alpha, space) {
|
|
1262
1262
|
Companion_getInstance_1();
|
|
1263
|
-
this.
|
|
1264
|
-
this.
|
|
1265
|
-
this.
|
|
1266
|
-
this.
|
|
1267
|
-
this.
|
|
1263
|
+
this.j2g_1 = r;
|
|
1264
|
+
this.k2g_1 = g;
|
|
1265
|
+
this.l2g_1 = b;
|
|
1266
|
+
this.m2g_1 = alpha;
|
|
1267
|
+
this.n2g_1 = space;
|
|
1268
1268
|
}
|
|
1269
|
-
protoOf(RGB).
|
|
1270
|
-
return this.
|
|
1269
|
+
protoOf(RGB).f2g = function () {
|
|
1270
|
+
return this.m2g_1;
|
|
1271
1271
|
};
|
|
1272
|
-
protoOf(RGB).
|
|
1273
|
-
return this.
|
|
1272
|
+
protoOf(RGB).g2g = function () {
|
|
1273
|
+
return this.n2g_1;
|
|
1274
1274
|
};
|
|
1275
|
-
protoOf(RGB).
|
|
1275
|
+
protoOf(RGB).x2h = function () {
|
|
1276
1276
|
var tmp$ret$1;
|
|
1277
1277
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1278
1278
|
var tmp$ret$0;
|
|
1279
1279
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
1280
|
-
var tmp0__anonymous__q1qw7t = this.
|
|
1281
|
-
tmp$ret$0 = _RGBInt___init__impl__lqova7_1(tmp0__anonymous__q1qw7t.
|
|
1280
|
+
var tmp0__anonymous__q1qw7t = this.a2k(SRGB_getInstance());
|
|
1281
|
+
tmp$ret$0 = _RGBInt___init__impl__lqova7_1(tmp0__anonymous__q1qw7t.j2g_1, tmp0__anonymous__q1qw7t.k2g_1, tmp0__anonymous__q1qw7t.l2g_1, nanToOne(tmp0__anonymous__q1qw7t.m2g_1));
|
|
1282
1282
|
tmp$ret$1 = tmp$ret$0;
|
|
1283
1283
|
return tmp$ret$1;
|
|
1284
1284
|
};
|
|
1285
|
-
protoOf(RGB).
|
|
1286
|
-
var f = SRGB_getInstance().
|
|
1287
|
-
return equals(this.
|
|
1285
|
+
protoOf(RGB).a2k = function (space) {
|
|
1286
|
+
var f = SRGB_getInstance().e2k_1;
|
|
1287
|
+
return equals(this.n2g_1, space) ? this : (equals(this.n2g_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().m2h_1) : false) ? space.i2j(f.g2j(this.j2g_1), f.g2j(this.k2g_1), f.g2j(this.l2g_1), this.m2g_1) : (equals(this.n2g_1, RGBColorSpaces_getInstance().m2h_1) ? equals(space, SRGB_getInstance()) : false) ? space.i2j(f.h2j(this.j2g_1), f.h2j(this.k2g_1), f.h2j(this.l2g_1), this.m2g_1) : this.i2g().h2k(space);
|
|
1288
1288
|
};
|
|
1289
|
-
protoOf(RGB).
|
|
1290
|
-
var f = this.
|
|
1289
|
+
protoOf(RGB).i2g = function () {
|
|
1290
|
+
var f = this.n2g_1.x2i();
|
|
1291
1291
|
var tmp$ret$1;
|
|
1292
1292
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1293
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.
|
|
1294
|
-
var tmp1_dot = f.
|
|
1295
|
-
var tmp2_dot = f.
|
|
1296
|
-
var tmp3_dot = f.
|
|
1293
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.n2g_1.y2j());
|
|
1294
|
+
var tmp1_dot = f.g2j(this.j2g_1);
|
|
1295
|
+
var tmp2_dot = f.g2j(this.k2g_1);
|
|
1296
|
+
var tmp3_dot = f.g2j(this.l2g_1);
|
|
1297
1297
|
var tmp$ret$0;
|
|
1298
1298
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
1299
1299
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
1300
1300
|
var tmp5__anonymous__kpxxpo = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
1301
1301
|
var tmp6__anonymous__fv9ai5 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
1302
|
-
tmp$ret$0 = XYZColorSpace_0(this.
|
|
1302
|
+
tmp$ret$0 = XYZColorSpace_0(this.n2g_1.b2h()).i2j(tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, tmp6__anonymous__fv9ai5, this.m2g_1);
|
|
1303
1303
|
tmp$ret$1 = tmp$ret$0;
|
|
1304
1304
|
return tmp$ret$1;
|
|
1305
1305
|
};
|
|
1306
|
-
protoOf(RGB).
|
|
1307
|
-
return this.
|
|
1306
|
+
protoOf(RGB).h2g = function () {
|
|
1307
|
+
return this.a2k(RGBColorSpaces_getInstance().l2h_1);
|
|
1308
1308
|
};
|
|
1309
1309
|
protoOf(RGB).v7 = function () {
|
|
1310
1310
|
var tmp$ret$0;
|
|
1311
1311
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1312
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1312
|
+
var tmp0_floatArrayOf = new Float32Array([this.j2g_1, this.k2g_1, this.l2g_1, this.m2g_1]);
|
|
1313
1313
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1314
1314
|
return tmp$ret$0;
|
|
1315
1315
|
};
|
|
1316
1316
|
protoOf(RGB).toString = function () {
|
|
1317
|
-
return 'RGB(r=' + this.
|
|
1317
|
+
return 'RGB(r=' + this.j2g_1 + ', g=' + this.k2g_1 + ', b=' + this.l2g_1 + ', alpha=' + this.m2g_1 + ', space=' + this.n2g_1 + ')';
|
|
1318
1318
|
};
|
|
1319
1319
|
protoOf(RGB).hashCode = function () {
|
|
1320
|
-
var result = getNumberHashCode(this.
|
|
1321
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1322
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1323
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1324
|
-
result = imul(result, 31) + hashCode(this.
|
|
1320
|
+
var result = getNumberHashCode(this.j2g_1);
|
|
1321
|
+
result = imul(result, 31) + getNumberHashCode(this.k2g_1) | 0;
|
|
1322
|
+
result = imul(result, 31) + getNumberHashCode(this.l2g_1) | 0;
|
|
1323
|
+
result = imul(result, 31) + getNumberHashCode(this.m2g_1) | 0;
|
|
1324
|
+
result = imul(result, 31) + hashCode(this.n2g_1) | 0;
|
|
1325
1325
|
return result;
|
|
1326
1326
|
};
|
|
1327
1327
|
protoOf(RGB).equals = function (other) {
|
|
@@ -1330,15 +1330,15 @@
|
|
|
1330
1330
|
if (!(other instanceof RGB))
|
|
1331
1331
|
return false;
|
|
1332
1332
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
1333
|
-
if (!equals(this.
|
|
1333
|
+
if (!equals(this.j2g_1, tmp0_other_with_cast.j2g_1))
|
|
1334
1334
|
return false;
|
|
1335
|
-
if (!equals(this.
|
|
1335
|
+
if (!equals(this.k2g_1, tmp0_other_with_cast.k2g_1))
|
|
1336
1336
|
return false;
|
|
1337
|
-
if (!equals(this.
|
|
1337
|
+
if (!equals(this.l2g_1, tmp0_other_with_cast.l2g_1))
|
|
1338
1338
|
return false;
|
|
1339
|
-
if (!equals(this.
|
|
1339
|
+
if (!equals(this.m2g_1, tmp0_other_with_cast.m2g_1))
|
|
1340
1340
|
return false;
|
|
1341
|
-
if (!equals(this.
|
|
1341
|
+
if (!equals(this.n2g_1, tmp0_other_with_cast.n2g_1))
|
|
1342
1342
|
return false;
|
|
1343
1343
|
return true;
|
|
1344
1344
|
};
|
|
@@ -1394,18 +1394,18 @@
|
|
|
1394
1394
|
var ACES_AP1_B;
|
|
1395
1395
|
function RGBColorSpaces() {
|
|
1396
1396
|
RGBColorSpaces_instance = this;
|
|
1397
|
-
this.
|
|
1398
|
-
this.
|
|
1399
|
-
this.
|
|
1400
|
-
this.
|
|
1401
|
-
this.
|
|
1402
|
-
this.
|
|
1403
|
-
this.
|
|
1404
|
-
this.
|
|
1405
|
-
this.
|
|
1406
|
-
this.
|
|
1407
|
-
this.
|
|
1408
|
-
this.
|
|
1397
|
+
this.l2h_1 = SRGB_getInstance();
|
|
1398
|
+
this.m2h_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().p2i_1, LinearTransferFunctions_getInstance(), get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1399
|
+
this.n2h_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1400
|
+
this.o2h_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1401
|
+
this.p2h_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1402
|
+
this.q2h_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1403
|
+
this.r2h_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().p2i_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));
|
|
1404
|
+
this.s2h_1 = BT2020Space_getInstance();
|
|
1405
|
+
this.t2h_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().p2i_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1406
|
+
this.u2h_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));
|
|
1407
|
+
this.v2h_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().p2i_1, SRGBTransferFunctions_getInstance(), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1408
|
+
this.w2h_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().n2i_1, ROMMTransferFunctions_getInstance(), xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
1409
1409
|
}
|
|
1410
1410
|
var RGBColorSpaces_instance;
|
|
1411
1411
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1415,35 +1415,35 @@
|
|
|
1415
1415
|
}
|
|
1416
1416
|
function SRGB() {
|
|
1417
1417
|
SRGB_instance = this;
|
|
1418
|
-
this.
|
|
1419
|
-
this.
|
|
1420
|
-
this.
|
|
1421
|
-
this.
|
|
1422
|
-
this.
|
|
1423
|
-
this.
|
|
1418
|
+
this.b2k_1 = 'sRGB';
|
|
1419
|
+
this.c2k_1 = rectangularComponentInfo('RGB');
|
|
1420
|
+
this.d2k_1 = Illuminant_getInstance().p2i_1;
|
|
1421
|
+
this.e2k_1 = SRGBTransferFunctions_getInstance();
|
|
1422
|
+
this.f2k_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.d2k_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
1423
|
+
this.g2k_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.f2k_1)));
|
|
1424
1424
|
}
|
|
1425
1425
|
protoOf(SRGB).id = function () {
|
|
1426
|
-
return this.
|
|
1426
|
+
return this.b2k_1;
|
|
1427
1427
|
};
|
|
1428
|
-
protoOf(SRGB).
|
|
1429
|
-
return this.
|
|
1428
|
+
protoOf(SRGB).b2h = function () {
|
|
1429
|
+
return this.d2k_1;
|
|
1430
1430
|
};
|
|
1431
|
-
protoOf(SRGB).
|
|
1432
|
-
return this.
|
|
1431
|
+
protoOf(SRGB).x2i = function () {
|
|
1432
|
+
return this.e2k_1;
|
|
1433
1433
|
};
|
|
1434
|
-
protoOf(SRGB).
|
|
1435
|
-
return this.
|
|
1434
|
+
protoOf(SRGB).y2j = function () {
|
|
1435
|
+
return this.f2k_1;
|
|
1436
1436
|
};
|
|
1437
|
-
protoOf(SRGB).
|
|
1438
|
-
return this.
|
|
1437
|
+
protoOf(SRGB).z2j = function () {
|
|
1438
|
+
return this.g2k_1;
|
|
1439
1439
|
};
|
|
1440
|
-
protoOf(SRGB).
|
|
1441
|
-
return color.
|
|
1440
|
+
protoOf(SRGB).a2h = function (color) {
|
|
1441
|
+
return color.h2g();
|
|
1442
1442
|
};
|
|
1443
1443
|
protoOf(SRGB).toString = function () {
|
|
1444
|
-
return this.
|
|
1444
|
+
return this.b2k_1;
|
|
1445
1445
|
};
|
|
1446
|
-
protoOf(SRGB).
|
|
1446
|
+
protoOf(SRGB).i2j = function (r, g, b, alpha) {
|
|
1447
1447
|
return new RGB(r, g, b, alpha, this);
|
|
1448
1448
|
};
|
|
1449
1449
|
var SRGB_instance;
|
|
@@ -1458,20 +1458,20 @@
|
|
|
1458
1458
|
}
|
|
1459
1459
|
function ACESccTransferFunctions() {
|
|
1460
1460
|
ACESccTransferFunctions_instance = this;
|
|
1461
|
-
this.
|
|
1462
|
-
this.
|
|
1463
|
-
this.
|
|
1461
|
+
this.i2k_1 = 3.0517578125E-5;
|
|
1462
|
+
this.j2k_1 = 1.52587890625E-5;
|
|
1463
|
+
this.k2k_1 = -0.3013698630136986;
|
|
1464
1464
|
var tmp = this;
|
|
1465
1465
|
var tmp$ret$0;
|
|
1466
1466
|
// Inline function 'kotlin.math.log2' call
|
|
1467
1467
|
tmp$ret$0 = log2(65504.0);
|
|
1468
|
-
tmp.
|
|
1468
|
+
tmp.l2k_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
1469
1469
|
}
|
|
1470
|
-
protoOf(ACESccTransferFunctions).
|
|
1470
|
+
protoOf(ACESccTransferFunctions).g2j = function (x) {
|
|
1471
1471
|
var tmp;
|
|
1472
1472
|
if (x <= -0.3013698630136986) {
|
|
1473
1473
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1474
|
-
} else if (x < this.
|
|
1474
|
+
} else if (x < this.l2k_1) {
|
|
1475
1475
|
var tmp$ret$0;
|
|
1476
1476
|
// Inline function 'kotlin.math.pow' call
|
|
1477
1477
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
@@ -1482,7 +1482,7 @@
|
|
|
1482
1482
|
}
|
|
1483
1483
|
return tmp;
|
|
1484
1484
|
};
|
|
1485
|
-
protoOf(ACESccTransferFunctions).
|
|
1485
|
+
protoOf(ACESccTransferFunctions).h2j = function (x) {
|
|
1486
1486
|
var tmp;
|
|
1487
1487
|
if (x < 3.0517578125E-5) {
|
|
1488
1488
|
var tmp$ret$0;
|
|
@@ -1506,19 +1506,19 @@
|
|
|
1506
1506
|
}
|
|
1507
1507
|
function ACEScctTransferFunctions() {
|
|
1508
1508
|
ACEScctTransferFunctions_instance = this;
|
|
1509
|
-
this.
|
|
1510
|
-
this.
|
|
1509
|
+
this.m2k_1 = 10.5402377416545;
|
|
1510
|
+
this.n2k_1 = 0.0729055341958355;
|
|
1511
1511
|
var tmp = this;
|
|
1512
1512
|
var tmp$ret$0;
|
|
1513
1513
|
// Inline function 'kotlin.math.log2' call
|
|
1514
1514
|
tmp$ret$0 = log2(65504.0);
|
|
1515
|
-
tmp.
|
|
1515
|
+
tmp.o2k_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
1516
1516
|
}
|
|
1517
|
-
protoOf(ACEScctTransferFunctions).
|
|
1517
|
+
protoOf(ACEScctTransferFunctions).g2j = function (x) {
|
|
1518
1518
|
var tmp;
|
|
1519
1519
|
if (x <= 0.155251141552511) {
|
|
1520
1520
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1521
|
-
} else if (x < this.
|
|
1521
|
+
} else if (x < this.o2k_1) {
|
|
1522
1522
|
var tmp$ret$0;
|
|
1523
1523
|
// Inline function 'kotlin.math.pow' call
|
|
1524
1524
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
@@ -1529,7 +1529,7 @@
|
|
|
1529
1529
|
}
|
|
1530
1530
|
return tmp;
|
|
1531
1531
|
};
|
|
1532
|
-
protoOf(ACEScctTransferFunctions).
|
|
1532
|
+
protoOf(ACEScctTransferFunctions).h2j = function (x) {
|
|
1533
1533
|
var tmp;
|
|
1534
1534
|
if (x < 0.0078125) {
|
|
1535
1535
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -1549,47 +1549,47 @@
|
|
|
1549
1549
|
}
|
|
1550
1550
|
function BT2020Space() {
|
|
1551
1551
|
BT2020Space_instance = this;
|
|
1552
|
-
this.
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1555
|
-
this.
|
|
1556
|
-
this.
|
|
1557
|
-
this.
|
|
1552
|
+
this.p2k_1 = 'BT.2020';
|
|
1553
|
+
this.q2k_1 = rectangularComponentInfo('RGB');
|
|
1554
|
+
this.r2k_1 = Illuminant_getInstance().p2i_1;
|
|
1555
|
+
this.s2k_1 = BT2020TransferFunctions_getInstance();
|
|
1556
|
+
this.t2k_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.r2k_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
1557
|
+
this.u2k_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.t2k_1)));
|
|
1558
1558
|
}
|
|
1559
1559
|
protoOf(BT2020Space).id = function () {
|
|
1560
|
-
return this.
|
|
1560
|
+
return this.p2k_1;
|
|
1561
1561
|
};
|
|
1562
|
-
protoOf(BT2020Space).
|
|
1563
|
-
return this.
|
|
1562
|
+
protoOf(BT2020Space).b2h = function () {
|
|
1563
|
+
return this.r2k_1;
|
|
1564
1564
|
};
|
|
1565
|
-
protoOf(BT2020Space).
|
|
1566
|
-
return this.
|
|
1565
|
+
protoOf(BT2020Space).x2i = function () {
|
|
1566
|
+
return this.s2k_1;
|
|
1567
1567
|
};
|
|
1568
|
-
protoOf(BT2020Space).
|
|
1568
|
+
protoOf(BT2020Space).i2j = function (r, g, b, alpha) {
|
|
1569
1569
|
return new RGB(r, g, b, alpha, this);
|
|
1570
1570
|
};
|
|
1571
|
-
protoOf(BT2020Space).
|
|
1571
|
+
protoOf(BT2020Space).a2h = function (color) {
|
|
1572
1572
|
var tmp0_subject = color;
|
|
1573
1573
|
var tmp;
|
|
1574
1574
|
if (tmp0_subject instanceof RGB) {
|
|
1575
|
-
tmp = color.
|
|
1575
|
+
tmp = color.a2k(this);
|
|
1576
1576
|
} else {
|
|
1577
1577
|
if (tmp0_subject instanceof ICtCp) {
|
|
1578
|
-
tmp = color.
|
|
1578
|
+
tmp = color.w2i();
|
|
1579
1579
|
} else {
|
|
1580
|
-
tmp = color.
|
|
1580
|
+
tmp = color.i2g().h2k(this);
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
1583
|
return tmp;
|
|
1584
1584
|
};
|
|
1585
|
-
protoOf(BT2020Space).
|
|
1586
|
-
return this.
|
|
1585
|
+
protoOf(BT2020Space).y2j = function () {
|
|
1586
|
+
return this.t2k_1;
|
|
1587
1587
|
};
|
|
1588
|
-
protoOf(BT2020Space).
|
|
1589
|
-
return this.
|
|
1588
|
+
protoOf(BT2020Space).z2j = function () {
|
|
1589
|
+
return this.u2k_1;
|
|
1590
1590
|
};
|
|
1591
1591
|
protoOf(BT2020Space).toString = function () {
|
|
1592
|
-
return this.
|
|
1592
|
+
return this.p2k_1;
|
|
1593
1593
|
};
|
|
1594
1594
|
var BT2020Space_instance;
|
|
1595
1595
|
function BT2020Space_getInstance() {
|
|
@@ -1599,12 +1599,12 @@
|
|
|
1599
1599
|
}
|
|
1600
1600
|
function BT709TransferFunctions() {
|
|
1601
1601
|
BT709TransferFunctions_instance = this;
|
|
1602
|
-
this.
|
|
1602
|
+
this.v2k_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1603
1603
|
}
|
|
1604
|
-
protoOf(BT709TransferFunctions).
|
|
1605
|
-
return numberToDouble(x < this.
|
|
1604
|
+
protoOf(BT709TransferFunctions).g2j = function (x) {
|
|
1605
|
+
return numberToDouble(x < this.v2k_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
1606
1606
|
};
|
|
1607
|
-
protoOf(BT709TransferFunctions).
|
|
1607
|
+
protoOf(BT709TransferFunctions).h2j = function (x) {
|
|
1608
1608
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1609
1609
|
};
|
|
1610
1610
|
var BT709TransferFunctions_instance;
|
|
@@ -1616,10 +1616,10 @@
|
|
|
1616
1616
|
function SRGBTransferFunctions() {
|
|
1617
1617
|
SRGBTransferFunctions_instance = this;
|
|
1618
1618
|
}
|
|
1619
|
-
protoOf(SRGBTransferFunctions).
|
|
1619
|
+
protoOf(SRGBTransferFunctions).h2j = function (x) {
|
|
1620
1620
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
1621
1621
|
};
|
|
1622
|
-
protoOf(SRGBTransferFunctions).
|
|
1622
|
+
protoOf(SRGBTransferFunctions).g2j = function (x) {
|
|
1623
1623
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1624
1624
|
};
|
|
1625
1625
|
var SRGBTransferFunctions_instance;
|
|
@@ -1630,12 +1630,12 @@
|
|
|
1630
1630
|
}
|
|
1631
1631
|
function ROMMTransferFunctions() {
|
|
1632
1632
|
ROMMTransferFunctions_instance = this;
|
|
1633
|
-
this.
|
|
1633
|
+
this.w2k_1 = 0.001953;
|
|
1634
1634
|
}
|
|
1635
|
-
protoOf(ROMMTransferFunctions).
|
|
1635
|
+
protoOf(ROMMTransferFunctions).g2j = function (x) {
|
|
1636
1636
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
1637
1637
|
};
|
|
1638
|
-
protoOf(ROMMTransferFunctions).
|
|
1638
|
+
protoOf(ROMMTransferFunctions).h2j = function (x) {
|
|
1639
1639
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
1640
1640
|
};
|
|
1641
1641
|
var ROMMTransferFunctions_instance;
|
|
@@ -1646,14 +1646,14 @@
|
|
|
1646
1646
|
}
|
|
1647
1647
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1648
1648
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1649
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1650
|
-
var wp = whitePoint.
|
|
1649
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.n2j_1, g.n2j_1, b.n2j_1, r.o2j_1, g.o2j_1, b.o2j_1, r.x2k(), g.x2k(), b.x2k());
|
|
1650
|
+
var wp = whitePoint.j2i_1;
|
|
1651
1651
|
var tmp$ret$1;
|
|
1652
1652
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1653
1653
|
var tmp0_dot = inverse(primaries);
|
|
1654
|
-
var tmp1_dot = wp.
|
|
1655
|
-
var tmp2_dot = wp.
|
|
1656
|
-
var tmp3_dot = wp.
|
|
1654
|
+
var tmp1_dot = wp.q2j();
|
|
1655
|
+
var tmp2_dot = wp.p2j_1;
|
|
1656
|
+
var tmp3_dot = wp.r2j();
|
|
1657
1657
|
var tmp$ret$0;
|
|
1658
1658
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1659
1659
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
@@ -1664,53 +1664,53 @@
|
|
|
1664
1664
|
return tmp$ret$1;
|
|
1665
1665
|
}
|
|
1666
1666
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
this.
|
|
1670
|
-
this.
|
|
1671
|
-
this.
|
|
1672
|
-
this.
|
|
1673
|
-
this.
|
|
1674
|
-
this.
|
|
1675
|
-
this.
|
|
1667
|
+
this.y2k_1 = name;
|
|
1668
|
+
this.z2k_1 = whitePoint;
|
|
1669
|
+
this.a2l_1 = transferFunctions;
|
|
1670
|
+
this.b2l_1 = r;
|
|
1671
|
+
this.c2l_1 = g;
|
|
1672
|
+
this.d2l_1 = b;
|
|
1673
|
+
this.e2l_1 = rectangularComponentInfo('RGB');
|
|
1674
|
+
this.f2l_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.z2k_1, this.b2l_1, this.c2l_1, this.d2l_1));
|
|
1675
|
+
this.g2l_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.f2l_1)));
|
|
1676
1676
|
}
|
|
1677
1677
|
protoOf(RGBColorSpaceImpl).id = function () {
|
|
1678
|
-
return this.
|
|
1678
|
+
return this.y2k_1;
|
|
1679
1679
|
};
|
|
1680
|
-
protoOf(RGBColorSpaceImpl).
|
|
1681
|
-
return this.
|
|
1680
|
+
protoOf(RGBColorSpaceImpl).b2h = function () {
|
|
1681
|
+
return this.z2k_1;
|
|
1682
1682
|
};
|
|
1683
|
-
protoOf(RGBColorSpaceImpl).
|
|
1684
|
-
return this.
|
|
1683
|
+
protoOf(RGBColorSpaceImpl).x2i = function () {
|
|
1684
|
+
return this.a2l_1;
|
|
1685
1685
|
};
|
|
1686
|
-
protoOf(RGBColorSpaceImpl).
|
|
1686
|
+
protoOf(RGBColorSpaceImpl).a2h = function (color) {
|
|
1687
1687
|
var tmp;
|
|
1688
1688
|
if (color instanceof RGB) {
|
|
1689
|
-
tmp = color.
|
|
1689
|
+
tmp = color.a2k(this);
|
|
1690
1690
|
} else {
|
|
1691
|
-
tmp = color.
|
|
1691
|
+
tmp = color.i2g().h2k(this);
|
|
1692
1692
|
}
|
|
1693
1693
|
return tmp;
|
|
1694
1694
|
};
|
|
1695
|
-
protoOf(RGBColorSpaceImpl).
|
|
1696
|
-
return this.
|
|
1695
|
+
protoOf(RGBColorSpaceImpl).y2j = function () {
|
|
1696
|
+
return this.f2l_1;
|
|
1697
1697
|
};
|
|
1698
|
-
protoOf(RGBColorSpaceImpl).
|
|
1699
|
-
return this.
|
|
1698
|
+
protoOf(RGBColorSpaceImpl).z2j = function () {
|
|
1699
|
+
return this.g2l_1;
|
|
1700
1700
|
};
|
|
1701
1701
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1702
|
-
return this.
|
|
1702
|
+
return this.y2k_1;
|
|
1703
1703
|
};
|
|
1704
|
-
protoOf(RGBColorSpaceImpl).
|
|
1704
|
+
protoOf(RGBColorSpaceImpl).i2j = function (r, g, b, alpha) {
|
|
1705
1705
|
return new RGB(r, g, b, alpha, this);
|
|
1706
1706
|
};
|
|
1707
1707
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1708
|
-
var result = getStringHashCode(this.
|
|
1709
|
-
result = imul(result, 31) + this.
|
|
1710
|
-
result = imul(result, 31) + hashCode(this.
|
|
1711
|
-
result = imul(result, 31) + this.
|
|
1712
|
-
result = imul(result, 31) + this.
|
|
1713
|
-
result = imul(result, 31) + this.
|
|
1708
|
+
var result = getStringHashCode(this.y2k_1);
|
|
1709
|
+
result = imul(result, 31) + this.z2k_1.hashCode() | 0;
|
|
1710
|
+
result = imul(result, 31) + hashCode(this.a2l_1) | 0;
|
|
1711
|
+
result = imul(result, 31) + this.b2l_1.hashCode() | 0;
|
|
1712
|
+
result = imul(result, 31) + this.c2l_1.hashCode() | 0;
|
|
1713
|
+
result = imul(result, 31) + this.d2l_1.hashCode() | 0;
|
|
1714
1714
|
return result;
|
|
1715
1715
|
};
|
|
1716
1716
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1719,35 +1719,35 @@
|
|
|
1719
1719
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
1720
1720
|
return false;
|
|
1721
1721
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
1722
|
-
if (!(this.
|
|
1722
|
+
if (!(this.y2k_1 === tmp0_other_with_cast.y2k_1))
|
|
1723
1723
|
return false;
|
|
1724
|
-
if (!this.
|
|
1724
|
+
if (!this.z2k_1.equals(tmp0_other_with_cast.z2k_1))
|
|
1725
1725
|
return false;
|
|
1726
|
-
if (!equals(this.
|
|
1726
|
+
if (!equals(this.a2l_1, tmp0_other_with_cast.a2l_1))
|
|
1727
1727
|
return false;
|
|
1728
|
-
if (!this.
|
|
1728
|
+
if (!this.b2l_1.equals(tmp0_other_with_cast.b2l_1))
|
|
1729
1729
|
return false;
|
|
1730
|
-
if (!this.
|
|
1730
|
+
if (!this.c2l_1.equals(tmp0_other_with_cast.c2l_1))
|
|
1731
1731
|
return false;
|
|
1732
|
-
if (!this.
|
|
1732
|
+
if (!this.d2l_1.equals(tmp0_other_with_cast.d2l_1))
|
|
1733
1733
|
return false;
|
|
1734
1734
|
return true;
|
|
1735
1735
|
};
|
|
1736
1736
|
function BT2020TransferFunctions() {
|
|
1737
1737
|
BT2020TransferFunctions_instance = this;
|
|
1738
|
-
this.
|
|
1739
|
-
this.
|
|
1738
|
+
this.h2l_1 = 1.0993;
|
|
1739
|
+
this.i2l_1 = 0.0181;
|
|
1740
1740
|
var tmp = this;
|
|
1741
1741
|
var tmp$ret$0;
|
|
1742
1742
|
// Inline function 'kotlin.math.pow' call
|
|
1743
1743
|
var tmp0_pow = 0.0181;
|
|
1744
1744
|
tmp$ret$0 = Math.pow(tmp0_pow, 0.45);
|
|
1745
|
-
tmp.
|
|
1745
|
+
tmp.j2l_1 = 1.0993 * tmp$ret$0 - 0.09929999999999994;
|
|
1746
1746
|
}
|
|
1747
|
-
protoOf(BT2020TransferFunctions).
|
|
1748
|
-
return numberToDouble(x < this.
|
|
1747
|
+
protoOf(BT2020TransferFunctions).g2j = function (x) {
|
|
1748
|
+
return numberToDouble(x < this.j2l_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
1749
1749
|
};
|
|
1750
|
-
protoOf(BT2020TransferFunctions).
|
|
1750
|
+
protoOf(BT2020TransferFunctions).h2j = function (x) {
|
|
1751
1751
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
1752
1752
|
};
|
|
1753
1753
|
var BT2020TransferFunctions_instance;
|
|
@@ -1912,22 +1912,22 @@
|
|
|
1912
1912
|
}
|
|
1913
1913
|
function Companion_2() {
|
|
1914
1914
|
Companion_instance_2 = this;
|
|
1915
|
-
this.
|
|
1915
|
+
this.k2l_1 = XYZColorSpaces_getInstance().e2h_1;
|
|
1916
1916
|
}
|
|
1917
1917
|
protoOf(Companion_2).id = function () {
|
|
1918
|
-
return this.
|
|
1918
|
+
return this.k2l_1.id();
|
|
1919
1919
|
};
|
|
1920
|
-
protoOf(Companion_2).
|
|
1921
|
-
return this.
|
|
1920
|
+
protoOf(Companion_2).b2h = function () {
|
|
1921
|
+
return this.k2l_1.b2h();
|
|
1922
1922
|
};
|
|
1923
|
-
protoOf(Companion_2).
|
|
1924
|
-
return this.
|
|
1923
|
+
protoOf(Companion_2).a2h = function (color) {
|
|
1924
|
+
return this.k2l_1.a2h(color);
|
|
1925
1925
|
};
|
|
1926
|
-
protoOf(Companion_2).
|
|
1927
|
-
return this.
|
|
1926
|
+
protoOf(Companion_2).i2j = function (x, y, z, alpha) {
|
|
1927
|
+
return this.k2l_1.i2j(x, y, z, alpha);
|
|
1928
1928
|
};
|
|
1929
|
-
protoOf(Companion_2).
|
|
1930
|
-
return this.
|
|
1929
|
+
protoOf(Companion_2).k2j = function (x, y, z, alpha) {
|
|
1930
|
+
return this.k2l_1.k2j(x, y, z, alpha);
|
|
1931
1931
|
};
|
|
1932
1932
|
var Companion_instance_2;
|
|
1933
1933
|
function Companion_getInstance_2() {
|
|
@@ -1936,20 +1936,20 @@
|
|
|
1936
1936
|
return Companion_instance_2;
|
|
1937
1937
|
}
|
|
1938
1938
|
function adaptToM($this, space, m, mi) {
|
|
1939
|
-
if (space.
|
|
1939
|
+
if (space.b2h().equals($this.t2g_1.b2h()))
|
|
1940
1940
|
return $this;
|
|
1941
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1941
|
+
var transform = chromaticAdaptationMatrix(space, $this.t2g_1.b2h().j2i_1, m, mi);
|
|
1942
1942
|
var tmp$ret$1;
|
|
1943
1943
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1944
|
-
var tmp0_dot = $this.
|
|
1945
|
-
var tmp1_dot = $this.
|
|
1946
|
-
var tmp2_dot = $this.
|
|
1944
|
+
var tmp0_dot = $this.p2g_1;
|
|
1945
|
+
var tmp1_dot = $this.q2g_1;
|
|
1946
|
+
var tmp2_dot = $this.r2g_1;
|
|
1947
1947
|
var tmp$ret$0;
|
|
1948
1948
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1949
1949
|
var tmp3__anonymous__ufb84q = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 0) * tmp2_dot;
|
|
1950
1950
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 1) * tmp2_dot;
|
|
1951
1951
|
var tmp5__anonymous__kpxxpo = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 2) * tmp2_dot;
|
|
1952
|
-
tmp$ret$0 = space.
|
|
1952
|
+
tmp$ret$0 = space.i2j(tmp3__anonymous__ufb84q, tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, $this.s2g_1);
|
|
1953
1953
|
tmp$ret$1 = tmp$ret$0;
|
|
1954
1954
|
return tmp$ret$1;
|
|
1955
1955
|
}
|
|
@@ -1958,79 +1958,79 @@
|
|
|
1958
1958
|
}
|
|
1959
1959
|
function XYZ(x, y, z, alpha, space) {
|
|
1960
1960
|
Companion_getInstance_2();
|
|
1961
|
-
this.
|
|
1962
|
-
this.
|
|
1963
|
-
this.
|
|
1964
|
-
this.
|
|
1965
|
-
this.
|
|
1961
|
+
this.p2g_1 = x;
|
|
1962
|
+
this.q2g_1 = y;
|
|
1963
|
+
this.r2g_1 = z;
|
|
1964
|
+
this.s2g_1 = alpha;
|
|
1965
|
+
this.t2g_1 = space;
|
|
1966
1966
|
}
|
|
1967
|
-
protoOf(XYZ).
|
|
1968
|
-
return this.
|
|
1967
|
+
protoOf(XYZ).f2g = function () {
|
|
1968
|
+
return this.s2g_1;
|
|
1969
1969
|
};
|
|
1970
|
-
protoOf(XYZ).
|
|
1971
|
-
return this.
|
|
1970
|
+
protoOf(XYZ).g2g = function () {
|
|
1971
|
+
return this.t2g_1;
|
|
1972
1972
|
};
|
|
1973
|
-
protoOf(XYZ).
|
|
1973
|
+
protoOf(XYZ).g2h = function (space) {
|
|
1974
1974
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1975
1975
|
};
|
|
1976
|
-
protoOf(XYZ).
|
|
1977
|
-
var tmp0_container = this.
|
|
1976
|
+
protoOf(XYZ).h2k = function (space) {
|
|
1977
|
+
var tmp0_container = this.g2h(XYZColorSpace_0(space.b2h()));
|
|
1978
1978
|
var x = tmp0_container.s2();
|
|
1979
1979
|
var y = tmp0_container.t2();
|
|
1980
|
-
var z = tmp0_container.
|
|
1981
|
-
var f = space.
|
|
1980
|
+
var z = tmp0_container.l2l();
|
|
1981
|
+
var f = space.x2i();
|
|
1982
1982
|
var tmp$ret$1;
|
|
1983
1983
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1984
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.
|
|
1984
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.z2j());
|
|
1985
1985
|
var tmp$ret$0;
|
|
1986
1986
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1987
1987
|
var tmp1__anonymous__uwfjfc = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * z;
|
|
1988
1988
|
var tmp2__anonymous__z9zvc9 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * z;
|
|
1989
1989
|
var tmp3__anonymous__ufb84q = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * z;
|
|
1990
|
-
tmp$ret$0 = space.
|
|
1990
|
+
tmp$ret$0 = space.i2j(f.h2j(tmp1__anonymous__uwfjfc), f.h2j(tmp2__anonymous__z9zvc9), f.h2j(tmp3__anonymous__ufb84q), this.s2g_1);
|
|
1991
1991
|
tmp$ret$1 = tmp$ret$0;
|
|
1992
1992
|
return tmp$ret$1;
|
|
1993
1993
|
};
|
|
1994
|
-
protoOf(XYZ).
|
|
1995
|
-
return this.
|
|
1994
|
+
protoOf(XYZ).h2g = function () {
|
|
1995
|
+
return this.h2k(RGBColorSpaces_getInstance().l2h_1);
|
|
1996
1996
|
};
|
|
1997
|
-
protoOf(XYZ).
|
|
1998
|
-
var fx = toLAB$f(this.
|
|
1999
|
-
var fy = toLAB$f(this.
|
|
2000
|
-
var fz = toLAB$f(this.
|
|
1997
|
+
protoOf(XYZ).o2g = function () {
|
|
1998
|
+
var fx = toLAB$f(this.p2g_1 / this.t2g_1.b2h().j2i_1.q2j());
|
|
1999
|
+
var fy = toLAB$f(this.q2g_1 / this.t2g_1.b2h().j2i_1.p2j_1);
|
|
2000
|
+
var fz = toLAB$f(this.r2g_1 / this.t2g_1.b2h().j2i_1.r2j());
|
|
2001
2001
|
var l = 116 * fy - 16;
|
|
2002
2002
|
var a = 500 * (fx - fy);
|
|
2003
2003
|
var b = 200 * (fy - fz);
|
|
2004
|
-
return LABColorSpace_0(this.
|
|
2004
|
+
return LABColorSpace_0(this.t2g_1.b2h()).k2j(l, a, b, this.s2g_1);
|
|
2005
2005
|
};
|
|
2006
|
-
protoOf(XYZ).
|
|
2006
|
+
protoOf(XYZ).i2g = function () {
|
|
2007
2007
|
return this;
|
|
2008
2008
|
};
|
|
2009
2009
|
protoOf(XYZ).v7 = function () {
|
|
2010
2010
|
var tmp$ret$0;
|
|
2011
2011
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2012
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
2012
|
+
var tmp0_floatArrayOf = new Float32Array([this.p2g_1, this.q2g_1, this.r2g_1, this.s2g_1]);
|
|
2013
2013
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
2014
2014
|
return tmp$ret$0;
|
|
2015
2015
|
};
|
|
2016
2016
|
protoOf(XYZ).s2 = function () {
|
|
2017
|
-
return this.
|
|
2017
|
+
return this.p2g_1;
|
|
2018
2018
|
};
|
|
2019
2019
|
protoOf(XYZ).t2 = function () {
|
|
2020
|
-
return this.
|
|
2020
|
+
return this.q2g_1;
|
|
2021
2021
|
};
|
|
2022
|
-
protoOf(XYZ).
|
|
2023
|
-
return this.
|
|
2022
|
+
protoOf(XYZ).l2l = function () {
|
|
2023
|
+
return this.r2g_1;
|
|
2024
2024
|
};
|
|
2025
2025
|
protoOf(XYZ).toString = function () {
|
|
2026
|
-
return 'XYZ(x=' + this.
|
|
2026
|
+
return 'XYZ(x=' + this.p2g_1 + ', y=' + this.q2g_1 + ', z=' + this.r2g_1 + ', alpha=' + this.s2g_1 + ', space=' + this.t2g_1 + ')';
|
|
2027
2027
|
};
|
|
2028
2028
|
protoOf(XYZ).hashCode = function () {
|
|
2029
|
-
var result = getNumberHashCode(this.
|
|
2030
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2031
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2032
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2033
|
-
result = imul(result, 31) + hashCode(this.
|
|
2029
|
+
var result = getNumberHashCode(this.p2g_1);
|
|
2030
|
+
result = imul(result, 31) + getNumberHashCode(this.q2g_1) | 0;
|
|
2031
|
+
result = imul(result, 31) + getNumberHashCode(this.r2g_1) | 0;
|
|
2032
|
+
result = imul(result, 31) + getNumberHashCode(this.s2g_1) | 0;
|
|
2033
|
+
result = imul(result, 31) + hashCode(this.t2g_1) | 0;
|
|
2034
2034
|
return result;
|
|
2035
2035
|
};
|
|
2036
2036
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -2039,15 +2039,15 @@
|
|
|
2039
2039
|
if (!(other instanceof XYZ))
|
|
2040
2040
|
return false;
|
|
2041
2041
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
2042
|
-
if (!equals(this.
|
|
2042
|
+
if (!equals(this.p2g_1, tmp0_other_with_cast.p2g_1))
|
|
2043
2043
|
return false;
|
|
2044
|
-
if (!equals(this.
|
|
2044
|
+
if (!equals(this.q2g_1, tmp0_other_with_cast.q2g_1))
|
|
2045
2045
|
return false;
|
|
2046
|
-
if (!equals(this.
|
|
2046
|
+
if (!equals(this.r2g_1, tmp0_other_with_cast.r2g_1))
|
|
2047
2047
|
return false;
|
|
2048
|
-
if (!equals(this.
|
|
2048
|
+
if (!equals(this.s2g_1, tmp0_other_with_cast.s2g_1))
|
|
2049
2049
|
return false;
|
|
2050
|
-
if (!equals(this.
|
|
2050
|
+
if (!equals(this.t2g_1, tmp0_other_with_cast.t2g_1))
|
|
2051
2051
|
return false;
|
|
2052
2052
|
return true;
|
|
2053
2053
|
};
|
|
@@ -2055,12 +2055,12 @@
|
|
|
2055
2055
|
}
|
|
2056
2056
|
function XYZColorSpace_0(whitePoint) {
|
|
2057
2057
|
var tmp0_subject = whitePoint;
|
|
2058
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
2058
|
+
return tmp0_subject.equals(Illuminant_getInstance().p2i_1) ? XYZColorSpaces_getInstance().e2h_1 : tmp0_subject.equals(Illuminant_getInstance().n2i_1) ? XYZColorSpaces_getInstance().f2h_1 : new XYZColorSpaceImpl(whitePoint);
|
|
2059
2059
|
}
|
|
2060
2060
|
function XYZColorSpaces() {
|
|
2061
2061
|
XYZColorSpaces_instance = this;
|
|
2062
|
-
this.
|
|
2063
|
-
this.
|
|
2062
|
+
this.e2h_1 = new XYZColorSpaceImpl(Illuminant_getInstance().p2i_1);
|
|
2063
|
+
this.f2h_1 = new XYZColorSpaceImpl(Illuminant_getInstance().n2i_1);
|
|
2064
2064
|
}
|
|
2065
2065
|
var XYZColorSpaces_instance;
|
|
2066
2066
|
function XYZColorSpaces_getInstance() {
|
|
@@ -2071,32 +2071,32 @@
|
|
|
2071
2071
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
2072
2072
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
2073
2073
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
2074
|
-
var dstWp = _this__u8e3s4.
|
|
2075
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
2076
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
2074
|
+
var dstWp = _this__u8e3s4.b2h().j2i_1;
|
|
2075
|
+
var src = dot_0(xyzToLms, srcWp.q2j(), srcWp.p2j_1, srcWp.r2j());
|
|
2076
|
+
var dst = dot_0(xyzToLms, dstWp.q2j(), dstWp.p2j_1, dstWp.r2j());
|
|
2077
2077
|
return dot(dotDiagonal(lmsToXyz, _Vector___get_l__impl__envr1l(dst) / _Vector___get_l__impl__envr1l(src), _Vector___get_m__impl__e5qq0m(dst) / _Vector___get_m__impl__e5qq0m(src), _Vector___get_s__impl__pzuljk(dst) / _Vector___get_s__impl__pzuljk(src)), xyzToLms);
|
|
2078
2078
|
}
|
|
2079
2079
|
function XYZColorSpaceImpl(whitePoint) {
|
|
2080
|
-
this.
|
|
2081
|
-
this.
|
|
2080
|
+
this.m2l_1 = whitePoint;
|
|
2081
|
+
this.n2l_1 = rectangularComponentInfo('XYZ');
|
|
2082
2082
|
}
|
|
2083
|
-
protoOf(XYZColorSpaceImpl).
|
|
2084
|
-
return this.
|
|
2083
|
+
protoOf(XYZColorSpaceImpl).b2h = function () {
|
|
2084
|
+
return this.m2l_1;
|
|
2085
2085
|
};
|
|
2086
2086
|
protoOf(XYZColorSpaceImpl).id = function () {
|
|
2087
2087
|
return 'XYZ';
|
|
2088
2088
|
};
|
|
2089
|
-
protoOf(XYZColorSpaceImpl).
|
|
2090
|
-
return color.
|
|
2089
|
+
protoOf(XYZColorSpaceImpl).a2h = function (color) {
|
|
2090
|
+
return color.i2g().g2h(this);
|
|
2091
2091
|
};
|
|
2092
2092
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
2093
|
-
return 'XYZColorSpace(' + this.
|
|
2093
|
+
return 'XYZColorSpace(' + this.m2l_1 + ')';
|
|
2094
2094
|
};
|
|
2095
|
-
protoOf(XYZColorSpaceImpl).
|
|
2095
|
+
protoOf(XYZColorSpaceImpl).i2j = function (x, y, z, alpha) {
|
|
2096
2096
|
return new XYZ(x, y, z, alpha, this);
|
|
2097
2097
|
};
|
|
2098
2098
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
2099
|
-
return this.
|
|
2099
|
+
return this.m2l_1.hashCode();
|
|
2100
2100
|
};
|
|
2101
2101
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
2102
2102
|
if (this === other)
|
|
@@ -2104,7 +2104,7 @@
|
|
|
2104
2104
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
2105
2105
|
return false;
|
|
2106
2106
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
2107
|
-
if (!this.
|
|
2107
|
+
if (!this.m2l_1.equals(tmp0_other_with_cast.m2l_1))
|
|
2108
2108
|
return false;
|
|
2109
2109
|
return true;
|
|
2110
2110
|
};
|
|
@@ -2118,26 +2118,26 @@
|
|
|
2118
2118
|
}
|
|
2119
2119
|
function xyY(x, y, Y) {
|
|
2120
2120
|
Y = Y === VOID ? 1.0 : Y;
|
|
2121
|
-
this.
|
|
2122
|
-
this.
|
|
2123
|
-
this.
|
|
2121
|
+
this.n2j_1 = x;
|
|
2122
|
+
this.o2j_1 = y;
|
|
2123
|
+
this.p2j_1 = Y;
|
|
2124
2124
|
}
|
|
2125
|
-
protoOf(xyY).
|
|
2126
|
-
return 1 - this.
|
|
2125
|
+
protoOf(xyY).x2k = function () {
|
|
2126
|
+
return 1 - this.n2j_1 - this.o2j_1;
|
|
2127
2127
|
};
|
|
2128
|
-
protoOf(xyY).
|
|
2129
|
-
return this.
|
|
2128
|
+
protoOf(xyY).q2j = function () {
|
|
2129
|
+
return this.n2j_1 * this.p2j_1 / this.o2j_1;
|
|
2130
2130
|
};
|
|
2131
|
-
protoOf(xyY).
|
|
2132
|
-
return (1 - this.
|
|
2131
|
+
protoOf(xyY).r2j = function () {
|
|
2132
|
+
return (1 - this.n2j_1 - this.o2j_1) * this.p2j_1 / this.o2j_1;
|
|
2133
2133
|
};
|
|
2134
2134
|
protoOf(xyY).toString = function () {
|
|
2135
|
-
return 'xyY(x=' + this.
|
|
2135
|
+
return 'xyY(x=' + this.n2j_1 + ', y=' + this.o2j_1 + ', Y=' + this.p2j_1 + ')';
|
|
2136
2136
|
};
|
|
2137
2137
|
protoOf(xyY).hashCode = function () {
|
|
2138
|
-
var result = getNumberHashCode(this.
|
|
2139
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2140
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2138
|
+
var result = getNumberHashCode(this.n2j_1);
|
|
2139
|
+
result = imul(result, 31) + getNumberHashCode(this.o2j_1) | 0;
|
|
2140
|
+
result = imul(result, 31) + getNumberHashCode(this.p2j_1) | 0;
|
|
2141
2141
|
return result;
|
|
2142
2142
|
};
|
|
2143
2143
|
protoOf(xyY).equals = function (other) {
|
|
@@ -2146,11 +2146,11 @@
|
|
|
2146
2146
|
if (!(other instanceof xyY))
|
|
2147
2147
|
return false;
|
|
2148
2148
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
2149
|
-
if (!equals(this.
|
|
2149
|
+
if (!equals(this.n2j_1, tmp0_other_with_cast.n2j_1))
|
|
2150
2150
|
return false;
|
|
2151
|
-
if (!equals(this.
|
|
2151
|
+
if (!equals(this.o2j_1, tmp0_other_with_cast.o2j_1))
|
|
2152
2152
|
return false;
|
|
2153
|
-
if (!equals(this.
|
|
2153
|
+
if (!equals(this.p2j_1, tmp0_other_with_cast.p2j_1))
|
|
2154
2154
|
return false;
|
|
2155
2155
|
return true;
|
|
2156
2156
|
};
|
|
@@ -2159,16 +2159,16 @@
|
|
|
2159
2159
|
return numberToDouble(isNumber(tmp) ? tmp : THROW_CCE());
|
|
2160
2160
|
}
|
|
2161
2161
|
//region block: post-declaration
|
|
2162
|
-
protoOf(LABColorSpaceImpl).
|
|
2163
|
-
protoOf(RGB).
|
|
2164
|
-
protoOf(RGB).
|
|
2165
|
-
protoOf(SRGB).
|
|
2166
|
-
protoOf(BT2020Space).
|
|
2167
|
-
protoOf(RGBColorSpaceImpl).
|
|
2168
|
-
protoOf(Companion_2).
|
|
2169
|
-
protoOf(XYZ).
|
|
2170
|
-
protoOf(XYZColorSpaceImpl).
|
|
2171
|
-
protoOf(XYZColorSpaceImpl).
|
|
2162
|
+
protoOf(LABColorSpaceImpl).k2j = invoke;
|
|
2163
|
+
protoOf(RGB).o2g = toLAB;
|
|
2164
|
+
protoOf(RGB).u2g = toLCHab;
|
|
2165
|
+
protoOf(SRGB).k2j = invoke_0;
|
|
2166
|
+
protoOf(BT2020Space).k2j = invoke_0;
|
|
2167
|
+
protoOf(RGBColorSpaceImpl).k2j = invoke_0;
|
|
2168
|
+
protoOf(Companion_2).m2j = invoke$default;
|
|
2169
|
+
protoOf(XYZ).u2g = toLCHab;
|
|
2170
|
+
protoOf(XYZColorSpaceImpl).k2j = invoke_1;
|
|
2171
|
+
protoOf(XYZColorSpaceImpl).m2j = invoke$default;
|
|
2172
2172
|
//endregion
|
|
2173
2173
|
//region block: init
|
|
2174
2174
|
CIE_E = 0.008856451679035631;
|