@pygmalionjs/pygmalion 0.2.31 → 0.2.33

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.
@@ -1,12 +1,12 @@
1
- import { jsxs as C, jsx as w } from "react/jsx-runtime";
2
- import { b as Y, m as He, i as qe, g as Ke, e as q, c as Ge, a as Je, d as We, f as Ve, h as Qe, j as Le, k as Xe, l as Ye, n as be, o as ve, p as Ze, q as et, r as tt, t as nt, u as rt, v as ot, w as Ie, x as se, y as xe, S as st, A as it, z as Pe, B as at, C as ct, D as lt, E as dt, G as ut, H as ft, I as ht, J as pt, K as Ee } from "./App-UxJfVubu.js";
3
- import { L as mn, M as gn, O as yn, P as wn, Q as Sn, R as bn, T as vn, U as In, V as xn, W as Pn, X as En, Y as Cn, Z as Nn, _ as Rn, $ as An, a0 as $n, a1 as On, a2 as Mn, a3 as kn, a4 as Dn, a5 as Fn, a6 as Tn, a7 as zn, a8 as _n } from "./App-UxJfVubu.js";
4
- import { createElement as Ce, useMemo as ae, useState as re, useRef as me, useCallback as X, useEffect as oe } from "react";
5
- function ge(e, t = /* @__PURE__ */ new Set()) {
1
+ import { jsxs as N, jsx as S } from "react/jsx-runtime";
2
+ import { b as Z, m as Qe, i as Le, g as Xe, e as W, c as Ye, a as Ze, d as et, f as tt, h as nt, j as rt, k as ot, l as st, n as ge, o as Re, p as Ce, q as it, r as at, t as ct, u as lt, v as dt, w as ut, x as Ne, y as me, z as ie, A as ae, B as Ae, S as ft, C as ht, D as $e, E as pt, G as Oe, H as gt, I as mt, J as yt, K as wt, L as bt, M as Me } from "./App-D2mNX4Rn.js";
3
+ import { O as Sn, P as vn, Q as In, R as xn, T as Pn, U as En, V as Rn, W as Cn, X as Nn, Y as An, Z as $n, _ as On, $ as Mn, a0 as kn, a1 as Fn, a2 as Tn, a3 as Dn, a4 as zn, a5 as jn, a6 as _n, a7 as Bn, a8 as Un, a9 as Hn, aa as qn, ab as Kn } from "./App-D2mNX4Rn.js";
4
+ import { createElement as ke, useMemo as le, useState as re, useRef as be, useCallback as Y, useEffect as oe } from "react";
5
+ function Se(e, t = /* @__PURE__ */ new Set()) {
6
6
  if (e == null || typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e))
7
7
  return e;
8
8
  if (Array.isArray(e))
9
- return e.map((r) => ge(r, t));
9
+ return e.map((r) => Se(r, t));
10
10
  if (typeof e != "object") return null;
11
11
  if (t.has(e))
12
12
  throw new Error("A storyboard recipe cannot contain circular references.");
@@ -14,13 +14,13 @@ function ge(e, t = /* @__PURE__ */ new Set()) {
14
14
  const o = {};
15
15
  for (const r of Object.keys(e).sort()) {
16
16
  const n = e[r];
17
- n !== void 0 && (o[r] = ge(n, t));
17
+ n !== void 0 && (o[r] = Se(n, t));
18
18
  }
19
19
  return t.delete(e), o;
20
20
  }
21
- function mt(e) {
21
+ function St(e) {
22
22
  return JSON.stringify(
23
- ge({
23
+ Se({
24
24
  version: 1,
25
25
  route: e.route ?? null,
26
26
  componentName: e.componentName ?? null,
@@ -39,34 +39,34 @@ function mt(e) {
39
39
  })
40
40
  );
41
41
  }
42
- function z(e) {
42
+ function U(e) {
43
43
  return [...new Set([...e].map((t) => t == null ? void 0 : t.trim()).filter(Boolean))].sort((t, o) => t.localeCompare(o));
44
44
  }
45
- function gt(e, t) {
45
+ function vt(e, t) {
46
46
  var r;
47
47
  return ((r = e.id) == null ? void 0 : r.trim()) || `edge:${t + 1}`;
48
48
  }
49
- function yt(e) {
49
+ function It(e) {
50
50
  const t = [...e.screens].sort((r, n) => r.id.localeCompare(n.id)), o = t[0].id;
51
51
  return {
52
52
  id: `story:${o}`,
53
53
  canonicalScreenId: o,
54
54
  screenIds: t.map((r) => r.id),
55
- names: z(t.map((r) => r.name)),
55
+ names: U(t.map((r) => r.name)),
56
56
  recipeKey: e.recipeKey,
57
- routes: z(t.map((r) => r.route)),
58
- scenarioIds: z(
57
+ routes: U(t.map((r) => r.route)),
58
+ scenarioIds: U(
59
59
  t.flatMap((r) => [
60
60
  r.scenarioId,
61
61
  ...r.scenarioIds ?? []
62
62
  ])
63
63
  ),
64
- sourceKeys: z(t.map((r) => r.sourcePath)),
65
- flows: z(t.map((r) => r.flow)),
66
- states: z(t.map((r) => r.state))
64
+ sourceKeys: U(t.map((r) => r.sourcePath)),
65
+ flows: U(t.map((r) => r.flow)),
66
+ states: U(t.map((r) => r.state))
67
67
  };
68
68
  }
69
- function Ne(e) {
69
+ function Fe(e) {
70
70
  return [
71
71
  e.code,
72
72
  e.edgeId,
@@ -75,210 +75,210 @@ function Ne(e) {
75
75
  e.scenarioId
76
76
  ].join(":");
77
77
  }
78
- function wt(e) {
79
- var j, $;
78
+ function xt(e) {
79
+ var K, M;
80
80
  const t = [], o = [], r = /* @__PURE__ */ new Map();
81
81
  for (const i of e.screens) {
82
- const l = i.id.trim();
83
- if (!l || r.has(l)) {
82
+ const d = i.id.trim();
83
+ if (!d || r.has(d)) {
84
84
  t.push({
85
85
  code: "duplicate-screen-id",
86
86
  severity: "error",
87
- message: l ? `Multiple storyboard screens use the id "${l}".` : "A storyboard screen has an empty id.",
88
- screenId: l || void 0
87
+ message: d ? `Multiple storyboard screens use the id "${d}".` : "A storyboard screen has an empty id.",
88
+ screenId: d || void 0
89
89
  });
90
90
  continue;
91
91
  }
92
- const d = l === i.id ? i : { ...i, id: l };
93
- r.set(l, d), o.push(d);
92
+ const l = d === i.id ? i : { ...i, id: d };
93
+ r.set(d, l), o.push(l);
94
94
  }
95
95
  const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
96
96
  for (const i of o) {
97
- let l;
97
+ let d;
98
98
  try {
99
- if (l = (e.recipeKey ?? mt)(i), !l.trim()) throw new Error("Recipe keys cannot be empty.");
99
+ if (d = (e.recipeKey ?? St)(i), !d.trim()) throw new Error("Recipe keys cannot be empty.");
100
100
  } catch (f) {
101
101
  s.add(i.id), t.push({
102
102
  code: "invalid-recipe",
103
103
  severity: "error",
104
104
  message: f instanceof Error ? f.message : "Storyboard recipe identity could not be created.",
105
105
  screenId: i.id
106
- }), l = `invalid:${i.id}`;
106
+ }), d = `invalid:${i.id}`;
107
107
  }
108
- const d = n.get(l);
109
- d ? d.screens.push(i) : n.set(l, { recipeKey: l, screens: [i] });
108
+ const l = n.get(d);
109
+ l ? l.screens.push(i) : n.set(d, { recipeKey: d, screens: [i] });
110
110
  }
111
- const a = [...n.values()].map(yt).sort((i, l) => i.id.localeCompare(l.id)), c = {};
111
+ const a = [...n.values()].map(It).sort((i, d) => i.id.localeCompare(d.id)), c = {};
112
112
  for (const i of a)
113
- for (const l of i.screenIds) c[l] = i.id;
114
- const u = new Map(a.map((i) => [i.id, i])), g = /* @__PURE__ */ new Map();
113
+ for (const d of i.screenIds) c[d] = i.id;
114
+ const u = new Map(a.map((i) => [i.id, i])), w = /* @__PURE__ */ new Map();
115
115
  for (const i of e.assets ?? []) {
116
- const l = g.get(i.pageId);
117
- l ? l.push(i) : g.set(i.pageId, [i]);
116
+ const d = w.get(i.pageId);
117
+ d ? d.push(i) : w.set(i.pageId, [i]);
118
118
  }
119
119
  const h = a.map((i) => {
120
- const l = i.screenIds.flatMap(
121
- (d) => g.get(d) ?? []
120
+ const d = i.screenIds.flatMap(
121
+ (l) => w.get(l) ?? []
122
122
  );
123
123
  return {
124
124
  ...i,
125
- scenarioIds: z([
125
+ scenarioIds: U([
126
126
  ...i.scenarioIds,
127
- ...l.map((d) => d.scenarioId)
127
+ ...d.map((l) => l.scenarioId)
128
128
  ]),
129
- sourceKeys: z([
129
+ sourceKeys: U([
130
130
  ...i.sourceKeys,
131
- ...l.map((d) => d.sourcePath)
131
+ ...d.map((l) => l.sourcePath)
132
132
  ])
133
133
  };
134
- }), S = /* @__PURE__ */ new Map();
134
+ }), v = /* @__PURE__ */ new Map();
135
135
  for (const i of h)
136
- for (const l of i.routes) {
137
- const d = S.get(l);
138
- d ? d.push(i.id) : S.set(l, [i.id]);
136
+ for (const d of i.routes) {
137
+ const l = v.get(d);
138
+ l ? l.push(i.id) : v.set(d, [i.id]);
139
139
  }
140
- const m = (i, l, d) => {
141
- const f = i.trim(), v = c[f] ?? (u.has(f) ? f : null);
142
- if (v) return v;
143
- const P = z(S.get(f) ?? []);
144
- return P.length === 1 ? P[0] : P.length > 1 ? (t.push({
145
- code: d === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
140
+ const g = (i, d, l) => {
141
+ const f = i.trim(), E = c[f] ?? (u.has(f) ? f : null);
142
+ if (E) return E;
143
+ const y = U(v.get(f) ?? []);
144
+ return y.length === 1 ? y[0] : y.length > 1 ? (t.push({
145
+ code: l === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
146
146
  severity: "error",
147
- message: `Storyboard edge "${l}" references an ambiguous ${d} route.`,
148
- edgeId: l,
147
+ message: `Storyboard edge "${d}" references an ambiguous ${l} route.`,
148
+ edgeId: d,
149
149
  screenId: f || void 0
150
150
  }), null) : (t.push({
151
- code: d === "source" ? "unknown-edge-source" : "unknown-edge-target",
151
+ code: l === "source" ? "unknown-edge-source" : "unknown-edge-target",
152
152
  severity: "error",
153
- message: `Storyboard edge "${l}" references an unknown ${d}.`,
154
- edgeId: l,
153
+ message: `Storyboard edge "${d}" references an unknown ${l}.`,
154
+ edgeId: d,
155
155
  screenId: f || void 0
156
156
  }), null);
157
- }, I = [], y = /* @__PURE__ */ new Map(), N = [
157
+ }, R = [], b = /* @__PURE__ */ new Map(), A = [
158
158
  ["explicit", e.explicitEdges ?? []],
159
159
  ["inferred", e.inferredEdges ?? []]
160
160
  ];
161
161
  let p = 0;
162
- for (const [i, l] of N)
163
- for (const d of l) {
164
- const f = gt(d, p);
162
+ for (const [i, d] of A)
163
+ for (const l of d) {
164
+ const f = vt(l, p);
165
165
  p += 1;
166
- const v = m(d.from, f, "source"), P = m(d.to, f, "target");
167
- if (!v || !P || v === P) continue;
168
- const k = `${v}\0${P}`, R = y.get(k);
169
- if (R) {
170
- if (!R.sourceEdgeIds.includes(f)) {
171
- const J = {
172
- ...R,
173
- sourceEdgeIds: z([
174
- ...R.sourceEdgeIds,
166
+ const E = g(l.from, f, "source"), y = g(l.to, f, "target");
167
+ if (!E || !y || E === y) continue;
168
+ const m = `${E}\0${y}`, I = b.get(m);
169
+ if (I) {
170
+ if (!I.sourceEdgeIds.includes(f)) {
171
+ const F = {
172
+ ...I,
173
+ sourceEdgeIds: U([
174
+ ...I.sourceEdgeIds,
175
175
  f
176
176
  ])
177
177
  };
178
- y.set(k, J);
179
- const H = I.indexOf(R);
180
- H >= 0 && (I[H] = J);
178
+ b.set(m, F);
179
+ const j = R.indexOf(I);
180
+ j >= 0 && (R[j] = F);
181
181
  }
182
182
  continue;
183
183
  }
184
- const L = {
184
+ const $ = {
185
185
  id: f,
186
- from: v,
187
- to: P,
188
- kind: ((j = d.kind) == null ? void 0 : j.trim()) || void 0,
189
- label: (($ = d.label) == null ? void 0 : $.trim()) || void 0,
186
+ from: E,
187
+ to: y,
188
+ kind: ((K = l.kind) == null ? void 0 : K.trim()) || void 0,
189
+ label: ((M = l.label) == null ? void 0 : M.trim()) || void 0,
190
190
  origin: i,
191
191
  sourceEdgeIds: [f]
192
192
  };
193
- y.set(k, L), I.push(L);
193
+ b.set(m, $), R.push($);
194
194
  }
195
- I.sort(
196
- (i, l) => `${i.from}:${i.to}:${i.id}`.localeCompare(`${l.from}:${l.to}:${l.id}`)
195
+ R.sort(
196
+ (i, d) => `${i.from}:${i.to}:${i.id}`.localeCompare(`${d.from}:${d.to}:${d.id}`)
197
197
  );
198
- const O = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
199
- for (const i of I) {
200
- const l = A.get(i.from);
201
- l ? l.push(i) : A.set(i.from, [i]);
202
- const d = O.get(i.to);
203
- d ? d.push(i) : O.set(i.to, [i]);
198
+ const k = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
199
+ for (const i of R) {
200
+ const d = O.get(i.from);
201
+ d ? d.push(i) : O.set(i.from, [i]);
202
+ const l = k.get(i.to);
203
+ l ? l.push(i) : k.set(i.to, [i]);
204
204
  }
205
- const F = [];
205
+ const z = [];
206
206
  for (const i of e.startScreenIds ?? []) {
207
- const l = i.trim(), d = c[l] ?? (u.has(l) ? l : null);
208
- if (!d) {
207
+ const d = i.trim(), l = c[d] ?? (u.has(d) ? d : null);
208
+ if (!l) {
209
209
  t.push({
210
210
  code: "unknown-start-screen",
211
211
  severity: "error",
212
- message: `Storyboard start references an unknown screen "${l}".`,
213
- screenId: l || void 0
212
+ message: `Storyboard start references an unknown screen "${d}".`,
213
+ screenId: d || void 0
214
214
  });
215
215
  continue;
216
216
  }
217
- F.push(d);
217
+ z.push(l);
218
218
  }
219
- const M = new Set(F);
220
- let T = z(F);
221
- T.length || (T = h.filter((i) => {
222
- var l;
223
- return (((l = O.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0;
224
- }).map((i) => i.id).sort((i, l) => i.localeCompare(l))), !T.length && h.length && (T = [h[0].id]);
225
- const b = /* @__PURE__ */ new Set(), E = [...T];
226
- for (; E.length; ) {
227
- const i = E.shift();
228
- if (!b.has(i)) {
229
- b.add(i);
230
- for (const l of A.get(i) ?? []) E.push(l.to);
219
+ const T = new Set(z);
220
+ let _ = U(z);
221
+ _.length || (_ = h.filter((i) => {
222
+ var d;
223
+ return (((d = k.get(i.id)) == null ? void 0 : d.length) ?? 0) === 0;
224
+ }).map((i) => i.id).sort((i, d) => i.localeCompare(d))), !_.length && h.length && (_ = [h[0].id]);
225
+ const x = /* @__PURE__ */ new Set(), C = [..._];
226
+ for (; C.length; ) {
227
+ const i = C.shift();
228
+ if (!x.has(i)) {
229
+ x.add(i);
230
+ for (const d of O.get(i) ?? []) C.push(d.to);
231
231
  }
232
232
  }
233
233
  const D = h.filter((i) => {
234
- var d, f;
235
- const l = (((d = O.get(i.id)) == null ? void 0 : d.length) ?? 0) === 0 && (((f = A.get(i.id)) == null ? void 0 : f.length) ?? 0) === 0 && !M.has(i.id);
236
- return !b.has(i.id) || l && h.length > 1;
234
+ var l, f;
235
+ const d = (((l = k.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0 && (((f = O.get(i.id)) == null ? void 0 : f.length) ?? 0) === 0 && !T.has(i.id);
236
+ return !x.has(i.id) || d && h.length > 1;
237
237
  });
238
238
  for (const i of D)
239
- for (const l of i.screenIds)
239
+ for (const d of i.screenIds)
240
240
  t.push({
241
241
  code: "disconnected-screen",
242
242
  severity: "warning",
243
- message: `Storyboard screen "${l}" is not connected to a graph branch.`,
244
- screenId: l,
243
+ message: `Storyboard screen "${d}" is not connected to a graph branch.`,
244
+ screenId: d,
245
245
  nodeId: i.id
246
246
  });
247
- const B = /* @__PURE__ */ new Map();
247
+ const q = /* @__PURE__ */ new Map();
248
248
  for (const i of h)
249
- for (const l of i.sourceKeys) {
250
- const d = B.get(l) ?? {
249
+ for (const d of i.sourceKeys) {
250
+ const l = q.get(d) ?? {
251
251
  nodeIds: /* @__PURE__ */ new Set(),
252
252
  screenIds: /* @__PURE__ */ new Set()
253
253
  };
254
- d.nodeIds.add(i.id);
255
- for (const f of i.screenIds) d.screenIds.add(f);
256
- B.set(l, d);
254
+ l.nodeIds.add(i.id);
255
+ for (const f of i.screenIds) l.screenIds.add(f);
256
+ q.set(d, l);
257
257
  }
258
- const Z = [...B.entries()].map(([i, l]) => ({
258
+ const ee = [...q.entries()].map(([i, d]) => ({
259
259
  sourceKey: i,
260
- nodeIds: [...l.nodeIds].sort((d, f) => d.localeCompare(f)),
261
- screenIds: [...l.screenIds].sort((d, f) => d.localeCompare(f)),
262
- shared: l.nodeIds.size > 1
263
- })).sort((i, l) => i.sourceKey.localeCompare(l.sourceKey)), ee = h.map((i) => {
264
- const l = [...A.get(i.id) ?? []].sort(
265
- (d, f) => d.id.localeCompare(f.id)
260
+ nodeIds: [...d.nodeIds].sort((l, f) => l.localeCompare(f)),
261
+ screenIds: [...d.screenIds].sort((l, f) => l.localeCompare(f)),
262
+ shared: d.nodeIds.size > 1
263
+ })).sort((i, d) => i.sourceKey.localeCompare(d.sourceKey)), te = h.map((i) => {
264
+ const d = [...O.get(i.id) ?? []].sort(
265
+ (l, f) => l.id.localeCompare(f.id)
266
266
  );
267
267
  return {
268
268
  nodeId: i.id,
269
- edgeIds: l.map((d) => d.id),
270
- targetNodeIds: z(l.map((d) => d.to))
269
+ edgeIds: d.map((l) => l.id),
270
+ targetNodeIds: U(d.map((l) => l.to))
271
271
  };
272
- }).filter((i) => i.targetNodeIds.length > 1).sort((i, l) => i.nodeId.localeCompare(l.nodeId)), K = new Set(
272
+ }).filter((i) => i.targetNodeIds.length > 1).sort((i, d) => i.nodeId.localeCompare(d.nodeId)), V = new Set(
273
273
  h.flatMap((i) => i.scenarioIds)
274
- ), te = new Set(
274
+ ), ne = new Set(
275
275
  (e.nonVisualScenarioIds ?? []).map((i) => i.trim())
276
- ), V = z(
276
+ ), Q = U(
277
277
  (e.scenarios ?? []).map((i) => i.id)
278
- ), G = V.filter(
279
- (i) => !K.has(i) && !te.has(i)
278
+ ), B = Q.filter(
279
+ (i) => !V.has(i) && !ne.has(i)
280
280
  );
281
- for (const i of G)
281
+ for (const i of B)
282
282
  t.push({
283
283
  code: "missing-code-scenario",
284
284
  severity: "warning",
@@ -286,56 +286,56 @@ function wt(e) {
286
286
  scenarioId: i
287
287
  });
288
288
  t.sort(
289
- (i, l) => Ne(i).localeCompare(Ne(l))
289
+ (i, d) => Fe(i).localeCompare(Fe(d))
290
290
  );
291
- const Q = z(
291
+ const L = U(
292
292
  D.flatMap((i) => i.screenIds)
293
- ), x = {
293
+ ), P = {
294
294
  screens: o.length,
295
295
  canonicalNodes: h.length,
296
296
  mergedScreens: Math.max(0, o.length - h.length),
297
- edges: I.length,
297
+ edges: R.length,
298
298
  connectedNodes: h.length - D.length,
299
- disconnectedScreens: Q,
300
- codeScenarios: V.length,
301
- representedScenarios: V.filter(
302
- (i) => K.has(i)
299
+ disconnectedScreens: L,
300
+ codeScenarios: Q.length,
301
+ representedScenarios: Q.filter(
302
+ (i) => V.has(i)
303
303
  ).length,
304
- missingScenarios: G,
305
- complete: Q.length === 0 && G.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
304
+ missingScenarios: B,
305
+ complete: L.length === 0 && B.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
306
306
  };
307
307
  return {
308
308
  version: 1,
309
309
  nodes: h,
310
- edges: I,
310
+ edges: R,
311
311
  aliases: Object.fromEntries(
312
- Object.entries(c).sort(([i], [l]) => i.localeCompare(l))
312
+ Object.entries(c).sort(([i], [d]) => i.localeCompare(d))
313
313
  ),
314
- sourceGroups: Z,
315
- startNodeIds: T,
316
- branches: ee,
314
+ sourceGroups: ee,
315
+ startNodeIds: _,
316
+ branches: te,
317
317
  warnings: t,
318
- coverage: x
318
+ coverage: P
319
319
  };
320
320
  }
321
- function St(e) {
321
+ function Pt(e) {
322
322
  return e ? JSON.parse(JSON.stringify(e)) : void 0;
323
323
  }
324
- function ce(e) {
325
- if (Array.isArray(e)) return e.map(ce);
324
+ function de(e) {
325
+ if (Array.isArray(e)) return e.map(de);
326
326
  if (e && typeof e == "object") {
327
- const t = Object.entries(e).filter(([, o]) => o !== void 0).sort(([o], [r]) => o.localeCompare(r)).map(([o, r]) => [o, ce(r)]).filter(([, o]) => o !== void 0);
327
+ const t = Object.entries(e).filter(([, o]) => o !== void 0).sort(([o], [r]) => o.localeCompare(r)).map(([o, r]) => [o, de(r)]).filter(([, o]) => o !== void 0);
328
328
  return t.length ? Object.fromEntries(t) : void 0;
329
329
  }
330
330
  return e;
331
331
  }
332
- function Re(e) {
333
- return JSON.stringify(ce(e ?? null));
332
+ function Te(e) {
333
+ return JSON.stringify(de(e ?? null));
334
334
  }
335
- function bt(e) {
335
+ function Et(e) {
336
336
  return !!(e && typeof e == "object" && !Array.isArray(e));
337
337
  }
338
- function U(e) {
338
+ function J(e) {
339
339
  const t = e == null ? void 0 : e.trim();
340
340
  if (!t) return null;
341
341
  let o = t;
@@ -346,10 +346,10 @@ function U(e) {
346
346
  }
347
347
  return o = o.split(/[?#]/, 1)[0].replace(/\/{2,}/g, "/"), o.startsWith("/") || (o = `/${o}`), o.length > 1 && (o = o.replace(/\/+$/, "")), o || "/";
348
348
  }
349
- function Fe(e) {
349
+ function He(e) {
350
350
  return `source-route:${encodeURIComponent(e)}`;
351
351
  }
352
- function Se(e, t) {
352
+ function xe(e, t) {
353
353
  const o = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
354
354
  let n = 0;
355
355
  for (let s = 0; s < o.length; s += 1) {
@@ -363,23 +363,23 @@ function Se(e, t) {
363
363
  }
364
364
  return n === r.length;
365
365
  }
366
- function Ae(e, t) {
367
- const o = U(e);
366
+ function De(e, t) {
367
+ const o = J(e);
368
368
  if (!o) return [];
369
369
  const r = t.get(o);
370
370
  return r && !/[:*]/.test(o) ? [r] : [
371
371
  ...new Set(
372
- [...t.entries()].filter(([n]) => Se(o, n)).map(([, n]) => n)
372
+ [...t.entries()].filter(([n]) => xe(o, n)).map(([, n]) => n)
373
373
  )
374
374
  ].sort((n, s) => n.localeCompare(s));
375
375
  }
376
- function vt(e) {
376
+ function Rt(e) {
377
377
  var o;
378
378
  const t = /* @__PURE__ */ new Map();
379
379
  for (const r of e ?? []) {
380
- const n = U(r.path);
380
+ const n = J(r.path);
381
381
  !n || t.has(n) || t.set(n, {
382
- id: Fe(n),
382
+ id: He(n),
383
383
  name: n,
384
384
  section: "Source routes",
385
385
  codeName: ((o = r.id) == null ? void 0 : o.trim()) || void 0
@@ -387,42 +387,42 @@ function vt(e) {
387
387
  }
388
388
  return [...t.values()].sort((r, n) => r.id.localeCompare(n.id));
389
389
  }
390
- function It(e, t, o) {
390
+ function Ct(e, t, o) {
391
391
  return (e ?? []).flatMap((r, n) => {
392
- var h, S, m;
393
- const s = (h = r.from) == null ? void 0 : h.trim(), a = (S = r.to) == null ? void 0 : S.trim();
392
+ var h, v, g;
393
+ const s = (h = r.from) == null ? void 0 : h.trim(), a = (v = r.to) == null ? void 0 : v.trim();
394
394
  if (!s || !a || r.unresolvedTarget) return [];
395
- const c = o.has(s) ? [s] : Ae(s, t), u = o.has(a) ? [a] : Ae(a, t);
395
+ const c = o.has(s) ? [s] : De(s, t), u = o.has(a) ? [a] : De(a, t);
396
396
  if (!c.length || !u.length) return [];
397
- const g = ((m = r.id) == null ? void 0 : m.trim()) || `discovery-edge:${n + 1}`;
397
+ const w = ((g = r.id) == null ? void 0 : g.trim()) || `discovery-edge:${n + 1}`;
398
398
  return c.flatMap(
399
- (I, y) => u.map((N, p) => {
400
- var O, A;
399
+ (R, b) => u.map((A, p) => {
400
+ var k, O;
401
401
  return {
402
- id: c.length === 1 && u.length === 1 ? g : `${g}:${y + 1}:${p + 1}`,
403
- from: I,
404
- to: N,
405
- kind: ((O = r.kind) == null ? void 0 : O.trim()) || void 0,
406
- label: ((A = r.label) == null ? void 0 : A.trim()) || void 0
402
+ id: c.length === 1 && u.length === 1 ? w : `${w}:${b + 1}:${p + 1}`,
403
+ from: R,
404
+ to: A,
405
+ kind: ((k = r.kind) == null ? void 0 : k.trim()) || void 0,
406
+ label: ((O = r.label) == null ? void 0 : O.trim()) || void 0
407
407
  };
408
408
  })
409
409
  );
410
410
  });
411
411
  }
412
- function xt(e, t, o) {
413
- const r = U(e.route);
412
+ function Nt(e, t, o) {
413
+ const r = J(e.route);
414
414
  if (!r) return [];
415
415
  const n = t.filter(
416
416
  (c) => {
417
- const u = U(c.route);
418
- return u ? Se(u, r) : !1;
417
+ const u = J(c.route);
418
+ return u ? xe(u, r) : !1;
419
419
  }
420
420
  );
421
421
  if (!n.length) return [];
422
- const s = Re(
423
- He(o, e.environment)
422
+ const s = Te(
423
+ Qe(o, e.environment)
424
424
  ), a = n.filter(
425
- (c) => Re(c.environment) === s
425
+ (c) => Te(c.environment) === s
426
426
  );
427
427
  return [
428
428
  ...new Set(
@@ -433,8 +433,8 @@ function xt(e, t, o) {
433
433
  )
434
434
  ].sort((c, u) => c.localeCompare(u));
435
435
  }
436
- function Pt(e, t) {
437
- const o = e.some((s) => s.importKind != null), r = t.candidates ?? [], n = ze(t);
436
+ function At(e, t) {
437
+ const o = e.some((s) => s.importKind != null), r = t.candidates ?? [], n = Ke(t);
438
438
  return e.filter(
439
439
  (s) => o ? s.importKind === "screens" : !!s.route
440
440
  ).map((s) => ({
@@ -455,7 +455,7 @@ function Pt(e, t) {
455
455
  scenario: s.scenario,
456
456
  state: s.state,
457
457
  scenarioId: s.scenarioId,
458
- scenarioIds: xt(s, r, n),
458
+ scenarioIds: Nt(s, r, n),
459
459
  interactions: s.interactions,
460
460
  environment: s.environment,
461
461
  preset: s.preset,
@@ -463,33 +463,33 @@ function Pt(e, t) {
463
463
  sourcePath: [...s.sourcePaths ?? []].filter(Boolean).sort((a, c) => a.localeCompare(c))[0]
464
464
  }));
465
465
  }
466
- function fe(e, t) {
467
- var c, u, g, h;
466
+ function pe(e, t) {
467
+ var c, u, w, h;
468
468
  const o = (((c = e.interactions) == null ? void 0 : c.length) ?? 0) - (((u = t.interactions) == null ? void 0 : u.length) ?? 0);
469
469
  if (o !== 0) return o;
470
- const r = (g = e.scenarioIds) != null && g.includes("environment:baseline") ? 0 : 1, n = (h = t.scenarioIds) != null && h.includes("environment:baseline") ? 0 : 1;
470
+ const r = (w = e.scenarioIds) != null && w.includes("environment:baseline") ? 0 : 1, n = (h = t.scenarioIds) != null && h.includes("environment:baseline") ? 0 : 1;
471
471
  if (r !== n) return r - n;
472
472
  const s = !e.environment && !e.preset ? 0 : 1, a = !t.environment && !t.preset ? 0 : 1;
473
473
  return s !== a ? s - a : e.id.localeCompare(t.id);
474
474
  }
475
- function Et(e) {
475
+ function $t(e) {
476
476
  const t = /* @__PURE__ */ new Map();
477
477
  for (const o of e) {
478
- const r = U(o.route);
478
+ const r = J(o.route);
479
479
  if (!r) continue;
480
480
  const n = t.get(r);
481
481
  n ? n.push(o) : t.set(r, [o]);
482
482
  }
483
483
  return new Map(
484
484
  [...t.entries()].map(([o, r]) => {
485
- const n = [...r].sort(fe);
485
+ const n = [...r].sort(pe);
486
486
  return [o, n[0].id];
487
487
  })
488
488
  );
489
489
  }
490
- function Ct(e) {
490
+ function Ot(e) {
491
491
  return e.action === "wait" ? null : JSON.stringify(
492
- ce({
492
+ de({
493
493
  action: e.action,
494
494
  selector: e.selector,
495
495
  text: e.text,
@@ -503,23 +503,23 @@ function Ct(e) {
503
503
  })
504
504
  );
505
505
  }
506
- function Te(e) {
507
- return (e.interactions ?? []).map(Ct).filter((t) => t != null);
506
+ function qe(e) {
507
+ return (e.interactions ?? []).map(Ot).filter((t) => t != null);
508
508
  }
509
- function Nt(e, t) {
509
+ function Mt(e, t) {
510
510
  return e.length < t.length && e.every((o, r) => o === t[r]);
511
511
  }
512
- function Rt(e, t) {
512
+ function kt(e, t) {
513
513
  const o = /* @__PURE__ */ new Map();
514
514
  for (const r of e) {
515
- const n = U(r.route);
515
+ const n = J(r.route);
516
516
  if (!n) continue;
517
- const s = `${n}\0${Te(r).join("")}`, a = o.get(s);
517
+ const s = `${n}\0${qe(r).join("")}`, a = o.get(s);
518
518
  a ? a.push(r) : o.set(s, [r]);
519
519
  }
520
520
  return [...o.values()].flatMap((r) => {
521
521
  if (r.length < 2) return [];
522
- const n = U(r[0].route), s = t.get(n), a = r.find((c) => c.id === s) ?? [...r].sort(fe)[0];
522
+ const n = J(r[0].route), s = t.get(n), a = r.find((c) => c.id === s) ?? [...r].sort(pe)[0];
523
523
  return r.filter((c) => c.id !== a.id).sort((c, u) => c.id.localeCompare(u.id)).map((c) => ({
524
524
  id: `discovery-variant:${encodeURIComponent(a.id)}:${encodeURIComponent(c.id)}`,
525
525
  from: a.id,
@@ -528,46 +528,46 @@ function Rt(e, t) {
528
528
  }));
529
529
  });
530
530
  }
531
- function At(e, t) {
531
+ function Ft(e, t) {
532
532
  const o = /* @__PURE__ */ new Map();
533
533
  for (const r of e) {
534
- const n = U(r.route);
534
+ const n = J(r.route);
535
535
  if (!n) continue;
536
536
  const s = o.get(n);
537
537
  s ? s.push(r) : o.set(n, [r]);
538
538
  }
539
539
  return [...o.entries()].flatMap(([r, n]) => {
540
540
  const s = new Map(
541
- n.map((u) => [u.id, Te(u)])
541
+ n.map((u) => [u.id, qe(u)])
542
542
  ), a = t.get(r), c = n.find(
543
543
  (u) => u.id === a
544
544
  );
545
545
  return n.flatMap((u) => {
546
- const g = s.get(u.id);
547
- if (!g.length) return [];
548
- const S = n.filter(
549
- (m) => Nt(
550
- s.get(m.id),
551
- g
546
+ const w = s.get(u.id);
547
+ if (!w.length) return [];
548
+ const v = n.filter(
549
+ (g) => Mt(
550
+ s.get(g.id),
551
+ w
552
552
  )
553
- ).sort((m, I) => {
554
- const y = s.get(I.id).length - s.get(m.id).length;
555
- if (y !== 0) return y;
556
- const N = m.flow && m.flow === u.flow ? 0 : 1, p = I.flow && I.flow === u.flow ? 0 : 1;
557
- if (N !== p) return N - p;
558
- const O = m.section && m.section === u.section ? 0 : 1, A = I.section && I.section === u.section ? 0 : 1;
559
- if (O !== A) return O - A;
560
- const F = m.id === a ? 0 : 1, M = I.id === a ? 0 : 1;
561
- return F !== M ? F - M : fe(m, I);
553
+ ).sort((g, R) => {
554
+ const b = s.get(R.id).length - s.get(g.id).length;
555
+ if (b !== 0) return b;
556
+ const A = g.flow && g.flow === u.flow ? 0 : 1, p = R.flow && R.flow === u.flow ? 0 : 1;
557
+ if (A !== p) return A - p;
558
+ const k = g.section && g.section === u.section ? 0 : 1, O = R.section && R.section === u.section ? 0 : 1;
559
+ if (k !== O) return k - O;
560
+ const z = g.id === a ? 0 : 1, T = R.id === a ? 0 : 1;
561
+ return z !== T ? z - T : pe(g, R);
562
562
  })[0];
563
- return S ? [
563
+ return v ? [
564
564
  {
565
- id: `discovery-recipe:${encodeURIComponent(S.id)}:${encodeURIComponent(u.id)}`,
566
- from: S.id,
565
+ id: `discovery-recipe:${encodeURIComponent(v.id)}:${encodeURIComponent(u.id)}`,
566
+ from: v.id,
567
567
  to: u.id,
568
568
  kind: "recipe-step"
569
569
  }
570
- ] : c && c.id !== u.id && s.get(c.id).join("") !== g.join("") ? [
570
+ ] : c && c.id !== u.id && s.get(c.id).join("") !== w.join("") ? [
571
571
  {
572
572
  id: `discovery-route-case:${encodeURIComponent(c.id)}:${encodeURIComponent(u.id)}`,
573
573
  from: c.id,
@@ -578,7 +578,7 @@ function At(e, t) {
578
578
  });
579
579
  });
580
580
  }
581
- function $t(e) {
581
+ function Tt(e) {
582
582
  var o;
583
583
  const t = /* @__PURE__ */ new Map();
584
584
  for (const r of e) {
@@ -590,14 +590,14 @@ function $t(e) {
590
590
  return [...t.values()].flatMap((r) => {
591
591
  const n = r[0], s = /* @__PURE__ */ new Map();
592
592
  for (const a of r) {
593
- const c = U(a.route);
593
+ const c = J(a.route);
594
594
  if (!c) continue;
595
595
  const u = s.get(c);
596
596
  u ? u.push(a) : s.set(c, [a]);
597
597
  }
598
598
  return s.size < 2 ? [] : [...s.values()].flatMap((a) => {
599
599
  const c = [...a].sort(
600
- fe
600
+ pe
601
601
  )[0];
602
602
  return c.id === n.id ? [] : [
603
603
  {
@@ -610,116 +610,116 @@ function $t(e) {
610
610
  });
611
611
  });
612
612
  }
613
- function Ot(e, t, o) {
613
+ function Dt(e, t, o) {
614
614
  const r = new Set(
615
- (t.routes ?? []).map((n) => U(n.path)).filter((n) => !!n)
615
+ (t.routes ?? []).map((n) => J(n.path)).filter((n) => !!n)
616
616
  );
617
617
  return e.map((n) => {
618
- const s = U(n.route);
618
+ const s = J(n.route);
619
619
  if (!s || o.get(s) !== n.id)
620
620
  return n;
621
621
  const a = [...r].filter(
622
- (c) => Se(c, s)
622
+ (c) => xe(c, s)
623
623
  );
624
624
  return a.length ? {
625
625
  ...n,
626
626
  scenarioIds: [
627
627
  .../* @__PURE__ */ new Set([
628
628
  ...n.scenarioIds ?? [],
629
- ...a.map(Fe)
629
+ ...a.map(He)
630
630
  ])
631
631
  ].sort((c, u) => c.localeCompare(u))
632
632
  } : n;
633
633
  });
634
634
  }
635
- function Mt(e, t) {
636
- var g, h, S, m, I;
637
- const o = new Set(e.map((y) => y.id)), r = new Map(
638
- e.map((y, N) => [y.id, N])
635
+ function zt(e, t) {
636
+ var w, h, v, g, R;
637
+ const o = new Set(e.map((b) => b.id)), r = new Map(
638
+ e.map((b, A) => [b.id, A])
639
639
  ), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
640
- for (const y of o)
641
- n.set(y, /* @__PURE__ */ new Set()), s.set(y, /* @__PURE__ */ new Set()), a.set(y, /* @__PURE__ */ new Set());
642
- for (const y of t)
643
- !o.has(y.from) || !o.has(y.to) || ((g = n.get(y.to)) == null || g.add(y.from), (h = s.get(y.from)) == null || h.add(y.to), (S = a.get(y.from)) == null || S.add(y.to), (m = a.get(y.to)) == null || m.add(y.from));
640
+ for (const b of o)
641
+ n.set(b, /* @__PURE__ */ new Set()), s.set(b, /* @__PURE__ */ new Set()), a.set(b, /* @__PURE__ */ new Set());
642
+ for (const b of t)
643
+ !o.has(b.from) || !o.has(b.to) || ((w = n.get(b.to)) == null || w.add(b.from), (h = s.get(b.from)) == null || h.add(b.to), (v = a.get(b.from)) == null || v.add(b.to), (g = a.get(b.to)) == null || g.add(b.from));
644
644
  const c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
645
- for (const y of o) {
646
- if (u.has(y)) continue;
647
- const N = [], p = [y];
645
+ for (const b of o) {
646
+ if (u.has(b)) continue;
647
+ const A = [], p = [b];
648
648
  for (; p.length; ) {
649
- const b = p.shift();
650
- if (!u.has(b)) {
651
- u.add(b), N.push(b);
652
- for (const E of a.get(b) ?? [])
653
- u.has(E) || p.push(E);
649
+ const x = p.shift();
650
+ if (!u.has(x)) {
651
+ u.add(x), A.push(x);
652
+ for (const C of a.get(x) ?? [])
653
+ u.has(C) || p.push(C);
654
654
  }
655
655
  }
656
- if (N.length === 1 && (((I = a.get(N[0])) == null ? void 0 : I.size) ?? 0) === 0)
656
+ if (A.length === 1 && (((R = a.get(A[0])) == null ? void 0 : R.size) ?? 0) === 0)
657
657
  continue;
658
- const O = N.filter((b) => {
659
- var E;
660
- return (((E = n.get(b)) == null ? void 0 : E.size) ?? 0) === 0;
658
+ const k = A.filter((x) => {
659
+ var C;
660
+ return (((C = n.get(x)) == null ? void 0 : C.size) ?? 0) === 0;
661
661
  }).sort(
662
- (b, E) => (r.get(b) ?? Number.MAX_SAFE_INTEGER) - (r.get(E) ?? Number.MAX_SAFE_INTEGER) || b.localeCompare(E)
663
- ), A = [...N].sort(
664
- (b, E) => (r.get(b) ?? Number.MAX_SAFE_INTEGER) - (r.get(E) ?? Number.MAX_SAFE_INTEGER) || b.localeCompare(E)
662
+ (x, C) => (r.get(x) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || x.localeCompare(C)
663
+ ), O = [...A].sort(
664
+ (x, C) => (r.get(x) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || x.localeCompare(C)
665
665
  )[0];
666
- if (!A) continue;
667
- const F = [A], M = /* @__PURE__ */ new Set(), T = (b) => {
668
- const E = [b];
669
- for (; E.length; ) {
670
- const D = E.shift();
671
- if (!M.has(D)) {
672
- M.add(D);
673
- for (const B of s.get(D) ?? [])
674
- M.has(B) || E.push(B);
666
+ if (!O) continue;
667
+ const z = [O], T = /* @__PURE__ */ new Set(), _ = (x) => {
668
+ const C = [x];
669
+ for (; C.length; ) {
670
+ const D = C.shift();
671
+ if (!T.has(D)) {
672
+ T.add(D);
673
+ for (const q of s.get(D) ?? [])
674
+ T.has(q) || C.push(q);
675
675
  }
676
676
  }
677
677
  };
678
- T(A);
679
- for (const b of O)
680
- M.has(b) || (F.push(b), T(b));
681
- for (const b of F)
682
- c.add(b);
678
+ _(O);
679
+ for (const x of k)
680
+ T.has(x) || (z.push(x), _(x));
681
+ for (const x of z)
682
+ c.add(x);
683
683
  }
684
684
  return [...c].sort(
685
- (y, N) => (r.get(y) ?? Number.MAX_SAFE_INTEGER) - (r.get(N) ?? Number.MAX_SAFE_INTEGER) || y.localeCompare(N)
685
+ (b, A) => (r.get(b) ?? Number.MAX_SAFE_INTEGER) - (r.get(A) ?? Number.MAX_SAFE_INTEGER) || b.localeCompare(A)
686
686
  );
687
687
  }
688
- function ze(e) {
688
+ function Ke(e) {
689
689
  var t, o;
690
- return St(
690
+ return Pt(
691
691
  (o = (t = e.scenarios) == null ? void 0 : t.find(
692
692
  (r) => r.id === "environment:baseline"
693
693
  )) == null ? void 0 : o.environment
694
694
  );
695
695
  }
696
- function kt(e) {
697
- const t = Pt(
696
+ function jt(e) {
697
+ const t = At(
698
698
  e.pages,
699
699
  e.manifest
700
- ), o = Et(t), r = Ot(
700
+ ), o = $t(t), r = Dt(
701
701
  t,
702
702
  e.manifest,
703
703
  o
704
704
  ), s = [
705
- ...It(
705
+ ...Ct(
706
706
  e.manifest.edges,
707
707
  o,
708
708
  new Set(r.map((a) => a.id))
709
709
  ),
710
- ...Rt(r, o),
711
- ...At(r, o),
712
- ...$t(r)
710
+ ...kt(r, o),
711
+ ...Ft(r, o),
712
+ ...Tt(r)
713
713
  ];
714
- return wt({
714
+ return xt({
715
715
  screens: r,
716
716
  assets: e.assets,
717
- scenarios: vt(e.manifest.routes),
717
+ scenarios: Rt(e.manifest.routes),
718
718
  inferredEdges: s,
719
- startScreenIds: Mt(r, s)
719
+ startScreenIds: zt(r, s)
720
720
  });
721
721
  }
722
- async function _e(e) {
722
+ async function Ge(e) {
723
723
  const o = await (e.fetcher ?? ((n, s) => fetch(n, s)))(e.endpoint, {
724
724
  headers: { accept: "application/json" },
725
725
  cache: "no-store",
@@ -728,41 +728,41 @@ async function _e(e) {
728
728
  if (!o.ok)
729
729
  throw new Error(`Storyboard discovery failed (${o.status})`);
730
730
  const r = await o.json();
731
- if (!bt(r))
731
+ if (!Et(r))
732
732
  throw new Error("Storyboard discovery returned an invalid manifest.");
733
733
  return {
734
734
  manifest: r,
735
- baselineEnvironment: ze(r),
736
- graph: kt({
735
+ baselineEnvironment: Ke(r),
736
+ graph: jt({
737
737
  manifest: r,
738
738
  pages: e.pages,
739
739
  assets: e.assets
740
740
  })
741
741
  };
742
742
  }
743
- async function Zt(e) {
744
- Y(null);
743
+ async function on(e) {
744
+ Z(null);
745
745
  try {
746
- const t = await _e(e);
747
- return Y(t.graph), t;
746
+ const t = await Ge(e);
747
+ return Z(t.graph), t;
748
748
  } catch (t) {
749
- throw Y(null), t;
749
+ throw Z(null), t;
750
750
  }
751
751
  }
752
- const le = "var(--pygmalion-catalog-surface, #ffffff)", de = "var(--pygmalion-catalog-canvas, #f5f5f5)", ye = "var(--pygmalion-catalog-border, #e5e7eb)", ue = "var(--pygmalion-catalog-text, #202124)", _ = "var(--pygmalion-catalog-muted, #6b7280)", Dt = "var(--pygmalion-catalog-header, #11182f)", Ft = "var(--pygmalion-catalog-accent, #7c6cf2)";
753
- function en({
752
+ const ue = "var(--pygmalion-catalog-surface, #ffffff)", fe = "var(--pygmalion-catalog-canvas, #f5f5f5)", ve = "var(--pygmalion-catalog-border, #e5e7eb)", he = "var(--pygmalion-catalog-text, #202124)", H = "var(--pygmalion-catalog-muted, #6b7280)", _t = "var(--pygmalion-catalog-header, #11182f)", Bt = "var(--pygmalion-catalog-accent, #7c6cf2)";
753
+ function sn({
754
754
  title: e,
755
755
  eyebrow: t,
756
756
  description: o,
757
757
  version: r,
758
758
  meta: n,
759
759
  children: s,
760
- headerBackground: a = Dt,
760
+ headerBackground: a = _t,
761
761
  headerColor: c = "#ffffff",
762
- bodyBackground: u = le,
763
- bodyGap: g = 40
762
+ bodyBackground: u = ue,
763
+ bodyGap: w = 40
764
764
  }) {
765
- return /* @__PURE__ */ C(
765
+ return /* @__PURE__ */ N(
766
766
  "section",
767
767
  {
768
768
  "data-pygmalion-catalog-document": "",
@@ -774,12 +774,12 @@ function en({
774
774
  maxWidth: "none",
775
775
  flexDirection: "column",
776
776
  overflow: "visible",
777
- color: ue,
777
+ color: he,
778
778
  background: u,
779
779
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
780
780
  },
781
781
  children: [
782
- /* @__PURE__ */ C(
782
+ /* @__PURE__ */ N(
783
783
  "header",
784
784
  {
785
785
  style: {
@@ -793,8 +793,8 @@ function en({
793
793
  background: a
794
794
  },
795
795
  children: [
796
- /* @__PURE__ */ C("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
797
- t ? /* @__PURE__ */ w(
796
+ /* @__PURE__ */ N("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
797
+ t ? /* @__PURE__ */ S(
798
798
  "div",
799
799
  {
800
800
  style: {
@@ -807,7 +807,7 @@ function en({
807
807
  children: t
808
808
  }
809
809
  ) : null,
810
- /* @__PURE__ */ w(
810
+ /* @__PURE__ */ S(
811
811
  "h1",
812
812
  {
813
813
  style: {
@@ -821,7 +821,7 @@ function en({
821
821
  children: e
822
822
  }
823
823
  ),
824
- o ? /* @__PURE__ */ w(
824
+ o ? /* @__PURE__ */ S(
825
825
  "div",
826
826
  {
827
827
  style: {
@@ -834,7 +834,7 @@ function en({
834
834
  }
835
835
  ) : null
836
836
  ] }),
837
- r || n ? /* @__PURE__ */ C(
837
+ r || n ? /* @__PURE__ */ N(
838
838
  "div",
839
839
  {
840
840
  style: {
@@ -846,15 +846,15 @@ function en({
846
846
  whiteSpace: "nowrap"
847
847
  },
848
848
  children: [
849
- r ? /* @__PURE__ */ w("span", { children: r }) : null,
850
- n ? /* @__PURE__ */ w("span", { children: n }) : null
849
+ r ? /* @__PURE__ */ S("span", { children: r }) : null,
850
+ n ? /* @__PURE__ */ S("span", { children: n }) : null
851
851
  ]
852
852
  }
853
853
  ) : null
854
854
  ]
855
855
  }
856
856
  ),
857
- /* @__PURE__ */ w(
857
+ /* @__PURE__ */ S(
858
858
  "div",
859
859
  {
860
860
  "data-pygmalion-catalog-document-body": "",
@@ -863,7 +863,7 @@ function en({
863
863
  display: "inline-flex",
864
864
  flexDirection: "column",
865
865
  alignItems: "flex-start",
866
- gap: g,
866
+ gap: w,
867
867
  padding: 48,
868
868
  background: u
869
869
  },
@@ -874,14 +874,14 @@ function en({
874
874
  }
875
875
  );
876
876
  }
877
- function tn({
877
+ function an({
878
878
  title: e,
879
879
  count: t,
880
880
  description: o,
881
881
  children: r,
882
882
  tone: n = "tinted"
883
883
  }) {
884
- return /* @__PURE__ */ C(
884
+ return /* @__PURE__ */ N(
885
885
  "section",
886
886
  {
887
887
  "data-pygmalion-catalog-section": "",
@@ -893,11 +893,11 @@ function tn({
893
893
  alignItems: "flex-start",
894
894
  gap: 18,
895
895
  padding: n === "tinted" ? 24 : 0,
896
- background: n === "tinted" ? de : "transparent"
896
+ background: n === "tinted" ? fe : "transparent"
897
897
  },
898
898
  children: [
899
- /* @__PURE__ */ C("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
900
- /* @__PURE__ */ w(
899
+ /* @__PURE__ */ N("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
900
+ /* @__PURE__ */ S(
901
901
  "h2",
902
902
  {
903
903
  style: {
@@ -909,15 +909,15 @@ function tn({
909
909
  children: e
910
910
  }
911
911
  ),
912
- typeof t == "number" ? /* @__PURE__ */ w("span", { style: { color: _, fontSize: 11 }, children: t }) : null
912
+ typeof t == "number" ? /* @__PURE__ */ S("span", { style: { color: H, fontSize: 11 }, children: t }) : null
913
913
  ] }),
914
- o ? /* @__PURE__ */ w("div", { style: { marginTop: -10, color: _, fontSize: 11 }, children: o }) : null,
914
+ o ? /* @__PURE__ */ S("div", { style: { marginTop: -10, color: H, fontSize: 11 }, children: o }) : null,
915
915
  r
916
916
  ]
917
917
  }
918
918
  );
919
919
  }
920
- function nn({
920
+ function cn({
921
921
  rows: e,
922
922
  columns: t,
923
923
  cornerLabel: o,
@@ -927,7 +927,7 @@ function nn({
927
927
  boundary: a = !0,
928
928
  cellStyle: c
929
929
  }) {
930
- return /* @__PURE__ */ w(
930
+ return /* @__PURE__ */ S(
931
931
  "div",
932
932
  {
933
933
  "data-pygmalion-catalog-matrix": "",
@@ -936,10 +936,10 @@ function nn({
936
936
  display: "inline-block",
937
937
  width: "max-content",
938
938
  padding: a ? 16 : 0,
939
- border: a ? `1px dashed ${Ft}` : void 0,
939
+ border: a ? `1px dashed ${Bt}` : void 0,
940
940
  borderRadius: a ? 4 : void 0
941
941
  },
942
- children: /* @__PURE__ */ C(
942
+ children: /* @__PURE__ */ N(
943
943
  "table",
944
944
  {
945
945
  style: {
@@ -948,13 +948,13 @@ function nn({
948
948
  borderSpacing: 0
949
949
  },
950
950
  children: [
951
- /* @__PURE__ */ w("thead", { children: /* @__PURE__ */ C("tr", { children: [
952
- /* @__PURE__ */ w(
951
+ /* @__PURE__ */ S("thead", { children: /* @__PURE__ */ N("tr", { children: [
952
+ /* @__PURE__ */ S(
953
953
  "th",
954
954
  {
955
955
  style: {
956
956
  padding: "0 16px 12px 0",
957
- color: _,
957
+ color: H,
958
958
  fontSize: 10,
959
959
  fontWeight: 600,
960
960
  textAlign: "left",
@@ -963,12 +963,12 @@ function nn({
963
963
  children: o
964
964
  }
965
965
  ),
966
- t.map((u) => /* @__PURE__ */ w(
966
+ t.map((u) => /* @__PURE__ */ S(
967
967
  "th",
968
968
  {
969
969
  style: {
970
970
  padding: "0 16px 12px",
971
- color: _,
971
+ color: H,
972
972
  fontSize: 10,
973
973
  fontWeight: 600,
974
974
  textAlign: "center",
@@ -979,13 +979,13 @@ function nn({
979
979
  u
980
980
  ))
981
981
  ] }) }),
982
- /* @__PURE__ */ w("tbody", { children: e.map((u) => /* @__PURE__ */ C("tr", { children: [
983
- /* @__PURE__ */ w(
982
+ /* @__PURE__ */ S("tbody", { children: e.map((u) => /* @__PURE__ */ N("tr", { children: [
983
+ /* @__PURE__ */ S(
984
984
  "th",
985
985
  {
986
986
  style: {
987
987
  padding: "12px 16px 12px 0",
988
- color: _,
988
+ color: H,
989
989
  fontSize: 10,
990
990
  fontWeight: 600,
991
991
  textAlign: "left",
@@ -994,7 +994,7 @@ function nn({
994
994
  children: n(u)
995
995
  }
996
996
  ),
997
- t.map((g) => /* @__PURE__ */ w(
997
+ t.map((w) => /* @__PURE__ */ S(
998
998
  "td",
999
999
  {
1000
1000
  style: {
@@ -1003,9 +1003,9 @@ function nn({
1003
1003
  verticalAlign: "middle",
1004
1004
  ...c
1005
1005
  },
1006
- children: r(u, g)
1006
+ children: r(u, w)
1007
1007
  },
1008
- g
1008
+ w
1009
1009
  ))
1010
1010
  ] }, u)) })
1011
1011
  ]
@@ -1014,14 +1014,14 @@ function nn({
1014
1014
  }
1015
1015
  );
1016
1016
  }
1017
- function Tt(e) {
1017
+ function Ut(e) {
1018
1018
  return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").toLowerCase() || "page";
1019
1019
  }
1020
- function Be(e, t, o = "PygmalionCatalog") {
1021
- const r = (n) => Tt(n).replace(/-/g, "_");
1020
+ function Je(e, t, o = "PygmalionCatalog") {
1021
+ const r = (n) => Ut(n).replace(/-/g, "_");
1022
1022
  return `${o}_${r(e)}_${r(t)}`;
1023
1023
  }
1024
- function je(e, t) {
1024
+ function We(e, t) {
1025
1025
  return {
1026
1026
  id: e.id,
1027
1027
  name: e.name,
@@ -1032,7 +1032,7 @@ function je(e, t) {
1032
1032
  description: e.description
1033
1033
  };
1034
1034
  }
1035
- function Ue(e) {
1035
+ function Ve(e) {
1036
1036
  const t = /* @__PURE__ */ new Set();
1037
1037
  for (const o of e) {
1038
1038
  if (t.has(o.id))
@@ -1040,17 +1040,17 @@ function Ue(e) {
1040
1040
  t.add(o.id);
1041
1041
  }
1042
1042
  }
1043
- function zt(e, t, o) {
1043
+ function Ht(e, t, o) {
1044
1044
  return typeof e == "function" ? e(t, o) : e;
1045
1045
  }
1046
- function _t({
1046
+ function qt({
1047
1047
  page: e,
1048
1048
  items: t,
1049
1049
  renderPreview: o,
1050
1050
  secondaryLabel: r,
1051
1051
  minimumColumnWidth: n
1052
1052
  }) {
1053
- return /* @__PURE__ */ C(
1053
+ return /* @__PURE__ */ N(
1054
1054
  "section",
1055
1055
  {
1056
1056
  "data-pygmalion-catalog-page": e.id,
@@ -1060,19 +1060,19 @@ function _t({
1060
1060
  display: "inline-block",
1061
1061
  width: "max-content",
1062
1062
  padding: 32,
1063
- color: ue,
1064
- background: de,
1063
+ color: he,
1064
+ background: fe,
1065
1065
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1066
1066
  },
1067
1067
  children: [
1068
- /* @__PURE__ */ C("header", { style: { marginBottom: 24 }, children: [
1069
- /* @__PURE__ */ w("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
1070
- /* @__PURE__ */ C("p", { style: { margin: "6px 0 0", color: _, fontSize: 13 }, children: [
1068
+ /* @__PURE__ */ N("header", { style: { marginBottom: 24 }, children: [
1069
+ /* @__PURE__ */ S("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
1070
+ /* @__PURE__ */ N("p", { style: { margin: "6px 0 0", color: H, fontSize: 13 }, children: [
1071
1071
  t.length,
1072
1072
  " assets"
1073
1073
  ] })
1074
1074
  ] }),
1075
- /* @__PURE__ */ w(
1075
+ /* @__PURE__ */ S(
1076
1076
  "div",
1077
1077
  {
1078
1078
  style: {
@@ -1080,7 +1080,7 @@ function _t({
1080
1080
  gridTemplateColumns: "repeat(6, max-content)",
1081
1081
  gap: 16
1082
1082
  },
1083
- children: t.map((s) => /* @__PURE__ */ C(
1083
+ children: t.map((s) => /* @__PURE__ */ N(
1084
1084
  "article",
1085
1085
  {
1086
1086
  "data-pygmalion-catalog-item": s.id,
@@ -1088,12 +1088,12 @@ function _t({
1088
1088
  minWidth: n,
1089
1089
  width: n,
1090
1090
  padding: 16,
1091
- border: `1px solid ${ye}`,
1091
+ border: `1px solid ${ve}`,
1092
1092
  borderRadius: 12,
1093
- background: le
1093
+ background: ue
1094
1094
  },
1095
1095
  children: [
1096
- /* @__PURE__ */ w(
1096
+ /* @__PURE__ */ S(
1097
1097
  "div",
1098
1098
  {
1099
1099
  style: {
@@ -1106,7 +1106,7 @@ function _t({
1106
1106
  children: o(s)
1107
1107
  }
1108
1108
  ),
1109
- /* @__PURE__ */ w(
1109
+ /* @__PURE__ */ S(
1110
1110
  "div",
1111
1111
  {
1112
1112
  style: {
@@ -1121,13 +1121,13 @@ function _t({
1121
1121
  children: s.name
1122
1122
  }
1123
1123
  ),
1124
- r ? /* @__PURE__ */ w("div", { style: { marginTop: 4, color: _, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ w(
1124
+ r ? /* @__PURE__ */ S("div", { style: { marginTop: 4, color: H, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ S(
1125
1125
  "div",
1126
1126
  {
1127
1127
  style: {
1128
1128
  marginTop: 4,
1129
1129
  overflow: "hidden",
1130
- color: _,
1130
+ color: H,
1131
1131
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
1132
1132
  fontSize: 11,
1133
1133
  textOverflow: "ellipsis",
@@ -1147,8 +1147,8 @@ function _t({
1147
1147
  }
1148
1148
  );
1149
1149
  }
1150
- function rn(e) {
1151
- Ue(e.items);
1150
+ function ln(e) {
1151
+ Ve(e.items);
1152
1152
  const t = /* @__PURE__ */ new Map();
1153
1153
  for (const n of e.items) {
1154
1154
  const s = e.pageFor(n), a = t.get(s.id);
@@ -1161,7 +1161,7 @@ function rn(e) {
1161
1161
  t.set(s.id, {
1162
1162
  page: s,
1163
1163
  items: [n],
1164
- registryName: Be(
1164
+ registryName: Je(
1165
1165
  e.kind,
1166
1166
  s.id,
1167
1167
  e.registryPrefix
@@ -1170,8 +1170,8 @@ function rn(e) {
1170
1170
  }
1171
1171
  const o = {}, r = [];
1172
1172
  for (const n of t.values()) {
1173
- const s = () => /* @__PURE__ */ w(
1174
- _t,
1173
+ const s = () => /* @__PURE__ */ S(
1174
+ qt,
1175
1175
  {
1176
1176
  page: n.page,
1177
1177
  items: n.items,
@@ -1184,7 +1184,7 @@ function rn(e) {
1184
1184
  component: s,
1185
1185
  children: "none"
1186
1186
  };
1187
- const a = zt(e.frame, n.page, n.items);
1187
+ const a = Ht(e.frame, n.page, n.items);
1188
1188
  r.push({
1189
1189
  ...n.page,
1190
1190
  componentName: n.registryName,
@@ -1197,13 +1197,13 @@ function rn(e) {
1197
1197
  registry: o,
1198
1198
  collection: {
1199
1199
  expectedCount: e.expectedCount ?? e.items.length,
1200
- assets: e.items.map((n) => je(n, e.pageFor(n).id)),
1200
+ assets: e.items.map((n) => We(n, e.pageFor(n).id)),
1201
1201
  pages: r
1202
1202
  }
1203
1203
  };
1204
1204
  }
1205
- function Bt(e, t = 60) {
1206
- const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, c]) => c.length > 0).sort(([c, u], [g, h]) => h.length - u.length || c.localeCompare(g)), r = o[0], n = o[1], s = Math.max(1, (r == null ? void 0 : r[1].length) ?? 1), a = n == null ? void 0 : n[1].slice(0, Math.max(1, Math.floor(t / s)));
1205
+ function Kt(e, t = 60) {
1206
+ const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, c]) => c.length > 0).sort(([c, u], [w, h]) => h.length - u.length || c.localeCompare(w)), r = o[0], n = o[1], s = Math.max(1, (r == null ? void 0 : r[1].length) ?? 1), a = n == null ? void 0 : n[1].slice(0, Math.max(1, Math.floor(t / s)));
1207
1207
  return {
1208
1208
  row: r,
1209
1209
  column: n ? [n[0], a ?? []] : void 0,
@@ -1211,7 +1211,7 @@ function Bt(e, t = 60) {
1211
1211
  additional: o.slice(2)
1212
1212
  };
1213
1213
  }
1214
- function jt(e, t, o, r) {
1214
+ function Gt(e, t, o, r) {
1215
1215
  return {
1216
1216
  ...e.defaultProps,
1217
1217
  ...Object.fromEntries(t.fixed),
@@ -1219,14 +1219,14 @@ function jt(e, t, o, r) {
1219
1219
  ...t.column && r ? { [t.column[0]]: r } : {}
1220
1220
  };
1221
1221
  }
1222
- function Ut({
1222
+ function Jt({
1223
1223
  item: e,
1224
1224
  entry: t,
1225
1225
  maxVariantCells: o
1226
1226
  }) {
1227
1227
  var c, u;
1228
1228
  if (!t)
1229
- return /* @__PURE__ */ C(
1229
+ return /* @__PURE__ */ N(
1230
1230
  "section",
1231
1231
  {
1232
1232
  "data-pygmalion-catalog-component": e.id,
@@ -1236,17 +1236,17 @@ function Ut({
1236
1236
  display: "inline-block",
1237
1237
  width: "max-content",
1238
1238
  padding: 32,
1239
- color: ue,
1240
- background: de
1239
+ color: he,
1240
+ background: fe
1241
1241
  },
1242
1242
  children: [
1243
- /* @__PURE__ */ w("strong", { children: e.name }),
1244
- /* @__PURE__ */ w("p", { style: { color: _ }, children: "The component is not registered." })
1243
+ /* @__PURE__ */ S("strong", { children: e.name }),
1244
+ /* @__PURE__ */ S("p", { style: { color: H }, children: "The component is not registered." })
1245
1245
  ]
1246
1246
  }
1247
1247
  );
1248
- const r = Bt(t, o), n = ((c = r.row) == null ? void 0 : c[1]) ?? [void 0], s = ((u = r.column) == null ? void 0 : u[1]) ?? [void 0], a = t.component;
1249
- return /* @__PURE__ */ C(
1248
+ const r = Kt(t, o), n = ((c = r.row) == null ? void 0 : c[1]) ?? [void 0], s = ((u = r.column) == null ? void 0 : u[1]) ?? [void 0], a = t.component;
1249
+ return /* @__PURE__ */ N(
1250
1250
  "section",
1251
1251
  {
1252
1252
  "data-pygmalion-catalog-component": e.id,
@@ -1256,16 +1256,16 @@ function Ut({
1256
1256
  display: "inline-block",
1257
1257
  width: "max-content",
1258
1258
  padding: 32,
1259
- color: ue,
1260
- background: de,
1259
+ color: he,
1260
+ background: fe,
1261
1261
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1262
1262
  },
1263
1263
  children: [
1264
- /* @__PURE__ */ C("header", { style: { marginBottom: 24 }, children: [
1265
- /* @__PURE__ */ w("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
1266
- e.sourcePath ? /* @__PURE__ */ w("p", { style: { margin: "6px 0 0", color: _, fontSize: 12 }, children: e.sourcePath }) : null
1264
+ /* @__PURE__ */ N("header", { style: { marginBottom: 24 }, children: [
1265
+ /* @__PURE__ */ S("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
1266
+ e.sourcePath ? /* @__PURE__ */ S("p", { style: { margin: "6px 0 0", color: H, fontSize: 12 }, children: e.sourcePath }) : null
1267
1267
  ] }),
1268
- /* @__PURE__ */ w(
1268
+ /* @__PURE__ */ S(
1269
1269
  "div",
1270
1270
  {
1271
1271
  style: {
@@ -1274,73 +1274,73 @@ function Ut({
1274
1274
  gap: 12
1275
1275
  },
1276
1276
  children: n.flatMap(
1277
- (g) => s.map((h) => {
1278
- const S = jt(t, r, g, h), m = [
1279
- r.row && g ? `${r.row[0]}=${g}` : "",
1277
+ (w) => s.map((h) => {
1278
+ const v = Gt(t, r, w, h), g = [
1279
+ r.row && w ? `${r.row[0]}=${w}` : "",
1280
1280
  r.column && h ? `${r.column[0]}=${h}` : ""
1281
1281
  ].filter(Boolean).join(" · ");
1282
- return /* @__PURE__ */ C(
1282
+ return /* @__PURE__ */ N(
1283
1283
  "article",
1284
1284
  {
1285
1285
  style: {
1286
1286
  width: "max-content",
1287
1287
  padding: 16,
1288
- border: `1px solid ${ye}`,
1288
+ border: `1px solid ${ve}`,
1289
1289
  borderRadius: 10,
1290
- background: le
1290
+ background: ue
1291
1291
  },
1292
1292
  children: [
1293
- m ? /* @__PURE__ */ w("div", { style: { marginBottom: 12, color: _, fontSize: 11 }, children: m }) : null,
1294
- /* @__PURE__ */ w("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: Ce(
1293
+ g ? /* @__PURE__ */ S("div", { style: { marginBottom: 12, color: H, fontSize: 11 }, children: g }) : null,
1294
+ /* @__PURE__ */ S("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: ke(
1295
1295
  a,
1296
- S,
1296
+ v,
1297
1297
  t.children === "text" ? t.defaultChildren ?? e.name : void 0
1298
1298
  ) })
1299
1299
  ]
1300
1300
  },
1301
- `${g ?? "default"}:${h ?? "default"}`
1301
+ `${w ?? "default"}:${h ?? "default"}`
1302
1302
  );
1303
1303
  })
1304
1304
  )
1305
1305
  }
1306
1306
  ),
1307
- r.additional.map(([g, h]) => /* @__PURE__ */ C("section", { style: { marginTop: 20 }, children: [
1308
- /* @__PURE__ */ w("h2", { style: { margin: "0 0 10px", color: _, fontSize: 12 }, children: g }),
1309
- /* @__PURE__ */ w("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: h.map((S) => /* @__PURE__ */ C(
1307
+ r.additional.map(([w, h]) => /* @__PURE__ */ N("section", { style: { marginTop: 20 }, children: [
1308
+ /* @__PURE__ */ S("h2", { style: { margin: "0 0 10px", color: H, fontSize: 12 }, children: w }),
1309
+ /* @__PURE__ */ S("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: h.map((v) => /* @__PURE__ */ N(
1310
1310
  "article",
1311
1311
  {
1312
1312
  style: {
1313
1313
  padding: 16,
1314
- border: `1px solid ${ye}`,
1314
+ border: `1px solid ${ve}`,
1315
1315
  borderRadius: 10,
1316
- background: le
1316
+ background: ue
1317
1317
  },
1318
1318
  children: [
1319
- /* @__PURE__ */ w("div", { style: { marginBottom: 12, color: _, fontSize: 11 }, children: S }),
1320
- Ce(
1319
+ /* @__PURE__ */ S("div", { style: { marginBottom: 12, color: H, fontSize: 11 }, children: v }),
1320
+ ke(
1321
1321
  a,
1322
- { ...t.defaultProps, [g]: S },
1322
+ { ...t.defaultProps, [w]: v },
1323
1323
  t.children === "text" ? t.defaultChildren ?? e.name : void 0
1324
1324
  )
1325
1325
  ]
1326
1326
  },
1327
- S
1327
+ v
1328
1328
  )) })
1329
- ] }, g))
1329
+ ] }, w))
1330
1330
  ]
1331
1331
  }
1332
1332
  );
1333
1333
  }
1334
- function on(e) {
1335
- Ue(e.items);
1334
+ function dn(e) {
1335
+ Ve(e.items);
1336
1336
  const t = {}, o = [], r = [], n = e.maxVariantCells ?? 60;
1337
1337
  for (const s of e.items) {
1338
- const a = Be(
1338
+ const a = Je(
1339
1339
  e.kind,
1340
1340
  s.id,
1341
1341
  e.registryPrefix
1342
- ), c = e.registry[s.name], u = () => /* @__PURE__ */ w(
1343
- Ut,
1342
+ ), c = e.registry[s.name], u = () => /* @__PURE__ */ S(
1343
+ Jt,
1344
1344
  {
1345
1345
  item: s,
1346
1346
  entry: c,
@@ -1357,7 +1357,7 @@ function on(e) {
1357
1357
  width: 1,
1358
1358
  height: 1,
1359
1359
  frameSizeMode: "content"
1360
- }), r.push(je(s, s.id));
1360
+ }), r.push(We(s, s.id));
1361
1361
  }
1362
1362
  return {
1363
1363
  registry: t,
@@ -1368,34 +1368,34 @@ function on(e) {
1368
1368
  }
1369
1369
  };
1370
1370
  }
1371
- const $e = /^[a-f0-9]{64}$/, Ht = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, qt = /^p\d+$/;
1372
- function we(e) {
1373
- return typeof e == "string" && Ht.test(e) ? e : void 0;
1371
+ const ze = /^[a-f0-9]{64}$/, Wt = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, Vt = /^p\d+$/;
1372
+ function Ie(e) {
1373
+ return typeof e == "string" && Wt.test(e) ? e : void 0;
1374
1374
  }
1375
- function Oe(e, t) {
1375
+ function je(e, t) {
1376
1376
  const o = new URL(e, t);
1377
1377
  return o.search = "", o.hash = "", o.pathname.endsWith("/") || (o.pathname = `${o.pathname}/`), o.href;
1378
1378
  }
1379
- function he(e) {
1379
+ function ye(e) {
1380
1380
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1381
1381
  const t = e;
1382
- return typeof t.domStructureHash != "string" || !$e.test(t.domStructureHash) || typeof t.screenshotHash != "string" || !$e.test(t.screenshotHash) ? null : {
1382
+ return typeof t.domStructureHash != "string" || !ze.test(t.domStructureHash) || typeof t.screenshotHash != "string" || !ze.test(t.screenshotHash) ? null : {
1383
1383
  domStructureHash: t.domStructureHash,
1384
1384
  screenshotHash: t.screenshotHash,
1385
- ...we(t.screenshotUrl) ? { screenshotUrl: we(t.screenshotUrl) } : {}
1385
+ ...Ie(t.screenshotUrl) ? { screenshotUrl: Ie(t.screenshotUrl) } : {}
1386
1386
  };
1387
1387
  }
1388
- function Me(e) {
1388
+ function _e(e) {
1389
1389
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1390
1390
  const t = e;
1391
1391
  return !Number.isSafeInteger(t.width) || !Number.isSafeInteger(t.height) || Number(t.width) < 1 || Number(t.height) < 1 || Number(t.width) > 65536 || Number(t.height) > 65536 ? null : { width: Number(t.width), height: Number(t.height) };
1392
1392
  }
1393
- function Kt(e) {
1393
+ function Qt(e) {
1394
1394
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1395
- const t = e, o = Me(t.before), r = Me(t.after);
1395
+ const t = e, o = _e(t.before), r = _e(t.after);
1396
1396
  if (!o || !r || !Number.isSafeInteger(t.changedPixels) || !Number.isSafeInteger(t.totalPixels) || Number(t.changedPixels) < 0 || Number(t.totalPixels) < 1 || Number(t.changedPixels) > Number(t.totalPixels) || typeof t.threshold != "number" || !Number.isFinite(t.threshold) || t.threshold < 0 || t.threshold > 1)
1397
1397
  return null;
1398
- const n = t.heatmapUrl == null ? null : we(t.heatmapUrl) ?? null;
1398
+ const n = t.heatmapUrl == null ? null : Ie(t.heatmapUrl) ?? null;
1399
1399
  return {
1400
1400
  before: o,
1401
1401
  after: r,
@@ -1407,15 +1407,15 @@ function Kt(e) {
1407
1407
  heatmapUrl: n
1408
1408
  };
1409
1409
  }
1410
- function Gt(e, t) {
1410
+ function Lt(e, t) {
1411
1411
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1412
1412
  const o = e;
1413
1413
  if (typeof o.id != "string" || !o.id) return null;
1414
- const r = he(o), n = he(o.before) ?? r;
1414
+ const r = ye(o), n = ye(o.before) ?? r;
1415
1415
  if (!n) return null;
1416
- const s = he(o.after);
1416
+ const s = ye(o.after);
1417
1417
  if (t === "changed" && !s) return null;
1418
- const a = s ? Kt(o.pixelDiff) : null;
1418
+ const a = s ? Qt(o.pixelDiff) : null;
1419
1419
  return {
1420
1420
  id: o.id,
1421
1421
  before: n,
@@ -1427,7 +1427,7 @@ function Gt(e, t) {
1427
1427
  ...a ? { pixelDiff: a } : {}
1428
1428
  };
1429
1429
  }
1430
- function Jt(e, t = []) {
1430
+ function Xt(e, t = []) {
1431
1431
  const o = new Set(t), r = o.size > 0, n = /* @__PURE__ */ new Set(), s = [
1432
1432
  ...e.styles.map((a) => a.affectedFrames ?? []),
1433
1433
  ...e.texts.map((a) => a.affectedFrames ?? []),
@@ -1435,7 +1435,7 @@ function Jt(e, t = []) {
1435
1435
  ];
1436
1436
  for (const a of s)
1437
1437
  for (const c of a) {
1438
- if (r && qt.test(c.id) && !o.has(c.id))
1438
+ if (r && Vt.test(c.id) && !o.has(c.id))
1439
1439
  throw new Error(
1440
1440
  `"Impact Screen"${c.name}"This internal editor ID (${c.id}) is used. A canonical screen ID is required.`
1441
1441
  );
@@ -1443,7 +1443,7 @@ function Jt(e, t = []) {
1443
1443
  }
1444
1444
  return [...n].sort();
1445
1445
  }
1446
- async function ke(e, t, o) {
1446
+ async function Be(e, t, o) {
1447
1447
  const r = await e(`${t.replace(/\/$/, "")}/capture`, {
1448
1448
  method: "POST",
1449
1449
  headers: { "content-type": "application/json" },
@@ -1455,63 +1455,63 @@ async function ke(e, t, o) {
1455
1455
  );
1456
1456
  if (typeof n.baselineId != "string" || !n.baselineId)
1457
1457
  throw new Error("Pygmalion visual QA response has no baselineId");
1458
- const s = Array.isArray(n.frames) ? n.frames.map((h) => Gt(h, o.phase)).filter((h) => h != null) : [], a = Array.isArray(n.failures) ? n.failures.map((h) => {
1458
+ const s = Array.isArray(n.frames) ? n.frames.map((h) => Lt(h, o.phase)).filter((h) => h != null) : [], a = Array.isArray(n.failures) ? n.failures.map((h) => {
1459
1459
  if (!h || typeof h != "object" || Array.isArray(h)) return null;
1460
- const S = h;
1461
- return typeof S.id == "string" && typeof S.error == "string" ? { id: S.id, error: S.error } : null;
1462
- }).filter((h) => h != null) : [], c = new Set(o.frameIds), g = new Set(s.map((h) => h.id)).size === s.length && s.every((h) => c.has(h.id)) && a.every((h) => c.has(h.id));
1460
+ const v = h;
1461
+ return typeof v.id == "string" && typeof v.error == "string" ? { id: v.id, error: v.error } : null;
1462
+ }).filter((h) => h != null) : [], c = new Set(o.frameIds), w = new Set(s.map((h) => h.id)).size === s.length && s.every((h) => c.has(h.id)) && a.every((h) => c.has(h.id));
1463
1463
  return {
1464
1464
  phase: o.phase,
1465
1465
  baselineId: n.baselineId,
1466
- complete: n.complete !== !1 && g && a.length === 0 && s.length === o.frameIds.length,
1466
+ complete: n.complete !== !1 && w && a.length === 0 && s.length === o.frameIds.length,
1467
1467
  frames: s,
1468
1468
  failures: a
1469
1469
  };
1470
1470
  }
1471
- const pe = {
1471
+ const we = {
1472
1472
  mirror: "/__pygmalion-dev-control",
1473
1473
  sessions: "/__pygmalion-design-session",
1474
1474
  inspect: "/__pygmalion-inspect"
1475
- }, Wt = "pygmalion.designSessionId", Vt = "/__pygmalion-qa", ie = /* @__PURE__ */ new Map();
1476
- function De() {
1475
+ }, Yt = "pygmalion.designSessionId", Zt = "/__pygmalion-qa", ce = /* @__PURE__ */ new Map();
1476
+ function Ue() {
1477
1477
  var e;
1478
1478
  return typeof window < "u" && ((e = window.crypto) != null && e.randomUUID) ? window.crypto.randomUUID() : `pygmalion-${Date.now()}-${Math.random().toString(36).slice(2)}`;
1479
1479
  }
1480
- function Qt(e, t) {
1480
+ function en(e, t) {
1481
1481
  if (e) return e;
1482
- const o = ie.get(t);
1482
+ const o = ce.get(t);
1483
1483
  if (o) return o;
1484
1484
  try {
1485
1485
  const r = window.localStorage.getItem(t);
1486
1486
  if (r)
1487
- return ie.set(t, r), r;
1488
- const n = De();
1489
- return window.localStorage.setItem(t, n), ie.set(t, n), n;
1487
+ return ce.set(t, r), r;
1488
+ const n = Ue();
1489
+ return window.localStorage.setItem(t, n), ce.set(t, n), n;
1490
1490
  } catch {
1491
- const r = De();
1492
- return ie.set(t, r), r;
1491
+ const r = Ue();
1492
+ return ce.set(t, r), r;
1493
1493
  }
1494
1494
  }
1495
- async function W(e) {
1495
+ async function X(e) {
1496
1496
  const t = await e.json();
1497
1497
  if (!e.ok) throw new Error(t.error ?? `Pygmalion request failed (${e.status})`);
1498
1498
  return t;
1499
1499
  }
1500
- function sn(e = {}) {
1501
- var x, j, $, i, l;
1500
+ function un(e = {}) {
1501
+ var P, K, M, i, d;
1502
1502
  const {
1503
1503
  sessionId: t,
1504
- sessionStorageKey: o = Wt,
1504
+ sessionStorageKey: o = Yt,
1505
1505
  autoStart: r = !0,
1506
1506
  fetcher: n = fetch,
1507
1507
  formatApplyMessage: s
1508
- } = e, a = ((x = e.endpoints) == null ? void 0 : x.mirror) ?? pe.mirror, c = ((j = e.endpoints) == null ? void 0 : j.sessions) ?? pe.sessions, u = (($ = e.endpoints) == null ? void 0 : $.inspect) ?? pe.inspect, g = e.visualQa != null, h = ((i = e.visualQa) == null ? void 0 : i.endpoint) ?? Vt, S = JSON.stringify(((l = e.visualQa) == null ? void 0 : l.eligibleFrameIds) ?? []), m = ae(
1509
- () => JSON.parse(S),
1510
- [S]
1511
- ), I = ae(
1512
- () => Qt(t, o),
1508
+ } = e, a = ((P = e.endpoints) == null ? void 0 : P.mirror) ?? we.mirror, c = ((K = e.endpoints) == null ? void 0 : K.sessions) ?? we.sessions, u = ((M = e.endpoints) == null ? void 0 : M.inspect) ?? we.inspect, w = e.visualQa != null, h = ((i = e.visualQa) == null ? void 0 : i.endpoint) ?? Zt, v = JSON.stringify(((d = e.visualQa) == null ? void 0 : d.eligibleFrameIds) ?? []), g = le(
1509
+ () => JSON.parse(v),
1510
+ [v]
1511
+ ), R = le(
1512
+ () => en(t, o),
1513
1513
  [t, o]
1514
- ), [y, N] = re({
1514
+ ), [b, A] = re({
1515
1515
  state: "idle",
1516
1516
  commit: null,
1517
1517
  shortCommit: null,
@@ -1521,99 +1521,99 @@ function sn(e = {}) {
1521
1521
  warning: null,
1522
1522
  error: null,
1523
1523
  appOrigin: null
1524
- }), [p, O] = re(null), [A, F] = re(null), [M, T] = re({
1524
+ }), [p, k] = re(null), [O, z] = re(null), [T, _] = re({
1525
1525
  refs: [],
1526
1526
  defaultRef: null,
1527
1527
  worktreeRef: null
1528
- }), b = me(null), E = me(null), D = X(
1529
- async (d = !0, f) => {
1530
- if (f != null && b.current && await b.current.catch(() => {
1531
- }), b.current) return b.current;
1532
- const v = (async () => {
1533
- N((P) => ({ ...P, state: "syncing", error: null }));
1528
+ }), x = be(null), C = be(null), D = Y(
1529
+ async (l = !0, f) => {
1530
+ if (f != null && x.current && await x.current.catch(() => {
1531
+ }), x.current) return x.current;
1532
+ const E = (async () => {
1533
+ A((y) => ({ ...y, state: "syncing", error: null }));
1534
1534
  try {
1535
- const P = f != null;
1536
- let k = await n(`${a}/${d || P ? "refresh" : "status"}`, {
1537
- method: d || P ? "POST" : "GET",
1538
- ...P ? {
1535
+ const y = f != null;
1536
+ let m = await n(`${a}/${l || y ? "refresh" : "status"}`, {
1537
+ method: l || y ? "POST" : "GET",
1538
+ ...y ? {
1539
1539
  headers: { "content-type": "application/json" },
1540
1540
  body: JSON.stringify({ ref: f })
1541
1541
  } : {}
1542
- }), R = await W(k);
1543
- const L = Date.now();
1544
- for (; !d && R.state === "syncing" && Date.now() - L < 12e4; )
1545
- await new Promise((ne) => window.setTimeout(ne, 500)), k = await n(`${a}/status`), R = await W(k);
1546
- if (R.state !== "ready" || !R.appOrigin || !R.commit)
1547
- throw new Error(R.error ?? "Pygmalion could not prepare the source preview");
1548
- const J = await W(
1542
+ }), I = await X(m);
1543
+ const $ = Date.now();
1544
+ for (; !l && I.state === "syncing" && Date.now() - $ < 12e4; )
1545
+ await new Promise((G) => window.setTimeout(G, 500)), m = await n(`${a}/status`), I = await X(m);
1546
+ if (I.state !== "ready" || !I.appOrigin || !I.commit)
1547
+ throw new Error(I.error ?? "Pygmalion could not prepare the source preview");
1548
+ const F = await X(
1549
1549
  await n(`${c}/open`, {
1550
1550
  method: "POST",
1551
1551
  headers: { "content-type": "application/json" },
1552
- body: JSON.stringify({ sessionId: I, baseDevSha: R.commit })
1552
+ body: JSON.stringify({ sessionId: R, baseDevSha: I.commit })
1553
1553
  })
1554
1554
  );
1555
- if (!J.ok || !J.session)
1556
- throw new Error(J.error ?? "Pygmalion could not open the design session");
1557
- let H = J.session;
1558
- if (H.branchName) {
1559
- const ne = await W(
1555
+ if (!F.ok || !F.session)
1556
+ throw new Error(F.error ?? "Pygmalion could not open the design session");
1557
+ let j = F.session;
1558
+ if (j.branchName) {
1559
+ const G = await X(
1560
1560
  await n(`${c}/check`, {
1561
1561
  method: "POST",
1562
1562
  headers: { "content-type": "application/json" },
1563
- body: JSON.stringify({ sessionId: H.id })
1563
+ body: JSON.stringify({ sessionId: j.id })
1564
1564
  })
1565
1565
  );
1566
- if (!ne.ok || !ne.session)
1567
- throw new Error(ne.error ?? "Pygmalion could not check the design session");
1568
- H = ne.session;
1566
+ if (!G.ok || !G.session)
1567
+ throw new Error(G.error ?? "Pygmalion could not check the design session");
1568
+ j = G.session;
1569
1569
  }
1570
- N(R), O(H), F(H.appOrigin ?? R.appOrigin);
1571
- } catch (P) {
1572
- N((k) => ({
1573
- ...k,
1570
+ A(I), k(j), z(j.appOrigin ?? I.appOrigin);
1571
+ } catch (y) {
1572
+ A((m) => ({
1573
+ ...m,
1574
1574
  state: "error",
1575
- error: P instanceof Error ? P.message : String(P)
1575
+ error: y instanceof Error ? y.message : String(y)
1576
1576
  }));
1577
1577
  }
1578
1578
  })();
1579
- b.current = v;
1579
+ x.current = E;
1580
1580
  try {
1581
- await v;
1581
+ await E;
1582
1582
  } finally {
1583
- b.current === v && (b.current = null);
1583
+ x.current === E && (x.current = null);
1584
1584
  }
1585
1585
  },
1586
- [n, a, c, I]
1587
- ), B = X(async () => {
1586
+ [n, a, c, R]
1587
+ ), q = Y(async () => {
1588
1588
  try {
1589
- const d = await W(
1589
+ const l = await X(
1590
1590
  await n(`${a}/refs`)
1591
1591
  ), f = {
1592
- refs: d.refs ?? [],
1593
- defaultRef: d.defaultRef ?? null,
1594
- worktreeRef: d.worktreeRef ?? null
1592
+ refs: l.refs ?? [],
1593
+ defaultRef: l.defaultRef ?? null,
1594
+ worktreeRef: l.worktreeRef ?? null
1595
1595
  };
1596
- return T(f), f;
1596
+ return _(f), f;
1597
1597
  } catch {
1598
- return M;
1598
+ return T;
1599
1599
  }
1600
- }, [n, a, M]), Z = X(
1601
- async (d, f) => {
1600
+ }, [n, a, T]), ee = Y(
1601
+ async (l, f) => {
1602
1602
  if (p != null && p.branchName && !(f != null && f.discardEdits))
1603
1603
  throw new Error(
1604
1604
  "This design session has unapplied edits against the current source. Apply or revert them, or pass discardEdits to switch anyway."
1605
1605
  );
1606
- await D(!0, d);
1606
+ await D(!0, l);
1607
1607
  },
1608
1608
  [D, p == null ? void 0 : p.branchName]
1609
- ), ee = X(
1610
- async (d) => {
1611
- var R;
1609
+ ), te = Y(
1610
+ async (l) => {
1611
+ var I;
1612
1612
  if (!p) throw new Error("Pygmalion design session is not ready");
1613
- const f = E.current;
1614
- if (f && (f.sessionId !== p.id || f.baseDevSha !== p.baseDevSha || f.revision !== p.revision || f.fingerprint !== JSON.stringify(d)))
1613
+ const f = C.current;
1614
+ if (f && (f.sessionId !== p.id || f.baseDevSha !== p.baseDevSha || f.revision !== p.revision || f.fingerprint !== JSON.stringify(l)))
1615
1615
  throw new Error("The code diff you checked is out of date. Please check the diff for the current changes again.");
1616
- const v = await W(
1616
+ const E = await X(
1617
1617
  await n(`${c}/apply-visual`, {
1618
1618
  method: "POST",
1619
1619
  headers: { "content-type": "application/json" },
@@ -1622,48 +1622,48 @@ function sn(e = {}) {
1622
1622
  baseDevSha: p.baseDevSha,
1623
1623
  expectedRevision: p.revision,
1624
1624
  ...f ? { previewRevision: f.revision } : {},
1625
- changes: d
1625
+ changes: l
1626
1626
  })
1627
1627
  })
1628
1628
  );
1629
- if (!v.ok || !v.session)
1630
- throw new Error(v.error ?? "Pygmalion could not apply the visual changes");
1631
- O(v.session), v.session.appOrigin && F(v.session.appOrigin);
1632
- const P = v.applied ?? d.styles.length + d.texts.length + d.operations.length;
1633
- let k;
1634
- if (f != null && f.qaBaselineId && ((R = f.qaFrameIds) != null && R.length) && v.session.appOrigin)
1629
+ if (!E.ok || !E.session)
1630
+ throw new Error(E.error ?? "Pygmalion could not apply the visual changes");
1631
+ k(E.session), E.session.appOrigin && z(E.session.appOrigin);
1632
+ const y = E.applied ?? l.styles.length + l.texts.length + l.operations.length;
1633
+ let m;
1634
+ if (f != null && f.qaBaselineId && ((I = f.qaFrameIds) != null && I.length) && E.session.appOrigin)
1635
1635
  try {
1636
- k = await ke(n, h, {
1636
+ m = await Be(n, h, {
1637
1637
  phase: "changed",
1638
1638
  baselineId: f.qaBaselineId,
1639
- basePath: Oe(v.session.appOrigin, window.location.origin),
1639
+ basePath: je(E.session.appOrigin, window.location.origin),
1640
1640
  frameIds: f.qaFrameIds
1641
1641
  });
1642
- } catch (L) {
1643
- const J = L instanceof Error ? L.message : String(L);
1644
- k = {
1642
+ } catch ($) {
1643
+ const F = $ instanceof Error ? $.message : String($);
1644
+ m = {
1645
1645
  phase: "changed",
1646
1646
  baselineId: f.qaBaselineId,
1647
1647
  complete: !1,
1648
1648
  frames: [],
1649
- failures: f.qaFrameIds.map((H) => ({ id: H, error: J }))
1649
+ failures: f.qaFrameIds.map((j) => ({ id: j, error: F }))
1650
1650
  };
1651
1651
  }
1652
- return E.current = null, {
1653
- applied: P,
1654
- branch: v.session.branchName ?? void 0,
1655
- integration: v.session.integration.state,
1656
- message: s == null ? void 0 : s(v.session, P),
1657
- ...k ? { qa: k } : {}
1652
+ return C.current = null, {
1653
+ applied: y,
1654
+ branch: E.session.branchName ?? void 0,
1655
+ integration: E.session.integration.state,
1656
+ message: s == null ? void 0 : s(E.session, y),
1657
+ ...m ? { qa: m } : {}
1658
1658
  };
1659
1659
  },
1660
1660
  [n, s, h, p, c]
1661
- ), K = X(
1662
- async (d) => {
1663
- var R;
1661
+ ), V = Y(
1662
+ async (l) => {
1663
+ var I;
1664
1664
  if (!p) throw new Error("Pygmalion design session is not ready");
1665
- E.current = null;
1666
- const f = await W(
1665
+ C.current = null;
1666
+ const f = await X(
1667
1667
  await n(`${c}/preview-visual`, {
1668
1668
  method: "POST",
1669
1669
  headers: { "content-type": "application/json" },
@@ -1671,57 +1671,57 @@ function sn(e = {}) {
1671
1671
  sessionId: p.id,
1672
1672
  baseDevSha: p.baseDevSha,
1673
1673
  expectedRevision: p.revision,
1674
- changes: d
1674
+ changes: l
1675
1675
  })
1676
1676
  })
1677
1677
  );
1678
1678
  if (!f.ok || !Number.isSafeInteger(f.revision))
1679
1679
  throw new Error(f.error ?? "Pygmalion could not preview the visual changes");
1680
- const v = g ? Jt(d, m) : [];
1681
- let P;
1682
- const k = p.appOrigin ?? y.appOrigin;
1683
- if (v.length > 0) {
1684
- if (!k)
1680
+ const E = w ? Xt(l, g) : [];
1681
+ let y;
1682
+ const m = p.appOrigin ?? b.appOrigin;
1683
+ if (E.length > 0) {
1684
+ if (!m)
1685
1685
  throw new Error("Impact screen QA baseline preview not ready");
1686
- if (P = await ke(n, h, {
1686
+ if (y = await Be(n, h, {
1687
1687
  phase: "baseline",
1688
- basePath: Oe(k, window.location.origin),
1689
- frameIds: v
1690
- }), !P.complete)
1688
+ basePath: je(m, window.location.origin),
1689
+ frameIds: E
1690
+ }), !y.complete)
1691
1691
  throw new Error(
1692
- ((R = P.failures[0]) == null ? void 0 : R.error) ?? `Failed to capture ${v.length - P.frames.length} affected frames`
1692
+ ((I = y.failures[0]) == null ? void 0 : I.error) ?? `Failed to capture ${E.length - y.frames.length} affected frames`
1693
1693
  );
1694
1694
  }
1695
- return E.current = {
1695
+ return C.current = {
1696
1696
  sessionId: p.id,
1697
1697
  baseDevSha: p.baseDevSha,
1698
1698
  revision: f.revision,
1699
- fingerprint: JSON.stringify(d),
1700
- ...P ? { qaBaselineId: P.baselineId, qaFrameIds: v } : {}
1699
+ fingerprint: JSON.stringify(l),
1700
+ ...y ? { qaBaselineId: y.baselineId, qaFrameIds: E } : {}
1701
1701
  }, {
1702
1702
  revision: f.revision,
1703
1703
  files: Array.isArray(f.files) ? f.files : [],
1704
1704
  affectedFiles: Array.isArray(f.affectedFiles) ? f.affectedFiles : [],
1705
- ...P ? { qa: P } : {}
1705
+ ...y ? { qa: y } : {}
1706
1706
  };
1707
1707
  },
1708
1708
  [
1709
1709
  n,
1710
- y.appOrigin,
1711
- m,
1710
+ b.appOrigin,
1711
+ g,
1712
1712
  h,
1713
1713
  p,
1714
1714
  c,
1715
- g
1715
+ w
1716
1716
  ]
1717
- ), te = X(
1718
- async (d) => {
1719
- if (d.length === 0) return { files: [] };
1720
- const f = await W(
1717
+ ), ne = Y(
1718
+ async (l) => {
1719
+ if (l.length === 0) return { files: [] };
1720
+ const f = await X(
1721
1721
  await n(`${u}/impact`, {
1722
1722
  method: "POST",
1723
1723
  headers: { "content-type": "application/json" },
1724
- body: JSON.stringify({ componentFiles: d })
1724
+ body: JSON.stringify({ componentFiles: l })
1725
1725
  })
1726
1726
  );
1727
1727
  if (f.error || f.ok === !1)
@@ -1729,10 +1729,10 @@ function sn(e = {}) {
1729
1729
  return { files: Array.isArray(f.files) ? f.files : [] };
1730
1730
  },
1731
1731
  [n, u]
1732
- ), V = X(async () => {
1732
+ ), Q = Y(async () => {
1733
1733
  if (!(p != null && p.canRevert) || !p.headSha)
1734
1734
  throw new Error("There are no reversible changes applied");
1735
- const d = await W(
1735
+ const l = await X(
1736
1736
  await n(`${c}/revert-visual`, {
1737
1737
  method: "POST",
1738
1738
  headers: { "content-type": "application/json" },
@@ -1744,38 +1744,38 @@ function sn(e = {}) {
1744
1744
  })
1745
1745
  })
1746
1746
  );
1747
- if (!d.ok || d.reverted !== !0 || !d.operation || d.operation.kind !== "visual-revert" || !d.session)
1748
- throw new Error(d.error ?? "Pygmalion could not revert the last visual change");
1749
- return E.current = null, O(d.session), d.session.appOrigin && F(d.session.appOrigin), {
1747
+ if (!l.ok || l.reverted !== !0 || !l.operation || l.operation.kind !== "visual-revert" || !l.session)
1748
+ throw new Error(l.error ?? "Pygmalion could not revert the last visual change");
1749
+ return C.current = null, k(l.session), l.session.appOrigin && z(l.session.appOrigin), {
1750
1750
  reverted: !0,
1751
- operation: d.operation,
1752
- session: d.session
1751
+ operation: l.operation,
1752
+ session: l.session
1753
1753
  };
1754
1754
  }, [n, p, c]);
1755
1755
  oe(() => {
1756
1756
  r && D(!1);
1757
1757
  }, [r, D]), oe(() => {
1758
- r && B();
1758
+ r && q();
1759
1759
  }, [r]);
1760
- const G = (p == null ? void 0 : p.appOrigin) ?? y.appOrigin ?? A, Q = (p == null ? void 0 : p.headSha) ?? (p == null ? void 0 : p.baseDevSha) ?? y.commit ?? "pending";
1760
+ const B = (p == null ? void 0 : p.appOrigin) ?? b.appOrigin ?? O, L = (p == null ? void 0 : p.headSha) ?? (p == null ? void 0 : p.baseDevSha) ?? b.commit ?? "pending";
1761
1761
  return {
1762
- mirror: y,
1762
+ mirror: b,
1763
1763
  session: p,
1764
- ready: A != null,
1765
- appOrigin: G,
1766
- previewRevision: `${Q}:${(p == null ? void 0 : p.revision) ?? 0}`,
1767
- previewSourceRevision: Q,
1764
+ ready: O != null,
1765
+ appOrigin: B,
1766
+ previewRevision: `${L}:${(p == null ? void 0 : p.revision) ?? 0}`,
1767
+ previewSourceRevision: L,
1768
1768
  refresh: D,
1769
- switchSource: Z,
1770
- sourceRefs: M,
1771
- loadSourceRefs: B,
1772
- previewVisual: K,
1773
- inspectImpact: te,
1774
- applyVisual: ee,
1775
- revertLastVisual: V
1769
+ switchSource: ee,
1770
+ sourceRefs: T,
1771
+ loadSourceRefs: q,
1772
+ previewVisual: V,
1773
+ inspectImpact: ne,
1774
+ applyVisual: te,
1775
+ revertLastVisual: Q
1776
1776
  };
1777
1777
  }
1778
- function an({
1778
+ function fn({
1779
1779
  value: e,
1780
1780
  refs: t,
1781
1781
  onChange: o,
@@ -1786,17 +1786,17 @@ function an({
1786
1786
  children: c,
1787
1787
  className: u
1788
1788
  }) {
1789
- const g = ae(
1789
+ const w = le(
1790
1790
  () => ({
1791
- local: t.filter((m) => m.kind === "local"),
1792
- remote: t.filter((m) => m.kind === "remote")
1791
+ local: t.filter((g) => g.kind === "local"),
1792
+ remote: t.filter((g) => g.kind === "remote")
1793
1793
  }),
1794
1794
  [t]
1795
- ), h = ae(() => {
1796
- const m = new Set(t.map((I) => I.name));
1797
- return n && m.add(n), s && m.add(s), m;
1798
- }, [n, t, s]), S = e ?? n ?? "";
1799
- return /* @__PURE__ */ C(
1795
+ ), h = le(() => {
1796
+ const g = new Set(t.map((R) => R.name));
1797
+ return n && g.add(n), s && g.add(s), g;
1798
+ }, [n, t, s]), v = e ?? n ?? "";
1799
+ return /* @__PURE__ */ N(
1800
1800
  "span",
1801
1801
  {
1802
1802
  className: u,
@@ -1804,17 +1804,17 @@ function an({
1804
1804
  "data-busy": r ? "" : void 0,
1805
1805
  style: { position: "relative", display: "inline-flex", alignItems: "center" },
1806
1806
  children: [
1807
- c ?? /* @__PURE__ */ w("span", { "data-pygmalion-source-ref-value": "", children: S || a }),
1808
- /* @__PURE__ */ C(
1807
+ c ?? /* @__PURE__ */ S("span", { "data-pygmalion-source-ref-value": "", children: v || a }),
1808
+ /* @__PURE__ */ N(
1809
1809
  "select",
1810
1810
  {
1811
- value: S,
1811
+ value: v,
1812
1812
  disabled: r,
1813
1813
  "aria-label": a,
1814
1814
  "data-pygmalion-source-ref-select": "",
1815
- onChange: (m) => {
1816
- const I = m.target.value;
1817
- I && I !== S && o(I);
1815
+ onChange: (g) => {
1816
+ const R = g.target.value;
1817
+ R && R !== v && o(R);
1818
1818
  },
1819
1819
  style: {
1820
1820
  position: "absolute",
@@ -1830,21 +1830,21 @@ function an({
1830
1830
  margin: 0
1831
1831
  },
1832
1832
  children: [
1833
- S && !h.has(S) ? /* @__PURE__ */ w("option", { value: S, children: S }) : null,
1834
- s ? /* @__PURE__ */ C("option", { value: s, children: [
1833
+ v && !h.has(v) ? /* @__PURE__ */ S("option", { value: v, children: v }) : null,
1834
+ s ? /* @__PURE__ */ N("option", { value: s, children: [
1835
1835
  s,
1836
1836
  " · uncommitted work"
1837
1837
  ] }) : null,
1838
- g.local.length > 0 ? /* @__PURE__ */ w("optgroup", { label: "local", children: g.local.map((m) => /* @__PURE__ */ C("option", { value: m.name, children: [
1839
- m.name,
1838
+ w.local.length > 0 ? /* @__PURE__ */ S("optgroup", { label: "local", children: w.local.map((g) => /* @__PURE__ */ N("option", { value: g.name, children: [
1839
+ g.name,
1840
1840
  " · ",
1841
- m.commit
1842
- ] }, m.fullName)) }) : null,
1843
- g.remote.length > 0 ? /* @__PURE__ */ w("optgroup", { label: "remote", children: g.remote.map((m) => /* @__PURE__ */ C("option", { value: m.name, children: [
1844
- m.name,
1841
+ g.commit
1842
+ ] }, g.fullName)) }) : null,
1843
+ w.remote.length > 0 ? /* @__PURE__ */ S("optgroup", { label: "remote", children: w.remote.map((g) => /* @__PURE__ */ N("option", { value: g.name, children: [
1844
+ g.name,
1845
1845
  " · ",
1846
- m.commit
1847
- ] }, m.fullName)) }) : null
1846
+ g.commit
1847
+ ] }, g.fullName)) }) : null
1848
1848
  ]
1849
1849
  }
1850
1850
  )
@@ -1852,22 +1852,22 @@ function an({
1852
1852
  }
1853
1853
  );
1854
1854
  }
1855
- const cn = {
1856
- editor: q,
1857
- getObserverTree: Ke,
1858
- isObservableProp: qe
1855
+ const hn = {
1856
+ editor: W,
1857
+ getObserverTree: Xe,
1858
+ isObservableProp: Le
1859
1859
  };
1860
- function ln(e) {
1861
- q.navigateToPageByName(e);
1860
+ function pn(e) {
1861
+ W.navigateToPageByName(e);
1862
1862
  }
1863
- function dn() {
1864
- q.openPreview();
1863
+ function gn() {
1864
+ W.openPreview();
1865
1865
  }
1866
- function un() {
1867
- const e = Pe.entries.length > 0;
1868
- return e && Pe.discardPending(), q.resetCurrentEdits() || e;
1866
+ function mn() {
1867
+ const e = $e.entries.length > 0;
1868
+ return e && $e.discardPending(), W.resetCurrentEdits() || e;
1869
1869
  }
1870
- function fn({
1870
+ function yn({
1871
1871
  registry: e,
1872
1872
  tokens: t,
1873
1873
  initialPages: o,
@@ -1877,127 +1877,238 @@ function fn({
1877
1877
  appOrigin: a,
1878
1878
  previewRevision: c,
1879
1879
  previewCacheNamespace: u,
1880
- previewArtifacts: g,
1880
+ previewArtifacts: w,
1881
1881
  previewArtifactEndpoint: h,
1882
- previewConcurrency: S,
1883
- previewOpen: m,
1884
- onPreviewOpenChange: I,
1885
- flowCanvas: y,
1886
- onApply: N,
1882
+ previewConcurrency: v,
1883
+ previewOpen: g,
1884
+ onPreviewOpenChange: R,
1885
+ flowCanvas: b,
1886
+ onApply: A,
1887
1887
  onDesignChange: p,
1888
- onInspectApply: O,
1889
- onInspectPreview: A,
1890
- onInspectImpact: F,
1891
- storyboardDiscovery: M = !0,
1892
- storyboardDiscoveryEndpoint: T = st
1888
+ onInspectApply: k,
1889
+ onInspectPreview: O,
1890
+ onInspectImpact: z,
1891
+ storyboardDiscovery: T = !0,
1892
+ storyboardDiscoveryEndpoint: _ = ft
1893
1893
  }) {
1894
- const [b, E] = re(!M), [D, B] = re();
1895
- n && (n.assertComplete(), Ge(n));
1896
- const Z = e ?? (n == null ? void 0 : n.getRegistry()), ee = t ?? (n == null ? void 0 : n.getTokens()), K = o ?? (n == null ? void 0 : n.getInitialPages());
1897
- Z && Je(Z), ee && We(ee), r && Ve(r), lt(s ?? null), a != null && Qe(a), c != null && Le(c), Xe(u);
1898
- const te = D ?? g, V = (K ?? []).flatMap(
1899
- (x) => x.route && x.importPageId ? [
1894
+ const [x, C] = re(!T), [D, q] = re();
1895
+ n && (n.assertComplete(), Ye(n));
1896
+ const ee = e ?? (n == null ? void 0 : n.getRegistry()), te = t ?? (n == null ? void 0 : n.getTokens()), V = o ?? (n == null ? void 0 : n.getInitialPages());
1897
+ ee && Ze(ee), te && et(te), r && tt(r), gt(s ?? null), a != null && nt(a), c != null && rt(c), ot(u);
1898
+ const ne = D ?? w, Q = (V ?? []).flatMap(
1899
+ (P) => P.route && P.importPageId ? [
1900
1900
  {
1901
- canonicalId: x.importPageId,
1902
- route: x.route,
1903
- width: x.width,
1904
- height: x.height,
1905
- environment: x.environment,
1906
- preset: x.preset,
1907
- interactions: x.interactions,
1908
- assertions: x.assertions
1901
+ canonicalId: P.importPageId,
1902
+ route: P.route,
1903
+ width: P.width,
1904
+ height: P.height,
1905
+ environment: P.environment,
1906
+ preset: P.preset,
1907
+ interactions: P.interactions,
1908
+ assertions: P.assertions
1909
1909
  }
1910
1910
  ] : []
1911
- ), G = me([]), Q = V.map((x) => ({
1912
- id: x.canonicalId,
1913
- fingerprint: Ye(
1914
- x,
1915
- ve(),
1916
- be()
1911
+ ), B = be([]), L = Q.map((P) => ({
1912
+ id: P.canonicalId,
1913
+ fingerprint: st(
1914
+ P,
1915
+ Re(),
1916
+ ge()
1917
1917
  )
1918
1918
  }));
1919
- return G.current = Q, te && K && b && Ze(te, {
1919
+ return B.current = L, ne && V && x && Ce(ne, {
1920
1920
  namespace: u ?? "",
1921
- previewRevision: ve(),
1922
- appOrigin: dt(),
1923
- baselineEnvironment: be(),
1924
- allowStaleIdentity: D == null && !!h,
1925
- pages: V.map((x, j) => {
1926
- var $;
1921
+ previewRevision: Re(),
1922
+ appOrigin: Oe(),
1923
+ baselineEnvironment: ge(),
1924
+ allowStaleIdentity: !!h,
1925
+ allowMatchingFrameIdentity: D != null,
1926
+ pages: Q.map((P, K) => {
1927
+ var M;
1927
1928
  return {
1928
- ...x,
1929
- fingerprint: ($ = Q[j]) == null ? void 0 : $.fingerprint
1929
+ ...P,
1930
+ fingerprint: (M = L[K]) == null ? void 0 : M.fingerprint
1930
1931
  };
1931
1932
  })
1932
- }), S != null && et(S), ut(I ?? null), y != null && tt(y), ft(N ?? null), ht(O ?? null), nt(A ?? null), pt(F ?? null), K && q.initPagesFromComponents(K), oe(() => {
1933
- Ee(p ?? null);
1934
- const x = rt(q);
1933
+ }), v != null && it(v), mt(R ?? null), b != null && at(b), yt(A ?? null), wt(k ?? null), ct(O ?? null), bt(z ?? null), V && W.initPagesFromComponents(V), oe(() => {
1934
+ Me(p ?? null);
1935
+ const P = lt(W);
1935
1936
  return () => {
1936
- x(), Ee(null);
1937
+ P(), Me(null);
1937
1938
  };
1938
1939
  }, [p]), oe(() => {
1939
- if (B(void 0), !b || !h || !(u != null && u.trim()) || !(c != null && c.trim()))
1940
+ if (q(void 0), !x || !h || !(u != null && u.trim()) || !(c != null && c.trim()))
1940
1941
  return;
1941
- const x = new AbortController(), j = ot({
1942
+ const P = new AbortController(), K = dt({
1942
1943
  endpoint: h,
1943
1944
  captureBaseUrl: a
1944
- }), $ = (l, d, f) => at({
1945
+ }), M = ut(c), i = (y) => {
1946
+ Ce(y, {
1947
+ namespace: u,
1948
+ previewRevision: c,
1949
+ appOrigin: Oe(),
1950
+ baselineEnvironment: ge(),
1951
+ allowStaleIdentity: !0,
1952
+ allowMatchingFrameIdentity: !0,
1953
+ pages: Q.map((m, I) => {
1954
+ var $;
1955
+ return {
1956
+ ...m,
1957
+ fingerprint: ($ = L[I]) == null ? void 0 : $.fingerprint
1958
+ };
1959
+ })
1960
+ }), q(y);
1961
+ }, d = (y, m, I) => pt({
1945
1962
  namespace: u,
1946
- sourceRevision: ct(c),
1947
- transport: j,
1948
- signal: f,
1949
- ...l.length ? { frames: l } : {},
1950
- ...d ? {} : { generate: !1 }
1951
- }).then((v) => {
1952
- !f.aborted && v.status === "accepted" && B(v.artifact);
1953
- });
1954
- G.current.length && $(G.current, !1, x.signal);
1955
- const i = new AbortController();
1956
- return Ie((l) => {
1957
- $(l, !0, i.signal).catch(() => {
1963
+ sourceRevision: M,
1964
+ transport: K,
1965
+ signal: I,
1966
+ ...y.length ? { frames: y } : {},
1967
+ ...m ? {} : { generate: !1 }
1968
+ }), l = (y, m) => {
1969
+ const I = new Set(m);
1970
+ return y.filter(($) => I.has($.id));
1971
+ }, f = (y, m) => y instanceof Error && y.message ? y.message : m, E = new AbortController();
1972
+ if (Ne(async (y) => {
1973
+ var I, $, F;
1974
+ const m = await d(y, !0, E.signal);
1975
+ if (m.status === "accepted") {
1976
+ i(m.artifact);
1977
+ const j = new Set(((I = m.frameResolution) == null ? void 0 : I.exact) ?? []);
1978
+ if (y.every((se) => j.has(se.id)))
1979
+ return { status: "accepted" };
1980
+ const G = [
1981
+ ...(($ = m.frameResolution) == null ? void 0 : $.missing) ?? [],
1982
+ ...((F = m.frameResolution) == null ? void 0 : F.stale) ?? []
1983
+ ];
1984
+ return {
1985
+ status: "unavailable",
1986
+ message: G.length ? `The exact preview endpoint did not return a current capture for ${G.join(", ")}.` : "The exact preview endpoint returned no current capture."
1987
+ };
1988
+ }
1989
+ return m.status === "rejected" ? {
1990
+ status: "rejected",
1991
+ message: m.errors.join(" ") || "The preview artifact was rejected."
1992
+ } : {
1993
+ status: "unavailable",
1994
+ message: f(
1995
+ m.error,
1996
+ "The exact preview endpoint is unavailable."
1997
+ )
1998
+ };
1999
+ }), B.current.length) {
2000
+ const y = B.current.filter((m) => {
2001
+ const I = me(
2002
+ m.id,
2003
+ m.fingerprint
2004
+ ).status;
2005
+ return I !== "exact" && I !== "generating";
1958
2006
  });
1959
- }), () => {
1960
- Ie(null), i.abort(), x.abort();
2007
+ ie(y, { status: "checking" }), d(
2008
+ B.current,
2009
+ !1,
2010
+ P.signal
2011
+ ).then((m) => {
2012
+ var F, j, G;
2013
+ if (P.signal.aborted) return;
2014
+ const I = (se) => se.filter((Pe) => {
2015
+ const Ee = me(
2016
+ Pe.id,
2017
+ Pe.fingerprint
2018
+ ).status;
2019
+ return Ee !== "generating" && Ee !== "exact";
2020
+ });
2021
+ if (m.status === "accepted") {
2022
+ i(m.artifact), ie(
2023
+ l(
2024
+ B.current,
2025
+ ((F = m.frameResolution) == null ? void 0 : F.exact) ?? []
2026
+ ),
2027
+ { status: "exact" }
2028
+ );
2029
+ const se = l(B.current, [
2030
+ ...((j = m.frameResolution) == null ? void 0 : j.missing) ?? [],
2031
+ ...((G = m.frameResolution) == null ? void 0 : G.stale) ?? []
2032
+ ]);
2033
+ ie(I(se), {
2034
+ status: "outdated",
2035
+ message: "Select this frame to generate the exact preview."
2036
+ });
2037
+ return;
2038
+ }
2039
+ const $ = m.status === "rejected" ? m.errors.join(" ") || "The preview artifact was rejected." : f(
2040
+ m.error,
2041
+ "The exact preview endpoint is unavailable."
2042
+ );
2043
+ ie(
2044
+ I(B.current),
2045
+ {
2046
+ status: "error",
2047
+ reason: m.status === "rejected" ? "rejected" : "unavailable",
2048
+ message: $
2049
+ }
2050
+ );
2051
+ }).catch((m) => {
2052
+ if (P.signal.aborted) return;
2053
+ const I = B.current.filter(($) => {
2054
+ const F = me(
2055
+ $.id,
2056
+ $.fingerprint
2057
+ ).status;
2058
+ return F !== "generating" && F !== "exact";
2059
+ });
2060
+ ie(I, {
2061
+ status: "error",
2062
+ reason: "unavailable",
2063
+ message: f(
2064
+ m,
2065
+ "The exact preview endpoint is unavailable."
2066
+ )
2067
+ });
2068
+ });
2069
+ }
2070
+ return () => {
2071
+ Ne(null), E.abort(), P.abort();
1961
2072
  };
1962
2073
  }, [
1963
2074
  h,
1964
2075
  u,
1965
2076
  c,
1966
2077
  a,
1967
- b
2078
+ x
1968
2079
  ]), oe(() => {
1969
- let x = !0;
1970
- if (!M)
1971
- return se(void 0), E(!0), () => {
1972
- x = !1;
2080
+ let P = !0;
2081
+ if (!T)
2082
+ return ae(void 0), C(!0), () => {
2083
+ P = !1;
1973
2084
  };
1974
- const j = new AbortController();
1975
- return E(!1), se(void 0), Y(null), _e({
1976
- endpoint: T,
1977
- signal: j.signal,
1978
- pages: q.pages.map(($) => ({
1979
- ...$,
1980
- id: $.importPageId ?? $.id,
1981
- importKind: $.importKind
2085
+ const K = new AbortController();
2086
+ return C(!1), ae(void 0), Z(null), Ge({
2087
+ endpoint: _,
2088
+ signal: K.signal,
2089
+ pages: W.pages.map((M) => ({
2090
+ ...M,
2091
+ id: M.importPageId ?? M.id,
2092
+ importKind: M.importKind
1982
2093
  })),
1983
2094
  assets: (n == null ? void 0 : n.getAssets("screens")) ?? []
1984
- }).then(($) => {
1985
- x && (se($.baselineEnvironment), xe($.manifest.routes ?? null), Y($.graph));
2095
+ }).then((M) => {
2096
+ P && (ae(M.baselineEnvironment), Ae(M.manifest.routes ?? null), Z(M.graph));
1986
2097
  }).catch(() => {
1987
- x && (se(void 0), xe(null), Y(null));
2098
+ P && (ae(void 0), Ae(null), Z(null));
1988
2099
  }).finally(() => {
1989
- x && E(!0);
2100
+ P && C(!0);
1990
2101
  }), () => {
1991
- x = !1, j.abort(), se(void 0), Y(null);
2102
+ P = !1, K.abort(), ae(void 0), Z(null);
1992
2103
  };
1993
2104
  }, [
1994
2105
  n,
1995
2106
  o,
1996
- M,
1997
- T
2107
+ T,
2108
+ _
1998
2109
  ]), oe(() => {
1999
- m == null || m === q.previewOpen || (m ? q.openPreview({ notifyHost: !1 }) : q.closePreview({ notifyHost: !1 }));
2000
- }, [m]), b ? /* @__PURE__ */ w(it, {}) : /* @__PURE__ */ w(
2110
+ g == null || g === W.previewOpen || (g ? W.openPreview({ notifyHost: !1 }) : W.closePreview({ notifyHost: !1 }));
2111
+ }, [g]), x ? /* @__PURE__ */ S(ht, {}) : /* @__PURE__ */ S(
2001
2112
  "div",
2002
2113
  {
2003
2114
  "data-pygmalion-storyboard-loading": "",
@@ -2016,63 +2127,64 @@ function fn({
2016
2127
  );
2017
2128
  }
2018
2129
  export {
2019
- mn as DESIGN_IMPORT_KINDS,
2020
- en as PygmalionCatalogDocument,
2021
- nn as PygmalionCatalogMatrix,
2022
- tn as PygmalionCatalogSection,
2023
- fn as PygmalionEditor,
2024
- st as STORYBOARD_ENVIRONMENT_CONTROL,
2025
- gn as STORYBOARD_ENVIRONMENT_QUERY,
2026
- an as SourceRefControl,
2027
- cn as __debug,
2028
- yn as applyTokenOverride,
2029
- at as bootstrapPreviewArtifact,
2030
- wn as clearPygmalionPreviewCache,
2031
- on as createDesignComponentCatalog,
2032
- Bt as createDesignComponentVariantMatrix,
2033
- rn as createDesignGalleryCatalog,
2034
- Sn as createDesignImportController,
2035
- bn as createDesignScreenCollection,
2036
- ot as createPreviewArtifactHttpTransport,
2037
- vn as createPreviewCacheNamespace,
2038
- In as createPreviewFrameFingerprint,
2039
- xn as createPreviewRecipeFingerprint,
2040
- Pn as createStoryboardCaptureRecipeIdentity,
2041
- wt as createStoryboardGraph,
2042
- kt as createStoryboardGraphFromDiscovery,
2043
- En as createStoryboardGraphViewModel,
2044
- Cn as createStoryboardRouteUrl,
2045
- Tt as designCatalogKey,
2046
- Be as designCatalogRegistryName,
2047
- Nn as expandDesignScreenCasesViewports,
2048
- Rn as expandDesignScreenCollectionViewports,
2049
- An as getRecommendedPygmalionPreviewConcurrency,
2050
- be as getStoryboardBaselineEnvironment,
2051
- ze as getStoryboardDiscoveryBaselineEnvironment,
2052
- $n as getStoryboardGraph,
2053
- On as getViewportPresets,
2054
- _e as loadStoryboardDiscovery,
2055
- Mn as mergeScreenPresets,
2056
- He as mergeStoryboardEnvironment,
2057
- Zt as publishStoryboardDiscovery,
2058
- ln as pygmalionNavigate,
2059
- dn as pygmalionOpenPreview,
2060
- un as pygmalionResetCurrentEdits,
2061
- kn as reconstructRoutePreviewArtifactScreenshotV3,
2062
- Dn as reconstructRoutePreviewArtifactSnapshotV3,
2063
- Fn as resetTokenOverrides,
2064
- Pt as resolveStoryboardScreenCases,
2065
- Je as setComponentRegistry,
2066
- Qe as setPygmalionAppOrigin,
2067
- et as setPygmalionPreviewConcurrency,
2068
- Le as setPygmalionPreviewRevision,
2069
- se as setStoryboardBaselineEnvironment,
2070
- Y as setStoryboardGraph,
2071
- We as setTokens,
2072
- Ve as setViewportPresets,
2073
- mt as storyboardScreenRecipeKey,
2074
- Tn as subscribeStoryboardGraph,
2075
- sn as usePygmalionProject,
2076
- zn as validatePreviewArtifactBundle,
2077
- _n as validateRoutePreviewArtifactV3Browser
2130
+ Sn as DESIGN_IMPORT_KINDS,
2131
+ sn as PygmalionCatalogDocument,
2132
+ cn as PygmalionCatalogMatrix,
2133
+ an as PygmalionCatalogSection,
2134
+ yn as PygmalionEditor,
2135
+ ft as STORYBOARD_ENVIRONMENT_CONTROL,
2136
+ vn as STORYBOARD_ENVIRONMENT_QUERY,
2137
+ fn as SourceRefControl,
2138
+ hn as __debug,
2139
+ In as applyTokenOverride,
2140
+ pt as bootstrapPreviewArtifact,
2141
+ xn as clearPygmalionPreviewCache,
2142
+ dn as createDesignComponentCatalog,
2143
+ Kt as createDesignComponentVariantMatrix,
2144
+ ln as createDesignGalleryCatalog,
2145
+ Pn as createDesignImportController,
2146
+ En as createDesignScreenCollection,
2147
+ dt as createPreviewArtifactHttpTransport,
2148
+ Rn as createPreviewCacheNamespace,
2149
+ Cn as createPreviewFrameFingerprint,
2150
+ Nn as createPreviewRecipeFingerprint,
2151
+ An as createStoryboardCaptureRecipeIdentity,
2152
+ xt as createStoryboardGraph,
2153
+ jt as createStoryboardGraphFromDiscovery,
2154
+ $n as createStoryboardGraphViewModel,
2155
+ On as createStoryboardRouteUrl,
2156
+ Ut as designCatalogKey,
2157
+ Je as designCatalogRegistryName,
2158
+ Mn as expandDesignScreenCasesViewports,
2159
+ kn as expandDesignScreenCollectionViewports,
2160
+ Fn as getRecommendedPygmalionPreviewConcurrency,
2161
+ ge as getStoryboardBaselineEnvironment,
2162
+ Ke as getStoryboardDiscoveryBaselineEnvironment,
2163
+ Tn as getStoryboardGraph,
2164
+ Dn as getViewportPresets,
2165
+ Ge as loadStoryboardDiscovery,
2166
+ zn as mergeScreenPresets,
2167
+ Qe as mergeStoryboardEnvironment,
2168
+ on as publishStoryboardDiscovery,
2169
+ pn as pygmalionNavigate,
2170
+ gn as pygmalionOpenPreview,
2171
+ mn as pygmalionResetCurrentEdits,
2172
+ jn as reconstructRoutePreviewArtifactScreenshotV3,
2173
+ _n as reconstructRoutePreviewArtifactSnapshotV3,
2174
+ Bn as resetTokenOverrides,
2175
+ Un as resolvePreviewArtifactFrames,
2176
+ At as resolveStoryboardScreenCases,
2177
+ Ze as setComponentRegistry,
2178
+ nt as setPygmalionAppOrigin,
2179
+ it as setPygmalionPreviewConcurrency,
2180
+ rt as setPygmalionPreviewRevision,
2181
+ ae as setStoryboardBaselineEnvironment,
2182
+ Z as setStoryboardGraph,
2183
+ et as setTokens,
2184
+ tt as setViewportPresets,
2185
+ St as storyboardScreenRecipeKey,
2186
+ Hn as subscribeStoryboardGraph,
2187
+ un as usePygmalionProject,
2188
+ qn as validatePreviewArtifactBundle,
2189
+ Kn as validateRoutePreviewArtifactV3Browser
2078
2190
  };