@magemetrics/ai 0.0.28 → 0.0.30

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.
@@ -12259,7 +12259,7 @@ class RealtimeClient {
12259
12259
  close: () => {
12260
12260
  this.conn = null;
12261
12261
  }
12262
- }), import("./browser-yp_VhCQy.js").then((R) => R.b).then(({ default: R }) => {
12262
+ }), import("./browser-sDEj-xS6.js").then((R) => R.b).then(({ default: R }) => {
12263
12263
  this.conn = new R(this.endpointURL(), void 0, {
12264
12264
  headers: this.headers
12265
12265
  }), this.setupConnection();
@@ -33117,17 +33117,21 @@ const AnalyzeRequestSchema = z$1.object({
33117
33117
  }).array()
33118
33118
  });
33119
33119
  z$1.object({
33120
- matched_from_descriptions: z$1.number().array(),
33121
- matched_from_values: z$1.number().array()
33120
+ id: z$1.number(),
33121
+ flow_data_id: z$1.number(),
33122
+ created_at: z$1.string(),
33123
+ updated_at: z$1.string(),
33124
+ response_type: z$1.string(),
33125
+ summary: z$1.string()
33122
33126
  });
33123
33127
  z$1.object({
33124
33128
  findings: z$1.object({
33125
33129
  title: z$1.string(),
33126
33130
  value: z$1.string(),
33127
- subtitle_sentiment: z$1.enum(["positive", "negative", "neutral"]),
33128
- subtitle_value: z$1.string(),
33129
- subtitle_description: z$1.string(),
33130
- info_description: z$1.string(),
33131
+ subtitleSentiment: z$1.enum(["positive", "negative", "neutral"]),
33132
+ subtitleValue: z$1.string(),
33133
+ subtitleDescription: z$1.string(),
33134
+ infoDescription: z$1.string(),
33131
33135
  sql: z$1.string()
33132
33136
  }).array()
33133
33137
  });
@@ -33145,24 +33149,13 @@ const VisualizationConfigGenerationSchema = z$1.object({
33145
33149
  created_at: z$1.string(),
33146
33150
  configuration: VisualizationConfigGenerationSchema.shape.plot_configuration,
33147
33151
  data_transformation: VisualizationConfigGenerationSchema.shape.transformation
33148
- });
33149
- z$1.object({
33150
- title: z$1.string(),
33151
- description: z$1.string()
33152
- });
33153
- const FlowSteps = {
33152
+ }), FlowSteps = {
33154
33153
  analyzeRequest: "analyze_request",
33155
33154
  shortlistColumns: "shortlist_columns",
33156
33155
  executeProcedure: "execute_procedure",
33157
- listInsights: "list_insights",
33158
- executeInsights: "execute_insights",
33159
- summarizeKeyFindings: "summarize_insights",
33160
- // TODO: Change reference name in the agentic workflow
33161
- graphProcedure: "visualization_procedure",
33162
- confidenceScore: "confidence_score",
33163
33156
  columnsLineage: "columns_lineage",
33164
- viewGraphs: "visualization_config_generation",
33165
- dashboard: "dashboard"
33157
+ confidenceScore: "confidence_score",
33158
+ summarizeKeyFindings: "summarize_insights"
33166
33159
  };
33167
33160
  var dayjs_min$1 = { exports: {} }, dayjs_min = dayjs_min$1.exports, hasRequiredDayjs_min;
33168
33161
  function requireDayjs_min() {
@@ -56229,6 +56222,42 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56229
56222
  }
56230
56223
  }
56231
56224
  }
