@chainpatrol/sdk 1.9.0 → 1.10.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 +8 -0
- package/dist/api/index.d.mts +47 -2
- package/dist/api/index.d.ts +47 -2
- package/dist/api/index.js +24 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +24 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/{chunk-O5IZ7M5X.mjs → chunk-ENBUZJ7E.mjs} +9 -5
- package/dist/chunk-ENBUZJ7E.mjs.map +1 -0
- package/dist/index.js +279 -111
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +279 -111
- package/dist/index.mjs.map +1 -1
- package/dist/skill/cli.js +7 -3
- package/dist/skill/cli.js.map +1 -1
- package/dist/skill/cli.mjs +1 -1
- package/dist/skill/index.js +7 -3
- package/dist/skill/index.js.map +1 -1
- package/dist/skill/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-O5IZ7M5X.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -543,45 +543,6 @@ z.object({
|
|
|
543
543
|
name: z.string().optional().describe("Asset name"),
|
|
544
544
|
description: z.string().nullish().optional().describe("Asset description")
|
|
545
545
|
});
|
|
546
|
-
z.object({
|
|
547
|
-
slug: z.string(),
|
|
548
|
-
assetId: z.number(),
|
|
549
|
-
name: z.string().optional(),
|
|
550
|
-
description: z.string().optional(),
|
|
551
|
-
assetGroupId: z.number().nullable().optional(),
|
|
552
|
-
updatedByOrganizationId: z.number().optional()
|
|
553
|
-
});
|
|
554
|
-
z.object({
|
|
555
|
-
content: z.string().min(1, { message: "Content must be at least 3 character" }).max(1e3, { message: "Content must be less than 1000 characters" }),
|
|
556
|
-
email: z.string().email(),
|
|
557
|
-
description: z.string().optional().default("")
|
|
558
|
-
});
|
|
559
|
-
z.object({
|
|
560
|
-
/** Canonicalization algorithm version the client computed its prefixes with. */
|
|
561
|
-
algoVersion: z.number().int().positive(),
|
|
562
|
-
/** 4-byte (8-hex-char) prefixes that hit the client's local index. */
|
|
563
|
-
prefixes: z.array(z.string().regex(/^[0-9a-f]{8}$/)).min(1).max(200)
|
|
564
|
-
}).describe("Blocklist confirm request");
|
|
565
|
-
z.object({
|
|
566
|
-
/** Full 64-char SHA-256 hashes of blocked expressions, grouped by prefix. */
|
|
567
|
-
fullHashes: z.record(z.string(), z.array(z.string()))
|
|
568
|
-
}).describe("Blocklist confirm response");
|
|
569
|
-
z.void().describe("Blocklist version request");
|
|
570
|
-
z.object({
|
|
571
|
-
/** Canonicalization algorithm version the artifacts + confirm are built with. */
|
|
572
|
-
algoVersion: z.number().int().positive(),
|
|
573
|
-
snapshot: z.object({
|
|
574
|
-
token: z.string(),
|
|
575
|
-
url: z.string().url(),
|
|
576
|
-
prefixBytes: z.number().int().positive(),
|
|
577
|
-
count: z.number().int().nonnegative()
|
|
578
|
-
}),
|
|
579
|
-
recent: z.object({
|
|
580
|
-
token: z.string(),
|
|
581
|
-
url: z.string().url(),
|
|
582
|
-
windowSeconds: z.number().int().positive()
|
|
583
|
-
})
|
|
584
|
-
}).describe("Blocklist version response");
|
|
585
546
|
|
|
586
547
|
// ../../node_modules/luxon/src/errors.js
|
|
587
548
|
var LuxonError = class extends Error {
|
|
@@ -1255,17 +1216,17 @@ var PolyDateFormatter = class {
|
|
|
1255
1216
|
constructor(dt, intl, opts) {
|
|
1256
1217
|
this.opts = opts;
|
|
1257
1218
|
this.originalZone = void 0;
|
|
1258
|
-
let
|
|
1219
|
+
let z61 = void 0;
|
|
1259
1220
|
if (this.opts.timeZone) {
|
|
1260
1221
|
this.dt = dt;
|
|
1261
1222
|
} else if (dt.zone.type === "fixed") {
|
|
1262
1223
|
const gmtOffset = -1 * (dt.offset / 60);
|
|
1263
1224
|
const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
|
|
1264
1225
|
if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
|
|
1265
|
-
|
|
1226
|
+
z61 = offsetZ;
|
|
1266
1227
|
this.dt = dt;
|
|
1267
1228
|
} else {
|
|
1268
|
-
|
|
1229
|
+
z61 = "UTC";
|
|
1269
1230
|
this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1270
1231
|
this.originalZone = dt.zone;
|
|
1271
1232
|
}
|
|
@@ -1273,14 +1234,14 @@ var PolyDateFormatter = class {
|
|
|
1273
1234
|
this.dt = dt;
|
|
1274
1235
|
} else if (dt.zone.type === "iana") {
|
|
1275
1236
|
this.dt = dt;
|
|
1276
|
-
|
|
1237
|
+
z61 = dt.zone.name;
|
|
1277
1238
|
} else {
|
|
1278
|
-
|
|
1239
|
+
z61 = "UTC";
|
|
1279
1240
|
this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1280
1241
|
this.originalZone = dt.zone;
|
|
1281
1242
|
}
|
|
1282
1243
|
const intlOpts = __spreadValues({}, this.opts);
|
|
1283
|
-
intlOpts.timeZone = intlOpts.timeZone ||
|
|
1244
|
+
intlOpts.timeZone = intlOpts.timeZone || z61;
|
|
1284
1245
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
1285
1246
|
}
|
|
1286
1247
|
format() {
|
|
@@ -6996,6 +6957,63 @@ function friendlyDateTime(dateTimeish) {
|
|
|
6996
6957
|
);
|
|
6997
6958
|
}
|
|
6998
6959
|
}
|
|
6960
|
+
var MAX_ASSET_NOTE_LENGTH = 5e3;
|
|
6961
|
+
var assetNoteBodySchema = z.string().trim().min(1, "Note is required").max(MAX_ASSET_NOTE_LENGTH, `Note must be at most ${MAX_ASSET_NOTE_LENGTH} characters`);
|
|
6962
|
+
var assetNoteTimelineAtSchema = z.coerce.date().refine((value) => value.getTime() <= DateTime.now().toUTC().toMillis(), {
|
|
6963
|
+
message: "Timeline date cannot be in the future"
|
|
6964
|
+
});
|
|
6965
|
+
z.object({
|
|
6966
|
+
assetId: z.number().int().positive(),
|
|
6967
|
+
note: assetNoteBodySchema,
|
|
6968
|
+
timelineAt: assetNoteTimelineAtSchema.optional()
|
|
6969
|
+
});
|
|
6970
|
+
z.object({
|
|
6971
|
+
noteId: z.number().int().positive(),
|
|
6972
|
+
note: assetNoteBodySchema,
|
|
6973
|
+
timelineAt: assetNoteTimelineAtSchema.nullish()
|
|
6974
|
+
});
|
|
6975
|
+
z.object({
|
|
6976
|
+
noteId: z.number().int().positive()
|
|
6977
|
+
});
|
|
6978
|
+
z.object({
|
|
6979
|
+
slug: z.string(),
|
|
6980
|
+
assetId: z.number(),
|
|
6981
|
+
name: z.string().optional(),
|
|
6982
|
+
description: z.string().optional(),
|
|
6983
|
+
assetGroupId: z.number().nullable().optional(),
|
|
6984
|
+
updatedByOrganizationId: z.number().optional()
|
|
6985
|
+
});
|
|
6986
|
+
z.object({
|
|
6987
|
+
content: z.string().min(1, { message: "Content must be at least 3 character" }).max(1e3, { message: "Content must be less than 1000 characters" }),
|
|
6988
|
+
email: z.string().email(),
|
|
6989
|
+
description: z.string().optional().default("")
|
|
6990
|
+
});
|
|
6991
|
+
z.object({
|
|
6992
|
+
/** Canonicalization algorithm version the client computed its prefixes with. */
|
|
6993
|
+
algoVersion: z.number().int().positive(),
|
|
6994
|
+
/** 4-byte (8-hex-char) prefixes that hit the client's local index. */
|
|
6995
|
+
prefixes: z.array(z.string().regex(/^[0-9a-f]{8}$/)).min(1).max(200)
|
|
6996
|
+
}).describe("Blocklist confirm request");
|
|
6997
|
+
z.object({
|
|
6998
|
+
/** Full 64-char SHA-256 hashes of blocked expressions, grouped by prefix. */
|
|
6999
|
+
fullHashes: z.record(z.string(), z.array(z.string()))
|
|
7000
|
+
}).describe("Blocklist confirm response");
|
|
7001
|
+
z.void().describe("Blocklist version request");
|
|
7002
|
+
z.object({
|
|
7003
|
+
/** Canonicalization algorithm version the artifacts + confirm are built with. */
|
|
7004
|
+
algoVersion: z.number().int().positive(),
|
|
7005
|
+
snapshot: z.object({
|
|
7006
|
+
token: z.string(),
|
|
7007
|
+
url: z.string().url(),
|
|
7008
|
+
prefixBytes: z.number().int().positive(),
|
|
7009
|
+
count: z.number().int().nonnegative()
|
|
7010
|
+
}),
|
|
7011
|
+
recent: z.object({
|
|
7012
|
+
token: z.string(),
|
|
7013
|
+
url: z.string().url(),
|
|
7014
|
+
windowSeconds: z.number().int().positive()
|
|
7015
|
+
})
|
|
7016
|
+
}).describe("Blocklist version response");
|
|
6999
7017
|
|
|
7000
7018
|
// ../../internal/database/src/generated/prisma/enums.ts
|
|
7001
7019
|
var BrandType = {
|
|
@@ -11516,6 +11534,39 @@ var utcDateSchema2 = (endOfDay) => z.preprocess((value) => {
|
|
|
11516
11534
|
}
|
|
11517
11535
|
return endOfDay && DATE_ONLY_PATTERN2.test(value) ? parsed.endOf("day").toJSDate() : parsed.toJSDate();
|
|
11518
11536
|
}, z.coerce.date());
|
|
11537
|
+
|
|
11538
|
+
// ../../internal/validation/src/public/metrics/takedown-success-rate.ts
|
|
11539
|
+
z.object({
|
|
11540
|
+
slug: z.string().min(1).describe("Organization slug"),
|
|
11541
|
+
startDate: utcDateSchema2(false).optional().describe(
|
|
11542
|
+
"Only include takedowns first submitted to a provider on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11543
|
+
),
|
|
11544
|
+
endDate: utcDateSchema2(true).optional().describe(
|
|
11545
|
+
"Only include takedowns first submitted to a provider on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11546
|
+
),
|
|
11547
|
+
blockLabel: z.string().optional().describe(
|
|
11548
|
+
'Only include assets blocked with this review label, e.g. "Brand Impersonation", "Employee Impersonation" or "Targeting Org Users"'
|
|
11549
|
+
),
|
|
11550
|
+
brandType: z.nativeEnum(BrandType).optional().describe("Only include assets belonging to brands of this type"),
|
|
11551
|
+
countryCodes: z.array(z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries"),
|
|
11552
|
+
brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands")
|
|
11553
|
+
});
|
|
11554
|
+
z.object({
|
|
11555
|
+
byAssetType: z.array(
|
|
11556
|
+
z.object({
|
|
11557
|
+
assetType: z.nativeEnum(AssetType).describe("Asset type the takedowns were filed against"),
|
|
11558
|
+
submitted: z.number().describe("Takedowns whose first submission to a provider fell in the range"),
|
|
11559
|
+
completed: z.number().describe("Of those, how many ended in a takedown"),
|
|
11560
|
+
stillOpen: z.number().describe("Of those, how many have not yet reached an outcome"),
|
|
11561
|
+
successRate: z.number().describe("completed / submitted, 0-1. Still-open takedowns count against it"),
|
|
11562
|
+
resolvedSuccessRate: z.number().nullable().describe(
|
|
11563
|
+
"completed / (submitted - stillOpen), 0-1, or null when nothing has resolved yet. Higher than successRate whenever work is still outstanding"
|
|
11564
|
+
)
|
|
11565
|
+
})
|
|
11566
|
+
).describe(
|
|
11567
|
+
"Takedown success rate, one entry per asset type, descending by number submitted"
|
|
11568
|
+
)
|
|
11569
|
+
});
|
|
11519
11570
|
z.object({
|
|
11520
11571
|
slug: z.string().min(1).describe("Organization slug"),
|
|
11521
11572
|
startDate: utcDateSchema2(false).optional().describe(
|
|
@@ -11544,6 +11595,46 @@ z.object({
|
|
|
11544
11595
|
"Median time from takedown start to completion, one entry per asset type, ascending by median"
|
|
11545
11596
|
)
|
|
11546
11597
|
});
|
|
11598
|
+
var TakedownProviderRoleSchema = z.enum([
|
|
11599
|
+
"HOSTING_PROVIDER",
|
|
11600
|
+
"DOMAIN_REGISTRAR",
|
|
11601
|
+
"TLD_REGISTRAR"
|
|
11602
|
+
]);
|
|
11603
|
+
z.object({
|
|
11604
|
+
slug: z.string().min(1).describe("Organization slug"),
|
|
11605
|
+
startDate: utcDateSchema2(false).optional().describe(
|
|
11606
|
+
"Only include takedowns completed on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11607
|
+
),
|
|
11608
|
+
endDate: utcDateSchema2(true).optional().describe(
|
|
11609
|
+
"Only include takedowns completed on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11610
|
+
),
|
|
11611
|
+
roles: z.array(TakedownProviderRoleSchema).optional().describe(
|
|
11612
|
+
"Only break down these provider roles. Omit for every role. A takedown filed against both a host and a registrar is counted once under each"
|
|
11613
|
+
),
|
|
11614
|
+
blockLabel: z.string().optional().describe(
|
|
11615
|
+
'Only include assets blocked with this review label, e.g. "Brand Impersonation", "Employee Impersonation" or "Targeting Org Users"'
|
|
11616
|
+
),
|
|
11617
|
+
brandType: z.nativeEnum(BrandType).optional().describe("Only include assets belonging to brands of this type"),
|
|
11618
|
+
countryCodes: z.array(z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries"),
|
|
11619
|
+
brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands")
|
|
11620
|
+
});
|
|
11621
|
+
z.object({
|
|
11622
|
+
byProvider: z.array(
|
|
11623
|
+
z.object({
|
|
11624
|
+
providerId: z.number().describe("Takedown provider id"),
|
|
11625
|
+
providerName: z.string().describe("Takedown provider name"),
|
|
11626
|
+
role: TakedownProviderRoleSchema.describe(
|
|
11627
|
+
"Which provider slot of the takedown this median is computed over"
|
|
11628
|
+
),
|
|
11629
|
+
medianTakedownMinutes: z.number(),
|
|
11630
|
+
medianTakedownHours: z.number(),
|
|
11631
|
+
medianTakedownDays: z.number(),
|
|
11632
|
+
count: z.number().describe("Number of completed takedowns behind the median")
|
|
11633
|
+
})
|
|
11634
|
+
).describe(
|
|
11635
|
+
"Median time from takedown start to completion, one entry per provider and role, ascending by median"
|
|
11636
|
+
)
|
|
11637
|
+
});
|
|
11547
11638
|
z.object({
|
|
11548
11639
|
slug: z.string().min(1).describe("Organization slug"),
|
|
11549
11640
|
months: z.number().int().min(2).max(36).default(12).describe("Size of the trailing window in whole months, including the current month"),
|
|
@@ -11799,6 +11890,13 @@ z.object({
|
|
|
11799
11890
|
brands: z.array(brandItemSchema).describe("List of brands")
|
|
11800
11891
|
}).describe("Successful operation");
|
|
11801
11892
|
var FILTERABLE_SUBSCRIPTION_STATUSES = [
|
|
11893
|
+
SubscriptionStatus.PROSPECT,
|
|
11894
|
+
SubscriptionStatus.POC,
|
|
11895
|
+
SubscriptionStatus.ACTIVE,
|
|
11896
|
+
SubscriptionStatus.INTEGRATION,
|
|
11897
|
+
SubscriptionStatus.INACTIVE
|
|
11898
|
+
];
|
|
11899
|
+
[
|
|
11802
11900
|
SubscriptionStatus.PROSPECT,
|
|
11803
11901
|
SubscriptionStatus.POC,
|
|
11804
11902
|
SubscriptionStatus.ACTIVE,
|
|
@@ -11833,7 +11931,9 @@ var userOrgsPendingServiceApprovalFilterSchema = z.object({
|
|
|
11833
11931
|
}).optional();
|
|
11834
11932
|
z.object({
|
|
11835
11933
|
query: z.string().default(""),
|
|
11836
|
-
subscriptionStatus: z.array(UserOrgsSubscriptionStatusSchema).min(1).optional()
|
|
11934
|
+
subscriptionStatus: z.array(UserOrgsSubscriptionStatusSchema).min(1).optional().describe(
|
|
11935
|
+
"Statuses to include. Defaults to the live set (PROSPECT/POC/ACTIVE/INTEGRATION); pass INACTIVE explicitly to see churned organizations."
|
|
11936
|
+
),
|
|
11837
11937
|
services: userOrgsServicesFilterObjectSchema.optional(),
|
|
11838
11938
|
obligatoryAdminApproval: userOrgsObligatoryAdminApprovalFilterSchema,
|
|
11839
11939
|
pendingServiceApproval: userOrgsPendingServiceApprovalFilterSchema
|
|
@@ -12014,7 +12114,7 @@ z.object({
|
|
|
12014
12114
|
"Shortcut for 'every org the caller is authorized to read'. Reuses the same filter logic as `/user/orgs`: org-scoped API keys are rejected (they're pinned to one org \u2014 use the default form); user API keys / Bearer sessions resolve to the user's memberships (or every active org for staff). Combine with `subscriptionStatus` and `services` to narrow (e.g. only paying customers with takedowns enabled). The resolved org set is still capped at " + String(ORGANIZATION_METRICS_MAX_SLUGS) + " and a 413 is returned if exceeded. Mutually exclusive with `organizationSlug`, `slugs`, and `brandSlug`."
|
|
12015
12115
|
),
|
|
12016
12116
|
subscriptionStatus: z.array(UserOrgsSubscriptionStatusSchema).min(1).optional().describe(
|
|
12017
|
-
"Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/POC/PROSPECT/INTEGRATION
|
|
12117
|
+
"Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/POC/PROSPECT/INTEGRATION); pass INACTIVE explicitly to include churned organizations."
|
|
12018
12118
|
),
|
|
12019
12119
|
services: organizationMetricsServicesFilterSchema.describe(
|
|
12020
12120
|
"Only meaningful with `allMyOrgs: true`. Same shape as `/user/orgs`'s `services` filter \u2014 every service accepts `{ active }`, and **only `takedowns` additionally accepts `automated`** (the one service where manual-vs-automated changes real platform behavior). E.g. `{ takedowns: { active: true, automated: false } }` for 'orgs with takedowns enabled but automation off'."
|
|
@@ -12671,6 +12771,74 @@ z.object({
|
|
|
12671
12771
|
hiddenMetrics: z.record(z.string(), z.boolean()).default({}),
|
|
12672
12772
|
overriddenMetrics: z.record(z.string(), z.boolean()).default({})
|
|
12673
12773
|
});
|
|
12774
|
+
var ONE_PAGER_BUDGETS = {
|
|
12775
|
+
headline: 60,
|
|
12776
|
+
badge: 28,
|
|
12777
|
+
frontLabel: 44,
|
|
12778
|
+
paragraph: 480,
|
|
12779
|
+
paragraphsMax: 2,
|
|
12780
|
+
heroPhrase: 80,
|
|
12781
|
+
heroNarrative: 300,
|
|
12782
|
+
divergenceLine: 220,
|
|
12783
|
+
xp01Line: 220
|
|
12784
|
+
};
|
|
12785
|
+
var onePagerFactPayloadSchema = z.object({
|
|
12786
|
+
/** Raw (not defanged) asset contents the prose may reference. */
|
|
12787
|
+
assetContents: z.array(z.string()),
|
|
12788
|
+
/** Every numeric token (as string) the prose is allowed to contain. */
|
|
12789
|
+
numbers: z.array(z.string()),
|
|
12790
|
+
/** ISO dates the prose may reference. */
|
|
12791
|
+
dates: z.array(z.string()),
|
|
12792
|
+
platforms: z.array(z.string()),
|
|
12793
|
+
groupSize: z.number(),
|
|
12794
|
+
takedownCompletedAt: z.string().nullable(),
|
|
12795
|
+
activeSince: z.string().nullable()
|
|
12796
|
+
});
|
|
12797
|
+
var onePagerStorySchema = z.object({
|
|
12798
|
+
archetypeId: z.string(),
|
|
12799
|
+
archetypeCategory: z.string(),
|
|
12800
|
+
/** 1-5 = placed on the page; null = alternate available for swap. */
|
|
12801
|
+
slot: z.number().int().min(1).max(5).nullable(),
|
|
12802
|
+
frontLabel: z.string().max(ONE_PAGER_BUDGETS.frontLabel),
|
|
12803
|
+
headline: z.string().max(ONE_PAGER_BUDGETS.headline),
|
|
12804
|
+
badge: z.string().max(ONE_PAGER_BUDGETS.badge),
|
|
12805
|
+
paragraphs: z.array(z.string().max(ONE_PAGER_BUDGETS.paragraph)).min(1).max(ONE_PAGER_BUDGETS.paragraphsMax),
|
|
12806
|
+
/** Defanged, display-ready asset identifiers. */
|
|
12807
|
+
assetList: z.array(z.string()).max(10),
|
|
12808
|
+
screenshotUrls: z.array(z.string()),
|
|
12809
|
+
selectedScreenshotUrls: z.array(z.string()).max(2),
|
|
12810
|
+
xp01Line: z.string().max(ONE_PAGER_BUDGETS.xp01Line).nullable(),
|
|
12811
|
+
factPayload: onePagerFactPayloadSchema,
|
|
12812
|
+
proseSource: z.enum(["llm", "template"])
|
|
12813
|
+
});
|
|
12814
|
+
var onePagerLandscapeRowSchema = z.object({
|
|
12815
|
+
platform: z.string(),
|
|
12816
|
+
count: z.number(),
|
|
12817
|
+
sharePct: z.number()
|
|
12818
|
+
});
|
|
12819
|
+
var onePagerFormDataObjectSchema = z.object({
|
|
12820
|
+
orgName: z.string(),
|
|
12821
|
+
orgSlug: z.string(),
|
|
12822
|
+
periodLabel: z.string(),
|
|
12823
|
+
heroStat: z.object({
|
|
12824
|
+
value: z.string(),
|
|
12825
|
+
phrase: z.string().max(ONE_PAGER_BUDGETS.heroPhrase)
|
|
12826
|
+
}),
|
|
12827
|
+
heroNarrative: z.string().max(ONE_PAGER_BUDGETS.heroNarrative),
|
|
12828
|
+
metricsRows: z.array(z.object({ label: z.string(), value: z.string() })).length(4),
|
|
12829
|
+
landscape: z.object({
|
|
12830
|
+
rows: z.array(onePagerLandscapeRowSchema).max(8),
|
|
12831
|
+
otherCount: z.number().nullable(),
|
|
12832
|
+
otherPlatformsLabel: z.string().nullable(),
|
|
12833
|
+
divergenceLine: z.string().max(ONE_PAGER_BUDGETS.divergenceLine).nullable()
|
|
12834
|
+
}),
|
|
12835
|
+
stories: z.array(onePagerStorySchema).min(1).max(6),
|
|
12836
|
+
footer: z.object({ contactName: z.string(), contactLine: z.string() })
|
|
12837
|
+
});
|
|
12838
|
+
onePagerFormDataObjectSchema.refine(
|
|
12839
|
+
(data) => data.stories.some((s2) => s2.slot !== null),
|
|
12840
|
+
{ message: "at least one story must be placed", path: ["stories"] }
|
|
12841
|
+
);
|
|
12674
12842
|
z.object({
|
|
12675
12843
|
x: z.number().min(0).max(1),
|
|
12676
12844
|
y: z.number().min(0).max(1),
|
|
@@ -13436,20 +13604,20 @@ var convertA98ToXyz65_default = convertA98ToXyz65;
|
|
|
13436
13604
|
|
|
13437
13605
|
// ../../node_modules/culori/src/a98/convertXyz65ToA98.js
|
|
13438
13606
|
var gamma = (v) => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);
|
|
13439
|
-
var convertXyz65ToA98 = ({ x, y, z:
|
|
13607
|
+
var convertXyz65ToA98 = ({ x, y, z: z61, alpha }) => {
|
|
13440
13608
|
if (x === void 0) x = 0;
|
|
13441
13609
|
if (y === void 0) y = 0;
|
|
13442
|
-
if (
|
|
13610
|
+
if (z61 === void 0) z61 = 0;
|
|
13443
13611
|
let res = {
|
|
13444
13612
|
mode: "a98",
|
|
13445
13613
|
r: gamma(
|
|
13446
|
-
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 *
|
|
13614
|
+
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 * z61
|
|
13447
13615
|
),
|
|
13448
13616
|
g: gamma(
|
|
13449
|
-
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 *
|
|
13617
|
+
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 * z61
|
|
13450
13618
|
),
|
|
13451
13619
|
b: gamma(
|
|
13452
|
-
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 *
|
|
13620
|
+
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 * z61
|
|
13453
13621
|
)
|
|
13454
13622
|
};
|
|
13455
13623
|
if (alpha !== void 0) {
|
|
@@ -13516,14 +13684,14 @@ var convertLrgbToRgb = ({ r, g, b, alpha }, mode = "rgb") => {
|
|
|
13516
13684
|
var convertLrgbToRgb_default = convertLrgbToRgb;
|
|
13517
13685
|
|
|
13518
13686
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToRgb.js
|
|
13519
|
-
var convertXyz65ToRgb = ({ x, y, z:
|
|
13687
|
+
var convertXyz65ToRgb = ({ x, y, z: z61, alpha }) => {
|
|
13520
13688
|
if (x === void 0) x = 0;
|
|
13521
13689
|
if (y === void 0) y = 0;
|
|
13522
|
-
if (
|
|
13690
|
+
if (z61 === void 0) z61 = 0;
|
|
13523
13691
|
let res = convertLrgbToRgb_default({
|
|
13524
|
-
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 *
|
|
13525
|
-
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 *
|
|
13526
|
-
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 *
|
|
13692
|
+
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 * z61,
|
|
13693
|
+
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 * z61,
|
|
13694
|
+
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 * z61
|
|
13527
13695
|
});
|
|
13528
13696
|
if (alpha !== void 0) {
|
|
13529
13697
|
res.alpha = alpha;
|
|
@@ -13773,13 +13941,13 @@ var convertLab65ToRgb_default = convertLab65ToRgb;
|
|
|
13773
13941
|
|
|
13774
13942
|
// ../../node_modules/culori/src/lab65/convertXyz65ToLab65.js
|
|
13775
13943
|
var f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
|
|
13776
|
-
var convertXyz65ToLab65 = ({ x, y, z:
|
|
13944
|
+
var convertXyz65ToLab65 = ({ x, y, z: z61, alpha }) => {
|
|
13777
13945
|
if (x === void 0) x = 0;
|
|
13778
13946
|
if (y === void 0) y = 0;
|
|
13779
|
-
if (
|
|
13947
|
+
if (z61 === void 0) z61 = 0;
|
|
13780
13948
|
let f0 = f(x / D65.X);
|
|
13781
13949
|
let f1 = f(y / D65.Y);
|
|
13782
|
-
let f22 = f(
|
|
13950
|
+
let f22 = f(z61 / D65.Z);
|
|
13783
13951
|
let res = {
|
|
13784
13952
|
mode: "lab65",
|
|
13785
13953
|
l: 116 * f1 - 16,
|
|
@@ -14436,10 +14604,10 @@ var convertItpToXyz65_default = convertItpToXyz65;
|
|
|
14436
14604
|
|
|
14437
14605
|
// ../../node_modules/culori/src/itp/convertXyz65ToItp.js
|
|
14438
14606
|
var toAbs = (c2 = 0) => Math.max(c2 * YW, 0);
|
|
14439
|
-
var convertXyz65ToItp = ({ x, y, z:
|
|
14607
|
+
var convertXyz65ToItp = ({ x, y, z: z61, alpha }) => {
|
|
14440
14608
|
const absX = toAbs(x);
|
|
14441
14609
|
const absY = toAbs(y);
|
|
14442
|
-
const absZ = toAbs(
|
|
14610
|
+
const absZ = toAbs(z61);
|
|
14443
14611
|
const l2 = transferPqEncode(
|
|
14444
14612
|
0.3592832590121217 * absX + 0.6976051147779502 * absY - 0.0358915932320289 * absZ
|
|
14445
14613
|
);
|
|
@@ -14497,15 +14665,15 @@ var jabPqEncode = (v) => {
|
|
|
14497
14665
|
return Math.pow((C1 + C2 * vn3) / (1 + C3 * vn3), p);
|
|
14498
14666
|
};
|
|
14499
14667
|
var abs = (v = 0) => Math.max(v * 203, 0);
|
|
14500
|
-
var convertXyz65ToJab = ({ x, y, z:
|
|
14668
|
+
var convertXyz65ToJab = ({ x, y, z: z61, alpha }) => {
|
|
14501
14669
|
x = abs(x);
|
|
14502
14670
|
y = abs(y);
|
|
14503
|
-
|
|
14504
|
-
let xp = 1.15 * x - 0.15 *
|
|
14671
|
+
z61 = abs(z61);
|
|
14672
|
+
let xp = 1.15 * x - 0.15 * z61;
|
|
14505
14673
|
let yp = 0.66 * y + 0.34 * x;
|
|
14506
|
-
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 *
|
|
14507
|
-
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 *
|
|
14508
|
-
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 *
|
|
14674
|
+
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z61);
|
|
14675
|
+
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z61);
|
|
14676
|
+
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z61);
|
|
14509
14677
|
let i = (l2 + m) / 2;
|
|
14510
14678
|
let res = {
|
|
14511
14679
|
mode: "jab",
|
|
@@ -14691,14 +14859,14 @@ var convertLabToXyz50 = ({ l: l2, a, b, alpha }) => {
|
|
|
14691
14859
|
var convertLabToXyz50_default = convertLabToXyz50;
|
|
14692
14860
|
|
|
14693
14861
|
// ../../node_modules/culori/src/xyz50/convertXyz50ToRgb.js
|
|
14694
|
-
var convertXyz50ToRgb = ({ x, y, z:
|
|
14862
|
+
var convertXyz50ToRgb = ({ x, y, z: z61, alpha }) => {
|
|
14695
14863
|
if (x === void 0) x = 0;
|
|
14696
14864
|
if (y === void 0) y = 0;
|
|
14697
|
-
if (
|
|
14865
|
+
if (z61 === void 0) z61 = 0;
|
|
14698
14866
|
let res = convertLrgbToRgb_default({
|
|
14699
|
-
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 *
|
|
14700
|
-
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 *
|
|
14701
|
-
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 *
|
|
14867
|
+
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 * z61,
|
|
14868
|
+
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 * z61,
|
|
14869
|
+
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 * z61
|
|
14702
14870
|
});
|
|
14703
14871
|
if (alpha !== void 0) {
|
|
14704
14872
|
res.alpha = alpha;
|
|
@@ -14729,13 +14897,13 @@ var convertRgbToXyz50_default = convertRgbToXyz50;
|
|
|
14729
14897
|
|
|
14730
14898
|
// ../../node_modules/culori/src/lab/convertXyz50ToLab.js
|
|
14731
14899
|
var f2 = (value) => value > e3 ? Math.cbrt(value) : (k3 * value + 16) / 116;
|
|
14732
|
-
var convertXyz50ToLab = ({ x, y, z:
|
|
14900
|
+
var convertXyz50ToLab = ({ x, y, z: z61, alpha }) => {
|
|
14733
14901
|
if (x === void 0) x = 0;
|
|
14734
14902
|
if (y === void 0) y = 0;
|
|
14735
|
-
if (
|
|
14903
|
+
if (z61 === void 0) z61 = 0;
|
|
14736
14904
|
let f0 = f2(x / D50.X);
|
|
14737
14905
|
let f1 = f2(y / D50.Y);
|
|
14738
|
-
let f22 = f2(
|
|
14906
|
+
let f22 = f2(z61 / D50.Z);
|
|
14739
14907
|
let res = {
|
|
14740
14908
|
mode: "lab",
|
|
14741
14909
|
l: 116 * f1 - 16,
|
|
@@ -14970,18 +15138,18 @@ var convertLchuvToLuv = ({ l: l2, c: c2, h, alpha }) => {
|
|
|
14970
15138
|
var convertLchuvToLuv_default = convertLchuvToLuv;
|
|
14971
15139
|
|
|
14972
15140
|
// ../../node_modules/culori/src/luv/convertXyz50ToLuv.js
|
|
14973
|
-
var u_fn = (x, y,
|
|
14974
|
-
var v_fn = (x, y,
|
|
15141
|
+
var u_fn = (x, y, z61) => 4 * x / (x + 15 * y + 3 * z61);
|
|
15142
|
+
var v_fn = (x, y, z61) => 9 * y / (x + 15 * y + 3 * z61);
|
|
14975
15143
|
var un = u_fn(D50.X, D50.Y, D50.Z);
|
|
14976
15144
|
var vn = v_fn(D50.X, D50.Y, D50.Z);
|
|
14977
15145
|
var l_fn = (value) => value <= e3 ? k3 * value : 116 * Math.cbrt(value) - 16;
|
|
14978
|
-
var convertXyz50ToLuv = ({ x, y, z:
|
|
15146
|
+
var convertXyz50ToLuv = ({ x, y, z: z61, alpha }) => {
|
|
14979
15147
|
if (x === void 0) x = 0;
|
|
14980
15148
|
if (y === void 0) y = 0;
|
|
14981
|
-
if (
|
|
15149
|
+
if (z61 === void 0) z61 = 0;
|
|
14982
15150
|
let l2 = l_fn(y / D50.Y);
|
|
14983
|
-
let u = u_fn(x, y,
|
|
14984
|
-
let v = v_fn(x, y,
|
|
15151
|
+
let u = u_fn(x, y, z61);
|
|
15152
|
+
let v = v_fn(x, y, z61);
|
|
14985
15153
|
if (!isFinite(u) || !isFinite(v)) {
|
|
14986
15154
|
l2 = u = v = 0;
|
|
14987
15155
|
} else {
|
|
@@ -15002,8 +15170,8 @@ var convertXyz50ToLuv = ({ x, y, z: z56, alpha }) => {
|
|
|
15002
15170
|
var convertXyz50ToLuv_default = convertXyz50ToLuv;
|
|
15003
15171
|
|
|
15004
15172
|
// ../../node_modules/culori/src/luv/convertLuvToXyz50.js
|
|
15005
|
-
var u_fn2 = (x, y,
|
|
15006
|
-
var v_fn2 = (x, y,
|
|
15173
|
+
var u_fn2 = (x, y, z61) => 4 * x / (x + 15 * y + 3 * z61);
|
|
15174
|
+
var v_fn2 = (x, y, z61) => 9 * y / (x + 15 * y + 3 * z61);
|
|
15007
15175
|
var un2 = u_fn2(D50.X, D50.Y, D50.Z);
|
|
15008
15176
|
var vn2 = v_fn2(D50.X, D50.Y, D50.Z);
|
|
15009
15177
|
var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
@@ -15017,8 +15185,8 @@ var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
|
15017
15185
|
let vp = v / (13 * l2) + vn2;
|
|
15018
15186
|
let y = D50.Y * (l2 <= 8 ? l2 / k3 : Math.pow((l2 + 16) / 116, 3));
|
|
15019
15187
|
let x = y * (9 * up) / (4 * vp);
|
|
15020
|
-
let
|
|
15021
|
-
let res = { mode: "xyz50", x, y, z:
|
|
15188
|
+
let z61 = y * (12 - 3 * up - 20 * vp) / (4 * vp);
|
|
15189
|
+
let res = { mode: "xyz50", x, y, z: z61 };
|
|
15022
15190
|
if (alpha !== void 0) {
|
|
15023
15191
|
res.alpha = alpha;
|
|
15024
15192
|
}
|
|
@@ -15635,15 +15803,15 @@ var convertP3ToXyz65 = (rgb2) => {
|
|
|
15635
15803
|
var convertP3ToXyz65_default = convertP3ToXyz65;
|
|
15636
15804
|
|
|
15637
15805
|
// ../../node_modules/culori/src/p3/convertXyz65ToP3.js
|
|
15638
|
-
var convertXyz65ToP3 = ({ x, y, z:
|
|
15806
|
+
var convertXyz65ToP3 = ({ x, y, z: z61, alpha }) => {
|
|
15639
15807
|
if (x === void 0) x = 0;
|
|
15640
15808
|
if (y === void 0) y = 0;
|
|
15641
|
-
if (
|
|
15809
|
+
if (z61 === void 0) z61 = 0;
|
|
15642
15810
|
let res = convertLrgbToRgb_default(
|
|
15643
15811
|
{
|
|
15644
|
-
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 *
|
|
15645
|
-
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 *
|
|
15646
|
-
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 *
|
|
15812
|
+
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 * z61,
|
|
15813
|
+
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 * z61,
|
|
15814
|
+
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 * z61
|
|
15647
15815
|
},
|
|
15648
15816
|
"p3"
|
|
15649
15817
|
);
|
|
@@ -15678,19 +15846,19 @@ var gamma2 = (v) => {
|
|
|
15678
15846
|
}
|
|
15679
15847
|
return 16 * v;
|
|
15680
15848
|
};
|
|
15681
|
-
var convertXyz50ToProphoto = ({ x, y, z:
|
|
15849
|
+
var convertXyz50ToProphoto = ({ x, y, z: z61, alpha }) => {
|
|
15682
15850
|
if (x === void 0) x = 0;
|
|
15683
15851
|
if (y === void 0) y = 0;
|
|
15684
|
-
if (
|
|
15852
|
+
if (z61 === void 0) z61 = 0;
|
|
15685
15853
|
let res = {
|
|
15686
15854
|
mode: "prophoto",
|
|
15687
15855
|
r: gamma2(
|
|
15688
|
-
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 *
|
|
15856
|
+
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 * z61
|
|
15689
15857
|
),
|
|
15690
15858
|
g: gamma2(
|
|
15691
|
-
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 *
|
|
15859
|
+
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 * z61
|
|
15692
15860
|
),
|
|
15693
|
-
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 *
|
|
15861
|
+
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 * z61)
|
|
15694
15862
|
};
|
|
15695
15863
|
if (alpha !== void 0) {
|
|
15696
15864
|
res.alpha = alpha;
|
|
@@ -15750,20 +15918,20 @@ var gamma3 = (v) => {
|
|
|
15750
15918
|
}
|
|
15751
15919
|
return 4.5 * v;
|
|
15752
15920
|
};
|
|
15753
|
-
var convertXyz65ToRec2020 = ({ x, y, z:
|
|
15921
|
+
var convertXyz65ToRec2020 = ({ x, y, z: z61, alpha }) => {
|
|
15754
15922
|
if (x === void 0) x = 0;
|
|
15755
15923
|
if (y === void 0) y = 0;
|
|
15756
|
-
if (
|
|
15924
|
+
if (z61 === void 0) z61 = 0;
|
|
15757
15925
|
let res = {
|
|
15758
15926
|
mode: "rec2020",
|
|
15759
15927
|
r: gamma3(
|
|
15760
|
-
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 *
|
|
15928
|
+
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 * z61
|
|
15761
15929
|
),
|
|
15762
15930
|
g: gamma3(
|
|
15763
|
-
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 *
|
|
15931
|
+
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 * z61
|
|
15764
15932
|
),
|
|
15765
15933
|
b: gamma3(
|
|
15766
|
-
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 *
|
|
15934
|
+
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 * z61
|
|
15767
15935
|
)
|
|
15768
15936
|
};
|
|
15769
15937
|
if (alpha !== void 0) {
|
|
@@ -15916,15 +16084,15 @@ var definition_default26 = definition26;
|
|
|
15916
16084
|
|
|
15917
16085
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
|
|
15918
16086
|
var convertXyz65ToXyz50 = (xyz652) => {
|
|
15919
|
-
let { x, y, z:
|
|
16087
|
+
let { x, y, z: z61, alpha } = xyz652;
|
|
15920
16088
|
if (x === void 0) x = 0;
|
|
15921
16089
|
if (y === void 0) y = 0;
|
|
15922
|
-
if (
|
|
16090
|
+
if (z61 === void 0) z61 = 0;
|
|
15923
16091
|
let res = {
|
|
15924
16092
|
mode: "xyz50",
|
|
15925
|
-
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 *
|
|
15926
|
-
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 *
|
|
15927
|
-
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 *
|
|
16093
|
+
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 * z61,
|
|
16094
|
+
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 * z61,
|
|
16095
|
+
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 * z61
|
|
15928
16096
|
};
|
|
15929
16097
|
if (alpha !== void 0) {
|
|
15930
16098
|
res.alpha = alpha;
|
|
@@ -15935,15 +16103,15 @@ var convertXyz65ToXyz50_default = convertXyz65ToXyz50;
|
|
|
15935
16103
|
|
|
15936
16104
|
// ../../node_modules/culori/src/xyz65/convertXyz50ToXyz65.js
|
|
15937
16105
|
var convertXyz50ToXyz65 = (xyz502) => {
|
|
15938
|
-
let { x, y, z:
|
|
16106
|
+
let { x, y, z: z61, alpha } = xyz502;
|
|
15939
16107
|
if (x === void 0) x = 0;
|
|
15940
16108
|
if (y === void 0) y = 0;
|
|
15941
|
-
if (
|
|
16109
|
+
if (z61 === void 0) z61 = 0;
|
|
15942
16110
|
let res = {
|
|
15943
16111
|
mode: "xyz65",
|
|
15944
|
-
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 *
|
|
15945
|
-
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 *
|
|
15946
|
-
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 *
|
|
16112
|
+
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 * z61,
|
|
16113
|
+
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 * z61,
|
|
16114
|
+
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 * z61
|
|
15947
16115
|
};
|
|
15948
16116
|
if (alpha !== void 0) {
|
|
15949
16117
|
res.alpha = alpha;
|