react-semaphor 0.1.568 → 0.1.570
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/README.md +0 -7
- package/dist/analytics-protocol/index.js +434 -454
- package/dist/appearance/index.js +6 -3
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +572 -436
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
- package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/brand-B4BdpAB_.js +54 -0
- package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
- package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
- package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
- package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
- package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
- package/dist/chunks/edit-Bpdh_P_a.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
- package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
- package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
- package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
- package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
- package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
- package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
- package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +55 -0
- package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
- package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Yvhv3WX2.js} +95 -97
- package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-Lkbwycwe.js} +5491 -5683
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
- package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
- package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
- package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1888 -1826
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +349 -353
- package/dist/layouts/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/appearance/index.d.ts +1 -0
- package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
- package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
- package/dist/types/components/surfboard/filter/types.d.ts +5 -4
- package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
- package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
- package/dist/types/index.js +9 -9
- package/dist/types/lib/appearance/aliases.d.ts +42 -0
- package/dist/types/lib/appearance/compiler.d.ts +6 -0
- package/dist/types/lib/appearance/defaults.d.ts +6 -0
- package/dist/types/lib/appearance/index.d.ts +2 -0
- package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
- package/dist/types/lib/appearance/resolver.d.ts +2 -2
- package/dist/types/lib/appearance/types.d.ts +38 -1
- package/dist/types/lib/charts/types.d.ts +6 -2
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
- package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
- package/dist/types/lib/download-pdf.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
- package/dist/types/lib/stores/editor-store.d.ts +0 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
- package/dist/types/lib/types/common-types.d.ts +3 -2
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/lib/types/index.d.ts +1 -1
- package/dist/types/lib/types/summary-types.d.ts +0 -5
- package/dist/types/lib/utils/card-definition.d.ts +7 -7
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +72 -72
- package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +30 -30
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +344 -1772
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
- package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +10 -10
- package/dist/types/shared/temporal/index.d.ts +0 -2
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
- package/package.json +7 -26
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
- package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
- package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CLIro-EG.js +0 -425
- package/dist/chunks/index-CuHybtft.js +0 -51
- package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
- package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
- package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
- package/dist/chunks/operators-B3zZoskU.js +0 -66
- package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
- package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
- package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
- package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
- package/dist/chunks/validators-wtjw0aw6.js +0 -3332
- package/dist/data-app-sdk/index.js +0 -1412
- package/dist/data-app-sdk-adapters/index.js +0 -361
- package/dist/data-app-sdk-validation/index.js +0 -1031
- package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
- package/dist/types/data-app-sdk/adapters.d.ts +0 -35
- package/dist/types/data-app-sdk/builders.d.ts +0 -62
- package/dist/types/data-app-sdk/contracts.d.ts +0 -419
- package/dist/types/data-app-sdk/executor.d.ts +0 -5
- package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
- package/dist/types/data-app-sdk/hooks.d.ts +0 -11
- package/dist/types/data-app-sdk/index.d.ts +0 -9
- package/dist/types/data-app-sdk/provider.d.ts +0 -8
- package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
- package/dist/types/data-app-sdk/selection.d.ts +0 -2
- package/dist/types/data-app-sdk/validation.d.ts +0 -58
- package/dist/types/data-app-sdk-adapters.d.ts +0 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -2
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
- package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
- package/dist/types/shared/temporal/relative-date.d.ts +0 -21
- package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
- package/src/data-app-sdk/README.md +0 -402
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a5 as Q, f as Ve, r as Pe } from "./validators-B8fpdinG.js";
|
|
2
2
|
import { z as l } from "zod";
|
|
3
|
-
import {
|
|
4
|
-
import { D as qe, C as Be, r as j,
|
|
3
|
+
import { P as B, E as Le, q as $e } from "./matrix-operation-contract-DCVinw1o.js";
|
|
4
|
+
import { D as qe, C as Be, r as j, a as je, e as Ue } from "./metric-comparison-n9NsIa-2.js";
|
|
5
5
|
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
6
6
|
import { a as O } from "./applied-constraints-DU-wndZ7.js";
|
|
7
|
-
import { r as
|
|
7
|
+
import { r as ze } from "./pivot-result-identity-B89X5xjb.js";
|
|
8
8
|
const ne = 8, re = 6, V = Object.freeze([]);
|
|
9
|
-
function
|
|
9
|
+
function We(e) {
|
|
10
10
|
switch (e.type) {
|
|
11
11
|
case "table":
|
|
12
12
|
case "chart":
|
|
@@ -17,7 +17,7 @@ function ze(e) {
|
|
|
17
17
|
return V;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Ge(e, t) {
|
|
21
21
|
switch (e.type) {
|
|
22
22
|
case "table":
|
|
23
23
|
case "chart": {
|
|
@@ -51,7 +51,7 @@ function _(e) {
|
|
|
51
51
|
card: i
|
|
52
52
|
});
|
|
53
53
|
for (const s of ((n = r.document) == null ? void 0 : n.sections) || [])
|
|
54
|
-
for (const i of
|
|
54
|
+
for (const i of We(s))
|
|
55
55
|
t.push({
|
|
56
56
|
kind: "documentSectionCard",
|
|
57
57
|
sheetId: a,
|
|
@@ -62,16 +62,16 @@ function _(e) {
|
|
|
62
62
|
}
|
|
63
63
|
return t;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Zt(e, t, n) {
|
|
66
66
|
let r = !1;
|
|
67
|
-
const a =
|
|
67
|
+
const a = Qe(e, (i) => i.id !== n.id ? i : (r = !0, i === n ? i : n));
|
|
68
68
|
if (r || !t) return a;
|
|
69
69
|
const s = (a.sheets || []).map(
|
|
70
70
|
(i) => i.id === t && i.kind !== "document" ? { ...i, cards: [...i.cards ?? [], n] } : i
|
|
71
71
|
);
|
|
72
72
|
return { ...a, sheets: s };
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Qe(e, t) {
|
|
75
75
|
const n = (a, s) => {
|
|
76
76
|
const i = a.map((o) => t(o, s(o)));
|
|
77
77
|
return i.every((o, c) => o === a[c]) ? a : i;
|
|
@@ -82,7 +82,7 @@ function Ge(e, t) {
|
|
|
82
82
|
const I = n(p.cards, (g) => ({ kind: "frameCard", sheetId: s, frameId: p.id, cardId: g.id, card: g }));
|
|
83
83
|
return I === p.cards ? p : { ...p, cards: I };
|
|
84
84
|
}), c = (h = (y = a.document) == null ? void 0 : y.sections) == null ? void 0 : h.map(
|
|
85
|
-
(p) =>
|
|
85
|
+
(p) => Ge(p, (I) => t(I, { kind: "documentSectionCard", sheetId: s, sectionId: p.id, cardId: I.id, card: I }))
|
|
86
86
|
), u = !!o && o.some((p, I) => p !== a.frames[I]), d = !!c && c.some((p, I) => p !== a.document.sections[I]);
|
|
87
87
|
return i === a.cards && !u && !d ? a : {
|
|
88
88
|
...a,
|
|
@@ -96,7 +96,7 @@ function Ge(e, t) {
|
|
|
96
96
|
function P(e) {
|
|
97
97
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function en(e) {
|
|
100
100
|
if (!P(e))
|
|
101
101
|
return [{ path: "", message: "must be an object." }];
|
|
102
102
|
const t = [];
|
|
@@ -137,7 +137,7 @@ const Ie = "dashboardInput";
|
|
|
137
137
|
function se(e) {
|
|
138
138
|
return e === "label" || e === "value" || e === "start" || e === "end" || e === "range";
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Ye(e) {
|
|
141
141
|
return e === "generatedAt" || e === "pageNumber" || e === "pageCount";
|
|
142
142
|
}
|
|
143
143
|
function v(e) {
|
|
@@ -152,18 +152,18 @@ function v(e) {
|
|
|
152
152
|
...t.export ? { export: t.export } : {}
|
|
153
153
|
};
|
|
154
154
|
if (t.source === "documentMeta")
|
|
155
|
-
return
|
|
155
|
+
return Ye(t.key) ? { source: "documentMeta", key: t.key } : void 0;
|
|
156
156
|
if (t.source === "data")
|
|
157
157
|
return typeof t.variableId == "string" && typeof t.export == "string" ? { source: "data", variableId: t.variableId, export: t.export } : void 0;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function tn(e, t) {
|
|
160
160
|
const n = v(e), r = v(t);
|
|
161
161
|
return !n || !r ? JSON.stringify(e) === JSON.stringify(t) : [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].every((s) => n[s] === r[s]);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Je(e) {
|
|
164
164
|
return x(e) ? e.type === "variable" ? e.ref === void 0 ? [] : [e.ref] : e.type === "when" && x(e.test) && e.test.ref !== void 0 ? [e.test.ref] : [] : [];
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function He(e, t) {
|
|
167
167
|
if (!x(e)) return e;
|
|
168
168
|
if (e.type === "variable" && e.ref !== void 0) {
|
|
169
169
|
const n = t(e.ref);
|
|
@@ -181,7 +181,7 @@ function x(e) {
|
|
|
181
181
|
function ae(e) {
|
|
182
182
|
return !!e && typeof e == "object" && e.source === Ie;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function nn(e) {
|
|
185
185
|
return U(e);
|
|
186
186
|
}
|
|
187
187
|
function U(e) {
|
|
@@ -198,7 +198,7 @@ function U(e) {
|
|
|
198
198
|
let n;
|
|
199
199
|
const r = (s, i) => {
|
|
200
200
|
i !== t[s] && (n ?? (n = { ...t }), n[s] = i);
|
|
201
|
-
}, a =
|
|
201
|
+
}, a = He(
|
|
202
202
|
t,
|
|
203
203
|
(s) => ae(s) ? v(s) ?? s : s
|
|
204
204
|
);
|
|
@@ -214,14 +214,14 @@ function U(e) {
|
|
|
214
214
|
s === "ref" && t.type === "variable" || s === "test" && t.type === "when" || s === "inputAliases" || r(s, U(i));
|
|
215
215
|
return n ?? e;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function rn(e) {
|
|
218
218
|
return b(e);
|
|
219
219
|
}
|
|
220
220
|
function b(e) {
|
|
221
221
|
const t = [];
|
|
222
222
|
for (const n of Array.isArray(e) ? e : [])
|
|
223
223
|
if (!(!n || typeof n != "object")) {
|
|
224
|
-
for (const r of
|
|
224
|
+
for (const r of Je(n)) {
|
|
225
225
|
const a = v(r);
|
|
226
226
|
a && t.push(a);
|
|
227
227
|
}
|
|
@@ -229,7 +229,7 @@ function b(e) {
|
|
|
229
229
|
}
|
|
230
230
|
return t;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Xe(e) {
|
|
233
233
|
var r;
|
|
234
234
|
const t = (r = e.preferences) == null ? void 0 : r.textVisualOptions, n = t == null ? void 0 : t.richContent;
|
|
235
235
|
return n && Array.isArray(n.blocks) ? n.blocks.flatMap(
|
|
@@ -263,7 +263,7 @@ function Se(e) {
|
|
|
263
263
|
const a = { kind: "sheet", sheetId: r.id }, s = [...r.cards ?? [], ...(r.frames ?? []).flatMap((i) => i.cards ?? [])];
|
|
264
264
|
for (const i of s)
|
|
265
265
|
if (i.type === "text")
|
|
266
|
-
for (const o of
|
|
266
|
+
for (const o of Xe(i))
|
|
267
267
|
n.push({ ref: o, place: a, where: { kind: "card", cardId: i.id } });
|
|
268
268
|
}
|
|
269
269
|
return ie.set(e, n), n;
|
|
@@ -275,19 +275,19 @@ function ge(e, t) {
|
|
|
275
275
|
const n = Se(e);
|
|
276
276
|
return t ? n.filter((r) => Ce(r.place, t)) : [...n];
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ze(e, t) {
|
|
279
279
|
const n = [];
|
|
280
280
|
for (const { ref: r, place: a } of Se(e))
|
|
281
281
|
r.source !== "data" || r.variableId !== t || n.some((s) => Ce(s, a)) || n.push(a);
|
|
282
282
|
return n;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function sn(e, t) {
|
|
285
285
|
const n = /* @__PURE__ */ new Set();
|
|
286
286
|
for (const { ref: r } of ge(e, t))
|
|
287
287
|
r.source === "data" && n.add(r.variableId);
|
|
288
288
|
return [...n];
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function an(e, t) {
|
|
291
291
|
const n = be("", e).filter(
|
|
292
292
|
({ ref: r }) => r.source === "input" && r.inputId === t
|
|
293
293
|
);
|
|
@@ -300,7 +300,7 @@ function sn(e, t) {
|
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
302
|
function ke(e, t) {
|
|
303
|
-
const n =
|
|
303
|
+
const n = Ze(e, t);
|
|
304
304
|
return n.length ? n.map((r) => ({
|
|
305
305
|
sheetId: r.sheetId,
|
|
306
306
|
cardId: t,
|
|
@@ -309,12 +309,12 @@ function ke(e, t) {
|
|
|
309
309
|
}
|
|
310
310
|
function C(e, t) {
|
|
311
311
|
var r;
|
|
312
|
-
if (!
|
|
312
|
+
if (!rt(e, t))
|
|
313
313
|
return !1;
|
|
314
314
|
const n = e.scope;
|
|
315
315
|
switch (n.kind) {
|
|
316
316
|
case "allSheets":
|
|
317
|
-
return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !
|
|
317
|
+
return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !nt(n.exceptSheetIds, t) && !ue(n.exceptCardIds, t);
|
|
318
318
|
case "sheets":
|
|
319
319
|
return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !ue(n.exceptCardIds, t);
|
|
320
320
|
case "cards":
|
|
@@ -325,7 +325,7 @@ function C(e, t) {
|
|
|
325
325
|
return !1;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function on(e, t) {
|
|
329
329
|
if (C(e, {
|
|
330
330
|
sheetId: t.sheetId,
|
|
331
331
|
sheetKind: t.sheetKind
|
|
@@ -348,7 +348,7 @@ function an(e, t) {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
const oe = /* @__PURE__ */ new WeakMap();
|
|
351
|
-
function
|
|
351
|
+
function et(e) {
|
|
352
352
|
const t = oe.get(e);
|
|
353
353
|
if (t) return t;
|
|
354
354
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -372,9 +372,9 @@ function Ze(e) {
|
|
|
372
372
|
});
|
|
373
373
|
return oe.set(e, a), a;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function cn(e, t) {
|
|
376
376
|
var a, s;
|
|
377
|
-
const n = /* @__PURE__ */ new Set(), r =
|
|
377
|
+
const n = /* @__PURE__ */ new Set(), r = et(e);
|
|
378
378
|
for (const i of r.values())
|
|
379
379
|
C(t, {
|
|
380
380
|
sheetId: i.sheetId,
|
|
@@ -401,10 +401,10 @@ function on(e, t) {
|
|
|
401
401
|
}) && n.add(`section:${o.id}`);
|
|
402
402
|
return n;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function un(e) {
|
|
405
405
|
return e.kind === "filter" && e.scope.kind === "cards";
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function dn(e, t) {
|
|
408
408
|
var s, i, o;
|
|
409
409
|
const n = (c) => {
|
|
410
410
|
var u, d;
|
|
@@ -459,25 +459,25 @@ function un(e, t) {
|
|
|
459
459
|
default:
|
|
460
460
|
return e;
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return tt(e, a) ? e : a;
|
|
463
463
|
}
|
|
464
464
|
function ce(e, t, n, r, a, s) {
|
|
465
465
|
let i = e;
|
|
466
466
|
return t != null && t.size && (i = i.filter((o) => !t.has(o))), r && (i = i.filter((o) => n == null ? void 0 : n.has(o))), n != null && n.size && (i = i.map((o) => n.get(o) ?? o)), a != null && a.size && (i = s === "extend" ? [.../* @__PURE__ */ new Set([...i, ...i.flatMap((o) => a.has(o) ? [a.get(o)] : [])])] : i.map((o) => a.get(o) ?? o)), i;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function tt(e, t) {
|
|
469
469
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function nt(e, t) {
|
|
472
472
|
return !!t.sheetId && !!(e != null && e.includes(t.sheetId));
|
|
473
473
|
}
|
|
474
474
|
function ue(e, t) {
|
|
475
475
|
return !!t.cardId && !!(e != null && e.includes(t.cardId));
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function rt(e, t) {
|
|
478
478
|
return t.sheetKind !== "document" || !e.compatibility || e.compatibility.source === "documentInput" ? !0 : e.compatibility.source === "cardInlineFilter" || e.compatibility.source === "cardControl" ? !!t.cardId && e.compatibility.cardId === t.cardId : !1;
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function ln(e, t, n) {
|
|
481
481
|
switch (e.kind) {
|
|
482
482
|
case "sheets":
|
|
483
483
|
return e.sheetIds.length > 0 && e.sheetIds.every((r) => r === t);
|
|
@@ -489,25 +489,25 @@ function dn(e, t, n) {
|
|
|
489
489
|
return !1;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function fn(e) {
|
|
493
493
|
return e.kind === "sheets" && e.sheetIds.length === 0 || e.kind === "cards" && e.cardIds.length === 0;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function st(e) {
|
|
496
496
|
return e.kind === "allSheets" || e.kind === "sheets" ? e.exceptCardIds ?? [] : [];
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function mn(e) {
|
|
499
499
|
return e.kind === "allSheets" ? e.exceptSheetIds ?? [] : [];
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function pn(e, t) {
|
|
502
502
|
var s;
|
|
503
503
|
if (e.kind !== "allSheets" && e.kind !== "sheets" || !((s = e.exceptCardIds) != null && s.includes(t))) return e;
|
|
504
504
|
const n = e.exceptCardIds.filter((i) => i !== t), { exceptCardIds: r, ...a } = e;
|
|
505
505
|
return n.length ? { ...a, exceptCardIds: n } : a;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function hn(e, t, n) {
|
|
508
508
|
var o;
|
|
509
509
|
if (t.kind !== "allSheets" && t.kind !== "sheets") return t;
|
|
510
|
-
const r =
|
|
510
|
+
const r = st(e), a = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" && de(e) ? [...n].filter((c) => {
|
|
511
511
|
var u;
|
|
512
512
|
return !((u = e.exceptSheetIds) != null && u.includes(c));
|
|
513
513
|
}) : [], s = [...n].filter((c) => !a.includes(c));
|
|
@@ -534,7 +534,7 @@ function de(e) {
|
|
|
534
534
|
var t;
|
|
535
535
|
return e.kind === "allSheets" && (!((t = e.sheetKinds) != null && t.length) || e.sheetKinds.includes("document"));
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function yn(e, t) {
|
|
538
538
|
switch (e.kind) {
|
|
539
539
|
case "allSheets":
|
|
540
540
|
case "sheets": {
|
|
@@ -547,24 +547,24 @@ function hn(e, t) {
|
|
|
547
547
|
return;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
550
|
+
const at = 6;
|
|
551
|
+
function In(e) {
|
|
552
552
|
if (!(e === void 0 || !Number.isFinite(e)) && Number.isInteger(e))
|
|
553
|
-
return Math.max(0, Math.min(
|
|
553
|
+
return Math.max(0, Math.min(at, e));
|
|
554
554
|
}
|
|
555
555
|
function we(e) {
|
|
556
556
|
var t;
|
|
557
557
|
return ((t = e == null ? void 0 : e.comparison) == null ? void 0 : t.mode) === "explicit" ? e.comparison.spec : void 0;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function it(e) {
|
|
560
560
|
var t;
|
|
561
561
|
return ((t = we(e)) == null ? void 0 : t.kind) || "none";
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function bn(e) {
|
|
564
564
|
const t = we(e);
|
|
565
565
|
return (t == null ? void 0 : t.kind) === "target" ? t.targetValue : void 0;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Sn(e) {
|
|
568
568
|
return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) || qe;
|
|
569
569
|
}
|
|
570
570
|
function Y(e, t) {
|
|
@@ -580,17 +580,17 @@ function Y(e, t) {
|
|
|
580
580
|
);
|
|
581
581
|
return a.length === 1 ? a[0][1] : void 0;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function Cn(e, t) {
|
|
584
584
|
const n = Y(e, t);
|
|
585
585
|
return {
|
|
586
|
-
comparisonKind: (n == null ? void 0 : n.type) ??
|
|
586
|
+
comparisonKind: (n == null ? void 0 : n.type) ?? it(t),
|
|
587
587
|
metadata: n
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function gn(e) {
|
|
591
591
|
return (e == null ? void 0 : e.showComparison) ?? Be.showComparison;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function kn(e) {
|
|
594
594
|
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
595
595
|
return Object.entries(e || {}).forEach(([c, u]) => {
|
|
596
596
|
const d = u.output;
|
|
@@ -611,14 +611,14 @@ function gn(e) {
|
|
|
611
611
|
comparisonSeriesLabels: o
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
|
-
const
|
|
614
|
+
const ot = "SEMAPHOR_CALCULATED_FIELD";
|
|
615
615
|
function J(e, t, n) {
|
|
616
616
|
if (n && (t === "groupby" || t === "pivotby"))
|
|
617
617
|
return n;
|
|
618
618
|
if (t === "metric" && e.name === "*" && !e.expression)
|
|
619
619
|
return e.alias || "count";
|
|
620
620
|
if (e.alias) return e.alias;
|
|
621
|
-
const r = e.entityName && e.entityName !==
|
|
621
|
+
const r = e.entityName && e.entityName !== ot ? e.entityName : void 0;
|
|
622
622
|
if (e.role === "metric") {
|
|
623
623
|
let a = e.aggregate || "metric";
|
|
624
624
|
if (e.expression) {
|
|
@@ -632,14 +632,14 @@ function J(e, t, n) {
|
|
|
632
632
|
}
|
|
633
633
|
return r && r !== e.name ? `${r}_${e.name}` : e.name;
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function wn(e) {
|
|
636
636
|
return J(e, "detail");
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function ct(e) {
|
|
639
639
|
const t = e.label;
|
|
640
640
|
return t && e.labelCount === 1 && (t === e.rawKey || !e.rawKeys.has(t)) ? t : e.rawKey;
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function An(e) {
|
|
643
643
|
const t = [
|
|
644
644
|
...(e.groupByColumns ?? []).map((s) => ({ field: s, role: "groupby" })),
|
|
645
645
|
...(e.metricColumns ?? []).map((s) => ({ field: s, role: "metric" })),
|
|
@@ -651,7 +651,7 @@ function wn(e) {
|
|
|
651
651
|
return new Map(
|
|
652
652
|
t.map(({ field: s }) => [
|
|
653
653
|
s,
|
|
654
|
-
|
|
654
|
+
ct({
|
|
655
655
|
label: s.label,
|
|
656
656
|
labelCount: s.label ? a.get(s.label) ?? 0 : 0,
|
|
657
657
|
rawKey: n.get(s),
|
|
@@ -660,16 +660,16 @@ function wn(e) {
|
|
|
660
660
|
])
|
|
661
661
|
);
|
|
662
662
|
}
|
|
663
|
-
const Ae = "text", R = 100,
|
|
664
|
-
function
|
|
663
|
+
const Ae = "text", R = 100, ut = 10, S = "value", ve = ["previous", "change", "percentChange"];
|
|
664
|
+
function dt(e) {
|
|
665
665
|
return ve.includes(e);
|
|
666
666
|
}
|
|
667
|
-
const
|
|
668
|
-
function
|
|
667
|
+
const lt = ["up", "down", "flat"];
|
|
668
|
+
function vn(e, t, n) {
|
|
669
669
|
const { signWords: r, absolute: a, percent: s, ...i } = t ?? {};
|
|
670
670
|
return e !== "change" && e !== "percentChange" ? i : {
|
|
671
671
|
...i,
|
|
672
|
-
...(n == null ? void 0 : n.signWords) === void 0 ? { signWords:
|
|
672
|
+
...(n == null ? void 0 : n.signWords) === void 0 ? { signWords: lt } : {},
|
|
673
673
|
...(n == null ? void 0 : n.absolute) === void 0 ? { absolute: !0 } : {},
|
|
674
674
|
...e === "percentChange" && (n == null ? void 0 : n.percent) === void 0 ? { percent: !0 } : {}
|
|
675
675
|
};
|
|
@@ -698,7 +698,7 @@ const fe = {
|
|
|
698
698
|
answer: /* @__PURE__ */ new WeakMap(),
|
|
699
699
|
preview: /* @__PURE__ */ new WeakMap()
|
|
700
700
|
};
|
|
701
|
-
function
|
|
701
|
+
function ft(e, t = "answer") {
|
|
702
702
|
var s;
|
|
703
703
|
const n = fe[t].get(e);
|
|
704
704
|
if (n) return n;
|
|
@@ -718,10 +718,10 @@ function lt(e, t = "answer") {
|
|
|
718
718
|
};
|
|
719
719
|
return fe[t].set(e, a), a;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function Tn(e) {
|
|
722
722
|
return e.type === Ae && typeof e.dataVariableId == "string" && e.dataVariableId.length > 0;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function En(e, t, n) {
|
|
725
725
|
var r;
|
|
726
726
|
if (n === S && ((r = e.query.sql) != null && r.trim())) {
|
|
727
727
|
const a = Object.keys(t)[0];
|
|
@@ -733,12 +733,12 @@ function z(e) {
|
|
|
733
733
|
const t = Q(e);
|
|
734
734
|
return t === "string" || t === "unknown" ? "text" : t;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function mt(e) {
|
|
737
737
|
return typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : "text";
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function pt(e, t, n, r) {
|
|
740
740
|
var i, o;
|
|
741
|
-
const a =
|
|
741
|
+
const a = ze(r, e.id, t);
|
|
742
742
|
return [
|
|
743
743
|
a == null ? void 0 : a.outputKey,
|
|
744
744
|
a == null ? void 0 : a.rawKey,
|
|
@@ -748,19 +748,19 @@ function mt(e, t, n, r) {
|
|
|
748
748
|
e.name
|
|
749
749
|
].find((c) => !!c && n.has(c));
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function Kn(e, t) {
|
|
752
752
|
var r;
|
|
753
753
|
if (e.get.kind === "aggregate")
|
|
754
754
|
return H(e) ? [S, ...ve] : [S];
|
|
755
755
|
if (e.get.kind === "list") return [S];
|
|
756
756
|
if ((r = e.query.sql) != null && r.trim()) return [...t ?? []];
|
|
757
757
|
const n = e.query.config;
|
|
758
|
-
return
|
|
758
|
+
return ht([
|
|
759
759
|
...((n == null ? void 0 : n.groupByColumns) ?? []).map((a) => a.name),
|
|
760
760
|
...((n == null ? void 0 : n.metricColumns) ?? []).map((a) => a.name)
|
|
761
761
|
]);
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function Nn(e, t) {
|
|
764
764
|
var s, i, o, c;
|
|
765
765
|
if (e.get.kind === "list") return "list";
|
|
766
766
|
if ((s = e.query.sql) != null && s.trim()) return;
|
|
@@ -770,25 +770,25 @@ function Kn(e, t) {
|
|
|
770
770
|
return Q(f) === "unknown" ? void 0 : z(f);
|
|
771
771
|
};
|
|
772
772
|
if (e.get.kind === "aggregate")
|
|
773
|
-
return
|
|
773
|
+
return dt(t) && H(e) ? "number" : t === S ? r((i = n == null ? void 0 : n.metricColumns) == null ? void 0 : i[0], "metric") : void 0;
|
|
774
774
|
const a = (o = n == null ? void 0 : n.groupByColumns) == null ? void 0 : o.find((u) => u.name === t);
|
|
775
775
|
return a ? r(a, "groupby") : r((c = n == null ? void 0 : n.metricColumns) == null ? void 0 : c.find((u) => u.name === t), "metric");
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function ht(e) {
|
|
778
778
|
return [...new Set(e)];
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function yt(e, t, n) {
|
|
781
781
|
var p, I, g;
|
|
782
782
|
const r = t[0] ?? {}, a = new Set(
|
|
783
783
|
(p = n.columns) != null && p.length ? n.columns.map((m) => m.key) : Object.keys(r)
|
|
784
784
|
), s = new Map(
|
|
785
785
|
(n.columns ?? []).map((m) => [m.key, m.dataType])
|
|
786
|
-
), i = (m, k) => s.has(m) ? z(s.get(m)) : k !== void 0 ? z(k) :
|
|
786
|
+
), i = (m, k) => s.has(m) ? z(s.get(m)) : k !== void 0 ? z(k) : mt(r[m]);
|
|
787
787
|
if ((I = e.query.sql) != null && I.trim())
|
|
788
788
|
return [...a].map((m) => ({ part: m, key: m, type: i(m, void 0) }));
|
|
789
789
|
const o = e.query.config ?? {}, c = [], u = a.size === 1 ? [...a][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", f = (m, k, te) => {
|
|
790
790
|
if (c.some((Fe) => Fe.part === te)) return;
|
|
791
|
-
const K =
|
|
791
|
+
const K = pt(m, k, a, n.columnKeyMap) ?? (d ? u : void 0);
|
|
792
792
|
if (!K) return;
|
|
793
793
|
const _e = k === "metric" ? i(K, B(m)) : i(K, m.dataType);
|
|
794
794
|
c.push({ part: te, key: K, type: _e });
|
|
@@ -810,7 +810,7 @@ function W(e, t) {
|
|
|
810
810
|
function w(e) {
|
|
811
811
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function On(e) {
|
|
814
814
|
if (!w(e)) return {};
|
|
815
815
|
const t = w(e.data) ? e.data : e, n = O(e).length ? O(e) : O(t), r = w(t.metadata) ? t.metadata : void 0;
|
|
816
816
|
return {
|
|
@@ -822,17 +822,17 @@ function Nn(e) {
|
|
|
822
822
|
...typeof t.error == "string" && t.error ? { error: t.error } : {}
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Dn(e, t, n = "answer") {
|
|
826
826
|
var d;
|
|
827
827
|
const r = (Array.isArray(t.records) ? t.records : []).filter(
|
|
828
828
|
(f) => !!f && typeof f == "object"
|
|
829
829
|
), a = O(t), s = n === "preview" ? { matched: r.length > R ? "beyondCap" : r.length } : {};
|
|
830
830
|
if (!r.length) return { status: "none", why: "noRows", filterReach: a, ...s };
|
|
831
|
-
const i =
|
|
831
|
+
const i = yt(e, r, t);
|
|
832
832
|
if (e.get.kind === "list") {
|
|
833
833
|
const f = i[0], y = r.length > R, h = f ? r.map((I) => W(I[f.key], f.type)).filter((I) => I.value !== null) : [];
|
|
834
834
|
if (!h.length && !y) return { status: "none", why: "noRows", filterReach: a, ...s };
|
|
835
|
-
const p = Math.max(1, e.get.limit ??
|
|
835
|
+
const p = Math.max(1, e.get.limit ?? ut);
|
|
836
836
|
return {
|
|
837
837
|
status: "listed",
|
|
838
838
|
items: h.slice(0, p),
|
|
@@ -848,7 +848,7 @@ function On(e, t, n = "answer") {
|
|
|
848
848
|
);
|
|
849
849
|
if (e.get.kind === "aggregate" && ((d = c[S]) == null ? void 0 : d.value) == null)
|
|
850
850
|
return { status: "none", why: "noRows", filterReach: a, ...s };
|
|
851
|
-
const u = H(e) ?
|
|
851
|
+
const u = H(e) ? It(e, o, t) : void 0;
|
|
852
852
|
return {
|
|
853
853
|
status: "answered",
|
|
854
854
|
parts: u && "parts" in u ? { ...c, ...u.parts } : c,
|
|
@@ -857,7 +857,7 @@ function On(e, t, n = "answer") {
|
|
|
857
857
|
...s
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function It(e, t, n) {
|
|
861
861
|
var o, c;
|
|
862
862
|
const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], a = r ? Y(n.comparisonMetadata, r) : void 0, s = a == null ? void 0 : a.output;
|
|
863
863
|
if (!s || s.availability.status !== "available" || !s.comparisonColumnKey)
|
|
@@ -898,22 +898,22 @@ function X(e) {
|
|
|
898
898
|
kind: "variable",
|
|
899
899
|
id: s.id,
|
|
900
900
|
variable: s,
|
|
901
|
-
card:
|
|
901
|
+
card: ft(s)
|
|
902
902
|
})
|
|
903
903
|
)
|
|
904
904
|
], a = { targets: r, byId: new Map(r.map((s) => [s.id, s])) };
|
|
905
905
|
return me.set(e, a), a;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function bt(e) {
|
|
908
908
|
return X(e).targets;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function xn(e, t) {
|
|
911
911
|
return X(e).byId.get(t);
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function St(e, t) {
|
|
914
914
|
return X(e).byId.has(t);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Ct(e, t) {
|
|
917
917
|
return t.kind === "card" ? [
|
|
918
918
|
{
|
|
919
919
|
sheetId: t.sheetId,
|
|
@@ -923,17 +923,17 @@ function St(e, t) {
|
|
|
923
923
|
}
|
|
924
924
|
] : ke(e, t.id);
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
return
|
|
926
|
+
function gt(e, t, n) {
|
|
927
|
+
return Ct(e, n).some(
|
|
928
928
|
(r) => C(t, r)
|
|
929
929
|
);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
return
|
|
933
|
-
(n) => n.kind === "variable" &&
|
|
931
|
+
function Rn(e, t) {
|
|
932
|
+
return bt(e).filter(
|
|
933
|
+
(n) => n.kind === "variable" && gt(e, t, n)
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
const
|
|
936
|
+
const kt = ["new", "edit", "delete", "create", "update", "remove"];
|
|
937
937
|
function Te(e, t) {
|
|
938
938
|
return (e.sheets || []).flatMap(
|
|
939
939
|
(n) => _({ sheets: [n] }).filter(t).map((r) => ({
|
|
@@ -949,20 +949,20 @@ function Te(e, t) {
|
|
|
949
949
|
function T(e) {
|
|
950
950
|
return Te(e, (t) => t.kind !== "documentSectionCard");
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function Mn(e) {
|
|
953
953
|
return [
|
|
954
954
|
...T(e),
|
|
955
955
|
...Te(e, (t) => t.kind === "documentSectionCard")
|
|
956
956
|
];
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function _n(e) {
|
|
959
959
|
return T(e).map((t) => t.card);
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
return n && t === n ? !0 : !
|
|
961
|
+
function Fn(e, t, n) {
|
|
962
|
+
return n && t === n ? !0 : !St(e, t);
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return !e || e.trim().length === 0 ? { isValid: !1, error: "Card ID cannot be empty" } : e.length < 3 ? { isValid: !1, error: "Card ID must be at least 3 characters" } : e.length > 50 ? { isValid: !1, error: "Card ID must be less than 50 characters" } : /^[a-zA-Z0-9-_]+$/.test(e) ? /^[a-zA-Z0-9]/.test(e) ?
|
|
964
|
+
function Vn(e) {
|
|
965
|
+
return !e || e.trim().length === 0 ? { isValid: !1, error: "Card ID cannot be empty" } : e.length < 3 ? { isValid: !1, error: "Card ID must be at least 3 characters" } : e.length > 50 ? { isValid: !1, error: "Card ID must be less than 50 characters" } : /^[a-zA-Z0-9-_]+$/.test(e) ? /^[a-zA-Z0-9]/.test(e) ? kt.includes(e.toLowerCase()) ? {
|
|
966
966
|
isValid: !1,
|
|
967
967
|
error: `"${e}" is a reserved keyword and cannot be used`
|
|
968
968
|
} : { isValid: !0 } : {
|
|
@@ -973,16 +973,16 @@ function Fn(e) {
|
|
|
973
973
|
error: "Card ID can only contain letters, numbers, hyphens, and underscores"
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function Pn(e, t) {
|
|
977
977
|
var n;
|
|
978
|
-
return (n =
|
|
978
|
+
return (n = wt(e, t)) == null ? void 0 : n.card;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function wt(e, t) {
|
|
981
981
|
for (const n of T(e))
|
|
982
982
|
if (n.card.id === t)
|
|
983
983
|
return n;
|
|
984
984
|
}
|
|
985
|
-
function
|
|
985
|
+
function Ln(e, t) {
|
|
986
986
|
for (const n of e.sheets || [])
|
|
987
987
|
for (const r of n.frames || [])
|
|
988
988
|
for (const a of r.cards || [])
|
|
@@ -1004,12 +1004,12 @@ function Ee(e) {
|
|
|
1004
1004
|
label: e.label
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function At(e) {
|
|
1008
1008
|
var n;
|
|
1009
1009
|
const t = Ee(e.source);
|
|
1010
1010
|
return t ? `${(n = e.source) == null ? void 0 : n.kind}:${t.qualifiedEntityName || t.entityName}` : "";
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function vt(e) {
|
|
1013
1013
|
return [
|
|
1014
1014
|
e.id,
|
|
1015
1015
|
e.qualifiedEntityName,
|
|
@@ -1019,33 +1019,33 @@ function At(e) {
|
|
|
1019
1019
|
e.name,
|
|
1020
1020
|
// Source-only fields from different datasets can otherwise share a key
|
|
1021
1021
|
// and the second dataset would be silently dropped.
|
|
1022
|
-
|
|
1022
|
+
At(e)
|
|
1023
1023
|
].join("|");
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Tt(e) {
|
|
1026
1026
|
return [e.entityName, e.qualifiedEntityName || "", e.entityId || ""].join("|");
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function $n(e) {
|
|
1029
1029
|
return e.entityName || e.qualifiedEntityName || "";
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function Et(e) {
|
|
1032
1032
|
var t, n;
|
|
1033
1033
|
return !!(e.expression || e.derivedField || (n = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && n.length);
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1036
|
-
return Ve(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source ||
|
|
1035
|
+
function Kt(e) {
|
|
1036
|
+
return Ve(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || Et(e);
|
|
1037
1037
|
}
|
|
1038
1038
|
function L(e, t) {
|
|
1039
|
-
const n =
|
|
1039
|
+
const n = Tt(t);
|
|
1040
1040
|
e.found.has(n) || e.found.set(n, t);
|
|
1041
1041
|
}
|
|
1042
1042
|
function E(e, t) {
|
|
1043
1043
|
var u, d, f;
|
|
1044
1044
|
if (!e) return;
|
|
1045
|
-
const n =
|
|
1045
|
+
const n = vt(e);
|
|
1046
1046
|
if (t.visitedFields.has(n)) return;
|
|
1047
1047
|
t.visitedFields.add(n);
|
|
1048
|
-
const r =
|
|
1048
|
+
const r = Kt(e);
|
|
1049
1049
|
if (!r) {
|
|
1050
1050
|
const y = !e.entityName && !e.qualifiedEntityName ? Ee(e.source) : void 0;
|
|
1051
1051
|
L(
|
|
@@ -1117,7 +1117,7 @@ function ee(e, t) {
|
|
|
1117
1117
|
const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
|
|
1118
1118
|
return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function qn(e) {
|
|
1121
1121
|
const t = F(!1);
|
|
1122
1122
|
return E(e, t), { datasets: Array.from(t.found.values()), complete: t.complete };
|
|
1123
1123
|
}
|
|
@@ -1128,38 +1128,38 @@ function Ke(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(),
|
|
|
1128
1128
|
c && t.add(c);
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function Bn(e, t) {
|
|
1132
1132
|
Ke(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
|
|
1133
1133
|
preferQualifiedIdentity: !0
|
|
1134
1134
|
});
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function jn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
1137
1137
|
const a = F(!0, n, r);
|
|
1138
1138
|
E(e, a), a.found.forEach((s) => {
|
|
1139
1139
|
const i = ee(s, "qualifiedOnly");
|
|
1140
1140
|
i && t.add(i);
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function Un(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
1144
1144
|
Ke(e, t, n, r, {
|
|
1145
1145
|
includeMetricFilterDatasets: !1
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function zn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = M) {
|
|
1149
1149
|
const s = { ...M, ...a }, i = F(s.includeMetricFilterDatasets, n, r);
|
|
1150
1150
|
Z(e, i), i.found.forEach((o) => {
|
|
1151
1151
|
const c = ee(o, s.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
1152
1152
|
c && t.add(c);
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function Wn(e, t) {
|
|
1156
1156
|
return t != null && t[e] ? t[e] : (e.includes(".") ? e.slice(e.lastIndexOf(".") + 1) : e).replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/\b\w/g, (r) => r.toUpperCase());
|
|
1157
1157
|
}
|
|
1158
|
-
const
|
|
1158
|
+
const Gn = {
|
|
1159
1159
|
database: null,
|
|
1160
1160
|
schema: null,
|
|
1161
1161
|
table: null
|
|
1162
|
-
},
|
|
1162
|
+
}, Qn = "__card_default__", Nt = {
|
|
1163
1163
|
date: /* @__PURE__ */ new Set([
|
|
1164
1164
|
"between",
|
|
1165
1165
|
"not between",
|
|
@@ -1198,14 +1198,14 @@ const Wn = {
|
|
|
1198
1198
|
]),
|
|
1199
1199
|
boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
|
|
1200
1200
|
};
|
|
1201
|
-
function
|
|
1201
|
+
function Ot(e) {
|
|
1202
1202
|
const t = Q(e);
|
|
1203
1203
|
return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return typeof t != "string" ? !1 :
|
|
1205
|
+
function Yn(e, t) {
|
|
1206
|
+
return typeof t != "string" ? !1 : Nt[Ot(e)].has(t);
|
|
1207
1207
|
}
|
|
1208
|
-
const
|
|
1208
|
+
const Dt = /* @__PURE__ */ new Set([
|
|
1209
1209
|
"=",
|
|
1210
1210
|
">",
|
|
1211
1211
|
"<",
|
|
@@ -1221,19 +1221,20 @@ const Ot = /* @__PURE__ */ new Set([
|
|
|
1221
1221
|
"is null",
|
|
1222
1222
|
"is not null"
|
|
1223
1223
|
]);
|
|
1224
|
-
function
|
|
1224
|
+
function xt(e, t) {
|
|
1225
1225
|
return t === "number" ? typeof e == "number" && Number.isFinite(e) : t === "boolean" ? typeof e == "boolean" : t === "date" ? e instanceof Date || typeof e == "string" && e.trim().length > 0 : typeof e == "string" || typeof e == "number" || typeof e == "boolean";
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1227
|
+
function Rt(e, t, n, r) {
|
|
1228
|
+
const a = Pe(e.relativeMeta);
|
|
1229
|
+
if (a && je(a).dataAnchored) {
|
|
1229
1230
|
r.push(
|
|
1230
1231
|
`${n}.relativeMeta counts back from the latest data; a dashboard filter's dates run to now. Use a period counted back from today.`
|
|
1231
1232
|
);
|
|
1232
1233
|
return;
|
|
1233
1234
|
}
|
|
1234
|
-
|
|
1235
|
+
Mt(e.operation, e.values, t, `${n}.values`, r);
|
|
1235
1236
|
}
|
|
1236
|
-
function
|
|
1237
|
+
function Mt(e, t, n, r, a) {
|
|
1237
1238
|
if (e === "is null" || e === "is not null") {
|
|
1238
1239
|
t.length !== 0 && a.push(`${r} must be empty for null filter operations.`);
|
|
1239
1240
|
return;
|
|
@@ -1259,7 +1260,7 @@ function Rt(e, t, n, r, a) {
|
|
|
1259
1260
|
return;
|
|
1260
1261
|
}
|
|
1261
1262
|
for (const s of t)
|
|
1262
|
-
if (!
|
|
1263
|
+
if (!xt(s, n)) {
|
|
1263
1264
|
a.push(
|
|
1264
1265
|
`${r} contains a value that is incompatible with valueType '${n}'.`
|
|
1265
1266
|
);
|
|
@@ -1275,10 +1276,10 @@ const G = {
|
|
|
1275
1276
|
rememberedTableSettingsMaxBytes: 262144,
|
|
1276
1277
|
bookmarkStateMaxBytes: 65536
|
|
1277
1278
|
}, Ne = 1;
|
|
1278
|
-
function
|
|
1279
|
+
function Jn(e) {
|
|
1279
1280
|
return new TextEncoder().encode(JSON.stringify(e ?? null)).length;
|
|
1280
1281
|
}
|
|
1281
|
-
function
|
|
1282
|
+
function _t(e) {
|
|
1282
1283
|
const t = encodeURIComponent;
|
|
1283
1284
|
switch (e.kind) {
|
|
1284
1285
|
case "dimension":
|
|
@@ -1299,7 +1300,7 @@ function N(e) {
|
|
|
1299
1300
|
return;
|
|
1300
1301
|
}
|
|
1301
1302
|
}
|
|
1302
|
-
function
|
|
1303
|
+
function Ft(e) {
|
|
1303
1304
|
if (typeof e != "string") return;
|
|
1304
1305
|
const t = e.split(":");
|
|
1305
1306
|
let n;
|
|
@@ -1313,12 +1314,12 @@ function _t(e) {
|
|
|
1313
1314
|
const r = N(t[1]);
|
|
1314
1315
|
r && (n = { kind: "result", key: r });
|
|
1315
1316
|
}
|
|
1316
|
-
return n &&
|
|
1317
|
+
return n && _t(n) === e ? n : void 0;
|
|
1317
1318
|
}
|
|
1318
1319
|
function D(e) {
|
|
1319
|
-
return typeof e == "string" &&
|
|
1320
|
+
return typeof e == "string" && Ft(e) !== void 0;
|
|
1320
1321
|
}
|
|
1321
|
-
const pe = l.array(l.string()).max(2e3),
|
|
1322
|
+
const pe = l.array(l.string()).max(2e3), Vt = l.object({
|
|
1322
1323
|
order: pe.optional(),
|
|
1323
1324
|
hidden: pe.optional(),
|
|
1324
1325
|
labels: l.record(l.string(), l.string().max(G.columnLabelMaxChars)).optional(),
|
|
@@ -1359,7 +1360,7 @@ function Oe(e) {
|
|
|
1359
1360
|
direction: u
|
|
1360
1361
|
}))), i.length && (o.widths = Object.fromEntries(i)), Object.keys(o).length ? o : void 0;
|
|
1361
1362
|
}
|
|
1362
|
-
function
|
|
1363
|
+
function Hn(e) {
|
|
1363
1364
|
var t, n;
|
|
1364
1365
|
return !!((t = e == null ? void 0 : e.order) != null && t.length) || !!((n = e == null ? void 0 : e.hidden) != null && n.length) || Object.keys((e == null ? void 0 : e.labels) ?? {}).length > 0 || Object.keys((e == null ? void 0 : e.widths) ?? {}).length > 0;
|
|
1365
1366
|
}
|
|
@@ -1372,13 +1373,13 @@ function xe(e, t) {
|
|
|
1372
1373
|
ok: !1,
|
|
1373
1374
|
error: `Unsupported table settings version ${t}.`
|
|
1374
1375
|
};
|
|
1375
|
-
const n =
|
|
1376
|
+
const n = Vt.safeParse(e);
|
|
1376
1377
|
return n.success ? {
|
|
1377
1378
|
ok: !0,
|
|
1378
1379
|
value: Oe(n.data) ?? {}
|
|
1379
1380
|
} : { ok: !1, error: "Table settings are invalid." };
|
|
1380
1381
|
}
|
|
1381
|
-
function
|
|
1382
|
+
function Xn(e, t, n) {
|
|
1382
1383
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
1383
1384
|
const r = {};
|
|
1384
1385
|
for (const [a, s] of Object.entries(
|
|
@@ -1390,28 +1391,28 @@ function Hn(e, t, n) {
|
|
|
1390
1391
|
}
|
|
1391
1392
|
return r;
|
|
1392
1393
|
}
|
|
1393
|
-
const
|
|
1394
|
+
const Pt = /* @__PURE__ */ new Set([
|
|
1394
1395
|
"table",
|
|
1395
1396
|
"detailTable"
|
|
1396
1397
|
]);
|
|
1397
1398
|
function Re(e) {
|
|
1398
|
-
return
|
|
1399
|
+
return Pt.has(e.type);
|
|
1399
1400
|
}
|
|
1400
|
-
function
|
|
1401
|
+
function Lt(e) {
|
|
1401
1402
|
var t, n;
|
|
1402
1403
|
return Re(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
|
|
1403
1404
|
}
|
|
1404
|
-
function
|
|
1405
|
+
function Zn(e) {
|
|
1405
1406
|
return new Set(
|
|
1406
1407
|
T(e).filter(({ card: t }) => Re(t)).map(({ card: t }) => t.id)
|
|
1407
1408
|
);
|
|
1408
1409
|
}
|
|
1409
|
-
function
|
|
1410
|
+
function er(e) {
|
|
1410
1411
|
return new Set(
|
|
1411
|
-
T(e).filter(({ card: t }) =>
|
|
1412
|
+
T(e).filter(({ card: t }) => Lt(t)).map(({ card: t }) => t.id)
|
|
1412
1413
|
);
|
|
1413
1414
|
}
|
|
1414
|
-
const $ = 1,
|
|
1415
|
+
const $ = 1, tr = ["PRIVATE", "TEAM", "DASHBOARD"], $t = l.object({
|
|
1415
1416
|
filterId: l.string().min(1),
|
|
1416
1417
|
name: l.string(),
|
|
1417
1418
|
operation: l.string(),
|
|
@@ -1419,22 +1420,22 @@ const $ = 1, er = ["PRIVATE", "TEAM", "DASHBOARD"], Lt = l.object({
|
|
|
1419
1420
|
values: l.array(l.unknown())
|
|
1420
1421
|
}).passthrough().superRefine((e, t) => {
|
|
1421
1422
|
const n = [];
|
|
1422
|
-
|
|
1423
|
+
Dt.has(e.operation) ? Rt(e, e.valueType, "filterValue", n) : n.push("filterValue.operation must be a valid filter operation.");
|
|
1423
1424
|
for (const r of n) t.addIssue({ code: "custom", message: r });
|
|
1424
1425
|
}), q = l.unknown().superRefine((e, t) => {
|
|
1425
|
-
for (const n of
|
|
1426
|
+
for (const n of Ue(e).errors)
|
|
1426
1427
|
t.addIssue({ code: "custom", message: n.message });
|
|
1427
|
-
}),
|
|
1428
|
-
l.object({ kind: l.literal("filter"), filterValue:
|
|
1428
|
+
}), qt = l.discriminatedUnion("kind", [
|
|
1429
|
+
l.object({ kind: l.literal("filter"), filterValue: $t }).strict(),
|
|
1429
1430
|
l.object({ kind: l.literal("control"), value: l.unknown() }).strict(),
|
|
1430
1431
|
l.object({
|
|
1431
1432
|
kind: l.literal("selection"),
|
|
1432
1433
|
selection: Le
|
|
1433
1434
|
}).strict()
|
|
1434
|
-
]),
|
|
1435
|
+
]), Bt = l.union([
|
|
1435
1436
|
l.object({
|
|
1436
1437
|
status: l.literal("set"),
|
|
1437
|
-
value:
|
|
1438
|
+
value: qt,
|
|
1438
1439
|
comparisonSelection: q.optional()
|
|
1439
1440
|
}).strict(),
|
|
1440
1441
|
l.object({
|
|
@@ -1442,7 +1443,7 @@ const $ = 1, er = ["PRIVATE", "TEAM", "DASHBOARD"], Lt = l.object({
|
|
|
1442
1443
|
comparisonSelection: q.optional()
|
|
1443
1444
|
}).strict(),
|
|
1444
1445
|
l.object({ comparisonSelection: q }).strict()
|
|
1445
|
-
]), Me = ["bySheetId", "byCardId", "byDocumentSectionId"],
|
|
1446
|
+
]), Me = ["bySheetId", "byCardId", "byDocumentSectionId"], jt = /* @__PURE__ */ new Set(["version", "selectedSheetId", "inputs", "tableSettings"]), Ut = /* @__PURE__ */ new Set(["shared", ...Me]), A = (e) => !!e && typeof e == "object" && !Array.isArray(e);
|
|
1446
1447
|
function ye(e, t, n) {
|
|
1447
1448
|
if (e === void 0) return;
|
|
1448
1449
|
if (!A(e)) {
|
|
@@ -1451,7 +1452,7 @@ function ye(e, t, n) {
|
|
|
1451
1452
|
}
|
|
1452
1453
|
const r = {};
|
|
1453
1454
|
for (const [a, s] of Object.entries(e)) {
|
|
1454
|
-
const i = a ?
|
|
1455
|
+
const i = a ? Bt.safeParse(s) : void 0;
|
|
1455
1456
|
i != null && i.success ? r[a] = i.data : t.push({
|
|
1456
1457
|
target: $e(a) ? "selection" : "input",
|
|
1457
1458
|
id: a
|
|
@@ -1459,18 +1460,18 @@ function ye(e, t, n) {
|
|
|
1459
1460
|
}
|
|
1460
1461
|
return Object.keys(r).length ? r : void 0;
|
|
1461
1462
|
}
|
|
1462
|
-
function
|
|
1463
|
+
function zt(e, t) {
|
|
1463
1464
|
if (t !== $)
|
|
1464
1465
|
return { ok: !1, error: `Unsupported bookmark version ${t}.` };
|
|
1465
1466
|
if (!A(e) || e.version !== $)
|
|
1466
1467
|
return { ok: !1, error: "The bookmark state is invalid." };
|
|
1467
|
-
const n = [], r = Object.keys(e).filter((o) => !
|
|
1468
|
+
const n = [], r = Object.keys(e).filter((o) => !jt.has(o));
|
|
1468
1469
|
let a;
|
|
1469
1470
|
typeof e.selectedSheetId == "string" && e.selectedSheetId ? a = e.selectedSheetId : e.selectedSheetId !== void 0 && n.push({ target: "sheet", id: String(e.selectedSheetId) });
|
|
1470
1471
|
const s = {};
|
|
1471
1472
|
if (A(e.inputs)) {
|
|
1472
1473
|
r.push(
|
|
1473
|
-
...Object.keys(e.inputs).filter((c) => !
|
|
1474
|
+
...Object.keys(e.inputs).filter((c) => !Ut.has(c)).map((c) => `inputs.${c}`)
|
|
1474
1475
|
);
|
|
1475
1476
|
const o = ye(e.inputs.shared, n, "shared");
|
|
1476
1477
|
o && (s.shared = o);
|
|
@@ -1508,118 +1509,118 @@ function Ut(e, t) {
|
|
|
1508
1509
|
unknownKeys: r
|
|
1509
1510
|
};
|
|
1510
1511
|
}
|
|
1511
|
-
function
|
|
1512
|
-
const n =
|
|
1512
|
+
function nr(e, t) {
|
|
1513
|
+
const n = zt(e, t);
|
|
1513
1514
|
return n.ok ? n.issues.some((r) => r.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : n.issues.length || n.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: n.value } : n;
|
|
1514
1515
|
}
|
|
1515
1516
|
export {
|
|
1516
|
-
|
|
1517
|
+
Qe as $,
|
|
1517
1518
|
_ as A,
|
|
1518
1519
|
$ as B,
|
|
1519
|
-
|
|
1520
|
+
Qn as C,
|
|
1520
1521
|
C as D,
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1522
|
+
Gn as E,
|
|
1523
|
+
un as F,
|
|
1524
|
+
xn as G,
|
|
1525
|
+
An as H,
|
|
1526
|
+
We as I,
|
|
1527
|
+
st as J,
|
|
1528
|
+
bt as K,
|
|
1529
|
+
mn as L,
|
|
1529
1530
|
de as M,
|
|
1530
|
-
|
|
1531
|
-
|
|
1531
|
+
et as N,
|
|
1532
|
+
on as O,
|
|
1532
1533
|
ge as P,
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1534
|
+
hn as Q,
|
|
1535
|
+
Kn as R,
|
|
1536
|
+
In as S,
|
|
1536
1537
|
J as T,
|
|
1537
|
-
|
|
1538
|
+
wn as U,
|
|
1538
1539
|
G as V,
|
|
1539
|
-
|
|
1540
|
+
ct as W,
|
|
1540
1541
|
ne as X,
|
|
1541
1542
|
re as Y,
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1543
|
+
Ge as Z,
|
|
1544
|
+
Zt as _,
|
|
1545
|
+
$n as a,
|
|
1546
|
+
en as a0,
|
|
1547
|
+
cn as a1,
|
|
1548
|
+
dn as a2,
|
|
1549
|
+
ln as a3,
|
|
1550
|
+
fn as a4,
|
|
1551
|
+
pn as a5,
|
|
1552
|
+
yn as a6,
|
|
1552
1553
|
Ae as a7,
|
|
1553
1554
|
R as a8,
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1555
|
+
ut as a9,
|
|
1556
|
+
_n as aA,
|
|
1557
|
+
nn as aB,
|
|
1558
|
+
He as aC,
|
|
1558
1559
|
v as aD,
|
|
1559
1560
|
Y as aE,
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1561
|
+
Cn as aF,
|
|
1562
|
+
kn as aG,
|
|
1563
|
+
gn as aH,
|
|
1563
1564
|
T as aI,
|
|
1564
|
-
|
|
1565
|
-
|
|
1565
|
+
it as aJ,
|
|
1566
|
+
Sn as aK,
|
|
1566
1567
|
se as aL,
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1568
|
+
bn as aM,
|
|
1569
|
+
Mn as aN,
|
|
1570
|
+
Ye as aO,
|
|
1571
|
+
Fn as aP,
|
|
1572
|
+
Vn as aQ,
|
|
1573
|
+
Ln as aR,
|
|
1574
|
+
tn as aS,
|
|
1574
1575
|
S as aa,
|
|
1575
1576
|
ve as ab,
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1577
|
+
dt as ac,
|
|
1578
|
+
lt as ad,
|
|
1579
|
+
vn as ae,
|
|
1579
1580
|
H as af,
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1581
|
+
ft as ag,
|
|
1582
|
+
Tn as ah,
|
|
1583
|
+
En as ai,
|
|
1584
|
+
Nn as aj,
|
|
1585
|
+
On as ak,
|
|
1586
|
+
Dn as al,
|
|
1587
|
+
rn as am,
|
|
1588
|
+
Ze as an,
|
|
1589
|
+
sn as ao,
|
|
1590
|
+
an as ap,
|
|
1590
1591
|
ke as aq,
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1592
|
+
St as ar,
|
|
1593
|
+
Ct as as,
|
|
1594
|
+
gt as at,
|
|
1595
|
+
Rn as au,
|
|
1596
|
+
Ot as av,
|
|
1597
|
+
Yn as aw,
|
|
1598
|
+
Dt as ax,
|
|
1599
|
+
Rt as ay,
|
|
1600
|
+
wt as az,
|
|
1601
|
+
Bn as b,
|
|
1601
1602
|
Ke as c,
|
|
1602
1603
|
Ee as d,
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1604
|
+
jn as e,
|
|
1605
|
+
Un as f,
|
|
1606
|
+
zn as g,
|
|
1607
|
+
Wn as h,
|
|
1608
|
+
zt as i,
|
|
1608
1609
|
Ne as j,
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1610
|
+
Ft as k,
|
|
1611
|
+
Hn as l,
|
|
1612
|
+
Jn as m,
|
|
1612
1613
|
Oe as n,
|
|
1613
1614
|
De as o,
|
|
1614
|
-
|
|
1615
|
+
nr as p,
|
|
1615
1616
|
xe as q,
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1617
|
+
qn as r,
|
|
1618
|
+
Xn as s,
|
|
1619
|
+
_t as t,
|
|
1619
1620
|
Re as u,
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1621
|
+
Lt as v,
|
|
1622
|
+
Zn as w,
|
|
1623
|
+
er as x,
|
|
1624
|
+
tr as y,
|
|
1625
|
+
Pn as z
|
|
1625
1626
|
};
|