@closerepo/radar-contracts 13.0.0 → 13.2.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/dist/index.d.ts +315 -6
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare const radarResetPublicDataLimits: Readonly<{
|
|
|
20
20
|
}>;
|
|
21
21
|
declare const radarResetSeriesValues: readonly ["all", "hard_reset", "banked_reset"];
|
|
22
22
|
declare const radarResetEffectValues: readonly ["hard_reset", "banked_reset"];
|
|
23
|
-
declare const radarResetProductValues: readonly ["codex", "chatgpt_work"];
|
|
23
|
+
declare const radarResetProductValues: readonly ["codex", "chatgpt_work", "claude", "antigravity"];
|
|
24
24
|
declare const radarResetAudienceValues: readonly ["all_users", "paid_users", "named_plans", "affected_subset"];
|
|
25
25
|
declare const radarResetPlanValues: readonly ["plus", "pro"];
|
|
26
26
|
declare const radarResetReasonCategoryValues: readonly ["incident_compensation", "user_milestone", "celebration"];
|
|
@@ -73,6 +73,8 @@ declare const radarResetAnalysisV1Schema: z.ZodObject<{
|
|
|
73
73
|
products: z.ZodArray<z.ZodEnum<{
|
|
74
74
|
codex: "codex";
|
|
75
75
|
chatgpt_work: "chatgpt_work";
|
|
76
|
+
claude: "claude";
|
|
77
|
+
antigravity: "antigravity";
|
|
76
78
|
}>>;
|
|
77
79
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
78
80
|
audience: z.ZodEnum<{
|
|
@@ -623,6 +625,8 @@ declare const radarResetActionDetailV1Schema: z.ZodObject<{
|
|
|
623
625
|
products: z.ZodArray<z.ZodEnum<{
|
|
624
626
|
codex: "codex";
|
|
625
627
|
chatgpt_work: "chatgpt_work";
|
|
628
|
+
claude: "claude";
|
|
629
|
+
antigravity: "antigravity";
|
|
626
630
|
}>>;
|
|
627
631
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
628
632
|
audience: z.ZodEnum<{
|
|
@@ -814,6 +818,8 @@ declare const radarResetExportV1Schema: z.ZodObject<{
|
|
|
814
818
|
products: z.ZodArray<z.ZodEnum<{
|
|
815
819
|
codex: "codex";
|
|
816
820
|
chatgpt_work: "chatgpt_work";
|
|
821
|
+
claude: "claude";
|
|
822
|
+
antigravity: "antigravity";
|
|
817
823
|
}>>;
|
|
818
824
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
819
825
|
audience: z.ZodEnum<{
|
|
@@ -1364,6 +1370,8 @@ declare const radarResetExportV1Schema: z.ZodObject<{
|
|
|
1364
1370
|
products: z.ZodArray<z.ZodEnum<{
|
|
1365
1371
|
codex: "codex";
|
|
1366
1372
|
chatgpt_work: "chatgpt_work";
|
|
1373
|
+
claude: "claude";
|
|
1374
|
+
antigravity: "antigravity";
|
|
1367
1375
|
}>>;
|
|
1368
1376
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
1369
1377
|
audience: z.ZodEnum<{
|
|
@@ -3776,6 +3784,8 @@ declare const radarResetActionDetailV2Schema: z.ZodObject<{
|
|
|
3776
3784
|
products: z.ZodArray<z.ZodEnum<{
|
|
3777
3785
|
codex: "codex";
|
|
3778
3786
|
chatgpt_work: "chatgpt_work";
|
|
3787
|
+
claude: "claude";
|
|
3788
|
+
antigravity: "antigravity";
|
|
3779
3789
|
}>>;
|
|
3780
3790
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
3781
3791
|
audience: z.ZodEnum<{
|
|
@@ -3932,6 +3942,8 @@ declare const radarResetExportV2Schema: z.ZodObject<{
|
|
|
3932
3942
|
products: z.ZodArray<z.ZodEnum<{
|
|
3933
3943
|
codex: "codex";
|
|
3934
3944
|
chatgpt_work: "chatgpt_work";
|
|
3945
|
+
claude: "claude";
|
|
3946
|
+
antigravity: "antigravity";
|
|
3935
3947
|
}>>;
|
|
3936
3948
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
3937
3949
|
audience: z.ZodEnum<{
|
|
@@ -4084,6 +4096,8 @@ declare const radarResetExportV2Schema: z.ZodObject<{
|
|
|
4084
4096
|
products: z.ZodArray<z.ZodEnum<{
|
|
4085
4097
|
codex: "codex";
|
|
4086
4098
|
chatgpt_work: "chatgpt_work";
|
|
4099
|
+
claude: "claude";
|
|
4100
|
+
antigravity: "antigravity";
|
|
4087
4101
|
}>>;
|
|
4088
4102
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
4089
4103
|
audience: z.ZodEnum<{
|
|
@@ -4662,7 +4676,7 @@ declare function projectRadarResetExportV1FromV2(value: RadarResetExportV2): {
|
|
|
4662
4676
|
values: [];
|
|
4663
4677
|
};
|
|
4664
4678
|
actionScope: {
|
|
4665
|
-
products: ("codex" | "chatgpt_work")[];
|
|
4679
|
+
products: ("codex" | "chatgpt_work" | "claude" | "antigravity")[];
|
|
4666
4680
|
audienceClaims: {
|
|
4667
4681
|
audience: "all_users" | "paid_users" | "named_plans" | "affected_subset";
|
|
4668
4682
|
plans: ("plus" | "pro")[];
|
|
@@ -5091,7 +5105,7 @@ declare function projectRadarResetExportV1FromV2(value: RadarResetExportV2): {
|
|
|
5091
5105
|
values: [];
|
|
5092
5106
|
};
|
|
5093
5107
|
actionScope: {
|
|
5094
|
-
products: ("codex" | "chatgpt_work")[];
|
|
5108
|
+
products: ("codex" | "chatgpt_work" | "claude" | "antigravity")[];
|
|
5095
5109
|
audienceClaims: {
|
|
5096
5110
|
audience: "all_users" | "paid_users" | "named_plans" | "affected_subset";
|
|
5097
5111
|
plans: ("plus" | "pro")[];
|
|
@@ -5449,6 +5463,10 @@ declare const parseRadarResetActionDetailV3: (value: unknown) => RadarResetActio
|
|
|
5449
5463
|
//#region src/reset-public-records.d.ts
|
|
5450
5464
|
/** Internal Core-to-publisher endpoint; the public subscription surface is Atom only. */
|
|
5451
5465
|
declare const radarResetPublicRecordsCorePath = "/api/v1/codex-reset-public-records";
|
|
5466
|
+
declare const radarResetProductRecordsProductValues: readonly ["claude", "antigravity"];
|
|
5467
|
+
type RadarResetProductRecordsProduct = typeof radarResetProductRecordsProductValues[number];
|
|
5468
|
+
/** Internal Core-to-publisher endpoint for a non-Codex reset product. */
|
|
5469
|
+
declare const radarResetProductPublicRecordsCorePath: (product: RadarResetProductRecordsProduct) => string;
|
|
5452
5470
|
declare const actionShape: z.ZodObject<{
|
|
5453
5471
|
resetActionId: z.ZodString;
|
|
5454
5472
|
firstAnnouncedAt: z.ZodISODateTime;
|
|
@@ -5466,6 +5484,8 @@ declare const actionShape: z.ZodObject<{
|
|
|
5466
5484
|
products: z.ZodArray<z.ZodEnum<{
|
|
5467
5485
|
codex: "codex";
|
|
5468
5486
|
chatgpt_work: "chatgpt_work";
|
|
5487
|
+
claude: "claude";
|
|
5488
|
+
antigravity: "antigravity";
|
|
5469
5489
|
}>>;
|
|
5470
5490
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
5471
5491
|
audience: z.ZodEnum<{
|
|
@@ -5560,7 +5580,7 @@ declare const projectRadarResetPublicActionToV2: (action: z.infer<typeof actionS
|
|
|
5560
5580
|
values: [];
|
|
5561
5581
|
};
|
|
5562
5582
|
actionScope: {
|
|
5563
|
-
products: ("codex" | "chatgpt_work")[];
|
|
5583
|
+
products: ("codex" | "chatgpt_work" | "claude" | "antigravity")[];
|
|
5564
5584
|
audienceClaims: {
|
|
5565
5585
|
audience: "all_users" | "paid_users" | "named_plans" | "affected_subset";
|
|
5566
5586
|
plans: ("plus" | "pro")[];
|
|
@@ -5595,6 +5615,8 @@ declare const radarResetPublicActionV1Schema: z.ZodObject<{
|
|
|
5595
5615
|
products: z.ZodArray<z.ZodEnum<{
|
|
5596
5616
|
codex: "codex";
|
|
5597
5617
|
chatgpt_work: "chatgpt_work";
|
|
5618
|
+
claude: "claude";
|
|
5619
|
+
antigravity: "antigravity";
|
|
5598
5620
|
}>>;
|
|
5599
5621
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
5600
5622
|
audience: z.ZodEnum<{
|
|
@@ -5732,9 +5754,243 @@ declare const radarResetWithdrawnActionV1Schema: z.ZodObject<{
|
|
|
5732
5754
|
withdrawnAt: z.ZodISODateTime;
|
|
5733
5755
|
}, z.core.$strip>;
|
|
5734
5756
|
declare const radarResetPublicRecordsV1Schema: z.ZodObject<{
|
|
5735
|
-
|
|
5757
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
5758
|
+
resetActionId: z.ZodString;
|
|
5759
|
+
firstAnnouncedAt: z.ZodISODateTime;
|
|
5760
|
+
resetEffects: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5761
|
+
state: z.ZodLiteral<"known">;
|
|
5762
|
+
values: z.ZodArray<z.ZodEnum<{
|
|
5763
|
+
hard_reset: "hard_reset";
|
|
5764
|
+
banked_reset: "banked_reset";
|
|
5765
|
+
}>>;
|
|
5766
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5767
|
+
state: z.ZodLiteral<"unknown">;
|
|
5768
|
+
values: z.ZodTuple<[], null>;
|
|
5769
|
+
}, z.core.$strip>], "state">;
|
|
5770
|
+
actionScope: z.ZodObject<{
|
|
5771
|
+
products: z.ZodArray<z.ZodEnum<{
|
|
5772
|
+
codex: "codex";
|
|
5773
|
+
chatgpt_work: "chatgpt_work";
|
|
5774
|
+
claude: "claude";
|
|
5775
|
+
antigravity: "antigravity";
|
|
5776
|
+
}>>;
|
|
5777
|
+
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
5778
|
+
audience: z.ZodEnum<{
|
|
5779
|
+
all_users: "all_users";
|
|
5780
|
+
paid_users: "paid_users";
|
|
5781
|
+
named_plans: "named_plans";
|
|
5782
|
+
affected_subset: "affected_subset";
|
|
5783
|
+
}>;
|
|
5784
|
+
plans: z.ZodArray<z.ZodEnum<{
|
|
5785
|
+
plus: "plus";
|
|
5786
|
+
pro: "pro";
|
|
5787
|
+
}>>;
|
|
5788
|
+
subsetSummary: z.ZodNullable<z.ZodString>;
|
|
5789
|
+
}, z.core.$strip>>;
|
|
5790
|
+
}, z.core.$strip>;
|
|
5791
|
+
effectiveAt: z.ZodNullable<z.ZodISODateTime>;
|
|
5792
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
5793
|
+
category: z.ZodEnum<{
|
|
5794
|
+
incident_compensation: "incident_compensation";
|
|
5795
|
+
user_milestone: "user_milestone";
|
|
5796
|
+
celebration: "celebration";
|
|
5797
|
+
}>;
|
|
5798
|
+
summary: z.ZodString;
|
|
5799
|
+
basis: z.ZodEnum<{
|
|
5800
|
+
unknown: "unknown";
|
|
5801
|
+
explicit_in_reset_post: "explicit_in_reset_post";
|
|
5802
|
+
explicit_in_related_source: "explicit_in_related_source";
|
|
5803
|
+
contextual_inference: "contextual_inference";
|
|
5804
|
+
}>;
|
|
5805
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
5806
|
+
excerpt: z.ZodString;
|
|
5807
|
+
sourceUrl: z.ZodString;
|
|
5808
|
+
}, z.core.$strip>>;
|
|
5809
|
+
}, z.core.$strip>>;
|
|
5810
|
+
noticeTimeline: z.ZodArray<z.ZodObject<{
|
|
5811
|
+
sourceUrl: z.ZodString;
|
|
5812
|
+
authoredAt: z.ZodISODateTime;
|
|
5813
|
+
sourceText: z.ZodString;
|
|
5814
|
+
contentCompleteness: z.ZodEnum<{
|
|
5815
|
+
verified_full_text: "verified_full_text";
|
|
5816
|
+
verified_excerpt: "verified_excerpt";
|
|
5817
|
+
}>;
|
|
5818
|
+
sourceAccount: z.ZodObject<{
|
|
5819
|
+
displayName: z.ZodString;
|
|
5820
|
+
}, z.core.$strip>;
|
|
5821
|
+
sourceTranslations: z.ZodObject<{
|
|
5822
|
+
"zh-Hans": z.ZodNullable<z.ZodString>;
|
|
5823
|
+
"zh-Hant": z.ZodNullable<z.ZodString>;
|
|
5824
|
+
ja: z.ZodNullable<z.ZodString>;
|
|
5825
|
+
ko: z.ZodNullable<z.ZodString>;
|
|
5826
|
+
}, z.core.$strip>;
|
|
5827
|
+
kinds: z.ZodArray<z.ZodEnum<{
|
|
5828
|
+
preview: "preview";
|
|
5829
|
+
executed: "executed";
|
|
5830
|
+
schedule_change: "schedule_change";
|
|
5831
|
+
scope_change: "scope_change";
|
|
5832
|
+
cancel_preview: "cancel_preview";
|
|
5833
|
+
delivery_issue: "delivery_issue";
|
|
5834
|
+
make_up: "make_up";
|
|
5835
|
+
repair: "repair";
|
|
5836
|
+
update: "update";
|
|
5837
|
+
}>>;
|
|
5838
|
+
}, z.core.$strip>>;
|
|
5839
|
+
}, z.core.$strip>>;
|
|
5736
5840
|
sourceWatermark: z.ZodString;
|
|
5737
5841
|
generatedAt: z.ZodISODateTime;
|
|
5842
|
+
pendingResetActions: z.ZodArray<z.ZodObject<{
|
|
5843
|
+
noticeTimeline: z.ZodArray<z.ZodObject<{
|
|
5844
|
+
sourceUrl: z.ZodString;
|
|
5845
|
+
authoredAt: z.ZodISODateTime;
|
|
5846
|
+
sourceText: z.ZodString;
|
|
5847
|
+
contentCompleteness: z.ZodEnum<{
|
|
5848
|
+
verified_full_text: "verified_full_text";
|
|
5849
|
+
verified_excerpt: "verified_excerpt";
|
|
5850
|
+
}>;
|
|
5851
|
+
sourceAccount: z.ZodObject<{
|
|
5852
|
+
displayName: z.ZodString;
|
|
5853
|
+
}, z.core.$strip>;
|
|
5854
|
+
sourceTranslations: z.ZodObject<{
|
|
5855
|
+
"zh-Hans": z.ZodNullable<z.ZodString>;
|
|
5856
|
+
"zh-Hant": z.ZodNullable<z.ZodString>;
|
|
5857
|
+
ja: z.ZodNullable<z.ZodString>;
|
|
5858
|
+
ko: z.ZodNullable<z.ZodString>;
|
|
5859
|
+
}, z.core.$strip>;
|
|
5860
|
+
kinds: z.ZodArray<z.ZodEnum<{
|
|
5861
|
+
preview: "preview";
|
|
5862
|
+
executed: "executed";
|
|
5863
|
+
schedule_change: "schedule_change";
|
|
5864
|
+
scope_change: "scope_change";
|
|
5865
|
+
cancel_preview: "cancel_preview";
|
|
5866
|
+
delivery_issue: "delivery_issue";
|
|
5867
|
+
make_up: "make_up";
|
|
5868
|
+
repair: "repair";
|
|
5869
|
+
update: "update";
|
|
5870
|
+
}>>;
|
|
5871
|
+
}, z.core.$strip>>;
|
|
5872
|
+
resetActionId: z.ZodString;
|
|
5873
|
+
state: z.ZodEnum<{
|
|
5874
|
+
preview: "preview";
|
|
5875
|
+
executed: "executed";
|
|
5876
|
+
}>;
|
|
5877
|
+
resetEffects: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5878
|
+
state: z.ZodLiteral<"known">;
|
|
5879
|
+
values: z.ZodArray<z.ZodEnum<{
|
|
5880
|
+
hard_reset: "hard_reset";
|
|
5881
|
+
banked_reset: "banked_reset";
|
|
5882
|
+
}>>;
|
|
5883
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5884
|
+
state: z.ZodLiteral<"unknown">;
|
|
5885
|
+
values: z.ZodTuple<[], null>;
|
|
5886
|
+
}, z.core.$strip>], "state">;
|
|
5887
|
+
executedEffects: z.ZodArray<z.ZodEnum<{
|
|
5888
|
+
hard_reset: "hard_reset";
|
|
5889
|
+
banked_reset: "banked_reset";
|
|
5890
|
+
}>>;
|
|
5891
|
+
pendingEffects: z.ZodArray<z.ZodEnum<{
|
|
5892
|
+
hard_reset: "hard_reset";
|
|
5893
|
+
banked_reset: "banked_reset";
|
|
5894
|
+
}>>;
|
|
5895
|
+
plannedTiming: z.ZodNullable<z.ZodObject<{
|
|
5896
|
+
resolution: z.ZodEnum<{
|
|
5897
|
+
resolved: "resolved";
|
|
5898
|
+
unbounded: "unbounded";
|
|
5899
|
+
unresolved: "unresolved";
|
|
5900
|
+
}>;
|
|
5901
|
+
evidence: z.ZodNullable<z.ZodString>;
|
|
5902
|
+
precision: z.ZodNullable<z.ZodEnum<{
|
|
5903
|
+
exact: "exact";
|
|
5904
|
+
approximate: "approximate";
|
|
5905
|
+
range: "range";
|
|
5906
|
+
}>>;
|
|
5907
|
+
relation: z.ZodNullable<z.ZodEnum<{
|
|
5908
|
+
unbounded: "unbounded";
|
|
5909
|
+
instant: "instant";
|
|
5910
|
+
interval: "interval";
|
|
5911
|
+
deadline: "deadline";
|
|
5912
|
+
not_before: "not_before";
|
|
5913
|
+
}>>;
|
|
5914
|
+
effectiveWindow: z.ZodNullable<z.ZodObject<{
|
|
5915
|
+
earliestAt: z.ZodISODateTime;
|
|
5916
|
+
latestAt: z.ZodISODateTime;
|
|
5917
|
+
}, z.core.$strip>>;
|
|
5918
|
+
}, z.core.$strip>>;
|
|
5919
|
+
}, z.core.$strip>>;
|
|
5920
|
+
unexecutedResetActions: z.ZodArray<z.ZodObject<{
|
|
5921
|
+
resetActionId: z.ZodString;
|
|
5922
|
+
resetEffects: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5923
|
+
state: z.ZodLiteral<"known">;
|
|
5924
|
+
values: z.ZodArray<z.ZodEnum<{
|
|
5925
|
+
hard_reset: "hard_reset";
|
|
5926
|
+
banked_reset: "banked_reset";
|
|
5927
|
+
}>>;
|
|
5928
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5929
|
+
state: z.ZodLiteral<"unknown">;
|
|
5930
|
+
values: z.ZodTuple<[], null>;
|
|
5931
|
+
}, z.core.$strip>], "state">;
|
|
5932
|
+
noticeTimeline: z.ZodArray<z.ZodObject<{
|
|
5933
|
+
sourceUrl: z.ZodString;
|
|
5934
|
+
authoredAt: z.ZodISODateTime;
|
|
5935
|
+
sourceText: z.ZodString;
|
|
5936
|
+
contentCompleteness: z.ZodEnum<{
|
|
5937
|
+
verified_full_text: "verified_full_text";
|
|
5938
|
+
verified_excerpt: "verified_excerpt";
|
|
5939
|
+
}>;
|
|
5940
|
+
sourceAccount: z.ZodObject<{
|
|
5941
|
+
displayName: z.ZodString;
|
|
5942
|
+
}, z.core.$strip>;
|
|
5943
|
+
sourceTranslations: z.ZodObject<{
|
|
5944
|
+
"zh-Hans": z.ZodNullable<z.ZodString>;
|
|
5945
|
+
"zh-Hant": z.ZodNullable<z.ZodString>;
|
|
5946
|
+
ja: z.ZodNullable<z.ZodString>;
|
|
5947
|
+
ko: z.ZodNullable<z.ZodString>;
|
|
5948
|
+
}, z.core.$strip>;
|
|
5949
|
+
kinds: z.ZodArray<z.ZodEnum<{
|
|
5950
|
+
preview: "preview";
|
|
5951
|
+
executed: "executed";
|
|
5952
|
+
schedule_change: "schedule_change";
|
|
5953
|
+
scope_change: "scope_change";
|
|
5954
|
+
cancel_preview: "cancel_preview";
|
|
5955
|
+
delivery_issue: "delivery_issue";
|
|
5956
|
+
make_up: "make_up";
|
|
5957
|
+
repair: "repair";
|
|
5958
|
+
update: "update";
|
|
5959
|
+
}>>;
|
|
5960
|
+
}, z.core.$strip>>;
|
|
5961
|
+
plannedTiming: z.ZodNullable<z.ZodObject<{
|
|
5962
|
+
resolution: z.ZodEnum<{
|
|
5963
|
+
resolved: "resolved";
|
|
5964
|
+
unbounded: "unbounded";
|
|
5965
|
+
unresolved: "unresolved";
|
|
5966
|
+
}>;
|
|
5967
|
+
evidence: z.ZodNullable<z.ZodString>;
|
|
5968
|
+
precision: z.ZodNullable<z.ZodEnum<{
|
|
5969
|
+
exact: "exact";
|
|
5970
|
+
approximate: "approximate";
|
|
5971
|
+
range: "range";
|
|
5972
|
+
}>>;
|
|
5973
|
+
relation: z.ZodNullable<z.ZodEnum<{
|
|
5974
|
+
unbounded: "unbounded";
|
|
5975
|
+
instant: "instant";
|
|
5976
|
+
interval: "interval";
|
|
5977
|
+
deadline: "deadline";
|
|
5978
|
+
not_before: "not_before";
|
|
5979
|
+
}>>;
|
|
5980
|
+
effectiveWindow: z.ZodNullable<z.ZodObject<{
|
|
5981
|
+
earliestAt: z.ZodISODateTime;
|
|
5982
|
+
latestAt: z.ZodISODateTime;
|
|
5983
|
+
}, z.core.$strip>>;
|
|
5984
|
+
}, z.core.$strip>>;
|
|
5985
|
+
}, z.core.$strip>>;
|
|
5986
|
+
withdrawnResetActions: z.ZodArray<z.ZodObject<{
|
|
5987
|
+
resetActionId: z.ZodString;
|
|
5988
|
+
lastActiveFirstAnnouncedAt: z.ZodISODateTime;
|
|
5989
|
+
withdrawnAt: z.ZodISODateTime;
|
|
5990
|
+
}, z.core.$strip>>;
|
|
5991
|
+
contractVersion: z.ZodLiteral<1>;
|
|
5992
|
+
}, z.core.$strip>;
|
|
5993
|
+
declare const radarResetProductPublicRecordsV1Schema: z.ZodObject<{
|
|
5738
5994
|
actions: z.ZodArray<z.ZodObject<{
|
|
5739
5995
|
resetActionId: z.ZodString;
|
|
5740
5996
|
firstAnnouncedAt: z.ZodISODateTime;
|
|
@@ -5752,6 +6008,8 @@ declare const radarResetPublicRecordsV1Schema: z.ZodObject<{
|
|
|
5752
6008
|
products: z.ZodArray<z.ZodEnum<{
|
|
5753
6009
|
codex: "codex";
|
|
5754
6010
|
chatgpt_work: "chatgpt_work";
|
|
6011
|
+
claude: "claude";
|
|
6012
|
+
antigravity: "antigravity";
|
|
5755
6013
|
}>>;
|
|
5756
6014
|
audienceClaims: z.ZodArray<z.ZodObject<{
|
|
5757
6015
|
audience: z.ZodEnum<{
|
|
@@ -5816,6 +6074,33 @@ declare const radarResetPublicRecordsV1Schema: z.ZodObject<{
|
|
|
5816
6074
|
}>>;
|
|
5817
6075
|
}, z.core.$strip>>;
|
|
5818
6076
|
}, z.core.$strip>>;
|
|
6077
|
+
statistics: z.ZodObject<{
|
|
6078
|
+
timeBasis: z.ZodLiteral<"confirmation_priority">;
|
|
6079
|
+
startAt: z.ZodISODateTime;
|
|
6080
|
+
total: z.ZodNumber;
|
|
6081
|
+
hardResetCount: z.ZodNumber;
|
|
6082
|
+
bankedResetCount: z.ZodNumber;
|
|
6083
|
+
unknownCount: z.ZodNumber;
|
|
6084
|
+
records: z.ZodArray<z.ZodObject<{
|
|
6085
|
+
resetActionId: z.ZodString;
|
|
6086
|
+
effect: z.ZodNullable<z.ZodEnum<{
|
|
6087
|
+
hard_reset: "hard_reset";
|
|
6088
|
+
banked_reset: "banked_reset";
|
|
6089
|
+
}>>;
|
|
6090
|
+
at: z.ZodISODateTime;
|
|
6091
|
+
basis: z.ZodEnum<{
|
|
6092
|
+
execution_confirmation: "execution_confirmation";
|
|
6093
|
+
announcement: "announcement";
|
|
6094
|
+
}>;
|
|
6095
|
+
sourceUrl: z.ZodString;
|
|
6096
|
+
}, z.core.$strip>>;
|
|
6097
|
+
intervalSummary: z.ZodNullable<z.ZodObject<{
|
|
6098
|
+
mean: z.ZodNumber;
|
|
6099
|
+
max: z.ZodNumber;
|
|
6100
|
+
}, z.core.$strip>>;
|
|
6101
|
+
}, z.core.$strip>;
|
|
6102
|
+
sourceWatermark: z.ZodString;
|
|
6103
|
+
generatedAt: z.ZodISODateTime;
|
|
5819
6104
|
pendingResetActions: z.ZodArray<z.ZodObject<{
|
|
5820
6105
|
noticeTimeline: z.ZodArray<z.ZodObject<{
|
|
5821
6106
|
sourceUrl: z.ZodString;
|
|
@@ -5965,9 +6250,15 @@ declare const radarResetPublicRecordsV1Schema: z.ZodObject<{
|
|
|
5965
6250
|
lastActiveFirstAnnouncedAt: z.ZodISODateTime;
|
|
5966
6251
|
withdrawnAt: z.ZodISODateTime;
|
|
5967
6252
|
}, z.core.$strip>>;
|
|
6253
|
+
contractVersion: z.ZodLiteral<1>;
|
|
6254
|
+
product: z.ZodEnum<{
|
|
6255
|
+
claude: "claude";
|
|
6256
|
+
antigravity: "antigravity";
|
|
6257
|
+
}>;
|
|
5968
6258
|
}, z.core.$strip>;
|
|
5969
6259
|
type RadarResetPublicActionV1 = z.infer<typeof radarResetPublicActionV1Schema>;
|
|
5970
6260
|
type RadarResetPublicRecordsV1 = z.infer<typeof radarResetPublicRecordsV1Schema>;
|
|
6261
|
+
type RadarResetProductPublicRecordsV1 = z.infer<typeof radarResetProductPublicRecordsV1Schema>;
|
|
5971
6262
|
//#endregion
|
|
5972
6263
|
//#region src/reset-management.d.ts
|
|
5973
6264
|
declare const radarResetManualCopySchema: z.ZodObject<{
|
|
@@ -5980,6 +6271,12 @@ declare const radarResetManualCopySchema: z.ZodObject<{
|
|
|
5980
6271
|
body: z.ZodString;
|
|
5981
6272
|
}, z.core.$strict>;
|
|
5982
6273
|
}, z.core.$strict>;
|
|
6274
|
+
declare const radarResetManagementProductSchema: z.ZodEnum<{
|
|
6275
|
+
codex: "codex";
|
|
6276
|
+
claude: "claude";
|
|
6277
|
+
antigravity: "antigravity";
|
|
6278
|
+
}>;
|
|
6279
|
+
type RadarResetManagementProduct = z.infer<typeof radarResetManagementProductSchema>;
|
|
5983
6280
|
declare const radarResetManagementOperationSchema: z.ZodEnum<{
|
|
5984
6281
|
end_preview: "end_preview";
|
|
5985
6282
|
restore_preview: "restore_preview";
|
|
@@ -6117,6 +6414,12 @@ declare const radarResetManualApplyReqSchema: z.ZodObject<{
|
|
|
6117
6414
|
declare const radarResetManagementActionSchema: z.ZodObject<{
|
|
6118
6415
|
resetActionId: z.ZodString;
|
|
6119
6416
|
revision: z.ZodNumber;
|
|
6417
|
+
product: z.ZodEnum<{
|
|
6418
|
+
codex: "codex";
|
|
6419
|
+
claude: "claude";
|
|
6420
|
+
antigravity: "antigravity";
|
|
6421
|
+
}>;
|
|
6422
|
+
notificationAvailable: z.ZodBoolean;
|
|
6120
6423
|
state: z.ZodEnum<{
|
|
6121
6424
|
preview: "preview";
|
|
6122
6425
|
executed: "executed";
|
|
@@ -6142,6 +6445,12 @@ declare const radarResetManagementResSchema: z.ZodObject<{
|
|
|
6142
6445
|
actions: z.ZodArray<z.ZodObject<{
|
|
6143
6446
|
resetActionId: z.ZodString;
|
|
6144
6447
|
revision: z.ZodNumber;
|
|
6448
|
+
product: z.ZodEnum<{
|
|
6449
|
+
codex: "codex";
|
|
6450
|
+
claude: "claude";
|
|
6451
|
+
antigravity: "antigravity";
|
|
6452
|
+
}>;
|
|
6453
|
+
notificationAvailable: z.ZodBoolean;
|
|
6145
6454
|
state: z.ZodEnum<{
|
|
6146
6455
|
preview: "preview";
|
|
6147
6456
|
executed: "executed";
|
|
@@ -10400,4 +10709,4 @@ declare const radarResetExportV4Schema: z.ZodObject<{
|
|
|
10400
10709
|
type RadarResetExportV4 = z.infer<typeof radarResetExportV4Schema>;
|
|
10401
10710
|
declare const parseRadarResetExportV4: (value: unknown) => RadarResetExportV4;
|
|
10402
10711
|
//#endregion
|
|
10403
|
-
export { CreateRadarResetSourceErrorEnvelopeInputV2, RadarActivityFile, RadarActivityFileV2, RadarActivityFileV3, RadarActivityProgress, RadarActivityProgressV2, RadarActivityProgressV3, RadarActivityReactionId, RadarAiRadarDigestV2, RadarAiRadarEntry, RadarAiRadarEntryV2, RadarAiRadarEventV2, RadarAiRadarFollowUp, RadarAiRadarLatest, RadarAiRadarLatestV2, RadarAiRadarLeak, RadarAiRadarMonth, RadarAiRadarMonthV2, RadarAiRadarSource, RadarAiRadarSourceV2, RadarAiRadarSummary, RadarAiRadarTitle, RadarBrowserNotificationProjection, RadarBrowserSubscriptionFailure, RadarBrowserSubscriptionRead, RadarBrowserSubscriptionSave, RadarBrowserSubscriptionSaveV2, RadarBrowserSubscriptionView, RadarBrowserSubscriptionViewV2, RadarBrowserTopics, RadarBrowserTopicsV2, RadarCodexGuessChoice, RadarCodexGuessError, RadarCodexGuessSaveReq, RadarCodexGuessView, RadarCodexModel, RadarCodexModels, RadarCodexProgressChange, RadarCodexProgressChangeV2, RadarCodexProgressChangeV3, RadarCodexProgressChangesV1, RadarCodexProgressChangesV2, RadarCodexProgressChangesV3, RadarCodexProgressEntryV3, RadarCodexProgressEntryV5, RadarCodexProgressImprovementV5, RadarCodexProgressPostRoleV5, RadarCodexProgressPostV5, RadarCodexProgressResetEntryV5, RadarCodexProgressTitleV3, RadarCodexProgressV1, RadarCodexProgressV2, RadarCodexProgressV3, RadarCodexProgressV4, RadarCodexProgressV5, RadarCodexReleaseDirectory, RadarCodexReleaseMonth, RadarCodexReleaseNotes, RadarCodexTimePoint, RadarImprovementEntry, RadarImprovementHead, RadarImprovementPage, RadarNotificationProjection, RadarNotificationTarget, RadarNotificationTask, RadarNotificationTasks, RadarNotificationTopic, RadarResetActionDetailV1, RadarResetActionDetailV2, RadarResetActionDetailV3, RadarResetActionItemV2, RadarResetActionSummaryV2, RadarResetActiveActionItemV2, RadarResetAnalysisV1, RadarResetClue, RadarResetClueSnapshot, RadarResetConfirmation, RadarResetDetailChunkReferenceV2, RadarResetDetailChunkRequestV2, RadarResetDetailManifestV2, RadarResetDetailMultipartEncodeInputV2, RadarResetDetailMultipartParseInputV2, RadarResetDetailMultipartPartV2, RadarResetExportV1, RadarResetExportV2, RadarResetExportV3, RadarResetExportV4, RadarResetManagement, RadarResetPendingActionV1, RadarResetPendingActionV2, RadarResetPositiveDecimalV2, RadarResetPrimarySourceV1, RadarResetPublicActionV1, RadarResetPublicIdV2, RadarResetPublicRecordsV1, RadarResetPublicationHomeFactsV2, RadarResetPublicationRevisionAvailableV2, RadarResetPublicationTiming, RadarResetReadActionsRequestV2, RadarResetReadActionsSuccessV2, RadarResetReadChangesRequestV2, RadarResetReadChangesSuccessV2, RadarResetReadDetailBatchRequestV2, RadarResetReadHeadRequestV2, RadarResetReadHeadSuccessV2, RadarResetSafeCauseSnapshotV2, RadarResetSafeCauseValueV2, RadarResetSha256V2, RadarResetSnapshotAvailableV1, RadarResetSourceContractErrorInputV2, RadarResetSourceContractErrorV2, RadarResetSourceErrorCodeV2, RadarResetSourceErrorEnvelopeV2, RadarResetSourceErrorV2, RadarResetSourceTranslations, RadarResetStatisticsResponseV3, RadarResetStatisticsV1, RadarResetStatisticsV2, RadarResetUInt64DecimalV2, RadarResetUtcTimestampV2, RadarTiboSourceStatus, RadarTitledActivityFile, RadarTitledActivityProgress, RadarWebsiteLocale, RadarWechatDispatchRequest, RadarWechatDispatchResponse, RadarWechatDispatchResult, activeRadarResetClue, compareRadarAiRadarEntries, compareRadarAiRadarEntriesV2, compareRadarAiRadarPublicationTimes, compareRadarNotificationTasks, compareRadarResetActionDetailsV1, compareRadarResetUtcTimestampsV1, createRadarBrowserNotificationProjection, createRadarCodexProgressCalendar, createRadarNotificationProjection, createRadarResetSourceErrorEnvelopeV2, encodeRadarActivityFile, encodeRadarActivityFileV2, encodeRadarActivityFileV3, encodeRadarResetDetailMultipartV2, encodeRadarTitledActivityFile, formatRadarResetPositiveDecimalV2, formatRadarResetUInt64DecimalV2, initialRadarBrowserSubscription, initialRadarBrowserSubscriptionV2, parseRadarAiRadarEventV2, parseRadarAiRadarLatest, parseRadarAiRadarLatestV2, parseRadarAiRadarMonth, parseRadarAiRadarMonthV2, parseRadarCodexModels, parseRadarCodexProgressChangeV3, parseRadarCodexProgressChangesV3, parseRadarCodexProgressV1, parseRadarCodexProgressV2, parseRadarCodexProgressV3, parseRadarCodexProgressV4, parseRadarCodexProgressV5, parseRadarCodexReleaseDirectory, parseRadarCodexReleaseMonth, parseRadarCodexReleaseNotes, parseRadarResetActionDetailV1, parseRadarResetActionDetailV2, parseRadarResetActionDetailV3, parseRadarResetActionSummaryV2, parseRadarResetAnalysisV1, parseRadarResetClueSnapshot, parseRadarResetDetailMultipartV2, parseRadarResetExportV1, parseRadarResetExportV2, parseRadarResetExportV3, parseRadarResetExportV4, parseRadarResetPendingActionV1, parseRadarResetPendingActionV2, parseRadarResetPositiveDecimalV2, parseRadarResetPublicationHomeFactsV2, parseRadarResetPublicationRevisionAvailableV2, parseRadarResetReadActionsRequestV2, parseRadarResetReadActionsSuccessV2, parseRadarResetReadChangesRequestV2, parseRadarResetReadChangesSuccessV2, parseRadarResetReadDetailBatchRequestV2, parseRadarResetReadHeadRequestV2, parseRadarResetReadHeadSuccessV2, parseRadarResetSnapshotAvailableV1, parseRadarResetSourceErrorEnvelopeV2, parseRadarResetUInt64DecimalV2, projectRadarBrowserSubscriptionSelection, projectRadarBrowserSubscriptionV1, projectRadarResetExportV1FromV2, projectRadarResetExportV3FromV2, projectRadarResetPrimarySourceV1, projectRadarResetPublicActionToV2, radarActivityEventIdSchema, radarActivityFileSchema, radarActivityFileUrl, radarActivityFileV2Schema, radarActivityFileV2Url, radarActivityFileV3Schema, radarActivityFileV3Url, radarActivityMaxBytes, radarActivityProgressSchema, radarActivityProgressV2Schema, radarActivityProgressV3Schema, radarActivityReactionCountsSchema, radarActivityReactionIdSchema, radarActivityReactionIds, radarAiRadarContentLanguage, radarAiRadarDigestV2Schema, radarAiRadarEntrySchema, radarAiRadarEntryV2Schema, radarAiRadarEventUrl, radarAiRadarEventV2MaxBytes, radarAiRadarEventV2Path, radarAiRadarEventV2Schema, radarAiRadarFollowUpSchema, radarAiRadarIdV2Schema, radarAiRadarKindSchema, radarAiRadarLatestMaxBytes, radarAiRadarLatestPath, radarAiRadarLatestSchema, radarAiRadarLatestV2MaxBytes, radarAiRadarLatestV2Path, radarAiRadarLatestV2Schema, radarAiRadarLeakSchema, radarAiRadarMonthMaxBytes, radarAiRadarMonthPath, radarAiRadarMonthSchema, radarAiRadarMonthV2MaxBytes, radarAiRadarMonthV2Path, radarAiRadarMonthV2Schema, radarAiRadarPublicationTimeSchema, radarAiRadarSourceSchema, radarAiRadarSourceStaleMs, radarAiRadarSourceV2Schema, radarAiRadarSourcesStale, radarAiRadarStoryStatus, radarAiRadarSummarySchema, radarAiRadarTimeInWindow, radarAiRadarTimeView, radarAiRadarTitleSchema, radarBrowserNotificationPageUrl, radarBrowserNotificationProjectionSchema, radarBrowserNotificationTargetUrlSchema, radarBrowserNotificationTopicSchema, radarBrowserRegistrationSchema, radarBrowserSubscriptionErrorRes, radarBrowserSubscriptionFailureSchema, radarBrowserSubscriptionOperationSchema, radarBrowserSubscriptionReadReq, radarBrowserSubscriptionRes, radarBrowserSubscriptionSaveReq, radarBrowserSubscriptionSaveV2Req, radarBrowserSubscriptionV2Res, radarBrowserSubscriptionViewSchema, radarBrowserSubscriptionViewV2Schema, radarBrowserSubscriptionsPath, radarBrowserTopicsSchema, radarBrowserTopicsV2Schema, radarCodexGuessChoiceSchema, radarCodexGuessErrorSchema, radarCodexGuessSaveReqSchema, radarCodexGuessViewSchema, radarCodexModelIdSchema, radarCodexModelUrl, radarCodexModelsMaxBytes, radarCodexModelsPath, radarCodexModelsSchema, radarCodexProgressCalendar, radarCodexProgressChangeSchema, radarCodexProgressChangeV2Schema, radarCodexProgressChangeV3Schema, radarCodexProgressChangesV1Schema, radarCodexProgressChangesV2Schema, radarCodexProgressChangesV3Schema, radarCodexProgressEntrySchema, radarCodexProgressEntryV3Schema, radarCodexProgressEntryV5Schema, radarCodexProgressImprovementV5Schema, radarCodexProgressOutcome, radarCodexProgressPostRoleV5Schema, radarCodexProgressPostV5Schema, radarCodexProgressPostsV5Schema, radarCodexProgressResetEntryV5Schema, radarCodexProgressScore, radarCodexProgressTitleV3Schema, radarCodexProgressV1Schema, radarCodexProgressV2MaxBytes, radarCodexProgressV2Schema, radarCodexProgressV3MaxBytes, radarCodexProgressV3Schema, radarCodexProgressV4MaxBytes, radarCodexProgressV4Schema, radarCodexProgressV5MaxBytes, radarCodexProgressV5Schema, radarCodexReleaseDirectoryMaxBytes, radarCodexReleaseDirectoryPath, radarCodexReleaseDirectorySchema, radarCodexReleaseIdentitySchema, radarCodexReleaseMonthMaxBytes, radarCodexReleaseMonthPath, radarCodexReleaseMonthSchema, radarCodexReleaseNotesMaxBytes, radarCodexReleaseNotesPath, radarCodexReleaseNotesSchema, radarCodexReleaseSectionsSchema, radarCodexReleaseUrl, radarCodexTimePointSchema, radarCompactTitle, radarImprovementColumnPath, radarImprovementEligibilityReq, radarImprovementEligibilityRes, radarImprovementEntrySchema, radarImprovementErrorRes, radarImprovementHeadReq, radarImprovementHeadRes, radarImprovementPageMaxBytes, radarImprovementPageReq, radarImprovementPageRes, radarImprovementPageSize, radarNotificationProjectionSchema, radarNotificationTargetSchema, radarNotificationTaskPageSize, radarNotificationTaskSchema, radarNotificationTasksPath, radarNotificationTasksReq, radarNotificationTasksRes, radarNotificationTopicSchema, radarNotificationTopicsSchema, radarResetActionDetailV1Schema, radarResetActionDetailV2Schema, radarResetActionDetailV3Schema, radarResetActionItemV2Schema, radarResetActionPageMaxBytesV2, radarResetActionPageMaxItemsV2, radarResetActionSummaryV2Schema, radarResetActiveActionItemV2Schema, radarResetAnalysisV1Schema, radarResetAnalyzerContractVersionV1, radarResetAudienceValues, radarResetChangeCoverageV2Schema, radarResetChangePageMaxBytesV2, radarResetChangePageMaxItemsV2, radarResetClueLifetimeMs, radarResetClueMaxBytes, radarResetCluePath, radarResetClueSchema, radarResetClueSnapshotSchema, radarResetConfirmationSchema, radarResetConfirmationsResponseSchema, radarResetContractVersionV1, radarResetContractVersionV2, radarResetDetailBatchMaxBytesV2, radarResetDetailBatchMaxChunksV2, radarResetDetailChunkReferenceV2Schema, radarResetDetailChunkRequestV2Schema, radarResetDetailManifestV2Schema, radarResetEffectValues, radarResetExportV1Schema, radarResetExportV2Schema, radarResetExportV3Schema, radarResetExportV4Schema, radarResetKindNoticeV2Schema, radarResetManagementActionSchema, radarResetManagementOperationSchema, radarResetManagementResSchema, radarResetManualApplyReqSchema, radarResetManualCopySchema, radarResetManualDraftSchema, radarResetManualDraftSeedSchema, radarResetManualPreviewReqSchema, radarResetManualPreviewResSchema, radarResetManualResultResSchema, radarResetNoticeKindValues, radarResetPendingActionV1Schema, radarResetPendingActionV2Schema, radarResetPlanValues, radarResetPositiveDecimalV2Schema, radarResetProductValues, radarResetPublicActionV1Schema, radarResetPublicDataLimits, radarResetPublicIdV2Schema, radarResetPublicRecordsCorePath, radarResetPublicRecordsV1Schema, radarResetPublicationHomeFactsV2Schema, radarResetPublicationRevisionAvailableV2Schema, radarResetPublicationTimingSchema, radarResetReadActionsDataV2Schema, radarResetReadActionsRequestV2Schema, radarResetReadActionsSuccessV2Schema, radarResetReadChangesDataV2Schema, radarResetReadChangesRequestV2Schema, radarResetReadChangesSuccessV2Schema, radarResetReadDetailBatchRequestV2Schema, radarResetReadHeadDataV2Schema, radarResetReadHeadRequestV2Schema, radarResetReadHeadSuccessV2Schema, radarResetReasonBasisValues, radarResetReasonCategoryValues, radarResetSafeCauseSnapshotV2Schema, radarResetSeriesValues, radarResetSha256V2Schema, radarResetSnapshotAvailableV1Schema, radarResetSourceChangeV2Schema, radarResetSourceErrorCodeValuesV2, radarResetSourceErrorEnvelopeV2Schema, radarResetSourceErrorHttpStatusV2, radarResetSourceErrorIsRetryableV2, radarResetSourceErrorV2Schema, radarResetSourceMaxRpcCallsV2, radarResetSourceTranslationsSchema, radarResetStatisticsResponseV3Schema, radarResetStatisticsV1Schema, radarResetStatisticsV2Schema, radarResetUInt64DecimalV2Schema, radarResetUInt64DecimalV2ToBigInt, radarResetUnexecutedActionV1Schema, radarResetUtcTimestampV2Schema, radarResetWithdrawnActionItemV2Schema, radarResetWithdrawnActionV1Schema, radarTiboSourceStatusMaxBytes, radarTiboSourceStatusPath, radarTiboSourceStatusSchema, radarTitledActivityFileSchema, radarTitledActivityProgressSchema, radarWebsiteLegacyChinesePrefix, radarWebsiteLocalePrefixes, radarWebsiteLocaleSlugs, radarWebsiteLocales, radarWebsiteOrigin, radarWebsitePagePaths, radarWebsitePageUrl, radarWechatDispatchPath, radarWechatDispatchRequestSchema, radarWechatDispatchResponseSchema, radarWechatDispatchResultSchema, radarWechatPrivateDispatchPath, readRadarActivityFile, readRadarActivityFileV2, readRadarActivityFileV3, readRadarAiRadarEventV2, readRadarAiRadarLatest, readRadarAiRadarLatestV2, readRadarAiRadarMonth, readRadarAiRadarMonthV2, readRadarCodexModels, readRadarCodexReleaseDirectory, readRadarCodexReleaseMonth, readRadarCodexReleaseNotes, readRadarResetClueSnapshot, readRadarTiboSourceStatus, readRadarTitledActivityFile, redactRadarBrowserRegistrationReferences, refineRadarResetStatistics, toSafeCauseSnapshotV2, upgradeRadarBrowserSubscriptionCommandV1 };
|
|
10712
|
+
export { CreateRadarResetSourceErrorEnvelopeInputV2, RadarActivityFile, RadarActivityFileV2, RadarActivityFileV3, RadarActivityProgress, RadarActivityProgressV2, RadarActivityProgressV3, RadarActivityReactionId, RadarAiRadarDigestV2, RadarAiRadarEntry, RadarAiRadarEntryV2, RadarAiRadarEventV2, RadarAiRadarFollowUp, RadarAiRadarLatest, RadarAiRadarLatestV2, RadarAiRadarLeak, RadarAiRadarMonth, RadarAiRadarMonthV2, RadarAiRadarSource, RadarAiRadarSourceV2, RadarAiRadarSummary, RadarAiRadarTitle, RadarBrowserNotificationProjection, RadarBrowserSubscriptionFailure, RadarBrowserSubscriptionRead, RadarBrowserSubscriptionSave, RadarBrowserSubscriptionSaveV2, RadarBrowserSubscriptionView, RadarBrowserSubscriptionViewV2, RadarBrowserTopics, RadarBrowserTopicsV2, RadarCodexGuessChoice, RadarCodexGuessError, RadarCodexGuessSaveReq, RadarCodexGuessView, RadarCodexModel, RadarCodexModels, RadarCodexProgressChange, RadarCodexProgressChangeV2, RadarCodexProgressChangeV3, RadarCodexProgressChangesV1, RadarCodexProgressChangesV2, RadarCodexProgressChangesV3, RadarCodexProgressEntryV3, RadarCodexProgressEntryV5, RadarCodexProgressImprovementV5, RadarCodexProgressPostRoleV5, RadarCodexProgressPostV5, RadarCodexProgressResetEntryV5, RadarCodexProgressTitleV3, RadarCodexProgressV1, RadarCodexProgressV2, RadarCodexProgressV3, RadarCodexProgressV4, RadarCodexProgressV5, RadarCodexReleaseDirectory, RadarCodexReleaseMonth, RadarCodexReleaseNotes, RadarCodexTimePoint, RadarImprovementEntry, RadarImprovementHead, RadarImprovementPage, RadarNotificationProjection, RadarNotificationTarget, RadarNotificationTask, RadarNotificationTasks, RadarNotificationTopic, RadarResetActionDetailV1, RadarResetActionDetailV2, RadarResetActionDetailV3, RadarResetActionItemV2, RadarResetActionSummaryV2, RadarResetActiveActionItemV2, RadarResetAnalysisV1, RadarResetClue, RadarResetClueSnapshot, RadarResetConfirmation, RadarResetDetailChunkReferenceV2, RadarResetDetailChunkRequestV2, RadarResetDetailManifestV2, RadarResetDetailMultipartEncodeInputV2, RadarResetDetailMultipartParseInputV2, RadarResetDetailMultipartPartV2, RadarResetExportV1, RadarResetExportV2, RadarResetExportV3, RadarResetExportV4, RadarResetManagement, RadarResetManagementProduct, RadarResetPendingActionV1, RadarResetPendingActionV2, RadarResetPositiveDecimalV2, RadarResetPrimarySourceV1, RadarResetProductPublicRecordsV1, RadarResetProductRecordsProduct, RadarResetPublicActionV1, RadarResetPublicIdV2, RadarResetPublicRecordsV1, RadarResetPublicationHomeFactsV2, RadarResetPublicationRevisionAvailableV2, RadarResetPublicationTiming, RadarResetReadActionsRequestV2, RadarResetReadActionsSuccessV2, RadarResetReadChangesRequestV2, RadarResetReadChangesSuccessV2, RadarResetReadDetailBatchRequestV2, RadarResetReadHeadRequestV2, RadarResetReadHeadSuccessV2, RadarResetSafeCauseSnapshotV2, RadarResetSafeCauseValueV2, RadarResetSha256V2, RadarResetSnapshotAvailableV1, RadarResetSourceContractErrorInputV2, RadarResetSourceContractErrorV2, RadarResetSourceErrorCodeV2, RadarResetSourceErrorEnvelopeV2, RadarResetSourceErrorV2, RadarResetSourceTranslations, RadarResetStatisticsResponseV3, RadarResetStatisticsV1, RadarResetStatisticsV2, RadarResetUInt64DecimalV2, RadarResetUtcTimestampV2, RadarTiboSourceStatus, RadarTitledActivityFile, RadarTitledActivityProgress, RadarWebsiteLocale, RadarWechatDispatchRequest, RadarWechatDispatchResponse, RadarWechatDispatchResult, activeRadarResetClue, compareRadarAiRadarEntries, compareRadarAiRadarEntriesV2, compareRadarAiRadarPublicationTimes, compareRadarNotificationTasks, compareRadarResetActionDetailsV1, compareRadarResetUtcTimestampsV1, createRadarBrowserNotificationProjection, createRadarCodexProgressCalendar, createRadarNotificationProjection, createRadarResetSourceErrorEnvelopeV2, encodeRadarActivityFile, encodeRadarActivityFileV2, encodeRadarActivityFileV3, encodeRadarResetDetailMultipartV2, encodeRadarTitledActivityFile, formatRadarResetPositiveDecimalV2, formatRadarResetUInt64DecimalV2, initialRadarBrowserSubscription, initialRadarBrowserSubscriptionV2, parseRadarAiRadarEventV2, parseRadarAiRadarLatest, parseRadarAiRadarLatestV2, parseRadarAiRadarMonth, parseRadarAiRadarMonthV2, parseRadarCodexModels, parseRadarCodexProgressChangeV3, parseRadarCodexProgressChangesV3, parseRadarCodexProgressV1, parseRadarCodexProgressV2, parseRadarCodexProgressV3, parseRadarCodexProgressV4, parseRadarCodexProgressV5, parseRadarCodexReleaseDirectory, parseRadarCodexReleaseMonth, parseRadarCodexReleaseNotes, parseRadarResetActionDetailV1, parseRadarResetActionDetailV2, parseRadarResetActionDetailV3, parseRadarResetActionSummaryV2, parseRadarResetAnalysisV1, parseRadarResetClueSnapshot, parseRadarResetDetailMultipartV2, parseRadarResetExportV1, parseRadarResetExportV2, parseRadarResetExportV3, parseRadarResetExportV4, parseRadarResetPendingActionV1, parseRadarResetPendingActionV2, parseRadarResetPositiveDecimalV2, parseRadarResetPublicationHomeFactsV2, parseRadarResetPublicationRevisionAvailableV2, parseRadarResetReadActionsRequestV2, parseRadarResetReadActionsSuccessV2, parseRadarResetReadChangesRequestV2, parseRadarResetReadChangesSuccessV2, parseRadarResetReadDetailBatchRequestV2, parseRadarResetReadHeadRequestV2, parseRadarResetReadHeadSuccessV2, parseRadarResetSnapshotAvailableV1, parseRadarResetSourceErrorEnvelopeV2, parseRadarResetUInt64DecimalV2, projectRadarBrowserSubscriptionSelection, projectRadarBrowserSubscriptionV1, projectRadarResetExportV1FromV2, projectRadarResetExportV3FromV2, projectRadarResetPrimarySourceV1, projectRadarResetPublicActionToV2, radarActivityEventIdSchema, radarActivityFileSchema, radarActivityFileUrl, radarActivityFileV2Schema, radarActivityFileV2Url, radarActivityFileV3Schema, radarActivityFileV3Url, radarActivityMaxBytes, radarActivityProgressSchema, radarActivityProgressV2Schema, radarActivityProgressV3Schema, radarActivityReactionCountsSchema, radarActivityReactionIdSchema, radarActivityReactionIds, radarAiRadarContentLanguage, radarAiRadarDigestV2Schema, radarAiRadarEntrySchema, radarAiRadarEntryV2Schema, radarAiRadarEventUrl, radarAiRadarEventV2MaxBytes, radarAiRadarEventV2Path, radarAiRadarEventV2Schema, radarAiRadarFollowUpSchema, radarAiRadarIdV2Schema, radarAiRadarKindSchema, radarAiRadarLatestMaxBytes, radarAiRadarLatestPath, radarAiRadarLatestSchema, radarAiRadarLatestV2MaxBytes, radarAiRadarLatestV2Path, radarAiRadarLatestV2Schema, radarAiRadarLeakSchema, radarAiRadarMonthMaxBytes, radarAiRadarMonthPath, radarAiRadarMonthSchema, radarAiRadarMonthV2MaxBytes, radarAiRadarMonthV2Path, radarAiRadarMonthV2Schema, radarAiRadarPublicationTimeSchema, radarAiRadarSourceSchema, radarAiRadarSourceStaleMs, radarAiRadarSourceV2Schema, radarAiRadarSourcesStale, radarAiRadarStoryStatus, radarAiRadarSummarySchema, radarAiRadarTimeInWindow, radarAiRadarTimeView, radarAiRadarTitleSchema, radarBrowserNotificationPageUrl, radarBrowserNotificationProjectionSchema, radarBrowserNotificationTargetUrlSchema, radarBrowserNotificationTopicSchema, radarBrowserRegistrationSchema, radarBrowserSubscriptionErrorRes, radarBrowserSubscriptionFailureSchema, radarBrowserSubscriptionOperationSchema, radarBrowserSubscriptionReadReq, radarBrowserSubscriptionRes, radarBrowserSubscriptionSaveReq, radarBrowserSubscriptionSaveV2Req, radarBrowserSubscriptionV2Res, radarBrowserSubscriptionViewSchema, radarBrowserSubscriptionViewV2Schema, radarBrowserSubscriptionsPath, radarBrowserTopicsSchema, radarBrowserTopicsV2Schema, radarCodexGuessChoiceSchema, radarCodexGuessErrorSchema, radarCodexGuessSaveReqSchema, radarCodexGuessViewSchema, radarCodexModelIdSchema, radarCodexModelUrl, radarCodexModelsMaxBytes, radarCodexModelsPath, radarCodexModelsSchema, radarCodexProgressCalendar, radarCodexProgressChangeSchema, radarCodexProgressChangeV2Schema, radarCodexProgressChangeV3Schema, radarCodexProgressChangesV1Schema, radarCodexProgressChangesV2Schema, radarCodexProgressChangesV3Schema, radarCodexProgressEntrySchema, radarCodexProgressEntryV3Schema, radarCodexProgressEntryV5Schema, radarCodexProgressImprovementV5Schema, radarCodexProgressOutcome, radarCodexProgressPostRoleV5Schema, radarCodexProgressPostV5Schema, radarCodexProgressPostsV5Schema, radarCodexProgressResetEntryV5Schema, radarCodexProgressScore, radarCodexProgressTitleV3Schema, radarCodexProgressV1Schema, radarCodexProgressV2MaxBytes, radarCodexProgressV2Schema, radarCodexProgressV3MaxBytes, radarCodexProgressV3Schema, radarCodexProgressV4MaxBytes, radarCodexProgressV4Schema, radarCodexProgressV5MaxBytes, radarCodexProgressV5Schema, radarCodexReleaseDirectoryMaxBytes, radarCodexReleaseDirectoryPath, radarCodexReleaseDirectorySchema, radarCodexReleaseIdentitySchema, radarCodexReleaseMonthMaxBytes, radarCodexReleaseMonthPath, radarCodexReleaseMonthSchema, radarCodexReleaseNotesMaxBytes, radarCodexReleaseNotesPath, radarCodexReleaseNotesSchema, radarCodexReleaseSectionsSchema, radarCodexReleaseUrl, radarCodexTimePointSchema, radarCompactTitle, radarImprovementColumnPath, radarImprovementEligibilityReq, radarImprovementEligibilityRes, radarImprovementEntrySchema, radarImprovementErrorRes, radarImprovementHeadReq, radarImprovementHeadRes, radarImprovementPageMaxBytes, radarImprovementPageReq, radarImprovementPageRes, radarImprovementPageSize, radarNotificationProjectionSchema, radarNotificationTargetSchema, radarNotificationTaskPageSize, radarNotificationTaskSchema, radarNotificationTasksPath, radarNotificationTasksReq, radarNotificationTasksRes, radarNotificationTopicSchema, radarNotificationTopicsSchema, radarResetActionDetailV1Schema, radarResetActionDetailV2Schema, radarResetActionDetailV3Schema, radarResetActionItemV2Schema, radarResetActionPageMaxBytesV2, radarResetActionPageMaxItemsV2, radarResetActionSummaryV2Schema, radarResetActiveActionItemV2Schema, radarResetAnalysisV1Schema, radarResetAnalyzerContractVersionV1, radarResetAudienceValues, radarResetChangeCoverageV2Schema, radarResetChangePageMaxBytesV2, radarResetChangePageMaxItemsV2, radarResetClueLifetimeMs, radarResetClueMaxBytes, radarResetCluePath, radarResetClueSchema, radarResetClueSnapshotSchema, radarResetConfirmationSchema, radarResetConfirmationsResponseSchema, radarResetContractVersionV1, radarResetContractVersionV2, radarResetDetailBatchMaxBytesV2, radarResetDetailBatchMaxChunksV2, radarResetDetailChunkReferenceV2Schema, radarResetDetailChunkRequestV2Schema, radarResetDetailManifestV2Schema, radarResetEffectValues, radarResetExportV1Schema, radarResetExportV2Schema, radarResetExportV3Schema, radarResetExportV4Schema, radarResetKindNoticeV2Schema, radarResetManagementActionSchema, radarResetManagementOperationSchema, radarResetManagementProductSchema, radarResetManagementResSchema, radarResetManualApplyReqSchema, radarResetManualCopySchema, radarResetManualDraftSchema, radarResetManualDraftSeedSchema, radarResetManualPreviewReqSchema, radarResetManualPreviewResSchema, radarResetManualResultResSchema, radarResetNoticeKindValues, radarResetPendingActionV1Schema, radarResetPendingActionV2Schema, radarResetPlanValues, radarResetPositiveDecimalV2Schema, radarResetProductPublicRecordsCorePath, radarResetProductPublicRecordsV1Schema, radarResetProductRecordsProductValues, radarResetProductValues, radarResetPublicActionV1Schema, radarResetPublicDataLimits, radarResetPublicIdV2Schema, radarResetPublicRecordsCorePath, radarResetPublicRecordsV1Schema, radarResetPublicationHomeFactsV2Schema, radarResetPublicationRevisionAvailableV2Schema, radarResetPublicationTimingSchema, radarResetReadActionsDataV2Schema, radarResetReadActionsRequestV2Schema, radarResetReadActionsSuccessV2Schema, radarResetReadChangesDataV2Schema, radarResetReadChangesRequestV2Schema, radarResetReadChangesSuccessV2Schema, radarResetReadDetailBatchRequestV2Schema, radarResetReadHeadDataV2Schema, radarResetReadHeadRequestV2Schema, radarResetReadHeadSuccessV2Schema, radarResetReasonBasisValues, radarResetReasonCategoryValues, radarResetSafeCauseSnapshotV2Schema, radarResetSeriesValues, radarResetSha256V2Schema, radarResetSnapshotAvailableV1Schema, radarResetSourceChangeV2Schema, radarResetSourceErrorCodeValuesV2, radarResetSourceErrorEnvelopeV2Schema, radarResetSourceErrorHttpStatusV2, radarResetSourceErrorIsRetryableV2, radarResetSourceErrorV2Schema, radarResetSourceMaxRpcCallsV2, radarResetSourceTranslationsSchema, radarResetStatisticsResponseV3Schema, radarResetStatisticsV1Schema, radarResetStatisticsV2Schema, radarResetUInt64DecimalV2Schema, radarResetUInt64DecimalV2ToBigInt, radarResetUnexecutedActionV1Schema, radarResetUtcTimestampV2Schema, radarResetWithdrawnActionItemV2Schema, radarResetWithdrawnActionV1Schema, radarTiboSourceStatusMaxBytes, radarTiboSourceStatusPath, radarTiboSourceStatusSchema, radarTitledActivityFileSchema, radarTitledActivityProgressSchema, radarWebsiteLegacyChinesePrefix, radarWebsiteLocalePrefixes, radarWebsiteLocaleSlugs, radarWebsiteLocales, radarWebsiteOrigin, radarWebsitePagePaths, radarWebsitePageUrl, radarWechatDispatchPath, radarWechatDispatchRequestSchema, radarWechatDispatchResponseSchema, radarWechatDispatchResultSchema, radarWechatPrivateDispatchPath, readRadarActivityFile, readRadarActivityFileV2, readRadarActivityFileV3, readRadarAiRadarEventV2, readRadarAiRadarLatest, readRadarAiRadarLatestV2, readRadarAiRadarMonth, readRadarAiRadarMonthV2, readRadarCodexModels, readRadarCodexReleaseDirectory, readRadarCodexReleaseMonth, readRadarCodexReleaseNotes, readRadarResetClueSnapshot, readRadarTiboSourceStatus, readRadarTitledActivityFile, redactRadarBrowserRegistrationReferences, refineRadarResetStatistics, toSafeCauseSnapshotV2, upgradeRadarBrowserSubscriptionCommandV1 };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{z as e}from"zod";function t(e,t,n){let r=(e,t)=>{try{return n(e,t)}catch{return}};e.noticeCount!==e.noticeTimeline.length&&t.addIssue({code:`custom`,message:`action_notice_count_mismatch`,path:[`noticeCount`]});for(let[n,i]of e.noticeTimeline.entries())if(n===0){let n=r(i.authoredAt,e.firstAnnouncedAt);n!==void 0&&n!==0&&t.addIssue({code:`custom`,message:`notice_timeline_first_announcement_mismatch`,path:[`noticeTimeline`,0,`authoredAt`]})}else{let a=r(e.noticeTimeline.at(n-1).authoredAt,i.authoredAt);a!==void 0&&a>0&&t.addIssue({code:`custom`,message:`notice_timeline_not_ascending`,path:[`noticeTimeline`,n,`authoredAt`]})}}const n=1,r=4,i=Object.freeze({exportUtf8Bytes:2*1024*1024,analysis:Object.freeze({actions:512,intervals:511}),actionDetail:Object.freeze({noticeTimeline:64,reasons:128}),text:Object.freeze({publicTextCodePoints:500,evidenceExcerptCodePoints:500,urlCodePoints:2048})}),a=[`all`,`hard_reset`,`banked_reset`],o=[`hard_reset`,`banked_reset`],s=[`codex`,`chatgpt_work`],c=[`all_users`,`paid_users`,`named_plans`,`affected_subset`],l=[`plus`,`pro`],u=[`incident_compensation`,`user_milestone`,`celebration`],d=[`explicit_in_reset_post`,`explicit_in_related_source`,`contextual_inference`,`unknown`],ee=[`weekday`,`weekday_group`,`hour`,`six_hour_block`,`month`,`day_of_month`,`week_of_month`,`weekday_hour`,`minute_of_hour`,`five_minute_bucket`,`half_hour_slot`,`time_of_day_minute`],te=[`month`,`weekday`,`hour`,`six_hour_block`],f=e.number().finite(),p=f.min(0),m=e.number().int().min(0),h=e.number().int().positive(),g=f.min(0).max(1),_=e.iso.datetime({offset:!0}).refine(e=>e.endsWith(`Z`),{message:`utc_timestamp_required`}).refine(e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e),{message:`utc_timestamp_seconds_required`}),v=e.string().min(1).max(128).refine(e=>e===e.trim()&&!/[\p{Cc}\p{Cf}]/u.test(e),{message:`public_id_invalid`}),y=e.enum(a),ne=e.enum(u),re=e.enum(d),ie=e.object({contractVersion:e.literal(1),eventId:v,eventType:e.literal(`reset_analysis_snapshot_available`),analysisSnapshotId:v,sourceWatermark:v,occurredAt:_}).strict();function ae(e){return ie.parse(e)}function oe(e){return[...e].length}function se(e){return new TextEncoder().encode(JSON.stringify(e)).byteLength}const ce=e.string().refine(e=>oe(e)<=i.text.evidenceExcerptCodePoints,{message:`evidence_excerpt_too_long`}),le=e.string().refine(e=>e.trim().length>0,{message:`source_text_empty`}),ue=e.string().refine(e=>oe(e)<=i.text.publicTextCodePoints,{message:`public_text_too_long`}),de=e.string().refine(e=>e.trim().length>0,{message:`source_account_display_name_blank`}).refine(e=>oe(e)<=i.text.publicTextCodePoints,{message:`source_account_display_name_too_long`}),fe=e.string().refine(e=>oe(e)<=i.text.urlCodePoints,{message:`source_url_too_long`}).refine(e=>{if([...e].some(e=>{let t=e.codePointAt(0);return t===void 0||t<=31||t===127}))return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.username.length===0&&t.password.length===0}catch{return!1}},{message:`https_url_required`});function b(e){return new Set(e).size===e.length}const pe=e.discriminatedUnion(`state`,[e.object({state:e.literal(`known`),values:e.array(e.enum(o)).min(1).refine(b,{message:`reset_effects_must_be_unique`})}),e.object({state:e.literal(`unknown`),values:e.tuple([])})]),me=e.object({products:e.array(e.enum(s)).refine(b,{message:`products_must_be_unique`}),audienceClaims:e.array(e.object({audience:e.enum(c),plans:e.array(e.enum(l)).refine(b,{message:`plans_must_be_unique`}),subsetSummary:ue.nullable()}))}),he=e.object({resetActionId:v,firstAnnouncedAt:_,effectiveAt:_.nullable(),resetEffects:pe,actionScope:me,reasonCategories:e.array(ne).refine(b,{message:`reason_categories_must_be_unique`}),noticeCount:h,previousAllActionDays:p.nullable(),previousHardResetActionDays:p.nullable(),previousBankedResetActionDays:p.nullable()}),ge=e.object({series:y,previousActionId:v,actionId:v,fromFirstAnnouncedAt:_,toFirstAnnouncedAt:_,days:p}),_e=e.object({count:h,min:p,max:p,mean:p,median:p,percentile25:p,percentile75:p,percentile90:p,standardDeviation:p,coefficientOfVariation:p.nullable(),interquartileRange:p}),ve=e.object({lower:p,upper:p}),ye=e.object({iterations:h,seed:e.number().int(),mean95:ve,median95:ve}),be=e.object({bucket:e.string().min(1),lowerInclusive:p,upperExclusive:p.nullable(),count:m,share:g}),xe=e.object({endingIndex:m,windowSize:h,mean:p,median:p}),Se=e.object({firstHalf:_e.nullable(),secondHalf:_e.nullable(),meanChangeDays:f.nullable(),meanChangePercent:f.nullable()}),Ce=e.object({series:y,actionCount:m,completedIntervalCount:m,intervalSummary:_e.nullable(),bootstrap95:ye.nullable(),intervalHistogram:e.array(be),shortestIntervals:e.array(ge),longestIntervals:e.array(ge),rolling3:e.array(xe),rolling5:e.array(xe),linearSlopeDaysPerInterval:f.nullable(),halfComparison:Se,survivalCurve:e.array(e.object({elapsedDays:p,survivalProbability:g}))}),we=e.object({series:y,elapsedDays:p,horizonDays:p,sampleAtRisk:m,eventsWithinWindow:m,probability:g.nullable()}),Te=e.object({key:e.string(),count:m,share:g,timeZone:e.string().min(1),series:y,dimension:e.enum(ee)}),Ee=e.object({timeZone:e.string().min(1),series:y,dimension:e.enum(ee),categoryCount:h,nonZeroCategoryCount:m,maxShare:g,herfindahlIndex:g,normalizedEntropy:g}),De=e.object({startMinute:e.number().int().min(0).max(1439),endMinute:e.number().int().min(0).max(1439),wrapsMidnight:e.boolean(),eventCount:m,share:g}),Oe=e.object({timeZone:e.string().min(1),series:y,eventCount:h,slotMinutes:h,fixedWindows:e.array(e.object({durationMinutes:h,bestWindows:e.array(De)})),coverageWindows:e.array(e.object({targetShare:g,requiredEventCount:h,durationMinutes:h,bestWindows:e.array(De)}))}),ke=e.object({series:y,thresholdDays:p,clusterCount:m,multiEventClusterCount:m,largestClusterSize:m,eventsInMultiEventClusters:m,eventShareInMultiEventClusters:g}),Ae=e.object({category:ne,actionCount:m,actionShare:g,hardResetActionCount:m,bankedResetActionCount:m,explicitInResetPostCount:m,explicitInRelatedSourceCount:m,contextualInferenceCount:m,unknownCount:m}),je=e.object({category:ne,series:y,timeZone:e.string().min(1),dimension:e.enum(te),key:e.string(),eventCount:m,reasonEventCount:m,binEventCount:m,seriesEventCount:m,shareWithinReason:g.nullable(),shareWithinBin:g.nullable(),shareOfSeries:g.nullable()}),Me=e.object({overview:e.object({actionCount:h,hardResetActionCount:m,bankedResetActionCount:m,firstAnnouncedAt:_,lastAnnouncedAt:_,coverageDays:p,sourceNoticeCount:h}),actions:e.array(he).min(1).max(i.analysis.actions),intervals:e.array(ge).max(i.analysis.intervals),series:e.object({all:Ce,hard_reset:Ce,banked_reset:Ce}),historicalConditionalFrequencies:e.array(we),calendars:e.array(Te),calendarConcentrations:e.array(Ee),intradayRanges:e.array(Oe),clusters:e.array(ke),reasons:e.object({summary:e.array(Ae),crossTabs:e.array(je)}),caveats:e.array(ue.min(1))}),Ne=e.object({contractVersion:e.literal(1),analyzerContractVersion:e.literal(4),generatedAt:_,analysisWindow:e.object({startAt:_,startInclusive:e.boolean(),timeBasis:e.literal(`first_announcement`),throughFirstAnnouncedAt:_}),result:Me}).superRefine((e,t)=>{let n=e.result.actions,r=e.result.overview;n.length!==r.actionCount&&t.addIssue({code:`custom`,message:`analysis_action_count_mismatch`,path:[`result`,`actions`]});let i=new Set;for(let e=0;e<n.length;e+=1){let r=n[e];i.has(r.resetActionId)&&t.addIssue({code:`custom`,message:`analysis_action_identity_duplicate`,path:[`result`,`actions`,e,`resetActionId`]}),i.add(r.resetActionId);let a=n[e-1];a!==void 0&&(a.firstAnnouncedAt>r.firstAnnouncedAt||a.firstAnnouncedAt===r.firstAnnouncedAt&&a.resetActionId>r.resetActionId)&&t.addIssue({code:`custom`,message:`analysis_actions_not_stably_sorted`,path:[`result`,`actions`,e]})}let o=(e,r,i)=>{i!==void 0&&e.series!==i&&t.addIssue({code:`custom`,message:`analysis_interval_series_mismatch`,path:[...r,`series`]});let a=i??e.series,o=a===`all`?n:n.filter(e=>e.resetEffects.state===`known`&&e.resetEffects.values.includes(a)),s=o.findIndex(t=>t.resetActionId===e.actionId),c=o[s];if(c===void 0){t.addIssue({code:`custom`,message:`analysis_interval_action_mismatch`,path:[...r,`actionId`]});return}let l=o[s-1];(l===void 0||e.previousActionId!==l.resetActionId)&&t.addIssue({code:`custom`,message:`analysis_interval_previous_action_mismatch`,path:[...r,`previousActionId`]}),l!==void 0&&e.fromFirstAnnouncedAt!==l.firstAnnouncedAt&&t.addIssue({code:`custom`,message:`analysis_interval_from_first_announcement_mismatch`,path:[...r,`fromFirstAnnouncedAt`]}),e.toFirstAnnouncedAt!==c.firstAnnouncedAt&&t.addIssue({code:`custom`,message:`analysis_interval_to_first_announcement_mismatch`,path:[...r,`toFirstAnnouncedAt`]})};e.result.intervals.forEach((e,t)=>o(e,[`result`,`intervals`,t]));for(let t of a){let n=e.result.series[t];for(let e of[`shortestIntervals`,`longestIntervals`])n[e].forEach((n,r)=>o(n,[`result`,`series`,t,e,r],t))}n[0]?.firstAnnouncedAt!==r.firstAnnouncedAt&&t.addIssue({code:`custom`,message:`analysis_first_action_mismatch`,path:[`result`,`overview`,`firstAnnouncedAt`]}),(n.at(-1)?.firstAnnouncedAt!==r.lastAnnouncedAt||e.analysisWindow.throughFirstAnnouncedAt!==r.lastAnnouncedAt)&&t.addIssue({code:`custom`,message:`analysis_last_action_mismatch`,path:[`result`,`overview`,`lastAnnouncedAt`]});for(let[n,r]of Object.entries({all:`all`,hard_reset:`hard_reset`,banked_reset:`banked_reset`}))e.result.series[n].series!==r&&t.addIssue({code:`custom`,message:`analysis_series_identity_mismatch`,path:[`result`,`series`,n,`series`]})}),Pe=e.object({excerpt:ce,sourceUrl:fe});function Fe(e,t){try{return Ue(e,t)}catch{return}}function Ie(e,t){try{return C(e,t)}catch{return}}const x=e.object({contractVersion:e.literal(1),resetActionId:v,firstAnnouncedAt:_,effectiveAt:_.nullable(),resetEffects:pe,actionScope:me,noticeCount:h,reasons:e.array(e.object({category:ne,summary:ue.min(1),basis:re,evidence:e.array(Pe).min(1)})).max(i.actionDetail.reasons),noticeTimeline:e.array(e.object({phase:e.enum([`preview`,`executed`]),authoredAt:_,contentCompleteness:e.enum([`verified_full_text`,`verified_excerpt`]),sourceText:le,sourceTextZh:le.nullable(),sourceUrl:fe,sourceAccount:e.object({displayName:de})})).min(1).max(i.actionDetail.noticeTimeline)}).superRefine((e,n)=>t(e,n,C)),Le=[`preview`,`executed`,`schedule_change`,`scope_change`,`cancel_preview`,`delivery_issue`,`make_up`,`repair`,`update`],Re=e.object({resolution:e.enum([`resolved`,`unbounded`,`unresolved`]),evidence:e.string().trim().min(1).max(300).nullable(),precision:e.enum([`exact`,`approximate`,`range`]).nullable(),relation:e.enum([`instant`,`interval`,`deadline`,`not_before`,`unbounded`]).nullable(),effectiveWindow:e.object({earliestAt:e.iso.datetime(),latestAt:e.iso.datetime()}).refine(e=>Date.parse(e.earliestAt)<=Date.parse(e.latestAt),{message:`publication_timing_window_inverted`}).nullable()}).superRefine((e,t)=>{let n=e=>t.addIssue({code:`custom`,message:e});e.resolution===`resolved`!=(e.effectiveWindow!==null)&&n(`publication_timing_resolution_window_mismatch`),e.resolution===`unbounded`&&e.relation!==`unbounded`&&n(`publication_timing_unbounded_relation_required`);let r=e.effectiveWindow;e.resolution===`resolved`&&((e.relation===null||e.relation===`unbounded`)&&n(`publication_timing_bounded_relation_required`),r!==null&&e.relation===`interval`==(r.earliestAt===r.latestAt)&&n(`publication_timing_relation_window_mismatch`))}),S=e.object({resetActionId:v,state:e.enum([`preview`,`executed`]),resetEffects:pe,executedEffects:e.array(e.enum(o)).refine(b),pendingEffects:e.array(e.enum(o)).refine(b),plannedTiming:Re.nullable(),noticeTimeline:e.array(x.shape.noticeTimeline.element.omit({phase:!0}).extend({kinds:e.array(e.enum(Le)).min(1).refine(b)})).min(1).max(i.actionDetail.noticeTimeline)}).superRefine((e,t)=>{e.state===`preview`&&e.executedEffects.length>0&&t.addIssue({code:`custom`,message:`pending_preview_has_executed_effects`}),e.state===`executed`&&e.pendingEffects.length===0&&t.addIssue({code:`custom`,message:`pending_executed_action_has_no_pending_effects`});for(let n of[...e.executedEffects,...e.pendingEffects])new Set(e.resetEffects.values).has(n)||t.addIssue({code:`custom`,message:`pending_effect_not_declared`});e.executedEffects.some(t=>e.pendingEffects.includes(t))&&t.addIssue({code:`custom`,message:`pending_effect_already_executed`});for(let n=1;n<e.noticeTimeline.length;n+=1){let r=e.noticeTimeline[n-1],i=e.noticeTimeline[n],a=Ie(r.authoredAt,i.authoredAt);a!==void 0&&a>0&&t.addIssue({code:`custom`,message:`pending_notice_timeline_not_ascending`,path:[`noticeTimeline`,n]})}}),ze=e.object({contractVersion:e.literal(1),generatedAt:_,analysis:Ne,actions:e.array(x).min(1).max(i.analysis.actions),pendingResetActions:e.array(S).max(i.analysis.actions)});function Be(e,t){se(e)>i.exportUtf8Bytes&&t.addIssue({code:`custom`,message:`export_utf8_size_limit_exceeded`,path:[]});let n=Ie(e.generatedAt,e.analysis.generatedAt);n!==void 0&&n<0&&t.addIssue({code:`custom`,message:`export_generated_at_before_analysis`,path:[`generatedAt`]})}function Ve(e,t,n,r){(e.resetActionId!==t.resetActionId||e.firstAnnouncedAt!==t.firstAnnouncedAt||e.effectiveAt!==t.effectiveAt||e.noticeCount!==t.noticeCount||JSON.stringify(e.resetEffects)!==JSON.stringify(t.resetEffects)||JSON.stringify(e.actionScope)!==JSON.stringify(t.actionScope))&&r.addIssue({code:`custom`,message:`export_action_summary_mismatch`,path:[`actions`,n]});let i=[...new Set(e.reasons.map(e=>e.category))].sort();JSON.stringify(i)!==JSON.stringify([...t.reasonCategories].sort())&&r.addIssue({code:`custom`,message:`export_action_reason_categories_mismatch`,path:[`actions`,n,`reasons`]})}const He=ze.superRefine((e,t)=>{Be(e,t),b(e.pendingResetActions.map(e=>e.resetActionId))||t.addIssue({code:`custom`,message:`export_pending_action_identity_duplicate`,path:[`pendingResetActions`]});let n=new Map,r=new Set(e.analysis.result.actions.map(e=>e.resetActionId));for(let i=0;i<e.actions.length;i+=1){let a=e.actions[i];n.has(a.resetActionId)?t.addIssue({code:`custom`,message:`export_action_identity_duplicate`,path:[`actions`,i,`resetActionId`]}):n.set(a.resetActionId,i);let o=e.actions[i-1],s=o===void 0?void 0:Fe(o,a);s!==void 0&&s>0&&t.addIssue({code:`custom`,message:`export_actions_not_stably_sorted`,path:[`actions`,i]});let c=Ie(a.firstAnnouncedAt,e.analysis.analysisWindow.throughFirstAnnouncedAt);c!==void 0&&c>0&&t.addIssue({code:`custom`,message:`export_action_after_analysis_snapshot`,path:[`actions`,i,`firstAnnouncedAt`]});let l=Ie(a.firstAnnouncedAt,e.analysis.analysisWindow.startAt);l!==void 0&&(e.analysis.analysisWindow.startInclusive?l>=0:l>0)&&!r.has(a.resetActionId)&&t.addIssue({code:`custom`,message:`export_window_action_not_in_analysis`,path:[`actions`,i,`resetActionId`]})}for(let r of e.analysis.result.actions){let i=n.get(r.resetActionId);if(i===void 0){t.addIssue({code:`custom`,message:`export_analysis_action_missing`,path:[`actions`]});continue}Ve(e.actions[i],r,i,t)}});function C(e,t){let n=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?Z$/,r=n.exec(e),i=n.exec(t);if(r===null||i===null)throw Error(`radar_reset_v1_timestamp_invalid`);let a=r[1],o=i[1];if(a<o)return-1;if(a>o)return 1;let s=r[2]??``,c=i[2]??``,l=Math.max(s.length,c.length);for(let e=0;e<l;e+=1){let t=s.charCodeAt(e)||48,n=c.charCodeAt(e)||48;if(t<n)return-1;if(t>n)return 1}return 0}function Ue(e,t){let n=C(e.firstAnnouncedAt,t.firstAnnouncedAt);return n===0?e.resetActionId<t.resetActionId?-1:+(e.resetActionId>t.resetActionId):n}function We(e){return Ne.parse(e)}function Ge(e){return x.parse(e)}function Ke(e){return He.parse(e)}function qe(e){return S.parse(e)}function Je(e){let t;try{t=Ge(e)}catch(e){throw Error(`radar_reset_primary_source_action_invalid`,{cause:e})}let n=t.noticeTimeline[0];if(n===void 0)throw Error(`radar_reset_primary_source_notice_missing`);return Object.freeze({displayName:n.sourceAccount.displayName,sourceUrl:n.sourceUrl,excerpt:[...n.sourceText.trim()].slice(0,i.text.publicTextCodePoints).join(``)})}const Ye=2,Xe=30,Ze=256,Qe=512*1024,$e=256,et=256*1024,tt=32,nt=2*1024*1024,rt=9223372036854775807n,it=e.string().regex(/^(?:0|[1-9][0-9]{0,18})$/,`uint64_decimal_noncanonical`).refine(e=>BigInt(e)<=rt,`uint64_decimal_out_of_range`),w=e.string().regex(/^[1-9][0-9]{0,18}$/,`positive_decimal_noncanonical`).refine(e=>BigInt(e)<=rt,`positive_decimal_out_of_range`);function at(e){return it.parse(e)}function ot(e){return w.parse(e)}function st(e){return BigInt(at(e))}function ct(e){if(e<0n||e>rt)throw RangeError(`uint64_decimal_out_of_range`);return e.toString()}function lt(e){if(e<1n||e>rt)throw RangeError(`positive_decimal_out_of_range`);return e.toString()}const T=e.iso.datetime({offset:!0}).refine(e=>e.endsWith(`Z`),`utc_timestamp_required`).refine(e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e),`utc_timestamp_seconds_required`),E=e.string().min(1).max(128).refine(e=>e===e.trim()&&!/[\p{Cc}\p{Cf}]/u.test(e),`public_id_invalid`),D=e.string().regex(/^sha256:[0-9a-f]{64}$/,`sha256_noncanonical`);function ut(e){return new Set(e).size===e.length}const dt=t=>e.array(t).refine(ut,`array_values_must_be_unique`),ft=t=>e.string().refine(e=>[...e].length<=t,`string_exceeds_${t}_code_points`),pt=e.number().finite().min(0),mt=e.number().int().min(0).max(2**53-1),ht=e.number().int().positive().max(2**53-1),gt=e.enum([`hard_reset`,`banked_reset`]),_t=e.enum([`codex`,`chatgpt_work`]),vt=e.enum([`all_users`,`paid_users`,`named_plans`,`affected_subset`]),yt=e.enum([`plus`,`pro`]),bt=e.enum([`incident_compensation`,`user_milestone`,`celebration`]),xt=e.object({resetActionId:E,firstAnnouncedAt:T,effectiveAt:T.nullable(),resetEffects:e.union([e.object({state:e.literal(`known`),values:dt(gt).nonempty()}),e.object({state:e.literal(`unknown`),values:e.tuple([])})]),actionScope:e.object({products:dt(_t),audienceClaims:e.array(e.object({audience:vt,plans:dt(yt),subsetSummary:ft(500).nullable()}))}),reasonCategories:dt(bt),noticeCount:ht,previousAllActionDays:pt.nullable(),previousHardResetActionDays:pt.nullable(),previousBankedResetActionDays:pt.nullable()});function St(e){return xt.parse(e)}const Ct=e.object({generatedAt:T,availableRange:e.object({firstAnnouncedAt:T,lastAnnouncedAt:T}).nullable(),current:e.object({summary:xt,status:e.object({phase:e.enum([`preview`,`executed`]),statusAt:T})}).nullable()}).superRefine((e,t)=>{if(e.availableRange===null!=(e.current===null)){t.addIssue({code:`custom`,message:`home_empty_state_inconsistent`});return}e.availableRange!==null&&e.current!==null&&e.current.summary.firstAnnouncedAt!==e.availableRange.lastAnnouncedAt&&t.addIssue({code:`custom`,message:`home_current_range_inconsistent`})});function wt(e){return Ct.parse(e)}const Tt=e.object({ordinal:mt,sha256:D,byteSize:ht}),Et=e.object({sha256:D,byteSize:ht,chunkCount:ht,chunks:e.array(Tt).min(1)}).superRefine((e,t)=>{e.chunkCount!==e.chunks.length&&t.addIssue({code:`custom`,message:`chunk_count_mismatch`});let n=0;for(let[r,i]of e.chunks.entries())i.ordinal!==r&&t.addIssue({code:`custom`,message:`chunk_ordinal_invalid`}),n+=i.byteSize;n!==e.byteSize&&t.addIssue({code:`custom`,message:`detail_byte_size_mismatch`})}),Dt=e.object({lifecycleState:e.literal(`active`),actionOrdinal:w,summary:xt,detailManifest:Et}),Ot=e.object({lifecycleState:e.literal(`withdrawn`),actionOrdinal:w,resetActionId:E,lastActiveFirstAnnouncedAt:T}),kt=e.discriminatedUnion(`lifecycleState`,[Dt,Ot]),At=e.object({contractVersion:e.literal(2)}).strict(),jt=e.object({contractVersion:e.literal(2),revision:E,cursor:w.nullable()}).strict(),Mt=e.object({contractVersion:e.literal(2),revision:E,afterSequence:it}).strict(),Nt=e.object({resetActionId:E,ordinal:mt,sha256:D,byteSize:ht}).strict(),Pt=e.object({contractVersion:e.literal(2),revision:E,chunks:e.array(Nt).min(1).max(32)}).strict().superRefine((e,t)=>{e.chunks.reduce((e,t)=>e+t.byteSize,0)>2097152&&t.addIssue({code:`custom`,message:`detail_batch_too_large`}),ut(e.chunks.map(e=>`${e.resetActionId}\u0000${e.ordinal}`))||t.addIssue({code:`custom`,message:`detail_chunk_duplicate`})}),Ft=e.object({lifecycleState:e.enum([`active`,`withdrawn`]),firstAnnouncedAt:T.nullable(),contentSha256:D.nullable()}).superRefine((e,t)=>{e.lifecycleState===`active`&&(e.firstAnnouncedAt===null||e.contentSha256===null)&&t.addIssue({code:`custom`,message:`active_change_state_incomplete`})}),It=e.object({sourceChangeSequence:w,introducedByRevision:E,resetActionId:E,kind:e.enum([`create`,`upsert`,`withdraw`]),activationKind:e.enum([`initial`,`restored`]).nullable(),activationOrdinal:w.nullable(),before:Ft.nullable(),after:Ft.nullable()}).superRefine((e,t)=>{e.activationKind===null!=(e.activationOrdinal===null)&&t.addIssue({code:`custom`,message:`activation_pair_invalid`}),e.kind===`create`&&(e.activationKind!==`initial`||e.before!==null||e.after?.lifecycleState!==`active`)&&t.addIssue({code:`custom`,message:`create_change_invalid`}),e.kind===`withdraw`&&(e.activationKind!==null||e.before?.lifecycleState!==`active`||e.after?.lifecycleState!==`withdrawn`)&&t.addIssue({code:`custom`,message:`withdraw_change_invalid`}),e.kind===`upsert`&&e.activationKind===`initial`&&t.addIssue({code:`custom`,message:`upsert_activation_invalid`})}),Lt=e.object({minSequence:e.literal(`1`),maxSequence:w}),Rt=e.object({revision:E,projectionFingerprint:D,actionCount:mt,activeActionCount:mt,changeCoverage:Lt.nullable(),home:Ct}).superRefine((e,t)=>{e.activeActionCount>e.actionCount&&t.addIssue({code:`custom`,message:`active_action_count_invalid`}),e.activeActionCount===0!=(e.home.availableRange===null)&&t.addIssue({code:`custom`,message:`head_home_count_inconsistent`})}),zt=e.object({revision:E,items:e.array(kt).max(256),nextCursor:w.nullable()}).superRefine((e,t)=>{for(let n=1;n<e.items.length;n+=1){let r=e.items.at(n-1),i=e.items.at(n);if(r!==void 0&&i!==void 0&&BigInt(r.actionOrdinal)>=BigInt(i.actionOrdinal)){t.addIssue({code:`custom`,message:`action_ordinal_order_invalid`});break}}let n=e.items.at(-1);e.nextCursor!==null&&n?.actionOrdinal!==e.nextCursor&&t.addIssue({code:`custom`,message:`action_cursor_invalid`})}),Bt=e.object({revision:E,coverage:Lt.nullable(),items:e.array(It).max(256),nextAfterSequence:w.nullable()}).superRefine((e,t)=>{for(let n=1;n<e.items.length;n+=1){let r=e.items.at(n-1),i=e.items.at(n);if(r!==void 0&&i!==void 0&&BigInt(r.sourceChangeSequence)+1n!==BigInt(i.sourceChangeSequence)){t.addIssue({code:`custom`,message:`change_sequence_gap`});break}}let n=e.items.at(-1);e.nextAfterSequence!==null&&n?.sourceChangeSequence!==e.nextAfterSequence&&t.addIssue({code:`custom`,message:`change_cursor_invalid`})}),Vt=t=>e.object({contractVersion:e.literal(2),ok:e.literal(!0),data:t}),Ht=Vt(Rt),Ut=Vt(zt),Wt=Vt(Bt),Gt=[`source_invalid_request`,`source_revision_unknown`,`source_cursor_invalid`,`source_chunk_mismatch`,`source_response_over_capacity`,`source_integrity_conflict`,`source_revision_identity_conflict`,`source_sequence_exhausted`,`source_temporarily_unavailable`,`source_rpc_transport_failure`,`source_stream_incomplete`];function Kt(e,t=0,n=new Set){if(t>4)return!1;if(e===null||typeof e==`boolean`)return!0;if(typeof e==`string`)return[...e].length<=1024;if(typeof e==`number`)return Number.isFinite(e);if(typeof e!=`object`||n.has(e))return!1;if(n.add(e),Array.isArray(e))return e.length>16?!1:e.every(e=>Kt(e,t+1,n));let r=Object.entries(e);return r.length>16?!1:r.every(([,e])=>Kt(e,t+1,n))}const qt=e.record(e.string(),e.unknown()).refine(e=>Kt(e),`safe_cause_invalid`).refine(e=>new TextEncoder().encode(JSON.stringify(e)).byteLength<=8192,`safe_cause_too_large`),Jt=e.object({code:e.enum(Gt),operation:E,stage:E,revision:E.optional(),retryable:e.boolean(),correlationId:E,cause:qt}),Yt=e.object({contractVersion:e.literal(2),ok:e.literal(!1),error:Jt}),Xt=e.object({contractVersion:e.literal(2),eventType:e.literal(`reset_publication_revision_available`),eventId:e.string().regex(/^reset_pub_v2_[0-9a-f]{64}$/),revision:E,changeHighWater:it,projectionFingerprint:D,occurredAt:T}).strict();function Zt(e){return At.parse(e)}function Qt(e){return jt.parse(e)}function $t(e){return Mt.parse(e)}function en(e){return Pt.parse(e)}function tn(e){return Ht.parse(e)}function nn(e){return Ut.parse(e)}function rn(e){return Wt.parse(e)}function an(e){return Yt.parse(e)}function on(e){return Xt.parse(e)}var sn=class extends Error{code;operation;stage;retryable;constructor(e){super(`${e.code}:${e.stage}`,{cause:e.cause}),this.name=`RadarResetSourceContractErrorV2`,this.code=e.code,this.operation=e.operation,this.stage=e.stage,this.retryable=e.retryable}};const O=new TextEncoder,cn=new TextDecoder(`utf-8`,{fatal:!0});function ln(e,t,n){if(n+t.byteLength>e.byteLength)return!1;for(let r=0;r<t.byteLength;r+=1)if(e.at(n+r)!==t.at(r))return!1;return!0}function un(e,t){if(t.byteLength===0)return!0;for(let n=0;n<=e.byteLength-t.byteLength;n+=1)if(ln(e,t,n))return!0;return!1}function dn(e){let t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}function fn(e){let t=``;for(let n=0;n<e.byteLength;n+=32768)t+=String.fromCharCode(...e.slice(n,n+32768));return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/u,``)}function pn(e){if(!/^[A-Za-z0-9_-]+$/u.test(e))throw Error(`base64url_noncanonical`);let t=(4-e.length%4)%4,n=`${e.replaceAll(`-`,`+`).replaceAll(`_`,`/`)}${`=`.repeat(t)}`,r=atob(n),i=Uint8Array.from(r,e=>e.charCodeAt(0));if(fn(i)!==e)throw Error(`base64url_noncanonical`);return i}async function mn(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return`sha256:${[...new Uint8Array(await crypto.subtle.digest(`SHA-256`,t))].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function hn(e){for(let t=0;t<64;t+=1){let t=`radar-reset-v2-${[...crypto.getRandomValues(new Uint8Array(24))].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`,n=O.encode(`--${t}`);if(!e.some(e=>un(e,n)))return t}throw Error(`multipart_boundary_generation_failed`)}async function gn(e){let t=E.parse(e.revision),n=E.parse(e.correlationId),r=Pt.parse({contractVersion:2,revision:t,chunks:e.parts.map(({bytes:e,...t})=>t)}),i=e.parts.map((e,t)=>({...r.chunks[t],bytes:new Uint8Array(e.bytes)}));for(let e of i)if(e.bytes.byteLength!==e.byteSize||await mn(e.bytes)!==e.sha256)throw new sn({code:`source_chunk_mismatch`,operation:`readDetailBatch`,stage:`detail_encode`,retryable:!1});let a=hn(i.map(e=>e.bytes)),o=[];for(let e of i)o.push(O.encode(`--${a}\r\nContent-Type: application/octet-stream\r
|
|
1
|
+
import{z as e}from"zod";function t(e,t,n){let r=(e,t)=>{try{return n(e,t)}catch{return}};e.noticeCount!==e.noticeTimeline.length&&t.addIssue({code:`custom`,message:`action_notice_count_mismatch`,path:[`noticeCount`]});for(let[n,i]of e.noticeTimeline.entries())if(n===0){let n=r(i.authoredAt,e.firstAnnouncedAt);n!==void 0&&n!==0&&t.addIssue({code:`custom`,message:`notice_timeline_first_announcement_mismatch`,path:[`noticeTimeline`,0,`authoredAt`]})}else{let a=r(e.noticeTimeline.at(n-1).authoredAt,i.authoredAt);a!==void 0&&a>0&&t.addIssue({code:`custom`,message:`notice_timeline_not_ascending`,path:[`noticeTimeline`,n,`authoredAt`]})}}const n=1,r=4,i=Object.freeze({exportUtf8Bytes:2*1024*1024,analysis:Object.freeze({actions:512,intervals:511}),actionDetail:Object.freeze({noticeTimeline:64,reasons:128}),text:Object.freeze({publicTextCodePoints:500,evidenceExcerptCodePoints:500,urlCodePoints:2048})}),a=[`all`,`hard_reset`,`banked_reset`],o=[`hard_reset`,`banked_reset`],s=[`codex`,`chatgpt_work`,`claude`,`antigravity`],c=[`all_users`,`paid_users`,`named_plans`,`affected_subset`],l=[`plus`,`pro`],u=[`incident_compensation`,`user_milestone`,`celebration`],d=[`explicit_in_reset_post`,`explicit_in_related_source`,`contextual_inference`,`unknown`],ee=[`weekday`,`weekday_group`,`hour`,`six_hour_block`,`month`,`day_of_month`,`week_of_month`,`weekday_hour`,`minute_of_hour`,`five_minute_bucket`,`half_hour_slot`,`time_of_day_minute`],te=[`month`,`weekday`,`hour`,`six_hour_block`],f=e.number().finite(),p=f.min(0),m=e.number().int().min(0),h=e.number().int().positive(),g=f.min(0).max(1),_=e.iso.datetime({offset:!0}).refine(e=>e.endsWith(`Z`),{message:`utc_timestamp_required`}).refine(e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e),{message:`utc_timestamp_seconds_required`}),v=e.string().min(1).max(128).refine(e=>e===e.trim()&&!/[\p{Cc}\p{Cf}]/u.test(e),{message:`public_id_invalid`}),y=e.enum(a),ne=e.enum(u),re=e.enum(d),ie=e.object({contractVersion:e.literal(1),eventId:v,eventType:e.literal(`reset_analysis_snapshot_available`),analysisSnapshotId:v,sourceWatermark:v,occurredAt:_}).strict();function ae(e){return ie.parse(e)}function oe(e){return[...e].length}function se(e){return new TextEncoder().encode(JSON.stringify(e)).byteLength}const ce=e.string().refine(e=>oe(e)<=i.text.evidenceExcerptCodePoints,{message:`evidence_excerpt_too_long`}),le=e.string().refine(e=>e.trim().length>0,{message:`source_text_empty`}),ue=e.string().refine(e=>oe(e)<=i.text.publicTextCodePoints,{message:`public_text_too_long`}),de=e.string().refine(e=>e.trim().length>0,{message:`source_account_display_name_blank`}).refine(e=>oe(e)<=i.text.publicTextCodePoints,{message:`source_account_display_name_too_long`}),fe=e.string().refine(e=>oe(e)<=i.text.urlCodePoints,{message:`source_url_too_long`}).refine(e=>{if([...e].some(e=>{let t=e.codePointAt(0);return t===void 0||t<=31||t===127}))return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.username.length===0&&t.password.length===0}catch{return!1}},{message:`https_url_required`});function b(e){return new Set(e).size===e.length}const pe=e.discriminatedUnion(`state`,[e.object({state:e.literal(`known`),values:e.array(e.enum(o)).min(1).refine(b,{message:`reset_effects_must_be_unique`})}),e.object({state:e.literal(`unknown`),values:e.tuple([])})]),me=e.object({products:e.array(e.enum(s)).refine(b,{message:`products_must_be_unique`}),audienceClaims:e.array(e.object({audience:e.enum(c),plans:e.array(e.enum(l)).refine(b,{message:`plans_must_be_unique`}),subsetSummary:ue.nullable()}))}),he=e.object({resetActionId:v,firstAnnouncedAt:_,effectiveAt:_.nullable(),resetEffects:pe,actionScope:me,reasonCategories:e.array(ne).refine(b,{message:`reason_categories_must_be_unique`}),noticeCount:h,previousAllActionDays:p.nullable(),previousHardResetActionDays:p.nullable(),previousBankedResetActionDays:p.nullable()}),ge=e.object({series:y,previousActionId:v,actionId:v,fromFirstAnnouncedAt:_,toFirstAnnouncedAt:_,days:p}),_e=e.object({count:h,min:p,max:p,mean:p,median:p,percentile25:p,percentile75:p,percentile90:p,standardDeviation:p,coefficientOfVariation:p.nullable(),interquartileRange:p}),ve=e.object({lower:p,upper:p}),ye=e.object({iterations:h,seed:e.number().int(),mean95:ve,median95:ve}),be=e.object({bucket:e.string().min(1),lowerInclusive:p,upperExclusive:p.nullable(),count:m,share:g}),xe=e.object({endingIndex:m,windowSize:h,mean:p,median:p}),Se=e.object({firstHalf:_e.nullable(),secondHalf:_e.nullable(),meanChangeDays:f.nullable(),meanChangePercent:f.nullable()}),Ce=e.object({series:y,actionCount:m,completedIntervalCount:m,intervalSummary:_e.nullable(),bootstrap95:ye.nullable(),intervalHistogram:e.array(be),shortestIntervals:e.array(ge),longestIntervals:e.array(ge),rolling3:e.array(xe),rolling5:e.array(xe),linearSlopeDaysPerInterval:f.nullable(),halfComparison:Se,survivalCurve:e.array(e.object({elapsedDays:p,survivalProbability:g}))}),we=e.object({series:y,elapsedDays:p,horizonDays:p,sampleAtRisk:m,eventsWithinWindow:m,probability:g.nullable()}),Te=e.object({key:e.string(),count:m,share:g,timeZone:e.string().min(1),series:y,dimension:e.enum(ee)}),Ee=e.object({timeZone:e.string().min(1),series:y,dimension:e.enum(ee),categoryCount:h,nonZeroCategoryCount:m,maxShare:g,herfindahlIndex:g,normalizedEntropy:g}),De=e.object({startMinute:e.number().int().min(0).max(1439),endMinute:e.number().int().min(0).max(1439),wrapsMidnight:e.boolean(),eventCount:m,share:g}),Oe=e.object({timeZone:e.string().min(1),series:y,eventCount:h,slotMinutes:h,fixedWindows:e.array(e.object({durationMinutes:h,bestWindows:e.array(De)})),coverageWindows:e.array(e.object({targetShare:g,requiredEventCount:h,durationMinutes:h,bestWindows:e.array(De)}))}),ke=e.object({series:y,thresholdDays:p,clusterCount:m,multiEventClusterCount:m,largestClusterSize:m,eventsInMultiEventClusters:m,eventShareInMultiEventClusters:g}),Ae=e.object({category:ne,actionCount:m,actionShare:g,hardResetActionCount:m,bankedResetActionCount:m,explicitInResetPostCount:m,explicitInRelatedSourceCount:m,contextualInferenceCount:m,unknownCount:m}),je=e.object({category:ne,series:y,timeZone:e.string().min(1),dimension:e.enum(te),key:e.string(),eventCount:m,reasonEventCount:m,binEventCount:m,seriesEventCount:m,shareWithinReason:g.nullable(),shareWithinBin:g.nullable(),shareOfSeries:g.nullable()}),Me=e.object({overview:e.object({actionCount:h,hardResetActionCount:m,bankedResetActionCount:m,firstAnnouncedAt:_,lastAnnouncedAt:_,coverageDays:p,sourceNoticeCount:h}),actions:e.array(he).min(1).max(i.analysis.actions),intervals:e.array(ge).max(i.analysis.intervals),series:e.object({all:Ce,hard_reset:Ce,banked_reset:Ce}),historicalConditionalFrequencies:e.array(we),calendars:e.array(Te),calendarConcentrations:e.array(Ee),intradayRanges:e.array(Oe),clusters:e.array(ke),reasons:e.object({summary:e.array(Ae),crossTabs:e.array(je)}),caveats:e.array(ue.min(1))}),Ne=e.object({contractVersion:e.literal(1),analyzerContractVersion:e.literal(4),generatedAt:_,analysisWindow:e.object({startAt:_,startInclusive:e.boolean(),timeBasis:e.literal(`first_announcement`),throughFirstAnnouncedAt:_}),result:Me}).superRefine((e,t)=>{let n=e.result.actions,r=e.result.overview;n.length!==r.actionCount&&t.addIssue({code:`custom`,message:`analysis_action_count_mismatch`,path:[`result`,`actions`]});let i=new Set;for(let e=0;e<n.length;e+=1){let r=n[e];i.has(r.resetActionId)&&t.addIssue({code:`custom`,message:`analysis_action_identity_duplicate`,path:[`result`,`actions`,e,`resetActionId`]}),i.add(r.resetActionId);let a=n[e-1];a!==void 0&&(a.firstAnnouncedAt>r.firstAnnouncedAt||a.firstAnnouncedAt===r.firstAnnouncedAt&&a.resetActionId>r.resetActionId)&&t.addIssue({code:`custom`,message:`analysis_actions_not_stably_sorted`,path:[`result`,`actions`,e]})}let o=(e,r,i)=>{i!==void 0&&e.series!==i&&t.addIssue({code:`custom`,message:`analysis_interval_series_mismatch`,path:[...r,`series`]});let a=i??e.series,o=a===`all`?n:n.filter(e=>e.resetEffects.state===`known`&&e.resetEffects.values.includes(a)),s=o.findIndex(t=>t.resetActionId===e.actionId),c=o[s];if(c===void 0){t.addIssue({code:`custom`,message:`analysis_interval_action_mismatch`,path:[...r,`actionId`]});return}let l=o[s-1];(l===void 0||e.previousActionId!==l.resetActionId)&&t.addIssue({code:`custom`,message:`analysis_interval_previous_action_mismatch`,path:[...r,`previousActionId`]}),l!==void 0&&e.fromFirstAnnouncedAt!==l.firstAnnouncedAt&&t.addIssue({code:`custom`,message:`analysis_interval_from_first_announcement_mismatch`,path:[...r,`fromFirstAnnouncedAt`]}),e.toFirstAnnouncedAt!==c.firstAnnouncedAt&&t.addIssue({code:`custom`,message:`analysis_interval_to_first_announcement_mismatch`,path:[...r,`toFirstAnnouncedAt`]})};e.result.intervals.forEach((e,t)=>o(e,[`result`,`intervals`,t]));for(let t of a){let n=e.result.series[t];for(let e of[`shortestIntervals`,`longestIntervals`])n[e].forEach((n,r)=>o(n,[`result`,`series`,t,e,r],t))}n[0]?.firstAnnouncedAt!==r.firstAnnouncedAt&&t.addIssue({code:`custom`,message:`analysis_first_action_mismatch`,path:[`result`,`overview`,`firstAnnouncedAt`]}),(n.at(-1)?.firstAnnouncedAt!==r.lastAnnouncedAt||e.analysisWindow.throughFirstAnnouncedAt!==r.lastAnnouncedAt)&&t.addIssue({code:`custom`,message:`analysis_last_action_mismatch`,path:[`result`,`overview`,`lastAnnouncedAt`]});for(let[n,r]of Object.entries({all:`all`,hard_reset:`hard_reset`,banked_reset:`banked_reset`}))e.result.series[n].series!==r&&t.addIssue({code:`custom`,message:`analysis_series_identity_mismatch`,path:[`result`,`series`,n,`series`]})}),Pe=e.object({excerpt:ce,sourceUrl:fe});function Fe(e,t){try{return Ue(e,t)}catch{return}}function Ie(e,t){try{return C(e,t)}catch{return}}const x=e.object({contractVersion:e.literal(1),resetActionId:v,firstAnnouncedAt:_,effectiveAt:_.nullable(),resetEffects:pe,actionScope:me,noticeCount:h,reasons:e.array(e.object({category:ne,summary:ue.min(1),basis:re,evidence:e.array(Pe).min(1)})).max(i.actionDetail.reasons),noticeTimeline:e.array(e.object({phase:e.enum([`preview`,`executed`]),authoredAt:_,contentCompleteness:e.enum([`verified_full_text`,`verified_excerpt`]),sourceText:le,sourceTextZh:le.nullable(),sourceUrl:fe,sourceAccount:e.object({displayName:de})})).min(1).max(i.actionDetail.noticeTimeline)}).superRefine((e,n)=>t(e,n,C)),Le=[`preview`,`executed`,`schedule_change`,`scope_change`,`cancel_preview`,`delivery_issue`,`make_up`,`repair`,`update`],Re=e.object({resolution:e.enum([`resolved`,`unbounded`,`unresolved`]),evidence:e.string().trim().min(1).max(300).nullable(),precision:e.enum([`exact`,`approximate`,`range`]).nullable(),relation:e.enum([`instant`,`interval`,`deadline`,`not_before`,`unbounded`]).nullable(),effectiveWindow:e.object({earliestAt:e.iso.datetime(),latestAt:e.iso.datetime()}).refine(e=>Date.parse(e.earliestAt)<=Date.parse(e.latestAt),{message:`publication_timing_window_inverted`}).nullable()}).superRefine((e,t)=>{let n=e=>t.addIssue({code:`custom`,message:e});e.resolution===`resolved`!=(e.effectiveWindow!==null)&&n(`publication_timing_resolution_window_mismatch`),e.resolution===`unbounded`&&e.relation!==`unbounded`&&n(`publication_timing_unbounded_relation_required`);let r=e.effectiveWindow;e.resolution===`resolved`&&((e.relation===null||e.relation===`unbounded`)&&n(`publication_timing_bounded_relation_required`),r!==null&&e.relation===`interval`==(r.earliestAt===r.latestAt)&&n(`publication_timing_relation_window_mismatch`))}),S=e.object({resetActionId:v,state:e.enum([`preview`,`executed`]),resetEffects:pe,executedEffects:e.array(e.enum(o)).refine(b),pendingEffects:e.array(e.enum(o)).refine(b),plannedTiming:Re.nullable(),noticeTimeline:e.array(x.shape.noticeTimeline.element.omit({phase:!0}).extend({kinds:e.array(e.enum(Le)).min(1).refine(b)})).min(1).max(i.actionDetail.noticeTimeline)}).superRefine((e,t)=>{e.state===`preview`&&e.executedEffects.length>0&&t.addIssue({code:`custom`,message:`pending_preview_has_executed_effects`}),e.state===`executed`&&e.pendingEffects.length===0&&t.addIssue({code:`custom`,message:`pending_executed_action_has_no_pending_effects`});for(let n of[...e.executedEffects,...e.pendingEffects])new Set(e.resetEffects.values).has(n)||t.addIssue({code:`custom`,message:`pending_effect_not_declared`});e.executedEffects.some(t=>e.pendingEffects.includes(t))&&t.addIssue({code:`custom`,message:`pending_effect_already_executed`});for(let n=1;n<e.noticeTimeline.length;n+=1){let r=e.noticeTimeline[n-1],i=e.noticeTimeline[n],a=Ie(r.authoredAt,i.authoredAt);a!==void 0&&a>0&&t.addIssue({code:`custom`,message:`pending_notice_timeline_not_ascending`,path:[`noticeTimeline`,n]})}}),ze=e.object({contractVersion:e.literal(1),generatedAt:_,analysis:Ne,actions:e.array(x).min(1).max(i.analysis.actions),pendingResetActions:e.array(S).max(i.analysis.actions)});function Be(e,t){se(e)>i.exportUtf8Bytes&&t.addIssue({code:`custom`,message:`export_utf8_size_limit_exceeded`,path:[]});let n=Ie(e.generatedAt,e.analysis.generatedAt);n!==void 0&&n<0&&t.addIssue({code:`custom`,message:`export_generated_at_before_analysis`,path:[`generatedAt`]})}function Ve(e,t,n,r){(e.resetActionId!==t.resetActionId||e.firstAnnouncedAt!==t.firstAnnouncedAt||e.effectiveAt!==t.effectiveAt||e.noticeCount!==t.noticeCount||JSON.stringify(e.resetEffects)!==JSON.stringify(t.resetEffects)||JSON.stringify(e.actionScope)!==JSON.stringify(t.actionScope))&&r.addIssue({code:`custom`,message:`export_action_summary_mismatch`,path:[`actions`,n]});let i=[...new Set(e.reasons.map(e=>e.category))].sort();JSON.stringify(i)!==JSON.stringify([...t.reasonCategories].sort())&&r.addIssue({code:`custom`,message:`export_action_reason_categories_mismatch`,path:[`actions`,n,`reasons`]})}const He=ze.superRefine((e,t)=>{Be(e,t),b(e.pendingResetActions.map(e=>e.resetActionId))||t.addIssue({code:`custom`,message:`export_pending_action_identity_duplicate`,path:[`pendingResetActions`]});let n=new Map,r=new Set(e.analysis.result.actions.map(e=>e.resetActionId));for(let i=0;i<e.actions.length;i+=1){let a=e.actions[i];n.has(a.resetActionId)?t.addIssue({code:`custom`,message:`export_action_identity_duplicate`,path:[`actions`,i,`resetActionId`]}):n.set(a.resetActionId,i);let o=e.actions[i-1],s=o===void 0?void 0:Fe(o,a);s!==void 0&&s>0&&t.addIssue({code:`custom`,message:`export_actions_not_stably_sorted`,path:[`actions`,i]});let c=Ie(a.firstAnnouncedAt,e.analysis.analysisWindow.throughFirstAnnouncedAt);c!==void 0&&c>0&&t.addIssue({code:`custom`,message:`export_action_after_analysis_snapshot`,path:[`actions`,i,`firstAnnouncedAt`]});let l=Ie(a.firstAnnouncedAt,e.analysis.analysisWindow.startAt);l!==void 0&&(e.analysis.analysisWindow.startInclusive?l>=0:l>0)&&!r.has(a.resetActionId)&&t.addIssue({code:`custom`,message:`export_window_action_not_in_analysis`,path:[`actions`,i,`resetActionId`]})}for(let r of e.analysis.result.actions){let i=n.get(r.resetActionId);if(i===void 0){t.addIssue({code:`custom`,message:`export_analysis_action_missing`,path:[`actions`]});continue}Ve(e.actions[i],r,i,t)}});function C(e,t){let n=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?Z$/,r=n.exec(e),i=n.exec(t);if(r===null||i===null)throw Error(`radar_reset_v1_timestamp_invalid`);let a=r[1],o=i[1];if(a<o)return-1;if(a>o)return 1;let s=r[2]??``,c=i[2]??``,l=Math.max(s.length,c.length);for(let e=0;e<l;e+=1){let t=s.charCodeAt(e)||48,n=c.charCodeAt(e)||48;if(t<n)return-1;if(t>n)return 1}return 0}function Ue(e,t){let n=C(e.firstAnnouncedAt,t.firstAnnouncedAt);return n===0?e.resetActionId<t.resetActionId?-1:+(e.resetActionId>t.resetActionId):n}function We(e){return Ne.parse(e)}function Ge(e){return x.parse(e)}function Ke(e){return He.parse(e)}function qe(e){return S.parse(e)}function Je(e){let t;try{t=Ge(e)}catch(e){throw Error(`radar_reset_primary_source_action_invalid`,{cause:e})}let n=t.noticeTimeline[0];if(n===void 0)throw Error(`radar_reset_primary_source_notice_missing`);return Object.freeze({displayName:n.sourceAccount.displayName,sourceUrl:n.sourceUrl,excerpt:[...n.sourceText.trim()].slice(0,i.text.publicTextCodePoints).join(``)})}const Ye=2,Xe=30,Ze=256,Qe=512*1024,$e=256,et=256*1024,tt=32,nt=2*1024*1024,rt=9223372036854775807n,it=e.string().regex(/^(?:0|[1-9][0-9]{0,18})$/,`uint64_decimal_noncanonical`).refine(e=>BigInt(e)<=rt,`uint64_decimal_out_of_range`),w=e.string().regex(/^[1-9][0-9]{0,18}$/,`positive_decimal_noncanonical`).refine(e=>BigInt(e)<=rt,`positive_decimal_out_of_range`);function at(e){return it.parse(e)}function ot(e){return w.parse(e)}function st(e){return BigInt(at(e))}function ct(e){if(e<0n||e>rt)throw RangeError(`uint64_decimal_out_of_range`);return e.toString()}function lt(e){if(e<1n||e>rt)throw RangeError(`positive_decimal_out_of_range`);return e.toString()}const T=e.iso.datetime({offset:!0}).refine(e=>e.endsWith(`Z`),`utc_timestamp_required`).refine(e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e),`utc_timestamp_seconds_required`),E=e.string().min(1).max(128).refine(e=>e===e.trim()&&!/[\p{Cc}\p{Cf}]/u.test(e),`public_id_invalid`),D=e.string().regex(/^sha256:[0-9a-f]{64}$/,`sha256_noncanonical`);function ut(e){return new Set(e).size===e.length}const dt=t=>e.array(t).refine(ut,`array_values_must_be_unique`),ft=t=>e.string().refine(e=>[...e].length<=t,`string_exceeds_${t}_code_points`),pt=e.number().finite().min(0),mt=e.number().int().min(0).max(2**53-1),ht=e.number().int().positive().max(2**53-1),gt=e.enum([`hard_reset`,`banked_reset`]),_t=e.enum([`codex`,`chatgpt_work`]),vt=e.enum([`all_users`,`paid_users`,`named_plans`,`affected_subset`]),yt=e.enum([`plus`,`pro`]),bt=e.enum([`incident_compensation`,`user_milestone`,`celebration`]),xt=e.object({resetActionId:E,firstAnnouncedAt:T,effectiveAt:T.nullable(),resetEffects:e.union([e.object({state:e.literal(`known`),values:dt(gt).nonempty()}),e.object({state:e.literal(`unknown`),values:e.tuple([])})]),actionScope:e.object({products:dt(_t),audienceClaims:e.array(e.object({audience:vt,plans:dt(yt),subsetSummary:ft(500).nullable()}))}),reasonCategories:dt(bt),noticeCount:ht,previousAllActionDays:pt.nullable(),previousHardResetActionDays:pt.nullable(),previousBankedResetActionDays:pt.nullable()});function St(e){return xt.parse(e)}const Ct=e.object({generatedAt:T,availableRange:e.object({firstAnnouncedAt:T,lastAnnouncedAt:T}).nullable(),current:e.object({summary:xt,status:e.object({phase:e.enum([`preview`,`executed`]),statusAt:T})}).nullable()}).superRefine((e,t)=>{if(e.availableRange===null!=(e.current===null)){t.addIssue({code:`custom`,message:`home_empty_state_inconsistent`});return}e.availableRange!==null&&e.current!==null&&e.current.summary.firstAnnouncedAt!==e.availableRange.lastAnnouncedAt&&t.addIssue({code:`custom`,message:`home_current_range_inconsistent`})});function wt(e){return Ct.parse(e)}const Tt=e.object({ordinal:mt,sha256:D,byteSize:ht}),Et=e.object({sha256:D,byteSize:ht,chunkCount:ht,chunks:e.array(Tt).min(1)}).superRefine((e,t)=>{e.chunkCount!==e.chunks.length&&t.addIssue({code:`custom`,message:`chunk_count_mismatch`});let n=0;for(let[r,i]of e.chunks.entries())i.ordinal!==r&&t.addIssue({code:`custom`,message:`chunk_ordinal_invalid`}),n+=i.byteSize;n!==e.byteSize&&t.addIssue({code:`custom`,message:`detail_byte_size_mismatch`})}),Dt=e.object({lifecycleState:e.literal(`active`),actionOrdinal:w,summary:xt,detailManifest:Et}),Ot=e.object({lifecycleState:e.literal(`withdrawn`),actionOrdinal:w,resetActionId:E,lastActiveFirstAnnouncedAt:T}),kt=e.discriminatedUnion(`lifecycleState`,[Dt,Ot]),At=e.object({contractVersion:e.literal(2)}).strict(),jt=e.object({contractVersion:e.literal(2),revision:E,cursor:w.nullable()}).strict(),Mt=e.object({contractVersion:e.literal(2),revision:E,afterSequence:it}).strict(),Nt=e.object({resetActionId:E,ordinal:mt,sha256:D,byteSize:ht}).strict(),Pt=e.object({contractVersion:e.literal(2),revision:E,chunks:e.array(Nt).min(1).max(32)}).strict().superRefine((e,t)=>{e.chunks.reduce((e,t)=>e+t.byteSize,0)>2097152&&t.addIssue({code:`custom`,message:`detail_batch_too_large`}),ut(e.chunks.map(e=>`${e.resetActionId}\u0000${e.ordinal}`))||t.addIssue({code:`custom`,message:`detail_chunk_duplicate`})}),Ft=e.object({lifecycleState:e.enum([`active`,`withdrawn`]),firstAnnouncedAt:T.nullable(),contentSha256:D.nullable()}).superRefine((e,t)=>{e.lifecycleState===`active`&&(e.firstAnnouncedAt===null||e.contentSha256===null)&&t.addIssue({code:`custom`,message:`active_change_state_incomplete`})}),It=e.object({sourceChangeSequence:w,introducedByRevision:E,resetActionId:E,kind:e.enum([`create`,`upsert`,`withdraw`]),activationKind:e.enum([`initial`,`restored`]).nullable(),activationOrdinal:w.nullable(),before:Ft.nullable(),after:Ft.nullable()}).superRefine((e,t)=>{e.activationKind===null!=(e.activationOrdinal===null)&&t.addIssue({code:`custom`,message:`activation_pair_invalid`}),e.kind===`create`&&(e.activationKind!==`initial`||e.before!==null||e.after?.lifecycleState!==`active`)&&t.addIssue({code:`custom`,message:`create_change_invalid`}),e.kind===`withdraw`&&(e.activationKind!==null||e.before?.lifecycleState!==`active`||e.after?.lifecycleState!==`withdrawn`)&&t.addIssue({code:`custom`,message:`withdraw_change_invalid`}),e.kind===`upsert`&&e.activationKind===`initial`&&t.addIssue({code:`custom`,message:`upsert_activation_invalid`})}),Lt=e.object({minSequence:e.literal(`1`),maxSequence:w}),Rt=e.object({revision:E,projectionFingerprint:D,actionCount:mt,activeActionCount:mt,changeCoverage:Lt.nullable(),home:Ct}).superRefine((e,t)=>{e.activeActionCount>e.actionCount&&t.addIssue({code:`custom`,message:`active_action_count_invalid`}),e.activeActionCount===0!=(e.home.availableRange===null)&&t.addIssue({code:`custom`,message:`head_home_count_inconsistent`})}),zt=e.object({revision:E,items:e.array(kt).max(256),nextCursor:w.nullable()}).superRefine((e,t)=>{for(let n=1;n<e.items.length;n+=1){let r=e.items.at(n-1),i=e.items.at(n);if(r!==void 0&&i!==void 0&&BigInt(r.actionOrdinal)>=BigInt(i.actionOrdinal)){t.addIssue({code:`custom`,message:`action_ordinal_order_invalid`});break}}let n=e.items.at(-1);e.nextCursor!==null&&n?.actionOrdinal!==e.nextCursor&&t.addIssue({code:`custom`,message:`action_cursor_invalid`})}),Bt=e.object({revision:E,coverage:Lt.nullable(),items:e.array(It).max(256),nextAfterSequence:w.nullable()}).superRefine((e,t)=>{for(let n=1;n<e.items.length;n+=1){let r=e.items.at(n-1),i=e.items.at(n);if(r!==void 0&&i!==void 0&&BigInt(r.sourceChangeSequence)+1n!==BigInt(i.sourceChangeSequence)){t.addIssue({code:`custom`,message:`change_sequence_gap`});break}}let n=e.items.at(-1);e.nextAfterSequence!==null&&n?.sourceChangeSequence!==e.nextAfterSequence&&t.addIssue({code:`custom`,message:`change_cursor_invalid`})}),Vt=t=>e.object({contractVersion:e.literal(2),ok:e.literal(!0),data:t}),Ht=Vt(Rt),Ut=Vt(zt),Wt=Vt(Bt),Gt=[`source_invalid_request`,`source_revision_unknown`,`source_cursor_invalid`,`source_chunk_mismatch`,`source_response_over_capacity`,`source_integrity_conflict`,`source_revision_identity_conflict`,`source_sequence_exhausted`,`source_temporarily_unavailable`,`source_rpc_transport_failure`,`source_stream_incomplete`];function Kt(e,t=0,n=new Set){if(t>4)return!1;if(e===null||typeof e==`boolean`)return!0;if(typeof e==`string`)return[...e].length<=1024;if(typeof e==`number`)return Number.isFinite(e);if(typeof e!=`object`||n.has(e))return!1;if(n.add(e),Array.isArray(e))return e.length>16?!1:e.every(e=>Kt(e,t+1,n));let r=Object.entries(e);return r.length>16?!1:r.every(([,e])=>Kt(e,t+1,n))}const qt=e.record(e.string(),e.unknown()).refine(e=>Kt(e),`safe_cause_invalid`).refine(e=>new TextEncoder().encode(JSON.stringify(e)).byteLength<=8192,`safe_cause_too_large`),Jt=e.object({code:e.enum(Gt),operation:E,stage:E,revision:E.optional(),retryable:e.boolean(),correlationId:E,cause:qt}),Yt=e.object({contractVersion:e.literal(2),ok:e.literal(!1),error:Jt}),Xt=e.object({contractVersion:e.literal(2),eventType:e.literal(`reset_publication_revision_available`),eventId:e.string().regex(/^reset_pub_v2_[0-9a-f]{64}$/),revision:E,changeHighWater:it,projectionFingerprint:D,occurredAt:T}).strict();function Zt(e){return At.parse(e)}function Qt(e){return jt.parse(e)}function $t(e){return Mt.parse(e)}function en(e){return Pt.parse(e)}function tn(e){return Ht.parse(e)}function nn(e){return Ut.parse(e)}function rn(e){return Wt.parse(e)}function an(e){return Yt.parse(e)}function on(e){return Xt.parse(e)}var sn=class extends Error{code;operation;stage;retryable;constructor(e){super(`${e.code}:${e.stage}`,{cause:e.cause}),this.name=`RadarResetSourceContractErrorV2`,this.code=e.code,this.operation=e.operation,this.stage=e.stage,this.retryable=e.retryable}};const O=new TextEncoder,cn=new TextDecoder(`utf-8`,{fatal:!0});function ln(e,t,n){if(n+t.byteLength>e.byteLength)return!1;for(let r=0;r<t.byteLength;r+=1)if(e.at(n+r)!==t.at(r))return!1;return!0}function un(e,t){if(t.byteLength===0)return!0;for(let n=0;n<=e.byteLength-t.byteLength;n+=1)if(ln(e,t,n))return!0;return!1}function dn(e){let t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}function fn(e){let t=``;for(let n=0;n<e.byteLength;n+=32768)t+=String.fromCharCode(...e.slice(n,n+32768));return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/u,``)}function pn(e){if(!/^[A-Za-z0-9_-]+$/u.test(e))throw Error(`base64url_noncanonical`);let t=(4-e.length%4)%4,n=`${e.replaceAll(`-`,`+`).replaceAll(`_`,`/`)}${`=`.repeat(t)}`,r=atob(n),i=Uint8Array.from(r,e=>e.charCodeAt(0));if(fn(i)!==e)throw Error(`base64url_noncanonical`);return i}async function mn(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return`sha256:${[...new Uint8Array(await crypto.subtle.digest(`SHA-256`,t))].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function hn(e){for(let t=0;t<64;t+=1){let t=`radar-reset-v2-${[...crypto.getRandomValues(new Uint8Array(24))].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`,n=O.encode(`--${t}`);if(!e.some(e=>un(e,n)))return t}throw Error(`multipart_boundary_generation_failed`)}async function gn(e){let t=E.parse(e.revision),n=E.parse(e.correlationId),r=Pt.parse({contractVersion:2,revision:t,chunks:e.parts.map(({bytes:e,...t})=>t)}),i=e.parts.map((e,t)=>({...r.chunks[t],bytes:new Uint8Array(e.bytes)}));for(let e of i)if(e.bytes.byteLength!==e.byteSize||await mn(e.bytes)!==e.sha256)throw new sn({code:`source_chunk_mismatch`,operation:`readDetailBatch`,stage:`detail_encode`,retryable:!1});let a=hn(i.map(e=>e.bytes)),o=[];for(let e of i)o.push(O.encode(`--${a}\r\nContent-Type: application/octet-stream\r
|
|
2
2
|
X-Radar-Reset-Action-Id-B64: ${fn(O.encode(e.resetActionId))}\r\nX-Radar-Detail-Ordinal: ${e.ordinal}\r\nX-Radar-Byte-Size: ${e.byteSize}\r\nX-Radar-SHA-256: ${e.sha256}\r\n\r\n`)),o.push(e.bytes,O.encode(`\r
|
|
3
3
|
`));o.push(O.encode(`--${a}--\r\n`));let s=dn(o),c=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength);return new Response(c,{status:200,headers:{"Cache-Control":`no-store`,"Content-Type":`multipart/mixed; boundary=${a}`,"X-Radar-Correlation-Id":n,"X-Radar-Part-Count":String(i.length),"X-Radar-Revision-B64":fn(O.encode(t))}})}function k(e,t,n){throw new sn({code:e,operation:`readDetailBatch`,stage:`detail_stream`,retryable:t,cause:n})}async function _n(e){if(e.body===null)return k(`source_stream_incomplete`,!0);let t=e.body.getReader(),n=[],r=0;try{for(;;){let e=await t.read();if(e.done)break;if(r+=e.value.byteLength,r>2162688){try{await t.cancel()}catch{}return k(`source_response_over_capacity`,!1)}n.push(e.value)}}catch(e){return k(`source_stream_incomplete`,!0,e)}finally{t.releaseLock()}return dn(n)}function vn(e,t){let n=e.headers.get(t);return n===null||n.includes(`,`)?k(`source_chunk_mismatch`,!1):n}function yn(e){if([...e].some(e=>e>127))return k(`source_chunk_mismatch`,!1);let t=String.fromCharCode(...e),n=new Map,r=new Set([`content-type`,`x-radar-reset-action-id-b64`,`x-radar-detail-ordinal`,`x-radar-byte-size`,`x-radar-sha-256`]);for(let e of t.split(`\r
|
|
4
4
|
`)){let t=e.indexOf(`:`);if(t<=0||e.slice(t+1,t+2)!==` `)return k(`source_chunk_mismatch`,!1);let i=e.slice(0,t).toLowerCase(),a=e.slice(t+2);if(!r.has(i)||n.has(i)||a.length===0)return k(`source_chunk_mismatch`,!1);n.set(i,a)}return n.size===r.size?n:k(`source_chunk_mismatch`,!1)}function bn(e,t,n){for(let r=n;r<=e.byteLength-t.byteLength;r+=1)if(ln(e,t,r))return r;return-1}async function xn(e,t){let n=Pt.parse({contractVersion:2,revision:t.revision,chunks:t.chunks});if(e.status!==200)return k(`source_chunk_mismatch`,!1);let r=vn(e,`Content-Type`),i=/^multipart\/mixed; boundary=(radar-reset-v2-[0-9a-f]{48})$/u.exec(r);if(i===null)return k(`source_chunk_mismatch`,!1);let a=i[1];if(vn(e,`Cache-Control`)!==`no-store`)return k(`source_chunk_mismatch`,!1);E.parse(vn(e,`X-Radar-Correlation-Id`));let o=vn(e,`X-Radar-Part-Count`);if(!/^[1-9][0-9]*$/u.test(o)||Number(o)>32||Number(o)!==n.chunks.length)return k(`source_chunk_mismatch`,!1);let s;try{s=cn.decode(pn(vn(e,`X-Radar-Revision-B64`)))}catch(e){return k(`source_chunk_mismatch`,!1,e)}if(s!==n.revision)return k(`source_chunk_mismatch`,!1);let c=await _n(e),l=O.encode(`--${a}\r\n`),u=O.encode(`--${a}--\r\n`),d=O.encode(`\r
|
|
5
5
|
\r
|
|
6
6
|
`),ee=O.encode(`\r
|
|
7
|
-
`),te=[],f=0;for(let e of n.chunks){if(!ln(c,l,f))return k(`source_stream_incomplete`,!0);f+=l.byteLength;let t=bn(c,d,f);if(t<0)return k(`source_stream_incomplete`,!0);let n=yn(c.slice(f,t));if(f=t+d.byteLength,n.get(`content-type`)!==`application/octet-stream`)return k(`source_chunk_mismatch`,!1);let r;try{r=cn.decode(pn(n.get(`x-radar-reset-action-id-b64`)))}catch(e){return k(`source_chunk_mismatch`,!1,e)}if(r!==e.resetActionId||n.get(`x-radar-detail-ordinal`)!==String(e.ordinal)||n.get(`x-radar-byte-size`)!==String(e.byteSize)||n.get(`x-radar-sha-256`)!==e.sha256)return k(`source_chunk_mismatch`,!1);if(f+e.byteSize+ee.byteLength>c.byteLength)return k(`source_stream_incomplete`,!0);let i=c.slice(f,f+e.byteSize);if(f+=e.byteSize,!ln(c,ee,f)||(f+=ee.byteLength,await mn(i)!==e.sha256))return k(`source_chunk_mismatch`,!1);te.push({...e,bytes:i})}return!ln(c,u,f)||f+u.byteLength!==c.byteLength?k(`source_stream_incomplete`,!0):te}const Sn=/authorization|cookie|token|secret|password|api[-_]?key/iu;function Cn(e,t){let n=[...e].slice(0,1024),r=``;for(let e of n){let n=O.encode(e).byteLength;if(n>t.remaining)break;t.remaining-=n,r+=e}return r}function wn(e,t,n,r){if(e===null||typeof e==`boolean`)return e;if(typeof e==`string`)return Cn(e,n);if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`bigint`||typeof e==`symbol`)return Cn(String(e),n);if(e===void 0)return`undefined`;if(typeof e==`function`)return`[Function ${e.name||`anonymous`}]`;if(r.has(e))return`[Circular]`;if(t>=4)return`[DepthLimit]`;if(r.add(e),Array.isArray(e))return e.slice(0,16).map(e=>wn(e,t+1,n,r));let i={},a=e instanceof Error?[[`type`,e.constructor.name],[`name`,e.name],[`message`,e.message],...e.cause===void 0?[]:[[`cause`,e.cause]],...Object.entries(e)]:Object.entries(e);for(let[e,o]of a.slice(0,16)){let a=Cn(String(e),n);if(!(a.length===0||Object.hasOwn(i,a))&&(n.remaining-=Math.min(n.remaining,8),i[a]=Sn.test(a)?`[REDACTED]`:wn(o,t+1,n,r),n.remaining<=0))break}return i}function Tn(e){let t=wn(e,0,{remaining:7e3},new Set),n=typeof t==`object`&&t&&!Array.isArray(t)?t:{type:e===null?`null`:typeof e,message:t};return qt.parse(n),n}function En(e){return e===`source_temporarily_unavailable`||e===`source_rpc_transport_failure`||e===`source_stream_incomplete`}function Dn(e){switch(e){case`source_invalid_request`:return 400;case`source_revision_unknown`:return 404;case`source_cursor_invalid`:case`source_chunk_mismatch`:return 409;case`source_response_over_capacity`:return 413;case`source_temporarily_unavailable`:case`source_rpc_transport_failure`:case`source_stream_incomplete`:return 503;case`source_integrity_conflict`:case`source_revision_identity_conflict`:case`source_sequence_exhausted`:return 500}}function On(e){let t={contractVersion:2,ok:!1,error:{code:e.code,operation:e.operation,stage:e.stage,...e.revision===void 0?{}:{revision:e.revision},retryable:En(e.code),correlationId:e.correlationId,cause:Tn(e.cause)}};return Yt.parse(t)}const kn=e.object({en:e.string().trim().min(1),zh:e.string().trim().min(1)}),An=e.iso.date(),A=e.object({category:e.enum([`improvement`,`direct_reset`,`reset_card`]),deliveryState:e.enum([`preview`,`landed`]),description:kn,dateBasis:e.enum([`occurrence`,`announcement`,`unresolved`]),sourceUrls:e.array(e.url({protocol:/^https?$/})).min(1)}),jn=e.discriminatedUnion(`state`,[e.object({state:e.literal(`ready`),text:kn}),e.object({state:e.enum([`pending`,`failed`,`not_applicable`]),text:e.null()})]),j=e.object({contractVersion:e.literal(1),generatedAt:e.iso.datetime(),timeZone:e.string().refine(e=>{try{return new Intl.DateTimeFormat(`en`,{timeZone:e}),!0}catch{return!1}},`Invalid source time zone`),startDate:An,endDate:An,processing:e.object({hasPending:e.boolean(),hasFailures:e.boolean()}),days:e.array(e.object({date:An,dayNumber:e.number().int().min(1).max(28),outcome:e.enum([`unconfirmed`,`improvement`,`reset`,`both`]),entries:e.array(A),summary:jn})).length(28),undatedEntries:e.array(A)}).superRefine((e,t)=>{let n=Date.parse(`${e.startDate}T00:00:00Z`);for(let[r,i]of e.days.entries()){let e=new Date(n+r*864e5).toISOString().slice(0,10);(i.date!==e||i.dayNumber!==r+1)&&t.addIssue({code:`custom`,path:[`days`,r],message:`Days must be contiguous and numbered in order`}),i.entries.some(e=>e.dateBasis===`unresolved`)&&t.addIssue({code:`custom`,path:[`days`,r,`entries`],message:`Unresolved dates belong in undatedEntries`});let a=i.entries.filter(e=>e.deliveryState===`landed`),o=a.some(e=>e.category===`improvement`),s=a.some(e=>e.category!==`improvement`),c=o?s?`both`:`improvement`:s?`reset`:`unconfirmed`;(i.outcome!==c||a.length===0!=(i.summary.state===`not_applicable`))&&t.addIssue({code:`custom`,path:[`days`,r],message:`Outcome and summary must reflect landed evidence`})}e.days.at(-1)?.date!==e.endDate&&t.addIssue({code:`custom`,path:[`endDate`],message:`End must match the last activity day`}),e.undatedEntries.some(e=>e.dateBasis!==`unresolved`)&&t.addIssue({code:`custom`,path:[`undatedEntries`],message:`Undated entries must have unresolved dates`})});function Mn(e){return j.parse(e)}function Nn(e){let t=e.some(e=>e.category===`improvement`&&e.deliveryState===`landed`),n=e.some(e=>e.category!==`improvement`);return t?n?`both`:`improvement`:n?`reset`:`unconfirmed`}function Pn(e){return Nn(e.filter(e=>e.deliveryState===`landed`))}const Fn=524288,In=j.shape,Ln=In.days.element,Rn=A.extend({date:In.startDate.nullable()}).superRefine((e,t)=>{e.date===null!=(e.dateBasis===`unresolved`)&&t.addIssue({code:`custom`,path:[`date`],message:`Date must agree with its evidence basis`})}),zn=e.object({state:e.enum([`unconfirmed`,`ongoing`,`ended`]),sourceUrls:e.array(A.shape.sourceUrls.element)}).superRefine((e,t)=>{e.state!==`unconfirmed`&&e.sourceUrls.length===0&&t.addIssue({code:`custom`,path:[`sourceUrls`],message:`Confirmed lifecycle states require source evidence`})}),Bn=Ln.omit({date:!0,entries:!0}).extend({entries:e.array(Rn),lifecycle:zn}),Vn=e.object({contractVersion:e.literal(2),generatedAt:In.generatedAt,timeZone:In.timeZone,processing:In.processing,days:e.array(Bn).length(28),unassignedEntries:e.array(Rn)}).superRefine((e,t)=>{for(let[n,r]of e.days.entries()){r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Official days must be numbered in order`});let e=r.entries.filter(e=>e.deliveryState===`landed`),i=Pn(r.entries);(r.outcome!==i||e.length===0!=(r.summary.state===`not_applicable`))&&t.addIssue({code:`custom`,path:[`days`,n],message:`Outcome and summary must reflect landed evidence`})}});function Hn(e){return Vn.parse(e)}const Un=Fn,M=e.object({en:e.string().trim().min(1),zh:e.string().trim().min(1)}),Wn=A.extend({title:M}),Gn=Vn.shape,Kn=Gn.days.element,qn=Kn.shape.entries.element.safeExtend({title:M}),Jn=Kn.extend({title:M.nullable(),entries:e.array(qn)}).superRefine((e,t)=>{e.title!==null!=(e.summary.state===`ready`)&&t.addIssue({code:`custom`,path:[`title`],message:`A daily title is available exactly when its summary is ready`})}),Yn=e.object({...Gn,contractVersion:e.literal(3),days:e.array(Jn),unassignedEntries:e.array(qn)}).superRefine((e,t)=>{let n=Vn.safeParse({contractVersion:2,generatedAt:e.generatedAt,timeZone:e.timeZone,processing:e.processing,days:e.days.map(({title:e,...t})=>({...t,entries:t.entries.map(({title:e,...t})=>t)})),unassignedEntries:e.unassignedEntries.map(({title:e,...t})=>t)});if(!n.success)for(let e of n.error.issues)t.addIssue({...e})});function Xn(e){return{improvementDays:e.days.filter(e=>e.outcome===`improvement`||e.outcome===`both`).length,resetDays:e.days.filter(e=>e.outcome===`reset`||e.outcome===`both`).length}}function Zn(e){return Yn.parse(e)}const Qn=Un,$n=Vn.shape,er=Yn.shape.unassignedEntries,tr=$n.days.element.omit({summary:!0}).extend({entries:er}),nr=e.object({...$n,contractVersion:e.literal(4),days:e.array(tr).length(28),unassignedEntries:er}).superRefine((e,t)=>{for(let[n,r]of e.days.entries())r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Official days must be numbered in order`}),r.outcome!==Pn(r.entries)&&t.addIssue({code:`custom`,path:[`days`,n],message:`Outcome must reflect landed evidence`})});function rr(e){return nr.parse(e)}function ir(e,t){let n=new Set;for(let r of e)n.has(r.eventId)&&t.addIssue({code:`custom`,message:`Duplicate activity eventId`}),n.add(r.eventId)}function ar(e,t,n){let r=n.reduce((t,n)=>t+e.reactionCounts[n],0);(!Number.isSafeInteger(r)||r!==e.reactionTotal)&&t.addIssue({code:`custom`,path:[`reactionTotal`],message:`Total must equal all reaction counts`})}async function or(e,t,n){if(e.status!==200){let t={status:e.status,statusText:e.statusText};try{await e.body?.cancel()}catch(e){throw Error(`activity_file_http_error`,{cause:{...t,cancellationCause:e}})}throw Error(`activity_file_http_error`,{cause:t})}if(e.body===null)throw Error(`activity_file_body_missing`);let r=e.body.getReader(),i=[],a=0;try{for(;;){let e=await r.read();if(e.done)break;if(a+=e.value.byteLength,a>n)throw Error(`activity_file_too_large`,{cause:{maxBytes:n,observedBytes:a}});i.push(e.value)}let e=new Uint8Array(a),o=0;for(let t of i)e.set(t,o),o+=t.byteLength;return t.parse(JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e)))}catch(e){try{await r.cancel()}catch{}throw Error(`activity_file_read_failed`,{cause:e})}finally{r.releaseLock()}}function sr(e,t,n){let r=new TextEncoder().encode(JSON.stringify(t.parse(e)));if(r.byteLength>n)throw Error(`activity_file_too_large`,{cause:{byteLength:r.byteLength}});return r}const N=[`👍`,`😂`,`🤡`,`💀`,`😭`,`🔥`,`🎉`,`👀`,`🙏`,`🫠`],cr=e.enum(N),P=e.string().min(1).max(128),F=524288,lr=`https://data.radarultra.com/activity/v1/latest.json`,ur=`https://data.radarultra.com/activity/v2/latest.json`,dr=A.extend({eventId:P}),fr=j.safeExtend({days:e.array(j.shape.days.element.extend({entries:e.array(dr)})).length(28),undatedEntries:e.array(dr)});function pr(e,t){ir([...e.days.flatMap(e=>e.entries),...e.undatedEntries],t)}const mr=fr.superRefine(pr),hr=e.record(cr,e.number().int().nonnegative()),gr=e.object({reactionCounts:hr,reactionTotal:e.number().int().nonnegative()});function _r(e,t){ar(e,t,N)}const vr=dr.extend(gr.shape).superRefine(_r),yr=fr.safeExtend({days:e.array(fr.shape.days.element.extend({entries:e.array(vr)})).length(28),undatedEntries:e.array(vr)}).superRefine(pr),I=e.object({publishedAt:e.iso.datetime(),reactionIds:e.array(cr).length(N.length).refine(e=>new Set(e).size===N.length,`Every reaction must occur exactly once`),progress:yr}),br=Yn.shape,xr=br.unassignedEntries.element.safeExtend({eventId:P}),Sr=e.object({...br,days:e.array(br.days.element.safeExtend({entries:e.array(xr)})).length(28),unassignedEntries:e.array(xr)}),Cr=Sr.superRefine((e,t)=>{let n=({eventId:e,...t})=>t,r=Yn.safeParse({...e,days:e.days.map(e=>({...e,entries:e.entries.map(n)})),unassignedEntries:e.unassignedEntries.map(n)});if(!r.success)for(let e of r.error.issues)t.addIssue({...e});ir([...e.days.flatMap(e=>e.entries),...e.unassignedEntries],t)}),wr=xr.safeExtend(gr.shape).superRefine(_r),Tr=Sr.safeExtend({days:e.array(br.days.element.safeExtend({entries:e.array(wr)})).length(28),unassignedEntries:e.array(wr)}).superRefine((e,t)=>{let n=({reactionCounts:e,reactionTotal:t,...n})=>n,r=Cr.safeParse({...e,days:e.days.map(e=>({...e,entries:e.entries.map(n)})),unassignedEntries:e.unassignedEntries.map(n)});if(!r.success)for(let e of r.error.issues)t.addIssue({...e})}),Er=I.extend({progress:Tr}),Dr=nr.shape,Or=Dr.unassignedEntries.element.safeExtend({eventId:P}),kr=nr.safeExtend({days:e.array(Dr.days.element.safeExtend({entries:e.array(Or)})).length(28),unassignedEntries:e.array(Or)}).superRefine((e,t)=>{ir([...e.days.flatMap(e=>e.entries),...e.unassignedEntries],t)}),Ar=Or.safeExtend(gr.shape).superRefine(_r),jr=kr.safeExtend({days:e.array(Dr.days.element.safeExtend({entries:e.array(Ar)})).length(28),unassignedEntries:e.array(Ar)}),Mr=I.extend({progress:jr});async function Nr(e){return or(e,I,F)}async function Pr(e){return or(e,Er,F)}async function Fr(e){return or(e,Mr,F)}function Ir(e){return sr(e,I,F)}function Lr(e){return sr(e,Er,F)}function Rr(e){return sr(e,Mr,F)}const zr=e.object({changeId:e.string().min(1).max(128),eventId:e.string().min(1).max(128),revision:e.int().positive(),kind:e.enum([`created`,`updated`,`withdrawn`]),date:e.iso.date().nullable(),entry:A,receivedAt:e.iso.datetime().nullable(),acceptedAt:e.iso.datetime()}),Br=e.object({contractVersion:e.literal(1),changes:e.array(zr),nextCursor:e.string().min(1),hasMore:e.boolean()}),Vr=zr.extend({dayNumber:j.shape.days.element.shape.dayNumber.nullable()}),Hr=Br.extend({contractVersion:e.literal(2),changes:e.array(Vr)}),Ur=e.int().min(0).max(2**53-1),Wr=e.int().min(1).max(28),Gr=e.enum([`yes`,`no`]).nullable(),Kr=e.object({choice:Gr}).strict(),qr=e.object({yes:Ur,no:Ur,total:Ur}).superRefine((e,t)=>{(!Number.isSafeInteger(e.yes+e.no)||e.total!==e.yes+e.no)&&t.addIssue({code:`custom`,path:[`total`],message:`Total must equal the effective choices.`})}),Jr=e.object({dayNumber:Wr,state:e.enum([`unopened`,`open`,`closed`]),choice:Gr,outcome:e.enum([`unconfirmed`,`yes`,`no`]),personalResult:e.enum([`none`,`waiting`,`correct`,`incorrect`]),corrected:e.boolean(),counts:qr}).superRefine((e,t)=>{let n=e.choice===null?`none`:e.outcome===`unconfirmed`?`waiting`:e.choice===e.outcome?`correct`:`incorrect`;e.personalResult!==n&&t.addIssue({code:`custom`,path:[`personalResult`],message:`Personal result must match the confirmed outcome and choice.`}),e.state!==`closed`&&e.outcome!==`unconfirmed`&&t.addIssue({code:`custom`,path:[`outcome`],message:`An open or unopened day cannot have a confirmed result.`}),e.state===`unopened`&&(e.choice!==null||e.counts.total!==0)&&t.addIssue({code:`custom`,path:[`state`],message:`An unopened day cannot have choices.`})}),Yr=e.object({revision:Ur,openDayNumber:Wr.nullable(),days:e.array(Jr).length(28)}).superRefine((e,t)=>{for(let[n,r]of e.days.entries()){r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Every official day must occur once, in order.`});let i=e.openDayNumber===null||r.dayNumber<e.openDayNumber?`closed`:r.dayNumber===e.openDayNumber?`open`:`unopened`;r.state!==i&&t.addIssue({code:`custom`,path:[`days`,n,`state`],message:`Only the next official day may be open.`})}}),Xr=e.object({error:e.object({code:e.enum([`invalid_request`,`payload_too_large`,`unsupported_media_type`,`origin_not_allowed`,`rate_limited`,`dependency_unavailable`,`internal_error`,`day_closed`,`identity_unavailable`]),message:e.string().min(1).max(2048),requestId:e.string().min(1).max(128),operation:e.enum([`get_guesses`,`set_guess`]),stage:e.string().min(1).max(128),cause:e.record(e.string(),e.unknown()),saveOutcome:e.enum([`not_saved`,`unknown`]).optional()})}).superRefine(({error:e},t)=>{e.operation===`set_guess`!=(e.saveOutcome!==void 0)&&t.addIssue({code:`custom`,path:[`error`,`saveOutcome`],message:`Only save failures must include a save outcome.`})}),Zr=e.object({"zh-Hans":x.shape.noticeTimeline.element.shape.sourceTextZh,"zh-Hant":x.shape.noticeTimeline.element.shape.sourceTextZh,ja:x.shape.noticeTimeline.element.shape.sourceTextZh,ko:x.shape.noticeTimeline.element.shape.sourceTextZh}),Qr=x.shape.noticeTimeline.element.omit({sourceTextZh:!0}).extend({sourceTranslations:Zr}),$r=e.object({...x.shape,contractVersion:e.literal(2),noticeTimeline:e.array(Qr).min(1).max(i.actionDetail.noticeTimeline)}),ei=Qr.omit({phase:!0}).extend({kinds:S.shape.noticeTimeline.element.shape.kinds}),ti=e.object({...S.shape,noticeTimeline:e.array(ei).min(1).max(i.actionDetail.noticeTimeline)}),ni=e=>{let{sourceTranslations:t,...n}=e;return{...n,sourceTextZh:t[`zh-Hans`]}},ri=e=>({...e,contractVersion:1,noticeTimeline:e.noticeTimeline.map(ni)}),ii=e=>({...e,noticeTimeline:e.noticeTimeline.map(ni)}),ai=(e,t)=>{for(let n of e.error?.issues??[])t.addIssue({...n})},L=$r.superRefine((e,t)=>{ai(x.safeParse(ri(e)),t)}),oi=ti.superRefine((e,t)=>{ai(S.safeParse(ii(e)),t)}),si=e.object({...He.shape,contractVersion:e.literal(2),actions:e.array(L).min(1).max(i.analysis.actions),pendingResetActions:e.array(oi).max(i.analysis.actions)}).superRefine((e,t)=>{ai(He.safeParse({...e,contractVersion:1,actions:e.actions.map(ri),pendingResetActions:e.pendingResetActions.map(ii)}),t),new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&t.addIssue({code:`custom`,message:`export_utf8_size_limit_exceeded`,path:[]})}),ci=e=>L.parse(e),li=e=>oi.parse(e),ui=e=>si.parse(e);function di(e){let t=ui(e);return He.parse({...t,contractVersion:1,actions:t.actions.map(ri),pendingResetActions:t.pendingResetActions.map(ii)})}const fi=e.object(L.shape).omit({actionScope:!0,reasons:!0}).extend({contractVersion:e.literal(3)}).superRefine((e,n)=>t(e,n,C)),pi=si.shape.generatedAt,mi=e.object({resetActionId:x.shape.resetActionId,effect:x.shape.resetEffects.options[0].shape.values.element.nullable(),at:pi,basis:e.enum([`execution_confirmation`,`announcement`]),sourceUrl:x.shape.noticeTimeline.element.shape.sourceUrl}),hi=e.number().int().nonnegative(),gi=e.number().finite().nonnegative();function R(e,t){try{return C(e,t)}catch{return}}function _i(e,t){return e<t?-1:+(e>t)}const vi=e.object({timeBasis:e.literal(`confirmation_priority`),startAt:pi,total:hi,hardResetCount:hi,bankedResetCount:hi,unknownCount:hi,records:e.array(mi).max(i.analysis.actions*2),intervalSummary:e.object({mean:gi,max:gi}).nullable()});function yi(e,t){let n=(e,n=[])=>t.addIssue({code:`custom`,message:e,path:n}),r={hard_reset:0,banked_reset:0,unknown:0},a=new Set,o=new Map,s=new Set,c=new Set;for(let[t,i]of e.records.entries()){r[i.effect??`unknown`]+=1;let l=JSON.stringify([i.resetActionId,i.effect]);a.has(l)&&n(`statistics_record_identity_duplicate`,[`records`,t]),a.add(l),i.effect===null?s.add(i.resetActionId):c.add(i.resetActionId),R(i.at,e.startAt)===-1&&n(`statistics_record_before_window`,[`records`,t,`at`]);let u=e.records.at(t-1);if(t>0&&u!==void 0){let e=R(u.at,i.at);e!==void 0&&(e>0||e===0&&(_i(u.resetActionId,i.resetActionId)>0||u.resetActionId===i.resetActionId&&_i(u.effect??``,i.effect??``)>0))&&n(`statistics_records_not_stably_sorted`,[`records`,t])}let d=o.get(i.resetActionId);(d===void 0||R(i.at,d)===-1)&&o.set(i.resetActionId,i.at)}o.size>i.analysis.actions&&n(`statistics_event_limit_exceeded`),[...s].some(e=>c.has(e))&&n(`statistics_event_effect_state_mismatch`),e.total!==e.records.length&&n(`statistics_total_mismatch`,[`total`]),e.hardResetCount!==r.hard_reset&&n(`statistics_hard_reset_count_mismatch`,[`hardResetCount`]),e.bankedResetCount!==r.banked_reset&&n(`statistics_banked_reset_count_mismatch`,[`bankedResetCount`]),e.unknownCount!==r.unknown&&n(`statistics_unknown_count_mismatch`,[`unknownCount`]);let l=[...o.values()].sort((e,t)=>R(e,t)??0),u=l.slice(1).map((e,t)=>Number(((Date.parse(e)-Date.parse(l.at(t)))/864e5).toFixed(6)));if(u.length===0)e.intervalSummary!==null&&n(`statistics_interval_summary_must_be_null`,[`intervalSummary`]);else if(u.every(Number.isFinite)){let t=Number((u.reduce((e,t)=>e+t,0)/u.length).toFixed(6)),r=Math.max(...u);(e.intervalSummary===null||Math.abs(e.intervalSummary.mean-t)>1e-9||Math.abs(e.intervalSummary.max-r)>1e-9)&&n(`statistics_interval_summary_mismatch`,[`intervalSummary`])}}const z=vi.superRefine(yi),bi=e.object(si.shape).omit({analysis:!0}).extend({contractVersion:e.literal(3),statistics:z,actions:e.array(fi).min(1).max(i.analysis.actions)}).superRefine((e,t)=>{let n=(e,n=[])=>t.addIssue({code:`custom`,message:e,path:n});new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&n(`export_utf8_size_limit_exceeded`);let r=new Map(e.actions.map(e=>[e.resetActionId,e])),a=new Set(e.statistics.records.map(e=>e.resetActionId));r.size!==e.actions.length&&n(`export_action_identity_duplicate`,[`actions`]),new Set(e.pendingResetActions.map(e=>e.resetActionId)).size!==e.pendingResetActions.length&&n(`export_pending_action_identity_duplicate`,[`pendingResetActions`]);for(let[t,r]of e.actions.entries()){let i=e.actions.at(t-1);t>0&&i!==void 0&&pi.safeParse(i.firstAnnouncedAt).success&&pi.safeParse(r.firstAnnouncedAt).success&&Ue(i,r)>0&&n(`export_actions_not_stably_sorted`,[`actions`,t]),R(r.firstAnnouncedAt,e.generatedAt)===1&&n(`export_action_after_snapshot`,[`actions`,t,`firstAnnouncedAt`]);let o=R(r.firstAnnouncedAt,e.statistics.startAt);o!==void 0&&o>=0&&!a.has(r.resetActionId)&&n(`export_statistics_window_action_missing`,[`actions`,t,`resetActionId`])}for(let[t,i]of e.statistics.records.entries()){let a=[`statistics`,`records`,t],o=r.get(i.resetActionId);if(o===void 0){n(`export_statistics_action_missing`,a);continue}(o.resetEffects.state===`unknown`!=(i.effect===null)||i.effect!==null&&!o.resetEffects.values.some(e=>e===i.effect))&&n(`export_statistics_effect_mismatch`,[...a,`effect`]);let s=o.noticeTimeline.filter(e=>e.sourceUrl===i.sourceUrl&&R(e.authoredAt,i.at)===0);s.length===0&&n(`export_statistics_source_mismatch`,a),i.basis===`execution_confirmation`&&!s.some(e=>e.phase===`executed`)&&n(`export_statistics_confirmation_source_invalid`,a),i.basis===`announcement`&&R(i.at,o.firstAnnouncedAt)!==0&&n(`export_statistics_announcement_time_mismatch`,a),R(i.at,e.generatedAt)===1&&n(`export_statistics_record_after_snapshot`,[...a,`at`])}}),xi=e.object({contractVersion:e.literal(1),data:e.object({sourceWatermark:ie.shape.sourceWatermark,statistics:z}),meta:e.object({observedAt:pi})}),Si=e=>bi.parse(e);function Ci(e,t){let n=si.parse(e);return Si({contractVersion:3,generatedAt:n.generatedAt,statistics:t,pendingResetActions:n.pendingResetActions,actions:n.actions.map(({actionScope:e,reasons:t,...n})=>({...n,contractVersion:3}))})}const wi=e=>fi.parse(e),Ti=`/api/v1/codex-reset-public-records`,Ei=e.array(ei).min(1).max(i.actionDetail.noticeTimeline),Di=e.object(L.shape).omit({contractVersion:!0,noticeCount:!0,noticeTimeline:!0}).extend({noticeTimeline:Ei});function Oi(e){let t=e.noticeTimeline.filter(e=>e.kinds.includes(`executed`)||e.kinds.includes(`preview`)).map(({kinds:e,...t})=>({...t,phase:e.includes(`executed`)?`executed`:`preview`}));return{...e,contractVersion:2,noticeCount:t.length,noticeTimeline:t}}const ki=e=>L.parse(Oi(e));function Ai(e,t){let n=new Set;for(let[r,i]of e.entries()){n.has(i.sourceUrl)&&t.addIssue({code:`custom`,message:`public_notice_source_duplicate`,path:[`noticeTimeline`,r]}),n.add(i.sourceUrl);let a=e.at(r-1),o=L.shape.firstAnnouncedAt;r>0&&a!==void 0&&o.safeParse(a.authoredAt).success&&o.safeParse(i.authoredAt).success&&C(a.authoredAt,i.authoredAt)>0&&t.addIssue({code:`custom`,message:`public_notice_timeline_not_ascending`,path:[`noticeTimeline`,r]})}}const ji=Di.superRefine((e,t)=>{Ai(e.noticeTimeline,t);let n=L.safeParse(Oi(e));for(let e of n.error?.issues??[])t.addIssue({...e})}),Mi=e.object(oi.shape).omit({state:!0,executedEffects:!0,pendingEffects:!0}).superRefine((e,t)=>{Ai(e.noticeTimeline,t)}),Ni=e.object(L.shape).pick({resetActionId:!0}).extend({lastActiveFirstAnnouncedAt:L.shape.firstAnnouncedAt,withdrawnAt:L.shape.firstAnnouncedAt}),Pi=i.analysis.actions,Fi=e.object({contractVersion:e.literal(1),sourceWatermark:L.shape.resetActionId,generatedAt:L.shape.firstAnnouncedAt,actions:e.array(ji).min(1).max(Pi),pendingResetActions:e.array(oi).max(Pi),unexecutedResetActions:e.array(Mi).max(Pi),withdrawnResetActions:e.array(Ni).max(Pi)}).superRefine((e,t)=>{for(let n of[`actions`,`pendingResetActions`,`unexecutedResetActions`,`withdrawnResetActions`])new Set(e[n].map(e=>e.resetActionId)).size!==e[n].length&&t.addIssue({code:`custom`,message:`public_reset_identity_duplicate`,path:[n]});let n=new Set(e.actions.map(e=>e.resetActionId));for(let n of e.pendingResetActions)Ai(n.noticeTimeline,t);(e.unexecutedResetActions.some(e=>n.has(e.resetActionId))||e.withdrawnResetActions.some(e=>n.has(e.resetActionId)))&&t.addIssue({code:`custom`,message:`public_reset_lifecycle_conflict`});for(let[n,r]of e.actions.entries()){let i=e.actions.at(n-1),a=L.shape.firstAnnouncedAt;n>0&&i!==void 0&&a.safeParse(i.firstAnnouncedAt).success&&a.safeParse(r.firstAnnouncedAt).success&&Ue(i,r)>=0&&t.addIssue({code:`custom`,message:`public_reset_actions_not_ascending`,path:[`actions`,n]})}new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&t.addIssue({code:`custom`,message:`public_reset_records_utf8_size_limit_exceeded`})}),Ii=L.shape,Li=e.strictObject({title:e.string(),body:e.string()}),Ri=e.strictObject({zh:Li,en:Li}),zi=e.enum([`end_preview`,`restore_preview`,`set_auto_notification`,`notify`,`confirm`]),Bi=e.strictObject({resetActionId:Ii.resetActionId,operation:zi,expectedRevision:e.int().nonnegative(),copy:Ri.nullable(),automaticNotification:e.boolean().nullable(),executedAt:T.nullable().optional()}).superRefine((e,t)=>{e.operation===`notify`!=(e.copy!==null)&&t.addIssue({code:`custom`,path:[`copy`],message:`notification_copy_operation_mismatch`}),e.operation===`set_auto_notification`!=(e.automaticNotification!==null)&&t.addIssue({code:`custom`,path:[`automaticNotification`],message:`notification_policy_operation_mismatch`}),e.operation!==`notify`&&e.operation!==`confirm`&&e.executedAt!=null&&t.addIssue({code:`custom`,path:[`executedAt`],message:`execution_time_operation_mismatch`})}),Vi=Bi.superRefine((e,t)=>{(e.operation===`notify`||e.operation===`confirm`)&&e.executedAt==null&&t.addIssue({code:`custom`,path:[`executedAt`],message:`execution_time_required`})}),Hi=Ri.extend({zh:Li.strip(),en:Li.strip()}).strip(),Ui=Bi.safeExtend({copy:Hi.nullable()}).strip(),Wi=e.object({digest:e.string().regex(/^sha256:[a-f0-9]{64}$/),sourceWatermark:e.string().min(1),draft:Vi.safeExtend({copy:Hi.nullable()}).strip()}),Gi=e.strictObject({operationId:e.uuid(),preview:Wi.extend({draft:Vi}).strict()}),Ki=e.object({resetActionId:Ii.resetActionId,revision:e.number().int().nonnegative(),state:e.enum([`preview`,`executed`,`cancelled`,`undetermined`]),firstAnnouncedAt:T.nullable(),officialConfirmed:e.boolean(),pendingPreview:e.boolean(),previewClosed:e.boolean(),automaticNotification:e.boolean(),sourceUrls:e.array(Ii.noticeTimeline.element.shape.sourceUrl),availableOperations:e.array(zi),notificationOperationId:e.uuid().nullable()}),qi=e.object({actions:e.array(Ki)}),Ji=e.discriminatedUnion(`status`,[e.object({status:e.literal(`unknown`),operationId:e.uuid()}),e.object({status:e.literal(`saved`),operationId:e.uuid(),resetActionId:Ii.resetActionId,operation:zi,revision:e.number().int().positive(),notification:e.object({state:e.enum([`disabled`,`pending`,`claimed`,`retry_wait`,`accepted`,`rejected`,`expired`]),resultCode:e.string().nullable(),diagnostic:e.record(e.string(),e.unknown()).nullable()})})]),B=x.shape.noticeTimeline.element.shape,Yi=e.enum([`initial`,`supplement`,`correction`]).nullable(),Xi=e.object({authoredAt:B.authoredAt,role:Yi,sourceUrl:B.sourceUrl,sourceText:B.sourceText,sourceTextZh:B.sourceTextZh}),Zi=e.array(Xi).min(1).superRefine((e,t)=>{let n=new Set,r;for(let[i,a]of e.entries()){if(n.has(a.sourceUrl)&&t.addIssue({code:`custom`,path:[i,`sourceUrl`],message:`An original post may appear only once per improvement`}),n.add(a.sourceUrl),!B.authoredAt.safeParse(a.authoredAt).success){r=void 0;continue}if(r!==void 0){let e=C(r.authoredAt,a.authoredAt);(e>0||e===0&&r.sourceUrl>a.sourceUrl)&&t.addIssue({code:`custom`,path:[i],message:`Posts must be ordered by authoredAt and sourceUrl`})}r=a}}),Qi=Qn,$i=A.omit({description:!0}).extend({category:e.literal(`improvement`),title:M,shortTitle:M.nullable().optional(),posts:Zi}),ea=A.extend({category:e.enum([`direct_reset`,`reset_card`]),title:M}),ta=e.discriminatedUnion(`category`,[$i,ea]),na=nr.shape,ra=na.unassignedEntries.element.shape.date;function ia(e,t){e.date===null!=(e.dateBasis===`unresolved`)&&t.addIssue({code:`custom`,path:[`date`],message:`Date must agree with its evidence basis`})}const aa=e.discriminatedUnion(`category`,[$i.extend({date:ra}).superRefine(ia),ea.extend({date:ra}).superRefine(ia)]),oa=e.object({...na,contractVersion:e.literal(5),days:e.array(na.days.element.extend({entries:e.array(aa)})).length(28),unassignedEntries:e.array(aa)}).superRefine((e,t)=>{for(let[n,r]of e.days.entries())r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Official days must be numbered in order`}),r.outcome!==Nn(r.entries)&&r.outcome!==Pn(r.entries)&&t.addIssue({code:`custom`,path:[`days`,n],message:`Outcome must reflect accepted reset and landed improvement evidence`})});function sa(e){return oa.parse(e)}const ca=`https://data.radarultra.com/activity/v3/latest.json`,la=oa.shape,[ua,da]=la.unassignedEntries.element.options,fa=ua.safeExtend({eventId:P}),pa=da.safeExtend({eventId:P}),ma=e.discriminatedUnion(`category`,[fa,pa]),ha=oa.safeExtend({days:e.array(la.days.element.extend({entries:e.array(ma)})).length(28),unassignedEntries:e.array(ma)}).superRefine((e,t)=>{ir([...e.days.flatMap(e=>e.entries),...e.unassignedEntries],t)}),ga={reactionCounts:hr,reactionTotal:e.number().int().nonnegative()},_a=(e,t)=>ar(e,t,N),va=e.discriminatedUnion(`category`,[fa.safeExtend(ga).superRefine(_a),pa.safeExtend(ga).superRefine(_a)]),ya=ha.safeExtend({days:e.array(la.days.element.extend({entries:e.array(va)})).length(28),unassignedEntries:e.array(va)}),ba=I.extend({progress:ya});async function xa(e){return or(e,ba,F)}function Sa(e){return sr(e,ba,F)}const Ca=e.discriminatedUnion(`category`,[$i,A.extend({category:e.enum([`direct_reset`,`reset_card`])})]),wa=Vr.extend({entry:Ca}),Ta=Hr.extend({contractVersion:e.literal(3),changes:e.array(wa)});function Ea(e){return wa.parse(e)}function Da(e){return Ta.parse(e)}const Oa=`https://radarultra.com`,ka=[`zh-Hans`,`zh-Hant`,`en`,`ja`,`ko`],Aa={"zh-Hans":`zh-hans`,"zh-Hant":`zh-hant`,en:`en`,ja:`ja`,ko:`ko`},ja={"zh-Hans":`/${Aa[`zh-Hans`]}`,"zh-Hant":`/${Aa[`zh-Hant`]}`,en:``,ja:`/${Aa.ja}`,ko:`/${Aa.ko}`},Ma=`/zh`,Na={reset:`/codex`,improvement:`/codex/updates`,challengeRecap:`/codex/28-day-challenge`,changelog:`/codex/changelog`,models:`/codex/models`,dynamics:`/news`},V=e.discriminatedUnion(`product`,[e.strictObject({product:e.literal(`cli`),version:e.string().regex(/^\d+\.\d+\.\d+$/)}),e.strictObject({product:e.literal(`app`),version:e.string().regex(/^\d{2}\.\d{3,4}$/)})]),Pa=e.string().regex(/^(?!\.{1,2}$)[a-z0-9.-]+$/);function H(e,t){return Oa+ja[t]+Na[e]}function Fa(e,t){let n=t===`zh-Hans`?`/zh`:ja[t];return Oa+n+Na[e]}function Ia(e,t,n){let r=V.parse({product:e,version:t});return`${H(`changelog`,n)}/${r.product}/${r.version}`}function La(e,t){return`${H(`models`,t)}/${Pa.parse(e)}`}const Ra=Object.freeze({timeZone:`America/Los_Angeles`,startDate:`2026-10-05`,endDate:`2026-11-01`}),za=Date.parse(`${Ra.startDate}T00:00:00Z`),Ba=(Date.parse(`${Ra.endDate}T00:00:00Z`)-za)/864e5+1,Va=new Intl.DateTimeFormat(`en-CA`,{timeZone:Ra.timeZone,year:`numeric`,month:`2-digit`,day:`2-digit`});function Ha(e){let t=Va.formatToParts(e),n=e=>Number(t.find(t=>t.type===e).value),r=(Date.UTC(n(`year`),n(`month`)-1,n(`day`))-za)/864e5,i=r<0?`before`:r>=Ba?`ended`:`live`,a=Math.min(Ba,Math.max(1,r+1));return{phase:i,today:a,ongoingDay:i===`live`?a:null}}const Ua=e.enum([`reset`,`improvement`]),Wa=e.array(Ua).min(1).max(2).refine(e=>new Set(e).size===e.length,`notification_topic_duplicate`),Ga=e=>new Set(ka.flatMap(t=>[H(e,t),Fa(e,t)])),Ka={reset:Ga(`reset`),improvement:Ga(`improvement`)},qa=t=>e.url().refine(e=>Ka[t].has(e),`notification_target_url_invalid`),Ja=e.url().refine(e=>Object.values(Ka).some(t=>t.has(e)),`notification_target_not_owned`),Ya=e.discriminatedUnion(`kind`,[e.object({kind:e.literal(`reset`),webUrl:qa(`reset`),miniPath:e.literal(`pages/index/index`)}).strict(),e.object({kind:e.literal(`improvement`),webUrl:qa(`improvement`),miniPath:e.literal(`pages/index/index?page=challenge`)}).strict()]),Xa=e.object({topics:Wa,target:Ya}).strict().refine(e=>e.topics.includes(e.target.kind),`notification_target_topic_mismatch`),Za=e.enum([`reset`,`improvement`,`clue`]),Qa=e.object({topics:e.array(Za).min(1).max(2).refine(e=>new Set(e).size===e.length,`notification_topic_duplicate`),target:Ya}).strict().refine(e=>e.topics.some(t=>(t===`clue`?`reset`:t)===e.target.kind),`notification_target_topic_mismatch`);function $a(e,t){let n=eo(e===`clue`?`reset`:e,t);return Qa.parse({...n,topics:[e],target:{...n.target,webUrl:Fa(n.target.kind,t)}})}function eo(e,t){return Xa.parse({topics:[e],target:{kind:e,webUrl:H(e,t),miniPath:e===`reset`?`pages/index/index`:`pages/index/index?page=challenge`}})}const to=e.object({notificationId:e.uuid(),eventId:e.uuid(),title:e.string().trim().min(1).max(512),createdAt:e.iso.datetime(),deliverBy:e.iso.datetime(),...Xa.shape,target:e.discriminatedUnion(`kind`,[Ya.options[0].strip(),Ya.options[1].strip()])}).superRefine((e,t)=>{e.topics.includes(e.target.kind)||t.addIssue({code:`custom`,message:`notification_target_topic_mismatch`}),C(e.deliverBy,e.createdAt)<=0&&t.addIssue({code:`custom`,message:`notification_task_deadline_invalid`})});function no(e,t){return C(e.createdAt,t.createdAt)||(e.notificationId<t.notificationId?-1:+(e.notificationId>t.notificationId))}const ro=`/api/v1/notification-tasks`,io=100,ao=e.string().min(1).max(8192),oo=e.object({cursor:ao.optional()}).strict(),so=e.object({contractVersion:e.literal(1),roundCursor:ao,notifications:e.array(to).max(100),nextCursor:ao.nullable()}).superRefine((e,t)=>{new Set(e.notifications.map(e=>e.notificationId)).size!==e.notifications.length&&t.addIssue({code:`custom`,message:`notification_task_duplicate`});for(let n=1;n<e.notifications.length;n++)no(e.notifications.at(n-1),e.notifications.at(n))>=0&&t.addIssue({code:`custom`,message:`notification_task_order_invalid`});e.nextCursor!==null&&e.notifications.length===0&&t.addIssue({code:`custom`,message:`notification_task_empty_continuation`})}),co=`/api/browser-notifications`,lo=e.string().min(1).max(128),uo=e.uuid(),fo=e.enum(ka),po=e.strictObject({reset:e.boolean(),improvement:e.boolean()}),mo=`[cdef][\\w-]{21}`,ho=e.strictObject({fid:e.string().regex(RegExp(`^${mo}$`))});function go(e){return e.replace(RegExp(`(^|[^\\w-])${mo}(?![\\w-])`,`g`),`$1[registration]`)}const U={operationId:uo,expectedRevision:lo},_o=e.discriminatedUnion(`action`,[e.strictObject({...U,action:e.literal(`register`),topics:po.refine(e=>e.reset||e.improvement,`subscription_topic_required`),locale:fo,registration:ho}),e.strictObject({...U,action:e.literal(`set_topics`),topics:po}),e.strictObject({...U,action:e.literal(`set_locale`),locale:fo}),e.strictObject({...U,action:e.literal(`restore`),registration:ho}),e.strictObject({...U,action:e.literal(`retry`)}),e.strictObject({...U,action:e.literal(`cancel`)})]),vo=e.strictObject({operationId:uo.optional(),expectedRevision:lo.optional()}).refine(e=>e.operationId===void 0==(e.expectedRevision===void 0),`subscription_operation_reference_incomplete`),yo=e.object({code:e.enum([`invalid_request`,`identity_unavailable`,`origin_not_allowed`,`rate_limited`,`revision_conflict`,`operation_conflict`,`registration_conflict`,`dependency_unavailable`,`provider_rejected`,`provider_rate_limited`,`provider_unavailable`,`provider_timeout`,`internal_error`]),operationId:uo.optional(),correlationId:e.uuid(),stage:e.string().min(1).max(128),saveOutcome:e.enum([`not_saved`,`unknown`]),reasonSummary:e.string().min(1).max(2048),retryable:e.boolean(),cause:e.record(e.string(),e.unknown())}),bo=e.object({id:uo,state:e.enum([`pending`,`applied`,`rejected`,`unknown`,`superseded`,`not_found`]),error:yo.optional()}),xo=e.object({topicSettings:e.object({state:e.enum([`initial`,`saved`]),revision:lo,topics:po.strip(),locale:fo.nullable()}),registrationState:e.enum([`none`,`ready`,`invalid`,`changing`]),registrationKey:e.string().regex(/^[a-f0-9]{64}$/).nullable(),manualRetryRequired:e.boolean(),operation:bo.nullable()});function So(e,t){return{topics:t.action===`register`||t.action===`set_topics`?t.topics:e.topics,locale:t.action===`register`||t.action===`set_locale`?t.locale:e.locale}}const Co=e.object({data:xo}),wo=e.object({error:yo});function To(e){return{topicSettings:{state:`initial`,revision:e,topics:{reset:!0,improvement:!1},locale:null},registrationState:`none`,registrationKey:null,manualRetryRequired:!1,operation:null}}const Eo=po.extend({clue:e.boolean().default(!1)}),[Do,Oo,...ko]=_o.options,Ao=e.discriminatedUnion(`action`,[Do.extend({topics:Eo.refine(e=>Object.values(e).some(Boolean),`subscription_topic_required`)}),Oo.extend({topics:Eo}),...ko]),jo=xo.extend({topicSettings:xo.shape.topicSettings.extend({topics:Eo.strip()})}),Mo=e.object({data:jo});function No(e){return jo.parse(To(e))}function Po(e){let{clue:t,...n}=e.topicSettings.topics;return xo.parse({...e,topicSettings:{...e.topicSettings,topics:n}})}function Fo(e,t){return e.action!==`register`&&e.action!==`set_topics`?e:{...e,topics:{...e.topics,clue:e.action!==`register`&&(e.topics.reset||e.topics.improvement)&&t.clue}}}const Io=20,Lo=2*1024*1024,Ro=`/api/v1/improvements`,zo=e.string().min(1).max(1024),[Bo]=ha.shape.unassignedEntries.element.options,Vo=Bo.safeExtend({date:e.iso.date().refine(e=>e>Ra.endDate,`improvement_must_follow_campaign`)}),Ho=e.strictObject({}),Uo=e.object({challengeEnded:e.boolean(),observedAt:e.iso.datetime()}),Wo=e.strictObject({cursor:zo.nullable(),limit:e.literal(20)}),Go=Uo.extend({entries:e.array(Vo).max(20),nextCursor:zo.nullable()}).superRefine((e,t)=>{new Set(e.entries.map(e=>e.eventId)).size!==e.entries.length&&t.addIssue({code:`custom`,path:[`entries`],message:`Duplicate improvement identity`})}),Ko=e.strictObject({eventIds:e.array(P).min(1).max(128)}),qo=e.object({eventIds:e.array(P).max(128)}),Jo=e.object({error:e.object({code:e.enum([`invalid_request`,`dependency_unavailable`,`internal_error`]),message:e.string(),requestId:e.uuid(),operation:e.string(),stage:e.string(),cause:e.record(e.string(),e.unknown())})}),Yo=`/tibo-source/v1/latest.json`,Xo=512*1024,Zo=e.iso.datetime({offset:!0}),Qo=x.shape.noticeTimeline.element,$o=e.object({contractVersion:e.literal(1),observedAt:Zo,check:e.object({checkedAt:Zo,freshUntil:Zo,active:e.boolean()}).nullable(),latestPost:e.object({authoredAt:Zo,sourceUrl:Qo.shape.sourceUrl,sourceText:e.string(),sourceTranslations:Zr,resetRelevance:e.enum([`related`,`unrelated`,`unknown`])}).nullable()});async function es(e){let t=e.body?.getReader();if(t===void 0)throw Error(`tibo_source_status_body_missing`,{cause:{status:e.status}});let n=[],r=0;try{for(;;){let i=await t.read();if(i.done)break;if(r+=i.value.byteLength,r>524288)throw Error(`tibo_source_status_too_large`,{cause:{status:e.status,bytes:r}});n.push(i.value)}}finally{try{await t.cancel()}catch{}t.releaseLock()}let i=new Uint8Array(r),a=0;for(let e of n)i.set(e,a),a+=e.byteLength;let o=new TextDecoder(`utf-8`,{fatal:!0}).decode(i);if(!e.ok)throw Error(`tibo_source_status_http_error`,{cause:{status:e.status,upstream:o.slice(0,4e3)}});return $o.parse(JSON.parse(o))}const ts=`/reset-clue/v1/latest.json`,ns=4320*60*1e3,rs=i.exportUtf8Bytes,is=L.shape.noticeTimeline.element.pick({authoredAt:!0,sourceUrl:!0,sourceText:!0,sourceTranslations:!0,contentCompleteness:!0}).extend({plannedTiming:Re.nullable(),expiresAt:L.shape.noticeTimeline.element.shape.authoredAt}).superRefine((e,t)=>{Date.parse(e.expiresAt)!==Date.parse(e.authoredAt)+2592e5&&t.addIssue({code:`custom`,message:`reset_clue_expiry_mismatch`,path:[`expiresAt`]})}),as=e.object({contractVersion:e.literal(1),clue:is.nullable()}),os=e=>as.parse(e);function ss(e,t){return e.clue!==null&&t.getTime()<Date.parse(e.clue.expiresAt)?e.clue:null}async function cs(e){let t=e.body?.getReader();if(t===void 0)throw Error(`reset_clue_body_missing`,{cause:{status:e.status}});let n=[],r=0;try{for(;;){let i=await t.read();if(i.done)break;if(r+=i.value.byteLength,r>rs)throw Error(`reset_clue_too_large`,{cause:{status:e.status,bytes:r}});n.push(i.value)}}finally{try{await t.cancel()}catch{}t.releaseLock()}let i=new Uint8Array(r),a=0;for(let e of n)i.set(e,a),a+=e.byteLength;let o=new TextDecoder(`utf-8`,{fatal:!0}).decode(i);if(!e.ok)throw Error(`reset_clue_http_error`,{cause:{status:e.status,upstream:o.slice(0,4e3)}});return os(JSON.parse(o))}const W=e.enum(ka),G=e.string().regex(/^\d{4}-(?:0[1-9]|1[0-2])$/),K=e.string().trim().min(1),q=e.url({protocol:/^https$/}),J=e.discriminatedUnion(`kind`,[e.object({kind:e.literal(`instant`),at:e.iso.datetime()}),e.object({kind:e.literal(`date`),date:e.iso.date()})]),ls=e.object({operation:K,stage:K,cause:qt});function us(t){return e.discriminatedUnion(`state`,[e.object({state:e.literal(`ready`),value:t}),e.object({state:e.literal(`pending`)}),e.object({state:e.literal(`failed`),failure:ls})])}function Y(e,t){return e.superRefine((e,n)=>{new TextEncoder().encode(JSON.stringify(e)).byteLength>t&&n.addIssue({code:`custom`,message:`publication_utf8_size_limit_exceeded`})})}async function X(e,t,n,r){let i=e.body?.getReader();if(i===void 0)throw Error(`${t}_body_missing`,{cause:{operation:t,stage:`read`,status:e.status}});let a=[],o=0;try{for(;;){let e=await i.read();if(e.done)break;if(o+=e.value.byteLength,o>n)throw Error(`publication_utf8_size_limit_exceeded`);a.push(e.value)}}catch(n){throw Error(`${t}_read_failed`,{cause:{operation:t,stage:`read`,status:e.status,bytes:o,cause:n}})}finally{try{await i.cancel()}catch{}i.releaseLock()}let s=new Uint8Array(o),c=0;for(let e of a)s.set(e,c),c+=e.byteLength;let l;try{l=new TextDecoder(`utf-8`,{fatal:!0}).decode(s)}catch(n){throw Error(`${t}_decode_failed`,{cause:{operation:t,stage:`decode`,status:e.status,cause:n}})}if(!e.ok)throw Error(`${t}_http_error`,{cause:{operation:t,stage:`http`,status:e.status,upstream:l.slice(0,4e3)}});try{return r.parse(JSON.parse(l))}catch(n){throw Error(`${t}_parse_failed`,{cause:{operation:t,stage:`parse`,status:e.status,cause:n}})}}const ds=`/codex-releases/v2/directory.json`,fs=128*1024,ps=128*1024,ms=256*1024,hs=J,gs={product:e.enum([`app`,`cli`]),version:K,published:J,month:G,revision:K},_s=e.object(gs).superRefine(vs);function vs(e,t){let n=V.safeParse({product:e.product,version:e.version});if(!n.success)for(let e of n.error.issues)t.addIssue({...e});e.product===`cli`!=(e.published.kind===`instant`)&&t.addIssue({code:`custom`,path:[`published`],message:`product_date_precision_mismatch`}),(e.published.kind===`instant`?e.published.at:e.published.date).slice(0,7)!==e.month&&t.addIssue({code:`custom`,path:[`month`],message:`published_month_mismatch`})}function ys(e,t){let n=new Set,r=1/0;for(let[i,a]of e.entries()){let e=`${a.product}/${a.version}`;n.has(e)&&t.addIssue({code:`custom`,path:[`releases`,i],message:`duplicate_release_identity`}),n.add(e);let o=Date.parse(a.published.kind===`instant`?a.published.at:`${a.published.date}T00:00:00Z`);o>r&&t.addIssue({code:`custom`,path:[`releases`,i],message:`release_order_mismatch`}),r=o}}const bs=Y(e.object({contractVersion:e.literal(2),releases:e.array(_s),latest:e.object({app:e.string().nullable(),cli:e.string().nullable()})}).superRefine((e,t)=>{ys(e.releases,t);for(let n of[`app`,`cli`]){let r=e.releases.find(e=>e.product===n)?.version??null;e.latest[n]!==r&&t.addIssue({code:`custom`,path:[`latest`,n],message:`latest_release_mismatch`})}}),fs),xs=e.object({state:e.literal(`not_applicable`),reason:e.literal(`no_curated_notes`)}),Ss=e.union([us(e.object({locale:W,points:e.array(K).min(1).max(5)})),xs]),Cs=e.object({...gs,source:e.object({kind:e.enum([`github`,`official`]),url:q}),summary:Ss,notesCount:e.number().int().nonnegative()}).superRefine((e,t)=>{vs(e,t),e.product===`cli`!=(e.source.kind===`github`)&&t.addIssue({code:`custom`,path:[`source`,`kind`],message:`product_source_mismatch`}),e.notesCount===0!=(e.summary.state===`not_applicable`)&&t.addIssue({code:`custom`,path:[`summary`],message:`curated_notes_summary_state_mismatch`})}),ws=Y(e.object({contractVersion:e.literal(2),locale:W,month:G,releases:e.array(Cs)}).superRefine((e,t)=>{ys(e.releases,t);for(let[n,r]of e.releases.entries())r.month!==e.month&&t.addIssue({code:`custom`,path:[`releases`,n,`month`],message:`file_month_mismatch`}),r.summary.state===`ready`&&r.summary.value.locale!==e.locale&&r.summary.value.locale!==`en`&&t.addIssue({code:`custom`,path:[`releases`,n,`summary`,`value`,`locale`],message:`summary_locale_mismatch`})}),ps),Ts=e.array(e.object({title:K.nullable(),items:e.array(e.object({text:K,refs:K.nullable()})).min(1)})).min(1),Es=Y(e.object({contractVersion:e.literal(2),product:e.enum([`app`,`cli`]),version:K,revision:K,locale:W,original:e.array(Ts.element),translation:e.union([us(Ts),xs]).nullable()}).superRefine((e,t)=>{let n=V.safeParse({product:e.product,version:e.version});if(!n.success)for(let e of n.error.issues)t.addIssue({...e});if(e.locale===`en`!=(e.translation===null)&&t.addIssue({code:`custom`,path:[`translation`],message:`translation_locale_mismatch`}),e.locale!==`en`&&e.original.length===0!=(e.translation?.state===`not_applicable`)&&t.addIssue({code:`custom`,path:[`translation`],message:`curated_notes_translation_state_mismatch`}),e.translation?.state===`ready`){let n=e.translation.value;(n.length!==e.original.length||e.original.some((e,t)=>{let r=n.at(t);return r===void 0||e.title===null!=(r.title===null)||e.items.length!==r.items.length||e.items.some((e,t)=>e.refs!==r.items.at(t)?.refs)}))&&t.addIssue({code:`custom`,path:[`translation`],message:`translation_structure_mismatch`})}}),ms),Ds=e=>bs.parse(e),Os=e=>ws.parse(e),ks=e=>Es.parse(e),As=e=>X(e,`codex_release_directory`,fs,bs),js=e=>X(e,`codex_release_month`,ps,ws),Ms=e=>X(e,`codex_release_notes`,ms,Es);function Ns(e,t){return`/codex-releases/v2/${W.parse(e)}/${G.parse(t)}.json`}function Ps(e,t,n){let r=V.parse({product:t,version:n});return`/codex-releases/v2/${W.parse(e)}/notes/${r.product}/${r.version}.json`}const Fs=128*1024;function Z(t){return e.discriminatedUnion(`state`,[e.object({state:e.literal(`known`),value:t,source:q}),e.object({state:e.literal(`unavailable`),reason:e.enum([`not_announced`,`not_listed`]),source:q.nullable()})])}const Is=e.object({input:K,cached:K,output:K}),Ls=e.object({modelId:Pa,name:K,group:e.enum([`current`,`retired`]),status:e.enum([`available`,`retiring`,`retired`]),launched:Z(J),chatgptRetirement:Z(J),apiRetirement:Z(J),credits:Z(Is),apiPrice:Z(Is),multiple:e.string().regex(/^(?:0|[1-9]\d*)(?:\.\d+)?$/).refine(e=>Number.isFinite(Number(e))&&Number(e)>0).nullable(),plans:Z(e.array(K).min(1)),surfaces:Z(e.array(K).min(1)),about:us(e.object({locale:W,paragraphs:e.array(K).min(1)})),sources:e.array(e.object({label:K,url:q})).min(1)}).superRefine((e,t)=>{e.status===`retired`!=(e.group===`retired`)&&t.addIssue({code:`custom`,path:[`group`],message:`model_group_status_mismatch`}),e.status===`retiring`&&e.chatgptRetirement.state!==`known`&&t.addIssue({code:`custom`,path:[`chatgptRetirement`],message:`retiring_model_requires_announced_date`})}),Rs=Y(e.object({contractVersion:e.literal(1),locale:W,models:e.array(Ls),multipleBase:e.object({modelId:Pa,name:K}).nullable(),upcomingRetirement:e.object({names:K,modelIds:e.array(Pa).min(1),surface:e.enum([`api`,`chatgpt`]),at:J}).nullable()}).superRefine((e,t)=>{let n=new Set;for(let[r,i]of e.models.entries())n.has(i.modelId)&&t.addIssue({code:`custom`,path:[`models`,r,`modelId`],message:`duplicate_model_identity`}),n.add(i.modelId),i.about.state===`ready`&&i.about.value.locale!==e.locale&&i.about.value.locale!==`en`&&t.addIssue({code:`custom`,path:[`models`,r,`about`,`value`,`locale`],message:`model_description_locale_mismatch`}),i.multiple!==null&&(e.multipleBase===null||i.credits.state!==`known`)&&t.addIssue({code:`custom`,path:[`models`,r,`multiple`],message:`multiple_requires_base_and_credits`});if(e.multipleBase!==null){let n=e.models.find(t=>t.modelId===e.multipleBase?.modelId);(n===void 0||n.group!==`current`||n.credits.state!==`known`||n.multiple!==`1`||n.name!==e.multipleBase.name)&&t.addIssue({code:`custom`,path:[`multipleBase`],message:`multiple_base_mismatch`})}let r=e.upcomingRetirement;if(r!==null){new Set(r.modelIds).size!==r.modelIds.length&&t.addIssue({code:`custom`,path:[`upcomingRetirement`,`modelIds`],message:`duplicate_retirement_model`});for(let n of r.modelIds){let i=e.models.find(e=>e.modelId===n),a=r.surface===`api`?i?.apiRetirement:i?.chatgptRetirement;(a?.state!==`known`||JSON.stringify(a.value)!==JSON.stringify(r.at))&&t.addIssue({code:`custom`,path:[`upcomingRetirement`],message:`retirement_model_date_mismatch`})}}}),Fs),zs=e=>Rs.parse(e),Bs=e=>X(e,`codex_models`,Fs,Rs),Vs=e=>`/codex-models/v1/${W.parse(e)}.json`;function Hs(e){let[t=``,n=``]=e.replace(/Z$/,``).split(`.`);return`${t.length===16?t+`:00`:t}.${n.replace(/0+$/,``)}`}function Q(e,t){let n=Hs(e),r=Hs(t);return n<r?-1:+(n>r)}function Us(e,t){let n=Date.parse(e);return Number.isFinite(n)?new Date(n-t*864e5).toISOString().slice(0,19)+Hs(e).slice(19)+`Z`:e}function Ws(e,t,n){return e.length===10?e>=t.slice(0,10)&&e<=n.slice(0,10):Q(e,t)>=0&&Q(e,n)<=0}function Gs(e,t){Q(e.occurredAt,e.primary.authoredAt)!==0&&t.addIssue({code:`custom`,path:[`occurredAt`],message:`entry_primary_time_mismatch`}),Q(e.updatedAt,e.occurredAt)<0&&t.addIssue({code:`custom`,path:[`updatedAt`],message:`entry_update_before_occurrence`});let n=new Set([e.primary.url]);for(let[r,i]of e.otherSources.entries()){n.has(i.url)&&t.addIssue({code:`custom`,path:[`otherSources`,r,`url`],message:`duplicate_source_url`}),n.add(i.url);let a=e.otherSources.at(r-1);r>0&&a&&Q(a.authoredAt,i.authoredAt)>0&&t.addIssue({code:`custom`,path:[`otherSources`,r],message:`source_order_mismatch`})}for(let[n,r]of e.followUps.entries()){let i=e.followUps.at(n-1);n>0&&i&&Q(i.at,r.at)>0&&t.addIssue({code:`custom`,path:[`followUps`,n],message:`follow_up_order_mismatch`})}if(e.leak!==null){let n=e.leak;n.state===`unconfirmed`&&(e.primary.url!==n.url||Q(e.occurredAt,n.reportedAt)!==0)&&t.addIssue({code:`custom`,path:[`leak`],message:`unconfirmed_leak_primary_mismatch`}),n.state===`confirmed`&&e.primary.url===n.url&&t.addIssue({code:`custom`,path:[`leak`],message:`confirmed_leak_primary_mismatch`})}}function Ks(e,t){return Q(t.occurredAt,e.occurredAt)||(e.id<t.id?-1:+(e.id>t.id))}function qs(e,t){let n=new Set;for(let[r,i]of e.entries()){n.has(i.id)&&t.addIssue({code:`custom`,path:[`entries`,r,`id`],message:`duplicate_entry`}),n.add(i.id);let a=e.at(r-1);r>0&&a&&Ks(a,i)>0&&t.addIssue({code:`custom`,path:[`entries`,r],message:`entry_order_mismatch`})}}function Js(e,t,n=30){qs(e.entries,t);let r=Us(e.generatedAt,7),i=Us(e.generatedAt,n),a=e.entries.filter(t=>Ws(t.occurredAt,r,e.generatedAt));(e.overview.weekCount!==a.length||e.overview.unconfirmedLeakCount!==a.filter(e=>e.leak?.state===`unconfirmed`).length||e.overview.miniProgramHiddenWeekCount!==a.filter(e=>e.miniProgramHidden).length)&&t.addIssue({code:`custom`,path:[`overview`],message:`overview_entries_mismatch`}),(new Set(e.coverage.months).size!==e.coverage.months.length||e.coverage.months.some((t,n)=>n>0&&t>=e.coverage.months.at(n-1)))&&t.addIssue({code:`custom`,path:[`coverage`],message:`coverage_order_mismatch`});for(let[n,r]of e.entries.entries())(!Ws(r.occurredAt,i,e.generatedAt)||!e.coverage.months.includes(r.occurredAt.slice(0,7))||r.occurredAt.slice(0,10)<e.coverage.from)&&t.addIssue({code:`custom`,path:[`entries`,n],message:`entry_coverage_mismatch`})}function Ys(e,t){qs(e.entries,t),e.entries.some(t=>t.occurredAt.slice(0,7)!==e.month)&&t.addIssue({code:`custom`,path:[`entries`],message:`entry_month_mismatch`})}const Xs=256*1024,Zs=512*1024,Qs=3600*1e3,$s=e.enum([`model`,`product`,`pricing`,`security`,`policy`,`industry`,`controversy`]),$=e.string().trim().min(1),ec=e.object({zh:$.max(200),en:$.max(200)}),tc=e.object({what:$.max(400),scale:$.max(400),stakes:$.max(400)}),nc=e.discriminatedUnion(`form`,[e.object({form:e.literal(`line`),zh:$.max(600),en:$.max(600)}),e.object({form:e.literal(`explained`),zh:tc,en:tc})]),rc=e.union([e.iso.date(),e.iso.datetime()]),ic=e.object({url:q,label:$.max(120),authoredAt:rc}),ac=e.object({at:rc,title:ec,url:q}),oc=e.object({state:e.enum([`unconfirmed`,`confirmed`]),reportedAt:rc,url:q,label:$.max(120)});function sc(e,t){if(e.length===10)return{dateKey:e,instant:null};let n=new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(new Date(e)),r=e=>n.find(t=>t.type===e)?.value;return{dateKey:`${r(`year`)}-${r(`month`)}-${r(`day`)}`,instant:e}}function cc(e,t,n){return Ws(e,t,n)}const lc=Q,uc=e.object({id:e.string().regex(/^evt_[A-Za-z0-9_-]{1,64}$/),kind:$s,title:ec,summary:nc,occurredAt:rc,shortTitle:ec.nullable().optional(),primary:ic,otherSources:e.array(ic),followUps:e.array(ac),leak:oc.nullable(),miniProgramHidden:e.boolean(),updatedAt:e.iso.datetime()}).superRefine(Gs);function dc(e,t){return Ks(e,t)}const fc=Y(e.object({contractVersion:e.literal(1),generatedAt:e.iso.datetime(),overview:e.object({weekCount:e.number().int().nonnegative(),unconfirmedLeakCount:e.number().int().nonnegative(),miniProgramHiddenWeekCount:e.number().int().nonnegative()}),latestSourceSuccessAt:e.iso.datetime().nullable(),coverage:e.object({from:e.iso.date(),months:e.array(G)}),entries:e.array(uc)}).superRefine(Js),Xs),pc=Y(e.object({contractVersion:e.literal(1),month:G,entries:e.array(uc)}).superRefine(Ys),Zs),mc=()=>`/ai-radar/v1/latest.json`,hc=e=>`/ai-radar/v1/${G.parse(e)}.json`,gc=e=>fc.parse(e),_c=e=>pc.parse(e),vc=e=>X(e,`ai_radar_latest`,Xs,fc),yc=e=>X(e,`ai_radar_month`,Zs,pc),bc=e=>e===`zh-Hans`?`zh`:`en`;function xc(e,t){return e.latestSourceSuccessAt===null||Q(e.latestSourceSuccessAt,new Date(t-36e5).toISOString())<0}const Sc=Xs,Cc=Zs,wc=64*1024,Tc=e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),Ec=e.string().refine(e=>{let t=e.split(`
|
|
7
|
+
`),te=[],f=0;for(let e of n.chunks){if(!ln(c,l,f))return k(`source_stream_incomplete`,!0);f+=l.byteLength;let t=bn(c,d,f);if(t<0)return k(`source_stream_incomplete`,!0);let n=yn(c.slice(f,t));if(f=t+d.byteLength,n.get(`content-type`)!==`application/octet-stream`)return k(`source_chunk_mismatch`,!1);let r;try{r=cn.decode(pn(n.get(`x-radar-reset-action-id-b64`)))}catch(e){return k(`source_chunk_mismatch`,!1,e)}if(r!==e.resetActionId||n.get(`x-radar-detail-ordinal`)!==String(e.ordinal)||n.get(`x-radar-byte-size`)!==String(e.byteSize)||n.get(`x-radar-sha-256`)!==e.sha256)return k(`source_chunk_mismatch`,!1);if(f+e.byteSize+ee.byteLength>c.byteLength)return k(`source_stream_incomplete`,!0);let i=c.slice(f,f+e.byteSize);if(f+=e.byteSize,!ln(c,ee,f)||(f+=ee.byteLength,await mn(i)!==e.sha256))return k(`source_chunk_mismatch`,!1);te.push({...e,bytes:i})}return!ln(c,u,f)||f+u.byteLength!==c.byteLength?k(`source_stream_incomplete`,!0):te}const Sn=/authorization|cookie|token|secret|password|api[-_]?key/iu;function Cn(e,t){let n=[...e].slice(0,1024),r=``;for(let e of n){let n=O.encode(e).byteLength;if(n>t.remaining)break;t.remaining-=n,r+=e}return r}function wn(e,t,n,r){if(e===null||typeof e==`boolean`)return e;if(typeof e==`string`)return Cn(e,n);if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`bigint`||typeof e==`symbol`)return Cn(String(e),n);if(e===void 0)return`undefined`;if(typeof e==`function`)return`[Function ${e.name||`anonymous`}]`;if(r.has(e))return`[Circular]`;if(t>=4)return`[DepthLimit]`;if(r.add(e),Array.isArray(e))return e.slice(0,16).map(e=>wn(e,t+1,n,r));let i={},a=e instanceof Error?[[`type`,e.constructor.name],[`name`,e.name],[`message`,e.message],...e.cause===void 0?[]:[[`cause`,e.cause]],...Object.entries(e)]:Object.entries(e);for(let[e,o]of a.slice(0,16)){let a=Cn(String(e),n);if(!(a.length===0||Object.hasOwn(i,a))&&(n.remaining-=Math.min(n.remaining,8),i[a]=Sn.test(a)?`[REDACTED]`:wn(o,t+1,n,r),n.remaining<=0))break}return i}function Tn(e){let t=wn(e,0,{remaining:7e3},new Set),n=typeof t==`object`&&t&&!Array.isArray(t)?t:{type:e===null?`null`:typeof e,message:t};return qt.parse(n),n}function En(e){return e===`source_temporarily_unavailable`||e===`source_rpc_transport_failure`||e===`source_stream_incomplete`}function Dn(e){switch(e){case`source_invalid_request`:return 400;case`source_revision_unknown`:return 404;case`source_cursor_invalid`:case`source_chunk_mismatch`:return 409;case`source_response_over_capacity`:return 413;case`source_temporarily_unavailable`:case`source_rpc_transport_failure`:case`source_stream_incomplete`:return 503;case`source_integrity_conflict`:case`source_revision_identity_conflict`:case`source_sequence_exhausted`:return 500}}function On(e){let t={contractVersion:2,ok:!1,error:{code:e.code,operation:e.operation,stage:e.stage,...e.revision===void 0?{}:{revision:e.revision},retryable:En(e.code),correlationId:e.correlationId,cause:Tn(e.cause)}};return Yt.parse(t)}const kn=e.object({en:e.string().trim().min(1),zh:e.string().trim().min(1)}),An=e.iso.date(),A=e.object({category:e.enum([`improvement`,`direct_reset`,`reset_card`]),deliveryState:e.enum([`preview`,`landed`]),description:kn,dateBasis:e.enum([`occurrence`,`announcement`,`unresolved`]),sourceUrls:e.array(e.url({protocol:/^https?$/})).min(1)}),jn=e.discriminatedUnion(`state`,[e.object({state:e.literal(`ready`),text:kn}),e.object({state:e.enum([`pending`,`failed`,`not_applicable`]),text:e.null()})]),j=e.object({contractVersion:e.literal(1),generatedAt:e.iso.datetime(),timeZone:e.string().refine(e=>{try{return new Intl.DateTimeFormat(`en`,{timeZone:e}),!0}catch{return!1}},`Invalid source time zone`),startDate:An,endDate:An,processing:e.object({hasPending:e.boolean(),hasFailures:e.boolean()}),days:e.array(e.object({date:An,dayNumber:e.number().int().min(1).max(28),outcome:e.enum([`unconfirmed`,`improvement`,`reset`,`both`]),entries:e.array(A),summary:jn})).length(28),undatedEntries:e.array(A)}).superRefine((e,t)=>{let n=Date.parse(`${e.startDate}T00:00:00Z`);for(let[r,i]of e.days.entries()){let e=new Date(n+r*864e5).toISOString().slice(0,10);(i.date!==e||i.dayNumber!==r+1)&&t.addIssue({code:`custom`,path:[`days`,r],message:`Days must be contiguous and numbered in order`}),i.entries.some(e=>e.dateBasis===`unresolved`)&&t.addIssue({code:`custom`,path:[`days`,r,`entries`],message:`Unresolved dates belong in undatedEntries`});let a=i.entries.filter(e=>e.deliveryState===`landed`),o=a.some(e=>e.category===`improvement`),s=a.some(e=>e.category!==`improvement`),c=o?s?`both`:`improvement`:s?`reset`:`unconfirmed`;(i.outcome!==c||a.length===0!=(i.summary.state===`not_applicable`))&&t.addIssue({code:`custom`,path:[`days`,r],message:`Outcome and summary must reflect landed evidence`})}e.days.at(-1)?.date!==e.endDate&&t.addIssue({code:`custom`,path:[`endDate`],message:`End must match the last activity day`}),e.undatedEntries.some(e=>e.dateBasis!==`unresolved`)&&t.addIssue({code:`custom`,path:[`undatedEntries`],message:`Undated entries must have unresolved dates`})});function Mn(e){return j.parse(e)}function Nn(e){let t=e.some(e=>e.category===`improvement`&&e.deliveryState===`landed`),n=e.some(e=>e.category!==`improvement`);return t?n?`both`:`improvement`:n?`reset`:`unconfirmed`}function Pn(e){return Nn(e.filter(e=>e.deliveryState===`landed`))}const Fn=524288,In=j.shape,Ln=In.days.element,Rn=A.extend({date:In.startDate.nullable()}).superRefine((e,t)=>{e.date===null!=(e.dateBasis===`unresolved`)&&t.addIssue({code:`custom`,path:[`date`],message:`Date must agree with its evidence basis`})}),zn=e.object({state:e.enum([`unconfirmed`,`ongoing`,`ended`]),sourceUrls:e.array(A.shape.sourceUrls.element)}).superRefine((e,t)=>{e.state!==`unconfirmed`&&e.sourceUrls.length===0&&t.addIssue({code:`custom`,path:[`sourceUrls`],message:`Confirmed lifecycle states require source evidence`})}),Bn=Ln.omit({date:!0,entries:!0}).extend({entries:e.array(Rn),lifecycle:zn}),Vn=e.object({contractVersion:e.literal(2),generatedAt:In.generatedAt,timeZone:In.timeZone,processing:In.processing,days:e.array(Bn).length(28),unassignedEntries:e.array(Rn)}).superRefine((e,t)=>{for(let[n,r]of e.days.entries()){r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Official days must be numbered in order`});let e=r.entries.filter(e=>e.deliveryState===`landed`),i=Pn(r.entries);(r.outcome!==i||e.length===0!=(r.summary.state===`not_applicable`))&&t.addIssue({code:`custom`,path:[`days`,n],message:`Outcome and summary must reflect landed evidence`})}});function Hn(e){return Vn.parse(e)}const Un=Fn,M=e.object({en:e.string().trim().min(1),zh:e.string().trim().min(1)}),Wn=A.extend({title:M}),Gn=Vn.shape,Kn=Gn.days.element,qn=Kn.shape.entries.element.safeExtend({title:M}),Jn=Kn.extend({title:M.nullable(),entries:e.array(qn)}).superRefine((e,t)=>{e.title!==null!=(e.summary.state===`ready`)&&t.addIssue({code:`custom`,path:[`title`],message:`A daily title is available exactly when its summary is ready`})}),Yn=e.object({...Gn,contractVersion:e.literal(3),days:e.array(Jn),unassignedEntries:e.array(qn)}).superRefine((e,t)=>{let n=Vn.safeParse({contractVersion:2,generatedAt:e.generatedAt,timeZone:e.timeZone,processing:e.processing,days:e.days.map(({title:e,...t})=>({...t,entries:t.entries.map(({title:e,...t})=>t)})),unassignedEntries:e.unassignedEntries.map(({title:e,...t})=>t)});if(!n.success)for(let e of n.error.issues)t.addIssue({...e})});function Xn(e){return{improvementDays:e.days.filter(e=>e.outcome===`improvement`||e.outcome===`both`).length,resetDays:e.days.filter(e=>e.outcome===`reset`||e.outcome===`both`).length}}function Zn(e){return Yn.parse(e)}const Qn=Un,$n=Vn.shape,er=Yn.shape.unassignedEntries,tr=$n.days.element.omit({summary:!0}).extend({entries:er}),nr=e.object({...$n,contractVersion:e.literal(4),days:e.array(tr).length(28),unassignedEntries:er}).superRefine((e,t)=>{for(let[n,r]of e.days.entries())r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Official days must be numbered in order`}),r.outcome!==Pn(r.entries)&&t.addIssue({code:`custom`,path:[`days`,n],message:`Outcome must reflect landed evidence`})});function rr(e){return nr.parse(e)}function ir(e,t){let n=new Set;for(let r of e)n.has(r.eventId)&&t.addIssue({code:`custom`,message:`Duplicate activity eventId`}),n.add(r.eventId)}function ar(e,t,n){let r=n.reduce((t,n)=>t+e.reactionCounts[n],0);(!Number.isSafeInteger(r)||r!==e.reactionTotal)&&t.addIssue({code:`custom`,path:[`reactionTotal`],message:`Total must equal all reaction counts`})}async function or(e,t,n){if(e.status!==200){let t={status:e.status,statusText:e.statusText};try{await e.body?.cancel()}catch(e){throw Error(`activity_file_http_error`,{cause:{...t,cancellationCause:e}})}throw Error(`activity_file_http_error`,{cause:t})}if(e.body===null)throw Error(`activity_file_body_missing`);let r=e.body.getReader(),i=[],a=0;try{for(;;){let e=await r.read();if(e.done)break;if(a+=e.value.byteLength,a>n)throw Error(`activity_file_too_large`,{cause:{maxBytes:n,observedBytes:a}});i.push(e.value)}let e=new Uint8Array(a),o=0;for(let t of i)e.set(t,o),o+=t.byteLength;return t.parse(JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e)))}catch(e){try{await r.cancel()}catch{}throw Error(`activity_file_read_failed`,{cause:e})}finally{r.releaseLock()}}function sr(e,t,n){let r=new TextEncoder().encode(JSON.stringify(t.parse(e)));if(r.byteLength>n)throw Error(`activity_file_too_large`,{cause:{byteLength:r.byteLength}});return r}const N=[`👍`,`😂`,`🤡`,`💀`,`😭`,`🔥`,`🎉`,`👀`,`🙏`,`🫠`],cr=e.enum(N),P=e.string().min(1).max(128),F=524288,lr=`https://data.radarultra.com/activity/v1/latest.json`,ur=`https://data.radarultra.com/activity/v2/latest.json`,dr=A.extend({eventId:P}),fr=j.safeExtend({days:e.array(j.shape.days.element.extend({entries:e.array(dr)})).length(28),undatedEntries:e.array(dr)});function pr(e,t){ir([...e.days.flatMap(e=>e.entries),...e.undatedEntries],t)}const mr=fr.superRefine(pr),hr=e.record(cr,e.number().int().nonnegative()),gr=e.object({reactionCounts:hr,reactionTotal:e.number().int().nonnegative()});function _r(e,t){ar(e,t,N)}const vr=dr.extend(gr.shape).superRefine(_r),yr=fr.safeExtend({days:e.array(fr.shape.days.element.extend({entries:e.array(vr)})).length(28),undatedEntries:e.array(vr)}).superRefine(pr),I=e.object({publishedAt:e.iso.datetime(),reactionIds:e.array(cr).length(N.length).refine(e=>new Set(e).size===N.length,`Every reaction must occur exactly once`),progress:yr}),br=Yn.shape,xr=br.unassignedEntries.element.safeExtend({eventId:P}),Sr=e.object({...br,days:e.array(br.days.element.safeExtend({entries:e.array(xr)})).length(28),unassignedEntries:e.array(xr)}),Cr=Sr.superRefine((e,t)=>{let n=({eventId:e,...t})=>t,r=Yn.safeParse({...e,days:e.days.map(e=>({...e,entries:e.entries.map(n)})),unassignedEntries:e.unassignedEntries.map(n)});if(!r.success)for(let e of r.error.issues)t.addIssue({...e});ir([...e.days.flatMap(e=>e.entries),...e.unassignedEntries],t)}),wr=xr.safeExtend(gr.shape).superRefine(_r),Tr=Sr.safeExtend({days:e.array(br.days.element.safeExtend({entries:e.array(wr)})).length(28),unassignedEntries:e.array(wr)}).superRefine((e,t)=>{let n=({reactionCounts:e,reactionTotal:t,...n})=>n,r=Cr.safeParse({...e,days:e.days.map(e=>({...e,entries:e.entries.map(n)})),unassignedEntries:e.unassignedEntries.map(n)});if(!r.success)for(let e of r.error.issues)t.addIssue({...e})}),Er=I.extend({progress:Tr}),Dr=nr.shape,Or=Dr.unassignedEntries.element.safeExtend({eventId:P}),kr=nr.safeExtend({days:e.array(Dr.days.element.safeExtend({entries:e.array(Or)})).length(28),unassignedEntries:e.array(Or)}).superRefine((e,t)=>{ir([...e.days.flatMap(e=>e.entries),...e.unassignedEntries],t)}),Ar=Or.safeExtend(gr.shape).superRefine(_r),jr=kr.safeExtend({days:e.array(Dr.days.element.safeExtend({entries:e.array(Ar)})).length(28),unassignedEntries:e.array(Ar)}),Mr=I.extend({progress:jr});async function Nr(e){return or(e,I,F)}async function Pr(e){return or(e,Er,F)}async function Fr(e){return or(e,Mr,F)}function Ir(e){return sr(e,I,F)}function Lr(e){return sr(e,Er,F)}function Rr(e){return sr(e,Mr,F)}const zr=e.object({changeId:e.string().min(1).max(128),eventId:e.string().min(1).max(128),revision:e.int().positive(),kind:e.enum([`created`,`updated`,`withdrawn`]),date:e.iso.date().nullable(),entry:A,receivedAt:e.iso.datetime().nullable(),acceptedAt:e.iso.datetime()}),Br=e.object({contractVersion:e.literal(1),changes:e.array(zr),nextCursor:e.string().min(1),hasMore:e.boolean()}),Vr=zr.extend({dayNumber:j.shape.days.element.shape.dayNumber.nullable()}),Hr=Br.extend({contractVersion:e.literal(2),changes:e.array(Vr)}),Ur=e.int().min(0).max(2**53-1),Wr=e.int().min(1).max(28),Gr=e.enum([`yes`,`no`]).nullable(),Kr=e.object({choice:Gr}).strict(),qr=e.object({yes:Ur,no:Ur,total:Ur}).superRefine((e,t)=>{(!Number.isSafeInteger(e.yes+e.no)||e.total!==e.yes+e.no)&&t.addIssue({code:`custom`,path:[`total`],message:`Total must equal the effective choices.`})}),Jr=e.object({dayNumber:Wr,state:e.enum([`unopened`,`open`,`closed`]),choice:Gr,outcome:e.enum([`unconfirmed`,`yes`,`no`]),personalResult:e.enum([`none`,`waiting`,`correct`,`incorrect`]),corrected:e.boolean(),counts:qr}).superRefine((e,t)=>{let n=e.choice===null?`none`:e.outcome===`unconfirmed`?`waiting`:e.choice===e.outcome?`correct`:`incorrect`;e.personalResult!==n&&t.addIssue({code:`custom`,path:[`personalResult`],message:`Personal result must match the confirmed outcome and choice.`}),e.state!==`closed`&&e.outcome!==`unconfirmed`&&t.addIssue({code:`custom`,path:[`outcome`],message:`An open or unopened day cannot have a confirmed result.`}),e.state===`unopened`&&(e.choice!==null||e.counts.total!==0)&&t.addIssue({code:`custom`,path:[`state`],message:`An unopened day cannot have choices.`})}),Yr=e.object({revision:Ur,openDayNumber:Wr.nullable(),days:e.array(Jr).length(28)}).superRefine((e,t)=>{for(let[n,r]of e.days.entries()){r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Every official day must occur once, in order.`});let i=e.openDayNumber===null||r.dayNumber<e.openDayNumber?`closed`:r.dayNumber===e.openDayNumber?`open`:`unopened`;r.state!==i&&t.addIssue({code:`custom`,path:[`days`,n,`state`],message:`Only the next official day may be open.`})}}),Xr=e.object({error:e.object({code:e.enum([`invalid_request`,`payload_too_large`,`unsupported_media_type`,`origin_not_allowed`,`rate_limited`,`dependency_unavailable`,`internal_error`,`day_closed`,`identity_unavailable`]),message:e.string().min(1).max(2048),requestId:e.string().min(1).max(128),operation:e.enum([`get_guesses`,`set_guess`]),stage:e.string().min(1).max(128),cause:e.record(e.string(),e.unknown()),saveOutcome:e.enum([`not_saved`,`unknown`]).optional()})}).superRefine(({error:e},t)=>{e.operation===`set_guess`!=(e.saveOutcome!==void 0)&&t.addIssue({code:`custom`,path:[`error`,`saveOutcome`],message:`Only save failures must include a save outcome.`})}),Zr=e.object({"zh-Hans":x.shape.noticeTimeline.element.shape.sourceTextZh,"zh-Hant":x.shape.noticeTimeline.element.shape.sourceTextZh,ja:x.shape.noticeTimeline.element.shape.sourceTextZh,ko:x.shape.noticeTimeline.element.shape.sourceTextZh}),Qr=x.shape.noticeTimeline.element.omit({sourceTextZh:!0}).extend({sourceTranslations:Zr}),$r=e.object({...x.shape,contractVersion:e.literal(2),noticeTimeline:e.array(Qr).min(1).max(i.actionDetail.noticeTimeline)}),ei=Qr.omit({phase:!0}).extend({kinds:S.shape.noticeTimeline.element.shape.kinds}),ti=e.object({...S.shape,noticeTimeline:e.array(ei).min(1).max(i.actionDetail.noticeTimeline)}),ni=e=>{let{sourceTranslations:t,...n}=e;return{...n,sourceTextZh:t[`zh-Hans`]}},ri=e=>({...e,contractVersion:1,noticeTimeline:e.noticeTimeline.map(ni)}),ii=e=>({...e,noticeTimeline:e.noticeTimeline.map(ni)}),ai=(e,t)=>{for(let n of e.error?.issues??[])t.addIssue({...n})},L=$r.superRefine((e,t)=>{ai(x.safeParse(ri(e)),t)}),R=ti.superRefine((e,t)=>{ai(S.safeParse(ii(e)),t)}),oi=e.object({...He.shape,contractVersion:e.literal(2),actions:e.array(L).min(1).max(i.analysis.actions),pendingResetActions:e.array(R).max(i.analysis.actions)}).superRefine((e,t)=>{ai(He.safeParse({...e,contractVersion:1,actions:e.actions.map(ri),pendingResetActions:e.pendingResetActions.map(ii)}),t),new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&t.addIssue({code:`custom`,message:`export_utf8_size_limit_exceeded`,path:[]})}),si=e=>L.parse(e),ci=e=>R.parse(e),li=e=>oi.parse(e);function ui(e){let t=li(e);return He.parse({...t,contractVersion:1,actions:t.actions.map(ri),pendingResetActions:t.pendingResetActions.map(ii)})}const di=e.object(L.shape).omit({actionScope:!0,reasons:!0}).extend({contractVersion:e.literal(3)}).superRefine((e,n)=>t(e,n,C)),fi=oi.shape.generatedAt,pi=e.object({resetActionId:x.shape.resetActionId,effect:x.shape.resetEffects.options[0].shape.values.element.nullable(),at:fi,basis:e.enum([`execution_confirmation`,`announcement`]),sourceUrl:x.shape.noticeTimeline.element.shape.sourceUrl}),mi=e.number().int().nonnegative(),hi=e.number().finite().nonnegative();function z(e,t){try{return C(e,t)}catch{return}}function gi(e,t){return e<t?-1:+(e>t)}const _i=e.object({timeBasis:e.literal(`confirmation_priority`),startAt:fi,total:mi,hardResetCount:mi,bankedResetCount:mi,unknownCount:mi,records:e.array(pi).max(i.analysis.actions*2),intervalSummary:e.object({mean:hi,max:hi}).nullable()});function vi(e,t){let n=(e,n=[])=>t.addIssue({code:`custom`,message:e,path:n}),r={hard_reset:0,banked_reset:0,unknown:0},a=new Set,o=new Map,s=new Set,c=new Set;for(let[t,i]of e.records.entries()){r[i.effect??`unknown`]+=1;let l=JSON.stringify([i.resetActionId,i.effect]);a.has(l)&&n(`statistics_record_identity_duplicate`,[`records`,t]),a.add(l),i.effect===null?s.add(i.resetActionId):c.add(i.resetActionId),z(i.at,e.startAt)===-1&&n(`statistics_record_before_window`,[`records`,t,`at`]);let u=e.records.at(t-1);if(t>0&&u!==void 0){let e=z(u.at,i.at);e!==void 0&&(e>0||e===0&&(gi(u.resetActionId,i.resetActionId)>0||u.resetActionId===i.resetActionId&&gi(u.effect??``,i.effect??``)>0))&&n(`statistics_records_not_stably_sorted`,[`records`,t])}let d=o.get(i.resetActionId);(d===void 0||z(i.at,d)===-1)&&o.set(i.resetActionId,i.at)}o.size>i.analysis.actions&&n(`statistics_event_limit_exceeded`),[...s].some(e=>c.has(e))&&n(`statistics_event_effect_state_mismatch`),e.total!==e.records.length&&n(`statistics_total_mismatch`,[`total`]),e.hardResetCount!==r.hard_reset&&n(`statistics_hard_reset_count_mismatch`,[`hardResetCount`]),e.bankedResetCount!==r.banked_reset&&n(`statistics_banked_reset_count_mismatch`,[`bankedResetCount`]),e.unknownCount!==r.unknown&&n(`statistics_unknown_count_mismatch`,[`unknownCount`]);let l=[...o.values()].sort((e,t)=>z(e,t)??0),u=l.slice(1).map((e,t)=>Number(((Date.parse(e)-Date.parse(l.at(t)))/864e5).toFixed(6)));if(u.length===0)e.intervalSummary!==null&&n(`statistics_interval_summary_must_be_null`,[`intervalSummary`]);else if(u.every(Number.isFinite)){let t=Number((u.reduce((e,t)=>e+t,0)/u.length).toFixed(6)),r=Math.max(...u);(e.intervalSummary===null||Math.abs(e.intervalSummary.mean-t)>1e-9||Math.abs(e.intervalSummary.max-r)>1e-9)&&n(`statistics_interval_summary_mismatch`,[`intervalSummary`])}}const B=_i.superRefine(vi),yi=e.object(oi.shape).omit({analysis:!0}).extend({contractVersion:e.literal(3),statistics:B,actions:e.array(di).min(1).max(i.analysis.actions)}).superRefine((e,t)=>{let n=(e,n=[])=>t.addIssue({code:`custom`,message:e,path:n});new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&n(`export_utf8_size_limit_exceeded`);let r=new Map(e.actions.map(e=>[e.resetActionId,e])),a=new Set(e.statistics.records.map(e=>e.resetActionId));r.size!==e.actions.length&&n(`export_action_identity_duplicate`,[`actions`]),new Set(e.pendingResetActions.map(e=>e.resetActionId)).size!==e.pendingResetActions.length&&n(`export_pending_action_identity_duplicate`,[`pendingResetActions`]);for(let[t,r]of e.actions.entries()){let i=e.actions.at(t-1);t>0&&i!==void 0&&fi.safeParse(i.firstAnnouncedAt).success&&fi.safeParse(r.firstAnnouncedAt).success&&Ue(i,r)>0&&n(`export_actions_not_stably_sorted`,[`actions`,t]),z(r.firstAnnouncedAt,e.generatedAt)===1&&n(`export_action_after_snapshot`,[`actions`,t,`firstAnnouncedAt`]);let o=z(r.firstAnnouncedAt,e.statistics.startAt);o!==void 0&&o>=0&&!a.has(r.resetActionId)&&n(`export_statistics_window_action_missing`,[`actions`,t,`resetActionId`])}for(let[t,i]of e.statistics.records.entries()){let a=[`statistics`,`records`,t],o=r.get(i.resetActionId);if(o===void 0){n(`export_statistics_action_missing`,a);continue}(o.resetEffects.state===`unknown`!=(i.effect===null)||i.effect!==null&&!o.resetEffects.values.some(e=>e===i.effect))&&n(`export_statistics_effect_mismatch`,[...a,`effect`]);let s=o.noticeTimeline.filter(e=>e.sourceUrl===i.sourceUrl&&z(e.authoredAt,i.at)===0);s.length===0&&n(`export_statistics_source_mismatch`,a),i.basis===`execution_confirmation`&&!s.some(e=>e.phase===`executed`)&&n(`export_statistics_confirmation_source_invalid`,a),i.basis===`announcement`&&z(i.at,o.firstAnnouncedAt)!==0&&n(`export_statistics_announcement_time_mismatch`,a),z(i.at,e.generatedAt)===1&&n(`export_statistics_record_after_snapshot`,[...a,`at`])}}),bi=e.object({contractVersion:e.literal(1),data:e.object({sourceWatermark:ie.shape.sourceWatermark,statistics:B}),meta:e.object({observedAt:fi})}),xi=e=>yi.parse(e);function Si(e,t){let n=oi.parse(e);return xi({contractVersion:3,generatedAt:n.generatedAt,statistics:t,pendingResetActions:n.pendingResetActions,actions:n.actions.map(({actionScope:e,reasons:t,...n})=>({...n,contractVersion:3}))})}const Ci=e=>di.parse(e),wi=`/api/v1/codex-reset-public-records`,Ti=[`claude`,`antigravity`],Ei=e=>`/api/v1/reset-products/${e}/public-records`,Di=e.array(ei).min(1).max(i.actionDetail.noticeTimeline),Oi=e.object(L.shape).omit({contractVersion:!0,noticeCount:!0,noticeTimeline:!0}).extend({noticeTimeline:Di});function ki(e){let t=e.noticeTimeline.filter(e=>e.kinds.includes(`executed`)||e.kinds.includes(`preview`)).map(({kinds:e,...t})=>({...t,phase:e.includes(`executed`)?`executed`:`preview`}));return{...e,contractVersion:2,noticeCount:t.length,noticeTimeline:t}}const Ai=e=>L.parse(ki(e));function ji(e,t){let n=new Set;for(let[r,i]of e.entries()){n.has(i.sourceUrl)&&t.addIssue({code:`custom`,message:`public_notice_source_duplicate`,path:[`noticeTimeline`,r]}),n.add(i.sourceUrl);let a=e.at(r-1),o=L.shape.firstAnnouncedAt;r>0&&a!==void 0&&o.safeParse(a.authoredAt).success&&o.safeParse(i.authoredAt).success&&C(a.authoredAt,i.authoredAt)>0&&t.addIssue({code:`custom`,message:`public_notice_timeline_not_ascending`,path:[`noticeTimeline`,r]})}}const Mi=Oi.superRefine((e,t)=>{ji(e.noticeTimeline,t);let n=L.safeParse(ki(e));for(let e of n.error?.issues??[])t.addIssue({...e})}),Ni=e.object(R.shape).omit({state:!0,executedEffects:!0,pendingEffects:!0}).superRefine((e,t)=>{ji(e.noticeTimeline,t)}),Pi=e.object(L.shape).pick({resetActionId:!0}).extend({lastActiveFirstAnnouncedAt:L.shape.firstAnnouncedAt,withdrawnAt:L.shape.firstAnnouncedAt}),Fi=i.analysis.actions,Ii={sourceWatermark:L.shape.resetActionId,generatedAt:L.shape.firstAnnouncedAt,pendingResetActions:e.array(R).max(Fi),unexecutedResetActions:e.array(Ni).max(Fi),withdrawnResetActions:e.array(Pi).max(Fi)};function Li(e,t){for(let n of[`actions`,`pendingResetActions`,`unexecutedResetActions`,`withdrawnResetActions`])new Set(e[n].map(e=>e.resetActionId)).size!==e[n].length&&t.addIssue({code:`custom`,message:`public_reset_identity_duplicate`,path:[n]});let n=new Set(e.actions.map(e=>e.resetActionId));for(let n of e.pendingResetActions)ji(n.noticeTimeline,t);(e.unexecutedResetActions.some(e=>n.has(e.resetActionId))||e.withdrawnResetActions.some(e=>n.has(e.resetActionId)))&&t.addIssue({code:`custom`,message:`public_reset_lifecycle_conflict`});for(let[n,r]of e.actions.entries()){let i=e.actions.at(n-1),a=L.shape.firstAnnouncedAt;n>0&&i!==void 0&&a.safeParse(i.firstAnnouncedAt).success&&a.safeParse(r.firstAnnouncedAt).success&&Ue(i,r)>=0&&t.addIssue({code:`custom`,message:`public_reset_actions_not_ascending`,path:[`actions`,n]})}new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&t.addIssue({code:`custom`,message:`public_reset_records_utf8_size_limit_exceeded`})}const Ri=e.object({contractVersion:e.literal(1),...Ii,actions:e.array(Mi).min(1).max(Fi)}).superRefine(Li),zi=e.object({contractVersion:e.literal(1),product:e.enum(Ti),...Ii,actions:e.array(Mi).max(Fi),statistics:B}).superRefine((e,t)=>{Li(e,t);let n=new Set(e.actions.map(e=>e.resetActionId));for(let[r,i]of e.statistics.records.entries())n.has(i.resetActionId)||t.addIssue({code:`custom`,message:`product_public_records_statistics_action_missing`,path:[`statistics`,`records`,r,`resetActionId`]});if(e.product!==`antigravity`)return;let r=e=>t.addIssue({code:`custom`,message:`product_public_records_banked_reset_forbidden`,path:e});for(let[t,n]of e.actions.entries())n.resetEffects.state===`known`&&n.resetEffects.values.includes(`banked_reset`)&&r([`actions`,t,`resetEffects`,`values`]);for(let[t,n]of e.pendingResetActions.entries())n.resetEffects.state===`known`&&n.resetEffects.values.includes(`banked_reset`)&&r([`pendingResetActions`,t,`resetEffects`,`values`]);for(let[t,n]of e.statistics.records.entries())n.effect===`banked_reset`&&r([`statistics`,`records`,t,`effect`]);e.statistics.bankedResetCount!==0&&r([`statistics`,`bankedResetCount`])}),Bi=L.shape,Vi=e.strictObject({title:e.string(),body:e.string()}),Hi=e.strictObject({zh:Vi,en:Vi}),Ui=e.enum([`codex`,`claude`,`antigravity`]),Wi=e.enum([`end_preview`,`restore_preview`,`set_auto_notification`,`notify`,`confirm`]),Gi=e.strictObject({resetActionId:Bi.resetActionId,operation:Wi,expectedRevision:e.int().nonnegative(),copy:Hi.nullable(),automaticNotification:e.boolean().nullable(),executedAt:T.nullable().optional()}).superRefine((e,t)=>{e.operation===`notify`!=(e.copy!==null)&&t.addIssue({code:`custom`,path:[`copy`],message:`notification_copy_operation_mismatch`}),e.operation===`set_auto_notification`!=(e.automaticNotification!==null)&&t.addIssue({code:`custom`,path:[`automaticNotification`],message:`notification_policy_operation_mismatch`}),e.operation!==`notify`&&e.operation!==`confirm`&&e.executedAt!=null&&t.addIssue({code:`custom`,path:[`executedAt`],message:`execution_time_operation_mismatch`})}),Ki=Gi.superRefine((e,t)=>{(e.operation===`notify`||e.operation===`confirm`)&&e.executedAt==null&&t.addIssue({code:`custom`,path:[`executedAt`],message:`execution_time_required`})}),qi=Hi.extend({zh:Vi.strip(),en:Vi.strip()}).strip(),Ji=Gi.safeExtend({copy:qi.nullable()}).strip(),Yi=e.object({digest:e.string().regex(/^sha256:[a-f0-9]{64}$/),sourceWatermark:e.string().min(1),draft:Ki.safeExtend({copy:qi.nullable()}).strip()}),Xi=e.strictObject({operationId:e.uuid(),preview:Yi.extend({draft:Ki}).strict()}),Zi=e.object({resetActionId:Bi.resetActionId,revision:e.number().int().nonnegative(),product:Ui,notificationAvailable:e.boolean(),state:e.enum([`preview`,`executed`,`cancelled`,`undetermined`]),firstAnnouncedAt:T.nullable(),officialConfirmed:e.boolean(),pendingPreview:e.boolean(),previewClosed:e.boolean(),automaticNotification:e.boolean(),sourceUrls:e.array(Bi.noticeTimeline.element.shape.sourceUrl),availableOperations:e.array(Wi),notificationOperationId:e.uuid().nullable()}),Qi=e.object({actions:e.array(Zi)}),$i=e.discriminatedUnion(`status`,[e.object({status:e.literal(`unknown`),operationId:e.uuid()}),e.object({status:e.literal(`saved`),operationId:e.uuid(),resetActionId:Bi.resetActionId,operation:Wi,revision:e.number().int().positive(),notification:e.object({state:e.enum([`disabled`,`pending`,`claimed`,`retry_wait`,`accepted`,`rejected`,`expired`]),resultCode:e.string().nullable(),diagnostic:e.record(e.string(),e.unknown()).nullable()})})]),ea=x.shape.noticeTimeline.element.shape,ta=e.enum([`initial`,`supplement`,`correction`]).nullable(),na=e.object({authoredAt:ea.authoredAt,role:ta,sourceUrl:ea.sourceUrl,sourceText:ea.sourceText,sourceTextZh:ea.sourceTextZh}),ra=e.array(na).min(1).superRefine((e,t)=>{let n=new Set,r;for(let[i,a]of e.entries()){if(n.has(a.sourceUrl)&&t.addIssue({code:`custom`,path:[i,`sourceUrl`],message:`An original post may appear only once per improvement`}),n.add(a.sourceUrl),!ea.authoredAt.safeParse(a.authoredAt).success){r=void 0;continue}if(r!==void 0){let e=C(r.authoredAt,a.authoredAt);(e>0||e===0&&r.sourceUrl>a.sourceUrl)&&t.addIssue({code:`custom`,path:[i],message:`Posts must be ordered by authoredAt and sourceUrl`})}r=a}}),ia=Qn,aa=A.omit({description:!0}).extend({category:e.literal(`improvement`),title:M,shortTitle:M.nullable().optional(),posts:ra}),oa=A.extend({category:e.enum([`direct_reset`,`reset_card`]),title:M}),sa=e.discriminatedUnion(`category`,[aa,oa]),ca=nr.shape,la=ca.unassignedEntries.element.shape.date;function ua(e,t){e.date===null!=(e.dateBasis===`unresolved`)&&t.addIssue({code:`custom`,path:[`date`],message:`Date must agree with its evidence basis`})}const da=e.discriminatedUnion(`category`,[aa.extend({date:la}).superRefine(ua),oa.extend({date:la}).superRefine(ua)]),fa=e.object({...ca,contractVersion:e.literal(5),days:e.array(ca.days.element.extend({entries:e.array(da)})).length(28),unassignedEntries:e.array(da)}).superRefine((e,t)=>{for(let[n,r]of e.days.entries())r.dayNumber!==n+1&&t.addIssue({code:`custom`,path:[`days`,n,`dayNumber`],message:`Official days must be numbered in order`}),r.outcome!==Nn(r.entries)&&r.outcome!==Pn(r.entries)&&t.addIssue({code:`custom`,path:[`days`,n],message:`Outcome must reflect accepted reset and landed improvement evidence`})});function pa(e){return fa.parse(e)}const ma=`https://data.radarultra.com/activity/v3/latest.json`,ha=fa.shape,[ga,_a]=ha.unassignedEntries.element.options,va=ga.safeExtend({eventId:P}),ya=_a.safeExtend({eventId:P}),ba=e.discriminatedUnion(`category`,[va,ya]),xa=fa.safeExtend({days:e.array(ha.days.element.extend({entries:e.array(ba)})).length(28),unassignedEntries:e.array(ba)}).superRefine((e,t)=>{ir([...e.days.flatMap(e=>e.entries),...e.unassignedEntries],t)}),Sa={reactionCounts:hr,reactionTotal:e.number().int().nonnegative()},Ca=(e,t)=>ar(e,t,N),wa=e.discriminatedUnion(`category`,[va.safeExtend(Sa).superRefine(Ca),ya.safeExtend(Sa).superRefine(Ca)]),Ta=xa.safeExtend({days:e.array(ha.days.element.extend({entries:e.array(wa)})).length(28),unassignedEntries:e.array(wa)}),Ea=I.extend({progress:Ta});async function Da(e){return or(e,Ea,F)}function Oa(e){return sr(e,Ea,F)}const ka=e.discriminatedUnion(`category`,[aa,A.extend({category:e.enum([`direct_reset`,`reset_card`])})]),Aa=Vr.extend({entry:ka}),ja=Hr.extend({contractVersion:e.literal(3),changes:e.array(Aa)});function Ma(e){return Aa.parse(e)}function Na(e){return ja.parse(e)}const Pa=`https://radarultra.com`,Fa=[`zh-Hans`,`zh-Hant`,`en`,`ja`,`ko`],Ia={"zh-Hans":`zh-hans`,"zh-Hant":`zh-hant`,en:`en`,ja:`ja`,ko:`ko`},La={"zh-Hans":`/${Ia[`zh-Hans`]}`,"zh-Hant":`/${Ia[`zh-Hant`]}`,en:``,ja:`/${Ia.ja}`,ko:`/${Ia.ko}`},Ra=`/zh`,za={reset:`/codex`,improvement:`/codex/updates`,challengeRecap:`/codex/28-day-challenge`,changelog:`/codex/changelog`,models:`/codex/models`,dynamics:`/news`},Ba=e.discriminatedUnion(`product`,[e.strictObject({product:e.literal(`cli`),version:e.string().regex(/^\d+\.\d+\.\d+$/)}),e.strictObject({product:e.literal(`app`),version:e.string().regex(/^\d{2}\.\d{3,4}$/)})]),Va=e.string().regex(/^(?!\.{1,2}$)[a-z0-9.-]+$/);function V(e,t){return Pa+La[t]+za[e]}function Ha(e,t){let n=t===`zh-Hans`?`/zh`:La[t];return Pa+n+za[e]}function Ua(e,t,n){let r=Ba.parse({product:e,version:t});return`${V(`changelog`,n)}/${r.product}/${r.version}`}function Wa(e,t){return`${V(`models`,t)}/${Va.parse(e)}`}const Ga=Object.freeze({timeZone:`America/Los_Angeles`,startDate:`2026-10-05`,endDate:`2026-11-01`}),Ka=Date.parse(`${Ga.startDate}T00:00:00Z`),qa=(Date.parse(`${Ga.endDate}T00:00:00Z`)-Ka)/864e5+1,Ja=new Intl.DateTimeFormat(`en-CA`,{timeZone:Ga.timeZone,year:`numeric`,month:`2-digit`,day:`2-digit`});function Ya(e){let t=Ja.formatToParts(e),n=e=>Number(t.find(t=>t.type===e).value),r=(Date.UTC(n(`year`),n(`month`)-1,n(`day`))-Ka)/864e5,i=r<0?`before`:r>=qa?`ended`:`live`,a=Math.min(qa,Math.max(1,r+1));return{phase:i,today:a,ongoingDay:i===`live`?a:null}}const Xa=e.enum([`reset`,`improvement`]),Za=e.array(Xa).min(1).max(2).refine(e=>new Set(e).size===e.length,`notification_topic_duplicate`),Qa=e=>new Set(Fa.flatMap(t=>[V(e,t),Ha(e,t)])),$a={reset:Qa(`reset`),improvement:Qa(`improvement`)},eo=t=>e.url().refine(e=>$a[t].has(e),`notification_target_url_invalid`),to=e.url().refine(e=>Object.values($a).some(t=>t.has(e)),`notification_target_not_owned`),no=e.discriminatedUnion(`kind`,[e.object({kind:e.literal(`reset`),webUrl:eo(`reset`),miniPath:e.literal(`pages/index/index`)}).strict(),e.object({kind:e.literal(`improvement`),webUrl:eo(`improvement`),miniPath:e.literal(`pages/index/index?page=challenge`)}).strict()]),ro=e.object({topics:Za,target:no}).strict().refine(e=>e.topics.includes(e.target.kind),`notification_target_topic_mismatch`),io=e.enum([`reset`,`improvement`,`clue`]),ao=e.object({topics:e.array(io).min(1).max(2).refine(e=>new Set(e).size===e.length,`notification_topic_duplicate`),target:no}).strict().refine(e=>e.topics.some(t=>(t===`clue`?`reset`:t)===e.target.kind),`notification_target_topic_mismatch`);function oo(e,t){let n=so(e===`clue`?`reset`:e,t);return ao.parse({...n,topics:[e],target:{...n.target,webUrl:Ha(n.target.kind,t)}})}function so(e,t){return ro.parse({topics:[e],target:{kind:e,webUrl:V(e,t),miniPath:e===`reset`?`pages/index/index`:`pages/index/index?page=challenge`}})}const co=e.object({notificationId:e.uuid(),eventId:e.uuid(),title:e.string().trim().min(1).max(512),createdAt:e.iso.datetime(),deliverBy:e.iso.datetime(),...ro.shape,target:e.discriminatedUnion(`kind`,[no.options[0].strip(),no.options[1].strip()])}).superRefine((e,t)=>{e.topics.includes(e.target.kind)||t.addIssue({code:`custom`,message:`notification_target_topic_mismatch`}),C(e.deliverBy,e.createdAt)<=0&&t.addIssue({code:`custom`,message:`notification_task_deadline_invalid`})});function lo(e,t){return C(e.createdAt,t.createdAt)||(e.notificationId<t.notificationId?-1:+(e.notificationId>t.notificationId))}const uo=`/api/v1/notification-tasks`,fo=100,po=e.string().min(1).max(8192),mo=e.object({cursor:po.optional()}).strict(),ho=e.object({contractVersion:e.literal(1),roundCursor:po,notifications:e.array(co).max(100),nextCursor:po.nullable()}).superRefine((e,t)=>{new Set(e.notifications.map(e=>e.notificationId)).size!==e.notifications.length&&t.addIssue({code:`custom`,message:`notification_task_duplicate`});for(let n=1;n<e.notifications.length;n++)lo(e.notifications.at(n-1),e.notifications.at(n))>=0&&t.addIssue({code:`custom`,message:`notification_task_order_invalid`});e.nextCursor!==null&&e.notifications.length===0&&t.addIssue({code:`custom`,message:`notification_task_empty_continuation`})}),go=`/api/browser-notifications`,_o=e.string().min(1).max(128),vo=e.uuid(),yo=e.enum(Fa),bo=e.strictObject({reset:e.boolean(),improvement:e.boolean()}),xo=`[cdef][\\w-]{21}`,So=e.strictObject({fid:e.string().regex(RegExp(`^${xo}$`))});function Co(e){return e.replace(RegExp(`(^|[^\\w-])${xo}(?![\\w-])`,`g`),`$1[registration]`)}const H={operationId:vo,expectedRevision:_o},wo=e.discriminatedUnion(`action`,[e.strictObject({...H,action:e.literal(`register`),topics:bo.refine(e=>e.reset||e.improvement,`subscription_topic_required`),locale:yo,registration:So}),e.strictObject({...H,action:e.literal(`set_topics`),topics:bo}),e.strictObject({...H,action:e.literal(`set_locale`),locale:yo}),e.strictObject({...H,action:e.literal(`restore`),registration:So}),e.strictObject({...H,action:e.literal(`retry`)}),e.strictObject({...H,action:e.literal(`cancel`)})]),To=e.strictObject({operationId:vo.optional(),expectedRevision:_o.optional()}).refine(e=>e.operationId===void 0==(e.expectedRevision===void 0),`subscription_operation_reference_incomplete`),Eo=e.object({code:e.enum([`invalid_request`,`identity_unavailable`,`origin_not_allowed`,`rate_limited`,`revision_conflict`,`operation_conflict`,`registration_conflict`,`dependency_unavailable`,`provider_rejected`,`provider_rate_limited`,`provider_unavailable`,`provider_timeout`,`internal_error`]),operationId:vo.optional(),correlationId:e.uuid(),stage:e.string().min(1).max(128),saveOutcome:e.enum([`not_saved`,`unknown`]),reasonSummary:e.string().min(1).max(2048),retryable:e.boolean(),cause:e.record(e.string(),e.unknown())}),Do=e.object({id:vo,state:e.enum([`pending`,`applied`,`rejected`,`unknown`,`superseded`,`not_found`]),error:Eo.optional()}),Oo=e.object({topicSettings:e.object({state:e.enum([`initial`,`saved`]),revision:_o,topics:bo.strip(),locale:yo.nullable()}),registrationState:e.enum([`none`,`ready`,`invalid`,`changing`]),registrationKey:e.string().regex(/^[a-f0-9]{64}$/).nullable(),manualRetryRequired:e.boolean(),operation:Do.nullable()});function ko(e,t){return{topics:t.action===`register`||t.action===`set_topics`?t.topics:e.topics,locale:t.action===`register`||t.action===`set_locale`?t.locale:e.locale}}const Ao=e.object({data:Oo}),jo=e.object({error:Eo});function Mo(e){return{topicSettings:{state:`initial`,revision:e,topics:{reset:!0,improvement:!1},locale:null},registrationState:`none`,registrationKey:null,manualRetryRequired:!1,operation:null}}const No=bo.extend({clue:e.boolean().default(!1)}),[Po,Fo,...Io]=wo.options,Lo=e.discriminatedUnion(`action`,[Po.extend({topics:No.refine(e=>Object.values(e).some(Boolean),`subscription_topic_required`)}),Fo.extend({topics:No}),...Io]),Ro=Oo.extend({topicSettings:Oo.shape.topicSettings.extend({topics:No.strip()})}),zo=e.object({data:Ro});function Bo(e){return Ro.parse(Mo(e))}function Vo(e){let{clue:t,...n}=e.topicSettings.topics;return Oo.parse({...e,topicSettings:{...e.topicSettings,topics:n}})}function Ho(e,t){return e.action!==`register`&&e.action!==`set_topics`?e:{...e,topics:{...e.topics,clue:e.action!==`register`&&(e.topics.reset||e.topics.improvement)&&t.clue}}}const Uo=20,Wo=2*1024*1024,Go=`/api/v1/improvements`,Ko=e.string().min(1).max(1024),[qo]=xa.shape.unassignedEntries.element.options,Jo=qo.safeExtend({date:e.iso.date().refine(e=>e>Ga.endDate,`improvement_must_follow_campaign`)}),Yo=e.strictObject({}),Xo=e.object({challengeEnded:e.boolean(),observedAt:e.iso.datetime()}),Zo=e.strictObject({cursor:Ko.nullable(),limit:e.literal(20)}),Qo=Xo.extend({entries:e.array(Jo).max(20),nextCursor:Ko.nullable()}).superRefine((e,t)=>{new Set(e.entries.map(e=>e.eventId)).size!==e.entries.length&&t.addIssue({code:`custom`,path:[`entries`],message:`Duplicate improvement identity`})}),$o=e.strictObject({eventIds:e.array(P).min(1).max(128)}),es=e.object({eventIds:e.array(P).max(128)}),ts=e.object({error:e.object({code:e.enum([`invalid_request`,`dependency_unavailable`,`internal_error`]),message:e.string(),requestId:e.uuid(),operation:e.string(),stage:e.string(),cause:e.record(e.string(),e.unknown())})}),ns=`/tibo-source/v1/latest.json`,rs=512*1024,is=e.iso.datetime({offset:!0}),as=x.shape.noticeTimeline.element,os=e.object({contractVersion:e.literal(1),observedAt:is,check:e.object({checkedAt:is,freshUntil:is,active:e.boolean()}).nullable(),latestPost:e.object({authoredAt:is,sourceUrl:as.shape.sourceUrl,sourceText:e.string(),sourceTranslations:Zr,resetRelevance:e.enum([`related`,`unrelated`,`unknown`])}).nullable()});async function ss(e){let t=e.body?.getReader();if(t===void 0)throw Error(`tibo_source_status_body_missing`,{cause:{status:e.status}});let n=[],r=0;try{for(;;){let i=await t.read();if(i.done)break;if(r+=i.value.byteLength,r>524288)throw Error(`tibo_source_status_too_large`,{cause:{status:e.status,bytes:r}});n.push(i.value)}}finally{try{await t.cancel()}catch{}t.releaseLock()}let i=new Uint8Array(r),a=0;for(let e of n)i.set(e,a),a+=e.byteLength;let o=new TextDecoder(`utf-8`,{fatal:!0}).decode(i);if(!e.ok)throw Error(`tibo_source_status_http_error`,{cause:{status:e.status,upstream:o.slice(0,4e3)}});return os.parse(JSON.parse(o))}const cs=`/reset-clue/v1/latest.json`,ls=4320*60*1e3,us=i.exportUtf8Bytes,ds=L.shape.noticeTimeline.element.pick({authoredAt:!0,sourceUrl:!0,sourceText:!0,sourceTranslations:!0,contentCompleteness:!0}).extend({plannedTiming:Re.nullable(),expiresAt:L.shape.noticeTimeline.element.shape.authoredAt}).superRefine((e,t)=>{Date.parse(e.expiresAt)!==Date.parse(e.authoredAt)+2592e5&&t.addIssue({code:`custom`,message:`reset_clue_expiry_mismatch`,path:[`expiresAt`]})}),fs=e.object({contractVersion:e.literal(1),clue:ds.nullable()}),ps=e=>fs.parse(e);function ms(e,t){return e.clue!==null&&t.getTime()<Date.parse(e.clue.expiresAt)?e.clue:null}async function hs(e){let t=e.body?.getReader();if(t===void 0)throw Error(`reset_clue_body_missing`,{cause:{status:e.status}});let n=[],r=0;try{for(;;){let i=await t.read();if(i.done)break;if(r+=i.value.byteLength,r>us)throw Error(`reset_clue_too_large`,{cause:{status:e.status,bytes:r}});n.push(i.value)}}finally{try{await t.cancel()}catch{}t.releaseLock()}let i=new Uint8Array(r),a=0;for(let e of n)i.set(e,a),a+=e.byteLength;let o=new TextDecoder(`utf-8`,{fatal:!0}).decode(i);if(!e.ok)throw Error(`reset_clue_http_error`,{cause:{status:e.status,upstream:o.slice(0,4e3)}});return ps(JSON.parse(o))}const U=e.enum(Fa),W=e.string().regex(/^\d{4}-(?:0[1-9]|1[0-2])$/),G=e.string().trim().min(1),K=e.url({protocol:/^https$/}),q=e.discriminatedUnion(`kind`,[e.object({kind:e.literal(`instant`),at:e.iso.datetime()}),e.object({kind:e.literal(`date`),date:e.iso.date()})]),gs=e.object({operation:G,stage:G,cause:qt});function _s(t){return e.discriminatedUnion(`state`,[e.object({state:e.literal(`ready`),value:t}),e.object({state:e.literal(`pending`)}),e.object({state:e.literal(`failed`),failure:gs})])}function J(e,t){return e.superRefine((e,n)=>{new TextEncoder().encode(JSON.stringify(e)).byteLength>t&&n.addIssue({code:`custom`,message:`publication_utf8_size_limit_exceeded`})})}async function Y(e,t,n,r){let i=e.body?.getReader();if(i===void 0)throw Error(`${t}_body_missing`,{cause:{operation:t,stage:`read`,status:e.status}});let a=[],o=0;try{for(;;){let e=await i.read();if(e.done)break;if(o+=e.value.byteLength,o>n)throw Error(`publication_utf8_size_limit_exceeded`);a.push(e.value)}}catch(n){throw Error(`${t}_read_failed`,{cause:{operation:t,stage:`read`,status:e.status,bytes:o,cause:n}})}finally{try{await i.cancel()}catch{}i.releaseLock()}let s=new Uint8Array(o),c=0;for(let e of a)s.set(e,c),c+=e.byteLength;let l;try{l=new TextDecoder(`utf-8`,{fatal:!0}).decode(s)}catch(n){throw Error(`${t}_decode_failed`,{cause:{operation:t,stage:`decode`,status:e.status,cause:n}})}if(!e.ok)throw Error(`${t}_http_error`,{cause:{operation:t,stage:`http`,status:e.status,upstream:l.slice(0,4e3)}});try{return r.parse(JSON.parse(l))}catch(n){throw Error(`${t}_parse_failed`,{cause:{operation:t,stage:`parse`,status:e.status,cause:n}})}}const vs=`/codex-releases/v2/directory.json`,ys=128*1024,bs=128*1024,xs=256*1024,Ss=q,Cs={product:e.enum([`app`,`cli`]),version:G,published:q,month:W,revision:G},ws=e.object(Cs).superRefine(Ts);function Ts(e,t){let n=Ba.safeParse({product:e.product,version:e.version});if(!n.success)for(let e of n.error.issues)t.addIssue({...e});e.product===`cli`!=(e.published.kind===`instant`)&&t.addIssue({code:`custom`,path:[`published`],message:`product_date_precision_mismatch`}),(e.published.kind===`instant`?e.published.at:e.published.date).slice(0,7)!==e.month&&t.addIssue({code:`custom`,path:[`month`],message:`published_month_mismatch`})}function Es(e,t){let n=new Set,r=1/0;for(let[i,a]of e.entries()){let e=`${a.product}/${a.version}`;n.has(e)&&t.addIssue({code:`custom`,path:[`releases`,i],message:`duplicate_release_identity`}),n.add(e);let o=Date.parse(a.published.kind===`instant`?a.published.at:`${a.published.date}T00:00:00Z`);o>r&&t.addIssue({code:`custom`,path:[`releases`,i],message:`release_order_mismatch`}),r=o}}const Ds=J(e.object({contractVersion:e.literal(2),releases:e.array(ws),latest:e.object({app:e.string().nullable(),cli:e.string().nullable()})}).superRefine((e,t)=>{Es(e.releases,t);for(let n of[`app`,`cli`]){let r=e.releases.find(e=>e.product===n)?.version??null;e.latest[n]!==r&&t.addIssue({code:`custom`,path:[`latest`,n],message:`latest_release_mismatch`})}}),ys),Os=e.object({state:e.literal(`not_applicable`),reason:e.literal(`no_curated_notes`)}),ks=e.union([_s(e.object({locale:U,points:e.array(G).min(1).max(5)})),Os]),As=e.object({...Cs,source:e.object({kind:e.enum([`github`,`official`]),url:K}),summary:ks,notesCount:e.number().int().nonnegative()}).superRefine((e,t)=>{Ts(e,t),e.product===`cli`!=(e.source.kind===`github`)&&t.addIssue({code:`custom`,path:[`source`,`kind`],message:`product_source_mismatch`}),e.notesCount===0!=(e.summary.state===`not_applicable`)&&t.addIssue({code:`custom`,path:[`summary`],message:`curated_notes_summary_state_mismatch`})}),js=J(e.object({contractVersion:e.literal(2),locale:U,month:W,releases:e.array(As)}).superRefine((e,t)=>{Es(e.releases,t);for(let[n,r]of e.releases.entries())r.month!==e.month&&t.addIssue({code:`custom`,path:[`releases`,n,`month`],message:`file_month_mismatch`}),r.summary.state===`ready`&&r.summary.value.locale!==e.locale&&r.summary.value.locale!==`en`&&t.addIssue({code:`custom`,path:[`releases`,n,`summary`,`value`,`locale`],message:`summary_locale_mismatch`})}),bs),Ms=e.array(e.object({title:G.nullable(),items:e.array(e.object({text:G,refs:G.nullable()})).min(1)})).min(1),Ns=J(e.object({contractVersion:e.literal(2),product:e.enum([`app`,`cli`]),version:G,revision:G,locale:U,original:e.array(Ms.element),translation:e.union([_s(Ms),Os]).nullable()}).superRefine((e,t)=>{let n=Ba.safeParse({product:e.product,version:e.version});if(!n.success)for(let e of n.error.issues)t.addIssue({...e});if(e.locale===`en`!=(e.translation===null)&&t.addIssue({code:`custom`,path:[`translation`],message:`translation_locale_mismatch`}),e.locale!==`en`&&e.original.length===0!=(e.translation?.state===`not_applicable`)&&t.addIssue({code:`custom`,path:[`translation`],message:`curated_notes_translation_state_mismatch`}),e.translation?.state===`ready`){let n=e.translation.value;(n.length!==e.original.length||e.original.some((e,t)=>{let r=n.at(t);return r===void 0||e.title===null!=(r.title===null)||e.items.length!==r.items.length||e.items.some((e,t)=>e.refs!==r.items.at(t)?.refs)}))&&t.addIssue({code:`custom`,path:[`translation`],message:`translation_structure_mismatch`})}}),xs),Ps=e=>Ds.parse(e),Fs=e=>js.parse(e),Is=e=>Ns.parse(e),Ls=e=>Y(e,`codex_release_directory`,ys,Ds),Rs=e=>Y(e,`codex_release_month`,bs,js),zs=e=>Y(e,`codex_release_notes`,xs,Ns);function Bs(e,t){return`/codex-releases/v2/${U.parse(e)}/${W.parse(t)}.json`}function Vs(e,t,n){let r=Ba.parse({product:t,version:n});return`/codex-releases/v2/${U.parse(e)}/notes/${r.product}/${r.version}.json`}const Hs=128*1024;function X(t){return e.discriminatedUnion(`state`,[e.object({state:e.literal(`known`),value:t,source:K}),e.object({state:e.literal(`unavailable`),reason:e.enum([`not_announced`,`not_listed`]),source:K.nullable()})])}const Us=e.object({input:G,cached:G,output:G}),Ws=e.object({modelId:Va,name:G,group:e.enum([`current`,`retired`]),status:e.enum([`available`,`retiring`,`retired`]),launched:X(q),chatgptRetirement:X(q),apiRetirement:X(q),credits:X(Us),apiPrice:X(Us),multiple:e.string().regex(/^(?:0|[1-9]\d*)(?:\.\d+)?$/).refine(e=>Number.isFinite(Number(e))&&Number(e)>0).nullable(),plans:X(e.array(G).min(1)),surfaces:X(e.array(G).min(1)),about:_s(e.object({locale:U,paragraphs:e.array(G).min(1)})),sources:e.array(e.object({label:G,url:K})).min(1)}).superRefine((e,t)=>{e.status===`retired`!=(e.group===`retired`)&&t.addIssue({code:`custom`,path:[`group`],message:`model_group_status_mismatch`}),e.status===`retiring`&&e.chatgptRetirement.state!==`known`&&t.addIssue({code:`custom`,path:[`chatgptRetirement`],message:`retiring_model_requires_announced_date`})}),Gs=J(e.object({contractVersion:e.literal(1),locale:U,models:e.array(Ws),multipleBase:e.object({modelId:Va,name:G}).nullable(),upcomingRetirement:e.object({names:G,modelIds:e.array(Va).min(1),surface:e.enum([`api`,`chatgpt`]),at:q}).nullable()}).superRefine((e,t)=>{let n=new Set;for(let[r,i]of e.models.entries())n.has(i.modelId)&&t.addIssue({code:`custom`,path:[`models`,r,`modelId`],message:`duplicate_model_identity`}),n.add(i.modelId),i.about.state===`ready`&&i.about.value.locale!==e.locale&&i.about.value.locale!==`en`&&t.addIssue({code:`custom`,path:[`models`,r,`about`,`value`,`locale`],message:`model_description_locale_mismatch`}),i.multiple!==null&&(e.multipleBase===null||i.credits.state!==`known`)&&t.addIssue({code:`custom`,path:[`models`,r,`multiple`],message:`multiple_requires_base_and_credits`});if(e.multipleBase!==null){let n=e.models.find(t=>t.modelId===e.multipleBase?.modelId);(n===void 0||n.group!==`current`||n.credits.state!==`known`||n.multiple!==`1`||n.name!==e.multipleBase.name)&&t.addIssue({code:`custom`,path:[`multipleBase`],message:`multiple_base_mismatch`})}let r=e.upcomingRetirement;if(r!==null){new Set(r.modelIds).size!==r.modelIds.length&&t.addIssue({code:`custom`,path:[`upcomingRetirement`,`modelIds`],message:`duplicate_retirement_model`});for(let n of r.modelIds){let i=e.models.find(e=>e.modelId===n),a=r.surface===`api`?i?.apiRetirement:i?.chatgptRetirement;(a?.state!==`known`||JSON.stringify(a.value)!==JSON.stringify(r.at))&&t.addIssue({code:`custom`,path:[`upcomingRetirement`],message:`retirement_model_date_mismatch`})}}}),Hs),Ks=e=>Gs.parse(e),qs=e=>Y(e,`codex_models`,Hs,Gs),Js=e=>`/codex-models/v1/${U.parse(e)}.json`;function Ys(e){let[t=``,n=``]=e.replace(/Z$/,``).split(`.`);return`${t.length===16?t+`:00`:t}.${n.replace(/0+$/,``)}`}function Z(e,t){let n=Ys(e),r=Ys(t);return n<r?-1:+(n>r)}function Xs(e,t){let n=Date.parse(e);return Number.isFinite(n)?new Date(n-t*864e5).toISOString().slice(0,19)+Ys(e).slice(19)+`Z`:e}function Zs(e,t,n){return e.length===10?e>=t.slice(0,10)&&e<=n.slice(0,10):Z(e,t)>=0&&Z(e,n)<=0}function Qs(e,t){Z(e.occurredAt,e.primary.authoredAt)!==0&&t.addIssue({code:`custom`,path:[`occurredAt`],message:`entry_primary_time_mismatch`}),Z(e.updatedAt,e.occurredAt)<0&&t.addIssue({code:`custom`,path:[`updatedAt`],message:`entry_update_before_occurrence`});let n=new Set([e.primary.url]);for(let[r,i]of e.otherSources.entries()){n.has(i.url)&&t.addIssue({code:`custom`,path:[`otherSources`,r,`url`],message:`duplicate_source_url`}),n.add(i.url);let a=e.otherSources.at(r-1);r>0&&a&&Z(a.authoredAt,i.authoredAt)>0&&t.addIssue({code:`custom`,path:[`otherSources`,r],message:`source_order_mismatch`})}for(let[n,r]of e.followUps.entries()){let i=e.followUps.at(n-1);n>0&&i&&Z(i.at,r.at)>0&&t.addIssue({code:`custom`,path:[`followUps`,n],message:`follow_up_order_mismatch`})}if(e.leak!==null){let n=e.leak;n.state===`unconfirmed`&&(e.primary.url!==n.url||Z(e.occurredAt,n.reportedAt)!==0)&&t.addIssue({code:`custom`,path:[`leak`],message:`unconfirmed_leak_primary_mismatch`}),n.state===`confirmed`&&e.primary.url===n.url&&t.addIssue({code:`custom`,path:[`leak`],message:`confirmed_leak_primary_mismatch`})}}function $s(e,t){return Z(t.occurredAt,e.occurredAt)||(e.id<t.id?-1:+(e.id>t.id))}function ec(e,t){let n=new Set;for(let[r,i]of e.entries()){n.has(i.id)&&t.addIssue({code:`custom`,path:[`entries`,r,`id`],message:`duplicate_entry`}),n.add(i.id);let a=e.at(r-1);r>0&&a&&$s(a,i)>0&&t.addIssue({code:`custom`,path:[`entries`,r],message:`entry_order_mismatch`})}}function tc(e,t,n=30){ec(e.entries,t);let r=Xs(e.generatedAt,7),i=Xs(e.generatedAt,n),a=e.entries.filter(t=>Zs(t.occurredAt,r,e.generatedAt));(e.overview.weekCount!==a.length||e.overview.unconfirmedLeakCount!==a.filter(e=>e.leak?.state===`unconfirmed`).length||e.overview.miniProgramHiddenWeekCount!==a.filter(e=>e.miniProgramHidden).length)&&t.addIssue({code:`custom`,path:[`overview`],message:`overview_entries_mismatch`}),(new Set(e.coverage.months).size!==e.coverage.months.length||e.coverage.months.some((t,n)=>n>0&&t>=e.coverage.months.at(n-1)))&&t.addIssue({code:`custom`,path:[`coverage`],message:`coverage_order_mismatch`});for(let[n,r]of e.entries.entries())(!Zs(r.occurredAt,i,e.generatedAt)||!e.coverage.months.includes(r.occurredAt.slice(0,7))||r.occurredAt.slice(0,10)<e.coverage.from)&&t.addIssue({code:`custom`,path:[`entries`,n],message:`entry_coverage_mismatch`})}function nc(e,t){ec(e.entries,t),e.entries.some(t=>t.occurredAt.slice(0,7)!==e.month)&&t.addIssue({code:`custom`,path:[`entries`],message:`entry_month_mismatch`})}const rc=256*1024,ic=512*1024,ac=3600*1e3,oc=e.enum([`model`,`product`,`pricing`,`security`,`policy`,`industry`,`controversy`]),Q=e.string().trim().min(1),sc=e.object({zh:Q.max(200),en:Q.max(200)}),cc=e.object({what:Q.max(400),scale:Q.max(400),stakes:Q.max(400)}),lc=e.discriminatedUnion(`form`,[e.object({form:e.literal(`line`),zh:Q.max(600),en:Q.max(600)}),e.object({form:e.literal(`explained`),zh:cc,en:cc})]),uc=e.union([e.iso.date(),e.iso.datetime()]),dc=e.object({url:K,label:Q.max(120),authoredAt:uc}),fc=e.object({at:uc,title:sc,url:K}),pc=e.object({state:e.enum([`unconfirmed`,`confirmed`]),reportedAt:uc,url:K,label:Q.max(120)});function mc(e,t){if(e.length===10)return{dateKey:e,instant:null};let n=new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(new Date(e)),r=e=>n.find(t=>t.type===e)?.value;return{dateKey:`${r(`year`)}-${r(`month`)}-${r(`day`)}`,instant:e}}function hc(e,t,n){return Zs(e,t,n)}const gc=Z,_c=e.object({id:e.string().regex(/^evt_[A-Za-z0-9_-]{1,64}$/),kind:oc,title:sc,summary:lc,occurredAt:uc,shortTitle:sc.nullable().optional(),primary:dc,otherSources:e.array(dc),followUps:e.array(fc),leak:pc.nullable(),miniProgramHidden:e.boolean(),updatedAt:e.iso.datetime()}).superRefine(Qs);function vc(e,t){return $s(e,t)}const yc=J(e.object({contractVersion:e.literal(1),generatedAt:e.iso.datetime(),overview:e.object({weekCount:e.number().int().nonnegative(),unconfirmedLeakCount:e.number().int().nonnegative(),miniProgramHiddenWeekCount:e.number().int().nonnegative()}),latestSourceSuccessAt:e.iso.datetime().nullable(),coverage:e.object({from:e.iso.date(),months:e.array(W)}),entries:e.array(_c)}).superRefine(tc),rc),bc=J(e.object({contractVersion:e.literal(1),month:W,entries:e.array(_c)}).superRefine(nc),ic),xc=()=>`/ai-radar/v1/latest.json`,Sc=e=>`/ai-radar/v1/${W.parse(e)}.json`,Cc=e=>yc.parse(e),wc=e=>bc.parse(e),Tc=e=>Y(e,`ai_radar_latest`,rc,yc),Ec=e=>Y(e,`ai_radar_month`,ic,bc),Dc=e=>e===`zh-Hans`?`zh`:`en`;function Oc(e,t){return e.latestSourceSuccessAt===null||Z(e.latestSourceSuccessAt,new Date(t-36e5).toISOString())<0}const kc=rc,Ac=ic,jc=64*1024,Mc=e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),Nc=e.string().refine(e=>{let t=e.split(`
|
|
8
8
|
|
|
9
9
|
`);return t.length<=3&&t.every(e=>e.trim().length>0)&&e.trim().split(`
|
|
10
10
|
|
|
11
|
-
`).every(e=>e===e.trim()&&!/[\r\n]/.test(e))},{message:`digest_paragraphs_invalid`}).trim().min(1),Dc=e.strictObject({zh:Ec.max(1e3),en:Ec.max(2e3)}).nullable(),Oc=ic.extend({official:e.boolean()}),{summary:kc,...Ac}=uc.shape,jc=e.strictObject({...Ac,id:Tc,digest:Dc,primary:Oc,otherSources:e.array(Oc)}).superRefine(Gs),Mc=Y(e.object({...fc.shape,contractVersion:e.literal(2),entries:e.array(jc)}).superRefine((e,t)=>Js(e,t,7)),Sc),Nc=Y(e.object({...pc.shape,contractVersion:e.literal(2),entries:e.array(jc)}).superRefine(Ys),Cc),Pc=Y(e.strictObject({contractVersion:e.literal(2),generatedAt:e.iso.datetime(),entry:jc}),wc);function Fc(e,t){return Ks(e,t)}const Ic=()=>`/ai-radar/v2/latest.json`,Lc=e=>`/ai-radar/v2/${G.parse(e)}.json`,Rc=e=>`/ai-radar/v2/events/${Tc.parse(e)}.json`,zc=e=>Mc.parse(e),Bc=e=>Nc.parse(e),Vc=e=>Pc.parse(e),Hc=e=>X(e,`ai_radar_latest_v2`,Sc,Mc),Uc=e=>X(e,`ai_radar_month_v2`,Cc,Nc),Wc=e=>X(e,`ai_radar_event_v2`,wc,Pc);function Gc(e,t){return`${H(`dynamics`,t)}/${Tc.parse(e)}`}function Kc(e,t){let n=[e.primary.authoredAt,...e.otherSources.map(e=>e.authoredAt),...e.followUps.map(e=>e.at)];e.leak!==null&&n.push(e.leak.reportedAt);let r=n.map(e=>e.length===10?`${e}T00:00:00Z`:e).reduce((e,t)=>Q(e,t)>=0?e:t);return Q(r,new Date(t-1440*60*1e3).toISOString())>0?`developing`:Q(r,new Date(t-4320*60*1e3).toISOString())>0?`watching`:`past`}function qc(e){return e.shortTitle??e.title}const Jc=e.object({revision:e.string().min(1).max(160),digest:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),Yc=e.discriminatedUnion(`kind`,[e.object({publicationId:e.string().min(1).max(160),kind:e.literal(`content`),sources:e.object({"reset-v1":Jc,"reset-v2":Jc,"reset-v3":Jc,"reset-v4":Jc.optional()}).strict()}).strict(),e.object({publicationId:e.string().min(1).max(160),kind:e.literal(`reset-clue`),sources:e.object({"reset-clue":Jc}).strict()}).strict()]),Xc=e.object({resource:e.enum([`content-v1`,`content-v2`,`content-v3`,`content-v4`,`reset-clue`]),sourceRevision:e.string().min(1).max(160),sourceDigest:e.string().regex(/^[a-f0-9]{64}$/),targetVersion:e.iso.datetime().nullable(),targetDigest:e.string().regex(/^[a-f0-9]{64}$/).nullable(),outcome:e.enum([`published`,`unchanged`,`busy`,`superseded`,`failed`]),error:e.object({operation:e.string().min(1),stage:e.string().min(1),code:e.string().min(1),summary:e.string().min(1),correlationId:e.string().min(1),cause:e.unknown(),upstreamStatus:e.number().int().optional(),upstreamCode:e.string().optional()}).optional()}).superRefine((e,t)=>{(e.outcome===`published`||e.outcome===`unchanged`)&&(e.targetVersion===null||e.targetDigest===null)&&t.addIssue({code:`custom`,message:`completed publication requires a target receipt`}),e.outcome===`failed`&&e.error===void 0&&t.addIssue({code:`custom`,message:`failed publication requires a cause`})}),Zc=e.object({publicationId:e.string().min(1).max(160),results:e.array(Xc).min(1).max(4)}).superRefine((e,t)=>{new Set(e.results.map(e=>e.resource)).size!==e.results.length&&t.addIssue({code:`custom`,message:`duplicate resource`})}),Qc=`/api/v1/internal/publications/wechat/dispatch`,$c=`/__radar/wechat-publication/dispatch`,el=bi.shape.generatedAt,tl=z.shape.records.element,nl=e.object({id:e.string().min(1),resetActionId:tl.shape.resetActionId,at:el,effects:e.array(tl.shape.effect).min(1).max(2),source:e.discriminatedUnion(`kind`,[e.object({kind:e.literal(`official_post`),sourceUrl:tl.shape.sourceUrl}),e.object({kind:e.literal(`manual`),officialConfirmationMissing:e.boolean()})])}),rl=e.object(z.shape).extend({records:e.array(e.object(tl.shape).extend({sourceUrl:tl.shape.sourceUrl.nullable(),confirmationId:e.string().min(1).nullable()})).max(i.analysis.actions*2)}).superRefine((e,t)=>{yi(e,t);for(let[n,r]of e.records.entries())r.basis===`execution_confirmation`!=(r.confirmationId!==null)&&t.addIssue({code:`custom`,message:`statistics_confirmation_identity_mismatch`,path:[`records`,n]}),r.basis===`announcement`&&r.sourceUrl===null&&t.addIssue({code:`custom`,message:`statistics_announcement_source_missing`,path:[`records`,n]})}),il=e.object({sourceWatermark:ie.shape.sourceWatermark,confirmations:e.array(nl),statistics:rl}),al=e.object(bi.shape).extend({contractVersion:e.literal(4),statistics:rl,confirmations:e.array(nl)}).superRefine((e,t)=>{let n=e=>t.addIssue({code:`custom`,message:e});new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&n(`export_utf8_size_limit_exceeded`);let r=new Map(e.confirmations.map(e=>[e.id,e])),a=new Map(e.actions.map(e=>[e.resetActionId,e]));a.size!==e.actions.length&&n(`export_action_identity_duplicate`),new Set(e.pendingResetActions.map(e=>e.resetActionId)).size!==e.pendingResetActions.length&&n(`export_pending_action_identity_duplicate`);let o=new Set(e.statistics.records.map(e=>e.resetActionId));for(let[t,r]of e.actions.entries()){Date.parse(r.firstAnnouncedAt)>Date.parse(e.generatedAt)&&n(`export_action_after_snapshot`);let i=e.actions.at(t-1);t>0&&i!==void 0&&el.safeParse(i.firstAnnouncedAt).success&&el.safeParse(r.firstAnnouncedAt).success&&Ue(i,r)>0&&n(`export_actions_not_stably_sorted`),Date.parse(r.firstAnnouncedAt)>=Date.parse(e.statistics.startAt)&&!o.has(r.resetActionId)&&n(`export_statistics_window_action_missing`)}r.size!==e.confirmations.length&&t.addIssue({code:`custom`,message:`confirmation_identity_duplicate`});for(let r of e.confirmations){let i=a.get(r.resetActionId);(i===void 0||Date.parse(r.at)>Date.parse(e.generatedAt))&&t.addIssue({code:`custom`,message:`confirmation_action_or_time_invalid`}),(new Set(r.effects).size!==r.effects.length||r.effects.some(e=>i!==void 0&&(e===null!=(i.resetEffects.state===`unknown`)||e!==null&&!i.resetEffects.values.some(t=>t===e))))&&n(`confirmation_effect_mismatch`);let o=r.source;o.kind===`official_post`&&!i?.noticeTimeline.some(e=>e.phase===`executed`&&e.sourceUrl===o.sourceUrl&&e.authoredAt===r.at)&&t.addIssue({code:`custom`,message:`confirmation_official_source_invalid`})}for(let i of e.statistics.records){let o=a.get(i.resetActionId),s=i.confirmationId===null?void 0:r.get(i.confirmationId);Date.parse(i.at)>Date.parse(e.generatedAt)&&n(`export_statistics_record_after_snapshot`),o!==void 0&&(o.resetEffects.state===`unknown`!=(i.effect===null)||i.effect!==null&&!o.resetEffects.values.some(e=>e===i.effect))&&n(`export_statistics_effect_mismatch`),(o===void 0||i.confirmationId!==null&&(s===void 0||s.resetActionId!==i.resetActionId||s.at!==i.at||!s.effects.includes(i.effect)))&&t.addIssue({code:`custom`,message:`statistics_confirmation_missing_or_mismatched`}),s!==void 0&&i.sourceUrl!==(s.source.kind===`official_post`?s.source.sourceUrl:null)&&n(`statistics_confirmation_source_mismatch`),i.basis===`announcement`&&!o?.noticeTimeline.some(e=>e.sourceUrl===i.sourceUrl&&e.authoredAt===i.at&&o.firstAnnouncedAt===i.at)&&t.addIssue({code:`custom`,message:`statistics_announcement_source_invalid`})}}),ol=e=>al.parse(e);export{sn as RadarResetSourceContractErrorV2,ss as activeRadarResetClue,dc as compareRadarAiRadarEntries,Fc as compareRadarAiRadarEntriesV2,lc as compareRadarAiRadarPublicationTimes,no as compareRadarNotificationTasks,Ue as compareRadarResetActionDetailsV1,C as compareRadarResetUtcTimestampsV1,$a as createRadarBrowserNotificationProjection,Ha as createRadarCodexProgressCalendar,eo as createRadarNotificationProjection,On as createRadarResetSourceErrorEnvelopeV2,Ir as encodeRadarActivityFile,Rr as encodeRadarActivityFileV2,Sa as encodeRadarActivityFileV3,gn as encodeRadarResetDetailMultipartV2,Lr as encodeRadarTitledActivityFile,lt as formatRadarResetPositiveDecimalV2,ct as formatRadarResetUInt64DecimalV2,To as initialRadarBrowserSubscription,No as initialRadarBrowserSubscriptionV2,Vc as parseRadarAiRadarEventV2,gc as parseRadarAiRadarLatest,zc as parseRadarAiRadarLatestV2,_c as parseRadarAiRadarMonth,Bc as parseRadarAiRadarMonthV2,zs as parseRadarCodexModels,Ea as parseRadarCodexProgressChangeV3,Da as parseRadarCodexProgressChangesV3,Mn as parseRadarCodexProgressV1,Hn as parseRadarCodexProgressV2,Zn as parseRadarCodexProgressV3,rr as parseRadarCodexProgressV4,sa as parseRadarCodexProgressV5,Ds as parseRadarCodexReleaseDirectory,Os as parseRadarCodexReleaseMonth,ks as parseRadarCodexReleaseNotes,Ge as parseRadarResetActionDetailV1,ci as parseRadarResetActionDetailV2,wi as parseRadarResetActionDetailV3,St as parseRadarResetActionSummaryV2,We as parseRadarResetAnalysisV1,os as parseRadarResetClueSnapshot,xn as parseRadarResetDetailMultipartV2,Ke as parseRadarResetExportV1,ui as parseRadarResetExportV2,Si as parseRadarResetExportV3,ol as parseRadarResetExportV4,qe as parseRadarResetPendingActionV1,li as parseRadarResetPendingActionV2,ot as parseRadarResetPositiveDecimalV2,wt as parseRadarResetPublicationHomeFactsV2,on as parseRadarResetPublicationRevisionAvailableV2,Qt as parseRadarResetReadActionsRequestV2,nn as parseRadarResetReadActionsSuccessV2,$t as parseRadarResetReadChangesRequestV2,rn as parseRadarResetReadChangesSuccessV2,en as parseRadarResetReadDetailBatchRequestV2,Zt as parseRadarResetReadHeadRequestV2,tn as parseRadarResetReadHeadSuccessV2,ae as parseRadarResetSnapshotAvailableV1,an as parseRadarResetSourceErrorEnvelopeV2,at as parseRadarResetUInt64DecimalV2,So as projectRadarBrowserSubscriptionSelection,Po as projectRadarBrowserSubscriptionV1,di as projectRadarResetExportV1FromV2,Ci as projectRadarResetExportV3FromV2,Je as projectRadarResetPrimarySourceV1,ki as projectRadarResetPublicActionToV2,P as radarActivityEventIdSchema,I as radarActivityFileSchema,lr as radarActivityFileUrl,Mr as radarActivityFileV2Schema,ur as radarActivityFileV2Url,ba as radarActivityFileV3Schema,ca as radarActivityFileV3Url,F as radarActivityMaxBytes,mr as radarActivityProgressSchema,kr as radarActivityProgressV2Schema,ha as radarActivityProgressV3Schema,hr as radarActivityReactionCountsSchema,cr as radarActivityReactionIdSchema,N as radarActivityReactionIds,bc as radarAiRadarContentLanguage,Dc as radarAiRadarDigestV2Schema,uc as radarAiRadarEntrySchema,jc as radarAiRadarEntryV2Schema,Gc as radarAiRadarEventUrl,wc as radarAiRadarEventV2MaxBytes,Rc as radarAiRadarEventV2Path,Pc as radarAiRadarEventV2Schema,ac as radarAiRadarFollowUpSchema,Tc as radarAiRadarIdV2Schema,$s as radarAiRadarKindSchema,Xs as radarAiRadarLatestMaxBytes,mc as radarAiRadarLatestPath,fc as radarAiRadarLatestSchema,Sc as radarAiRadarLatestV2MaxBytes,Ic as radarAiRadarLatestV2Path,Mc as radarAiRadarLatestV2Schema,oc as radarAiRadarLeakSchema,Zs as radarAiRadarMonthMaxBytes,hc as radarAiRadarMonthPath,pc as radarAiRadarMonthSchema,Cc as radarAiRadarMonthV2MaxBytes,Lc as radarAiRadarMonthV2Path,Nc as radarAiRadarMonthV2Schema,rc as radarAiRadarPublicationTimeSchema,ic as radarAiRadarSourceSchema,Qs as radarAiRadarSourceStaleMs,Oc as radarAiRadarSourceV2Schema,xc as radarAiRadarSourcesStale,Kc as radarAiRadarStoryStatus,nc as radarAiRadarSummarySchema,cc as radarAiRadarTimeInWindow,sc as radarAiRadarTimeView,ec as radarAiRadarTitleSchema,Fa as radarBrowserNotificationPageUrl,Qa as radarBrowserNotificationProjectionSchema,Ja as radarBrowserNotificationTargetUrlSchema,Za as radarBrowserNotificationTopicSchema,ho as radarBrowserRegistrationSchema,wo as radarBrowserSubscriptionErrorRes,yo as radarBrowserSubscriptionFailureSchema,bo as radarBrowserSubscriptionOperationSchema,vo as radarBrowserSubscriptionReadReq,Co as radarBrowserSubscriptionRes,_o as radarBrowserSubscriptionSaveReq,Ao as radarBrowserSubscriptionSaveV2Req,Mo as radarBrowserSubscriptionV2Res,xo as radarBrowserSubscriptionViewSchema,jo as radarBrowserSubscriptionViewV2Schema,co as radarBrowserSubscriptionsPath,po as radarBrowserTopicsSchema,Eo as radarBrowserTopicsV2Schema,Gr as radarCodexGuessChoiceSchema,Xr as radarCodexGuessErrorSchema,Kr as radarCodexGuessSaveReqSchema,Yr as radarCodexGuessViewSchema,Pa as radarCodexModelIdSchema,La as radarCodexModelUrl,Fs as radarCodexModelsMaxBytes,Vs as radarCodexModelsPath,Rs as radarCodexModelsSchema,Ra as radarCodexProgressCalendar,zr as radarCodexProgressChangeSchema,Vr as radarCodexProgressChangeV2Schema,wa as radarCodexProgressChangeV3Schema,Br as radarCodexProgressChangesV1Schema,Hr as radarCodexProgressChangesV2Schema,Ta as radarCodexProgressChangesV3Schema,A as radarCodexProgressEntrySchema,Wn as radarCodexProgressEntryV3Schema,ta as radarCodexProgressEntryV5Schema,$i as radarCodexProgressImprovementV5Schema,Nn as radarCodexProgressOutcome,Yi as radarCodexProgressPostRoleV5Schema,Xi as radarCodexProgressPostV5Schema,Zi as radarCodexProgressPostsV5Schema,ea as radarCodexProgressResetEntryV5Schema,Xn as radarCodexProgressScore,M as radarCodexProgressTitleV3Schema,j as radarCodexProgressV1Schema,Fn as radarCodexProgressV2MaxBytes,Vn as radarCodexProgressV2Schema,Un as radarCodexProgressV3MaxBytes,Yn as radarCodexProgressV3Schema,Qn as radarCodexProgressV4MaxBytes,nr as radarCodexProgressV4Schema,Qi as radarCodexProgressV5MaxBytes,oa as radarCodexProgressV5Schema,fs as radarCodexReleaseDirectoryMaxBytes,ds as radarCodexReleaseDirectoryPath,bs as radarCodexReleaseDirectorySchema,V as radarCodexReleaseIdentitySchema,ps as radarCodexReleaseMonthMaxBytes,Ns as radarCodexReleaseMonthPath,ws as radarCodexReleaseMonthSchema,ms as radarCodexReleaseNotesMaxBytes,Ps as radarCodexReleaseNotesPath,Es as radarCodexReleaseNotesSchema,Ts as radarCodexReleaseSectionsSchema,Ia as radarCodexReleaseUrl,hs as radarCodexTimePointSchema,qc as radarCompactTitle,Ro as radarImprovementColumnPath,Ko as radarImprovementEligibilityReq,qo as radarImprovementEligibilityRes,Vo as radarImprovementEntrySchema,Jo as radarImprovementErrorRes,Ho as radarImprovementHeadReq,Uo as radarImprovementHeadRes,Lo as radarImprovementPageMaxBytes,Wo as radarImprovementPageReq,Go as radarImprovementPageRes,Io as radarImprovementPageSize,Xa as radarNotificationProjectionSchema,Ya as radarNotificationTargetSchema,io as radarNotificationTaskPageSize,to as radarNotificationTaskSchema,ro as radarNotificationTasksPath,oo as radarNotificationTasksReq,so as radarNotificationTasksRes,Ua as radarNotificationTopicSchema,Wa as radarNotificationTopicsSchema,x as radarResetActionDetailV1Schema,L as radarResetActionDetailV2Schema,fi as radarResetActionDetailV3Schema,kt as radarResetActionItemV2Schema,Qe as radarResetActionPageMaxBytesV2,Ze as radarResetActionPageMaxItemsV2,xt as radarResetActionSummaryV2Schema,Dt as radarResetActiveActionItemV2Schema,Ne as radarResetAnalysisV1Schema,r as radarResetAnalyzerContractVersionV1,c as radarResetAudienceValues,Lt as radarResetChangeCoverageV2Schema,et as radarResetChangePageMaxBytesV2,$e as radarResetChangePageMaxItemsV2,ns as radarResetClueLifetimeMs,rs as radarResetClueMaxBytes,ts as radarResetCluePath,is as radarResetClueSchema,as as radarResetClueSnapshotSchema,nl as radarResetConfirmationSchema,il as radarResetConfirmationsResponseSchema,n as radarResetContractVersionV1,Ye as radarResetContractVersionV2,nt as radarResetDetailBatchMaxBytesV2,tt as radarResetDetailBatchMaxChunksV2,Tt as radarResetDetailChunkReferenceV2Schema,Nt as radarResetDetailChunkRequestV2Schema,Et as radarResetDetailManifestV2Schema,o as radarResetEffectValues,He as radarResetExportV1Schema,si as radarResetExportV2Schema,bi as radarResetExportV3Schema,al as radarResetExportV4Schema,ei as radarResetKindNoticeV2Schema,Ki as radarResetManagementActionSchema,zi as radarResetManagementOperationSchema,qi as radarResetManagementResSchema,Gi as radarResetManualApplyReqSchema,Ri as radarResetManualCopySchema,Bi as radarResetManualDraftSchema,Ui as radarResetManualDraftSeedSchema,Vi as radarResetManualPreviewReqSchema,Wi as radarResetManualPreviewResSchema,Ji as radarResetManualResultResSchema,Le as radarResetNoticeKindValues,S as radarResetPendingActionV1Schema,oi as radarResetPendingActionV2Schema,l as radarResetPlanValues,w as radarResetPositiveDecimalV2Schema,s as radarResetProductValues,ji as radarResetPublicActionV1Schema,i as radarResetPublicDataLimits,E as radarResetPublicIdV2Schema,Ti as radarResetPublicRecordsCorePath,Fi as radarResetPublicRecordsV1Schema,Ct as radarResetPublicationHomeFactsV2Schema,Xt as radarResetPublicationRevisionAvailableV2Schema,Re as radarResetPublicationTimingSchema,zt as radarResetReadActionsDataV2Schema,jt as radarResetReadActionsRequestV2Schema,Ut as radarResetReadActionsSuccessV2Schema,Bt as radarResetReadChangesDataV2Schema,Mt as radarResetReadChangesRequestV2Schema,Wt as radarResetReadChangesSuccessV2Schema,Pt as radarResetReadDetailBatchRequestV2Schema,Rt as radarResetReadHeadDataV2Schema,At as radarResetReadHeadRequestV2Schema,Ht as radarResetReadHeadSuccessV2Schema,d as radarResetReasonBasisValues,u as radarResetReasonCategoryValues,qt as radarResetSafeCauseSnapshotV2Schema,a as radarResetSeriesValues,D as radarResetSha256V2Schema,ie as radarResetSnapshotAvailableV1Schema,It as radarResetSourceChangeV2Schema,Gt as radarResetSourceErrorCodeValuesV2,Yt as radarResetSourceErrorEnvelopeV2Schema,Dn as radarResetSourceErrorHttpStatusV2,En as radarResetSourceErrorIsRetryableV2,Jt as radarResetSourceErrorV2Schema,Xe as radarResetSourceMaxRpcCallsV2,Zr as radarResetSourceTranslationsSchema,xi as radarResetStatisticsResponseV3Schema,z as radarResetStatisticsV1Schema,rl as radarResetStatisticsV2Schema,it as radarResetUInt64DecimalV2Schema,st as radarResetUInt64DecimalV2ToBigInt,Mi as radarResetUnexecutedActionV1Schema,T as radarResetUtcTimestampV2Schema,Ot as radarResetWithdrawnActionItemV2Schema,Ni as radarResetWithdrawnActionV1Schema,Xo as radarTiboSourceStatusMaxBytes,Yo as radarTiboSourceStatusPath,$o as radarTiboSourceStatusSchema,Er as radarTitledActivityFileSchema,Cr as radarTitledActivityProgressSchema,Ma as radarWebsiteLegacyChinesePrefix,ja as radarWebsiteLocalePrefixes,Aa as radarWebsiteLocaleSlugs,ka as radarWebsiteLocales,Oa as radarWebsiteOrigin,Na as radarWebsitePagePaths,H as radarWebsitePageUrl,Qc as radarWechatDispatchPath,Yc as radarWechatDispatchRequestSchema,Zc as radarWechatDispatchResponseSchema,Xc as radarWechatDispatchResultSchema,$c as radarWechatPrivateDispatchPath,Nr as readRadarActivityFile,Fr as readRadarActivityFileV2,xa as readRadarActivityFileV3,Wc as readRadarAiRadarEventV2,vc as readRadarAiRadarLatest,Hc as readRadarAiRadarLatestV2,yc as readRadarAiRadarMonth,Uc as readRadarAiRadarMonthV2,Bs as readRadarCodexModels,As as readRadarCodexReleaseDirectory,js as readRadarCodexReleaseMonth,Ms as readRadarCodexReleaseNotes,cs as readRadarResetClueSnapshot,es as readRadarTiboSourceStatus,Pr as readRadarTitledActivityFile,go as redactRadarBrowserRegistrationReferences,yi as refineRadarResetStatistics,Tn as toSafeCauseSnapshotV2,Fo as upgradeRadarBrowserSubscriptionCommandV1};
|
|
11
|
+
`).every(e=>e===e.trim()&&!/[\r\n]/.test(e))},{message:`digest_paragraphs_invalid`}).trim().min(1),Pc=e.strictObject({zh:Nc.max(1e3),en:Nc.max(2e3)}).nullable(),Fc=dc.extend({official:e.boolean()}),{summary:Ic,...Lc}=_c.shape,Rc=e.strictObject({...Lc,id:Mc,digest:Pc,primary:Fc,otherSources:e.array(Fc)}).superRefine(Qs),zc=J(e.object({...yc.shape,contractVersion:e.literal(2),entries:e.array(Rc)}).superRefine((e,t)=>tc(e,t,7)),kc),Bc=J(e.object({...bc.shape,contractVersion:e.literal(2),entries:e.array(Rc)}).superRefine(nc),Ac),Vc=J(e.strictObject({contractVersion:e.literal(2),generatedAt:e.iso.datetime(),entry:Rc}),jc);function Hc(e,t){return $s(e,t)}const Uc=()=>`/ai-radar/v2/latest.json`,Wc=e=>`/ai-radar/v2/${W.parse(e)}.json`,Gc=e=>`/ai-radar/v2/events/${Mc.parse(e)}.json`,Kc=e=>zc.parse(e),qc=e=>Bc.parse(e),Jc=e=>Vc.parse(e),Yc=e=>Y(e,`ai_radar_latest_v2`,kc,zc),Xc=e=>Y(e,`ai_radar_month_v2`,Ac,Bc),Zc=e=>Y(e,`ai_radar_event_v2`,jc,Vc);function Qc(e,t){return`${V(`dynamics`,t)}/${Mc.parse(e)}`}function $c(e,t){let n=[e.primary.authoredAt,...e.otherSources.map(e=>e.authoredAt),...e.followUps.map(e=>e.at)];e.leak!==null&&n.push(e.leak.reportedAt);let r=n.map(e=>e.length===10?`${e}T00:00:00Z`:e).reduce((e,t)=>Z(e,t)>=0?e:t);return Z(r,new Date(t-1440*60*1e3).toISOString())>0?`developing`:Z(r,new Date(t-4320*60*1e3).toISOString())>0?`watching`:`past`}function el(e){return e.shortTitle??e.title}const tl=e.object({revision:e.string().min(1).max(160),digest:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),nl=e.discriminatedUnion(`kind`,[e.object({publicationId:e.string().min(1).max(160),kind:e.literal(`content`),sources:e.object({"reset-v1":tl,"reset-v2":tl,"reset-v3":tl,"reset-v4":tl.optional()}).strict()}).strict(),e.object({publicationId:e.string().min(1).max(160),kind:e.literal(`reset-clue`),sources:e.object({"reset-clue":tl}).strict()}).strict()]),rl=e.object({resource:e.enum([`content-v1`,`content-v2`,`content-v3`,`content-v4`,`reset-clue`]),sourceRevision:e.string().min(1).max(160),sourceDigest:e.string().regex(/^[a-f0-9]{64}$/),targetVersion:e.iso.datetime().nullable(),targetDigest:e.string().regex(/^[a-f0-9]{64}$/).nullable(),outcome:e.enum([`published`,`unchanged`,`busy`,`superseded`,`failed`]),error:e.object({operation:e.string().min(1),stage:e.string().min(1),code:e.string().min(1),summary:e.string().min(1),correlationId:e.string().min(1),cause:e.unknown(),upstreamStatus:e.number().int().optional(),upstreamCode:e.string().optional()}).optional()}).superRefine((e,t)=>{(e.outcome===`published`||e.outcome===`unchanged`)&&(e.targetVersion===null||e.targetDigest===null)&&t.addIssue({code:`custom`,message:`completed publication requires a target receipt`}),e.outcome===`failed`&&e.error===void 0&&t.addIssue({code:`custom`,message:`failed publication requires a cause`})}),il=e.object({publicationId:e.string().min(1).max(160),results:e.array(rl).min(1).max(4)}).superRefine((e,t)=>{new Set(e.results.map(e=>e.resource)).size!==e.results.length&&t.addIssue({code:`custom`,message:`duplicate resource`})}),al=`/api/v1/internal/publications/wechat/dispatch`,ol=`/__radar/wechat-publication/dispatch`,sl=yi.shape.generatedAt,$=B.shape.records.element,cl=e.object({id:e.string().min(1),resetActionId:$.shape.resetActionId,at:sl,effects:e.array($.shape.effect).min(1).max(2),source:e.discriminatedUnion(`kind`,[e.object({kind:e.literal(`official_post`),sourceUrl:$.shape.sourceUrl}),e.object({kind:e.literal(`manual`),officialConfirmationMissing:e.boolean()})])}),ll=e.object(B.shape).extend({records:e.array(e.object($.shape).extend({sourceUrl:$.shape.sourceUrl.nullable(),confirmationId:e.string().min(1).nullable()})).max(i.analysis.actions*2)}).superRefine((e,t)=>{vi(e,t);for(let[n,r]of e.records.entries())r.basis===`execution_confirmation`!=(r.confirmationId!==null)&&t.addIssue({code:`custom`,message:`statistics_confirmation_identity_mismatch`,path:[`records`,n]}),r.basis===`announcement`&&r.sourceUrl===null&&t.addIssue({code:`custom`,message:`statistics_announcement_source_missing`,path:[`records`,n]})}),ul=e.object({sourceWatermark:ie.shape.sourceWatermark,confirmations:e.array(cl),statistics:ll}),dl=e.object(yi.shape).extend({contractVersion:e.literal(4),statistics:ll,confirmations:e.array(cl)}).superRefine((e,t)=>{let n=e=>t.addIssue({code:`custom`,message:e});new TextEncoder().encode(JSON.stringify(e)).byteLength>i.exportUtf8Bytes&&n(`export_utf8_size_limit_exceeded`);let r=new Map(e.confirmations.map(e=>[e.id,e])),a=new Map(e.actions.map(e=>[e.resetActionId,e]));a.size!==e.actions.length&&n(`export_action_identity_duplicate`),new Set(e.pendingResetActions.map(e=>e.resetActionId)).size!==e.pendingResetActions.length&&n(`export_pending_action_identity_duplicate`);let o=new Set(e.statistics.records.map(e=>e.resetActionId));for(let[t,r]of e.actions.entries()){Date.parse(r.firstAnnouncedAt)>Date.parse(e.generatedAt)&&n(`export_action_after_snapshot`);let i=e.actions.at(t-1);t>0&&i!==void 0&&sl.safeParse(i.firstAnnouncedAt).success&&sl.safeParse(r.firstAnnouncedAt).success&&Ue(i,r)>0&&n(`export_actions_not_stably_sorted`),Date.parse(r.firstAnnouncedAt)>=Date.parse(e.statistics.startAt)&&!o.has(r.resetActionId)&&n(`export_statistics_window_action_missing`)}r.size!==e.confirmations.length&&t.addIssue({code:`custom`,message:`confirmation_identity_duplicate`});for(let r of e.confirmations){let i=a.get(r.resetActionId);(i===void 0||Date.parse(r.at)>Date.parse(e.generatedAt))&&t.addIssue({code:`custom`,message:`confirmation_action_or_time_invalid`}),(new Set(r.effects).size!==r.effects.length||r.effects.some(e=>i!==void 0&&(e===null!=(i.resetEffects.state===`unknown`)||e!==null&&!i.resetEffects.values.some(t=>t===e))))&&n(`confirmation_effect_mismatch`);let o=r.source;o.kind===`official_post`&&!i?.noticeTimeline.some(e=>e.phase===`executed`&&e.sourceUrl===o.sourceUrl&&e.authoredAt===r.at)&&t.addIssue({code:`custom`,message:`confirmation_official_source_invalid`})}for(let i of e.statistics.records){let o=a.get(i.resetActionId),s=i.confirmationId===null?void 0:r.get(i.confirmationId);Date.parse(i.at)>Date.parse(e.generatedAt)&&n(`export_statistics_record_after_snapshot`),o!==void 0&&(o.resetEffects.state===`unknown`!=(i.effect===null)||i.effect!==null&&!o.resetEffects.values.some(e=>e===i.effect))&&n(`export_statistics_effect_mismatch`),(o===void 0||i.confirmationId!==null&&(s===void 0||s.resetActionId!==i.resetActionId||s.at!==i.at||!s.effects.includes(i.effect)))&&t.addIssue({code:`custom`,message:`statistics_confirmation_missing_or_mismatched`}),s!==void 0&&i.sourceUrl!==(s.source.kind===`official_post`?s.source.sourceUrl:null)&&n(`statistics_confirmation_source_mismatch`),i.basis===`announcement`&&!o?.noticeTimeline.some(e=>e.sourceUrl===i.sourceUrl&&e.authoredAt===i.at&&o.firstAnnouncedAt===i.at)&&t.addIssue({code:`custom`,message:`statistics_announcement_source_invalid`})}}),fl=e=>dl.parse(e);export{sn as RadarResetSourceContractErrorV2,ms as activeRadarResetClue,vc as compareRadarAiRadarEntries,Hc as compareRadarAiRadarEntriesV2,gc as compareRadarAiRadarPublicationTimes,lo as compareRadarNotificationTasks,Ue as compareRadarResetActionDetailsV1,C as compareRadarResetUtcTimestampsV1,oo as createRadarBrowserNotificationProjection,Ya as createRadarCodexProgressCalendar,so as createRadarNotificationProjection,On as createRadarResetSourceErrorEnvelopeV2,Ir as encodeRadarActivityFile,Rr as encodeRadarActivityFileV2,Oa as encodeRadarActivityFileV3,gn as encodeRadarResetDetailMultipartV2,Lr as encodeRadarTitledActivityFile,lt as formatRadarResetPositiveDecimalV2,ct as formatRadarResetUInt64DecimalV2,Mo as initialRadarBrowserSubscription,Bo as initialRadarBrowserSubscriptionV2,Jc as parseRadarAiRadarEventV2,Cc as parseRadarAiRadarLatest,Kc as parseRadarAiRadarLatestV2,wc as parseRadarAiRadarMonth,qc as parseRadarAiRadarMonthV2,Ks as parseRadarCodexModels,Ma as parseRadarCodexProgressChangeV3,Na as parseRadarCodexProgressChangesV3,Mn as parseRadarCodexProgressV1,Hn as parseRadarCodexProgressV2,Zn as parseRadarCodexProgressV3,rr as parseRadarCodexProgressV4,pa as parseRadarCodexProgressV5,Ps as parseRadarCodexReleaseDirectory,Fs as parseRadarCodexReleaseMonth,Is as parseRadarCodexReleaseNotes,Ge as parseRadarResetActionDetailV1,si as parseRadarResetActionDetailV2,Ci as parseRadarResetActionDetailV3,St as parseRadarResetActionSummaryV2,We as parseRadarResetAnalysisV1,ps as parseRadarResetClueSnapshot,xn as parseRadarResetDetailMultipartV2,Ke as parseRadarResetExportV1,li as parseRadarResetExportV2,xi as parseRadarResetExportV3,fl as parseRadarResetExportV4,qe as parseRadarResetPendingActionV1,ci as parseRadarResetPendingActionV2,ot as parseRadarResetPositiveDecimalV2,wt as parseRadarResetPublicationHomeFactsV2,on as parseRadarResetPublicationRevisionAvailableV2,Qt as parseRadarResetReadActionsRequestV2,nn as parseRadarResetReadActionsSuccessV2,$t as parseRadarResetReadChangesRequestV2,rn as parseRadarResetReadChangesSuccessV2,en as parseRadarResetReadDetailBatchRequestV2,Zt as parseRadarResetReadHeadRequestV2,tn as parseRadarResetReadHeadSuccessV2,ae as parseRadarResetSnapshotAvailableV1,an as parseRadarResetSourceErrorEnvelopeV2,at as parseRadarResetUInt64DecimalV2,ko as projectRadarBrowserSubscriptionSelection,Vo as projectRadarBrowserSubscriptionV1,ui as projectRadarResetExportV1FromV2,Si as projectRadarResetExportV3FromV2,Je as projectRadarResetPrimarySourceV1,Ai as projectRadarResetPublicActionToV2,P as radarActivityEventIdSchema,I as radarActivityFileSchema,lr as radarActivityFileUrl,Mr as radarActivityFileV2Schema,ur as radarActivityFileV2Url,Ea as radarActivityFileV3Schema,ma as radarActivityFileV3Url,F as radarActivityMaxBytes,mr as radarActivityProgressSchema,kr as radarActivityProgressV2Schema,xa as radarActivityProgressV3Schema,hr as radarActivityReactionCountsSchema,cr as radarActivityReactionIdSchema,N as radarActivityReactionIds,Dc as radarAiRadarContentLanguage,Pc as radarAiRadarDigestV2Schema,_c as radarAiRadarEntrySchema,Rc as radarAiRadarEntryV2Schema,Qc as radarAiRadarEventUrl,jc as radarAiRadarEventV2MaxBytes,Gc as radarAiRadarEventV2Path,Vc as radarAiRadarEventV2Schema,fc as radarAiRadarFollowUpSchema,Mc as radarAiRadarIdV2Schema,oc as radarAiRadarKindSchema,rc as radarAiRadarLatestMaxBytes,xc as radarAiRadarLatestPath,yc as radarAiRadarLatestSchema,kc as radarAiRadarLatestV2MaxBytes,Uc as radarAiRadarLatestV2Path,zc as radarAiRadarLatestV2Schema,pc as radarAiRadarLeakSchema,ic as radarAiRadarMonthMaxBytes,Sc as radarAiRadarMonthPath,bc as radarAiRadarMonthSchema,Ac as radarAiRadarMonthV2MaxBytes,Wc as radarAiRadarMonthV2Path,Bc as radarAiRadarMonthV2Schema,uc as radarAiRadarPublicationTimeSchema,dc as radarAiRadarSourceSchema,ac as radarAiRadarSourceStaleMs,Fc as radarAiRadarSourceV2Schema,Oc as radarAiRadarSourcesStale,$c as radarAiRadarStoryStatus,lc as radarAiRadarSummarySchema,hc as radarAiRadarTimeInWindow,mc as radarAiRadarTimeView,sc as radarAiRadarTitleSchema,Ha as radarBrowserNotificationPageUrl,ao as radarBrowserNotificationProjectionSchema,to as radarBrowserNotificationTargetUrlSchema,io as radarBrowserNotificationTopicSchema,So as radarBrowserRegistrationSchema,jo as radarBrowserSubscriptionErrorRes,Eo as radarBrowserSubscriptionFailureSchema,Do as radarBrowserSubscriptionOperationSchema,To as radarBrowserSubscriptionReadReq,Ao as radarBrowserSubscriptionRes,wo as radarBrowserSubscriptionSaveReq,Lo as radarBrowserSubscriptionSaveV2Req,zo as radarBrowserSubscriptionV2Res,Oo as radarBrowserSubscriptionViewSchema,Ro as radarBrowserSubscriptionViewV2Schema,go as radarBrowserSubscriptionsPath,bo as radarBrowserTopicsSchema,No as radarBrowserTopicsV2Schema,Gr as radarCodexGuessChoiceSchema,Xr as radarCodexGuessErrorSchema,Kr as radarCodexGuessSaveReqSchema,Yr as radarCodexGuessViewSchema,Va as radarCodexModelIdSchema,Wa as radarCodexModelUrl,Hs as radarCodexModelsMaxBytes,Js as radarCodexModelsPath,Gs as radarCodexModelsSchema,Ga as radarCodexProgressCalendar,zr as radarCodexProgressChangeSchema,Vr as radarCodexProgressChangeV2Schema,Aa as radarCodexProgressChangeV3Schema,Br as radarCodexProgressChangesV1Schema,Hr as radarCodexProgressChangesV2Schema,ja as radarCodexProgressChangesV3Schema,A as radarCodexProgressEntrySchema,Wn as radarCodexProgressEntryV3Schema,sa as radarCodexProgressEntryV5Schema,aa as radarCodexProgressImprovementV5Schema,Nn as radarCodexProgressOutcome,ta as radarCodexProgressPostRoleV5Schema,na as radarCodexProgressPostV5Schema,ra as radarCodexProgressPostsV5Schema,oa as radarCodexProgressResetEntryV5Schema,Xn as radarCodexProgressScore,M as radarCodexProgressTitleV3Schema,j as radarCodexProgressV1Schema,Fn as radarCodexProgressV2MaxBytes,Vn as radarCodexProgressV2Schema,Un as radarCodexProgressV3MaxBytes,Yn as radarCodexProgressV3Schema,Qn as radarCodexProgressV4MaxBytes,nr as radarCodexProgressV4Schema,ia as radarCodexProgressV5MaxBytes,fa as radarCodexProgressV5Schema,ys as radarCodexReleaseDirectoryMaxBytes,vs as radarCodexReleaseDirectoryPath,Ds as radarCodexReleaseDirectorySchema,Ba as radarCodexReleaseIdentitySchema,bs as radarCodexReleaseMonthMaxBytes,Bs as radarCodexReleaseMonthPath,js as radarCodexReleaseMonthSchema,xs as radarCodexReleaseNotesMaxBytes,Vs as radarCodexReleaseNotesPath,Ns as radarCodexReleaseNotesSchema,Ms as radarCodexReleaseSectionsSchema,Ua as radarCodexReleaseUrl,Ss as radarCodexTimePointSchema,el as radarCompactTitle,Go as radarImprovementColumnPath,$o as radarImprovementEligibilityReq,es as radarImprovementEligibilityRes,Jo as radarImprovementEntrySchema,ts as radarImprovementErrorRes,Yo as radarImprovementHeadReq,Xo as radarImprovementHeadRes,Wo as radarImprovementPageMaxBytes,Zo as radarImprovementPageReq,Qo as radarImprovementPageRes,Uo as radarImprovementPageSize,ro as radarNotificationProjectionSchema,no as radarNotificationTargetSchema,fo as radarNotificationTaskPageSize,co as radarNotificationTaskSchema,uo as radarNotificationTasksPath,mo as radarNotificationTasksReq,ho as radarNotificationTasksRes,Xa as radarNotificationTopicSchema,Za as radarNotificationTopicsSchema,x as radarResetActionDetailV1Schema,L as radarResetActionDetailV2Schema,di as radarResetActionDetailV3Schema,kt as radarResetActionItemV2Schema,Qe as radarResetActionPageMaxBytesV2,Ze as radarResetActionPageMaxItemsV2,xt as radarResetActionSummaryV2Schema,Dt as radarResetActiveActionItemV2Schema,Ne as radarResetAnalysisV1Schema,r as radarResetAnalyzerContractVersionV1,c as radarResetAudienceValues,Lt as radarResetChangeCoverageV2Schema,et as radarResetChangePageMaxBytesV2,$e as radarResetChangePageMaxItemsV2,ls as radarResetClueLifetimeMs,us as radarResetClueMaxBytes,cs as radarResetCluePath,ds as radarResetClueSchema,fs as radarResetClueSnapshotSchema,cl as radarResetConfirmationSchema,ul as radarResetConfirmationsResponseSchema,n as radarResetContractVersionV1,Ye as radarResetContractVersionV2,nt as radarResetDetailBatchMaxBytesV2,tt as radarResetDetailBatchMaxChunksV2,Tt as radarResetDetailChunkReferenceV2Schema,Nt as radarResetDetailChunkRequestV2Schema,Et as radarResetDetailManifestV2Schema,o as radarResetEffectValues,He as radarResetExportV1Schema,oi as radarResetExportV2Schema,yi as radarResetExportV3Schema,dl as radarResetExportV4Schema,ei as radarResetKindNoticeV2Schema,Zi as radarResetManagementActionSchema,Wi as radarResetManagementOperationSchema,Ui as radarResetManagementProductSchema,Qi as radarResetManagementResSchema,Xi as radarResetManualApplyReqSchema,Hi as radarResetManualCopySchema,Gi as radarResetManualDraftSchema,Ji as radarResetManualDraftSeedSchema,Ki as radarResetManualPreviewReqSchema,Yi as radarResetManualPreviewResSchema,$i as radarResetManualResultResSchema,Le as radarResetNoticeKindValues,S as radarResetPendingActionV1Schema,R as radarResetPendingActionV2Schema,l as radarResetPlanValues,w as radarResetPositiveDecimalV2Schema,Ei as radarResetProductPublicRecordsCorePath,zi as radarResetProductPublicRecordsV1Schema,Ti as radarResetProductRecordsProductValues,s as radarResetProductValues,Mi as radarResetPublicActionV1Schema,i as radarResetPublicDataLimits,E as radarResetPublicIdV2Schema,wi as radarResetPublicRecordsCorePath,Ri as radarResetPublicRecordsV1Schema,Ct as radarResetPublicationHomeFactsV2Schema,Xt as radarResetPublicationRevisionAvailableV2Schema,Re as radarResetPublicationTimingSchema,zt as radarResetReadActionsDataV2Schema,jt as radarResetReadActionsRequestV2Schema,Ut as radarResetReadActionsSuccessV2Schema,Bt as radarResetReadChangesDataV2Schema,Mt as radarResetReadChangesRequestV2Schema,Wt as radarResetReadChangesSuccessV2Schema,Pt as radarResetReadDetailBatchRequestV2Schema,Rt as radarResetReadHeadDataV2Schema,At as radarResetReadHeadRequestV2Schema,Ht as radarResetReadHeadSuccessV2Schema,d as radarResetReasonBasisValues,u as radarResetReasonCategoryValues,qt as radarResetSafeCauseSnapshotV2Schema,a as radarResetSeriesValues,D as radarResetSha256V2Schema,ie as radarResetSnapshotAvailableV1Schema,It as radarResetSourceChangeV2Schema,Gt as radarResetSourceErrorCodeValuesV2,Yt as radarResetSourceErrorEnvelopeV2Schema,Dn as radarResetSourceErrorHttpStatusV2,En as radarResetSourceErrorIsRetryableV2,Jt as radarResetSourceErrorV2Schema,Xe as radarResetSourceMaxRpcCallsV2,Zr as radarResetSourceTranslationsSchema,bi as radarResetStatisticsResponseV3Schema,B as radarResetStatisticsV1Schema,ll as radarResetStatisticsV2Schema,it as radarResetUInt64DecimalV2Schema,st as radarResetUInt64DecimalV2ToBigInt,Ni as radarResetUnexecutedActionV1Schema,T as radarResetUtcTimestampV2Schema,Ot as radarResetWithdrawnActionItemV2Schema,Pi as radarResetWithdrawnActionV1Schema,rs as radarTiboSourceStatusMaxBytes,ns as radarTiboSourceStatusPath,os as radarTiboSourceStatusSchema,Er as radarTitledActivityFileSchema,Cr as radarTitledActivityProgressSchema,Ra as radarWebsiteLegacyChinesePrefix,La as radarWebsiteLocalePrefixes,Ia as radarWebsiteLocaleSlugs,Fa as radarWebsiteLocales,Pa as radarWebsiteOrigin,za as radarWebsitePagePaths,V as radarWebsitePageUrl,al as radarWechatDispatchPath,nl as radarWechatDispatchRequestSchema,il as radarWechatDispatchResponseSchema,rl as radarWechatDispatchResultSchema,ol as radarWechatPrivateDispatchPath,Nr as readRadarActivityFile,Fr as readRadarActivityFileV2,Da as readRadarActivityFileV3,Zc as readRadarAiRadarEventV2,Tc as readRadarAiRadarLatest,Yc as readRadarAiRadarLatestV2,Ec as readRadarAiRadarMonth,Xc as readRadarAiRadarMonthV2,qs as readRadarCodexModels,Ls as readRadarCodexReleaseDirectory,Rs as readRadarCodexReleaseMonth,zs as readRadarCodexReleaseNotes,hs as readRadarResetClueSnapshot,ss as readRadarTiboSourceStatus,Pr as readRadarTitledActivityFile,Co as redactRadarBrowserRegistrationReferences,vi as refineRadarResetStatistics,Tn as toSafeCauseSnapshotV2,Ho as upgradeRadarBrowserSubscriptionCommandV1};
|