@cratis/stage.runtime 4.204.0 → 4.205.0

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.
package/dist/src/index.js CHANGED
@@ -3,30 +3,30 @@ import { t as e } from "../stageDarkSelector-DAwb43-P.js";
3
3
  import { createContext as t, createElement as n, useCallback as r, useContext as i, useEffect as a, useId as o, useMemo as s, useRef as c, useState as l } from "react";
4
4
  import { ColorScheme as u, DestinationKind as d, FormGenerationMode as f, FormWidthUnit as p, InteractionTriggerKind as m, LogoKind as h, PackageKind as g, componentIconLibrary as _ } from "@cratis/scene.model";
5
5
  import { ShellDiagnosticCode as v, ShellOrigin as y, createBindingResolver as b, hostProfilePackages as x, resolveArgumentSource as S, resolveBehaviors as C, resolveStringsInElement as w, resolveStringsValue as ee, runBindings as te, validateBindingExpression as ne } from "@cratis/scene.engine";
6
- import { CoreSliceDialog as T, CoreToolbarItem as E, IconAdapterProvider as re, InteractionScope as D, SceneElementView as O, SceneNavigationContextInternal as k, SliceCommandFieldsProvider as ie, SliceDialogView as ae, SliceInvokerProvider as oe, attachmentFor as se, coreComponents as ce, createBrowserDispatcher as A, createBrowserSceneHistory as le, createHashSceneHistory as ue, createIconAdapterRegistry as j, sliceDialogParameters as de, useInteractionScope as fe, useOptionalSceneNavigation as pe, useSceneNavigation as me, useSceneOutlets as he, useSceneTheme as ge } from "@cratis/scene.react";
7
- import { ApplicationHost as _e, ColorScheme as ve, ComponentName as M, LayoutThemeProvider as ye, SlotName as N, blueprintPackageCatalog as be, composeApplicationScreen as xe, defaultBlueprintComponents as Se, defaultBlueprintName as Ce, defaultBlueprintThemes as we, effectiveShellOf as Te, externalComponent as P, galleryScreenTemplates as F, layoutModes as Ee, menuThemes as De, navigationElement as Oe, previewComponents as ke, previewProfile as Ae, useLayoutConfig as je } from "@cratis/scene.blueprint.default";
6
+ import { CoreSliceDialog as T, CoreToolbarItem as E, IconAdapterProvider as re, InteractionScope as ie, SceneElementView as D, SceneNavigationContextInternal as O, SliceCommandFieldsProvider as ae, SliceDialogView as oe, SliceInvokerProvider as se, attachmentFor as ce, componentRegistryKey as le, coreComponents as k, createBrowserDispatcher as ue, createBrowserSceneHistory as de, createHashSceneHistory as A, createIconAdapterRegistry as fe, sliceDialogParameters as pe, useInteractionScope as me, useOptionalSceneNavigation as he, useSceneNavigation as ge, useSceneOutlets as _e, useSceneTheme as ve } from "@cratis/scene.react";
7
+ import { ApplicationHost as ye, ColorScheme as be, ComponentName as j, KanbanBoard as xe, LayoutThemeProvider as Se, SlotName as M, blueprintPackageCatalog as Ce, composeApplicationScreen as we, defaultBlueprintComponents as Te, defaultBlueprintName as Ee, defaultBlueprintThemes as De, effectiveShellOf as Oe, externalComponent as N, galleryScreenTemplates as P, layoutModes as ke, menuThemes as Ae, navigationElement as je, previewComponents as Me, previewProfile as Ne, useLayoutConfig as Pe } from "@cratis/scene.blueprint.default";
8
8
  import "@cratis/components/tokens";
9
9
  import "@cratis/components/CommandForm/styles";
10
10
  import "@cratis/components/Dropdown/styles";
11
11
  import "@cratis/components/Common/styles";
12
12
  import "@cratis/components/Display/styles";
13
13
  import "@cratis/scene.blueprint.default/styles.css";
14
- import { ArcContext as Me } from "@cratis/arc.react";
15
- import { ObservableQueryFor as Ne, Paging as Pe, QueryFor as Fe } from "@cratis/arc/queries";
16
- import { resolveCommand as Ie, resolveExactQuery as Le } from "@cratis/scene.components";
17
- import { Fragment as Re, jsx as I, jsxs as L } from "react/jsx-runtime";
18
- import { Button as R } from "@cratis/components/Common";
19
- import { Dialog as ze } from "@cratis/components/Dialogs";
20
- import { Message as Be } from "@cratis/components/Display";
21
- import { createPortal as Ve } from "react-dom";
22
- import { DateOnly as He, Guid as Ue } from "@cratis/fundamentals";
23
- import { Command as We } from "@cratis/arc/commands";
24
- import { CommandForm as Ge, asCommandFormField as Ke, withCommandFormFieldBinding as qe } from "@cratis/arc.react/commands";
25
- import { CalendarField as Je, CheckboxField as Ye, DropdownField as Xe, InputTextField as Ze, NumberField as Qe } from "@cratis/components/CommandForm";
26
- import { cratisComponents as $e, cratisComponentsPackageManifest as et } from "@cratis/scene.components/runtime";
27
- import { dynamicIconImports as tt } from "lucide-react/dynamic";
14
+ import { ArcContext as Fe } from "@cratis/arc.react";
15
+ import { ObservableQueryFor as Ie, Paging as Le, QueryFor as Re } from "@cratis/arc/queries";
16
+ import { resolveCommand as ze, resolveExactQuery as Be } from "@cratis/scene.components";
17
+ import { Fragment as Ve, jsx as F, jsxs as I } from "react/jsx-runtime";
18
+ import { Button as L } from "@cratis/components/Common";
19
+ import { Dialog as He } from "@cratis/components/Dialogs";
20
+ import { Message as Ue } from "@cratis/components/Display";
21
+ import { createPortal as We } from "react-dom";
22
+ import { DateOnly as Ge, Guid as Ke } from "@cratis/fundamentals";
23
+ import { Command as qe } from "@cratis/arc/commands";
24
+ import { CommandForm as Je, asCommandFormField as Ye, withCommandFormFieldBinding as Xe } from "@cratis/arc.react/commands";
25
+ import { CalendarField as Ze, CheckboxField as Qe, DropdownField as $e, InputTextField as et, NumberField as tt } from "@cratis/components/CommandForm";
26
+ import { cratisComponents as nt, cratisComponentsPackageManifest as rt } from "@cratis/scene.components/runtime";
27
+ import { dynamicIconImports as it } from "lucide-react/dynamic";
28
28
  // src/stageSource.ts
