react-semaphor 0.1.543 → 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.
Files changed (125) hide show
  1. package/dist/activity/index.js +73 -0
  2. package/dist/analytics-protocol/index.js +35 -34
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/briefings/index.js +56 -52
  6. package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
  7. package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
  8. package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
  9. package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
  10. package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
  11. package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
  12. package/dist/chunks/dashboard-B1tMju0u.js +14 -0
  13. package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
  14. package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
  15. package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
  16. package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
  17. package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
  18. package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
  19. package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
  20. package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
  21. package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
  22. package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
  23. package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
  24. package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
  25. package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
  26. package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
  27. package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
  28. package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
  29. package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
  30. package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
  31. package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
  32. package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
  33. package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
  34. package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
  35. package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
  36. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  37. package/dist/dashboard/index.js +1 -1
  38. package/dist/dashboard-authoring/index.js +553 -541
  39. package/dist/data-app-sdk/index.js +1 -1
  40. package/dist/format-utils/index.js +241 -227
  41. package/dist/index.js +354 -331
  42. package/dist/style.css +1 -1
  43. package/dist/surfboard/index.js +1 -1
  44. package/dist/types/activity.d.ts +2 -0
  45. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  46. package/dist/types/briefings/attachments.d.ts +33 -6
  47. package/dist/types/briefings/index.d.ts +6 -5
  48. package/dist/types/components/activity/activity-bell.d.ts +11 -0
  49. package/dist/types/components/activity/activity-instance.d.ts +50 -0
  50. package/dist/types/components/activity/activity-notices.d.ts +7 -0
  51. package/dist/types/components/activity/activity-provider.d.ts +21 -0
  52. package/dist/types/components/activity/activity-types.d.ts +177 -0
  53. package/dist/types/components/activity/index.d.ts +6 -0
  54. package/dist/types/components/activity/use-activity.d.ts +20 -0
  55. package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
  56. package/dist/types/components/briefings/briefing-author.d.ts +14 -12
  57. package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
  58. package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
  59. package/dist/types/components/index.d.ts +1 -4
  60. package/dist/types/components/surfboard/filter/types.d.ts +0 -14
  61. package/dist/types/lib/activity-identity.d.ts +21 -0
  62. package/dist/types/lib/api/exports-api.d.ts +4 -4
  63. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
  64. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
  65. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
  66. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
  67. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
  68. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
  69. package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
  70. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
  71. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
  72. package/dist/types/lib/download-pdf.d.ts +75 -1
  73. package/dist/types/lib/hooks/index.d.ts +1 -3
  74. package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
  75. package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
  76. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
  77. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
  78. package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
  79. package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
  80. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
  81. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
  82. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
  83. package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
  84. package/dist/types/lib/stores/editor-store.d.ts +0 -3
  85. package/dist/types/lib/types/common-types.d.ts +21 -6
  86. package/dist/types/shared/activity/activity-contract.d.ts +84 -0
  87. package/dist/types/shared/activity/index.d.ts +5 -0
  88. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
  89. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
  90. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
  91. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
  92. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
  93. package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
  94. package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
  95. package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
  96. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
  97. package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
  98. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
  99. package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
  100. package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
  101. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  102. package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
  103. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
  104. package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
  105. package/package.json +6 -2
  106. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
  107. package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
  108. package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
  109. package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
  110. package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
  111. package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
  112. package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
  113. package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
  114. package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
  115. package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
  116. package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
  117. package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
  118. package/dist/types/components/notifications/index.d.ts +0 -3
  119. package/dist/types/components/notifications/notification-bell.d.ts +0 -13
  120. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
  121. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
  122. package/dist/types/lib/exports/bounded-request.d.ts +0 -12
  123. package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
  124. package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
  125. package/dist/types/lib/stores/export-store.d.ts +0 -62
