react-semaphor 0.1.320 → 0.1.321

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 (45) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +4 -4
  3. package/dist/briefings/index.cjs +1 -1
  4. package/dist/briefings/index.js +278 -208
  5. package/dist/chunks/{braces-NfG5hX2c.js → braces-C7BeIXvM.js} +1 -1
  6. package/dist/chunks/{braces-CDPz6CF2.js → braces-Cy5NEBa8.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-CFXQBJ4A.js → calendar-preferences-dialog-CzoSmQNw.js} +1 -1
  8. package/dist/chunks/{calendar-preferences-dialog-B7Z8OnuZ.js → calendar-preferences-dialog-D-0W76fR.js} +3 -3
  9. package/dist/chunks/{chevrons-up-down-DiWloubI.js → chevrons-up-down-Cuilz9aY.js} +1 -1
  10. package/dist/chunks/{chevrons-up-down-BsdQRmJL.js → chevrons-up-down-DZTs1oVD.js} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-DjDpGyD7.js → dashboard-briefing-launcher-Cqm8NnVb.js} +8 -8
  12. package/dist/chunks/{dashboard-briefing-launcher-DB16djcj.js → dashboard-briefing-launcher-D5z1kf6J.js} +932 -910
  13. package/dist/chunks/{dashboard-controls-DPStW1kd.js → dashboard-controls-CRIwHD59.js} +94 -94
  14. package/dist/chunks/{dashboard-controls-BisfskDD.js → dashboard-controls-DSt7iwFC.js} +1 -1
  15. package/dist/chunks/{dashboard-json-C8-kkiyT.js → dashboard-json-BRx9CbrK.js} +2 -2
  16. package/dist/chunks/{dashboard-json-2nyFJ_-w.js → dashboard-json-ezFjz7Fc.js} +1 -1
  17. package/dist/chunks/{edit-dashboard-visual-BP77bJFI.js → edit-dashboard-visual-Cw0KmT4i.js} +1 -1
  18. package/dist/chunks/{edit-dashboard-visual-D6oiTlXr.js → edit-dashboard-visual-sI6ds8MP.js} +616 -616
  19. package/dist/chunks/{index-Clw0hJzi.js → index-BZg7rVe-.js} +27161 -26641
  20. package/dist/chunks/{index-D8eouWYC.js → index-DX6Krdga.js} +215 -210
  21. package/dist/chunks/{palette-BlxLchHy.js → palette-Bc-vOLSt.js} +1 -1
  22. package/dist/chunks/{palette-CJTdBzJB.js → palette-CanPG11m.js} +1 -1
  23. package/dist/chunks/resource-management-panel-CRRUcnVu.js +6 -0
  24. package/dist/chunks/{resource-management-panel-HcRJRZHO.js → resource-management-panel-pN81x7Gw.js} +451 -369
  25. package/dist/chunks/{save-DVRQBMeb.js → save-CXa6cKaY.js} +1 -1
  26. package/dist/chunks/{save-B8x5Vi0W.js → save-CqrBQKG6.js} +1 -1
  27. package/dist/chunks/{switch-DPaKnsb8.js → switch-BXICAlvS.js} +2 -2
  28. package/dist/chunks/{switch-sauemjyY.js → switch-DdTUsWgd.js} +127 -127
  29. package/dist/chunks/{use-create-flow-overlay-state-75l5mrVp.js → use-create-flow-overlay-state-B9ujZUon.js} +104 -104
  30. package/dist/chunks/{use-create-flow-overlay-state-CdCldE6J.js → use-create-flow-overlay-state-BfV5187a.js} +1 -1
  31. package/dist/chunks/{use-visual-utils-CMdEUnM5.js → use-visual-utils-D_uHFfTn.js} +1 -1
  32. package/dist/chunks/{use-visual-utils-Bd4Cf9_B.js → use-visual-utils-PxijRlpS.js} +2 -2
  33. package/dist/dashboard/index.cjs +1 -1
  34. package/dist/dashboard/index.js +1 -1
  35. package/dist/dashboard-authoring/index.cjs +3 -0
  36. package/dist/dashboard-authoring/index.js +532 -0
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +7 -7
  39. package/dist/style.css +1 -1
  40. package/dist/surfboard/index.cjs +1 -1
  41. package/dist/surfboard/index.js +2 -2
  42. package/dist/types/briefings.d.ts +15 -0
  43. package/dist/types/dashboard-authoring.d.ts +2703 -0
  44. package/package.json +6 -1
  45. package/dist/chunks/resource-management-panel-DTvY5OIq.js +0 -6
