react-semaphor 0.1.544 → 0.1.545
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/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +50 -47
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-Bz4n1Lq6.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BNLkCDml.js → assistant-chat-D7sWTypJ.js} +308 -309
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-BTkrN3W4.js → comparison-window-caption-D4E6IHPD.js} +56 -55
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/{dashboard-g5a4DKWq.js → dashboard-B1tMju0u.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DQ_8O_e2.js → dashboard-briefing-launcher-CePgIu0Z.js} +771 -776
- package/dist/chunks/{dashboard-controls-8RyBTQUO.js → dashboard-controls-Cq05n3e0.js} +28 -28
- package/dist/chunks/{dashboard-json-7qT9jmfL.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-BfJwnRIZ.js → edit-dashboard-visual-JPtNfJRb.js} +5624 -5615
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-DkAyQvC6.js → index-DRWiuqyd.js} +378 -333
- package/dist/chunks/{matrix-formatter-CxJLkztA.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-DESvLiu9.js → numeric-presentation-7X_IrD58.js} +2571 -2572
- package/dist/chunks/{raw-temporal-presentation-CLiVi90c.js → raw-temporal-presentation-C3mUgnEx.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-Df7VpRVW.js → report-preferences-dialog-DUtuUL_5.js} +631 -603
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-B-mQ--nV.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-DDAxk8us.js → semaphor-ready-indicator-BxF96Yhv.js} +45764 -46519
- package/dist/chunks/{shelf-drop-preview-context-BSRPwaED.js → shelf-drop-preview-context-CNaM_Gmh.js} +885 -866
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-CPfGAQ9X.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BxzFviM-.js → use-create-flow-overlay-state-CjB7ig1o.js} +105 -105
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +556 -544
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +163 -152
- package/dist/index.js +351 -323
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +2 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/document-dashboard-inputs-BC6p-ESg.js +0 -8087
- package/dist/chunks/document-sheet-utils-Duo9uLoH.js +0 -3619
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (e, n, t) =>
|
|
4
|
-
import { r as ae, q as
|
|
5
|
-
import { a8 as J, l as
|
|
6
|
-
import { l as
|
|
1
|
+
var Fe = Object.defineProperty;
|
|
2
|
+
var Ne = (e, n, t) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var L = (e, n, t) => Ne(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { r as ae, q as se, j as Re } from "./temporal-bucket-D7NBrrtL.js";
|
|
5
|
+
import { a8 as J, l as Be, t as Me } from "./validators-DMHTpf7a.js";
|
|
6
|
+
import { l as Le, C as Ue } from "./export-file-format-C-tJsxsf.js";
|
|
7
7
|
import { z as y } from "zod";
|
|
8
|
-
import { F as
|
|
9
|
-
import { af as
|
|
8
|
+
import { F as Pe, q as Ve, o as ze, P as B } from "./pivot-result-lifecycle-DM4CyGKs.js";
|
|
9
|
+
import { af as je, ah as qe, V as Ke } from "./matrix-operation-contract-8OIO4gob.js";
|
|
10
10
|
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
11
11
|
import "../value-format-preferences/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
12
|
+
import { r as He } from "./rendered-file-D8xEuVVx.js";
|
|
13
|
+
import { aa as Ge, ab as We, ac as Xe, r as Ze, n as Ye } from "./numeric-presentation-7X_IrD58.js";
|
|
14
|
+
import { r as Je } from "./matrix-card-DjwWcCo8.js";
|
|
15
|
+
import { x as Qe } from "./table-settings-CLZocegs.js";
|
|
16
|
+
import { r as et, a as tt, b as nt, c as rt, d as ot } from "./raw-temporal-presentation-C3mUgnEx.js";
|
|
17
|
+
import "./index-CuHybtft.js";
|
|
18
|
+
import "./_commonjsHelpers-DimLPMtv.js";
|
|
19
|
+
import { f as at, r as it, b as ct, g as lt } from "./custom-visual-inputs-DLCD9Y5V.js";
|
|
20
|
+
const dt = /* @__PURE__ */ new Set([
|
|
18
21
|
"table",
|
|
19
22
|
"aggregateTable",
|
|
20
23
|
"pivotTable",
|
|
21
24
|
"detailTable"
|
|
22
|
-
]),
|
|
25
|
+
]), st = /* @__PURE__ */ new Set([
|
|
23
26
|
"bar",
|
|
24
27
|
"horizontalBar",
|
|
25
28
|
"line",
|
|
@@ -50,21 +53,21 @@ const it = /* @__PURE__ */ new Set([
|
|
|
50
53
|
"treemap",
|
|
51
54
|
"custom"
|
|
52
55
|
]);
|
|
53
|
-
function
|
|
56
|
+
function Xn(e) {
|
|
54
57
|
var o, a, i;
|
|
55
|
-
const n =
|
|
58
|
+
const n = st.has(e.type) && (e.type !== "custom" || !!((o = e.customCardPreferences) != null && o.url));
|
|
56
59
|
let t = !1;
|
|
57
60
|
try {
|
|
58
|
-
t = !!
|
|
61
|
+
t = !!Je(e);
|
|
59
62
|
} catch {
|
|
60
63
|
return { formats: [], defaultFormat: null };
|
|
61
64
|
}
|
|
62
|
-
return e.type === "text" || !n || !t &&
|
|
63
|
-
formats:
|
|
65
|
+
return e.type === "text" || !n || !t && Ge(e) ? { formats: [], defaultFormat: null } : {
|
|
66
|
+
formats: ut({
|
|
64
67
|
cardType: e.type,
|
|
65
68
|
allowDownload: (a = e.preferences) == null ? void 0 : a.allowDownload
|
|
66
69
|
}).filter((c) => c !== "xlsx" || e.type !== "matrixTable" || t),
|
|
67
|
-
defaultFormat:
|
|
70
|
+
defaultFormat: pt({
|
|
68
71
|
cardType: e.type,
|
|
69
72
|
allowDownload: (i = e.preferences) == null ? void 0 : i.allowDownload
|
|
70
73
|
})
|
|
@@ -73,21 +76,39 @@ function Vn(e) {
|
|
|
73
76
|
function Q(e) {
|
|
74
77
|
return e === "table" || e === "detailTable";
|
|
75
78
|
}
|
|
76
|
-
function
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
+
function mt(e) {
|
|
80
|
+
var t, r;
|
|
81
|
+
if (e.type !== "card")
|
|
82
|
+
return { kind: "rendered", format: e.format };
|
|
83
|
+
const n = !!((t = e.settings) != null && t.matrix);
|
|
84
|
+
switch (e.format) {
|
|
85
|
+
case "png":
|
|
86
|
+
return { kind: "rendered", format: "png" };
|
|
87
|
+
case "pdf":
|
|
88
|
+
return n ? { kind: "matrix_pdf" } : { kind: "rendered", format: "pdf" };
|
|
89
|
+
case "csv":
|
|
90
|
+
case "xlsx":
|
|
91
|
+
return n || Q((r = e.settings) == null ? void 0 : r.cardType) ? { kind: "export_job", format: e.format } : { kind: "rendered", format: "csv" };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function Zn(e) {
|
|
95
|
+
return mt(e).kind === "export_job";
|
|
79
96
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
97
|
+
function ft(e) {
|
|
98
|
+
const { label: n, extension: t, contentType: r } = e === "pdf" || e === "png" ? He(e) : Le(e);
|
|
99
|
+
return { label: n, extension: t, contentType: r };
|
|
82
100
|
}
|
|
83
|
-
function
|
|
84
|
-
return e === "pdf"
|
|
101
|
+
function ut(e) {
|
|
102
|
+
return e.allowDownload === !1 ? ["pdf", "png"] : e.cardType === "matrixTable" || Q(e.cardType) ? ["pdf", "png", "csv", "xlsx"] : ["pdf", "png", "csv"];
|
|
85
103
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
104
|
+
function Yn(e) {
|
|
105
|
+
return ft(e).label;
|
|
88
106
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
107
|
+
function pt(e) {
|
|
108
|
+
return dt.has(e.cardType) && e.allowDownload !== !1 ? "csv" : "pdf";
|
|
109
|
+
}
|
|
110
|
+
function Jn(e) {
|
|
111
|
+
const { config: n } = e, t = Pe({
|
|
91
112
|
spec: n.spec,
|
|
92
113
|
presentation: n.presentation,
|
|
93
114
|
defaults: n.defaultView,
|
|
@@ -107,7 +128,7 @@ function qn(e) {
|
|
|
107
128
|
}
|
|
108
129
|
});
|
|
109
130
|
}
|
|
110
|
-
const
|
|
131
|
+
const ht = y.object({
|
|
111
132
|
connection_id: y.string().min(1),
|
|
112
133
|
cardType: y.literal("matrixTable"),
|
|
113
134
|
resultOwner: y.literal("config"),
|
|
@@ -122,7 +143,7 @@ const st = y.object({
|
|
|
122
143
|
semanticDomainId: y.string().optional()
|
|
123
144
|
}).passthrough(),
|
|
124
145
|
active_filters: y.array(y.unknown()).default([])
|
|
125
|
-
}).passthrough(),
|
|
146
|
+
}).passthrough(), Qn = ht.extend({
|
|
126
147
|
dashboardId: y.string().min(1),
|
|
127
148
|
cardId: y.string().min(1),
|
|
128
149
|
formatOptions: y.object({
|
|
@@ -137,7 +158,7 @@ const st = y.object({
|
|
|
137
158
|
});
|
|
138
159
|
})
|
|
139
160
|
});
|
|
140
|
-
function
|
|
161
|
+
function er(e) {
|
|
141
162
|
return {
|
|
142
163
|
...e.controls,
|
|
143
164
|
type: "card",
|
|
@@ -165,25 +186,25 @@ function Hn(e) {
|
|
|
165
186
|
delimiter: e.delimiter,
|
|
166
187
|
includeHeaders: e.includeHeaders,
|
|
167
188
|
timezone: e.reportContext.calendar.tz,
|
|
168
|
-
presentationExecutionSnapshot:
|
|
189
|
+
presentationExecutionSnapshot: Ve({
|
|
169
190
|
reportContext: e.reportContext,
|
|
170
191
|
resolvedFormats: []
|
|
171
192
|
})
|
|
172
193
|
}
|
|
173
194
|
};
|
|
174
195
|
}
|
|
175
|
-
const K = y.number().int().nonnegative(),
|
|
196
|
+
const K = y.number().int().nonnegative(), tr = y.discriminatedUnion("status", [
|
|
176
197
|
y.object({
|
|
177
198
|
status: y.literal("ok"),
|
|
178
199
|
request: J,
|
|
179
|
-
layout:
|
|
180
|
-
rows: y.array(
|
|
200
|
+
layout: je,
|
|
201
|
+
rows: y.array(qe).readonly(),
|
|
181
202
|
usage: y.object({ rows: K, cells: K, bytes: K }).strict()
|
|
182
203
|
}).strict(),
|
|
183
204
|
y.object({
|
|
184
205
|
status: y.literal("failed"),
|
|
185
206
|
failure: y.object({
|
|
186
|
-
code: y.enum(
|
|
207
|
+
code: y.enum(Ke),
|
|
187
208
|
limit: y.enum(["rows", "bytes"]).optional(),
|
|
188
209
|
message: y.string().min(1),
|
|
189
210
|
retryable: y.boolean()
|
|
@@ -193,7 +214,7 @@ const K = y.number().int().nonnegative(), Gn = y.discriminatedUnion("status", [
|
|
|
193
214
|
function ie(e) {
|
|
194
215
|
return !e || typeof e != "object" ? !1 : Array.isArray(e.cards);
|
|
195
216
|
}
|
|
196
|
-
function
|
|
217
|
+
function yt(e) {
|
|
197
218
|
if (!e)
|
|
198
219
|
return null;
|
|
199
220
|
if (typeof e == "string")
|
|
@@ -205,14 +226,14 @@ function mt(e) {
|
|
|
205
226
|
}
|
|
206
227
|
return ie(e) ? e : null;
|
|
207
228
|
}
|
|
208
|
-
function
|
|
229
|
+
function me(e) {
|
|
209
230
|
var n;
|
|
210
231
|
return (n = e == null ? void 0 : e.cards) != null && n.length ? e.activeCardId && e.cards.find((t) => t.id === e.activeCardId) || e.cards[0] : null;
|
|
211
232
|
}
|
|
212
|
-
function
|
|
233
|
+
function nr(e) {
|
|
213
234
|
var t;
|
|
214
235
|
const n = (e == null ? void 0 : e.frameObject) ?? ((t = e == null ? void 0 : e.visual) == null ? void 0 : t.frameObject);
|
|
215
|
-
return
|
|
236
|
+
return me(yt(n));
|
|
216
237
|
}
|
|
217
238
|
class U extends Error {
|
|
218
239
|
constructor(t) {
|
|
@@ -225,7 +246,7 @@ class U extends Error {
|
|
|
225
246
|
this.name = "TemporalSnapshotSelectionError", this.selection = t;
|
|
226
247
|
}
|
|
227
248
|
}
|
|
228
|
-
function
|
|
249
|
+
function gt(e, n) {
|
|
229
250
|
var o;
|
|
230
251
|
const t = [], r = /* @__PURE__ */ new Map();
|
|
231
252
|
for (const a of n) {
|
|
@@ -239,9 +260,9 @@ function ft(e, n) {
|
|
|
239
260
|
let c = !a.cardId;
|
|
240
261
|
for (const l of i) {
|
|
241
262
|
const m = (((o = l.document) == null ? void 0 : o.sections) || []).flatMap(
|
|
242
|
-
(h) =>
|
|
263
|
+
(h) => Qe(h)
|
|
243
264
|
), s = (l.frames || []).flatMap(
|
|
244
|
-
(h) =>
|
|
265
|
+
(h) => bt(h, a.cardId)
|
|
245
266
|
);
|
|
246
267
|
s.length > 0 && (c = !0);
|
|
247
268
|
const u = [
|
|
@@ -267,29 +288,29 @@ function ft(e, n) {
|
|
|
267
288
|
}
|
|
268
289
|
return t;
|
|
269
290
|
}
|
|
270
|
-
function
|
|
291
|
+
function bt(e, n) {
|
|
271
292
|
var i;
|
|
272
|
-
const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) :
|
|
293
|
+
const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) : me(e);
|
|
273
294
|
if (!t) return [];
|
|
274
|
-
const r =
|
|
295
|
+
const r = at(e, t), o = (e.cards || []).filter(
|
|
275
296
|
(c) => {
|
|
276
297
|
var l;
|
|
277
298
|
return typeof ((l = c.customCardPreferences) == null ? void 0 : l.slotIndex) == "number";
|
|
278
299
|
}
|
|
279
|
-
).length > 1, a = r != null && (
|
|
280
|
-
return !r || !a ? [t] :
|
|
281
|
-
|
|
300
|
+
).length > 1, a = r != null && (it(r) === "multiple" || o);
|
|
301
|
+
return !r || !a ? [t] : ct(
|
|
302
|
+
lt({
|
|
282
303
|
frame: e,
|
|
283
304
|
configCard: r,
|
|
284
305
|
isMultiInputVisual: !0
|
|
285
306
|
})
|
|
286
307
|
).filter((c) => c !== null);
|
|
287
308
|
}
|
|
288
|
-
function
|
|
289
|
-
return
|
|
309
|
+
function rr(e) {
|
|
310
|
+
return gt(e.dashboard, e.selections).flatMap(
|
|
290
311
|
({ card: n, attachmentIndex: t }) => {
|
|
291
312
|
var s, u, h, g;
|
|
292
|
-
const r = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, n)) ?? n.config, o =
|
|
313
|
+
const r = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, n)) ?? n.config, o = We({
|
|
293
314
|
card: n,
|
|
294
315
|
cardConfig: r
|
|
295
316
|
}), a = {
|
|
@@ -303,7 +324,7 @@ function Xn(e) {
|
|
|
303
324
|
fieldId: E.id,
|
|
304
325
|
role: E.role
|
|
305
326
|
},
|
|
306
|
-
format:
|
|
327
|
+
format: Xe(
|
|
307
328
|
E,
|
|
308
329
|
{
|
|
309
330
|
dateStyle: e.valueFormatPreferences.dateStyle,
|
|
@@ -311,11 +332,11 @@ function Xn(e) {
|
|
|
311
332
|
},
|
|
312
333
|
e.valueFormatPreferences.locale
|
|
313
334
|
)
|
|
314
|
-
})) : [], c = [], l =
|
|
335
|
+
})) : [], c = [], l = Ze(n, r), m = Ye(
|
|
315
336
|
n.python || ""
|
|
316
337
|
);
|
|
317
338
|
if (n.type === "detailTable" && l === "config") {
|
|
318
|
-
const E = (r == null ? void 0 : r.detailColumns) || [],
|
|
339
|
+
const E = (r == null ? void 0 : r.detailColumns) || [], C = [
|
|
319
340
|
...((r == null ? void 0 : r.groupByColumns) || []).map(($) => ({
|
|
320
341
|
field: $,
|
|
321
342
|
role: "groupby"
|
|
@@ -333,21 +354,21 @@ function Xn(e) {
|
|
|
333
354
|
role: "detail"
|
|
334
355
|
}))
|
|
335
356
|
], _ = /* @__PURE__ */ new Map(), M = new Set(
|
|
336
|
-
|
|
337
|
-
({ field: $, role: T }) =>
|
|
357
|
+
C.map(
|
|
358
|
+
({ field: $, role: T }) => et($, T)
|
|
338
359
|
)
|
|
339
360
|
);
|
|
340
|
-
for (const { field: $ } of
|
|
361
|
+
for (const { field: $ } of C) {
|
|
341
362
|
const T = $.label;
|
|
342
363
|
T && _.set(T, (_.get(T) || 0) + 1);
|
|
343
364
|
}
|
|
344
365
|
for (const $ of E) {
|
|
345
|
-
const T =
|
|
366
|
+
const T = Be($.dataType);
|
|
346
367
|
if (T !== "date" && T !== "datetime") continue;
|
|
347
|
-
const
|
|
368
|
+
const Oe = tt($), q = $.label, oe = nt({
|
|
348
369
|
label: q,
|
|
349
370
|
labelCount: q && _.get(q) || 0,
|
|
350
|
-
rawKey:
|
|
371
|
+
rawKey: Oe,
|
|
351
372
|
rawKeys: M
|
|
352
373
|
});
|
|
353
374
|
if (!oe) throw new U(a);
|
|
@@ -355,19 +376,19 @@ function Xn(e) {
|
|
|
355
376
|
scope: a,
|
|
356
377
|
target: { kind: "column", columnKey: oe },
|
|
357
378
|
format: ae({
|
|
358
|
-
format:
|
|
379
|
+
format: rt($),
|
|
359
380
|
preferences: e.valueFormatPreferences,
|
|
360
381
|
calendar: e.calendar
|
|
361
382
|
})
|
|
362
383
|
});
|
|
363
384
|
}
|
|
364
385
|
} else if (l === "freeform" && ((u = n.sql) != null && u.trim()) && !m.trim())
|
|
365
|
-
for (const [E,
|
|
386
|
+
for (const [E, C] of Object.entries(
|
|
366
387
|
((g = (h = n.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : g.columnSettingsMap) || {}
|
|
367
388
|
)) {
|
|
368
|
-
if (
|
|
369
|
-
const _ =
|
|
370
|
-
|
|
389
|
+
if (C.type !== "date") continue;
|
|
390
|
+
const _ = ot(
|
|
391
|
+
C.dateFormat
|
|
371
392
|
);
|
|
372
393
|
_ && c.push({
|
|
373
394
|
scope: a,
|
|
@@ -383,11 +404,11 @@ function Xn(e) {
|
|
|
383
404
|
}
|
|
384
405
|
);
|
|
385
406
|
}
|
|
386
|
-
function
|
|
407
|
+
function It(e) {
|
|
387
408
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
388
409
|
}
|
|
389
410
|
function A(e, n, t) {
|
|
390
|
-
return
|
|
411
|
+
return It(e) ? e : (t.push({ field: n, message: "Expected an object." }), {});
|
|
391
412
|
}
|
|
392
413
|
function w(e, n, t, r) {
|
|
393
414
|
const o = new Set(t);
|
|
@@ -538,7 +559,7 @@ function ce(e, n, t) {
|
|
|
538
559
|
}
|
|
539
560
|
return o;
|
|
540
561
|
}
|
|
541
|
-
function
|
|
562
|
+
function vt(e, n) {
|
|
542
563
|
const t = "presentation.appearance", r = A(e, t, n);
|
|
543
564
|
w(r, t, ["version", "schemes"], n);
|
|
544
565
|
const o = {};
|
|
@@ -563,7 +584,7 @@ function ht(e, n) {
|
|
|
563
584
|
}
|
|
564
585
|
return o;
|
|
565
586
|
}
|
|
566
|
-
function
|
|
587
|
+
function Et(e, n) {
|
|
567
588
|
const t = "presentation.brandOverrides", r = A(e, t, n);
|
|
568
589
|
w(r, t, ["brandName", "logoUrl", "link"], n);
|
|
569
590
|
const o = F(
|
|
@@ -578,7 +599,7 @@ function yt(e, n) {
|
|
|
578
599
|
...i !== void 0 ? { link: i } : {}
|
|
579
600
|
};
|
|
580
601
|
}
|
|
581
|
-
function
|
|
602
|
+
function $t(e, n) {
|
|
582
603
|
const t = "presentation.fragments", r = A(e, t, n), o = [
|
|
583
604
|
"preHeaderText",
|
|
584
605
|
"headerBannerHtml",
|
|
@@ -600,9 +621,9 @@ function gt(e, n) {
|
|
|
600
621
|
c !== void 0 && (a[i] = c);
|
|
601
622
|
}), a;
|
|
602
623
|
}
|
|
603
|
-
function
|
|
624
|
+
function xt(e) {
|
|
604
625
|
const n = [], t = {};
|
|
605
|
-
if (e.appearance !== void 0 && (t.appearance =
|
|
626
|
+
if (e.appearance !== void 0 && (t.appearance = vt(e.appearance, n)), e.brandOverrides !== void 0 && (t.brandOverrides = Et(e.brandOverrides, n)), e.fragments !== void 0 && (t.fragments = $t(e.fragments, n)), e.viewUrl !== void 0) {
|
|
606
627
|
const r = ee(e.viewUrl, "presentation.viewUrl", n);
|
|
607
628
|
r !== void 0 && (t.viewUrl = r);
|
|
608
629
|
}
|
|
@@ -616,21 +637,21 @@ const P = [
|
|
|
616
637
|
"THU",
|
|
617
638
|
"FRI",
|
|
618
639
|
"SAT"
|
|
619
|
-
],
|
|
640
|
+
], fe = new Map(
|
|
620
641
|
P.map((e, n) => [e, n])
|
|
621
|
-
), z = [1, 2, 3, 4, 5],
|
|
642
|
+
), z = [1, 2, 3, 4, 5], ue = [1, 2, 3, 6, 12], pe = {
|
|
622
643
|
1: "first",
|
|
623
644
|
2: "second",
|
|
624
645
|
3: "third",
|
|
625
646
|
4: "fourth",
|
|
626
647
|
[-1]: "last"
|
|
627
|
-
},
|
|
648
|
+
}, or = {
|
|
628
649
|
frequency: "weekly",
|
|
629
650
|
hour: 9,
|
|
630
651
|
minute: 0,
|
|
631
652
|
weekdays: [1]
|
|
632
653
|
}, S = { ok: !1, issue: "Choose a supported schedule." };
|
|
633
|
-
function
|
|
654
|
+
function Ct(e) {
|
|
634
655
|
if (typeof e != "string" || e.length === 0 || e !== e.trim() || /^(?:(?:UTC|GMT)[+-]|[+-]\d{2}:\d{2}$)/.test(e))
|
|
635
656
|
return !1;
|
|
636
657
|
try {
|
|
@@ -639,17 +660,17 @@ function It(e) {
|
|
|
639
660
|
return !1;
|
|
640
661
|
}
|
|
641
662
|
}
|
|
642
|
-
function
|
|
663
|
+
function Tt(e) {
|
|
643
664
|
return Number.isInteger(e.minute) && e.minute >= 0 && e.minute <= 59 && Number.isInteger(e.hour) && e.hour >= 0 && e.hour <= 23;
|
|
644
665
|
}
|
|
645
|
-
function
|
|
666
|
+
function he(e) {
|
|
646
667
|
if (e.length === 0) return null;
|
|
647
668
|
const n = [...e].sort((t, r) => t - r);
|
|
648
669
|
return n.some(
|
|
649
670
|
(t, r) => !Number.isInteger(t) || t < 0 || t > 6 || r > 0 && t === n[r - 1]
|
|
650
671
|
) ? null : n;
|
|
651
672
|
}
|
|
652
|
-
function
|
|
673
|
+
function ye(e) {
|
|
653
674
|
const t = [...e.filter((o) => o !== "last")].sort((o, a) => o - a);
|
|
654
675
|
if (t.some(
|
|
655
676
|
(o, a) => !Number.isInteger(o) || o < 1 || o > 31 || a > 0 && o === t[a - 1]
|
|
@@ -664,51 +685,51 @@ function R(e, n) {
|
|
|
664
685
|
t.push((n + r * e) % 12);
|
|
665
686
|
return t.sort((r, o) => r - o);
|
|
666
687
|
}
|
|
667
|
-
function
|
|
688
|
+
function St(e, n) {
|
|
668
689
|
return e === 1 ? "*" : R(e, n).map((t) => t + 1).join(",");
|
|
669
690
|
}
|
|
670
|
-
function
|
|
671
|
-
return e.every((t) =>
|
|
691
|
+
function ge(e, n) {
|
|
692
|
+
return e.every((t) => Nt(t, n));
|
|
672
693
|
}
|
|
673
|
-
function
|
|
674
|
-
if (!
|
|
694
|
+
function ar(e) {
|
|
695
|
+
if (!Tt(e))
|
|
675
696
|
throw new Error("Choose a valid schedule time.");
|
|
676
697
|
const n = `${e.minute} ${e.hour}`;
|
|
677
698
|
switch (e.frequency) {
|
|
678
699
|
case "daily":
|
|
679
700
|
return e.weekdaysOnly ? `${n} * * ${z.map((t) => P[t]).join(",")}` : `${n} * * *`;
|
|
680
701
|
case "weekly": {
|
|
681
|
-
const t =
|
|
702
|
+
const t = he(e.weekdays);
|
|
682
703
|
if (!t) throw new Error("Choose at least one weekday.");
|
|
683
704
|
return `${n} * * ${t.map((r) => P[r]).join(",")}`;
|
|
684
705
|
}
|
|
685
706
|
case "monthly": {
|
|
686
|
-
if (!
|
|
707
|
+
if (!ue.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
|
|
687
708
|
throw new Error("Choose a valid month cycle.");
|
|
688
|
-
const t =
|
|
709
|
+
const t = St(e.interval, e.startMonth);
|
|
689
710
|
if (e.on.type === "days") {
|
|
690
|
-
const i =
|
|
711
|
+
const i = ye(e.on.days);
|
|
691
712
|
if (!i) throw new Error("Choose at least one day of the month.");
|
|
692
713
|
const c = R(e.interval, e.startMonth);
|
|
693
|
-
if (!
|
|
714
|
+
if (!ge(i, c))
|
|
694
715
|
throw new Error("Choose a day that occurs in the chosen months.");
|
|
695
716
|
const l = i.map((m) => m === "last" ? "L" : String(m)).join(",");
|
|
696
717
|
return `${n} ${l} ${t} *`;
|
|
697
718
|
}
|
|
698
719
|
const { ordinal: r, weekday: o } = e.on;
|
|
699
|
-
if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in
|
|
720
|
+
if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in pe))
|
|
700
721
|
throw new Error("Choose a valid weekday.");
|
|
701
722
|
const a = P[o];
|
|
702
723
|
return `${n} * ${t} ${r === -1 ? `${a}L` : `${a}#${r}`}`;
|
|
703
724
|
}
|
|
704
725
|
}
|
|
705
726
|
}
|
|
706
|
-
function
|
|
727
|
+
function kt(e) {
|
|
707
728
|
if (e === "*") return { interval: 1, startMonth: 0 };
|
|
708
729
|
const n = e.split(",");
|
|
709
730
|
if (n.some((i) => !/^([1-9]|1[0-2])$/.test(i))) return null;
|
|
710
731
|
const t = n.map((i) => Number(i) - 1), r = 12 / t.length;
|
|
711
|
-
if (!
|
|
732
|
+
if (!ue.includes(r))
|
|
712
733
|
return null;
|
|
713
734
|
const o = t[0], a = R(
|
|
714
735
|
r,
|
|
@@ -716,24 +737,24 @@ function $t(e) {
|
|
|
716
737
|
);
|
|
717
738
|
return o >= r || a.length !== t.length || a.some((i, c) => i !== t[c]) ? null : { interval: r, startMonth: o };
|
|
718
739
|
}
|
|
719
|
-
function
|
|
740
|
+
function At(e) {
|
|
720
741
|
const n = e.split(",");
|
|
721
742
|
if (n.some((o) => !/^(L|[1-9]|[12]\d|3[01])$/.test(o))) return null;
|
|
722
743
|
const t = n.map(
|
|
723
744
|
(o) => o === "L" ? "last" : Number(o)
|
|
724
|
-
), r =
|
|
745
|
+
), r = ye(t);
|
|
725
746
|
return !r || r.some((o, a) => o !== t[a]) ? null : r;
|
|
726
747
|
}
|
|
727
|
-
function
|
|
748
|
+
function wt(e) {
|
|
728
749
|
const n = /^([A-Z]{3})(?:#([1-4])|(L))$/.exec(e);
|
|
729
750
|
if (!n) return null;
|
|
730
|
-
const t =
|
|
751
|
+
const t = fe.get(n[1]);
|
|
731
752
|
return t === void 0 ? null : {
|
|
732
753
|
weekday: t,
|
|
733
754
|
ordinal: n[3] ? -1 : Number(n[2])
|
|
734
755
|
};
|
|
735
756
|
}
|
|
736
|
-
function
|
|
757
|
+
function be(e) {
|
|
737
758
|
if (typeof e != "string" || e.length === 0 || e !== e.trim() || e.includes(" "))
|
|
738
759
|
return S;
|
|
739
760
|
const n = e.split(" ");
|
|
@@ -749,10 +770,10 @@ function ge(e) {
|
|
|
749
770
|
value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !1 }
|
|
750
771
|
};
|
|
751
772
|
if (a === "*" && o === "*" && !i.includes("#") && !i.endsWith("L")) {
|
|
752
|
-
const u = i.split(",").map((E) =>
|
|
773
|
+
const u = i.split(",").map((E) => fe.get(E));
|
|
753
774
|
if (u.some((E) => E === void 0)) return S;
|
|
754
|
-
const h = u, g =
|
|
755
|
-
return !g || g.some((E,
|
|
775
|
+
const h = u, g = he(h);
|
|
776
|
+
return !g || g.some((E, C) => E !== h[C]) ? S : g.length === z.length && g.every((E, C) => E === z[C]) ? {
|
|
756
777
|
ok: !0,
|
|
757
778
|
value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !0 }
|
|
758
779
|
} : {
|
|
@@ -760,11 +781,11 @@ function ge(e) {
|
|
|
760
781
|
value: { frequency: "weekly", hour: l, minute: c, weekdays: g }
|
|
761
782
|
};
|
|
762
783
|
}
|
|
763
|
-
const m =
|
|
784
|
+
const m = kt(a);
|
|
764
785
|
if (!m) return S;
|
|
765
786
|
if (o !== "*" && i === "*") {
|
|
766
|
-
const s =
|
|
767
|
-
return !s || !
|
|
787
|
+
const s = At(o), u = R(m.interval, m.startMonth);
|
|
788
|
+
return !s || !ge(s, u) ? S : {
|
|
768
789
|
ok: !0,
|
|
769
790
|
value: {
|
|
770
791
|
frequency: "monthly",
|
|
@@ -776,7 +797,7 @@ function ge(e) {
|
|
|
776
797
|
};
|
|
777
798
|
}
|
|
778
799
|
if (o === "*" && i !== "*") {
|
|
779
|
-
const s =
|
|
800
|
+
const s = wt(i);
|
|
780
801
|
return s ? {
|
|
781
802
|
ok: !0,
|
|
782
803
|
value: {
|
|
@@ -790,14 +811,14 @@ function ge(e) {
|
|
|
790
811
|
}
|
|
791
812
|
return S;
|
|
792
813
|
}
|
|
793
|
-
function
|
|
814
|
+
function Dt(e, n, t) {
|
|
794
815
|
return new Intl.DateTimeFormat(t, {
|
|
795
816
|
hour: "numeric",
|
|
796
817
|
minute: "2-digit",
|
|
797
818
|
timeZone: "UTC"
|
|
798
819
|
}).format(new Date(Date.UTC(2020, 0, 1, e, n)));
|
|
799
820
|
}
|
|
800
|
-
function
|
|
821
|
+
function _t(e, n) {
|
|
801
822
|
var t;
|
|
802
823
|
if (e === "UTC") return "UTC";
|
|
803
824
|
try {
|
|
@@ -812,11 +833,11 @@ function St(e, n) {
|
|
|
812
833
|
function le(e) {
|
|
813
834
|
return e.length <= 1 ? e.join("") : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`;
|
|
814
835
|
}
|
|
815
|
-
function
|
|
836
|
+
function Ot(e) {
|
|
816
837
|
const n = e % 100;
|
|
817
838
|
return n >= 11 && n <= 13 ? `${e}th` : `${e}${["th", "st", "nd", "rd"][e % 10] ?? "th"}`;
|
|
818
839
|
}
|
|
819
|
-
function
|
|
840
|
+
function Ft(e, n, t) {
|
|
820
841
|
const r = (a, i) => new Intl.DateTimeFormat(t, { month: i, timeZone: "UTC" }).format(
|
|
821
842
|
new Date(Date.UTC(2020, a, 1))
|
|
822
843
|
);
|
|
@@ -825,13 +846,13 @@ function At(e, n, t) {
|
|
|
825
846
|
const o = R(e, n).map((a) => r(a, "short")).join(", ");
|
|
826
847
|
return e === 3 ? `each quarter (${o})` : `every ${e} months (${o})`;
|
|
827
848
|
}
|
|
828
|
-
function
|
|
829
|
-
const r =
|
|
849
|
+
function ir(e, n, t = "en-US") {
|
|
850
|
+
const r = be(e);
|
|
830
851
|
if (!r.ok) return null;
|
|
831
852
|
try {
|
|
832
|
-
const o = r.value, a =
|
|
853
|
+
const o = r.value, a = _t(n, t);
|
|
833
854
|
if (!a) return null;
|
|
834
|
-
const i = `at ${
|
|
855
|
+
const i = `at ${Dt(o.hour, o.minute, t)} ${a}`, c = (l) => new Intl.DateTimeFormat(t, {
|
|
835
856
|
weekday: "long",
|
|
836
857
|
timeZone: "UTC"
|
|
837
858
|
}).format(new Date(Date.UTC(2023, 0, 1 + l)));
|
|
@@ -841,11 +862,11 @@ function Jn(e, n, t = "en-US") {
|
|
|
841
862
|
case "weekly":
|
|
842
863
|
return `Every ${le(o.weekdays.map(c))} ${i}`;
|
|
843
864
|
case "monthly": {
|
|
844
|
-
const l =
|
|
865
|
+
const l = Ft(o.interval, o.startMonth, t);
|
|
845
866
|
if (o.on.type === "weekday")
|
|
846
|
-
return `On the ${
|
|
867
|
+
return `On the ${pe[o.on.ordinal]} ${c(o.on.weekday)} of ${l} ${i}`;
|
|
847
868
|
const m = o.on.days.map(
|
|
848
|
-
(s) => s === "last" ? "last day" :
|
|
869
|
+
(s) => s === "last" ? "last day" : Ot(s)
|
|
849
870
|
);
|
|
850
871
|
return `On the ${le(m)} of ${l} ${i}`;
|
|
851
872
|
}
|
|
@@ -854,23 +875,23 @@ function Jn(e, n, t = "en-US") {
|
|
|
854
875
|
return null;
|
|
855
876
|
}
|
|
856
877
|
}
|
|
857
|
-
const
|
|
858
|
-
function
|
|
859
|
-
return e === "last" || n.some((t) => e <=
|
|
878
|
+
const Ie = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
879
|
+
function Nt(e, n) {
|
|
880
|
+
return e === "last" || n.some((t) => e <= Ie[t]);
|
|
860
881
|
}
|
|
861
|
-
function
|
|
882
|
+
function cr(e) {
|
|
862
883
|
if (e.frequency !== "monthly" || e.on.type !== "days") return null;
|
|
863
884
|
const n = e.on.days.filter((o) => o !== "last");
|
|
864
885
|
if (n.length === 0) return null;
|
|
865
886
|
const t = Math.max(...n), r = R(e.interval, e.startMonth).filter(
|
|
866
|
-
(o) => t > (o === 1 ? 28 :
|
|
887
|
+
(o) => t > (o === 1 ? 28 : Ie[o])
|
|
867
888
|
);
|
|
868
889
|
return r.length > 0 ? { day: t, months: r } : null;
|
|
869
890
|
}
|
|
870
|
-
function
|
|
891
|
+
function Rt(e, n) {
|
|
871
892
|
return new Date(Date.UTC(e, n + 1, 0)).getUTCDate();
|
|
872
893
|
}
|
|
873
|
-
function
|
|
894
|
+
function Bt(e, n, t, r) {
|
|
874
895
|
const o = new Date(Date.UTC(n, t, r)).getUTCDay();
|
|
875
896
|
switch (e.frequency) {
|
|
876
897
|
case "daily":
|
|
@@ -880,16 +901,16 @@ function _t(e, n, t, r) {
|
|
|
880
901
|
case "monthly": {
|
|
881
902
|
if (!R(e.interval, e.startMonth).includes(t))
|
|
882
903
|
return !1;
|
|
883
|
-
const a =
|
|
904
|
+
const a = Rt(n, t);
|
|
884
905
|
return e.on.type === "days" ? e.on.days.some(
|
|
885
906
|
(i) => i === "last" ? r === a : i === r
|
|
886
907
|
) : o !== e.on.weekday ? !1 : e.on.ordinal === -1 ? r + 7 > a : Math.ceil(r / 7) === e.on.ordinal;
|
|
887
908
|
}
|
|
888
909
|
}
|
|
889
910
|
}
|
|
890
|
-
function
|
|
891
|
-
const o =
|
|
892
|
-
if (!o.ok || !
|
|
911
|
+
function lr(e, n, t, r) {
|
|
912
|
+
const o = be(e);
|
|
913
|
+
if (!o.ok || !Ct(n)) return [];
|
|
893
914
|
const a = o.value, i = new Intl.DateTimeFormat("en-US", {
|
|
894
915
|
timeZone: n,
|
|
895
916
|
hourCycle: "h23",
|
|
@@ -905,10 +926,10 @@ function er(e, n, t, r) {
|
|
|
905
926
|
c("hour") * 60 + c("minute") >= a.hour * 60 + a.minute && l.setUTCDate(l.getUTCDate() + 1);
|
|
906
927
|
const m = [];
|
|
907
928
|
for (let s = 0; s < 366 * 4 * (r + 1) && m.length < r; s += 1)
|
|
908
|
-
|
|
929
|
+
Bt(a, l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()) && m.push(l.toISOString().slice(0, 10)), l.setUTCDate(l.getUTCDate() + 1);
|
|
909
930
|
return m;
|
|
910
931
|
}
|
|
911
|
-
const
|
|
932
|
+
const Mt = Object.freeze([
|
|
912
933
|
"PDF_ROW_LIMIT_EXCEEDED",
|
|
913
934
|
"PDF_SIZE_LIMIT_EXCEEDED",
|
|
914
935
|
"TABLE_COMPLETENESS_UNVERIFIED",
|
|
@@ -921,15 +942,17 @@ const Ot = Object.freeze([
|
|
|
921
942
|
"EXCEL_LIMIT_EXCEEDED",
|
|
922
943
|
"EXPORT_ROW_LIMIT_EXCEEDED",
|
|
923
944
|
"EXPORT_COUNT_UNAVAILABLE",
|
|
924
|
-
"EXPORT_NO_ROWS"
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
945
|
+
"EXPORT_NO_ROWS",
|
|
946
|
+
// A dashboard sheet too tall for one image (PNG exports PN-D7).
|
|
947
|
+
"IMAGE_TOO_LARGE"
|
|
948
|
+
]), Lt = new Set(Mt);
|
|
949
|
+
function Ut(e) {
|
|
950
|
+
return typeof e == "string" && Lt.has(e);
|
|
928
951
|
}
|
|
929
|
-
function
|
|
952
|
+
function Pt(e) {
|
|
930
953
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
931
954
|
const n = e;
|
|
932
|
-
return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" ||
|
|
955
|
+
return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" || !ve.includes(n.format) || !Ut(n.code) || typeof n.reason != "string" || typeof n.diagnostic != "string" ? null : {
|
|
933
956
|
index: n.index,
|
|
934
957
|
title: n.title,
|
|
935
958
|
format: n.format,
|
|
@@ -938,39 +961,39 @@ function Rt(e) {
|
|
|
938
961
|
diagnostic: n.diagnostic
|
|
939
962
|
};
|
|
940
963
|
}
|
|
941
|
-
function
|
|
964
|
+
function dr(e) {
|
|
942
965
|
if (!e || typeof e != "object" || Array.isArray(e)) return [];
|
|
943
966
|
const n = e.omittedAttachments;
|
|
944
967
|
return Array.isArray(n) ? n.flatMap((t) => {
|
|
945
|
-
const r =
|
|
968
|
+
const r = Pt(t);
|
|
946
969
|
return r ? [r] : [];
|
|
947
970
|
}) : [];
|
|
948
971
|
}
|
|
949
|
-
function
|
|
972
|
+
function sr(e) {
|
|
950
973
|
return e != null && e.role ? e.type === "tenant" ? e.role === "POWER_USER" : ["AUTHOR", "ADMIN", "SUPER_ADMIN"].includes(e.role) : !1;
|
|
951
974
|
}
|
|
952
|
-
function
|
|
975
|
+
function mr(e) {
|
|
953
976
|
return e.canCreate ? [
|
|
954
977
|
...e.scheduledReportAvailable ? ["scheduled_report"] : [],
|
|
955
978
|
...e.analyticalBriefingsEnabled ? ["analytical_briefing"] : []
|
|
956
979
|
] : [];
|
|
957
980
|
}
|
|
958
|
-
function
|
|
981
|
+
function Vt(e) {
|
|
959
982
|
const n = (e == null ? void 0 : e.channels) ?? [];
|
|
960
983
|
return n.length === 1 && n[0] === "EMAIL";
|
|
961
984
|
}
|
|
962
|
-
function
|
|
963
|
-
return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 &&
|
|
985
|
+
function zt(e) {
|
|
986
|
+
return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && Vt(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
|
|
964
987
|
}
|
|
965
|
-
function
|
|
966
|
-
const n =
|
|
988
|
+
function fr(e) {
|
|
989
|
+
const n = zt(e), t = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
|
|
967
990
|
return {
|
|
968
991
|
typeLabel: n,
|
|
969
992
|
noun: t,
|
|
970
993
|
pluralNoun: t === "report" ? "reports" : "briefings"
|
|
971
994
|
};
|
|
972
995
|
}
|
|
973
|
-
const Z = "BRIEFING",
|
|
996
|
+
const Z = "BRIEFING", jt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
|
|
974
997
|
name: 500,
|
|
975
998
|
description: 2e3,
|
|
976
999
|
instruction: 5e4,
|
|
@@ -986,7 +1009,7 @@ const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
|
|
|
986
1009
|
presentationTone: 500,
|
|
987
1010
|
presentationFormat: 2e3,
|
|
988
1011
|
id: 500
|
|
989
|
-
},
|
|
1012
|
+
}, x = {
|
|
990
1013
|
maxBlocks: 50,
|
|
991
1014
|
maxTableRows: 100,
|
|
992
1015
|
maxTableColumns: 20,
|
|
@@ -999,7 +1022,7 @@ const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
|
|
|
999
1022
|
// tiny tiles in narrow client panels; 2-up was the chosen layout).
|
|
1000
1023
|
maxKpiTiles: 8
|
|
1001
1024
|
};
|
|
1002
|
-
function
|
|
1025
|
+
function qt(e) {
|
|
1003
1026
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
1004
1027
|
return !1;
|
|
1005
1028
|
const n = e;
|
|
@@ -1009,17 +1032,17 @@ function Ut(e) {
|
|
|
1009
1032
|
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
1010
1033
|
return !1;
|
|
1011
1034
|
const r = t;
|
|
1012
|
-
return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) &&
|
|
1035
|
+
return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) && se(n.format).ok;
|
|
1013
1036
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return e == null ? "" :
|
|
1037
|
+
function Kt(e) {
|
|
1038
|
+
return e == null ? "" : qt(e) ? Re(e.value, e.format) : String(e);
|
|
1016
1039
|
}
|
|
1017
|
-
function
|
|
1040
|
+
function ur(e) {
|
|
1018
1041
|
return [e.delta, e.percentChange].filter(
|
|
1019
1042
|
(n) => n != null
|
|
1020
|
-
).map(
|
|
1043
|
+
).map(Kt).filter(Boolean).join(" / ");
|
|
1021
1044
|
}
|
|
1022
|
-
const
|
|
1045
|
+
const ve = ["pdf", "png", "csv", "xlsx"], Ee = new Set(jt), Ht = /* @__PURE__ */ new Set([
|
|
1023
1046
|
"EMAIL",
|
|
1024
1047
|
"WEBHOOK",
|
|
1025
1048
|
"SLACK",
|
|
@@ -1030,39 +1053,39 @@ const Ie = new Set(Lt), Vt = /* @__PURE__ */ new Set([
|
|
|
1030
1053
|
maxPlanningIterations: { min: 1, max: 10 },
|
|
1031
1054
|
maxRows: { min: 1, max: 1e5 },
|
|
1032
1055
|
timeoutMs: { min: 1e3, max: 30 * 6e4 }
|
|
1033
|
-
},
|
|
1056
|
+
}, Gt = /* @__PURE__ */ new Set([
|
|
1034
1057
|
"letter",
|
|
1035
1058
|
"legal",
|
|
1036
1059
|
"a4",
|
|
1037
1060
|
"a3",
|
|
1038
1061
|
"tabloid"
|
|
1039
|
-
]),
|
|
1062
|
+
]), Wt = /* @__PURE__ */ new Set([
|
|
1040
1063
|
"portrait",
|
|
1041
1064
|
"landscape"
|
|
1042
|
-
]),
|
|
1065
|
+
]), Xt = /* @__PURE__ */ new Set([",", ";", " "]), Zt = new Set(Ue), Yt = /* @__PURE__ */ new Set([
|
|
1043
1066
|
"current",
|
|
1044
1067
|
"all"
|
|
1045
|
-
]),
|
|
1068
|
+
]), Jt = /* @__PURE__ */ new Set([
|
|
1046
1069
|
"concise",
|
|
1047
1070
|
"balanced",
|
|
1048
1071
|
"detailed"
|
|
1049
|
-
]),
|
|
1072
|
+
]), Qt = /* @__PURE__ */ new Set([
|
|
1050
1073
|
"info",
|
|
1051
1074
|
"positive",
|
|
1052
1075
|
"warning",
|
|
1053
1076
|
"critical"
|
|
1054
|
-
]),
|
|
1077
|
+
]), en = /* @__PURE__ */ new Set([
|
|
1055
1078
|
"text",
|
|
1056
1079
|
"number",
|
|
1057
1080
|
"currency",
|
|
1058
1081
|
"percent",
|
|
1059
1082
|
"date",
|
|
1060
1083
|
"boolean"
|
|
1061
|
-
]),
|
|
1084
|
+
]), tn = /* @__PURE__ */ new Set([
|
|
1062
1085
|
"left",
|
|
1063
1086
|
"center",
|
|
1064
1087
|
"right"
|
|
1065
|
-
]),
|
|
1088
|
+
]), nn = [
|
|
1066
1089
|
"matrix",
|
|
1067
1090
|
"pageSize",
|
|
1068
1091
|
"orientation",
|
|
@@ -1100,14 +1123,14 @@ class j extends Error {
|
|
|
1100
1123
|
this.name = "BriefingContractError", this.issues = t;
|
|
1101
1124
|
}
|
|
1102
1125
|
}
|
|
1103
|
-
function
|
|
1126
|
+
function $e(e) {
|
|
1104
1127
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1105
1128
|
}
|
|
1106
1129
|
function d(e, n, t) {
|
|
1107
1130
|
e.push({ field: n, message: t });
|
|
1108
1131
|
}
|
|
1109
1132
|
function v(e, n, t) {
|
|
1110
|
-
return
|
|
1133
|
+
return $e(e) ? e : (d(t, n, "Expected an object."), {});
|
|
1111
1134
|
}
|
|
1112
1135
|
function p(e, n, t, r) {
|
|
1113
1136
|
const o = new Set(t);
|
|
@@ -1136,13 +1159,13 @@ function I(e, n, t, r) {
|
|
|
1136
1159
|
if (o)
|
|
1137
1160
|
return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
|
|
1138
1161
|
}
|
|
1139
|
-
function
|
|
1162
|
+
function rn(e, n, t, r) {
|
|
1140
1163
|
if (typeof e != "string")
|
|
1141
1164
|
return d(r, n, "Expected a string."), "";
|
|
1142
1165
|
const o = e.trim();
|
|
1143
1166
|
return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
|
|
1144
1167
|
}
|
|
1145
|
-
function
|
|
1168
|
+
function on(e, n, t) {
|
|
1146
1169
|
if (e != null) {
|
|
1147
1170
|
if (!Number.isInteger(e) || Number(e) < 0) {
|
|
1148
1171
|
d(t, n, "Expected a non-negative integer.");
|
|
@@ -1170,13 +1193,13 @@ function k(e, n, t, r = {}) {
|
|
|
1170
1193
|
function N(e, n, t, r) {
|
|
1171
1194
|
return e == null ? n : typeof e != "boolean" ? (d(r, t, "Expected a boolean."), n) : e;
|
|
1172
1195
|
}
|
|
1173
|
-
function
|
|
1196
|
+
function an(e, n) {
|
|
1174
1197
|
return e == null ? "ACTIVE" : e === "ACTIVE" || e === "PAUSED" || e === "DISABLED" ? e : (d(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
|
|
1175
1198
|
}
|
|
1176
|
-
function
|
|
1199
|
+
function cn(e) {
|
|
1177
1200
|
return e.includes("@") && e.includes(".") && !e.includes(" ");
|
|
1178
1201
|
}
|
|
1179
|
-
function
|
|
1202
|
+
function xe(e, n) {
|
|
1180
1203
|
if (e == null)
|
|
1181
1204
|
return { type: "project" };
|
|
1182
1205
|
const t = v(e, "source", n), r = t.type;
|
|
@@ -1190,7 +1213,7 @@ function Ee(e, n) {
|
|
|
1190
1213
|
)
|
|
1191
1214
|
}) : (d(n, "source.type", "Expected project or dashboard."), { type: "project" });
|
|
1192
1215
|
}
|
|
1193
|
-
function
|
|
1216
|
+
function Ce(e, n) {
|
|
1194
1217
|
const t = v(e, "body", n), r = t.type;
|
|
1195
1218
|
return r === "generated_analysis" ? (p(t, "body", ["type", "instruction"], n), {
|
|
1196
1219
|
type: "generated_analysis",
|
|
@@ -1202,7 +1225,7 @@ function $e(e, n) {
|
|
|
1202
1225
|
)
|
|
1203
1226
|
}) : r === "custom_message" ? (p(t, "body", ["type", "message"], n), {
|
|
1204
1227
|
type: "custom_message",
|
|
1205
|
-
message:
|
|
1228
|
+
message: rn(
|
|
1206
1229
|
t.message,
|
|
1207
1230
|
"body.message",
|
|
1208
1231
|
f.customMessage,
|
|
@@ -1214,7 +1237,7 @@ function $e(e, n) {
|
|
|
1214
1237
|
"Expected generated_analysis, custom_message, or none."
|
|
1215
1238
|
), { type: "none" });
|
|
1216
1239
|
}
|
|
1217
|
-
function
|
|
1240
|
+
function ln(e, n) {
|
|
1218
1241
|
if (e == null)
|
|
1219
1242
|
return [...Y];
|
|
1220
1243
|
if (!Array.isArray(e))
|
|
@@ -1227,7 +1250,7 @@ function nn(e, n) {
|
|
|
1227
1250
|
), [];
|
|
1228
1251
|
const t = [];
|
|
1229
1252
|
return e.forEach((r, o) => {
|
|
1230
|
-
if (typeof r != "string" || !
|
|
1253
|
+
if (typeof r != "string" || !Ee.has(r)) {
|
|
1231
1254
|
d(
|
|
1232
1255
|
n,
|
|
1233
1256
|
`presentation.artifactFormats.${o}`,
|
|
@@ -1238,7 +1261,7 @@ function nn(e, n) {
|
|
|
1238
1261
|
t.includes(r) || t.push(r);
|
|
1239
1262
|
}), t;
|
|
1240
1263
|
}
|
|
1241
|
-
function
|
|
1264
|
+
function Te(e, n) {
|
|
1242
1265
|
if (e == null)
|
|
1243
1266
|
return {
|
|
1244
1267
|
artifactFormats: [...Y],
|
|
@@ -1264,7 +1287,7 @@ function Ce(e, n) {
|
|
|
1264
1287
|
n
|
|
1265
1288
|
);
|
|
1266
1289
|
const r = {
|
|
1267
|
-
artifactFormats:
|
|
1290
|
+
artifactFormats: ln(t.artifactFormats, n),
|
|
1268
1291
|
includeEvidence: N(
|
|
1269
1292
|
t.includeEvidence,
|
|
1270
1293
|
!0,
|
|
@@ -1294,15 +1317,15 @@ function Ce(e, n) {
|
|
|
1294
1317
|
n
|
|
1295
1318
|
);
|
|
1296
1319
|
o && (r.audience = o), a && (r.tone = a), i && (r.format = i);
|
|
1297
|
-
const c =
|
|
1320
|
+
const c = xt(t);
|
|
1298
1321
|
return c.issues.forEach((l) => d(n, l.field, l.message)), Object.assign(r, c.value), r;
|
|
1299
1322
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length >
|
|
1323
|
+
function dn(e, n, t) {
|
|
1324
|
+
return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length > x.maxListItems && d(
|
|
1302
1325
|
t,
|
|
1303
1326
|
n,
|
|
1304
|
-
`Must have ${
|
|
1305
|
-
), e.slice(0,
|
|
1327
|
+
`Must have ${x.maxListItems} items or fewer.`
|
|
1328
|
+
), e.slice(0, x.maxListItems).map(
|
|
1306
1329
|
(r, o) => b(
|
|
1307
1330
|
r,
|
|
1308
1331
|
`${n}.${o}`,
|
|
@@ -1311,7 +1334,7 @@ function rn(e, n, t) {
|
|
|
1311
1334
|
)
|
|
1312
1335
|
).filter(Boolean)) : (d(t, n, "Expected an array."), []);
|
|
1313
1336
|
}
|
|
1314
|
-
function
|
|
1337
|
+
function sn(e, n, t) {
|
|
1315
1338
|
const r = v(e, n, t);
|
|
1316
1339
|
if (r.kind === "metric")
|
|
1317
1340
|
return p(r, n, ["kind", "metricId"], t), {
|
|
@@ -1349,18 +1372,18 @@ function on(e, n, t) {
|
|
|
1349
1372
|
"Expected metric, column, or matrix_measure."
|
|
1350
1373
|
);
|
|
1351
1374
|
}
|
|
1352
|
-
function
|
|
1375
|
+
function Se(e, n, t) {
|
|
1353
1376
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
1354
1377
|
return;
|
|
1355
1378
|
const r = v(e, n, t);
|
|
1356
1379
|
if (!Object.prototype.hasOwnProperty.call(r, "target") && !Object.prototype.hasOwnProperty.call(r, "format"))
|
|
1357
1380
|
return;
|
|
1358
1381
|
p(r, n, ["value", "target", "format"], t), (typeof r.value != "number" || !Number.isFinite(r.value)) && d(t, `${n}.value`, "Expected a finite number.");
|
|
1359
|
-
const o =
|
|
1382
|
+
const o = sn(
|
|
1360
1383
|
r.target,
|
|
1361
1384
|
`${n}.target`,
|
|
1362
1385
|
t
|
|
1363
|
-
), a =
|
|
1386
|
+
), a = se(r.format);
|
|
1364
1387
|
if (a.ok || a.issues.forEach(
|
|
1365
1388
|
(i) => d(
|
|
1366
1389
|
t,
|
|
@@ -1380,7 +1403,7 @@ function O(e, n, t) {
|
|
|
1380
1403
|
}
|
|
1381
1404
|
return e;
|
|
1382
1405
|
}
|
|
1383
|
-
const r =
|
|
1406
|
+
const r = Se(e, n, t);
|
|
1384
1407
|
if (r) return r;
|
|
1385
1408
|
d(
|
|
1386
1409
|
t,
|
|
@@ -1388,30 +1411,30 @@ function O(e, n, t) {
|
|
|
1388
1411
|
"Expected a string, number, or structured numeric value."
|
|
1389
1412
|
);
|
|
1390
1413
|
}
|
|
1391
|
-
function
|
|
1414
|
+
function mn(e, n, t) {
|
|
1392
1415
|
if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
1393
1416
|
return typeof e == "string" && e.length > f.contentCell ? (d(
|
|
1394
1417
|
t,
|
|
1395
1418
|
n,
|
|
1396
1419
|
`Must be ${f.contentCell} characters or fewer.`
|
|
1397
1420
|
), e.slice(0, f.contentCell)) : typeof e == "number" && !Number.isFinite(e) ? (d(t, n, "Expected a finite number."), null) : e;
|
|
1398
|
-
const r =
|
|
1421
|
+
const r = Se(e, n, t);
|
|
1399
1422
|
return r || (d(
|
|
1400
1423
|
t,
|
|
1401
1424
|
n,
|
|
1402
1425
|
"Expected a string, number, boolean, structured numeric value, or null."
|
|
1403
1426
|
), null);
|
|
1404
1427
|
}
|
|
1405
|
-
function
|
|
1428
|
+
function fn(e, n, t) {
|
|
1406
1429
|
if (!Array.isArray(e))
|
|
1407
1430
|
return d(t, n, "Expected an array."), [];
|
|
1408
|
-
e.length === 0 && d(t, n, "Expected at least one column."), e.length >
|
|
1431
|
+
e.length === 0 && d(t, n, "Expected at least one column."), e.length > x.maxTableColumns && d(
|
|
1409
1432
|
t,
|
|
1410
1433
|
n,
|
|
1411
|
-
`Must have ${
|
|
1434
|
+
`Must have ${x.maxTableColumns} columns or fewer.`
|
|
1412
1435
|
);
|
|
1413
1436
|
const r = /* @__PURE__ */ new Set();
|
|
1414
|
-
return e.slice(0,
|
|
1437
|
+
return e.slice(0, x.maxTableColumns).map((o, a) => {
|
|
1415
1438
|
const i = `${n}.${a}`, c = v(o, i, t);
|
|
1416
1439
|
p(c, i, ["key", "label", "kind", "align"], t);
|
|
1417
1440
|
const l = b(
|
|
@@ -1429,13 +1452,13 @@ function cn(e, n, t) {
|
|
|
1429
1452
|
), s = D(
|
|
1430
1453
|
c.kind,
|
|
1431
1454
|
`${i}.kind`,
|
|
1432
|
-
|
|
1455
|
+
en,
|
|
1433
1456
|
"text, number, currency, percent, date, or boolean",
|
|
1434
1457
|
t
|
|
1435
1458
|
), u = D(
|
|
1436
1459
|
c.align,
|
|
1437
1460
|
`${i}.align`,
|
|
1438
|
-
|
|
1461
|
+
tn,
|
|
1439
1462
|
"left, center, or right",
|
|
1440
1463
|
t
|
|
1441
1464
|
);
|
|
@@ -1447,28 +1470,28 @@ function cn(e, n, t) {
|
|
|
1447
1470
|
};
|
|
1448
1471
|
});
|
|
1449
1472
|
}
|
|
1450
|
-
function
|
|
1473
|
+
function un(e, n, t, r) {
|
|
1451
1474
|
if (!Array.isArray(e))
|
|
1452
1475
|
return d(r, n, "Expected an array."), [];
|
|
1453
|
-
e.length >
|
|
1476
|
+
e.length > x.maxTableRows && d(
|
|
1454
1477
|
r,
|
|
1455
1478
|
n,
|
|
1456
|
-
`Must have ${
|
|
1479
|
+
`Must have ${x.maxTableRows} rows or fewer.`
|
|
1457
1480
|
);
|
|
1458
1481
|
const o = new Set(t.map((a) => a.key).filter(Boolean));
|
|
1459
|
-
return e.slice(0,
|
|
1482
|
+
return e.slice(0, x.maxTableRows).map((a, i) => {
|
|
1460
1483
|
const c = `${n}.${i}`, l = v(a, c, r);
|
|
1461
1484
|
return Object.keys(l).forEach((m) => {
|
|
1462
1485
|
o.has(m) || d(r, `${c}.${m}`, `Unexpected table cell "${m}".`);
|
|
1463
1486
|
}), Object.fromEntries(
|
|
1464
1487
|
t.map((m) => [
|
|
1465
1488
|
m.key,
|
|
1466
|
-
|
|
1489
|
+
mn(l[m.key] ?? null, `${c}.${m.key}`, r)
|
|
1467
1490
|
])
|
|
1468
1491
|
);
|
|
1469
1492
|
});
|
|
1470
1493
|
}
|
|
1471
|
-
function
|
|
1494
|
+
function pn(e, n, t) {
|
|
1472
1495
|
const r = `content.blocks.${n}`, o = v(e, r, t), a = o.type;
|
|
1473
1496
|
if (a === "heading") {
|
|
1474
1497
|
p(o, r, ["type", "text", "level", "evidenceIds"], t);
|
|
@@ -1511,7 +1534,7 @@ function dn(e, n, t) {
|
|
|
1511
1534
|
), c = D(
|
|
1512
1535
|
o.severity,
|
|
1513
1536
|
`${r}.severity`,
|
|
1514
|
-
|
|
1537
|
+
Qt,
|
|
1515
1538
|
"info, positive, warning, or critical",
|
|
1516
1539
|
t
|
|
1517
1540
|
);
|
|
@@ -1541,7 +1564,7 @@ function dn(e, n, t) {
|
|
|
1541
1564
|
return {
|
|
1542
1565
|
type: a,
|
|
1543
1566
|
...i ? { title: i } : {},
|
|
1544
|
-
items:
|
|
1567
|
+
items: dn(o.items, `${r}.items`, t),
|
|
1545
1568
|
...c ? { evidenceIds: c } : {}
|
|
1546
1569
|
};
|
|
1547
1570
|
}
|
|
@@ -1609,12 +1632,12 @@ function dn(e, n, t) {
|
|
|
1609
1632
|
f.contentTitle,
|
|
1610
1633
|
t
|
|
1611
1634
|
), c = Array.isArray(o.tiles) ? o.tiles : [];
|
|
1612
|
-
Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length >
|
|
1635
|
+
Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length > x.maxKpiTiles && d(
|
|
1613
1636
|
t,
|
|
1614
1637
|
`${r}.tiles`,
|
|
1615
|
-
`Must have ${
|
|
1638
|
+
`Must have ${x.maxKpiTiles} tiles or fewer.`
|
|
1616
1639
|
);
|
|
1617
|
-
const l = c.slice(0,
|
|
1640
|
+
const l = c.slice(0, x.maxKpiTiles).map((s, u) => {
|
|
1618
1641
|
const h = `${r}.tiles.${u}`, g = v(s, h, t);
|
|
1619
1642
|
p(
|
|
1620
1643
|
g,
|
|
@@ -1640,7 +1663,7 @@ function dn(e, n, t) {
|
|
|
1640
1663
|
`${h}.value`,
|
|
1641
1664
|
"Expected a non-empty string, number, or structured numeric value."
|
|
1642
1665
|
);
|
|
1643
|
-
const
|
|
1666
|
+
const C = g.previousValue === void 0 || g.previousValue === null ? g.previousValue : O(
|
|
1644
1667
|
g.previousValue,
|
|
1645
1668
|
`${h}.previousValue`,
|
|
1646
1669
|
t
|
|
@@ -1670,7 +1693,7 @@ function dn(e, n, t) {
|
|
|
1670
1693
|
t
|
|
1671
1694
|
),
|
|
1672
1695
|
value: E,
|
|
1673
|
-
...
|
|
1696
|
+
...C !== void 0 ? { previousValue: C } : {},
|
|
1674
1697
|
..._ !== void 0 ? { delta: _ } : {},
|
|
1675
1698
|
...M !== void 0 ? { percentChange: M } : {},
|
|
1676
1699
|
...$ ? { unit: $ } : {},
|
|
@@ -1718,7 +1741,7 @@ function dn(e, n, t) {
|
|
|
1718
1741
|
["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
|
|
1719
1742
|
t
|
|
1720
1743
|
);
|
|
1721
|
-
const i =
|
|
1744
|
+
const i = fn(o.columns, `${r}.columns`, t), c = I(
|
|
1722
1745
|
o.title,
|
|
1723
1746
|
`${r}.title`,
|
|
1724
1747
|
f.contentTitle,
|
|
@@ -1733,7 +1756,7 @@ function dn(e, n, t) {
|
|
|
1733
1756
|
`${r}.caption`,
|
|
1734
1757
|
f.contentItem,
|
|
1735
1758
|
t
|
|
1736
|
-
), s =
|
|
1759
|
+
), s = on(
|
|
1737
1760
|
o.totalRows,
|
|
1738
1761
|
`${r}.totalRows`,
|
|
1739
1762
|
t
|
|
@@ -1743,7 +1766,7 @@ function dn(e, n, t) {
|
|
|
1743
1766
|
...l ? { id: l } : {},
|
|
1744
1767
|
...c ? { title: c } : {},
|
|
1745
1768
|
columns: i,
|
|
1746
|
-
rows:
|
|
1769
|
+
rows: un(o.rows, `${r}.rows`, i, t),
|
|
1747
1770
|
...m ? { caption: m } : {},
|
|
1748
1771
|
...s !== void 0 ? { totalRows: s } : {},
|
|
1749
1772
|
...u ? { evidenceIds: u } : {}
|
|
@@ -1794,7 +1817,7 @@ function dn(e, n, t) {
|
|
|
1794
1817
|
text: ""
|
|
1795
1818
|
};
|
|
1796
1819
|
}
|
|
1797
|
-
function
|
|
1820
|
+
function hn(e) {
|
|
1798
1821
|
const n = [], t = v(e, "content", n);
|
|
1799
1822
|
p(t, "content", ["version", "title", "summary", "blocks"], n), t.version !== 1 && d(n, "content.version", "Expected version 1.");
|
|
1800
1823
|
const r = I(
|
|
@@ -1810,12 +1833,12 @@ function sn(e) {
|
|
|
1810
1833
|
);
|
|
1811
1834
|
Array.isArray(t.blocks) || d(n, "content.blocks", "Expected an array.");
|
|
1812
1835
|
const a = Array.isArray(t.blocks) ? t.blocks : [];
|
|
1813
|
-
a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length >
|
|
1836
|
+
a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length > x.maxBlocks && d(
|
|
1814
1837
|
n,
|
|
1815
1838
|
"content.blocks",
|
|
1816
|
-
`Must have ${
|
|
1839
|
+
`Must have ${x.maxBlocks} blocks or fewer.`
|
|
1817
1840
|
);
|
|
1818
|
-
const i = a.slice(0,
|
|
1841
|
+
const i = a.slice(0, x.maxBlocks).map((c, l) => pn(c, l, n));
|
|
1819
1842
|
return te(n), {
|
|
1820
1843
|
version: 1,
|
|
1821
1844
|
...r ? { title: r } : {},
|
|
@@ -1823,11 +1846,11 @@ function sn(e) {
|
|
|
1823
1846
|
blocks: i
|
|
1824
1847
|
};
|
|
1825
1848
|
}
|
|
1826
|
-
function
|
|
1849
|
+
function pr(e) {
|
|
1827
1850
|
try {
|
|
1828
1851
|
return {
|
|
1829
1852
|
valid: !0,
|
|
1830
|
-
value:
|
|
1853
|
+
value: hn(e),
|
|
1831
1854
|
issues: []
|
|
1832
1855
|
};
|
|
1833
1856
|
} catch (n) {
|
|
@@ -1846,7 +1869,7 @@ function D(e, n, t, r, o) {
|
|
|
1846
1869
|
d(o, n, `Expected ${r}.`);
|
|
1847
1870
|
}
|
|
1848
1871
|
}
|
|
1849
|
-
function
|
|
1872
|
+
function yn(e, n, t) {
|
|
1850
1873
|
if (e != null) {
|
|
1851
1874
|
if (!Array.isArray(e)) {
|
|
1852
1875
|
d(t, n, "Expected an array.");
|
|
@@ -1855,25 +1878,25 @@ function mn(e, n, t) {
|
|
|
1855
1878
|
return e;
|
|
1856
1879
|
}
|
|
1857
1880
|
}
|
|
1858
|
-
function
|
|
1881
|
+
function gn(e, n, t) {
|
|
1859
1882
|
if (e != null) {
|
|
1860
|
-
if (
|
|
1883
|
+
if (!$e(e)) {
|
|
1861
1884
|
d(t, n, "Expected an object.");
|
|
1862
1885
|
return;
|
|
1863
1886
|
}
|
|
1864
1887
|
return e;
|
|
1865
1888
|
}
|
|
1866
1889
|
}
|
|
1867
|
-
function
|
|
1890
|
+
function bn(e, n, t) {
|
|
1868
1891
|
if (e == null)
|
|
1869
1892
|
return;
|
|
1870
1893
|
const r = v(e, n, t);
|
|
1871
|
-
p(r, n,
|
|
1894
|
+
p(r, n, nn, t);
|
|
1872
1895
|
const o = {};
|
|
1873
1896
|
if (r.matrix !== void 0) {
|
|
1874
1897
|
const s = v(r.matrix, `${n}.matrix`, t);
|
|
1875
1898
|
p(s, `${n}.matrix`, ["config", "content"], t);
|
|
1876
|
-
const u =
|
|
1899
|
+
const u = Me.safeParse(s.config);
|
|
1877
1900
|
u.success || d(t, `${n}.matrix.config`, "Expected a valid Matrix definition.");
|
|
1878
1901
|
const h = D(
|
|
1879
1902
|
s.content,
|
|
@@ -1887,31 +1910,31 @@ function un(e, n, t) {
|
|
|
1887
1910
|
const a = D(
|
|
1888
1911
|
r.pageSize,
|
|
1889
1912
|
`${n}.pageSize`,
|
|
1890
|
-
|
|
1913
|
+
Gt,
|
|
1891
1914
|
"letter, legal, a4, a3, or tabloid",
|
|
1892
1915
|
t
|
|
1893
1916
|
), i = D(
|
|
1894
1917
|
r.orientation,
|
|
1895
1918
|
`${n}.orientation`,
|
|
1896
|
-
|
|
1919
|
+
Wt,
|
|
1897
1920
|
"portrait or landscape",
|
|
1898
1921
|
t
|
|
1899
1922
|
), c = D(
|
|
1900
1923
|
r.delimiter,
|
|
1901
1924
|
`${n}.delimiter`,
|
|
1902
|
-
|
|
1925
|
+
Xt,
|
|
1903
1926
|
"comma, semicolon, or tab",
|
|
1904
1927
|
t
|
|
1905
1928
|
), l = D(
|
|
1906
1929
|
r.csvEncoding,
|
|
1907
1930
|
`${n}.csvEncoding`,
|
|
1908
|
-
|
|
1931
|
+
Zt,
|
|
1909
1932
|
"utf-8-bom or utf-8",
|
|
1910
1933
|
t
|
|
1911
1934
|
), m = D(
|
|
1912
1935
|
r.sheetSelection,
|
|
1913
1936
|
`${n}.sheetSelection`,
|
|
1914
|
-
|
|
1937
|
+
Yt,
|
|
1915
1938
|
"current or all",
|
|
1916
1939
|
t
|
|
1917
1940
|
);
|
|
@@ -1953,7 +1976,7 @@ function un(e, n, t) {
|
|
|
1953
1976
|
"cardControlDefinitions",
|
|
1954
1977
|
"controlBindings"
|
|
1955
1978
|
]) {
|
|
1956
|
-
const u =
|
|
1979
|
+
const u = yn(r[s], `${n}.${s}`, t);
|
|
1957
1980
|
u && (o[s] = u);
|
|
1958
1981
|
}
|
|
1959
1982
|
for (const s of [
|
|
@@ -1962,7 +1985,7 @@ function un(e, n, t) {
|
|
|
1962
1985
|
"dashboardInputExecutionSnapshot",
|
|
1963
1986
|
"printInputCapture"
|
|
1964
1987
|
]) {
|
|
1965
|
-
const u =
|
|
1988
|
+
const u = gn(r[s], `${n}.${s}`, t);
|
|
1966
1989
|
u && (o[s] = u);
|
|
1967
1990
|
}
|
|
1968
1991
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
@@ -1977,14 +2000,14 @@ function W(e, n, t, r) {
|
|
|
1977
2000
|
return o && (e.title = o), e;
|
|
1978
2001
|
}
|
|
1979
2002
|
function X(e, n, t, r) {
|
|
1980
|
-
const o =
|
|
2003
|
+
const o = bn(n, t, r);
|
|
1981
2004
|
return o != null && o.printInputCapture && e.type !== "dashboard" && d(
|
|
1982
2005
|
r,
|
|
1983
2006
|
`${t}.printInputCapture`,
|
|
1984
2007
|
"Only a full dashboard attachment can carry printInputCapture."
|
|
1985
2008
|
), o && (e.settings = o), e;
|
|
1986
2009
|
}
|
|
1987
|
-
function
|
|
2010
|
+
function In(e, n, t) {
|
|
1988
2011
|
const r = `attachments.${n}`, o = v(e, r, t), a = o.type;
|
|
1989
2012
|
if (a === "dashboard") {
|
|
1990
2013
|
p(
|
|
@@ -2032,13 +2055,20 @@ function pn(e, n, t) {
|
|
|
2032
2055
|
f.id,
|
|
2033
2056
|
t
|
|
2034
2057
|
),
|
|
2035
|
-
format: V(
|
|
2058
|
+
format: V(
|
|
2059
|
+
o.format,
|
|
2060
|
+
`${r}.format`,
|
|
2061
|
+
a === "dashboard_sheet" ? ["pdf", "png"] : ["pdf"],
|
|
2062
|
+
t
|
|
2063
|
+
)
|
|
2036
2064
|
},
|
|
2037
2065
|
o.title,
|
|
2038
2066
|
`${r}.title`,
|
|
2039
2067
|
t
|
|
2040
2068
|
);
|
|
2041
|
-
return
|
|
2069
|
+
return de(
|
|
2070
|
+
X(i, o.settings, `${r}.settings`, t)
|
|
2071
|
+
);
|
|
2042
2072
|
}
|
|
2043
2073
|
if (a === "card") {
|
|
2044
2074
|
p(
|
|
@@ -2065,7 +2095,7 @@ function pn(e, n, t) {
|
|
|
2065
2095
|
format: V(
|
|
2066
2096
|
o.format,
|
|
2067
2097
|
`${r}.format`,
|
|
2068
|
-
|
|
2098
|
+
ve,
|
|
2069
2099
|
t
|
|
2070
2100
|
)
|
|
2071
2101
|
},
|
|
@@ -2073,7 +2103,9 @@ function pn(e, n, t) {
|
|
|
2073
2103
|
`${r}.title`,
|
|
2074
2104
|
t
|
|
2075
2105
|
);
|
|
2076
|
-
return
|
|
2106
|
+
return de(
|
|
2107
|
+
X(i, o.settings, `${r}.settings`, t)
|
|
2108
|
+
);
|
|
2077
2109
|
}
|
|
2078
2110
|
return d(
|
|
2079
2111
|
t,
|
|
@@ -2081,7 +2113,17 @@ function pn(e, n, t) {
|
|
|
2081
2113
|
"Expected dashboard, dashboard_sheet, document_sheet, or card."
|
|
2082
2114
|
), { type: "dashboard", dashboardId: "", format: "pdf" };
|
|
2083
2115
|
}
|
|
2084
|
-
function
|
|
2116
|
+
function de(e) {
|
|
2117
|
+
if (e.format !== "png" || !e.settings) return e;
|
|
2118
|
+
const {
|
|
2119
|
+
pageSize: n,
|
|
2120
|
+
orientation: t,
|
|
2121
|
+
includeFilters: r,
|
|
2122
|
+
...o
|
|
2123
|
+
} = e.settings, { settings: a, ...i } = e;
|
|
2124
|
+
return Object.keys(o).length > 0 ? { ...i, settings: o } : i;
|
|
2125
|
+
}
|
|
2126
|
+
function vn(e) {
|
|
2085
2127
|
switch (e.type) {
|
|
2086
2128
|
case "dashboard":
|
|
2087
2129
|
return `${e.type}:${e.dashboardId}:${e.format}`;
|
|
@@ -2092,7 +2134,7 @@ function hn(e) {
|
|
|
2092
2134
|
return `${e.type}:${e.dashboardId}:${e.cardId}:${e.format}`;
|
|
2093
2135
|
}
|
|
2094
2136
|
}
|
|
2095
|
-
function
|
|
2137
|
+
function ke(e, n) {
|
|
2096
2138
|
if (e == null)
|
|
2097
2139
|
return [];
|
|
2098
2140
|
if (!Array.isArray(e))
|
|
@@ -2102,15 +2144,15 @@ function Te(e, n) {
|
|
|
2102
2144
|
"attachments",
|
|
2103
2145
|
`Choose ${H} attachments or fewer.`
|
|
2104
2146
|
);
|
|
2105
|
-
const t = e.slice(0, H).map((o, a) =>
|
|
2147
|
+
const t = e.slice(0, H).map((o, a) => In(o, a, n)), r = /* @__PURE__ */ new Set();
|
|
2106
2148
|
return t.forEach((o, a) => {
|
|
2107
|
-
var c, l, m;
|
|
2108
|
-
(c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format === "pdf") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV or Excel."), o.format === "
|
|
2109
|
-
const i =
|
|
2149
|
+
var c, l, m, s;
|
|
2150
|
+
(c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format === "pdf") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV or Excel."), o.format === "png" && ((l = o.settings) != null && l.matrix) && o.settings.matrix.content !== "current" && d(n, `attachments.${a}.settings.matrix.content`, "A Matrix PNG image shows the current layout."), o.format === "xlsx" && !((m = o.settings) != null && m.matrix) && !Q((s = o.settings) == null ? void 0 : s.cardType) && d(n, `attachments.${a}.format`, "Excel attachments require a Table, Detail Table or Matrix card.");
|
|
2151
|
+
const i = vn(o);
|
|
2110
2152
|
r.has(i) && d(n, `attachments.${a}`, "Duplicate attachment."), r.add(i);
|
|
2111
2153
|
}), t;
|
|
2112
2154
|
}
|
|
2113
|
-
function
|
|
2155
|
+
function Ae(e, n) {
|
|
2114
2156
|
if (e == null)
|
|
2115
2157
|
return;
|
|
2116
2158
|
const t = v(e, "limits", n);
|
|
@@ -2136,14 +2178,14 @@ function te(e) {
|
|
|
2136
2178
|
if (e.length > 0)
|
|
2137
2179
|
throw new j(e);
|
|
2138
2180
|
}
|
|
2139
|
-
function
|
|
2181
|
+
function we(e, n, t) {
|
|
2140
2182
|
!(e.type === "generated_analysis" || e.type === "custom_message" && !!e.message.trim()) && n.length === 0 && d(
|
|
2141
2183
|
t,
|
|
2142
2184
|
"body",
|
|
2143
2185
|
"Add briefing instructions, a custom message, or at least one attachment."
|
|
2144
2186
|
);
|
|
2145
2187
|
}
|
|
2146
|
-
function
|
|
2188
|
+
function En(e, n, t) {
|
|
2147
2189
|
e == null || e.forEach((r, o) => {
|
|
2148
2190
|
const a = `${t}.${o}.scope`, i = r.scope.attachmentIndex;
|
|
2149
2191
|
if (i === void 0)
|
|
@@ -2165,7 +2207,7 @@ function yn(e, n, t) {
|
|
|
2165
2207
|
);
|
|
2166
2208
|
});
|
|
2167
2209
|
}
|
|
2168
|
-
function
|
|
2210
|
+
function De(e) {
|
|
2169
2211
|
const n = [], t = v(e, "jobConfig", n);
|
|
2170
2212
|
p(
|
|
2171
2213
|
t,
|
|
@@ -2183,7 +2225,7 @@ function Ae(e) {
|
|
|
2183
2225
|
), t.kind !== Z && d(n, "kind", "Expected BRIEFING.");
|
|
2184
2226
|
let r;
|
|
2185
2227
|
try {
|
|
2186
|
-
r =
|
|
2228
|
+
r = ze(
|
|
2187
2229
|
t.presentationExecutionSnapshot
|
|
2188
2230
|
);
|
|
2189
2231
|
} catch (m) {
|
|
@@ -2195,8 +2237,8 @@ function Ae(e) {
|
|
|
2195
2237
|
m instanceof Error ? m.message : "Invalid presentation snapshot."
|
|
2196
2238
|
);
|
|
2197
2239
|
}
|
|
2198
|
-
const o =
|
|
2199
|
-
return
|
|
2240
|
+
const o = xe(t.source, n), a = Ce(t.body, n), i = ke(t.attachments, n), c = Te(t.presentation, n), l = Ae(t.limits, n);
|
|
2241
|
+
return we(a, i, n), En(
|
|
2200
2242
|
r == null ? void 0 : r.resolvedFormats,
|
|
2201
2243
|
i,
|
|
2202
2244
|
"jobConfig.presentationExecutionSnapshot.resolvedFormats"
|
|
@@ -2210,8 +2252,8 @@ function Ae(e) {
|
|
|
2210
2252
|
...l ? { limits: l } : {}
|
|
2211
2253
|
};
|
|
2212
2254
|
}
|
|
2213
|
-
function
|
|
2214
|
-
return
|
|
2255
|
+
function hr(e) {
|
|
2256
|
+
return De({
|
|
2215
2257
|
...e,
|
|
2216
2258
|
kind: Z
|
|
2217
2259
|
});
|
|
@@ -2231,7 +2273,7 @@ function ne(e, n, t, r = "deliveryConfig.recipients") {
|
|
|
2231
2273
|
f.attachmentTitle,
|
|
2232
2274
|
t
|
|
2233
2275
|
);
|
|
2234
|
-
return c && !
|
|
2276
|
+
return c && !cn(c) && d(t, `${o}.address`, "Email address is invalid."), {
|
|
2235
2277
|
type: "email",
|
|
2236
2278
|
address: c,
|
|
2237
2279
|
...l ? { name: l } : {}
|
|
@@ -2267,17 +2309,17 @@ function ne(e, n, t, r = "deliveryConfig.recipients") {
|
|
|
2267
2309
|
"Expected email, user, tenant_user, or group."
|
|
2268
2310
|
), { type: "email", address: "" });
|
|
2269
2311
|
}
|
|
2270
|
-
function
|
|
2312
|
+
function $n(e, n) {
|
|
2271
2313
|
return e == null ? [] : Array.isArray(e) ? e.map(
|
|
2272
2314
|
(t, r) => ne(t, r, n)
|
|
2273
2315
|
) : (d(n, "deliveryConfig.recipients", "Expected an array."), []);
|
|
2274
2316
|
}
|
|
2275
|
-
function
|
|
2317
|
+
function xn(e, n) {
|
|
2276
2318
|
if (!Array.isArray(e))
|
|
2277
2319
|
return d(n, "deliveryConfig.channels", "Expected an array."), [];
|
|
2278
2320
|
const t = [];
|
|
2279
2321
|
return e.forEach((r, o) => {
|
|
2280
|
-
if (!
|
|
2322
|
+
if (!_e(r)) {
|
|
2281
2323
|
d(
|
|
2282
2324
|
n,
|
|
2283
2325
|
`deliveryConfig.channels.${o}`,
|
|
@@ -2288,7 +2330,7 @@ function bn(e, n) {
|
|
|
2288
2330
|
t.includes(r) || t.push(r);
|
|
2289
2331
|
}), t;
|
|
2290
2332
|
}
|
|
2291
|
-
function
|
|
2333
|
+
function Cn(e, n, t) {
|
|
2292
2334
|
if (e == null)
|
|
2293
2335
|
return;
|
|
2294
2336
|
const r = v(e, n, t), o = {};
|
|
@@ -2300,7 +2342,7 @@ function In(e, n, t) {
|
|
|
2300
2342
|
o[a] = i.trim();
|
|
2301
2343
|
}), Object.keys(o).length > 0 ? o : void 0;
|
|
2302
2344
|
}
|
|
2303
|
-
function
|
|
2345
|
+
function Tn(e, n, t) {
|
|
2304
2346
|
if (e == null)
|
|
2305
2347
|
return;
|
|
2306
2348
|
const r = v(e, n, t);
|
|
@@ -2310,7 +2352,7 @@ function vn(e, n, t) {
|
|
|
2310
2352
|
["url", "method", "headers", "secretEncrypted"],
|
|
2311
2353
|
t
|
|
2312
2354
|
);
|
|
2313
|
-
const o = r.method === void 0 || r.method === null ? void 0 : V(r.method, `${n}.method`, ["POST", "PUT"], t), a =
|
|
2355
|
+
const o = r.method === void 0 || r.method === null ? void 0 : V(r.method, `${n}.method`, ["POST", "PUT"], t), a = Cn(r.headers, `${n}.headers`, t), i = I(
|
|
2314
2356
|
r.secretEncrypted,
|
|
2315
2357
|
`${n}.secretEncrypted`,
|
|
2316
2358
|
2e3,
|
|
@@ -2323,7 +2365,7 @@ function vn(e, n, t) {
|
|
|
2323
2365
|
...i ? { secretEncrypted: i } : {}
|
|
2324
2366
|
};
|
|
2325
2367
|
}
|
|
2326
|
-
function
|
|
2368
|
+
function Sn(e, n, t) {
|
|
2327
2369
|
const r = v(e, n, t), o = r.type;
|
|
2328
2370
|
if (o === "channel") {
|
|
2329
2371
|
p(
|
|
@@ -2364,7 +2406,7 @@ function En(e, n, t) {
|
|
|
2364
2406
|
recipient: ne(r.recipient, 0, t, `${n}.recipient`)
|
|
2365
2407
|
}) : (d(t, `${n}.type`, "Expected channel."), { type: "channel", channelId: "" });
|
|
2366
2408
|
}
|
|
2367
|
-
function
|
|
2409
|
+
function kn(e, n, t) {
|
|
2368
2410
|
if (e == null)
|
|
2369
2411
|
return;
|
|
2370
2412
|
if (!Array.isArray(e)) {
|
|
@@ -2376,7 +2418,7 @@ function $n(e, n, t) {
|
|
|
2376
2418
|
);
|
|
2377
2419
|
return r.length > 0 ? r : void 0;
|
|
2378
2420
|
}
|
|
2379
|
-
function
|
|
2421
|
+
function An(e, n, t) {
|
|
2380
2422
|
if (e == null)
|
|
2381
2423
|
return;
|
|
2382
2424
|
const r = v(e, n, t);
|
|
@@ -2392,7 +2434,7 @@ function Cn(e, n, t) {
|
|
|
2392
2434
|
],
|
|
2393
2435
|
t
|
|
2394
2436
|
);
|
|
2395
|
-
const o =
|
|
2437
|
+
const o = kn(
|
|
2396
2438
|
r.threadMentions,
|
|
2397
2439
|
`${n}.threadMentions`,
|
|
2398
2440
|
t
|
|
@@ -2413,7 +2455,7 @@ function Cn(e, n, t) {
|
|
|
2413
2455
|
t
|
|
2414
2456
|
);
|
|
2415
2457
|
return {
|
|
2416
|
-
destination:
|
|
2458
|
+
destination: Sn(
|
|
2417
2459
|
r.destination,
|
|
2418
2460
|
`${n}.destination`,
|
|
2419
2461
|
t
|
|
@@ -2424,7 +2466,7 @@ function Cn(e, n, t) {
|
|
|
2424
2466
|
...r.includeBriefingLink !== void 0 ? { includeBriefingLink: c } : {}
|
|
2425
2467
|
};
|
|
2426
2468
|
}
|
|
2427
|
-
function
|
|
2469
|
+
function wn(e, n, t) {
|
|
2428
2470
|
const r = v(e, n, t);
|
|
2429
2471
|
p(
|
|
2430
2472
|
r,
|
|
@@ -2443,7 +2485,7 @@ function xn(e, n, t) {
|
|
|
2443
2485
|
const o = D(
|
|
2444
2486
|
r.formatProfile,
|
|
2445
2487
|
`${n}.formatProfile`,
|
|
2446
|
-
|
|
2488
|
+
Jt,
|
|
2447
2489
|
"concise, balanced, or detailed",
|
|
2448
2490
|
t
|
|
2449
2491
|
), a = I(
|
|
@@ -2466,11 +2508,11 @@ function xn(e, n, t) {
|
|
|
2466
2508
|
!0,
|
|
2467
2509
|
`${n}.actionBlockVisible`,
|
|
2468
2510
|
t
|
|
2469
|
-
), m =
|
|
2511
|
+
), m = Tn(
|
|
2470
2512
|
r.webhookConfig,
|
|
2471
2513
|
`${n}.webhookConfig`,
|
|
2472
2514
|
t
|
|
2473
|
-
), s =
|
|
2515
|
+
), s = An(
|
|
2474
2516
|
r.slackConfig,
|
|
2475
2517
|
`${n}.slackConfig`,
|
|
2476
2518
|
t
|
|
@@ -2485,12 +2527,12 @@ function xn(e, n, t) {
|
|
|
2485
2527
|
...m ? { webhookConfig: m } : {}
|
|
2486
2528
|
};
|
|
2487
2529
|
}
|
|
2488
|
-
function
|
|
2530
|
+
function Dn(e, n) {
|
|
2489
2531
|
if (e == null)
|
|
2490
2532
|
return;
|
|
2491
2533
|
const t = v(e, "deliveryConfig.channelConfigs", n), r = {};
|
|
2492
2534
|
return Object.entries(t).forEach(([o, a]) => {
|
|
2493
|
-
if (!
|
|
2535
|
+
if (!_e(o)) {
|
|
2494
2536
|
d(
|
|
2495
2537
|
n,
|
|
2496
2538
|
`deliveryConfig.channelConfigs.${o}`,
|
|
@@ -2498,14 +2540,14 @@ function Tn(e, n) {
|
|
|
2498
2540
|
);
|
|
2499
2541
|
return;
|
|
2500
2542
|
}
|
|
2501
|
-
r[o] =
|
|
2543
|
+
r[o] = wn(
|
|
2502
2544
|
a,
|
|
2503
2545
|
`deliveryConfig.channelConfigs.${o}`,
|
|
2504
2546
|
n
|
|
2505
2547
|
);
|
|
2506
2548
|
}), Object.keys(r).length > 0 ? r : void 0;
|
|
2507
2549
|
}
|
|
2508
|
-
function
|
|
2550
|
+
function _n(e, n) {
|
|
2509
2551
|
var l, m, s;
|
|
2510
2552
|
if (e == null)
|
|
2511
2553
|
return null;
|
|
@@ -2516,7 +2558,7 @@ function Sn(e, n) {
|
|
|
2516
2558
|
["recipients", "channels", "channelConfigs"],
|
|
2517
2559
|
n
|
|
2518
2560
|
);
|
|
2519
|
-
const r =
|
|
2561
|
+
const r = Dn(t.channelConfigs, n), o = $n(t.recipients, n), a = xn(t.channels, n), i = ((m = (l = r == null ? void 0 : r.SLACK) == null ? void 0 : l.slackConfig) == null ? void 0 : m.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
|
|
2520
2562
|
return a.some(
|
|
2521
2563
|
(u) => u !== "SLACK"
|
|
2522
2564
|
) && o.length === 0 && d(
|
|
@@ -2571,8 +2613,8 @@ function re(e) {
|
|
|
2571
2613
|
"description",
|
|
2572
2614
|
f.description,
|
|
2573
2615
|
n
|
|
2574
|
-
) ?? null, a = I(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = I(t.timezone, "timezone", 200, n) ?? "UTC", c =
|
|
2575
|
-
return
|
|
2616
|
+
) ?? null, a = I(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = I(t.timezone, "timezone", 200, n) ?? "UTC", c = an(t.status, n), l = xe(t.source, n), m = Ce(t.body, n), s = ke(t.attachments, n), u = Te(t.presentation, n), h = Ae(t.limits, n), g = _n(t.deliveryConfig, n);
|
|
2617
|
+
return we(m, s, n), te(n), {
|
|
2576
2618
|
name: r,
|
|
2577
2619
|
description: o,
|
|
2578
2620
|
status: c,
|
|
@@ -2586,13 +2628,13 @@ function re(e) {
|
|
|
2586
2628
|
deliveryConfig: g
|
|
2587
2629
|
};
|
|
2588
2630
|
}
|
|
2589
|
-
function
|
|
2631
|
+
function yr(e) {
|
|
2590
2632
|
return re(e);
|
|
2591
2633
|
}
|
|
2592
|
-
function
|
|
2634
|
+
function gr(e) {
|
|
2593
2635
|
return re(e);
|
|
2594
2636
|
}
|
|
2595
|
-
function
|
|
2637
|
+
function br(e) {
|
|
2596
2638
|
try {
|
|
2597
2639
|
return { valid: !0, value: re(e), issues: [] };
|
|
2598
2640
|
} catch (n) {
|
|
@@ -2601,74 +2643,77 @@ function sr(e) {
|
|
|
2601
2643
|
throw n;
|
|
2602
2644
|
}
|
|
2603
2645
|
}
|
|
2604
|
-
function
|
|
2646
|
+
function Ir(e) {
|
|
2605
2647
|
try {
|
|
2606
|
-
return { valid: !0, value:
|
|
2648
|
+
return { valid: !0, value: De(e), issues: [] };
|
|
2607
2649
|
} catch (n) {
|
|
2608
2650
|
if (n instanceof j)
|
|
2609
2651
|
return { valid: !1, issues: n.issues };
|
|
2610
2652
|
throw n;
|
|
2611
2653
|
}
|
|
2612
2654
|
}
|
|
2613
|
-
function
|
|
2614
|
-
return typeof e == "string" &&
|
|
2655
|
+
function vr(e) {
|
|
2656
|
+
return typeof e == "string" && Ee.has(e);
|
|
2615
2657
|
}
|
|
2616
|
-
function
|
|
2617
|
-
return typeof e == "string" &&
|
|
2658
|
+
function _e(e) {
|
|
2659
|
+
return typeof e == "string" && Ht.has(e);
|
|
2618
2660
|
}
|
|
2619
2661
|
export {
|
|
2620
|
-
|
|
2662
|
+
Q as $,
|
|
2621
2663
|
f as A,
|
|
2622
2664
|
Z as B,
|
|
2623
|
-
C,
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2665
|
+
x as C,
|
|
2666
|
+
or as D,
|
|
2667
|
+
qt as E,
|
|
2668
|
+
Kt as F,
|
|
2669
|
+
ur as G,
|
|
2670
|
+
ve as H,
|
|
2671
|
+
j as I,
|
|
2672
|
+
hn as J,
|
|
2673
|
+
pr as K,
|
|
2674
|
+
De as L,
|
|
2633
2675
|
H as M,
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2676
|
+
hr as N,
|
|
2677
|
+
re as O,
|
|
2678
|
+
yr as P,
|
|
2679
|
+
gr as Q,
|
|
2680
|
+
br as R,
|
|
2681
|
+
Ir as S,
|
|
2682
|
+
vr as T,
|
|
2683
|
+
_e as U,
|
|
2684
|
+
Qn as V,
|
|
2685
|
+
ht as W,
|
|
2686
|
+
ft as X,
|
|
2687
|
+
Zn as Y,
|
|
2688
|
+
mt as Z,
|
|
2689
|
+
pt as _,
|
|
2690
|
+
mr as a,
|
|
2691
|
+
Mt as a0,
|
|
2692
|
+
Ut as a1,
|
|
2693
|
+
zt as a2,
|
|
2694
|
+
ut as b,
|
|
2695
|
+
Jn as c,
|
|
2696
|
+
ir as d,
|
|
2697
|
+
er as e,
|
|
2698
|
+
rr as f,
|
|
2699
|
+
fr as g,
|
|
2700
|
+
Xn as h,
|
|
2701
|
+
Yn as i,
|
|
2702
|
+
Ct as j,
|
|
2703
|
+
ar as k,
|
|
2659
2704
|
R as l,
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2705
|
+
cr as m,
|
|
2706
|
+
Nt as n,
|
|
2707
|
+
lr as o,
|
|
2708
|
+
be as p,
|
|
2709
|
+
ye as q,
|
|
2710
|
+
Vt as r,
|
|
2711
|
+
dr as s,
|
|
2712
|
+
sr as t,
|
|
2713
|
+
yt as u,
|
|
2714
|
+
me as v,
|
|
2715
|
+
nr as w,
|
|
2716
|
+
tr as x,
|
|
2717
|
+
jt as y,
|
|
2673
2718
|
Y as z
|
|
2674
2719
|
};
|