react-semaphor 0.1.537 → 0.1.539

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 (174) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
  24. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
  25. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  26. package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
  27. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
  28. package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
  101. package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
  102. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  103. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  104. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  105. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  106. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  107. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  108. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  109. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  110. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  111. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  112. package/dist/types/lib/types/token-types.d.ts +11 -0
  113. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  114. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  115. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  116. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  117. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  118. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  119. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  120. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  121. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  122. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  123. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  124. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  125. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  126. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  127. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  128. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  129. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  130. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  131. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  132. package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
  133. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  134. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  135. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  136. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  137. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  138. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  140. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  141. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  142. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  144. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  145. package/dist/types/shared/format-utils/index.d.ts +3 -0
  146. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  147. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  148. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  149. package/dist/types/shared/layouts/index.d.ts +1 -0
  150. package/package.json +12 -2
  151. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  152. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  153. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  154. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  155. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  156. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  157. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  158. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  159. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  160. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  161. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  162. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  163. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  164. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  165. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  166. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  167. package/dist/chunks/save-kO6cIaob.js +0 -34
  168. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  169. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  170. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  171. package/dist/chunks/x-CXDkqdur.js +0 -149
  172. package/dist/types/lib/class-utils.d.ts +0 -2
  173. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  174. package/dist/types/lib/utils.d.ts +0 -51
@@ -1,20 +1,24 @@
1
- import { c as Z, C as De } from "./x-CXDkqdur.js";
2
- import { useEffect as K, forwardRef as st, useMemo as H, useState as M, useRef as se, useCallback as F, Fragment as ot } from "react";
3
- import { a1 as ze, a2 as dt, u as it, n as Me, o as Re, p as je, c as R, q as Be, a3 as $e, B as L, a4 as ct, a5 as ut, a6 as G, a7 as we, a8 as Te, a9 as oe, aa as de, ab as mt, ac as pt, ad as _e, ae as ft, af as ht, ag as J, ah as gt, ai as Ee, aj as Ue, ak as Qe, al as Ye, m as z, r as He, s as ie, t as ce, v as ue, w as me, x as pe, am as Xe, an as bt, ao as xt, ap as Ve, aq as vt, ar as Le, as as yt, at as Ct, au as kt, av as Nt, aw as fe } from "./switch-DO8a0EfJ.js";
4
- import { ar as St, u as Dt, as as wt, at as Tt, au as Ie, av as _t, aw as Et, ax as Ge, ay as Je, az as Vt, aA as Lt, aB as It, aC as Ft, aD as At, aE as qt } from "./semaphor-ready-indicator-CHu1L-lo.js";
1
+ import { c as W, C as Se } from "./x-4f5U2XwU.js";
2
+ import { useEffect as K, forwardRef as nt, useMemo as H, useState as z, useRef as se, useCallback as F, Fragment as st } from "react";
3
+ import { Z as qe, _ as ot, aE as dt, u as it, f as ct, aF as ut, aG as mt, aH as De, aI as pt, aJ as ft, aK as Me, aL as ze, aM as ht, aN as gt, aO as bt, aP as xt, aQ as vt, aR as yt } from "./semaphor-ready-indicator-ldcwmLoY.js";
5
4
  import { jsx as t, jsxs as o, Fragment as X } from "react/jsx-runtime";
6
- import "./validators-DMSH81OM.js";
7
- import "./matrix-operation-contract-BKupLHXL.js";
5
+ import "./index-CuHybtft.js";
6
+ import "./validators-Ej1DdCXa.js";
7
+ import "./matrix-operation-contract-B8PBF1Gd.js";
8
+ import "./analytics-base-schemas-BFAoRlkU.js";
8
9
  import "zod";
9
10
  import "../value-format-preferences/index.js";
10
- import { C as Fe } from "./selection-reducer-CiDEtmAq.js";
11
+ import { c as R } from "./class-utils-Df1OVOT1.js";
12
+ import { m as Re, n as je, o as Be, p as $e, x as Qe, B as E, l as M, q as Ue, r as oe, s as de, t as ie, u as ce, v as ue } from "./switch-CvItuC1Q.js";
13
+ import { B as Ct, C as kt, D as G, E as we, F as Te, G as me, H as pe, I as Nt, J as St, K as _e, L as Dt, M as wt, N as J, O as Tt, P as Ve, Q as Ye, R as He, S as Xe, T as Ge, U as _t, V as Vt, W as Le, X as Lt, Y as Ee, Z as Et, _ as It, $ as Ft, a0 as Ot, a1 as fe } from "./document-dashboard-inputs-BrYYlRVo.js";
14
+ import { C as Ie } from "./selection-reducer-vKIb_jS6.js";
11
15
  /**
12
16
  * @license lucide-react v0.453.0 - ISC
13
17
  *
14
18
  * This source code is licensed under the ISC license.
15
19
  * See the LICENSE file in the root directory of this source tree.
16
20
  */