56225
+ }), RetrieveFlow = createRoute({
56226
+ method: "get",
56227
+ path: "/api/v1/flows/{flowId}",
56228
+ operationId: "retrieveFlow",
56229
+ request: {
56230
+ headers: SupabaseHeaderSchema,
56231
+ params: FlowIdParam
56232
+ },
56233
+ responses: {
56234
+ 200: {
56235
+ description: "The flow with its steps",
56236
+ content: {
56237
+ "application/json": {
56238
+ schema: FlowSchema
56239
+ }
56240
+ }
56241
+ },
56242
+ 404: {
56243
+ content: {
56244
+ "application/json": {
56245
+ schema: z$1.object({ error: z$1.string() })
56246
+ }
56247
+ },
56248
+ description: "Unable to retrieve flow with this id"
56249
+ },
56250
+ 500: {
56251
+ description: "Something wrong happened",
56252
+ content: {
56253
+ "application/json": {
56254
+ schema: z$1.object({
56255
+ error: z$1.string()
56256
+ })
56257
+ }
56258
+ }
56259
+ }
56260
+ }
56232
56261
  }), End2EndApiResponseSchema = z$1.discriminatedUnion("status", [
56233
56262
  z$1.object({
56234
56263
  status: z$1.literal("error"),
@@ -56250,7 +56279,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56250
56279
  "application/json": {
56251
56280
  schema: z$1.object({
56252
56281
  userQuery: z$1.string(),
56253
- runVisualizations: z$1.boolean().optional().default(!0),
56282
+ runVisualizations: z$1.boolean().optional().default(!1),
56254
56283
  runKeyFindings: z$1.boolean().optional().default(!0)
56255
56284
  })
56256
56285
  }
@@ -56281,33 +56310,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56281
56310
  U.length > 0 && (F.filter = U);
56282
56311
  }
56283
56312
  return F;
56284
- }, flowQueryOptions = (C) => ({
56285
- queryKey: ["flow", { flowId: C }],
56286
- queryFn: async () => {
56287
- if (!C || !supabase) return null;
56288
- const { data: R, error: M } = await supabase.from("flows").select("*, flow_steps(*)").eq("id", C).order("created_at", {
56289
- referencedTable: "flow_steps",
56290
- ascending: !0
56291
- }).single();
56292
- if (M)
56293
- throw new Error(M.message);
56294
- return FlowSchema.parse(R);
56295
- }
56296
- }), useFlow = (C) => useQuery({
56297
- ...flowQueryOptions(C),
56298
- enabled: !!C,
56299
- refetchIntervalInBackground: !1,
56300
- refetchInterval: (R) => {
56301
- var G;
56302
- if (!((G = R.state.data) != null && G.flow_steps.length))
56303
- return 1e3;
56304
- const D = R.state.data.flow_steps, F = Object.values(FlowSteps);
56305
- if (D.some((Z) => Z.status === "failed")) return;
56306
- const U = D.filter((Z) => Z.status === "completed").map((Z) => Z.name);
56307
- if (!F.every((Z) => U.includes(Z)))
56308
- return 1e3;
56309
- }
56310
- }), useStartFlow = (C) => useMutation({
56313
+ }, useStartFlow = (C) => useMutation({
56311
56314
  mutationFn: async (R) => {
56312
56315
  const M = await withAuthTokens(supabase), { data: D } = await client.POST(RunEnd2EndFlowRoute.path, {
56313
56316
  params: { ...M },
@@ -56427,25 +56430,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56427
56430
  getNextPageParam: (D, F) => D.length < R ? null : F.length,
56428
56431
  refetchOnWindowFocus: !1,
56429
56432
  placeholderData: keepPreviousData
56430
- }), useFirstFlowDataId = (C) => {
56431
- const R = useContextReady();
56432
- return useQuery({
56433
- queryKey: ["firstFlowDataId", { flowId: C }],
56434
- staleTime: 1 / 0,
56435
- enabled: R,
56436
- queryFn: async () => {
56437
- const M = await (supabase == null ? void 0 : supabase.from("flow_data").select("id").eq("flow_id", C).order("created_at", { ascending: !0 }).limit(1).maybeSingle());
56438
- if (!M)
56439
- throw new Error("No flow data found");
56440
- const { data: D, error: F } = M;
56441
- if (F)
56442
- throw new Error(
56443
- `Failed to fetch first flow_data_id for flow ${C}`
56444
- );
56445
- return D == null ? void 0 : D.id;
56446
- }
56447
- });
56448
- }, recentFlowsQueryOptions = (C) => ({
56433
+ }), recentFlowsQueryOptions = (C) => ({
56449
56434
  queryKey: ["recentFlows", C],
56450
56435
  queryFn: async () => {
56451
56436
  if (!supabase) return [];
@@ -94130,10 +94115,13 @@ const Dagre = /* @__PURE__ */ getDefaultExportFromCjs(dagreExports), getLayouted
94130
94115
  },
94131
94116
  F.id
94132
94117
  );
94133
- }) }, D.id)) }), CellContent$1 = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C, sortingFn = (C, R, M) => {
94118
+ }) }, D.id)) }), CellContent$1 = ({ formattedValue: C }) => {
94119
+ const R = C == null ? void 0 : C.display;
94120
+ return !R || R === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : R;
94121
+ }, sortingFn = (C, R, M) => {
94134
94122
  const D = C.getValue(M), F = R.getValue(M), H = isFormattedData(D) ? D.sortValue : null, U = isFormattedData(F) ? F.sortValue : null;
94135
94123
  return H === null && U === null ? 0 : H === null ? -1 : U === null ? 1 : H instanceof Date && U instanceof Date ? H.getTime() - U.getTime() : typeof H == "number" && typeof U == "number" ? H - U : String(H).localeCompare(String(U));
94136
- }, columnHelper$1 = createColumnHelper(), formatColumnName = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), InfiniteTable = ({ dataColumns: C, virtualizer: R, data: M, tableRef: D, explainability: F }) => {
94124
+ }, columnHelper$1 = createColumnHelper(), formatColumnName$1 = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), InfiniteTable = ({ dataColumns: C, virtualizer: R, data: M, tableRef: D, explainability: F }) => {
94137
94125
  const H = reactExports.useMemo(() => M ? M.map((G) => {
94138
94126
  const Z = {};
94139
94127
  for (const [Y, Q] of Object.entries(G))
@@ -94143,7 +94131,7 @@ const Dagre = /* @__PURE__ */ getDefaultExportFromCjs(dagreExports), getLayouted
94143
94131
  ({ name: G }) => columnHelper$1.accessor(G, {
94144
94132
  minSize: 100,
94145
94133
  maxSize: 200,
94146
- header: () => formatColumnName(G),
94134
+ header: () => formatColumnName$1(G),
94147
94135
  cell: (Z) => /* @__PURE__ */ jsxRuntimeExports.jsx(CellContent$1, { formattedValue: Z.getValue() }),
94148
94136
  sortingFn
94149
94137
  })
@@ -95026,7 +95014,360 @@ const DataReportContent = ({
95026
95014
  ]
95027
95015
  }
95028
95016
  );
95029
- }, TableBody = ({ table: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tbody, { ...R, children: C.getRowModel().rows.map((M) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tr, { children: M.getVisibleCells().map((D) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Td, { maw: 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "monospace", size: "sm", truncate: "end", children: flexRender(D.column.columnDef.cell, D.getContext()) }) }, D.id)) }, M.id)) }), TemplateNode = ({
95017
+ }, t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r = (C) => !!(C && typeof C == "object"), i = (C) => C && !!C[t], o = (C, R, M) => {
95018
+ if (i(C)) {
95019
+ const D = C[t](), { matched: F, selections: H } = D.match(R);
95020
+ return F && H && Object.keys(H).forEach((U) => M(U, H[U])), F;
95021
+ }
95022
+ if (r(C)) {
95023
+ if (!r(R)) return !1;
95024
+ if (Array.isArray(C)) {
95025
+ if (!Array.isArray(R)) return !1;
95026
+ let D = [], F = [], H = [];
95027
+ for (const U of C.keys()) {
95028
+ const q = C[U];
95029
+ i(q) && q[e] ? H.push(q) : H.length ? F.push(q) : D.push(q);
95030
+ }
95031
+ if (H.length) {
95032
+ if (H.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
95033
+ if (R.length < D.length + F.length) return !1;
95034
+ const U = R.slice(0, D.length), q = F.length === 0 ? [] : R.slice(-F.length), G = R.slice(D.length, F.length === 0 ? 1 / 0 : -F.length);
95035
+ return D.every((Z, Y) => o(Z, U[Y], M)) && F.every((Z, Y) => o(Z, q[Y], M)) && (H.length === 0 || o(H[0], G, M));
95036
+ }
95037
+ return C.length === R.length && C.every((U, q) => o(U, R[q], M));
95038
+ }
95039
+ return Reflect.ownKeys(C).every((D) => {
95040
+ const F = C[D];
95041
+ return (D in R || i(H = F) && H[t]().matcherType === "optional") && o(F, R[D], M);
95042
+ var H;
95043
+ });
95044
+ }
95045
+ return Object.is(R, C);
95046
+ }, s = (C) => {
95047
+ var R, M, D;
95048
+ return r(C) ? i(C) ? (R = (M = (D = C[t]()).getSelectionKeys) == null ? void 0 : M.call(D)) != null ? R : [] : Array.isArray(C) ? c(C, s) : c(Object.values(C), s) : [];
95049
+ }, c = (C, R) => C.reduce((M, D) => M.concat(R(D)), []);
95050
+ function a(...C) {
95051
+ if (C.length === 1) {
95052
+ const [R] = C;
95053
+ return (M) => o(R, M, () => {
95054
+ });
95055
+ }
95056
+ if (C.length === 2) {
95057
+ const [R, M] = C;
95058
+ return o(R, M, () => {
95059
+ });
95060
+ }
95061
+ throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${C.length}.`);
95062
+ }
95063
+ function u(C) {
95064
+ return Object.assign(C, { optional: () => h(C), and: (R) => m(C, R), or: (R) => d(C, R), select: (R) => R === void 0 ? y(C) : y(R, C) });
95065
+ }
95066
+ function l(C) {
95067
+ return Object.assign(((R) => Object.assign(R, { [Symbol.iterator]() {
95068
+ let M = 0;
95069
+ const D = [{ value: Object.assign(R, { [e]: !0 }), done: !1 }, { done: !0, value: void 0 }];
95070
+ return { next: () => {
95071
+ var F;
95072
+ return (F = D[M++]) != null ? F : D.at(-1);
95073
+ } };
95074
+ } }))(C), { optional: () => l(h(C)), select: (R) => l(R === void 0 ? y(C) : y(R, C)) });
95075
+ }
95076
+ function h(C) {
95077
+ return u({ [t]: () => ({ match: (R) => {
95078
+ let M = {};
95079
+ const D = (F, H) => {
95080
+ M[F] = H;
95081
+ };
95082
+ return R === void 0 ? (s(C).forEach((F) => D(F, void 0)), { matched: !0, selections: M }) : { matched: o(C, R, D), selections: M };
95083
+ }, getSelectionKeys: () => s(C), matcherType: "optional" }) });
95084
+ }
95085
+ const f = (C, R) => {
95086
+ for (const M of C) if (!R(M)) return !1;
95087
+ return !0;
95088
+ }, g = (C, R) => {
95089
+ for (const [M, D] of C.entries()) if (!R(D, M)) return !1;
95090
+ return !0;
95091
+ };
95092
+ function m(...C) {
95093
+ return u({ [t]: () => ({ match: (R) => {
95094
+ let M = {};
95095
+ const D = (F, H) => {
95096
+ M[F] = H;
95097
+ };
95098
+ return { matched: C.every((F) => o(F, R, D)), selections: M };
95099
+ }, getSelectionKeys: () => c(C, s), matcherType: "and" }) });
95100
+ }
95101
+ function d(...C) {
95102
+ return u({ [t]: () => ({ match: (R) => {
95103
+ let M = {};
95104
+ const D = (F, H) => {
95105
+ M[F] = H;
95106
+ };
95107
+ return c(C, s).forEach((F) => D(F, void 0)), { matched: C.some((F) => o(F, R, D)), selections: M };
95108
+ }, getSelectionKeys: () => c(C, s), matcherType: "or" }) });
95109
+ }
95110
+ function p(C) {
95111
+ return { [t]: () => ({ match: (R) => ({ matched: !!C(R) }) }) };
95112
+ }
95113
+ function y(...C) {
95114
+ const R = typeof C[0] == "string" ? C[0] : void 0, M = C.length === 2 ? C[1] : typeof C[0] == "string" ? void 0 : C[0];
95115
+ return u({ [t]: () => ({ match: (D) => {
95116
+ let F = { [R ?? n]: D };
95117
+ return { matched: M === void 0 || o(M, D, (H, U) => {
95118
+ F[H] = U;
95119
+ }), selections: F };
95120
+ }, getSelectionKeys: () => [R ?? n].concat(M === void 0 ? [] : s(M)) }) });
95121
+ }
95122
+ function v(C) {
95123
+ return typeof C == "number";
95124
+ }
95125
+ function b(C) {
95126
+ return typeof C == "string";
95127
+ }
95128
+ function w(C) {
95129
+ return typeof C == "bigint";
95130
+ }
95131
+ const S = u(p(function(C) {
95132
+ return !0;
95133
+ })), O = S, j = (C) => Object.assign(u(C), { startsWith: (R) => {
95134
+ return j(m(C, (M = R, p((D) => b(D) && D.startsWith(M)))));
95135
+ var M;
95136
+ }, endsWith: (R) => {
95137
+ return j(m(C, (M = R, p((D) => b(D) && D.endsWith(M)))));
95138
+ var M;
95139
+ }, minLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length >= M))(R))), length: (R) => j(m(C, ((M) => p((D) => b(D) && D.length === M))(R))), maxLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length <= M))(R))), includes: (R) => {
95140
+ return j(m(C, (M = R, p((D) => b(D) && D.includes(M)))));
95141
+ var M;
95142
+ }, regex: (R) => {
95143
+ return j(m(C, (M = R, p((D) => b(D) && !!D.match(M)))));
95144
+ var M;
95145
+ } }), K = j(p(b)), x = (C) => Object.assign(u(C), { between: (R, M) => x(m(C, ((D, F) => p((H) => v(H) && D <= H && F >= H))(R, M))), lt: (R) => x(m(C, ((M) => p((D) => v(D) && D < M))(R))), gt: (R) => x(m(C, ((M) => p((D) => v(D) && D > M))(R))), lte: (R) => x(m(C, ((M) => p((D) => v(D) && D <= M))(R))), gte: (R) => x(m(C, ((M) => p((D) => v(D) && D >= M))(R))), int: () => x(m(C, p((R) => v(R) && Number.isInteger(R)))), finite: () => x(m(C, p((R) => v(R) && Number.isFinite(R)))), positive: () => x(m(C, p((R) => v(R) && R > 0))), negative: () => x(m(C, p((R) => v(R) && R < 0))) }), E = x(p(v)), A = (C) => Object.assign(u(C), { between: (R, M) => A(m(C, ((D, F) => p((H) => w(H) && D <= H && F >= H))(R, M))), lt: (R) => A(m(C, ((M) => p((D) => w(D) && D < M))(R))), gt: (R) => A(m(C, ((M) => p((D) => w(D) && D > M))(R))), lte: (R) => A(m(C, ((M) => p((D) => w(D) && D <= M))(R))), gte: (R) => A(m(C, ((M) => p((D) => w(D) && D >= M))(R))), positive: () => A(m(C, p((R) => w(R) && R > 0))), negative: () => A(m(C, p((R) => w(R) && R < 0))) }), P = A(p(w)), T = u(p(function(C) {
95146
+ return typeof C == "boolean";
95147
+ })), B = u(p(function(C) {
95148
+ return typeof C == "symbol";
95149
+ })), _ = u(p(function(C) {
95150
+ return C == null;
95151
+ })), k = u(p(function(C) {
95152
+ return C != null;
95153
+ }));
95154
+ var N = { __proto__: null, matcher: t, optional: h, array: function(...C) {
95155
+ return l({ [t]: () => ({ match: (R) => {
95156
+ if (!Array.isArray(R)) return { matched: !1 };
95157
+ if (C.length === 0) return { matched: !0 };
95158
+ const M = C[0];
95159
+ let D = {};
95160
+ if (R.length === 0) return s(M).forEach((H) => {
95161
+ D[H] = [];
95162
+ }), { matched: !0, selections: D };
95163
+ const F = (H, U) => {
95164
+ D[H] = (D[H] || []).concat([U]);
95165
+ };
95166
+ return { matched: R.every((H) => o(M, H, F)), selections: D };
95167
+ }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95168
+ }, set: function(...C) {
95169
+ return u({ [t]: () => ({ match: (R) => {
95170
+ if (!(R instanceof Set)) return { matched: !1 };
95171
+ let M = {};
95172
+ if (R.size === 0) return { matched: !0, selections: M };
95173
+ if (C.length === 0) return { matched: !0 };
95174
+ const D = (H, U) => {
95175
+ M[H] = (M[H] || []).concat([U]);
95176
+ }, F = C[0];
95177
+ return { matched: f(R, (H) => o(F, H, D)), selections: M };
95178
+ }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95179
+ }, map: function(...C) {
95180
+ return u({ [t]: () => ({ match: (R) => {
95181
+ if (!(R instanceof Map)) return { matched: !1 };
95182
+ let M = {};
95183
+ if (R.size === 0) return { matched: !0, selections: M };
95184
+ const D = (q, G) => {
95185
+ M[q] = (M[q] || []).concat([G]);
95186
+ };
95187
+ if (C.length === 0) return { matched: !0 };
95188
+ var F;
95189
+ if (C.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(F = C[0]) == null ? void 0 : F.toString()}`);
95190
+ const [H, U] = C;
95191
+ return { matched: g(R, (q, G) => {
95192
+ const Z = o(H, G, D), Y = o(U, q, D);
95193
+ return Z && Y;
95194
+ }), selections: M };
95195
+ }, getSelectionKeys: () => C.length === 0 ? [] : [...s(C[0]), ...s(C[1])] }) });
95196
+ }, intersection: m, union: d, not: function(C) {
95197
+ return u({ [t]: () => ({ match: (R) => ({ matched: !o(C, R, () => {
95198
+ }) }), getSelectionKeys: () => [], matcherType: "not" }) });
95199
+ }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(C) {
95200
+ return u(p(/* @__PURE__ */ function(R) {
95201
+ return (M) => M instanceof R;
95202
+ }(C)));
95203
+ }, shape: function(C) {
95204
+ return u(p(a(C)));
95205
+ } };
95206
+ class W extends Error {
95207
+ constructor(R) {
95208
+ let M;
95209
+ try {
95210
+ M = JSON.stringify(R);
95211
+ } catch {
95212
+ M = R;
95213
+ }
95214
+ super(`Pattern matching error: no pattern matches value ${M}`), this.input = void 0, this.input = R;
95215
+ }
95216
+ }
95217
+ const $ = { matched: !1, value: void 0 };
95218
+ function z(C) {
95219
+ return new I(C, $);
95220
+ }
95221
+ class I {
95222
+ constructor(R, M) {
95223
+ this.input = void 0, this.state = void 0, this.input = R, this.state = M;
95224
+ }
95225
+ with(...R) {
95226
+ if (this.state.matched) return this;
95227
+ const M = R[R.length - 1], D = [R[0]];
95228
+ let F;
95229
+ R.length === 3 && typeof R[1] == "function" ? F = R[1] : R.length > 2 && D.push(...R.slice(1, R.length - 1));
95230
+ let H = !1, U = {};
95231
+ const q = (Z, Y) => {
95232
+ H = !0, U[Z] = Y;
95233
+ }, G = !D.some((Z) => o(Z, this.input, q)) || F && !F(this.input) ? $ : { matched: !0, value: M(H ? n in U ? U[n] : U : this.input, this.input) };
95234
+ return new I(this.input, G);
95235
+ }
95236
+ when(R, M) {
95237
+ if (this.state.matched) return this;
95238
+ const D = !!R(this.input);
95239
+ return new I(this.input, D ? { matched: !0, value: M(this.input, this.input) } : $);
95240
+ }
95241
+ otherwise(R) {
95242
+ return this.state.matched ? this.state.value : R(this.input);
95243
+ }
95244
+ exhaustive(R = L) {
95245
+ return this.state.matched ? this.state.value : R(this.input);
95246
+ }
95247
+ run() {
95248
+ return this.exhaustive();
95249
+ }
95250
+ returnType() {
95251
+ return this;
95252
+ }
95253
+ }
95254
+ function L(C) {
95255
+ throw new W(C);
95256
+ }
95257
+ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95258
+ Paper,
95259
+ {
95260
+ withBorder: !0,
95261
+ style: { borderColor: "mageGunmetal.9" },
95262
+ px: "sm",
95263
+ py: 6,
95264
+ ...R,
95265
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "md", fw: 400, truncate: "end", style: { textAlign: "left" }, children: C })
95266
+ }
95267
+ ), GenericError = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Something went wrong. Please try again later." }), GenericLoading = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Loading..." }), useTemporaryMessage = (C) => {
95268
+ const [R, M] = reactExports.useState(C), D = reactExports.useRef(!0), F = reactExports.useRef(!1);
95269
+ return reactExports.useEffect(() => {
95270
+ D.current ? D.current = !1 : C && !F.current && (F.current = !0, setTimeout(() => {
95271
+ M(!0);
95272
+ }, 2e3));
95273
+ }, [C]), R;
95274
+ }, flowQueryOptions = (C) => ({
95275
+ queryKey: ["flows", { flowId: C }],
95276
+ queryFn: async () => {
95277
+ if (!C || !supabase) return null;
95278
+ const R = await withAuthTokens(supabase), { data: M, error: D } = await client.GET(RetrieveFlow.path, {
95279
+ params: {
95280
+ ...R,
95281
+ path: { flowId: C }
95282
+ }
95283
+ });
95284
+ if (D)
95285
+ throw new Error(D.error);
95286
+ return M;
95287
+ }
95288
+ }), STEP_NAMES = Object.values(FlowSteps), useFlow = (C) => useQuery({
95289
+ ...flowQueryOptions(C),
95290
+ enabled: !!C,
95291
+ refetchIntervalInBackground: !1,
95292
+ refetchInterval: (R) => {
95293
+ var q;
95294
+ if (!((q = R.state.data) != null && q.flow_steps.length))
95295
+ return 1e3;
95296
+ const D = R.state.data.flow_steps;
95297
+ if (D.some((G) => G.status === "failed")) return;
95298
+ const H = D.filter((G) => G.status === "completed").map((G) => G.name);
95299
+ if (!STEP_NAMES.every((G) => H.includes(G)))
95300
+ return 1e3;
95301
+ }
95302
+ }), useFirstFlowDataId = (C) => {
95303
+ const R = useContextReady();
95304
+ return useQuery({
95305
+ queryKey: ["firstFlowDataId", { flowId: C }],
95306
+ staleTime: 1 / 0,
95307
+ enabled: R,
95308
+ queryFn: async () => {
95309
+ const M = await (supabase == null ? void 0 : supabase.from("flow_data").select("id").eq("flow_id", C).order("created_at", { ascending: !0 }).limit(1).maybeSingle());
95310
+ if (!M)
95311
+ throw new Error("No flow data found");
95312
+ const { data: D, error: F } = M;
95313
+ if (F)
95314
+ throw new Error(
95315
+ `Failed to fetch first flow_data_id for flow ${C}`
95316
+ );
95317
+ return D == null ? void 0 : D.id;
95318
+ }
95319
+ });
95320
+ }, Step = ({
95321
+ title: C,
95322
+ children: R,
95323
+ value: M,
95324
+ rightSection: D,
95325
+ isLast: F,
95326
+ disabled: H
95327
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
95328
+ Accordion.Item,
95329
+ {
95330
+ value: M,
95331
+ styles: {
95332
+ item: {
95333
+ borderBottom: F ? "none" : ""
95334
+ }
95335
+ },
95336
+ children: [
95337
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
95338
+ Accordion.Control,
95339
+ {
95340
+ h: 65,
95341
+ disabled: H,
95342
+ sx: () => ({
95343
+ "&:hover": {
95344
+ backgroundColor: "transparent"
95345
+ }
95346
+ }),
95347
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { align: "center", justify: "space-between", children: [
95348
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Title$1, { tt: "uppercase", size: "lg", fw: 600, children: C }),
95349
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { maw: 300, children: !!D && D })
95350
+ ] })
95351
+ }
95352
+ ),
95353
+ R && /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion.Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { px: "md", children: R }) })
95354
+ ]
95355
+ }
95356
+ ), AnimatedStep = ({
95357
+ children: C,
95358
+ ...R
95359
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95360
+ motion.span,
95361
+ {
95362
+ initial: { opacity: 0, y: 15 },
95363
+ animate: { opacity: 1, y: 0 },
95364
+ exit: { opacity: 0, y: -15 },
95365
+ transition: { duration: 0.3, ease: "easeInOut" },
95366
+ style: { minWidth: 0, textWrap: "nowrap" },
95367
+ ...R,
95368
+ children: C
95369
+ }
95370
+ ), TableBody = ({ table: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tbody, { ...R, children: C.getRowModel().rows.map((M) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tr, { children: M.getVisibleCells().map((D) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Td, { maw: 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "monospace", size: "sm", truncate: "end", children: flexRender(D.column.columnDef.cell, D.getContext()) }) }, D.id)) }, M.id)) }), TemplateNode = ({
95030
95371
  title: C,
95031
95372
  data: { explanation: R }
95032
95373
  }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -95272,7 +95613,10 @@ const DataReportContent = ({
95272
95613
  H.id
95273
95614
  );
95274
95615
  }) }, F.id)) });