@@ -1,7 +1,7 @@
1
- var G = Object.defineProperty;
2
- var U = (n, t, e) => t in n ? G(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var z = (n, t, e) => U(n, typeof t != "symbol" ? t + "" : t, e);
4
- const S = "BRIEFING", H = ["markdown", "html"], k = ["markdown"], Le = 20, l = {
1
+ var W = Object.defineProperty;
2
+ var Y = (n, t, e) => t in n ? W(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var F = (n, t, e) => Y(n, typeof t != "symbol" ? t + "" : t, e);
4
+ const w = "BRIEFING", Z = ["markdown", "html"], V = ["markdown"], De = 20, l = {
5
5
  name: 500,
6
6
  description: 2e3,
7
7
  instruction: 5e4,
@@ -23,50 +23,54 @@ const S = "BRIEFING", H = ["markdown", "html"], k = ["markdown"], Le = 20, l = {
23
23
  maxTableCellCharacters: l.contentCell,
24
24
  maxParagraphCharacters: l.contentText,
25
25
  maxFindingCharacters: l.contentText,
26
- maxListItems: 100
27
- }, D = new Set(H), X = /* @__PURE__ */ new Set([
26
+ maxListItems: 100,
27
+ // A kpi_grid is rendered as a 2-up tile arrangement in emails. Cap at 8 so
28
+ // the visual stays at most 4 rows (4 columns wide on desktop would force
29
+ // tiny tiles in narrow client panels; 2-up was the chosen layout).
30
+ maxKpiTiles: 8
31
+ }, M = new Set(Z), Q = /* @__PURE__ */ new Set([
28
32
  "EMAIL",
29
33
  "WEBHOOK",
30
34
  "SLACK",
31
35
  "IN_APP",
32
36
  "TELEGRAM"
33
- ]), T = {
37
+ ]), L = {
34
38
  maxToolCalls: { min: 1, max: 100 },
35
39
  maxRows: { min: 1, max: 1e5 },
36
40
  timeoutMs: { min: 1e3, max: 30 * 6e4 }
37
- }, J = /* @__PURE__ */ new Set([
41
+ }, ee = /* @__PURE__ */ new Set([
38
42
  "letter",
39
43
  "legal",
40
44
  "a4",
41
45
  "a3",
42
46
  "tabloid"
43
- ]), W = /* @__PURE__ */ new Set([
47
+ ]), te = /* @__PURE__ */ new Set([
44
48
  "portrait",
45
49
  "landscape"
46
- ]), Y = /* @__PURE__ */ new Set([",", ";", " "]), Z = /* @__PURE__ */ new Set([
50
+ ]), ne = /* @__PURE__ */ new Set([",", ";", " "]), re = /* @__PURE__ */ new Set([
47
51
  "current",
48
52
  "all"
49
- ]), Q = /* @__PURE__ */ new Set([
53
+ ]), oe = /* @__PURE__ */ new Set([
50
54
  "concise",
51
55
  "balanced",
52
56
  "detailed"
53
- ]), ee = /* @__PURE__ */ new Set([
57
+ ]), ie = /* @__PURE__ */ new Set([
54
58
  "info",
55
59
  "positive",
56
60
  "warning",
57
61
  "critical"
58
- ]), te = /* @__PURE__ */ new Set([
62
+ ]), ae = /* @__PURE__ */ new Set([
59
63
  "text",
60
64
  "number",
61
65
  "currency",
62
66
  "percent",
63
67
  "date",
64
68
  "boolean"
65
- ]), ne = /* @__PURE__ */ new Set([
69
+ ]), ce = /* @__PURE__ */ new Set([
66
70
  "left",
67
71
  "center",
68
72
  "right"
69
- ]), re = [
73
+ ]), de = [
70
74
  "pageSize",
71
75
  "orientation",
72
76
  "includeFilters",
@@ -91,21 +95,21 @@ const S = "BRIEFING", H = ["markdown", "html"], k = ["markdown"], Le = 20, l = {
91
95
  "cardType",
92
96
  "theme"
93
97
  ];
94
- class A extends Error {
98
+ class S extends Error {
95
99
  constructor(e) {
96
100
  super(e.map((r) => `${r.field}: ${r.message}`).join("; "));
97
- z(this, "issues");
101
+ F(this, "issues");
98
102
  this.name = "BriefingContractError", this.issues = e;
99
103
  }
100
104
  }
101
- function N(n) {
105
+ function P(n) {
102
106
  return typeof n == "object" && n !== null && !Array.isArray(n);
103
107
  }
104
108
  function c(n, t, e) {
105
109
  n.push({ field: t, message: e });
106
110
  }
107
- function h(n, t, e) {
108
- return N(n) ? n : (c(e, t, "Expected an object."), {});
111
+ function v(n, t, e) {
112
+ return P(n) ? n : (c(e, t, "Expected an object."), {});
109
113
  }
110
114
  function f(n, t, e, r) {
111
115
  const o = new Set(e);
@@ -134,7 +138,7 @@ function y(n, t, e, r) {
134
138
  if (o)
135
139
  return o.length > e && c(r, t, `Must be ${e} characters or fewer.`), o;
136
140
  }
137
- function oe(n, t, e) {
141
+ function le(n, t, e) {
138
142
  if (n != null) {
139
143
  if (!Number.isInteger(n) || Number(n) < 0) {
140
144
  c(e, t, "Expected a non-negative integer.");
@@ -143,7 +147,7 @@ function oe(n, t, e) {
143
147
  return Number(n);
144
148
  }
145
149
  }
146
- function b(n, t, e, r = {}) {
150
+ function $(n, t, e, r = {}) {
147
151
  if (n == null)
148
152
  return r.required ? (c(e, t, "Expected at least one evidence id."), []) : void 0;
149
153
  if (!Array.isArray(n))
@@ -159,19 +163,19 @@ function b(n, t, e, r = {}) {
159
163
  d && !o.includes(d) && o.push(d);
160
164
  }), r.required && o.length === 0 && c(e, t, "Expected at least one evidence id."), o.length > 0 || r.required ? o : void 0;
161
165
  }
162
- function $(n, t, e, r) {
166
+ function C(n, t, e, r) {
163
167
  return n == null ? t : typeof n != "boolean" ? (c(r, e, "Expected a boolean."), t) : n;
164
168
  }
165
- function ie(n, t) {
169
+ function se(n, t) {
166
170
  return n == null ? "ACTIVE" : n === "ACTIVE" || n === "PAUSED" || n === "DISABLED" ? n : (c(t, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
167
171
  }
168
- function ae(n) {
172
+ function fe(n) {
169
173
  return n.includes("@") && n.includes(".") && !n.includes(" ");
170
174
  }
171
- function O(n, t) {
175
+ function j(n, t) {
172
176
  if (n == null)
173
177
  return { type: "project" };
174
- const e = h(n, "source", t), r = e.type;
178
+ const e = v(n, "source", t), r = e.type;
175
179
  return r === "project" ? (f(e, "source", ["type"], t), { type: "project" }) : r === "dashboard" ? (f(e, "source", ["type", "dashboardId"], t), {
176
180
  type: "dashboard",
177
181
  dashboardId: u(
@@ -182,8 +186,8 @@ function O(n, t) {
182
186
  )
183
187
  }) : (c(t, "source.type", "Expected project or dashboard."), { type: "project" });
184
188
  }
185
- function R(n, t) {
186
- const e = h(n, "body", t), r = e.type;
189
+ function K(n, t) {
190
+ const e = v(n, "body", t), r = e.type;
187
191
  return r === "generated_analysis" ? (f(e, "body", ["type", "instruction"], t), {
188
192
  type: "generated_analysis",
189
193
  instruction: u(
@@ -206,11 +210,11 @@ function R(n, t) {
206
210
  "Expected generated_analysis, custom_message, or none."
207
211
  ), { type: "none" });
208
212
  }
209
- function ce(n, t) {
213
+ function me(n, t) {
210
214
  if (n == null)
211
- return [...k];
215
+ return [...V];
212
216
  if (!Array.isArray(n))
213
- return c(t, "presentation.artifactFormats", "Expected an array."), [...k];
217
+ return c(t, "presentation.artifactFormats", "Expected an array."), [...V];
214
218
  if (n.length === 0)
215
219
  return c(
216
220
  t,
@@ -219,7 +223,7 @@ function ce(n, t) {
219
223
  ), [];
220
224
  const e = [];
221
225
  return n.forEach((r, o) => {
222
- if (typeof r != "string" || !D.has(r)) {
226
+ if (typeof r != "string" || !M.has(r)) {
223
227
  c(
224
228
  t,
225
229
  `presentation.artifactFormats.${o}`,
@@ -230,14 +234,14 @@ function ce(n, t) {
230
234
  e.includes(r) || e.push(r);
231
235
  }), e;
232
236
  }
233
- function F(n, t) {
237
+ function q(n, t) {
234
238
  if (n == null)
235
239
  return {
236
- artifactFormats: [...k],
240
+ artifactFormats: [...V],
237
241
  includeEvidence: !0,
238
242
  includeSql: !0
239
243
  };
240
- const e = h(n, "presentation", t);
244
+ const e = v(n, "presentation", t);
241
245
  f(
242
246
  e,
243
247
  "presentation",
@@ -245,14 +249,14 @@ function F(n, t) {
245
249
  t
246
250
  );
247
251
  const r = {
248
- artifactFormats: ce(e.artifactFormats, t),
249
- includeEvidence: $(
252
+ artifactFormats: me(e.artifactFormats, t),
253
+ includeEvidence: C(
250
254
  e.includeEvidence,
251
255
  !0,
252
256
  "presentation.includeEvidence",
253
257
  t
254
258
  ),
255
- includeSql: $(
259
+ includeSql: C(
256
260
  e.includeSql,
257
261
  !0,
258
262
  "presentation.includeSql",
@@ -276,7 +280,7 @@ function F(n, t) {
276
280
  );
277
281
  return o && (r.audience = o), i && (r.tone = i), a && (r.format = a), r;
278
282
  }
279
- function de(n, t, e) {
283
+ function pe(n, t, e) {
280
284
  return Array.isArray(n) ? (n.length === 0 && c(e, t, "Expected at least one item."), n.length > g.maxListItems && c(
281
285
  e,
282
286
  t,
@@ -290,14 +294,14 @@ function de(n, t, e) {
290
294
  )
291
295
  ).filter(Boolean)) : (c(e, t, "Expected an array."), []);
292
296
  }
293
- function le(n, t, e) {
297
+ function ue(n, t, e) {
294
298
  return n === null || typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? typeof n == "string" && n.length > l.contentCell ? (c(
295
299
  e,
296
300
  t,
297
301
  `Must be ${l.contentCell} characters or fewer.`
298
302
  ), n.slice(0, l.contentCell)) : typeof n == "number" && !Number.isFinite(n) ? (c(e, t, "Expected a finite number."), null) : n : (c(e, t, "Expected a string, number, boolean, or null."), null);
299
303
  }
300
- function se(n, t, e) {
304
+ function ye(n, t, e) {
301
305
  if (!Array.isArray(n))
302
306
  return c(e, t, "Expected an array."), [];
303
307
  n.length === 0 && c(e, t, "Expected at least one column."), n.length > g.maxTableColumns && c(
@@ -307,7 +311,7 @@ function se(n, t, e) {
307
311
  );
308
312
  const r = /* @__PURE__ */ new Set();
309
313
  return n.slice(0, g.maxTableColumns).map((o, i) => {
310
- const a = `${t}.${i}`, d = h(o, a, e);
314
+ const a = `${t}.${i}`, d = v(o, a, e);
311
315
  f(d, a, ["key", "label", "kind", "align"], e);
312
316
  const m = u(
313
317
  d.key,
@@ -321,16 +325,16 @@ function se(n, t, e) {
321
325
  `${a}.label`,
322
326
  l.contentTitle,
323
327
  e
324
- ), p = I(
328
+ ), p = E(
325
329
  d.kind,
326
330
  `${a}.kind`,
327
- te,
331
+ ae,
328
332
  "text, number, currency, percent, date, or boolean",
329
333
  e
330
- ), v = I(
334
+ ), I = E(
331
335
  d.align,
332
336
  `${a}.align`,
333
- ne,
337
+ ce,
334
338
  "left, center, or right",
335
339
  e
336
340
  );
@@ -338,11 +342,11 @@ function se(n, t, e) {
338
342
  key: m,
339
343
  label: s,
340
344
  ...p ? { kind: p } : {},
341
- ...v ? { align: v } : {}
345
+ ...I ? { align: I } : {}
342
346
  };
343
347
  });
344
348
  }
345
- function fe(n, t, e, r) {
349
+ function he(n, t, e, r) {
346
350
  if (!Array.isArray(n))
347
351
  return c(r, t, "Expected an array."), [];
348
352
  n.length > g.maxTableRows && c(
@@ -352,24 +356,24 @@ function fe(n, t, e, r) {
352
356
  );
353
357
  const o = new Set(e.map((i) => i.key).filter(Boolean));
354
358
  return n.slice(0, g.maxTableRows).map((i, a) => {
355
- const d = `${t}.${a}`, m = h(i, d, r);
359
+ const d = `${t}.${a}`, m = v(i, d, r);
356
360
  return Object.keys(m).forEach((s) => {
357
361
  o.has(s) || c(r, `${d}.${s}`, `Unexpected table cell "${s}".`);
358
362
  }), Object.fromEntries(
359
363
  e.map((s) => [
360
364
  s.key,
361
- le(m[s.key] ?? null, `${d}.${s.key}`, r)
365
+ ue(m[s.key] ?? null, `${d}.${s.key}`, r)
362
366
  ])
363
367
  );
364
368
  });
365
369
  }
366
- function me(n, t, e) {
367
- const r = `content.blocks.${t}`, o = h(n, r, e), i = o.type;
370
+ function ve(n, t, e) {
371
+ const r = `content.blocks.${t}`, o = v(n, r, e), i = o.type;
368
372
  if (i === "heading") {
369
373
  f(o, r, ["type", "text", "level", "evidenceIds"], e);
370
374
  const a = o.level === void 0 || o.level === null ? void 0 : o.level === 2 || o.level === 3 ? o.level : void 0;
371
375
  o.level !== void 0 && o.level !== null && a === void 0 && c(e, `${r}.level`, "Expected 2 or 3.");
372
- const d = b(o.evidenceIds, `${r}.evidenceIds`, e);
376
+ const d = $(o.evidenceIds, `${r}.evidenceIds`, e);
373
377
  return {
374
378
  type: "heading",
375
379
  text: u(
@@ -384,7 +388,7 @@ function me(n, t, e) {
384
388
  }
385
389
  if (i === "paragraph") {
386
390
  f(o, r, ["type", "text", "evidenceIds"], e);
387
- const a = b(o.evidenceIds, `${r}.evidenceIds`, e);
391
+ const a = $(o.evidenceIds, `${r}.evidenceIds`, e);
388
392
  return {
389
393
  type: "paragraph",
390
394
  text: u(
@@ -403,10 +407,10 @@ function me(n, t, e) {
403
407
  `${r}.title`,
404
408
  l.contentTitle,
405
409
  e
406
- ), d = I(
410
+ ), d = E(
407
411
  o.severity,
408
412
  `${r}.severity`,
409
- ee,
413
+ ie,
410
414
  "info, positive, warning, or critical",
411
415
  e
412
416
  );
@@ -420,7 +424,7 @@ function me(n, t, e) {
420
424
  e
421
425
  ),
422
426
  ...d ? { severity: d } : {},
423
- evidenceIds: b(o.evidenceIds, `${r}.evidenceIds`, e, {
427
+ evidenceIds: $(o.evidenceIds, `${r}.evidenceIds`, e, {
424
428
  required: !0
425
429
  }) ?? []
426
430
  };
@@ -432,11 +436,11 @@ function me(n, t, e) {
432
436
  `${r}.title`,
433
437
  l.contentTitle,
434
438
  e
435
- ), d = b(o.evidenceIds, `${r}.evidenceIds`, e);
439
+ ), d = $(o.evidenceIds, `${r}.evidenceIds`, e);
436
440
  return {
437
441
  type: i,
438
442
  ...a ? { title: a } : {},
439
- items: de(o.items, `${r}.items`, e),
443
+ items: pe(o.items, `${r}.items`, e),
440
444
  ...d ? { evidenceIds: d } : {}
441
445
  };
442
446
  }
@@ -458,7 +462,7 @@ function me(n, t, e) {
458
462
  `${r}.unit`,
459
463
  l.contentTitle,
460
464
  e
461
- ), p = b(o.evidenceIds, `${r}.evidenceIds`, e);
465
+ ), p = $(o.evidenceIds, `${r}.evidenceIds`, e);
462
466
  return {
463
467
  type: "metric",
464
468
  label: u(
@@ -474,6 +478,72 @@ function me(n, t, e) {
474
478
  ...p ? { evidenceIds: p } : {}
475
479
  };
476
480
  }
481
+ if (i === "kpi_grid") {
482
+ f(o, r, ["type", "title", "tiles", "evidenceIds"], e);
483
+ const a = y(
484
+ o.title,
485
+ `${r}.title`,
486
+ l.contentTitle,
487
+ e
488
+ ), d = Array.isArray(o.tiles) ? o.tiles : [];
489
+ Array.isArray(o.tiles) || c(e, `${r}.tiles`, "Expected an array."), d.length === 0 && c(e, `${r}.tiles`, "Expected at least one tile."), d.length > g.maxKpiTiles && c(
490
+ e,
491
+ `${r}.tiles`,
492
+ `Must have ${g.maxKpiTiles} tiles or fewer.`
493
+ );
494
+ const m = d.slice(0, g.maxKpiTiles).map((p, I) => {
495
+ const b = `${r}.tiles.${I}`, h = v(p, b, e);
496
+ f(
497
+ h,
498
+ b,
499
+ ["label", "value", "previousValue", "delta", "unit", "evidenceIds"],
500
+ e
501
+ );
502
+ const N = typeof h.value == "string" || typeof h.value == "number" ? h.value : "";
503
+ N === "" && c(e, `${b}.value`, "Expected a string or number.");
504
+ const k = h.previousValue === void 0 || h.previousValue === null || typeof h.previousValue == "string" || typeof h.previousValue == "number" ? h.previousValue : void 0;
505
+ h.previousValue !== void 0 && h.previousValue !== null && k === void 0 && c(
506
+ e,
507
+ `${b}.previousValue`,
508
+ "Expected a string, number, or null."
509
+ );
510
+ const _ = h.delta === void 0 || h.delta === null || typeof h.delta == "string" || typeof h.delta == "number" ? h.delta : void 0;
511
+ h.delta !== void 0 && h.delta !== null && _ === void 0 && c(e, `${b}.delta`, "Expected a string, number, or null.");
512
+ const O = y(
513
+ h.unit,
514
+ `${b}.unit`,
515
+ l.contentTitle,
516
+ e
517
+ ), R = $(
518
+ h.evidenceIds,
519
+ `${b}.evidenceIds`,
520
+ e
521
+ );
522
+ return {
523
+ label: u(
524
+ h.label,
525
+ `${b}.label`,
526
+ l.contentTitle,
527
+ e
528
+ ),
529
+ value: N,
530
+ ...k !== void 0 ? { previousValue: k } : {},
531
+ ..._ !== void 0 ? { delta: _ } : {},
532
+ ...O ? { unit: O } : {},
533
+ ...R ? { evidenceIds: R } : {}
534
+ };
535
+ }), s = $(
536
+ o.evidenceIds,
537
+ `${r}.evidenceIds`,
538
+ e
539
+ );
540
+ return {
541
+ type: "kpi_grid",
542
+ ...a ? { title: a } : {},
543
+ tiles: m,
544
+ ...s ? { evidenceIds: s } : {}
545
+ };
546
+ }
477
547
  if (i === "table") {
478
548
  f(
479
549
  o,
@@ -481,7 +551,7 @@ function me(n, t, e) {
481
551
  ["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
482
552
  e
483
553
  );
484
- const a = se(o.columns, `${r}.columns`, e), d = y(
554
+ const a = ye(o.columns, `${r}.columns`, e), d = y(
485
555
  o.title,
486
556
  `${r}.title`,
487
557
  l.contentTitle,
@@ -496,20 +566,20 @@ function me(n, t, e) {
496
566
  `${r}.caption`,
497
567
  l.contentItem,
498
568
  e
499
- ), p = oe(
569
+ ), p = le(
500
570
  o.totalRows,
501
571
  `${r}.totalRows`,
502
572
  e
503
- ), v = b(o.evidenceIds, `${r}.evidenceIds`, e);
573
+ ), I = $(o.evidenceIds, `${r}.evidenceIds`, e);
504
574
  return {
505
575
  type: "table",
506
576
  ...m ? { id: m } : {},
507
577
  ...d ? { title: d } : {},
508
578
  columns: a,
509
- rows: fe(o.rows, `${r}.rows`, a, e),
579
+ rows: he(o.rows, `${r}.rows`, a, e),
510
580
  ...s ? { caption: s } : {},
511
581
  ...p !== void 0 ? { totalRows: p } : {},
512
- ...v ? { evidenceIds: v } : {}
582
+ ...I ? { evidenceIds: I } : {}
513
583
  };
514
584
  }
515
585
  if (i === "evidence_appendix") {
@@ -523,7 +593,7 @@ function me(n, t, e) {
523
593
  return {
524
594
  type: "evidence_appendix",
525
595
  ...a ? { title: a } : {},
526
- evidenceIds: b(o.evidenceIds, `${r}.evidenceIds`, e, {
596
+ evidenceIds: $(o.evidenceIds, `${r}.evidenceIds`, e, {
527
597
  required: !0
528
598
  }) ?? []
529
599
  };
@@ -531,14 +601,14 @@ function me(n, t, e) {
531
601
  return c(
532
602
  e,
533
603
  `${r}.type`,
534
- "Expected heading, paragraph, finding, bullets, metric, table, actions, limitations, or evidence_appendix."
604
+ "Expected heading, paragraph, finding, bullets, metric, kpi_grid, table, actions, limitations, or evidence_appendix."
535
605
  ), {
536
606
  type: "paragraph",
537
607
  text: ""
538
608
  };
539
609
  }
540
- function pe(n) {
541
- const t = [], e = h(n, "content", t);
610
+ function ge(n) {
611
+ const t = [], e = v(n, "content", t);
542
612
  f(e, "content", ["version", "title", "summary", "blocks"], t), e.version !== 1 && c(t, "content.version", "Expected version 1.");
543
613
  const r = y(
544
614
  e.title,
@@ -558,38 +628,38 @@ function pe(n) {
558
628
  "content.blocks",
559
629
  `Must have ${g.maxBlocks} blocks or fewer.`
560
630
  );
561
- const a = i.slice(0, g.maxBlocks).map((d, m) => me(d, m, t));
562
- return _(t), {
631
+ const a = i.slice(0, g.maxBlocks).map((d, m) => ve(d, m, t));
632
+ return B(t), {
563
633
  version: 1,
564
634
  ...r ? { title: r } : {},
565
635
  ...o ? { summary: o } : {},
566
636
  blocks: a
567
637
  };
568
638
  }
569
- function we(n) {
639
+ function Ne(n) {
570
640
  try {
571
641
  return {
572
642
  valid: !0,
573
- value: pe(n),
643
+ value: ge(n),
574
644
  issues: []
575
645
  };
576
646
  } catch (t) {
577
- if (t instanceof A)
647
+ if (t instanceof S)
578
648
  return { valid: !1, issues: t.issues };
579
649
  throw t;
580
650
  }
581
651
  }
582
- function E(n, t, e, r) {
652
+ function x(n, t, e, r) {
583
653
  return typeof n == "string" && e.includes(n) ? n : (c(r, t, `Expected ${e.join(" or ")}.`), e[0]);
584
654
  }
585
- function I(n, t, e, r, o) {
655
+ function E(n, t, e, r, o) {
586
656
  if (n != null) {
587
657
  if (typeof n == "string" && e.has(n))
588
658
  return n;
589
659
  c(o, t, `Expected ${r}.`);
590
660
  }
591
661
  }
592
- function ue(n, t, e) {
662
+ function Ie(n, t, e) {
593
663
  if (n != null) {
594
664
  if (!Array.isArray(n)) {
595
665
  c(e, t, "Expected an array.");
@@ -598,42 +668,42 @@ function ue(n, t, e) {
598
668
  return n;
599
669
  }
600
670
  }
601
- function ye(n, t, e) {
671
+ function be(n, t, e) {
602
672
  if (n != null) {
603
- if (!N(n)) {
673
+ if (!P(n)) {
604
674
  c(e, t, "Expected an object.");
605
675
  return;
606
676
  }
607
677
  return n;
608
678
  }
609
679
  }
610
- function he(n, t, e) {
680
+ function $e(n, t, e) {
611
681
  if (n == null)
612
682
  return;
613
- const r = h(n, t, e);
614
- f(r, t, re, e);
615
- const o = {}, i = I(
683
+ const r = v(n, t, e);
684
+ f(r, t, de, e);
685
+ const o = {}, i = E(
616
686
  r.pageSize,
617
687
  `${t}.pageSize`,
618
- J,
688
+ ee,
619
689
  "letter, legal, a4, a3, or tabloid",
620
690
  e
621
- ), a = I(
691
+ ), a = E(
622
692
  r.orientation,
623
693
  `${t}.orientation`,
624
- W,
694
+ te,
625
695
  "portrait or landscape",
626
696
  e
627
- ), d = I(
697
+ ), d = E(
628
698
  r.delimiter,
629
699
  `${t}.delimiter`,
630
- Y,
700
+ ne,
631
701
  "comma, semicolon, or tab",
632
702
  e
633
- ), m = I(
703
+ ), m = E(
634
704
  r.sheetSelection,
635
705
  `${t}.sheetSelection`,
636
- Z,
706
+ re,
637
707
  "current or all",
638
708
  e
639
709
  );
@@ -675,7 +745,7 @@ function he(n, t, e) {
675
745
  "cardControlDefinitions",
676
746
  "controlBindings"
677
747
  ]) {
678
- const p = ue(r[s], `${t}.${s}`, e);
748
+ const p = Ie(r[s], `${t}.${s}`, e);
679
749
  p && (o[s] = p);
680
750
  }
681
751
  for (const s of [
@@ -683,12 +753,12 @@ function he(n, t, e) {
683
753
  "tablePreferences",
684
754
  "dashboardInputExecutionSnapshot"
685
755
  ]) {
686
- const p = ye(r[s], `${t}.${s}`, e);
756
+ const p = be(r[s], `${t}.${s}`, e);
687
757
  p && (o[s] = p);
688
758
  }
689
759
  return Object.keys(o).length > 0 ? o : void 0;
690
760
  }
691
- function C(n, t, e, r) {
761
+ function T(n, t, e, r) {
692
762
  const o = y(
693
763
  t,
694
764
  e,
@@ -697,12 +767,12 @@ function C(n, t, e, r) {
697
767
  );
698
768
  return o && (n.title = o), n;
699
769
  }
700
- function x(n, t, e, r) {
701
- const o = he(t, e, r);
770
+ function A(n, t, e, r) {
771
+ const o = $e(t, e, r);
702
772
  return o && (n.settings = o), n;
703
773
  }
704
- function ge(n, t, e) {
705
- const r = `attachments.${t}`, o = h(n, r, e), i = o.type;
774
+ function Ee(n, t, e) {
775
+ const r = `attachments.${t}`, o = v(n, r, e), i = o.type;
706
776
  if (i === "dashboard") {
707
777
  f(
708
778
  o,
@@ -710,7 +780,7 @@ function ge(n, t, e) {
710
780
  ["type", "dashboardId", "format", "title", "settings"],
711
781
  e
712
782
  );
713
- const a = C(
783
+ const a = T(
714
784
  {
715
785
  type: "dashboard",
716
786
  dashboardId: u(
@@ -719,13 +789,13 @@ function ge(n, t, e) {
719
789
  l.id,
720
790
  e
721
791
  ),
722
- format: E(o.format, `${r}.format`, ["pdf"], e)
792
+ format: x(o.format, `${r}.format`, ["pdf"], e)
723
793
  },
724
794
  o.title,
725
795
  `${r}.title`,
726
796
  e
727
797
  );
728
- return x(a, o.settings, `${r}.settings`, e);
798
+ return A(a, o.settings, `${r}.settings`, e);
729
799
  }
730
800
  if (i === "dashboard_sheet" || i === "document_sheet") {
731
801
  f(
@@ -734,7 +804,7 @@ function ge(n, t, e) {
734
804
  ["type", "dashboardId", "sheetId", "format", "title", "settings"],
735
805
  e
736
806
  );
737
- const a = C(
807
+ const a = T(
738
808
  {
739
809
  type: i,
740
810
  dashboardId: u(
@@ -749,13 +819,13 @@ function ge(n, t, e) {
749
819
  l.id,
750
820
  e
751
821
  ),
752
- format: E(o.format, `${r}.format`, ["pdf"], e)
822
+ format: x(o.format, `${r}.format`, ["pdf"], e)
753
823
  },
754
824
  o.title,
755
825
  `${r}.title`,
756
826
  e
757
827
  );
758
- return x(a, o.settings, `${r}.settings`, e);
828
+ return A(a, o.settings, `${r}.settings`, e);
759
829
  }
760
830
  if (i === "visual") {
761
831
  f(
@@ -764,7 +834,7 @@ function ge(n, t, e) {
764
834
  ["type", "dashboardId", "visualId", "format", "title", "settings"],
765
835
  e
766
836
  );
767
- const a = C(
837
+ const a = T(
768
838
  {
769
839
  type: "visual",
770
840
  dashboardId: u(
@@ -779,7 +849,7 @@ function ge(n, t, e) {
779
849
  l.id,
780
850
  e
781
851
  ),
782
- format: E(
852
+ format: x(
783
853
  o.format,
784
854
  `${r}.format`,
785
855
  ["pdf", "png"],
@@ -790,7 +860,7 @@ function ge(n, t, e) {
790
860
  `${r}.title`,
791
861
  e
792
862
  );
793
- return x(a, o.settings, `${r}.settings`, e);
863
+ return A(a, o.settings, `${r}.settings`, e);
794
864
  }
795
865
  if (i === "card") {
796
866
  f(
@@ -799,7 +869,7 @@ function ge(n, t, e) {
799
869
  ["type", "dashboardId", "cardId", "format", "title", "settings"],
800
870
  e
801
871
  );
802
- const a = C(
872
+ const a = T(
803
873
  {
804
874
  type: "card",
805
875
  dashboardId: u(
@@ -814,7 +884,7 @@ function ge(n, t, e) {
814
884
  l.id,
815
885
  e
816
886
  ),
817
- format: E(
887
+ format: x(
818
888
  o.format,
819
889
  `${r}.format`,
820
890
  ["csv", "pdf", "png"],
@@ -825,7 +895,7 @@ function ge(n, t, e) {
825
895
  `${r}.title`,
826
896
  e
827
897
  );
828
- return x(a, o.settings, `${r}.settings`, e);
898
+ return A(a, o.settings, `${r}.settings`, e);
829
899
  }
830
900
  return c(
831
901
  e,
@@ -833,7 +903,7 @@ function ge(n, t, e) {
833
903
  "Expected dashboard, dashboard_sheet, document_sheet, visual, or card."
834
904
  ), { type: "dashboard", dashboardId: "", format: "pdf" };
835
905
  }
836
- function ve(n) {
906
+ function Ce(n) {
837
907
  switch (n.type) {
838
908
  case "dashboard":
839
909
  return `${n.type}:${n.dashboardId}:${n.format}`;
@@ -846,7 +916,7 @@ function ve(n) {
846
916
  return `${n.type}:${n.dashboardId}:${n.cardId}:${n.format}`;
847
917
  }
848
918
  }
849
- function V(n, t) {
919
+ function G(n, t) {
850
920
  if (n == null)
851
921
  return [];
852
922
  if (!Array.isArray(n))
@@ -856,23 +926,23 @@ function V(n, t) {
856
926
  "attachments",
857
927
  "Choose 20 attachments or fewer."
858
928
  );
859
- const e = n.slice(0, 20).map((o, i) => ge(o, i, t)), r = /* @__PURE__ */ new Set();
929
+ const e = n.slice(0, 20).map((o, i) => Ee(o, i, t)), r = /* @__PURE__ */ new Set();
860
930
  return e.forEach((o, i) => {
861
- const a = ve(o);
931
+ const a = Ce(o);
862
932
  r.has(a) && c(t, `attachments.${i}`, "Duplicate attachment."), r.add(a);
863
933
  }), e;
864
934
  }
865
- function M(n, t) {
935
+ function U(n, t) {
866
936
  if (n == null)
867
937
  return;
868
- const e = h(n, "limits", t);
869
- f(e, "limits", Object.keys(T), t);
938
+ const e = v(n, "limits", t);
939
+ f(e, "limits", Object.keys(L), t);
870
940
  const r = {};
871
- return Object.keys(T).forEach((o) => {
941
+ return Object.keys(L).forEach((o) => {
872
942
  const i = e[o];
873
943
  if (i == null)
874
944
  return;
875
- const a = T[o];
945
+ const a = L[o];
876
946
  if (typeof i != "number" || !Number.isInteger(i) || i < a.min || i > a.max) {
877
947
  c(
878
948
  t,
@@ -884,28 +954,28 @@ function M(n, t) {
884
954
  r[o] = i;
885
955
  }), Object.keys(r).length > 0 ? r : void 0;
886
956
  }
887
- function _(n) {
957
+ function B(n) {
888
958
  if (n.length > 0)
889
- throw new A(n);
959
+ throw new S(n);
890
960
  }
891
- function P(n, t, e) {
961
+ function H(n, t, e) {
892
962
  n.type === "none" && t.length === 0 && c(
893
963
  e,
894
964
  "body",
895
965
  "Add briefing instructions, a custom message, or at least one attachment."
896
966
  );
897
967
  }
898
- function j(n) {
899
- const t = [], e = h(n, "jobConfig", t);
968
+ function X(n) {
969
+ const t = [], e = v(n, "jobConfig", t);
900
970
  f(
901
971
  e,
902
972
  "jobConfig",
903
973
  ["kind", "source", "body", "attachments", "presentation", "limits"],
904
974
  t
905
- ), e.kind !== S && c(t, "kind", "Expected BRIEFING.");
906
- const r = O(e.source, t), o = R(e.body, t), i = V(e.attachments, t), a = F(e.presentation, t), d = M(e.limits, t);
907
- return P(o, i, t), _(t), {
908
- kind: S,
975
+ ), e.kind !== w && c(t, "kind", "Expected BRIEFING.");
976
+ const r = j(e.source, t), o = K(e.body, t), i = G(e.attachments, t), a = q(e.presentation, t), d = U(e.limits, t);
977
+ return H(o, i, t), B(t), {
978
+ kind: w,
909
979
  source: r,
910
980
  body: o,
911
981
  attachments: i,
@@ -913,14 +983,14 @@ function j(n) {
913
983
  ...d ? { limits: d } : {}
914
984
  };
915
985
  }
916
- function Be(n) {
917
- return j({
986
+ function Oe(n) {
987
+ return X({
918
988
  ...n,
919
- kind: S
989
+ kind: w
920
990
  });
921
991
  }
922
- function L(n, t, e, r = "deliveryConfig.recipients") {
923
- const o = `${r}.${t}`, i = h(n, o, e), a = i.type;
992
+ function z(n, t, e, r = "deliveryConfig.recipients") {
993
+ const o = `${r}.${t}`, i = v(n, o, e), a = i.type;
924
994
  if (a === "email") {
925
995
  f(i, o, ["type", "address", "name"], e);
926
996
  const d = u(
@@ -934,7 +1004,7 @@ function L(n, t, e, r = "deliveryConfig.recipients") {
934
1004
  l.attachmentTitle,
935
1005
  e
936
1006
  );
937
- return d && !ae(d) && c(e, `${o}.address`, "Email address is invalid."), {
1007
+ return d && !fe(d) && c(e, `${o}.address`, "Email address is invalid."), {
938
1008
  type: "email",
939
1009
  address: d,
940
1010
  ...m ? { name: m } : {}
@@ -970,17 +1040,17 @@ function L(n, t, e, r = "deliveryConfig.recipients") {
970
1040
  "Expected email, user, tenant_user, or group."
971
1041
  ), { type: "email", address: "" });
972
1042
  }
973
- function Ie(n, t) {
1043
+ function xe(n, t) {
974
1044
  return n == null ? [] : Array.isArray(n) ? n.map(
975
- (e, r) => L(e, r, t)
1045
+ (e, r) => z(e, r, t)
976
1046
  ) : (c(t, "deliveryConfig.recipients", "Expected an array."), []);
977
1047
  }
978
- function be(n, t) {
1048
+ function Te(n, t) {
979
1049
  if (!Array.isArray(n))
980
1050
  return c(t, "deliveryConfig.channels", "Expected an array."), [];
981
1051
  const e = [];
982
1052
  return n.forEach((r, o) => {
983
- if (!q(r)) {
1053
+ if (!J(r)) {
984
1054
  c(
985
1055
  t,
986
1056
  `deliveryConfig.channels.${o}`,
@@ -991,10 +1061,10 @@ function be(n, t) {
991
1061
  e.includes(r) || e.push(r);
992
1062
  }), e;
993
1063
  }
994
- function $e(n, t, e) {
1064
+ function Ae(n, t, e) {
995
1065
  if (n == null)
996
1066
  return;
997
- const r = h(n, t, e), o = {};
1067
+ const r = v(n, t, e), o = {};
998
1068
  return Object.entries(r).forEach(([i, a]) => {
999
1069
  if (typeof a != "string") {
1000
1070
  c(e, `${t}.${i}`, "Expected a string.");
@@ -1003,17 +1073,17 @@ function $e(n, t, e) {
1003
1073
  o[i] = a.trim();
1004
1074
  }), Object.keys(o).length > 0 ? o : void 0;
1005
1075
  }
1006
- function Ee(n, t, e) {
1076
+ function Se(n, t, e) {
1007
1077
  if (n == null)
1008
1078
  return;
1009
- const r = h(n, t, e);
1079
+ const r = v(n, t, e);
1010
1080
  f(
1011
1081
  r,
1012
1082
  t,
1013
1083
  ["url", "method", "headers", "secretEncrypted"],
1014
1084
  e
1015
1085
  );
1016
- const o = r.method === void 0 || r.method === null ? void 0 : E(r.method, `${t}.method`, ["POST", "PUT"], e), i = $e(r.headers, `${t}.headers`, e), a = y(
1086
+ const o = r.method === void 0 || r.method === null ? void 0 : x(r.method, `${t}.method`, ["POST", "PUT"], e), i = Ae(r.headers, `${t}.headers`, e), a = y(
1017
1087
  r.secretEncrypted,
1018
1088
  `${t}.secretEncrypted`,
1019
1089
  2e3,
@@ -1026,8 +1096,8 @@ function Ee(n, t, e) {
1026
1096
  ...a ? { secretEncrypted: a } : {}
1027
1097
  };
1028
1098
  }
1029
- function Ce(n, t, e) {
1030
- const r = h(n, t, e), o = r.type;
1099
+ function ke(n, t, e) {
1100
+ const r = v(n, t, e), o = r.type;
1031
1101
  if (o === "channel") {
1032
1102
  f(
1033
1103
  r,
@@ -1040,7 +1110,7 @@ function Ce(n, t, e) {
1040
1110
  `${t}.channelName`,
1041
1111
  l.attachmentTitle,
1042
1112
  e
1043
- ), a = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : $(
1113
+ ), a = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : C(
1044
1114
  r.isPrivate,
1045
1115
  !1,
1046
1116
  `${t}.isPrivate`,
@@ -1064,10 +1134,10 @@ function Ce(n, t, e) {
1064
1134
  "Slack DM delivery is not supported in V1."
1065
1135
  ), {
1066
1136
  type: "dm",
1067
- recipient: L(r.recipient, 0, e, `${t}.recipient`)
1137
+ recipient: z(r.recipient, 0, e, `${t}.recipient`)
1068
1138
  }) : (c(e, `${t}.type`, "Expected channel."), { type: "channel", channelId: "" });
1069
1139
  }
1070
- function xe(n, t, e) {
1140
+ function _e(n, t, e) {
1071
1141
  if (n == null)
1072
1142
  return;
1073
1143
  if (!Array.isArray(n)) {
@@ -1075,14 +1145,14 @@ function xe(n, t, e) {
1075
1145
  return;
1076
1146
  }
1077
1147
  const r = n.map(
1078
- (o, i) => L(o, i, e, t)
1148
+ (o, i) => z(o, i, e, t)
1079
1149
  );
1080
1150
  return r.length > 0 ? r : void 0;
1081
1151
  }
1082
- function Ae(n, t, e) {
1152
+ function Le(n, t, e) {
1083
1153
  if (n == null)
1084
1154
  return;
1085
- const r = h(n, t, e);
1155
+ const r = v(n, t, e);
1086
1156
  f(
1087
1157
  r,
1088
1158
  t,
@@ -1095,28 +1165,28 @@ function Ae(n, t, e) {
1095
1165
  ],
1096
1166
  e
1097
1167
  );
1098
- const o = xe(
1168
+ const o = _e(
1099
1169
  r.threadMentions,
1100
1170
  `${t}.threadMentions`,
1101
1171
  e
1102
- ), i = $(
1172
+ ), i = C(
1103
1173
  r.postThreadDetail,
1104
1174
  !0,
1105
1175
  `${t}.postThreadDetail`,
1106
1176
  e
1107
- ), a = $(
1177
+ ), a = C(
1108
1178
  r.includeDashboardLink,
1109
1179
  !0,
1110
1180
  `${t}.includeDashboardLink`,
1111
1181
  e
1112
- ), d = $(
1182
+ ), d = C(
1113
1183
  r.includeBriefingLink,
1114
1184
  !0,
1115
1185
  `${t}.includeBriefingLink`,
1116
1186
  e
1117
1187
  );
1118
1188
  return {
1119
- destination: Ce(
1189
+ destination: ke(
1120
1190
  r.destination,
1121
1191
  `${t}.destination`,
1122
1192
  e
@@ -1127,8 +1197,8 @@ function Ae(n, t, e) {
1127
1197
  ...r.includeBriefingLink !== void 0 ? { includeBriefingLink: d } : {}
1128
1198
  };
1129
1199
  }
1130
- function Te(n, t, e) {
1131
- const r = h(n, t, e);
1200
+ function we(n, t, e) {
1201
+ const r = v(n, t, e);
1132
1202
  f(
1133
1203
  r,
1134
1204
  t,
@@ -1143,10 +1213,10 @@ function Te(n, t, e) {
1143
1213
  ],
1144
1214
  e
1145
1215
  );
1146
- const o = I(
1216
+ const o = E(
1147
1217
  r.formatProfile,
1148
1218
  `${t}.formatProfile`,
1149
- Q,
1219
+ oe,
1150
1220
  "concise, balanced, or detailed",
1151
1221
  e
1152
1222
  ), i = y(
@@ -1164,16 +1234,16 @@ function Te(n, t, e) {
1164
1234
  `${t}.summaryOverride`,
1165
1235
  2e3,
1166
1236
  e
1167
- ), m = $(
1237
+ ), m = C(
1168
1238
  r.actionBlockVisible,
1169
1239
  !0,
1170
1240
  `${t}.actionBlockVisible`,
1171
1241
  e
1172
- ), s = Ee(
1242
+ ), s = Se(
1173
1243
  r.webhookConfig,
1174
1244
  `${t}.webhookConfig`,
1175
1245
  e
1176
- ), p = Ae(
1246
+ ), p = Le(
1177
1247
  r.slackConfig,
1178
1248
  `${t}.slackConfig`,
1179
1249
  e
@@ -1188,12 +1258,12 @@ function Te(n, t, e) {
1188
1258
  ...s ? { webhookConfig: s } : {}
1189
1259
  };
1190
1260
  }
1191
- function Se(n, t) {
1261
+ function Ve(n, t) {
1192
1262
  if (n == null)
1193
1263
  return;
1194
- const e = h(n, "deliveryConfig.channelConfigs", t), r = {};
1264
+ const e = v(n, "deliveryConfig.channelConfigs", t), r = {};
1195
1265
  return Object.entries(e).forEach(([o, i]) => {
1196
- if (!q(o)) {
1266
+ if (!J(o)) {
1197
1267
  c(
1198
1268
  t,
1199
1269
  `deliveryConfig.channelConfigs.${o}`,
@@ -1201,27 +1271,27 @@ function Se(n, t) {
1201
1271
  );
1202
1272
  return;
1203
1273
  }
1204
- r[o] = Te(
1274
+ r[o] = we(
1205
1275
  i,
1206
1276
  `deliveryConfig.channelConfigs.${o}`,
1207
1277
  t
1208
1278
  );
1209
1279
  }), Object.keys(r).length > 0 ? r : void 0;
1210
1280
  }
1211
- function ke(n, t) {
1281
+ function Be(n, t) {
1212
1282
  var m, s, p;
1213
1283
  if (n == null)
1214
1284
  return null;
1215
- const e = h(n, "deliveryConfig", t);
1285
+ const e = v(n, "deliveryConfig", t);
1216
1286
  f(
1217
1287
  e,
1218
1288
  "deliveryConfig",
1219
1289
  ["recipients", "channels", "channelConfigs"],
1220
1290
  t
1221
1291
  );
1222
- const r = Se(e.channelConfigs, t), o = Ie(e.recipients, t), i = be(e.channels, t), a = ((s = (m = r == null ? void 0 : r.SLACK) == null ? void 0 : m.slackConfig) == null ? void 0 : s.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
1292
+ const r = Ve(e.channelConfigs, t), o = xe(e.recipients, t), i = Te(e.channels, t), a = ((s = (m = r == null ? void 0 : r.SLACK) == null ? void 0 : m.slackConfig) == null ? void 0 : s.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
1223
1293
  return i.some(
1224
- (v) => v !== "SLACK"
1294
+ (I) => I !== "SLACK"
1225
1295
  ) && o.length === 0 && c(
1226
1296
  t,
1227
1297
  "deliveryConfig.recipients",
@@ -1244,8 +1314,8 @@ function ke(n, t) {
1244
1314
  ...r ? { channelConfigs: r } : {}
1245
1315
  };
1246
1316
  }
1247
- function w(n) {
1248
- const t = [], e = h(n, "draft", t);
1317
+ function D(n) {
1318
+ const t = [], e = v(n, "draft", t);
1249
1319
  f(
1250
1320
  e,
1251
1321
  "draft",
@@ -1274,8 +1344,8 @@ function w(n) {
1274
1344
  "description",
1275
1345
  l.description,
1276
1346
  t
1277
- ) ?? null, i = y(e.scheduleExpr, "scheduleExpr", 500, t) ?? null, a = y(e.timezone, "timezone", 200, t) ?? "UTC", d = ie(e.status, t), m = O(e.source, t), s = R(e.body, t), p = V(e.attachments, t), v = F(e.presentation, t), B = M(e.limits, t), K = ke(e.deliveryConfig, t);
1278
- return P(s, p, t), _(t), {
1347
+ ) ?? null, i = y(e.scheduleExpr, "scheduleExpr", 500, t) ?? null, a = y(e.timezone, "timezone", 200, t) ?? "UTC", d = se(e.status, t), m = j(e.source, t), s = K(e.body, t), p = G(e.attachments, t), I = q(e.presentation, t), b = U(e.limits, t), h = Be(e.deliveryConfig, t);
1348
+ return H(s, p, t), B(t), {
1279
1349
  name: r,
1280
1350
  description: o,
1281
1351
  status: d,
@@ -1284,58 +1354,58 @@ function w(n) {
1284
1354
  source: m,
1285
1355
  body: s,
1286
1356
  attachments: p,
1287
- presentation: v,
1288
- ...B ? { limits: B } : {},
1289
- deliveryConfig: K
1357
+ presentation: I,
1358
+ ...b ? { limits: b } : {},
1359
+ deliveryConfig: h
1290
1360
  };
1291
1361
  }
1292
- function ze(n) {
1293
- return w(n);
1362
+ function Re(n) {
1363
+ return D(n);
1294
1364
  }
1295
- function De(n) {
1296
- return w(n);
1365
+ function Fe(n) {
1366
+ return D(n);
1297
1367
  }
1298
- function Ne(n) {
1368
+ function Me(n) {
1299
1369
  try {
1300
- return { valid: !0, value: w(n), issues: [] };
1370
+ return { valid: !0, value: D(n), issues: [] };
1301
1371
  } catch (t) {
1302
- if (t instanceof A)
1372
+ if (t instanceof S)
1303
1373
  return { valid: !1, issues: t.issues };
1304
1374
  throw t;
1305
1375
  }
1306
1376
  }
1307
- function Oe(n) {
1377
+ function Pe(n) {
1308
1378
  try {
1309
- return { valid: !0, value: j(n), issues: [] };
1379
+ return { valid: !0, value: X(n), issues: [] };
1310
1380
  } catch (t) {
1311
- if (t instanceof A)
1381
+ if (t instanceof S)
1312
1382
  return { valid: !1, issues: t.issues };
1313
1383
  throw t;
1314
1384
  }
1315
1385
  }
1316
- function Re(n) {
1317
- return typeof n == "string" && D.has(n);
1386
+ function je(n) {
1387
+ return typeof n == "string" && M.has(n);
1318
1388
  }
1319
- function q(n) {
1320
- return typeof n == "string" && X.has(n);
1389
+ function J(n) {
1390
+ return typeof n == "string" && Q.has(n);
1321
1391
  }
1322
1392
  export {
1323
- H as BRIEFING_ARTIFACT_FORMATS,
1393
+ Z as BRIEFING_ARTIFACT_FORMATS,
1324
1394
  g as BRIEFING_CONTENT_LIMITS,
1325
- S as BRIEFING_KIND,
1395
+ w as BRIEFING_KIND,
1326
1396
  l as BRIEFING_TEXT_LIMITS,
1327
- A as BriefingContractError,
1328
- k as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
1329
- Le as MAX_BRIEFING_ATTACHMENTS,
1330
- Be as buildBriefingJobConfig,
1331
- ze as buildCreateBriefingRequest,
1332
- De as buildUpdateBriefingRequest,
1333
- Re as isBriefingArtifactFormat,
1334
- q as isBriefingDeliveryChannel,
1335
- pe as normalizeBriefingContentDocument,
1336
- w as normalizeBriefingDraft,
1337
- j as normalizeBriefingJobConfig,
1338
- we as validateBriefingContentDocument,
1339
- Ne as validateBriefingDraft,
1340
- Oe as validateBriefingJobConfig
1397
+ S as BriefingContractError,
1398
+ V as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
1399
+ De as MAX_BRIEFING_ATTACHMENTS,
1400
+ Oe as buildBriefingJobConfig,
1401
+ Re as buildCreateBriefingRequest,
1402
+ Fe as buildUpdateBriefingRequest,
1403
+ je as isBriefingArtifactFormat,
1404
+ J as isBriefingDeliveryChannel,
1405
+ ge as normalizeBriefingContentDocument,
1406
+ D as normalizeBriefingDraft,
1407
+ X as normalizeBriefingJobConfig,
1408
+ Ne as validateBriefingContentDocument,
1409
+ Me as validateBriefingDraft,
1410
+ Pe as validateBriefingJobConfig
1341
1411
  };