29
- function nt(e) {
29
+ function at(e) {
30
30
  return {
31
31
  scene: async () => e.scene,
32
32
  routes: async () => e.routes,
@@ -34,23 +34,23 @@ function nt(e) {
34
34
  strings: async (t) => e.strings[t] ?? {}
35
35
  };
36
36
  }
37
- var rt = {
37
+ var ot = {
38
38
  scene: "stage/scene",
39
39
  routes: "stage/routes",
40
40
  locales: "stage/locales",
41
41
  strings: (e) => `stage/strings/${encodeURIComponent(e)}`
42
- }, it = t(void 0);
43
- function at({ source: e, children: t }) {
44
- return n(it.Provider, { value: e }, t);
42
+ }, st = t(void 0);
43
+ function ct({ source: e, children: t }) {
44
+ return n(st.Provider, { value: e }, t);
45
45
  }
46
- function ot() {
47
- let e = i(it);
46
+ function lt() {
47
+ let e = i(st);
48
48
  if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
49
49
  return e;
50
50
  }
51
- rt.routes;
52
- function st() {
53
- let e = ot(), [t, n] = l({
51
+ ot.routes;
52
+ function ut() {
53
+ let e = lt(), [t, n] = l({
54
54
  routes: void 0,
55
55
  ready: !1
56
56
  });
@@ -70,24 +70,24 @@ function st() {
70
70
  }, [e]), t;
71
71
  }
72
72
  // src/applyQueryChangeSet.ts
73
- function ct(e) {
73
+ function dt(e) {
74
74
  return typeof e == "object" && e && "id" in e ? e.id : void 0;
75
75
  }
76
- function lt(e) {
76
+ function ft(e) {
77
77
  if (typeof e != "object" || !e) return e;
78
78
  let t = e.toString();
79
79
  return t === "[object Object]" ? JSON.stringify(e) : t;
80
80
  }
81
- function ut(e, t) {
82
- 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) : lt(e) === lt(t);
81
+ function pt(e, t) {
82
+ 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) : ft(e) === ft(t);
83
83
  }
84
- function dt(e, t) {
85
- if (t.removed.length > 0 ? ct(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => ut(ct(e), ct(t)))).map((e) => t.replaced.find((t) => ut(ct(t), ct(e))) ?? e), ...t.added];
84
+ function mt(e, t) {
85
+ if (t.removed.length > 0 ? dt(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => pt(dt(e), dt(t)))).map((e) => t.replaced.find((t) => pt(dt(t), dt(e))) ?? e), ...t.added];
86
86
  let n = new Set(t.removed.map((e) => JSON.stringify(e)));
87
87
  return [...e.filter((e) => !n.has(JSON.stringify(e))), ...t.added];
88
88
  }
89
89
  // src/hostedBasePath.ts
90
- function ft() {
90
+ function ht() {
91
91
  let e = globalThis.document?.baseURI ?? globalThis.location?.href;
92
92
  if (!e) return "";
93
93
  try {
@@ -96,61 +96,61 @@ function ft() {
96
96
  return "";
97
97
  }
98
98
  }
99
- function pt(e) {
100
- return e || ft();
99
+ function gt(e) {
100
+ return e || ht();
101
101
  }
102
102
  // src/queryExecutor.ts
103
- var mt;
104
- function ht(e) {
105
- mt = e;
103
+ var _t;
104
+ function vt(e) {
105
+ _t = e;
106
106
  }
107
- function gt(e, t) {
108
- let n = Le(e);
109
- return n === "ambiguous" && t && (n = Le(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), _t(n) ? n : t ? mt?.(t) : void 0;
107
+ function yt(e, t) {
108
+ let n = Be(e);
109
+ return n === "ambiguous" && t && (n = Be(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), bt(n) ? n : t ? _t?.(t) : void 0;
110
110
  }
111
- function _t(e) {
112
- return typeof e == "function" && (e.prototype instanceof Fe || e.prototype instanceof Ne);
111
+ function bt(e) {
112
+ return typeof e == "function" && (e.prototype instanceof Re || e.prototype instanceof Ie);
113
113
  }
114
- function vt(e, t) {
115
- e.setMicroservice(t.microservice), e.setApiBasePath(pt(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = Pe.noPaging;
114
+ function xt(e, t) {
115
+ e.setMicroservice(t.microservice), e.setApiBasePath(gt(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = Le.noPaging;
116
116
  }
117
- function yt(e, t, n) {
117
+ function St(e, t, n) {
118
118
  let r = new e();
119
- return vt(r, n), r.perform(t);
119
+ return xt(r, n), r.perform(t);
120
120
  }
121
- function bt(e, t, n, r) {
121
+ function Ct(e, t, n, r) {
122
122
  let i = new e();
123
- if (i instanceof Ne) return vt(i, n), i.subscribe(r, t);
123
+ if (i instanceof Ie) return xt(i, n), i.subscribe(r, t);
124
124
  }
125
- function xt(e) {
126
- if (z(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
125
+ function wt(e) {
126
+ if (R(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
127
127
  }
128
- var St = "STAGE-SCENE-ACTION-001", Ct = "item.";
129
- function z(e) {
128
+ var Tt = "STAGE-SCENE-ACTION-001", Et = "item.";
129
+ function R(e) {
130
130
  return typeof e == "object" && !!e && !Array.isArray(e);
131
131
  }
132
- function wt(e, t) {
132
+ function Dt(e, t) {
133
133
  let n = e;
134
134
  for (let e of t.split(".").filter(Boolean)) {
135
- if (!z(n)) return;
135
+ if (!R(n)) return;
136
136
  n = n[e];
137
137
  }
138
138
  return n;
139
139
  }
140
- function Tt(e) {
140
+ function Ot(e) {
141
141
  return e === null || [
142
142
  "string",
143
143
  "number",
144
144
  "boolean"
145
145
  ].includes(typeof e);
146
146
  }
147
- function Et(e, t) {
147
+ function kt(e, t) {
148
148
  if (typeof e == "number") return t[e];
149
149
  if (typeof e == "string") return t.find((t) => t.toLowerCase() === e.toLowerCase());
150
150
  }
151
- function Dt(e, t, n, r) {
151
+ function At(e, t, n, r) {
152
152
  if (r !== void 0 && (t === "Equal" || t === "NotEqual")) {
153
- let i = Et(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
153
+ let i = kt(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
154
154
  return i === void 0 || a === void 0 ? !1 : t === "Equal" ? i === a : i !== a;
155
155
  }
156
156
  switch (t) {
@@ -165,56 +165,56 @@ function Dt(e, t, n, r) {
165
165
  default: return;
166
166
  }
167
167
  }
168
- function Ot(e, t) {
169
- if (z(e)) {
168
+ function jt(e, t) {
169
+ if (R(e)) {
170
170
  if (e.kind === "comparison") {
171
- let n = xt(e.left);
172
- if (typeof n != "string" || !n.startsWith(Ct) || typeof e.operator != "string" || !Tt(e.right)) return;
171
+ let n = wt(e.left);
172
+ if (typeof n != "string" || !n.startsWith(Et) || typeof e.operator != "string" || !Ot(e.right)) return;
173
173
  let r = Array.isArray(e.enumeration) && e.enumeration.every((e) => typeof e == "string") ? e.enumeration : void 0;
174
- return Dt(wt(t, n.slice(5)), e.operator, e.right, r);
174
+ return At(Dt(t, n.slice(5)), e.operator, e.right, r);
175
175
  }
176
176
  if (e.kind === "logical") {
177
- let n = Ot(e.left, t), r = Ot(e.right, t);
177
+ let n = jt(e.left, t), r = jt(e.right, t);
178
178
  return n === void 0 || r === void 0 ? void 0 : e.operator === "And" ? n && r : e.operator === "Or" ? n || r : void 0;
179
179
  }
180
180
  }
181
181
  }
182
- function kt(e) {
183
- return e.every((e) => Ot(e, {}) !== void 0);
182
+ function Mt(e) {
183
+ return e.every((e) => jt(e, {}) !== void 0);
184
184
  }
185
- function At(e, t) {
186
- if (kt(e)) return e.findIndex((e) => Ot(e, t) === !0);
185
+ function Nt(e, t) {
186
+ if (Mt(e)) return e.findIndex((e) => jt(e, t) === !0);
187
187
  }
188
- function jt(e, t) {
189
- if (!z(e) || !Array.isArray(e.alternatives) || !z(t)) return;
190
- let n = At(e.alternatives, t);
188
+ function Pt(e, t) {
189
+ if (!R(e) || !Array.isArray(e.alternatives) || !R(t)) return;
190
+ let n = Nt(e.alternatives, t);
191
191
  if (n !== void 0) {
192
192
  if (e.kind === "firstMatch" && typeof e.index == "number") return n === e.index;
193
193
  if (e.kind === "otherwise") return n === -1;
194
194
  }
195
195
  }
196
- function Mt(e, t) {
197
- if (e.startsWith(Ct) && z(t)) return wt(t, e.slice(5));
196
+ function Ft(e, t) {
197
+ if (e.startsWith(Et) && R(t)) return Dt(t, e.slice(5));
198
198
  }
199
199
  // src/stageSession.ts
200
- var Nt = "stage.session.";
201
- function Pt(e) {
200
+ var It = "stage.session.";
201
+ function Lt(e) {
202
202
  try {
203
203
  return globalThis.localStorage?.getItem(`stage.session.${e}`) || void 0;
204
204
  } catch {
205
205
  return;
206
206
  }
207
207
  }
208
- function Ft(e) {
209
- let t = Pt(e);
208
+ function Rt(e) {
209
+ let t = Lt(e);
210
210
  if (t) return t;
211
211
  let n = globalThis.crypto.randomUUID();
212
212
  try {
213
- globalThis.localStorage?.setItem(`${Nt}${e}`, n);
213
+ globalThis.localStorage?.setItem(`${It}${e}`, n);
214
214
  } catch {}
215
215
  return n;
216
216
  }
217
- function It() {
217
+ function zt() {
218
218
  let e = {};
219
219
  try {
220
220
  let t = globalThis.localStorage;
@@ -228,7 +228,7 @@ function It() {
228
228
  return e;
229
229
  }
230
230
  // src/stageData.tsx
231
- var Lt = "cratis.stage.data-changed", Rt = t({
231
+ var Bt = "cratis.stage.data-changed", Vt = t({
232
232
  locale: "",
233
233
  locales: [],
234
234
  screen: "",
@@ -252,13 +252,13 @@ var Lt = "cratis.stage.data-changed", Rt = t({
252
252
  resolveArgument: () => void 0,
253
253
  registerQueryResult: () => void 0,
254
254
  refreshVersion: 0
255
- }), zt = [
255
+ }), Ht = [
256
256
  500,
257
257
  1500,
258
258
  3e3
259
- ], Bt = {};
260
- function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, locales: o, screen: u, children: d }) {
261
- let [f, p] = l({}), [m, h] = l(0), [g, _] = l({}), [v, y] = l(), [x, C] = l({}), [w, ee] = l({}), [te, T] = l({}), [E, re] = l({ version: 0 }), D = s(() => qt(te), [te]), O = r((e, t) => {
259
+ ], Ut = {};
260
+ function Wt({ routes: e, routesReady: t = !0, parameters: n = Ut, locale: i, locales: o, screen: u, children: d }) {
261
+ let [f, p] = l({}), [m, h] = l(0), [g, _] = l({}), [v, y] = l(), [x, C] = l({}), [w, ee] = l({}), [te, T] = l({}), [E, re] = l({ version: 0 }), ie = s(() => Xt(te), [te]), D = r((e, t) => {
262
262
  p((n) => {
263
263
  if (!t) {
264
264
  let { [e]: t, ...r } = n;
@@ -269,56 +269,56 @@ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, loc
269
269
  [e]: t
270
270
  };
271
271
  });
272
- }, []), k = n, ie = s(() => It(), [m]), ae = s(() => ({
272
+ }, []), O = n, ae = s(() => zt(), [m]), oe = s(() => ({
273
273
  name: u,
274
274
  keys: {
275
- ...ie,
275
+ ...ae,
276
276
  ...n
277
277
  }
278
278
  }), [
279
279
  n,
280
280
  u,
281
- ie
282
- ]), oe = r((e, t) => {
281
+ ae
282
+ ]), se = r((e, t) => {
283
283
  _((n) => ({
284
284
  ...n,
285
285
  [e]: t
286
286
  })), y(t ? e : (t) => t === e ? void 0 : t);
287
- }, []), se = r((e) => {
287
+ }, []), ce = r((e) => {
288
288
  _((t) => ({
289
289
  ...t,
290
290
  [e]: void 0
291
291
  })), y((t) => t === e ? void 0 : t);
292
- }, []), ce = r((e, t, n) => {
292
+ }, []), le = r((e, t, n) => {
293
293
  ee((r) => {
294
- let i = U(r[e]) ? r[e] : {};
294
+ let i = H(r[e]) ? r[e] : {};
295
295
  return {
296
296
  ...r,
297
- [e]: Kt(i, t.split(".").filter(Boolean), n)
297
+ [e]: Yt(i, t.split(".").filter(Boolean), n)
298
298
  };
299
299
  });
300
- }, []), A = r((e) => re((t) => ({
300
+ }, []), k = r((e) => re((t) => ({
301
301
  query: e,
302
302
  version: t.version + 1
303
- })), []), le = c([]), ue = r(() => {
304
- h((e) => e + 1), A();
305
- for (let e of zt) le.current.push(setTimeout(() => A(), e));
306
- }, [A]);
307
- a(() => () => le.current.forEach(clearTimeout), []), a(() => {
308
- let e = () => A(), t = (e) => A(e.detail?.query);
309
- return globalThis.addEventListener(Lt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
310
- globalThis.removeEventListener(Lt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
303
+ })), []), ue = c([]), de = r(() => {
304
+ h((e) => e + 1), k();
305
+ for (let e of Ht) ue.current.push(setTimeout(() => k(), e));
306
+ }, [k]);
307
+ a(() => () => ue.current.forEach(clearTimeout), []), a(() => {
308
+ let e = () => k(), t = (e) => k(e.detail?.query);
309
+ return globalThis.addEventListener(Bt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
310
+ globalThis.removeEventListener(Bt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
311
311
  };
312
- }, [A]);
313
- let j = v ? g[v] : void 0, de = r((e) => {
312
+ }, [k]);
313
+ let A = v ? g[v] : void 0, fe = r((e) => {
314
314
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
315
- if (typeof e == "string") return Jt(e, j, g, f, x, k, ae, i, o);
316
- let t = Ut(j, f, x, {
317
- ...D,
315
+ if (typeof e == "string") return Zt(e, A, g, f, x, O, oe, i, o);
316
+ let t = Kt(A, f, x, {
317
+ ...ie,
318
318
  ...w
319
319
  }, g);
320
320
  if (!e.kind && e.path.startsWith("component.")) return S(e.path, t);
321
- if (!e.kind) return Jt(e.path, j, g, f, x, k, ae, i, o);
321
+ if (!e.kind) return Zt(e.path, A, g, f, x, O, oe, i, o);
322
322
  let n = ne(e, t);
323
323
  return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), b(t)(e);
324
324
  }, [
@@ -326,87 +326,87 @@ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, loc
326
326
  i,
327
327
  o,
328
328
  x,
329
- k,
330
- D,
329
+ O,
330
+ ie,
331
331
  f,
332
- ae,
333
- j,
332
+ oe,
333
+ A,
334
334
  g
335
- ]), fe = r((e) => e ? S(e, Ut(j, f, x, {
336
- ...D,
335
+ ]), pe = r((e) => e ? S(e, Kt(A, f, x, {
336
+ ...ie,
337
337
  ...w
338
338
  }, g)) : void 0, [
339
339
  w,
340
340
  x,
341
- D,
341
+ ie,
342
342
  f,
343
- j,
343
+ A,
344
344
  g
345
- ]), pe = r((e, t) => T((n) => ({
345
+ ]), me = r((e, t) => T((n) => ({
346
346
  ...n,
347
347
  [e]: t
348
- })), []), me = r((e) => T((t) => {
348
+ })), []), he = r((e) => T((t) => {
349
349
  if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
350
350
  let n = { ...t };
351
351
  return delete n[e], n;
352
- }), []), he = s(() => Ut(void 0, f, {}, {}, {}).queryResults, [f]), ge = s(() => ({
352
+ }), []), ge = s(() => Kt(void 0, f, {}, {}, {}).queryResults, [f]), _e = s(() => ({
353
353
  locale: i,
354
354
  locales: o,
355
355
  screen: u,
356
356
  routes: e,
357
357
  routesReady: t,
358
- parameters: k,
359
- session: ie,
358
+ parameters: O,
359
+ session: ae,
360
360
  queries: f,
361
- selected: j,
361
+ selected: A,
362
362
  selections: g,
363
- selectRow: oe,
364
- clearSelection: se,
365
- setState: (e, t) => C((n) => Kt(n, e.split(".").filter(Boolean), t)),
366
- setComponentOutput: ce,
367
- publishComponentOutputs: pe,
368
- withdrawComponentOutputs: me,
369
- queryResults: he,
370
- refreshQuery: A,
371
- refreshAfterCommand: ue,
372
- resolveBinding: de,
373
- resolveArgument: fe,
374
- registerQueryResult: O,
363
+ selectRow: se,
364
+ clearSelection: ce,
365
+ setState: (e, t) => C((n) => Yt(n, e.split(".").filter(Boolean), t)),
366
+ setComponentOutput: le,
367
+ publishComponentOutputs: me,
368
+ withdrawComponentOutputs: he,
369
+ queryResults: ge,
370
+ refreshQuery: k,
371
+ refreshAfterCommand: de,
372
+ resolveBinding: fe,
373
+ resolveArgument: pe,
374
+ registerQueryResult: D,
375
375
  refreshVersion: E.version,
376
376
  refreshQueryName: E.query
377
377
  }), [
378
- se,
378
+ ce,
379
379
  i,
380
380
  o,
381
381
  f,
382
- ue,
383
- A,
382
+ de,
383
+ k,
384
384
  E.query,
385
385
  E.version,
386
- O,
387
- pe,
386
+ D,
388
387
  me,
389
388
  he,
389
+ ge,
390
+ pe,
390
391
  fe,
391
- de,
392
392
  e,
393
393
  t,
394
- k,
395
- ie,
394
+ O,
395
+ ae,
396
396
  u,
397
- oe,
398
- j,
397
+ se,
398
+ A,
399
399
  g,
400
- ce
400
+ le
401
401
  ]);
402
- return /* @__PURE__ */ I(Rt.Provider, {
403
- value: ge,
402
+ return /* @__PURE__ */ F(Vt.Provider, {
403
+ value: _e,
404
404
  children: d
405
405
  });
406
406
  }
407
- var B = () => i(Rt);
408
- function V(e) {
409
- let { refreshQueryName: t, refreshVersion: n, registerQueryResult: o } = B(), s = i(Me), u = e.publish !== !1, d = r((e, t) => {
407
+ var z = () => i(Vt);
408
+ function B(e) {
409
+ let { refreshQueryName: t, refreshVersion: n, registerQueryResult: o } = z(), s = i(Fe), u = e.publish !== !1, d = r((e, t) => {
410
410
  u && o(e, t);
411
411
  }, [u, o]), [f, p] = l([]), [m, h] = l(""), [g, _] = l(!1), [v, y] = l(0), b = c(0), x = c(!1), S = e.ready ?? !0, C = !!e.name && S, w = JSON.stringify(e.arguments ?? {});
412
412
  return a(() => {
@@ -416,17 +416,17 @@ function V(e) {
416
416
  }
417
417
  let t = b.current + 1;
418
418
  b.current = t;
419
- let n = new AbortController(), r = JSON.parse(w), i = gt(e.name ?? "", e.route);
419
+ let n = new AbortController(), r = JSON.parse(w), i = yt(e.name ?? "", e.route);
420
420
  _(!0), h("");
421
421
  let a = (e) => {
422
422
  b.current !== t || n.signal.aborted || (x.current = !1, p([]), h(e instanceof Error ? e.message : String(e)), _(!1));
423
423
  }, o = [], c = (e) => {
424
424
  if (b.current !== t || n.signal.aborted) return;
425
- let r = Zt(e);
426
- r ? a(Error(r)) : e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? dt(o, e.changeSet) : e.data, p(Qt(o)), h(""), _(!1));
425
+ let r = en(e);
426
+ r ? a(Error(r)) : e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? mt(o, e.changeSet) : e.data, p(tn(o)), h(""), _(!1));
427
427
  };
428
428
  if (!i) return a(/* @__PURE__ */ Error(`The modeled query “${e.name}” is not registered by this Stage.`)), () => n.abort();
429
- let l = i.prototype instanceof Ne, u = () => Promise.resolve().then(() => yt(i, l ? {
429
+ let l = i.prototype instanceof Ie, u = () => Promise.resolve().then(() => St(i, l ? {
430
430
  ...r,
431
431
  waitForFirstResult: !0
432
432
  } : r, s)).then(c).catch(a);
@@ -436,7 +436,7 @@ function V(e) {
436
436
  b.current !== t || n.signal.aborted || (x.current = !1, f?.unsubscribe(), f = void 0, u());
437
437
  }, 15e3);
438
438
  try {
439
- f = bt(i, r, s, (e) => {
439
+ f = Ct(i, r, s, (e) => {
440
440
  e.isReady !== !1 && globalThis.clearTimeout(m), c(e);
441
441
  });
442
442
  } catch {
@@ -493,29 +493,29 @@ function V(e) {
493
493
  }
494
494
  };
495
495
  }
496
- function Ht() {
497
- globalThis.dispatchEvent(new CustomEvent(Lt));
496
+ function Gt() {
497
+ globalThis.dispatchEvent(new CustomEvent(Bt));
498
498
  }
499
- function Ut(e, t, n, r, i) {
499
+ function Kt(e, t, n, r, i) {
500
500
  let a = Object.entries(t).sort(([, e], [, t]) => Number(e.list === !0) - Number(t.list === !0));
501
501
  return {
502
502
  dataContext: e,
503
503
  queryResults: Object.fromEntries(a.flatMap(([e, t]) => {
504
- let n = t.list ? t.rows : Wt(t.rows);
504
+ let n = t.list ? t.rows : qt(t.rows);
505
505
  return [
506
506
  [e, n],
507
507
  ...t.name ? [[t.name, n]] : [],
508
508
  ...t.alias ? [[t.alias, n]] : []
509
509
  ];
510
510
  })),
511
- componentOutputs: Gt(r, i),
511
+ componentOutputs: Jt(r, i),
512
512
  state: n
513
513
  };
514
514
  }
515
- function Wt(e) {
515
+ function qt(e) {
516
516
  return e.length === 1 ? e[0] : e;
517
517
  }
518
- function Gt(e, t) {
518
+ function Jt(e, t) {
519
519
  let n = { ...e };
520
520
  for (let [e, r] of Object.entries(t)) r && (n[e] = {
521
521
  ...r,
@@ -523,17 +523,17 @@ function Gt(e, t) {
523
523
  });
524
524
  return n;
525
525
  }
526
- function Kt(e, t, n) {
526
+ function Yt(e, t, n) {
527
527
  let [r, ...i] = t;
528
528
  return r ? i.length === 0 ? {
529
529
  ...e,
530
530
  [r]: n
531
531
  } : {
532
532
  ...e,
533
- [r]: Kt(U(e[r]) ? e[r] : {}, i, n)
533
+ [r]: Yt(H(e[r]) ? e[r] : {}, i, n)
534
534
  } : e;
535
535
  }
536
- function qt(e) {
536
+ function Xt(e) {
537
537
  let t = {};
538
538
  for (let n of Object.values(e)) for (let [e, r] of Object.entries(n)) t[e] = {
539
539
  ...t[e],
@@ -541,30 +541,30 @@ function qt(e) {
541
541
  };
542
542
  return t;
543
543
  }
544
- function Jt(e, t, n, r, i, a, o, s, c) {
544
+ function Zt(e, t, n, r, i, a, o, s, c) {
545
545
  if (!e) return;
546
546
  let l = e.replace(/^\$\.?/, "").split(".").filter(Boolean);
547
547
  if (l.length !== 0) {
548
548
  if (l[0] === "screen") {
549
549
  if (l.length === 1) return { name: o.name };
550
- let e = H(o, l.slice(1));
551
- return e === void 0 && l[1] === "keys" && l.length === 3 ? H(t, [l[2]]) : e;
550
+ let e = V(o, l.slice(1));
551
+ return e === void 0 && l[1] === "keys" && l.length === 3 ? V(t, [l[2]]) : e;
552
552
  }
553
- return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? Xt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Yt(l.slice(1).join("."), t, n) : l[0] === "state" ? H(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : H(t, l) ?? Xt(r, void 0, l.join(".")) ?? H(i, l);
553
+ return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? $t(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Qt(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) ?? $t(r, void 0, l.join(".")) ?? V(i, l);
554
554
  }
555
555
  }
556
- function Yt(e, t, n) {
556
+ function Qt(e, t, n) {
557
557
  let r = e?.split(".").filter(Boolean) ?? [];
558
- return r.length > 0 && Object.hasOwn(n, r[0]) ? H(n[r[0]], r.slice(1)) : r.length === 0 ? t : H(t, r);
558
+ return r.length > 0 && Object.hasOwn(n, r[0]) ? V(n[r[0]], r.slice(1)) : r.length === 0 ? t : V(t, r);
559
559
  }
560
- function Xt(e, t, n) {
560
+ function $t(e, t, n) {
561
561
  let r = Object.entries(e).filter(([e, n]) => t ? n.name === t || e === t : !n.list).map(([, e]) => e.rows);
562
562
  if (r.length === 0) return;
563
563
  let i = r.flat(), a = n?.split(".").filter(Boolean) ?? [];
564
- return a.length === 0 ? i : i.length === 1 ? H(i[0], a) : i.map((e) => H(e, a));
564
+ return a.length === 0 ? i : i.length === 1 ? V(i[0], a) : i.map((e) => V(e, a));
565
565
  }
566
- function Zt(e) {
567
- if (!U(e)) return "";
566
+ function en(e) {
567
+ if (!H(e)) return "";
568
568
  if (e.isAuthorized === !1) return "The query answered 403.";
569
569
  if (e.isValid === !1 || e.hasExceptions === !0 || e.isSuccess === !1) {
570
570
  let t = Array.isArray(e.exceptionMessages) ? e.exceptionMessages.filter((e) => typeof e == "string") : [];
@@ -572,56 +572,56 @@ function Zt(e) {
572
572
  }
573
573
  return "";
574
574
  }
575
- function Qt(e) {
576
- return Array.isArray(e) ? e.filter(U) : U(e) ? [e] : [];
575
+ function tn(e) {
576
+ return Array.isArray(e) ? e.filter(H) : H(e) ? [e] : [];
577
577
  }
578
- function H(e, t) {
578
+ function V(e, t) {
579
579
  let n = e;
580
580
  for (let e of t) {
581
- if (!U(n)) return;
581
+ if (!H(n)) return;
582
582
  n = n[e];
583
583
  }
584
584
  return n;
585
585
  }
586
- function U(e) {
586
+ function H(e) {
587
587
  return typeof e == "object" && !!e && !Array.isArray(e);
588
588
  }
589
589
  // src/stageComponentOutputs.ts
590
- function $t() {
591
- let e = o(), { publishComponentOutputs: t, withdrawComponentOutputs: n } = B();
590
+ function nn() {
591
+ let e = o(), { publishComponentOutputs: t, withdrawComponentOutputs: n } = z();
592
592
  return a(() => () => n(e), [e, n]), r((n) => t(e, n), [t, e]);
593
593
  }
594
594
  // src/commandExecutor.ts
595
- function W(e, t, n) {
595
+ function U(e, t, n) {
596
596
  for (let r of [
597
597
  t,
598
598
  n?.replace(/^\//, ""),
599
599
  e
600
600
  ]) {
601
601
  if (!r) continue;
602
- let t = Ie(r);
603
- if (en(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
602
+ let t = ze(r);
603
+ if (rn(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
604
604
  }
605
605
  }
606
- function en(e) {
607
- return typeof e == "function" && e.prototype instanceof We;
606
+ function rn(e) {
607
+ return typeof e == "function" && e.prototype instanceof qe;
608
608
  }
609
- function tn(e, t) {
610
- return e.setApiBasePath(pt(t)), e;
609
+ function an(e, t) {
610
+ return e.setApiBasePath(gt(t)), e;
611
611
  }
612
- async function nn(e, t, n) {
613
- let r = W(e);
612
+ async function on(e, t, n) {
613
+ let r = U(e);
614
614
  if (!r) return {
615
615
  isSuccess: !1,
616
616
  validationErrors: [],
617
617
  messages: [`The modeled command “${e}” is not registered by this Stage.`]
618
618
  };
619
619
  let i = new r();
620
- i.setMicroservice(n.microservice), i.setApiBasePath(pt(n.apiBasePath)), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
620
+ i.setMicroservice(n.microservice), i.setApiBasePath(gt(n.apiBasePath)), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
621
621
  for (let e of i.propertyDescriptors) Object.prototype.hasOwnProperty.call(t, e.name) && Reflect.set(i, e.name, t[e.name]);
622
- return rn(e, await i.execute());
622
+ return sn(e, await i.execute());
623
623
  }
624
- function rn(e, t) {
624
+ function sn(e, t) {
625
625
  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) => ({
626
626
  member: t,
627
627
  message: e.message
@@ -637,65 +637,65 @@ function rn(e, t) {
637
637
  messages: n || i.length > 0 ? i : [`“${e}” was not accepted.`]
638
638
  };
639
639
  }
640
- function an() {
641
- let e = i(Me);
642
- return r((t, n) => nn(t, n, e), [e]);
640
+ function cn() {
641
+ let e = i(Fe);
642
+ return r((t, n) => on(t, n, e), [e]);
643
643
  }
644
644
  // src/stageNavigation.ts
645
- function on(e, t = {}) {
645
+ function ln(e, t = {}) {
646
646
  let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
647
647
  return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
648
648
  }
649
- function G(e, t = {}) {
649
+ function W(e, t = {}) {
650
650
  if (!globalThis.location) return;
651
- if (sn === "path") {
652
- let n = ln(e, t);
651
+ if (un === "path") {
652
+ let n = fn(e, t);
653
653
  if (`${globalThis.location.pathname}${globalThis.location.search}` === n) return;
654
654
  globalThis.history.pushState(null, "", n), globalThis.dispatchEvent(new PopStateEvent("popstate"));
655
655
  return;
656
656
  }
657
- let n = on(e, t);
657
+ let n = ln(e, t);
658
658
  globalThis.location.hash !== n && (globalThis.location.hash = n);
659
659
  }
660
- var sn = "hash";
661
- function cn(e) {
662
- sn = e;
660
+ var un = "hash";
661
+ function dn(e) {
662
+ un = e;
663
663
  }
664
- function ln(e, t = {}) {
664
+ function fn(e, t = {}) {
665
665
  let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
666
666
  return n ? `/${encodeURIComponent(e)}?${n}` : `/${encodeURIComponent(e)}`;
667
667
  }
668
- function un(e) {
669
- return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof Ue)).map(([e, t]) => [e, String(t)]));
668
+ function pn(e) {
669
+ return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof Ke)).map(([e, t]) => [e, String(t)]));
670
670
  }
671
671
  // src/stageFormSchema.ts
672
- var dn = 8;
673
- function K(e) {
672
+ var mn = 8;
673
+ function G(e) {
674
674
  if (!e) return [];
675
675
  try {
676
- return fn(JSON.parse(e), 0);
676
+ return hn(JSON.parse(e), 0);
677
677
  } catch {
678
678
  return [];
679
679
  }
680
680
  }
681
- function fn(e, t) {
682
- 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 = bn(e.properties) ? e.properties : {};
683
- return Object.entries(i).map(([e, i]) => pn(e, i, !n || r.has(e), t));
681
+ function hn(e, t) {
682
+ 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 : {};
683
+ return Object.entries(i).map(([e, i]) => gn(e, i, !n || r.has(e), t));
684
684
  }
685
- function pn(e, t, n, r) {
685
+ function gn(e, t, n, r) {
686
686
  return {
687
687
  name: e,
688
688
  identifier: t?.format === "uuid" && typeof t["x-concept"] == "string" ? t["x-concept"] : void 0,
689
689
  ...t?.["x-identity"] === !0 ? { identity: !0 } : {},
690
690
  required: n,
691
- ...mn(t, r)
691
+ ..._n(t, r)
692
692
  };
693
693
  }
694
- function mn(e, t) {
694
+ function _n(e, t) {
695
695
  let n = e?.type;
696
696
  if (Array.isArray(n)) {
697
697
  let r = n.filter((e) => e !== "null");
698
- return r.length === 1 ? mn({
698
+ return r.length === 1 ? _n({
699
699
  ...e,
700
700
  type: r[0]
701
701
  }, t) : { unsupportedReason: `union type ${JSON.stringify(n)}` };
@@ -706,8 +706,8 @@ function mn(e, t) {
706
706
  type: "date",
707
707
  withTime: e.format === "date-time"
708
708
  };
709
- if (n === "array") return hn(e, t);
710
- if (n === "object") return gn(e, t);
709
+ if (n === "array") return vn(e, t);
710
+ if (n === "object") return yn(e, t);
711
711
  if (n === void 0 || n === "string") {
712
712
  let t = Array.isArray(e?.enum) ? e.enum.filter((e) => typeof e == "string") : [];
713
713
  return t.length > 0 ? {
@@ -717,76 +717,76 @@ function mn(e, t) {
717
717
  }
718
718
  return { unsupportedReason: `type ${String(n)}` };
719
719
  }
720
- function hn(e, t) {
720
+ function vn(e, t) {
721
721
  let n = { unsupportedReason: "array fields are not supported by the native Stage command form" };
722
- if (t >= dn || e?.items === void 0) return n;
723
- let r = pn("", e.items, !0, t + 1);
722
+ if (t >= mn || e?.items === void 0) return n;
723
+ let r = gn("", e.items, !0, t + 1);
724
724
  return r.unsupportedReason || r.item ? n : { item: r };
725
725
  }
726
- function gn(e, t) {
726
+ function yn(e, t) {
727
727
  let n = { unsupportedReason: "object fields are not supported by the native Stage command form" };
728
- if (t >= dn || !bn(e?.properties) || Object.keys(e.properties).length === 0) return n;
729
- let r = fn(e, t + 1), i = r.find((e) => e.unsupportedReason);
728
+ if (t >= mn || !Cn(e?.properties) || Object.keys(e.properties).length === 0) return n;
729
+ let r = hn(e, t + 1), i = r.find((e) => e.unsupportedReason);
730
730
  return i ? { unsupportedReason: `its member “${i.name}” is not supported: ${i.unsupportedReason}` } : { members: r };
731
731
  }
732
- function q(e) {
732
+ function K(e) {
733
733
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase();
734
734
  return t.charAt(0).toUpperCase() + t.slice(1);
735
735
  }
736
- function _n(e, t, n) {
736
+ function bn(e, t, n) {
737
737
  if (t != null) {
738
- if (e.members && bn(t)) for (let r of e.members) {
739
- let e = t[r.name], i = q(r.name);
740
- if (vn(e)) {
738
+ if (e.members && Cn(t)) for (let r of e.members) {
739
+ let e = t[r.name], i = K(r.name);
740
+ if (xn(e)) {
741
741
  if (r.required) return `${n}: ${i} is required`;
742
742
  continue;
743
743
  }
744
- let a = _n(r, e, `${n} ${i.toLowerCase()}`);
744
+ let a = bn(r, e, `${n} ${i.toLowerCase()}`);
745
745
  if (a) return a;
746
746
  }
747
747
  if (e.item && Array.isArray(t)) for (let [r, i] of t.entries()) {
748
- let t = vn(i) ? `${n} ${r + 1} is required` : _n(e.item, i, `${n} ${r + 1}`);
748
+ let t = xn(i) ? `${n} ${r + 1} is required` : bn(e.item, i, `${n} ${r + 1}`);
749
749
  if (t) return t;
750
750
  }
751
751
  }
752
752
  }
753
- function vn(e) {
753
+ function xn(e) {
754
754
  return e == null || e === "";
755
755
  }
756
- function yn(e, t) {
757
- 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 && bn(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
756
+ function Sn(e, t) {
757
+ 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]) => {
758
758
  let r = e.members?.find((e) => e.name === t);
759
- return [t, r ? yn(r, n) : n];
760
- })) : e.item && Array.isArray(t) ? t.map((t) => yn(e.item, t)) : t;
759
+ return [t, r ? Sn(r, n) : n];
760
+ })) : e.item && Array.isArray(t) ? t.map((t) => Sn(e.item, t)) : t;
761
761
  }
762
- function bn(e) {
762
+ function Cn(e) {
763
763
  return typeof e == "object" && !!e && !Array.isArray(e);
764
764
  }
765
765
  // src/StageValueFields.tsx
766
- var xn = Ke((e) => /* @__PURE__ */ I(Sn, {
766
+ var wn = Ye((e) => /* @__PURE__ */ F(Tn, {
767
767
  descriptor: e.descriptor,
768
- label: e.title ?? q(e.descriptor.name),
768
+ label: e.title ?? K(e.descriptor.name),
769
769
  value: e.value,
770
770
  onChange: e.onChange,
771
771
  onBlur: e.onBlur,
772
772
  invalid: e.invalid
773
773
  }), { defaultValue: void 0 });
774
- function Sn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
775
- return e.members ? /* @__PURE__ */ I(Cn, {
774
+ function Tn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
775
+ return e.members ? /* @__PURE__ */ F(En, {
776
776
  descriptor: e,
777
777
  label: t,
778
778
  value: n,
779
779
  onChange: r,
780
780
  onBlur: i,
781
781
  invalid: a
782
- }) : e.item ? /* @__PURE__ */ I(wn, {
782
+ }) : e.item ? /* @__PURE__ */ F(Dn, {
783
783
  descriptor: e,
784
784
  label: t,
785
785
  value: n,
786
786
  onChange: r,
787
787
  onBlur: i,
788
788
  invalid: a
789
- }) : /* @__PURE__ */ I(Tn, {
789
+ }) : /* @__PURE__ */ F(On, {
790
790
  descriptor: e,
791
791
  label: t,
792
792
  value: n,
@@ -795,14 +795,14 @@ function Sn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
795
795
  invalid: a
796
796
  });
797
797
  }
798
- function Cn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
799
- let o = On(n) ? n : {};
800
- return /* @__PURE__ */ L("fieldset", {
798
+ function En({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
799
+ let o = jn(n) ? n : {};
800
+ return /* @__PURE__ */ I("fieldset", {
801
801
  className: "stage-record-field",
802
802
  "data-invalid": a ? "true" : void 0,
803
- children: [/* @__PURE__ */ I("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ I(Sn, {
803
+ children: [/* @__PURE__ */ F("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ F(Tn, {
804
804
  descriptor: e,
805
- label: q(e.name),
805
+ label: K(e.name),
806
806
  value: o[e.name],
807
807
  onBlur: i,
808
808
  onChange: (t) => r({
@@ -812,74 +812,74 @@ function Cn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
812
812
  }, e.name))]
813
813
  });
814
814
  }
815
- function wn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
815
+ function Dn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
816
816
  let o = e.item, s = Array.isArray(n) ? n : [], c = (e) => r(e);
817
- return /* @__PURE__ */ L("fieldset", {
817
+ return /* @__PURE__ */ I("fieldset", {
818
818
  className: "stage-list-field",
819
819
  "data-invalid": a ? "true" : void 0,
820
820
  children: [
821
- /* @__PURE__ */ I("legend", { children: t }),
822
- s.length === 0 && /* @__PURE__ */ I("p", {
821
+ /* @__PURE__ */ F("legend", { children: t }),
822
+ s.length === 0 && /* @__PURE__ */ F("p", {
823
823
  className: "stage-note",
824
824
  children: "Nothing added yet."
825
825
  }),
826
- s.map((e, n) => /* @__PURE__ */ L("div", {
826
+ s.map((e, n) => /* @__PURE__ */ I("div", {
827
827
  className: "stage-list-field__row",
828
- children: [/* @__PURE__ */ I(Sn, {
828
+ children: [/* @__PURE__ */ F(Tn, {
829
829
  descriptor: o,
830
830
  label: `${t} ${n + 1}`,
831
831
  value: e,
832
832
  onBlur: i,
833
833
  onChange: (e) => c(s.map((t, r) => r === n ? e : t))
834
- }), /* @__PURE__ */ I("button", {
834
+ }), /* @__PURE__ */ F("button", {
835
835
  type: "button",
836
836
  "aria-label": `Remove ${t} ${n + 1}`,
837
837
  onClick: () => c(s.filter((e, t) => t !== n)),
838
838
  children: "Remove"
839
839
  })]
840
840
  }, n)),
841
- /* @__PURE__ */ I("button", {
841
+ /* @__PURE__ */ F("button", {
842
842
  type: "button",
843
843
  "aria-label": `Add ${t}`,
844
- onClick: () => c([...s, En(o)]),
844
+ onClick: () => c([...s, kn(o)]),
845
845
  children: "Add"
846
846
  })
847
847
  ]
848
848
  });
849
849
  }
850
- function Tn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
850
+ function On({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
851
851
  let o = {
852
852
  "aria-invalid": a ? !0 : void 0,
853
853
  onBlur: i
854
854
  };
855
- if (e.options) return /* @__PURE__ */ L("label", {
855
+ if (e.options) return /* @__PURE__ */ I("label", {
856
856
  className: "stage-value-field",
857
- children: [/* @__PURE__ */ I("span", { children: t }), /* @__PURE__ */ L("select", {
857
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ I("select", {
858
858
  ...o,
859
859
  value: typeof n == "string" ? n : "",
860
860
  onChange: (e) => r(e.target.value === "" ? void 0 : e.target.value),
861
- children: [/* @__PURE__ */ I("option", {
861
+ children: [/* @__PURE__ */ F("option", {
862
862
  value: "",
863
863
  children: ""
864
- }), e.options.map((e) => /* @__PURE__ */ I("option", {
864
+ }), e.options.map((e) => /* @__PURE__ */ F("option", {
865
865
  value: e,
866
- children: q(e)
866
+ children: K(e)
867
867
  }, e))]
868
868
  })]
869
869
  });
870
870
  switch (e.type) {
871
- case "boolean": return /* @__PURE__ */ L("label", {
871
+ case "boolean": return /* @__PURE__ */ I("label", {
872
872
  className: "stage-value-field stage-value-field--check",
873
- children: [/* @__PURE__ */ I("input", {
873
+ children: [/* @__PURE__ */ F("input", {
874
874
  ...o,
875
875
  type: "checkbox",
876
876
  checked: n === !0,
877
877
  onChange: (e) => r(e.target.checked)
878
- }), /* @__PURE__ */ I("span", { children: t })]
878
+ }), /* @__PURE__ */ F("span", { children: t })]
879
879
  });
880
- case "number": return /* @__PURE__ */ L("label", {
880
+ case "number": return /* @__PURE__ */ I("label", {
881
881
  className: "stage-value-field",
882
- children: [/* @__PURE__ */ I("span", { children: t }), /* @__PURE__ */ I("input", {
882
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
883
883
  ...o,
884
884
  type: "number",
885
885
  step: "any",
@@ -887,18 +887,18 @@ function Tn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
887
887
  onChange: (e) => r(e.target.value === "" ? void 0 : Number(e.target.value))
888
888
  })]
889
889
  });
890
- case "date": return /* @__PURE__ */ L("label", {
890
+ case "date": return /* @__PURE__ */ I("label", {
891
891
  className: "stage-value-field",
892
- children: [/* @__PURE__ */ I("span", { children: t }), /* @__PURE__ */ I("input", {
892
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
893
893
  ...o,
894
894
  type: e.withTime ? "datetime-local" : "date",
895
895
  value: typeof n == "string" ? n.slice(0, e.withTime ? 16 : 10) : "",
896
- onChange: (t) => r(t.target.value === "" ? void 0 : Dn(t.target.value, e.withTime === !0))
896
+ onChange: (t) => r(t.target.value === "" ? void 0 : An(t.target.value, e.withTime === !0))
897
897
  })]
898
898
  });
899
- default: return /* @__PURE__ */ L("label", {
899
+ default: return /* @__PURE__ */ I("label", {
900
900
  className: "stage-value-field",
901
- children: [/* @__PURE__ */ I("span", { children: t }), /* @__PURE__ */ I("input", {
901
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
902
902
  ...o,
903
903
  type: "text",
904
904
  value: typeof n == "string" ? n : "",
@@ -907,19 +907,19 @@ function Tn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
907
907
  });
908
908
  }
909
909
  }
910
- function En(e) {
910
+ function kn(e) {
911
911
  return e.members ? {} : void 0;
912
912
  }
913
- function Dn(e, t) {
913
+ function An(e, t) {
914
914
  if (!t) return e;
915
915
  let n = new Date(e);
916
916
  return Number.isNaN(n.getTime()) ? e : n.toISOString();
917
917
  }
918
- function On(e) {
918
+ function jn(e) {
919
919
  return typeof e == "object" && !!e && !Array.isArray(e);
920
920
  }
921
921
  // src/stageScreenTables.tsx
922
- function kn(e) {
922
+ function Mn(e) {
923
923
  let t = /* @__PURE__ */ new Set(), n = (e) => {
924
924
  let r = e;
925
925
  if (r.componentName !== "core:outlet") {
@@ -929,27 +929,27 @@ function kn(e) {
929
929
  };
930
930
  return n(e), [...t];
931
931
  }
932
- var An = t(void 0);
933
- function jn({ element: e, children: t }) {
934
- let n = s(() => new Set(kn(e)), [e]);
935
- return /* @__PURE__ */ I(An.Provider, {
932
+ var Nn = t(void 0);
933
+ function Pn({ element: e, children: t }) {
934
+ let n = s(() => new Set(Mn(e)), [e]);
935
+ return /* @__PURE__ */ F(Nn.Provider, {
936
936
  value: n,
937
937
  children: t
938
938
  });
939
939
  }
940
- function Mn({ children: e }) {
941
- return /* @__PURE__ */ I(An.Provider, {
940
+ function Fn({ children: e }) {
941
+ return /* @__PURE__ */ F(Nn.Provider, {
942
942
  value: void 0,
943
943
  children: e
944
944
  });
945
945
  }
946
- function Nn() {
947
- let e = i(An), { queries: t, selections: n } = B();
946
+ function In() {
947
+ let e = i(Nn), { queries: t, selections: n } = z();
948
948
  return s(() => {
949
949
  let r = e ? Object.fromEntries(Object.entries(t).filter(([t]) => e.has(t))) : t, i = e ? Object.fromEntries(Object.entries(n).filter(([t]) => e.has(t))) : n;
950
950
  return {
951
- selectableRows: Qn(r),
952
- selectedRows: $n(i, r)
951
+ selectableRows: tr(r),
952
+ selectedRows: nr(i, r)
953
953
  };
954
954
  }, [
955
955
  t,
@@ -958,12 +958,12 @@ function Nn() {
958
958
  ]);
959
959
  }
960
960
  // src/StageCommandForm.tsx
961
- var Pn = t(void 0), Fn = t(null);
962
- function In({ element: e }) {
963
- let t = B(), n = i(Me), r = i(Pn), a = i(Fn), o = c(null), u = s(() => Rn(e), [e]), d = s(() => gr(e), [e]), f = typeof e.properties.schema == "string", p = s(() => u ? zn(u, d) : [], [u, d]), m = u ? W(u.command, Y(e, "typeName"), Y(e, "route")) : void 0, h = Y(e, "submitLabel") || "Submit", g = ir(e, p, t.resolveArgument), _ = nr(e, d, t), v = JSON.stringify(_ ?? null), y = s(() => _, [v]), { selectableRows: b, selectedRows: x } = Nn(), S = e.properties.rowAction === !0, C = s(() => ({
961
+ var Ln = t(void 0), Rn = t(null);
962
+ function zn({ element: e }) {
963
+ let t = z(), n = i(Fe), r = i(Ln), a = i(Rn), o = c(null), u = s(() => Vn(e), [e]), d = s(() => yr(e), [e]), f = typeof e.properties.schema == "string", p = s(() => u ? Hn(u, d) : [], [u, d]), m = u ? U(u.command, J(e, "typeName"), J(e, "route")) : void 0, h = J(e, "submitLabel") || "Submit", g = sr(e, p, t.resolveArgument), _ = ar(e, d, t), v = JSON.stringify(_ ?? null), y = s(() => _, [v]), { selectableRows: b, selectedRows: x } = In(), S = e.properties.rowAction === !0, C = s(() => ({
964
964
  ...y,
965
- ...Gn(p, d, t.parameters, x, b, S),
966
- ...Wn(p, t.parameters)
965
+ ...Jn(p, d, t.parameters, x, b, S),
966
+ ...qn(p, t.parameters)
967
967
  }), [
968
968
  y,
969
969
  p,
@@ -972,140 +972,140 @@ function In({ element: e }) {
972
972
  x,
973
973
  b,
974
974
  S
975
- ]), w = s(() => u ? Bn(u, p, d) : void 0, [
975
+ ]), w = s(() => u ? Un(u, p, d) : void 0, [
976
976
  u,
977
977
  p,
978
978
  d
979
- ]), ee = s(() => u ? mr(p, d) : [], [
979
+ ]), ee = s(() => u ? _r(p, d) : [], [
980
980
  u,
981
981
  p,
982
982
  d
983
- ]), te = s(() => u ? hr(u.layout, p) : [], [u, p]), [ne, T] = l([]);
984
- return u ? !m && !t.routesReady ? /* @__PURE__ */ L("p", {
983
+ ]), te = s(() => u ? vr(u.layout, p) : [], [u, p]), [ne, T] = l([]);
984
+ return u ? !m && !t.routesReady ? /* @__PURE__ */ I("p", {
985
985
  className: "stage-note",
986
986
  children: [
987
987
  "The modeled command “",
988
988
  u.command,
989
989
  "” is waiting for Stage routes."
990
990
  ]
991
- }) : m ? p.length === 0 && !f && e.properties.parameterless !== !0 ? /* @__PURE__ */ I(Ln, {
991
+ }) : m ? p.length === 0 && !f && e.properties.parameterless !== !0 ? /* @__PURE__ */ F(Bn, {
992
992
  form: u,
993
993
  messages: [`The modeled command “${u.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
994
- }) : ee.length > 0 ? /* @__PURE__ */ I(Ln, {
994
+ }) : ee.length > 0 ? /* @__PURE__ */ F(Bn, {
995
995
  form: u,
996
996
  messages: ee
997
- }) : /* @__PURE__ */ I("section", {
997
+ }) : /* @__PURE__ */ F("section", {
998
998
  ref: o,
999
999
  className: "stage-command-form",
1000
1000
  "data-command": u.command,
1001
1001
  "data-generation-mode": u.generationMode,
1002
- children: /* @__PURE__ */ L(Ge, {
1002
+ children: /* @__PURE__ */ I(Je, {
1003
1003
  command: m,
1004
1004
  initialValues: C,
1005
1005
  currentValues: g,
1006
1006
  validateOn: "both",
1007
1007
  validateAllFieldsOnChange: !0,
1008
- onBeforeExecute: (e) => tn(e, n.apiBasePath),
1009
- onFieldValidate: (e, t, n, r) => pr(p, d, t, r),
1010
- onValidationFailure: (e) => T(fr(p, e)),
1008
+ onBeforeExecute: (e) => an(e, n.apiBasePath),
1009
+ onFieldValidate: (e, t, n, r) => gr(p, d, t, r),
1010
+ onValidationFailure: (e) => T(hr(p, e)),
1011
1011
  onException: (e) => T(e),
1012
- onFailed: (e) => T(rn(u.command, e).messages),
1012
+ onFailed: (e) => T(sn(u.command, e).messages),
1013
1013
  onSuccess: () => {
1014
1014
  T([]), t.refreshAfterCommand();
1015
- let n = Y(e, "navigateToScreen");
1016
- n && G(n, {}), r?.();
1015
+ let n = J(e, "navigateToScreen");
1016
+ n && W(n, {}), r?.();
1017
1017
  },
1018
1018
  children: [
1019
- te.map((e) => /* @__PURE__ */ I("p", {
1019
+ te.map((e) => /* @__PURE__ */ F("p", {
1020
1020
  role: "alert",
1021
1021
  className: "stage-form-error",
1022
1022
  children: e
1023
1023
  }, e)),
1024
1024
  w,
1025
- ne.map((e) => /* @__PURE__ */ I("p", {
1025
+ ne.map((e) => /* @__PURE__ */ F("p", {
1026
1026
  role: "alert",
1027
1027
  className: "stage-form-error",
1028
1028
  children: e
1029
1029
  }, e)),
1030
- a ? Ve(/* @__PURE__ */ I("button", {
1030
+ a ? We(/* @__PURE__ */ F("button", {
1031
1031
  type: "button",
1032
1032
  className: "scene-slice-dialog-submit",
1033
1033
  onClick: () => o.current?.querySelector("form")?.requestSubmit(),
1034
1034
  children: h
1035
- }), a) : /* @__PURE__ */ I("button", {
1035
+ }), a) : /* @__PURE__ */ F("button", {
1036
1036
  type: "submit",
1037
1037
  className: "stage-command-form__submit",
1038
1038
  children: h
1039
1039
  })
1040
1040
  ]
1041
1041
  }, v)
1042
- }) : /* @__PURE__ */ L("p", {
1042
+ }) : /* @__PURE__ */ I("p", {
1043
1043
  className: "stage-note",
1044
1044
  children: [
1045
1045
  "The modeled command “",
1046
1046
  u.command,
1047
1047
  "” is not registered by this Stage."
1048
1048
  ]
1049
- }) : /* @__PURE__ */ I("p", {
1049
+ }) : /* @__PURE__ */ F("p", {
1050
1050
  className: "stage-note",
1051
1051
  children: "This form is missing its command metadata."
1052
1052
  });
1053
1053
  }
1054
- function Ln({ form: e, messages: t }) {
1055
- return /* @__PURE__ */ I("section", {
1054
+ function Bn({ form: e, messages: t }) {
1055
+ return /* @__PURE__ */ F("section", {
1056
1056
  className: "stage-command-form",
1057
1057
  "data-command": e.command,
1058
1058
  "data-generation-mode": e.generationMode,
1059
- children: t.map((e) => /* @__PURE__ */ I("p", {
1059
+ children: t.map((e) => /* @__PURE__ */ F("p", {
1060
1060
  role: "alert",
1061
1061
  className: "stage-form-error",
1062
1062
  children: e
1063
1063
  }, e))
1064
1064
  });
1065
1065
  }
1066
- function Rn(e) {
1067
- let t = Y(e, "command");
1066
+ function Vn(e) {
1067
+ let t = J(e, "command");
1068
1068
  if (!t) return;
1069
- let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(X) : [];
1069
+ let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(Y) : [];
1070
1070
  return {
1071
1071
  command: t,
1072
- label: Y(e, "label", t),
1072
+ label: J(e, "label", t),
1073
1073
  fields: n,
1074
- generationMode: or(e.properties.generationMode),
1075
- layout: sr(e.properties.layout)
1074
+ generationMode: lr(e.properties.generationMode),
1075
+ layout: ur(e.properties.layout)
1076
1076
  };
1077
1077
  }
1078
- function zn(e, t) {
1078
+ function Hn(e, t) {
1079
1079
  return e.generationMode === f.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
1080
1080
  name: e.name,
1081
- label: q(e.name)
1081
+ label: K(e.name)
1082
1082
  }));
1083
1083
  }
1084
- function Bn(e, t, n) {
1085
- let r = e.layout, i = r ? cr(r, t) : [];
1086
- if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Vn(e, n));
1087
- let a = new Map(t.map((e) => [e.name, e])), o = lr(r, i), s = {
1088
- gridTemplateColumns: Array.from({ length: o }, (e, t) => ur(t + 1, r.columns)).join(" "),
1089
- columnGap: J(r.columnGap),
1090
- rowGap: J(r.rowGap)
1084
+ function Un(e, t, n) {
1085
+ let r = e.layout, i = r ? dr(r, t) : [];
1086
+ if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Wn(e, n));
1087
+ let a = new Map(t.map((e) => [e.name, e])), o = fr(r, i), s = {
1088
+ gridTemplateColumns: Array.from({ length: o }, (e, t) => pr(t + 1, r.columns)).join(" "),
1089
+ columnGap: q(r.columnGap),
1090
+ rowGap: q(r.rowGap)
1091
1091
  }, c = /* @__PURE__ */ new Set();
1092
- return /* @__PURE__ */ L("div", {
1092
+ return /* @__PURE__ */ I("div", {
1093
1093
  className: "stage-command-form__layout",
1094
1094
  style: s,
1095
1095
  children: [i.map((e) => {
1096
1096
  let t = a.get(e.field);
1097
- return t ? (c.add(t.name), Vn(t, n, e)) : null;
1098
- }), t.filter((e) => !c.has(e.name)).map((e) => Vn(e, n))]
1097
+ return t ? (c.add(t.name), Wn(t, n, e)) : null;
1098
+ }), t.filter((e) => !c.has(e.name)).map((e) => Wn(e, n))]
1099
1099
  });
1100
1100
  }
1101
- function Vn(e, t, n) {
1101
+ function Wn(e, t, n) {
1102
1102
  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 = (() => {
1103
1103
  if (i?.options) {
1104
1104
  let e = i.options.map((e) => ({
1105
1105
  value: e,
1106
- label: q(e)
1106
+ label: K(e)
1107
1107
  }));
1108
- return /* @__PURE__ */ I(Xe, {
1108
+ return /* @__PURE__ */ F($e, {
1109
1109
  value: o,
1110
1110
  fieldName: r,
1111
1111
  title: a,
@@ -1115,7 +1115,7 @@ function Vn(e, t, n) {
1115
1115
  optionLabel: "label"
1116
1116
  });
1117
1117
  }
1118
- if (i?.members || i?.item) return /* @__PURE__ */ I(xn, {
1118
+ if (i?.members || i?.item) return /* @__PURE__ */ F(wn, {
1119
1119
  value: o,
1120
1120
  fieldName: r,
1121
1121
  title: a,
@@ -1123,19 +1123,19 @@ function Vn(e, t, n) {
1123
1123
  descriptor: i
1124
1124
  });
1125
1125
  switch (i?.type ?? "text") {
1126
- case "number": return /* @__PURE__ */ I(Qe, {
1126
+ case "number": return /* @__PURE__ */ F(tt, {
1127
1127
  value: o,
1128
1128
  fieldName: r,
1129
1129
  title: a,
1130
1130
  required: s
1131
1131
  });
1132
- case "boolean": return /* @__PURE__ */ I(Ye, {
1132
+ case "boolean": return /* @__PURE__ */ F(Qe, {
1133
1133
  value: o,
1134
1134
  fieldName: r,
1135
1135
  label: a,
1136
1136
  required: s
1137
1137
  });
1138
- case "date": return /* @__PURE__ */ I(Hn, {
1138
+ case "date": return /* @__PURE__ */ F(Gn, {
1139
1139
  value: o,
1140
1140
  fieldName: r,
1141
1141
  title: a,
@@ -1143,15 +1143,15 @@ function Vn(e, t, n) {
1143
1143
  showIcon: !0,
1144
1144
  showTime: i?.withTime
1145
1145
  });
1146
- default: return /* @__PURE__ */ I(Ze, {
1146
+ default: return /* @__PURE__ */ F(et, {
1147
1147
  value: o,
1148
1148
  fieldName: r,
1149
1149
  title: a,
1150
1150
  required: s
1151
1151
  });
1152
1152
  }
1153
- })(), l = dr(n);
1154
- return /* @__PURE__ */ I("span", {
1153
+ })(), l = mr(n);
1154
+ return /* @__PURE__ */ F("span", {
1155
1155
  className: "stage-command-form__field",
1156
1156
  "data-field": e.name,
1157
1157
  "data-row": n?.row,
@@ -1161,21 +1161,21 @@ function Vn(e, t, n) {
1161
1161
  children: c
1162
1162
  }, e.name);
1163
1163
  }
1164
- var Hn = qe((e) => /* @__PURE__ */ I(Je, {
1164
+ var Gn = Xe((e) => /* @__PURE__ */ F(Ze, {
1165
1165
  ...e,
1166
- currentValue: e.showTime ? e.currentValue : Un(e.currentValue),
1167
- onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? He.fromDate(t) : t)
1166
+ currentValue: e.showTime ? e.currentValue : Kn(e.currentValue),
1167
+ onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? Ge.fromDate(t) : t)
1168
1168
  }));
1169
- function Un(e) {
1170
- if (e instanceof He) return e.toDate();
1169
+ function Kn(e) {
1170
+ if (e instanceof Ge) return e.toDate();
1171
1171
  if (typeof e != "string") return e;
1172
1172
  try {
1173
- return He.parse(e).toDate();
1173
+ return Ge.parse(e).toDate();
1174
1174
  } catch {
1175
1175
  return null;
1176
1176
  }
1177
1177
  }
1178
- function Wn(e, t) {
1178
+ function qn(e, t) {
1179
1179
  let n = {};
1180
1180
  for (let r of e) {
1181
1181
  let e = r.sourceProperty ?? r.name, i = t[e];
@@ -1183,35 +1183,35 @@ function Wn(e, t) {
1183
1183
  }
1184
1184
  return n;
1185
1185
  }
1186
- function Gn(e, t, n, r = [], i = [], a = !1) {
1186
+ function Jn(e, t, n, r = [], i = [], a = !1) {
1187
1187
  let o = new Set(e.map((e) => e.sourceProperty ?? e.name)), s = t.some((e) => e.identity), c = {};
1188
1188
  for (let e of t) {
1189
1189
  if (!e.identifier || !e.required || o.has(e.name)) continue;
1190
- if (a && Yn(e, i)) {
1191
- let t = n[e.name] || Jn(e, r);
1190
+ if (a && Qn(e, i)) {
1191
+ let t = n[e.name] || Zn(e, r);
1192
1192
  t && (c[e.name] = t);
1193
1193
  continue;
1194
1194
  }
1195
- let t = n[e.name] || Jn(e, r) || Pt(e.identifier) || (e.identity || !s && !Yn(e, i) ? Ft(e.identifier) : void 0);
1195
+ let t = n[e.name] || Zn(e, r) || Lt(e.identifier) || (e.identity || !s && !Qn(e, i) ? Rt(e.identifier) : void 0);
1196
1196
  t !== void 0 && (c[e.name] = t);
1197
1197
  }
1198
1198
  return c;
1199
1199
  }
1200
- function Kn(e, t) {
1201
- return !e.identifier || !e.required ? !1 : e.identity === !0 || qn(e, t) !== void 0;
1200
+ function Yn(e, t) {
1201
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || Xn(e, t) !== void 0;
1202
1202
  }
1203
- function qn(e, t) {
1204
- if (e.identifier) return t[e.name] || Pt(e.identifier);
1203
+ function Xn(e, t) {
1204
+ if (e.identifier) return t[e.name] || Lt(e.identifier);
1205
1205
  }
1206
- function Jn(e, t) {
1206
+ function Zn(e, t) {
1207
1207
  if (!e.identifier) return;
1208
1208
  let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
1209
1209
  return n.size === 1 ? [...n][0] : void 0;
1210
1210
  }
1211
- function Yn(e, t) {
1211
+ function Qn(e, t) {
1212
1212
  return t.some((t) => Object.hasOwn(t, e.name));
1213
1213
  }
1214
- function Xn(e, t) {
1214
+ function $n(e, t) {
1215
1215
  let n = e.id;
1216
1216
  if (typeof n != "string" || n === "") return e;
1217
1217
  let r = `${t.alias ?? ""} ${t.name ?? ""}`.match(/[A-Z][a-z0-9]+/g) ?? [], i = Object.fromEntries(r.map((e) => `${e.charAt(0).toLowerCase()}${e.slice(1)}Id`).filter((t) => !Object.hasOwn(e, t)).map((e) => [e, n]));
@@ -1220,96 +1220,96 @@ function Xn(e, t) {
1220
1220
  ...e
1221
1221
  };
1222
1222
  }
1223
- function Zn(e) {
1224
- return Object.values(e).flatMap((e) => e.rows.map((t) => [t, Xn(t, e)]));
1223
+ function er(e) {
1224
+ return Object.values(e).flatMap((e) => e.rows.map((t) => [t, $n(t, e)]));
1225
1225
  }
1226
- function Qn(e) {
1227
- return Zn(e).map(([, e]) => e);
1226
+ function tr(e) {
1227
+ return er(e).map(([, e]) => e);
1228
1228
  }
1229
- function $n(e, t) {
1230
- let n = new Map(Zn(t));
1229
+ function nr(e, t) {
1230
+ let n = new Map(er(t));
1231
1231
  return Object.values(e).filter((e) => e !== void 0).map((e) => n.get(e) ?? e);
1232
1232
  }
1233
- function er(e, t, n, r) {
1234
- return e.filter((e) => e.identifier && e.required && Yn(e, r)).filter((e) => !t[e.name] && Jn(e, n) === void 0).map((e) => e.name);
1233
+ function rr(e, t, n, r) {
1234
+ return e.filter((e) => e.identifier && e.required && Qn(e, r)).filter((e) => !t[e.name] && Zn(e, n) === void 0).map((e) => e.name);
1235
1235
  }
1236
- function tr(e) {
1236
+ function ir(e) {
1237
1237
  let t = e.properties.populateSource;
1238
- return X(t) ? t : void 0;
1238
+ return Y(t) ? t : void 0;
1239
1239
  }
1240
- function nr(e, t, n) {
1241
- let r = tr(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, rr(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = V({
1242
- scope: `populate:${Y(e, "command")}`,
1240
+ function ar(e, t, n) {
1241
+ let r = ir(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, or(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = B({
1242
+ scope: `populate:${J(e, "command")}`,
1243
1243
  name: i,
1244
1244
  route: i ? n.routes?.queries?.[i] : void 0,
1245
1245
  arguments: o,
1246
1246
  ready: c,
1247
1247
  publish: !1
1248
- }), u = r?.itemBinding ? n.resolveBinding(r.itemBinding) ?? n.selected : void 0, d = i ? l.rows[0] : X(u) ? u : void 0;
1248
+ }), u = r?.itemBinding ? n.resolveBinding(r.itemBinding) ?? n.selected : void 0, d = i ? l.rows[0] : Y(u) ? u : void 0;
1249
1249
  return s(() => {
1250
1250
  if (!d) return;
1251
1251
  let e = {};
1252
1252
  for (let n of t) {
1253
1253
  let t = d[n.name] ?? d[n.name.charAt(0).toLowerCase() + n.name.slice(1)];
1254
- t != null && (e[n.name] = yn(n, t));
1254
+ t != null && (e[n.name] = Sn(n, t));
1255
1255
  }
1256
1256
  return Object.keys(e).length > 0 ? e : void 0;
1257
1257
  }, [d, t]);
1258
1258
  }
1259
- function rr(e, t, n, r) {
1259
+ function or(e, t, n, r) {
1260
1260
  let i = r.parameters[t] ?? r.parameters[e];
1261
1261
  if (i) return i;
1262
1262
  let a = n.find((n) => n.name === t || n.name === e)?.identifier;
1263
- if (a) return Ft(a);
1263
+ if (a) return Rt(a);
1264
1264
  let o = r.resolveBinding({ path: t });
1265
1265
  return typeof o == "string" || typeof o == "number" ? o : void 0;
1266
1266
  }
1267
- function ir(e, t, n) {
1268
- let r = s(() => ar(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1267
+ function sr(e, t, n) {
1268
+ let r = s(() => cr(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1269
1269
  return s(() => {
1270
1270
  let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
1271
1271
  return Object.keys(e).length > 0 ? e : void 0;
1272
1272
  }, [r, a]);
1273
1273
  }
1274
- function ar(e, t) {
1274
+ function cr(e, t) {
1275
1275
  let n = e.properties.arguments;
1276
1276
  if (!Array.isArray(n)) return [];
1277
1277
  let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
1278
1278
  return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
1279
1279
  }
1280
- function or(e) {
1280
+ function lr(e) {
1281
1281
  return e === f.Manual ? f.Manual : f.Auto;
1282
1282
  }
1283
- function sr(e) {
1284
- if (!X(e)) return;
1283
+ function ur(e) {
1284
+ if (!Y(e)) return;
1285
1285
  let t = e;
1286
1286
  return {
1287
- columns: Array.isArray(t.columns) ? t.columns.filter(_r) : [],
1288
- placements: Array.isArray(t.placements) ? t.placements.filter(vr) : [],
1289
- columnGap: yr(t.columnGap) ? t.columnGap : void 0,
1290
- rowGap: yr(t.rowGap) ? t.rowGap : void 0
1287
+ columns: Array.isArray(t.columns) ? t.columns.filter(br) : [],
1288
+ placements: Array.isArray(t.placements) ? t.placements.filter(xr) : [],
1289
+ columnGap: Sr(t.columnGap) ? t.columnGap : void 0,
1290
+ rowGap: Sr(t.rowGap) ? t.rowGap : void 0
1291
1291
  };
1292
1292
  }
1293
- function cr(e, t) {
1293
+ function dr(e, t) {
1294
1294
  let n = new Map(e.placements.map((e) => [e.field, e]));
1295
- for (let e of t) !n.has(e.name) && vr(e.placement) && n.set(e.name, e.placement);
1295
+ for (let e of t) !n.has(e.name) && xr(e.placement) && n.set(e.name, e.placement);
1296
1296
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
1297
1297
  }
1298
- function lr(e, t) {
1298
+ function fr(e, t) {
1299
1299
  return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
1300
1300
  }
1301
- function ur(e, t) {
1302
- let n = t.find((t) => t.index === e), r = J(n?.width), i = J(n?.minWidth), a = J(n?.maxWidth);
1301
+ function pr(e, t) {
1302
+ let n = t.find((t) => t.index === e), r = q(n?.width), i = q(n?.minWidth), a = q(n?.maxWidth);
1303
1303
  return n?.width?.unit === p.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
1304
1304
  }
1305
- function dr(e) {
1305
+ function mr(e) {
1306
1306
  if (e) return {
1307
1307
  gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
1308
1308
  gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
1309
- width: e.width?.unit === p.Fraction ? void 0 : J(e.width)
1309
+ width: e.width?.unit === p.Fraction ? void 0 : q(e.width)
1310
1310
  };
1311
1311
  }
1312
- function J(e) {
1312
+ function q(e) {
1313
1313
  if (e) switch (e.unit) {
1314
1314
  case p.Fraction: return `${e.value ?? 1}fr`;
1315
1315
  case p.Pixels: return `${e.value ?? 0}px`;
@@ -1317,63 +1317,63 @@ function J(e) {
1317
1317
  case p.Auto: return "auto";
1318
1318
  }
1319
1319
  }
1320
- function fr(e, t) {
1320
+ function hr(e, t) {
1321
1321
  let n = (e, t) => !!e.members?.some((e) => e === t || e.startsWith(`${t}.`)), r = new Set(e.map((e) => t.find((t) => n(t, e.sourceProperty ?? e.name))).filter((e) => e !== void 0));
1322
1322
  return [...new Set(t.filter((e) => !r.has(e)).map((e) => e.message))];
1323
1323
  }
1324
- function pr(e, t, n, r) {
1324
+ function gr(e, t, n, r) {
1325
1325
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
1326
- if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? _n(a, r, i?.label ?? n) : void 0;
1326
+ if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? bn(a, r, i?.label ?? n) : void 0;
1327
1327
  }
1328
- function mr(e, t) {
1328
+ function _r(e, t) {
1329
1329
  let n = new Map(t.map((e) => [e.name, e]));
1330
1330
  return e.flatMap((e) => {
1331
1331
  let t = n.get(e.sourceProperty ?? e.name);
1332
1332
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
1333
1333
  });
1334
1334
  }
1335
- function hr(e, t) {
1335
+ function vr(e, t) {
1336
1336
  if (!e) return [];
1337
- let n = cr(e, t).filter((e) => e.width?.unit === p.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 === p.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.`);
1337
+ let n = dr(e, t).filter((e) => e.width?.unit === p.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 === p.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.`);
1338
1338
  return [...n, ...r];
1339
1339
  }
1340
- function gr(e) {
1341
- return K(Y(e, "schema"));
1340
+ function yr(e) {
1341
+ return G(J(e, "schema"));
1342
1342
  }
1343
- function Y(e, t, n = "") {
1343
+ function J(e, t, n = "") {
1344
1344
  let r = e.properties[t];
1345
1345
  return typeof r == "string" ? r : n;
1346
1346
  }
1347
- function _r(e) {
1348
- return X(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1347
+ function br(e) {
1348
+ return Y(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1349
1349
  }
1350
- function vr(e) {
1351
- return X(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1350
+ function xr(e) {
1351
+ return Y(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1352
1352
  }
1353
- function yr(e) {
1354
- return X(e) && Object.values(p).includes(e.unit);
1353
+ function Sr(e) {
1354
+ return Y(e) && Object.values(p).includes(e.unit);
1355
1355
  }
1356
- function X(e) {
1356
+ function Y(e) {
1357
1357
  return typeof e == "object" && !!e && !Array.isArray(e);
1358
1358
  }
1359
1359
  // src/StageGuardedAction.tsx
1360
- function br(e) {
1360
+ function Cr(e) {
1361
1361
  return typeof e == "object" && !!e && !Array.isArray(e);
1362
1362
  }
1363
- function xr(e, t) {
1363
+ function wr(e, t) {
1364
1364
  let n = e.properties[t];
1365
1365
  return typeof n == "string" ? n : "";
1366
1366
  }
1367
- function Sr(e) {
1367
+ function Tr(e) {
1368
1368
  return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
1369
1369
  }
1370
- function Cr(e) {
1371
- let t = B(), n = xr(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? xr(e, "itemRoute"), i = br(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1370
+ function Er(e) {
1371
+ let t = z(), n = wr(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? wr(e, "itemRoute"), i = Cr(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1372
1372
  for (let [e, n] of Object.entries(i)) {
1373
- let r = br(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1373
+ let r = Cr(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1374
1374
  a[e] = r, (r == null || r === "") && (o = !1);
1375
1375
  }
1376
- let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = V({
1376
+ let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = B({
1377
1377
  scope: `${e.id}:item`,
1378
1378
  name: n || void 0,
1379
1379
  route: r || void 0,
@@ -1389,23 +1389,23 @@ function Cr(e) {
1389
1389
  item: l.rows.length === 1 ? l.rows[0] : void 0
1390
1390
  };
1391
1391
  }
1392
- function wr(e, t) {
1393
- return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, Mt(xt(n) ?? "", t)]));
1392
+ function Dr(e, t) {
1393
+ return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, Ft(wt(n) ?? "", t)]));
1394
1394
  }
1395
- function Tr({ element: e, interactions: t }) {
1396
- let n = B(), r = Cr(e), i = an(), [a, o] = l([]), [c, u] = l(!1), d = xr(e, "label"), f = s(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = br(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1397
- if (!kt(m) || !h || !r.hasSource) {
1398
- let n = r.hasSource ? `${St}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${St}: “${d}” has no data subject to evaluate its guard against.`;
1399
- return /* @__PURE__ */ L("div", {
1395
+ function Or({ element: e, interactions: t }) {
1396
+ let n = z(), r = Er(e), i = cn(), [a, o] = l([]), [c, u] = l(!1), d = wr(e, "label"), f = s(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = Cr(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1397
+ if (!Mt(m) || !h || !r.hasSource) {
1398
+ let n = r.hasSource ? `${Tt}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${Tt}: “${d}” has no data subject to evaluate its guard against.`;
1399
+ return /* @__PURE__ */ I("div", {
1400
1400
  className: "stage-guarded-action",
1401
1401
  "data-scene-id": e.id,
1402
- children: [/* @__PURE__ */ I(R, {
1402
+ children: [/* @__PURE__ */ F(L, {
1403
1403
  type: "button",
1404
1404
  disabled: !0,
1405
1405
  title: n,
1406
1406
  ...t,
1407
1407
  children: d
1408
- }), /* @__PURE__ */ I("p", {
1408
+ }), /* @__PURE__ */ F("p", {
1409
1409
  role: "alert",
1410
1410
  className: "stage-form-error",
1411
1411
  children: n
@@ -1413,41 +1413,41 @@ function Tr({ element: e, interactions: t }) {
1413
1413
  });
1414
1414
  }
1415
1415
  if (!r.item) return null;
1416
- let g = At(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1416
+ let g = Nt(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1417
1417
  if (!_?.command) return null;
1418
- let v = _.command, y = W(v), b = r.item, x = async () => {
1418
+ let v = _.command, y = U(v), b = r.item, x = async () => {
1419
1419
  if (!y) return;
1420
1420
  u(!0);
1421
- let t = await i(v, wr(_, b));
1421
+ let t = await i(v, Dr(_, b));
1422
1422
  if (u(!1), o(t.messages), !t.isSuccess) return;
1423
1423
  n.refreshAfterCommand();
1424
- let r = xr(e, "navigateToScreen"), a = xr(e, "navigateByParameter"), s = a ? Mt(`item.${a}`, b) : void 0;
1425
- r && G(r, a && s != null ? { [a]: String(s) } : {});
1424
+ let r = wr(e, "navigateToScreen"), a = wr(e, "navigateByParameter"), s = a ? Ft(`item.${a}`, b) : void 0;
1425
+ r && W(r, a && s != null ? { [a]: String(s) } : {});
1426
1426
  };
1427
- return /* @__PURE__ */ L("div", {
1427
+ return /* @__PURE__ */ I("div", {
1428
1428
  className: "stage-guarded-action",
1429
1429
  "data-scene-id": e.id,
1430
1430
  "data-command": v,
1431
- children: [/* @__PURE__ */ I(R, {
1431
+ children: [/* @__PURE__ */ F(L, {
1432
1432
  ...t,
1433
1433
  type: "button",
1434
1434
  disabled: !y || c,
1435
1435
  title: y ? void 0 : "This command is not exposed as an API yet",
1436
1436
  onClick: () => void x(),
1437
1437
  children: d
1438
- }), a.map((e) => /* @__PURE__ */ I("p", {
1438
+ }), a.map((e) => /* @__PURE__ */ F("p", {
1439
1439
  role: "alert",
1440
1440
  className: "stage-form-error",
1441
1441
  children: e
1442
1442
  }, e))]
1443
1443
  });
1444
1444
  }
1445
- function Er(e) {
1446
- let t = fe(), n = c(void 0), i = s(() => C(se(e.id, e.behaviors), m.DoubleClick), [e.behaviors, e.id]);
1445
+ function kr(e) {
1446
+ let t = me(), n = c(void 0), i = s(() => C(ce(e.id, e.behaviors), m.DoubleClick), [e.behaviors, e.id]);
1447
1447
  a(() => () => clearTimeout(n.current), []);
1448
1448
  let o = r((e) => {
1449
1449
  if (clearTimeout(n.current), n.current = void 0, !t) return;
1450
- let r = (n) => n.path === "$guard" ? jt(n.value, e) : n.path?.startsWith("item.") ? Mt(n.path, e) : t.context.resolve(n);
1450
+ let r = (n) => n.path === "$guard" ? Pt(n.value, e) : n.path?.startsWith("item.") ? Ft(n.path, e) : t.context.resolve(n);
1451
1451
  te(i, t.dispatcher, {
1452
1452
  ...t.context,
1453
1453
  resolve: r
@@ -1465,12 +1465,12 @@ function Er(e) {
1465
1465
  };
1466
1466
  }
1467
1467
  // src/stageDialogScreens.ts
1468
- var Dr = "Stage:confirmDialog", Or = "ConfirmDialog";
1469
- function kr(e, t) {
1468
+ var Ar = "Stage:confirmDialog", jr = "ConfirmDialog";
1469
+ function Mr(e, t) {
1470
1470
  let n = new Set(t.map((e) => e.name));
1471
1471
  return e.map((t) => {
1472
- if (t.screenTemplate !== Or || n.has(Or)) return t;
1473
- let r = Ar(t), i = e.find((e) => e.name !== t.name)?.name, a = P(`confirm-dialog-${t.name}`, Dr, {
1472
+ if (t.screenTemplate !== jr || n.has(jr)) return t;
1473
+ let r = Nr(t), i = e.find((e) => e.name !== t.name)?.name, a = N(`confirm-dialog-${t.name}`, Ar, {
1474
1474
  title: t.name,
1475
1475
  decisions: r,
1476
1476
  home: i
@@ -1483,99 +1483,99 @@ function kr(e, t) {
1483
1483
  };
1484
1484
  });
1485
1485
  }
1486
- function Ar(e) {
1486
+ function Nr(e) {
1487
1487
  let t = [];
1488
- for (let n of jr(Object.values(e.slotContent).flat())) {
1489
- let r = Mr(n.properties.command);
1488
+ for (let n of Pr(Object.values(e.slotContent).flat())) {
1489
+ let r = X(n.properties.command);
1490
1490
  r && !t.some((e) => e.command === r) && t.push({
1491
1491
  command: r,
1492
- label: Mr(n.properties.label),
1493
- navigateToScreen: Mr(n.properties.navigateToScreen),
1494
- typeName: Mr(n.properties.typeName),
1495
- route: Mr(n.properties.route),
1492
+ label: X(n.properties.label),
1493
+ navigateToScreen: X(n.properties.navigateToScreen),
1494
+ typeName: X(n.properties.typeName),
1495
+ route: X(n.properties.route),
1496
1496
  form: e.forms.find((e) => e.forCommand === r)
1497
1497
  });
1498
1498
  }
1499
1499
  return t;
1500
1500
  }
1501
- function jr(e) {
1501
+ function Pr(e) {
1502
1502
  return e.flatMap((e) => {
1503
1503
  let t = e;
1504
- return t.componentName === "core:action" ? [t] : jr(Object.values(t.slots ?? {}).flat());
1504
+ return t.componentName === "core:action" ? [t] : Pr(Object.values(t.slots ?? {}).flat());
1505
1505
  });
1506
1506
  }
1507
- function Mr(e) {
1507
+ function X(e) {
1508
1508
  return typeof e == "string" && e !== "" ? e : void 0;
1509
1509
  }
1510
1510
  // src/StageConfirmDialog.tsx
1511
- function Nr({ element: e }) {
1512
- let { routes: t, parameters: n, queries: r, selections: i } = B(), [o, s] = l(), u = c(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = $n(i, r);
1513
- return a(() => u.current?.focus(), []), /* @__PURE__ */ L("section", {
1511
+ function Fr({ element: e }) {
1512
+ let { routes: t, parameters: n, queries: r, selections: i } = z(), [o, s] = l(), u = c(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = nr(i, r);
1513
+ return a(() => u.current?.focus(), []), /* @__PURE__ */ I("section", {
1514
1514
  className: "scene-slice-dialog stage-confirm-dialog",
1515
1515
  role: "dialog",
1516
- "aria-label": q(d),
1517
- "data-stage-component": Dr,
1516
+ "aria-label": K(d),
1517
+ "data-stage-component": Ar,
1518
1518
  children: [
1519
- /* @__PURE__ */ I("header", {
1519
+ /* @__PURE__ */ F("header", {
1520
1520
  className: "scene-slice-dialog-header",
1521
- children: /* @__PURE__ */ I("h2", {
1521
+ children: /* @__PURE__ */ F("h2", {
1522
1522
  className: "scene-slice-dialog-title",
1523
- children: q(d)
1523
+ children: K(d)
1524
1524
  })
1525
1525
  }),
1526
- /* @__PURE__ */ I("div", {
1526
+ /* @__PURE__ */ F("div", {
1527
1527
  className: "stage-confirm-dialog__decisions",
1528
- children: f.map((e, t) => /* @__PURE__ */ I("button", {
1528
+ children: f.map((e, t) => /* @__PURE__ */ F("button", {
1529
1529
  ref: t === 0 ? u : void 0,
1530
1530
  type: "button",
1531
1531
  className: t === 0 ? "scene-slice-dialog-submit stage-confirm-dialog__decision" : "scene-slice-dialog-cancel stage-confirm-dialog__decision",
1532
1532
  "data-emphasis": t === 0 ? "primary" : "secondary",
1533
1533
  "aria-pressed": e.command === o,
1534
1534
  onClick: () => s(e.command),
1535
- children: Fr(e)
1535
+ children: Lr(e)
1536
1536
  }, e.command))
1537
1537
  }),
1538
- m && /* @__PURE__ */ I(Mn, { children: /* @__PURE__ */ I(In, { element: Rr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command) }),
1539
- /* @__PURE__ */ I("footer", {
1538
+ m && /* @__PURE__ */ F(Fn, { children: /* @__PURE__ */ F(zn, { element: Br(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command) }),
1539
+ /* @__PURE__ */ F("footer", {
1540
1540
  className: "scene-slice-dialog-footer",
1541
- children: /* @__PURE__ */ I("button", {
1541
+ children: /* @__PURE__ */ F("button", {
1542
1542
  type: "button",
1543
1543
  className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
1544
- onClick: () => Pr(f, p),
1544
+ onClick: () => Ir(f, p),
1545
1545
  children: "Cancel"
1546
1546
  })
1547
1547
  })
1548
1548
  ]
1549
1549
  });
1550
1550
  }
1551
- function Pr(e, t) {
1551
+ function Ir(e, t) {
1552
1552
  let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
1553
- r && G(r, {});
1553
+ r && W(r, {});
1554
1554
  }
1555
- function Fr(e) {
1556
- return e.label ?? q(e.command);
1555
+ function Lr(e) {
1556
+ return e.label ?? K(e.command);
1557
1557
  }
1558
- function Ir(e, t, n) {
1559
- return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Jn(e, n) !== void 0;
1558
+ function Rr(e, t, n) {
1559
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Zn(e, n) !== void 0;
1560
1560
  }
1561
- function Lr(e, t, n, r) {
1561
+ function zr(e, t, n, r) {
1562
1562
  let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
1563
1563
  name: e.name,
1564
1564
  label: e.name
1565
- })), o = new Set(t.filter((e) => Ir(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
1565
+ })), o = new Set(t.filter((e) => Rr(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
1566
1566
  return [...s, ...l.map((e) => ({
1567
1567
  name: e.name,
1568
- label: q(e.name)
1568
+ label: K(e.name)
1569
1569
  }))];
1570
1570
  }
1571
- function Rr(e, t, n, r) {
1572
- let i = Lr(e, K(t), n, r);
1571
+ function Br(e, t, n, r) {
1572
+ let i = zr(e, G(t), n, r);
1573
1573
  return {
1574
1574
  id: `confirm-${e.command}`,
1575
- componentName: Dr,
1575
+ componentName: Ar,
1576
1576
  properties: {
1577
1577
  command: e.command,
1578
- label: Fr(e),
1578
+ label: Lr(e),
1579
1579
  submitLabel: "Confirm",
1580
1580
  typeName: e.typeName,
1581
1581
  route: e.route,
@@ -1589,9 +1589,108 @@ function Rr(e, t, n, r) {
1589
1589
  slots: {}
1590
1590
  };
1591
1591
  }
1592
- // src/stageComponents.tsx
1593
- var zr = "Stage:commandForm";
1594
- function Br(e, t, n = {}) {
1592
+ function Vr(e) {
1593
+ return typeof e == "object" && !!e && !Array.isArray(e);
1594
+ }
1595
+ function Hr(e, t) {
1596
+ if (!Array.isArray(e) || !Array.isArray(t)) return;
1597
+ let n = new Map(e.filter(Vr).map((e) => [JSON.stringify(e.id), e.column]));
1598
+ for (let e of t.filter(Vr)) {
1599
+ let t = JSON.stringify(e.id);
1600
+ if (n.has(t) && n.get(t) !== e.column) return {
1601
+ item: {
1602
+ id: e.id,
1603
+ column: e.column
1604
+ },
1605
+ previous: n.get(t)
1606
+ };
1607
+ }
1608
+ }
1609
+ function Ur(e, t, n, r) {
1610
+ if (!Array.isArray(e)) return;
1611
+ let i = e.filter(Vr).find((e) => JSON.stringify(e[n]) === JSON.stringify(t.item.id));
1612
+ if (i !== void 0) return {
1613
+ item: {
1614
+ ...i,
1615
+ [r]: t.item.column
1616
+ },
1617
+ value: t.item.column,
1618
+ previous: t.previous
1619
+ };
1620
+ }
1621
+ function Wr(e, t) {
1622
+ return (n) => n.path === "$guard" ? Pt(n.value, e.item) : n.path === "value" ? e.value : n.path === "previous" ? e.previous : n.path?.startsWith("item.") ? Ft(n.path, e.item) : t(n);
1623
+ }
1624
+ function Gr(e, t) {
1625
+ let n = me(), i = z(), { element: a, rowsProperty: o, idField: u, valueField: d } = e, f = s(() => C(ce(a.id, a.behaviors), m.Change), [a.behaviors, a.id]), p = c(void 0), h = c(!1), [g, _] = l(0), v = c({
1626
+ scope: n,
1627
+ data: i,
1628
+ element: a,
1629
+ bindings: f
1630
+ });
1631
+ v.current = {
1632
+ scope: n,
1633
+ data: i,
1634
+ element: a,
1635
+ bindings: f
1636
+ };
1637
+ let y = r((e, t) => {
1638
+ let { scope: n, data: r, element: i, bindings: a } = v.current, s = Hr(e, t);
1639
+ if (!n || a.length === 0 || s === void 0) return;
1640
+ let c = Ur(i.properties[o], s, u, d);
1641
+ if (c === void 0) return;
1642
+ let l = {
1643
+ ...n.context,
1644
+ resolve: Wr(c, n.context.resolve)
1645
+ }, f = !1, p = !1, m = {
1646
+ ...n.dispatcher,
1647
+ executeCommand: async (e, t) => {
1648
+ let r = await n.dispatcher.executeCommand(e, t);
1649
+ return r?.isSuccess ? f = !0 : p = !0, r;
1650
+ }
1651
+ };
1652
+ te(a, m, l).then((e) => {
1653
+ e.findings.length > 0 && n.onFindings?.(e.findings), r.refreshAfterCommand(), (!f || p) && _((e) => e + 1);
1654
+ });
1655
+ }, [
1656
+ o,
1657
+ u,
1658
+ d
1659
+ ]), b = r(() => {
1660
+ h.current = !0;
1661
+ }, []), x = s(() => t === void 0 ? void 0 : {
1662
+ ...t,
1663
+ setOutput: (e, n) => {
1664
+ if (t.setOutput(e, n), e !== "value") return;
1665
+ let r = p.current;
1666
+ p.current = n, h.current && (h.current = !1, y(r, n));
1667
+ }
1668
+ }, [t, y]);
1669
+ return {
1670
+ declared: f.length > 0,
1671
+ onChange: b,
1672
+ outputs: x,
1673
+ revision: g
1674
+ };
1675
+ }
1676
+ function Kr(e) {
1677
+ let t = e.element, n = typeof t.properties.cardColumn == "string" ? t.properties.cardColumn : "column", r = Gr({
1678
+ element: t,
1679
+ rowsProperty: "cards",
1680
+ idField: typeof t.properties.cardId == "string" ? t.properties.cardId : "id",
1681
+ valueField: n
1682
+ }, e.bindingOutputs), i = xe;
1683
+ return r.declared ? /* @__PURE__ */ F(i, {
1684
+ ...e,
1685
+ interactions: {
1686
+ ...e.interactions,
1687
+ onChange: r.onChange
1688
+ },
1689
+ bindingOutputs: r.outputs
1690
+ }, r.revision) : /* @__PURE__ */ F(i, { ...e });
1691
+ }
1692
+ var qr = le(Ee, j.KanbanBoard), Jr = "Stage:commandForm";
1693
+ function Yr(e, t, n = {}) {
1595
1694
  return {
1596
1695
  id: e,
1597
1696
  componentName: "",
@@ -1603,19 +1702,19 @@ function Z(e, t, n = "") {
1603
1702
  let r = e.properties[t];
1604
1703
  return typeof r == "string" ? r : n;
1605
1704
  }
1606
- function Vr(e, t, n) {
1705
+ function Xr(e, t, n) {
1607
1706
  let r = typeof e == "number" && Number.isInteger(e) ? n && n.length === t?.length ? t?.[n.indexOf(e)] : t?.[e] : e;
1608
- return typeof r == "string" && t?.includes(r) ? q(r) : String(e ?? "");
1707
+ return typeof r == "string" && t?.includes(r) ? K(r) : String(e ?? "");
1609
1708
  }
1610
- function Hr(e, t) {
1709
+ function Zr(e, t) {
1611
1710
  let n = e.properties.queryArguments;
1612
- if (!Kr(n)) return {
1711
+ if (!ti(n)) return {
1613
1712
  values: {},
1614
1713
  ready: !0
1615
1714
  };
1616
1715
  let r = {}, i = !0;
1617
1716
  for (let [e, a] of Object.entries(n)) {
1618
- let n = Gr(a) ? t.resolveBinding(a) : a;
1717
+ let n = ei(a) ? t.resolveBinding(a) : a;
1619
1718
  r[e] = n, (n == null || n === "") && (i = !1);
1620
1719
  }
1621
1720
  return {
@@ -1623,7 +1722,7 @@ function Hr(e, t) {
1623
1722
  ready: i
1624
1723
  };
1625
1724
  }
1626
- function Ur(e, t) {
1725
+ function Qr(e, t) {
1627
1726
  let n = (e.slots.columns ?? []).map((e) => {
1628
1727
  let t = e.properties;
1629
1728
  return {
@@ -1641,14 +1740,14 @@ function Ur(e, t) {
1641
1740
  function Q(e, t) {
1642
1741
  return e[t] ?? e.id ?? e.key;
1643
1742
  }
1644
- function Wr({ element: e, slots: t }) {
1645
- let n = B(), r = Z(e, "query", Z(e, "typeName", e.id)), i = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), o = s(() => Hr(e, n), [n, e]), { rows: c, error: l, loading: u } = V({
1743
+ function $r({ element: e, slots: t }) {
1744
+ let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)), i = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), o = s(() => Zr(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
1646
1745
  scope: e.id,
1647
1746
  name: r,
1648
1747
  route: i || void 0,
1649
1748
  arguments: o.values,
1650
1749
  ready: o.ready
1651
- }), d = Ur(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);
1750
+ }), d = Qr(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, _ = kr(e);
1652
1751
  a(() => {
1653
1752
  if (!h) return;
1654
1753
  let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
@@ -1685,13 +1784,13 @@ function Wr({ element: e, slots: t }) {
1685
1784
  ...f && f !== n.screen ? {} : n.parameters,
1686
1785
  [p]: String(r)
1687
1786
  };
1688
- f && f !== n.screen || n.selectRow(e.id, t), G(f || n.screen, i);
1787
+ f && f !== n.screen || n.selectRow(e.id, t), W(f || n.screen, i);
1689
1788
  } else n.selectRow(e.id, t);
1690
1789
  };
1691
- return !Z(e, "query") && !i && !gt(r) ? /* @__PURE__ */ L("section", {
1790
+ return !Z(e, "query") && !i && !yt(r) ? /* @__PURE__ */ I("section", {
1692
1791
  className: "stage-table",
1693
1792
  "data-scene-id": e.id,
1694
- children: [/* @__PURE__ */ L("p", {
1793
+ children: [/* @__PURE__ */ I("p", {
1695
1794
  className: "stage-note",
1696
1795
  children: [
1697
1796
  "No query is exposed for ",
@@ -1699,34 +1798,34 @@ function Wr({ element: e, slots: t }) {
1699
1798
  " yet."
1700
1799
  ]
1701
1800
  }), t.columns]
1702
- }) : /* @__PURE__ */ L("section", {
1801
+ }) : /* @__PURE__ */ I("section", {
1703
1802
  className: "stage-table",
1704
1803
  "data-scene-id": e.id,
1705
1804
  children: [
1706
- u && /* @__PURE__ */ I(Be, {
1805
+ u && /* @__PURE__ */ F(Ue, {
1707
1806
  severity: "info",
1708
1807
  text: "Loading…"
1709
1808
  }),
1710
- l && /* @__PURE__ */ I(Be, {
1809
+ l && /* @__PURE__ */ F(Ue, {
1711
1810
  severity: "error",
1712
1811
  text: l
1713
1812
  }),
1714
- h && /* @__PURE__ */ I(R, {
1813
+ h && /* @__PURE__ */ F(L, {
1715
1814
  type: "button",
1716
1815
  size: "small",
1717
1816
  onClick: () => {
1718
1817
  if (n.clearSelection(e.id), !p || n.parameters[p] === void 0) return;
1719
1818
  let { [p]: t, ...r } = n.parameters;
1720
- G(n.screen, r);
1819
+ W(n.screen, r);
1721
1820
  },
1722
1821
  children: "Clear selection"
1723
1822
  }),
1724
- /* @__PURE__ */ L("table", {
1823
+ /* @__PURE__ */ I("table", {
1725
1824
  "aria-label": Z(e, "label", Z(e, "typeName", "Results")),
1726
- children: [/* @__PURE__ */ I("thead", { children: /* @__PURE__ */ I("tr", { children: d.map((e) => /* @__PURE__ */ I("th", {
1825
+ children: [/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ F("tr", { children: d.map((e) => /* @__PURE__ */ F("th", {
1727
1826
  scope: "col",
1728
1827
  children: e.label
1729
- }, e.property)) }) }), /* @__PURE__ */ L("tbody", { children: [c.map((e, t) => /* @__PURE__ */ I("tr", {
1828
+ }, e.property)) }) }), /* @__PURE__ */ I("tbody", { children: [c.map((e, t) => /* @__PURE__ */ F("tr", {
1730
1829
  "aria-selected": h === e,
1731
1830
  tabIndex: 0,
1732
1831
  onClick: () => _.click(e, () => v(e)),
@@ -1734,8 +1833,8 @@ function Wr({ element: e, slots: t }) {
1734
1833
  onKeyDown: (t) => {
1735
1834
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
1736
1835
  },
1737
- children: d.map((t) => /* @__PURE__ */ I("td", { children: Vr(e[t.property], t.options, t.optionValues) }, t.property))
1738
- }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ I("tr", { children: /* @__PURE__ */ I("td", {
1836
+ children: d.map((t) => /* @__PURE__ */ F("td", { children: Xr(e[t.property], t.options, t.optionValues) }, t.property))
1837
+ }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ F("tr", { children: /* @__PURE__ */ F("td", {
1739
1838
  colSpan: Math.max(d.length, 1),
1740
1839
  children: "No records found"
1741
1840
  }) })] })]
@@ -1743,35 +1842,35 @@ function Wr({ element: e, slots: t }) {
1743
1842
  ]
1744
1843
  });
1745
1844
  }
1746
- function Gr(e) {
1747
- return Kr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1845
+ function ei(e) {
1846
+ return ti(e) && (typeof e.path == "string" || typeof e.kind == "string");
1748
1847
  }
1749
- function Kr(e) {
1848
+ function ti(e) {
1750
1849
  return typeof e == "object" && !!e && !Array.isArray(e);
1751
1850
  }
1752
- function qr({ element: e, interactions: t, slots: n }) {
1753
- return Sr(e) ? /* @__PURE__ */ I(Tr, {
1851
+ function ni({ element: e, interactions: t, slots: n }) {
1852
+ return Tr(e) ? /* @__PURE__ */ F(Or, {
1754
1853
  element: e,
1755
1854
  interactions: t
1756
- }) : /* @__PURE__ */ I(Jr, {
1855
+ }) : /* @__PURE__ */ F(ri, {
1757
1856
  element: e,
1758
1857
  interactions: t,
1759
1858
  slots: n
1760
1859
  });
1761
1860
  }
1762
- function Jr({ element: e, interactions: t }) {
1763
- let n = Z(e, "label", Z(e, "command")), r = W(Z(e, "command"), Z(e, "typeName"), Z(e, "route")), i = Yr(e);
1764
- return r ? i.length > 0 ? /* @__PURE__ */ I(R, {
1861
+ function ri({ element: e, interactions: t }) {
1862
+ let n = Z(e, "label", Z(e, "command")), r = U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")), i = ii(e);
1863
+ return r ? i.length > 0 ? /* @__PURE__ */ F(L, {
1765
1864
  type: "button",
1766
1865
  "data-scene-id": e.id,
1767
1866
  disabled: !0,
1768
1867
  title: "Select a row first",
1769
1868
  ...t,
1770
1869
  children: n
1771
- }) : /* @__PURE__ */ I(Zr, {
1870
+ }) : /* @__PURE__ */ F(oi, {
1772
1871
  element: e,
1773
1872
  label: n
1774
- }) : /* @__PURE__ */ I(R, {
1873
+ }) : /* @__PURE__ */ F(L, {
1775
1874
  type: "button",
1776
1875
  "data-scene-id": e.id,
1777
1876
  disabled: !0,
@@ -1780,28 +1879,28 @@ function Jr({ element: e, interactions: t }) {
1780
1879
  children: n
1781
1880
  });
1782
1881
  }
1783
- function Yr(e) {
1784
- let { parameters: t } = B(), n = Z(e, "schema"), r = e.properties.fields, i = Z(e, "generationMode").toLowerCase(), a = s(() => K(n), [n]), { selectableRows: o, selectedRows: c } = Nn(), l = Array.isArray(r) ? r : [], u = l.length > 0 || i === "manual" ? new Set(l.map(Xr).filter((e) => e !== "")) : void 0;
1785
- return u ? er(a.filter((e) => !u.has(e.name)), t, c, o) : [];
1882
+ function ii(e) {
1883
+ let { parameters: t } = z(), n = Z(e, "schema"), r = e.properties.fields, i = Z(e, "generationMode").toLowerCase(), a = s(() => G(n), [n]), { selectableRows: o, selectedRows: c } = In(), l = Array.isArray(r) ? r : [], u = l.length > 0 || i === "manual" ? new Set(l.map(ai).filter((e) => e !== "")) : void 0;
1884
+ return u ? rr(a.filter((e) => !u.has(e.name)), t, c, o) : [];
1786
1885
  }
1787
- function Xr(e) {
1788
- return Kr(e) ? typeof e.sourceProperty == "string" && e.sourceProperty !== "" ? e.sourceProperty : typeof e.name == "string" ? e.name : "" : "";
1886
+ function ai(e) {
1887
+ return ti(e) ? typeof e.sourceProperty == "string" && e.sourceProperty !== "" ? e.sourceProperty : typeof e.name == "string" ? e.name : "" : "";
1789
1888
  }
1790
- function Zr({ element: e, label: t }) {
1889
+ function oi({ element: e, label: t }) {
1791
1890
  let [n, i] = l(0), [a, o] = l(!1), s = r(() => {
1792
1891
  o(!1), i((e) => e + 1);
1793
- }, []), c = /* @__PURE__ */ I(Pn.Provider, {
1892
+ }, []), c = /* @__PURE__ */ F(Ln.Provider, {
1794
1893
  value: s,
1795
- children: /* @__PURE__ */ I(In, { element: e }, n)
1894
+ children: /* @__PURE__ */ F(zn, { element: e }, n)
1796
1895
  });
1797
- return /* @__PURE__ */ L("div", {
1896
+ return /* @__PURE__ */ I("div", {
1798
1897
  className: "stage-action",
1799
1898
  "data-scene-id": e.id,
1800
- children: [/* @__PURE__ */ I(R, {
1899
+ children: [/* @__PURE__ */ F(L, {
1801
1900
  type: "button",
1802
1901
  onClick: () => o(!0),
1803
1902
  children: t
1804
- }), /* @__PURE__ */ I(ze, {
1903
+ }), /* @__PURE__ */ F(He, {
1805
1904
  title: t,
1806
1905
  visible: a,
1807
1906
  onClose: () => o(!1),
@@ -1811,45 +1910,45 @@ function Zr({ element: e, label: t }) {
1811
1910
  })]
1812
1911
  });
1813
1912
  }
1814
- function Qr(e) {
1815
- let t = e.element ?? Br("slice-dialog", {}), n = pe(), { routes: i, parameters: a } = B(), o = de(n?.currentDialogParameters), c = Z(t, "command") || o?.command || Z(t, "slice") || "", u = Z(t, "title") || o?.title || c, d = i?.commandSchemas?.[c], f = s(() => K(d ?? ""), [d]), { selectableRows: p, selectedRows: m } = Nn(), h = r(() => n?.closeDialog(), [n]), [g, _] = l(null), v = (e) => e.identifier && e.required && Yn(e, p) && Jn(e, m) !== void 0;
1816
- if (!d || !(f.some((e) => e.options || e.members || e.item) || f.some(v))) return e.element ? /* @__PURE__ */ I(T, {
1913
+ function si(e) {
1914
+ let t = e.element ?? Yr("slice-dialog", {}), n = he(), { routes: i, parameters: a } = z(), o = pe(n?.currentDialogParameters), c = Z(t, "command") || o?.command || Z(t, "slice") || "", u = Z(t, "title") || o?.title || c, d = i?.commandSchemas?.[c], f = s(() => G(d ?? ""), [d]), { selectableRows: p, selectedRows: m } = In(), h = r(() => n?.closeDialog(), [n]), [g, _] = l(null), v = (e) => e.identifier && e.required && Qn(e, p) && Zn(e, m) !== void 0;
1915
+ if (!d || !(f.some((e) => e.options || e.members || e.item) || f.some(v))) return e.element ? /* @__PURE__ */ F(T, {
1817
1916
  element: e.element,
1818
1917
  slots: e.slots ?? {}
1819
- }) : /* @__PURE__ */ I(ae, {});
1820
- let y = f.filter((e) => !Kn(e, a) && !v(e)), b = Br(`slice-dialog-${c}`, {
1918
+ }) : /* @__PURE__ */ F(oe, {});
1919
+ let y = f.filter((e) => !Yn(e, a) && !v(e)), b = Yr(`slice-dialog-${c}`, {
1821
1920
  command: c,
1822
1921
  label: u,
1823
1922
  schema: d,
1824
1923
  fields: y.map((e) => ({
1825
1924
  name: e.name,
1826
- label: q(e.name)
1925
+ label: K(e.name)
1827
1926
  })),
1828
1927
  generationMode: "manual"
1829
1928
  });
1830
- return /* @__PURE__ */ L("section", {
1929
+ return /* @__PURE__ */ I("section", {
1831
1930
  className: "scene-slice-dialog",
1832
1931
  "data-scene-slice-dialog": Z(t, "slice") || o?.slice,
1833
1932
  "data-scene-command": c,
1834
1933
  children: [
1835
- /* @__PURE__ */ I("header", {
1934
+ /* @__PURE__ */ F("header", {
1836
1935
  className: "scene-slice-dialog-header",
1837
- children: /* @__PURE__ */ I("h2", {
1936
+ children: /* @__PURE__ */ F("h2", {
1838
1937
  className: "scene-slice-dialog-title",
1839
1938
  children: u
1840
1939
  })
1841
1940
  }),
1842
- /* @__PURE__ */ I(Pn.Provider, {
1941
+ /* @__PURE__ */ F(Ln.Provider, {
1843
1942
  value: h,
1844
- children: /* @__PURE__ */ I(Fn.Provider, {
1943
+ children: /* @__PURE__ */ F(Rn.Provider, {
1845
1944
  value: g,
1846
- children: /* @__PURE__ */ I(In, { element: b })
1945
+ children: /* @__PURE__ */ F(zn, { element: b })
1847
1946
  })
1848
1947
  }),
1849
- /* @__PURE__ */ I("footer", {
1948
+ /* @__PURE__ */ F("footer", {
1850
1949
  ref: _,
1851
1950
  className: "scene-slice-dialog-footer",
1852
- children: /* @__PURE__ */ I("button", {
1951
+ children: /* @__PURE__ */ F("button", {
1853
1952
  type: "button",
1854
1953
  className: "scene-slice-dialog-cancel",
1855
1954
  onClick: h,
@@ -1859,18 +1958,18 @@ function Qr(e) {
1859
1958
  ]
1860
1959
  });
1861
1960
  }
1862
- function $r(e) {
1961
+ function ci(e) {
1863
1962
  let { element: t } = e;
1864
- return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ I(ti, { ...e }) : /* @__PURE__ */ I(E, { ...e }) : /* @__PURE__ */ I(ei, { ...e });
1963
+ return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ F(ui, { ...e }) : /* @__PURE__ */ F(E, { ...e }) : /* @__PURE__ */ F(li, { ...e });
1865
1964
  }
1866
- function ei(e) {
1867
- let { element: t } = e, { routes: n, parameters: r } = B(), i = Z(t, "slice"), a = Z(t, "command") || i.split(".").at(-1) || "", o = n?.commandSchemas?.[a], c = s(() => K(o ?? ""), [o]), { selectableRows: l, selectedRows: u } = Nn();
1868
- if (er(c, r, u, l).length === 0) return /* @__PURE__ */ I(E, { ...e });
1965
+ function li(e) {
1966
+ let { element: t } = e, { routes: n, parameters: r } = z(), i = Z(t, "slice"), a = Z(t, "command") || i.split(".").at(-1) || "", o = n?.commandSchemas?.[a], c = s(() => G(o ?? ""), [o]), { selectableRows: l, selectedRows: u } = In();
1967
+ if (rr(c, r, u, l).length === 0) return /* @__PURE__ */ F(E, { ...e });
1869
1968
  let d = Z(t, "label", Z(t, "name", t.id));
1870
- return /* @__PURE__ */ I("span", {
1969
+ return /* @__PURE__ */ F("span", {
1871
1970
  className: "stage-toolbar-action",
1872
1971
  "data-scene-toolbar-item": Z(t, "name", t.id),
1873
- children: /* @__PURE__ */ I(R, {
1972
+ children: /* @__PURE__ */ F(L, {
1874
1973
  type: "button",
1875
1974
  "data-scene-id": t.id,
1876
1975
  disabled: !0,
@@ -1880,12 +1979,12 @@ function ei(e) {
1880
1979
  })
1881
1980
  });
1882
1981
  }
1883
- function ti(e) {
1884
- let { element: t } = e, { routes: n, parameters: r } = B(), i = Z(t, "name", t.id), a = Z(t, "target"), o = Z(t, "label", i), c = n?.commandSchemas?.[a], l = s(() => K(c ?? ""), [c]), { selectableRows: u, selectedRows: d } = Nn(), f = er(l, r, d, u), p = l.filter((e) => !Kn(e, r) && !(e.identifier && e.required && Yn(e, u))), m = c ? {
1982
+ function ui(e) {
1983
+ let { element: t } = e, { routes: n, parameters: r } = z(), i = Z(t, "name", t.id), a = Z(t, "target"), o = Z(t, "label", i), c = n?.commandSchemas?.[a], l = s(() => G(c ?? ""), [c]), { selectableRows: u, selectedRows: d } = In(), f = rr(l, r, d, u), p = l.filter((e) => !Yn(e, r) && !(e.identifier && e.required && Qn(e, u))), m = c ? {
1885
1984
  schema: c,
1886
1985
  fields: p.map((e) => ({
1887
1986
  name: e.name,
1888
- label: q(e.name)
1987
+ label: K(e.name)
1889
1988
  })),
1890
1989
  generationMode: "manual"
1891
1990
  } : {}, h = {
@@ -1898,35 +1997,36 @@ function ti(e) {
1898
1997
  ...m
1899
1998
  }
1900
1999
  };
1901
- return /* @__PURE__ */ I("span", {
2000
+ return /* @__PURE__ */ F("span", {
1902
2001
  className: "stage-toolbar-action",
1903
2002
  "data-scene-toolbar-item": i,
1904
- children: f.length > 0 ? /* @__PURE__ */ I(R, {
2003
+ children: f.length > 0 ? /* @__PURE__ */ F(L, {
1905
2004
  type: "button",
1906
2005
  "data-scene-id": t.id,
1907
2006
  disabled: !0,
1908
2007
  title: "Select a row first",
1909
2008
  ...e.interactions,
1910
2009
  children: o
1911
- }) : /* @__PURE__ */ I(qr, {
2010
+ }) : /* @__PURE__ */ F(ni, {
1912
2011
  element: h,
1913
2012
  interactions: e.interactions,
1914
2013
  slots: e.slots
1915
2014
  })
1916
2015
  });
1917
2016
  }
1918
- var ni = {
1919
- ...ce,
1920
- "core:table": Wr,
1921
- "core:action": qr,
1922
- "core:toolbarItem": $r,
1923
- "core:sliceDialog": Qr,
1924
- [zr]: In,
1925
- [Dr]: Nr
2017
+ var di = {
2018
+ ...k,
2019
+ "core:table": $r,
2020
+ "core:action": ni,
2021
+ "core:toolbarItem": ci,
2022
+ "core:sliceDialog": si,
2023
+ [Jr]: zn,
2024
+ [Ar]: Fr,
2025
+ [qr]: Kr
1926
2026
  };
1927
2027
  // src/useStrings.ts
1928
- function ri() {
1929
- let e = ot(), [t, n] = l([]), [r, i] = l(""), [o, s] = l({});
2028
+ function fi() {
2029
+ let e = lt(), [t, n] = l([]), [r, i] = l(""), [o, s] = l({});
1930
2030
  return a(() => {
1931
2031
  let t = new AbortController();
1932
2032
  return e.locales(t.signal).then((e) => {
@@ -1947,11 +2047,11 @@ function ri() {
1947
2047
  dictionary: o
1948
2048
  };
1949
2049
  }
1950
- var ii = /* @__PURE__ */ new Set(["core:table"]);
1951
- function ai(e) {
1952
- return oi(e, /* @__PURE__ */ new Map(), void 0);
2050
+ var pi = /* @__PURE__ */ new Set(["core:table"]);
2051
+ function mi(e) {
2052
+ return hi(e, /* @__PURE__ */ new Map(), void 0);
1953
2053
  }
1954
- function oi(e, t, n) {
2054
+ function hi(e, t, n) {
1955
2055
  let r = e;
1956
2056
  if (!r.slots) return e;
1957
2057
  let i = !1, a = {};
@@ -1960,7 +2060,7 @@ function oi(e, t, n) {
1960
2060
  a[e] = o.map((e) => {
1961
2061
  let t = e, n = $(t, "typeName");
1962
2062
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1963
- let a = oi(ci(si(t, r), s), r, s);
2063
+ let a = hi(_i(gi(t, r), s), r, s);
1964
2064
  return a !== e && (i = !0), a;
1965
2065
  });
1966
2066
  }
@@ -1969,8 +2069,8 @@ function oi(e, t, n) {
1969
2069
  slots: a
1970
2070
  } : e;
1971
2071
  }
1972
- function si(e, t) {
1973
- if (!ii.has(e.componentName)) return e;
2072
+ function gi(e, t) {
2073
+ if (!pi.has(e.componentName)) return e;
1974
2074
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1975
2075
  if (!r || e.properties.queryArguments !== void 0) return e;
1976
2076
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -1979,7 +2079,7 @@ function si(e, t) {
1979
2079
  properties: a
1980
2080
  };
1981
2081
  }
1982
- function ci(e, t) {
2082
+ function _i(e, t) {
1983
2083
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
1984
2084
  let n = { ...e.properties };
1985
2085
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -1997,7 +2097,7 @@ function $(e, t) {
1997
2097
  return typeof n == "string" && n.length > 0 ? n : void 0;
1998
2098
  }
1999
2099
  // src/stageQueryBindings.tsx
2000
- function li(e) {
2100
+ function vi(e) {
2001
2101
  let t = /* @__PURE__ */ new Set(), n = (e) => {
2002
2102
  if (Array.isArray(e)) {
2003
2103
  e.forEach(n);
@@ -2013,7 +2113,7 @@ function li(e) {
2013
2113
  };
2014
2114
  return r(e), [...t];
2015
2115
  }
2016
- function ui(e) {
2116
+ function yi(e) {
2017
2117
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
2018
2118
  let n = e.properties?.[t];
2019
2119
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -2032,8 +2132,8 @@ function ui(e) {
2032
2132
  };
2033
2133
  return r(e), [...t.values()];
2034
2134
  }
2035
- function di({ source: e }) {
2036
- let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = e.by ? r[e.by] || i[e.by] : void 0, o = s(() => e.by ? a ? { [e.by]: a } : {} : {
2135
+ function bi({ source: e }) {
2136
+ let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = e.by ? r[e.by] || i[e.by] : void 0, o = s(() => e.by ? a ? { [e.by]: a } : {} : {
2037
2137
  ...i,
2038
2138
  ...r
2039
2139
  }, [
@@ -2042,7 +2142,7 @@ function di({ source: e }) {
2042
2142
  i,
2043
2143
  e.by
2044
2144
  ]);
2045
- return V({
2145
+ return B({
2046
2146
  scope: `data:${e.typeName}`,
2047
2147
  name: e.query,
2048
2148
  alias: e.typeName,
@@ -2052,12 +2152,12 @@ function di({ source: e }) {
2052
2152
  list: !0
2053
2153
  }), null;
2054
2154
  }
2055
- function fi({ name: e }) {
2056
- let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = s(() => ({
2155
+ function xi({ name: e }) {
2156
+ let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = s(() => ({
2057
2157
  ...i,
2058
2158
  ...r
2059
2159
  }), [r, i]);
2060
- return V({
2160
+ return B({
2061
2161
  scope: `binding:${e}`,
2062
2162
  name: e,
2063
2163
  route: t?.queries?.[e],
@@ -2066,16 +2166,16 @@ function fi({ name: e }) {
2066
2166
  list: !0
2067
2167
  }), null;
2068
2168
  }
2069
- function pi({ element: e }) {
2070
- let t = s(() => li(e), [e]), n = s(() => ui(e), [e]);
2071
- return /* @__PURE__ */ L(Re, { children: [t.map((e) => /* @__PURE__ */ I(fi, { name: e }, e)), n.map((e) => /* @__PURE__ */ I(di, { source: e }, e.typeName))] });
2169
+ function Si({ element: e }) {
2170
+ let t = s(() => vi(e), [e]), n = s(() => yi(e), [e]);
2171
+ return /* @__PURE__ */ I(Ve, { children: [t.map((e) => /* @__PURE__ */ F(xi, { name: e }, e)), n.map((e) => /* @__PURE__ */ F(bi, { source: e }, e.typeName))] });
2072
2172
  }
2073
- function mi(e) {
2173
+ function Ci(e) {
2074
2174
  let t = /* @__PURE__ */ new Set(), n = [];
2075
2175
  for (let r of e.flatMap((e) => e.contributions ?? [])) {
2076
- let e = gi(r);
2176
+ let e = Ti(r);
2077
2177
  if (!e) continue;
2078
- let i = _i(e);
2178
+ let i = Ei(e);
2079
2179
  t.has(i) || (t.add(i), n.push(e));
2080
2180
  }
2081
2181
  return n.map((e, t) => ({
@@ -2083,18 +2183,18 @@ function mi(e) {
2083
2183
  index: t
2084
2184
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
2085
2185
  }
2086
- function hi(e) {
2186
+ function wi(e) {
2087
2187
  let t = {
2088
2188
  label: "",
2089
2189
  children: []
2090
2190
  };
2091
2191
  for (let n of e) {
2092
- let e = n.hierarchy.reduce((e, t) => vi(e, t, !1), t);
2093
- (n.group ? vi(e, n.group, !0) : e).children.push(yi(n));
2192
+ let e = n.hierarchy.reduce((e, t) => Di(e, t, !1), t);
2193
+ (n.group ? Di(e, n.group, !0) : e).children.push(Oi(n));
2094
2194
  }
2095
2195
  return t.children;
2096
2196
  }
2097
- function gi(e) {
2197
+ function Ti(e) {
2098
2198
  if (e.contributionPointName !== "Navigation") return;
2099
2199
  let t = e.content?.properties ?? {}, n = t.label, r = t.targetScreen;
2100
2200
  if (typeof n != "string" || typeof r != "string") return;
@@ -2104,23 +2204,23 @@ function gi(e) {
2104
2204
  targetScreen: r,
2105
2205
  hierarchy: i,
2106
2206
  order: a,
2107
- ...xi({
2108
- id: bi(t.id),
2109
- group: bi(t.group),
2110
- icon: bi(t.icon),
2111
- presentation: bi(t.presentation),
2112
- destination: Ci(o) && wi(o) ? o : void 0
2207
+ ...Ai({
2208
+ id: ki(t.id),
2209
+ group: ki(t.group),
2210
+ icon: ki(t.icon),
2211
+ presentation: ki(t.presentation),
2212
+ destination: Mi(o) && Ni(o) ? o : void 0
2113
2213
  })
2114
2214
  };
2115
2215
  }
2116
- function _i(e) {
2216
+ function Ei(e) {
2117
2217
  return e.id === void 0 ? JSON.stringify([
2118
2218
  e.hierarchy,
2119
2219
  e.targetScreen,
2120
2220
  e.label
2121
2221
  ]) : JSON.stringify(["id", e.id]);
2122
2222
  }
2123
- function vi(e, t, n) {
2223
+ function Di(e, t, n) {
2124
2224
  let r = e.children.find((e) => e.screen === void 0 && e.section === !0 === n && e.label === t);
2125
2225
  if (r) return r;
2126
2226
  let i = n ? {
@@ -2133,12 +2233,12 @@ function vi(e, t, n) {
2133
2233
  };
2134
2234
  return e.children.push(i), i;
2135
2235
  }
2136
- function yi(e) {
2236
+ function Oi(e) {
2137
2237
  return {
2138
2238
  label: e.label,
2139
- ...xi({ id: e.id || void 0 }),
2239
+ ...Ai({ id: e.id || void 0 }),
2140
2240
  screen: e.targetScreen,
2141
- ...xi({
2241
+ ...Ai({
2142
2242
  icon: e.icon || void 0,
2143
2243
  presentation: e.presentation || void 0,
2144
2244
  destination: e.destination
@@ -2146,27 +2246,27 @@ function yi(e) {
2146
2246
  children: []
2147
2247
  };
2148
2248
  }
2149
- function bi(e) {
2249
+ function ki(e) {
2150
2250
  return typeof e == "string" ? e : void 0;
2151
2251
  }
2152
- function xi(e) {
2252
+ function Ai(e) {
2153
2253
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
2154
2254
  }
2155
- function Si(e, t) {
2255
+ function ji(e, t) {
2156
2256
  for (let n of e) {
2157
2257
  if (n.screen === t) return [n.label];
2158
- let e = Si(n.children, t);
2258
+ let e = ji(n.children, t);
2159
2259
  if (e.length > 0) return n.section ? e : [n.label, ...e];
2160
2260
  }
2161
2261
  return [];
2162
2262
  }
2163
- function Ci(e) {
2263
+ function Mi(e) {
2164
2264
  return typeof e == "object" && !!e && !Array.isArray(e);
2165
2265
  }
2166
- function wi(e) {
2266
+ function Ni(e) {
2167
2267
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
2168
2268
  }
2169
- function Ti(e, t, n) {
2269
+ function Pi(e, t, n) {
2170
2270
  return e.filter((e) => !t.has(e.name)).map((e) => ({
2171
2271
  label: e.name,
2172
2272
  targetScreen: e.name,
@@ -2174,54 +2274,54 @@ function Ti(e, t, n) {
2174
2274
  }));
2175
2275
  }
2176
2276
  // src/blueprint.ts
2177
- var Ei = "Stage:locale", Di = "Stage:themeToggle", Oi = "Cratis.Components", ki = "PrimeReact", Ai = /* @__PURE__ */ new Map();
2178
- function ji(e) {
2179
- return Ae(e).packages.includes(ki);
2277
+ var Fi = "Stage:locale", Ii = "Stage:themeToggle", Li = "Cratis.Components", Ri = "PrimeReact", zi = /* @__PURE__ */ new Map();
2278
+ function Bi(e) {
2279
+ return Ne(e).packages.includes(Ri);
2180
2280
  }
2181
- function Mi(e, t) {
2182
- Ai.set(e, t);
2281
+ function Vi(e, t) {
2282
+ zi.set(e, t);
2183
2283
  }
2184
- function Ni(e) {
2185
- let t = Ae(e);
2284
+ function Hi(e) {
2285
+ let t = Ne(e);
2186
2286
  return {
2187
2287
  ...t,
2188
2288
  name: e?.length ? t.name : "Stage",
2189
2289
  packages: x(t.packages, {
2190
- baseline: Oi,
2191
- catalog: { [Ce]: g.Blueprint }
2290
+ baseline: Li,
2291
+ catalog: { [Ee]: g.Blueprint }
2192
2292
  })
2193
2293
  };
2194
2294
  }
2195
- var Pi = {
2196
- ...be,
2197
- [Oi]: et.components
2295
+ var Ui = {
2296
+ ...Ce,
2297
+ [Li]: rt.components
2198
2298
  };
2199
- function Fi(e) {
2200
- let t = [...Ai.values()].reduce((e, t) => ({
2299
+ function Wi(e) {
2300
+ let t = [...zi.values()].reduce((e, t) => ({
2201
2301
  ...e,
2202
2302
  ...t.components
2203
2303
  }), {});
2204
2304
  return {
2205
- ...ce,
2206
- ...$e,
2305
+ ...k,
2306
+ ...nt,
2207
2307
  ...t,
2208
- ...Se,
2209
- ...ke,
2308
+ ...Te,
2309
+ ...Me,
2210
2310
  ...e
2211
2311
  };
2212
2312
  }
2213
- function Ii(e) {
2214
- let t = Object.fromEntries([...Ai].map(([e, t]) => [e, t.declared]));
2313
+ function Gi(e) {
2314
+ let t = Object.fromEntries([...zi].map(([e, t]) => [e, t.declared]));
2215
2315
  return {
2216
2316
  ...e,
2217
- ...Pi,
2317
+ ...Ui,
2218
2318
  ...t
2219
2319
  };
2220
2320
  }
2221
- var Li = "Stage:navigationTree";
2222
- function Ri(e, t, n) {
2321
+ var Ki = "Stage:navigationTree";
2322
+ function qi(e, t, n) {
2223
2323
  let r = t?.title ?? "Cratis Stage";
2224
- return P(e, M.Logo, {
2324
+ return N(e, j.Logo, {
2225
2325
  label: r,
2226
2326
  initials: r.slice(0, 1).toUpperCase() || "S",
2227
2327
  targetScreen: n,
@@ -2230,40 +2330,40 @@ function Ri(e, t, n) {
2230
2330
  ...t?.showName === void 0 ? {} : { showName: t.showName }
2231
2331
  });
2232
2332
  }
2233
- function zi(e, t, n, r, i, a = !1, o = !0) {
2234
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = mi(e), u = Ti(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = hi([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => Oe({
2333
+ function Ji(e, t, n, r, i, a = !1, o = !0) {
2334
+ let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = Ci(e), u = Pi(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = wi([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => je({
2235
2335
  label: e.name,
2236
2336
  targetScreen: e.name,
2237
2337
  icon: "pi pi-table",
2238
2338
  group: "Screens",
2239
2339
  order: n
2240
- }, t)), p = Si(hi(l), t), m = e.find((e) => e.name === t)?.path?.length ? Si(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? P("menu-hierarchy", Li, {
2340
+ }, t)), p = ji(wi(l), t), m = e.find((e) => e.name === t)?.path?.length ? ji(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", Ki, {
2241
2341
  nodes: d,
2242
2342
  activeScreen: t
2243
- }) : P("menu-screens", M.Menu, {
2343
+ }) : N("menu-screens", j.Menu, {
2244
2344
  title: "Screens",
2245
2345
  label: "Screens"
2246
2346
  }, { items: f }), _ = [];
2247
- n.length > 1 && _.push(P("topbar-locale", Ei, {
2347
+ n.length > 1 && _.push(N("topbar-locale", Fi, {
2248
2348
  locales: n,
2249
2349
  locale: r
2250
- })), _.push(P("topbar-theme", Di, { label: "Theme" }));
2350
+ })), _.push(N("topbar-theme", Ii, {}));
2251
2351
  let v = { regionNavigation: a };
2252
2352
  return {
2253
- [N.Topbar]: [P("topbar", M.Topbar, v, {
2254
- logo: [Ri("topbar-logo", i, s)],
2353
+ [M.Topbar]: [N("topbar", j.Topbar, v, {
2354
+ logo: [qi("topbar-logo", i, s)],
2255
2355
  end: _
2256
2356
  })],
2257
- [N.Sidebar]: [P("sidebar", M.Sidebar, v, { logo: [Ri("sidebar-logo", i, s)] })],
2258
- ...a ? {} : { [N.Menu]: [g] },
2259
- [N.Breadcrumb]: [P("breadcrumb", M.Breadcrumb, {
2357
+ [M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [qi("sidebar-logo", i, s)] })],
2358
+ ...a ? {} : { [M.Menu]: [g] },
2359
+ [M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
2260
2360
  homeTargetScreen: s,
2261
2361
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
2262
2362
  })],
2263
- ...o ? { [N.Footer]: [P("footer", M.Footer, { text: `${c} · rendered from your model` })] } : {},
2264
- [N.ConfigPanel]: [P(M.ConfigPanel, M.ConfigPanel, {
2363
+ ...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
2364
+ [M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
2265
2365
  title: "Settings",
2266
- themes: we.map((e) => ({
2366
+ themes: De.map((e) => ({
2267
2367
  name: e.name,
2268
2368
  label: e.name,
2269
2369
  isDark: e.isDark ?? !1
@@ -2271,11 +2371,11 @@ function zi(e, t, n, r, i, a = !1, o = !0) {
2271
2371
  })]
2272
2372
  };
2273
2373
  }
2274
- function Bi(e) {
2374
+ function Yi(e) {
2275
2375
  return `#/${encodeURIComponent(e)}`;
2276
2376
  }
2277
2377
  // src/externalRouteHref.ts
2278
- function Vi(e) {
2378
+ function Xi(e) {
2279
2379
  try {
2280
2380
  let t = new URL(e ?? "");
2281
2381
  return t.protocol === "http:" || t.protocol === "https:" ? e : void 0;
@@ -2284,51 +2384,48 @@ function Vi(e) {
2284
2384
  }
2285
2385
  }
2286
2386
  // src/StageChrome.tsx
2287
- var Hi = t({
2387
+ var Zi = t({
2288
2388
  locales: [],
2289
2389
  locale: "",
2290
2390
  setLocale: () => void 0,
2291
2391
  activity: ""
2292
2392
  });
2293
- function Ui({ state: e, children: t }) {
2294
- return /* @__PURE__ */ I(Hi.Provider, {
2393
+ function Qi({ state: e, children: t }) {
2394
+ return /* @__PURE__ */ F(Zi.Provider, {
2295
2395
  value: e,
2296
2396
  children: t
2297
2397
  });
2298
2398
  }
2299
- var Wi = "Stage:activity";
2300
- function Gi() {
2301
- let { locales: e, locale: t, setLocale: n } = i(Hi);
2302
- return e.length < 2 ? null : /* @__PURE__ */ I("select", {
2399
+ var $i = "Stage:activity";
2400
+ function ea() {
2401
+ let { locales: e, locale: t, setLocale: n } = i(Zi);
2402
+ return e.length < 2 ? null : /* @__PURE__ */ F("select", {
2303
2403
  className: "stage-locale",
2304
2404
  "aria-label": "Locale",
2305
2405
  value: t,
2306
2406
  onChange: (e) => n(e.target.value),
2307
- children: e.map((e) => /* @__PURE__ */ I("option", {
2407
+ children: e.map((e) => /* @__PURE__ */ F("option", {
2308
2408
  value: e,
2309
2409
  children: e
2310
2410
  }, e))
2311
2411
  });
2312
2412
  }
2313
- function Ki({ element: e }) {
2314
- let { config: t, setThemeName: n, setColorScheme: r } = je(), i = typeof e.properties.label == "string" ? e.properties.label : "Theme", a = we.find((e) => e.name === t.themeName)?.isDark ?? t.colorScheme === ve.Dark, o = we.find((e) => (e.isDark ?? !1) !== a);
2315
- if (!o) return null;
2316
- let s = a ? "Switch to a light theme" : "Switch to a dark theme";
2317
- return /* @__PURE__ */ L("div", {
2413
+ function ta({ element: e }) {
2414
+ let { config: t, setThemeName: n, setColorScheme: r } = Pe(), i = De.find((e) => e.name === t.themeName)?.isDark ?? t.colorScheme === be.Dark, a = De.find((e) => (e.isDark ?? !1) !== i);
2415
+ if (!a) return null;
2416
+ let o = i ? "Switch to a light theme" : "Switch to a dark theme";
2417
+ return /* @__PURE__ */ F("div", {
2318
2418
  className: "stage-theme-toggle",
2319
2419
  "data-scene-id": e.id,
2320
- children: [/* @__PURE__ */ I("h3", {
2321
- className: "layout-config-section-title",
2322
- children: i
2323
- }), /* @__PURE__ */ I("button", {
2420
+ children: /* @__PURE__ */ F("button", {
2324
2421
  type: "button",
2325
2422
  className: "stage-theme-toggle__button",
2326
- "aria-label": s,
2327
- title: s,
2423
+ "aria-label": o,
2424
+ title: o,
2328
2425
  onClick: () => {
2329
- n(o.name), r(o.isDark ? ve.Dark : ve.Light);
2426
+ n(a.name), r(a.isDark ? be.Dark : be.Light);
2330
2427
  },
2331
- children: /* @__PURE__ */ I("svg", {
2428
+ children: /* @__PURE__ */ F("svg", {
2332
2429
  width: "18",
2333
2430
  height: "18",
2334
2431
  viewBox: "0 0 24 24",
@@ -2338,43 +2435,43 @@ function Ki({ element: e }) {
2338
2435
  strokeLinecap: "round",
2339
2436
  strokeLinejoin: "round",
2340
2437
  "aria-hidden": "true",
2341
- children: a ? /* @__PURE__ */ L(Re, { children: [/* @__PURE__ */ I("circle", {
2438
+ children: i ? /* @__PURE__ */ I(Ve, { children: [/* @__PURE__ */ F("circle", {
2342
2439
  cx: "12",
2343
2440
  cy: "12",
2344
2441
  r: "4"
2345
- }), /* @__PURE__ */ I("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })] }) : /* @__PURE__ */ I("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
2442
+ }), /* @__PURE__ */ F("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })] }) : /* @__PURE__ */ F("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
2346
2443
  })
2347
- })]
2444
+ })
2348
2445
  });
2349
2446
  }
2350
- function qi({ element: e }) {
2447
+ function na({ element: e }) {
2351
2448
  let t = e.properties ?? {};
2352
- return /* @__PURE__ */ I("nav", {
2449
+ return /* @__PURE__ */ F("nav", {
2353
2450
  className: "stage-navigation-tree",
2354
2451
  "aria-label": "Navigation",
2355
2452
  "data-scene-id": e.id,
2356
- children: /* @__PURE__ */ I(Ji, {
2453
+ children: /* @__PURE__ */ F(ra, {
2357
2454
  nodes: t.nodes ?? [],
2358
2455
  activeScreen: t.activeScreen
2359
2456
  })
2360
2457
  });
2361
2458
  }
2362
- function Ji({ nodes: e, activeScreen: t }) {
2363
- return /* @__PURE__ */ I("ul", {
2459
+ function ra({ nodes: e, activeScreen: t }) {
2460
+ return /* @__PURE__ */ F("ul", {
2364
2461
  role: "tree",
2365
- children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ L("li", {
2462
+ children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ I("li", {
2366
2463
  role: "treeitem",
2367
2464
  "aria-expanded": "true",
2368
- children: [/* @__PURE__ */ I("span", {
2465
+ children: [/* @__PURE__ */ F("span", {
2369
2466
  className: "stage-navigation-group",
2370
2467
  children: e.label
2371
- }), /* @__PURE__ */ I(Ji, {
2468
+ }), /* @__PURE__ */ F(ra, {
2372
2469
  nodes: e.children,
2373
2470
  activeScreen: t
2374
2471
  })]
2375
- }, e.label) : /* @__PURE__ */ I("li", {
2472
+ }, e.label) : /* @__PURE__ */ F("li", {
2376
2473
  role: "treeitem",
2377
- children: /* @__PURE__ */ I(Yi, {
2474
+ children: /* @__PURE__ */ F(ia, {
2378
2475
  node: e,
2379
2476
  screen: e.screen,
2380
2477
  activeScreen: t
@@ -2382,11 +2479,11 @@ function Ji({ nodes: e, activeScreen: t }) {
2382
2479
  }, `${e.screen}:${e.label}`))
2383
2480
  });
2384
2481
  }
2385
- function Yi({ node: e, screen: t, activeScreen: n }) {
2386
- let r = i(k), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external", c = o && r && !s && wi(o) ? (e) => {
2482
+ function ia({ node: e, screen: t, activeScreen: n }) {
2483
+ let r = i(O), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external", c = o && r && !s && Ni(o) ? (e) => {
2387
2484
  e.preventDefault(), r.navigate(o);
2388
- } : void 0, l = s ? Vi(o.route) : Bi(t), u = s && l === void 0;
2389
- return /* @__PURE__ */ L("a", {
2485
+ } : void 0, l = s ? Xi(o.route) : Yi(t), u = s && l === void 0;
2486
+ return /* @__PURE__ */ I("a", {
2390
2487
  href: l,
2391
2488
  rel: s && !u ? "noreferrer" : void 0,
2392
2489
  "aria-disabled": u ? "true" : void 0,
@@ -2395,30 +2492,30 @@ function Yi({ node: e, screen: t, activeScreen: n }) {
2395
2492
  "data-presentation": e.presentation,
2396
2493
  "data-icon": e.icon,
2397
2494
  onClick: c,
2398
- children: [a !== "text" && e.icon && /* @__PURE__ */ I("span", {
2495
+ children: [a !== "text" && e.icon && /* @__PURE__ */ F("span", {
2399
2496
  className: "stage-navigation-icon",
2400
2497
  "aria-hidden": "true",
2401
2498
  "data-icon-name": e.icon
2402
2499
  }), a !== "icon" && e.label]
2403
2500
  });
2404
2501
  }
2405
- function Xi({ element: e }) {
2406
- let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(k), r = he(), a = B(), o = n?.outlets[t], s = o && r ? r.screens[o] : void 0, c = e.properties.closable === !0;
2407
- return /* @__PURE__ */ L("div", {
2502
+ function aa({ element: e }) {
2503
+ let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(O), r = _e(), a = z(), o = n?.outlets[t], s = o && r ? r.screens[o] : void 0, c = e.properties.closable === !0;
2504
+ return /* @__PURE__ */ I("div", {
2408
2505
  "data-scene-outlet": t,
2409
2506
  "data-scene-outlet-screen": o,
2410
- children: [c && o && /* @__PURE__ */ I("div", {
2507
+ children: [c && o && /* @__PURE__ */ F("div", {
2411
2508
  className: "scene-outlet-bar",
2412
- children: /* @__PURE__ */ I("button", {
2509
+ children: /* @__PURE__ */ F("button", {
2413
2510
  type: "button",
2414
2511
  className: "scene-outlet-close",
2415
2512
  "aria-label": "Close",
2416
2513
  onClick: () => n?.closeOutlet(t),
2417
2514
  children: "Close"
2418
2515
  })
2419
- }), s && r && /* @__PURE__ */ I(jn, {
2516
+ }), s && r && /* @__PURE__ */ F(Pn, {
2420
2517
  element: s,
2421
- children: /* @__PURE__ */ I(O, {
2518
+ children: /* @__PURE__ */ F(D, {
2422
2519
  element: s,
2423
2520
  registry: r.registry,
2424
2521
  resolveBinding: a.resolveBinding
@@ -2426,16 +2523,16 @@ function Xi({ element: e }) {
2426
2523
  })]
2427
2524
  });
2428
2525
  }
2429
- function Zi() {
2430
- let { activity: e } = i(Hi);
2431
- return e ? /* @__PURE__ */ I("p", {
2526
+ function oa() {
2527
+ let { activity: e } = i(Zi);
2528
+ return e ? /* @__PURE__ */ F("p", {
2432
2529
  className: "stage-activity",
2433
2530
  role: "status",
2434
2531
  children: e
2435
2532
  }) : null;
2436
2533
  }
2437
- function Qi() {
2438
- let e = ge(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2534
+ function sa() {
2535
+ let e = ve(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2439
2536
  return a(() => {
2440
2537
  let r = e?.isDark ? "dark" : "light";
2441
2538
  document.documentElement.setAttribute("data-scene-color-scheme", r), document.body.setAttribute("data-scene-color-scheme", r), document.body.style.backgroundColor = t ?? "", document.body.style.color = n ?? "";
@@ -2445,40 +2542,40 @@ function Qi() {
2445
2542
  n
2446
2543
  ]), null;
2447
2544
  }
2448
- var $i = {
2449
- [Ei]: Gi,
2450
- [Di]: Ki,
2451
- [Li]: qi,
2452
- [Wi]: Zi,
2453
- "core:outlet": Xi
2454
- }, ea = [
2545
+ var ca = {
2546
+ [Fi]: ea,
2547
+ [Ii]: ta,
2548
+ [Ki]: na,
2549
+ [$i]: oa,
2550
+ "core:outlet": aa
2551
+ }, la = [
2455
2552
  "navigationMode",
2456
2553
  "menuTheme",
2457
2554
  "showFooter"
2458
- ], ta = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2459
- function na(e, t, n = !1) {
2555
+ ], ua = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2556
+ function da(e, t, n = !1) {
2460
2557
  let r = [], i = t.options ?? {}, a = {
2461
2558
  showFooter: !0,
2462
2559
  followsSystem: !1,
2463
2560
  problems: r
2464
2561
  };
2465
- for (let [e, n] of Object.entries(i)) if (!ea.includes(e)) r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${ea.join(", ")}.`);
2562
+ for (let [e, n] of Object.entries(i)) if (!la.includes(e)) r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${la.join(", ")}.`);
2466
2563
  else if (e === "navigationMode") {
2467
- let e = Ee.find((e) => e === n);
2468
- e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${Ee.join(", ")}.`);
2564
+ let e = ke.find((e) => e === n);
2565
+ e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${ke.join(", ")}.`);
2469
2566
  } else if (e === "menuTheme") {
2470
- let e = De.find((e) => e === n);
2471
- e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${De.join(", ")}.`);
2567
+ let e = Ae.find((e) => e === n);
2568
+ e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${Ae.join(", ")}.`);
2472
2569
  } else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
2473
2570
  let o = e?.appearance;
2474
2571
  if (o?.colorScheme !== void 0) {
2475
2572
  a.followsSystem = o.colorScheme === u.System;
2476
2573
  let e = a.followsSystem ? n : o.colorScheme === u.Dark;
2477
- a.colorScheme = e ? ve.Dark : ve.Light, a.themeName = we.find((t) => (t.isDark ?? !1) === e)?.name;
2574
+ a.colorScheme = e ? be.Dark : be.Light, a.themeName = De.find((t) => (t.isDark ?? !1) === e)?.name;
2478
2575
  }
2479
- return o?.accent !== void 0 && (ta.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2576
+ return o?.accent !== void 0 && (ua.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2480
2577
  }
2481
- function ra(e, t) {
2578
+ function fa(e, t) {
2482
2579
  if (e?.root === void 0) return [];
2483
2580
  let n = /* @__PURE__ */ new Set([
2484
2581
  v.RootTemplateUnknown,
@@ -2490,7 +2587,7 @@ function ra(e, t) {
2490
2587
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
2491
2588
  return r.length === 0 && t.origin !== y.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;
2492
2589
  }
2493
- function ia(e) {
2590
+ function pa(e) {
2494
2591
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
2495
2592
  0,
2496
2593
  2,
@@ -2498,7 +2595,7 @@ function ia(e) {
2498
2595
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
2499
2596
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
2500
2597
  }
2501
- function aa(e, t) {
2598
+ function ma(e, t) {
2502
2599
  if (t === void 0) return e;
2503
2600
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
2504
2601
  0,
@@ -2510,19 +2607,19 @@ function aa(e, t) {
2510
2607
  tokens: {
2511
2608
  ...e.tokens,
2512
2609
  "primary.color": t,
2513
- "primary.contrastColor": ia(t),
2610
+ "primary.contrastColor": pa(t),
2514
2611
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
2515
2612
  }
2516
2613
  }));
2517
2614
  }
2518
2615
  // src/StageShellSettings.tsx
2519
- var oa = "(prefers-color-scheme: dark)";
2520
- function sa() {
2616
+ var ha = "(prefers-color-scheme: dark)";
2617
+ function ga() {
2521
2618
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
2522
2619
  }
2523
- function ca({ settings: e, onSystemSchemeChange: t }) {
2524
- let n = c(je());
2525
- n.current = je();
2620
+ function _a({ settings: e, onSystemSchemeChange: t }) {
2621
+ let n = c(Pe());
2622
+ n.current = Pe();
2526
2623
  let { mode: r, menuTheme: i, colorScheme: o, themeName: s } = e;
2527
2624
  return a(() => {
2528
2625
  let { setMode: e, setMenuTheme: t, setColorScheme: a, setThemeName: c } = n.current;
@@ -2534,15 +2631,15 @@ function ca({ settings: e, onSystemSchemeChange: t }) {
2534
2631
  s
2535
2632
  ]), a(() => {
2536
2633
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
2537
- let n = globalThis.matchMedia(oa), r = (e) => t(e.matches);
2634
+ let n = globalThis.matchMedia(ha), r = (e) => t(e.matches);
2538
2635
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
2539
2636
  }, [e.followsSystem, t]), null;
2540
2637
  }
2541
2638
  // src/stageNavigationModel.ts
2542
- function la(e) {
2639
+ function va(e) {
2543
2640
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
2544
2641
  }
2545
- function ua(e) {
2642
+ function ya(e) {
2546
2643
  let t = /* @__PURE__ */ new Map();
2547
2644
  for (let n of e) {
2548
2645
  let e = (n.path ?? []).join(".");
@@ -2555,41 +2652,41 @@ function ua(e) {
2555
2652
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
2556
2653
  };
2557
2654
  }
2558
- function da(e) {
2655
+ function ba(e) {
2559
2656
  return (t) => e.find((e) => e.name === t)?.path?.[0];
2560
2657
  }
2561
- function fa(e, t, n) {
2658
+ function xa(e, t, n) {
2562
2659
  let r = e.navigation ?? {
2563
2660
  application: { regions: [] },
2564
2661
  modules: []
2565
2662
  };
2566
2663
  return {
2567
2664
  structure: e.structure ?? { modules: [] },
2568
- navigation: n ? pa(r, n) : r,
2569
- screenFor: ua(e.screens),
2570
- moduleOf: da(e.screens),
2665
+ navigation: n ? Sa(r, n) : r,
2666
+ screenFor: ya(e.screens),
2667
+ moduleOf: ba(e.screens),
2571
2668
  ...t ? { isVisible: t } : {}
2572
2669
  };
2573
2670
  }
2574
- function pa(e, t) {
2575
- return typeof e == "string" ? ee(e, t) : Array.isArray(e) ? e.map((e) => pa(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, pa(n, t)])) : e;
2671
+ function Sa(e, t) {
2672
+ return typeof e == "string" ? ee(e, t) : Array.isArray(e) ? e.map((e) => Sa(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, Sa(n, t)])) : e;
2576
2673
  }
2577
2674
  // src/stageSlices.ts
2578
- function ma(e) {
2579
- return (t) => K(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2675
+ function Ca(e) {
2676
+ return (t) => G(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2580
2677
  name: e.name,
2581
2678
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
2582
- label: ha(e.name),
2679
+ label: wa(e.name),
2583
2680
  required: e.required
2584
2681
  }));
2585
2682
  }
2586
- function ha(e) {
2683
+ function wa(e) {
2587
2684
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
2588
2685
  }
2589
- function ga(e, t, n) {
2686
+ function Ta(e, t, n) {
2590
2687
  return { invoke: async (r, i, a) => {
2591
2688
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
2592
- if (!W(o)) return {
2689
+ if (!U(o)) return {
2593
2690
  succeeded: !1,
2594
2691
  message: t ? `The modeled command “${o}” is not registered by this Stage.` : `The modeled command “${o}” is waiting for Stage routes.`
2595
2692
  };
@@ -2606,7 +2703,7 @@ function ga(e, t, n) {
2606
2703
  } };
2607
2704
  }
2608
2705
  // src/withoutSeededSlots.ts
2609
- function _a(e, t) {
2706
+ function Ea(e, t) {
2610
2707
  let n = /* @__PURE__ */ new Map();
2611
2708
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
2612
2709
  return e.map((e) => {
@@ -2623,7 +2720,7 @@ function _a(e, t) {
2623
2720
  });
2624
2721
  }
2625
2722
  // src/stageIcons.ts
2626
- var va = /* @__PURE__ */ new Map([
2723
+ var Da = /* @__PURE__ */ new Map([
2627
2724
  ["chart", "chart-column"],
2628
2725
  ["add", "plus"],
2629
2726
  ["dollar", "dollar-sign"],
@@ -2631,23 +2728,23 @@ var va = /* @__PURE__ */ new Map([
2631
2728
  ["refresh", "refresh-cw"],
2632
2729
  ["invoice", "receipt-text"],
2633
2730
  ["batch", "layers"]
2634
- ]), ya = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), ba = j([{
2731
+ ]), Oa = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), ka = fe([{
2635
2732
  library: _,
2636
2733
  loadGlyph: async ({ key: e }) => {
2637
- let t = ya(e), n = va.get(t) ?? t;
2638
- if (Object.hasOwn(tt, n)) return (await tt[n]())?.default;
2734
+ let t = Oa(e), n = Da.get(t) ?? t;
2735
+ if (Object.hasOwn(it, n)) return (await it[n]())?.default;
2639
2736
  }
2640
2737
  }]);
2641
2738
  // src/App.tsx
2642
- function xa(e = {}) {
2643
- return Fi({
2739
+ function Aa(e = {}) {
2740
+ return Wi({
2644
2741
  ...e,
2645
- ...ni,
2646
- ...$i
2742
+ ...di,
2743
+ ...ca
2647
2744
  });
2648
2745
  }
2649
- function Sa(e, t) {
2650
- return P(`form-${e}-${t.name}`, zr, {
2746
+ function ja(e, t) {
2747
+ return N(`form-${e}-${t.name}`, Jr, {
2651
2748
  command: t.forCommand,
2652
2749
  label: t.name,
2653
2750
  generationMode: t.generationMode,
@@ -2655,36 +2752,36 @@ function Sa(e, t) {
2655
2752
  fields: t.fields
2656
2753
  });
2657
2754
  }
2658
- function Ca(e, t) {
2755
+ function Ma(e, t) {
2659
2756
  let n = e.screens[0];
2660
- return Te(e, n, {
2661
- profile: Ni(e.uiProfiles),
2662
- blueprintTemplates: t?.length ? [...F, ...t] : F
2757
+ return Oe(e, n, {
2758
+ profile: Hi(e.uiProfiles),
2759
+ blueprintTemplates: t?.length ? [...P, ...t] : P
2663
2760
  });
2664
2761
  }
2665
- function wa(e, t, n, r, i, a, o = !0) {
2666
- let s = la(e.navigation), c = Ta(e);
2762
+ function Na(e, t, n, r, i, a, o = !0) {
2763
+ let s = va(e.navigation), c = Pa(e);
2667
2764
  return {
2668
- profile: Ni(e.uiProfiles),
2669
- catalog: Ii(r),
2670
- blueprintTemplates: a?.length ? [...F, ...a] : F,
2765
+ profile: Hi(e.uiProfiles),
2766
+ catalog: Gi(r),
2767
+ blueprintTemplates: a?.length ? [...P, ...a] : P,
2671
2768
  namedTemplateOnly: !0,
2672
- chrome: (r, i) => i === M.FullPageShell ? { [N.ConfigPanel]: zi(e.screens, r.name, t, n, c, s, o)[N.ConfigPanel] } : zi(e.screens, r.name, t, n, c, s, o),
2673
- form: Sa,
2674
- trailing: [P("activity", Wi)],
2769
+ chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: Ji(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : Ji(e.screens, r.name, t, n, c, s, o),
2770
+ form: ja,
2771
+ trailing: [N("activity", $i)],
2675
2772
  decorate: (e) => {
2676
- let t = ai(e);
2773
+ let t = mi(e);
2677
2774
  return i ? w(t, i) : t;
2678
2775
  }
2679
2776
  };
2680
2777
  }
2681
- function Ta(e) {
2778
+ function Pa(e) {
2682
2779
  let t = e.navigation?.application.logo;
2683
2780
  if (t) return {
2684
2781
  title: t.title,
2685
2782
  image: t.image || void 0
2686
2783
  };
2687
- let n = Ni(e.uiProfiles).identity;
2784
+ let n = Hi(e.uiProfiles).identity;
2688
2785
  if (!n?.name) return;
2689
2786
  let r = n.logo;
2690
2787
  return {
@@ -2694,22 +2791,22 @@ function Ta(e) {
2694
2791
  showName: n.showName
2695
2792
  };
2696
2793
  }
2697
- function Ea(e, t, n, r, i, a) {
2698
- let [o] = kr([t], Da(e));
2699
- return xe(e, o, wa(e, n, r, i, void 0, a)).element;
2794
+ function Fa(e, t, n, r, i, a) {
2795
+ let [o] = Mr([t], Ia(e));
2796
+ return we(e, o, Na(e, n, r, i, void 0, a)).element;
2700
2797
  }
2701
- function Da(e) {
2798
+ function Ia(e) {
2702
2799
  return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
2703
2800
  }
2704
- function Oa() {
2801
+ function La() {
2705
2802
  try {
2706
2803
  return globalThis.localStorage ?? null;
2707
2804
  } catch {
2708
2805
  return null;
2709
2806
  }
2710
2807
  }
2711
- function ka({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i, routing: o = "hash" } = {}) {
2712
- let c = ot(), [u, d] = l(), [f, p] = l(""), m = s(() => xa(e), [e, u]), h = st(), g = ri();
2808
+ function Ra({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i, routing: o = "hash" } = {}) {
2809
+ let c = lt(), [u, d] = l(), [f, p] = l(""), m = s(() => Aa(e), [e, u]), h = ut(), g = fi();
2713
2810
  return a(() => {
2714
2811
  let e = new AbortController();
2715
2812
  return c.scene(e.signal).then((e) => d(r?.length ? {
@@ -2718,10 +2815,10 @@ function ka({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2718
2815
  } : e)).catch((t) => {
2719
2816
  e.signal.aborted || p(t instanceof Error ? t.message : String(t));
2720
2817
  }), () => e.abort();
2721
- }, [c, r]), f ? /* @__PURE__ */ L("main", {
2818
+ }, [c, r]), f ? /* @__PURE__ */ I("main", {
2722
2819
  className: "stage-message",
2723
- children: [/* @__PURE__ */ I("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ I("p", { children: f })]
2724
- }) : u ? /* @__PURE__ */ I(Aa, {
2820
+ children: [/* @__PURE__ */ F("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ F("p", { children: f })]
2821
+ }) : u ? /* @__PURE__ */ F(za, {
2725
2822
  scene: u,
2726
2823
  registry: m,
2727
2824
  routing: o,
@@ -2730,25 +2827,25 @@ function ka({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2730
2827
  packageCatalog: t,
2731
2828
  screenTemplates: n,
2732
2829
  isVisible: i
2733
- }) : /* @__PURE__ */ I("main", {
2830
+ }) : /* @__PURE__ */ F("main", {
2734
2831
  className: "stage-message",
2735
- children: /* @__PURE__ */ I("h1", { children: "Preparing the Stage" })
2832
+ children: /* @__PURE__ */ F("h1", { children: "Preparing the Stage" })
2736
2833
  });
2737
2834
  }
2738
- function Aa({ scene: e, registry: t, routing: n, routeState: i, strings: a, packageCatalog: o, screenTemplates: c, isVisible: u }) {
2835
+ function za({ scene: e, registry: t, routing: n, routeState: i, strings: a, packageCatalog: o, screenTemplates: c, isVisible: u }) {
2739
2836
  let d = s(() => {
2740
- if (cn(n), n === "hash") return ue();
2837
+ if (dn(n), n === "hash") return A();
2741
2838
  let e = /^#\/(.+)$/.exec(globalThis.location.hash);
2742
- return e && globalThis.history.replaceState(null, "", `/${e[1]}`), le(window, "/");
2743
- }, [n]), [f, p] = l(sa), m = e.screens[0]?.name ?? "", h = s(() => Ni(e.uiProfiles), [e]), g = s(() => m ? Ca(e, c) : void 0, [
2839
+ return e && globalThis.history.replaceState(null, "", `/${e[1]}`), de(window, "/");
2840
+ }, [n]), [f, p] = l(ga), m = e.screens[0]?.name ?? "", h = s(() => Hi(e.uiProfiles), [e]), g = s(() => m ? Ma(e, c) : void 0, [
2744
2841
  e,
2745
2842
  c,
2746
2843
  m
2747
- ]), _ = s(() => g ? ra(h, g) : [], [h, g]), v = s(() => g ? na(h, g, f) : void 0, [
2844
+ ]), _ = s(() => g ? fa(h, g) : [], [h, g]), v = s(() => g ? da(h, g, f) : void 0, [
2748
2845
  h,
2749
2846
  g,
2750
2847
  f
2751
- ]), y = s(() => aa(we, v?.accent), [v?.accent]), b = v?.showFooter ?? !0, x = s(() => wa(e, a.locales, a.locale, o, a.dictionary, c, b), [
2848
+ ]), y = s(() => ma(De, v?.accent), [v?.accent]), b = v?.showFooter ?? !0, x = s(() => Na(e, a.locales, a.locale, o, a.dictionary, c, b), [
2752
2849
  e,
2753
2850
  a.locales,
2754
2851
  a.locale,
@@ -2756,37 +2853,37 @@ function Aa({ scene: e, registry: t, routing: n, routeState: i, strings: a, pack
2756
2853
  o,
2757
2854
  c,
2758
2855
  b
2759
- ]), S = r((e) => p(e), []), C = s(() => fa(e, u, a.dictionary), [
2856
+ ]), S = r((e) => p(e), []), C = s(() => xa(e, u, a.dictionary), [
2760
2857
  e,
2761
2858
  u,
2762
2859
  a.dictionary
2763
2860
  ]), w = s(() => ({
2764
2861
  ...e,
2765
- screens: kr(_a(e.screens, [
2862
+ screens: Mr(Ea(e.screens, [
2766
2863
  ...e.screenTemplates,
2767
2864
  ...e.dialogTemplates ?? [],
2768
- ...F,
2865
+ ...P,
2769
2866
  ...c ?? []
2770
- ]), Da(e))
2867
+ ]), Ia(e))
2771
2868
  }), [e, c]);
2772
- return m ? _.length > 0 ? /* @__PURE__ */ L("main", {
2869
+ return m ? _.length > 0 ? /* @__PURE__ */ I("main", {
2773
2870
  className: "stage-message",
2774
2871
  role: "alert",
2775
2872
  "data-stage-startup-problem": "root-template",
2776
2873
  children: [
2777
- /* @__PURE__ */ I("h1", { children: "Unable to start this Stage" }),
2778
- /* @__PURE__ */ I("p", { children: "The ui profile's root template cannot be the application's shell." }),
2779
- /* @__PURE__ */ I("ul", { children: _.map((e) => /* @__PURE__ */ I("li", { children: e }, e)) })
2874
+ /* @__PURE__ */ F("h1", { children: "Unable to start this Stage" }),
2875
+ /* @__PURE__ */ F("p", { children: "The ui profile's root template cannot be the application's shell." }),
2876
+ /* @__PURE__ */ F("ul", { children: _.map((e) => /* @__PURE__ */ F("li", { children: e }, e)) })
2780
2877
  ]
2781
- }) : /* @__PURE__ */ I(_e, {
2878
+ }) : /* @__PURE__ */ F(ye, {
2782
2879
  application: w,
2783
2880
  composition: x,
2784
2881
  navigationModel: C,
2785
2882
  registry: t,
2786
2883
  initialScreen: m,
2787
2884
  history: d,
2788
- layoutConfigStorage: Oa(),
2789
- scope: (t, n) => /* @__PURE__ */ I(ja, {
2885
+ layoutConfigStorage: La(),
2886
+ scope: (t, n) => /* @__PURE__ */ F(Ba, {
2790
2887
  scene: e,
2791
2888
  routeState: i,
2792
2889
  strings: a,
@@ -2796,25 +2893,25 @@ function Aa({ scene: e, registry: t, routing: n, routeState: i, strings: a, pack
2796
2893
  onSystemSchemeChange: S,
2797
2894
  children: n
2798
2895
  }),
2799
- renderScreen: (e, n) => /* @__PURE__ */ I(Na, {
2896
+ renderScreen: (e, n) => /* @__PURE__ */ F(Ha, {
2800
2897
  element: e,
2801
2898
  configuration: n,
2802
2899
  registry: t
2803
2900
  }),
2804
- renderDialog: () => /* @__PURE__ */ I(Qr, {}),
2805
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ I(Pa, {
2901
+ renderDialog: () => /* @__PURE__ */ F(si, {}),
2902
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ F(Ua, {
2806
2903
  template: e,
2807
2904
  content: n,
2808
2905
  registry: t,
2809
2906
  strings: a,
2810
2907
  close: () => r.closeDialog()
2811
2908
  })
2812
- }) : /* @__PURE__ */ L("main", {
2909
+ }) : /* @__PURE__ */ I("main", {
2813
2910
  className: "stage-message",
2814
- children: [/* @__PURE__ */ I("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ I("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2911
+ 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." })]
2815
2912
  });
2816
2913
  }
2817
- function ja({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
2914
+ function Ba({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
2818
2915
  let [u, f] = l(""), { navigate: p } = r;
2819
2916
  return a(() => f(""), [r.currentScreen, r.currentDialog]), a(() => {
2820
2917
  let e = (e) => {
@@ -2831,24 +2928,24 @@ function ja({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2831
2928
  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.`));
2832
2929
  };
2833
2930
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
2834
- }, [p, e]), /* @__PURE__ */ I(re, {
2835
- registry: ba,
2836
- children: /* @__PURE__ */ L(ye, {
2931
+ }, [p, e]), /* @__PURE__ */ F(re, {
2932
+ registry: ka,
2933
+ children: /* @__PURE__ */ I(Se, {
2837
2934
  themes: i,
2838
2935
  children: [
2839
- o && /* @__PURE__ */ I(ca, {
2936
+ o && /* @__PURE__ */ F(_a, {
2840
2937
  settings: o,
2841
2938
  onSystemSchemeChange: s
2842
2939
  }),
2843
- /* @__PURE__ */ I(Qi, {}),
2844
- /* @__PURE__ */ I(Vt, {
2940
+ /* @__PURE__ */ F(sa, {}),
2941
+ /* @__PURE__ */ F(Wt, {
2845
2942
  routes: t.routes,
2846
2943
  routesReady: t.ready,
2847
2944
  parameters: r.currentParameters,
2848
2945
  locale: n.locale,
2849
2946
  locales: n.locales,
2850
2947
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
2851
- children: /* @__PURE__ */ I(Ma, {
2948
+ children: /* @__PURE__ */ F(Va, {
2852
2949
  activity: u,
2853
2950
  routesReady: t.ready,
2854
2951
  scene: e,
@@ -2861,14 +2958,14 @@ function ja({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2861
2958
  })
2862
2959
  });
2863
2960
  }
2864
- function Ma({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2865
- let o = B(), c = me(), l = an(), u = s(() => ga(l, t, o.refreshAfterCommand), [
2961
+ function Va({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2962
+ let o = z(), c = ge(), l = cn(), u = s(() => Ta(l, t, o.refreshAfterCommand), [
2866
2963
  l,
2867
2964
  t,
2868
2965
  o.refreshAfterCommand
2869
- ]), f = s(() => ma(n.commandSchemas), [n.commandSchemas]), p = A({
2966
+ ]), f = s(() => Ca(n.commandSchemas), [n.commandSchemas]), p = ue({
2870
2967
  executeCommand: async (e, n) => {
2871
- let i = W(e);
2968
+ let i = U(e);
2872
2969
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
2873
2970
  isSuccess: !1,
2874
2971
  validationErrors: []
@@ -2885,7 +2982,7 @@ function Ma({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2885
2982
  };
2886
2983
  },
2887
2984
  navigate: (e, t) => {
2888
- n.screens.some((t) => t.name === e) ? G(e, un(t)) : r(`The modeled screen “${e}” is not available.`);
2985
+ n.screens.some((t) => t.name === e) ? W(e, pn(t)) : r(`The modeled screen “${e}” is not available.`);
2889
2986
  },
2890
2987
  navigateBack: () => globalThis.history?.back(),
2891
2988
  openDialog: async (e) => {
@@ -2902,18 +2999,18 @@ function Ma({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2902
2999
  refreshQuery: async (e) => o.refreshQuery(e),
2903
3000
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
2904
3001
  });
2905
- return /* @__PURE__ */ I(Ui, {
3002
+ return /* @__PURE__ */ F(Qi, {
2906
3003
  state: {
2907
3004
  locales: i.locales,
2908
3005
  locale: i.locale,
2909
3006
  setLocale: i.setLocale,
2910
3007
  activity: e
2911
3008
  },
2912
- children: /* @__PURE__ */ I(oe, {
3009
+ children: /* @__PURE__ */ F(se, {
2913
3010
  invoker: u,
2914
- children: /* @__PURE__ */ I(ie, {
3011
+ children: /* @__PURE__ */ F(ae, {
2915
3012
  fieldsFor: f,
2916
- children: /* @__PURE__ */ I(D, {
3013
+ children: /* @__PURE__ */ F(ie, {
2917
3014
  dispatcher: p,
2918
3015
  context: {
2919
3016
  resolve: o.resolveBinding,
@@ -2927,11 +3024,11 @@ function Ma({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2927
3024
  })
2928
3025
  });
2929
3026
  }
2930
- function Na({ element: e, configuration: t, registry: n }) {
2931
- let r = B(), i = $t();
2932
- return /* @__PURE__ */ L(jn, {
3027
+ function Ha({ element: e, configuration: t, registry: n }) {
3028
+ let r = z(), i = nn();
3029
+ return /* @__PURE__ */ I(Pn, {
2933
3030
  element: e,
2934
- children: [/* @__PURE__ */ I(pi, { element: e }), /* @__PURE__ */ I(O, {
3031
+ children: [/* @__PURE__ */ F(Si, { element: e }), /* @__PURE__ */ F(D, {
2935
3032
  element: e,
2936
3033
  registry: n,
2937
3034
  resolveBinding: r.resolveBinding,
@@ -2941,27 +3038,27 @@ function Na({ element: e, configuration: t, registry: n }) {
2941
3038
  })]
2942
3039
  });
2943
3040
  }
2944
- function Pa({ template: e, content: t, registry: n, strings: r, close: i }) {
2945
- let o = B(), s = $t(), c = w(t, r.dictionary);
3041
+ function Ua({ template: e, content: t, registry: n, strings: r, close: i }) {
3042
+ let o = z(), s = nn(), c = w(t, r.dictionary);
2946
3043
  return a(() => {
2947
3044
  let e = (e) => {
2948
3045
  e.key === "Escape" && i();
2949
3046
  };
2950
3047
  return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
2951
- }, [i]), /* @__PURE__ */ I("div", {
3048
+ }, [i]), /* @__PURE__ */ F("div", {
2952
3049
  className: "stage-dialog-backdrop",
2953
- children: /* @__PURE__ */ L("section", {
3050
+ children: /* @__PURE__ */ I("section", {
2954
3051
  role: "dialog",
2955
3052
  "aria-modal": "true",
2956
3053
  "aria-label": e.displayName ?? e.name,
2957
3054
  className: "stage-dialog",
2958
- children: [/* @__PURE__ */ I("button", {
3055
+ children: [/* @__PURE__ */ F("button", {
2959
3056
  type: "button",
2960
3057
  onClick: i,
2961
3058
  children: "Close"
2962
- }), /* @__PURE__ */ I(jn, {
3059
+ }), /* @__PURE__ */ F(Pn, {
2963
3060
  element: c,
2964
- children: /* @__PURE__ */ I(O, {
3061
+ children: /* @__PURE__ */ F(D, {
2965
3062
  element: c,
2966
3063
  registry: n,
2967
3064
  resolveBinding: o.resolveBinding,
@@ -2972,4 +3069,4 @@ function Pa({ template: e, content: t, registry: n, strings: r, close: i }) {
2972
3069
  })
2973
3070
  });
2974
3071
  }
2975
- export { ka as App, ka as StageApplication, In as StageCommandForm, Vt as StageDataProvider, Tr as StageGuardedAction, at as StageSourceProvider, Ea as composeStageScreen, ga as createStageSliceInvoker, Ht as dataChanged, nn as executeRegisteredCommand, ft as hostedBasePath, ji as listsPrimeReact, yt as performQuery, ht as registerQueryRouteResolver, Mi as registerStageLibrary, W as registeredCommand, gt as registeredQuery, ma as sliceFieldsFrom, xa as stageApplicationRegistry, wa as stageComposition, e as stageDarkSelector, rt as stageEndpoints, Ca as stageShellOf, nt as staticStageSource, bt as subscribeQuery, an as useStageCommandExecutor, B as useStageData, V as useStageQuery, ot as useStageSource };
3072
+ export { Ra as App, Ra as StageApplication, zn as StageCommandForm, Wt as StageDataProvider, Or as StageGuardedAction, ct as StageSourceProvider, Fa as composeStageScreen, Ta as createStageSliceInvoker, Gt as dataChanged, on as executeRegisteredCommand, ht as hostedBasePath, Bi as listsPrimeReact, St as performQuery, vt as registerQueryRouteResolver, Vi as registerStageLibrary, U as registeredCommand, yt as registeredQuery, Ca as sliceFieldsFrom, Aa as stageApplicationRegistry, Na as stageComposition, e as stageDarkSelector, ot as stageEndpoints, Ma as stageShellOf, at as staticStageSource, Ct as subscribeQuery, cn as useStageCommandExecutor, z as useStageData, B as useStageQuery, lt as useStageSource };