95275
- }, MAX_CELL_CHAR_LENGTH = 35, CellContent = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C && C.length > MAX_CELL_CHAR_LENGTH ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, maw: "25rem", label: C, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }), columnHelper = createColumnHelper(), Table = ({
95616
+ }, MAX_CELL_CHAR_LENGTH = 35, CellContent = ({ formattedValue: C }) => {
95617
+ const R = C == null ? void 0 : C.display;
95618
+ return !R || R === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : R && R.length > MAX_CELL_CHAR_LENGTH ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, maw: "25rem", label: R, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: R }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: R });
95619
+ }, columnHelper = createColumnHelper(), formatColumnName = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), Table = ({
95276
95620
  flowId: C,
95277
95621
  dataColumns: R,
95278
95622
  data: M,
@@ -95292,6 +95636,7 @@ const DataReportContent = ({
95292
95636
  return ce;
95293
95637
  }) : [], [M]), ne = reactExports.useMemo(() => R && R.length > 0 ? R.map(
95294
95638
  ({ name: se }) => columnHelper.accessor(se, {
95639
+ header: () => formatColumnName(se),
95295
95640
  cell: (ce) => /* @__PURE__ */ jsxRuntimeExports.jsx(CellContent, { formattedValue: ce.getValue() })
95296
95641
  })
95297
95642
  ) : [], [R]), oe = useReactTable({
@@ -95456,314 +95801,7 @@ const DataReportContent = ({
95456
95801
  U ? dayjs(U).startOf("hour").format("DD MMM. YYYY, [at] ha") : "Loading..."
95457
95802
  ] })
95458
95803
  ] });
