@cruglobal/godtools-shared 1.2.0-SNAPSHOT.1762 → 1.2.0-SNAPSHOT.1767
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 +36 -36
- package/Kermit-kermit.js +5 -5
- package/antlr-kotlin-antlr-kotlin-runtime.js +2913 -2913
- package/colormath-root-colormath.js +548 -548
- package/fluid-locale.js +125 -125
- package/kotlin-js.js +14 -14
- package/kotlin-kotlin-stdlib.js +39 -39
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/{kotlin-mpp-godtools-tool-parser-module-state.js → kotlin-mpp-godtools-tool-parser-module-parser-base.js} +200 -103
- package/kotlin-mpp-godtools-tool-parser-module-parser-base.js.map +1 -0
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js +387 -387
- package/kotlin-mpp-godtools-tool-parser-module-parser.js +2581 -2627
- package/kotlin-mpp-godtools-tool-parser-module-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.d.ts +15 -14
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.js +7 -7
- package/kotlinx-coroutines-core.js +1 -1
- package/package.json +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-state.js.map +0 -1
|
@@ -70,16 +70,16 @@
|
|
|
70
70
|
//endregion
|
|
71
71
|
//region block: pre-declaration
|
|
72
72
|
function toHSL() {
|
|
73
|
-
return this.
|
|
73
|
+
return this.p2x().q2x();
|
|
74
74
|
}
|
|
75
75
|
function toXYZ() {
|
|
76
|
-
return this.
|
|
76
|
+
return this.p2x().w2x();
|
|
77
77
|
}
|
|
78
78
|
function toLAB() {
|
|
79
|
-
return this.
|
|
79
|
+
return this.w2x().x2x();
|
|
80
80
|
}
|
|
81
81
|
function toLCHab() {
|
|
82
|
-
return this.
|
|
82
|
+
return this.x2x().d2y();
|
|
83
83
|
}
|
|
84
84
|
initMetadataForInterface(Color, 'Color');
|
|
85
85
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
96
96
|
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
97
97
|
function invoke(l, a, b, alpha) {
|
|
98
|
-
return this.
|
|
98
|
+
return this.n30(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
99
99
|
}
|
|
100
100
|
initMetadataForInterface(LABColorSpace, 'LABColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
101
101
|
initMetadataForCompanion(Companion_0, VOID, [LABColorSpace]);
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
113
113
|
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
114
114
|
function invoke_0(r, g, b, alpha) {
|
|
115
|
-
return this.
|
|
115
|
+
return this.n30(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
116
116
|
}
|
|
117
117
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
118
118
|
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
@@ -129,11 +129,11 @@
|
|
|
129
129
|
initMetadataForCompanion(Companion_3);
|
|
130
130
|
initMetadataForClass(RGBInt, 'RGBInt', VOID, VOID, [Color]);
|
|
131
131
|
function invoke_1(x, y, z, alpha) {
|
|
132
|
-
return this.
|
|
132
|
+
return this.n30(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
133
133
|
}
|
|
134
134
|
function invoke$default(x, y, z, alpha, $super) {
|
|
135
135
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
136
|
-
return $super === VOID ? this.
|
|
136
|
+
return $super === VOID ? this.i31(x, y, z, alpha) : invoke_1(x, y, z, alpha);
|
|
137
137
|
}
|
|
138
138
|
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
139
139
|
initMetadataForCompanion(Companion_4, VOID, [XYZColorSpace]);
|
|
@@ -145,15 +145,15 @@
|
|
|
145
145
|
function Color() {
|
|
146
146
|
}
|
|
147
147
|
function convertTo(_this__u8e3s4, space) {
|
|
148
|
-
return space.
|
|
148
|
+
return space.j2y(_this__u8e3s4);
|
|
149
149
|
}
|
|
150
150
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
151
|
+
this.k2y_1 = name;
|
|
152
|
+
this.l2y_1 = isPolar;
|
|
153
|
+
this.m2y_1 = min;
|
|
154
|
+
this.n2y_1 = max;
|
|
155
155
|
// Inline function 'kotlin.require' call
|
|
156
|
-
if (!(this.
|
|
156
|
+
if (!(this.m2y_1 <= this.n2y_1)) {
|
|
157
157
|
var message = 'min must be less than or equal to max';
|
|
158
158
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
159
159
|
}
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
var _iterator__ex2g4s = tmp0.j();
|
|
221
221
|
while (_iterator__ex2g4s.k()) {
|
|
222
222
|
var element = _iterator__ex2g4s.l();
|
|
223
|
-
if (equals(element.n1(), _this__u8e3s4.
|
|
223
|
+
if (equals(element.n1(), _this__u8e3s4.o2x())) {
|
|
224
224
|
tmp$ret$1 = element;
|
|
225
225
|
break $l$block;
|
|
226
226
|
}
|
|
@@ -241,17 +241,17 @@
|
|
|
241
241
|
if (tmp2_elvis_lhs == null) {
|
|
242
242
|
var tmp_1;
|
|
243
243
|
if (_this__u8e3s4 instanceof RGB) {
|
|
244
|
-
var tmp4_subject = _this__u8e3s4.
|
|
245
|
-
tmp_1 = equals(tmp4_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().
|
|
244
|
+
var tmp4_subject = _this__u8e3s4.v2x_1;
|
|
245
|
+
tmp_1 = equals(tmp4_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().o2z_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().k2z_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().p2z_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().l2z_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().f2z_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
246
246
|
} else {
|
|
247
247
|
if (_this__u8e3s4 instanceof HSL) {
|
|
248
248
|
tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
249
249
|
} else {
|
|
250
250
|
if (_this__u8e3s4 instanceof LAB) {
|
|
251
|
-
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
251
|
+
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().d2z_1), alphaPercent, renderAlpha);
|
|
252
252
|
} else {
|
|
253
253
|
if (_this__u8e3s4 instanceof LCHab) {
|
|
254
|
-
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
254
|
+
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().b2z_1), hueUnit, alphaPercent, renderAlpha);
|
|
255
255
|
} else {
|
|
256
256
|
if (_this__u8e3s4 instanceof HWB) {
|
|
257
257
|
tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
264
264
|
} else {
|
|
265
265
|
if (_this__u8e3s4 instanceof XYZ) {
|
|
266
|
-
tmp_1 = _this__u8e3s4.
|
|
266
|
+
tmp_1 = _this__u8e3s4.c2y_1.o2y().equals(Illuminant_getInstance().x2y_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.r2y(XYZColorSpaces_getInstance().q2y_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
267
267
|
} else {
|
|
268
268
|
tmp_1 = null;
|
|
269
269
|
}
|
|
@@ -292,32 +292,32 @@
|
|
|
292
292
|
return this_0.toString();
|
|
293
293
|
}
|
|
294
294
|
function get_dashName(_this__u8e3s4) {
|
|
295
|
-
var tmp0 = _this__u8e3s4.
|
|
295
|
+
var tmp0 = _this__u8e3s4.o2x().w1();
|
|
296
296
|
// Inline function 'kotlin.text.replace' call
|
|
297
297
|
// Inline function 'kotlin.text.lowercase' call
|
|
298
298
|
// Inline function 'kotlin.js.asDynamic' call
|
|
299
299
|
return '--' + Regex_init_$Create$('\\W').rb(tmp0, '-').toLowerCase();
|
|
300
300
|
}
|
|
301
301
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
302
|
-
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
302
|
+
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.r2x_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.q2z())), rgbPercent ? render(_this__u8e3s4.s2x_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.q2z())), rgbPercent ? render(_this__u8e3s4.t2x_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.q2z()))], alphaPercent, renderAlpha, commas);
|
|
303
303
|
}
|
|
304
304
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
305
|
-
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
305
|
+
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.s2z_1, true), render(_this__u8e3s4.t2z_1, true)], alphaPercent, renderAlpha, commas);
|
|
306
306
|
}
|
|
307
307
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
308
|
-
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
308
|
+
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.e2y_1 / 100, true), render(_this__u8e3s4.f2y_1), render(_this__u8e3s4.g2y_1)], alphaPercent, renderAlpha);
|
|
309
309
|
}
|
|
310
310
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
311
|
-
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
311
|
+
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.v2z_1 / 100, true), render(_this__u8e3s4.w2z_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
312
312
|
}
|
|
313
313
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
314
|
-
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
314
|
+
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.a30_1, true), render(_this__u8e3s4.b30_1, true)], alphaPercent, renderAlpha);
|
|
315
315
|
}
|
|
316
316
|
function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
317
|
-
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.
|
|
317
|
+
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.c30_1, true), render(_this__u8e3s4.d30_1), render(_this__u8e3s4.e30_1)], alphaPercent, renderAlpha);
|
|
318
318
|
}
|
|
319
319
|
function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
320
|
-
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.
|
|
320
|
+
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.f30_1, true), render(_this__u8e3s4.g30_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
321
321
|
}
|
|
322
322
|
function render(_this__u8e3s4, percent, precision) {
|
|
323
323
|
percent = percent === VOID ? false : percent;
|
|
@@ -344,8 +344,8 @@
|
|
|
344
344
|
}
|
|
345
345
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
346
346
|
var tmp;
|
|
347
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.
|
|
348
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
347
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.n2x()) && !(_this__u8e3s4.n2x() === 1.0))) {
|
|
348
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.n2x()), alphaPercent);
|
|
349
349
|
} else {
|
|
350
350
|
tmp = '';
|
|
351
351
|
}
|
|
@@ -365,16 +365,16 @@
|
|
|
365
365
|
}
|
|
366
366
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
367
367
|
var tmp;
|
|
368
|
-
if (isNaN_0(_this__u8e3s4.
|
|
368
|
+
if (isNaN_0(_this__u8e3s4.h30())) {
|
|
369
369
|
tmp = 'none';
|
|
370
370
|
} else {
|
|
371
371
|
var tmp_0;
|
|
372
372
|
switch (hueUnit.v1_1) {
|
|
373
373
|
case 0:
|
|
374
|
-
tmp_0 = render(_this__u8e3s4.
|
|
374
|
+
tmp_0 = render(_this__u8e3s4.h30());
|
|
375
375
|
break;
|
|
376
376
|
case 1:
|
|
377
|
-
tmp_0 = render(_this__u8e3s4.
|
|
377
|
+
tmp_0 = render(_this__u8e3s4.h30()) + 'deg';
|
|
378
378
|
break;
|
|
379
379
|
case 2:
|
|
380
380
|
tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -411,27 +411,27 @@
|
|
|
411
411
|
return AngleUnit_AUTO_instance;
|
|
412
412
|
}
|
|
413
413
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
414
|
-
return isNaN_0(_this__u8e3s4.
|
|
414
|
+
return isNaN_0(_this__u8e3s4.h30()) ? numberToDouble(whenNaN) : _this__u8e3s4.h30();
|
|
415
415
|
}
|
|
416
416
|
function hueAsRad(_this__u8e3s4) {
|
|
417
|
-
return degToRad(_this__u8e3s4.
|
|
417
|
+
return degToRad(_this__u8e3s4.h30());
|
|
418
418
|
}
|
|
419
419
|
function hueAsGrad(_this__u8e3s4) {
|
|
420
|
-
return degToGrad(_this__u8e3s4.
|
|
420
|
+
return degToGrad(_this__u8e3s4.h30());
|
|
421
421
|
}
|
|
422
422
|
function hueAsTurns(_this__u8e3s4) {
|
|
423
|
-
return degToTurns(_this__u8e3s4.
|
|
423
|
+
return degToTurns(_this__u8e3s4.h30());
|
|
424
424
|
}
|
|
425
425
|
function WhitePoint(name, chromaticity) {
|
|
426
|
-
this.
|
|
427
|
-
this.
|
|
426
|
+
this.i30_1 = name;
|
|
427
|
+
this.j30_1 = chromaticity;
|
|
428
428
|
}
|
|
429
429
|
protoOf(WhitePoint).toString = function () {
|
|
430
|
-
return this.
|
|
430
|
+
return this.i30_1;
|
|
431
431
|
};
|
|
432
432
|
protoOf(WhitePoint).hashCode = function () {
|
|
433
|
-
var result = getStringHashCode(this.
|
|
434
|
-
result = imul(result, 31) + this.
|
|
433
|
+
var result = getStringHashCode(this.i30_1);
|
|
434
|
+
result = imul(result, 31) + this.j30_1.hashCode() | 0;
|
|
435
435
|
return result;
|
|
436
436
|
};
|
|
437
437
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -440,22 +440,22 @@
|
|
|
440
440
|
if (!(other instanceof WhitePoint))
|
|
441
441
|
return false;
|
|
442
442
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
443
|
-
if (!(this.
|
|
443
|
+
if (!(this.i30_1 === tmp0_other_with_cast.i30_1))
|
|
444
444
|
return false;
|
|
445
|
-
if (!this.
|
|
445
|
+
if (!this.j30_1.equals(tmp0_other_with_cast.j30_1))
|
|
446
446
|
return false;
|
|
447
447
|
return true;
|
|
448
448
|
};
|
|
449
449
|
function Illuminant() {
|
|
450
450
|
Illuminant_instance = this;
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
451
|
+
this.s2y_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
452
|
+
this.t2y_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
453
|
+
this.u2y_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
454
|
+
this.v2y_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
455
|
+
this.w2y_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
456
|
+
this.x2y_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
457
|
+
this.y2y_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
458
|
+
this.z2y_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
459
459
|
}
|
|
460
460
|
var Illuminant_instance;
|
|
461
461
|
function Illuminant_getInstance() {
|
|
@@ -607,22 +607,22 @@
|
|
|
607
607
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
608
608
|
if (!(other instanceof Matrix))
|
|
609
609
|
return false;
|
|
610
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
610
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.k30_1 : THROW_CCE();
|
|
611
611
|
if (!equals($this, tmp0_other_with_cast))
|
|
612
612
|
return false;
|
|
613
613
|
return true;
|
|
614
614
|
}
|
|
615
615
|
function Matrix(rowMajor) {
|
|
616
|
-
this.
|
|
616
|
+
this.k30_1 = rowMajor;
|
|
617
617
|
}
|
|
618
618
|
protoOf(Matrix).toString = function () {
|
|
619
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
619
|
+
return Matrix__toString_impl_l0abk0(this.k30_1);
|
|
620
620
|
};
|
|
621
621
|
protoOf(Matrix).hashCode = function () {
|
|
622
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
622
|
+
return Matrix__hashCode_impl_s9ntm9(this.k30_1);
|
|
623
623
|
};
|
|
624
624
|
protoOf(Matrix).equals = function (other) {
|
|
625
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
625
|
+
return Matrix__equals_impl_g5p8p9(this.k30_1, other);
|
|
626
626
|
};
|
|
627
627
|
function inverse(_this__u8e3s4, inPlace) {
|
|
628
628
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -703,13 +703,13 @@
|
|
|
703
703
|
}
|
|
704
704
|
function Companion() {
|
|
705
705
|
Companion_instance = this;
|
|
706
|
-
this.
|
|
706
|
+
this.l30_1 = polarComponentInfo('HSL', 0.0, 1.0);
|
|
707
707
|
}
|
|
708
708
|
protoOf(Companion).w1 = function () {
|
|
709
709
|
return 'HSL';
|
|
710
710
|
};
|
|
711
|
-
protoOf(Companion).
|
|
712
|
-
return color.
|
|
711
|
+
protoOf(Companion).j2y = function (color) {
|
|
712
|
+
return color.q2x();
|
|
713
713
|
};
|
|
714
714
|
var Companion_instance;
|
|
715
715
|
function Companion_getInstance() {
|
|
@@ -731,53 +731,53 @@
|
|
|
731
731
|
function HSL(h, s, l, alpha) {
|
|
732
732
|
Companion_getInstance();
|
|
733
733
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
734
|
-
this.
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
737
|
-
this.
|
|
734
|
+
this.r2z_1 = h;
|
|
735
|
+
this.s2z_1 = s;
|
|
736
|
+
this.t2z_1 = l;
|
|
737
|
+
this.u2z_1 = alpha;
|
|
738
738
|
}
|
|
739
|
-
protoOf(HSL).
|
|
740
|
-
return this.
|
|
739
|
+
protoOf(HSL).h30 = function () {
|
|
740
|
+
return this.r2z_1;
|
|
741
741
|
};
|
|
742
|
-
protoOf(HSL).
|
|
743
|
-
return this.
|
|
742
|
+
protoOf(HSL).n2x = function () {
|
|
743
|
+
return this.u2z_1;
|
|
744
744
|
};
|
|
745
|
-
protoOf(HSL).
|
|
745
|
+
protoOf(HSL).o2x = function () {
|
|
746
746
|
return Companion_getInstance();
|
|
747
747
|
};
|
|
748
|
-
protoOf(HSL).
|
|
749
|
-
if (this.
|
|
750
|
-
return Companion_getInstance_2().
|
|
748
|
+
protoOf(HSL).p2x = function () {
|
|
749
|
+
if (this.s2z_1 < 1.0E-7)
|
|
750
|
+
return Companion_getInstance_2().n30(this.t2z_1, this.t2z_1, this.t2z_1, this.u2z_1);
|
|
751
751
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
752
|
-
var s = this.
|
|
753
|
-
var l = this.
|
|
754
|
-
return SRGB_getInstance().
|
|
752
|
+
var s = this.s2z_1;
|
|
753
|
+
var l = this.t2z_1;
|
|
754
|
+
return SRGB_getInstance().n30(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.u2z_1);
|
|
755
755
|
};
|
|
756
|
-
protoOf(HSL).
|
|
756
|
+
protoOf(HSL).q2x = function () {
|
|
757
757
|
return this;
|
|
758
758
|
};
|
|
759
759
|
protoOf(HSL).a5 = function () {
|
|
760
760
|
// Inline function 'kotlin.floatArrayOf' call
|
|
761
|
-
return new Float32Array([this.
|
|
761
|
+
return new Float32Array([this.r2z_1, this.s2z_1, this.t2z_1, this.u2z_1]);
|
|
762
762
|
};
|
|
763
|
-
protoOf(HSL).
|
|
763
|
+
protoOf(HSL).p30 = function (h, s, l, alpha) {
|
|
764
764
|
return new HSL(h, s, l, alpha);
|
|
765
765
|
};
|
|
766
|
-
protoOf(HSL).
|
|
767
|
-
h = h === VOID ? this.
|
|
768
|
-
s = s === VOID ? this.
|
|
769
|
-
l = l === VOID ? this.
|
|
770
|
-
alpha = alpha === VOID ? this.
|
|
771
|
-
return $super === VOID ? this.
|
|
766
|
+
protoOf(HSL).q30 = function (h, s, l, alpha, $super) {
|
|
767
|
+
h = h === VOID ? this.r2z_1 : h;
|
|
768
|
+
s = s === VOID ? this.s2z_1 : s;
|
|
769
|
+
l = l === VOID ? this.t2z_1 : l;
|
|
770
|
+
alpha = alpha === VOID ? this.u2z_1 : alpha;
|
|
771
|
+
return $super === VOID ? this.p30(h, s, l, alpha) : $super.p30.call(this, h, s, l, alpha);
|
|
772
772
|
};
|
|
773
773
|
protoOf(HSL).toString = function () {
|
|
774
|
-
return 'HSL(h=' + this.
|
|
774
|
+
return 'HSL(h=' + this.r2z_1 + ', s=' + this.s2z_1 + ', l=' + this.t2z_1 + ', alpha=' + this.u2z_1 + ')';
|
|
775
775
|
};
|
|
776
776
|
protoOf(HSL).hashCode = function () {
|
|
777
|
-
var result = getNumberHashCode(this.
|
|
778
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
779
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
780
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
777
|
+
var result = getNumberHashCode(this.r2z_1);
|
|
778
|
+
result = imul(result, 31) + getNumberHashCode(this.s2z_1) | 0;
|
|
779
|
+
result = imul(result, 31) + getNumberHashCode(this.t2z_1) | 0;
|
|
780
|
+
result = imul(result, 31) + getNumberHashCode(this.u2z_1) | 0;
|
|
781
781
|
return result;
|
|
782
782
|
};
|
|
783
783
|
protoOf(HSL).equals = function (other) {
|
|
@@ -786,13 +786,13 @@
|
|
|
786
786
|
if (!(other instanceof HSL))
|
|
787
787
|
return false;
|
|
788
788
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
789
|
-
if (!equals(this.
|
|
789
|
+
if (!equals(this.r2z_1, tmp0_other_with_cast.r2z_1))
|
|
790
790
|
return false;
|
|
791
|
-
if (!equals(this.
|
|
791
|
+
if (!equals(this.s2z_1, tmp0_other_with_cast.s2z_1))
|
|
792
792
|
return false;
|
|
793
|
-
if (!equals(this.
|
|
793
|
+
if (!equals(this.t2z_1, tmp0_other_with_cast.t2z_1))
|
|
794
794
|
return false;
|
|
795
|
-
if (!equals(this.
|
|
795
|
+
if (!equals(this.u2z_1, tmp0_other_with_cast.u2z_1))
|
|
796
796
|
return false;
|
|
797
797
|
return true;
|
|
798
798
|
};
|
|
@@ -836,43 +836,43 @@
|
|
|
836
836
|
var ICTCP_LMS_TO_XYZ;
|
|
837
837
|
function ICtCp() {
|
|
838
838
|
}
|
|
839
|
-
protoOf(ICtCp).
|
|
840
|
-
var fo = RGBColorSpaces_getInstance().
|
|
839
|
+
protoOf(ICtCp).v30 = function () {
|
|
840
|
+
var fo = RGBColorSpaces_getInstance().l2z_1.w30();
|
|
841
841
|
var tmp0 = get_ICTCP_ICTCP_to_LMS();
|
|
842
|
-
var tmp1 = this.
|
|
843
|
-
var tmp2 = this.
|
|
842
|
+
var tmp1 = this.r30_1;
|
|
843
|
+
var tmp2 = this.s30_1;
|
|
844
844
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
845
|
-
var v2 = this.
|
|
845
|
+
var v2 = this.t30_1;
|
|
846
846
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
847
847
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
848
848
|
var s = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
849
849
|
var tmp0_0 = get_ICTCP_LMS_to_RGB();
|
|
850
|
-
var tmp1_0 = PqNonlinearity_instance.
|
|
851
|
-
var tmp2_0 = PqNonlinearity_instance.
|
|
850
|
+
var tmp1_0 = PqNonlinearity_instance.f31(tmp4);
|
|
851
|
+
var tmp2_0 = PqNonlinearity_instance.f31(tmp5);
|
|
852
852
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
853
|
-
var v2_0 = PqNonlinearity_instance.
|
|
853
|
+
var v2_0 = PqNonlinearity_instance.f31(s);
|
|
854
854
|
var tmp4_0 = Matrix__get_impl_xogbpk(tmp0_0, 0, 0) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 0) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 0) * v2_0;
|
|
855
855
|
var tmp5_0 = Matrix__get_impl_xogbpk(tmp0_0, 0, 1) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 1) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 1) * v2_0;
|
|
856
856
|
var b = Matrix__get_impl_xogbpk(tmp0_0, 0, 2) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 2) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 2) * v2_0;
|
|
857
|
-
return RGBColorSpaces_getInstance().
|
|
857
|
+
return RGBColorSpaces_getInstance().l2z_1.n30(fo.g31(tmp4_0), fo.g31(tmp5_0), fo.g31(b), this.u30_1);
|
|
858
858
|
};
|
|
859
859
|
function PqNonlinearity() {
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
868
|
-
}
|
|
869
|
-
protoOf(PqNonlinearity).
|
|
860
|
+
this.x30_1 = 0.1593017578125;
|
|
861
|
+
this.y30_1 = 78.84375;
|
|
862
|
+
this.z30_1 = 0.8359375;
|
|
863
|
+
this.a31_1 = 18.8515625;
|
|
864
|
+
this.b31_1 = 18.6875;
|
|
865
|
+
this.c31_1 = 10000.0;
|
|
866
|
+
this.d31_1 = 6.277394636015326;
|
|
867
|
+
this.e31_1 = 0.012683313515655966;
|
|
868
|
+
}
|
|
869
|
+
protoOf(PqNonlinearity).f31 = function (x) {
|
|
870
870
|
var vp = spow(x, 0.012683313515655966);
|
|
871
871
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
872
872
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
873
873
|
return 10000.0 * l;
|
|
874
874
|
};
|
|
875
|
-
protoOf(PqNonlinearity).
|
|
875
|
+
protoOf(PqNonlinearity).g31 = function (x) {
|
|
876
876
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
877
877
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
878
878
|
};
|
|
@@ -896,28 +896,28 @@
|
|
|
896
896
|
}
|
|
897
897
|
function Companion_0() {
|
|
898
898
|
Companion_instance_0 = this;
|
|
899
|
-
this.
|
|
899
|
+
this.h31_1 = LABColorSpaces_getInstance().c2z_1;
|
|
900
900
|
}
|
|
901
901
|
protoOf(Companion_0).equals = function (other) {
|
|
902
|
-
return equals(LABColorSpaces_getInstance().
|
|
902
|
+
return equals(LABColorSpaces_getInstance().c2z_1, other);
|
|
903
903
|
};
|
|
904
904
|
protoOf(Companion_0).hashCode = function () {
|
|
905
|
-
return hashCode(LABColorSpaces_getInstance().
|
|
905
|
+
return hashCode(LABColorSpaces_getInstance().c2z_1);
|
|
906
906
|
};
|
|
907
|
-
protoOf(Companion_0).
|
|
908
|
-
return this.
|
|
907
|
+
protoOf(Companion_0).n30 = function (l, a, b, alpha) {
|
|
908
|
+
return this.h31_1.n30(l, a, b, alpha);
|
|
909
909
|
};
|
|
910
|
-
protoOf(Companion_0).
|
|
911
|
-
return this.
|
|
910
|
+
protoOf(Companion_0).i31 = function (l, a, b, alpha) {
|
|
911
|
+
return this.h31_1.i31(l, a, b, alpha);
|
|
912
912
|
};
|
|
913
|
-
protoOf(Companion_0).
|
|
914
|
-
return this.
|
|
913
|
+
protoOf(Companion_0).o2y = function () {
|
|
914
|
+
return this.h31_1.o2y();
|
|
915
915
|
};
|
|
916
916
|
protoOf(Companion_0).w1 = function () {
|
|
917
|
-
return this.
|
|
917
|
+
return this.h31_1.w1();
|
|
918
918
|
};
|
|
919
|
-
protoOf(Companion_0).
|
|
920
|
-
return this.
|
|
919
|
+
protoOf(Companion_0).j2y = function (color) {
|
|
920
|
+
return this.h31_1.j2y(color);
|
|
921
921
|
};
|
|
922
922
|
var Companion_instance_0;
|
|
923
923
|
function Companion_getInstance_0() {
|
|
@@ -927,34 +927,34 @@
|
|
|
927
927
|
}
|
|
928
928
|
function LAB(l, a, b, alpha, space) {
|
|
929
929
|
Companion_getInstance_0();
|
|
930
|
-
this.
|
|
931
|
-
this.
|
|
932
|
-
this.
|
|
933
|
-
this.
|
|
934
|
-
this.
|
|
935
|
-
}
|
|
936
|
-
protoOf(LAB).
|
|
937
|
-
return this.
|
|
938
|
-
};
|
|
939
|
-
protoOf(LAB).
|
|
940
|
-
return this.
|
|
941
|
-
};
|
|
942
|
-
protoOf(LAB).
|
|
943
|
-
return this.
|
|
944
|
-
};
|
|
945
|
-
protoOf(LAB).
|
|
946
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
947
|
-
if (this.
|
|
948
|
-
return xyzSpace.
|
|
949
|
-
var fy = (this.
|
|
950
|
-
var fz = fy - this.
|
|
951
|
-
var fx = this.
|
|
930
|
+
this.e2y_1 = l;
|
|
931
|
+
this.f2y_1 = a;
|
|
932
|
+
this.g2y_1 = b;
|
|
933
|
+
this.h2y_1 = alpha;
|
|
934
|
+
this.i2y_1 = space;
|
|
935
|
+
}
|
|
936
|
+
protoOf(LAB).n2x = function () {
|
|
937
|
+
return this.h2y_1;
|
|
938
|
+
};
|
|
939
|
+
protoOf(LAB).o2x = function () {
|
|
940
|
+
return this.i2y_1;
|
|
941
|
+
};
|
|
942
|
+
protoOf(LAB).p2x = function () {
|
|
943
|
+
return this.e2y_1 === 0.0 ? Companion_getInstance_2().n30(0.0, 0.0, 0.0, this.h2y_1) : this.w2x().p2x();
|
|
944
|
+
};
|
|
945
|
+
protoOf(LAB).w2x = function () {
|
|
946
|
+
var xyzSpace = XYZColorSpace_0(this.i2y_1.o2y());
|
|
947
|
+
if (this.e2y_1 === 0.0)
|
|
948
|
+
return xyzSpace.j31(0.0, 0.0, 0.0);
|
|
949
|
+
var fy = (this.e2y_1 + 16) / 116.0;
|
|
950
|
+
var fz = fy - this.g2y_1 / 200.0;
|
|
951
|
+
var fx = this.f2y_1 / 500.0 + fy;
|
|
952
952
|
var tmp;
|
|
953
|
-
if (this.
|
|
953
|
+
if (this.e2y_1 > 8.0) {
|
|
954
954
|
// Inline function 'kotlin.math.pow' call
|
|
955
955
|
tmp = Math.pow(fy, 3);
|
|
956
956
|
} else {
|
|
957
|
-
tmp = this.
|
|
957
|
+
tmp = this.e2y_1 / 903.2962962962963;
|
|
958
958
|
}
|
|
959
959
|
var yr = tmp;
|
|
960
960
|
// Inline function 'kotlin.math.pow' call
|
|
@@ -965,13 +965,13 @@
|
|
|
965
965
|
// Inline function 'kotlin.let' call
|
|
966
966
|
var it_0 = Math.pow(fx, 3);
|
|
967
967
|
var xr = it_0 > 0.008856451679035631 ? it_0 : (116 * fx - 16) / 903.2962962962963;
|
|
968
|
-
var wp = this.
|
|
969
|
-
return xyzSpace.
|
|
968
|
+
var wp = this.i2y_1.o2y().j30_1;
|
|
969
|
+
return xyzSpace.i31(xr * wp.n31(), yr * wp.m31_1, zr * wp.o31(), this.h2y_1);
|
|
970
970
|
};
|
|
971
|
-
protoOf(LAB).
|
|
972
|
-
var tmp0 = this.
|
|
971
|
+
protoOf(LAB).d2y = function () {
|
|
972
|
+
var tmp0 = this.f2y_1;
|
|
973
973
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
974
|
-
var b = this.
|
|
974
|
+
var b = this.g2y_1;
|
|
975
975
|
// Inline function 'kotlin.math.sqrt' call
|
|
976
976
|
var x = tmp0 * tmp0 + b * b;
|
|
977
977
|
var c = Math.sqrt(x);
|
|
@@ -985,24 +985,24 @@
|
|
|
985
985
|
}
|
|
986
986
|
var h = tmp;
|
|
987
987
|
var h_0 = normalizeDeg_0(h);
|
|
988
|
-
return LCHabColorSpace_0(this.
|
|
988
|
+
return LCHabColorSpace_0(this.i2y_1.o2y()).n30(this.e2y_1, c, h_0, this.h2y_1);
|
|
989
989
|
};
|
|
990
|
-
protoOf(LAB).
|
|
990
|
+
protoOf(LAB).x2x = function () {
|
|
991
991
|
return this;
|
|
992
992
|
};
|
|
993
993
|
protoOf(LAB).a5 = function () {
|
|
994
994
|
// Inline function 'kotlin.floatArrayOf' call
|
|
995
|
-
return new Float32Array([this.
|
|
995
|
+
return new Float32Array([this.e2y_1, this.f2y_1, this.g2y_1, this.h2y_1]);
|
|
996
996
|
};
|
|
997
997
|
protoOf(LAB).toString = function () {
|
|
998
|
-
return 'LAB(l=' + this.
|
|
998
|
+
return 'LAB(l=' + this.e2y_1 + ', a=' + this.f2y_1 + ', b=' + this.g2y_1 + ', alpha=' + this.h2y_1 + ', space=' + toString(this.i2y_1) + ')';
|
|
999
999
|
};
|
|
1000
1000
|
protoOf(LAB).hashCode = function () {
|
|
1001
|
-
var result = getNumberHashCode(this.
|
|
1002
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1003
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1004
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1005
|
-
result = imul(result, 31) + hashCode(this.
|
|
1001
|
+
var result = getNumberHashCode(this.e2y_1);
|
|
1002
|
+
result = imul(result, 31) + getNumberHashCode(this.f2y_1) | 0;
|
|
1003
|
+
result = imul(result, 31) + getNumberHashCode(this.g2y_1) | 0;
|
|
1004
|
+
result = imul(result, 31) + getNumberHashCode(this.h2y_1) | 0;
|
|
1005
|
+
result = imul(result, 31) + hashCode(this.i2y_1) | 0;
|
|
1006
1006
|
return result;
|
|
1007
1007
|
};
|
|
1008
1008
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1011,27 +1011,27 @@
|
|
|
1011
1011
|
if (!(other instanceof LAB))
|
|
1012
1012
|
return false;
|
|
1013
1013
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1014
|
-
if (!equals(this.
|
|
1014
|
+
if (!equals(this.e2y_1, tmp0_other_with_cast.e2y_1))
|
|
1015
1015
|
return false;
|
|
1016
|
-
if (!equals(this.
|
|
1016
|
+
if (!equals(this.f2y_1, tmp0_other_with_cast.f2y_1))
|
|
1017
1017
|
return false;
|
|
1018
|
-
if (!equals(this.
|
|
1018
|
+
if (!equals(this.g2y_1, tmp0_other_with_cast.g2y_1))
|
|
1019
1019
|
return false;
|
|
1020
|
-
if (!equals(this.
|
|
1020
|
+
if (!equals(this.h2y_1, tmp0_other_with_cast.h2y_1))
|
|
1021
1021
|
return false;
|
|
1022
|
-
if (!equals(this.
|
|
1022
|
+
if (!equals(this.i2y_1, tmp0_other_with_cast.i2y_1))
|
|
1023
1023
|
return false;
|
|
1024
1024
|
return true;
|
|
1025
1025
|
};
|
|
1026
1026
|
function LABColorSpace() {
|
|
1027
1027
|
}
|
|
1028
1028
|
function LABColorSpace_0(whitePoint) {
|
|
1029
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1029
|
+
return whitePoint.equals(Illuminant_getInstance().x2y_1) ? LABColorSpaces_getInstance().c2z_1 : whitePoint.equals(Illuminant_getInstance().v2y_1) ? LABColorSpaces_getInstance().d2z_1 : new LABColorSpaceImpl(whitePoint);
|
|
1030
1030
|
}
|
|
1031
1031
|
function LABColorSpaces() {
|
|
1032
1032
|
LABColorSpaces_instance = this;
|
|
1033
|
-
this.
|
|
1034
|
-
this.
|
|
1033
|
+
this.c2z_1 = new LABColorSpaceImpl(Illuminant_getInstance().x2y_1);
|
|
1034
|
+
this.d2z_1 = new LABColorSpaceImpl(Illuminant_getInstance().v2y_1);
|
|
1035
1035
|
}
|
|
1036
1036
|
var LABColorSpaces_instance;
|
|
1037
1037
|
function LABColorSpaces_getInstance() {
|
|
@@ -1040,41 +1040,41 @@
|
|
|
1040
1040
|
return LABColorSpaces_instance;
|
|
1041
1041
|
}
|
|
1042
1042
|
function LABColorSpaceImpl(whitePoint) {
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
1043
|
+
this.p31_1 = whitePoint;
|
|
1044
|
+
this.q31_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
|
|
1045
1045
|
}
|
|
1046
|
-
protoOf(LABColorSpaceImpl).
|
|
1047
|
-
return this.
|
|
1046
|
+
protoOf(LABColorSpaceImpl).o2y = function () {
|
|
1047
|
+
return this.p31_1;
|
|
1048
1048
|
};
|
|
1049
1049
|
protoOf(LABColorSpaceImpl).w1 = function () {
|
|
1050
1050
|
return 'LAB';
|
|
1051
1051
|
};
|
|
1052
|
-
protoOf(LABColorSpaceImpl).
|
|
1052
|
+
protoOf(LABColorSpaceImpl).j2y = function (color) {
|
|
1053
1053
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1054
1054
|
var tmp;
|
|
1055
|
-
var tmp_0 = color.
|
|
1055
|
+
var tmp_0 = color.o2x();
|
|
1056
1056
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1057
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1058
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1059
|
-
tmp = color.
|
|
1057
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o2y();
|
|
1058
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().x2y_1 : tmp1_elvis_lhs).equals(this.o2y())) {
|
|
1059
|
+
tmp = color.x2x();
|
|
1060
1060
|
} else {
|
|
1061
|
-
tmp = color.
|
|
1061
|
+
tmp = color.w2x().r2y(XYZColorSpace_0(this.o2y())).x2x();
|
|
1062
1062
|
}
|
|
1063
1063
|
return tmp;
|
|
1064
1064
|
};
|
|
1065
1065
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1066
|
-
return 'LABColorSpace(' + this.
|
|
1066
|
+
return 'LABColorSpace(' + this.p31_1.toString() + ')';
|
|
1067
1067
|
};
|
|
1068
|
-
protoOf(LABColorSpaceImpl).
|
|
1068
|
+
protoOf(LABColorSpaceImpl).n30 = function (l, a, b, alpha) {
|
|
1069
1069
|
return new LAB(l, a, b, alpha, this);
|
|
1070
1070
|
};
|
|
1071
1071
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1072
|
-
return this.
|
|
1072
|
+
return this.p31_1.hashCode();
|
|
1073
1073
|
};
|
|
1074
1074
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1075
1075
|
var tmp;
|
|
1076
1076
|
if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
|
|
1077
|
-
tmp = this.
|
|
1077
|
+
tmp = this.p31_1.equals(other.o2y());
|
|
1078
1078
|
} else {
|
|
1079
1079
|
tmp = false;
|
|
1080
1080
|
}
|
|
@@ -1082,25 +1082,25 @@
|
|
|
1082
1082
|
};
|
|
1083
1083
|
function Companion_1() {
|
|
1084
1084
|
Companion_instance_1 = this;
|
|
1085
|
-
this.
|
|
1085
|
+
this.r31_1 = LCHabColorSpaces_getInstance().a2z_1;
|
|
1086
1086
|
}
|
|
1087
1087
|
protoOf(Companion_1).equals = function (other) {
|
|
1088
|
-
return equals(LCHabColorSpaces_getInstance().
|
|
1088
|
+
return equals(LCHabColorSpaces_getInstance().a2z_1, other);
|
|
1089
1089
|
};
|
|
1090
1090
|
protoOf(Companion_1).hashCode = function () {
|
|
1091
|
-
return hashCode(LCHabColorSpaces_getInstance().
|
|
1091
|
+
return hashCode(LCHabColorSpaces_getInstance().a2z_1);
|
|
1092
1092
|
};
|
|
1093
|
-
protoOf(Companion_1).
|
|
1094
|
-
return this.
|
|
1093
|
+
protoOf(Companion_1).n30 = function (l, c, h, alpha) {
|
|
1094
|
+
return this.r31_1.n30(l, c, h, alpha);
|
|
1095
1095
|
};
|
|
1096
|
-
protoOf(Companion_1).
|
|
1097
|
-
return this.
|
|
1096
|
+
protoOf(Companion_1).o2y = function () {
|
|
1097
|
+
return this.r31_1.o2y();
|
|
1098
1098
|
};
|
|
1099
1099
|
protoOf(Companion_1).w1 = function () {
|
|
1100
|
-
return this.
|
|
1100
|
+
return this.r31_1.w1();
|
|
1101
1101
|
};
|
|
1102
|
-
protoOf(Companion_1).
|
|
1103
|
-
return this.
|
|
1102
|
+
protoOf(Companion_1).j2y = function (color) {
|
|
1103
|
+
return this.r31_1.j2y(color);
|
|
1104
1104
|
};
|
|
1105
1105
|
var Companion_instance_1;
|
|
1106
1106
|
function Companion_getInstance_1() {
|
|
@@ -1110,54 +1110,54 @@
|
|
|
1110
1110
|
}
|
|
1111
1111
|
function LCHab(l, c, h, alpha, space) {
|
|
1112
1112
|
Companion_getInstance_1();
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1115
|
-
this.
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1113
|
+
this.v2z_1 = l;
|
|
1114
|
+
this.w2z_1 = c;
|
|
1115
|
+
this.x2z_1 = h;
|
|
1116
|
+
this.y2z_1 = alpha;
|
|
1117
|
+
this.z2z_1 = space;
|
|
1118
1118
|
}
|
|
1119
|
-
protoOf(LCHab).
|
|
1120
|
-
return this.
|
|
1119
|
+
protoOf(LCHab).h30 = function () {
|
|
1120
|
+
return this.x2z_1;
|
|
1121
1121
|
};
|
|
1122
|
-
protoOf(LCHab).
|
|
1123
|
-
return this.
|
|
1122
|
+
protoOf(LCHab).n2x = function () {
|
|
1123
|
+
return this.y2z_1;
|
|
1124
1124
|
};
|
|
1125
|
-
protoOf(LCHab).
|
|
1126
|
-
return this.
|
|
1125
|
+
protoOf(LCHab).o2x = function () {
|
|
1126
|
+
return this.z2z_1;
|
|
1127
1127
|
};
|
|
1128
|
-
protoOf(LCHab).
|
|
1129
|
-
return this.
|
|
1128
|
+
protoOf(LCHab).p2x = function () {
|
|
1129
|
+
return this.x2x().p2x();
|
|
1130
1130
|
};
|
|
1131
|
-
protoOf(LCHab).
|
|
1132
|
-
return this.
|
|
1131
|
+
protoOf(LCHab).w2x = function () {
|
|
1132
|
+
return this.x2x().w2x();
|
|
1133
1133
|
};
|
|
1134
|
-
protoOf(LCHab).
|
|
1135
|
-
var tmp0 = this.
|
|
1134
|
+
protoOf(LCHab).x2x = function () {
|
|
1135
|
+
var tmp0 = this.w2z_1;
|
|
1136
1136
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1137
|
-
var h = this.
|
|
1137
|
+
var h = this.x2z_1;
|
|
1138
1138
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
1139
1139
|
// Inline function 'kotlin.math.cos' call
|
|
1140
1140
|
var a = tmp0 * Math.cos(hDegrees);
|
|
1141
1141
|
// Inline function 'kotlin.math.sin' call
|
|
1142
1142
|
var b = tmp0 * Math.sin(hDegrees);
|
|
1143
|
-
return LABColorSpace_0(this.
|
|
1143
|
+
return LABColorSpace_0(this.z2z_1.o2y()).n30(this.v2z_1, a, b, this.y2z_1);
|
|
1144
1144
|
};
|
|
1145
|
-
protoOf(LCHab).
|
|
1145
|
+
protoOf(LCHab).d2y = function () {
|
|
1146
1146
|
return this;
|
|
1147
1147
|
};
|
|
1148
1148
|
protoOf(LCHab).a5 = function () {
|
|
1149
1149
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1150
|
-
return new Float32Array([this.
|
|
1150
|
+
return new Float32Array([this.v2z_1, this.w2z_1, this.x2z_1, this.y2z_1]);
|
|
1151
1151
|
};
|
|
1152
1152
|
protoOf(LCHab).toString = function () {
|
|
1153
|
-
return 'LCHab(l=' + this.
|
|
1153
|
+
return 'LCHab(l=' + this.v2z_1 + ', c=' + this.w2z_1 + ', h=' + this.x2z_1 + ', alpha=' + this.y2z_1 + ', space=' + toString(this.z2z_1) + ')';
|
|
1154
1154
|
};
|
|
1155
1155
|
protoOf(LCHab).hashCode = function () {
|
|
1156
|
-
var result = getNumberHashCode(this.
|
|
1157
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1158
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1159
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1160
|
-
result = imul(result, 31) + hashCode(this.
|
|
1156
|
+
var result = getNumberHashCode(this.v2z_1);
|
|
1157
|
+
result = imul(result, 31) + getNumberHashCode(this.w2z_1) | 0;
|
|
1158
|
+
result = imul(result, 31) + getNumberHashCode(this.x2z_1) | 0;
|
|
1159
|
+
result = imul(result, 31) + getNumberHashCode(this.y2z_1) | 0;
|
|
1160
|
+
result = imul(result, 31) + hashCode(this.z2z_1) | 0;
|
|
1161
1161
|
return result;
|
|
1162
1162
|
};
|
|
1163
1163
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1166,27 +1166,27 @@
|
|
|
1166
1166
|
if (!(other instanceof LCHab))
|
|
1167
1167
|
return false;
|
|
1168
1168
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1169
|
-
if (!equals(this.
|
|
1169
|
+
if (!equals(this.v2z_1, tmp0_other_with_cast.v2z_1))
|
|
1170
1170
|
return false;
|
|
1171
|
-
if (!equals(this.
|
|
1171
|
+
if (!equals(this.w2z_1, tmp0_other_with_cast.w2z_1))
|
|
1172
1172
|
return false;
|
|
1173
|
-
if (!equals(this.
|
|
1173
|
+
if (!equals(this.x2z_1, tmp0_other_with_cast.x2z_1))
|
|
1174
1174
|
return false;
|
|
1175
|
-
if (!equals(this.
|
|
1175
|
+
if (!equals(this.y2z_1, tmp0_other_with_cast.y2z_1))
|
|
1176
1176
|
return false;
|
|
1177
|
-
if (!equals(this.
|
|
1177
|
+
if (!equals(this.z2z_1, tmp0_other_with_cast.z2z_1))
|
|
1178
1178
|
return false;
|
|
1179
1179
|
return true;
|
|
1180
1180
|
};
|
|
1181
1181
|
function LCHabColorSpace() {
|
|
1182
1182
|
}
|
|
1183
1183
|
function LCHabColorSpace_0(whitePoint) {
|
|
1184
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1184
|
+
return whitePoint.equals(Illuminant_getInstance().x2y_1) ? LCHabColorSpaces_getInstance().a2z_1 : whitePoint.equals(Illuminant_getInstance().v2y_1) ? LCHabColorSpaces_getInstance().b2z_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1185
1185
|
}
|
|
1186
1186
|
function LCHabColorSpaces() {
|
|
1187
1187
|
LCHabColorSpaces_instance = this;
|
|
1188
|
-
this.
|
|
1189
|
-
this.
|
|
1188
|
+
this.a2z_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().x2y_1);
|
|
1189
|
+
this.b2z_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().v2y_1);
|
|
1190
1190
|
}
|
|
1191
1191
|
var LCHabColorSpaces_instance;
|
|
1192
1192
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1195,41 +1195,41 @@
|
|
|
1195
1195
|
return LCHabColorSpaces_instance;
|
|
1196
1196
|
}
|
|
1197
1197
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1198
|
-
this.
|
|
1199
|
-
this.
|
|
1198
|
+
this.s31_1 = whitePoint;
|
|
1199
|
+
this.t31_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)]);
|
|
1200
1200
|
}
|
|
1201
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1202
|
-
return this.
|
|
1201
|
+
protoOf(LCHabColorSpaceImpl).o2y = function () {
|
|
1202
|
+
return this.s31_1;
|
|
1203
1203
|
};
|
|
1204
1204
|
protoOf(LCHabColorSpaceImpl).w1 = function () {
|
|
1205
1205
|
return 'LCHab';
|
|
1206
1206
|
};
|
|
1207
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1207
|
+
protoOf(LCHabColorSpaceImpl).j2y = function (color) {
|
|
1208
1208
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1209
1209
|
var tmp;
|
|
1210
|
-
var tmp_0 = color.
|
|
1210
|
+
var tmp_0 = color.o2x();
|
|
1211
1211
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1212
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1213
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1214
|
-
tmp = color.
|
|
1212
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o2y();
|
|
1213
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().x2y_1 : tmp1_elvis_lhs).equals(this.o2y())) {
|
|
1214
|
+
tmp = color.d2y();
|
|
1215
1215
|
} else {
|
|
1216
|
-
tmp = color.
|
|
1216
|
+
tmp = color.w2x().r2y(XYZColorSpace_0(this.o2y())).d2y();
|
|
1217
1217
|
}
|
|
1218
1218
|
return tmp;
|
|
1219
1219
|
};
|
|
1220
1220
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1221
|
-
return 'LCHabColorSpace(' + this.
|
|
1221
|
+
return 'LCHabColorSpace(' + this.s31_1.toString() + ')';
|
|
1222
1222
|
};
|
|
1223
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1223
|
+
protoOf(LCHabColorSpaceImpl).n30 = function (l, c, h, alpha) {
|
|
1224
1224
|
return new LCHab(l, c, h, alpha, this);
|
|
1225
1225
|
};
|
|
1226
1226
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
1227
|
-
return this.
|
|
1227
|
+
return this.s31_1.hashCode();
|
|
1228
1228
|
};
|
|
1229
1229
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
1230
1230
|
var tmp;
|
|
1231
1231
|
if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
|
|
1232
|
-
tmp = this.
|
|
1232
|
+
tmp = this.s31_1.equals(other.o2y());
|
|
1233
1233
|
} else {
|
|
1234
1234
|
tmp = false;
|
|
1235
1235
|
}
|
|
@@ -1240,19 +1240,19 @@
|
|
|
1240
1240
|
function Oklch() {
|
|
1241
1241
|
}
|
|
1242
1242
|
function GammaTransferFunctions(gamma) {
|
|
1243
|
-
this.
|
|
1243
|
+
this.u31_1 = gamma;
|
|
1244
1244
|
}
|
|
1245
|
-
protoOf(GammaTransferFunctions).
|
|
1246
|
-
return spow(x, this.
|
|
1245
|
+
protoOf(GammaTransferFunctions).f31 = function (x) {
|
|
1246
|
+
return spow(x, this.u31_1);
|
|
1247
1247
|
};
|
|
1248
|
-
protoOf(GammaTransferFunctions).
|
|
1249
|
-
return spow(x, 1.0 / this.
|
|
1248
|
+
protoOf(GammaTransferFunctions).g31 = function (x) {
|
|
1249
|
+
return spow(x, 1.0 / this.u31_1);
|
|
1250
1250
|
};
|
|
1251
1251
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
1252
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
1252
|
+
return 'GammaTransferFunctions(gamma=' + this.u31_1 + ')';
|
|
1253
1253
|
};
|
|
1254
1254
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
1255
|
-
return getNumberHashCode(this.
|
|
1255
|
+
return getNumberHashCode(this.u31_1);
|
|
1256
1256
|
};
|
|
1257
1257
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
1258
1258
|
if (this === other)
|
|
@@ -1260,16 +1260,16 @@
|
|
|
1260
1260
|
if (!(other instanceof GammaTransferFunctions))
|
|
1261
1261
|
return false;
|
|
1262
1262
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
1263
|
-
if (!equals(this.
|
|
1263
|
+
if (!equals(this.u31_1, tmp0_other_with_cast.u31_1))
|
|
1264
1264
|
return false;
|
|
1265
1265
|
return true;
|
|
1266
1266
|
};
|
|
1267
1267
|
function LinearTransferFunctions() {
|
|
1268
1268
|
}
|
|
1269
|
-
protoOf(LinearTransferFunctions).
|
|
1269
|
+
protoOf(LinearTransferFunctions).f31 = function (x) {
|
|
1270
1270
|
return x;
|
|
1271
1271
|
};
|
|
1272
|
-
protoOf(LinearTransferFunctions).
|
|
1272
|
+
protoOf(LinearTransferFunctions).g31 = function (x) {
|
|
1273
1273
|
return x;
|
|
1274
1274
|
};
|
|
1275
1275
|
var LinearTransferFunctions_instance;
|
|
@@ -1280,37 +1280,37 @@
|
|
|
1280
1280
|
}
|
|
1281
1281
|
function Companion_2() {
|
|
1282
1282
|
Companion_instance_2 = this;
|
|
1283
|
-
this.
|
|
1283
|
+
this.m30_1 = RGBColorSpaces_getInstance().e2z_1;
|
|
1284
1284
|
}
|
|
1285
1285
|
protoOf(Companion_2).equals = function (other) {
|
|
1286
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1286
|
+
return equals(RGBColorSpaces_getInstance().e2z_1, other);
|
|
1287
1287
|
};
|
|
1288
1288
|
protoOf(Companion_2).hashCode = function () {
|
|
1289
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1289
|
+
return hashCode(RGBColorSpaces_getInstance().e2z_1);
|
|
1290
1290
|
};
|
|
1291
|
-
protoOf(Companion_2).
|
|
1292
|
-
return this.
|
|
1291
|
+
protoOf(Companion_2).n30 = function (r, g, b, alpha) {
|
|
1292
|
+
return this.m30_1.n30(r, g, b, alpha);
|
|
1293
1293
|
};
|
|
1294
|
-
protoOf(Companion_2).
|
|
1295
|
-
return this.
|
|
1294
|
+
protoOf(Companion_2).i31 = function (r, g, b, alpha) {
|
|
1295
|
+
return this.m30_1.i31(r, g, b, alpha);
|
|
1296
1296
|
};
|
|
1297
|
-
protoOf(Companion_2).
|
|
1298
|
-
return this.
|
|
1297
|
+
protoOf(Companion_2).w30 = function () {
|
|
1298
|
+
return this.m30_1.w30();
|
|
1299
1299
|
};
|
|
1300
|
-
protoOf(Companion_2).
|
|
1301
|
-
return this.
|
|
1300
|
+
protoOf(Companion_2).v31 = function () {
|
|
1301
|
+
return this.m30_1.v31();
|
|
1302
1302
|
};
|
|
1303
|
-
protoOf(Companion_2).
|
|
1304
|
-
return this.
|
|
1303
|
+
protoOf(Companion_2).w31 = function () {
|
|
1304
|
+
return this.m30_1.w31();
|
|
1305
1305
|
};
|
|
1306
|
-
protoOf(Companion_2).
|
|
1307
|
-
return this.
|
|
1306
|
+
protoOf(Companion_2).o2y = function () {
|
|
1307
|
+
return this.m30_1.o2y();
|
|
1308
1308
|
};
|
|
1309
1309
|
protoOf(Companion_2).w1 = function () {
|
|
1310
|
-
return this.
|
|
1310
|
+
return this.m30_1.w1();
|
|
1311
1311
|
};
|
|
1312
|
-
protoOf(Companion_2).
|
|
1313
|
-
return this.
|
|
1312
|
+
protoOf(Companion_2).j2y = function (color) {
|
|
1313
|
+
return this.m30_1.j2y(color);
|
|
1314
1314
|
};
|
|
1315
1315
|
var Companion_instance_2;
|
|
1316
1316
|
function Companion_getInstance_2() {
|
|
@@ -1320,36 +1320,36 @@
|
|
|
1320
1320
|
}
|
|
1321
1321
|
function RGB(r, g, b, alpha, space) {
|
|
1322
1322
|
Companion_getInstance_2();
|
|
1323
|
-
this.
|
|
1324
|
-
this.
|
|
1325
|
-
this.
|
|
1326
|
-
this.
|
|
1327
|
-
this.
|
|
1323
|
+
this.r2x_1 = r;
|
|
1324
|
+
this.s2x_1 = g;
|
|
1325
|
+
this.t2x_1 = b;
|
|
1326
|
+
this.u2x_1 = alpha;
|
|
1327
|
+
this.v2x_1 = space;
|
|
1328
1328
|
}
|
|
1329
|
-
protoOf(RGB).
|
|
1330
|
-
return this.
|
|
1329
|
+
protoOf(RGB).n2x = function () {
|
|
1330
|
+
return this.u2x_1;
|
|
1331
1331
|
};
|
|
1332
|
-
protoOf(RGB).
|
|
1333
|
-
return this.
|
|
1332
|
+
protoOf(RGB).o2x = function () {
|
|
1333
|
+
return this.v2x_1;
|
|
1334
1334
|
};
|
|
1335
|
-
protoOf(RGB).
|
|
1335
|
+
protoOf(RGB).q2z = function () {
|
|
1336
1336
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1337
|
-
var $this$toSRGB = this.
|
|
1338
|
-
return _RGBInt___init__impl__lqova7_1($this$toSRGB.
|
|
1337
|
+
var $this$toSRGB = this.x31(SRGB_getInstance());
|
|
1338
|
+
return _RGBInt___init__impl__lqova7_1($this$toSRGB.r2x_1, $this$toSRGB.s2x_1, $this$toSRGB.t2x_1, nanToOne($this$toSRGB.u2x_1));
|
|
1339
1339
|
};
|
|
1340
|
-
protoOf(RGB).
|
|
1341
|
-
var f = SRGB_getInstance().
|
|
1342
|
-
return equals(this.
|
|
1340
|
+
protoOf(RGB).x31 = function (space) {
|
|
1341
|
+
var f = SRGB_getInstance().w30();
|
|
1342
|
+
return equals(this.v2x_1, space) ? this : equals(this.v2x_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().f2z_1) ? space.n30(f.f31(this.r2x_1), f.f31(this.s2x_1), f.f31(this.t2x_1), this.u2x_1) : equals(this.v2x_1, RGBColorSpaces_getInstance().f2z_1) && equals(space, SRGB_getInstance()) ? space.n30(f.g31(this.r2x_1), f.g31(this.s2x_1), f.g31(this.t2x_1), this.u2x_1) : this.w2x().z31(space);
|
|
1343
1343
|
};
|
|
1344
|
-
protoOf(RGB).
|
|
1344
|
+
protoOf(RGB).q2x = function () {
|
|
1345
1345
|
var tmp$ret$3;
|
|
1346
1346
|
$l$block: {
|
|
1347
1347
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
1348
1348
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1349
|
-
var $this$toSRGB = this.
|
|
1350
|
-
var r = $this$toSRGB.
|
|
1351
|
-
var g = $this$toSRGB.
|
|
1352
|
-
var b = $this$toSRGB.
|
|
1349
|
+
var $this$toSRGB = this.x31(SRGB_getInstance());
|
|
1350
|
+
var r = $this$toSRGB.r2x_1;
|
|
1351
|
+
var g = $this$toSRGB.s2x_1;
|
|
1352
|
+
var b = $this$toSRGB.t2x_1;
|
|
1353
1353
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1354
1354
|
var min = Math.min(r, g, b);
|
|
1355
1355
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -1359,39 +1359,39 @@
|
|
|
1359
1359
|
var h_0 = normalizeDeg(h);
|
|
1360
1360
|
var l = (min + max) / 2.0;
|
|
1361
1361
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
1362
|
-
tmp$ret$3 = new HSL(h_0, s, l, this.
|
|
1362
|
+
tmp$ret$3 = new HSL(h_0, s, l, this.u2x_1);
|
|
1363
1363
|
break $l$block;
|
|
1364
1364
|
}
|
|
1365
1365
|
return tmp$ret$3;
|
|
1366
1366
|
};
|
|
1367
|
-
protoOf(RGB).
|
|
1368
|
-
var f = this.
|
|
1369
|
-
var tmp0 = _Matrix___init__impl__q3kp4w(this.
|
|
1370
|
-
var tmp1 = f.
|
|
1371
|
-
var tmp2 = f.
|
|
1367
|
+
protoOf(RGB).w2x = function () {
|
|
1368
|
+
var f = this.v2x_1.w30();
|
|
1369
|
+
var tmp0 = _Matrix___init__impl__q3kp4w(this.v2x_1.v31());
|
|
1370
|
+
var tmp1 = f.f31(this.r2x_1);
|
|
1371
|
+
var tmp2 = f.f31(this.s2x_1);
|
|
1372
1372
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1373
|
-
var v2 = f.
|
|
1373
|
+
var v2 = f.f31(this.t2x_1);
|
|
1374
1374
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1375
1375
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1376
1376
|
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
1377
|
-
return XYZColorSpace_0(this.
|
|
1377
|
+
return XYZColorSpace_0(this.v2x_1.o2y()).n30(tmp4, tmp5, z, this.u2x_1);
|
|
1378
1378
|
};
|
|
1379
|
-
protoOf(RGB).
|
|
1380
|
-
return this.
|
|
1379
|
+
protoOf(RGB).p2x = function () {
|
|
1380
|
+
return this.x31(RGBColorSpaces_getInstance().e2z_1);
|
|
1381
1381
|
};
|
|
1382
1382
|
protoOf(RGB).a5 = function () {
|
|
1383
1383
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1384
|
-
return new Float32Array([this.
|
|
1384
|
+
return new Float32Array([this.r2x_1, this.s2x_1, this.t2x_1, this.u2x_1]);
|
|
1385
1385
|
};
|
|
1386
1386
|
protoOf(RGB).toString = function () {
|
|
1387
|
-
return 'RGB(r=' + this.
|
|
1387
|
+
return 'RGB(r=' + this.r2x_1 + ', g=' + this.s2x_1 + ', b=' + this.t2x_1 + ', alpha=' + this.u2x_1 + ', space=' + toString(this.v2x_1) + ')';
|
|
1388
1388
|
};
|
|
1389
1389
|
protoOf(RGB).hashCode = function () {
|
|
1390
|
-
var result = getNumberHashCode(this.
|
|
1391
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1392
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1393
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1394
|
-
result = imul(result, 31) + hashCode(this.
|
|
1390
|
+
var result = getNumberHashCode(this.r2x_1);
|
|
1391
|
+
result = imul(result, 31) + getNumberHashCode(this.s2x_1) | 0;
|
|
1392
|
+
result = imul(result, 31) + getNumberHashCode(this.t2x_1) | 0;
|
|
1393
|
+
result = imul(result, 31) + getNumberHashCode(this.u2x_1) | 0;
|
|
1394
|
+
result = imul(result, 31) + hashCode(this.v2x_1) | 0;
|
|
1395
1395
|
return result;
|
|
1396
1396
|
};
|
|
1397
1397
|
protoOf(RGB).equals = function (other) {
|
|
@@ -1400,15 +1400,15 @@
|
|
|
1400
1400
|
if (!(other instanceof RGB))
|
|
1401
1401
|
return false;
|
|
1402
1402
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
1403
|
-
if (!equals(this.
|
|
1403
|
+
if (!equals(this.r2x_1, tmp0_other_with_cast.r2x_1))
|
|
1404
1404
|
return false;
|
|
1405
|
-
if (!equals(this.
|
|
1405
|
+
if (!equals(this.s2x_1, tmp0_other_with_cast.s2x_1))
|
|
1406
1406
|
return false;
|
|
1407
|
-
if (!equals(this.
|
|
1407
|
+
if (!equals(this.t2x_1, tmp0_other_with_cast.t2x_1))
|
|
1408
1408
|
return false;
|
|
1409
|
-
if (!equals(this.
|
|
1409
|
+
if (!equals(this.u2x_1, tmp0_other_with_cast.u2x_1))
|
|
1410
1410
|
return false;
|
|
1411
|
-
if (!equals(this.
|
|
1411
|
+
if (!equals(this.v2x_1, tmp0_other_with_cast.v2x_1))
|
|
1412
1412
|
return false;
|
|
1413
1413
|
return true;
|
|
1414
1414
|
};
|
|
@@ -1463,17 +1463,17 @@
|
|
|
1463
1463
|
}
|
|
1464
1464
|
var ACES_AP1_B;
|
|
1465
1465
|
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
1466
|
-
return it.
|
|
1466
|
+
return it.p2x();
|
|
1467
1467
|
}
|
|
1468
1468
|
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
1469
1469
|
var tmp;
|
|
1470
1470
|
if (color instanceof RGB) {
|
|
1471
|
-
tmp = color.
|
|
1471
|
+
tmp = color.x31($this$RGBColorSpaceImpl);
|
|
1472
1472
|
} else {
|
|
1473
1473
|
if (color instanceof ICtCp) {
|
|
1474
|
-
tmp = color.
|
|
1474
|
+
tmp = color.v30();
|
|
1475
1475
|
} else {
|
|
1476
|
-
tmp = color.
|
|
1476
|
+
tmp = color.w2x().z31($this$RGBColorSpaceImpl);
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
1479
|
return tmp;
|
|
@@ -1481,29 +1481,29 @@
|
|
|
1481
1481
|
function RGBColorSpaces() {
|
|
1482
1482
|
RGBColorSpaces_instance = this;
|
|
1483
1483
|
var tmp = this;
|
|
1484
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1484
|
+
var tmp_0 = Illuminant_getInstance().x2y_1;
|
|
1485
1485
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1486
1486
|
var tmp_2 = get_SRGB_R();
|
|
1487
1487
|
var tmp_3 = get_SRGB_G();
|
|
1488
1488
|
var tmp_4 = get_SRGB_B();
|
|
1489
|
-
tmp.
|
|
1490
|
-
this.
|
|
1491
|
-
this.
|
|
1492
|
-
this.
|
|
1493
|
-
this.
|
|
1494
|
-
this.
|
|
1495
|
-
this.
|
|
1489
|
+
tmp.e2z_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1490
|
+
this.f2z_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().x2y_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1491
|
+
this.g2z_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1492
|
+
this.h2z_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1493
|
+
this.i2z_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1494
|
+
this.j2z_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1495
|
+
this.k2z_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().x2y_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));
|
|
1496
1496
|
var tmp_5 = this;
|
|
1497
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1497
|
+
var tmp_6 = Illuminant_getInstance().x2y_1;
|
|
1498
1498
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1499
1499
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1500
1500
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1501
1501
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1502
|
-
tmp_5.
|
|
1503
|
-
this.
|
|
1504
|
-
this.
|
|
1505
|
-
this.
|
|
1506
|
-
this.
|
|
1502
|
+
tmp_5.l2z_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1503
|
+
this.m2z_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().x2y_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1504
|
+
this.n2z_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));
|
|
1505
|
+
this.o2z_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().x2y_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1506
|
+
this.p2z_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().v2y_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));
|
|
1507
1507
|
}
|
|
1508
1508
|
var RGBColorSpaces_instance;
|
|
1509
1509
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1513,40 +1513,40 @@
|
|
|
1513
1513
|
}
|
|
1514
1514
|
function SRGB() {
|
|
1515
1515
|
SRGB_instance = this;
|
|
1516
|
-
this.
|
|
1516
|
+
this.o30_1 = RGBColorSpaces_getInstance().e2z_1;
|
|
1517
1517
|
}
|
|
1518
1518
|
protoOf(SRGB).equals = function (other) {
|
|
1519
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1519
|
+
return equals(RGBColorSpaces_getInstance().e2z_1, other);
|
|
1520
1520
|
};
|
|
1521
1521
|
protoOf(SRGB).hashCode = function () {
|
|
1522
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1522
|
+
return hashCode(RGBColorSpaces_getInstance().e2z_1);
|
|
1523
1523
|
};
|
|
1524
1524
|
protoOf(SRGB).toString = function () {
|
|
1525
1525
|
return 'sRGB';
|
|
1526
1526
|
};
|
|
1527
|
-
protoOf(SRGB).
|
|
1528
|
-
return this.
|
|
1527
|
+
protoOf(SRGB).n30 = function (r, g, b, alpha) {
|
|
1528
|
+
return this.o30_1.n30(r, g, b, alpha);
|
|
1529
1529
|
};
|
|
1530
|
-
protoOf(SRGB).
|
|
1531
|
-
return this.
|
|
1530
|
+
protoOf(SRGB).i31 = function (r, g, b, alpha) {
|
|
1531
|
+
return this.o30_1.i31(r, g, b, alpha);
|
|
1532
1532
|
};
|
|
1533
|
-
protoOf(SRGB).
|
|
1534
|
-
return this.
|
|
1533
|
+
protoOf(SRGB).w30 = function () {
|
|
1534
|
+
return this.o30_1.w30();
|
|
1535
1535
|
};
|
|
1536
|
-
protoOf(SRGB).
|
|
1537
|
-
return this.
|
|
1536
|
+
protoOf(SRGB).v31 = function () {
|
|
1537
|
+
return this.o30_1.v31();
|
|
1538
1538
|
};
|
|
1539
|
-
protoOf(SRGB).
|
|
1540
|
-
return this.
|
|
1539
|
+
protoOf(SRGB).w31 = function () {
|
|
1540
|
+
return this.o30_1.w31();
|
|
1541
1541
|
};
|
|
1542
|
-
protoOf(SRGB).
|
|
1543
|
-
return this.
|
|
1542
|
+
protoOf(SRGB).o2y = function () {
|
|
1543
|
+
return this.o30_1.o2y();
|
|
1544
1544
|
};
|
|
1545
1545
|
protoOf(SRGB).w1 = function () {
|
|
1546
|
-
return this.
|
|
1546
|
+
return this.o30_1.w1();
|
|
1547
1547
|
};
|
|
1548
|
-
protoOf(SRGB).
|
|
1549
|
-
return this.
|
|
1548
|
+
protoOf(SRGB).j2y = function (color) {
|
|
1549
|
+
return this.o30_1.j2y(color);
|
|
1550
1550
|
};
|
|
1551
1551
|
var SRGB_instance;
|
|
1552
1552
|
function SRGB_getInstance() {
|
|
@@ -1555,39 +1555,39 @@
|
|
|
1555
1555
|
return SRGB_instance;
|
|
1556
1556
|
}
|
|
1557
1557
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
1558
|
-
this.
|
|
1559
|
-
this.
|
|
1560
|
-
this.
|
|
1561
|
-
this.
|
|
1562
|
-
this.
|
|
1563
|
-
this.
|
|
1564
|
-
this.
|
|
1565
|
-
this.
|
|
1566
|
-
this.
|
|
1567
|
-
this.
|
|
1558
|
+
this.a32_1 = name;
|
|
1559
|
+
this.b32_1 = whitePoint;
|
|
1560
|
+
this.c32_1 = transferFunctions;
|
|
1561
|
+
this.d32_1 = r;
|
|
1562
|
+
this.e32_1 = g;
|
|
1563
|
+
this.f32_1 = b;
|
|
1564
|
+
this.g32_1 = convertImpl;
|
|
1565
|
+
this.h32_1 = zeroOneComponentInfo('RGB');
|
|
1566
|
+
this.i32_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.b32_1, this.d32_1, this.e32_1, this.f32_1));
|
|
1567
|
+
this.j32_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.i32_1)));
|
|
1568
1568
|
}
|
|
1569
1569
|
protoOf(RGBColorSpaceImpl).w1 = function () {
|
|
1570
|
-
return this.
|
|
1570
|
+
return this.a32_1;
|
|
1571
1571
|
};
|
|
1572
|
-
protoOf(RGBColorSpaceImpl).
|
|
1573
|
-
return this.
|
|
1572
|
+
protoOf(RGBColorSpaceImpl).o2y = function () {
|
|
1573
|
+
return this.b32_1;
|
|
1574
1574
|
};
|
|
1575
|
-
protoOf(RGBColorSpaceImpl).
|
|
1576
|
-
return this.
|
|
1575
|
+
protoOf(RGBColorSpaceImpl).w30 = function () {
|
|
1576
|
+
return this.c32_1;
|
|
1577
1577
|
};
|
|
1578
|
-
protoOf(RGBColorSpaceImpl).
|
|
1579
|
-
return this.
|
|
1578
|
+
protoOf(RGBColorSpaceImpl).j2y = function (color) {
|
|
1579
|
+
return this.g32_1(this, color);
|
|
1580
1580
|
};
|
|
1581
|
-
protoOf(RGBColorSpaceImpl).
|
|
1582
|
-
return this.
|
|
1581
|
+
protoOf(RGBColorSpaceImpl).v31 = function () {
|
|
1582
|
+
return this.i32_1;
|
|
1583
1583
|
};
|
|
1584
|
-
protoOf(RGBColorSpaceImpl).
|
|
1585
|
-
return this.
|
|
1584
|
+
protoOf(RGBColorSpaceImpl).w31 = function () {
|
|
1585
|
+
return this.j32_1;
|
|
1586
1586
|
};
|
|
1587
1587
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1588
|
-
return this.
|
|
1588
|
+
return this.a32_1;
|
|
1589
1589
|
};
|
|
1590
|
-
protoOf(RGBColorSpaceImpl).
|
|
1590
|
+
protoOf(RGBColorSpaceImpl).n30 = function (r, g, b, alpha) {
|
|
1591
1591
|
return new RGB(r, g, b, alpha, this);
|
|
1592
1592
|
};
|
|
1593
1593
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1595,42 +1595,42 @@
|
|
|
1595
1595
|
return true;
|
|
1596
1596
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1597
1597
|
return false;
|
|
1598
|
-
if (!(this.
|
|
1598
|
+
if (!(this.a32_1 === other.w1()))
|
|
1599
1599
|
return false;
|
|
1600
|
-
if (!this.
|
|
1600
|
+
if (!this.b32_1.equals(other.o2y()))
|
|
1601
1601
|
return false;
|
|
1602
|
-
if (!equals(this.
|
|
1602
|
+
if (!equals(this.c32_1, other.w30()))
|
|
1603
1603
|
return false;
|
|
1604
1604
|
if (other instanceof RGBColorSpaceImpl) {
|
|
1605
|
-
if (!this.
|
|
1605
|
+
if (!this.d32_1.equals(other.d32_1))
|
|
1606
1606
|
return false;
|
|
1607
|
-
if (!this.
|
|
1607
|
+
if (!this.e32_1.equals(other.e32_1))
|
|
1608
1608
|
return false;
|
|
1609
|
-
if (!this.
|
|
1609
|
+
if (!this.f32_1.equals(other.f32_1))
|
|
1610
1610
|
return false;
|
|
1611
1611
|
} else {
|
|
1612
|
-
if (!contentEquals(this.
|
|
1612
|
+
if (!contentEquals(this.i32_1, other.v31()))
|
|
1613
1613
|
return false;
|
|
1614
|
-
if (!contentEquals(this.
|
|
1614
|
+
if (!contentEquals(this.j32_1, other.w31()))
|
|
1615
1615
|
return false;
|
|
1616
1616
|
}
|
|
1617
1617
|
return true;
|
|
1618
1618
|
};
|
|
1619
1619
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1620
|
-
var result = getStringHashCode(this.
|
|
1621
|
-
result = imul(31, result) + this.
|
|
1622
|
-
result = imul(31, result) + hashCode(this.
|
|
1623
|
-
result = imul(31, result) + this.
|
|
1624
|
-
result = imul(31, result) + this.
|
|
1625
|
-
result = imul(31, result) + this.
|
|
1620
|
+
var result = getStringHashCode(this.a32_1);
|
|
1621
|
+
result = imul(31, result) + this.b32_1.hashCode() | 0;
|
|
1622
|
+
result = imul(31, result) + hashCode(this.c32_1) | 0;
|
|
1623
|
+
result = imul(31, result) + this.d32_1.hashCode() | 0;
|
|
1624
|
+
result = imul(31, result) + this.e32_1.hashCode() | 0;
|
|
1625
|
+
result = imul(31, result) + this.f32_1.hashCode() | 0;
|
|
1626
1626
|
return result;
|
|
1627
1627
|
};
|
|
1628
1628
|
function SRGBTransferFunctions() {
|
|
1629
1629
|
}
|
|
1630
|
-
protoOf(SRGBTransferFunctions).
|
|
1630
|
+
protoOf(SRGBTransferFunctions).g31 = function (x) {
|
|
1631
1631
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1632
1632
|
};
|
|
1633
|
-
protoOf(SRGBTransferFunctions).
|
|
1633
|
+
protoOf(SRGBTransferFunctions).f31 = function (x) {
|
|
1634
1634
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1635
1635
|
};
|
|
1636
1636
|
var SRGBTransferFunctions_instance;
|
|
@@ -1643,18 +1643,18 @@
|
|
|
1643
1643
|
}
|
|
1644
1644
|
function ACESccTransferFunctions() {
|
|
1645
1645
|
ACESccTransferFunctions_instance = this;
|
|
1646
|
-
this.
|
|
1647
|
-
this.
|
|
1648
|
-
this.
|
|
1646
|
+
this.k32_1 = 3.0517578125E-5;
|
|
1647
|
+
this.l32_1 = 1.52587890625E-5;
|
|
1648
|
+
this.m32_1 = -0.3013698630136986;
|
|
1649
1649
|
var tmp = this;
|
|
1650
1650
|
// Inline function 'kotlin.math.log2' call
|
|
1651
|
-
tmp.
|
|
1651
|
+
tmp.n32_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1652
1652
|
}
|
|
1653
|
-
protoOf(ACESccTransferFunctions).
|
|
1653
|
+
protoOf(ACESccTransferFunctions).f31 = function (x) {
|
|
1654
1654
|
var tmp;
|
|
1655
1655
|
if (x <= -0.3013698630136986) {
|
|
1656
1656
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1657
|
-
} else if (x < this.
|
|
1657
|
+
} else if (x < this.n32_1) {
|
|
1658
1658
|
// Inline function 'kotlin.math.pow' call
|
|
1659
1659
|
var x_0 = x * 17.52 - 9.72;
|
|
1660
1660
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1663,7 +1663,7 @@
|
|
|
1663
1663
|
}
|
|
1664
1664
|
return tmp;
|
|
1665
1665
|
};
|
|
1666
|
-
protoOf(ACESccTransferFunctions).
|
|
1666
|
+
protoOf(ACESccTransferFunctions).g31 = function (x) {
|
|
1667
1667
|
var tmp;
|
|
1668
1668
|
if (x < 3.0517578125E-5) {
|
|
1669
1669
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -1683,17 +1683,17 @@
|
|
|
1683
1683
|
}
|
|
1684
1684
|
function ACEScctTransferFunctions() {
|
|
1685
1685
|
ACEScctTransferFunctions_instance = this;
|
|
1686
|
-
this.
|
|
1687
|
-
this.
|
|
1686
|
+
this.o32_1 = 10.5402377416545;
|
|
1687
|
+
this.p32_1 = 0.0729055341958355;
|
|
1688
1688
|
var tmp = this;
|
|
1689
1689
|
// Inline function 'kotlin.math.log2' call
|
|
1690
|
-
tmp.
|
|
1690
|
+
tmp.q32_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1691
1691
|
}
|
|
1692
|
-
protoOf(ACEScctTransferFunctions).
|
|
1692
|
+
protoOf(ACEScctTransferFunctions).f31 = function (x) {
|
|
1693
1693
|
var tmp;
|
|
1694
1694
|
if (x <= 0.155251141552511) {
|
|
1695
1695
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1696
|
-
} else if (x < this.
|
|
1696
|
+
} else if (x < this.q32_1) {
|
|
1697
1697
|
// Inline function 'kotlin.math.pow' call
|
|
1698
1698
|
var x_0 = x * 17.52 - 9.72;
|
|
1699
1699
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1702,7 +1702,7 @@
|
|
|
1702
1702
|
}
|
|
1703
1703
|
return tmp;
|
|
1704
1704
|
};
|
|
1705
|
-
protoOf(ACEScctTransferFunctions).
|
|
1705
|
+
protoOf(ACEScctTransferFunctions).g31 = function (x) {
|
|
1706
1706
|
var tmp;
|
|
1707
1707
|
if (x < 0.0078125) {
|
|
1708
1708
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -1720,16 +1720,16 @@
|
|
|
1720
1720
|
}
|
|
1721
1721
|
function BT2020TransferFunctions() {
|
|
1722
1722
|
BT2020TransferFunctions_instance = this;
|
|
1723
|
-
this.
|
|
1724
|
-
this.
|
|
1723
|
+
this.r32_1 = 1.0993;
|
|
1724
|
+
this.s32_1 = 0.0181;
|
|
1725
1725
|
var tmp = this;
|
|
1726
1726
|
// Inline function 'kotlin.math.pow' call
|
|
1727
|
-
tmp.
|
|
1727
|
+
tmp.t32_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
1728
1728
|
}
|
|
1729
|
-
protoOf(BT2020TransferFunctions).
|
|
1730
|
-
return numberToDouble(x < this.
|
|
1729
|
+
protoOf(BT2020TransferFunctions).f31 = function (x) {
|
|
1730
|
+
return numberToDouble(x < this.t32_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
1731
1731
|
};
|
|
1732
|
-
protoOf(BT2020TransferFunctions).
|
|
1732
|
+
protoOf(BT2020TransferFunctions).g31 = function (x) {
|
|
1733
1733
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
1734
1734
|
};
|
|
1735
1735
|
var BT2020TransferFunctions_instance;
|
|
@@ -1740,12 +1740,12 @@
|
|
|
1740
1740
|
}
|
|
1741
1741
|
function BT709TransferFunctions() {
|
|
1742
1742
|
BT709TransferFunctions_instance = this;
|
|
1743
|
-
this.
|
|
1743
|
+
this.u32_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1744
1744
|
}
|
|
1745
|
-
protoOf(BT709TransferFunctions).
|
|
1746
|
-
return numberToDouble(x < this.
|
|
1745
|
+
protoOf(BT709TransferFunctions).f31 = function (x) {
|
|
1746
|
+
return numberToDouble(x < this.u32_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1747
1747
|
};
|
|
1748
|
-
protoOf(BT709TransferFunctions).
|
|
1748
|
+
protoOf(BT709TransferFunctions).g31 = function (x) {
|
|
1749
1749
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1750
1750
|
};
|
|
1751
1751
|
var BT709TransferFunctions_instance;
|
|
@@ -1755,12 +1755,12 @@
|
|
|
1755
1755
|
return BT709TransferFunctions_instance;
|
|
1756
1756
|
}
|
|
1757
1757
|
function ROMMTransferFunctions() {
|
|
1758
|
-
this.
|
|
1758
|
+
this.v32_1 = 0.001953;
|
|
1759
1759
|
}
|
|
1760
|
-
protoOf(ROMMTransferFunctions).
|
|
1760
|
+
protoOf(ROMMTransferFunctions).f31 = function (x) {
|
|
1761
1761
|
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
1762
1762
|
};
|
|
1763
|
-
protoOf(ROMMTransferFunctions).
|
|
1763
|
+
protoOf(ROMMTransferFunctions).g31 = function (x) {
|
|
1764
1764
|
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
1765
1765
|
};
|
|
1766
1766
|
var ROMMTransferFunctions_instance;
|
|
@@ -1769,13 +1769,13 @@
|
|
|
1769
1769
|
}
|
|
1770
1770
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1771
1771
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1772
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1773
|
-
var wp = whitePoint.
|
|
1772
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.k31_1, g.k31_1, b.k31_1, r.l31_1, g.l31_1, b.l31_1, r.w32(), g.w32(), b.w32());
|
|
1773
|
+
var wp = whitePoint.j30_1;
|
|
1774
1774
|
var tmp0 = inverse(primaries);
|
|
1775
|
-
var tmp1 = wp.
|
|
1776
|
-
var tmp2 = wp.
|
|
1775
|
+
var tmp1 = wp.n31();
|
|
1776
|
+
var tmp2 = wp.m31_1;
|
|
1777
1777
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1778
|
-
var v2 = wp.
|
|
1778
|
+
var v2 = wp.o31();
|
|
1779
1779
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1780
1780
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1781
1781
|
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
@@ -1785,9 +1785,9 @@
|
|
|
1785
1785
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1786
1786
|
var tmp;
|
|
1787
1787
|
if (color instanceof RGB) {
|
|
1788
|
-
tmp = color.
|
|
1788
|
+
tmp = color.x31($this$RGBColorSpaceImpl);
|
|
1789
1789
|
} else {
|
|
1790
|
-
tmp = color.
|
|
1790
|
+
tmp = color.w2x().z31($this$RGBColorSpaceImpl);
|
|
1791
1791
|
}
|
|
1792
1792
|
return tmp;
|
|
1793
1793
|
}
|
|
@@ -1815,16 +1815,16 @@
|
|
|
1815
1815
|
}
|
|
1816
1816
|
function Companion_3() {
|
|
1817
1817
|
Companion_instance_3 = this;
|
|
1818
|
-
this.
|
|
1818
|
+
this.x32_1 = threeComponentInfo('R', 0.0, 255.0, 'G', 0.0, 255.0, 'B', 0.0, 255.0);
|
|
1819
1819
|
}
|
|
1820
1820
|
protoOf(Companion_3).w1 = function () {
|
|
1821
1821
|
return 'RGBInt';
|
|
1822
1822
|
};
|
|
1823
|
-
protoOf(Companion_3).
|
|
1824
|
-
return color.
|
|
1823
|
+
protoOf(Companion_3).y32 = function (color) {
|
|
1824
|
+
return color.p2x().q2z();
|
|
1825
1825
|
};
|
|
1826
|
-
protoOf(Companion_3).
|
|
1827
|
-
return new RGBInt(this.
|
|
1826
|
+
protoOf(Companion_3).j2y = function (color) {
|
|
1827
|
+
return new RGBInt(this.y32(color));
|
|
1828
1828
|
};
|
|
1829
1829
|
var Companion_instance_3;
|
|
1830
1830
|
function Companion_getInstance_3() {
|
|
@@ -1956,7 +1956,7 @@
|
|
|
1956
1956
|
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
1957
1957
|
}
|
|
1958
1958
|
function RGBInt__toSRGB_impl_m0acyy($this) {
|
|
1959
|
-
return Companion_getInstance_2().
|
|
1959
|
+
return Companion_getInstance_2().n30(_RGBInt___get_redFloat__impl__lnt6cx($this), _RGBInt___get_greenFloat__impl__opq1mn($this), _RGBInt___get_blueFloat__impl__jt6mw2($this), _RGBInt___get_alpha__impl__yl2tay($this));
|
|
1960
1960
|
}
|
|
1961
1961
|
function RGBInt__toArray_impl_73rlu9($this) {
|
|
1962
1962
|
// Inline function 'kotlin.UByte.toFloat' call
|
|
@@ -1995,59 +1995,59 @@
|
|
|
1995
1995
|
function RGBInt__equals_impl_qmmpmc($this, other) {
|
|
1996
1996
|
if (!(other instanceof RGBInt))
|
|
1997
1997
|
return false;
|
|
1998
|
-
if (!($this === (other instanceof RGBInt ? other.
|
|
1998
|
+
if (!($this === (other instanceof RGBInt ? other.y31_1 : THROW_CCE())))
|
|
1999
1999
|
return false;
|
|
2000
2000
|
return true;
|
|
2001
2001
|
}
|
|
2002
2002
|
function RGBInt(argb) {
|
|
2003
2003
|
Companion_getInstance_3();
|
|
2004
|
-
this.
|
|
2004
|
+
this.y31_1 = argb;
|
|
2005
2005
|
}
|
|
2006
|
-
protoOf(RGBInt).
|
|
2007
|
-
return _RGBInt___get_alpha__impl__yl2tay(this.
|
|
2006
|
+
protoOf(RGBInt).n2x = function () {
|
|
2007
|
+
return _RGBInt___get_alpha__impl__yl2tay(this.y31_1);
|
|
2008
2008
|
};
|
|
2009
|
-
protoOf(RGBInt).
|
|
2010
|
-
return _RGBInt___get_space__impl__emgnsy(this.
|
|
2009
|
+
protoOf(RGBInt).o2x = function () {
|
|
2010
|
+
return _RGBInt___get_space__impl__emgnsy(this.y31_1);
|
|
2011
2011
|
};
|
|
2012
|
-
protoOf(RGBInt).
|
|
2013
|
-
return RGBInt__toSRGB_impl_m0acyy(this.
|
|
2012
|
+
protoOf(RGBInt).p2x = function () {
|
|
2013
|
+
return RGBInt__toSRGB_impl_m0acyy(this.y31_1);
|
|
2014
2014
|
};
|
|
2015
2015
|
protoOf(RGBInt).a5 = function () {
|
|
2016
|
-
return RGBInt__toArray_impl_73rlu9(this.
|
|
2016
|
+
return RGBInt__toArray_impl_73rlu9(this.y31_1);
|
|
2017
2017
|
};
|
|
2018
2018
|
protoOf(RGBInt).toString = function () {
|
|
2019
|
-
return RGBInt__toString_impl_cf5r29(this.
|
|
2019
|
+
return RGBInt__toString_impl_cf5r29(this.y31_1);
|
|
2020
2020
|
};
|
|
2021
2021
|
protoOf(RGBInt).hashCode = function () {
|
|
2022
|
-
return RGBInt__hashCode_impl_y6bnv4(this.
|
|
2022
|
+
return RGBInt__hashCode_impl_y6bnv4(this.y31_1);
|
|
2023
2023
|
};
|
|
2024
2024
|
protoOf(RGBInt).equals = function (other) {
|
|
2025
|
-
return RGBInt__equals_impl_qmmpmc(this.
|
|
2025
|
+
return RGBInt__equals_impl_qmmpmc(this.y31_1, other);
|
|
2026
2026
|
};
|
|
2027
2027
|
function Companion_4() {
|
|
2028
2028
|
Companion_instance_4 = this;
|
|
2029
|
-
this.
|
|
2029
|
+
this.z32_1 = XYZColorSpaces_getInstance().p2y_1;
|
|
2030
2030
|
}
|
|
2031
2031
|
protoOf(Companion_4).hashCode = function () {
|
|
2032
|
-
return hashCode(XYZColorSpaces_getInstance().
|
|
2032
|
+
return hashCode(XYZColorSpaces_getInstance().p2y_1);
|
|
2033
2033
|
};
|
|
2034
2034
|
protoOf(Companion_4).equals = function (other) {
|
|
2035
|
-
return equals(XYZColorSpaces_getInstance().
|
|
2035
|
+
return equals(XYZColorSpaces_getInstance().p2y_1, other);
|
|
2036
2036
|
};
|
|
2037
|
-
protoOf(Companion_4).
|
|
2038
|
-
return this.
|
|
2037
|
+
protoOf(Companion_4).n30 = function (x, y, z, alpha) {
|
|
2038
|
+
return this.z32_1.n30(x, y, z, alpha);
|
|
2039
2039
|
};
|
|
2040
|
-
protoOf(Companion_4).
|
|
2041
|
-
return this.
|
|
2040
|
+
protoOf(Companion_4).i31 = function (x, y, z, alpha) {
|
|
2041
|
+
return this.z32_1.i31(x, y, z, alpha);
|
|
2042
2042
|
};
|
|
2043
|
-
protoOf(Companion_4).
|
|
2044
|
-
return this.
|
|
2043
|
+
protoOf(Companion_4).o2y = function () {
|
|
2044
|
+
return this.z32_1.o2y();
|
|
2045
2045
|
};
|
|
2046
2046
|
protoOf(Companion_4).w1 = function () {
|
|
2047
|
-
return this.
|
|
2047
|
+
return this.z32_1.w1();
|
|
2048
2048
|
};
|
|
2049
|
-
protoOf(Companion_4).
|
|
2050
|
-
return this.
|
|
2049
|
+
protoOf(Companion_4).j2y = function (color) {
|
|
2050
|
+
return this.z32_1.j2y(color);
|
|
2051
2051
|
};
|
|
2052
2052
|
var Companion_instance_4;
|
|
2053
2053
|
function Companion_getInstance_4() {
|
|
@@ -2056,17 +2056,17 @@
|
|
|
2056
2056
|
return Companion_instance_4;
|
|
2057
2057
|
}
|
|
2058
2058
|
function adaptToM($this, space, m, mi) {
|
|
2059
|
-
if (space.
|
|
2059
|
+
if (space.o2y().equals($this.c2y_1.o2y()))
|
|
2060
2060
|
return $this;
|
|
2061
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
2062
|
-
var tmp1 = $this.
|
|
2063
|
-
var tmp2 = $this.
|
|
2061
|
+
var transform = chromaticAdaptationMatrix(space, $this.c2y_1.o2y().j30_1, m, mi);
|
|
2062
|
+
var tmp1 = $this.y2x_1;
|
|
2063
|
+
var tmp2 = $this.z2x_1;
|
|
2064
2064
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2065
|
-
var v2 = $this.
|
|
2065
|
+
var v2 = $this.a2y_1;
|
|
2066
2066
|
var tmp4 = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
2067
2067
|
var tmp5 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
2068
2068
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
2069
|
-
return space.
|
|
2069
|
+
return space.n30(tmp4, tmp5, zz, $this.b2y_1);
|
|
2070
2070
|
}
|
|
2071
2071
|
function toLAB$f(t) {
|
|
2072
2072
|
var tmp;
|
|
@@ -2080,71 +2080,71 @@
|
|
|
2080
2080
|
}
|
|
2081
2081
|
function XYZ(x, y, z, alpha, space) {
|
|
2082
2082
|
Companion_getInstance_4();
|
|
2083
|
-
this.
|
|
2084
|
-
this.
|
|
2085
|
-
this.
|
|
2086
|
-
this.
|
|
2087
|
-
this.
|
|
2083
|
+
this.y2x_1 = x;
|
|
2084
|
+
this.z2x_1 = y;
|
|
2085
|
+
this.a2y_1 = z;
|
|
2086
|
+
this.b2y_1 = alpha;
|
|
2087
|
+
this.c2y_1 = space;
|
|
2088
2088
|
}
|
|
2089
|
-
protoOf(XYZ).
|
|
2090
|
-
return this.
|
|
2089
|
+
protoOf(XYZ).n2x = function () {
|
|
2090
|
+
return this.b2y_1;
|
|
2091
2091
|
};
|
|
2092
|
-
protoOf(XYZ).
|
|
2093
|
-
return this.
|
|
2092
|
+
protoOf(XYZ).o2x = function () {
|
|
2093
|
+
return this.c2y_1;
|
|
2094
2094
|
};
|
|
2095
|
-
protoOf(XYZ).
|
|
2095
|
+
protoOf(XYZ).r2y = function (space) {
|
|
2096
2096
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
2097
2097
|
};
|
|
2098
|
-
protoOf(XYZ).
|
|
2099
|
-
var _destruct__k2r9zo = this.
|
|
2098
|
+
protoOf(XYZ).z31 = function (space) {
|
|
2099
|
+
var _destruct__k2r9zo = this.r2y(XYZColorSpace_0(space.o2y()));
|
|
2100
2100
|
var x = _destruct__k2r9zo.me();
|
|
2101
2101
|
var y = _destruct__k2r9zo.ne();
|
|
2102
|
-
var z = _destruct__k2r9zo.
|
|
2103
|
-
var f = space.
|
|
2102
|
+
var z = _destruct__k2r9zo.a33();
|
|
2103
|
+
var f = space.w30();
|
|
2104
2104
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2105
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
2105
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.w31());
|
|
2106
2106
|
var tmp4 = 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;
|
|
2107
2107
|
var tmp5 = 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;
|
|
2108
2108
|
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;
|
|
2109
|
-
return space.
|
|
2109
|
+
return space.n30(f.g31(tmp4), f.g31(tmp5), f.g31(b), this.b2y_1);
|
|
2110
2110
|
};
|
|
2111
|
-
protoOf(XYZ).
|
|
2112
|
-
return this.
|
|
2111
|
+
protoOf(XYZ).p2x = function () {
|
|
2112
|
+
return this.z31(RGBColorSpaces_getInstance().e2z_1);
|
|
2113
2113
|
};
|
|
2114
|
-
protoOf(XYZ).
|
|
2115
|
-
var fx = toLAB$f(this.
|
|
2116
|
-
var fy = toLAB$f(this.
|
|
2117
|
-
var fz = toLAB$f(this.
|
|
2114
|
+
protoOf(XYZ).x2x = function () {
|
|
2115
|
+
var fx = toLAB$f(this.y2x_1 / this.c2y_1.o2y().j30_1.n31());
|
|
2116
|
+
var fy = toLAB$f(this.z2x_1 / this.c2y_1.o2y().j30_1.m31_1);
|
|
2117
|
+
var fz = toLAB$f(this.a2y_1 / this.c2y_1.o2y().j30_1.o31());
|
|
2118
2118
|
var l = 116 * fy - 16;
|
|
2119
2119
|
var a = 500 * (fx - fy);
|
|
2120
2120
|
var b = 200 * (fy - fz);
|
|
2121
|
-
return LABColorSpace_0(this.
|
|
2121
|
+
return LABColorSpace_0(this.c2y_1.o2y()).i31(l, a, b, this.b2y_1);
|
|
2122
2122
|
};
|
|
2123
|
-
protoOf(XYZ).
|
|
2123
|
+
protoOf(XYZ).w2x = function () {
|
|
2124
2124
|
return this;
|
|
2125
2125
|
};
|
|
2126
2126
|
protoOf(XYZ).a5 = function () {
|
|
2127
2127
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2128
|
-
return new Float32Array([this.
|
|
2128
|
+
return new Float32Array([this.y2x_1, this.z2x_1, this.a2y_1, this.b2y_1]);
|
|
2129
2129
|
};
|
|
2130
2130
|
protoOf(XYZ).me = function () {
|
|
2131
|
-
return this.
|
|
2131
|
+
return this.y2x_1;
|
|
2132
2132
|
};
|
|
2133
2133
|
protoOf(XYZ).ne = function () {
|
|
2134
|
-
return this.
|
|
2134
|
+
return this.z2x_1;
|
|
2135
2135
|
};
|
|
2136
|
-
protoOf(XYZ).
|
|
2137
|
-
return this.
|
|
2136
|
+
protoOf(XYZ).a33 = function () {
|
|
2137
|
+
return this.a2y_1;
|
|
2138
2138
|
};
|
|
2139
2139
|
protoOf(XYZ).toString = function () {
|
|
2140
|
-
return 'XYZ(x=' + this.
|
|
2140
|
+
return 'XYZ(x=' + this.y2x_1 + ', y=' + this.z2x_1 + ', z=' + this.a2y_1 + ', alpha=' + this.b2y_1 + ', space=' + toString(this.c2y_1) + ')';
|
|
2141
2141
|
};
|
|
2142
2142
|
protoOf(XYZ).hashCode = function () {
|
|
2143
|
-
var result = getNumberHashCode(this.
|
|
2144
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2145
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2146
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2147
|
-
result = imul(result, 31) + hashCode(this.
|
|
2143
|
+
var result = getNumberHashCode(this.y2x_1);
|
|
2144
|
+
result = imul(result, 31) + getNumberHashCode(this.z2x_1) | 0;
|
|
2145
|
+
result = imul(result, 31) + getNumberHashCode(this.a2y_1) | 0;
|
|
2146
|
+
result = imul(result, 31) + getNumberHashCode(this.b2y_1) | 0;
|
|
2147
|
+
result = imul(result, 31) + hashCode(this.c2y_1) | 0;
|
|
2148
2148
|
return result;
|
|
2149
2149
|
};
|
|
2150
2150
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -2153,27 +2153,27 @@
|
|
|
2153
2153
|
if (!(other instanceof XYZ))
|
|
2154
2154
|
return false;
|
|
2155
2155
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
2156
|
-
if (!equals(this.
|
|
2156
|
+
if (!equals(this.y2x_1, tmp0_other_with_cast.y2x_1))
|
|
2157
2157
|
return false;
|
|
2158
|
-
if (!equals(this.
|
|
2158
|
+
if (!equals(this.z2x_1, tmp0_other_with_cast.z2x_1))
|
|
2159
2159
|
return false;
|
|
2160
|
-
if (!equals(this.
|
|
2160
|
+
if (!equals(this.a2y_1, tmp0_other_with_cast.a2y_1))
|
|
2161
2161
|
return false;
|
|
2162
|
-
if (!equals(this.
|
|
2162
|
+
if (!equals(this.b2y_1, tmp0_other_with_cast.b2y_1))
|
|
2163
2163
|
return false;
|
|
2164
|
-
if (!equals(this.
|
|
2164
|
+
if (!equals(this.c2y_1, tmp0_other_with_cast.c2y_1))
|
|
2165
2165
|
return false;
|
|
2166
2166
|
return true;
|
|
2167
2167
|
};
|
|
2168
2168
|
function XYZColorSpace() {
|
|
2169
2169
|
}
|
|
2170
2170
|
function XYZColorSpace_0(whitePoint) {
|
|
2171
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
2171
|
+
return whitePoint.equals(Illuminant_getInstance().x2y_1) ? XYZColorSpaces_getInstance().p2y_1 : whitePoint.equals(Illuminant_getInstance().v2y_1) ? XYZColorSpaces_getInstance().q2y_1 : new XYZColorSpaceImpl(whitePoint);
|
|
2172
2172
|
}
|
|
2173
2173
|
function XYZColorSpaces() {
|
|
2174
2174
|
XYZColorSpaces_instance = this;
|
|
2175
|
-
this.
|
|
2176
|
-
this.
|
|
2175
|
+
this.p2y_1 = new XYZColorSpaceImpl(Illuminant_getInstance().x2y_1);
|
|
2176
|
+
this.q2y_1 = new XYZColorSpaceImpl(Illuminant_getInstance().v2y_1);
|
|
2177
2177
|
}
|
|
2178
2178
|
var XYZColorSpaces_instance;
|
|
2179
2179
|
function XYZColorSpaces_getInstance() {
|
|
@@ -2184,37 +2184,37 @@
|
|
|
2184
2184
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
2185
2185
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
2186
2186
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
2187
|
-
var dstWp = _this__u8e3s4.
|
|
2188
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
2189
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
2187
|
+
var dstWp = _this__u8e3s4.o2y().j30_1;
|
|
2188
|
+
var src = dot_0(xyzToLms, srcWp.n31(), srcWp.m31_1, srcWp.o31());
|
|
2189
|
+
var dst = dot_0(xyzToLms, dstWp.n31(), dstWp.m31_1, dstWp.o31());
|
|
2190
2190
|
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);
|
|
2191
2191
|
}
|
|
2192
2192
|
function XYZColorSpaceImpl(whitePoint) {
|
|
2193
|
-
this.
|
|
2194
|
-
this.
|
|
2193
|
+
this.b33_1 = whitePoint;
|
|
2194
|
+
this.c33_1 = zeroOneComponentInfo('XYZ');
|
|
2195
2195
|
}
|
|
2196
|
-
protoOf(XYZColorSpaceImpl).
|
|
2197
|
-
return this.
|
|
2196
|
+
protoOf(XYZColorSpaceImpl).o2y = function () {
|
|
2197
|
+
return this.b33_1;
|
|
2198
2198
|
};
|
|
2199
2199
|
protoOf(XYZColorSpaceImpl).w1 = function () {
|
|
2200
2200
|
return 'XYZ';
|
|
2201
2201
|
};
|
|
2202
|
-
protoOf(XYZColorSpaceImpl).
|
|
2203
|
-
return color.
|
|
2202
|
+
protoOf(XYZColorSpaceImpl).j2y = function (color) {
|
|
2203
|
+
return color.w2x().r2y(this);
|
|
2204
2204
|
};
|
|
2205
2205
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
2206
|
-
return 'XYZColorSpace(' + this.
|
|
2206
|
+
return 'XYZColorSpace(' + this.b33_1.toString() + ')';
|
|
2207
2207
|
};
|
|
2208
|
-
protoOf(XYZColorSpaceImpl).
|
|
2208
|
+
protoOf(XYZColorSpaceImpl).n30 = function (x, y, z, alpha) {
|
|
2209
2209
|
return new XYZ(x, y, z, alpha, this);
|
|
2210
2210
|
};
|
|
2211
2211
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
2212
|
-
return this.
|
|
2212
|
+
return this.b33_1.hashCode();
|
|
2213
2213
|
};
|
|
2214
2214
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
2215
2215
|
var tmp;
|
|
2216
2216
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
2217
|
-
tmp = this.
|
|
2217
|
+
tmp = this.b33_1.equals(other.o2y());
|
|
2218
2218
|
} else {
|
|
2219
2219
|
tmp = false;
|
|
2220
2220
|
}
|
|
@@ -2230,26 +2230,26 @@
|
|
|
2230
2230
|
}
|
|
2231
2231
|
function xyY(x, y, Y) {
|
|
2232
2232
|
Y = Y === VOID ? 1.0 : Y;
|
|
2233
|
-
this.
|
|
2234
|
-
this.
|
|
2235
|
-
this.
|
|
2233
|
+
this.k31_1 = x;
|
|
2234
|
+
this.l31_1 = y;
|
|
2235
|
+
this.m31_1 = Y;
|
|
2236
2236
|
}
|
|
2237
|
-
protoOf(xyY).
|
|
2238
|
-
return 1 - this.
|
|
2237
|
+
protoOf(xyY).w32 = function () {
|
|
2238
|
+
return 1 - this.k31_1 - this.l31_1;
|
|
2239
2239
|
};
|
|
2240
|
-
protoOf(xyY).
|
|
2241
|
-
return this.
|
|
2240
|
+
protoOf(xyY).n31 = function () {
|
|
2241
|
+
return this.k31_1 * this.m31_1 / this.l31_1;
|
|
2242
2242
|
};
|
|
2243
|
-
protoOf(xyY).
|
|
2244
|
-
return (1 - this.
|
|
2243
|
+
protoOf(xyY).o31 = function () {
|
|
2244
|
+
return (1 - this.k31_1 - this.l31_1) * this.m31_1 / this.l31_1;
|
|
2245
2245
|
};
|
|
2246
2246
|
protoOf(xyY).toString = function () {
|
|
2247
|
-
return 'xyY(x=' + this.
|
|
2247
|
+
return 'xyY(x=' + this.k31_1 + ', y=' + this.l31_1 + ', Y=' + this.m31_1 + ')';
|
|
2248
2248
|
};
|
|
2249
2249
|
protoOf(xyY).hashCode = function () {
|
|
2250
|
-
var result = getNumberHashCode(this.
|
|
2251
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2252
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2250
|
+
var result = getNumberHashCode(this.k31_1);
|
|
2251
|
+
result = imul(result, 31) + getNumberHashCode(this.l31_1) | 0;
|
|
2252
|
+
result = imul(result, 31) + getNumberHashCode(this.m31_1) | 0;
|
|
2253
2253
|
return result;
|
|
2254
2254
|
};
|
|
2255
2255
|
protoOf(xyY).equals = function (other) {
|
|
@@ -2258,33 +2258,33 @@
|
|
|
2258
2258
|
if (!(other instanceof xyY))
|
|
2259
2259
|
return false;
|
|
2260
2260
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
2261
|
-
if (!equals(this.
|
|
2261
|
+
if (!equals(this.k31_1, tmp0_other_with_cast.k31_1))
|
|
2262
2262
|
return false;
|
|
2263
|
-
if (!equals(this.
|
|
2263
|
+
if (!equals(this.l31_1, tmp0_other_with_cast.l31_1))
|
|
2264
2264
|
return false;
|
|
2265
|
-
if (!equals(this.
|
|
2265
|
+
if (!equals(this.m31_1, tmp0_other_with_cast.m31_1))
|
|
2266
2266
|
return false;
|
|
2267
2267
|
return true;
|
|
2268
2268
|
};
|
|
2269
2269
|
//region block: post-declaration
|
|
2270
|
-
protoOf(HSL).
|
|
2271
|
-
protoOf(HSL).
|
|
2272
|
-
protoOf(HSL).
|
|
2273
|
-
protoOf(LAB).
|
|
2274
|
-
protoOf(LABColorSpaceImpl).
|
|
2275
|
-
protoOf(LCHab).
|
|
2276
|
-
protoOf(RGB).
|
|
2277
|
-
protoOf(RGB).
|
|
2278
|
-
protoOf(RGBColorSpaceImpl).
|
|
2279
|
-
protoOf(RGBInt).
|
|
2280
|
-
protoOf(RGBInt).
|
|
2281
|
-
protoOf(RGBInt).
|
|
2282
|
-
protoOf(RGBInt).
|
|
2283
|
-
protoOf(Companion_4).
|
|
2284
|
-
protoOf(XYZ).
|
|
2285
|
-
protoOf(XYZ).
|
|
2286
|
-
protoOf(XYZColorSpaceImpl).
|
|
2287
|
-
protoOf(XYZColorSpaceImpl).
|
|
2270
|
+
protoOf(HSL).w2x = toXYZ;
|
|
2271
|
+
protoOf(HSL).x2x = toLAB;
|
|
2272
|
+
protoOf(HSL).d2y = toLCHab;
|
|
2273
|
+
protoOf(LAB).q2x = toHSL;
|
|
2274
|
+
protoOf(LABColorSpaceImpl).i31 = invoke;
|
|
2275
|
+
protoOf(LCHab).q2x = toHSL;
|
|
2276
|
+
protoOf(RGB).x2x = toLAB;
|
|
2277
|
+
protoOf(RGB).d2y = toLCHab;
|
|
2278
|
+
protoOf(RGBColorSpaceImpl).i31 = invoke_0;
|
|
2279
|
+
protoOf(RGBInt).q2x = toHSL;
|
|
2280
|
+
protoOf(RGBInt).w2x = toXYZ;
|
|
2281
|
+
protoOf(RGBInt).x2x = toLAB;
|
|
2282
|
+
protoOf(RGBInt).d2y = toLCHab;
|
|
2283
|
+
protoOf(Companion_4).j31 = invoke$default;
|
|
2284
|
+
protoOf(XYZ).q2x = toHSL;
|
|
2285
|
+
protoOf(XYZ).d2y = toLCHab;
|
|
2286
|
+
protoOf(XYZColorSpaceImpl).i31 = invoke_1;
|
|
2287
|
+
protoOf(XYZColorSpaceImpl).j31 = invoke$default;
|
|
2288
2288
|
//endregion
|
|
2289
2289
|
//region block: init
|
|
2290
2290
|
PqNonlinearity_instance = new PqNonlinearity();
|