react-semaphor 0.1.602 → 0.1.603

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.
Files changed (107) hide show
  1. package/dist/analytics-protocol/index.js +415 -375
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
  8. package/dist/chunks/{assistant-chat-BWF3GYip.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-BF3iRx5a.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-CBSTdW6q.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-B8XHwMY6.js → card-filter-builder-Y22HizVx.js} +104 -104
  12. package/dist/chunks/{comparison-window-caption-W83qB4V5.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
  13. package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
  14. package/dist/chunks/{dashboard-DG5EIYYB.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CBSrhyWZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +103 -103
  16. package/dist/chunks/{dashboard-controls-D6ECO4N1.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-DrJftBSL.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-BDYAJIbb.js → edit-dashboard-visual-oxt3x1wb.js} +7976 -8184
  20. package/dist/chunks/{filter-line-BXT6y303.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-BukhZmzm.js → filter-reach-copy-CE_ZX147.js} +1590 -1729
  22. package/dist/chunks/{filter-value-text-D3-bf3_b.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-BW0yozjs.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-Ds0diMeY.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CgQgVeeI.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
  26. package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
  27. package/dist/chunks/{matrix-operation-contract--DkNCOzd.js → matrix-operation-contract-DPBj69D8.js} +3 -2
  28. package/dist/chunks/{metric-comparison-zMylnIkc.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-CX8pao1j.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-CuA0HlzF.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C8KL7hPx.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-C1AOH1PS.js → pivot-result-identity-CAP4--iq.js} +1 -1
  33. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
  34. package/dist/chunks/{report-preferences-dialog-CbuVNDGi.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-E7USjN7E.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CULCE_hM.js → resolve-dashboard-input-context-Rtl1ffmE.js} +7115 -6963
  37. package/dist/chunks/{save-BKHlDONy.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-C1WlOx5z.js → saved-dashboard-context-tcyTU8jm.js} +193 -207
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-CBIRcDWs.js → semaphor-ready-indicator-FBvunj6S.js} +35550 -35273
  41. package/dist/chunks/{shelf-drop-preview-context-xR69SMA8.js → shelf-drop-preview-context-QKStrcK9.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-BuM8vnWf.js → stored-dashboard-CHozcAY9.js} +621 -616
  43. package/dist/chunks/{style-sheet-parts-Bt9ZNre8.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-DVljtHkG.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-D_xKgyVS.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Dll_M7XQ.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-ClWHpYql.js → validators-Baf3VIf5.js} +3 -3
  48. package/dist/chunks/{variable-draft-CDGGl53R.js → variable-draft-C2y8Jp6Z.js} +3 -3
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2466 -2343
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +20 -20
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  57. package/dist/types/index.js +5 -5
  58. package/dist/types/lib/document/document-edits.d.ts +0 -4
  59. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  60. package/dist/types/lib/types/common-types.d.ts +0 -2
  61. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  62. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  63. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  64. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  65. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  66. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  67. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  68. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  69. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  70. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  71. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  72. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  73. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
  74. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  76. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
  79. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  81. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  82. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  84. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  85. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  86. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  87. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  88. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  89. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  91. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
  92. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
  93. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  94. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  95. package/dist/types/shared/format-utils/index.d.ts +1 -0
  96. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  97. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  98. package/dist/types/shared/temporal/index.d.ts +2 -0
  99. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  100. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  101. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  102. package/dist/usage-events/index.js +1 -1
  103. package/package.json +3 -2
  104. package/dist/chunks/dates-Bz-qM5px.js +0 -164
  105. package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
  106. package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
  107. package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
@@ -124,9 +124,11 @@ export type KpiDateContextView = {
124
124
  kind: PeriodComparisonKind;
125
125
  };
126
126
  /** Why the card's period comparison is off, when it is. */
127
+ /** `label`: the comparison's own words when the run names its request ("Same day last week"). */
127
128
  comparisonOff?: {
128
129
  kind: PeriodComparisonKind;
129
130
  reason: ComparisonUnavailableReason;
131
+ label?: string;
130
132
  };
131
133
  /**
132
134
  * Two applied windows narrow each other, so the number counts only their
@@ -55,6 +55,15 @@ export declare const KPI_MEASURES_SHOWN = 3;
55
55
  export declare function resolveKpiLayout(input: {
56
56
  config?: Pick<CardConfig, 'metricColumns' | 'groupByColumns'>;
57
57
  }): KpiLayout;
58
+ /**
59
+ * Whether a KPI compares its first metric with its second ("Other metric",
60
+ * compare-with CW-D29): the one reading of the pair setting. The pair shows
61
+ * only in the measures layout (`resolveKpiLayout`: exactly two metrics, no
62
+ * Trend By, no target) and not on a card saved hidden (CW-D28), so a stored
63
+ * setting the layout doesn't draw reads as no pair. The tile, the editor, the
64
+ * outline and the offer read it (ledger P4-14).
65
+ */
66
+ export declare function comparesMetricPair(card: Pick<TCard, 'type' | 'preferences' | 'config'>): boolean;
58
67
  /**
59
68
  * A config KPI's result rows. Every row names its measure; `current` is a
60
69
  * measure's value and `comparison` its prior or target, in every branch.
@@ -113,6 +122,15 @@ export type KpiComparison = {
113
122
  kind: 'previous_period' | 'previous_year' | 'target';
114
123
  /** "Previous", "Target" or `comparisonPresentation.labelName`. */
115
124
  label: string;
125
+ /**
126
+ * The comparison's own words as the run names it ("same day last week",
127
+ * "previous 7 days"; compare-with 4b), when the author set no label of
128
+ * their own: the tile reads "vs same day last week · 150". Today's saved
129
+ * default label "Previous" counts as none, so it follows the words.
130
+ */
131
+ words?: string;
132
+ /** The measure keeps its own comparison whatever the Date filter says (compare-with CW-D17, CW-D20): the tile shows a pin. */
133
+ pinned: boolean;
116
134
  /** False when the author turned it off (`comparisonPresentation.showComparison`). */
117
135
  shown: boolean;
118
136
  /** From `evaluateMetricComparison`, the only source of a change (KV-D8). */
@@ -2,17 +2,18 @@ import { MetricComparisonConfig } from '../../analytics-protocol/metric-comparis
2
2
  import { ExplicitComparison, MeasureComparison } from './schemas.js';
3
3
  /**
4
4
  * A measure's comparison between its public words and its stored field
5
- * (reports by conversation SPEC §3.2, S-6, S-7): the one mapping. Stored
6
- * minimal, as the editor stores it: `inherit` is no field, and an offset of
7
- * 1, `calendar` and a false `toDate` are absent.
5
+ * (reports by conversation SPEC §3.2, S-6, S-7; compare-with CW-D3, CW-D5):
6
+ * the one mapping. The words are the spec's own (`shift` or `target`); a
7
+ * stored shape from before Compare with is read through the one reader.
8
+ * Stored minimal: `inherit` is no field, and an offset of 1 is absent.
8
9
  */
9
10
  /** The stored comparison for public words; undefined for `inherit` (no field). */
10
11
  export declare function toStoredComparison(comparison: MeasureComparison): MetricComparisonConfig | undefined;
11
12
  /** The public words for a stored comparison, defaults left out; undefined when it has none of its own (`inherit`). */
12
13
  export declare function readStoredComparison(stored: MetricComparisonConfig | undefined): MeasureComparison | undefined;
13
- /** Whether a stated comparison means what the measure stores (equal by resolution, S-7). */
14
- export declare function sameComparison(stated: MeasureComparison, stored: MetricComparisonConfig | undefined): boolean;
15
- /** A comparison of the measure's own: a period, a year or a target (not `inherit` or `off`). */
14
+ /** Whether two comparisons say the same, read in full (`inherit` for none of its own, an offset of 1 for none; S-7). */
15
+ export declare function sameWords(left: MeasureComparison | undefined, right: MeasureComparison | undefined): boolean;
16
+ /** A comparison of the measure's own: a step back or a target (not `inherit` or `off`). */
16
17
  export declare const isExplicitComparison: (comparison: MeasureComparison | undefined) => comparison is ExplicitComparison;
17
- /** "the same period last year", "a target of 1,000,000": what a stored comparison compares with. */
18
+ /** "the previous period", "the same period last year, matching weekdays", "a target of 1,000,000": what a stored comparison compares with. */
18
19
  export declare function comparedWith(comparison: MetricComparisonConfig): string;
@@ -1,6 +1,7 @@
1
1
  import { TCard, TDashboard } from '../../../lib/types/common-types.js';
2
2
  import { SemanticExecutionPayload } from '../../../lib/types/semantic-runtime-types.js';
3
3
  import { CompiledDashboardCardFilters } from '../../../lib/query-context/compile-dashboard-card-filters.js';
4
+ import { ComparisonWindowShape } from '../../analytics-protocol/comparison-choices.js';
4
5
  import { ResolvedPrimaryDateField } from '../../analytics-protocol/contracts.js';
5
6
  import { CalendarContext } from '../../report-runtime-context/index.js';
6
7
  export type ComparisonDates = {
@@ -11,6 +12,14 @@ export type ComparisonDates = {
11
12
  } | null;
12
13
  /** Whether a date window applies to that date: the card's own window on it, or a dashboard date filter that reaches the card. */
13
14
  dateWindow: 'applies' | 'none' | 'unknown';
15
+ /**
16
+ * The shape of the window the comparison steps from, when exactly one range
17
+ * restricts the date after Global Date ownership (`withGlobalDateOwnership`,
18
+ * the run's own rule): a Global Date value replaces the card's own range,
19
+ * every other range intersects, so two ranges leave the window unknown and
20
+ * nothing is judged to overlap (compare-with CW-D16, CW16-R1).
21
+ */
22
+ window?: ComparisonWindowShape;
14
23
  };
15
24
  /**
16
25
  * What `readComparisonDates` reads of a compiled card query: the editor's
@@ -26,7 +35,7 @@ export type ComparisonCompilation = {
26
35
  resolvedPrimaryDateField?: ResolvedPrimaryDateField;
27
36
  };
28
37
  /** The two facts for a card, from its compiled query. */
29
- export declare function readComparisonDates(card: TCard, compiled: ComparisonCompilation): ComparisonDates;
38
+ export declare function readComparisonDates(card: TCard, compiled: ComparisonCompilation, calendar?: CalendarContext | null): ComparisonDates;
30
39
  /**
31
40
  * The same facts as a fresh viewer gets them (SPEC S-9): the dashboard's
32
41
  * default filter values, compiled with this calendar, through the assembly a
@@ -35,6 +44,7 @@ export declare function readComparisonDates(card: TCard, compiled: ComparisonCom
35
44
  */
36
45
  export declare function readDefaultComparisonDates(input: {
37
46
  dashboard: TDashboard;
47
+ /** A card's id, or a data variable's: a variable runs as its projected card at each sheet its text shows on (DV-D32). */
38
48
  cardId: string;
39
49
  semanticExecutionPayload: SemanticExecutionPayload | undefined;
40
50
  calendar: CalendarContext;
@@ -4,8 +4,8 @@
4
4
  * The outline, the change resolver, the reducer, the editor and
5
5
  * semaphor_analyze read and write them through these exports only.
6
6
  */
7
- export { explicitComparisonSchema, measureComparisonSchema, measureTransformSchema, transformOrderSchema, MEASURE_CALCULATION_SUMMARIES, type AnalyzeMeasureCalculations, type ExplicitComparison, type MeasureCalculations, type MeasureComparison, type MeasureTransform, type TransformOrder, } from './schemas.js';
8
- export { toStoredComparison } from './comparison.js';
7
+ export { comparisonShiftSchema, explicitComparisonSchema, MATCH_WEEKDAYS_ONLY_BY_YEARS, measureComparisonSchema, TO_DATE_IS_AUTOMATIC, measureTransformSchema, transformOrderSchema, MEASURE_CALCULATION_SUMMARIES, type AnalyzeMeasureCalculations, type ExplicitComparison, type MeasureCalculations, type MeasureComparison, type MeasureTransform, type TransformOrder, } from './schemas.js';
8
+ export { readStoredComparison, sameWords, toStoredComparison } from './comparison.js';
9
9
  export { readMeasureCalculations, type MeasureCalculationsRead } from './read.js';
10
10
  export { readComparisonDates, readDefaultComparisonDates, type ComparisonCompilation, type ComparisonDates } from './dates.js';
11
11
  export { measureCalculationOptions, transformGroupings, PUBLIC_TRANSFORM_KIND, type CalculationOffer, type CalculationRefusalCode, type MeasureCalculationOptions, type TransformGrouping, } from './options.js';
@@ -60,4 +60,8 @@ export declare function transformGroupings(card: TCard): {
60
60
  groupings: TransformGrouping[];
61
61
  defaultOrder: ColumnKey | null;
62
62
  };
63
+ /** Whether a card's measures show comparisons at all: a type that compares, built from fields (not SQL or Python). */
64
+ export declare function cardTakesComparisons(card: TCard): boolean;
65
+ /** Whether a measure can compare with the other metric: the first of a KPI's two metrics, where the layout draws the pair (`resolveKpiLayout`: no Trend By, no target; CW-D29, ledger P4-14). */
66
+ export declare function metricPairOffered(card: TCard, metric: MetricField): boolean;
63
67
  export declare function measureCalculationOptions(card: TCard, measure: ColumnKey, dates: ComparisonDates): MeasureCalculationOptions;
@@ -1,7 +1,7 @@
1
1
  import { TCard } from '../../../lib/types/common-types.js';
2
2
  import { GroupByField } from '../../../lib/types/explorer-types.js';
3
3
  import { FieldRef } from '../changes/dashboard-change.js';
4
- import { MeasureCalculations } from './schemas.js';
4
+ import { MeasureCalculations, MeasureComparison } from './schemas.js';
5
5
  export type MeasureCalculationsRead =
6
6
  /** Aligned with `config.metricColumns`; `{}` for a measure with none. */
7
7
  {
@@ -13,4 +13,21 @@ export type MeasureCalculationsRead =
13
13
  ok: false;
14
14
  detail: string;
15
15
  };
16
+ /**
17
+ * Each measure's comparison as it shows, aligned with `config.metricColumns`
18
+ * (compare-with CW-D18, CW-D21, CW-D28): its own step or target; `off` when it
19
+ * shows none, including every measure of a card saved with "Show comparison"
20
+ * off and one with none of its own on a card that stopped following;
21
+ * undefined when it follows the Date filter. The one reader decides, so the
22
+ * outline says what the card shows and no card switch is left to read. On a
23
+ * card that shows no comparisons (a pie, SQL) each reads as it is stored.
24
+ */
25
+ export declare function readMeasureComparisons(card: TCard): (MeasureComparison | undefined)[];
26
+ /**
27
+ * Whether a stated comparison changes nothing on this measure: equal to what
28
+ * the outline reads for it, not to what it stores (ledger CW15-03; CW-D21,
29
+ * CW-D28, CW-D29). Following on a card that stopped following, the stored step
30
+ * on a card saved hidden, or the other metric on a hidden pair, is a change.
31
+ */
32
+ export declare function comparisonUnchanged(card: TCard, stated: MeasureComparison, index: number): boolean;
16
33
  export declare function readMeasureCalculations(card: TCard, groupingRef: (grouping: GroupByField) => FieldRef): MeasureCalculationsRead;
@@ -55,6 +55,8 @@ export type ResolvedMeasureCalculations = {
55
55
  };
56
56
  /** What this write replaces, for its sentence (RC-D6, RC-INV-3). */
57
57
  replaces?: 'comparison' | 'transform';
58
+ /** The card compares its first metric with the second (`true`) or no longer does (`false`), compare-with CW-D29. */
59
+ metricPair?: boolean;
58
60
  };
59
61
  /** One `calculations` card update: the measures it changes, in card order. */
60
62
  export type MeasureCalculationsUpdate = {
@@ -1,36 +1,7 @@
1
1
  import { z } from 'zod';
2
- /** A comparison of the measure's own, in the stored spec's names: what `semaphor_analyze` takes. */
3
- export declare const explicitComparisonSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4
- kind: z.ZodLiteral<"previous_period">;
5
- offsetPeriods: z.ZodOptional<z.ZodNumber>;
6
- alignment: z.ZodOptional<z.ZodEnum<["calendar", "weekday"]>>;
7
- toDate: z.ZodOptional<z.ZodBoolean>;
8
- }, "strict", z.ZodTypeAny, {
9
- kind: "previous_period";
10
- toDate?: boolean | undefined;
11
- alignment?: "calendar" | "weekday" | undefined;
12
- offsetPeriods?: number | undefined;
13
- }, {
14
- kind: "previous_period";
15
- toDate?: boolean | undefined;
16
- alignment?: "calendar" | "weekday" | undefined;
17
- offsetPeriods?: number | undefined;
18
- }>, z.ZodObject<{
19
- kind: z.ZodLiteral<"previous_year">;
20
- offsetYears: z.ZodOptional<z.ZodNumber>;
21
- alignment: z.ZodOptional<z.ZodEnum<["calendar", "weekday"]>>;
22
- toDate: z.ZodOptional<z.ZodBoolean>;
23
- }, "strict", z.ZodTypeAny, {
24
- kind: "previous_year";
25
- toDate?: boolean | undefined;
26
- alignment?: "calendar" | "weekday" | undefined;
27
- offsetYears?: number | undefined;
28
- }, {
29
- kind: "previous_year";
30
- toDate?: boolean | undefined;
31
- alignment?: "calendar" | "weekday" | undefined;
32
- offsetYears?: number | undefined;
33
- }>, z.ZodObject<{
2
+ /** Refused with its reason: every running window is compared to date (compare-with CW-D1, CW-D2). */
3
+ export declare const TO_DATE_IS_AUTOMATIC = "is not a setting: a comparison always matches the elapsed part of a window still running; leave it out";
4
+ declare const targetSchema: z.ZodObject<{
34
5
  kind: z.ZodLiteral<"target">;
35
6
  targetValue: z.ZodNumber;
36
7
  }, "strict", z.ZodTypeAny, {
@@ -39,60 +10,49 @@ export declare const explicitComparisonSchema: z.ZodDiscriminatedUnion<"kind", [
39
10
  }, {
40
11
  kind: "target";
41
12
  targetValue: number;
42
- }>]>;
43
- /** A card measure's comparison: its own, none (`off`), or the dashboard's (`inherit`). */
44
- declare const measureComparisonUnion: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
45
- kind: z.ZodLiteral<"inherit">;
46
- }, "strict", z.ZodTypeAny, {
47
- kind: "inherit";
48
- }, {
49
- kind: "inherit";
50
- }>, z.ZodObject<{
51
- kind: z.ZodLiteral<"off">;
52
- }, "strict", z.ZodTypeAny, {
53
- kind: "off";
54
- }, {
55
- kind: "off";
56
- }>, z.ZodObject<{
57
- kind: z.ZodLiteral<"previous_period">;
58
- offsetPeriods: z.ZodOptional<z.ZodNumber>;
59
- alignment: z.ZodOptional<z.ZodEnum<["calendar", "weekday"]>>;
60
- toDate: z.ZodOptional<z.ZodBoolean>;
61
- }, "strict", z.ZodTypeAny, {
62
- kind: "previous_period";
63
- toDate?: boolean | undefined;
64
- alignment?: "calendar" | "weekday" | undefined;
65
- offsetPeriods?: number | undefined;
66
- }, {
67
- kind: "previous_period";
68
- toDate?: boolean | undefined;
69
- alignment?: "calendar" | "weekday" | undefined;
70
- offsetPeriods?: number | undefined;
71
- }>, z.ZodObject<{
72
- kind: z.ZodLiteral<"previous_year">;
73
- offsetYears: z.ZodOptional<z.ZodNumber>;
74
- alignment: z.ZodOptional<z.ZodEnum<["calendar", "weekday"]>>;
75
- toDate: z.ZodOptional<z.ZodBoolean>;
76
- }, "strict", z.ZodTypeAny, {
77
- kind: "previous_year";
78
- toDate?: boolean | undefined;
79
- alignment?: "calendar" | "weekday" | undefined;
80
- offsetYears?: number | undefined;
81
- }, {
82
- kind: "previous_year";
83
- toDate?: boolean | undefined;
84
- alignment?: "calendar" | "weekday" | undefined;
85
- offsetYears?: number | undefined;
86
- }>, z.ZodObject<{
87
- kind: z.ZodLiteral<"target">;
88
- targetValue: z.ZodNumber;
13
+ }>;
14
+ /** Refused with its reason (compare-with CW-D4). */
15
+ export declare const MATCH_WEEKDAYS_ONLY_BY_YEARS = "matchWeekdays is true only on a step by years (52 weeks a year back)";
16
+ /**
17
+ * A step back (compare-with CW-D3): `unit` 'period' is the window's own
18
+ * length (the previous period), or a calendar unit; `offset` steps.
19
+ */
20
+ declare const shiftSchema: z.ZodObject<{
21
+ kind: z.ZodLiteral<"shift">;
22
+ unit: z.ZodEnum<["period", "day", "week", "month", "quarter", "year"]>;
23
+ offset: z.ZodOptional<z.ZodNumber>;
24
+ matchWeekdays: z.ZodOptional<z.ZodLiteral<true>>;
25
+ toDate: z.ZodOptional<z.ZodNever>;
89
26
  }, "strict", z.ZodTypeAny, {
90
- kind: "target";
91
- targetValue: number;
27
+ kind: "shift";
28
+ unit: "day" | "week" | "month" | "quarter" | "year" | "period";
29
+ toDate?: undefined;
30
+ offset?: number | undefined;
31
+ matchWeekdays?: true | undefined;
92
32
  }, {
93
- kind: "target";
94
- targetValue: number;
95
- }>]>;
33
+ kind: "shift";
34
+ unit: "day" | "week" | "month" | "quarter" | "year" | "period";
35
+ toDate?: undefined;
36
+ offset?: number | undefined;
37
+ matchWeekdays?: true | undefined;
38
+ }>;
39
+ /** A step back alone, as a dashboard date filter's default comparison takes it (IN-08); old words refused with the new ones. */
40
+ export declare const comparisonShiftSchema: z.ZodType<z.infer<typeof shiftSchema>>;
41
+ /** A comparison of the measure's own, in the stored spec's words: a step back or a target. */
42
+ export type ExplicitComparison = z.infer<typeof shiftSchema> | z.infer<typeof targetSchema>;
43
+ /**
44
+ * A card measure's comparison: its own, none (`off`), the dashboard's
45
+ * (`inherit`), or, on the first of a KPI's two metrics, the other metric
46
+ * (`metric`, compare-with CW-D29).
47
+ */
48
+ export type MeasureComparison = {
49
+ kind: 'inherit';
50
+ } | {
51
+ kind: 'off';
52
+ } | {
53
+ kind: 'metric';
54
+ } | ExplicitComparison;
55
+ export declare const explicitComparisonSchema: z.ZodType<ExplicitComparison>;
96
56
  /** The grouping a transform runs along; `field` is written as the query writes that grouping. */
97
57
  export declare const transformOrderSchema: z.ZodObject<{
98
58
  field: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -905,8 +865,6 @@ declare const measureTransformUnion: z.ZodDiscriminatedUnion<"kind", [z.ZodObjec
905
865
  } | undefined;
906
866
  })[] | undefined;