95459
- }, t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r = (C) => !!(C && typeof C == "object"), i = (C) => C && !!C[t], o = (C, R, M) => {
95460
- if (i(C)) {
95461
- const D = C[t](), { matched: F, selections: H } = D.match(R);
95462
- return F && H && Object.keys(H).forEach((U) => M(U, H[U])), F;
95463
- }
95464
- if (r(C)) {
95465
- if (!r(R)) return !1;
95466
- if (Array.isArray(C)) {
95467
- if (!Array.isArray(R)) return !1;
95468
- let D = [], F = [], H = [];
95469
- for (const U of C.keys()) {
95470
- const q = C[U];
95471
- i(q) && q[e] ? H.push(q) : H.length ? F.push(q) : D.push(q);
95472
- }
95473
- if (H.length) {
95474
- if (H.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
95475
- if (R.length < D.length + F.length) return !1;
95476
- const U = R.slice(0, D.length), q = F.length === 0 ? [] : R.slice(-F.length), G = R.slice(D.length, F.length === 0 ? 1 / 0 : -F.length);
95477
- return D.every((Z, Y) => o(Z, U[Y], M)) && F.every((Z, Y) => o(Z, q[Y], M)) && (H.length === 0 || o(H[0], G, M));
95478
- }
95479
- return C.length === R.length && C.every((U, q) => o(U, R[q], M));
95480
- }
95481
- return Reflect.ownKeys(C).every((D) => {
95482
- const F = C[D];
95483
- return (D in R || i(H = F) && H[t]().matcherType === "optional") && o(F, R[D], M);
95484
- var H;
95485
- });
95486
- }
95487
- return Object.is(R, C);
95488
- }, s = (C) => {
95489
- var R, M, D;
95490
- return r(C) ? i(C) ? (R = (M = (D = C[t]()).getSelectionKeys) == null ? void 0 : M.call(D)) != null ? R : [] : Array.isArray(C) ? c(C, s) : c(Object.values(C), s) : [];
95491
- }, c = (C, R) => C.reduce((M, D) => M.concat(R(D)), []);
95492
- function a(...C) {
95493
- if (C.length === 1) {
95494
- const [R] = C;
95495
- return (M) => o(R, M, () => {
95496
- });
95497
- }
95498
- if (C.length === 2) {
95499
- const [R, M] = C;
95500
- return o(R, M, () => {
95501
- });
95502
- }
95503
- throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${C.length}.`);
95504
- }
95505
- function u(C) {
95506
- return Object.assign(C, { optional: () => h(C), and: (R) => m(C, R), or: (R) => d(C, R), select: (R) => R === void 0 ? y(C) : y(R, C) });
95507
- }
95508
- function l(C) {
95509
- return Object.assign(((R) => Object.assign(R, { [Symbol.iterator]() {
95510
- let M = 0;
95511
- const D = [{ value: Object.assign(R, { [e]: !0 }), done: !1 }, { done: !0, value: void 0 }];
95512
- return { next: () => {
95513
- var F;
95514
- return (F = D[M++]) != null ? F : D.at(-1);
95515
- } };
95516
- } }))(C), { optional: () => l(h(C)), select: (R) => l(R === void 0 ? y(C) : y(R, C)) });
95517
- }
95518
- function h(C) {
95519
- return u({ [t]: () => ({ match: (R) => {
95520
- let M = {};
95521
- const D = (F, H) => {
95522
- M[F] = H;
95523
- };
95524
- return R === void 0 ? (s(C).forEach((F) => D(F, void 0)), { matched: !0, selections: M }) : { matched: o(C, R, D), selections: M };
95525
- }, getSelectionKeys: () => s(C), matcherType: "optional" }) });
95526
- }
95527
- const f = (C, R) => {
95528
- for (const M of C) if (!R(M)) return !1;
95529
- return !0;
95530
- }, g = (C, R) => {
95531
- for (const [M, D] of C.entries()) if (!R(D, M)) return !1;
95532
- return !0;
95533
- };
95534
- function m(...C) {
95535
- return u({ [t]: () => ({ match: (R) => {
95536
- let M = {};
95537
- const D = (F, H) => {
95538
- M[F] = H;
95539
- };
95540
- return { matched: C.every((F) => o(F, R, D)), selections: M };
95541
- }, getSelectionKeys: () => c(C, s), matcherType: "and" }) });
95542
- }
95543
- function d(...C) {
95544
- return u({ [t]: () => ({ match: (R) => {
95545
- let M = {};
95546
- const D = (F, H) => {
95547
- M[F] = H;
95548
- };
95549
- return c(C, s).forEach((F) => D(F, void 0)), { matched: C.some((F) => o(F, R, D)), selections: M };
95550
- }, getSelectionKeys: () => c(C, s), matcherType: "or" }) });
95551
- }
95552
- function p(C) {
95553
- return { [t]: () => ({ match: (R) => ({ matched: !!C(R) }) }) };
95554
- }
95555
- function y(...C) {
95556
- const R = typeof C[0] == "string" ? C[0] : void 0, M = C.length === 2 ? C[1] : typeof C[0] == "string" ? void 0 : C[0];
95557
- return u({ [t]: () => ({ match: (D) => {
95558
- let F = { [R ?? n]: D };
95559
- return { matched: M === void 0 || o(M, D, (H, U) => {
95560
- F[H] = U;
95561
- }), selections: F };
95562
- }, getSelectionKeys: () => [R ?? n].concat(M === void 0 ? [] : s(M)) }) });
95563
- }
95564
- function v(C) {
95565
- return typeof C == "number";
95566
- }
95567
- function b(C) {
95568
- return typeof C == "string";
95569
- }
95570
- function w(C) {
95571
- return typeof C == "bigint";
95572
- }
95573
- const S = u(p(function(C) {
95574
- return !0;
95575
- })), O = S, j = (C) => Object.assign(u(C), { startsWith: (R) => {
95576
- return j(m(C, (M = R, p((D) => b(D) && D.startsWith(M)))));
95577
- var M;
95578
- }, endsWith: (R) => {
95579
- return j(m(C, (M = R, p((D) => b(D) && D.endsWith(M)))));
95580
- var M;
95581
- }, minLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length >= M))(R))), length: (R) => j(m(C, ((M) => p((D) => b(D) && D.length === M))(R))), maxLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length <= M))(R))), includes: (R) => {
95582
- return j(m(C, (M = R, p((D) => b(D) && D.includes(M)))));
95583
- var M;
95584
- }, regex: (R) => {
95585
- return j(m(C, (M = R, p((D) => b(D) && !!D.match(M)))));
95586
- var M;
95587
- } }), K = j(p(b)), x = (C) => Object.assign(u(C), { between: (R, M) => x(m(C, ((D, F) => p((H) => v(H) && D <= H && F >= H))(R, M))), lt: (R) => x(m(C, ((M) => p((D) => v(D) && D < M))(R))), gt: (R) => x(m(C, ((M) => p((D) => v(D) && D > M))(R))), lte: (R) => x(m(C, ((M) => p((D) => v(D) && D <= M))(R))), gte: (R) => x(m(C, ((M) => p((D) => v(D) && D >= M))(R))), int: () => x(m(C, p((R) => v(R) && Number.isInteger(R)))), finite: () => x(m(C, p((R) => v(R) && Number.isFinite(R)))), positive: () => x(m(C, p((R) => v(R) && R > 0))), negative: () => x(m(C, p((R) => v(R) && R < 0))) }), E = x(p(v)), A = (C) => Object.assign(u(C), { between: (R, M) => A(m(C, ((D, F) => p((H) => w(H) && D <= H && F >= H))(R, M))), lt: (R) => A(m(C, ((M) => p((D) => w(D) && D < M))(R))), gt: (R) => A(m(C, ((M) => p((D) => w(D) && D > M))(R))), lte: (R) => A(m(C, ((M) => p((D) => w(D) && D <= M))(R))), gte: (R) => A(m(C, ((M) => p((D) => w(D) && D >= M))(R))), positive: () => A(m(C, p((R) => w(R) && R > 0))), negative: () => A(m(C, p((R) => w(R) && R < 0))) }), P = A(p(w)), T = u(p(function(C) {
95588
- return typeof C == "boolean";
95589
- })), B = u(p(function(C) {
95590
- return typeof C == "symbol";
95591
- })), _ = u(p(function(C) {
95592
- return C == null;
95593
- })), k = u(p(function(C) {
95594
- return C != null;
95595
- }));
95596
- var N = { __proto__: null, matcher: t, optional: h, array: function(...C) {
95597
- return l({ [t]: () => ({ match: (R) => {
95598
- if (!Array.isArray(R)) return { matched: !1 };
95599
- if (C.length === 0) return { matched: !0 };
95600
- const M = C[0];
95601
- let D = {};
95602
- if (R.length === 0) return s(M).forEach((H) => {
95603
- D[H] = [];
95604
- }), { matched: !0, selections: D };
95605
- const F = (H, U) => {
95606
- D[H] = (D[H] || []).concat([U]);
95607
- };
95608
- return { matched: R.every((H) => o(M, H, F)), selections: D };
95609
- }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95610
- }, set: function(...C) {
95611
- return u({ [t]: () => ({ match: (R) => {
95612
- if (!(R instanceof Set)) return { matched: !1 };
95613
- let M = {};
95614
- if (R.size === 0) return { matched: !0, selections: M };
95615
- if (C.length === 0) return { matched: !0 };
95616
- const D = (H, U) => {
95617
- M[H] = (M[H] || []).concat([U]);
95618
- }, F = C[0];
95619
- return { matched: f(R, (H) => o(F, H, D)), selections: M };
95620
- }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95621
- }, map: function(...C) {
95622
- return u({ [t]: () => ({ match: (R) => {
95623
- if (!(R instanceof Map)) return { matched: !1 };
95624
- let M = {};
95625
- if (R.size === 0) return { matched: !0, selections: M };
95626
- const D = (q, G) => {
95627
- M[q] = (M[q] || []).concat([G]);
95628
- };
95629
- if (C.length === 0) return { matched: !0 };
95630
- var F;
95631
- if (C.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(F = C[0]) == null ? void 0 : F.toString()}`);
95632
- const [H, U] = C;
95633
- return { matched: g(R, (q, G) => {
95634
- const Z = o(H, G, D), Y = o(U, q, D);
95635
- return Z && Y;
95636
- }), selections: M };
95637
- }, getSelectionKeys: () => C.length === 0 ? [] : [...s(C[0]), ...s(C[1])] }) });
95638
- }, intersection: m, union: d, not: function(C) {
95639
- return u({ [t]: () => ({ match: (R) => ({ matched: !o(C, R, () => {
95640
- }) }), getSelectionKeys: () => [], matcherType: "not" }) });
95641
- }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(C) {
95642
- return u(p(/* @__PURE__ */ function(R) {
95643
- return (M) => M instanceof R;
95644
- }(C)));
95645
- }, shape: function(C) {
95646
- return u(p(a(C)));
95647
- } };
95648
- class W extends Error {
95649
- constructor(R) {
95650
- let M;
95651
- try {
95652
- M = JSON.stringify(R);
95653
- } catch {
95654
- M = R;
95655
- }
95656
- super(`Pattern matching error: no pattern matches value ${M}`), this.input = void 0, this.input = R;
95657
- }
95658
- }
95659
- const $ = { matched: !1, value: void 0 };
95660
- function z(C) {
95661
- return new I(C, $);
95662
- }
95663
- class I {
95664
- constructor(R, M) {
95665
- this.input = void 0, this.state = void 0, this.input = R, this.state = M;
95666
- }
95667
- with(...R) {
95668
- if (this.state.matched) return this;
95669
- const M = R[R.length - 1], D = [R[0]];
95670
- let F;
95671
- R.length === 3 && typeof R[1] == "function" ? F = R[1] : R.length > 2 && D.push(...R.slice(1, R.length - 1));
95672
- let H = !1, U = {};
95673
- const q = (Z, Y) => {
95674
- H = !0, U[Z] = Y;
95675
- }, G = !D.some((Z) => o(Z, this.input, q)) || F && !F(this.input) ? $ : { matched: !0, value: M(H ? n in U ? U[n] : U : this.input, this.input) };
95676
- return new I(this.input, G);
95677
- }
95678
- when(R, M) {
95679
- if (this.state.matched) return this;
95680
- const D = !!R(this.input);
95681
- return new I(this.input, D ? { matched: !0, value: M(this.input, this.input) } : $);
95682
- }
95683
- otherwise(R) {
95684
- return this.state.matched ? this.state.value : R(this.input);
95685
- }
95686
- exhaustive(R = L) {
95687
- return this.state.matched ? this.state.value : R(this.input);
95688
- }
95689
- run() {
95690
- return this.exhaustive();
95691
- }
95692
- returnType() {
95693
- return this;
95694
- }
95695
- }
95696
- function L(C) {
95697
- throw new W(C);
95698
- }
95699
- const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95700
- Paper,
95701
- {
95702
- withBorder: !0,
95703
- style: { borderColor: "mageGunmetal.9" },
95704
- px: "sm",
95705
- py: 6,
95706
- ...R,
95707
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "md", fw: 400, truncate: "end", style: { textAlign: "left" }, children: C })
95708
- }
95709
- ), GenericError = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Something went wrong. Please try again later." }), GenericLoading = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Loading..." }), useTemporaryMessage = (C) => {
95710
- const [R, M] = reactExports.useState(C), D = reactExports.useRef(!0), F = reactExports.useRef(!1);
95711
- return reactExports.useEffect(() => {
95712
- D.current ? D.current = !1 : C && !F.current && (F.current = !0, setTimeout(() => {
95713
- M(!0);
95714
- }, 2e3));
95715
- }, [C]), R;
95716
- }, Step = ({
95717
- title: C,
95718
- children: R,
95719
- value: M,
95720
- rightSection: D,
95721
- isLast: F,
95722
- disabled: H
95723
- }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
95724
- Accordion.Item,
95725
- {
95726
- value: M,
95727
- styles: {
95728
- item: {
95729
- borderBottom: F ? "none" : ""
95730
- }
95731
- },
95732
- children: [
95733
- /* @__PURE__ */ jsxRuntimeExports.jsx(
95734
- Accordion.Control,
95735
- {
95736
- h: 65,
95737
- disabled: H,
95738
- sx: () => ({
95739
- "&:hover": {
95740
- backgroundColor: "transparent"
95741
- }
95742
- }),
95743
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { align: "center", justify: "space-between", children: [
95744
- /* @__PURE__ */ jsxRuntimeExports.jsx(Title$1, { tt: "uppercase", size: "lg", fw: 600, children: C }),
95745
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { maw: 300, children: !!D && D })
95746
- ] })
95747
- }
95748
- ),
95749
- R && /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion.Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { px: "md", children: R }) })
95750
- ]
95751
- }
95752
- ), AnimatedStep = ({
95753
- children: C,
95754
- ...R
95755
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95756
- motion.span,
95757
- {
95758
- initial: { opacity: 0, y: 15 },
95759
- animate: { opacity: 1, y: 0 },
95760
- exit: { opacity: 0, y: -15 },
95761
- transition: { duration: 0.3, ease: "easeInOut" },
95762
- style: { minWidth: 0, textWrap: "nowrap" },
95763
- ...R,
95764
- children: C
95765
- }
95766
- ), useDataStepRenderer = (C) => {
95804
+ }, useDataStepRenderer = (C) => {
95767
95805
  var Z, Y;
95768
95806
  const R = useFlow(C), M = (Z = R.data) == null ? void 0 : Z.flow_steps.find(
95769
95807
  (Q) => Q.name === FlowSteps.shortlistColumns
@@ -95883,10 +95921,10 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95883
95921
  }
95884
95922
  );
95885
95923
  }, AnalyzeRequestRunning = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "We're getting clear on your needs..." }), useStepRenderer = (C) => {
95886
- var G, Z;
95887
- const R = useFlow(C), M = (G = R.data) == null ? void 0 : G.flow_steps.find(
95888
- (Y) => Y.name === FlowSteps.analyzeRequest
95889
- ), D = (M == null ? void 0 : M.status) === "completed", F = useTemporaryMessage(D), H = reactExports.useMemo(() => z(M).with(void 0, () => ({
95924
+ var Z, Y;
95925
+ const R = useFlow(C), M = useMediaQuery(`(max-width: ${em(750)})`), D = (Z = R.data) == null ? void 0 : Z.flow_steps.find(
95926
+ (Q) => Q.name === FlowSteps.analyzeRequest
95927
+ ), F = (D == null ? void 0 : D.status) === "completed", H = useTemporaryMessage(F), U = reactExports.useMemo(() => z(D).with(void 0, () => ({
95890
95928
  rightSection: /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Your request" }) }, "tasks-0"),
95891
95929
  content: /* @__PURE__ */ jsxRuntimeExports.jsx(AnalyzeRequestRunning, {})
95892
95930
  })).with({ status: "running" }, () => ({
@@ -95896,12 +95934,12 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95896
95934
  rightSection: /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "?" }) }, "tasks-2"),
95897
95935
  content: /* @__PURE__ */ jsxRuntimeExports.jsx(GenericError, {})
95898
95936
  })).with({ status: "completed" }, () => {
95899
- var Y, Q;
95937
+ var Q, J;
95900
95938
  return {
95901
- rightSection: F ? /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, w: 350, label: ((Y = R.data) == null ? void 0 : Y.request) || "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95939
+ rightSection: H ? /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: !M && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, w: 350, label: ((Q = R.data) == null ? void 0 : Q.request) || "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95902
95940
  ArtifactPaper,
95903
95941
  {
95904
- text: ((Q = R.data) == null ? void 0 : Q.request) || "",
95942
+ text: ((J = R.data) == null ? void 0 : J.request) || "",
95905
95943
  withBorder: !1
95906
95944
  }
95907
95945
  ) }) }, "tasks-3") : /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
