@cratis/stage.runtime 4.190.0 → 4.190.1

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 (2) hide show
  1. package/dist/src/index.js +586 -571
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -3,21 +3,21 @@ import { createContext as e, createElement as t, useCallback as n, useContext as
3
3
  import { ColorScheme as l, DestinationKind as u, FormGenerationMode as d, FormWidthUnit as f, InteractionTriggerKind as p } from "@cratis/scene.model";
4
4
  import { ShellDiagnosticCode as m, ShellOrigin as h, createBindingResolver as g, resolveArgumentSource as _, resolveBehaviors as v, resolveStringsInElement as y, runBindings as b, validateBindingExpression as x } from "@cratis/scene.engine";
5
5
  import { CoreSliceDialog as S, CoreToolbarItem as C, InteractionScope as w, SceneElementView as T, SceneNavigationContextInternal as ee, SliceCommandFieldsProvider as te, SliceDialogView as ne, SliceInvokerProvider as E, attachmentFor as re, coreComponents as D, createBrowserDispatcher as ie, createHashSceneHistory as O, sliceDialogParameters as k, useInteractionScope as ae, useOptionalSceneNavigation as oe, useSceneNavigation as se, useSceneOutlets as ce, useSceneTheme as A } from "@cratis/scene.react";
6
- import { ApplicationHost as le, ColorScheme as ue, ComponentName as j, LayoutThemeProvider as de, SlotName as M, blueprintPackageCatalog as fe, composeApplicationScreen as pe, defaultBlueprintComponents as me, defaultBlueprintName as he, defaultBlueprintThemes as ge, effectiveShellOf as _e, externalComponent as N, galleryScreenTemplates as ve, layoutModes as ye, menuThemes as be, navigationElement as xe, previewComponents as Se, previewProfile as Ce, useLayoutConfig as we } from "@cratis/scene.blueprint.default";
6
+ import { ApplicationHost as le, ColorScheme as j, ComponentName as M, LayoutThemeProvider as ue, SlotName as N, blueprintPackageCatalog as de, composeApplicationScreen as fe, defaultBlueprintComponents as pe, defaultBlueprintName as me, defaultBlueprintThemes as he, effectiveShellOf as ge, externalComponent as P, galleryScreenTemplates as _e, layoutModes as ve, menuThemes as ye, navigationElement as be, previewComponents as xe, previewProfile as Se, useLayoutConfig as Ce } from "@cratis/scene.blueprint.default";
7
7
  import "@cratis/scene.blueprint.default/styles.css";
8
- import { ArcContext as Te } from "@cratis/arc.react";
9
- import { ObservableQueryFor as Ee, Paging as De, QueryFor as Oe } from "@cratis/arc/queries";
10
- import { resolveCommand as ke, resolveExactQuery as Ae } from "@cratis/scene.components";
11
- import { Fragment as je, jsx as P, jsxs as F } from "react/jsx-runtime";
12
- import { Button as I } from "primereact/button";
8
+ import { ArcContext as we } from "@cratis/arc.react";
9
+ import { ObservableQueryFor as Te, Paging as Ee, QueryFor as De } from "@cratis/arc/queries";
10
+ import { resolveCommand as Oe, resolveExactQuery as ke } from "@cratis/scene.components";
11
+ import { Fragment as Ae, jsx as F, jsxs as I } from "react/jsx-runtime";
12
+ import { Button as je } from "primereact/button";
13
13
  import { PrimeDialog as Me, PrimeMessage as Ne, primeReactComponents as Pe, primeReactPackageManifest as Fe } from "@cratis/scene.primereact";
14
- import { Command as Ie } from "@cratis/arc/commands";
15
- import { CommandForm as Le, asCommandFormField as Re } from "@cratis/arc.react/commands";
16
- import { CalendarField as ze, CheckboxField as Be, DropdownField as Ve, InputTextField as He, NumberField as Ue } from "@cratis/components/CommandForm";
17
- import { Guid as We } from "@cratis/fundamentals";
18
- import Ge from "@primeuix/themes/lara";
14
+ import { DateOnly as Ie, Guid as Le } from "@cratis/fundamentals";
15
+ import { Command as Re } from "@cratis/arc/commands";
16
+ import { CommandForm as ze, asCommandFormField as Be, withCommandFormFieldBinding as Ve } from "@cratis/arc.react/commands";
17
+ import { CalendarField as He, CheckboxField as Ue, DropdownField as We, InputTextField as Ge, NumberField as Ke } from "@cratis/components/CommandForm";
18
+ import qe from "@primeuix/themes/lara";
19
19
  //#region src/stageSource.ts
20
- function Ke(e) {
20
+ function Je(e) {
21
21
  return {
22
22
  scene: async () => e.scene,
23
23
  routes: async () => e.routes,
@@ -25,23 +25,23 @@ function Ke(e) {
25
25
  strings: async (t) => e.strings[t] ?? {}
26
26
  };
27
27
  }
28
- var qe = {
28
+ var Ye = {
29
29
  scene: "stage/scene",
30
30
  routes: "stage/routes",
31
31
  locales: "stage/locales",
32
32
  strings: (e) => `stage/strings/${encodeURIComponent(e)}`
33
- }, Je = e(void 0);
34
- function Ye({ source: e, children: n }) {
35
- return t(Je.Provider, { value: e }, n);
33
+ }, Xe = e(void 0);
34
+ function Ze({ source: e, children: n }) {
35
+ return t(Xe.Provider, { value: e }, n);
36
36
  }
37
- function Xe() {
38
- let e = r(Je);
37
+ function Qe() {
38
+ let e = r(Xe);
39
39
  if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
40
40
  return e;
41
41
  }
42
- qe.routes;
43
- function Ze() {
44
- let e = Xe(), [t, n] = c({
42
+ Ye.routes;
43
+ function $e() {
44
+ let e = Qe(), [t, n] = c({
45
45
  routes: void 0,
46
46
  ready: !1
47
47
  });
@@ -65,51 +65,51 @@ function Ze() {
65
65
  function L(e) {
66
66
  return typeof e == "object" && e && "id" in e ? e.id : void 0;
67
67
  }
68
- function Qe(e) {
68
+ function et(e) {
69
69
  if (typeof e != "object" || !e) return e;
70
70
  let t = e.toString();
71
71
  return t === "[object Object]" ? JSON.stringify(e) : t;
72
72
  }
73
- function $e(e, t) {
74
- return e === t ? !0 : e == null || t == null ? !1 : typeof e == "object" && "equals" in e && typeof e.equals == "function" ? e.equals(t) : typeof t == "object" && "equals" in t && typeof t.equals == "function" ? t.equals(e) : Qe(e) === Qe(t);
73
+ function tt(e, t) {
74
+ return e === t ? !0 : e == null || t == null ? !1 : typeof e == "object" && "equals" in e && typeof e.equals == "function" ? e.equals(t) : typeof t == "object" && "equals" in t && typeof t.equals == "function" ? t.equals(e) : et(e) === et(t);
75
75
  }
76
- function et(e, t) {
77
- if (t.removed.length > 0 ? L(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => $e(L(e), L(t)))).map((e) => t.replaced.find((t) => $e(L(t), L(e))) ?? e), ...t.added];
76
+ function nt(e, t) {
77
+ if (t.removed.length > 0 ? L(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => tt(L(e), L(t)))).map((e) => t.replaced.find((t) => tt(L(t), L(e))) ?? e), ...t.added];
78
78
  let n = new Set(t.removed.map((e) => JSON.stringify(e)));
79
79
  return [...e.filter((e) => !n.has(JSON.stringify(e))), ...t.added];
80
80
  }
81
81
  //#endregion
82
82
  //#region src/queryExecutor.ts
83
- var tt;
84
- function nt(e) {
85
- tt = e;
86
- }
87
- function rt(e, t) {
88
- let n = Ae(e);
89
- return n === "ambiguous" && t && (n = Ae(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), it(n) ? n : t ? tt?.(t) : void 0;
90
- }
83
+ var rt;
91
84
  function it(e) {
92
- return typeof e == "function" && (e.prototype instanceof Oe || e.prototype instanceof Ee);
85
+ rt = e;
93
86
  }
94
87
  function at(e, t) {
95
- e.setMicroservice(t.microservice), e.setApiBasePath(t.apiBasePath ?? ""), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = De.noPaging;
88
+ let n = ke(e);
89
+ return n === "ambiguous" && t && (n = ke(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), ot(n) ? n : t ? rt?.(t) : void 0;
90
+ }
91
+ function ot(e) {
92
+ return typeof e == "function" && (e.prototype instanceof De || e.prototype instanceof Te);
93
+ }
94
+ function st(e, t) {
95
+ e.setMicroservice(t.microservice), e.setApiBasePath(t.apiBasePath ?? ""), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = Ee.noPaging;
96
96
  }
97
- function ot(e, t, n) {
97
+ function ct(e, t, n) {
98
98
  let r = new e();
99
- return at(r, n), r.perform(t);
99
+ return st(r, n), r.perform(t);
100
100
  }
101
- function st(e, t, n, r) {
101
+ function lt(e, t, n, r) {
102
102
  let i = new e();
103
- if (i instanceof Ee) return at(i, n), i.subscribe(r, t);
103
+ if (i instanceof Te) return st(i, n), i.subscribe(r, t);
104
104
  }
105
- function ct(e) {
105
+ function ut(e) {
106
106
  if (R(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
107
107
  }
108
- var lt = "STAGE-SCENE-ACTION-001", ut = "item.";
108
+ var dt = "STAGE-SCENE-ACTION-001", ft = "item.";
109
109
  function R(e) {
110
110
  return typeof e == "object" && !!e && !Array.isArray(e);
111
111
  }
112
- function dt(e, t) {
112
+ function pt(e, t) {
113
113
  let n = e;
114
114
  for (let e of t.split(".").filter(Boolean)) {
115
115
  if (!R(n)) return;
@@ -117,20 +117,20 @@ function dt(e, t) {
117
117
  }
118
118
  return n;
119
119
  }
120
- function ft(e) {
120
+ function mt(e) {
121
121
  return e === null || [
122
122
  "string",
123
123
  "number",
124
124
  "boolean"
125
125
  ].includes(typeof e);
126
126
  }
127
- function pt(e, t) {
127
+ function ht(e, t) {
128
128
  if (typeof e == "number") return t[e];
129
129
  if (typeof e == "string") return t.find((t) => t.toLowerCase() === e.toLowerCase());
130
130
  }
131
- function mt(e, t, n, r) {
131
+ function gt(e, t, n, r) {
132
132
  if (r !== void 0 && (t === "Equal" || t === "NotEqual")) {
133
- let i = pt(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
133
+ let i = ht(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
134
134
  return i === void 0 || a === void 0 ? !1 : t === "Equal" ? i === a : i !== a;
135
135
  }
136
136
  switch (t) {
@@ -145,57 +145,57 @@ function mt(e, t, n, r) {
145
145
  default: return;
146
146
  }
147
147
  }
148
- function ht(e, t) {
148
+ function _t(e, t) {
149
149
  if (R(e)) {
150
150
  if (e.kind === "comparison") {
151
- let n = ct(e.left);
152
- if (typeof n != "string" || !n.startsWith(ut) || typeof e.operator != "string" || !ft(e.right)) return;
151
+ let n = ut(e.left);
152
+ if (typeof n != "string" || !n.startsWith(ft) || typeof e.operator != "string" || !mt(e.right)) return;
153
153
  let r = Array.isArray(e.enumeration) && e.enumeration.every((e) => typeof e == "string") ? e.enumeration : void 0;
154
- return mt(dt(t, n.slice(5)), e.operator, e.right, r);
154
+ return gt(pt(t, n.slice(5)), e.operator, e.right, r);
155
155
  }
156
156
  if (e.kind === "logical") {
157
- let n = ht(e.left, t), r = ht(e.right, t);
157
+ let n = _t(e.left, t), r = _t(e.right, t);
158
158
  return n === void 0 || r === void 0 ? void 0 : e.operator === "And" ? n && r : e.operator === "Or" ? n || r : void 0;
159
159
  }
160
160
  }
161
161
  }
162
- function gt(e) {
163
- return e.every((e) => ht(e, {}) !== void 0);
162
+ function vt(e) {
163
+ return e.every((e) => _t(e, {}) !== void 0);
164
164
  }
165
- function _t(e, t) {
166
- if (gt(e)) return e.findIndex((e) => ht(e, t) === !0);
165
+ function yt(e, t) {
166
+ if (vt(e)) return e.findIndex((e) => _t(e, t) === !0);
167
167
  }
168
- function vt(e, t) {
168
+ function bt(e, t) {
169
169
  if (!R(e) || !Array.isArray(e.alternatives) || !R(t)) return;
170
- let n = _t(e.alternatives, t);
170
+ let n = yt(e.alternatives, t);
171
171
  if (n !== void 0) {
172
172
  if (e.kind === "firstMatch" && typeof e.index == "number") return n === e.index;
173
173
  if (e.kind === "otherwise") return n === -1;
174
174
  }
175
175
  }
176
- function yt(e, t) {
177
- if (e.startsWith(ut) && R(t)) return dt(t, e.slice(5));
176
+ function xt(e, t) {
177
+ if (e.startsWith(ft) && R(t)) return pt(t, e.slice(5));
178
178
  }
179
179
  //#endregion
180
180
  //#region src/stageSession.ts
181
- var bt = "stage.session.";
182
- function xt(e) {
181
+ var St = "stage.session.";
182
+ function Ct(e) {
183
183
  try {
184
184
  return globalThis.localStorage?.getItem(`stage.session.${e}`) || void 0;
185
185
  } catch {
186
186
  return;
187
187
  }
188
188
  }
189
- function St(e) {
190
- let t = xt(e);
189
+ function wt(e) {
190
+ let t = Ct(e);
191
191
  if (t) return t;
192
192
  let n = globalThis.crypto.randomUUID();
193
193
  try {
194
- globalThis.localStorage?.setItem(`${bt}${e}`, n);
194
+ globalThis.localStorage?.setItem(`${St}${e}`, n);
195
195
  } catch {}
196
196
  return n;
197
197
  }
198
- function Ct() {
198
+ function Tt() {
199
199
  let e = {};
200
200
  try {
201
201
  let t = globalThis.localStorage;
@@ -210,7 +210,7 @@ function Ct() {
210
210
  }
211
211
  //#endregion
212
212
  //#region src/stageData.tsx
213
- var wt = "cratis.stage.data-changed", Tt = e({
213
+ var Et = "cratis.stage.data-changed", Dt = e({
214
214
  locale: "",
215
215
  locales: [],
216
216
  screen: "",
@@ -234,13 +234,13 @@ var wt = "cratis.stage.data-changed", Tt = e({
234
234
  resolveArgument: () => void 0,
235
235
  registerQueryResult: () => void 0,
236
236
  refreshVersion: 0
237
- }), Et = [
237
+ }), Ot = [
238
238
  500,
239
239
  1500,
240
240
  3e3
241
- ], Dt = {};
242
- function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, locales: l, screen: u, children: d }) {
243
- let [f, p] = c({}), [m, h] = c(0), [v, y] = c({}), [b, S] = c(), [C, w] = c({}), [T, ee] = c({}), [te, ne] = c({}), [E, re] = c({ version: 0 }), D = o(() => Pt(te), [te]), ie = n((e, t) => {
241
+ ], kt = {};
242
+ function At({ routes: e, routesReady: t = !0, parameters: r = kt, locale: a, locales: l, screen: u, children: d }) {
243
+ let [f, p] = c({}), [m, h] = c(0), [v, y] = c({}), [b, S] = c(), [C, w] = c({}), [T, ee] = c({}), [te, ne] = c({}), [E, re] = c({ version: 0 }), D = o(() => It(te), [te]), ie = n((e, t) => {
244
244
  p((n) => {
245
245
  if (!t) {
246
246
  let { [e]: t, ...r } = n;
@@ -251,7 +251,7 @@ function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, loc
251
251
  [e]: t
252
252
  };
253
253
  });
254
- }, []), O = r, k = o(() => Ct(), [m]), ae = o(() => ({
254
+ }, []), O = r, k = o(() => Tt(), [m]), ae = o(() => ({
255
255
  name: u,
256
256
  keys: {
257
257
  ...k,
@@ -276,31 +276,31 @@ function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, loc
276
276
  let i = H(r[e]) ? r[e] : {};
277
277
  return {
278
278
  ...r,
279
- [e]: Nt(i, t.split(".").filter(Boolean), n)
279
+ [e]: Ft(i, t.split(".").filter(Boolean), n)
280
280
  };
281
281
  });
282
282
  }, []), A = n((e) => re((t) => ({
283
283
  query: e,
284
284
  version: t.version + 1
285
- })), []), le = s([]), ue = n(() => {
285
+ })), []), le = s([]), j = n(() => {
286
286
  h((e) => e + 1), A();
287
- for (let e of Et) le.current.push(setTimeout(() => A(), e));
287
+ for (let e of Ot) le.current.push(setTimeout(() => A(), e));
288
288
  }, [A]);
289
289
  i(() => () => le.current.forEach(clearTimeout), []), i(() => {
290
290
  let e = () => A(), t = (e) => A(e.detail?.query);
291
- return globalThis.addEventListener(wt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
292
- globalThis.removeEventListener(wt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
291
+ return globalThis.addEventListener(Et, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
292
+ globalThis.removeEventListener(Et, e), globalThis.removeEventListener("cratis.scene.refresh", t);
293
293
  };
294
294
  }, [A]);
295
- let j = b ? v[b] : void 0, de = n((e) => {
295
+ let M = b ? v[b] : void 0, ue = n((e) => {
296
296
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
297
- if (typeof e == "string") return Ft(e, j, v, f, C, O, ae, a, l);
298
- let t = At(j, f, C, {
297
+ if (typeof e == "string") return Lt(e, M, v, f, C, O, ae, a, l);
298
+ let t = Mt(M, f, C, {
299
299
  ...D,
300
300
  ...T
301
301
  }, v);
302
302
  if (!e.kind && e.path.startsWith("component.")) return _(e.path, t);
303
- if (!e.kind) return Ft(e.path, j, v, f, C, O, ae, a, l);
303
+ if (!e.kind) return Lt(e.path, M, v, f, C, O, ae, a, l);
304
304
  let n = x(e, t);
305
305
  return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), g(t)(e);
306
306
  }, [
@@ -312,9 +312,9 @@ function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, loc
312
312
  D,
313
313
  f,
314
314
  ae,
315
- j,
315
+ M,
316
316
  v
317
- ]), M = n((e) => e ? _(e, At(j, f, C, {
317
+ ]), N = n((e) => e ? _(e, Mt(M, f, C, {
318
318
  ...D,
319
319
  ...T
320
320
  }, v)) : void 0, [
@@ -322,16 +322,16 @@ function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, loc
322
322
  C,
323
323
  D,
324
324
  f,
325
- j,
325
+ M,
326
326
  v
327
- ]), fe = n((e, t) => ne((n) => ({
327
+ ]), de = n((e, t) => ne((n) => ({
328
328
  ...n,
329
329
  [e]: t
330
- })), []), pe = n((e) => ne((t) => {
330
+ })), []), fe = n((e) => ne((t) => {
331
331
  if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
332
332
  let n = { ...t };
333
333
  return delete n[e], n;
334
- }), []), me = o(() => At(void 0, f, {}, {}, {}).queryResults, [f]), he = o(() => ({
334
+ }), []), pe = o(() => Mt(void 0, f, {}, {}, {}).queryResults, [f]), me = o(() => ({
335
335
  locale: a,
336
336
  locales: l,
337
337
  screen: u,
@@ -340,19 +340,19 @@ function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, loc
340
340
  parameters: O,
341
341
  session: k,
342
342
  queries: f,
343
- selected: j,
343
+ selected: M,
344
344
  selections: v,
345
345
  selectRow: oe,
346
346
  clearSelection: se,
347
- setState: (e, t) => w((n) => Nt(n, e.split(".").filter(Boolean), t)),
347
+ setState: (e, t) => w((n) => Ft(n, e.split(".").filter(Boolean), t)),
348
348
  setComponentOutput: ce,
349
- publishComponentOutputs: fe,
350
- withdrawComponentOutputs: pe,
351
- queryResults: me,
349
+ publishComponentOutputs: de,
350
+ withdrawComponentOutputs: fe,
351
+ queryResults: pe,
352
352
  refreshQuery: A,
353
- refreshAfterCommand: ue,
354
- resolveBinding: de,
355
- resolveArgument: M,
353
+ refreshAfterCommand: j,
354
+ resolveBinding: ue,
355
+ resolveArgument: N,
356
356
  registerQueryResult: ie,
357
357
  refreshVersion: E.version,
358
358
  refreshQueryName: E.query
@@ -361,34 +361,34 @@ function Ot({ routes: e, routesReady: t = !0, parameters: r = Dt, locale: a, loc
361
361
  a,
362
362
  l,
363
363
  f,
364
- ue,
364
+ j,
365
365
  A,
366
366
  E.query,
367
367
  E.version,
368
368
  ie,
369
+ de,
369
370
  fe,
370
371
  pe,
371
- me,
372
- M,
373
- de,
372
+ N,
373
+ ue,
374
374
  e,
375
375
  t,
376
376
  O,
377
377
  k,
378
378
  u,
379
379
  oe,
380
- j,
380
+ M,
381
381
  v,
382
382
  ce
383
383
  ]);
384
- return /* @__PURE__ */ P(Tt.Provider, {
385
- value: he,
384
+ return /* @__PURE__ */ F(Dt.Provider, {
385
+ value: me,
386
386
  children: d
387
387
  });
388
388
  }
389
- var z = () => r(Tt);
389
+ var z = () => r(Dt);
390
390
  function B(e) {
391
- let { refreshQueryName: t, refreshVersion: a, registerQueryResult: o } = z(), l = r(Te), u = e.publish !== !1, d = n((e, t) => {
391
+ let { refreshQueryName: t, refreshVersion: a, registerQueryResult: o } = z(), l = r(we), u = e.publish !== !1, d = n((e, t) => {
392
392
  u && o(e, t);
393
393
  }, [u, o]), [f, p] = c([]), [m, h] = c(""), [g, _] = c(!1), [v, y] = c(0), b = s(0), x = s(!1), S = e.ready ?? !0, C = !!e.name && S, w = JSON.stringify(e.arguments ?? {});
394
394
  return i(() => {
@@ -398,21 +398,21 @@ function B(e) {
398
398
  }
399
399
  let t = b.current + 1;
400
400
  b.current = t;
401
- let n = new AbortController(), r = JSON.parse(w), i = rt(e.name ?? "", e.route);
401
+ let n = new AbortController(), r = JSON.parse(w), i = at(e.name ?? "", e.route);
402
402
  _(!0), h("");
403
403
  let a = (e) => {
404
404
  b.current !== t || n.signal.aborted || (x.current = !1, p([]), h(e instanceof Error ? e.message : String(e)), _(!1));
405
405
  }, o = [], s = (e) => {
406
406
  if (b.current !== t || n.signal.aborted) return;
407
- let r = Rt(e);
407
+ let r = Bt(e);
408
408
  if (r) {
409
409
  a(Error(r));
410
410
  return;
411
411
  }
412
- e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? et(o, e.changeSet) : e.data, p(zt(o)), h(""), _(!1));
412
+ e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? nt(o, e.changeSet) : e.data, p(Vt(o)), h(""), _(!1));
413
413
  };
414
414
  if (!i) return a(/* @__PURE__ */ Error(`The modeled query “${e.name}” is not registered by this Stage.`)), () => n.abort();
415
- let c = i.prototype instanceof Ee, u = () => Promise.resolve().then(() => ot(i, c ? {
415
+ let c = i.prototype instanceof Te, u = () => Promise.resolve().then(() => ct(i, c ? {
416
416
  ...r,
417
417
  waitForFirstResult: !0
418
418
  } : r, l)).then(s).catch(a);
@@ -422,7 +422,7 @@ function B(e) {
422
422
  b.current !== t || n.signal.aborted || (x.current = !1, f?.unsubscribe(), f = void 0, u());
423
423
  }, 15e3);
424
424
  try {
425
- f = st(i, r, l, (e) => {
425
+ f = lt(i, r, l, (e) => {
426
426
  e.isReady !== !1 && globalThis.clearTimeout(m), s(e);
427
427
  });
428
428
  } catch {
@@ -483,29 +483,29 @@ function B(e) {
483
483
  }
484
484
  };
485
485
  }
486
- function kt() {
487
- globalThis.dispatchEvent(new CustomEvent(wt));
486
+ function jt() {
487
+ globalThis.dispatchEvent(new CustomEvent(Et));
488
488
  }
489
- function At(e, t, n, r, i) {
489
+ function Mt(e, t, n, r, i) {
490
490
  let a = Object.entries(t).sort(([, e], [, t]) => Number(e.list === !0) - Number(t.list === !0));
491
491
  return {
492
492
  dataContext: e,
493
493
  queryResults: Object.fromEntries(a.flatMap(([e, t]) => {
494
- let n = t.list ? t.rows : jt(t.rows);
494
+ let n = t.list ? t.rows : Nt(t.rows);
495
495
  return [
496
496
  [e, n],
497
497
  ...t.name ? [[t.name, n]] : [],
498
498
  ...t.alias ? [[t.alias, n]] : []
499
499
  ];
500
500
  })),
501
- componentOutputs: Mt(r, i),
501
+ componentOutputs: Pt(r, i),
502
502
  state: n
503
503
  };
504
504
  }
505
- function jt(e) {
505
+ function Nt(e) {
506
506
  return e.length === 1 ? e[0] : e;
507
507
  }
508
- function Mt(e, t) {
508
+ function Pt(e, t) {
509
509
  let n = { ...e };
510
510
  for (let [e, r] of Object.entries(t)) r && (n[e] = {
511
511
  ...r,
@@ -513,17 +513,17 @@ function Mt(e, t) {
513
513
  });
514
514
  return n;
515
515
  }
516
- function Nt(e, t, n) {
516
+ function Ft(e, t, n) {
517
517
  let [r, ...i] = t;
518
518
  return r ? i.length === 0 ? {
519
519
  ...e,
520
520
  [r]: n
521
521
  } : {
522
522
  ...e,
523
- [r]: Nt(H(e[r]) ? e[r] : {}, i, n)
523
+ [r]: Ft(H(e[r]) ? e[r] : {}, i, n)
524
524
  } : e;
525
525
  }
526
- function Pt(e) {
526
+ function It(e) {
527
527
  let t = {};
528
528
  for (let n of Object.values(e)) for (let [e, r] of Object.entries(n)) t[e] = {
529
529
  ...t[e],
@@ -531,7 +531,7 @@ function Pt(e) {
531
531
  };
532
532
  return t;
533
533
  }
534
- function Ft(e, t, n, r, i, a, o, s, c) {
534
+ function Lt(e, t, n, r, i, a, o, s, c) {
535
535
  if (!e) return;
536
536
  let l = e.replace(/^\$\.?/, "").split(".").filter(Boolean);
537
537
  if (l.length !== 0) {
@@ -540,20 +540,20 @@ function Ft(e, t, n, r, i, a, o, s, c) {
540
540
  let e = V(o, l.slice(1));
541
541
  return e === void 0 && l[1] === "keys" && l.length === 3 ? V(t, [l[2]]) : e;
542
542
  }
543
- return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? Lt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? It(l.slice(1).join("."), t, n) : l[0] === "state" ? V(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : V(t, l) ?? Lt(r, void 0, l.join(".")) ?? V(i, l);
543
+ return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? zt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Rt(l.slice(1).join("."), t, n) : l[0] === "state" ? V(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : V(t, l) ?? zt(r, void 0, l.join(".")) ?? V(i, l);
544
544
  }
545
545
  }
546
- function It(e, t, n) {
546
+ function Rt(e, t, n) {
547
547
  let r = e?.split(".").filter(Boolean) ?? [];
548
548
  return r.length > 0 && Object.hasOwn(n, r[0]) ? V(n[r[0]], r.slice(1)) : r.length === 0 ? t : V(t, r);
549
549
  }
550
- function Lt(e, t, n) {
550
+ function zt(e, t, n) {
551
551
  let r = Object.entries(e).filter(([e, n]) => t ? n.name === t || e === t : !n.list).map(([, e]) => e.rows);
552
552
  if (r.length === 0) return;
553
553
  let i = r.flat(), a = n?.split(".").filter(Boolean) ?? [];
554
554
  return a.length === 0 ? i : i.length === 1 ? V(i[0], a) : i.map((e) => V(e, a));
555
555
  }
556
- function Rt(e) {
556
+ function Bt(e) {
557
557
  if (!H(e)) return "";
558
558
  if (e.isAuthorized === !1) return "The query answered 403.";
559
559
  if (e.isValid === !1 || e.hasExceptions === !0 || e.isSuccess === !1) {
@@ -562,7 +562,7 @@ function Rt(e) {
562
562
  }
563
563
  return "";
564
564
  }
565
- function zt(e) {
565
+ function Vt(e) {
566
566
  return Array.isArray(e) ? e.filter(H) : H(e) ? [e] : [];
567
567
  }
568
568
  function V(e, t) {
@@ -578,7 +578,7 @@ function H(e) {
578
578
  }
579
579
  //#endregion
580
580
  //#region src/stageComponentOutputs.ts
581
- function Bt() {
581
+ function Ht() {
582
582
  let e = a(), { publishComponentOutputs: t, withdrawComponentOutputs: r } = z();
583
583
  return i(() => () => r(e), [e, r]), n((n) => t(e, n), [t, e]);
584
584
  }
@@ -591,14 +591,14 @@ function U(e, t, n) {
591
591
  e
592
592
  ]) {
593
593
  if (!r) continue;
594
- let t = ke(r);
595
- if (Vt(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
594
+ let t = Oe(r);
595
+ if (Ut(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
596
596
  }
597
597
  }
598
- function Vt(e) {
599
- return typeof e == "function" && e.prototype instanceof Ie;
598
+ function Ut(e) {
599
+ return typeof e == "function" && e.prototype instanceof Re;
600
600
  }
601
- function Ht() {
601
+ function Wt() {
602
602
  let e = globalThis.document?.baseURI ?? globalThis.location?.href;
603
603
  if (!e) return "";
604
604
  try {
@@ -607,10 +607,10 @@ function Ht() {
607
607
  return "";
608
608
  }
609
609
  }
610
- function Ut(e, t) {
611
- return e.setApiBasePath(t || Ht()), e;
610
+ function Gt(e, t) {
611
+ return e.setApiBasePath(t || Wt()), e;
612
612
  }
613
- async function Wt(e, t, n) {
613
+ async function Kt(e, t, n) {
614
614
  let r = U(e);
615
615
  if (!r) return {
616
616
  isSuccess: !1,
@@ -618,11 +618,11 @@ async function Wt(e, t, n) {
618
618
  messages: [`The modeled command “${e}” is not registered by this Stage.`]
619
619
  };
620
620
  let i = new r();
621
- i.setMicroservice(n.microservice), i.setApiBasePath(n.apiBasePath || Ht()), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
621
+ i.setMicroservice(n.microservice), i.setApiBasePath(n.apiBasePath || Wt()), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
622
622
  for (let e of i.propertyDescriptors) Object.prototype.hasOwnProperty.call(t, e.name) && Reflect.set(i, e.name, t[e.name]);
623
- return Gt(e, await i.execute());
623
+ return qt(e, await i.execute());
624
624
  }
625
- function Gt(e, t) {
625
+ function qt(e, t) {
626
626
  let n = t.isSuccess && t.isAuthorized && t.isValid && !t.hasExceptions, r = t.isValid ? [] : t.validationResults.flatMap((e) => (e.members.length > 0 ? e.members : [""]).map((t) => ({
627
627
  member: t,
628
628
  message: e.message
@@ -638,53 +638,53 @@ function Gt(e, t) {
638
638
  messages: n || i.length > 0 ? i : [`“${e}” was not accepted.`]
639
639
  };
640
640
  }
641
- function Kt() {
642
- let e = r(Te);
643
- return n((t, n) => Wt(t, n, e), [e]);
641
+ function Jt() {
642
+ let e = r(we);
643
+ return n((t, n) => Kt(t, n, e), [e]);
644
644
  }
645
645
  //#endregion
646
646
  //#region src/stageNavigation.ts
647
- function qt(e, t = {}) {
647
+ function Yt(e, t = {}) {
648
648
  let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
649
649
  return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
650
650
  }
651
651
  function W(e, t = {}) {
652
652
  if (!globalThis.location) return;
653
- let n = qt(e, t);
653
+ let n = Yt(e, t);
654
654
  globalThis.location.hash !== n && (globalThis.location.hash = n);
655
655
  }
656
- function Jt(e) {
657
- return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof We)).map(([e, t]) => [e, String(t)]));
656
+ function Xt(e) {
657
+ return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof Le)).map(([e, t]) => [e, String(t)]));
658
658
  }
659
659
  //#endregion
660
660
  //#region src/stageFormSchema.ts
661
- var Yt = 8;
662
- function Xt(e) {
661
+ var Zt = 8;
662
+ function Qt(e) {
663
663
  if (!e) return [];
664
664
  try {
665
- return Zt(JSON.parse(e), 0);
665
+ return $t(JSON.parse(e), 0);
666
666
  } catch {
667
667
  return [];
668
668
  }
669
669
  }
670
- function Zt(e, t) {
671
- let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = on(e.properties) ? e.properties : {};
672
- return Object.entries(i).map(([e, i]) => Qt(e, i, !n || r.has(e), t));
670
+ function $t(e, t) {
671
+ let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = cn(e.properties) ? e.properties : {};
672
+ return Object.entries(i).map(([e, i]) => en(e, i, !n || r.has(e), t));
673
673
  }
674
- function Qt(e, t, n, r) {
674
+ function en(e, t, n, r) {
675
675
  return {
676
676
  name: e,
677
677
  identifier: t?.format === "uuid" && typeof t["x-concept"] == "string" ? t["x-concept"] : void 0,
678
678
  ...t?.["x-identity"] === !0 ? { identity: !0 } : {},
679
679
  required: n,
680
- ...$t(t, r)
680
+ ...tn(t, r)
681
681
  };
682
682
  }
683
- function $t(e, t) {
683
+ function tn(e, t) {
684
684
  let n = e?.type;
685
685
  if (Array.isArray(n)) {
686
686
  let r = n.filter((e) => e !== "null");
687
- return r.length === 1 ? $t({
687
+ return r.length === 1 ? tn({
688
688
  ...e,
689
689
  type: r[0]
690
690
  }, t) : { unsupportedReason: `union type ${JSON.stringify(n)}` };
@@ -695,8 +695,8 @@ function $t(e, t) {
695
695
  type: "date",
696
696
  withTime: e.format === "date-time"
697
697
  };
698
- if (n === "array") return en(e, t);
699
- if (n === "object") return tn(e, t);
698
+ if (n === "array") return nn(e, t);
699
+ if (n === "object") return rn(e, t);
700
700
  if (n === void 0 || n === "string") {
701
701
  let t = Array.isArray(e?.enum) ? e.enum.filter((e) => typeof e == "string") : [];
702
702
  return t.length > 0 ? {
@@ -706,54 +706,54 @@ function $t(e, t) {
706
706
  }
707
707
  return { unsupportedReason: `type ${String(n)}` };
708
708
  }
709
- function en(e, t) {
709
+ function nn(e, t) {
710
710
  let n = { unsupportedReason: "array fields are not supported by the native Stage command form" };
711
- if (t >= Yt || e?.items === void 0) return n;
712
- let r = Qt("", e.items, !0, t + 1);
711
+ if (t >= Zt || e?.items === void 0) return n;
712
+ let r = en("", e.items, !0, t + 1);
713
713
  return r.unsupportedReason || r.item ? n : { item: r };
714
714
  }
715
- function tn(e, t) {
715
+ function rn(e, t) {
716
716
  let n = { unsupportedReason: "object fields are not supported by the native Stage command form" };
717
- if (t >= Yt || !on(e?.properties) || Object.keys(e.properties).length === 0) return n;
718
- let r = Zt(e, t + 1), i = r.find((e) => e.unsupportedReason);
717
+ if (t >= Zt || !cn(e?.properties) || Object.keys(e.properties).length === 0) return n;
718
+ let r = $t(e, t + 1), i = r.find((e) => e.unsupportedReason);
719
719
  return i ? { unsupportedReason: `its member “${i.name}” is not supported: ${i.unsupportedReason}` } : { members: r };
720
720
  }
721
721
  function G(e) {
722
722
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase();
723
723
  return t.charAt(0).toUpperCase() + t.slice(1);
724
724
  }
725
- function nn(e, t, n) {
725
+ function an(e, t, n) {
726
726
  if (t != null) {
727
- if (e.members && on(t)) for (let r of e.members) {
727
+ if (e.members && cn(t)) for (let r of e.members) {
728
728
  let e = t[r.name], i = G(r.name);
729
- if (rn(e)) {
729
+ if (on(e)) {
730
730
  if (r.required) return `${n}: ${i} is required`;
731
731
  continue;
732
732
  }
733
- let a = nn(r, e, `${n} ${i.toLowerCase()}`);
733
+ let a = an(r, e, `${n} ${i.toLowerCase()}`);
734
734
  if (a) return a;
735
735
  }
736
736
  if (e.item && Array.isArray(t)) for (let [r, i] of t.entries()) {
737
- let t = rn(i) ? `${n} ${r + 1} is required` : nn(e.item, i, `${n} ${r + 1}`);
737
+ let t = on(i) ? `${n} ${r + 1} is required` : an(e.item, i, `${n} ${r + 1}`);
738
738
  if (t) return t;
739
739
  }
740
740
  }
741
741
  }
742
- function rn(e) {
742
+ function on(e) {
743
743
  return e == null || e === "";
744
744
  }
745
- function an(e, t) {
746
- return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && on(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
745
+ function sn(e, t) {
746
+ return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && cn(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
747
747
  let r = e.members?.find((e) => e.name === t);
748
- return [t, r ? an(r, n) : n];
749
- })) : e.item && Array.isArray(t) ? t.map((t) => an(e.item, t)) : t;
748
+ return [t, r ? sn(r, n) : n];
749
+ })) : e.item && Array.isArray(t) ? t.map((t) => sn(e.item, t)) : t;
750
750
  }
751
- function on(e) {
751
+ function cn(e) {
752
752
  return typeof e == "object" && !!e && !Array.isArray(e);
753
753
  }
754
754
  //#endregion
755
755
  //#region src/StageValueFields.tsx
756
- var sn = Re((e) => /* @__PURE__ */ P(cn, {
756
+ var ln = Be((e) => /* @__PURE__ */ F(un, {
757
757
  descriptor: e.descriptor,
758
758
  label: e.title ?? G(e.descriptor.name),
759
759
  value: e.value,
@@ -761,22 +761,22 @@ var sn = Re((e) => /* @__PURE__ */ P(cn, {
761
761
  onBlur: e.onBlur,
762
762
  invalid: e.invalid
763
763
  }), { defaultValue: void 0 });
764
- function cn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
765
- return e.members ? /* @__PURE__ */ P(ln, {
764
+ function un({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
765
+ return e.members ? /* @__PURE__ */ F(dn, {
766
766
  descriptor: e,
767
767
  label: t,
768
768
  value: n,
769
769
  onChange: r,
770
770
  onBlur: i,
771
771
  invalid: a
772
- }) : e.item ? /* @__PURE__ */ P(un, {
772
+ }) : e.item ? /* @__PURE__ */ F(fn, {
773
773
  descriptor: e,
774
774
  label: t,
775
775
  value: n,
776
776
  onChange: r,
777
777
  onBlur: i,
778
778
  invalid: a
779
- }) : /* @__PURE__ */ P(dn, {
779
+ }) : /* @__PURE__ */ F(pn, {
780
780
  descriptor: e,
781
781
  label: t,
782
782
  value: n,
@@ -785,12 +785,12 @@ function cn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
785
785
  invalid: a
786
786
  });
787
787
  }
788
- function ln({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
789
- let o = mn(n) ? n : {};
790
- return /* @__PURE__ */ F("fieldset", {
788
+ function dn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
789
+ let o = gn(n) ? n : {};
790
+ return /* @__PURE__ */ I("fieldset", {
791
791
  className: "stage-record-field",
792
792
  "data-invalid": a ? "true" : void 0,
793
- children: [/* @__PURE__ */ P("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ P(cn, {
793
+ children: [/* @__PURE__ */ F("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ F(un, {
794
794
  descriptor: e,
795
795
  label: G(e.name),
796
796
  value: o[e.name],
@@ -802,74 +802,74 @@ function ln({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
802
802
  }, e.name))]
803
803
  });
804
804
  }
805
- function un({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
805
+ function fn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
806
806
  let o = e.item, s = Array.isArray(n) ? n : [], c = (e) => r(e);
807
- return /* @__PURE__ */ F("fieldset", {
807
+ return /* @__PURE__ */ I("fieldset", {
808
808
  className: "stage-list-field",
809
809
  "data-invalid": a ? "true" : void 0,
810
810
  children: [
811
- /* @__PURE__ */ P("legend", { children: t }),
812
- s.length === 0 && /* @__PURE__ */ P("p", {
811
+ /* @__PURE__ */ F("legend", { children: t }),
812
+ s.length === 0 && /* @__PURE__ */ F("p", {
813
813
  className: "stage-note",
814
814
  children: "Nothing added yet."
815
815
  }),
816
- s.map((e, n) => /* @__PURE__ */ F("div", {
816
+ s.map((e, n) => /* @__PURE__ */ I("div", {
817
817
  className: "stage-list-field__row",
818
- children: [/* @__PURE__ */ P(cn, {
818
+ children: [/* @__PURE__ */ F(un, {
819
819
  descriptor: o,
820
820
  label: `${t} ${n + 1}`,
821
821
  value: e,
822
822
  onBlur: i,
823
823
  onChange: (e) => c(s.map((t, r) => r === n ? e : t))
824
- }), /* @__PURE__ */ P("button", {
824
+ }), /* @__PURE__ */ F("button", {
825
825
  type: "button",
826
826
  "aria-label": `Remove ${t} ${n + 1}`,
827
827
  onClick: () => c(s.filter((e, t) => t !== n)),
828
828
  children: "Remove"
829
829
  })]
830
830
  }, n)),
831
- /* @__PURE__ */ P("button", {
831
+ /* @__PURE__ */ F("button", {
832
832
  type: "button",
833
833
  "aria-label": `Add ${t}`,
834
- onClick: () => c([...s, fn(o)]),
834
+ onClick: () => c([...s, mn(o)]),
835
835
  children: "Add"
836
836
  })
837
837
  ]
838
838
  });
839
839
  }
840
- function dn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
840
+ function pn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
841
841
  let o = {
842
842
  "aria-invalid": a ? !0 : void 0,
843
843
  onBlur: i
844
844
  };
845
- if (e.options) return /* @__PURE__ */ F("label", {
845
+ if (e.options) return /* @__PURE__ */ I("label", {
846
846
  className: "stage-value-field",
847
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ F("select", {
847
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ I("select", {
848
848
  ...o,
849
849
  value: typeof n == "string" ? n : "",
850
850
  onChange: (e) => r(e.target.value === "" ? void 0 : e.target.value),
851
- children: [/* @__PURE__ */ P("option", {
851
+ children: [/* @__PURE__ */ F("option", {
852
852
  value: "",
853
853
  children: ""
854
- }), e.options.map((e) => /* @__PURE__ */ P("option", {
854
+ }), e.options.map((e) => /* @__PURE__ */ F("option", {
855
855
  value: e,
856
856
  children: G(e)
857
857
  }, e))]
858
858
  })]
859
859
  });
860
860
  switch (e.type) {
861
- case "boolean": return /* @__PURE__ */ F("label", {
861
+ case "boolean": return /* @__PURE__ */ I("label", {
862
862
  className: "stage-value-field stage-value-field--check",
863
- children: [/* @__PURE__ */ P("input", {
863
+ children: [/* @__PURE__ */ F("input", {
864
864
  ...o,
865
865
  type: "checkbox",
866
866
  checked: n === !0,
867
867
  onChange: (e) => r(e.target.checked)
868
- }), /* @__PURE__ */ P("span", { children: t })]
868
+ }), /* @__PURE__ */ F("span", { children: t })]
869
869
  });
870
- case "number": return /* @__PURE__ */ F("label", {
870
+ case "number": return /* @__PURE__ */ I("label", {
871
871
  className: "stage-value-field",
872
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
872
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
873
873
  ...o,
874
874
  type: "number",
875
875
  step: "any",
@@ -877,18 +877,18 @@ function dn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
877
877
  onChange: (e) => r(e.target.value === "" ? void 0 : Number(e.target.value))
878
878
  })]
879
879
  });
880
- case "date": return /* @__PURE__ */ F("label", {
880
+ case "date": return /* @__PURE__ */ I("label", {
881
881
  className: "stage-value-field",
882
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
882
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
883
883
  ...o,
884
884
  type: e.withTime ? "datetime-local" : "date",
885
885
  value: typeof n == "string" ? n.slice(0, e.withTime ? 16 : 10) : "",
886
- onChange: (t) => r(t.target.value === "" ? void 0 : pn(t.target.value, e.withTime === !0))
886
+ onChange: (t) => r(t.target.value === "" ? void 0 : hn(t.target.value, e.withTime === !0))
887
887
  })]
888
888
  });
889
- default: return /* @__PURE__ */ F("label", {
889
+ default: return /* @__PURE__ */ I("label", {
890
890
  className: "stage-value-field",
891
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
891
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
892
892
  ...o,
893
893
  type: "text",
894
894
  value: typeof n == "string" ? n : "",
@@ -897,116 +897,116 @@ function dn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
897
897
  });
898
898
  }
899
899
  }
900
- function fn(e) {
900
+ function mn(e) {
901
901
  return e.members ? {} : void 0;
902
902
  }
903
- function pn(e, t) {
903
+ function hn(e, t) {
904
904
  if (!t) return e;
905
905
  let n = new Date(e);
906
906
  return Number.isNaN(n.getTime()) ? e : n.toISOString();
907
907
  }
908
- function mn(e) {
908
+ function gn(e) {
909
909
  return typeof e == "object" && !!e && !Array.isArray(e);
910
910
  }
911
911
  //#endregion
912
912
  //#region src/StageCommandForm.tsx
913
- var hn = e(void 0);
914
- function gn({ element: e }) {
915
- let t = z(), n = r(Te), i = r(hn), a = o(() => vn(e), [e]), s = o(() => Vn(e), [e]), l = typeof e.properties.schema == "string", u = o(() => a ? yn(a, s) : [], [a, s]), d = a ? U(a.command, q(e, "typeName"), q(e, "route")) : void 0, f = An(e, u, t.resolveArgument), p = On(e, s, t), m = JSON.stringify(p ?? null), h = o(() => p, [m]), g = o(() => Object.values(t.selections).filter((e) => e !== void 0), [t.selections]), _ = o(() => ({
913
+ var _n = e(void 0);
914
+ function vn({ element: e }) {
915
+ let t = z(), n = r(we), i = r(_n), a = o(() => bn(e), [e]), s = o(() => Gn(e), [e]), l = typeof e.properties.schema == "string", u = o(() => a ? xn(a, s) : [], [a, s]), d = a ? U(a.command, q(e, "typeName"), q(e, "route")) : void 0, f = Pn(e, u, t.resolveArgument), p = Mn(e, s, t), m = JSON.stringify(p ?? null), h = o(() => p, [m]), g = o(() => Object.values(t.selections).filter((e) => e !== void 0), [t.selections]), _ = o(() => ({
916
916
  ...h,
917
- ...Cn(u, s, t.parameters, g),
918
- ...Sn(u, t.parameters)
917
+ ...Dn(u, s, t.parameters, g),
918
+ ...En(u, t.parameters)
919
919
  }), [
920
920
  h,
921
921
  u,
922
922
  s,
923
923
  t.parameters,
924
924
  g
925
- ]), v = o(() => a ? bn(a, u, s) : void 0, [
925
+ ]), v = o(() => a ? Sn(a, u, s) : void 0, [
926
926
  a,
927
927
  u,
928
928
  s
929
- ]), y = o(() => a ? zn(u, s) : [], [
929
+ ]), y = o(() => a ? Un(u, s) : [], [
930
930
  a,
931
931
  u,
932
932
  s
933
- ]), b = o(() => a ? Bn(a.layout, u) : [], [a, u]), [x, S] = c([]);
934
- return a ? !d && !t.routesReady ? /* @__PURE__ */ F("p", {
933
+ ]), b = o(() => a ? Wn(a.layout, u) : [], [a, u]), [x, S] = c([]);
934
+ return a ? !d && !t.routesReady ? /* @__PURE__ */ I("p", {
935
935
  className: "stage-note",
936
936
  children: [
937
937
  "The modeled command “",
938
938
  a.command,
939
939
  "” is waiting for Stage routes."
940
940
  ]
941
- }) : d ? u.length === 0 && !l && e.properties.parameterless !== !0 ? /* @__PURE__ */ P(_n, {
941
+ }) : d ? u.length === 0 && !l && e.properties.parameterless !== !0 ? /* @__PURE__ */ F(yn, {
942
942
  form: a,
943
943
  messages: [`The modeled command “${a.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
944
- }) : y.length > 0 ? /* @__PURE__ */ P(_n, {
944
+ }) : y.length > 0 ? /* @__PURE__ */ F(yn, {
945
945
  form: a,
946
946
  messages: y
947
- }) : /* @__PURE__ */ P("section", {
947
+ }) : /* @__PURE__ */ F("section", {
948
948
  className: "stage-command-form",
949
949
  "data-command": a.command,
950
950
  "data-generation-mode": a.generationMode,
951
- children: /* @__PURE__ */ F(Le, {
951
+ children: /* @__PURE__ */ I(ze, {
952
952
  command: d,
953
953
  initialValues: _,
954
954
  currentValues: f,
955
955
  validateOn: "both",
956
956
  validateAllFieldsOnChange: !0,
957
- onBeforeExecute: (e) => Ut(e, n.apiBasePath),
958
- onFieldValidate: (e, t, n, r) => Rn(u, s, t, r),
957
+ onBeforeExecute: (e) => Gt(e, n.apiBasePath),
958
+ onFieldValidate: (e, t, n, r) => Hn(u, s, t, r),
959
959
  onValidationFailure: (e) => S(e.map((e) => e.message)),
960
960
  onException: (e) => S(e),
961
- onFailed: (e) => S(Gt(a.command, e).messages),
961
+ onFailed: (e) => S(qt(a.command, e).messages),
962
962
  onSuccess: () => {
963
963
  S([]), t.refreshAfterCommand();
964
964
  let n = q(e, "navigateToScreen");
965
965
  n && W(n, {}), i?.();
966
966
  },
967
967
  children: [
968
- b.map((e) => /* @__PURE__ */ P("p", {
968
+ b.map((e) => /* @__PURE__ */ F("p", {
969
969
  role: "alert",
970
970
  className: "stage-form-error",
971
971
  children: e
972
972
  }, e)),
973
973
  v,
974
- x.map((e) => /* @__PURE__ */ P("p", {
974
+ x.map((e) => /* @__PURE__ */ F("p", {
975
975
  role: "alert",
976
976
  className: "stage-form-error",
977
977
  children: e
978
978
  }, e)),
979
- /* @__PURE__ */ F("button", {
979
+ /* @__PURE__ */ I("button", {
980
980
  type: "submit",
981
981
  children: ["Execute ", a.label]
982
982
  })
983
983
  ]
984
984
  }, m)
985
- }) : /* @__PURE__ */ F("p", {
985
+ }) : /* @__PURE__ */ I("p", {
986
986
  className: "stage-note",
987
987
  children: [
988
988
  "The modeled command “",
989
989
  a.command,
990
990
  "” is not registered by this Stage."
991
991
  ]
992
- }) : /* @__PURE__ */ P("p", {
992
+ }) : /* @__PURE__ */ F("p", {
993
993
  className: "stage-note",
994
994
  children: "This form is missing its command metadata."
995
995
  });
996
996
  }
997
- function _n({ form: e, messages: t }) {
998
- return /* @__PURE__ */ P("section", {
997
+ function yn({ form: e, messages: t }) {
998
+ return /* @__PURE__ */ F("section", {
999
999
  className: "stage-command-form",
1000
1000
  "data-command": e.command,
1001
1001
  "data-generation-mode": e.generationMode,
1002
- children: t.map((e) => /* @__PURE__ */ P("p", {
1002
+ children: t.map((e) => /* @__PURE__ */ F("p", {
1003
1003
  role: "alert",
1004
1004
  className: "stage-form-error",
1005
1005
  children: e
1006
1006
  }, e))
1007
1007
  });
1008
1008
  }
1009
- function vn(e) {
1009
+ function bn(e) {
1010
1010
  let t = q(e, "command");
1011
1011
  if (!t) return;
1012
1012
  let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(J) : [];
@@ -1014,41 +1014,41 @@ function vn(e) {
1014
1014
  command: t,
1015
1015
  label: q(e, "label", t),
1016
1016
  fields: n,
1017
- generationMode: Mn(e.properties.generationMode),
1018
- layout: Nn(e.properties.layout)
1017
+ generationMode: In(e.properties.generationMode),
1018
+ layout: Ln(e.properties.layout)
1019
1019
  };
1020
1020
  }
1021
- function yn(e, t) {
1021
+ function xn(e, t) {
1022
1022
  return e.generationMode === d.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
1023
1023
  name: e.name,
1024
1024
  label: e.name
1025
1025
  }));
1026
1026
  }
1027
- function bn(e, t, n) {
1028
- let r = e.layout, i = r ? Pn(r, t) : [];
1029
- if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => xn(e, n));
1030
- let a = new Map(t.map((e) => [e.name, e])), o = Fn(r, i), s = {
1031
- gridTemplateColumns: Array.from({ length: o }, (e, t) => In(t + 1, r.columns)).join(" "),
1027
+ function Sn(e, t, n) {
1028
+ let r = e.layout, i = r ? Rn(r, t) : [];
1029
+ if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Cn(e, n));
1030
+ let a = new Map(t.map((e) => [e.name, e])), o = zn(r, i), s = {
1031
+ gridTemplateColumns: Array.from({ length: o }, (e, t) => Bn(t + 1, r.columns)).join(" "),
1032
1032
  columnGap: K(r.columnGap),
1033
1033
  rowGap: K(r.rowGap)
1034
1034
  }, c = /* @__PURE__ */ new Set();
1035
- return /* @__PURE__ */ F("div", {
1035
+ return /* @__PURE__ */ I("div", {
1036
1036
  className: "stage-command-form__layout",
1037
1037
  style: s,
1038
1038
  children: [i.map((e) => {
1039
1039
  let t = a.get(e.field);
1040
- return t ? (c.add(t.name), xn(t, n, e)) : null;
1041
- }), t.filter((e) => !c.has(e.name)).map((e) => xn(e, n))]
1040
+ return t ? (c.add(t.name), Cn(t, n, e)) : null;
1041
+ }), t.filter((e) => !c.has(e.name)).map((e) => Cn(e, n))]
1042
1042
  });
1043
1043
  }
1044
- function xn(e, t, n) {
1044
+ function Cn(e, t, n) {
1045
1045
  let r = e.sourceProperty ?? e.name, i = t.find((e) => e.name === r), a = e.label ?? e.name, o = (e) => e[r], s = i?.required ?? !0, c = (() => {
1046
1046
  if (i?.options) {
1047
1047
  let e = i.options.map((e) => ({
1048
1048
  value: e,
1049
1049
  label: G(e)
1050
1050
  }));
1051
- return /* @__PURE__ */ P(Ve, {
1051
+ return /* @__PURE__ */ F(We, {
1052
1052
  value: o,
1053
1053
  fieldName: r,
1054
1054
  title: a,
@@ -1058,7 +1058,7 @@ function xn(e, t, n) {
1058
1058
  optionLabel: "label"
1059
1059
  });
1060
1060
  }
1061
- if (i?.members || i?.item) return /* @__PURE__ */ P(sn, {
1061
+ if (i?.members || i?.item) return /* @__PURE__ */ F(ln, {
1062
1062
  value: o,
1063
1063
  fieldName: r,
1064
1064
  title: a,
@@ -1066,34 +1066,35 @@ function xn(e, t, n) {
1066
1066
  descriptor: i
1067
1067
  });
1068
1068
  switch (i?.type ?? "text") {
1069
- case "number": return /* @__PURE__ */ P(Ue, {
1069
+ case "number": return /* @__PURE__ */ F(Ke, {
1070
1070
  value: o,
1071
1071
  fieldName: r,
1072
1072
  title: a,
1073
1073
  required: s
1074
1074
  });
1075
- case "boolean": return /* @__PURE__ */ P(Be, {
1075
+ case "boolean": return /* @__PURE__ */ F(Ue, {
1076
1076
  value: o,
1077
1077
  fieldName: r,
1078
1078
  label: a,
1079
1079
  required: s
1080
1080
  });
1081
- case "date": return /* @__PURE__ */ P(ze, {
1081
+ case "date": return /* @__PURE__ */ F(wn, {
1082
1082
  value: o,
1083
1083
  fieldName: r,
1084
1084
  title: a,
1085
1085
  required: s,
1086
- showIcon: !0
1086
+ showIcon: !0,
1087
+ showTime: i?.withTime
1087
1088
  });
1088
- default: return /* @__PURE__ */ P(He, {
1089
+ default: return /* @__PURE__ */ F(Ge, {
1089
1090
  value: o,
1090
1091
  fieldName: r,
1091
1092
  title: a,
1092
1093
  required: s
1093
1094
  });
1094
1095
  }
1095
- })(), l = Ln(n);
1096
- return /* @__PURE__ */ P("span", {
1096
+ })(), l = Vn(n);
1097
+ return /* @__PURE__ */ F("span", {
1097
1098
  className: "stage-command-form__field",
1098
1099
  "data-field": e.name,
1099
1100
  "data-row": n?.row,
@@ -1103,7 +1104,21 @@ function xn(e, t, n) {
1103
1104
  children: c
1104
1105
  }, e.name);
1105
1106
  }
1106
- function Sn(e, t) {
1107
+ var wn = Ve((e) => /* @__PURE__ */ F(He, {
1108
+ ...e,
1109
+ currentValue: e.showTime ? e.currentValue : Tn(e.currentValue),
1110
+ onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? Ie.fromDate(t) : t)
1111
+ }));
1112
+ function Tn(e) {
1113
+ if (e instanceof Ie) return e.toDate();
1114
+ if (typeof e != "string") return e;
1115
+ try {
1116
+ return Ie.parse(e).toDate();
1117
+ } catch {
1118
+ return null;
1119
+ }
1120
+ }
1121
+ function En(e, t) {
1107
1122
  let n = {};
1108
1123
  for (let r of e) {
1109
1124
  let e = r.sourceProperty ?? r.name, i = t[e];
@@ -1111,32 +1126,32 @@ function Sn(e, t) {
1111
1126
  }
1112
1127
  return n;
1113
1128
  }
1114
- function Cn(e, t, n, r = []) {
1129
+ function Dn(e, t, n, r = []) {
1115
1130
  let i = new Set(e.map((e) => e.sourceProperty ?? e.name)), a = t.some((e) => e.identity), o = {};
1116
1131
  for (let e of t) {
1117
1132
  if (!e.identifier || !e.required || i.has(e.name)) continue;
1118
- let t = Tn(e, n) ?? En(e, r) ?? (e.identity || !a ? St(e.identifier) : void 0);
1133
+ let t = kn(e, n) ?? An(e, r) ?? (e.identity || !a ? wt(e.identifier) : void 0);
1119
1134
  t !== void 0 && (o[e.name] = t);
1120
1135
  }
1121
1136
  return o;
1122
1137
  }
1123
- function wn(e, t) {
1124
- return !e.identifier || !e.required ? !1 : e.identity === !0 || Tn(e, t) !== void 0;
1138
+ function On(e, t) {
1139
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || kn(e, t) !== void 0;
1125
1140
  }
1126
- function Tn(e, t) {
1127
- if (e.identifier) return t[e.name] || xt(e.identifier);
1141
+ function kn(e, t) {
1142
+ if (e.identifier) return t[e.name] || Ct(e.identifier);
1128
1143
  }
1129
- function En(e, t) {
1144
+ function An(e, t) {
1130
1145
  if (!e.identifier) return;
1131
1146
  let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
1132
1147
  return n.size === 1 ? [...n][0] : void 0;
1133
1148
  }
1134
- function Dn(e) {
1149
+ function jn(e) {
1135
1150
  let t = e.properties.populateSource;
1136
1151
  return J(t) ? t : void 0;
1137
1152
  }
1138
- function On(e, t, n) {
1139
- let r = Dn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, kn(e, r?.path ?? e, t, n)]), s = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = B({
1153
+ function Mn(e, t, n) {
1154
+ let r = jn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, Nn(e, r?.path ?? e, t, n)]), s = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = B({
1140
1155
  scope: `populate:${q(e, "command")}`,
1141
1156
  name: i,
1142
1157
  route: i ? n.routes?.queries?.[i] : void 0,
@@ -1149,58 +1164,58 @@ function On(e, t, n) {
1149
1164
  let e = {};
1150
1165
  for (let n of t) {
1151
1166
  let t = d[n.name] ?? d[n.name.charAt(0).toLowerCase() + n.name.slice(1)];
1152
- t != null && (e[n.name] = an(n, t));
1167
+ t != null && (e[n.name] = sn(n, t));
1153
1168
  }
1154
1169
  return Object.keys(e).length > 0 ? e : void 0;
1155
1170
  }, [d, t]);
1156
1171
  }
1157
- function kn(e, t, n, r) {
1172
+ function Nn(e, t, n, r) {
1158
1173
  let i = r.parameters[t] ?? r.parameters[e];
1159
1174
  if (i) return i;
1160
1175
  let a = n.find((n) => n.name === t || n.name === e)?.identifier;
1161
- if (a) return St(a);
1176
+ if (a) return wt(a);
1162
1177
  let o = r.resolveBinding({ path: t });
1163
1178
  return typeof o == "string" || typeof o == "number" ? o : void 0;
1164
1179
  }
1165
- function An(e, t, n) {
1166
- let r = o(() => jn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1180
+ function Pn(e, t, n) {
1181
+ let r = o(() => Fn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1167
1182
  return o(() => {
1168
1183
  let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
1169
1184
  return Object.keys(e).length > 0 ? e : void 0;
1170
1185
  }, [r, a]);
1171
1186
  }
1172
- function jn(e, t) {
1187
+ function Fn(e, t) {
1173
1188
  let n = e.properties.arguments;
1174
1189
  if (!Array.isArray(n)) return [];
1175
1190
  let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
1176
1191
  return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
1177
1192
  }
1178
- function Mn(e) {
1193
+ function In(e) {
1179
1194
  return e === d.Manual ? d.Manual : d.Auto;
1180
1195
  }
1181
- function Nn(e) {
1196
+ function Ln(e) {
1182
1197
  if (!J(e)) return;
1183
1198
  let t = e;
1184
1199
  return {
1185
- columns: Array.isArray(t.columns) ? t.columns.filter(Hn) : [],
1186
- placements: Array.isArray(t.placements) ? t.placements.filter(Un) : [],
1187
- columnGap: Wn(t.columnGap) ? t.columnGap : void 0,
1188
- rowGap: Wn(t.rowGap) ? t.rowGap : void 0
1200
+ columns: Array.isArray(t.columns) ? t.columns.filter(Kn) : [],
1201
+ placements: Array.isArray(t.placements) ? t.placements.filter(qn) : [],
1202
+ columnGap: Jn(t.columnGap) ? t.columnGap : void 0,
1203
+ rowGap: Jn(t.rowGap) ? t.rowGap : void 0
1189
1204
  };
1190
1205
  }
1191
- function Pn(e, t) {
1206
+ function Rn(e, t) {
1192
1207
  let n = new Map(e.placements.map((e) => [e.field, e]));
1193
- for (let e of t) !n.has(e.name) && Un(e.placement) && n.set(e.name, e.placement);
1208
+ for (let e of t) !n.has(e.name) && qn(e.placement) && n.set(e.name, e.placement);
1194
1209
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
1195
1210
  }
1196
- function Fn(e, t) {
1211
+ function zn(e, t) {
1197
1212
  return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
1198
1213
  }
1199
- function In(e, t) {
1214
+ function Bn(e, t) {
1200
1215
  let n = t.find((t) => t.index === e), r = K(n?.width), i = K(n?.minWidth), a = K(n?.maxWidth);
1201
1216
  return n?.width?.unit === f.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
1202
1217
  }
1203
- function Ln(e) {
1218
+ function Vn(e) {
1204
1219
  if (e) return {
1205
1220
  gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
1206
1221
  gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
@@ -1215,36 +1230,36 @@ function K(e) {
1215
1230
  case f.Auto: return "auto";
1216
1231
  }
1217
1232
  }
1218
- function Rn(e, t, n, r) {
1233
+ function Hn(e, t, n, r) {
1219
1234
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
1220
- if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? nn(a, r, i?.label ?? n) : void 0;
1235
+ if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? an(a, r, i?.label ?? n) : void 0;
1221
1236
  }
1222
- function zn(e, t) {
1237
+ function Un(e, t) {
1223
1238
  let n = new Map(t.map((e) => [e.name, e]));
1224
1239
  return e.flatMap((e) => {
1225
1240
  let t = n.get(e.sourceProperty ?? e.name);
1226
1241
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
1227
1242
  });
1228
1243
  }
1229
- function Bn(e, t) {
1244
+ function Wn(e, t) {
1230
1245
  if (!e) return [];
1231
- let n = Pn(e, t).filter((e) => e.width?.unit === f.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === f.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
1246
+ let n = Rn(e, t).filter((e) => e.width?.unit === f.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === f.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
1232
1247
  return [...n, ...r];
1233
1248
  }
1234
- function Vn(e) {
1235
- return Xt(q(e, "schema"));
1249
+ function Gn(e) {
1250
+ return Qt(q(e, "schema"));
1236
1251
  }
1237
1252
  function q(e, t, n = "") {
1238
1253
  let r = e.properties[t];
1239
1254
  return typeof r == "string" ? r : n;
1240
1255
  }
1241
- function Hn(e) {
1256
+ function Kn(e) {
1242
1257
  return J(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1243
1258
  }
1244
- function Un(e) {
1259
+ function qn(e) {
1245
1260
  return J(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1246
1261
  }
1247
- function Wn(e) {
1262
+ function Jn(e) {
1248
1263
  return J(e) && Object.values(f).includes(e.unit);
1249
1264
  }
1250
1265
  function J(e) {
@@ -1252,20 +1267,20 @@ function J(e) {
1252
1267
  }
1253
1268
  //#endregion
1254
1269
  //#region src/StageGuardedAction.tsx
1255
- function Gn(e) {
1270
+ function Yn(e) {
1256
1271
  return typeof e == "object" && !!e && !Array.isArray(e);
1257
1272
  }
1258
1273
  function Y(e, t) {
1259
1274
  let n = e.properties[t];
1260
1275
  return typeof n == "string" ? n : "";
1261
1276
  }
1262
- function Kn(e) {
1277
+ function Xn(e) {
1263
1278
  return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
1264
1279
  }
1265
- function qn(e) {
1266
- let t = z(), n = Y(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? Y(e, "itemRoute"), i = Gn(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1280
+ function Zn(e) {
1281
+ let t = z(), n = Y(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? Y(e, "itemRoute"), i = Yn(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1267
1282
  for (let [e, n] of Object.entries(i)) {
1268
- let r = Gn(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1283
+ let r = Yn(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1269
1284
  a[e] = r, (r == null || r === "") && (o = !1);
1270
1285
  }
1271
1286
  let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = B({
@@ -1284,23 +1299,23 @@ function qn(e) {
1284
1299
  item: l.rows.length === 1 ? l.rows[0] : void 0
1285
1300
  };
1286
1301
  }
1287
- function Jn(e, t) {
1288
- return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, yt(ct(n) ?? "", t)]));
1302
+ function Qn(e, t) {
1303
+ return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, xt(ut(n) ?? "", t)]));
1289
1304
  }
1290
- function Yn({ element: e, interactions: t }) {
1291
- let n = z(), r = qn(e), i = Kt(), [a, s] = c([]), [l, u] = c(!1), d = Y(e, "label"), f = o(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = Gn(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1292
- if (!gt(m) || !h || !r.hasSource) {
1293
- let n = r.hasSource ? `${lt}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${lt}: “${d}” has no data subject to evaluate its guard against.`;
1294
- return /* @__PURE__ */ F("div", {
1305
+ function $n({ element: e, interactions: t }) {
1306
+ let n = z(), r = Zn(e), i = Jt(), [a, s] = c([]), [l, u] = c(!1), d = Y(e, "label"), f = o(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = Yn(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1307
+ if (!vt(m) || !h || !r.hasSource) {
1308
+ let n = r.hasSource ? `${dt}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${dt}: “${d}” has no data subject to evaluate its guard against.`;
1309
+ return /* @__PURE__ */ I("div", {
1295
1310
  className: "stage-guarded-action",
1296
1311
  "data-scene-id": e.id,
1297
- children: [/* @__PURE__ */ P(I, {
1312
+ children: [/* @__PURE__ */ F(je, {
1298
1313
  type: "button",
1299
1314
  disabled: !0,
1300
1315
  title: n,
1301
1316
  ...t,
1302
1317
  children: d
1303
- }), /* @__PURE__ */ P("p", {
1318
+ }), /* @__PURE__ */ F("p", {
1304
1319
  role: "alert",
1305
1320
  className: "stage-form-error",
1306
1321
  children: n
@@ -1308,41 +1323,41 @@ function Yn({ element: e, interactions: t }) {
1308
1323
  });
1309
1324
  }
1310
1325
  if (!r.item) return null;
1311
- let g = _t(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1326
+ let g = yt(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1312
1327
  if (!_?.command) return null;
1313
1328
  let v = _.command, y = U(v), b = r.item, x = async () => {
1314
1329
  if (!y) return;
1315
1330
  u(!0);
1316
- let t = await i(v, Jn(_, b));
1331
+ let t = await i(v, Qn(_, b));
1317
1332
  if (u(!1), s(t.messages), !t.isSuccess) return;
1318
1333
  n.refreshAfterCommand();
1319
- let r = Y(e, "navigateToScreen"), a = Y(e, "navigateByParameter"), o = a ? yt(`item.${a}`, b) : void 0;
1334
+ let r = Y(e, "navigateToScreen"), a = Y(e, "navigateByParameter"), o = a ? xt(`item.${a}`, b) : void 0;
1320
1335
  r && W(r, a && o != null ? { [a]: String(o) } : {});
1321
1336
  };
1322
- return /* @__PURE__ */ F("div", {
1337
+ return /* @__PURE__ */ I("div", {
1323
1338
  className: "stage-guarded-action",
1324
1339
  "data-scene-id": e.id,
1325
1340
  "data-command": v,
1326
- children: [/* @__PURE__ */ P(I, {
1341
+ children: [/* @__PURE__ */ F(je, {
1327
1342
  ...t,
1328
1343
  type: "button",
1329
1344
  disabled: !y || l,
1330
1345
  title: y ? void 0 : "This command is not exposed as an API yet",
1331
1346
  onClick: () => void x(),
1332
1347
  children: d
1333
- }), a.map((e) => /* @__PURE__ */ P("p", {
1348
+ }), a.map((e) => /* @__PURE__ */ F("p", {
1334
1349
  role: "alert",
1335
1350
  className: "stage-form-error",
1336
1351
  children: e
1337
1352
  }, e))]
1338
1353
  });
1339
1354
  }
1340
- function Xn(e) {
1355
+ function er(e) {
1341
1356
  let t = ae(), r = s(void 0), a = o(() => v(re(e.id, e.behaviors), p.DoubleClick), [e.behaviors, e.id]);
1342
1357
  i(() => () => clearTimeout(r.current), []);
1343
1358
  let c = n((e) => {
1344
1359
  if (clearTimeout(r.current), r.current = void 0, !t) return;
1345
- let n = (n) => n.path === "$guard" ? vt(n.value, e) : n.path?.startsWith("item.") ? yt(n.path, e) : t.context.resolve(n);
1360
+ let n = (n) => n.path === "$guard" ? bt(n.value, e) : n.path?.startsWith("item.") ? xt(n.path, e) : t.context.resolve(n);
1346
1361
  b(a, t.dispatcher, {
1347
1362
  ...t.context,
1348
1363
  resolve: n
@@ -1365,7 +1380,7 @@ function Xn(e) {
1365
1380
  }
1366
1381
  //#endregion
1367
1382
  //#region src/stageComponents.tsx
1368
- var Zn = "Stage:commandForm";
1383
+ var tr = "Stage:commandForm";
1369
1384
  function X(e, t, n = {}) {
1370
1385
  return {
1371
1386
  id: e,
@@ -1378,15 +1393,15 @@ function Z(e, t, n = "") {
1378
1393
  let r = e.properties[t];
1379
1394
  return typeof r == "string" ? r : n;
1380
1395
  }
1381
- function Qn(e, t) {
1396
+ function nr(e, t) {
1382
1397
  let n = e.properties.queryArguments;
1383
- if (!nr(n)) return {
1398
+ if (!or(n)) return {
1384
1399
  values: {},
1385
1400
  ready: !0
1386
1401
  };
1387
1402
  let r = {}, i = !0;
1388
1403
  for (let [e, a] of Object.entries(n)) {
1389
- let n = tr(a) ? t.resolveBinding(a) : a;
1404
+ let n = ar(a) ? t.resolveBinding(a) : a;
1390
1405
  r[e] = n, (n == null || n === "") && (i = !1);
1391
1406
  }
1392
1407
  return {
@@ -1394,7 +1409,7 @@ function Qn(e, t) {
1394
1409
  ready: i
1395
1410
  };
1396
1411
  }
1397
- function $n(e, t) {
1412
+ function rr(e, t) {
1398
1413
  let n = (e.slots.columns ?? []).map((e) => {
1399
1414
  let t = e.properties;
1400
1415
  return {
@@ -1410,14 +1425,14 @@ function $n(e, t) {
1410
1425
  function Q(e, t) {
1411
1426
  return e[t] ?? e.id ?? e.key;
1412
1427
  }
1413
- function er({ element: e, slots: t }) {
1414
- let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => Qn(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
1428
+ function ir({ element: e, slots: t }) {
1429
+ let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => nr(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
1415
1430
  scope: e.id,
1416
1431
  name: r,
1417
1432
  route: a || void 0,
1418
1433
  arguments: s.values,
1419
1434
  ready: s.ready
1420
- }), d = $n(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = Xn(e);
1435
+ }), d = rr(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = er(e);
1421
1436
  i(() => {
1422
1437
  if (!h) return;
1423
1438
  let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
@@ -1463,10 +1478,10 @@ function er({ element: e, slots: t }) {
1463
1478
  }
1464
1479
  n.selectRow(e.id, t);
1465
1480
  };
1466
- return !Z(e, "query") && !a && !rt(r) ? /* @__PURE__ */ F("section", {
1481
+ return !Z(e, "query") && !a && !at(r) ? /* @__PURE__ */ I("section", {
1467
1482
  className: "stage-table",
1468
1483
  "data-scene-id": e.id,
1469
- children: [/* @__PURE__ */ F("p", {
1484
+ children: [/* @__PURE__ */ I("p", {
1470
1485
  className: "stage-note",
1471
1486
  children: [
1472
1487
  "No query is exposed for ",
@@ -1474,25 +1489,25 @@ function er({ element: e, slots: t }) {
1474
1489
  " yet."
1475
1490
  ]
1476
1491
  }), t.columns]
1477
- }) : /* @__PURE__ */ F("section", {
1492
+ }) : /* @__PURE__ */ I("section", {
1478
1493
  className: "stage-table",
1479
1494
  "data-scene-id": e.id,
1480
1495
  children: [
1481
- u && /* @__PURE__ */ P(Ne, {
1496
+ u && /* @__PURE__ */ F(Ne, {
1482
1497
  element: X(`${e.id}-loading`, {
1483
1498
  severity: "info",
1484
1499
  text: "Loading…"
1485
1500
  }),
1486
1501
  slots: {}
1487
1502
  }),
1488
- l && /* @__PURE__ */ P(Ne, {
1503
+ l && /* @__PURE__ */ F(Ne, {
1489
1504
  element: X(`${e.id}-error`, {
1490
1505
  severity: "error",
1491
1506
  text: l
1492
1507
  }),
1493
1508
  slots: {}
1494
1509
  }),
1495
- h && /* @__PURE__ */ P(I, {
1510
+ h && /* @__PURE__ */ F(je, {
1496
1511
  type: "button",
1497
1512
  size: "small",
1498
1513
  onClick: () => {
@@ -1502,12 +1517,12 @@ function er({ element: e, slots: t }) {
1502
1517
  },
1503
1518
  children: "Clear selection"
1504
1519
  }),
1505
- /* @__PURE__ */ F("table", {
1520
+ /* @__PURE__ */ I("table", {
1506
1521
  "aria-label": Z(e, "label", Z(e, "typeName", "Results")),
1507
- children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ P("tr", { children: d.map((e) => /* @__PURE__ */ P("th", {
1522
+ children: [/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ F("tr", { children: d.map((e) => /* @__PURE__ */ F("th", {
1508
1523
  scope: "col",
1509
1524
  children: e.label
1510
- }, e.property)) }) }), /* @__PURE__ */ F("tbody", { children: [c.map((e, t) => /* @__PURE__ */ P("tr", {
1525
+ }, e.property)) }) }), /* @__PURE__ */ I("tbody", { children: [c.map((e, t) => /* @__PURE__ */ F("tr", {
1511
1526
  "aria-selected": h === e,
1512
1527
  tabIndex: 0,
1513
1528
  onClick: () => _.click(e, () => v(e)),
@@ -1515,8 +1530,8 @@ function er({ element: e, slots: t }) {
1515
1530
  onKeyDown: (t) => {
1516
1531
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
1517
1532
  },
1518
- children: d.map((t) => /* @__PURE__ */ P("td", { children: String(e[t.property] ?? "") }, t.property))
1519
- }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
1533
+ children: d.map((t) => /* @__PURE__ */ F("td", { children: String(e[t.property] ?? "") }, t.property))
1534
+ }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ F("tr", { children: /* @__PURE__ */ F("td", {
1520
1535
  colSpan: Math.max(d.length, 1),
1521
1536
  children: "No records found"
1522
1537
  }) })] })]
@@ -1524,28 +1539,28 @@ function er({ element: e, slots: t }) {
1524
1539
  ]
1525
1540
  });
1526
1541
  }
1527
- function tr(e) {
1528
- return nr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1542
+ function ar(e) {
1543
+ return or(e) && (typeof e.path == "string" || typeof e.kind == "string");
1529
1544
  }
1530
- function nr(e) {
1545
+ function or(e) {
1531
1546
  return typeof e == "object" && !!e && !Array.isArray(e);
1532
1547
  }
1533
- function rr({ element: e, interactions: t, slots: n }) {
1534
- return Kn(e) ? /* @__PURE__ */ P(Yn, {
1548
+ function sr({ element: e, interactions: t, slots: n }) {
1549
+ return Xn(e) ? /* @__PURE__ */ F($n, {
1535
1550
  element: e,
1536
1551
  interactions: t
1537
- }) : /* @__PURE__ */ P(ir, {
1552
+ }) : /* @__PURE__ */ F(cr, {
1538
1553
  element: e,
1539
1554
  interactions: t,
1540
1555
  slots: n
1541
1556
  });
1542
1557
  }
1543
- function ir({ element: e, interactions: t }) {
1558
+ function cr({ element: e, interactions: t }) {
1544
1559
  let n = Z(e, "label", Z(e, "command"));
1545
- return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ P(ar, {
1560
+ return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ F(lr, {
1546
1561
  element: e,
1547
1562
  label: n
1548
- }) : /* @__PURE__ */ P(I, {
1563
+ }) : /* @__PURE__ */ F(je, {
1549
1564
  type: "button",
1550
1565
  "data-scene-id": e.id,
1551
1566
  disabled: !0,
@@ -1554,15 +1569,15 @@ function ir({ element: e, interactions: t }) {
1554
1569
  children: n
1555
1570
  });
1556
1571
  }
1557
- function ar({ element: e, label: t }) {
1558
- let [r, i] = c(0), a = n(() => i((e) => e + 1), []), o = /* @__PURE__ */ P(hn.Provider, {
1572
+ function lr({ element: e, label: t }) {
1573
+ let [r, i] = c(0), a = n(() => i((e) => e + 1), []), o = /* @__PURE__ */ F(_n.Provider, {
1559
1574
  value: a,
1560
- children: /* @__PURE__ */ P(gn, { element: e })
1575
+ children: /* @__PURE__ */ F(vn, { element: e })
1561
1576
  });
1562
- return /* @__PURE__ */ P("div", {
1577
+ return /* @__PURE__ */ F("div", {
1563
1578
  className: "stage-action",
1564
1579
  "data-scene-id": e.id,
1565
- children: /* @__PURE__ */ P(Me, {
1580
+ children: /* @__PURE__ */ F(Me, {
1566
1581
  element: X(e.id, {
1567
1582
  visible: !1,
1568
1583
  header: t,
@@ -1572,13 +1587,13 @@ function ar({ element: e, label: t }) {
1572
1587
  }, r)
1573
1588
  });
1574
1589
  }
1575
- function or(e) {
1576
- let t = e.element ?? X("slice-dialog", {}), r = oe(), { routes: i, parameters: a } = z(), s = k(r?.currentDialogParameters), c = Z(t, "command") || s?.command || Z(t, "slice") || "", l = Z(t, "title") || s?.title || c, u = i?.commandSchemas?.[c], d = o(() => Xt(u ?? ""), [u]), f = n(() => r?.closeDialog(), [r]);
1577
- if (!u || !d.some((e) => e.options || e.members || e.item)) return e.element ? /* @__PURE__ */ P(S, {
1590
+ function ur(e) {
1591
+ let t = e.element ?? X("slice-dialog", {}), r = oe(), { routes: i, parameters: a } = z(), s = k(r?.currentDialogParameters), c = Z(t, "command") || s?.command || Z(t, "slice") || "", l = Z(t, "title") || s?.title || c, u = i?.commandSchemas?.[c], d = o(() => Qt(u ?? ""), [u]), f = n(() => r?.closeDialog(), [r]);
1592
+ if (!u || !d.some((e) => e.options || e.members || e.item)) return e.element ? /* @__PURE__ */ F(S, {
1578
1593
  element: e.element,
1579
1594
  slots: e.slots ?? {}
1580
- }) : /* @__PURE__ */ P(ne, {});
1581
- let p = d.filter((e) => !wn(e, a)), m = X(`slice-dialog-${c}`, {
1595
+ }) : /* @__PURE__ */ F(ne, {});
1596
+ let p = d.filter((e) => !On(e, a)), m = X(`slice-dialog-${c}`, {
1582
1597
  command: c,
1583
1598
  label: l,
1584
1599
  schema: u,
@@ -1588,25 +1603,25 @@ function or(e) {
1588
1603
  })),
1589
1604
  generationMode: "manual"
1590
1605
  });
1591
- return /* @__PURE__ */ F("section", {
1606
+ return /* @__PURE__ */ I("section", {
1592
1607
  className: "scene-slice-dialog",
1593
1608
  "data-scene-slice-dialog": Z(t, "slice") || s?.slice,
1594
1609
  "data-scene-command": c,
1595
1610
  children: [
1596
- /* @__PURE__ */ P("header", {
1611
+ /* @__PURE__ */ F("header", {
1597
1612
  className: "scene-slice-dialog-header",
1598
- children: /* @__PURE__ */ P("h2", {
1613
+ children: /* @__PURE__ */ F("h2", {
1599
1614
  className: "scene-slice-dialog-title",
1600
1615
  children: l
1601
1616
  })
1602
1617
  }),
1603
- /* @__PURE__ */ P(hn.Provider, {
1618
+ /* @__PURE__ */ F(_n.Provider, {
1604
1619
  value: f,
1605
- children: /* @__PURE__ */ P(gn, { element: m })
1620
+ children: /* @__PURE__ */ F(vn, { element: m })
1606
1621
  }),
1607
- /* @__PURE__ */ P("footer", {
1622
+ /* @__PURE__ */ F("footer", {
1608
1623
  className: "scene-slice-dialog-footer",
1609
- children: /* @__PURE__ */ P("button", {
1624
+ children: /* @__PURE__ */ F("button", {
1610
1625
  type: "button",
1611
1626
  className: "scene-slice-dialog-cancel",
1612
1627
  onClick: f,
@@ -1616,9 +1631,9 @@ function or(e) {
1616
1631
  ]
1617
1632
  });
1618
1633
  }
1619
- function sr(e) {
1634
+ function dr(e) {
1620
1635
  let { element: t } = e;
1621
- if (Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "") return /* @__PURE__ */ P(C, { ...e });
1636
+ if (Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "") return /* @__PURE__ */ F(C, { ...e });
1622
1637
  let n = Z(t, "name", t.id), r = {
1623
1638
  ...t,
1624
1639
  componentName: "core:action",
@@ -1627,28 +1642,28 @@ function sr(e) {
1627
1642
  label: Z(t, "label", n)
1628
1643
  }
1629
1644
  };
1630
- return /* @__PURE__ */ P("span", {
1645
+ return /* @__PURE__ */ F("span", {
1631
1646
  className: "stage-toolbar-action",
1632
1647
  "data-scene-toolbar-item": n,
1633
- children: /* @__PURE__ */ P(rr, {
1648
+ children: /* @__PURE__ */ F(sr, {
1634
1649
  element: r,
1635
1650
  interactions: e.interactions,
1636
1651
  slots: e.slots
1637
1652
  })
1638
1653
  });
1639
1654
  }
1640
- var cr = {
1655
+ var fr = {
1641
1656
  ...D,
1642
- "core:table": er,
1643
- "core:action": rr,
1644
- "core:toolbarItem": sr,
1645
- "core:sliceDialog": or,
1646
- [Zn]: gn
1657
+ "core:table": ir,
1658
+ "core:action": sr,
1659
+ "core:toolbarItem": dr,
1660
+ "core:sliceDialog": ur,
1661
+ [tr]: vn
1647
1662
  };
1648
1663
  //#endregion
1649
1664
  //#region src/useStrings.ts
1650
- function lr() {
1651
- let e = Xe(), [t, n] = c([]), [r, a] = c(""), [o, s] = c({});
1665
+ function pr() {
1666
+ let e = Qe(), [t, n] = c([]), [r, a] = c(""), [o, s] = c({});
1652
1667
  return i(() => {
1653
1668
  let t = new AbortController();
1654
1669
  return e.locales(t.signal).then((e) => {
@@ -1665,11 +1680,11 @@ function lr() {
1665
1680
  dictionary: o
1666
1681
  };
1667
1682
  }
1668
- var ur = /* @__PURE__ */ new Set(["core:table"]);
1669
- function dr(e) {
1670
- return fr(e, /* @__PURE__ */ new Map(), void 0);
1683
+ var mr = /* @__PURE__ */ new Set(["core:table"]);
1684
+ function hr(e) {
1685
+ return gr(e, /* @__PURE__ */ new Map(), void 0);
1671
1686
  }
1672
- function fr(e, t, n) {
1687
+ function gr(e, t, n) {
1673
1688
  let r = e;
1674
1689
  if (!r.slots) return e;
1675
1690
  let i = !1, a = {};
@@ -1678,7 +1693,7 @@ function fr(e, t, n) {
1678
1693
  a[e] = o.map((e) => {
1679
1694
  let t = e, n = $(t, "typeName");
1680
1695
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1681
- let a = fr(mr(pr(t, r), s), r, s);
1696
+ let a = gr(vr(_r(t, r), s), r, s);
1682
1697
  return a !== e && (i = !0), a;
1683
1698
  });
1684
1699
  }
@@ -1687,8 +1702,8 @@ function fr(e, t, n) {
1687
1702
  slots: a
1688
1703
  } : e;
1689
1704
  }
1690
- function pr(e, t) {
1691
- if (!ur.has(e.componentName)) return e;
1705
+ function _r(e, t) {
1706
+ if (!mr.has(e.componentName)) return e;
1692
1707
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1693
1708
  if (!r || e.properties.queryArguments !== void 0) return e;
1694
1709
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -1697,7 +1712,7 @@ function pr(e, t) {
1697
1712
  properties: a
1698
1713
  };
1699
1714
  }
1700
- function mr(e, t) {
1715
+ function vr(e, t) {
1701
1716
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
1702
1717
  let n = { ...e.properties };
1703
1718
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -1716,7 +1731,7 @@ function $(e, t) {
1716
1731
  }
1717
1732
  //#endregion
1718
1733
  //#region src/stageQueryBindings.tsx
1719
- function hr(e) {
1734
+ function yr(e) {
1720
1735
  let t = /* @__PURE__ */ new Set(), n = (e) => {
1721
1736
  if (Array.isArray(e)) {
1722
1737
  e.forEach(n);
@@ -1736,7 +1751,7 @@ function hr(e) {
1736
1751
  };
1737
1752
  return r(e), [...t];
1738
1753
  }
1739
- function gr(e) {
1754
+ function br(e) {
1740
1755
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
1741
1756
  let n = e.properties?.[t];
1742
1757
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -1755,7 +1770,7 @@ function gr(e) {
1755
1770
  };
1756
1771
  return r(e), [...t.values()];
1757
1772
  }
1758
- function _r({ source: e }) {
1773
+ function xr({ source: e }) {
1759
1774
  let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = e.by ? r[e.by] || i[e.by] : void 0, s = o(() => e.by ? a ? { [e.by]: a } : {} : {
1760
1775
  ...i,
1761
1776
  ...r
@@ -1775,7 +1790,7 @@ function _r({ source: e }) {
1775
1790
  list: !0
1776
1791
  }), null;
1777
1792
  }
1778
- function vr({ name: e }) {
1793
+ function Sr({ name: e }) {
1779
1794
  let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = o(() => ({
1780
1795
  ...i,
1781
1796
  ...r
@@ -1789,11 +1804,11 @@ function vr({ name: e }) {
1789
1804
  list: !0
1790
1805
  }), null;
1791
1806
  }
1792
- function yr({ element: e }) {
1793
- let t = o(() => hr(e), [e]), n = o(() => gr(e), [e]);
1794
- return /* @__PURE__ */ F(je, { children: [t.map((e) => /* @__PURE__ */ P(vr, { name: e }, e)), n.map((e) => /* @__PURE__ */ P(_r, { source: e }, e.typeName))] });
1807
+ function Cr({ element: e }) {
1808
+ let t = o(() => yr(e), [e]), n = o(() => br(e), [e]);
1809
+ return /* @__PURE__ */ I(Ae, { children: [t.map((e) => /* @__PURE__ */ F(Sr, { name: e }, e)), n.map((e) => /* @__PURE__ */ F(xr, { source: e }, e.typeName))] });
1795
1810
  }
1796
- function br(e) {
1811
+ function wr(e) {
1797
1812
  let t = /* @__PURE__ */ new Set(), n = [];
1798
1813
  for (let r of e) for (let e of r.contributions ?? []) {
1799
1814
  if (e.contributionPointName !== "Navigation") continue;
@@ -1806,7 +1821,7 @@ function br(e) {
1806
1821
  ]);
1807
1822
  if (t.has(s)) continue;
1808
1823
  t.add(s);
1809
- let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = Cr(r.destination) ? r.destination : void 0;
1824
+ let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = Dr(r.destination) ? r.destination : void 0;
1810
1825
  n.push({
1811
1826
  label: i,
1812
1827
  targetScreen: a,
@@ -1814,7 +1829,7 @@ function br(e) {
1814
1829
  order: c,
1815
1830
  ...typeof r.icon == "string" ? { icon: r.icon } : {},
1816
1831
  ...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
1817
- ...l && wr(l) ? { destination: l } : {}
1832
+ ...l && Or(l) ? { destination: l } : {}
1818
1833
  });
1819
1834
  }
1820
1835
  return n.map((e, t) => ({
@@ -1822,7 +1837,7 @@ function br(e) {
1822
1837
  index: t
1823
1838
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
1824
1839
  }
1825
- function xr(e) {
1840
+ function Tr(e) {
1826
1841
  let t = {
1827
1842
  label: "",
1828
1843
  children: []
@@ -1847,21 +1862,21 @@ function xr(e) {
1847
1862
  }
1848
1863
  return t.children;
1849
1864
  }
1850
- function Sr(e, t) {
1865
+ function Er(e, t) {
1851
1866
  for (let n of e) {
1852
1867
  if (n.screen === t) return [n.label];
1853
- let e = Sr(n.children, t);
1868
+ let e = Er(n.children, t);
1854
1869
  if (e.length > 0) return [n.label, ...e];
1855
1870
  }
1856
1871
  return [];
1857
1872
  }
1858
- function Cr(e) {
1873
+ function Dr(e) {
1859
1874
  return typeof e == "object" && !!e && !Array.isArray(e);
1860
1875
  }
1861
- function wr(e) {
1876
+ function Or(e) {
1862
1877
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
1863
1878
  }
1864
- function Tr(e, t, n) {
1879
+ function kr(e, t, n) {
1865
1880
  return e.filter((e) => !t.has(e.name)).map((e) => ({
1866
1881
  label: e.name,
1867
1882
  targetScreen: e.name,
@@ -1870,77 +1885,77 @@ function Tr(e, t, n) {
1870
1885
  }
1871
1886
  //#endregion
1872
1887
  //#region src/blueprint.ts
1873
- var Er = "Stage:locale";
1874
- function Dr(e) {
1875
- let t = Ce(e), n = t.packages.filter((e) => e !== "PrimeReact");
1876
- return n.splice(Math.max(n.indexOf(he), 0), 0, "PrimeReact"), {
1888
+ var Ar = "Stage:locale";
1889
+ function jr(e) {
1890
+ let t = Se(e), n = t.packages.filter((e) => e !== "PrimeReact");
1891
+ return n.splice(Math.max(n.indexOf(me), 0), 0, "PrimeReact"), {
1877
1892
  ...t,
1878
1893
  name: e?.length ? t.name : "Stage",
1879
1894
  packages: n
1880
1895
  };
1881
1896
  }
1882
- var Or = {
1883
- ...fe,
1897
+ var Mr = {
1898
+ ...de,
1884
1899
  PrimeReact: Fe.components
1885
1900
  };
1886
- function kr(e) {
1901
+ function Nr(e) {
1887
1902
  return {
1888
1903
  ...D,
1889
1904
  ...Pe,
1890
- ...me,
1891
- ...Se,
1905
+ ...pe,
1906
+ ...xe,
1892
1907
  ...e
1893
1908
  };
1894
1909
  }
1895
- function Ar(e) {
1910
+ function Pr(e) {
1896
1911
  return e ? {
1897
1912
  ...e,
1898
- ...Or
1899
- } : Or;
1913
+ ...Mr
1914
+ } : Mr;
1900
1915
  }
1901
- var jr = "Stage:navigationTree";
1902
- function Mr(e, t, n) {
1903
- return N(e, j.Logo, {
1916
+ var Fr = "Stage:navigationTree";
1917
+ function Ir(e, t, n) {
1918
+ return P(e, M.Logo, {
1904
1919
  label: t,
1905
1920
  initials: t.slice(0, 1).toUpperCase() || "S",
1906
1921
  targetScreen: "",
1907
1922
  ...n ? { lightImageUrl: n } : {}
1908
1923
  });
1909
1924
  }
1910
- function Nr(e, t, n, r, i, a = !1, o = !0) {
1911
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = br(e), u = Tr(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = xr([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => xe({
1925
+ function Lr(e, t, n, r, i, a = !1, o = !0) {
1926
+ let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = wr(e), u = kr(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = Tr([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => be({
1912
1927
  label: e.name,
1913
1928
  targetScreen: e.name,
1914
1929
  icon: "pi pi-table",
1915
1930
  group: "Screens",
1916
1931
  order: n
1917
- }, t)), p = Sr(xr(l), t), m = e.find((e) => e.name === t)?.path?.length ? Sr(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", jr, {
1932
+ }, t)), p = Er(Tr(l), t), m = e.find((e) => e.name === t)?.path?.length ? Er(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? P("menu-hierarchy", Fr, {
1918
1933
  nodes: d,
1919
1934
  activeScreen: t
1920
- }) : N("menu-screens", j.Menu, {
1935
+ }) : P("menu-screens", M.Menu, {
1921
1936
  title: "Screens",
1922
1937
  label: "Screens"
1923
1938
  }, { items: f }), _ = [];
1924
- n.length > 1 && _.push(N("topbar-locale", Er, {
1939
+ n.length > 1 && _.push(P("topbar-locale", Ar, {
1925
1940
  locales: n,
1926
1941
  locale: r
1927
- })), _.push(N("topbar-theme", j.ThemeSwitcher, { label: "Theme" }));
1942
+ })), _.push(P("topbar-theme", M.ThemeSwitcher, { label: "Theme" }));
1928
1943
  let v = { regionNavigation: a };
1929
1944
  return {
1930
- [M.Topbar]: [N("topbar", j.Topbar, v, {
1931
- logo: [Mr("topbar-logo", c, i?.image)],
1945
+ [N.Topbar]: [P("topbar", M.Topbar, v, {
1946
+ logo: [Ir("topbar-logo", c, i?.image)],
1932
1947
  end: _
1933
1948
  })],
1934
- [M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [Mr("sidebar-logo", c, i?.image)] })],
1935
- ...a ? {} : { [M.Menu]: [g] },
1936
- [M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
1949
+ [N.Sidebar]: [P("sidebar", M.Sidebar, v, { logo: [Ir("sidebar-logo", c, i?.image)] })],
1950
+ ...a ? {} : { [N.Menu]: [g] },
1951
+ [N.Breadcrumb]: [P("breadcrumb", M.Breadcrumb, {
1937
1952
  homeTargetScreen: s,
1938
1953
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
1939
1954
  })],
1940
- ...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
1941
- [M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
1955
+ ...o ? { [N.Footer]: [P("footer", M.Footer, { text: `${c} · rendered from your model` })] } : {},
1956
+ [N.ConfigPanel]: [P(M.ConfigPanel, M.ConfigPanel, {
1942
1957
  title: "Settings",
1943
- themes: ge.map((e) => ({
1958
+ themes: he.map((e) => ({
1944
1959
  name: e.name,
1945
1960
  label: e.name,
1946
1961
  isDark: e.isDark ?? !1
@@ -1948,65 +1963,65 @@ function Nr(e, t, n, r, i, a = !1, o = !0) {
1948
1963
  })]
1949
1964
  };
1950
1965
  }
1951
- function Pr(e) {
1966
+ function Rr(e) {
1952
1967
  return `#/${encodeURIComponent(e)}`;
1953
1968
  }
1954
1969
  //#endregion
1955
1970
  //#region src/StageChrome.tsx
1956
- var Fr = e({
1971
+ var zr = e({
1957
1972
  locales: [],
1958
1973
  locale: "",
1959
1974
  setLocale: () => void 0,
1960
1975
  activity: ""
1961
1976
  });
1962
- function Ir({ state: e, children: t }) {
1963
- return /* @__PURE__ */ P(Fr.Provider, {
1977
+ function Br({ state: e, children: t }) {
1978
+ return /* @__PURE__ */ F(zr.Provider, {
1964
1979
  value: e,
1965
1980
  children: t
1966
1981
  });
1967
1982
  }
1968
- var Lr = "Stage:activity";
1969
- function Rr() {
1970
- let { locales: e, locale: t, setLocale: n } = r(Fr);
1971
- return e.length < 2 ? null : /* @__PURE__ */ P("select", {
1983
+ var Vr = "Stage:activity";
1984
+ function Hr() {
1985
+ let { locales: e, locale: t, setLocale: n } = r(zr);
1986
+ return e.length < 2 ? null : /* @__PURE__ */ F("select", {
1972
1987
  className: "stage-locale",
1973
1988
  "aria-label": "Locale",
1974
1989
  value: t,
1975
1990
  onChange: (e) => n(e.target.value),
1976
- children: e.map((e) => /* @__PURE__ */ P("option", {
1991
+ children: e.map((e) => /* @__PURE__ */ F("option", {
1977
1992
  value: e,
1978
1993
  children: e
1979
1994
  }, e))
1980
1995
  });
1981
1996
  }
1982
- function zr({ element: e }) {
1997
+ function Ur({ element: e }) {
1983
1998
  let t = e.properties ?? {};
1984
- return /* @__PURE__ */ P("nav", {
1999
+ return /* @__PURE__ */ F("nav", {
1985
2000
  className: "stage-navigation-tree",
1986
2001
  "aria-label": "Navigation",
1987
2002
  "data-scene-id": e.id,
1988
- children: /* @__PURE__ */ P(Br, {
2003
+ children: /* @__PURE__ */ F(Wr, {
1989
2004
  nodes: t.nodes ?? [],
1990
2005
  activeScreen: t.activeScreen
1991
2006
  })
1992
2007
  });
1993
2008
  }
1994
- function Br({ nodes: e, activeScreen: t }) {
1995
- return /* @__PURE__ */ P("ul", {
2009
+ function Wr({ nodes: e, activeScreen: t }) {
2010
+ return /* @__PURE__ */ F("ul", {
1996
2011
  role: "tree",
1997
- children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ F("li", {
2012
+ children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ I("li", {
1998
2013
  role: "treeitem",
1999
2014
  "aria-expanded": "true",
2000
- children: [/* @__PURE__ */ P("span", {
2015
+ children: [/* @__PURE__ */ F("span", {
2001
2016
  className: "stage-navigation-group",
2002
2017
  children: e.label
2003
- }), /* @__PURE__ */ P(Br, {
2018
+ }), /* @__PURE__ */ F(Wr, {
2004
2019
  nodes: e.children,
2005
2020
  activeScreen: t
2006
2021
  })]
2007
- }, e.label) : /* @__PURE__ */ P("li", {
2022
+ }, e.label) : /* @__PURE__ */ F("li", {
2008
2023
  role: "treeitem",
2009
- children: /* @__PURE__ */ P(Vr, {
2024
+ children: /* @__PURE__ */ F(Gr, {
2010
2025
  node: e,
2011
2026
  screen: e.screen,
2012
2027
  activeScreen: t
@@ -2014,55 +2029,55 @@ function Br({ nodes: e, activeScreen: t }) {
2014
2029
  }, `${e.screen}:${e.label}`))
2015
2030
  });
2016
2031
  }
2017
- function Vr({ node: e, screen: t, activeScreen: n }) {
2018
- let i = r(ee), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && wr(o) ? (e) => {
2032
+ function Gr({ node: e, screen: t, activeScreen: n }) {
2033
+ let i = r(ee), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && Or(o) ? (e) => {
2019
2034
  e.preventDefault(), i.navigate(o);
2020
2035
  } : void 0;
2021
- return /* @__PURE__ */ F("a", {
2022
- href: s ? o.route : Pr(t),
2036
+ return /* @__PURE__ */ I("a", {
2037
+ href: s ? o.route : Rr(t),
2023
2038
  rel: s ? "noreferrer" : void 0,
2024
2039
  "aria-current": t === n ? "page" : void 0,
2025
2040
  "aria-label": a === "icon" ? e.label : void 0,
2026
2041
  "data-presentation": e.presentation,
2027
2042
  "data-icon": e.icon,
2028
2043
  onClick: c,
2029
- children: [a !== "text" && e.icon && /* @__PURE__ */ P("span", {
2044
+ children: [a !== "text" && e.icon && /* @__PURE__ */ F("span", {
2030
2045
  className: "stage-navigation-icon",
2031
2046
  "aria-hidden": "true",
2032
2047
  "data-icon-name": e.icon
2033
2048
  }), a !== "icon" && e.label]
2034
2049
  });
2035
2050
  }
2036
- function Hr({ element: e }) {
2051
+ function Kr({ element: e }) {
2037
2052
  let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(ee), i = ce(), a = z(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
2038
- return /* @__PURE__ */ F("div", {
2053
+ return /* @__PURE__ */ I("div", {
2039
2054
  "data-scene-outlet": t,
2040
2055
  "data-scene-outlet-screen": o,
2041
- children: [c && o && /* @__PURE__ */ P("div", {
2056
+ children: [c && o && /* @__PURE__ */ F("div", {
2042
2057
  className: "scene-outlet-bar",
2043
- children: /* @__PURE__ */ P("button", {
2058
+ children: /* @__PURE__ */ F("button", {
2044
2059
  type: "button",
2045
2060
  className: "scene-outlet-close",
2046
2061
  "aria-label": "Close",
2047
2062
  onClick: () => n?.closeOutlet(t),
2048
2063
  children: "Close"
2049
2064
  })
2050
- }), s && i && /* @__PURE__ */ P(T, {
2065
+ }), s && i && /* @__PURE__ */ F(T, {
2051
2066
  element: s,
2052
2067
  registry: i.registry,
2053
2068
  resolveBinding: a.resolveBinding
2054
2069
  })]
2055
2070
  });
2056
2071
  }
2057
- function Ur() {
2058
- let { activity: e } = r(Fr);
2059
- return e ? /* @__PURE__ */ P("p", {
2072
+ function qr() {
2073
+ let { activity: e } = r(zr);
2074
+ return e ? /* @__PURE__ */ F("p", {
2060
2075
  className: "stage-activity",
2061
2076
  role: "status",
2062
2077
  children: e
2063
2078
  }) : null;
2064
2079
  }
2065
- function Wr() {
2080
+ function Jr() {
2066
2081
  let e = A(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2067
2082
  return i(() => {
2068
2083
  let r = e?.isDark ? "dark" : "light";
@@ -2073,44 +2088,44 @@ function Wr() {
2073
2088
  n
2074
2089
  ]), null;
2075
2090
  }
2076
- var Gr = {
2077
- [Er]: Rr,
2078
- [jr]: zr,
2079
- [Lr]: Ur,
2080
- "core:outlet": Hr
2081
- }, Kr = [
2091
+ var Yr = {
2092
+ [Ar]: Hr,
2093
+ [Fr]: Ur,
2094
+ [Vr]: qr,
2095
+ "core:outlet": Kr
2096
+ }, Xr = [
2082
2097
  "navigationMode",
2083
2098
  "menuTheme",
2084
2099
  "showFooter"
2085
- ], qr = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2086
- function Jr(e, t, n = !1) {
2100
+ ], Zr = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2101
+ function Qr(e, t, n = !1) {
2087
2102
  let r = [], i = t.options ?? {}, a = {
2088
2103
  showFooter: !0,
2089
2104
  followsSystem: !1,
2090
2105
  problems: r
2091
2106
  };
2092
2107
  for (let [e, n] of Object.entries(i)) {
2093
- if (!Kr.includes(e)) {
2094
- r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Kr.join(", ")}.`);
2108
+ if (!Xr.includes(e)) {
2109
+ r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Xr.join(", ")}.`);
2095
2110
  continue;
2096
2111
  }
2097
2112
  if (e === "navigationMode") {
2098
- let e = ye.find((e) => e === n);
2099
- e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${ye.join(", ")}.`);
2113
+ let e = ve.find((e) => e === n);
2114
+ e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${ve.join(", ")}.`);
2100
2115
  } else if (e === "menuTheme") {
2101
- let e = be.find((e) => e === n);
2102
- e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${be.join(", ")}.`);
2116
+ let e = ye.find((e) => e === n);
2117
+ e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${ye.join(", ")}.`);
2103
2118
  } else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
2104
2119
  }
2105
2120
  let o = e?.appearance;
2106
2121
  if (o?.colorScheme !== void 0) {
2107
2122
  a.followsSystem = o.colorScheme === l.System;
2108
2123
  let e = a.followsSystem ? n : o.colorScheme === l.Dark;
2109
- a.colorScheme = e ? ue.Dark : ue.Light, a.themeName = ge.find((t) => (t.isDark ?? !1) === e)?.name;
2124
+ a.colorScheme = e ? j.Dark : j.Light, a.themeName = he.find((t) => (t.isDark ?? !1) === e)?.name;
2110
2125
  }
2111
- return o?.accent !== void 0 && (qr.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2126
+ return o?.accent !== void 0 && (Zr.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2112
2127
  }
2113
- function Yr(e, t) {
2128
+ function $r(e, t) {
2114
2129
  if (e?.root === void 0) return [];
2115
2130
  let n = /* @__PURE__ */ new Set([
2116
2131
  m.RootTemplateUnknown,
@@ -2122,7 +2137,7 @@ function Yr(e, t) {
2122
2137
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
2123
2138
  return r.length === 0 && t.origin !== h.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
2124
2139
  }
2125
- function Xr(e) {
2140
+ function ei(e) {
2126
2141
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
2127
2142
  0,
2128
2143
  2,
@@ -2130,7 +2145,7 @@ function Xr(e) {
2130
2145
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
2131
2146
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
2132
2147
  }
2133
- function Zr(e, t) {
2148
+ function ti(e, t) {
2134
2149
  if (t === void 0) return e;
2135
2150
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
2136
2151
  0,
@@ -2142,20 +2157,20 @@ function Zr(e, t) {
2142
2157
  tokens: {
2143
2158
  ...e.tokens,
2144
2159
  "primary.color": t,
2145
- "primary.contrastColor": Xr(t),
2160
+ "primary.contrastColor": ei(t),
2146
2161
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
2147
2162
  }
2148
2163
  }));
2149
2164
  }
2150
2165
  //#endregion
2151
2166
  //#region src/StageShellSettings.tsx
2152
- var Qr = "(prefers-color-scheme: dark)";
2153
- function $r() {
2167
+ var ni = "(prefers-color-scheme: dark)";
2168
+ function ri() {
2154
2169
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
2155
2170
  }
2156
- function ei({ settings: e, onSystemSchemeChange: t }) {
2157
- let n = s(we());
2158
- n.current = we();
2171
+ function ii({ settings: e, onSystemSchemeChange: t }) {
2172
+ let n = s(Ce());
2173
+ n.current = Ce();
2159
2174
  let { mode: r, menuTheme: a, colorScheme: o, themeName: c } = e;
2160
2175
  return i(() => {
2161
2176
  let { setMode: e, setMenuTheme: t, setColorScheme: i, setThemeName: s } = n.current;
@@ -2167,16 +2182,16 @@ function ei({ settings: e, onSystemSchemeChange: t }) {
2167
2182
  c
2168
2183
  ]), i(() => {
2169
2184
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
2170
- let n = globalThis.matchMedia(Qr), r = (e) => t(e.matches);
2185
+ let n = globalThis.matchMedia(ni), r = (e) => t(e.matches);
2171
2186
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
2172
2187
  }, [e.followsSystem, t]), null;
2173
2188
  }
2174
2189
  //#endregion
2175
2190
  //#region src/stageNavigationModel.ts
2176
- function ti(e) {
2191
+ function ai(e) {
2177
2192
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
2178
2193
  }
2179
- function ni(e) {
2194
+ function oi(e) {
2180
2195
  let t = /* @__PURE__ */ new Map();
2181
2196
  for (let n of e) {
2182
2197
  let e = (n.path ?? []).join(".");
@@ -2189,35 +2204,35 @@ function ni(e) {
2189
2204
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
2190
2205
  };
2191
2206
  }
2192
- function ri(e) {
2207
+ function si(e) {
2193
2208
  return (t) => e.find((e) => e.name === t)?.path?.[0];
2194
2209
  }
2195
- function ii(e, t) {
2210
+ function ci(e, t) {
2196
2211
  return {
2197
2212
  structure: e.structure ?? { modules: [] },
2198
2213
  navigation: e.navigation ?? {
2199
2214
  application: { regions: [] },
2200
2215
  modules: []
2201
2216
  },
2202
- screenFor: ni(e.screens),
2203
- moduleOf: ri(e.screens),
2217
+ screenFor: oi(e.screens),
2218
+ moduleOf: si(e.screens),
2204
2219
  ...t ? { isVisible: t } : {}
2205
2220
  };
2206
2221
  }
2207
2222
  //#endregion
2208
2223
  //#region src/stageSlices.ts
2209
- function ai(e) {
2210
- return (t) => Xt(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2224
+ function li(e) {
2225
+ return (t) => Qt(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2211
2226
  name: e.name,
2212
2227
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
2213
- label: oi(e.name),
2228
+ label: ui(e.name),
2214
2229
  required: e.required
2215
2230
  }));
2216
2231
  }
2217
- function oi(e) {
2232
+ function ui(e) {
2218
2233
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
2219
2234
  }
2220
- function si(e, t, n) {
2235
+ function di(e, t, n) {
2221
2236
  return { invoke: async (r, i, a) => {
2222
2237
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
2223
2238
  if (!U(o)) return {
@@ -2238,7 +2253,7 @@ function si(e, t, n) {
2238
2253
  }
2239
2254
  //#endregion
2240
2255
  //#region src/withoutSeededSlots.ts
2241
- function ci(e, t) {
2256
+ function fi(e, t) {
2242
2257
  let n = /* @__PURE__ */ new Map();
2243
2258
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
2244
2259
  return e.map((e) => {
@@ -2256,15 +2271,15 @@ function ci(e, t) {
2256
2271
  }
2257
2272
  //#endregion
2258
2273
  //#region src/App.tsx
2259
- function li(e = {}) {
2260
- return kr({
2274
+ function pi(e = {}) {
2275
+ return Nr({
2261
2276
  ...e,
2262
- ...cr,
2263
- ...Gr
2277
+ ...fr,
2278
+ ...Yr
2264
2279
  });
2265
2280
  }
2266
- function ui(e, t) {
2267
- return N(`form-${e}-${t.name}`, Zn, {
2281
+ function mi(e, t) {
2282
+ return P(`form-${e}-${t.name}`, tr, {
2268
2283
  command: t.forCommand,
2269
2284
  label: t.name,
2270
2285
  generationMode: t.generationMode,
@@ -2272,43 +2287,43 @@ function ui(e, t) {
2272
2287
  fields: t.fields
2273
2288
  });
2274
2289
  }
2275
- function di(e, t) {
2290
+ function hi(e, t) {
2276
2291
  let n = e.screens[0];
2277
- return _e(e, n, {
2278
- profile: Dr(e.uiProfiles),
2279
- blueprintTemplates: t?.length ? [...ve, ...t] : void 0
2292
+ return ge(e, n, {
2293
+ profile: jr(e.uiProfiles),
2294
+ blueprintTemplates: t?.length ? [..._e, ...t] : void 0
2280
2295
  });
2281
2296
  }
2282
- function fi(e, t, n, r, i, a, o = !0) {
2283
- let s = ti(e.navigation), c = e.navigation?.application.logo ? {
2297
+ function gi(e, t, n, r, i, a, o = !0) {
2298
+ let s = ai(e.navigation), c = e.navigation?.application.logo ? {
2284
2299
  title: e.navigation.application.logo.title,
2285
2300
  image: e.navigation.application.logo.image || void 0
2286
2301
  } : void 0;
2287
2302
  return {
2288
- profile: Dr(e.uiProfiles),
2289
- catalog: Ar(r),
2290
- blueprintTemplates: a?.length ? [...ve, ...a] : void 0,
2291
- chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: Nr(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : Nr(e.screens, r.name, t, n, c, s, o),
2292
- form: ui,
2293
- trailing: [N("activity", Lr)],
2303
+ profile: jr(e.uiProfiles),
2304
+ catalog: Pr(r),
2305
+ blueprintTemplates: a?.length ? [..._e, ...a] : void 0,
2306
+ chrome: (r, i) => i === M.FullPageShell ? { [N.ConfigPanel]: Lr(e.screens, r.name, t, n, c, s, o)[N.ConfigPanel] } : Lr(e.screens, r.name, t, n, c, s, o),
2307
+ form: mi,
2308
+ trailing: [P("activity", Vr)],
2294
2309
  decorate: (e) => {
2295
- let t = dr(e);
2310
+ let t = hr(e);
2296
2311
  return i ? y(t, i) : t;
2297
2312
  }
2298
2313
  };
2299
2314
  }
2300
- function pi(e, t, n, r, i, a) {
2301
- return pe(e, t, fi(e, n, r, i, void 0, a)).element;
2315
+ function _i(e, t, n, r, i, a) {
2316
+ return fe(e, t, gi(e, n, r, i, void 0, a)).element;
2302
2317
  }
2303
- function mi() {
2318
+ function vi() {
2304
2319
  try {
2305
2320
  return globalThis.localStorage ?? null;
2306
2321
  } catch {
2307
2322
  return null;
2308
2323
  }
2309
2324
  }
2310
- function hi({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
2311
- let s = Xe(), l = o(() => li(e), [e]), [u, d] = c(), [f, p] = c(""), m = Ze(), h = lr();
2325
+ function yi({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
2326
+ let s = Qe(), l = o(() => pi(e), [e]), [u, d] = c(), [f, p] = c(""), m = $e(), h = pr();
2312
2327
  return i(() => {
2313
2328
  let e = new AbortController();
2314
2329
  return s.scene(e.signal).then((e) => d(r?.length ? {
@@ -2317,10 +2332,10 @@ function hi({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2317
2332
  } : e)).catch((t) => {
2318
2333
  e.signal.aborted || p(t instanceof Error ? t.message : String(t));
2319
2334
  }), () => e.abort();
2320
- }, [s, r]), f ? /* @__PURE__ */ F("main", {
2335
+ }, [s, r]), f ? /* @__PURE__ */ I("main", {
2321
2336
  className: "stage-message",
2322
- children: [/* @__PURE__ */ P("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ P("p", { children: f })]
2323
- }) : u ? /* @__PURE__ */ P(gi, {
2337
+ children: [/* @__PURE__ */ F("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ F("p", { children: f })]
2338
+ }) : u ? /* @__PURE__ */ F(bi, {
2324
2339
  scene: u,
2325
2340
  registry: l,
2326
2341
  routeState: m,
@@ -2328,21 +2343,21 @@ function hi({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2328
2343
  packageCatalog: t,
2329
2344
  screenTemplates: n,
2330
2345
  isVisible: a
2331
- }) : /* @__PURE__ */ P("main", {
2346
+ }) : /* @__PURE__ */ F("main", {
2332
2347
  className: "stage-message",
2333
- children: /* @__PURE__ */ P("h1", { children: "Preparing the Stage" })
2348
+ children: /* @__PURE__ */ F("h1", { children: "Preparing the Stage" })
2334
2349
  });
2335
2350
  }
2336
- function gi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
2337
- let u = o(() => O(), []), [d, f] = c($r), p = e.screens[0]?.name ?? "", m = o(() => Dr(e.uiProfiles), [e]), h = o(() => p ? di(e, s) : void 0, [
2351
+ function bi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
2352
+ let u = o(() => O(), []), [d, f] = c(ri), p = e.screens[0]?.name ?? "", m = o(() => jr(e.uiProfiles), [e]), h = o(() => p ? hi(e, s) : void 0, [
2338
2353
  e,
2339
2354
  s,
2340
2355
  p
2341
- ]), g = o(() => h ? Yr(m, h) : [], [m, h]), _ = o(() => h ? Jr(m, h, d) : void 0, [
2356
+ ]), g = o(() => h ? $r(m, h) : [], [m, h]), _ = o(() => h ? Qr(m, h, d) : void 0, [
2342
2357
  m,
2343
2358
  h,
2344
2359
  d
2345
- ]), v = o(() => Zr(ge, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => fi(e, i.locales, i.locale, a, i.dictionary, s, y), [
2360
+ ]), v = o(() => ti(he, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => gi(e, i.locales, i.locale, a, i.dictionary, s, y), [
2346
2361
  e,
2347
2362
  i.locales,
2348
2363
  i.locale,
@@ -2350,33 +2365,33 @@ function gi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2350
2365
  a,
2351
2366
  s,
2352
2367
  y
2353
- ]), x = n((e) => f(e), []), S = o(() => ii(e, l), [e, l]), C = o(() => ({
2368
+ ]), x = n((e) => f(e), []), S = o(() => ci(e, l), [e, l]), C = o(() => ({
2354
2369
  ...e,
2355
- screens: ci(e.screens, [
2370
+ screens: fi(e.screens, [
2356
2371
  ...e.screenTemplates,
2357
2372
  ...e.dialogTemplates ?? [],
2358
- ...ve,
2373
+ ..._e,
2359
2374
  ...s ?? []
2360
2375
  ])
2361
2376
  }), [e, s]);
2362
- return p ? g.length > 0 ? /* @__PURE__ */ F("main", {
2377
+ return p ? g.length > 0 ? /* @__PURE__ */ I("main", {
2363
2378
  className: "stage-message",
2364
2379
  role: "alert",
2365
2380
  "data-stage-startup-problem": "root-template",
2366
2381
  children: [
2367
- /* @__PURE__ */ P("h1", { children: "Unable to start this Stage" }),
2368
- /* @__PURE__ */ P("p", { children: "The ui profile's root template cannot be the application's shell." }),
2369
- /* @__PURE__ */ P("ul", { children: g.map((e) => /* @__PURE__ */ P("li", { children: e }, e)) })
2382
+ /* @__PURE__ */ F("h1", { children: "Unable to start this Stage" }),
2383
+ /* @__PURE__ */ F("p", { children: "The ui profile's root template cannot be the application's shell." }),
2384
+ /* @__PURE__ */ F("ul", { children: g.map((e) => /* @__PURE__ */ F("li", { children: e }, e)) })
2370
2385
  ]
2371
- }) : /* @__PURE__ */ P(le, {
2386
+ }) : /* @__PURE__ */ F(le, {
2372
2387
  application: C,
2373
2388
  composition: b,
2374
2389
  navigationModel: S,
2375
2390
  registry: t,
2376
2391
  initialScreen: p,
2377
2392
  history: u,
2378
- layoutConfigStorage: mi(),
2379
- scope: (t, n) => /* @__PURE__ */ P(_i, {
2393
+ layoutConfigStorage: vi(),
2394
+ scope: (t, n) => /* @__PURE__ */ F(xi, {
2380
2395
  scene: e,
2381
2396
  routeState: r,
2382
2397
  strings: i,
@@ -2386,25 +2401,25 @@ function gi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2386
2401
  onSystemSchemeChange: x,
2387
2402
  children: n
2388
2403
  }),
2389
- renderScreen: (e, n) => /* @__PURE__ */ P(yi, {
2404
+ renderScreen: (e, n) => /* @__PURE__ */ F(Ci, {
2390
2405
  element: e,
2391
2406
  configuration: n,
2392
2407
  registry: t
2393
2408
  }),
2394
- renderDialog: () => /* @__PURE__ */ P(or, {}),
2395
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(bi, {
2409
+ renderDialog: () => /* @__PURE__ */ F(ur, {}),
2410
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ F(wi, {
2396
2411
  template: e,
2397
2412
  content: n,
2398
2413
  registry: t,
2399
2414
  strings: i,
2400
2415
  close: () => r.closeDialog()
2401
2416
  })
2402
- }) : /* @__PURE__ */ F("main", {
2417
+ }) : /* @__PURE__ */ I("main", {
2403
2418
  className: "stage-message",
2404
- children: [/* @__PURE__ */ P("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ P("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2419
+ children: [/* @__PURE__ */ F("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ F("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2405
2420
  });
2406
2421
  }
2407
- function _i({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
2422
+ function xi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
2408
2423
  let [d, f] = c(""), { navigate: p } = r;
2409
2424
  return i(() => f(""), [r.currentScreen, r.currentDialog]), i(() => {
2410
2425
  let e = (e) => {
@@ -2421,22 +2436,22 @@ function _i({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2421
2436
  r && (r.dialog === void 0 ? r.screen !== void 0 && !e.screens.some((e) => e.name === r.screen) ? f(`The modeled screen “${r.screen}” is not available.`) : p(r) : e.dialogTemplates?.some((e) => e.name === r.dialog) ? p(r) : f(`The modeled dialog “${r.dialog}” is not available in this Stage runtime.`));
2422
2437
  };
2423
2438
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
2424
- }, [p, e]), /* @__PURE__ */ F(de, {
2439
+ }, [p, e]), /* @__PURE__ */ I(ue, {
2425
2440
  themes: a,
2426
2441
  children: [
2427
- o && /* @__PURE__ */ P(ei, {
2442
+ o && /* @__PURE__ */ F(ii, {
2428
2443
  settings: o,
2429
2444
  onSystemSchemeChange: s
2430
2445
  }),
2431
- /* @__PURE__ */ P(Wr, {}),
2432
- /* @__PURE__ */ P(Ot, {
2446
+ /* @__PURE__ */ F(Jr, {}),
2447
+ /* @__PURE__ */ F(At, {
2433
2448
  routes: t.routes,
2434
2449
  routesReady: t.ready,
2435
2450
  parameters: r.currentParameters,
2436
2451
  locale: n.locale,
2437
2452
  locales: n.locales,
2438
2453
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
2439
- children: /* @__PURE__ */ P(vi, {
2454
+ children: /* @__PURE__ */ F(Si, {
2440
2455
  activity: d,
2441
2456
  routesReady: t.ready,
2442
2457
  scene: e,
@@ -2448,12 +2463,12 @@ function _i({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2448
2463
  ]
2449
2464
  });
2450
2465
  }
2451
- function vi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2452
- let s = z(), c = se(), l = Kt(), d = o(() => si(l, t, s.refreshAfterCommand), [
2466
+ function Si({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2467
+ let s = z(), c = se(), l = Jt(), d = o(() => di(l, t, s.refreshAfterCommand), [
2453
2468
  l,
2454
2469
  t,
2455
2470
  s.refreshAfterCommand
2456
- ]), f = o(() => ai(n.commandSchemas), [n.commandSchemas]), p = ie({
2471
+ ]), f = o(() => li(n.commandSchemas), [n.commandSchemas]), p = ie({
2457
2472
  executeCommand: async (e, n) => {
2458
2473
  let i = U(e);
2459
2474
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
@@ -2472,7 +2487,7 @@ function vi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2472
2487
  };
2473
2488
  },
2474
2489
  navigate: (e, t) => {
2475
- n.screens.some((t) => t.name === e) ? W(e, Jt(t)) : r(`The modeled screen “${e}” is not available.`);
2490
+ n.screens.some((t) => t.name === e) ? W(e, Xt(t)) : r(`The modeled screen “${e}” is not available.`);
2476
2491
  },
2477
2492
  navigateBack: () => globalThis.history?.back(),
2478
2493
  openDialog: async (e) => {
@@ -2489,18 +2504,18 @@ function vi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2489
2504
  refreshQuery: async (e) => s.refreshQuery(e),
2490
2505
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
2491
2506
  });
2492
- return /* @__PURE__ */ P(Ir, {
2507
+ return /* @__PURE__ */ F(Br, {
2493
2508
  state: {
2494
2509
  locales: i.locales,
2495
2510
  locale: i.locale,
2496
2511
  setLocale: i.setLocale,
2497
2512
  activity: e
2498
2513
  },
2499
- children: /* @__PURE__ */ P(E, {
2514
+ children: /* @__PURE__ */ F(E, {
2500
2515
  invoker: d,
2501
- children: /* @__PURE__ */ P(te, {
2516
+ children: /* @__PURE__ */ F(te, {
2502
2517
  fieldsFor: f,
2503
- children: /* @__PURE__ */ P(w, {
2518
+ children: /* @__PURE__ */ F(w, {
2504
2519
  dispatcher: p,
2505
2520
  context: {
2506
2521
  resolve: s.resolveBinding,
@@ -2514,9 +2529,9 @@ function vi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2514
2529
  })
2515
2530
  });
2516
2531
  }
2517
- function yi({ element: e, configuration: t, registry: n }) {
2518
- let r = z(), i = Bt();
2519
- return /* @__PURE__ */ F(je, { children: [/* @__PURE__ */ P(yr, { element: e }), /* @__PURE__ */ P(T, {
2532
+ function Ci({ element: e, configuration: t, registry: n }) {
2533
+ let r = z(), i = Ht();
2534
+ return /* @__PURE__ */ I(Ae, { children: [/* @__PURE__ */ F(Cr, { element: e }), /* @__PURE__ */ F(T, {
2520
2535
  element: e,
2521
2536
  registry: n,
2522
2537
  resolveBinding: r.resolveBinding,
@@ -2525,25 +2540,25 @@ function yi({ element: e, configuration: t, registry: n }) {
2525
2540
  configuration: t
2526
2541
  })] });
2527
2542
  }
2528
- function bi({ template: e, content: t, registry: n, strings: r, close: a }) {
2529
- let o = z(), s = Bt(), c = y(t, r.dictionary);
2543
+ function wi({ template: e, content: t, registry: n, strings: r, close: a }) {
2544
+ let o = z(), s = Ht(), c = y(t, r.dictionary);
2530
2545
  return i(() => {
2531
2546
  let e = (e) => {
2532
2547
  e.key === "Escape" && a();
2533
2548
  };
2534
2549
  return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
2535
- }, [a]), /* @__PURE__ */ P("div", {
2550
+ }, [a]), /* @__PURE__ */ F("div", {
2536
2551
  className: "stage-dialog-backdrop",
2537
- children: /* @__PURE__ */ F("section", {
2552
+ children: /* @__PURE__ */ I("section", {
2538
2553
  role: "dialog",
2539
2554
  "aria-modal": "true",
2540
2555
  "aria-label": e.displayName ?? e.name,
2541
2556
  className: "stage-dialog",
2542
- children: [/* @__PURE__ */ P("button", {
2557
+ children: [/* @__PURE__ */ F("button", {
2543
2558
  type: "button",
2544
2559
  onClick: a,
2545
2560
  children: "Close"
2546
- }), /* @__PURE__ */ P(T, {
2561
+ }), /* @__PURE__ */ F(T, {
2547
2562
  element: c,
2548
2563
  registry: n,
2549
2564
  resolveBinding: o.resolveBinding,
@@ -2555,9 +2570,9 @@ function bi({ template: e, content: t, registry: n, strings: r, close: a }) {
2555
2570
  }
2556
2571
  //#endregion
2557
2572
  //#region src/stageTheme.ts
2558
- var xi = "[data-scene-color-scheme='dark']", Si = {
2559
- preset: Ge,
2560
- options: { darkModeSelector: xi }
2573
+ var Ti = "[data-scene-color-scheme='dark']", Ei = {
2574
+ preset: qe,
2575
+ options: { darkModeSelector: Ti }
2561
2576
  };
2562
2577
  //#endregion
2563
- export { hi as App, hi as StageApplication, gn as StageCommandForm, Ot as StageDataProvider, Yn as StageGuardedAction, Ye as StageSourceProvider, pi as composeStageScreen, si as createStageSliceInvoker, kt as dataChanged, Wt as executeRegisteredCommand, ot as performQuery, nt as registerQueryRouteResolver, U as registeredCommand, rt as registeredQuery, ai as sliceFieldsFrom, li as stageApplicationRegistry, fi as stageComposition, xi as stageDarkSelector, qe as stageEndpoints, di as stageShellOf, Si as stageTheme, Ke as staticStageSource, st as subscribeQuery, Kt as useStageCommandExecutor, z as useStageData, B as useStageQuery, Xe as useStageSource };
2578
+ export { yi as App, yi as StageApplication, vn as StageCommandForm, At as StageDataProvider, $n as StageGuardedAction, Ze as StageSourceProvider, _i as composeStageScreen, di as createStageSliceInvoker, jt as dataChanged, Kt as executeRegisteredCommand, ct as performQuery, it as registerQueryRouteResolver, U as registeredCommand, at as registeredQuery, li as sliceFieldsFrom, pi as stageApplicationRegistry, gi as stageComposition, Ti as stageDarkSelector, Ye as stageEndpoints, hi as stageShellOf, Ei as stageTheme, Je as staticStageSource, lt as subscribeQuery, Jt as useStageCommandExecutor, z as useStageData, B as useStageQuery, Qe as useStageSource };