17
- const Ot = Z("CircleCheck", [
21
+ const At = W("CircleCheck", [
18
22
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
19
23
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
20
24
  ]);
@@ -24,7 +28,7 @@ const Ot = Z("CircleCheck", [
24
28
  * This source code is licensed under the ISC license.
25
29
  * See the LICENSE file in the root directory of this source tree.
26
30
  */
27
- const ea = Z("FilterX", [
31
+ const ar = W("FilterX", [
28
32
  ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
29
33
  ["path", { d: "m22 3-5 5", key: "12jva0" }],
30
34
  ["path", { d: "m17 3 5 5", key: "k36vhe" }]
@@ -35,7 +39,7 @@ const ea = Z("FilterX", [
35
39
  * This source code is licensed under the ISC license.
36
40
  * See the LICENSE file in the root directory of this source tree.
37
41
  */
38
- const zt = Z("Library", [
42
+ const qt = W("Library", [
39
43
  ["path", { d: "m16 6 4 14", key: "ji33uf" }],
40
44
  ["path", { d: "M12 6v14", key: "1n7gus" }],
41
45
  ["path", { d: "M8 8v12", key: "1gg7y9" }],
@@ -47,33 +51,23 @@ const zt = Z("Library", [
47
51
  * This source code is licensed under the ISC license.
48
52
  * See the LICENSE file in the root directory of this source tree.
49
53
  */
50
- const Mt = Z("Link2", [
54
+ const Mt = W("Link2", [
51
55
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
52
56
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
53
57
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
54
- ]), he = /* @__PURE__ */ new Set();
55
- function ta(s) {
56
- return he.add(s), () => {
57
- he.delete(s);
58
- };
59
- }
60
- function aa() {
61
- he.forEach((s) => {
62
- s();
63
- });
64
- }
65
- function ra() {
66
- const s = ze((g) => g.card.dataSource), {
58
+ ]);
59
+ function lr() {
60
+ const s = qe((g) => g.card.dataSource), {
67
61
  setSelectedConnectionId: n,
68
62
  setSelectedDatabaseName: u,
69
63
  setSelectedSchemaName: i,
70
64
  setSelectedTableName: k,
71
65
  setSelectedDatamodelId: b
72
- } = dt();
66
+ } = ot();
73
67
  K(() => {
74
68
  var T;
75
69
  if (!s) return;
76
- const { tableName: g, schemaName: v, databaseName: p, connectionId: N } = St(s), x = (T = s.selectedEntities) == null ? void 0 : T[0], S = (x == null ? void 0 : x.type) === "model" && "id" in x ? x.id : "";
70
+ const { tableName: g, schemaName: v, databaseName: p, connectionId: N } = dt(s), x = (T = s.selectedEntities) == null ? void 0 : T[0], S = (x == null ? void 0 : x.type) === "model" && "id" in x ? x.id : "";
77
71
  n(N || ""), u(p || ""), i(v || ""), k(g || ""), b(S);
78
72
  }, [
79
73
  s,
@@ -84,14 +78,14 @@ function ra() {
84
78
  b
85
79
  ]);
86
80
  }
87
- function la({
81
+ function nr({
88
82
  type: s,
89
83
  isLinked: n,
90
84
  className: u,
91
85
  showLabel: i = !1,
92
86
  showLocal: k = !1
93
87
  }) {
94
- const b = it((I) => I.selectedFrameId), g = Dt((I) => I.selectedVisual), v = ze((I) => I.frame);
88
+ const b = it((I) => I.selectedFrameId), g = ct((I) => I.selectedVisual), v = qe((I) => I.frame);
95
89
  let p;
96
90
  if (s)
97
91
  p = s;
@@ -128,15 +122,15 @@ function la({
128
122
  }, T = {
129
123
  local: /* @__PURE__ */ t("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
130
124
  linked: /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" }),
131
- library: /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" })
125
+ library: /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" })
132
126
  }, _ = {
133
127
  local: "Local",
134
128
  linked: "Linked",
135
129
  library: "Library"
136
130
  };
137
- return /* @__PURE__ */ t(Me, { children: /* @__PURE__ */ o(Re, { delayDuration: 300, children: [
138
- /* @__PURE__ */ t(je, { asChild: !0, children: /* @__PURE__ */ o(
139
- wt,
131
+ return /* @__PURE__ */ t(Re, { children: /* @__PURE__ */ o(je, { delayDuration: 300, children: [
132
+ /* @__PURE__ */ t(Be, { asChild: !0, children: /* @__PURE__ */ o(
133
+ ut,
140
134
  {
141
135
  variant: "outline",
142
136
  className: R(
@@ -151,19 +145,19 @@ function la({
151
145
  }
152
146
  ) }),
153
147
  /* @__PURE__ */ o(
154
- Be,
148
+ $e,
155
149
  {
156
150
  side: "bottom",
157
151
  className: R("max-w-xs", f[p]),
158
152
  children: [
159
- /* @__PURE__ */ t($e, { className: S[p] }),
153
+ /* @__PURE__ */ t(Qe, { className: S[p] }),
160
154
  /* @__PURE__ */ t("p", { children: x[p] })
161
155
  ]
162
156
  }
163
157
  )
164
158
  ] }) });
165
159
  }
166
- const Rt = st(
160
+ const zt = nt(
167
161
  ({
168
162
  side: s = "bottom",
169
163
  children: n,
@@ -174,9 +168,9 @@ const Rt = st(
174
168
  buttonProps: g,
175
169
  disabled: v,
176
170
  ...p
177
- }, N) => /* @__PURE__ */ t(Me, { children: /* @__PURE__ */ o(Re, { delayDuration: b, children: [
178
- /* @__PURE__ */ t(je, { asChild: !0, children: /* @__PURE__ */ t(
179
- L,
171
+ }, N) => /* @__PURE__ */ t(Re, { children: /* @__PURE__ */ o(je, { delayDuration: b, children: [
172
+ /* @__PURE__ */ t(Be, { asChild: !0, children: /* @__PURE__ */ t(
173
+ E,
180
174
  {
181
175
  disabled: v,
182
176
  ref: N,
@@ -185,12 +179,12 @@ const Rt = st(
185
179
  onClick: k,
186
180
  ...p,
187
181
  ...g,
188
- className: R(`${ct}`, u),
182
+ className: R(`${Ct}`, u),
189
183
  children: n
190
184
  }
191
185
  ) }),
192
186
  i && /* @__PURE__ */ o(
193
- Be,
187
+ $e,
194
188
  {
195
189
  side: s,
196
190
  sideOffset: 10,
@@ -199,19 +193,19 @@ const Rt = st(
199
193
  ),
200
194
  children: [
201
195
  i,
202
- /* @__PURE__ */ t($e, { className: "fill-foreground" })
196
+ /* @__PURE__ */ t(Qe, { className: "fill-foreground" })
203
197
  ]
204
198
  }
205
199
  )
206
200
  ] }) })
207
201
  );
208
- Rt.displayName = "IconButton";
209
- function Ke(s) {
202
+ zt.displayName = "IconButton";
203
+ function Je(s) {
210
204
  const { control: n, onChange: u } = s;
211
205
  return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
212
- /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
206
+ /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
213
207
  /* @__PURE__ */ t(
214
- He,
208
+ Ue,
215
209
  {
216
210
  size: "xs",
217
211
  value: n.label,
@@ -221,11 +215,11 @@ function Ke(s) {
221
215
  )
222
216
  ] });
223
217
  }
224
- function jt(s) {
218
+ function Rt(s) {
225
219
  const { currentStep: n, labels: u } = s;
226
220
  return /* @__PURE__ */ t("div", { className: "sticky top-0 z-10 -mx-1 border-b border-border/60 bg-background/95 px-1 pb-2.5 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2 sm:gap-2.5", children: u.map((i, k) => {
227
221
  const b = k + 1, g = b === n, v = b < n;
228
- return /* @__PURE__ */ o(ot, { children: [
222
+ return /* @__PURE__ */ o(st, { children: [
229
223
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5", children: [
230
224
  /* @__PURE__ */ t(
231
225
  "span",
@@ -258,7 +252,7 @@ function jt(s) {
258
252
  ] }, i);
259
253
  }) }) });
260
254
  }
261
- function W(s) {
255
+ function Z(s) {
262
256
  const { secondary: n, tertiary: u, primary: i } = s;
263
257
  return /* @__PURE__ */ o("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
264
258
  n,
@@ -266,26 +260,26 @@ function W(s) {
266
260
  i
267
261
  ] });
268
262
  }
269
- function Bt(s) {
263
+ function jt(s) {
270
264
  const { control: n, scope: u, detail: i } = s;
271
265
  return /* @__PURE__ */ o("div", { className: "flex items-start gap-2.5 rounded-control border border-border/60 bg-muted/30 px-3 py-2.5", children: [
272
- /* @__PURE__ */ t(Ot, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
266
+ /* @__PURE__ */ t(At, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
273
267
  /* @__PURE__ */ o("div", { className: "min-w-0 space-y-0.5", children: [
274
268
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: n.label }),
275
269
  /* @__PURE__ */ o("div", { className: "text-[12px] text-muted-foreground", children: [
276
- Ue(n.type).label,
270
+ Ye(n.type).label,
277
271
  " ·",
278
272
  " ",
279
- Ye(n),
273
+ Xe(n),
280
274
  " ·",
281
275
  " ",
282
- Qe(u, n.placement)
276
+ He(u, n.placement)
283
277
  ] }),
284
278
  i ? /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: i }) : null
285
279
  ] })
286
280
  ] });
287
281
  }
288
- function Ae(s) {
282
+ function Fe(s) {
289
283
  const {
290
284
  control: n,
291
285
  defaultValue: u,
@@ -301,9 +295,9 @@ function Ae(s) {
301
295
  nextDisabled: S
302
296
  } = s;
303
297
  return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
304
- /* @__PURE__ */ t(Ke, { control: n, onChange: p }),
298
+ /* @__PURE__ */ t(Je, { control: n, onChange: p }),
305
299
  /* @__PURE__ */ t(
306
- Ge,
300
+ Me,
307
301
  {
308
302
  control: n,
309
303
  availableFieldChoices: i,
@@ -315,7 +309,7 @@ function Ae(s) {
315
309
  }
316
310
  ),
317
311
  /* @__PURE__ */ t(
318
- Je,
312
+ ze,
319
313
  {
320
314
  control: n,
321
315
  value: u,
@@ -328,11 +322,11 @@ function Ae(s) {
328
322
  }
329
323
  ),
330
324
  /* @__PURE__ */ t(
331
- W,
325
+ Z,
332
326
  {
333
- secondary: /* @__PURE__ */ t(L, { type: "button", variant: "outline", size: "xs", onClick: x, children: "Back" }),
327
+ secondary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: x, children: "Back" }),
334
328
  primary: /* @__PURE__ */ t(
335
- L,
329
+ E,
336
330
  {
337
331
  type: "button",
338
332
  size: "xs",
@@ -345,14 +339,14 @@ function Ae(s) {
345
339
  )
346
340
  ] });
347
341
  }
348
- const $t = /* @__PURE__ */ new Set([
342
+ const Bt = /* @__PURE__ */ new Set([
349
343
  "grain_selector",
350
344
  "aggregation_selector",
351
345
  "field_selector",
352
346
  "metric_selector"
353
347
  ]);
354
- function qe(s) {
355
- const { text: n, ariaLabel: u } = s, [i, k] = M(!1);
348
+ function Oe(s) {
349
+ const { text: n, ariaLabel: u } = s, [i, k] = z(!1);
356
350
  return /* @__PURE__ */ o(
357
351
  "button",
358
352
  {
@@ -373,7 +367,7 @@ function qe(s) {
373
367
  }
374
368
  );
375
369
  }
376
- function Oe(s) {
370
+ function Ae(s) {
377
371
  const {
378
372
  control: n,
379
373
  scope: u,
@@ -384,10 +378,10 @@ function Oe(s) {
384
378
  onBack: v,
385
379
  onCancel: p,
386
380
  onDone: N
387
- } = s, x = $t.has(n.type), f = i.match(/\[\[param\.(.+?)\]\]/), S = f ? `{{ param('${f[1]}') }}` : "";
381
+ } = s, x = Bt.has(n.type), f = i.match(/\[\[param\.(.+?)\]\]/), S = f ? `{{ param('${f[1]}') }}` : "";
388
382
  return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
389
383
  /* @__PURE__ */ t(
390
- Bt,
384
+ jt,
391
385
  {
392
386
  control: n,
393
387
  scope: u,
@@ -404,14 +398,14 @@ function Oe(s) {
404
398
  /* @__PURE__ */ o("div", { className: "space-y-1.5 px-3 py-2.5", children: [
405
399
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
406
400
  /* @__PURE__ */ t(
407
- qe,
401
+ Oe,
408
402
  {
409
403
  text: i,
410
404
  ariaLabel: "Copy SQL control reference"
411
405
  }
412
406
  ),
413
407
  S ? /* @__PURE__ */ t(
414
- qe,
408
+ Oe,
415
409
  {
416
410
  text: S,
417
411
  ariaLabel: "Copy Jinja control reference"
@@ -436,16 +430,16 @@ function Oe(s) {
436
430
  ] })
437
431
  ] }),
438
432
  /* @__PURE__ */ t(
439
- W,
433
+ Z,
440
434
  {
441
- secondary: /* @__PURE__ */ t(L, { type: "button", variant: "outline", size: "xs", onClick: v, children: "Back" }),
442
- tertiary: /* @__PURE__ */ t(L, { type: "button", variant: "outline", size: "xs", onClick: p, children: "Cancel" }),
443
- primary: /* @__PURE__ */ t(L, { type: "button", size: "xs", onClick: N, children: "Done" })
435
+ secondary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: v, children: "Back" }),
436
+ tertiary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: p, children: "Cancel" }),
437
+ primary: /* @__PURE__ */ t(E, { type: "button", size: "xs", onClick: N, children: "Done" })
444
438
  }
445
439
  )
446
440
  ] });
447
441
  }
448
- function Ut(s) {
442
+ function $t(s) {
449
443
  const n = G(
450
444
  s.scope,
451
445
  s.existingControls,
@@ -454,7 +448,7 @@ function Ut(s) {
454
448
  ...n,
455
449
  label: fe[s.type]
456
450
  } : {
457
- ...Xe({
451
+ ...Ge({
458
452
  controls: [
459
453
  {
460
454
  ...n,
@@ -472,7 +466,7 @@ function Ut(s) {
472
466
  defaultValue: J(u, void 0)
473
467
  };
474
468
  }
475
- function na({
469
+ function sr({
476
470
  scope: s,
477
471
  controls: n,
478
472
  reservedControlIds: u,
@@ -490,25 +484,25 @@ function na({
490
484
  onCreateFlowActiveChange: _,
491
485
  onCreateFlowComplete: I
492
486
  }) {
493
- const A = H(
487
+ const O = H(
494
488
  () => new Set(u || []),
495
489
  [u]
496
- ), We = bt(s), Ze = ut(s), [ge, P] = M(
490
+ ), Ke = _t(s), Ze = kt(s), [he, P] = z(
497
491
  null
498
- ), [Pe, U] = M(
492
+ ), [We, Q] = z(
499
493
  null
500
- ), [a, D] = M(
494
+ ), [r, D] = z(
501
495
  () => g ? {
502
496
  step: 1,
503
- control: G(s, n, Array.from(A))
497
+ control: G(s, n, Array.from(O))
504
498
  } : null
505
- ), Q = se({}), j = se(void 0), be = se(g), xe = H(() => {
499
+ ), U = se({}), j = se(void 0), ge = se(g), be = H(() => {
506
500
  const e = we({ scope: s, card: S });
507
501
  if (!T)
508
502
  return e;
509
503
  const l = new Set(T);
510
- return e.filter((r) => l.has(r.value));
511
- }, [T, S, s]), et = F(
504
+ return e.filter((a) => l.has(a.value));
505
+ }, [T, S, s]), Pe = F(
512
506
  (e) => {
513
507
  const l = we({
514
508
  scope: s,
@@ -517,63 +511,63 @@ function na({
517
511
  });
518
512
  if (!T)
519
513
  return l;
520
- const r = new Set(T);
521
- return l.filter((d) => r.has(d.value));
514
+ const a = new Set(T);
515
+ return l.filter((d) => a.has(d.value));
522
516
  },
523
517
  [T, S, s]
524
- ), V = F(
518
+ ), L = F(
525
519
  (e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
526
520
  [s]
527
521
  ), ee = H(
528
- () => a ? Te(
522
+ () => r ? Te(
529
523
  x || [],
530
- a.control.type
524
+ r.control.type
531
525
  ) : [],
532
- [a, x]
526
+ [r, x]
533
527
  ), Y = H(() => {
534
- if (!a)
528
+ if (!r)
535
529
  return {
536
530
  fields: p || [],
537
531
  metrics: N || []
538
532
  };
539
- if (!V(a.control.type))
533
+ if (!L(r.control.type))
540
534
  return {
541
535
  fields: p || [],
542
536
  metrics: N || []
543
537
  };
544
- const e = a.selectedCardIds || [], l = oe({
545
- controlType: a.control.type,
538
+ const e = r.selectedCardIds || [], l = me({
539
+ controlType: r.control.type,
546
540
  participants: x || [],
547
541
  selectedCardIds: e
548
542
  });
549
543
  return {
550
- fields: a.control.type === "field_selector" ? l.choices.map((r) => ({
551
- option: r,
552
- target: l.fieldTargetMap[r.value]
544
+ fields: r.control.type === "field_selector" ? l.choices.map((a) => ({
545
+ option: a,
546
+ target: l.fieldTargetMap[a.value]
553
547
  })) : [],
554
- metrics: a.control.type === "metric_selector" ? l.choices.map((r) => ({
555
- option: r,
556
- target: l.metricTargetMap[r.value]
548
+ metrics: r.control.type === "metric_selector" ? l.choices.map((a) => ({
549
+ option: a,
550
+ target: l.metricTargetMap[a.value]
557
551
  })) : []
558
552
  };
559
553
  }, [
560
554
  p,
561
555
  N,
562
- a,
563
- V,
556
+ r,
557
+ L,
564
558
  x
565
559
  ]);
566
560
  K(() => {
567
- _ == null || _(!!a);
568
- }, [a, _]), K(() => {
569
- const e = g && !be.current;
570
- be.current = g, e && (D({
561
+ _ == null || _(!!r);
562
+ }, [r, _]), K(() => {
563
+ const e = g && !ge.current;
564
+ ge.current = g, e && (D({
571
565
  step: 1,
572
- control: G(s, n, Array.from(A))
573
- }), U(null), P(null));
574
- }, [n, g, A, s]);
575
- const tt = (e) => {
576
- if (!V(e.type))
566
+ control: G(s, n, Array.from(O))
567
+ }), Q(null), P(null));
568
+ }, [n, g, O, s]);
569
+ const et = (e) => {
570
+ if (!L(e.type))
577
571
  return {
578
572
  fields: p || [],
579
573
  metrics: N || []
@@ -584,40 +578,40 @@ function na({
584
578
  fields: p || [],
585
579
  metrics: N || []
586
580
  };
587
- const r = oe({
581
+ const a = me({
588
582
  controlType: e.type,
589
583
  participants: x || [],
590
584
  selectedCardIds: l
591
585
  });
592
586
  return {
593
- fields: e.type === "field_selector" ? r.choices.map((d) => ({
587
+ fields: e.type === "field_selector" ? a.choices.map((d) => ({
594
588
  option: d,
595
- target: r.fieldTargetMap[d.value]
589
+ target: a.fieldTargetMap[d.value]
596
590
  })) : [],
597
- metrics: e.type === "metric_selector" ? r.choices.map((d) => ({
591
+ metrics: e.type === "metric_selector" ? a.choices.map((d) => ({
598
592
  option: d,
599
- target: r.metricTargetMap[d.value]
593
+ target: a.metricTargetMap[d.value]
600
594
  })) : []
601
595
  };
602
596
  }, te = (e) => {
603
- if (!V(e.control.type))
597
+ if (!L(e.control.type))
604
598
  return {
605
599
  nextControl: e.control,
606
600
  cardBindingsById: void 0
607
601
  };
608
- const l = (f == null ? void 0 : f[e.control.id]) || [], r = oe({
602
+ const l = (f == null ? void 0 : f[e.control.id]) || [], a = me({
609
603
  controlType: e.control.type,
610
604
  participants: x || [],
611
605
  selectedCardIds: e.nextSelectedCardIds
612
- }), d = kt({
606
+ }), d = Ft({
613
607
  control: e.control,
614
- choices: r.choices
608
+ choices: a.choices
615
609
  }), m = Object.fromEntries(
616
610
  l.filter((h) => !e.nextSelectedCardIds.includes(h)).map((h) => [h, void 0])
617
611
  );
618
612
  return e.nextSelectedCardIds.length > 0 && d.source.kind === "manual" && d.source.options.length > 0 && Object.assign(
619
613
  m,
620
- Le({
614
+ Ee({
621
615
  control: d,
622
616
  participants: x || [],
623
617
  selectedCardIds: e.nextSelectedCardIds,
@@ -627,19 +621,19 @@ function na({
627
621
  nextControl: d,
628
622
  cardBindingsById: m
629
623
  };
630
- }, E = F(
631
- (e, l = i, r = { type: "update" }) => {
632
- const d = e.map((m) => (de({
624
+ }, V = F(
625
+ (e, l = i, a = { type: "update" }) => {
626
+ const d = e.map((m) => (pe({
633
627
  control: m,
634
628
  defaultValues: l
635
- }), mt(
629
+ }), Nt(
636
630
  m
637
631
  )));
638
- k(d, l, r);
632
+ k(d, l, a);
639
633
  },
640
634
  [i, k]
641
635
  ), B = (e, l) => {
642
- const r = n.find(
636
+ const a = n.find(
643
637
  (C) => C.id === e
644
638
  );
645
639
  let d = n.map((C) => C.id !== e ? C : l(C));
@@ -647,226 +641,226 @@ function na({
647
641
  (C) => C.id === e
648
642
  );
649
643
  let h, c;
650
- if (m && (!r || yt({ control: r }, { control: m })) && s === "dashboard" && (m.type === "field_selector" || m.type === "metric_selector")) {
651
- const C = (f == null ? void 0 : f[m.id]) || [], O = te({
644
+ if (m && (!a || Et({ control: a }, { control: m })) && s === "dashboard" && (m.type === "field_selector" || m.type === "metric_selector")) {
645
+ const C = (f == null ? void 0 : f[m.id]) || [], q = te({
652
646
  control: m,
653
647
  nextSelectedCardIds: C
654
648
  });
655
649
  d = d.map(
656
- (q) => q.id === e ? O.nextControl : q
657
- ), h = O.cardBindingsById, c = [m.id];
658
- } else if (r && (!m || !Ct(m.type)) && s === "dashboard" && (r.type === "field_selector" || r.type === "metric_selector")) {
659
- const C = (f == null ? void 0 : f[r.id]) || [];
650
+ (A) => A.id === e ? q.nextControl : A
651
+ ), h = q.cardBindingsById, c = [m.id];
652
+ } else if (a && (!m || !It(m.type)) && s === "dashboard" && (a.type === "field_selector" || a.type === "metric_selector")) {
653
+ const C = (f == null ? void 0 : f[a.id]) || [];
660
654
  h = Object.fromEntries(
661
- C.map((O) => [O, void 0])
662
- ), c = [r.id];
655
+ C.map((q) => [q, void 0])
656
+ ), c = [a.id];
663
657
  }
664
658
  const y = d.find(
665
659
  (C) => C.id === e
666
660
  );
667
661
  let w = i;
668
- if (r && y) {
669
- const C = de({
670
- control: r,
662
+ if (a && y) {
663
+ const C = pe({
664
+ control: a,
671
665
  defaultValues: i
672
666
  });
673
- r.source.kind === "manual" && y.source.kind === "sql_query" && (Q.current[e] = C);
674
- const O = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? Q.current[e] : C, q = Ve({
675
- previousControl: r,
667
+ a.source.kind === "manual" && y.source.kind === "sql_query" && (U.current[e] = C);
668
+ const q = C === void 0 && a.source.kind === "sql_query" && y.source.kind === "manual" ? U.current[e] : C, A = Le({
669
+ previousControl: a,
676
670
  nextControl: y,
677
- currentDefaultValue: O
671
+ currentDefaultValue: q
678
672
  });
679
- y.source.kind === "manual" && (Q.current[e] = q), i && (w = { ...i }, q === void 0 ? delete w[e] : w[e] = q), d = d.map(
680
- (Se) => Se.id === e ? { ...y, defaultValue: q } : Se
673
+ y.source.kind === "manual" && (U.current[e] = A), i && (w = { ...i }, A === void 0 ? delete w[e] : w[e] = A), d = d.map(
674
+ (Ne) => Ne.id === e ? { ...y, defaultValue: A } : Ne
681
675
  );
682
676
  }
683
- E(d, w, {
677
+ V(d, w, {
684
678
  type: "update",
685
679
  cardBindingsById: h,
686
680
  affectedBindingControlIds: c
687
681
  });
688
- }, at = (e, l) => {
682
+ }, tt = (e, l) => {
689
683
  if (!l.trim())
690
684
  return;
691
- const r = Nt(l);
692
- if (r === e || A.has(r) || n.some(
693
- (h) => h.id === r && h.id !== e
685
+ const a = Ot(l);
686
+ if (a === e || O.has(a) || n.some(
687
+ (h) => h.id === a && h.id !== e
694
688
  ))
695
689
  return;
696
690
  const d = n.map(
697
- (h) => h.id === e ? { ...h, id: r } : h
691
+ (h) => h.id === e ? { ...h, id: a } : h
698
692
  );
699
693
  if (!i) {
700
- E(d, void 0, {
694
+ V(d, void 0, {
701
695
  type: "rename",
702
696
  oldId: e,
703
- newId: r
697
+ newId: a
704
698
  });
705
699
  return;
706
700
  }
707
701
  const m = { ...i };
708
- Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]), E(d, m, {
702
+ Object.prototype.hasOwnProperty.call(m, e) && (m[a] = m[e], delete m[e]), V(d, m, {
709
703
  type: "rename",
710
704
  oldId: e,
711
- newId: r
705
+ newId: a
712
706
  });
713
707
  }, rt = (e) => {
714
708
  const l = n.filter((d) => d.id !== e);
715
709
  if (!i) {
716
- E(l, void 0, { type: "remove", controlId: e });
710
+ V(l, void 0, { type: "remove", controlId: e });
717
711
  return;
718
712
  }
719
- const r = { ...i };
720
- delete r[e], E(l, r, { type: "remove", controlId: e });
721
- }, lt = F(() => {
713
+ const a = { ...i };
714
+ delete a[e], V(l, a, { type: "remove", controlId: e });
715
+ }, at = F(() => {
722
716
  j.current = void 0, D({
723
717
  step: 1,
724
- control: G(s, n, Array.from(A))
725
- }), U(null), P(null);
726
- }, [n, A, s]), $ = (e) => {
718
+ control: G(s, n, Array.from(O))
719
+ }), Q(null), P(null);
720
+ }, [n, O, s]), $ = (e) => {
727
721
  D(
728
722
  (l) => l && (() => {
729
- const r = e(l.control);
730
- l.control.source.kind === "manual" && r.source.kind === "sql_query" && (j.current = l.defaultValue);
731
- const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m = Ve({
723
+ const a = e(l.control);
724
+ l.control.source.kind === "manual" && a.source.kind === "sql_query" && (j.current = l.defaultValue);
725
+ const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && a.source.kind === "manual" ? j.current : l.defaultValue, m = Le({
732
726
  previousControl: l.control,
733
- nextControl: r,
727
+ nextControl: a,
734
728
  currentDefaultValue: d
735
729
  });
736
- return r.source.kind === "manual" && (j.current = m), {
730
+ return a.source.kind === "manual" && (j.current = m), {
737
731
  ...l,
738
- control: r,
732
+ control: a,
739
733
  defaultValue: m
740
734
  };
741
735
  })()
742
736
  );
743
- }, ve = (e) => {
737
+ }, xe = (e) => {
744
738
  D(
745
739
  (l) => l && (l.control.source.kind === "manual" && (j.current = e), {
746
740
  ...l,
747
741
  defaultValue: e
748
742
  })
749
743
  );
750
- }, ae = (() => {
751
- if (!a)
744
+ }, re = (() => {
745
+ if (!r)
752
746
  return !1;
753
- if (a.step === 2 && V(a.control.type))
754
- return (a.selectedCardIds || []).length > 0 && pt({
747
+ if (r.step === 2 && L(r.control.type))
748
+ return (r.selectedCardIds || []).length > 0 && St({
755
749
  participants: x || [],
756
- selectedCardIds: a.selectedCardIds || [],
757
- control: a.control,
758
- selected: a.matrixTargetIds
750
+ selectedCardIds: r.selectedCardIds || [],
751
+ control: r.control,
752
+ selected: r.matrixTargetIds
759
753
  });
760
- if (a.step !== 2 && a.step !== 3 || !a.control.label.trim())
754
+ if (r.step !== 2 && r.step !== 3 || !r.control.label.trim())
761
755
  return !1;
762
- const l = a.control.source.kind === "sql_query" ? a.control : _e(a.control);
763
- if (l.source.kind === "manual" && (ft(l) && l.source.options.length === 0 || l.source.options.some(
756
+ const l = r.control.source.kind === "sql_query" ? r.control : _e(r.control);
757
+ if (l.source.kind === "manual" && (Dt(l) && l.source.options.length === 0 || l.source.options.some(
764
758
  (d) => d.label.trim().length === 0 || d.value.trim().length === 0
765
759
  )))
766
760
  return !1;
767
761
  if (l.source.kind === "sql_query") {
768
- const { connectionId: r, sql: d, valueColumn: m } = l.source;
769
- return r.trim().length > 0 && d.trim().length > 0 && m.trim().length > 0;
762
+ const { connectionId: a, sql: d, valueColumn: m } = l.source;
763
+ return a.trim().length > 0 && d.trim().length > 0 && m.trim().length > 0;
770
764
  }
771
- return ht(
772
- J(l, a.defaultValue)
765
+ return wt(
766
+ J(l, r.defaultValue)
773
767
  );
774
- })(), ye = () => {
768
+ })(), ve = () => {
775
769
  var h;
776
- if (!a)
770
+ if (!r)
777
771
  return;
778
- const e = _e(a.control), l = vt({
772
+ const e = _e(r.control), l = Lt({
779
773
  label: e.label,
780
774
  fallbackId: e.id,
781
775
  existingControls: n,
782
- reservedIds: Array.from(A)
783
- }), r = {
776
+ reservedIds: Array.from(O)
777
+ }), a = {
784
778
  ...e,
785
779
  id: l
786
- }, d = s === "dashboard" && (r.type === "field_selector" || r.type === "metric_selector") && ((h = a.selectedCardIds) != null && h.length) ? Le({
787
- control: r,
780
+ }, d = s === "dashboard" && (a.type === "field_selector" || a.type === "metric_selector") && ((h = r.selectedCardIds) != null && h.length) ? Ee({
781
+ control: a,
788
782
  participants: x || [],
789
- selectedCardIds: a.selectedCardIds,
790
- matrixTargetIds: a.matrixTargetIds
783
+ selectedCardIds: r.selectedCardIds,
784
+ matrixTargetIds: r.matrixTargetIds
791
785
  }) : void 0, m = J(
792
- r,
793
- a.defaultValue
786
+ a,
787
+ r.defaultValue
794
788
  );
795
789
  D({
796
- step: s === "dashboard" && (r.type === "field_selector" || r.type === "metric_selector") ? 4 : 3,
797
- control: r,
790
+ step: s === "dashboard" && (a.type === "field_selector" || a.type === "metric_selector") ? 4 : 3,
791
+ control: a,
798
792
  defaultValue: m,
799
793
  createdControlId: l,
800
- selectedCardIds: a.selectedCardIds,
801
- matrixTargetIds: a.matrixTargetIds,
794
+ selectedCardIds: r.selectedCardIds,
795
+ matrixTargetIds: r.matrixTargetIds,
802
796
  cardBindingsById: d
803
797
  });
804
- }, re = F(() => {
798
+ }, ae = F(() => {
805
799
  D(null);
806
- }, []), Ce = F(() => {
807
- if (!(a != null && a.createdControlId)) {
800
+ }, []), ye = F(() => {
801
+ if (!(r != null && r.createdControlId)) {
808
802
  D(null);
809
803
  return;
810
804
  }
811
- const e = a.control, l = a.createdControlId, r = J(
805
+ const e = r.control, l = r.createdControlId, a = J(
812
806
  e,
813
- a.defaultValue
807
+ r.defaultValue
814
808
  );
815
809
  if (i) {
816
810
  const d = { ...i };
817
- r === void 0 ? delete d[l] : d[l] = r, E(
811
+ a === void 0 ? delete d[l] : d[l] = a, V(
818
812
  [
819
813
  ...n,
820
814
  {
821
815
  ...e,
822
- defaultValue: r
816
+ defaultValue: a
823
817
  }
824
818
  ],
825
819
  d,
826
820
  {
827
821
  type: "add",
828
- cardBindingsById: a.cardBindingsById
822
+ cardBindingsById: r.cardBindingsById
829
823
  }
830
824
  );
831
825
  } else
832
- E(
826
+ V(
833
827
  [
834
828
  ...n,
835
829
  {
836
830
  ...e,
837
- defaultValue: r
831
+ defaultValue: a
838
832
  }
839
833
  ],
840
834
  void 0,
841
835
  {
842
836
  type: "add",
843
- cardBindingsById: a.cardBindingsById
837
+ cardBindingsById: r.cardBindingsById
844
838
  }
845
839
  );
846
- U(l), D(null), I == null || I();
847
- }, [n, a, i, E, I]), nt = a ? V(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], ke = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${gt(a.control.label) || a.control.id}]]` : "", le = Ee({
840
+ Q(l), D(null), I == null || I();
841
+ }, [n, r, i, V, I]), lt = r ? L(r.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ce = r != null && r.createdControlId ? `[[param.${r.createdControlId}]]` : r ? `[[param.${Tt(r.control.label) || r.control.id}]]` : "", le = Ve({
848
842
  controls: n,
849
843
  defaultValues: i
850
- }), ne = a ? [...n, a.control] : n, Ne = a ? Ee({
844
+ }), ne = r ? [...n, r.control] : n, ke = r ? Ve({
851
845
  controls: ne,
852
846
  defaultValues: i,
853
847
  overrides: [
854
848
  {
855
- controlId: a.control.id,
856
- value: a.defaultValue
849
+ controlId: r.control.id,
850
+ value: r.defaultValue
857
851
  }
858
852
  ]
859
853
  }) : le;
860
854
  return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
861
- a ? /* @__PURE__ */ o("div", { className: "space-y-4 pb-1", children: [
855
+ r ? /* @__PURE__ */ o("div", { className: "space-y-4 pb-1", children: [
862
856
  /* @__PURE__ */ t(
863
- jt,
857
+ Rt,
864
858
  {
865
- currentStep: a.step,
866
- labels: nt
859
+ currentStep: r.step,
860
+ labels: lt
867
861
  }
868
862
  ),
869
- a.step === 1 && (() => {
863
+ r.step === 1 && (() => {
870
864
  const e = /* @__PURE__ */ new Set([
871
865
  "grain_selector",
872
866
  "aggregation_selector",
@@ -877,9 +871,9 @@ function na({
877
871
  // keeping the shared definitions for existing controls.
878
872
  "date",
879
873
  "text"
880
- ]), r = xe.filter(
874
+ ]), a = be.filter(
881
875
  (h) => !e.has(h.value) && !l.has(h.value)
882
- ), d = xe.filter(
876
+ ), d = be.filter(
883
877
  (h) => e.has(h.value)
884
878
  ), m = (h) => /* @__PURE__ */ o(
885
879
  "button",
@@ -887,10 +881,10 @@ function na({
887
881
  type: "button",
888
882
  className: "rounded-control border border-border/60 bg-background px-3 py-2.5 text-left transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:outline-none",
889
883
  onClick: () => D(
890
- Ut({
884
+ $t({
891
885
  scope: s,
892
886
  existingControls: n,
893
- reservedIds: Array.from(A),
887
+ reservedIds: Array.from(O),
894
888
  type: h.value
895
889
  })
896
890
  ),
@@ -903,24 +897,24 @@ function na({
903
897
  );
904
898
  return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
905
899
  s === "card" && (S == null ? void 0 : S.sql) == null ? /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Explorer cards support displayed metric, group by field, aggregation, and time grain controls here." }) : null,
906
- r.length > 0 && /* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
900
+ a.length > 0 && /* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
907
901
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Input controls" }),
908
- /* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: r.map(m) })
902
+ /* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: a.map(m) })
909
903
  ] }),
910
904
  d.length > 0 && /* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
911
905
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Data-driven controls" }),
912
906
  /* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: d.map(m) })
913
907
  ] }),
914
908
  /* @__PURE__ */ t(
915
- W,
909
+ Z,
916
910
  {
917
911
  secondary: /* @__PURE__ */ t(
918
- L,
912
+ E,
919
913
  {
920
914
  type: "button",
921
915
  variant: "outline",
922
916
  size: "xs",
923
- onClick: re,
917
+ onClick: ae,
924
918
  children: "Back to controls"
925
919
  }
926
920
  )
@@ -928,12 +922,12 @@ function na({
928
922
  )
929
923
  ] });
930
924
  })(),
931
- a.step === 2 && V(a.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
925
+ r.step === 2 && L(r.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
932
926
  /* @__PURE__ */ o("div", { className: "space-y-3", children: [
933
927
  /* @__PURE__ */ t(
934
- Ke,
928
+ Je,
935
929
  {
936
- control: a.control,
930
+ control: r.control,
937
931
  onChange: (e) => $((l) => ({
938
932
  ...l,
939
933
  label: e
@@ -943,20 +937,20 @@ function na({
943
937
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
944
938
  ] }),
945
939
  ee.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: ee.map((e) => {
946
- const l = (a.selectedCardIds || []).includes(e.cardId);
940
+ const l = (r.selectedCardIds || []).includes(e.cardId);
947
941
  return /* @__PURE__ */ o(
948
942
  "label",
949
943
  {
950
944
  className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
951
945
  children: [
952
946
  /* @__PURE__ */ t(
953
- Tt,
947
+ mt,
954
948
  {
955
949
  checked: l,
956
- onCheckedChange: (r) => D(
950
+ onCheckedChange: (a) => D(
957
951
  (d) => d && {
958
952
  ...d,
959
- selectedCardIds: r === !0 ? [
953
+ selectedCardIds: a === !0 ? [
960
954
  ...d.selectedCardIds || [],
961
955
  e.cardId
962
956
  ] : (d.selectedCardIds || []).filter(
@@ -968,7 +962,7 @@ function na({
968
962
  ),
969
963
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
970
964
  /* @__PURE__ */ t("div", { className: "font-medium text-foreground", children: e.title }),
971
- /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: a.control.type === "field_selector" ? `${e.fieldChoices.length} compatible group-by fields` : `${e.metricChoices.length} compatible metrics` })
965
+ /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: r.control.type === "field_selector" ? `${e.fieldChoices.length} compatible group-by fields` : `${e.metricChoices.length} compatible metrics` })
972
966
  ] })
973
967
  ]
974
968
  },
@@ -976,20 +970,20 @@ function na({
976
970
  );
977
971
  }) }),
978
972
  /* @__PURE__ */ t(
979
- Ie,
973
+ De,
980
974
  {
981
975
  participants: ee,
982
- selectedCardIds: a.selectedCardIds || [],
983
- control: a.control,
984
- selected: a.matrixTargetIds,
985
- onChange: (e, l) => D((r) => r && { ...r, matrixTargetIds: { ...r.matrixTargetIds, [e]: l } })
976
+ selectedCardIds: r.selectedCardIds || [],
977
+ control: r.control,
978
+ selected: r.matrixTargetIds,
979
+ onChange: (e, l) => D((a) => a && { ...a, matrixTargetIds: { ...a.matrixTargetIds, [e]: l } })
986
980
  }
987
981
  ),
988
982
  /* @__PURE__ */ t(
989
- W,
983
+ Z,
990
984
  {
991
985
  secondary: /* @__PURE__ */ t(
992
- L,
986
+ E,
993
987
  {
994
988
  type: "button",
995
989
  variant: "outline",
@@ -1005,7 +999,7 @@ function na({
1005
999
  }
1006
1000
  ),
1007
1001
  primary: /* @__PURE__ */ t(
1008
- L,
1002
+ E,
1009
1003
  {
1010
1004
  type: "button",
1011
1005
  size: "xs",
@@ -1015,69 +1009,69 @@ function na({
1015
1009
  step: 3
1016
1010
  }
1017
1011
  ),
1018
- disabled: !ae,
1012
+ disabled: !re,
1019
1013
  children: "Next"
1020
1014
  }
1021
1015
  )
1022
1016
  }
1023
1017
  )
1024
1018
  ] }),
1025
- a.step === 2 && !V(a.control.type) && /* @__PURE__ */ t(
1026
- Ae,
1019
+ r.step === 2 && !L(r.control.type) && /* @__PURE__ */ t(
1020
+ Fe,
1027
1021
  {
1028
- control: a.control,
1029
- defaultValue: a.defaultValue,
1022
+ control: r.control,
1023
+ defaultValue: r.defaultValue,
1030
1024
  availableFieldChoices: Y.fields,
1031
1025
  availableMetricChoices: Y.metrics,
1032
1026
  previewControlDefinitions: ne,
1033
- previewControlValues: Ne,
1027
+ previewControlValues: ke,
1034
1028
  onControlChange: (e) => $(() => e),
1035
1029
  onLabelChange: (e) => $((l) => ({
1036
1030
  ...l,
1037
1031
  label: e
1038
1032
  })),
1039
- onDefaultValueChange: ve,
1033
+ onDefaultValueChange: xe,
1040
1034
  onBack: () => D(
1041
1035
  (e) => e && {
1042
1036
  ...e,
1043
1037
  step: 1
1044
1038
  }
1045
1039
  ),
1046
- onNext: ye,
1047
- nextDisabled: !ae
1040
+ onNext: ve,
1041
+ nextDisabled: !re
1048
1042
  }
1049
1043
  ),
1050
- a.step === 3 && V(a.control.type) && /* @__PURE__ */ t(
1051
- Ae,
1044
+ r.step === 3 && L(r.control.type) && /* @__PURE__ */ t(
1045
+ Fe,
1052
1046
  {
1053
- control: a.control,
1054
- defaultValue: a.defaultValue,
1047
+ control: r.control,
1048
+ defaultValue: r.defaultValue,
1055
1049
  availableFieldChoices: Y.fields,
1056
1050
  availableMetricChoices: Y.metrics,
1057
1051
  previewControlDefinitions: ne,
1058
- previewControlValues: Ne,
1052
+ previewControlValues: ke,
1059
1053
  onControlChange: (e) => $(() => e),
1060
1054
  onLabelChange: (e) => $((l) => ({
1061
1055
  ...l,
1062
1056
  label: e
1063
1057
  })),
1064
- onDefaultValueChange: ve,
1058
+ onDefaultValueChange: xe,
1065
1059
  onBack: () => D(
1066
1060
  (e) => e && {
1067
1061
  ...e,
1068
1062
  step: 2
1069
1063
  }
1070
1064
  ),
1071
- onNext: ye,
1072
- nextDisabled: !ae
1065
+ onNext: ve,
1066
+ nextDisabled: !re
1073
1067
  }
1074
1068
  ),
1075
- a.step === 3 && !V(a.control.type) && /* @__PURE__ */ t(
1076
- Oe,
1069
+ r.step === 3 && !L(r.control.type) && /* @__PURE__ */ t(
1070
+ Ae,
1077
1071
  {
1078
- control: a.control,
1072
+ control: r.control,
1079
1073
  scope: s,
1080
- createdReference: ke,
1074
+ createdReference: Ce,
1081
1075
  explorerContent: /* @__PURE__ */ o(X, { children: [
1082
1076
  "Open the card and use",
1083
1077
  " ",
@@ -1092,21 +1086,21 @@ function na({
1092
1086
  step: 2
1093
1087
  }
1094
1088
  ),
1095
- onCancel: re,
1096
- onDone: Ce
1089
+ onCancel: ae,
1090
+ onDone: ye
1097
1091
  }
1098
1092
  ),
1099
- a.step === 4 && V(a.control.type) && /* @__PURE__ */ t(
1100
- Oe,
1093
+ r.step === 4 && L(r.control.type) && /* @__PURE__ */ t(
1094
+ Ae,
1101
1095
  {
1102
- control: a.control,
1096
+ control: r.control,
1103
1097
  scope: s,
1104
- createdReference: ke,
1098
+ createdReference: Ce,
1105
1099
  summaryDetail: /* @__PURE__ */ o(X, { children: [
1106
1100
  "Used by ",
1107
- (a.selectedCardIds || []).length,
1101
+ (r.selectedCardIds || []).length,
1108
1102
  " selected card",
1109
- (a.selectedCardIds || []).length === 1 ? "" : "s"
1103
+ (r.selectedCardIds || []).length === 1 ? "" : "s"
1110
1104
  ] }),
1111
1105
  explorerContent: /* @__PURE__ */ t(X, { children: "Selected cards have been set up to respond to this control automatically." }),
1112
1106
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
@@ -1116,17 +1110,17 @@ function na({
1116
1110
  step: 3
1117
1111
  }
1118
1112
  ),
1119
- onCancel: re,
1120
- onDone: Ce
1113
+ onCancel: ae,
1114
+ onDone: ye
1121
1115
  }
1122
1116
  )
1123
1117
  ] }) : null,
1124
- !a && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: b }) : null,
1125
- !a && n.map((e) => {
1126
- const l = tt(e), r = v == null ? void 0 : v[e.id], d = de({
1118
+ !r && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: b }) : null,
1119
+ !r && n.map((e) => {
1120
+ const l = et(e), a = v == null ? void 0 : v[e.id], d = pe({
1127
1121
  control: e,
1128
1122
  defaultValues: i
1129
- }), m = Pe === e.id, h = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
1123
+ }), m = We === e.id, h = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
1130
1124
  return /* @__PURE__ */ o(
1131
1125
  "div",
1132
1126
  {
@@ -1138,27 +1132,27 @@ function na({
1138
1132
  {
1139
1133
  type: "button",
1140
1134
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
1141
- onClick: () => U(
1135
+ onClick: () => Q(
1142
1136
  (c) => c === e.id ? null : e.id
1143
1137
  ),
1144
1138
  children: [
1145
- m ? /* @__PURE__ */ t(De, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Fe, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1139
+ m ? /* @__PURE__ */ t(Se, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Ie, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1146
1140
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
1147
1141
  /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1148
1142
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
1149
- /* @__PURE__ */ t("span", { className: h, children: Ue(e.type).label }),
1150
- /* @__PURE__ */ t("span", { className: h, children: Qe(s, e.placement) })
1143
+ /* @__PURE__ */ t("span", { className: h, children: Ye(e.type).label }),
1144
+ /* @__PURE__ */ t("span", { className: h, children: He(s, e.placement) })
1151
1145
  ] }),
1152
1146
  /* @__PURE__ */ o("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
1153
- Ye(e),
1154
- r != null && r.status ? ` · ${r.status}` : ""
1147
+ Xe(e),
1148
+ a != null && a.status ? ` · ${a.status}` : ""
1155
1149
  ] })
1156
1150
  ] })
1157
1151
  ]
1158
1152
  }
1159
1153
  ),
1160
1154
  /* @__PURE__ */ t(
1161
- L,
1155
+ E,
1162
1156
  {
1163
1157
  type: "button",
1164
1158
  size: "xs",
@@ -1166,16 +1160,16 @@ function na({
1166
1160
  className: "h-7 w-7 shrink-0 p-0 text-muted-foreground",
1167
1161
  onClick: () => rt(e.id),
1168
1162
  "aria-label": `Remove ${e.label}`,
1169
- children: /* @__PURE__ */ t(_t, { className: "h-3.5 w-3.5" })
1163
+ children: /* @__PURE__ */ t(pt, { className: "h-3.5 w-3.5" })
1170
1164
  }
1171
1165
  )
1172
1166
  ] }),
1173
1167
  m && /* @__PURE__ */ o("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
1174
1168
  /* @__PURE__ */ o("div", { className: "grid gap-3 md:grid-cols-3", children: [
1175
1169
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1176
- /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1170
+ /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1177
1171
  /* @__PURE__ */ t(
1178
- He,
1172
+ Ue,
1179
1173
  {
1180
1174
  size: "xs",
1181
1175
  value: e.label,
@@ -1188,25 +1182,25 @@ function na({
1188
1182
  )
1189
1183
  ] }),
1190
1184
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1191
- /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1185
+ /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1192
1186
  /* @__PURE__ */ o(
1193
- ie,
1187
+ oe,
1194
1188
  {
1195
1189
  value: e.type,
1196
1190
  onValueChange: (c) => {
1197
- const y = Xe({
1191
+ const y = Ge({
1198
1192
  controls: n,
1199
1193
  controlId: e.id,
1200
1194
  nextType: c,
1201
1195
  defaultValues: i
1202
1196
  });
1203
- E(y.controls, y.defaultValues);
1197
+ V(y.controls, y.defaultValues);
1204
1198
  },
1205
1199
  children: [
1206
- /* @__PURE__ */ t(ce, { size: "xs", children: /* @__PURE__ */ t(ue, {}) }),
1207
- /* @__PURE__ */ t(me, { children: et(e.type).map(
1200
+ /* @__PURE__ */ t(de, { size: "xs", children: /* @__PURE__ */ t(ie, {}) }),
1201
+ /* @__PURE__ */ t(ce, { children: Pe(e.type).map(
1208
1202
  (c) => /* @__PURE__ */ t(
1209
- pe,
1203
+ ue,
1210
1204
  {
1211
1205
  value: c.value,
1212
1206
  children: c.label
@@ -1219,9 +1213,9 @@ function na({
1219
1213
  )
1220
1214
  ] }),
1221
1215
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1222
- /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1216
+ /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1223
1217
  /* @__PURE__ */ o(
1224
- ie,
1218
+ oe,
1225
1219
  {
1226
1220
  value: e.placement || Ze,
1227
1221
  onValueChange: (c) => B(e.id, (y) => ({
@@ -1229,16 +1223,16 @@ function na({
1229
1223
  placement: c
1230
1224
  })),
1231
1225
  children: [
1232
- /* @__PURE__ */ t(ce, { size: "xs", children: /* @__PURE__ */ t(ue, {}) }),
1233
- /* @__PURE__ */ t(me, { children: We.map((c) => /* @__PURE__ */ t(pe, { value: c.value, children: c.label }, c.value)) })
1226
+ /* @__PURE__ */ t(de, { size: "xs", children: /* @__PURE__ */ t(ie, {}) }),
1227
+ /* @__PURE__ */ t(ce, { children: Ke.map((c) => /* @__PURE__ */ t(ue, { value: c.value, children: c.label }, c.value)) })
1234
1228
  ]
1235
1229
  }
1236
1230
  )
1237
1231
  ] })
1238
1232
  ] }),
1239
- V(e.type) ? /* @__PURE__ */ o(X, { children: [
1233
+ L(e.type) ? /* @__PURE__ */ o(X, { children: [
1240
1234
  /* @__PURE__ */ t(
1241
- Et,
1235
+ ft,
1242
1236
  {
1243
1237
  type: e.type,
1244
1238
  participants: Te(
@@ -1257,7 +1251,7 @@ function na({
1257
1251
  }), w = n.map(
1258
1252
  (C) => C.id === e.id ? y.nextControl : C
1259
1253
  );
1260
- E(w, i, {
1254
+ V(w, i, {
1261
1255
  type: "update",
1262
1256
  cardBindingsById: y.cardBindingsById
1263
1257
  });
@@ -1265,7 +1259,7 @@ function na({
1265
1259
  }
1266
1260
  ),
1267
1261
  /* @__PURE__ */ t(
1268
- Ie,
1262
+ De,
1269
1263
  {
1270
1264
  participants: x || [],
1271
1265
  selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
@@ -1276,7 +1270,7 @@ function na({
1276
1270
  nextSelectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1277
1271
  matrixTargetIds: { [c]: y }
1278
1272
  });
1279
- E(
1273
+ V(
1280
1274
  n.map((C) => C.id === e.id ? w.nextControl : C),
1281
1275
  i,
1282
1276
  { type: "update", cardBindingsById: w.cardBindingsById }
@@ -1286,7 +1280,7 @@ function na({
1286
1280
  )
1287
1281
  ] }) : null,
1288
1282
  /* @__PURE__ */ t(
1289
- Ge,
1283
+ Me,
1290
1284
  {
1291
1285
  control: e,
1292
1286
  availableFieldChoices: l.fields,
@@ -1298,7 +1292,7 @@ function na({
1298
1292
  }
1299
1293
  ),
1300
1294
  e.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
1301
- Je,
1295
+ ze,
1302
1296
  {
1303
1297
  control: e,
1304
1298
  value: d,
@@ -1310,51 +1304,51 @@ function na({
1310
1304
  const y = n.map(
1311
1305
  (w) => w.id === e.id ? { ...w, defaultValue: c } : w
1312
1306
  );
1313
- if (e.source.kind === "manual" && (Q.current[e.id] = c), i) {
1307
+ if (e.source.kind === "manual" && (U.current[e.id] = c), i) {
1314
1308
  const w = { ...i };
1315
- c === void 0 ? delete w[e.id] : w[e.id] = c, E(y, w);
1309
+ c === void 0 ? delete w[e.id] : w[e.id] = c, V(y, w);
1316
1310
  return;
1317
1311
  }
1318
- E(y, void 0);
1312
+ V(y, void 0);
1319
1313
  }
1320
1314
  }
1321
1315
  ),
1322
1316
  /* @__PURE__ */ o(
1323
- Vt,
1317
+ ht,
1324
1318
  {
1325
- open: ge === e.id,
1319
+ open: he === e.id,
1326
1320
  onOpenChange: (c) => P(c ? e.id : null),
1327
1321
  children: [
1328
- /* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ o(
1329
- L,
1322
+ /* @__PURE__ */ t(gt, { asChild: !0, children: /* @__PURE__ */ o(
1323
+ E,
1330
1324
  {
1331
1325
  type: "button",
1332
1326
  variant: "ghost",
1333
1327
  size: "xs",
1334
1328
  className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
1335
1329
  children: [
1336
- ge === e.id ? /* @__PURE__ */ t(De, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Fe, { className: "h-3.5 w-3.5" }),
1330
+ he === e.id ? /* @__PURE__ */ t(Se, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Ie, { className: "h-3.5 w-3.5" }),
1337
1331
  "Advanced"
1338
1332
  ]
1339
1333
  }
1340
1334
  ) }),
1341
- /* @__PURE__ */ o(It, { className: "space-y-3 pt-2", children: [
1335
+ /* @__PURE__ */ o(bt, { className: "space-y-3 pt-2", children: [
1342
1336
  /* @__PURE__ */ o("div", { className: "grid gap-3 md:grid-cols-2", children: [
1343
1337
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1344
- /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1338
+ /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1345
1339
  /* @__PURE__ */ t(
1346
- Ft,
1340
+ xt,
1347
1341
  {
1348
1342
  controlId: e.id,
1349
- onCommit: (c) => at(e.id, c)
1343
+ onCommit: (c) => tt(e.id, c)
1350
1344
  },
1351
1345
  e.id
1352
1346
  )
1353
1347
  ] }),
1354
1348
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1355
- /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1349
+ /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1356
1350
  /* @__PURE__ */ o(
1357
- ie,
1351
+ oe,
1358
1352
  {
1359
1353
  value: e.initialValueStrategy,
1360
1354
  onValueChange: (c) => B(e.id, (y) => ({
@@ -1362,9 +1356,9 @@ function na({
1362
1356
  initialValueStrategy: c
1363
1357
  })),
1364
1358
  children: [
1365
- /* @__PURE__ */ t(ce, { size: "xs", children: /* @__PURE__ */ t(ue, {}) }),
1366
- /* @__PURE__ */ t(me, { children: xt.map((c) => /* @__PURE__ */ t(
1367
- pe,
1359
+ /* @__PURE__ */ t(de, { size: "xs", children: /* @__PURE__ */ t(ie, {}) }),
1360
+ /* @__PURE__ */ t(ce, { children: Vt.map((c) => /* @__PURE__ */ t(
1361
+ ue,
1368
1362
  {
1369
1363
  value: c.value,
1370
1364
  children: c.label
@@ -1377,7 +1371,7 @@ function na({
1377
1371
  ] })
1378
1372
  ] }),
1379
1373
  /* @__PURE__ */ t(
1380
- At,
1374
+ vt,
1381
1375
  {
1382
1376
  control: e,
1383
1377
  onChange: (c) => B(e.id, () => c)
@@ -1393,28 +1387,28 @@ function na({
1393
1387
  e.id
1394
1388
  );
1395
1389
  }),
1396
- !a && /* @__PURE__ */ o(
1397
- L,
1390
+ !r && /* @__PURE__ */ o(
1391
+ E,
1398
1392
  {
1399
1393
  type: "button",
1400
1394
  variant: "outline",
1401
1395
  size: "xs",
1402
- onClick: lt,
1396
+ onClick: at,
1403
1397
  children: [
1404
- /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" }),
1398
+ /* @__PURE__ */ t(yt, { className: "h-3.5 w-3.5" }),
1405
1399
  "Add control"
1406
1400
  ]
1407
1401
  }
1408
1402
  )
1409
1403
  ] });
1410
1404
  }
1411
- function sa(s) {
1405
+ function or(s) {
1412
1406
  const {
1413
1407
  open: n,
1414
1408
  onOpenChange: u,
1415
1409
  initialCreateFlowActive: i = !1,
1416
1410
  dismissMode: k = "passive"
1417
- } = s, b = n !== void 0, [g, v] = M(!1), [p, N] = M(
1411
+ } = s, b = n !== void 0, [g, v] = z(!1), [p, N] = z(
1418
1412
  i
1419
1413
  ), x = b ? n : g, f = F(
1420
1414
  (_) => {
@@ -1443,15 +1437,13 @@ function sa(s) {
1443
1437
  };
1444
1438
  }
1445
1439
  export {
1446
- na as C,
1447
- ea as F,
1448
- Rt as I,
1449
- zt as L,
1450
- la as V,
1440
+ sr as C,
1441
+ ar as F,
1442
+ zt as I,
1443
+ qt as L,
1444
+ nr as V,
1451
1445
  Mt as a,
1452
- ra as b,
1453
- Ot as c,
1454
- aa as f,
1455
- ta as r,
1456
- sa as u
1446
+ lr as b,
1447
+ At as c,
1448
+ or as u
1457
1449
  };