@@ -95918,10 +95956,10 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95918
95956
  }
95919
95957
  )
95920
95958
  ] }) }, "data-done"),
95921
- content: /* @__PURE__ */ jsxRuntimeExports.jsx(AnalyzeRequestCompleted, { step: M })
95959
+ content: /* @__PURE__ */ jsxRuntimeExports.jsx(AnalyzeRequestCompleted, { step: D })
95922
95960
  };
95923
- }).otherwise(() => null), [M, (Z = R.data) == null ? void 0 : Z.request, F]), U = !!M, q = !M || M.status === "running";
95924
- return { currentStep: H, highlight: U, isLoading: q, allCompleted: D };
95961
+ }).otherwise(() => null), [D, (Y = R.data) == null ? void 0 : Y.request, M, H]), q = !!D, G = !D || D.status === "running";
95962
+ return { currentStep: U, highlight: q, isLoading: G, allCompleted: F };
95925
95963
  }, TaskStep = ({
95926
95964
  isOpened: C,
95927
95965
  flowId: R
@@ -96969,18 +97007,18 @@ ${M}`);
96969
97007
  ] }) }), Recommendations = ({
96970
97008
  startFlow: C
96971
97009
  }) => {
96972
- const { data: R, status: M } = useRecommendations(), D = reactExports.useMemo(() => R == null ? void 0 : R.slice(0, 3), [R]);
97010
+ const { data: R, status: M } = useRecommendations(), D = useMediaQuery(`(max-width: ${em(750)})`), F = reactExports.useMemo(() => R == null ? void 0 : R.slice(0, 3), [R]);
96973
97011
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { flex: 1, children: [
96974
97012
  /* @__PURE__ */ jsxRuntimeExports.jsx(Title$1, { size: "md", fw: 600, tt: "uppercase", children: "Recommendations based on your data" }),
96975
- /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { wrap: "nowrap", align: "stretch", children: M === "success" ? D == null ? void 0 : D.map((F) => /* @__PURE__ */ jsxRuntimeExports.jsx(
97013
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { wrap: "nowrap", align: "stretch", gap: D ? "xs" : "md", children: M === "success" ? F == null ? void 0 : F.map((H) => /* @__PURE__ */ jsxRuntimeExports.jsx(
96976
97014
  Recommendation,
96977
97015
  {
96978
97016
  startFlow: C,
96979
- starter: F.starter,
96980
- explanation: F.explanation,
96981
- type: F.type
97017
+ starter: H.starter,
97018
+ explanation: H.explanation,
97019
+ type: H.type
96982
97020
  },
96983
- F.starter
97021
+ H.starter
96984
97022
  )) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
96985
97023
  /* @__PURE__ */ jsxRuntimeExports.jsx(RecommendationSkeleton, {}),
96986
97024
  /* @__PURE__ */ jsxRuntimeExports.jsx(RecommendationSkeleton, {}),
@@ -97046,17 +97084,17 @@ ${M}`);
97046
97084
  showRecommendations: R,
97047
97085
  onClose: M
97048
97086
  }) => {
97049
- const [D, F] = reactExports.useState(!1), H = useContextReady(), { classes: U } = useFlowTrackerStyles({}), q = useSetAtom(flowIdAtom), { mutate: G } = useStartFlow({
97050
- onSuccess: (oe) => {
97051
- q(oe.flowId);
97087
+ const [D, F] = reactExports.useState(!1), H = useContextReady(), { classes: U } = useFlowTrackerStyles({}), q = useMediaQuery(`(max-width: ${em(750)})`), G = useSetAtom(flowIdAtom), { mutate: Z } = useStartFlow({
97088
+ onSuccess: (se) => {
97089
+ G(se.flowId);
97052
97090
  }
97053
- }), Z = useQueryClient();
97091
+ }), Y = useQueryClient();
97054
97092
  reactExports.useEffect(() => {
97055
- H && (C && Z.prefetchQuery(recentFlowsQueryOptions()), R && Z.prefetchQuery(recommendationsQueryOptions()));
97056
- }, [H, R, C, Z]);
97057
- const Y = useShadowClickOutside(() => {
97093
+ H && (C && Y.prefetchQuery(recentFlowsQueryOptions()), R && Y.prefetchQuery(recommendationsQueryOptions()));
97094
+ }, [H, R, C, Y]);
97095
+ const Q = useShadowClickOutside(() => {
97058
97096
  F(!1), M == null || M();
97059
- }), Q = useForm({
97097
+ }), J = useForm({
97060
97098
  initialValues: {
97061
97099
  userQuery: ""
97062
97100
  },
@@ -97065,25 +97103,22 @@ ${M}`);
97065
97103
  userQuery: z$1.string().nonempty("Please type in a request")
97066
97104
  })
97067
97105
  )
97068
- }), J = (oe) => {
97069
- G(oe.trim());
97070
- }, te = reactExports.useMemo(
97071
- () => Q.values.userQuery.length > 30 || /[\r\n]/.test(Q.values.userQuery) ? Q.values.userQuery.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : Q.values.userQuery,
97072
- [Q.values.userQuery]
97073
- ), ie = D && R, ne = D && C;
97106
+ }), te = (se) => {
97107
+ Z(se.trim());
97108
+ }, ie = reactExports.useMemo(
97109
+ () => J.values.userQuery.length > 30 || /[\r\n]/.test(J.values.userQuery) ? J.values.userQuery.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : J.values.userQuery,
97110
+ [J.values.userQuery]
97111
+ ), ne = D && R, oe = D && C;
97074
97112
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
97075
97113
  MotionStack,
97076
97114
  {
97077
97115
  flex: 1,
97078
- w: 600,
97079
- justify: "flex-end",
97080
- style: { alignSelf: "center" },
97081
97116
  initial: "hidden",
97082
97117
  animate: "visible",
97083
97118
  exit: "hidden",
97084
97119
  variants: overlayVariants,
97085
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { pb: "md", ref: Y, children: [
97086
- ie && /* @__PURE__ */ jsxRuntimeExports.jsx(
97120
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { pb: "md", ref: Q, children: [
97121
+ ne && /* @__PURE__ */ jsxRuntimeExports.jsx(
97087
97122
  Paper,
97088
97123
  {
97089
97124
  component: motion.div,
@@ -97099,7 +97134,7 @@ ${M}`);
97099
97134
  shadow: "lg",
97100
97135
  radius: "md",
97101
97136
  style: { overflow: "hidden", originY: 1 },
97102
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Recommendations, { startFlow: J })
97137
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Recommendations, { startFlow: te })
97103
97138
  }