907
867
  }>]>;
908
- export type ExplicitComparison = z.infer<typeof explicitComparisonSchema>;
909
- export type MeasureComparison = z.infer<typeof measureComparisonUnion>;
910
868
  export type TransformOrder = z.infer<typeof transformOrderSchema>;
911
869
  export type MeasureTransform = z.infer<typeof measureTransformUnion>;
912
870
  export declare const measureComparisonSchema: z.ZodType<MeasureComparison>;
@@ -917,7 +875,7 @@ export type MeasureCalculations = {
917
875
  /** null only in a card.update: removes the transform. */
918
876
  transform?: MeasureTransform | null;
919
877
  };
920
- /** One semaphor_analyze measure's calculations: no dashboard to inherit, nothing to remove. */
878
+ /** One semaphor_analyze measure's calculations: a card measure's own words (compare-with CW-D24); no dashboard to inherit, nothing to remove. */
921
879
  export type AnalyzeMeasureCalculations = {
922
880
  comparison?: ExplicitComparison;
923
881
  transform?: MeasureTransform;
@@ -928,7 +886,7 @@ export type AnalyzeMeasureCalculations = {
928
886
  * against the definition budget (RC-D1).
929
887
  */
930
888
  export declare const MEASURE_CALCULATION_SUMMARIES: {
931
- readonly comparison: "{ kind: 'inherit' (the dashboard's; default) | 'off' | 'previous_period' | 'previous_year' (offsetPeriods or offsetYears?: n, alignment?: 'calendar' | 'weekday', toDate?: true) | 'target' (targetValue: number) }. Targets on kpi and table. A period or year compares over the card's date grouping (a KPI's Trend By: dateField with timeGrain) or the dataset's primary date.";
889
+ readonly comparison: "{ kind: 'inherit' (follows the Date filter; default) | 'off' (none) | 'shift' (unit: 'period' (its length) | 'day' | 'week' | 'month' | 'quarter' | 'year', offset?: n, matchWeekdays?: true if 'year') | 'target' (targetValue: number) }. Targets on kpi and table. A shift compares over the card's date grouping (a KPI's Trend By: dateField with timeGrain) or the dataset's primary date.";
932
890
  readonly transform: "{ kind: 'running_total' | 'moving_average' (window?: 7, minPeriods?: 1) | 'difference_from_previous' (mode?: 'difference' | 'percent_change') | 'percent_of_total' (scope?: 'grand_total' | 'partition_total' + resetBy, output?: 'percent' | 'fraction'), orderBy?: { field, direction? } (default: first date grouping), resetBy?: [fields] (default: other groupings) }; null removes it. Not beside its own comparison.";
933
891
  };
934
892
  export {};
@@ -70,15 +70,19 @@ export declare function applyCalculatedFieldOperation(dashboard: TDashboard, ope
70
70
  /**
71
71
  * The definitions a dashboard needs for the copies its cards bring (MC-D19):
72
72
  * a dashboard field for every dashboard copy whose identity key the dashboard
73
- * lacks, built from the copy itself (a copy holds its whole formula). In
74
- * release 1 frozen copies are left alone (`frozen: false`); the backfill
75
- * passes `frozen: true` for the frozen copies it doesn't turn into domain
76
- * references. Library visuals store no definitions list.
73
+ * lacks, built from the copy itself (a copy holds its whole formula), and for
74
+ * every dashboard copy inside those formulas (a field another field reads), so
75
+ * an edit to a dependency reaches what reads it. A copy keeps its identity: a
76
+ * copy whose name the dashboard already gives another field (a card pasted
77
+ * from another dashboard) comes in under the next free name (`<name>_2`), its
78
+ * copies renamed with their label and result column kept. Identities are
79
+ * never merged by name or formula: two fields alike in words may read
80
+ * different domains (ledger P6-06). From release 2 a copy without a
81
+ * definition can't be saved (MC-D12). A copied formula without a scope (a
82
+ * frozen copy) is never adopted: converting those is the backfill planner's
83
+ * job. Library visuals store no definitions list.
77
84
  */
78
- export declare function adoptCalculatedFields(dashboard: TDashboard, cards: readonly TCard[], options: {
79
- frozen: boolean;
80
- newId?: () => string;
81
- }): TDashboard;
85
+ export declare function adoptCalculatedFields(dashboard: TDashboard, cards: readonly TCard[]): TDashboard;
82
86
  /**
83
87
  * The operations that turn one dashboard field list into another, by
84
88
  * identity key, in order: removals, changes, then additions. The editor's
@@ -97,6 +101,27 @@ export type CalculatedFieldListIssue = {
97
101
  * used, a role and a data type on each. Reads only the list.
98
102
  */
99
103
  export declare function checkCalculatedFieldList(fields: readonly Field[] | undefined): CalculatedFieldListIssue[];
104
+ /** A card's calculated column a save refuses (release 2, MC-D12), in words safe to show. */
105
+ export type CalculatedColumnIssue = {
106
+ cardId: string;
107
+ cardTitle: string;
108
+ name: string;
109
+ message: string;
110
+ };
111
+ /**
112
+ * Release 2's save refusal (MC-D12): a card's placed calculated column with no
113
+ * definition (`classifyCalculatedColumn` says `no_definition`: a copied
114
+ * formula, a card or sheet field's copy, a dashboard copy whose field is
115
+ * gone), and a card that keeps its own `calculatedFields`. It reads a card's
116
+ * placements only (the walk the backfill used: shelves, their conditions, card
117
+ * filters, inline filters), never its preferences (ledger P5-03). A Matrix card
118
+ * is left alone: its own fields and bindings are its definitions (MC-D15). A
119
+ * typed derived column carries its own definition (`derivedField`) and is
120
+ * accepted (ledger P5-05). Reads only the payload.
121
+ */
122
+ export declare function checkCalculatedColumnDefinitions(dashboard: TDashboard,
123
+ /** The cards to read; the shared traversal's by default. A caller reading a stored shape it doesn't cover passes those cards too. */
124
+ cards?: readonly TCard[]): CalculatedColumnIssue[];
100
125
  /**
101
126
  * Whether operations the open card's edit makes would apply: they are tried
102
127
  * on the dashboard with that card's copies left out (the editor holds its
@@ -74,8 +74,6 @@ export type FrameCommit = {
74
74
  frame: TFrame;
75
75
  /** Other frames on the sheet rewritten during the edit (calculated-field renames), applied with it. */
76
76
  rewrittenFrames?: TFrame[];
77
- /** Sheet calculated fields from the edited frame, persisted on the sheet (sheet scope is retired; existing ones stay editable until release 2). */
78
- sheetCalculatedFields?: Field[];
79
77
  /**
80
78
  * The editor's dashboard-field adds, changes and removals during the edit,
81
79
  * in order, applied through the `calculatedField.*` operations after the
@@ -4,6 +4,7 @@ import { DashboardFilterNotReachedReason, DashboardRelationshipReachResolver } f
4
4
  import { AgentNumberConditionDefault, FilterInputEntry, NumberFilterShowAs } from '../filter-model/index.js';
5
5
  import { AgentTimeWindowRefusal } from '../../analytics-protocol/agent-time-window.js';
6
6
  import { RelativeDateWindow } from '../../analytics-protocol/relative-date/index.js';
7
+ import { ComparisonShiftSpec } from '../../analytics-protocol/metric-comparison.js';
7
8
  import { CalendarContext } from '../../report-runtime-context/index.js';
8
9
  import { FilterValue } from '../changes/dashboard-change.js';
9
10
  /**
@@ -37,6 +38,8 @@ export type OutlineFilter = {
37
38
  * it. It stays while filter.update leaves defaultPeriod out.
38
39
  */
39
40
  defaultPeriodReadOnly?: AgentTimeWindowRefusal;
41
+ /** A date filter's default comparison, a step back, as filter.update takes it (compare-with IN-08). */
42
+ defaultComparison?: ComparisonShiftSpec;
40
43
  /** For a date filter, the picker a viewer gets: one day, one month, or a range. */
41
44
  datePicker?: 'day' | 'month' | 'range';
42
45
  /** "all": every grid sheet. */
@@ -0,0 +1,34 @@
1
+ import { DashboardDateComparisonOwner, ResolvedMetricComparisonRequest, StoredMetricComparisonSpec } from '../analytics-protocol/metric-comparison.js';
2
+ import { ComparisonWindowShape } from '../analytics-protocol/comparison-choices.js';
3
+ /**
4
+ * A comparison in words (compare-with CW-D12, CW-INV-3), the one owner of
5
+ * comparison wording: the menu, the toolbar chip, the editor, the tile's
6
+ * tooltip, the assistant's context and the MCP outline all read it. It words
7
+ * what is requested, named for the window when its shape is known ("Previous
8
+ * 7 days", "Same day last week"); the dates exist only once the server has
9
+ * placed them (they arrive on a result), so none are invented here. Pure,
10
+ * React-free.
11
+ */
12
+ export type ComparisonWords = {
13
+ /** For a menu, a chip or a control: "Previous 7 days", "Same days last year, matching weekdays". */
14
+ label: string;
15
+ /** Inside a sentence: "the previous 7 days", "the same days last year, matching weekdays", "a target of 500". */
16
+ sentence: string;
17
+ };
18
+ /** A window's size in words, for a note about it: "a day", "a month", "7 days", "3 months", "24 hours". */
19
+ export declare function describeWindowSize(shape: ComparisonWindowShape): string;
20
+ /**
21
+ * Why a step back cannot fit the window it compares, and the steps that do
22
+ * (compare-with CW-D16): the MCP's refusal of a Date filter's default and its
23
+ * warning on a measure or a variable read the same words.
24
+ */
25
+ export declare function describeComparisonOverlap(spec: StoredMetricComparisonSpec, shape: ComparisonWindowShape): {
26
+ message: string;
27
+ fix: string;
28
+ };
29
+ /** A comparison's words, named for the window when its shape is known (CW-D12). */
30
+ export declare function describeComparison(stored: StoredMetricComparisonSpec, shape?: ComparisonWindowShape): ComparisonWords;
31
+ /** Whose date the dashboard date comparison follows. */
32
+ export declare function describeDashboardDateComparisonOwner(owner: DashboardDateComparisonOwner | undefined): string;
33
+ /** One measure's requested comparison, with where it comes from. */
34
+ export declare function describeMeasureComparison(measure: string, request: ResolvedMetricComparisonRequest): string;
@@ -41,6 +41,7 @@ export * from './attachment-filter-line.js';
41
41
  export { describeFilterValueInFullDetail, type FullDetailFilterValue, } from './filter-value-text.js';
42
42
  export { describeConditionInFullDetail, type FilterClauseText } from './filter-detail.js';
43
43
  export { formatCanonicalComparisonRange } from '../../lib/utils/comparison-window-caption.js';
44
+ export { describeComparison } from './comparison-detail.js';
44
45
  export { PDF_GROUP_CONTINUATION_CLASS } from './grouped-table-presentation.js';
45
46
  export { toStoredValueFormat } from './stored-value-format.js';
46
47
  export { SEMAPHOR_GENERATED_COUNT_METRIC_ID } from '../analytics-protocol/contracts.js';
@@ -4,8 +4,10 @@ import { ResolvedTemporalValueFormatPreferences } from '../value-format-preferen
4
4
  export type DatePeriodPartial = 'running' | 'start' | 'end';
5
5
  /**
6
6
  * A whole period cut to the counted window (KT-D9): it starts no earlier than
7
- * the window and ends no later; `running` when it ends after `now`, else
8
- * `start` or `end` when the window cut it, else whole.
7
+ * the window and ends no later; `running` when `now` falls inside it (it has
8
+ * started and not ended: a period still to come, such as next month's
9
+ * forecast, is not running; ledger EXT-12), else `start` or `end` when the
10
+ * window cut it, else whole.
9
11
  */
10
12
  export declare function cutDatePeriod(period: {
11
13
  start: Date;
@@ -52,6 +52,17 @@ export declare function startOfPeriodWall(wall: WallClockTime, unit: Exclude<Tem
52
52
  * occurrence, so a repeated hour is two periods.
53
53
  */
54
54
  export declare function periodAt(instant: Date, unit: TemporalUnit, calendar: TemporalCalendar, offset?: number): TemporalPeriod;
55
+ /** The calendar units a whole window can be, largest first. */
56
+ export declare const WHOLE_PERIOD_UNITS: readonly ["year", "quarter", "month", "week", "day"];
57
+ export type WholePeriodUnit = (typeof WHOLE_PERIOD_UNITS)[number];
58
+ /**
59
+ * The calendar period a window is exactly, when it is one: a whole year,
60
+ * quarter, month, week or day in this calendar (the largest that fits), else
61
+ * null. The one detector placement steps a range by and the comparison menu
62
+ * names a range by, so a whole February is "Previous month" in the menu and
63
+ * January in the run (compare-with ledger EXT-04).
64
+ */
65
+ export declare function completeCalendarPeriod(start: Date, endExclusive: Date, calendar: TemporalCalendar): WholePeriodUnit | null;
55
66
  /** Where the period containing `instant` starts. */
56
67
  export declare function startOfPeriod(instant: Date, unit: TemporalUnit, calendar: TemporalCalendar): Date;
57
68
  /** The last millisecond of the period containing `instant`. */
@@ -1,4 +1,6 @@
1
+ export * from './temporal.js';
1
2
  export * from './zoned-wall-clock.js';
3
+ export * from './temporal-text.js';
2
4
  export * from './calendar-periods.js';
3
5
  export * from './calendar-day-equality.js';
4
6
  export * from './raw-temporal-equality.js';
@@ -0,0 +1,33 @@
1
+ /** Date and time text as written: the date, then the time and the offset when present. */
2
+ export type TemporalText = {
3
+ year: number;
4
+ /** Absent for a year on its own (`2026`). */
5
+ month?: number;
6
+ /** Absent for a year or a month on its own (`2026-06`). */
7
+ day?: number;
8
+ time?: {
9
+ hour: number;
10
+ /** 1 for `9`, 2 for `09`. */
11
+ hourDigits: 1 | 2;
12
+ minute?: number;
13
+ second?: number;
14
+ /** The digits after the second, as written. */
15
+ fraction: string;
16
+ };
17
+ /** As written: `Z`, `+05`, `+0530` or `+05:30`. */
18
+ offset?: string;
19
+ /** Whitespace stood between the time and the offset (`… 10:00 +05`). */
20
+ spacedOffset?: true;
21
+ /** What follows the date and time, when a reader accepts text after them. */
22
+ rest: string;
23
+ };
24
+ /** The text's date and time fields, or null when it does not start with a four-digit year. */
25
+ export declare function lexTemporalText(text: string): TemporalText | null;
26
+ /** The offset as Temporal reads it (`+05` to `+05:00`, `+0530` to `+05:30`), or `Z`. */
27
+ export declare function normalizedOffset(offset: string): string;
28
+ /** Whether the fields name a real calendar date and wall time (February 29 only in a leap year, hours below 24). */
29
+ export declare function isRealTemporalText(text: TemporalText): boolean;
30
+ /** The milliseconds of a fraction as written (`5` is 500, `123456` is 123). */
31
+ export declare function fractionMilliseconds(fraction: string): number;
32
+ /** Exactly `YYYY-MM-DD`, as written; whether it names a real day is the reader's check (`parseWallDate`). */
33
+ export declare function isCalendarDateText(text: string): boolean;
@@ -0,0 +1,27 @@
1
+ import { Temporal as Polyfill } from 'temporal-polyfill';
2
+ type TemporalNamespace = typeof Polyfill;
3
+ export declare const Temporal: TemporalNamespace;
4
+ export type PlainDate = Polyfill.PlainDate;
5
+ export type PlainDateTime = Polyfill.PlainDateTime;
6
+ export type ZonedDateTime = Polyfill.ZonedDateTime;
7
+ export type Instant = Polyfill.Instant;
8
+ export type Duration = Polyfill.Duration;
9
+ /**
10
+ * How a wall-clock time a clock change skips or repeats names an instant
11
+ * (analytics kernel K7): a repeated hour takes its first occurrence, a skipped
12
+ * hour moves forward by the gap.
13
+ */
14
+ export declare const WALL_CLOCK_DISAMBIGUATION: "compatible";
15
+ /** The instant of a `Date`, as Temporal reads it. */
16
+ export declare function instantOf(date: Date): Instant;
17
+ /** The `Date` of an instant or a zoned time, for the code that still speaks `Date`. */
18
+ export declare function dateOf(value: Instant | ZonedDateTime): Date;
19
+ /** The first instant after an inclusive end (its last millisecond): the end a half-open window takes. */
20
+ export declare function exclusiveEndOf(inclusiveEnd: Date): Date;
21
+ /** The last millisecond before an exclusive end: the inclusive end a resolver hands out. */
22
+ export declare function inclusiveEndOf(exclusiveEnd: Date): Date;
23
+ /** Elapsed time from one instant to another, in milliseconds. */
24
+ export declare function elapsedMilliseconds(from: Date, to: Date): number;
25
+ /** An instant moved by elapsed time (never the calendar: a day across a clock change is not 24 hours of it). */
26
+ export declare function afterElapsed(instant: Date, milliseconds: number): Date;
27
+ export {};
@@ -1,3 +1,4 @@
1
+ import { PlainDateTime } from './temporal.js';
1
2
  export type ZonedWallClock = {
2
3
  year: number;
3
4
  month: number;
@@ -11,14 +12,14 @@ export declare function zonedWallClock(instant: Date, tz: string): ZonedWallCloc
11
12
  export type ZonedWallClockTime = ZonedWallClock & {
12
13
  millisecond?: number;
13
14
  };
15
+ /** The wall clock as a Temporal plain date and time (the calendar's own, no timezone). */
16
+ export declare function plainWallClock(wall: ZonedWallClockTime): PlainDateTime;
14
17
  /** The wall clock as if it were UTC, in milliseconds. */
15
18
  export declare function wallClockMilliseconds(wall: ZonedWallClockTime): number;
16
19
  /**
17
20
  * The instant a wall-clock time names in a timezone (analytics kernel K7). A
18
21
  * repeated hour takes its first occurrence; a skipped hour moves forward by
19
- * the gap, as JavaScript's Temporal API and java.time do by default. The
20
- * offsets a day either side cover any one change, and no offset reaches a
21
- * day, so the answer never depends on the machine.
22
+ * the gap: Temporal's `compatible` rule, as java.time does by default.
22
23
  */
23
24
  export declare function zonedWallClockToInstant(wall: ZonedWallClockTime, tz: string): Date;
24
25
  /**
@@ -1,5 +1,5 @@
1
1
  import { z as e } from "zod";
2
- import { g as h, l as S } from "../chunks/context-BJoEFgNl.js";
2
+ import { g as h, l as S } from "../chunks/context-UCQ7sere.js";
3
3
  import { Q as b, a as y, b as x } from "../chunks/attribution-BvoKvhcj.js";
4
4
  import { U as te, c as ne, u as ae } from "../chunks/attribution-BvoKvhcj.js";
5
5
  const r = e.string().min(1).max(128), t = e.string().max(500), m = e.array(e.string().max(500)).max(500), n = e.number().int().nonnegative(), p = e.string().refine((o) => new TextEncoder().encode(o).length <= 16 * 1024), f = e.object({