react-semaphor 0.1.584 → 0.1.586

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 (61) hide show
  1. package/dist/analytics-protocol/index.js +474 -435
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/briefings/index.js +2 -2
  4. package/dist/chunks/{assistant-chat-nmycV1Se.js → assistant-chat-BU5gchFy.js} +8 -8
  5. package/dist/chunks/{bookmark-impact-CI3gmxi0.js → bookmark-impact-ZPSGncK6.js} +2 -2
  6. package/dist/chunks/{bookmark-state-D9-RFkDg.js → bookmark-state-CL4WEpgB.js} +2 -2
  7. package/dist/chunks/{card-filter-builder-C7QyPqRy.js → card-filter-builder-HELJWA4D.js} +208 -208
  8. package/dist/chunks/{comparison-window-caption-BAnsTI8y.js → comparison-window-caption-CoART8BC.js} +530 -633
  9. package/dist/chunks/{dashboard-inJy_V78.js → dashboard-BXP-ZxSY.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-DXs0XA1O.js → dashboard-briefing-launcher-BGj42whr.js} +9 -9
  11. package/dist/chunks/{dashboard-controls-6Zoo8d8Y.js → dashboard-controls-zvbRp6D2.js} +9 -9
  12. package/dist/chunks/{dashboard-json-D5eJhVA9.js → dashboard-json-CykexgqL.js} +1 -1
  13. package/dist/chunks/{dates-B3_GWc_Y.js → dates-CaqZtq01.js} +6 -6
  14. package/dist/chunks/{edit-dashboard-visual-DR03SYeW.js → edit-dashboard-visual-C82JNxbt.js} +2679 -2614
  15. package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
  16. package/dist/chunks/{filter-reach-copy-CZwzrxBp.js → filter-reach-copy-ZERaFKsN.js} +1640 -1367
  17. package/dist/chunks/{filter-value-text-DtOvqcjn.js → filter-value-text-xefXzZlf.js} +10 -10
  18. package/dist/chunks/{index-BgT1L0p5.js → index-otMIColV.js} +35 -35
  19. package/dist/chunks/{matrix-analytical-definition-Cs2v43FM.js → matrix-analytical-definition-DOVSFFuf.js} +390 -542
  20. package/dist/chunks/{metric-comparison-Be4uS3Ql.js → metric-comparison-ZmurmEIs.js} +2 -2
  21. package/dist/chunks/{pivot-header-presentation-uH06jiZD.js → pivot-header-presentation-CdeTU96P.js} +1 -1
  22. package/dist/chunks/{pivot-result-contract-expectations-DvZY4eJM.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1010 -1005
  23. package/dist/chunks/{pivot-result-identity-BZexMfmL.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
  24. package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
  25. package/dist/chunks/{report-preferences-dialog-DWeVe2so.js → report-preferences-dialog-B-CoyS1x.js} +119 -119
  26. package/dist/chunks/{resolve-dashboard-input-context-uATCuOP7.js → resolve-dashboard-input-context-BTTdKXH0.js} +10273 -10190
  27. package/dist/chunks/{saved-dashboard-context-DSVV9iqW.js → saved-dashboard-context-B-rosN4W.js} +78 -75
  28. package/dist/chunks/{semaphor-ready-indicator-B9vvRMnJ.js → semaphor-ready-indicator-Cy1n_04D.js} +28208 -27864
  29. package/dist/chunks/{shelf-drop-preview-context-BHOnp5Bo.js → shelf-drop-preview-context-Bmz54WYm.js} +2 -2
  30. package/dist/chunks/{stored-dashboard-xc5iidHL.js → stored-dashboard-rDJ8sw6J.js} +601 -596
  31. package/dist/chunks/{table-export-sheet-Cv_94obr.js → table-export-sheet-Dmtqi5NV.js} +1 -1
  32. package/dist/chunks/{variable-draft-C3CjhsJQ.js → variable-draft-DvngkRMl.js} +3 -3
  33. package/dist/chunks/{visual-choice-JiJ-_3bi.js → visual-choice-BBPizkRo.js} +74 -72
  34. package/dist/dashboard/index.js +2 -2
  35. package/dist/dashboard-authoring/index.js +699 -688
  36. package/dist/format-utils/index.js +145 -142
  37. package/dist/index.js +14 -14
  38. package/dist/style.css +1 -1
  39. package/dist/surfboard/index.js +2 -2
  40. package/dist/types/index.js +2 -2
  41. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +86 -3
  42. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +49 -27
  43. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  44. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +30 -2
  45. package/dist/types/shared/analytics-protocol/click-reach-filter-id.d.ts +9 -0
  46. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +3 -1
  47. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  48. package/dist/types/shared/dashboard-authoring/click-to-filter-card-decision.d.ts +102 -0
  49. package/dist/types/shared/dashboard-authoring/filter-reach-copy.d.ts +13 -1
  50. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  51. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
  52. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +3 -0
  53. package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +5 -2
  54. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +37 -4
  55. package/dist/types/shared/dashboard-authoring/semantic-auto-join-card.d.ts +13 -0
  56. package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
  57. package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
  58. package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
  59. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
  60. package/package.json +2 -2
  61. package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
@@ -1,206 +1,58 @@
1
- import { am as N, ao as Q, ag as X, ae as p, an as _e, af as ie, at as De, ah as Ae, a5 as K, I as ae, o as Ee } from "./validators-CJ8Jh0E8.js";
2
- import { r as qe } from "./metric-comparison-Be4uS3Ql.js";
3
- import { b as Z, d as Be, w as _ } from "./raw-temporal-value-DdT0s47W.js";
4
- const Y = 864e5, ee = {
5
- second: 1e3,
6
- minute: 6e4,
7
- hour: 36e5
8
- };
9
- function G(e, t) {
10
- return {
11
- ...Z(e, t),
12
- millisecond: (e.getTime() % 1e3 + 1e3) % 1e3
13
- };
14
- }
15
- function E(e, t) {
16
- return Be(e, t);
17
- }
18
- function O(e) {
19
- const t = new Date(e);
20
- return {
21
- year: t.getUTCFullYear(),
22
- month: t.getUTCMonth() + 1,
23
- day: t.getUTCDate(),
24
- hour: t.getUTCHours(),
25
- minute: t.getUTCMinutes(),
26
- second: t.getUTCSeconds(),
27
- millisecond: t.getUTCMilliseconds()
28
- };
29
- }
30
- function le(e, t) {
31
- const n = /* @__PURE__ */ new Date(0);
32
- return n.setUTCFullYear(e, t, 0), n.getUTCDate();
33
- }
34
- function L(e, t) {
35
- const n = e.year * 12 + (e.month - 1) + t, i = Math.floor(n / 12), a = n - i * 12 + 1;
36
- return { ...e, year: i, month: a, day: Math.min(e.day, le(i, a)) };
37
- }
38
- function q(e, t, n) {
39
- if (t === 0) return e;
40
- switch (n) {
41
- case "second":
42
- case "minute":
43
- case "hour":
44
- return O(
45
- _(e) + t * ee[n]
46
- );
47
- case "day":
48
- return O(_(e) + t * Y);
49
- case "week":
50
- return O(_(e) + t * 7 * Y);
51
- case "month":
52
- return L(e, t);
53
- case "quarter":
54
- return L(e, t * 3);
55
- case "year":
56
- return L(e, t * 12);
57
- }
58
- }
59
- function xe(e) {
60
- return new Date(
61
- _({ ...e, hour: 0, minute: 0, second: 0 })
62
- ).getUTCDay();
63
- }
64
- function oe(e) {
65
- var n;
66
- const t = (n = e.fiscalCalendar) == null ? void 0 : n.yearStartMonth;
67
- return t && t >= 1 && t <= 12 ? t : 1;
68
- }
69
- function Fe(e, t, n) {
70
- const i = { ...e, hour: 0, minute: 0, second: 0, millisecond: 0 };
71
- switch (t) {
72
- case "day":
73
- return i;
74
- case "week":
75
- return q(
76
- i,
77
- -((xe(e) - n.weekStart + 7) % 7),
78
- "day"
79
- );
80
- case "month":
81
- return { ...i, day: 1 };
82
- case "quarter": {
83
- const a = (e.month - oe(n) + 12) % 12;
84
- return L({ ...i, day: 1 }, -(a % 3));
85
- }
86
- case "year": {
87
- const a = oe(n);
88
- return {
89
- ...i,
90
- year: e.month >= a ? e.year : e.year - 1,
91
- month: a,
92
- day: 1
93
- };
94
- }
95
- }
96
- }
97
- function B(e, t, n, i = 0) {
98
- const a = ee[t];
99
- if (a !== void 0) {
100
- const o = G(e, n.tz), d = o.millisecond + (t === "second" ? 0 : o.second * 1e3) + (t === "hour" ? o.minute * 6e4 : 0), c = e.getTime() - d + i * a;
101
- return { start: new Date(c), endExclusive: new Date(c + a) };
102
- }
103
- const s = t, r = q(
104
- Fe(G(e, n.tz), s, n),
105
- i,
106
- t
107
- );
108
- return {
109
- start: E(r, n.tz),
110
- endExclusive: E(q(r, 1, t), n.tz)
111
- };
112
- }
113
- function V(e, t, n) {
114
- return B(e, t, n).start;
115
- }
116
- function D(e, t, n) {
117
- return new Date(B(e, t, n).endExclusive.getTime() - 1);
118
- }
119
- function ue(e, t, n, i) {
120
- return t === 0 ? e : E(
121
- q(G(e, i.tz), t, n),
122
- i.tz
123
- );
124
- }
125
- function yt(e, t, n) {
126
- const i = (a) => {
127
- const { year: s, month: r, day: o } = Z(a, n);
128
- return _({ year: s, month: r, day: o, hour: 0, minute: 0, second: 0 });
129
- };
130
- return Math.round((i(t) - i(e)) / Y);
131
- }
132
- const He = /^(\d{4})-(\d{2})-(\d{2})$/;
133
- function bt(e, t) {
134
- const { year: n, month: i, day: a } = Z(e, t);
135
- return `${String(n).padStart(4, "0")}-${String(i).padStart(2, "0")}-${String(a).padStart(2, "0")}`;
136
- }
137
- function fe(e) {
138
- const t = He.exec(e);
139
- if (!t) return null;
140
- const n = Number(t[1]), i = Number(t[2]), a = Number(t[3]);
141
- return i < 1 || i > 12 || a < 1 || a > le(n, i) ? null : { year: n, month: i, day: a };
142
- }
143
- function gt(e, t) {
144
- const n = fe(e);
145
- if (!n) return null;
146
- const i = { ...n, hour: 0, minute: 0, second: 0, millisecond: 0 };
147
- return {
148
- start: E(i, t),
149
- endExclusive: E(q(i, 1, "day"), t)
150
- };
151
- }
152
- class re extends Error {
1
+ import { k as O, l as T, E as ye, m as ee, j as Q, q as ge } from "./raw-temporal-value-DH-feMc2.js";
2
+ import { am as C, ao as $, ag as W, ae as p, an as he, af as G, at as pe, ah as ve, a5 as w, I as V, o as ke } from "./validators-CJ8Jh0E8.js";
3
+ import { a as Ie } from "./metric-comparison-ZmurmEIs.js";
4
+ class J extends Error {
153
5
  constructor(t) {
154
6
  super(t), this.name = "RelativeDateUsageError";
155
7
  }
156
8
  }
157
- function Pe(e, t, n = {}) {
9
+ function Ne(e, t, n = {}) {
158
10
  const i = n.spansBack ?? 0;
159
- if (i !== 0) return Le(e, t, i);
160
- const { calendar: a, now: s } = t;
11
+ if (i !== 0) return Ce(e, t, i);
12
+ const { calendar: a, now: r } = t;
161
13
  switch (e.kind) {
162
14
  case "periods": {
163
- const r = me(e, t);
15
+ const s = te(e, t);
164
16
  return {
165
- start: B(r, e.unit, a, e.from).start,
166
- end: e.toDate ? r : ye(r, e.unit, a, e.to)
17
+ start: Q(s, e.unit, a, e.from).start,
18
+ end: e.toDate ? s : ne(s, e.unit, a, e.to)
167
19
  };
168
20
  }
169
21
  case "rolling": {
170
- const r = e.anchor === "latest_data" ? t.latestData ?? s : s, o = ee[e.unit];
22
+ const s = e.anchor === "latest_data" ? t.latestData ?? r : r, o = ye[e.unit];
171
23
  return {
172
- start: o === void 0 ? ue(r, -e.n, e.unit, a) : new Date(r.getTime() - e.n * o),
173
- end: r
24
+ start: o === void 0 ? ee(s, -e.n, e.unit, a) : new Date(s.getTime() - e.n * o),
25
+ end: s
174
26
  };
175
27
  }
176
28
  case "monthDay": {
177
- const r = e.day === "first" ? V(s, "month", a) : D(s, "month", a);
178
- return { start: V(r, "day", a), end: D(r, "day", a) };
29
+ const s = e.day === "first" ? O(r, "month", a) : T(r, "month", a);
30
+ return { start: O(s, "day", a), end: T(s, "day", a) };
179
31
  }
180
32
  }
181
33
  }
182
- function me(e, t) {
34
+ function te(e, t) {
183
35
  const { anchor: n } = e;
184
- return n === "latest_data" ? t.latestData ?? t.now : n === "now" ? t.now : new Date(V(t.now, n.lastComplete, t.calendar).getTime() - 1);
36
+ return n === "latest_data" ? t.latestData ?? t.now : n === "now" ? t.now : new Date(O(t.now, n.lastComplete, t.calendar).getTime() - 1);
185
37
  }
186
- function ye(e, t, n, i) {
187
- return new Date(B(e, t, n, i).endExclusive.getTime() - 1);
38
+ function ne(e, t, n, i) {
39
+ return new Date(Q(e, t, n, i).endExclusive.getTime() - 1);
188
40
  }
189
- function Le(e, t, n) {
41
+ function Ce(e, t, n) {
190
42
  if (!Number.isInteger(n) || n < 0)
191
- throw new re(`spansBack must be a whole number of spans, got ${n}.`);
43
+ throw new J(`spansBack must be a whole number of spans, got ${n}.`);
192
44
  if (e.kind !== "periods" || typeof e.anchor != "object")
193
- throw new re("spansBack applies only to a window anchored at the end of the last complete period.");
194
- const { calendar: i } = t, { unit: a } = e, s = Pe(e, t), r = -n * (e.to - e.from + 1), o = B(s.start, a, i, r).start;
195
- if (D(s.end, a, i).getTime() === s.end.getTime())
196
- return { start: o, end: ye(s.end, a, i, r) };
197
- const d = ue(me(e, t), r, a, i), c = Math.min(
198
- D(d, e.anchor.lastComplete, i).getTime(),
199
- D(d, a, i).getTime()
45
+ throw new J("spansBack applies only to a window anchored at the end of the last complete period.");
46
+ const { calendar: i } = t, { unit: a } = e, r = Ne(e, t), s = -n * (e.to - e.from + 1), o = Q(r.start, a, i, s).start;
47
+ if (T(r.end, a, i).getTime() === r.end.getTime())
48
+ return { start: o, end: ne(r.end, a, i, s) };
49
+ const l = ee(te(e, t), s, a, i), c = Math.min(
50
+ T(l, e.anchor.lastComplete, i).getTime(),
51
+ T(l, a, i).getTime()
200
52
  );
201
53
  return { start: o, end: new Date(c) };
202
54
  }
203
- function be(e) {
55
+ function ie(e) {
204
56
  return e.prefixLevels.length === 1 && e.prefixLevels[0] === "table" ? ["table"] : Array.from(
205
57
  /* @__PURE__ */ new Set([
206
58
  "database",
@@ -208,34 +60,34 @@ function be(e) {
208
60
  ])
209
61
  );
210
62
  }
211
- function ht(e) {
212
- const t = e.source.connectionType ? N(e.source.connectionType) : void 0, n = e.source.dialect ? Q(e.source.dialect) : void 0, i = e.source.dialect && e.source.dialect !== "unknown" ? N(e.source.dialect) : void 0;
63
+ function tt(e) {
64
+ const t = e.source.connectionType ? C(e.source.connectionType) : void 0, n = e.source.dialect ? $(e.source.dialect) : void 0, i = e.source.dialect && e.source.dialect !== "unknown" ? C(e.source.dialect) : void 0;
213
65
  if (!e.capabilities && e.source.connectionType && e.source.dialect && e.source.dialect !== "unknown" && (!t || n === "unknown" || t.dialect !== n))
214
66
  return { kind: "incompatible_capabilities" };
215
67
  const a = e.capabilities || t || i;
216
68
  if (!a) return { kind: "incompatible_capabilities" };
217
- const s = be(a), r = {
218
- ...s.includes("database") && e.source.databaseName ? { databaseName: e.source.databaseName } : {},
219
- ...s.includes("schema") && e.source.schemaName ? { schemaName: e.source.schemaName } : {},
69
+ const r = ie(a), s = {
70
+ ...r.includes("database") && e.source.databaseName ? { databaseName: e.source.databaseName } : {},
71
+ ...r.includes("schema") && e.source.schemaName ? { schemaName: e.source.schemaName } : {},
220
72
  ...e.source.tableName ? { tableName: e.source.tableName } : {}
221
- }, o = s.filter((d) => d === "database" ? !r.databaseName : d === "schema" ? !r.schemaName : !r.tableName);
73
+ }, o = r.filter((l) => l === "database" ? !s.databaseName : l === "schema" ? !s.schemaName : !s.tableName);
222
74
  return o.length > 0 ? { kind: "missing_coordinates", missing: o } : {
223
75
  kind: "resolved",
224
- coordinates: r
76
+ coordinates: s
225
77
  };
226
78
  }
227
79
  function f(e) {
228
80
  return typeof e == "string" && e.trim() ? e.trim() : void 0;
229
81
  }
230
- function x(e) {
82
+ function D(e) {
231
83
  return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
232
84
  }
233
- function ge(e) {
234
- const t = x(e);
85
+ function ae(e) {
86
+ const t = D(e);
235
87
  return !t || !f(t.name) || t.type === "model" ? !1 : t.type === "dataset" ? t.datasetType === "physical" : !0;
236
88
  }
237
- function H(e) {
238
- const t = x(e);
89
+ function q(e) {
90
+ const t = D(e);
239
91
  if (!t) return {};
240
92
  const n = f(t.table) || f(t.name);
241
93
  return {
@@ -244,41 +96,41 @@ function H(e) {
244
96
  ...n ? { tableName: n } : {}
245
97
  };
246
98
  }
247
- function Me(e) {
248
- if (Oe(e)) return { kind: "malformed" };
249
- const t = e.entities.filter(ge), n = ze(e), i = je({
99
+ function _e(e) {
100
+ if (De(e)) return { kind: "malformed" };
101
+ const t = e.entities.filter(ae), n = Se(e), i = Te({
250
102
  entities: t,
251
103
  connectionType: e.connectionType,
252
104
  dialect: e.dialect,
253
105
  capabilities: e.capabilities
254
106
  });
255
107
  if (!i) return { kind: "incompatible_capabilities" };
256
- const { capabilities: a } = i, s = $e({
108
+ const { capabilities: a } = i, r = Ee({
257
109
  hints: e.qualifiedHints || [],
258
110
  coordinateHint: e.coordinateHint,
259
111
  capabilityAuthority: i
260
112
  });
261
- if (s.kind !== "valid")
262
- return { kind: s.kind };
263
- const r = s.coordinates, o = r ? t.filter(
264
- (c) => X({
265
- left: he(
266
- H(c),
113
+ if (r.kind !== "valid")
114
+ return { kind: r.kind };
115
+ const s = r.coordinates, o = s ? t.filter(
116
+ (c) => W({
117
+ left: oe(
118
+ q(c),
267
119
  a
268
120
  ),
269
- right: r,
121
+ right: s,
270
122
  capabilities: a
271
123
  })
272
124
  ) : t;
273
- if (r && o.length === 0)
125
+ if (s && o.length === 0)
274
126
  return {
275
127
  kind: "not_found",
276
128
  basis: "qualified",
277
- coordinates: r,
129
+ coordinates: s,
278
130
  capabilityAuthority: i
279
131
  };
280
- if (r && o.length === 1) {
281
- const c = o[0], l = $(
132
+ if (s && o.length === 1) {
133
+ const c = o[0], d = L(
282
134
  i,
283
135
  c
284
136
  );
@@ -286,35 +138,35 @@ function Me(e) {
286
138
  kind: "resolved",
287
139
  basis: "qualified",
288
140
  entity: c,
289
- coordinates: Qe(
290
- H(c),
291
- r,
292
- l
141
+ coordinates: He(
142
+ q(c),
143
+ s,
144
+ d
293
145
  ),
294
- capabilityAuthority: l
146
+ capabilityAuthority: d
295
147
  };
296
148
  }
297
- const d = pe([
149
+ const l = se([
298
150
  ...e.bareHints || [],
299
- ...s.bareHints,
300
- r == null ? void 0 : r.tableName
151
+ ...r.bareHints,
152
+ s == null ? void 0 : s.tableName
301
153
  ]);
302
- if (d.size > 0) {
303
- const c = o.filter((l) => {
304
- const m = We(l);
305
- return Array.from(d).some((b) => m.has(b));
154
+ if (l.size > 0) {
155
+ const c = o.filter((d) => {
156
+ const m = Fe(d);
157
+ return Array.from(l).some((y) => m.has(y));
306
158
  });
307
159
  if (c.length === 1) {
308
- const l = c[0], m = $(
160
+ const d = c[0], m = L(
309
161
  i,
310
- l
162
+ d
311
163
  );
312
164
  return {
313
165
  kind: "resolved",
314
166
  basis: "bare",
315
- entity: l,
316
- coordinates: M(
317
- H(l),
167
+ entity: d,
168
+ coordinates: F(
169
+ q(d),
318
170
  m
319
171
  ),
320
172
  capabilityAuthority: m
@@ -322,7 +174,7 @@ function Me(e) {
322
174
  }
323
175
  return c.length > 1 ? { kind: "ambiguous", basis: "bare" } : { kind: "not_found", basis: "bare", capabilityAuthority: i };
324
176
  }
325
- if (r)
177
+ if (s)
326
178
  return { kind: "ambiguous", basis: "qualified" };
327
179
  if (n)
328
180
  return {
@@ -331,7 +183,7 @@ function Me(e) {
331
183
  capabilityAuthority: i
332
184
  };
333
185
  if (t.length === 1) {
334
- const c = t[0], l = $(
186
+ const c = t[0], d = L(
335
187
  i,
336
188
  c
337
189
  );
@@ -339,16 +191,16 @@ function Me(e) {
339
191
  kind: "resolved",
340
192
  basis: "unqualified",
341
193
  entity: c,
342
- coordinates: M(
343
- H(c),
344
- l
194
+ coordinates: F(
195
+ q(c),
196
+ d
345
197
  ),
346
- capabilityAuthority: l
198
+ capabilityAuthority: d
347
199
  };
348
200
  }
349
201
  return { kind: "unqualified" };
350
202
  }
351
- function ze(e) {
203
+ function Se(e) {
352
204
  const t = (e.qualifiedHints || []).map(f).filter((i) => !!i);
353
205
  return Object.values(e.coordinateHint || {}).some(
354
206
  (i) => !!f(i)
@@ -359,60 +211,60 @@ function ze(e) {
359
211
  function A(e) {
360
212
  return `${e.dialect}:${e.prefixLevels.join(".")}`;
361
213
  }
362
- function P(e) {
214
+ function B(e) {
363
215
  return {
364
216
  dialect: e.dialect,
365
217
  prefixLevels: [...e.prefixLevels]
366
218
  };
367
219
  }
368
- function je(e) {
220
+ function Te(e) {
369
221
  var k;
370
- const t = f(e.connectionType), n = f(e.dialect), i = e.capabilities ? P(e.capabilities) : void 0, a = t ? N(t) : void 0, s = n ? Q(n) : void 0, r = n && n !== "unknown" ? N(n) : void 0;
371
- if (t && !a || n && n !== "unknown" && s === "unknown" || i && a && A(i) !== A(a))
222
+ const t = f(e.connectionType), n = f(e.dialect), i = e.capabilities ? B(e.capabilities) : void 0, a = t ? C(t) : void 0, r = n ? $(n) : void 0, s = n && n !== "unknown" ? C(n) : void 0;
223
+ if (t && !a || n && n !== "unknown" && r === "unknown" || i && a && A(i) !== A(a))
372
224
  return;
373
- const o = i || (a ? P(a) : r ? P(r) : void 0);
225
+ const o = i || (a ? B(a) : s ? B(s) : void 0);
374
226
  if (o)
375
- return s && s !== "unknown" && o.dialect !== s ? void 0 : {
227
+ return r && r !== "unknown" && o.dialect !== r ? void 0 : {
376
228
  capabilities: o,
377
229
  ...t ? { connectionType: t } : {},
378
230
  dialect: o.dialect,
379
231
  evidence: "explicit"
380
232
  };
381
- const d = e.entities.map((y) => {
382
- const C = x(y), h = f(C == null ? void 0 : C.connectionType), I = f(C == null ? void 0 : C.dialect), T = h ? N(h) : void 0, F = I ? Q(I) : void 0, j = I && I !== "unknown" ? N(I) : void 0;
383
- if (h && !T || I && I !== "unknown" && F === "unknown" || I && I !== "unknown" && !T && !j || T && F && F !== "unknown" && T.dialect !== F)
233
+ const l = e.entities.map((b) => {
234
+ const I = D(b), h = f(I == null ? void 0 : I.connectionType), N = f(I == null ? void 0 : I.dialect), S = h ? C(h) : void 0, E = N ? $(N) : void 0, x = N && N !== "unknown" ? C(N) : void 0;
235
+ if (h && !S || N && N !== "unknown" && E === "unknown" || N && N !== "unknown" && !S && !x || S && E && E !== "unknown" && S.dialect !== E)
384
236
  return;
385
- const ne = T || j, w = ne ? P(ne) : we(C);
386
- return w ? {
387
- capabilities: w,
237
+ const U = S || x, P = U ? B(U) : Ae(I);
238
+ return P ? {
239
+ capabilities: P,
388
240
  connectionType: h,
389
- capabilityIdentity: h ? _e(h) : void 0,
390
- inferred: !T && !j,
391
- signature: A(w)
241
+ capabilityIdentity: h ? he(h) : void 0,
242
+ inferred: !S && !x,
243
+ signature: A(P)
392
244
  } : void 0;
393
245
  });
394
- if (d.some((y) => !y)) return;
395
- const c = d.filter(
396
- (y) => !!y
246
+ if (l.some((b) => !b)) return;
247
+ const c = l.filter(
248
+ (b) => !!b
397
249
  );
398
- if (new Set(c.map((y) => y.signature)).size > 1)
250
+ if (new Set(c.map((b) => b.signature)).size > 1)
399
251
  return;
400
- const l = (k = c[0]) == null ? void 0 : k.capabilities;
401
- if (!l || s && s !== "unknown" && l.dialect !== s)
252
+ const d = (k = c[0]) == null ? void 0 : k.capabilities;
253
+ if (!d || r && r !== "unknown" && d.dialect !== r)
402
254
  return;
403
255
  const m = new Set(
404
- c.map((y) => y.capabilityIdentity).filter((y) => !!y)
405
- ), b = c.every(
406
- (y) => y.connectionType && y.capabilityIdentity
256
+ c.map((b) => b.capabilityIdentity).filter((b) => !!b)
257
+ ), y = c.every(
258
+ (b) => b.connectionType && b.capabilityIdentity
407
259
  );
408
260
  return {
409
- capabilities: l,
410
- ...b && m.size === 1 ? { connectionType: c[0].connectionType } : {},
411
- dialect: l.dialect,
412
- evidence: c.every((y) => y.inferred) ? "coordinates" : "entity"
261
+ capabilities: d,
262
+ ...y && m.size === 1 ? { connectionType: c[0].connectionType } : {},
263
+ dialect: d.dialect,
264
+ evidence: c.every((b) => b.inferred) ? "coordinates" : "entity"
413
265
  };
414
266
  }
415
- function we(e) {
267
+ function Ae(e) {
416
268
  const t = !!f(e == null ? void 0 : e.database), n = !!f(e == null ? void 0 : e.schema);
417
269
  if (!(t && n)) {
418
270
  if (n)
@@ -421,13 +273,13 @@ function we(e) {
421
273
  return { dialect: "unknown", prefixLevels: ["database", "table"] };
422
274
  }
423
275
  }
424
- function $(e, t) {
276
+ function L(e, t) {
425
277
  var a;
426
278
  if (e.evidence !== "entity") return e;
427
- const n = f((a = x(t)) == null ? void 0 : a.connectionType), i = n ? N(n) : void 0;
279
+ const n = f((a = D(t)) == null ? void 0 : a.connectionType), i = n ? C(n) : void 0;
428
280
  return i && A(i) === A(e.capabilities) ? { ...e, connectionType: n } : e;
429
281
  }
430
- function Oe(e) {
282
+ function De(e) {
431
283
  return (e.qualifiedHints || []).some(
432
284
  (n) => {
433
285
  const i = f(n);
@@ -438,79 +290,79 @@ function Oe(e) {
438
290
  return !!(i && !p(i));
439
291
  });
440
292
  }
441
- function $e(e) {
293
+ function Ee(e) {
442
294
  const { capabilities: t } = e.capabilityAuthority, n = [], i = [];
443
295
  for (const m of e.hints) {
444
- const b = f(m);
445
- if (!b) continue;
446
- if (!b.includes(".")) {
447
- i.push(b);
296
+ const y = f(m);
297
+ if (!y) continue;
298
+ if (!y.includes(".")) {
299
+ i.push(y);
448
300
  continue;
449
301
  }
450
- const k = p(b);
302
+ const k = p(y);
451
303
  if (!k) return { kind: "malformed" };
452
304
  n.push(k);
453
305
  }
454
- const a = Re(e.coordinateHint);
306
+ const a = qe(e.coordinateHint);
455
307
  if (a.kind === "malformed") return a;
456
- const s = Array.from(new Set(n)).map(
457
- (m) => ie({
308
+ const r = Array.from(new Set(n)).map(
309
+ (m) => G({
458
310
  qualifiedName: m,
459
311
  capabilities: t
460
312
  })
461
313
  );
462
- if (!Ue(s, t))
314
+ if (!Be(r, t))
463
315
  return { kind: "conflicting" };
464
- const r = [...new Set(n)].sort(
465
- (m, b) => b.split(".").length - m.split(".").length
466
- )[0], o = r ? ie({
467
- qualifiedName: r,
316
+ const s = [...new Set(n)].sort(
317
+ (m, y) => y.split(".").length - m.split(".").length
318
+ )[0], o = s ? G({
319
+ qualifiedName: s,
468
320
  capabilities: t
469
- }) : void 0, d = he(
321
+ }) : void 0, l = oe(
470
322
  a.coordinates,
471
323
  t
472
- ), c = M(
324
+ ), c = F(
473
325
  a.coordinates,
474
326
  e.capabilityAuthority
475
- ), l = !!(d.tableName && (d.databaseName || d.schemaName));
476
- return o && l && !X({
327
+ ), d = !!(l.tableName && (l.databaseName || l.schemaName));
328
+ return o && d && !W({
477
329
  left: o,
478
- right: d,
330
+ right: l,
479
331
  capabilities: t
480
332
  }) ? { kind: "conflicting" } : {
481
333
  kind: "valid",
482
334
  coordinates: o ? {
483
335
  ...c,
484
336
  ...o
485
- } : l ? c : void 0,
337
+ } : d ? c : void 0,
486
338
  bareHints: [
487
339
  ...i,
488
- ...!l && d.tableName ? [d.tableName] : []
340
+ ...!d && l.tableName ? [l.tableName] : []
489
341
  ]
490
342
  };
491
343
  }
492
- function Re(e) {
344
+ function qe(e) {
493
345
  const t = {};
494
346
  for (const [n, i] of Object.entries(e || {})) {
495
347
  const a = f(i);
496
348
  if (!a) continue;
497
- const s = p(a);
498
- if (!s) return { kind: "malformed" };
499
- t[n] = s;
349
+ const r = p(a);
350
+ if (!r) return { kind: "malformed" };
351
+ t[n] = r;
500
352
  }
501
353
  return { kind: "valid", coordinates: t };
502
354
  }
503
- function he(e, t) {
355
+ function oe(e, t) {
504
356
  return {
505
357
  ...t.prefixLevels.includes("database") && e.databaseName ? { databaseName: e.databaseName } : {},
506
358
  ...t.prefixLevels.includes("schema") && e.schemaName ? { schemaName: e.schemaName } : {},
507
359
  ...e.tableName ? { tableName: e.tableName } : {}
508
360
  };
509
361
  }
510
- function Ue(e, t) {
362
+ function Be(e, t) {
511
363
  return e.every(
512
364
  (n, i) => e.slice(i + 1).every(
513
- (a) => X({
365
+ (a) => W({
514
366
  left: n,
515
367
  right: a,
516
368
  capabilities: t
@@ -518,21 +370,21 @@ function Ue(e, t) {
518
370
  )
519
371
  );
520
372
  }
521
- function pe(e) {
373
+ function se(e) {
522
374
  return new Set(
523
375
  e.map(f).map(p).filter((t) => !!t)
524
376
  );
525
377
  }
526
- function We(e) {
527
- const t = x(e);
528
- return t ? pe([
378
+ function Fe(e) {
379
+ const t = D(e);
380
+ return t ? se([
529
381
  f(t.name),
530
382
  f(t.table),
531
383
  f(t.id)
532
384
  ]) : /* @__PURE__ */ new Set();
533
385
  }
534
- function Qe(e, t, n) {
535
- return M(
386
+ function He(e, t, n) {
387
+ return F(
536
388
  {
537
389
  ...e,
538
390
  ...t
@@ -540,8 +392,8 @@ function Qe(e, t, n) {
540
392
  n
541
393
  );
542
394
  }
543
- function M(e, t) {
544
- const n = t.evidence === "coordinates" ? t.capabilities.prefixLevels : be(t.capabilities);
395
+ function F(e, t) {
396
+ const n = t.evidence === "coordinates" ? t.capabilities.prefixLevels : ie(t.capabilities);
545
397
  return {
546
398
  ...n.includes("database") && e.databaseName ? { databaseName: e.databaseName } : {},
547
399
  ...n.includes("schema") && e.schemaName ? { schemaName: e.schemaName } : {},
@@ -551,89 +403,89 @@ function M(e, t) {
551
403
  function u(e) {
552
404
  return typeof e == "string" && e.trim() ? e.trim() : void 0;
553
405
  }
554
- function S(e) {
406
+ function _(e) {
555
407
  return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
556
408
  }
557
- function Ke(e) {
558
- const t = S(e);
409
+ function xe(e) {
410
+ const t = _(e);
559
411
  return !!(t && t.type === "dataset" && u(t.name));
560
412
  }
561
- function ve(e) {
562
- const t = S(e);
413
+ function re(e) {
414
+ const t = _(e);
563
415
  return !!(t && t.type === "dataset" && t.datasetType !== "physical" && u(t.name));
564
416
  }
565
- function se(e) {
417
+ function X(e) {
566
418
  const t = /* @__PURE__ */ new Set();
567
419
  for (const n of e) {
568
420
  const i = u(n);
569
421
  if (!i) continue;
570
422
  const a = p(i);
571
423
  if (!a) continue;
572
- const s = a.toLowerCase();
573
- t.add(s);
574
- const r = s.split("."), o = r[r.length - 1];
424
+ const r = a.toLowerCase();
425
+ t.add(r);
426
+ const s = r.split("."), o = s[s.length - 1];
575
427
  o && t.add(o);
576
428
  }
577
429
  return t;
578
430
  }
579
- function ce(e) {
431
+ function Y(e) {
580
432
  var n;
581
433
  const t = u(e);
582
434
  return t ? (n = p(t)) == null ? void 0 : n.toLowerCase() : void 0;
583
435
  }
584
- function R(e, t) {
585
- const n = S(t), i = u(n == null ? void 0 : n.domainId) || u(e.semanticDomainId), a = u(n == null ? void 0 : n.name);
436
+ function j(e, t) {
437
+ const n = _(t), i = u(n == null ? void 0 : n.domainId) || u(e.semanticDomainId), a = u(n == null ? void 0 : n.name);
586
438
  if (!i || !a) return;
587
- const s = (n == null ? void 0 : n.datasetType) === "physical" ? void 0 : De(n || {}), r = u(n == null ? void 0 : n.connectionId) || u(e.connectionId);
439
+ const r = (n == null ? void 0 : n.datasetType) === "physical" ? void 0 : pe(n || {}), s = u(n == null ? void 0 : n.connectionId) || u(e.connectionId);
588
440
  return {
589
441
  kind: "semantic",
590
442
  domainId: i,
591
443
  datasetName: a,
592
- ...s ? { datasetId: s } : {},
593
- ...r ? { connectionId: r } : {}
444
+ ...r ? { datasetId: r } : {},
445
+ ...s ? { connectionId: s } : {}
594
446
  };
595
447
  }
596
- function Ye(e, t = {}) {
448
+ function Pe(e, t = {}) {
597
449
  const n = u(e.fieldEntityType);
598
450
  if (n && n !== "dataset")
599
451
  return { kind: "unqualified" };
600
452
  const i = e.entities.filter(
601
- (r) => t.includePhysicalDatasets ? Ke(r) : ve(r)
453
+ (s) => t.includePhysicalDatasets ? xe(s) : re(s)
602
454
  ), a = u(e.entityId);
603
455
  if (a) {
604
- const r = ce(a), o = i.filter((d) => {
605
- const c = S(d);
606
- return !!(r && ce(c == null ? void 0 : c.id) === r);
456
+ const s = Y(a), o = i.filter((l) => {
457
+ const c = _(l);
458
+ return !!(s && Y(c == null ? void 0 : c.id) === s);
607
459
  });
608
460
  if (o.length > 1) return { kind: "ambiguous", basis: "bare" };
609
461
  if (o.length === 1) {
610
- const d = R(e, o[0]);
611
- return d ? {
462
+ const l = j(e, o[0]);
463
+ return l ? {
612
464
  kind: "resolved",
613
465
  basis: "bare",
614
466
  entity: o[0],
615
- source: d,
467
+ source: l,
616
468
  matchedById: !0
617
469
  } : { kind: "not_found", basis: "bare" };
618
470
  }
619
471
  }
620
- const s = se([
472
+ const r = X([
621
473
  e.entityName,
622
474
  ...e.qualifiedHints || [],
623
475
  ...e.bareHints || []
624
476
  ]);
625
- if (s.size > 0) {
626
- const r = i.filter((o) => {
627
- const d = S(o);
628
- return [...se([d == null ? void 0 : d.id, d == null ? void 0 : d.name])].some((l) => s.has(l));
477
+ if (r.size > 0) {
478
+ const s = i.filter((o) => {
479
+ const l = _(o);
480
+ return [...X([l == null ? void 0 : l.id, l == null ? void 0 : l.name])].some((d) => r.has(d));
629
481
  });
630
- if (r.length > 1) return { kind: "ambiguous", basis: "bare" };
631
- if (r.length === 1) {
632
- const o = R(e, r[0]);
482
+ if (s.length > 1) return { kind: "ambiguous", basis: "bare" };
483
+ if (s.length === 1) {
484
+ const o = j(e, s[0]);
633
485
  return o ? {
634
486
  kind: "resolved",
635
487
  basis: "bare",
636
- entity: r[0],
488
+ entity: s[0],
637
489
  source: o,
638
490
  matchedById: !1
639
491
  } : { kind: "not_found", basis: "bare" };
@@ -641,19 +493,19 @@ function Ye(e, t = {}) {
641
493
  return { kind: "not_found", basis: "bare" };
642
494
  }
643
495
  if (i.length === 1) {
644
- const r = R(e, i[0]);
645
- return r ? {
496
+ const s = j(e, i[0]);
497
+ return s ? {
646
498
  kind: "resolved",
647
499
  basis: "unqualified",
648
500
  entity: i[0],
649
- source: r,
501
+ source: s,
650
502
  matchedById: !1
651
503
  } : { kind: "unqualified" };
652
504
  }
653
505
  return { kind: "unqualified" };
654
506
  }
655
- function U(e) {
656
- const t = e.resolution.kind === "resolved" ? S(e.resolution.entity) : void 0, n = u(e.connectionId) || u(t == null ? void 0 : t.connectionId), { connectionType: i, dialect: a } = e.resolution.capabilityAuthority, s = N(a), r = !!(s && s.dialect === e.resolution.capabilityAuthority.capabilities.dialect && s.prefixLevels.join(".") === e.resolution.capabilityAuthority.capabilities.prefixLevels.join(
507
+ function R(e) {
508
+ const t = e.resolution.kind === "resolved" ? _(e.resolution.entity) : void 0, n = u(e.connectionId) || u(t == null ? void 0 : t.connectionId), { connectionType: i, dialect: a } = e.resolution.capabilityAuthority, r = C(a), s = !!(r && r.dialect === e.resolution.capabilityAuthority.capabilities.dialect && r.prefixLevels.join(".") === e.resolution.capabilityAuthority.capabilities.prefixLevels.join(
657
509
  "."
658
510
  )), o = e.resolution.coordinates;
659
511
  if (!(!n || !(o != null && o.tableName)))
@@ -661,21 +513,21 @@ function U(e) {
661
513
  kind: "physical",
662
514
  connectionId: n,
663
515
  ...i ? { connectionType: i } : {},
664
- ...!i && r ? { dialect: a } : {},
516
+ ...!i && s ? { dialect: a } : {},
665
517
  tableName: o.tableName,
666
518
  ...o.databaseName ? { databaseName: o.databaseName } : {},
667
519
  ...o.schemaName ? { schemaName: o.schemaName } : {}
668
520
  };
669
521
  }
670
- function Ge(e) {
671
- const t = S(e.entity), n = p(u(t == null ? void 0 : t.table));
522
+ function Le(e) {
523
+ const t = _(e.entity), n = p(u(t == null ? void 0 : t.table));
672
524
  if (!n) return !1;
673
525
  const i = p(
674
526
  u(t == null ? void 0 : t.database)
675
527
  ), a = p(
676
528
  u(t == null ? void 0 : t.schema)
677
529
  );
678
- return e.coordinates.tableName ? Ae({
530
+ return e.coordinates.tableName ? ve({
679
531
  requested: e.coordinates,
680
532
  allowed: {
681
533
  ...i ? { databaseName: i } : {},
@@ -685,12 +537,12 @@ function Ge(e) {
685
537
  capabilities: e.capabilityAuthority.capabilities
686
538
  }) : !1;
687
539
  }
688
- function Ve(e) {
689
- var a, s, r;
690
- if (u(e.connectionType) || u(e.dialect) || e.capabilities || u(e.semanticDomainId) || u(e.fieldEntityType) === "dataset" || u((a = e.fallbackCoordinateHint) == null ? void 0 : a.databaseName) || u((s = e.fallbackCoordinateHint) == null ? void 0 : s.schemaName))
540
+ function je(e) {
541
+ var a, r, s;
542
+ if (u(e.connectionType) || u(e.dialect) || e.capabilities || u(e.semanticDomainId) || u(e.fieldEntityType) === "dataset" || u((a = e.fallbackCoordinateHint) == null ? void 0 : a.databaseName) || u((r = e.fallbackCoordinateHint) == null ? void 0 : r.schemaName))
691
543
  return;
692
544
  const t = [
693
- u((r = e.fallbackCoordinateHint) == null ? void 0 : r.tableName),
545
+ u((s = e.fallbackCoordinateHint) == null ? void 0 : s.tableName),
694
546
  ...(e.qualifiedHints || []).map(u),
695
547
  ...(e.bareHints || []).map(u),
696
548
  u(e.entityName),
@@ -701,29 +553,29 @@ function Ve(e) {
701
553
  const n = t.map(p);
702
554
  return n.some((o) => !o) ? void 0 : new Set(n.map((o) => o.toLowerCase())).size === 1 ? n[0] : void 0;
703
555
  }
704
- function pt(e) {
556
+ function nt(e) {
705
557
  const t = e.entities.filter(
706
- ge
558
+ ae
707
559
  ), n = e.entities.filter(
708
- ve
709
- ), i = t.length > 0 || n.length > 0, a = Ye(e), s = e.qualifiedHints || [], r = s.some(
560
+ re
561
+ ), i = t.length > 0 || n.length > 0, a = Pe(e), r = e.qualifiedHints || [], s = r.some(
710
562
  (c) => {
711
- var l;
712
- return (l = u(c)) == null ? void 0 : l.includes(".");
563
+ var d;
564
+ return (d = u(c)) == null ? void 0 : d.includes(".");
713
565
  }
714
- ), o = Me({
566
+ ), o = _e({
715
567
  entities: t,
716
568
  connectionType: u(e.connectionType),
717
569
  dialect: e.dialect,
718
570
  capabilities: e.capabilities,
719
- qualifiedHints: s,
571
+ qualifiedHints: r,
720
572
  bareHints: [e.entityName, e.entityId, ...e.bareHints || []],
721
- ...!r && e.fallbackCoordinateHint ? { coordinateHint: e.fallbackCoordinateHint } : {}
573
+ ...!s && e.fallbackCoordinateHint ? { coordinateHint: e.fallbackCoordinateHint } : {}
722
574
  });
723
- if (o.kind === "malformed" || o.kind === "conflicting" || o.kind === "incompatible_capabilities" && r || o.kind === "ambiguous" && o.basis === "qualified")
575
+ if (o.kind === "malformed" || o.kind === "conflicting" || o.kind === "incompatible_capabilities" && s || o.kind === "ambiguous" && o.basis === "qualified")
724
576
  return o;
725
577
  if (o.kind === "resolved" && o.basis === "qualified") {
726
- const c = U({
578
+ const c = R({
727
579
  resolution: o,
728
580
  connectionId: e.connectionId
729
581
  });
@@ -735,7 +587,7 @@ function pt(e) {
735
587
  } : { kind: "missing_connection" };
736
588
  }
737
589
  if (o.kind === "not_found" && o.basis === "qualified" && o.coordinates) {
738
- if (a.kind === "resolved" && a.matchedById && Ge({
590
+ if (a.kind === "resolved" && a.matchedById && Le({
739
591
  entity: a.entity,
740
592
  coordinates: o.coordinates,
741
593
  capabilityAuthority: o.capabilityAuthority
@@ -746,7 +598,7 @@ function pt(e) {
746
598
  source: a.source,
747
599
  entity: a.entity
748
600
  };
749
- const c = U({
601
+ const c = R({
750
602
  resolution: o,
751
603
  connectionId: e.connectionId
752
604
  });
@@ -761,7 +613,7 @@ function pt(e) {
761
613
  };
762
614
  if (a.kind === "ambiguous") return a;
763
615
  if (o.kind === "resolved") {
764
- const c = U({
616
+ const c = R({
765
617
  resolution: o,
766
618
  connectionId: e.connectionId
767
619
  });
@@ -772,24 +624,24 @@ function pt(e) {
772
624
  entity: o.entity
773
625
  } : { kind: "missing_connection" };
774
626
  }
775
- const d = u(e.entityName) || u(e.entityId);
776
- if (!i && !r && u(e.semanticDomainId) && (!u(e.fieldEntityType) || u(e.fieldEntityType) === "dataset") && d)
627
+ const l = u(e.entityName) || u(e.entityId);
628
+ if (!i && !s && u(e.semanticDomainId) && (!u(e.fieldEntityType) || u(e.fieldEntityType) === "dataset") && l)
777
629
  return {
778
630
  kind: "resolved",
779
631
  basis: "historical",
780
632
  source: {
781
633
  kind: "semantic",
782
634
  domainId: u(e.semanticDomainId),
783
- datasetName: d,
635
+ datasetName: l,
784
636
  ...u(e.connectionId) ? { connectionId: u(e.connectionId) } : {}
785
637
  }
786
638
  };
787
639
  if (o.kind === "incompatible_capabilities") {
788
- const c = i ? void 0 : Ve(e), l = u(e.connectionId);
789
- return c && l ? {
640
+ const c = i ? void 0 : je(e), d = u(e.connectionId);
641
+ return c && d ? {
790
642
  kind: "resolved",
791
643
  basis: "historical",
792
- source: { kind: "physical", connectionId: l, tableName: c }
644
+ source: { kind: "physical", connectionId: d, tableName: c }
793
645
  } : o;
794
646
  }
795
647
  return o.kind === "ambiguous" ? o : o.kind === "not_found" ? {
@@ -797,19 +649,27 @@ function pt(e) {
797
649
  basis: o.basis
798
650
  } : { kind: "unqualified" };
799
651
  }
800
- function Je(e, t) {
801
- return qe({ ...e, role: t });
652
+ const ce = "click-reach:";
653
+ function it(e, t) {
654
+ const n = t.source.kind === "semantic" ? t.source.datasetName : t.source.tableName;
655
+ return `${ce}${e}:${n}.${t.name}`;
802
656
  }
803
- function vt(e, t) {
657
+ function at(e) {
658
+ return typeof e == "string" && e.startsWith(ce);
659
+ }
660
+ function Re(e, t) {
661
+ return Ie({ ...e, role: t });
662
+ }
663
+ function ot(e, t) {
804
664
  if (t.id) {
805
665
  const n = [];
806
666
  e.forEach(
807
- ({ fields: a }, s) => a.forEach((r, o) => {
808
- r.id === t.id && n.push({ group: s, index: o });
667
+ ({ fields: a }, r) => a.forEach((s, o) => {
668
+ s.id === t.id && n.push({ group: r, index: o });
809
669
  })
810
670
  );
811
671
  const i = t.alias ? n.find(
812
- ({ group: a, index: s }) => Je(e[a].fields[s], e[a].role) === t.alias
672
+ ({ group: a, index: r }) => Re(e[a].fields[r], e[a].role) === t.alias
813
673
  ) : void 0;
814
674
  if (i) return i;
815
675
  if (n.length === 1) return n[0];
@@ -821,25 +681,25 @@ function vt(e, t) {
821
681
  if (i !== -1) return { group: n, index: i };
822
682
  }
823
683
  }
824
- function ke(e, t) {
684
+ function le(e, t) {
825
685
  const n = e.split(".").map((o) => o.trim()), i = t.split(".").map((o) => o.trim());
826
686
  if (n.length === 0 || i.length === 0 || n.some((o) => !o) || i.some((o) => !o))
827
687
  return !1;
828
- const [a, s] = n.length <= i.length ? [n, i] : [i, n], r = s.length - a.length;
829
- return a.every((o, d) => o === s[d + r]);
688
+ const [a, r] = n.length <= i.length ? [n, i] : [i, n], s = r.length - a.length;
689
+ return a.every((o, l) => o === r[l + s]);
830
690
  }
831
- function Xe(e, t) {
832
- const n = e.split("."), i = t.split("."), a = n.pop(), s = i.pop();
833
- return !!(a && a === s && n.length > 0 && i.length > 0 && ke(
691
+ function ze(e, t) {
692
+ const n = e.split("."), i = t.split("."), a = n.pop(), r = i.pop();
693
+ return !!(a && a === r && n.length > 0 && i.length > 0 && le(
834
694
  n.join("."),
835
695
  i.join(".")
836
696
  ));
837
697
  }
838
- function Ze(e) {
698
+ function Oe(e) {
839
699
  const t = e.map((i) => i.trim()).filter(Boolean);
840
700
  if (t.every(
841
701
  (i, a) => t.slice(a + 1).every(
842
- (s) => ke(i, s)
702
+ (r) => le(i, r)
843
703
  )
844
704
  ))
845
705
  return [...t].sort(
@@ -849,12 +709,12 @@ function Ze(e) {
849
709
  function v(e) {
850
710
  return typeof e == "object" && e !== null && !Array.isArray(e);
851
711
  }
852
- function de(e) {
712
+ function Z(e) {
853
713
  if (typeof e != "string") return "";
854
714
  const t = e.split(".").map((n) => n.trim());
855
715
  return t.length > 1 && t.every(Boolean) ? t.join(".") : "";
856
716
  }
857
- function J(e) {
717
+ function M(e) {
858
718
  if (typeof e != "string") return "";
859
719
  const t = e.split(".").map((n) => n.trim());
860
720
  return t.length > 0 && t.every(Boolean) ? t.join(".") : "";
@@ -862,92 +722,92 @@ function J(e) {
862
722
  function g(e) {
863
723
  return typeof e == "string" ? e.trim() : "";
864
724
  }
865
- function et(e, t) {
725
+ function $e(e, t) {
866
726
  return e.every(
867
727
  (n, i) => e.slice(i + 1).every((a) => t(n, a))
868
728
  );
869
729
  }
870
- function tt(e, t) {
871
- const n = g(e.id), i = g(e.name), a = g(t.entityId), s = g(t.entityName);
872
- return !i || !a && !s ? !1 : (!a || a === n || a === i) && (!s || s === i);
730
+ function we(e, t) {
731
+ const n = g(e.id), i = g(e.name), a = g(t.entityId), r = g(t.entityName);
732
+ return !i || !a && !r ? !1 : (!a || a === n || a === i) && (!r || r === i);
873
733
  }
874
- function nt(e) {
734
+ function Me(e) {
875
735
  const t = v(e.semanticContext) ? e.semanticContext : void 0, n = v(e.fieldMeta) ? e.fieldMeta : void 0, i = g(t == null ? void 0 : t.semanticDomainId), a = Array.isArray(t == null ? void 0 : t.selectedEntities) ? t.selectedEntities.filter(
876
736
  (h) => v(h) && h.type === "dataset"
877
737
  ) : [];
878
738
  if (!!!(i || a.length > 0 || (n == null ? void 0 : n.entityType) === "dataset")) return;
879
739
  if (!i)
880
740
  return { status: "unresolved", reason: "incomplete_source_identity" };
881
- const r = g(n == null ? void 0 : n.entityId), o = g(n == null ? void 0 : n.entityName), d = !!(r || o), c = d ? a.filter(
882
- (h) => tt(h, {
883
- entityId: r,
741
+ const s = g(n == null ? void 0 : n.entityId), o = g(n == null ? void 0 : n.entityName), l = !!(s || o), c = l ? a.filter(
742
+ (h) => we(h, {
743
+ entityId: s,
884
744
  entityName: o
885
745
  })
886
746
  ) : a;
887
747
  if (c.length > 1)
888
748
  return { status: "unresolved", reason: "incomplete_source_identity" };
889
- if (d && a.length > 0 && c.length === 0)
749
+ if (l && a.length > 0 && c.length === 0)
890
750
  return { status: "unresolved", reason: "divergent_source_identity" };
891
- const l = c[0], m = g(l == null ? void 0 : l.domainId), b = g(l == null ? void 0 : l.id), k = g(l == null ? void 0 : l.name);
751
+ const d = c[0], m = g(d == null ? void 0 : d.domainId), y = g(d == null ? void 0 : d.id), k = g(d == null ? void 0 : d.name);
892
752
  if (m && m !== i)
893
753
  return { status: "unresolved", reason: "divergent_source_identity" };
894
- const y = b, C = k || o;
895
- return C ? {
754
+ const b = y, I = k || o;
755
+ return I ? {
896
756
  status: "resolved",
897
757
  source: {
898
758
  kind: "semantic",
899
759
  domainId: i,
900
- datasetName: C,
901
- ...y ? { datasetId: y } : {}
760
+ datasetName: I,
761
+ ...b ? { datasetId: b } : {}
902
762
  }
903
763
  } : { status: "unresolved", reason: "incomplete_source_identity" };
904
764
  }
905
- function it(e, t) {
765
+ function Qe(e, t) {
906
766
  const n = g(e.connectionId), i = v(e.semanticContext) ? e.semanticContext : void 0, a = g(i == null ? void 0 : i.connectionId);
907
767
  if (n && a && n !== a)
908
768
  return { status: "unresolved", reason: "divergent_source_identity" };
909
- const s = n || a, r = v(e.fieldMeta) ? e.fieldMeta : void 0, o = t.split(".").slice(0, -1).join("."), d = J(e.qualifiedTableName), c = J(
910
- r == null ? void 0 : r.qualifiedEntityName
911
- ), l = [
912
- d,
769
+ const r = n || a, s = v(e.fieldMeta) ? e.fieldMeta : void 0, o = t.split(".").slice(0, -1).join("."), l = M(e.qualifiedTableName), c = M(
770
+ s == null ? void 0 : s.qualifiedEntityName
771
+ ), d = [
772
+ l,
913
773
  c,
914
774
  o
915
- ].filter(Boolean), m = Ze(l);
916
- return !m && l.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !s || !m ? { status: "unresolved", reason: "incomplete_source_identity" } : {
775
+ ].filter(Boolean), m = Oe(d);
776
+ return !m && d.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !r || !m ? { status: "unresolved", reason: "incomplete_source_identity" } : {
917
777
  status: "resolved",
918
- source: { kind: "physical", connectionId: s, tableName: m }
778
+ source: { kind: "physical", connectionId: r, tableName: m }
919
779
  };
920
780
  }
921
- function at(e, t) {
922
- const n = v(e.fieldMeta) ? e.fieldMeta : void 0, i = typeof (n == null ? void 0 : n.qualifiedFieldName) == "string" ? n.qualifiedFieldName.trim() : "", a = de(
781
+ function We(e, t) {
782
+ const n = v(e.fieldMeta) ? e.fieldMeta : void 0, i = typeof (n == null ? void 0 : n.qualifiedFieldName) == "string" ? n.qualifiedFieldName.trim() : "", a = Z(
923
783
  n == null ? void 0 : n.qualifiedFieldName
924
- ), s = typeof e.column == "string" ? e.column.trim() : "", r = de(s), o = typeof e.qualifiedTableName == "string" ? e.qualifiedTableName.trim() : "", d = J(
784
+ ), r = typeof e.column == "string" ? e.column.trim() : "", s = Z(r), o = typeof e.qualifiedTableName == "string" ? e.qualifiedTableName.trim() : "", l = M(
925
785
  e.qualifiedTableName
926
786
  );
927
- if (i && !a || t && o && !d || s.includes(".") && !r)
787
+ if (i && !a || t && o && !l || r.includes(".") && !s)
928
788
  return { status: "unresolved", reason: "incomplete_field_identity" };
929
- const c = r.split("."), l = r ? c[c.length - 1] : s, m = t && d && l ? `${d}.${l}` : "", b = [
789
+ const c = s.split("."), d = s ? c[c.length - 1] : r, m = t && l && d ? `${l}.${d}` : "", y = [
930
790
  a,
931
- r,
791
+ s,
932
792
  m
933
793
  ].filter(Boolean);
934
- if (!et(
935
- b,
936
- Xe
794
+ if (!$e(
795
+ y,
796
+ ze
937
797
  ))
938
798
  return { status: "unresolved", reason: "divergent_field_identity" };
939
- const k = r || a || m;
799
+ const k = s || a || m;
940
800
  return k ? { status: "resolved", qualifiedFieldName: k } : { status: "unresolved", reason: "incomplete_field_identity" };
941
801
  }
942
- function ot(e) {
802
+ function Ke(e) {
943
803
  if (!v(e))
944
804
  return { status: "ineligible", reason: "invalid_input" };
945
805
  if (e.kind === "global-date")
946
806
  return { status: "eligible", kind: "global_date" };
947
- const t = K(e.dataType);
807
+ const t = w(e.dataType);
948
808
  if (t !== "date" && t !== "datetime")
949
809
  return { status: "ineligible", reason: "non_date_filter" };
950
- const n = v(e.fieldMeta) ? e.fieldMeta : void 0, i = K(
810
+ const n = v(e.fieldMeta) ? e.fieldMeta : void 0, i = w(
951
811
  n == null ? void 0 : n.dataType
952
812
  );
953
813
  if ((n == null ? void 0 : n.dataType) !== void 0 && i !== "date" && i !== "datetime")
@@ -956,102 +816,102 @@ function ot(e) {
956
816
  return { status: "ineligible", reason: "custom_filter" };
957
817
  if (e.targetColumns !== void 0 && (!Array.isArray(e.targetColumns) || e.targetColumns.length > 0))
958
818
  return { status: "ineligible", reason: "multi_target_filter" };
959
- const a = nt(e), s = at(e, a === void 0);
960
- if (s.status === "unresolved")
961
- return { status: "ineligible", reason: s.reason };
962
- const r = a || it(e, s.qualifiedFieldName);
963
- return r.status === "resolved" ? {
819
+ const a = Me(e), r = We(e, a === void 0);
820
+ if (r.status === "unresolved")
821
+ return { status: "ineligible", reason: r.reason };
822
+ const s = a || Qe(e, r.qualifiedFieldName);
823
+ return s.status === "resolved" ? {
964
824
  status: "eligible",
965
825
  kind: "field_date",
966
- qualifiedFieldName: s.qualifiedFieldName,
967
- source: r.source
968
- } : { status: "ineligible", reason: r.reason };
826
+ qualifiedFieldName: r.qualifiedFieldName,
827
+ source: s.source
828
+ } : { status: "ineligible", reason: s.reason };
969
829
  }
970
- function rt(e) {
830
+ function Ue(e) {
971
831
  if (!v(e) || e.kind !== "filter" || !v(e.filter))
972
832
  return { status: "ineligible", reason: "invalid_input" };
973
- const t = ot(
833
+ const t = Ke(
974
834
  e.filter
975
835
  );
976
836
  return t.status === "ineligible" ? t : t.kind === "field_date" && v(e.compatibility) && e.compatibility.source === "cardInlineFilter" ? { status: "ineligible", reason: "card_inline_filter" } : t;
977
837
  }
978
- function kt(e) {
979
- return rt(e).status === "eligible";
838
+ function st(e) {
839
+ return Ue(e).status === "eligible";
980
840
  }
981
- function Ct(e) {
841
+ function rt(e) {
982
842
  return `compat-filter:${e}`;
983
843
  }
984
- function It(e) {
844
+ function ct(e) {
985
845
  return `compat-control:${e}`;
986
846
  }
987
- function Nt(e, t) {
847
+ function lt(e, t) {
988
848
  return `compat-inline-filter:${e}:${t}`;
989
849
  }
990
- function St(e, t) {
850
+ function dt(e, t) {
991
851
  return `compat-card-control:${e}:${t}`;
992
852
  }
993
- function Ce(e, t) {
853
+ function de(e, t) {
994
854
  if (e) return e;
995
- const n = t === void 0 ? "unknown" : K(t);
855
+ const n = t === void 0 ? "unknown" : w(t);
996
856
  return n === "number" || n === "unknown" ? "SUM" : "COUNT";
997
857
  }
998
- function st(e) {
999
- const t = e.aggregate === Ce(e.semanticAggregate, e.dataType);
858
+ function Ge(e) {
859
+ const t = e.aggregate === de(e.semanticAggregate, e.dataType);
1000
860
  return {
1001
861
  effectiveAggregate: e.aggregate,
1002
862
  aggregateSource: t ? e.semanticAggregate ? "semantic_model" : "default_sum" : "caller_override"
1003
863
  };
1004
864
  }
1005
- function ct(e, t, n) {
865
+ function Ve(e, t, n) {
1006
866
  const i = e.effectiveAggregate !== void 0 || e.aggregateSource !== void 0;
1007
867
  return {
1008
868
  aggregate: t,
1009
869
  aggregateOrigin: n,
1010
- ...i ? st({ aggregate: t, semanticAggregate: e.semanticAggregate, dataType: e.dataType }) : {}
870
+ ...i ? Ge({ aggregate: t, semanticAggregate: e.semanticAggregate, dataType: e.dataType }) : {}
1011
871
  };
1012
872
  }
1013
- function Tt(e, t, n) {
1014
- return { ...e, ...ct(e, t, n) };
873
+ function ut(e, t, n) {
874
+ return { ...e, ...Ve(e, t, n) };
1015
875
  }
1016
- function _t(e) {
876
+ function ft(e) {
1017
877
  return e.aggregate ?? e.effectiveAggregate;
1018
878
  }
1019
- function Dt(e) {
879
+ function mt(e) {
1020
880
  if (!e.aggregate) return !1;
1021
881
  if (e.aggregateOrigin === "explicit" || e.aggregateSource === "caller_override") return !0;
1022
882
  if (e.aggregateSource) {
1023
- const t = e.aggregateSource === "default_sum" ? Ce(void 0, e.dataType) : e.semanticAggregate ?? e.effectiveAggregate;
883
+ const t = e.aggregateSource === "default_sum" ? de(void 0, e.dataType) : e.semanticAggregate ?? e.effectiveAggregate;
1024
884
  return t !== void 0 && e.aggregate !== t;
1025
885
  }
1026
886
  return e.aggregateOrigin !== "default";
1027
887
  }
1028
- const At = ["label", "labelOrigin", "derivedLabel"];
1029
- function Et(e) {
888
+ const bt = ["label", "labelOrigin", "derivedLabel"];
889
+ function yt(e) {
1030
890
  return { label: e, labelOrigin: "override", derivedLabel: void 0 };
1031
891
  }
1032
- function qt(e, t) {
892
+ function gt(e, t) {
1033
893
  const { derivedLabel: n, ...i } = e;
1034
894
  return { ...i, label: t, labelOrigin: "override" };
1035
895
  }
1036
- function Bt(e, t) {
896
+ function ht(e, t) {
1037
897
  return e.labelOrigin === "override" ? {} : { label: t, labelOrigin: "semantic" };
1038
898
  }
1039
- function xt(e) {
899
+ function pt(e) {
1040
900
  if (e.groupedDate !== void 0) return { target: e.groupedDate, direction: "asc" };
1041
901
  if (!(!e.grouped || e.measures.length === 0))
1042
902
  return { target: e.primaryMeasure ?? e.measures[0], direction: "desc" };
1043
903
  }
1044
- const Ft = /* @__PURE__ */ new Set([
904
+ const vt = /* @__PURE__ */ new Set([
1045
905
  "contains",
1046
906
  "startsWith",
1047
907
  "endsWith",
1048
908
  "like",
1049
909
  "not like"
1050
910
  ]);
1051
- function Ie(e) {
911
+ function ue(e) {
1052
912
  return e.includes("%") || e.includes("_");
1053
913
  }
1054
- function dt(e, t) {
914
+ function Je(e, t) {
1055
915
  switch (e) {
1056
916
  case "contains":
1057
917
  return { pattern: `%${t}%`, negate: !1 };
@@ -1065,68 +925,68 @@ function dt(e, t) {
1065
925
  return { pattern: t, negate: !0 };
1066
926
  }
1067
927
  }
1068
- function lt(e) {
1069
- return Ie(e) ? e : `%${e}%`;
928
+ function Xe(e) {
929
+ return ue(e) ? e : `%${e}%`;
1070
930
  }
1071
- function Ht(e, t) {
1072
- const { pattern: n, negate: i } = dt(e, t), a = n.length > 2 && n.startsWith("%") && n.endsWith("%") ? n.slice(1, -1) : void 0, s = a !== void 0 && !Ie(a) ? a : n;
1073
- if (lt(s) === n)
1074
- return { operator: i ? "not_contains" : "contains", value: s };
931
+ function kt(e, t) {
932
+ const { pattern: n, negate: i } = Je(e, t), a = n.length > 2 && n.startsWith("%") && n.endsWith("%") ? n.slice(1, -1) : void 0, r = a !== void 0 && !ue(a) ? a : n;
933
+ if (Xe(r) === n)
934
+ return { operator: i ? "not_contains" : "contains", value: r };
1075
935
  }
1076
- function Pt(e) {
936
+ function It(e) {
1077
937
  const { operation: t, values: n, temporalPrecision: i } = e;
1078
938
  if (t !== "=" && t !== "!=" || i === "minute")
1079
939
  return null;
1080
940
  const a = Array.isArray(n) ? n : [n];
1081
941
  if (a.length !== 1 || typeof a[0] != "string") return null;
1082
- const s = a[0].trim();
1083
- return fe(s) ? { operation: t, day: s } : null;
942
+ const r = a[0].trim();
943
+ return ge(r) ? { operation: t, day: r } : null;
1084
944
  }
1085
- function Ne(e) {
945
+ function fe(e) {
1086
946
  const { label: t, ...n } = e;
1087
947
  return {
1088
- dataset: Ee(n),
948
+ dataset: ke(n),
1089
949
  ...e.kind === "physical" ? { dialect: e.dialect, connectionType: e.connectionType } : {}
1090
950
  };
1091
951
  }
1092
- function Se(e) {
952
+ function me(e) {
1093
953
  const { label: t, source: n, ...i } = e;
1094
- return { ...i, source: n && Ne(n) };
954
+ return { ...i, source: n && fe(n) };
1095
955
  }
1096
- function te(e) {
956
+ function K(e) {
1097
957
  const {
1098
958
  label: t,
1099
959
  format: n,
1100
960
  description: i,
1101
961
  tags: a,
1102
- inputs: s,
1103
- ...r
962
+ inputs: r,
963
+ ...s
1104
964
  } = e;
1105
965
  return {
1106
- ...r,
966
+ ...s,
1107
967
  inputs: Object.fromEntries(
1108
- Object.entries(s).map(([o, d]) => [
968
+ Object.entries(r).map(([o, l]) => [
1109
969
  o,
1110
- { ...d, field: Se(d.field) }
970
+ { ...l, field: me(l.field) }
1111
971
  ])
1112
972
  )
1113
973
  };
1114
974
  }
1115
- function W(e) {
975
+ function z(e) {
1116
976
  const { derivedField: t, ...n } = e;
1117
977
  return {
1118
- ...Se(n),
1119
- derivedField: t && te(t)
978
+ ...me(n),
979
+ derivedField: t && K(t)
1120
980
  };
1121
981
  }
1122
- function z(e) {
982
+ function H(e) {
1123
983
  const {
1124
984
  label: t,
1125
985
  format: n,
1126
986
  description: i,
1127
987
  semanticTemporalPresentation: a,
1128
- derivedField: s,
1129
- calculatedFormula: r,
988
+ derivedField: r,
989
+ calculatedFormula: s,
1130
990
  ...o
1131
991
  } = e;
1132
992
  return {
@@ -1134,44 +994,44 @@ function z(e) {
1134
994
  semanticTemporalPresentation: a && {
1135
995
  granularity: a.granularity
1136
996
  },
1137
- derivedField: s && te(s),
1138
- calculatedFormula: r && {
1139
- ...r,
1140
- inputFields: r.inputFields.map(z)
997
+ derivedField: r && K(r),
998
+ calculatedFormula: s && {
999
+ ...s,
1000
+ inputFields: s.inputFields.map(H)
1141
1001
  }
1142
1002
  };
1143
1003
  }
1144
- function Te(e) {
1004
+ function be(e) {
1145
1005
  return {
1146
1006
  ...e,
1147
1007
  conditions: e.conditions.map(
1148
1008
  ({ label: t, field: n, ...i }) => ({
1149
1009
  ...i,
1150
- field: z(n)
1010
+ field: H(n)
1151
1011
  })
1152
1012
  ),
1153
- groups: e.groups.map(Te)
1013
+ groups: e.groups.map(be)
1154
1014
  };
1155
1015
  }
1156
- function Lt(e) {
1016
+ function Nt(e) {
1157
1017
  return {
1158
1018
  ...e,
1159
- source: Ne(e.source),
1019
+ source: fe(e.source),
1160
1020
  rows: e.rows.map((t) => ({
1161
1021
  ...t,
1162
- field: W(t.field)
1022
+ field: z(t.field)
1163
1023
  })),
1164
1024
  columns: e.columns.map((t) => ({
1165
1025
  ...t,
1166
- field: W(t.field)
1026
+ field: z(t.field)
1167
1027
  })),
1168
1028
  measures: e.measures.map(
1169
- (t) => t.kind === "aggregate" ? { ...t, field: W(t.field) } : {
1029
+ (t) => t.kind === "aggregate" ? { ...t, field: z(t.field) } : {
1170
1030
  ...t,
1171
- definition: te(t.definition)
1031
+ definition: K(t.definition)
1172
1032
  }
1173
1033
  ),
1174
- filters: e.filters && Te(e.filters),
1034
+ filters: e.filters && be(e.filters),
1175
1035
  joinPlan: e.joinPlan && {
1176
1036
  ...e.joinPlan,
1177
1037
  // relationshipName participates in governed relationship resolution.
@@ -1181,73 +1041,61 @@ function Lt(e) {
1181
1041
  ...n,
1182
1042
  keys: n.keys.map((i) => ({
1183
1043
  ...i,
1184
- source: z(i.source),
1185
- target: z(i.target)
1044
+ source: H(i.source),
1045
+ target: H(i.target)
1186
1046
  }))
1187
1047
  }))
1188
1048
  }))
1189
1049
  },
1190
1050
  // Sort scopes are keyed overrides, unlike ordered axes/calculation inputs.
1191
1051
  sorts: [...e.sorts].sort((t, n) => {
1192
- const i = ae(t), a = ae(n);
1052
+ const i = V(t), a = V(n);
1193
1053
  return i < a ? -1 : i > a ? 1 : 0;
1194
1054
  })
1195
1055
  };
1196
1056
  }
1197
1057
  export {
1198
- te as $,
1199
- At as A,
1200
- Et as B,
1201
- qt as C,
1202
- xt as D,
1203
- Ie as E,
1204
- dt as F,
1205
- lt as G,
1206
- Ht as H,
1207
- ee as I,
1208
- G as J,
1209
- E as K,
1058
+ ft as A,
1059
+ mt as B,
1060
+ bt as C,
1061
+ yt as D,
1062
+ gt as E,
1063
+ pt as F,
1064
+ ue as G,
1065
+ Je as H,
1066
+ Xe as I,
1067
+ kt as J,
1068
+ It as K,
1210
1069
  le as L,
1211
- q as M,
1212
- xe as N,
1213
- B as O,
1214
- V as P,
1215
- D as Q,
1216
- re as R,
1217
- Ft as S,
1218
- ue as T,
1219
- yt as U,
1220
- bt as V,
1221
- fe as W,
1222
- gt as X,
1223
- Pt as Y,
1224
- ke as Z,
1225
- Ze as _,
1226
- Lt as a,
1227
- Xe as a0,
1228
- be as b,
1229
- Me as c,
1230
- ve as d,
1231
- Ye as e,
1232
- pt as f,
1233
- Bt as g,
1234
- vt as h,
1235
- ge as i,
1236
- tt as j,
1070
+ Oe as M,
1071
+ K as N,
1072
+ ze as O,
1073
+ J as R,
1074
+ vt as S,
1075
+ Nt as a,
1076
+ ie as b,
1077
+ ae as c,
1078
+ _e as d,
1079
+ re as e,
1080
+ Pe as f,
1081
+ ht as g,
1082
+ nt as h,
1083
+ at as i,
1084
+ it as j,
1237
1085
  ot as k,
1238
- rt as l,
1239
- ct as m,
1240
- kt as n,
1241
- Ct as o,
1242
- It as p,
1243
- Nt as q,
1244
- ht as r,
1245
- Je as s,
1246
- St as t,
1247
- Pe as u,
1248
- Ce as v,
1249
- st as w,
1250
- Tt as x,
1251
- _t as y,
1252
- Dt as z
1086
+ we as l,
1087
+ Ve as m,
1088
+ Ke as n,
1089
+ Ue as o,
1090
+ st as p,
1091
+ rt as q,
1092
+ tt as r,
1093
+ Re as s,
1094
+ ct as t,
1095
+ lt as u,
1096
+ dt as v,
1097
+ Ne as w,
1098
+ de as x,
1099
+ Ge as y,
1100
+ ut as z
1253
1101
  };