97104
97139
  ),
97105
97140
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -97127,7 +97162,7 @@ ${M}`);
97127
97162
  gap: D ? "xs" : "lg",
97128
97163
  direction: D ? "column" : "row",
97129
97164
  children: [
97130
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", children: [
97165
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", gap: q ? "xs" : "md", children: [
97131
97166
  /* @__PURE__ */ jsxRuntimeExports.jsx(
97132
97167
  Title$1,
97133
97168
  {
@@ -97139,13 +97174,13 @@ ${M}`);
97139
97174
  children: "Ask your data about"
97140
97175
  }
97141
97176
  ),
97142
- ne && /* @__PURE__ */ jsxRuntimeExports.jsx(RecentDashboardsDropdown, {})
97177
+ oe && /* @__PURE__ */ jsxRuntimeExports.jsx(RecentDashboardsDropdown, {})
97143
97178
  ] }),
97144
97179
  /* @__PURE__ */ jsxRuntimeExports.jsx(
97145
97180
  "form",
97146
97181
  {
97147
- onSubmit: Q.onSubmit(
97148
- (oe) => J(oe.userQuery)
97182
+ onSubmit: J.onSubmit(
97183
+ (se) => te(se.userQuery)
97149
97184
  ),
97150
97185
  style: { flex: "1" },
97151
97186
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -97169,16 +97204,16 @@ ${M}`);
97169
97204
  }
97170
97205
  },
97171
97206
  rightSectionWidth: 28,
97172
- ...Q.getInputProps("userQuery"),
97173
- value: D ? Q.values.userQuery : te,
97207
+ ...J.getInputProps("userQuery"),
97208
+ value: D ? J.values.userQuery : ie,
97174
97209
  onFocus: () => {
97175
97210
  F(!0);
97176
97211
  },
97177
- onKeyDown: (oe) => {
97178
- oe.key === "Enter" && !oe.shiftKey && (oe.preventDefault(), Q.onSubmit((se) => J(se.userQuery))());
97212
+ onKeyDown: (se) => {
97213
+ se.key === "Enter" && !se.shiftKey && (se.preventDefault(), J.onSubmit((ce) => te(ce.userQuery))());
97179
97214
  }
97180
97215
  },
97181
- Q.key("userQuery")
97216
+ J.key("userQuery")
97182
97217
  )
97183
97218
  }
97184
97219
  )
@@ -97197,21 +97232,24 @@ ${M}`);
97197
97232
  showRecentDashboards: C,
97198
97233
  showRecommendations: R,
97199
97234
  onClose: M
97200
- }) => M != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ControlledMageMetricsModal, { onClose: M, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
97201
- ModalContent,
97202
- {
97203
- showRecentDashboards: C,
97204
- showRecommendations: R,
97205
- onClose: M
97206
- }
97207
- ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
97208
- ModalContent,
97209
- {
97210
- showRecentDashboards: C,
97211
- showRecommendations: R,
97212
- onClose: M
97213
- }
97214
- ), defaultColors = {
97235
+ }) => {
97236
+ const D = useMediaQuery(`(max-width: ${em(750)})`);
97237
+ return M != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ControlledMageMetricsModal, { onClose: M, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { h: "100%", align: "end", w: D ? "95%" : 600, mx: "auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
97238
+ ModalContent,
97239
+ {
97240
+ showRecentDashboards: C,
97241
+ showRecommendations: R,
97242
+ onClose: M
97243
+ }
97244
+ ) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
97245
+ ModalContent,
97246
+ {
97247
+ showRecentDashboards: C,
97248
+ showRecommendations: R,
97249
+ onClose: M
97250
+ }
97251
+ );
97252
+ }, defaultColors = {
97215
97253
  mageMagenta: [
97216
97254
  "#EED4EB",
97217
97255
  // 0
@@ -97299,87 +97337,92 @@ ${M}`);
97299
97337
  // 11
97300
97338
  ],
97301
97339
  mageWhisper: [...colorsTuple("#FCFDFD"), "#F7F8F8"]
97302
- }, theme = (C, R) => ({
97303
- cursorType: "pointer",
97304
- colors: R ? {
97305
- mageGunmetal: R.primary,
97306
- mageMagenta: R.darkAccent,
97307
- mageRuby: R.secondary,
97308
- mageWhisper: R.lightAccent
97309
- } : defaultColors,
97310
- white: "var(--mantine-color-mageWhisper-6)",
97311
- black: R ? "black" : "var(--mantine-color-mageGunmetal-6)",
97312
- primaryColor: "mageGunmetal",
97313
- fontFamily: "'Bitter Variable', serif",
97314
- fontFamilyMonospace: '"Source Code Pro Variable", monospace',
97315
- headings: { fontFamily: "'Source Sans 3 Variable', sans-serif" },
97316
- other: {
97317
- ctaPrimaryFill: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-6) 0%, var(--mantine-color-mageGunmetal-8) 100%)",
97318
- ctaPrimaryFillDarken: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-7) 0%, var(--mantine-color-mageGunmetal-9) 100%)",
97319
- ctaSuccessFill: "linear-gradient(180deg, #179949 0%, #117035 100%)",
97320
- whiteGradient: "linear-gradient(180deg, var(--mantine-color-mageWhisper-0) 0%, var(--mantine-color-mageGunmetal-0) 100%)",
97321
- rubyGradient: "linear-gradient(91deg, var(--mantine-color-mageRuby-7) 3.36%, var(--mantine-color-mageMagenta-7) 94.28%)",
97322
- rubyShadow: `0px 0px 7px 2px ${alpha$2("var(--mantine-color-mageRuby-7)", 0.3)}`
97323
- },
97324
- components: {
97325
- Tooltip: {
97326
- styles: {
97327
- tooltip: {
97328
- fontFamily: "'Source Sans 3 Variable'",
97329
- fontSize: "var(--mantine-font-size-md)",
97330
- color: "var(--mantine-color-mageWhisper-6)",
97331
- backgroundColor: "var(--mantine-color-mageGunmetal-8)",
97332
- padding: "var(--mantine-spacing-xs) var(--mantine-spacing-sm)",
97333
- lineHeight: 1.8
97334
- }
97335
- }
97340
+ }, theme = (C, R) => {
97341
+ var M, D, F;
97342
+ return {
97343
+ cursorType: "pointer",
97344
+ colors: R ? {
97345
+ mageGunmetal: R.primary,
97346
+ mageMagenta: R.darkAccent,
97347
+ mageRuby: R.secondary,
97348
+ mageWhisper: R.lightAccent
97349
+ } : defaultColors,
97350
+ white: "var(--mantine-color-mageWhisper-6)",
97351
+ black: R ? "black" : "var(--mantine-color-mageGunmetal-6)",
97352
+ primaryColor: "mageGunmetal",
97353
+ fontFamily: ((M = R == null ? void 0 : R.fonts) == null ? void 0 : M.body) || "'Bitter Variable', serif",
97354
+ fontFamilyMonospace: ((D = R == null ? void 0 : R.fonts) == null ? void 0 : D.monospace) || '"Source Code Pro Variable", monospace',
97355
+ headings: {
97356
+ fontFamily: ((F = R == null ? void 0 : R.fonts) == null ? void 0 : F.heading) || "'Source Sans 3 Variable', sans-serif"
97336
97357
  },
97337
- Text: {
97338
- styles: {
97339
- root: {
97340
- fontFamily: "'Bitter Variable'"
97341
- }
97342
- }
97358
+ other: {
97359
+ ctaPrimaryFill: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-6) 0%, var(--mantine-color-mageGunmetal-8) 100%)",
97360
+ ctaPrimaryFillDarken: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-7) 0%, var(--mantine-color-mageGunmetal-9) 100%)",
97361
+ ctaSuccessFill: "linear-gradient(180deg, #179949 0%, #117035 100%)",
97362
+ whiteGradient: "linear-gradient(180deg, var(--mantine-color-mageWhisper-0) 0%, var(--mantine-color-mageGunmetal-0) 100%)",
97363
+ rubyGradient: "linear-gradient(91deg, var(--mantine-color-mageRuby-7) 3.36%, var(--mantine-color-mageMagenta-7) 94.28%)",
97364
+ rubyShadow: `0px 0px 7px 2px ${alpha$2("var(--mantine-color-mageRuby-7)", 0.3)}`
97343
97365
  },
97344
- Badge: {
97345
- styles: {
97346
- root: {
97347
- fontFamily: "'Source Sans 3 Variable'"
97366
+ components: {
97367
+ Tooltip: {
97368
+ styles: {
97369
+ tooltip: {
97370
+ fontFamily: "'Source Sans 3 Variable'",
97371
+ fontSize: "var(--mantine-font-size-md)",
97372
+ color: "var(--mantine-color-mageWhisper-6)",
97373
+ backgroundColor: "var(--mantine-color-mageGunmetal-8)",
97374
+ padding: "var(--mantine-spacing-xs) var(--mantine-spacing-sm)",
97375
+ lineHeight: 1.8
97376
+ }
97348
97377
  }
97349
- }
97350
- },
97351
- Button: {
97352
- styles: {
97353
- root: {
97354
- fontFamily: "'Source Sans 3 Variable'"
97378
+ },
97379
+ Text: {
97380
+ styles: {
97381
+ root: {
97382
+ fontFamily: "'Bitter Variable'"
97383
+ }
97355
97384
  }
97356
- }
97357
- },
97358
- Portal: {
97359
- defaultProps: {
97360
- target: C
97361
- }
97362
- },
97363
- ScrollArea: {
97364
- defaultProps: {
97365
- offsetScrollbars: "present"
97366
- }
97367
- },
97368
- Select: {
97369
- styles: {
97370
- root: {
97371
- fontFamily: "'Source Sans 3 Variable'"
97372
- },
97373
- input: {
97374
- fontFamily: "'Source Sans 3 Variable'"
97375
- },
97376
- section: {
97377
- fontFamily: "'Source Sans 3 Variable'"
97385
+ },
97386
+ Badge: {
97387
+ styles: {
97388
+ root: {
97389
+ fontFamily: "'Source Sans 3 Variable'"
97390
+ }
97391
+ }
97392
+ },
97393
+ Button: {
97394
+ styles: {
97395
+ root: {
97396
+ fontFamily: "'Source Sans 3 Variable'"
97397
+ }
97398
+ }
97399
+ },
97400
+ Portal: {
97401
+ defaultProps: {
97402
+ target: C
97403
+ }
97404
+ },
97405
+ ScrollArea: {
97406
+ defaultProps: {
97407
+ offsetScrollbars: "present"
97408
+ }
97409
+ },
97410
+ Select: {
97411
+ styles: {
97412
+ root: {
97413
+ fontFamily: "'Source Sans 3 Variable'"
97414
+ },
97415
+ input: {
97416
+ fontFamily: "'Source Sans 3 Variable'"
97417
+ },
97418
+ section: {
97419
+ fontFamily: "'Source Sans 3 Variable'"
97420
+ }
97378
97421
  }
97379
97422
  }
97380
97423
  }
97381
- }
97382
- }), cssResolver = (C) => ({
97424
+ };
97425
+ }, cssResolver = (C) => ({
97383
97426
  variables: {
97384
97427
  "--mantine-color-ctaPrimaryFill": C.other.ctaPrimaryFill,
97385
97428
  "--mantine-color-ctaPrimaryFillDarken": C.other.ctaPrimaryFillDarken,
@@ -97390,7 +97433,7 @@ ${M}`);
97390
97433
  },