@@ -1,460 +0,0 @@
1
- import { l as M } from "./validators-DMHTpf7a.js";
2
- import { b as W, w as y, z as F } from "./zoned-wall-clock-MulfA26h.js";
3
- function U(t, e) {
4
- const n = t.split(".").map((a) => a.trim()), o = e.split(".").map((a) => a.trim());
5
- if (n.length === 0 || o.length === 0 || n.some((a) => !a) || o.some((a) => !a))
6
- return !1;
7
- const [s, i] = n.length <= o.length ? [n, o] : [o, n], r = i.length - s.length;
8
- return s.every((a, u) => a === i[u + r]);
9
- }
10
- function j(t, e) {
11
- const n = t.split("."), o = e.split("."), s = n.pop(), i = o.pop();
12
- return !!(s && s === i && n.length > 0 && o.length > 0 && U(
13
- n.join("."),
14
- o.join(".")
15
- ));
16
- }
17
- function P(t) {
18
- const e = t.map((o) => o.trim()).filter(Boolean);
19
- if (e.every(
20
- (o, s) => e.slice(s + 1).every(
21
- (i) => U(o, i)
22
- )
23
- ))
24
- return [...e].sort(
25
- (o, s) => s.split(".").length - o.split(".").length
26
- )[0];
27
- }
28
- function m(t) {
29
- return typeof t == "object" && t !== null && !Array.isArray(t);
30
- }
31
- function k(t) {
32
- if (typeof t != "string") return "";
33
- const e = t.split(".").map((n) => n.trim());
34
- return e.length > 1 && e.every(Boolean) ? e.join(".") : "";
35
- }
36
- function N(t) {
37
- if (typeof t != "string") return "";
38
- const e = t.split(".").map((n) => n.trim());
39
- return e.length > 0 && e.every(Boolean) ? e.join(".") : "";
40
- }
41
- function d(t) {
42
- return typeof t == "string" ? t.trim() : "";
43
- }
44
- function R(t, e) {
45
- return t.every(
46
- (n, o) => t.slice(o + 1).every((s) => e(n, s))
47
- );
48
- }
49
- function L(t, e) {
50
- const n = d(t.id), o = d(t.name), s = d(e.entityId), i = d(e.entityName);
51
- return !o || !s && !i ? !1 : (!s || s === n || s === o) && (!i || i === o);
52
- }
53
- function Q(t) {
54
- const e = m(t.semanticContext) ? t.semanticContext : void 0, n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = d(e == null ? void 0 : e.semanticDomainId), s = Array.isArray(e == null ? void 0 : e.selectedEntities) ? e.selectedEntities.filter(
55
- (C) => m(C) && C.type === "dataset"
56
- ) : [];
57
- if (!!!(o || s.length > 0 || (n == null ? void 0 : n.entityType) === "dataset")) return;
58
- if (!o)
59
- return { status: "unresolved", reason: "incomplete_source_identity" };
60
- const r = d(n == null ? void 0 : n.entityId), a = d(n == null ? void 0 : n.entityName), u = !!(r || a), l = u ? s.filter(
61
- (C) => L(C, {
62
- entityId: r,
63
- entityName: a
64
- })
65
- ) : s;
66
- if (l.length > 1)
67
- return { status: "unresolved", reason: "incomplete_source_identity" };
68
- if (u && s.length > 0 && l.length === 0)
69
- return { status: "unresolved", reason: "divergent_source_identity" };
70
- const c = l[0], f = d(c == null ? void 0 : c.domainId), _ = d(c == null ? void 0 : c.id), h = d(c == null ? void 0 : c.name);
71
- if (f && f !== o)
72
- return { status: "unresolved", reason: "divergent_source_identity" };
73
- const A = _, E = h || a;
74
- return E ? {
75
- status: "resolved",
76
- source: {
77
- kind: "semantic",
78
- domainId: o,
79
- datasetName: E,
80
- ...A ? { datasetId: A } : {}
81
- }
82
- } : { status: "unresolved", reason: "incomplete_source_identity" };
83
- }
84
- function J(t, e) {
85
- const n = d(t.connectionId), o = m(t.semanticContext) ? t.semanticContext : void 0, s = d(o == null ? void 0 : o.connectionId);
86
- if (n && s && n !== s)
87
- return { status: "unresolved", reason: "divergent_source_identity" };
88
- const i = n || s, r = m(t.fieldMeta) ? t.fieldMeta : void 0, a = e.split(".").slice(0, -1).join("."), u = N(t.qualifiedTableName), l = N(
89
- r == null ? void 0 : r.qualifiedEntityName
90
- ), c = [
91
- u,
92
- l,
93
- a
94
- ].filter(Boolean), f = P(c);
95
- return !f && c.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !i || !f ? { status: "unresolved", reason: "incomplete_source_identity" } : {
96
- status: "resolved",
97
- source: { kind: "physical", connectionId: i, tableName: f }
98
- };
99
- }
100
- function K(t, e) {
101
- const n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = typeof (n == null ? void 0 : n.qualifiedFieldName) == "string" ? n.qualifiedFieldName.trim() : "", s = k(
102
- n == null ? void 0 : n.qualifiedFieldName
103
- ), i = typeof t.column == "string" ? t.column.trim() : "", r = k(i), a = typeof t.qualifiedTableName == "string" ? t.qualifiedTableName.trim() : "", u = N(
104
- t.qualifiedTableName
105
- );
106
- if (o && !s || e && a && !u || i.includes(".") && !r)
107
- return { status: "unresolved", reason: "incomplete_field_identity" };
108
- const l = r.split("."), c = r ? l[l.length - 1] : i, f = e && u && c ? `${u}.${c}` : "", _ = [
109
- s,
110
- r,
111
- f
112
- ].filter(Boolean);
113
- if (!R(
114
- _,
115
- j
116
- ))
117
- return { status: "unresolved", reason: "divergent_field_identity" };
118
- const h = r || s || f;
119
- return h ? { status: "resolved", qualifiedFieldName: h } : { status: "unresolved", reason: "incomplete_field_identity" };
120
- }
121
- function Y(t) {
122
- if (!m(t))
123
- return { status: "ineligible", reason: "invalid_input" };
124
- if (t.kind === "global-date")
125
- return { status: "eligible", kind: "global_date" };
126
- const e = M(t.dataType);
127
- if (e !== "date" && e !== "datetime")
128
- return { status: "ineligible", reason: "non_date_filter" };
129
- const n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = M(
130
- n == null ? void 0 : n.dataType
131
- );
132
- if ((n == null ? void 0 : n.dataType) !== void 0 && o !== "date" && o !== "datetime")
133
- return { status: "ineligible", reason: "non_date_filter" };
134
- if (t.customFilterPreferences)
135
- return { status: "ineligible", reason: "custom_filter" };
136
- if (t.targetColumns !== void 0 && (!Array.isArray(t.targetColumns) || t.targetColumns.length > 0))
137
- return { status: "ineligible", reason: "multi_target_filter" };
138
- const s = Q(t), i = K(t, s === void 0);
139
- if (i.status === "unresolved")
140
- return { status: "ineligible", reason: i.reason };
141
- const r = s || J(t, i.qualifiedFieldName);
142
- return r.status === "resolved" ? {
143
- status: "eligible",
144
- kind: "field_date",
145
- qualifiedFieldName: i.qualifiedFieldName,
146
- source: r.source
147
- } : { status: "ineligible", reason: r.reason };
148
- }
149
- function G(t) {
150
- if (!m(t) || t.kind !== "filter" || !m(t.filter))
151
- return { status: "ineligible", reason: "invalid_input" };
152
- const e = Y(
153
- t.filter
154
- );
155
- return e.status === "ineligible" ? e : e.kind === "field_date" && m(t.compatibility) && t.compatibility.source === "cardInlineFilter" ? { status: "ineligible", reason: "card_inline_filter" } : e;
156
- }
157
- function ot(t) {
158
- return G(t).status === "eligible";
159
- }
160
- function st(t) {
161
- return `compat-filter:${t}`;
162
- }
163
- function it(t) {
164
- return `compat-control:${t}`;
165
- }
166
- function rt(t, e) {
167
- return `compat-inline-filter:${t}:${e}`;
168
- }
169
- function at(t, e) {
170
- return `compat-card-control:${t}:${e}`;
171
- }
172
- function b(t) {
173
- var e;
174
- return JSON.stringify([
175
- ((e = t.field) == null ? void 0 : e.id) ?? "",
176
- t.operator,
177
- t.value ?? null,
178
- t.temporalBucket ?? null
179
- ]);
180
- }
181
- function H(t) {
182
- return JSON.stringify(t.map(b).sort());
183
- }
184
- function x(t) {
185
- const e = /* @__PURE__ */ new Map();
186
- for (const n of t)
187
- for (const o of n.tuples) {
188
- const s = o.conditions.filter(
189
- (a) => {
190
- var u;
191
- return (u = a.field) == null ? void 0 : u.id;
192
- }
193
- );
194
- if (s.length === 0) continue;
195
- let i = e.get(n.sourceCardId);
196
- i || (i = /* @__PURE__ */ new Map(), e.set(n.sourceCardId, i));
197
- const r = [...s].sort(
198
- (a, u) => b(a).localeCompare(b(u))
199
- );
200
- i.set(H(r), r);
201
- }
202
- return [...e.entries()].sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => ({
203
- sourceCardId: n,
204
- tuples: [...o.entries()].sort(([s], [i]) => s.localeCompare(i)).map(([, s]) => ({ conditions: s }))
205
- }));
206
- }
207
- function ut(t) {
208
- const e = x(t);
209
- if (e.length !== 0)
210
- return {
211
- id: "selection",
212
- logicalOperator: "AND",
213
- negate: !1,
214
- conditions: [],
215
- groups: e.map((n) => {
216
- const o = `selection:${n.sourceCardId}`;
217
- return {
218
- id: o,
219
- logicalOperator: "OR",
220
- negate: !1,
221
- conditions: [],
222
- groups: n.tuples.map((s, i) => {
223
- const r = `${o}:${i}`;
224
- return {
225
- id: r,
226
- logicalOperator: "AND",
227
- negate: !1,
228
- conditions: s.conditions.map((a, u) => ({
229
- ...a,
230
- id: `${r}:${u}`
231
- })),
232
- groups: []
233
- };
234
- })
235
- };
236
- })
237
- };
238
- }
239
- function ct(t) {
240
- return JSON.stringify(
241
- x(t).map((e) => [
242
- e.sourceCardId,
243
- e.tuples.map((n) => n.conditions.map(b))
244
- ])
245
- );
246
- }
247
- const S = 864e5, q = {
248
- second: 1e3,
249
- minute: 6e4,
250
- hour: 36e5
251
- };
252
- function T(t, e) {
253
- return {
254
- ...F(t, e),
255
- millisecond: (t.getTime() % 1e3 + 1e3) % 1e3
256
- };
257
- }
258
- function p(t, e) {
259
- return W(t, e);
260
- }
261
- function v(t) {
262
- const e = new Date(t);
263
- return {
264
- year: e.getUTCFullYear(),
265
- month: e.getUTCMonth() + 1,
266
- day: e.getUTCDate(),
267
- hour: e.getUTCHours(),
268
- minute: e.getUTCMinutes(),
269
- second: e.getUTCSeconds(),
270
- millisecond: e.getUTCMilliseconds()
271
- };
272
- }
273
- function B(t, e) {
274
- const n = /* @__PURE__ */ new Date(0);
275
- return n.setUTCFullYear(t, e, 0), n.getUTCDate();
276
- }
277
- function I(t, e) {
278
- const n = t.year * 12 + (t.month - 1) + e, o = Math.floor(n / 12), s = n - o * 12 + 1;
279
- return { ...t, year: o, month: s, day: Math.min(t.day, B(o, s)) };
280
- }
281
- function g(t, e, n) {
282
- if (e === 0) return t;
283
- switch (n) {
284
- case "second":
285
- case "minute":
286
- case "hour":
287
- return v(
288
- y(t) + e * q[n]
289
- );
290
- case "day":
291
- return v(y(t) + e * S);
292
- case "week":
293
- return v(y(t) + e * 7 * S);
294
- case "month":
295
- return I(t, e);
296
- case "quarter":
297
- return I(t, e * 3);
298
- case "year":
299
- return I(t, e * 12);
300
- }
301
- }
302
- function V(t) {
303
- return new Date(
304
- y({ ...t, hour: 0, minute: 0, second: 0 })
305
- ).getUTCDay();
306
- }
307
- function $(t) {
308
- var n;
309
- const e = (n = t.fiscalCalendar) == null ? void 0 : n.yearStartMonth;
310
- return e && e >= 1 && e <= 12 ? e : 1;
311
- }
312
- function X(t, e, n) {
313
- const o = { ...t, hour: 0, minute: 0, second: 0, millisecond: 0 };
314
- switch (e) {
315
- case "day":
316
- return o;
317
- case "week":
318
- return g(
319
- o,
320
- -((V(t) - n.weekStart + 7) % 7),
321
- "day"
322
- );
323
- case "month":
324
- return { ...o, day: 1 };
325
- case "quarter": {
326
- const s = (t.month - $(n) + 12) % 12;
327
- return I({ ...o, day: 1 }, -(s % 3));
328
- }
329
- case "year": {
330
- const s = $(n);
331
- return {
332
- ...o,
333
- year: t.month >= s ? t.year : t.year - 1,
334
- month: s,
335
- day: 1
336
- };
337
- }
338
- }
339
- }
340
- function D(t, e, n, o = 0) {
341
- const s = q[e];
342
- if (s !== void 0) {
343
- const a = T(t, n.tz), u = a.millisecond + (e === "second" ? 0 : a.second * 1e3) + (e === "hour" ? a.minute * 6e4 : 0), l = t.getTime() - u + o * s;
344
- return { start: new Date(l), endExclusive: new Date(l + s) };
345
- }
346
- const i = e, r = g(
347
- X(T(t, n.tz), i, n),
348
- o,
349
- e
350
- );
351
- return {
352
- start: p(r, n.tz),
353
- endExclusive: p(g(r, 1, e), n.tz)
354
- };
355
- }
356
- function z(t, e, n) {
357
- return D(t, e, n).start;
358
- }
359
- function w(t, e, n) {
360
- return new Date(D(t, e, n).endExclusive.getTime() - 1);
361
- }
362
- function Z(t, e, n, o) {
363
- return e === 0 ? t : p(
364
- g(T(t, o.tz), e, n),
365
- o.tz
366
- );
367
- }
368
- function dt(t, e, n) {
369
- const o = (s) => {
370
- const { year: i, month: r, day: a } = F(s, n);
371
- return y({ year: i, month: r, day: a, hour: 0, minute: 0, second: 0 });
372
- };
373
- return Math.round((o(e) - o(t)) / S);
374
- }
375
- const tt = /^(\d{4})-(\d{2})-(\d{2})$/;
376
- function lt(t, e) {
377
- const { year: n, month: o, day: s } = F(t, e);
378
- return `${String(n).padStart(4, "0")}-${String(o).padStart(2, "0")}-${String(s).padStart(2, "0")}`;
379
- }
380
- function O(t) {
381
- const e = tt.exec(t);
382
- if (!e) return null;
383
- const n = Number(e[1]), o = Number(e[2]), s = Number(e[3]);
384
- return o < 1 || o > 12 || s < 1 || s > B(n, o) ? null : { year: n, month: o, day: s };
385
- }
386
- function mt(t, e) {
387
- const n = O(t);
388
- if (!n) return null;
389
- const o = { ...n, hour: 0, minute: 0, second: 0, millisecond: 0 };
390
- return {
391
- start: p(o, e),
392
- endExclusive: p(g(o, 1, "day"), e)
393
- };
394
- }
395
- function ft(t, e, n) {
396
- const o = (i) => new Date(D(n, t.unit, e, i).endExclusive.getTime() - 1), s = (i) => D(n, t.unit, e, i).start;
397
- switch (t.mode) {
398
- case "last":
399
- return t.unit === "minute" || t.unit === "hour" ? {
400
- start: new Date(
401
- n.getTime() - t.n * q[t.unit]
402
- ),
403
- end: n
404
- } : t.complete ? { start: s(-t.n), end: o(-1) } : { start: Z(n, -t.n, t.unit, e), end: n };
405
- case "this": {
406
- if (t.boundary && t.unit === "month") {
407
- const i = t.boundary === "first_day" ? z(n, "month", e) : w(n, "month", e);
408
- return {
409
- start: z(i, "day", e),
410
- end: w(i, "day", e)
411
- };
412
- }
413
- return { start: s(0), end: t.toDate ? n : o(0) };
414
- }
415
- case "previous":
416
- return { start: s(-1), end: o(-1) };
417
- case "between":
418
- return { start: s(t.from), end: o(t.to) };
419
- }
420
- }
421
- function yt(t) {
422
- const { operation: e, values: n, temporalPrecision: o } = t;
423
- if (e !== "=" && e !== "!=" || o === "minute")
424
- return null;
425
- const s = Array.isArray(n) ? n : [n];
426
- if (s.length !== 1 || typeof s[0] != "string") return null;
427
- const i = s[0].trim();
428
- return O(i) ? { operation: e, day: i } : null;
429
- }
430
- export {
431
- j as A,
432
- U as B,
433
- q as E,
434
- L as a,
435
- G as b,
436
- it as c,
437
- rt as d,
438
- at as e,
439
- ut as f,
440
- st as g,
441
- ct as h,
442
- ot as i,
443
- p as j,
444
- B as k,
445
- g as l,
446
- V as m,
447
- z as n,
448
- w as o,
449
- D as p,
450
- dt as q,
451
- Y as r,
452
- Z as s,
453
- lt as t,
454
- O as u,
455
- mt as v,
456
- T as w,
457
- ft as x,
458
- yt as y,
459
- P as z
460
- };
@@ -1,14 +0,0 @@
1
- import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
- import { E as o, F as d, S as i, B as s, a as c, U as l, D as t, C as h, b as f } from "./semaphor-ready-indicator-CN2AHm2x.js";
3
- function p(e) {
4
- if (typeof window > "u")
5
- return null;
6
- const { preferences: r } = e;
7
- return /* @__PURE__ */ a(o, { FallbackComponent: d, children: /* @__PURE__ */ a(i, { dashboardProps: e, children: /* @__PURE__ */ n(s, { children: [
8
- /* @__PURE__ */ a(c, { componentType: "dashboard", componentId: e.id }),
9
- /* @__PURE__ */ a(l, { appearance: e.appearance, children: /* @__PURE__ */ a(t, { preferences: r, children: /* @__PURE__ */ a("main", { className: "flex h-full flex-col", children: /* @__PURE__ */ a(h, { ...e, type: "dashboard", children: /* @__PURE__ */ a(f, {}) }) }) }) })
10
- ] }) }) });
11
- }
12
- export {
13
- p as D
14
- };