@chainpatrol/sdk 1.7.0 → 1.8.0
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/CHANGELOG.md +22 -0
- package/dist/api/index.d.mts +33 -1
- package/dist/api/index.d.ts +33 -1
- package/dist/api/index.js +6 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +6 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/index.js +119 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -70
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1255,17 +1255,17 @@ var PolyDateFormatter = class {
|
|
|
1255
1255
|
constructor(dt, intl, opts) {
|
|
1256
1256
|
this.opts = opts;
|
|
1257
1257
|
this.originalZone = void 0;
|
|
1258
|
-
let
|
|
1258
|
+
let z55 = void 0;
|
|
1259
1259
|
if (this.opts.timeZone) {
|
|
1260
1260
|
this.dt = dt;
|
|
1261
1261
|
} else if (dt.zone.type === "fixed") {
|
|
1262
1262
|
const gmtOffset = -1 * (dt.offset / 60);
|
|
1263
1263
|
const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
|
|
1264
1264
|
if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
|
|
1265
|
-
|
|
1265
|
+
z55 = offsetZ;
|
|
1266
1266
|
this.dt = dt;
|
|
1267
1267
|
} else {
|
|
1268
|
-
|
|
1268
|
+
z55 = "UTC";
|
|
1269
1269
|
this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1270
1270
|
this.originalZone = dt.zone;
|
|
1271
1271
|
}
|
|
@@ -1273,14 +1273,14 @@ var PolyDateFormatter = class {
|
|
|
1273
1273
|
this.dt = dt;
|
|
1274
1274
|
} else if (dt.zone.type === "iana") {
|
|
1275
1275
|
this.dt = dt;
|
|
1276
|
-
|
|
1276
|
+
z55 = dt.zone.name;
|
|
1277
1277
|
} else {
|
|
1278
|
-
|
|
1278
|
+
z55 = "UTC";
|
|
1279
1279
|
this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1280
1280
|
this.originalZone = dt.zone;
|
|
1281
1281
|
}
|
|
1282
1282
|
const intlOpts = __spreadValues({}, this.opts);
|
|
1283
|
-
intlOpts.timeZone = intlOpts.timeZone ||
|
|
1283
|
+
intlOpts.timeZone = intlOpts.timeZone || z55;
|
|
1284
1284
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
1285
1285
|
}
|
|
1286
1286
|
format() {
|
|
@@ -11500,6 +11500,55 @@ z.object({
|
|
|
11500
11500
|
"Median time from takedown start to completion, one entry per asset type, ascending by median"
|
|
11501
11501
|
)
|
|
11502
11502
|
});
|
|
11503
|
+
z.object({
|
|
11504
|
+
slug: z.string().min(1).describe("Organization slug"),
|
|
11505
|
+
months: z.number().int().min(2).max(36).default(12).describe("Size of the trailing window in whole months, including the current month"),
|
|
11506
|
+
assetTypes: z.array(z.nativeEnum(AssetType)).max(5).optional().describe(
|
|
11507
|
+
"Break the trend down by these asset types, one series each. Omit for a single series pooled across every asset type"
|
|
11508
|
+
),
|
|
11509
|
+
blockLabel: z.string().optional().describe(
|
|
11510
|
+
'Only include assets blocked with this review label, e.g. "Brand Impersonation", "Employee Impersonation" or "Targeting Org Users"'
|
|
11511
|
+
),
|
|
11512
|
+
brandType: z.nativeEnum(BrandType).optional().describe("Only include assets belonging to brands of this type"),
|
|
11513
|
+
countryCodes: z.array(z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries"),
|
|
11514
|
+
brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands")
|
|
11515
|
+
});
|
|
11516
|
+
var MetricsTakedownTimeTrendPointSchema = z.object({
|
|
11517
|
+
period: z.string().describe("Month the takedowns completed in, as a yyyy-MM key"),
|
|
11518
|
+
medianTakedownMinutes: z.number().nullable().describe("Null when no takedowns completed in this month"),
|
|
11519
|
+
medianTakedownHours: z.number().nullable(),
|
|
11520
|
+
medianTakedownDays: z.number().nullable(),
|
|
11521
|
+
count: z.number().describe("Number of completed takedowns behind the median")
|
|
11522
|
+
});
|
|
11523
|
+
var MetricsTakedownTimeTrendChangeSchema = z.object({
|
|
11524
|
+
latest: MetricsTakedownTimeTrendPointSchema.nullable().describe(
|
|
11525
|
+
"Most recent month in the window that had completed takedowns"
|
|
11526
|
+
),
|
|
11527
|
+
previous: MetricsTakedownTimeTrendPointSchema.nullable().describe(
|
|
11528
|
+
"Month with completed takedowns immediately before `latest`, skipping empty months"
|
|
11529
|
+
),
|
|
11530
|
+
percentChange: z.number().nullable().describe(
|
|
11531
|
+
"Change in the median from `previous` to `latest`, as a percentage. Negative means takedowns got faster. Null when there is no comparable earlier month"
|
|
11532
|
+
),
|
|
11533
|
+
direction: z.enum(["improved", "worsened", "unchanged"]).nullable().describe("Sign of `percentChange`, read as lower-is-better. Null when it is null")
|
|
11534
|
+
});
|
|
11535
|
+
z.object({
|
|
11536
|
+
months: z.number().describe("Size of the trailing window that was used"),
|
|
11537
|
+
periods: z.array(z.string()).describe("Every yyyy-MM key in the window, oldest first"),
|
|
11538
|
+
series: z.array(
|
|
11539
|
+
z.object({
|
|
11540
|
+
assetType: z.nativeEnum(AssetType).nullable().describe("Null for the series pooled across every asset type"),
|
|
11541
|
+
points: z.array(MetricsTakedownTimeTrendPointSchema).describe(
|
|
11542
|
+
"One point per month in the window, oldest first. Months with no completed takedowns carry a null median"
|
|
11543
|
+
),
|
|
11544
|
+
change: MetricsTakedownTimeTrendChangeSchema.describe(
|
|
11545
|
+
"Month-over-month comparison for this series"
|
|
11546
|
+
)
|
|
11547
|
+
})
|
|
11548
|
+
).describe(
|
|
11549
|
+
"One series per requested asset type, in the order requested, or a single pooled series when no asset types were given"
|
|
11550
|
+
)
|
|
11551
|
+
});
|
|
11503
11552
|
z.object({
|
|
11504
11553
|
slug: z.string().optional().describe(
|
|
11505
11554
|
"Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
|
|
@@ -13339,20 +13388,20 @@ var convertA98ToXyz65_default = convertA98ToXyz65;
|
|
|
13339
13388
|
|
|
13340
13389
|
// ../../node_modules/culori/src/a98/convertXyz65ToA98.js
|
|
13341
13390
|
var gamma = (v) => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);
|
|
13342
|
-
var convertXyz65ToA98 = ({ x, y, z:
|
|
13391
|
+
var convertXyz65ToA98 = ({ x, y, z: z55, alpha }) => {
|
|
13343
13392
|
if (x === void 0) x = 0;
|
|
13344
13393
|
if (y === void 0) y = 0;
|
|
13345
|
-
if (
|
|
13394
|
+
if (z55 === void 0) z55 = 0;
|
|
13346
13395
|
let res = {
|
|
13347
13396
|
mode: "a98",
|
|
13348
13397
|
r: gamma(
|
|
13349
|
-
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 *
|
|
13398
|
+
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 * z55
|
|
13350
13399
|
),
|
|
13351
13400
|
g: gamma(
|
|
13352
|
-
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 *
|
|
13401
|
+
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 * z55
|
|
13353
13402
|
),
|
|
13354
13403
|
b: gamma(
|
|
13355
|
-
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 *
|
|
13404
|
+
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 * z55
|
|
13356
13405
|
)
|
|
13357
13406
|
};
|
|
13358
13407
|
if (alpha !== void 0) {
|
|
@@ -13419,14 +13468,14 @@ var convertLrgbToRgb = ({ r, g, b, alpha }, mode = "rgb") => {
|
|
|
13419
13468
|
var convertLrgbToRgb_default = convertLrgbToRgb;
|
|
13420
13469
|
|
|
13421
13470
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToRgb.js
|
|
13422
|
-
var convertXyz65ToRgb = ({ x, y, z:
|
|
13471
|
+
var convertXyz65ToRgb = ({ x, y, z: z55, alpha }) => {
|
|
13423
13472
|
if (x === void 0) x = 0;
|
|
13424
13473
|
if (y === void 0) y = 0;
|
|
13425
|
-
if (
|
|
13474
|
+
if (z55 === void 0) z55 = 0;
|
|
13426
13475
|
let res = convertLrgbToRgb_default({
|
|
13427
|
-
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 *
|
|
13428
|
-
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 *
|
|
13429
|
-
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 *
|
|
13476
|
+
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 * z55,
|
|
13477
|
+
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 * z55,
|
|
13478
|
+
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 * z55
|
|
13430
13479
|
});
|
|
13431
13480
|
if (alpha !== void 0) {
|
|
13432
13481
|
res.alpha = alpha;
|
|
@@ -13676,13 +13725,13 @@ var convertLab65ToRgb_default = convertLab65ToRgb;
|
|
|
13676
13725
|
|
|
13677
13726
|
// ../../node_modules/culori/src/lab65/convertXyz65ToLab65.js
|
|
13678
13727
|
var f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
|
|
13679
|
-
var convertXyz65ToLab65 = ({ x, y, z:
|
|
13728
|
+
var convertXyz65ToLab65 = ({ x, y, z: z55, alpha }) => {
|
|
13680
13729
|
if (x === void 0) x = 0;
|
|
13681
13730
|
if (y === void 0) y = 0;
|
|
13682
|
-
if (
|
|
13731
|
+
if (z55 === void 0) z55 = 0;
|
|
13683
13732
|
let f0 = f(x / D65.X);
|
|
13684
13733
|
let f1 = f(y / D65.Y);
|
|
13685
|
-
let f22 = f(
|
|
13734
|
+
let f22 = f(z55 / D65.Z);
|
|
13686
13735
|
let res = {
|
|
13687
13736
|
mode: "lab65",
|
|
13688
13737
|
l: 116 * f1 - 16,
|
|
@@ -14339,10 +14388,10 @@ var convertItpToXyz65_default = convertItpToXyz65;
|
|
|
14339
14388
|
|
|
14340
14389
|
// ../../node_modules/culori/src/itp/convertXyz65ToItp.js
|
|
14341
14390
|
var toAbs = (c2 = 0) => Math.max(c2 * YW, 0);
|
|
14342
|
-
var convertXyz65ToItp = ({ x, y, z:
|
|
14391
|
+
var convertXyz65ToItp = ({ x, y, z: z55, alpha }) => {
|
|
14343
14392
|
const absX = toAbs(x);
|
|
14344
14393
|
const absY = toAbs(y);
|
|
14345
|
-
const absZ = toAbs(
|
|
14394
|
+
const absZ = toAbs(z55);
|
|
14346
14395
|
const l2 = transferPqEncode(
|
|
14347
14396
|
0.3592832590121217 * absX + 0.6976051147779502 * absY - 0.0358915932320289 * absZ
|
|
14348
14397
|
);
|
|
@@ -14400,15 +14449,15 @@ var jabPqEncode = (v) => {
|
|
|
14400
14449
|
return Math.pow((C1 + C2 * vn3) / (1 + C3 * vn3), p);
|
|
14401
14450
|
};
|
|
14402
14451
|
var abs = (v = 0) => Math.max(v * 203, 0);
|
|
14403
|
-
var convertXyz65ToJab = ({ x, y, z:
|
|
14452
|
+
var convertXyz65ToJab = ({ x, y, z: z55, alpha }) => {
|
|
14404
14453
|
x = abs(x);
|
|
14405
14454
|
y = abs(y);
|
|
14406
|
-
|
|
14407
|
-
let xp = 1.15 * x - 0.15 *
|
|
14455
|
+
z55 = abs(z55);
|
|
14456
|
+
let xp = 1.15 * x - 0.15 * z55;
|
|
14408
14457
|
let yp = 0.66 * y + 0.34 * x;
|
|
14409
|
-
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 *
|
|
14410
|
-
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 *
|
|
14411
|
-
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 *
|
|
14458
|
+
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z55);
|
|
14459
|
+
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z55);
|
|
14460
|
+
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z55);
|
|
14412
14461
|
let i = (l2 + m) / 2;
|
|
14413
14462
|
let res = {
|
|
14414
14463
|
mode: "jab",
|
|
@@ -14594,14 +14643,14 @@ var convertLabToXyz50 = ({ l: l2, a, b, alpha }) => {
|
|
|
14594
14643
|
var convertLabToXyz50_default = convertLabToXyz50;
|
|
14595
14644
|
|
|
14596
14645
|
// ../../node_modules/culori/src/xyz50/convertXyz50ToRgb.js
|
|
14597
|
-
var convertXyz50ToRgb = ({ x, y, z:
|
|
14646
|
+
var convertXyz50ToRgb = ({ x, y, z: z55, alpha }) => {
|
|
14598
14647
|
if (x === void 0) x = 0;
|
|
14599
14648
|
if (y === void 0) y = 0;
|
|
14600
|
-
if (
|
|
14649
|
+
if (z55 === void 0) z55 = 0;
|
|
14601
14650
|
let res = convertLrgbToRgb_default({
|
|
14602
|
-
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 *
|
|
14603
|
-
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 *
|
|
14604
|
-
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 *
|
|
14651
|
+
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 * z55,
|
|
14652
|
+
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 * z55,
|
|
14653
|
+
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 * z55
|
|
14605
14654
|
});
|
|
14606
14655
|
if (alpha !== void 0) {
|
|
14607
14656
|
res.alpha = alpha;
|
|
@@ -14632,13 +14681,13 @@ var convertRgbToXyz50_default = convertRgbToXyz50;
|
|
|
14632
14681
|
|
|
14633
14682
|
// ../../node_modules/culori/src/lab/convertXyz50ToLab.js
|
|
14634
14683
|
var f2 = (value) => value > e3 ? Math.cbrt(value) : (k3 * value + 16) / 116;
|
|
14635
|
-
var convertXyz50ToLab = ({ x, y, z:
|
|
14684
|
+
var convertXyz50ToLab = ({ x, y, z: z55, alpha }) => {
|
|
14636
14685
|
if (x === void 0) x = 0;
|
|
14637
14686
|
if (y === void 0) y = 0;
|
|
14638
|
-
if (
|
|
14687
|
+
if (z55 === void 0) z55 = 0;
|
|
14639
14688
|
let f0 = f2(x / D50.X);
|
|
14640
14689
|
let f1 = f2(y / D50.Y);
|
|
14641
|
-
let f22 = f2(
|
|
14690
|
+
let f22 = f2(z55 / D50.Z);
|
|
14642
14691
|
let res = {
|
|
14643
14692
|
mode: "lab",
|
|
14644
14693
|
l: 116 * f1 - 16,
|
|
@@ -14873,18 +14922,18 @@ var convertLchuvToLuv = ({ l: l2, c: c2, h, alpha }) => {
|
|
|
14873
14922
|
var convertLchuvToLuv_default = convertLchuvToLuv;
|
|
14874
14923
|
|
|
14875
14924
|
// ../../node_modules/culori/src/luv/convertXyz50ToLuv.js
|
|
14876
|
-
var u_fn = (x, y,
|
|
14877
|
-
var v_fn = (x, y,
|
|
14925
|
+
var u_fn = (x, y, z55) => 4 * x / (x + 15 * y + 3 * z55);
|
|
14926
|
+
var v_fn = (x, y, z55) => 9 * y / (x + 15 * y + 3 * z55);
|
|
14878
14927
|
var un = u_fn(D50.X, D50.Y, D50.Z);
|
|
14879
14928
|
var vn = v_fn(D50.X, D50.Y, D50.Z);
|
|
14880
14929
|
var l_fn = (value) => value <= e3 ? k3 * value : 116 * Math.cbrt(value) - 16;
|
|
14881
|
-
var convertXyz50ToLuv = ({ x, y, z:
|
|
14930
|
+
var convertXyz50ToLuv = ({ x, y, z: z55, alpha }) => {
|
|
14882
14931
|
if (x === void 0) x = 0;
|
|
14883
14932
|
if (y === void 0) y = 0;
|
|
14884
|
-
if (
|
|
14933
|
+
if (z55 === void 0) z55 = 0;
|
|
14885
14934
|
let l2 = l_fn(y / D50.Y);
|
|
14886
|
-
let u = u_fn(x, y,
|
|
14887
|
-
let v = v_fn(x, y,
|
|
14935
|
+
let u = u_fn(x, y, z55);
|
|
14936
|
+
let v = v_fn(x, y, z55);
|
|
14888
14937
|
if (!isFinite(u) || !isFinite(v)) {
|
|
14889
14938
|
l2 = u = v = 0;
|
|
14890
14939
|
} else {
|
|
@@ -14905,8 +14954,8 @@ var convertXyz50ToLuv = ({ x, y, z: z54, alpha }) => {
|
|
|
14905
14954
|
var convertXyz50ToLuv_default = convertXyz50ToLuv;
|
|
14906
14955
|
|
|
14907
14956
|
// ../../node_modules/culori/src/luv/convertLuvToXyz50.js
|
|
14908
|
-
var u_fn2 = (x, y,
|
|
14909
|
-
var v_fn2 = (x, y,
|
|
14957
|
+
var u_fn2 = (x, y, z55) => 4 * x / (x + 15 * y + 3 * z55);
|
|
14958
|
+
var v_fn2 = (x, y, z55) => 9 * y / (x + 15 * y + 3 * z55);
|
|
14910
14959
|
var un2 = u_fn2(D50.X, D50.Y, D50.Z);
|
|
14911
14960
|
var vn2 = v_fn2(D50.X, D50.Y, D50.Z);
|
|
14912
14961
|
var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
@@ -14920,8 +14969,8 @@ var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
|
14920
14969
|
let vp = v / (13 * l2) + vn2;
|
|
14921
14970
|
let y = D50.Y * (l2 <= 8 ? l2 / k3 : Math.pow((l2 + 16) / 116, 3));
|
|
14922
14971
|
let x = y * (9 * up) / (4 * vp);
|
|
14923
|
-
let
|
|
14924
|
-
let res = { mode: "xyz50", x, y, z:
|
|
14972
|
+
let z55 = y * (12 - 3 * up - 20 * vp) / (4 * vp);
|
|
14973
|
+
let res = { mode: "xyz50", x, y, z: z55 };
|
|
14925
14974
|
if (alpha !== void 0) {
|
|
14926
14975
|
res.alpha = alpha;
|
|
14927
14976
|
}
|
|
@@ -15538,15 +15587,15 @@ var convertP3ToXyz65 = (rgb2) => {
|
|
|
15538
15587
|
var convertP3ToXyz65_default = convertP3ToXyz65;
|
|
15539
15588
|
|
|
15540
15589
|
// ../../node_modules/culori/src/p3/convertXyz65ToP3.js
|
|
15541
|
-
var convertXyz65ToP3 = ({ x, y, z:
|
|
15590
|
+
var convertXyz65ToP3 = ({ x, y, z: z55, alpha }) => {
|
|
15542
15591
|
if (x === void 0) x = 0;
|
|
15543
15592
|
if (y === void 0) y = 0;
|
|
15544
|
-
if (
|
|
15593
|
+
if (z55 === void 0) z55 = 0;
|
|
15545
15594
|
let res = convertLrgbToRgb_default(
|
|
15546
15595
|
{
|
|
15547
|
-
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 *
|
|
15548
|
-
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 *
|
|
15549
|
-
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 *
|
|
15596
|
+
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 * z55,
|
|
15597
|
+
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 * z55,
|
|
15598
|
+
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 * z55
|
|
15550
15599
|
},
|
|
15551
15600
|
"p3"
|
|
15552
15601
|
);
|
|
@@ -15581,19 +15630,19 @@ var gamma2 = (v) => {
|
|
|
15581
15630
|
}
|
|
15582
15631
|
return 16 * v;
|
|
15583
15632
|
};
|
|
15584
|
-
var convertXyz50ToProphoto = ({ x, y, z:
|
|
15633
|
+
var convertXyz50ToProphoto = ({ x, y, z: z55, alpha }) => {
|
|
15585
15634
|
if (x === void 0) x = 0;
|
|
15586
15635
|
if (y === void 0) y = 0;
|
|
15587
|
-
if (
|
|
15636
|
+
if (z55 === void 0) z55 = 0;
|
|
15588
15637
|
let res = {
|
|
15589
15638
|
mode: "prophoto",
|
|
15590
15639
|
r: gamma2(
|
|
15591
|
-
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 *
|
|
15640
|
+
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 * z55
|
|
15592
15641
|
),
|
|
15593
15642
|
g: gamma2(
|
|
15594
|
-
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 *
|
|
15643
|
+
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 * z55
|
|
15595
15644
|
),
|
|
15596
|
-
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 *
|
|
15645
|
+
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 * z55)
|
|
15597
15646
|
};
|
|
15598
15647
|
if (alpha !== void 0) {
|
|
15599
15648
|
res.alpha = alpha;
|
|
@@ -15653,20 +15702,20 @@ var gamma3 = (v) => {
|
|
|
15653
15702
|
}
|
|
15654
15703
|
return 4.5 * v;
|
|
15655
15704
|
};
|
|
15656
|
-
var convertXyz65ToRec2020 = ({ x, y, z:
|
|
15705
|
+
var convertXyz65ToRec2020 = ({ x, y, z: z55, alpha }) => {
|
|
15657
15706
|
if (x === void 0) x = 0;
|
|
15658
15707
|
if (y === void 0) y = 0;
|
|
15659
|
-
if (
|
|
15708
|
+
if (z55 === void 0) z55 = 0;
|
|
15660
15709
|
let res = {
|
|
15661
15710
|
mode: "rec2020",
|
|
15662
15711
|
r: gamma3(
|
|
15663
|
-
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 *
|
|
15712
|
+
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 * z55
|
|
15664
15713
|
),
|
|
15665
15714
|
g: gamma3(
|
|
15666
|
-
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 *
|
|
15715
|
+
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 * z55
|
|
15667
15716
|
),
|
|
15668
15717
|
b: gamma3(
|
|
15669
|
-
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 *
|
|
15718
|
+
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 * z55
|
|
15670
15719
|
)
|
|
15671
15720
|
};
|
|
15672
15721
|
if (alpha !== void 0) {
|
|
@@ -15819,15 +15868,15 @@ var definition_default26 = definition26;
|
|
|
15819
15868
|
|
|
15820
15869
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
|
|
15821
15870
|
var convertXyz65ToXyz50 = (xyz652) => {
|
|
15822
|
-
let { x, y, z:
|
|
15871
|
+
let { x, y, z: z55, alpha } = xyz652;
|
|
15823
15872
|
if (x === void 0) x = 0;
|
|
15824
15873
|
if (y === void 0) y = 0;
|
|
15825
|
-
if (
|
|
15874
|
+
if (z55 === void 0) z55 = 0;
|
|
15826
15875
|
let res = {
|
|
15827
15876
|
mode: "xyz50",
|
|
15828
|
-
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 *
|
|
15829
|
-
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 *
|
|
15830
|
-
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 *
|
|
15877
|
+
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 * z55,
|
|
15878
|
+
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 * z55,
|
|
15879
|
+
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 * z55
|
|
15831
15880
|
};
|
|
15832
15881
|
if (alpha !== void 0) {
|
|
15833
15882
|
res.alpha = alpha;
|
|
@@ -15838,15 +15887,15 @@ var convertXyz65ToXyz50_default = convertXyz65ToXyz50;
|
|
|
15838
15887
|
|
|
15839
15888
|
// ../../node_modules/culori/src/xyz65/convertXyz50ToXyz65.js
|
|
15840
15889
|
var convertXyz50ToXyz65 = (xyz502) => {
|
|
15841
|
-
let { x, y, z:
|
|
15890
|
+
let { x, y, z: z55, alpha } = xyz502;
|
|
15842
15891
|
if (x === void 0) x = 0;
|
|
15843
15892
|
if (y === void 0) y = 0;
|
|
15844
|
-
if (
|
|
15893
|
+
if (z55 === void 0) z55 = 0;
|
|
15845
15894
|
let res = {
|
|
15846
15895
|
mode: "xyz65",
|
|
15847
|
-
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 *
|
|
15848
|
-
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 *
|
|
15849
|
-
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 *
|
|
15896
|
+
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 * z55,
|
|
15897
|
+
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 * z55,
|
|
15898
|
+
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 * z55
|
|
15850
15899
|
};
|
|
15851
15900
|
if (alpha !== void 0) {
|
|
15852
15901
|
res.alpha = alpha;
|