97391
97434
  light: {},
97392
97435
  dark: {}
97393
- }), Wrapper = ({ children: C, root: R, themeColors: M }) => {
97436
+ }), Wrapper = ({ children: C, root: R, theme: M }) => {
97394
97437
  const D = reactExports.useMemo(
97395
97438
  () => theme(R, M),
97396
97439
  [R, M]
@@ -97427,7 +97470,7 @@ ${M}`);
97427
97470
  externalJWT: R,
97428
97471
  apiUrl: M,
97429
97472
  children: D,
97430
- themeColors: F,
97473
+ theme: F,
97431
97474
  display: H = "block"
97432
97475
  }) => {
97433
97476
  const U = reactExports.useRef(null), [q, G] = reactExports.useState(!1);
@@ -97464,7 +97507,7 @@ ${M}`);
97464
97507
  apiKey: C,
97465
97508
  externalJWT: R,
97466
97509
  apiUrl: M,
97467
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper, { root: U.current, themeColors: F, children: D })
97510
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper, { root: U.current, theme: F, children: D })
97468
97511
  }
97469
97512
  ) }) : null
97470
97513
  ] });
@@ -97490,29 +97533,31 @@ ${M}`);
97490
97533
  apiKey: C,
97491
97534
  externalJWT: R,
97492
97535
  apiUrl: M,
97493
- persist: D = "none",
97494
- modal: F = void 0,
97495
- startOptions: H = void 0,
97496
- themeColors: U = void 0
97536
+ display: D = "contents",
97537
+ persist: F = "none",
97538
+ modal: H = void 0,
97539
+ startOptions: U = void 0,
97540
+ theme: q = void 0
97497
97541
  }) => {
97498
- const q = useSetAtom(persistenceAtom);
97542
+ const G = useSetAtom(persistenceAtom);
97499
97543
  reactExports.useEffect(() => {
97500
- q(D);
97501
- }, [D, q]);
97502
- const G = (F == null ? void 0 : F.visible) === !0 || F === void 0;
97544
+ G(F);
97545
+ }, [F, G]);
97546
+ const Z = (H == null ? void 0 : H.visible) === !0 || H === void 0;
97503
97547
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
97504
97548
  AppWrapper,
97505
97549
  {
97506
97550
  apiKey: C,
97507
97551
  externalJWT: R,
97508
97552
  apiUrl: M,
97509
- themeColors: U,
97510
- children: G && /* @__PURE__ */ jsxRuntimeExports.jsx(
97553
+ theme: q,
97554
+ display: D,
97555
+ children: Z && /* @__PURE__ */ jsxRuntimeExports.jsx(
97511
97556
  InnerModal,
97512
97557
  {
97513
- onClose: F == null ? void 0 : F.onClose,
97514
- showRecentDashboards: H == null ? void 0 : H.showRecentDashboards,
97515
- showRecommendations: H == null ? void 0 : H.showRecommendations
97558
+ onClose: H == null ? void 0 : H.onClose,
97559
+ showRecentDashboards: U == null ? void 0 : U.showRecentDashboards,
97560
+ showRecommendations: U == null ? void 0 : U.showRecommendations
97516
97561
  }
97517
97562
  )
97518
97563
  }