@pygmalionjs/pygmalion 0.2.18 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +19 -0
- package/README.md +39 -0
- package/dist-lib/{App-CiSnd2mV.js → App-BncfvzKi.js} +2609 -2562
- package/dist-lib/pygmalion.js +837 -834
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +1 -1
- package/node/dev-mirror.mjs +228 -11
- package/node/preview-artifact-plugin.mjs +0 -0
- package/node/storyboard-capture-runtime.mjs +37 -7
- package/node/vite.mjs +9 -4
- package/package.json +1 -1
- package/storyboard.d.ts +19 -7
- package/types.d.ts +19 -0
package/dist-lib/pygmalion.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { b as
|
|
3
|
-
import {
|
|
4
|
-
import { createElement as Ee, useMemo as le, useState as
|
|
1
|
+
import { jsxs as N, jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { b as W, m as Ke, v as qe, c as Ge, i as Ve, g as Je, e as K, d as Le, a as We, f as Qe, h as Xe, j as Ye, k as Ze, l as et, n as tt, o as nt, p as rt, q as ot, r as it, t as st, u as at, w as ie, S as ct, A as lt, x as xe, y as dt, z as ft, B as ut, C as pt, D as ht, E as mt, G as gt, H as Pe } from "./App-BncfvzKi.js";
|
|
3
|
+
import { I as Dn, J as zn, K as _n, L as Fn, M as jn, O as Bn, P as Un, Q as Hn, R as Kn, T as qn, U as Gn, V as Vn, W as Jn, X as Ln, Y as Wn, Z as Qn, _ as Xn, $ as Yn } from "./App-BncfvzKi.js";
|
|
4
|
+
import { createElement as Ee, useMemo as le, useState as te, useRef as Ne, useCallback as L, useEffect as ne } from "react";
|
|
5
5
|
function we(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;
|
|
@@ -11,14 +11,14 @@ function we(e, t = /* @__PURE__ */ new Set()) {
|
|
|
11
11
|
if (t.has(e))
|
|
12
12
|
throw new Error("A storyboard recipe cannot contain circular references.");
|
|
13
13
|
t.add(e);
|
|
14
|
-
const
|
|
14
|
+
const o = {};
|
|
15
15
|
for (const n of Object.keys(e).sort()) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const r = e[n];
|
|
17
|
+
r !== void 0 && (o[n] = we(r, t));
|
|
18
18
|
}
|
|
19
|
-
return t.delete(e),
|
|
19
|
+
return t.delete(e), o;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function yt(e) {
|
|
22
22
|
return JSON.stringify(
|
|
23
23
|
we({
|
|
24
24
|
version: 1,
|
|
@@ -40,17 +40,17 @@ function gt(e) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
function z(e) {
|
|
43
|
-
return [...new Set([...e].map((t) => t == null ? void 0 : t.trim()).filter(Boolean))].sort((t,
|
|
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
|
|
45
|
+
function wt(e, t) {
|
|
46
46
|
var n;
|
|
47
47
|
return ((n = e.id) == null ? void 0 : n.trim()) || `edge:${t + 1}`;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const t = [...e.screens].sort((n,
|
|
49
|
+
function bt(e) {
|
|
50
|
+
const t = [...e.screens].sort((n, r) => n.id.localeCompare(r.id)), o = t[0].id;
|
|
51
51
|
return {
|
|
52
|
-
id: `story:${
|
|
53
|
-
canonicalScreenId:
|
|
52
|
+
id: `story:${o}`,
|
|
53
|
+
canonicalScreenId: o,
|
|
54
54
|
screenIds: t.map((n) => n.id),
|
|
55
55
|
names: z(t.map((n) => n.name)),
|
|
56
56
|
recipeKey: e.recipeKey,
|
|
@@ -75,210 +75,210 @@ function Re(e) {
|
|
|
75
75
|
e.scenarioId
|
|
76
76
|
].join(":");
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function St(e) {
|
|
79
79
|
var re, oe;
|
|
80
|
-
const t = [],
|
|
80
|
+
const t = [], o = [], n = /* @__PURE__ */ new Map();
|
|
81
81
|
for (const c of e.screens) {
|
|
82
|
-
const
|
|
83
|
-
if (!
|
|
82
|
+
const f = c.id.trim();
|
|
83
|
+
if (!f || n.has(f)) {
|
|
84
84
|
t.push({
|
|
85
85
|
code: "duplicate-screen-id",
|
|
86
86
|
severity: "error",
|
|
87
|
-
message:
|
|
88
|
-
screenId:
|
|
87
|
+
message: f ? `Multiple storyboard screens use the id "${f}".` : "A storyboard screen has an empty id.",
|
|
88
|
+
screenId: f || void 0
|
|
89
89
|
});
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
|
-
const
|
|
93
|
-
n.set(
|
|
92
|
+
const d = f === c.id ? c : { ...c, id: f };
|
|
93
|
+
n.set(f, d), o.push(d);
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
for (const c of
|
|
97
|
-
let
|
|
95
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
96
|
+
for (const c of o) {
|
|
97
|
+
let f;
|
|
98
98
|
try {
|
|
99
|
-
if (
|
|
99
|
+
if (f = (e.recipeKey ?? yt)(c), !f.trim()) throw new Error("Recipe keys cannot be empty.");
|
|
100
100
|
} catch (u) {
|
|
101
101
|
i.add(c.id), t.push({
|
|
102
102
|
code: "invalid-recipe",
|
|
103
103
|
severity: "error",
|
|
104
104
|
message: u instanceof Error ? u.message : "Storyboard recipe identity could not be created.",
|
|
105
105
|
screenId: c.id
|
|
106
|
-
}),
|
|
106
|
+
}), f = `invalid:${c.id}`;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
|
|
108
|
+
const d = r.get(f);
|
|
109
|
+
d ? d.screens.push(c) : r.set(f, { recipeKey: f, screens: [c] });
|
|
110
110
|
}
|
|
111
|
-
const s = [...
|
|
111
|
+
const s = [...r.values()].map(bt).sort((c, f) => c.id.localeCompare(f.id)), a = {};
|
|
112
112
|
for (const c of s)
|
|
113
|
-
for (const
|
|
114
|
-
const
|
|
113
|
+
for (const f of c.screenIds) a[f] = c.id;
|
|
114
|
+
const l = new Map(s.map((c) => [c.id, c])), g = /* @__PURE__ */ new Map();
|
|
115
115
|
for (const c of e.assets ?? []) {
|
|
116
|
-
const
|
|
117
|
-
|
|
116
|
+
const f = g.get(c.pageId);
|
|
117
|
+
f ? f.push(c) : g.set(c.pageId, [c]);
|
|
118
118
|
}
|
|
119
119
|
const p = s.map((c) => {
|
|
120
|
-
const
|
|
121
|
-
(
|
|
120
|
+
const f = c.screenIds.flatMap(
|
|
121
|
+
(d) => g.get(d) ?? []
|
|
122
122
|
);
|
|
123
123
|
return {
|
|
124
124
|
...c,
|
|
125
125
|
scenarioIds: z([
|
|
126
126
|
...c.scenarioIds,
|
|
127
|
-
...
|
|
127
|
+
...f.map((d) => d.scenarioId)
|
|
128
128
|
]),
|
|
129
129
|
sourceKeys: z([
|
|
130
130
|
...c.sourceKeys,
|
|
131
|
-
...
|
|
131
|
+
...f.map((d) => d.sourcePath)
|
|
132
132
|
])
|
|
133
133
|
};
|
|
134
|
-
}),
|
|
134
|
+
}), b = /* @__PURE__ */ new Map();
|
|
135
135
|
for (const c of p)
|
|
136
|
-
for (const
|
|
137
|
-
const
|
|
138
|
-
|
|
136
|
+
for (const f of c.routes) {
|
|
137
|
+
const d = b.get(f);
|
|
138
|
+
d ? d.push(c.id) : b.set(f, [c.id]);
|
|
139
139
|
}
|
|
140
|
-
const
|
|
141
|
-
const u = c.trim(),
|
|
142
|
-
if (
|
|
143
|
-
const I = z(
|
|
140
|
+
const m = (c, f, d) => {
|
|
141
|
+
const u = c.trim(), P = a[u] ?? (l.has(u) ? u : null);
|
|
142
|
+
if (P) return P;
|
|
143
|
+
const I = z(b.get(u) ?? []);
|
|
144
144
|
return I.length === 1 ? I[0] : I.length > 1 ? (t.push({
|
|
145
|
-
code:
|
|
145
|
+
code: d === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
|
|
146
146
|
severity: "error",
|
|
147
|
-
message: `Storyboard edge "${
|
|
148
|
-
edgeId:
|
|
147
|
+
message: `Storyboard edge "${f}" references an ambiguous ${d} route.`,
|
|
148
|
+
edgeId: f,
|
|
149
149
|
screenId: u || void 0
|
|
150
150
|
}), null) : (t.push({
|
|
151
|
-
code:
|
|
151
|
+
code: d === "source" ? "unknown-edge-source" : "unknown-edge-target",
|
|
152
152
|
severity: "error",
|
|
153
|
-
message: `Storyboard edge "${
|
|
154
|
-
edgeId:
|
|
153
|
+
message: `Storyboard edge "${f}" references an unknown ${d}.`,
|
|
154
|
+
edgeId: f,
|
|
155
155
|
screenId: u || void 0
|
|
156
156
|
}), null);
|
|
157
|
-
}, v = [],
|
|
157
|
+
}, v = [], y = /* @__PURE__ */ new Map(), R = [
|
|
158
158
|
["explicit", e.explicitEdges ?? []],
|
|
159
159
|
["inferred", e.inferredEdges ?? []]
|
|
160
160
|
];
|
|
161
161
|
let h = 0;
|
|
162
|
-
for (const [c,
|
|
163
|
-
for (const
|
|
164
|
-
const u =
|
|
162
|
+
for (const [c, f] of R)
|
|
163
|
+
for (const d of f) {
|
|
164
|
+
const u = wt(d, h);
|
|
165
165
|
h += 1;
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
168
|
-
const M = `${
|
|
166
|
+
const P = m(d.from, u, "source"), I = m(d.to, u, "target");
|
|
167
|
+
if (!P || !I || P === I) continue;
|
|
168
|
+
const M = `${P}\0${I}`, C = y.get(M);
|
|
169
169
|
if (C) {
|
|
170
170
|
if (!C.sourceEdgeIds.includes(u)) {
|
|
171
|
-
const
|
|
171
|
+
const G = {
|
|
172
172
|
...C,
|
|
173
173
|
sourceEdgeIds: z([
|
|
174
174
|
...C.sourceEdgeIds,
|
|
175
175
|
u
|
|
176
176
|
])
|
|
177
177
|
};
|
|
178
|
-
|
|
178
|
+
y.set(M, G);
|
|
179
179
|
const H = v.indexOf(C);
|
|
180
|
-
H >= 0 && (v[H] =
|
|
180
|
+
H >= 0 && (v[H] = G);
|
|
181
181
|
}
|
|
182
182
|
continue;
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const J = {
|
|
185
185
|
id: u,
|
|
186
|
-
from:
|
|
186
|
+
from: P,
|
|
187
187
|
to: I,
|
|
188
|
-
kind: ((re =
|
|
189
|
-
label: ((oe =
|
|
188
|
+
kind: ((re = d.kind) == null ? void 0 : re.trim()) || void 0,
|
|
189
|
+
label: ((oe = d.label) == null ? void 0 : oe.trim()) || void 0,
|
|
190
190
|
origin: c,
|
|
191
191
|
sourceEdgeIds: [u]
|
|
192
192
|
};
|
|
193
|
-
|
|
193
|
+
y.set(M, J), v.push(J);
|
|
194
194
|
}
|
|
195
195
|
v.sort(
|
|
196
|
-
(c,
|
|
196
|
+
(c, f) => `${c.from}:${c.to}:${c.id}`.localeCompare(`${f.from}:${f.to}:${f.id}`)
|
|
197
197
|
);
|
|
198
198
|
const O = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
|
|
199
199
|
for (const c of v) {
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
200
|
+
const f = A.get(c.from);
|
|
201
|
+
f ? f.push(c) : A.set(c.from, [c]);
|
|
202
|
+
const d = O.get(c.to);
|
|
203
|
+
d ? d.push(c) : O.set(c.to, [c]);
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const k = [];
|
|
206
206
|
for (const c of e.startScreenIds ?? []) {
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
207
|
+
const f = c.trim(), d = a[f] ?? (l.has(f) ? f : null);
|
|
208
|
+
if (!d) {
|
|
209
209
|
t.push({
|
|
210
210
|
code: "unknown-start-screen",
|
|
211
211
|
severity: "error",
|
|
212
|
-
message: `Storyboard start references an unknown screen "${
|
|
213
|
-
screenId:
|
|
212
|
+
message: `Storyboard start references an unknown screen "${f}".`,
|
|
213
|
+
screenId: f || void 0
|
|
214
214
|
});
|
|
215
215
|
continue;
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
k.push(d);
|
|
218
218
|
}
|
|
219
|
-
const
|
|
220
|
-
let
|
|
221
|
-
|
|
222
|
-
var
|
|
223
|
-
return (((
|
|
224
|
-
}).map((c) => c.id).sort((c,
|
|
225
|
-
const S = /* @__PURE__ */ new Set(),
|
|
226
|
-
for (;
|
|
227
|
-
const c =
|
|
219
|
+
const $ = new Set(k);
|
|
220
|
+
let D = z(k);
|
|
221
|
+
D.length || (D = p.filter((c) => {
|
|
222
|
+
var f;
|
|
223
|
+
return (((f = O.get(c.id)) == null ? void 0 : f.length) ?? 0) === 0;
|
|
224
|
+
}).map((c) => c.id).sort((c, f) => c.localeCompare(f))), !D.length && p.length && (D = [p[0].id]);
|
|
225
|
+
const S = /* @__PURE__ */ new Set(), x = [...D];
|
|
226
|
+
for (; x.length; ) {
|
|
227
|
+
const c = x.shift();
|
|
228
228
|
if (!S.has(c)) {
|
|
229
229
|
S.add(c);
|
|
230
|
-
for (const
|
|
230
|
+
for (const f of A.get(c) ?? []) x.push(f.to);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
const
|
|
234
|
-
var
|
|
235
|
-
const
|
|
236
|
-
return !S.has(c.id) ||
|
|
233
|
+
const T = p.filter((c) => {
|
|
234
|
+
var d, u;
|
|
235
|
+
const f = (((d = O.get(c.id)) == null ? void 0 : d.length) ?? 0) === 0 && (((u = A.get(c.id)) == null ? void 0 : u.length) ?? 0) === 0 && !$.has(c.id);
|
|
236
|
+
return !S.has(c.id) || f && p.length > 1;
|
|
237
237
|
});
|
|
238
|
-
for (const c of
|
|
239
|
-
for (const
|
|
238
|
+
for (const c of T)
|
|
239
|
+
for (const f of c.screenIds)
|
|
240
240
|
t.push({
|
|
241
241
|
code: "disconnected-screen",
|
|
242
242
|
severity: "warning",
|
|
243
|
-
message: `Storyboard screen "${
|
|
244
|
-
screenId:
|
|
243
|
+
message: `Storyboard screen "${f}" is not connected to a graph branch.`,
|
|
244
|
+
screenId: f,
|
|
245
245
|
nodeId: c.id
|
|
246
246
|
});
|
|
247
247
|
const j = /* @__PURE__ */ new Map();
|
|
248
248
|
for (const c of p)
|
|
249
|
-
for (const
|
|
250
|
-
const
|
|
249
|
+
for (const f of c.sourceKeys) {
|
|
250
|
+
const d = j.get(f) ?? {
|
|
251
251
|
nodeIds: /* @__PURE__ */ new Set(),
|
|
252
252
|
screenIds: /* @__PURE__ */ new Set()
|
|
253
253
|
};
|
|
254
|
-
|
|
255
|
-
for (const u of c.screenIds)
|
|
256
|
-
j.set(
|
|
254
|
+
d.nodeIds.add(c.id);
|
|
255
|
+
for (const u of c.screenIds) d.screenIds.add(u);
|
|
256
|
+
j.set(f, d);
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const X = [...j.entries()].map(([c, f]) => ({
|
|
259
259
|
sourceKey: c,
|
|
260
|
-
nodeIds: [...
|
|
261
|
-
screenIds: [...
|
|
262
|
-
shared:
|
|
263
|
-
})).sort((c,
|
|
264
|
-
const
|
|
265
|
-
(
|
|
260
|
+
nodeIds: [...f.nodeIds].sort((d, u) => d.localeCompare(u)),
|
|
261
|
+
screenIds: [...f.screenIds].sort((d, u) => d.localeCompare(u)),
|
|
262
|
+
shared: f.nodeIds.size > 1
|
|
263
|
+
})).sort((c, f) => c.sourceKey.localeCompare(f.sourceKey)), Y = p.map((c) => {
|
|
264
|
+
const f = [...A.get(c.id) ?? []].sort(
|
|
265
|
+
(d, u) => d.id.localeCompare(u.id)
|
|
266
266
|
);
|
|
267
267
|
return {
|
|
268
268
|
nodeId: c.id,
|
|
269
|
-
edgeIds:
|
|
270
|
-
targetNodeIds: z(
|
|
269
|
+
edgeIds: f.map((d) => d.id),
|
|
270
|
+
targetNodeIds: z(f.map((d) => d.to))
|
|
271
271
|
};
|
|
272
|
-
}).filter((c) => c.targetNodeIds.length > 1).sort((c,
|
|
272
|
+
}).filter((c) => c.targetNodeIds.length > 1).sort((c, f) => c.nodeId.localeCompare(f.nodeId)), q = new Set(
|
|
273
273
|
p.flatMap((c) => c.scenarioIds)
|
|
274
|
-
),
|
|
274
|
+
), Z = new Set(
|
|
275
275
|
(e.nonVisualScenarioIds ?? []).map((c) => c.trim())
|
|
276
|
-
),
|
|
276
|
+
), E = z(
|
|
277
277
|
(e.scenarios ?? []).map((c) => c.id)
|
|
278
|
-
),
|
|
279
|
-
(c) => !
|
|
278
|
+
), B = E.filter(
|
|
279
|
+
(c) => !q.has(c) && !Z.has(c)
|
|
280
280
|
);
|
|
281
|
-
for (const c of
|
|
281
|
+
for (const c of B)
|
|
282
282
|
t.push({
|
|
283
283
|
code: "missing-code-scenario",
|
|
284
284
|
severity: "warning",
|
|
@@ -286,45 +286,45 @@ function bt(e) {
|
|
|
286
286
|
scenarioId: c
|
|
287
287
|
});
|
|
288
288
|
t.sort(
|
|
289
|
-
(c,
|
|
289
|
+
(c, f) => Re(c).localeCompare(Re(f))
|
|
290
290
|
);
|
|
291
|
-
const
|
|
292
|
-
|
|
291
|
+
const _ = z(
|
|
292
|
+
T.flatMap((c) => c.screenIds)
|
|
293
293
|
), se = {
|
|
294
|
-
screens:
|
|
294
|
+
screens: o.length,
|
|
295
295
|
canonicalNodes: p.length,
|
|
296
|
-
mergedScreens: Math.max(0,
|
|
296
|
+
mergedScreens: Math.max(0, o.length - p.length),
|
|
297
297
|
edges: v.length,
|
|
298
|
-
connectedNodes: p.length -
|
|
299
|
-
disconnectedScreens:
|
|
300
|
-
codeScenarios:
|
|
301
|
-
representedScenarios:
|
|
302
|
-
(c) =>
|
|
298
|
+
connectedNodes: p.length - T.length,
|
|
299
|
+
disconnectedScreens: _,
|
|
300
|
+
codeScenarios: E.length,
|
|
301
|
+
representedScenarios: E.filter(
|
|
302
|
+
(c) => q.has(c)
|
|
303
303
|
).length,
|
|
304
|
-
missingScenarios:
|
|
305
|
-
complete:
|
|
304
|
+
missingScenarios: B,
|
|
305
|
+
complete: _.length === 0 && B.length === 0 && !t.some((c) => c.severity === "error") && i.size === 0
|
|
306
306
|
};
|
|
307
307
|
return {
|
|
308
308
|
version: 1,
|
|
309
309
|
nodes: p,
|
|
310
310
|
edges: v,
|
|
311
311
|
aliases: Object.fromEntries(
|
|
312
|
-
Object.entries(a).sort(([c], [
|
|
312
|
+
Object.entries(a).sort(([c], [f]) => c.localeCompare(f))
|
|
313
313
|
),
|
|
314
|
-
sourceGroups:
|
|
315
|
-
startNodeIds:
|
|
316
|
-
branches:
|
|
314
|
+
sourceGroups: X,
|
|
315
|
+
startNodeIds: D,
|
|
316
|
+
branches: Y,
|
|
317
317
|
warnings: t,
|
|
318
318
|
coverage: se
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function vt(e) {
|
|
322
322
|
return e ? JSON.parse(JSON.stringify(e)) : void 0;
|
|
323
323
|
}
|
|
324
324
|
function de(e) {
|
|
325
325
|
if (Array.isArray(e)) return e.map(de);
|
|
326
326
|
if (e && typeof e == "object") {
|
|
327
|
-
const t = Object.entries(e).filter(([,
|
|
327
|
+
const t = Object.entries(e).filter(([, o]) => o !== void 0).sort(([o], [n]) => o.localeCompare(n)).map(([o, n]) => [o, de(n)]).filter(([, o]) => o !== void 0);
|
|
328
328
|
return t.length ? Object.fromEntries(t) : void 0;
|
|
329
329
|
}
|
|
330
330
|
return e;
|
|
@@ -332,76 +332,76 @@ function de(e) {
|
|
|
332
332
|
function Ce(e) {
|
|
333
333
|
return JSON.stringify(de(e ?? null));
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function It(e) {
|
|
336
336
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
337
337
|
}
|
|
338
338
|
function U(e) {
|
|
339
339
|
const t = e == null ? void 0 : e.trim();
|
|
340
340
|
if (!t) return null;
|
|
341
|
-
let
|
|
341
|
+
let o = t;
|
|
342
342
|
try {
|
|
343
|
-
/^[a-z][a-z\d+.-]*:\/\//i.test(t) && (
|
|
343
|
+
/^[a-z][a-z\d+.-]*:\/\//i.test(t) && (o = new URL(t).pathname);
|
|
344
344
|
} catch {
|
|
345
345
|
return null;
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return o = o.split(/[?#]/, 1)[0].replace(/\/{2,}/g, "/"), o.startsWith("/") || (o = `/${o}`), o.length > 1 && (o = o.replace(/\/+$/, "")), o || "/";
|
|
348
348
|
}
|
|
349
349
|
function De(e) {
|
|
350
350
|
return `source-route:${encodeURIComponent(e)}`;
|
|
351
351
|
}
|
|
352
352
|
function Ie(e, t) {
|
|
353
|
-
const
|
|
354
|
-
let
|
|
355
|
-
for (let i = 0; i <
|
|
356
|
-
const s =
|
|
353
|
+
const o = e.split("/").filter(Boolean), n = t.split("/").filter(Boolean);
|
|
354
|
+
let r = 0;
|
|
355
|
+
for (let i = 0; i < o.length; i += 1) {
|
|
356
|
+
const s = o[i];
|
|
357
357
|
if (s === "*" || s.startsWith("*")) return !0;
|
|
358
|
-
const a = n[
|
|
358
|
+
const a = n[r];
|
|
359
359
|
if (!(s.endsWith("?") && a == null)) {
|
|
360
360
|
if (a == null || !s.startsWith(":") && s !== a) return !1;
|
|
361
|
-
|
|
361
|
+
r += 1;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
return
|
|
364
|
+
return r === n.length;
|
|
365
365
|
}
|
|
366
366
|
function Ae(e, t) {
|
|
367
|
-
const
|
|
368
|
-
if (!
|
|
369
|
-
const n = t.get(
|
|
370
|
-
return n && !/[:*]/.test(
|
|
367
|
+
const o = U(e);
|
|
368
|
+
if (!o) return [];
|
|
369
|
+
const n = t.get(o);
|
|
370
|
+
return n && !/[:*]/.test(o) ? [n] : [
|
|
371
371
|
...new Set(
|
|
372
|
-
[...t.entries()].filter(([
|
|
372
|
+
[...t.entries()].filter(([r]) => Ie(o, r)).map(([, r]) => r)
|
|
373
373
|
)
|
|
374
|
-
].sort((
|
|
374
|
+
].sort((r, i) => r.localeCompare(i));
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
var
|
|
376
|
+
function xt(e) {
|
|
377
|
+
var o;
|
|
378
378
|
const t = /* @__PURE__ */ new Map();
|
|
379
379
|
for (const n of e ?? []) {
|
|
380
|
-
const
|
|
381
|
-
!
|
|
382
|
-
id: De(
|
|
383
|
-
name:
|
|
380
|
+
const r = U(n.path);
|
|
381
|
+
!r || t.has(r) || t.set(r, {
|
|
382
|
+
id: De(r),
|
|
383
|
+
name: r,
|
|
384
384
|
section: "Source routes",
|
|
385
|
-
codeName: ((
|
|
385
|
+
codeName: ((o = n.id) == null ? void 0 : o.trim()) || void 0
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
-
return [...t.values()].sort((n,
|
|
388
|
+
return [...t.values()].sort((n, r) => n.id.localeCompare(r.id));
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
return (e ?? []).flatMap((n,
|
|
392
|
-
var p,
|
|
393
|
-
const i = (p = n.from) == null ? void 0 : p.trim(), s = (
|
|
390
|
+
function Pt(e, t, o) {
|
|
391
|
+
return (e ?? []).flatMap((n, r) => {
|
|
392
|
+
var p, b, m;
|
|
393
|
+
const i = (p = n.from) == null ? void 0 : p.trim(), s = (b = n.to) == null ? void 0 : b.trim();
|
|
394
394
|
if (!i || !s || n.unresolvedTarget) return [];
|
|
395
|
-
const a =
|
|
396
|
-
if (!a.length || !
|
|
397
|
-
const
|
|
395
|
+
const a = o.has(i) ? [i] : Ae(i, t), l = o.has(s) ? [s] : Ae(s, t);
|
|
396
|
+
if (!a.length || !l.length) return [];
|
|
397
|
+
const g = ((m = n.id) == null ? void 0 : m.trim()) || `discovery-edge:${r + 1}`;
|
|
398
398
|
return a.flatMap(
|
|
399
|
-
(v,
|
|
399
|
+
(v, y) => l.map((R, h) => {
|
|
400
400
|
var O, A;
|
|
401
401
|
return {
|
|
402
|
-
id: a.length === 1 &&
|
|
402
|
+
id: a.length === 1 && l.length === 1 ? g : `${g}:${y + 1}:${h + 1}`,
|
|
403
403
|
from: v,
|
|
404
|
-
to:
|
|
404
|
+
to: R,
|
|
405
405
|
kind: ((O = n.kind) == null ? void 0 : O.trim()) || void 0,
|
|
406
406
|
label: ((A = n.label) == null ? void 0 : A.trim()) || void 0
|
|
407
407
|
};
|
|
@@ -409,34 +409,34 @@ function xt(e, t, r) {
|
|
|
409
409
|
);
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function Et(e, t, o) {
|
|
413
413
|
const n = U(e.route);
|
|
414
414
|
if (!n) return [];
|
|
415
|
-
const
|
|
415
|
+
const r = t.filter(
|
|
416
416
|
(a) => {
|
|
417
|
-
const
|
|
418
|
-
return
|
|
417
|
+
const l = U(a.route);
|
|
418
|
+
return l ? Ie(l, n) : !1;
|
|
419
419
|
}
|
|
420
420
|
);
|
|
421
|
-
if (!
|
|
421
|
+
if (!r.length) return [];
|
|
422
422
|
const i = Ce(
|
|
423
|
-
Ke(
|
|
424
|
-
), s =
|
|
423
|
+
Ke(o, e.environment)
|
|
424
|
+
), s = r.filter(
|
|
425
425
|
(a) => Ce(a.environment) === i
|
|
426
426
|
);
|
|
427
427
|
return [
|
|
428
428
|
...new Set(
|
|
429
429
|
s.map((a) => {
|
|
430
|
-
var
|
|
431
|
-
return (
|
|
430
|
+
var l;
|
|
431
|
+
return (l = a.scenarioId) == null ? void 0 : l.trim();
|
|
432
432
|
}).filter((a) => !!a)
|
|
433
433
|
)
|
|
434
|
-
].sort((a,
|
|
434
|
+
].sort((a, l) => a.localeCompare(l));
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
const
|
|
436
|
+
function Nt(e, t) {
|
|
437
|
+
const o = e.some((i) => i.importKind != null), n = t.candidates ?? [], r = _e(t);
|
|
438
438
|
return e.filter(
|
|
439
|
-
(i) =>
|
|
439
|
+
(i) => o ? i.importKind === "screens" : !!i.route
|
|
440
440
|
).map((i) => ({
|
|
441
441
|
id: i.id,
|
|
442
442
|
name: i.name,
|
|
@@ -455,7 +455,7 @@ function Et(e, t) {
|
|
|
455
455
|
scenario: i.scenario,
|
|
456
456
|
state: i.state,
|
|
457
457
|
scenarioId: i.scenarioId,
|
|
458
|
-
scenarioIds:
|
|
458
|
+
scenarioIds: Et(i, n, r),
|
|
459
459
|
interactions: i.interactions,
|
|
460
460
|
environment: i.environment,
|
|
461
461
|
preset: i.preset,
|
|
@@ -464,30 +464,30 @@ function Et(e, t) {
|
|
|
464
464
|
}));
|
|
465
465
|
}
|
|
466
466
|
function me(e, t) {
|
|
467
|
-
var a,
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
470
|
-
const n = (
|
|
471
|
-
if (n !==
|
|
467
|
+
var a, l, g, p;
|
|
468
|
+
const o = (((a = e.interactions) == null ? void 0 : a.length) ?? 0) - (((l = t.interactions) == null ? void 0 : l.length) ?? 0);
|
|
469
|
+
if (o !== 0) return o;
|
|
470
|
+
const n = (g = e.scenarioIds) != null && g.includes("environment:baseline") ? 0 : 1, r = (p = t.scenarioIds) != null && p.includes("environment:baseline") ? 0 : 1;
|
|
471
|
+
if (n !== r) return n - r;
|
|
472
472
|
const i = !e.environment && !e.preset ? 0 : 1, s = !t.environment && !t.preset ? 0 : 1;
|
|
473
473
|
return i !== s ? i - s : e.id.localeCompare(t.id);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Rt(e) {
|
|
476
476
|
const t = /* @__PURE__ */ new Map();
|
|
477
|
-
for (const
|
|
478
|
-
const n = U(
|
|
477
|
+
for (const o of e) {
|
|
478
|
+
const n = U(o.route);
|
|
479
479
|
if (!n) continue;
|
|
480
|
-
const
|
|
481
|
-
|
|
480
|
+
const r = t.get(n);
|
|
481
|
+
r ? r.push(o) : t.set(n, [o]);
|
|
482
482
|
}
|
|
483
483
|
return new Map(
|
|
484
|
-
[...t.entries()].map(([
|
|
485
|
-
const
|
|
486
|
-
return [
|
|
484
|
+
[...t.entries()].map(([o, n]) => {
|
|
485
|
+
const r = [...n].sort(me);
|
|
486
|
+
return [o, r[0].id];
|
|
487
487
|
})
|
|
488
488
|
);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Ct(e) {
|
|
491
491
|
return e.action === "wait" ? null : JSON.stringify(
|
|
492
492
|
de({
|
|
493
493
|
action: e.action,
|
|
@@ -504,23 +504,23 @@ function Rt(e) {
|
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
function ze(e) {
|
|
507
|
-
return (e.interactions ?? []).map(
|
|
508
|
-
}
|
|
509
|
-
function Ct(e, t) {
|
|
510
|
-
return e.length < t.length && e.every((r, n) => r === t[n]);
|
|
507
|
+
return (e.interactions ?? []).map(Ct).filter((t) => t != null);
|
|
511
508
|
}
|
|
512
509
|
function At(e, t) {
|
|
513
|
-
|
|
510
|
+
return e.length < t.length && e.every((o, n) => o === t[n]);
|
|
511
|
+
}
|
|
512
|
+
function Ot(e, t) {
|
|
513
|
+
const o = /* @__PURE__ */ new Map();
|
|
514
514
|
for (const n of e) {
|
|
515
|
-
const
|
|
516
|
-
if (!
|
|
517
|
-
const i = `${
|
|
518
|
-
s ? s.push(n) :
|
|
515
|
+
const r = U(n.route);
|
|
516
|
+
if (!r) continue;
|
|
517
|
+
const i = `${r}\0${ze(n).join("")}`, s = o.get(i);
|
|
518
|
+
s ? s.push(n) : o.set(i, [n]);
|
|
519
519
|
}
|
|
520
|
-
return [...
|
|
520
|
+
return [...o.values()].flatMap((n) => {
|
|
521
521
|
if (n.length < 2) return [];
|
|
522
|
-
const
|
|
523
|
-
return n.filter((a) => a.id !== s.id).sort((a,
|
|
522
|
+
const r = U(n[0].route), i = t.get(r), s = n.find((a) => a.id === i) ?? [...n].sort(me)[0];
|
|
523
|
+
return n.filter((a) => a.id !== s.id).sort((a, l) => a.id.localeCompare(l.id)).map((a) => ({
|
|
524
524
|
id: `discovery-variant:${encodeURIComponent(s.id)}:${encodeURIComponent(a.id)}`,
|
|
525
525
|
from: s.id,
|
|
526
526
|
to: a.id,
|
|
@@ -528,81 +528,81 @@ function At(e, t) {
|
|
|
528
528
|
}));
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
const
|
|
531
|
+
function $t(e, t) {
|
|
532
|
+
const o = /* @__PURE__ */ new Map();
|
|
533
533
|
for (const n of e) {
|
|
534
|
-
const
|
|
535
|
-
if (!
|
|
536
|
-
const i =
|
|
537
|
-
i ? i.push(n) :
|
|
534
|
+
const r = U(n.route);
|
|
535
|
+
if (!r) continue;
|
|
536
|
+
const i = o.get(r);
|
|
537
|
+
i ? i.push(n) : o.set(r, [n]);
|
|
538
538
|
}
|
|
539
|
-
return [...
|
|
539
|
+
return [...o.entries()].flatMap(([n, r]) => {
|
|
540
540
|
const i = new Map(
|
|
541
|
-
|
|
542
|
-
), s = t.get(n), a =
|
|
543
|
-
(
|
|
541
|
+
r.map((l) => [l.id, ze(l)])
|
|
542
|
+
), s = t.get(n), a = r.find(
|
|
543
|
+
(l) => l.id === s
|
|
544
544
|
);
|
|
545
|
-
return
|
|
546
|
-
const
|
|
547
|
-
if (!
|
|
548
|
-
const
|
|
549
|
-
(
|
|
550
|
-
i.get(
|
|
551
|
-
|
|
545
|
+
return r.flatMap((l) => {
|
|
546
|
+
const g = i.get(l.id);
|
|
547
|
+
if (!g.length) return [];
|
|
548
|
+
const b = r.filter(
|
|
549
|
+
(m) => At(
|
|
550
|
+
i.get(m.id),
|
|
551
|
+
g
|
|
552
552
|
)
|
|
553
|
-
).sort((
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
const O =
|
|
553
|
+
).sort((m, v) => {
|
|
554
|
+
const y = i.get(v.id).length - i.get(m.id).length;
|
|
555
|
+
if (y !== 0) return y;
|
|
556
|
+
const R = m.flow && m.flow === l.flow ? 0 : 1, h = v.flow && v.flow === l.flow ? 0 : 1;
|
|
557
|
+
if (R !== h) return R - h;
|
|
558
|
+
const O = m.section && m.section === l.section ? 0 : 1, A = v.section && v.section === l.section ? 0 : 1;
|
|
559
559
|
if (O !== A) return O - A;
|
|
560
|
-
const
|
|
561
|
-
return
|
|
560
|
+
const k = m.id === s ? 0 : 1, $ = v.id === s ? 0 : 1;
|
|
561
|
+
return k !== $ ? k - $ : me(m, v);
|
|
562
562
|
})[0];
|
|
563
|
-
return
|
|
563
|
+
return b ? [
|
|
564
564
|
{
|
|
565
|
-
id: `discovery-recipe:${encodeURIComponent(
|
|
566
|
-
from:
|
|
567
|
-
to:
|
|
565
|
+
id: `discovery-recipe:${encodeURIComponent(b.id)}:${encodeURIComponent(l.id)}`,
|
|
566
|
+
from: b.id,
|
|
567
|
+
to: l.id,
|
|
568
568
|
kind: "recipe-step"
|
|
569
569
|
}
|
|
570
|
-
] : a && a.id !==
|
|
570
|
+
] : a && a.id !== l.id && i.get(a.id).join("") !== g.join("") ? [
|
|
571
571
|
{
|
|
572
|
-
id: `discovery-route-case:${encodeURIComponent(a.id)}:${encodeURIComponent(
|
|
572
|
+
id: `discovery-route-case:${encodeURIComponent(a.id)}:${encodeURIComponent(l.id)}`,
|
|
573
573
|
from: a.id,
|
|
574
|
-
to:
|
|
574
|
+
to: l.id,
|
|
575
575
|
kind: "route-case"
|
|
576
576
|
}
|
|
577
577
|
] : [];
|
|
578
578
|
});
|
|
579
579
|
});
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
var
|
|
581
|
+
function Mt(e) {
|
|
582
|
+
var o;
|
|
583
583
|
const t = /* @__PURE__ */ new Map();
|
|
584
584
|
for (const n of e) {
|
|
585
|
-
const
|
|
586
|
-
if (!
|
|
587
|
-
const i = t.get(
|
|
588
|
-
i ? i.push(n) : t.set(
|
|
585
|
+
const r = (o = n.flow) == null ? void 0 : o.trim();
|
|
586
|
+
if (!r) continue;
|
|
587
|
+
const i = t.get(r);
|
|
588
|
+
i ? i.push(n) : t.set(r, [n]);
|
|
589
589
|
}
|
|
590
590
|
return [...t.values()].flatMap((n) => {
|
|
591
|
-
const
|
|
591
|
+
const r = n[0], i = /* @__PURE__ */ new Map();
|
|
592
592
|
for (const s of n) {
|
|
593
593
|
const a = U(s.route);
|
|
594
594
|
if (!a) continue;
|
|
595
|
-
const
|
|
596
|
-
|
|
595
|
+
const l = i.get(a);
|
|
596
|
+
l ? l.push(s) : i.set(a, [s]);
|
|
597
597
|
}
|
|
598
598
|
return i.size < 2 ? [] : [...i.values()].flatMap((s) => {
|
|
599
599
|
const a = [...s].sort(
|
|
600
600
|
me
|
|
601
601
|
)[0];
|
|
602
|
-
return a.id ===
|
|
602
|
+
return a.id === r.id ? [] : [
|
|
603
603
|
{
|
|
604
|
-
id: `discovery-flow-route:${encodeURIComponent(
|
|
605
|
-
from:
|
|
604
|
+
id: `discovery-flow-route:${encodeURIComponent(r.id)}:${encodeURIComponent(a.id)}`,
|
|
605
|
+
from: r.id,
|
|
606
606
|
to: a.id,
|
|
607
607
|
kind: "flow-route"
|
|
608
608
|
}
|
|
@@ -610,157 +610,157 @@ function $t(e) {
|
|
|
610
610
|
});
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Tt(e, t, o) {
|
|
614
614
|
const n = new Set(
|
|
615
|
-
(t.routes ?? []).map((
|
|
615
|
+
(t.routes ?? []).map((r) => U(r.path)).filter((r) => !!r)
|
|
616
616
|
);
|
|
617
|
-
return e.map((
|
|
618
|
-
const i = U(
|
|
619
|
-
if (!i ||
|
|
620
|
-
return
|
|
617
|
+
return e.map((r) => {
|
|
618
|
+
const i = U(r.route);
|
|
619
|
+
if (!i || o.get(i) !== r.id)
|
|
620
|
+
return r;
|
|
621
621
|
const s = [...n].filter(
|
|
622
622
|
(a) => Ie(a, i)
|
|
623
623
|
);
|
|
624
624
|
return s.length ? {
|
|
625
|
-
...
|
|
625
|
+
...r,
|
|
626
626
|
scenarioIds: [
|
|
627
627
|
.../* @__PURE__ */ new Set([
|
|
628
|
-
...
|
|
628
|
+
...r.scenarioIds ?? [],
|
|
629
629
|
...s.map(De)
|
|
630
630
|
])
|
|
631
|
-
].sort((a,
|
|
632
|
-
} :
|
|
631
|
+
].sort((a, l) => a.localeCompare(l))
|
|
632
|
+
} : r;
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
var
|
|
637
|
-
const
|
|
638
|
-
e.map((
|
|
639
|
-
),
|
|
640
|
-
for (const
|
|
641
|
-
|
|
642
|
-
for (const
|
|
643
|
-
!
|
|
644
|
-
const a = /* @__PURE__ */ new Set(),
|
|
645
|
-
for (const
|
|
646
|
-
if (
|
|
647
|
-
const
|
|
635
|
+
function kt(e, t) {
|
|
636
|
+
var g, p, b, m, v;
|
|
637
|
+
const o = new Set(e.map((y) => y.id)), n = new Map(
|
|
638
|
+
e.map((y, R) => [y.id, R])
|
|
639
|
+
), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
640
|
+
for (const y of o)
|
|
641
|
+
r.set(y, /* @__PURE__ */ new Set()), i.set(y, /* @__PURE__ */ new Set()), s.set(y, /* @__PURE__ */ new Set());
|
|
642
|
+
for (const y of t)
|
|
643
|
+
!o.has(y.from) || !o.has(y.to) || ((g = r.get(y.to)) == null || g.add(y.from), (p = i.get(y.from)) == null || p.add(y.to), (b = s.get(y.from)) == null || b.add(y.to), (m = s.get(y.to)) == null || m.add(y.from));
|
|
644
|
+
const a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
645
|
+
for (const y of o) {
|
|
646
|
+
if (l.has(y)) continue;
|
|
647
|
+
const R = [], h = [y];
|
|
648
648
|
for (; h.length; ) {
|
|
649
649
|
const S = h.shift();
|
|
650
|
-
if (!
|
|
651
|
-
|
|
652
|
-
for (const
|
|
653
|
-
|
|
650
|
+
if (!l.has(S)) {
|
|
651
|
+
l.add(S), R.push(S);
|
|
652
|
+
for (const x of s.get(S) ?? [])
|
|
653
|
+
l.has(x) || h.push(x);
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
|
-
if (
|
|
656
|
+
if (R.length === 1 && (((v = s.get(R[0])) == null ? void 0 : v.size) ?? 0) === 0)
|
|
657
657
|
continue;
|
|
658
|
-
const O =
|
|
659
|
-
var
|
|
660
|
-
return (((
|
|
658
|
+
const O = R.filter((S) => {
|
|
659
|
+
var x;
|
|
660
|
+
return (((x = r.get(S)) == null ? void 0 : x.size) ?? 0) === 0;
|
|
661
661
|
}).sort(
|
|
662
|
-
(S,
|
|
663
|
-
), A = [...
|
|
664
|
-
(S,
|
|
662
|
+
(S, x) => (n.get(S) ?? Number.MAX_SAFE_INTEGER) - (n.get(x) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(x)
|
|
663
|
+
), A = [...R].sort(
|
|
664
|
+
(S, x) => (n.get(S) ?? Number.MAX_SAFE_INTEGER) - (n.get(x) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(x)
|
|
665
665
|
)[0];
|
|
666
666
|
if (!A) continue;
|
|
667
|
-
const
|
|
668
|
-
const
|
|
669
|
-
for (;
|
|
670
|
-
const
|
|
671
|
-
if (
|
|
672
|
-
|
|
673
|
-
for (const j of i.get(
|
|
674
|
-
|
|
667
|
+
const k = [A], $ = /* @__PURE__ */ new Set(), D = (S) => {
|
|
668
|
+
const x = [S];
|
|
669
|
+
for (; x.length; ) {
|
|
670
|
+
const T = x.shift();
|
|
671
|
+
if (!$.has(T)) {
|
|
672
|
+
$.add(T);
|
|
673
|
+
for (const j of i.get(T) ?? [])
|
|
674
|
+
$.has(j) || x.push(j);
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
-
|
|
678
|
+
D(A);
|
|
679
679
|
for (const S of O)
|
|
680
|
-
|
|
681
|
-
for (const S of
|
|
680
|
+
$.has(S) || (k.push(S), D(S));
|
|
681
|
+
for (const S of k)
|
|
682
682
|
a.add(S);
|
|
683
683
|
}
|
|
684
684
|
return [...a].sort(
|
|
685
|
-
(
|
|
685
|
+
(y, R) => (n.get(y) ?? Number.MAX_SAFE_INTEGER) - (n.get(R) ?? Number.MAX_SAFE_INTEGER) || y.localeCompare(R)
|
|
686
686
|
);
|
|
687
687
|
}
|
|
688
688
|
function _e(e) {
|
|
689
|
-
var t,
|
|
690
|
-
return
|
|
691
|
-
(
|
|
689
|
+
var t, o;
|
|
690
|
+
return vt(
|
|
691
|
+
(o = (t = e.scenarios) == null ? void 0 : t.find(
|
|
692
692
|
(n) => n.id === "environment:baseline"
|
|
693
|
-
)) == null ? void 0 :
|
|
693
|
+
)) == null ? void 0 : o.environment
|
|
694
694
|
);
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
const t =
|
|
696
|
+
function Dt(e) {
|
|
697
|
+
const t = Nt(
|
|
698
698
|
e.pages,
|
|
699
699
|
e.manifest
|
|
700
|
-
),
|
|
700
|
+
), o = Rt(t), n = Tt(
|
|
701
701
|
t,
|
|
702
702
|
e.manifest,
|
|
703
|
-
|
|
703
|
+
o
|
|
704
704
|
), i = [
|
|
705
|
-
...
|
|
705
|
+
...Pt(
|
|
706
706
|
e.manifest.edges,
|
|
707
|
-
|
|
707
|
+
o,
|
|
708
708
|
new Set(n.map((s) => s.id))
|
|
709
709
|
),
|
|
710
|
-
...
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
...Ot(n, o),
|
|
711
|
+
...$t(n, o),
|
|
712
|
+
...Mt(n)
|
|
713
713
|
];
|
|
714
|
-
return
|
|
714
|
+
return St({
|
|
715
715
|
screens: n,
|
|
716
716
|
assets: e.assets,
|
|
717
|
-
scenarios:
|
|
717
|
+
scenarios: xt(e.manifest.routes),
|
|
718
718
|
inferredEdges: i,
|
|
719
|
-
startScreenIds:
|
|
719
|
+
startScreenIds: kt(n, i)
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
async function Fe(e) {
|
|
723
|
-
const
|
|
723
|
+
const o = await (e.fetcher ?? ((r, i) => fetch(r, i)))(e.endpoint, {
|
|
724
724
|
headers: { accept: "application/json" },
|
|
725
725
|
cache: "no-store",
|
|
726
726
|
signal: e.signal
|
|
727
727
|
});
|
|
728
|
-
if (!
|
|
729
|
-
throw new Error(`Storyboard discovery failed (${
|
|
730
|
-
const n = await
|
|
731
|
-
if (!
|
|
728
|
+
if (!o.ok)
|
|
729
|
+
throw new Error(`Storyboard discovery failed (${o.status})`);
|
|
730
|
+
const n = await o.json();
|
|
731
|
+
if (!It(n))
|
|
732
732
|
throw new Error("Storyboard discovery returned an invalid manifest.");
|
|
733
733
|
return {
|
|
734
734
|
manifest: n,
|
|
735
735
|
baselineEnvironment: _e(n),
|
|
736
|
-
graph:
|
|
736
|
+
graph: Dt({
|
|
737
737
|
manifest: n,
|
|
738
738
|
pages: e.pages,
|
|
739
739
|
assets: e.assets
|
|
740
740
|
})
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
async function
|
|
744
|
-
|
|
743
|
+
async function wn(e) {
|
|
744
|
+
W(null);
|
|
745
745
|
try {
|
|
746
746
|
const t = await Fe(e);
|
|
747
|
-
return
|
|
747
|
+
return W(t.graph), t;
|
|
748
748
|
} catch (t) {
|
|
749
|
-
throw
|
|
749
|
+
throw W(null), t;
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
const
|
|
752
|
+
const zt = "pygmalion-preview", _t = "unknown", Ft = 512, jt = 2048, Bt = 8 * 1024 * 1024, Ut = 128 * 1024 * 1024, Ht = /* @__PURE__ */ new Set([
|
|
753
753
|
"__proto__",
|
|
754
754
|
"constructor",
|
|
755
755
|
"prototype"
|
|
756
756
|
]);
|
|
757
|
-
function
|
|
758
|
-
const
|
|
759
|
-
if (!
|
|
760
|
-
if (ce(
|
|
757
|
+
function Q(e, t) {
|
|
758
|
+
const o = e.trim();
|
|
759
|
+
if (!o && t != null) return t;
|
|
760
|
+
if (ce(o)) return o;
|
|
761
761
|
throw new TypeError("Preview identity must be a non-empty bounded string.");
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function Kt(e) {
|
|
764
764
|
const t = e ?? 1;
|
|
765
765
|
if (!Number.isSafeInteger(t) || t < 1)
|
|
766
766
|
throw new TypeError(
|
|
@@ -777,51 +777,51 @@ function be(e, t = /* @__PURE__ */ new Set()) {
|
|
|
777
777
|
"Preview recipe identity cannot contain circular values."
|
|
778
778
|
);
|
|
779
779
|
if (t.add(e), Array.isArray(e)) {
|
|
780
|
-
const n = e.map((
|
|
780
|
+
const n = e.map((r) => be(r, t));
|
|
781
781
|
return t.delete(e), n;
|
|
782
782
|
}
|
|
783
|
-
const
|
|
783
|
+
const o = {};
|
|
784
784
|
for (const n of Object.keys(e).sort()) {
|
|
785
|
-
const
|
|
786
|
-
|
|
785
|
+
const r = e[n];
|
|
786
|
+
r !== void 0 && (o[n] = be(r, t));
|
|
787
787
|
}
|
|
788
|
-
return t.delete(e),
|
|
788
|
+
return t.delete(e), o;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
791
|
-
let t = 2166136261,
|
|
790
|
+
function qt(e) {
|
|
791
|
+
let t = 2166136261, o = 2654435769;
|
|
792
792
|
for (let n = 0; n < e.length; n += 1) {
|
|
793
|
-
const
|
|
794
|
-
t = Math.imul(t ^
|
|
793
|
+
const r = e.charCodeAt(n);
|
|
794
|
+
t = Math.imul(t ^ r, 16777619), o = Math.imul(o ^ r + n, 2246822507);
|
|
795
795
|
}
|
|
796
|
-
return `${(t >>> 0).toString(16).padStart(8, "0")}${(
|
|
796
|
+
return `${(t >>> 0).toString(16).padStart(8, "0")}${(o >>> 0).toString(16).padStart(8, "0")}`;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Gt(e) {
|
|
799
799
|
if (!Array.isArray(e))
|
|
800
800
|
throw new TypeError("Preview recipes must be an array.");
|
|
801
|
-
const t = /* @__PURE__ */ new Set(),
|
|
802
|
-
const i =
|
|
801
|
+
const t = /* @__PURE__ */ new Set(), o = e.map(({ id: n, recipe: r }) => {
|
|
802
|
+
const i = Q(n);
|
|
803
803
|
if (t.has(i))
|
|
804
804
|
throw new TypeError(`Duplicate preview recipe identity: ${i}`);
|
|
805
805
|
return t.add(i), {
|
|
806
806
|
id: i,
|
|
807
|
-
recipe: be(
|
|
807
|
+
recipe: be(r)
|
|
808
808
|
};
|
|
809
809
|
});
|
|
810
|
-
return
|
|
810
|
+
return qt(JSON.stringify(o));
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function bn({
|
|
813
813
|
sourceRevision: e,
|
|
814
814
|
recipes: t,
|
|
815
|
-
recipeVersion:
|
|
816
|
-
scope: n =
|
|
815
|
+
recipeVersion: o,
|
|
816
|
+
scope: n = zt
|
|
817
817
|
}) {
|
|
818
|
-
const
|
|
818
|
+
const r = Q(n), i = Q(
|
|
819
819
|
e,
|
|
820
|
-
|
|
821
|
-
), s =
|
|
822
|
-
return `${
|
|
820
|
+
_t
|
|
821
|
+
), s = Kt(o), a = Gt(t);
|
|
822
|
+
return `${r}:${encodeURIComponent(i)}:recipe-v${s}:${a}`;
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function Sn(e) {
|
|
825
825
|
return {
|
|
826
826
|
route: e.route,
|
|
827
827
|
path: e.path,
|
|
@@ -848,25 +848,25 @@ function bn(e) {
|
|
|
848
848
|
assertions: e.assertions
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Vt({
|
|
852
852
|
endpoint: e,
|
|
853
853
|
fetcher: t,
|
|
854
|
-
captureBaseUrl:
|
|
854
|
+
captureBaseUrl: o
|
|
855
855
|
}) {
|
|
856
856
|
const n = e.trim();
|
|
857
857
|
if (!n)
|
|
858
858
|
throw new TypeError(
|
|
859
859
|
"Preview artifact endpoint must be a non-empty string."
|
|
860
860
|
);
|
|
861
|
-
const
|
|
861
|
+
const r = t ?? ((i, s) => fetch(i, s));
|
|
862
862
|
return async (i) => {
|
|
863
863
|
const s = new URLSearchParams({
|
|
864
864
|
namespace: i.namespace,
|
|
865
865
|
sourceRevision: i.sourceRevision
|
|
866
|
-
}), a = i.captureBaseUrl ??
|
|
866
|
+
}), a = i.captureBaseUrl ?? o;
|
|
867
867
|
a && s.set("captureBaseUrl", a);
|
|
868
|
-
const
|
|
869
|
-
`${n}${
|
|
868
|
+
const l = n.includes("?") ? "&" : "?", g = await r(
|
|
869
|
+
`${n}${l}${s}`,
|
|
870
870
|
{
|
|
871
871
|
method: "GET",
|
|
872
872
|
headers: { accept: "application/json" },
|
|
@@ -874,7 +874,7 @@ function Gt({
|
|
|
874
874
|
signal: i.signal
|
|
875
875
|
}
|
|
876
876
|
);
|
|
877
|
-
return
|
|
877
|
+
return g.ok ? g.json().catch(() => null) : null;
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
880
|
function fe(e) {
|
|
@@ -886,24 +886,24 @@ function je(e) {
|
|
|
886
886
|
return new TextEncoder().encode(e).byteLength;
|
|
887
887
|
}
|
|
888
888
|
function ce(e) {
|
|
889
|
-
return typeof e == "string" && e.length > 0 && e.length <=
|
|
889
|
+
return typeof e == "string" && e.length > 0 && e.length <= Ft && e === e.trim() && !Ht.has(e);
|
|
890
890
|
}
|
|
891
891
|
function Jt(e) {
|
|
892
892
|
const t = /(?:expression\s*\(|-moz-binding\s*:|(?:^|[;{])\s*behavior\s*:)/i;
|
|
893
|
-
for (const
|
|
894
|
-
if (t.test(
|
|
895
|
-
for (const
|
|
893
|
+
for (const o of e.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style\s*>/gi))
|
|
894
|
+
if (t.test(o[1] ?? "")) return !0;
|
|
895
|
+
for (const o of e.matchAll(
|
|
896
896
|
/\sstyle\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/gi
|
|
897
897
|
))
|
|
898
|
-
if (t.test(
|
|
898
|
+
if (t.test(o[1] ?? o[2] ?? o[3] ?? "")) return !0;
|
|
899
899
|
return !1;
|
|
900
900
|
}
|
|
901
901
|
function Lt(e) {
|
|
902
|
-
return typeof e != "string" || e.length === 0 || je(e) >
|
|
902
|
+
return typeof e != "string" || e.length === 0 || je(e) > Bt ? !1 : !(/<\s*(?:script|iframe|object|embed|applet|portal)\b/i.test(e) || /<\s*meta\b[^>]*http-equiv\s*=\s*["']?\s*refresh\b/i.test(e) || /\s(?:on[a-z][\w:-]*|srcdoc)\s*=/i.test(e) || /\s(?:href|src|action|formaction|xlink:href)\s*=\s*(?:"\s*|'?\s*)(?:javascript|vbscript|data\s*:\s*text\/html)\s*:/i.test(
|
|
903
903
|
e
|
|
904
904
|
) || Jt(e));
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Wt(e) {
|
|
907
907
|
const t = [];
|
|
908
908
|
if (!fe(e) || e.version !== 1)
|
|
909
909
|
return {
|
|
@@ -916,13 +916,13 @@ function Vt(e) {
|
|
|
916
916
|
if (ce(e.namespace) || t.push("Preview artifact namespace is invalid."), e.sourceRevision != null && !ce(e.sourceRevision) && t.push("Preview artifact source revision is invalid."), !fe(e.snapshots))
|
|
917
917
|
t.push("Preview artifact snapshots must be a record.");
|
|
918
918
|
else {
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
for (const [n,
|
|
922
|
-
(!ce(n) || !Lt(
|
|
919
|
+
const o = Object.entries(e.snapshots);
|
|
920
|
+
o.length > jt && t.push("Preview artifact has too many frames.");
|
|
921
|
+
for (const [n, r] of o)
|
|
922
|
+
(!ce(n) || !Lt(r)) && t.push(`Preview artifact frame "${n}" is invalid.`);
|
|
923
923
|
}
|
|
924
924
|
try {
|
|
925
|
-
je(JSON.stringify(e)) >
|
|
925
|
+
je(JSON.stringify(e)) > Ut && t.push("Preview artifact exceeds the bundle byte limit.");
|
|
926
926
|
} catch {
|
|
927
927
|
t.push("Preview artifact is not serializable.");
|
|
928
928
|
}
|
|
@@ -932,8 +932,8 @@ function Vt(e) {
|
|
|
932
932
|
errors: t
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
const
|
|
935
|
+
function Qt(e, t) {
|
|
936
|
+
const o = fe(e) && e.version === 3 ? (() => {
|
|
937
937
|
const n = qe(e);
|
|
938
938
|
return {
|
|
939
939
|
valid: n.valid,
|
|
@@ -947,20 +947,20 @@ function Wt(e, t) {
|
|
|
947
947
|
artifact: n.valid ? e : null,
|
|
948
948
|
errors: n.errors
|
|
949
949
|
};
|
|
950
|
-
})() :
|
|
951
|
-
return !
|
|
950
|
+
})() : Wt(e);
|
|
951
|
+
return !o.valid || !o.artifact ? {
|
|
952
952
|
valid: !1,
|
|
953
953
|
artifact: null,
|
|
954
954
|
reason: "invalid-bundle",
|
|
955
|
-
errors:
|
|
956
|
-
} : t &&
|
|
955
|
+
errors: o.errors
|
|
956
|
+
} : t && o.artifact.namespace !== Q(t.namespace) ? {
|
|
957
957
|
valid: !1,
|
|
958
958
|
artifact: null,
|
|
959
959
|
reason: "namespace-mismatch",
|
|
960
960
|
errors: [
|
|
961
961
|
"Preview artifact namespace does not match the runtime namespace."
|
|
962
962
|
]
|
|
963
|
-
} : t &&
|
|
963
|
+
} : t && o.artifact.sourceRevision !== Q(t.sourceRevision) ? {
|
|
964
964
|
valid: !1,
|
|
965
965
|
artifact: null,
|
|
966
966
|
reason: "revision-mismatch",
|
|
@@ -969,30 +969,30 @@ function Wt(e, t) {
|
|
|
969
969
|
]
|
|
970
970
|
} : {
|
|
971
971
|
valid: !0,
|
|
972
|
-
artifact:
|
|
972
|
+
artifact: o.artifact,
|
|
973
973
|
errors: []
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
async function
|
|
976
|
+
async function Xt({
|
|
977
977
|
namespace: e,
|
|
978
978
|
sourceRevision: t,
|
|
979
|
-
transport:
|
|
979
|
+
transport: o,
|
|
980
980
|
signal: n
|
|
981
981
|
}) {
|
|
982
|
-
const
|
|
983
|
-
namespace:
|
|
984
|
-
sourceRevision:
|
|
982
|
+
const r = {
|
|
983
|
+
namespace: Q(e),
|
|
984
|
+
sourceRevision: Q(t)
|
|
985
985
|
};
|
|
986
986
|
let i;
|
|
987
987
|
try {
|
|
988
|
-
i = await
|
|
988
|
+
i = await o({ ...r, signal: n });
|
|
989
989
|
} catch (a) {
|
|
990
990
|
if (n != null && n.aborted) throw a;
|
|
991
991
|
return { status: "unavailable", artifact: null, error: a };
|
|
992
992
|
}
|
|
993
993
|
if (i == null)
|
|
994
994
|
return { status: "unavailable", artifact: null };
|
|
995
|
-
const s =
|
|
995
|
+
const s = Qt(i, r);
|
|
996
996
|
return s.valid ? { status: "accepted", artifact: s.artifact } : {
|
|
997
997
|
status: "rejected",
|
|
998
998
|
artifact: null,
|
|
@@ -1000,20 +1000,20 @@ async function Qt({
|
|
|
1000
1000
|
errors: s.errors
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
|
-
const ue = "var(--pygmalion-catalog-surface, #ffffff)", pe = "var(--pygmalion-catalog-canvas, #f5f5f5)", Se = "var(--pygmalion-catalog-border, #e5e7eb)", he = "var(--pygmalion-catalog-text, #202124)", F = "var(--pygmalion-catalog-muted, #6b7280)",
|
|
1004
|
-
function
|
|
1003
|
+
const ue = "var(--pygmalion-catalog-surface, #ffffff)", pe = "var(--pygmalion-catalog-canvas, #f5f5f5)", Se = "var(--pygmalion-catalog-border, #e5e7eb)", he = "var(--pygmalion-catalog-text, #202124)", F = "var(--pygmalion-catalog-muted, #6b7280)", Yt = "var(--pygmalion-catalog-header, #11182f)", Zt = "var(--pygmalion-catalog-accent, #7c6cf2)";
|
|
1004
|
+
function vn({
|
|
1005
1005
|
title: e,
|
|
1006
1006
|
eyebrow: t,
|
|
1007
|
-
description:
|
|
1007
|
+
description: o,
|
|
1008
1008
|
version: n,
|
|
1009
|
-
meta:
|
|
1009
|
+
meta: r,
|
|
1010
1010
|
children: i,
|
|
1011
|
-
headerBackground: s =
|
|
1011
|
+
headerBackground: s = Yt,
|
|
1012
1012
|
headerColor: a = "#ffffff",
|
|
1013
|
-
bodyBackground:
|
|
1014
|
-
bodyGap:
|
|
1013
|
+
bodyBackground: l = ue,
|
|
1014
|
+
bodyGap: g = 40
|
|
1015
1015
|
}) {
|
|
1016
|
-
return /* @__PURE__ */
|
|
1016
|
+
return /* @__PURE__ */ N(
|
|
1017
1017
|
"section",
|
|
1018
1018
|
{
|
|
1019
1019
|
"data-pygmalion-catalog-document": "",
|
|
@@ -1026,11 +1026,11 @@ function Sn({
|
|
|
1026
1026
|
flexDirection: "column",
|
|
1027
1027
|
overflow: "visible",
|
|
1028
1028
|
color: he,
|
|
1029
|
-
background:
|
|
1029
|
+
background: l,
|
|
1030
1030
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
1031
1031
|
},
|
|
1032
1032
|
children: [
|
|
1033
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ N(
|
|
1034
1034
|
"header",
|
|
1035
1035
|
{
|
|
1036
1036
|
style: {
|
|
@@ -1044,8 +1044,8 @@ function Sn({
|
|
|
1044
1044
|
background: s
|
|
1045
1045
|
},
|
|
1046
1046
|
children: [
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
t ? /* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ N("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
1048
|
+
t ? /* @__PURE__ */ w(
|
|
1049
1049
|
"div",
|
|
1050
1050
|
{
|
|
1051
1051
|
style: {
|
|
@@ -1058,7 +1058,7 @@ function Sn({
|
|
|
1058
1058
|
children: t
|
|
1059
1059
|
}
|
|
1060
1060
|
) : null,
|
|
1061
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ w(
|
|
1062
1062
|
"h1",
|
|
1063
1063
|
{
|
|
1064
1064
|
style: {
|
|
@@ -1072,7 +1072,7 @@ function Sn({
|
|
|
1072
1072
|
children: e
|
|
1073
1073
|
}
|
|
1074
1074
|
),
|
|
1075
|
-
|
|
1075
|
+
o ? /* @__PURE__ */ w(
|
|
1076
1076
|
"div",
|
|
1077
1077
|
{
|
|
1078
1078
|
style: {
|
|
@@ -1081,11 +1081,11 @@ function Sn({
|
|
|
1081
1081
|
fontSize: 13,
|
|
1082
1082
|
lineHeight: 1.55
|
|
1083
1083
|
},
|
|
1084
|
-
children:
|
|
1084
|
+
children: o
|
|
1085
1085
|
}
|
|
1086
1086
|
) : null
|
|
1087
1087
|
] }),
|
|
1088
|
-
n ||
|
|
1088
|
+
n || r ? /* @__PURE__ */ N(
|
|
1089
1089
|
"div",
|
|
1090
1090
|
{
|
|
1091
1091
|
style: {
|
|
@@ -1097,15 +1097,15 @@ function Sn({
|
|
|
1097
1097
|
whiteSpace: "nowrap"
|
|
1098
1098
|
},
|
|
1099
1099
|
children: [
|
|
1100
|
-
n ? /* @__PURE__ */
|
|
1101
|
-
|
|
1100
|
+
n ? /* @__PURE__ */ w("span", { children: n }) : null,
|
|
1101
|
+
r ? /* @__PURE__ */ w("span", { children: r }) : null
|
|
1102
1102
|
]
|
|
1103
1103
|
}
|
|
1104
1104
|
) : null
|
|
1105
1105
|
]
|
|
1106
1106
|
}
|
|
1107
1107
|
),
|
|
1108
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ w(
|
|
1109
1109
|
"div",
|
|
1110
1110
|
{
|
|
1111
1111
|
"data-pygmalion-catalog-document-body": "",
|
|
@@ -1114,9 +1114,9 @@ function Sn({
|
|
|
1114
1114
|
display: "inline-flex",
|
|
1115
1115
|
flexDirection: "column",
|
|
1116
1116
|
alignItems: "flex-start",
|
|
1117
|
-
gap:
|
|
1117
|
+
gap: g,
|
|
1118
1118
|
padding: 48,
|
|
1119
|
-
background:
|
|
1119
|
+
background: l
|
|
1120
1120
|
},
|
|
1121
1121
|
children: i
|
|
1122
1122
|
}
|
|
@@ -1125,14 +1125,14 @@ function Sn({
|
|
|
1125
1125
|
}
|
|
1126
1126
|
);
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function In({
|
|
1129
1129
|
title: e,
|
|
1130
1130
|
count: t,
|
|
1131
|
-
description:
|
|
1131
|
+
description: o,
|
|
1132
1132
|
children: n,
|
|
1133
|
-
tone:
|
|
1133
|
+
tone: r = "tinted"
|
|
1134
1134
|
}) {
|
|
1135
|
-
return /* @__PURE__ */
|
|
1135
|
+
return /* @__PURE__ */ N(
|
|
1136
1136
|
"section",
|
|
1137
1137
|
{
|
|
1138
1138
|
"data-pygmalion-catalog-section": "",
|
|
@@ -1143,12 +1143,12 @@ function vn({
|
|
|
1143
1143
|
flexDirection: "column",
|
|
1144
1144
|
alignItems: "flex-start",
|
|
1145
1145
|
gap: 18,
|
|
1146
|
-
padding:
|
|
1147
|
-
background:
|
|
1146
|
+
padding: r === "tinted" ? 24 : 0,
|
|
1147
|
+
background: r === "tinted" ? pe : "transparent"
|
|
1148
1148
|
},
|
|
1149
1149
|
children: [
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ N("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
|
|
1151
|
+
/* @__PURE__ */ w(
|
|
1152
1152
|
"h2",
|
|
1153
1153
|
{
|
|
1154
1154
|
style: {
|
|
@@ -1160,25 +1160,25 @@ function vn({
|
|
|
1160
1160
|
children: e
|
|
1161
1161
|
}
|
|
1162
1162
|
),
|
|
1163
|
-
typeof t == "number" ? /* @__PURE__ */
|
|
1163
|
+
typeof t == "number" ? /* @__PURE__ */ w("span", { style: { color: F, fontSize: 11 }, children: t }) : null
|
|
1164
1164
|
] }),
|
|
1165
|
-
|
|
1165
|
+
o ? /* @__PURE__ */ w("div", { style: { marginTop: -10, color: F, fontSize: 11 }, children: o }) : null,
|
|
1166
1166
|
n
|
|
1167
1167
|
]
|
|
1168
1168
|
}
|
|
1169
1169
|
);
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function xn({
|
|
1172
1172
|
rows: e,
|
|
1173
1173
|
columns: t,
|
|
1174
|
-
cornerLabel:
|
|
1174
|
+
cornerLabel: o,
|
|
1175
1175
|
renderCell: n,
|
|
1176
|
-
renderRowLabel:
|
|
1177
|
-
renderColumnLabel: i = (
|
|
1176
|
+
renderRowLabel: r = (l) => l,
|
|
1177
|
+
renderColumnLabel: i = (l) => l,
|
|
1178
1178
|
boundary: s = !0,
|
|
1179
1179
|
cellStyle: a
|
|
1180
1180
|
}) {
|
|
1181
|
-
return /* @__PURE__ */
|
|
1181
|
+
return /* @__PURE__ */ w(
|
|
1182
1182
|
"div",
|
|
1183
1183
|
{
|
|
1184
1184
|
"data-pygmalion-catalog-matrix": "",
|
|
@@ -1187,10 +1187,10 @@ function In({
|
|
|
1187
1187
|
display: "inline-block",
|
|
1188
1188
|
width: "max-content",
|
|
1189
1189
|
padding: s ? 16 : 0,
|
|
1190
|
-
border: s ? `1px dashed ${
|
|
1190
|
+
border: s ? `1px dashed ${Zt}` : void 0,
|
|
1191
1191
|
borderRadius: s ? 4 : void 0
|
|
1192
1192
|
},
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1193
|
+
children: /* @__PURE__ */ N(
|
|
1194
1194
|
"table",
|
|
1195
1195
|
{
|
|
1196
1196
|
style: {
|
|
@@ -1199,8 +1199,8 @@ function In({
|
|
|
1199
1199
|
borderSpacing: 0
|
|
1200
1200
|
},
|
|
1201
1201
|
children: [
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
/* @__PURE__ */
|
|
1202
|
+
/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ N("tr", { children: [
|
|
1203
|
+
/* @__PURE__ */ w(
|
|
1204
1204
|
"th",
|
|
1205
1205
|
{
|
|
1206
1206
|
style: {
|
|
@@ -1211,10 +1211,10 @@ function In({
|
|
|
1211
1211
|
textAlign: "left",
|
|
1212
1212
|
whiteSpace: "nowrap"
|
|
1213
1213
|
},
|
|
1214
|
-
children:
|
|
1214
|
+
children: o
|
|
1215
1215
|
}
|
|
1216
1216
|
),
|
|
1217
|
-
t.map((
|
|
1217
|
+
t.map((l) => /* @__PURE__ */ w(
|
|
1218
1218
|
"th",
|
|
1219
1219
|
{
|
|
1220
1220
|
style: {
|
|
@@ -1225,13 +1225,13 @@ function In({
|
|
|
1225
1225
|
textAlign: "center",
|
|
1226
1226
|
whiteSpace: "nowrap"
|
|
1227
1227
|
},
|
|
1228
|
-
children: i(
|
|
1228
|
+
children: i(l)
|
|
1229
1229
|
},
|
|
1230
|
-
|
|
1230
|
+
l
|
|
1231
1231
|
))
|
|
1232
1232
|
] }) }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ w("tbody", { children: e.map((l) => /* @__PURE__ */ N("tr", { children: [
|
|
1234
|
+
/* @__PURE__ */ w(
|
|
1235
1235
|
"th",
|
|
1236
1236
|
{
|
|
1237
1237
|
style: {
|
|
@@ -1242,10 +1242,10 @@ function In({
|
|
|
1242
1242
|
textAlign: "left",
|
|
1243
1243
|
whiteSpace: "nowrap"
|
|
1244
1244
|
},
|
|
1245
|
-
children:
|
|
1245
|
+
children: r(l)
|
|
1246
1246
|
}
|
|
1247
1247
|
),
|
|
1248
|
-
t.map((
|
|
1248
|
+
t.map((g) => /* @__PURE__ */ w(
|
|
1249
1249
|
"td",
|
|
1250
1250
|
{
|
|
1251
1251
|
style: {
|
|
@@ -1254,23 +1254,23 @@ function In({
|
|
|
1254
1254
|
verticalAlign: "middle",
|
|
1255
1255
|
...a
|
|
1256
1256
|
},
|
|
1257
|
-
children: n(
|
|
1257
|
+
children: n(l, g)
|
|
1258
1258
|
},
|
|
1259
|
-
|
|
1259
|
+
g
|
|
1260
1260
|
))
|
|
1261
|
-
] },
|
|
1261
|
+
] }, l)) })
|
|
1262
1262
|
]
|
|
1263
1263
|
}
|
|
1264
1264
|
)
|
|
1265
1265
|
}
|
|
1266
1266
|
);
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function en(e) {
|
|
1269
1269
|
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").toLowerCase() || "page";
|
|
1270
1270
|
}
|
|
1271
|
-
function Be(e, t,
|
|
1272
|
-
const n = (
|
|
1273
|
-
return `${
|
|
1271
|
+
function Be(e, t, o = "PygmalionCatalog") {
|
|
1272
|
+
const n = (r) => en(r).replace(/-/g, "_");
|
|
1273
|
+
return `${o}_${n(e)}_${n(t)}`;
|
|
1274
1274
|
}
|
|
1275
1275
|
function Ue(e, t) {
|
|
1276
1276
|
return {
|
|
@@ -1285,23 +1285,23 @@ function Ue(e, t) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
function He(e) {
|
|
1287
1287
|
const t = /* @__PURE__ */ new Set();
|
|
1288
|
-
for (const
|
|
1289
|
-
if (t.has(
|
|
1290
|
-
throw new Error(`Duplicate design catalog item id: ${
|
|
1291
|
-
t.add(
|
|
1288
|
+
for (const o of e) {
|
|
1289
|
+
if (t.has(o.id))
|
|
1290
|
+
throw new Error(`Duplicate design catalog item id: ${o.id}`);
|
|
1291
|
+
t.add(o.id);
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1295
|
-
return typeof e == "function" ? e(t,
|
|
1294
|
+
function tn(e, t, o) {
|
|
1295
|
+
return typeof e == "function" ? e(t, o) : e;
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function nn({
|
|
1298
1298
|
page: e,
|
|
1299
1299
|
items: t,
|
|
1300
|
-
renderPreview:
|
|
1300
|
+
renderPreview: o,
|
|
1301
1301
|
secondaryLabel: n,
|
|
1302
|
-
minimumColumnWidth:
|
|
1302
|
+
minimumColumnWidth: r
|
|
1303
1303
|
}) {
|
|
1304
|
-
return /* @__PURE__ */
|
|
1304
|
+
return /* @__PURE__ */ N(
|
|
1305
1305
|
"section",
|
|
1306
1306
|
{
|
|
1307
1307
|
"data-pygmalion-catalog-page": e.id,
|
|
@@ -1316,14 +1316,14 @@ function tn({
|
|
|
1316
1316
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
1317
1317
|
},
|
|
1318
1318
|
children: [
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
/* @__PURE__ */
|
|
1321
|
-
/* @__PURE__ */
|
|
1319
|
+
/* @__PURE__ */ N("header", { style: { marginBottom: 24 }, children: [
|
|
1320
|
+
/* @__PURE__ */ w("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
|
|
1321
|
+
/* @__PURE__ */ N("p", { style: { margin: "6px 0 0", color: F, fontSize: 13 }, children: [
|
|
1322
1322
|
t.length,
|
|
1323
1323
|
" assets"
|
|
1324
1324
|
] })
|
|
1325
1325
|
] }),
|
|
1326
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ w(
|
|
1327
1327
|
"div",
|
|
1328
1328
|
{
|
|
1329
1329
|
style: {
|
|
@@ -1331,20 +1331,20 @@ function tn({
|
|
|
1331
1331
|
gridTemplateColumns: "repeat(6, max-content)",
|
|
1332
1332
|
gap: 16
|
|
1333
1333
|
},
|
|
1334
|
-
children: t.map((i) => /* @__PURE__ */
|
|
1334
|
+
children: t.map((i) => /* @__PURE__ */ N(
|
|
1335
1335
|
"article",
|
|
1336
1336
|
{
|
|
1337
1337
|
"data-pygmalion-catalog-item": i.id,
|
|
1338
1338
|
style: {
|
|
1339
|
-
minWidth:
|
|
1340
|
-
width:
|
|
1339
|
+
minWidth: r,
|
|
1340
|
+
width: r,
|
|
1341
1341
|
padding: 16,
|
|
1342
1342
|
border: `1px solid ${Se}`,
|
|
1343
1343
|
borderRadius: 12,
|
|
1344
1344
|
background: ue
|
|
1345
1345
|
},
|
|
1346
1346
|
children: [
|
|
1347
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ w(
|
|
1348
1348
|
"div",
|
|
1349
1349
|
{
|
|
1350
1350
|
style: {
|
|
@@ -1354,10 +1354,10 @@ function tn({
|
|
|
1354
1354
|
justifyContent: "center",
|
|
1355
1355
|
overflow: "hidden"
|
|
1356
1356
|
},
|
|
1357
|
-
children:
|
|
1357
|
+
children: o(i)
|
|
1358
1358
|
}
|
|
1359
1359
|
),
|
|
1360
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ w(
|
|
1361
1361
|
"div",
|
|
1362
1362
|
{
|
|
1363
1363
|
style: {
|
|
@@ -1372,7 +1372,7 @@ function tn({
|
|
|
1372
1372
|
children: i.name
|
|
1373
1373
|
}
|
|
1374
1374
|
),
|
|
1375
|
-
n ? /* @__PURE__ */
|
|
1375
|
+
n ? /* @__PURE__ */ w("div", { style: { marginTop: 4, color: F, fontSize: 11, lineHeight: 1.45 }, children: n(i) }) : i.codeName ? /* @__PURE__ */ w(
|
|
1376
1376
|
"div",
|
|
1377
1377
|
{
|
|
1378
1378
|
style: {
|
|
@@ -1398,20 +1398,20 @@ function tn({
|
|
|
1398
1398
|
}
|
|
1399
1399
|
);
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Pn(e) {
|
|
1402
1402
|
He(e.items);
|
|
1403
1403
|
const t = /* @__PURE__ */ new Map();
|
|
1404
|
-
for (const
|
|
1405
|
-
const i = e.pageFor(
|
|
1404
|
+
for (const r of e.items) {
|
|
1405
|
+
const i = e.pageFor(r), s = t.get(i.id);
|
|
1406
1406
|
if (s) {
|
|
1407
1407
|
if (s.page.name !== i.name || s.page.section !== i.section)
|
|
1408
1408
|
throw new Error(`Conflicting design catalog page descriptor: ${i.id}`);
|
|
1409
|
-
s.items.push(
|
|
1409
|
+
s.items.push(r);
|
|
1410
1410
|
continue;
|
|
1411
1411
|
}
|
|
1412
1412
|
t.set(i.id, {
|
|
1413
1413
|
page: i,
|
|
1414
|
-
items: [
|
|
1414
|
+
items: [r],
|
|
1415
1415
|
registryName: Be(
|
|
1416
1416
|
e.kind,
|
|
1417
1417
|
i.id,
|
|
@@ -1419,65 +1419,65 @@ function xn(e) {
|
|
|
1419
1419
|
)
|
|
1420
1420
|
});
|
|
1421
1421
|
}
|
|
1422
|
-
const
|
|
1423
|
-
for (const
|
|
1424
|
-
const i = () => /* @__PURE__ */
|
|
1425
|
-
|
|
1422
|
+
const o = {}, n = [];
|
|
1423
|
+
for (const r of t.values()) {
|
|
1424
|
+
const i = () => /* @__PURE__ */ w(
|
|
1425
|
+
nn,
|
|
1426
1426
|
{
|
|
1427
|
-
page:
|
|
1428
|
-
items:
|
|
1427
|
+
page: r.page,
|
|
1428
|
+
items: r.items,
|
|
1429
1429
|
renderPreview: e.renderPreview,
|
|
1430
1430
|
secondaryLabel: e.secondaryLabel,
|
|
1431
1431
|
minimumColumnWidth: e.minimumColumnWidth ?? 152
|
|
1432
1432
|
}
|
|
1433
1433
|
);
|
|
1434
|
-
r
|
|
1434
|
+
o[r.registryName] = {
|
|
1435
1435
|
component: i,
|
|
1436
1436
|
children: "none"
|
|
1437
1437
|
};
|
|
1438
|
-
const s =
|
|
1438
|
+
const s = tn(e.frame, r.page, r.items);
|
|
1439
1439
|
n.push({
|
|
1440
|
-
...
|
|
1441
|
-
componentName:
|
|
1440
|
+
...r.page,
|
|
1441
|
+
componentName: r.registryName,
|
|
1442
1442
|
width: (s == null ? void 0 : s.width) ?? 1,
|
|
1443
1443
|
height: (s == null ? void 0 : s.height) ?? 1,
|
|
1444
1444
|
frameSizeMode: s ? "fixed" : "content"
|
|
1445
1445
|
});
|
|
1446
1446
|
}
|
|
1447
1447
|
return {
|
|
1448
|
-
registry:
|
|
1448
|
+
registry: o,
|
|
1449
1449
|
collection: {
|
|
1450
1450
|
expectedCount: e.expectedCount ?? e.items.length,
|
|
1451
|
-
assets: e.items.map((
|
|
1451
|
+
assets: e.items.map((r) => Ue(r, e.pageFor(r).id)),
|
|
1452
1452
|
pages: n
|
|
1453
1453
|
}
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1457
|
-
const
|
|
1456
|
+
function rn(e, t = 60) {
|
|
1457
|
+
const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, a]) => a.length > 0).sort(([a, l], [g, p]) => p.length - l.length || a.localeCompare(g)), n = o[0], r = o[1], i = Math.max(1, (n == null ? void 0 : n[1].length) ?? 1), s = r == null ? void 0 : r[1].slice(0, Math.max(1, Math.floor(t / i)));
|
|
1458
1458
|
return {
|
|
1459
1459
|
row: n,
|
|
1460
|
-
column:
|
|
1461
|
-
fixed:
|
|
1462
|
-
additional:
|
|
1460
|
+
column: r ? [r[0], s ?? []] : void 0,
|
|
1461
|
+
fixed: o.slice(2).map(([a, l]) => [a, l[0]]),
|
|
1462
|
+
additional: o.slice(2)
|
|
1463
1463
|
};
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function on(e, t, o, n) {
|
|
1466
1466
|
return {
|
|
1467
1467
|
...e.defaultProps,
|
|
1468
1468
|
...Object.fromEntries(t.fixed),
|
|
1469
|
-
...t.row &&
|
|
1469
|
+
...t.row && o ? { [t.row[0]]: o } : {},
|
|
1470
1470
|
...t.column && n ? { [t.column[0]]: n } : {}
|
|
1471
1471
|
};
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function sn({
|
|
1474
1474
|
item: e,
|
|
1475
1475
|
entry: t,
|
|
1476
|
-
maxVariantCells:
|
|
1476
|
+
maxVariantCells: o
|
|
1477
1477
|
}) {
|
|
1478
|
-
var a,
|
|
1478
|
+
var a, l;
|
|
1479
1479
|
if (!t)
|
|
1480
|
-
return /* @__PURE__ */
|
|
1480
|
+
return /* @__PURE__ */ N(
|
|
1481
1481
|
"section",
|
|
1482
1482
|
{
|
|
1483
1483
|
"data-pygmalion-catalog-component": e.id,
|
|
@@ -1491,13 +1491,13 @@ function on({
|
|
|
1491
1491
|
background: pe
|
|
1492
1492
|
},
|
|
1493
1493
|
children: [
|
|
1494
|
-
/* @__PURE__ */
|
|
1495
|
-
/* @__PURE__ */
|
|
1494
|
+
/* @__PURE__ */ w("strong", { children: e.name }),
|
|
1495
|
+
/* @__PURE__ */ w("p", { style: { color: F }, children: "The component is not registered." })
|
|
1496
1496
|
]
|
|
1497
1497
|
}
|
|
1498
1498
|
);
|
|
1499
|
-
const n =
|
|
1500
|
-
return /* @__PURE__ */
|
|
1499
|
+
const n = rn(t, o), r = ((a = n.row) == null ? void 0 : a[1]) ?? [void 0], i = ((l = n.column) == null ? void 0 : l[1]) ?? [void 0], s = t.component;
|
|
1500
|
+
return /* @__PURE__ */ N(
|
|
1501
1501
|
"section",
|
|
1502
1502
|
{
|
|
1503
1503
|
"data-pygmalion-catalog-component": e.id,
|
|
@@ -1512,11 +1512,11 @@ function on({
|
|
|
1512
1512
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
1513
1513
|
},
|
|
1514
1514
|
children: [
|
|
1515
|
-
/* @__PURE__ */
|
|
1516
|
-
/* @__PURE__ */
|
|
1517
|
-
e.sourcePath ? /* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ N("header", { style: { marginBottom: 24 }, children: [
|
|
1516
|
+
/* @__PURE__ */ w("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
|
|
1517
|
+
e.sourcePath ? /* @__PURE__ */ w("p", { style: { margin: "6px 0 0", color: F, fontSize: 12 }, children: e.sourcePath }) : null
|
|
1518
1518
|
] }),
|
|
1519
|
-
/* @__PURE__ */
|
|
1519
|
+
/* @__PURE__ */ w(
|
|
1520
1520
|
"div",
|
|
1521
1521
|
{
|
|
1522
1522
|
style: {
|
|
@@ -1524,13 +1524,13 @@ function on({
|
|
|
1524
1524
|
gridTemplateColumns: `repeat(${i.length}, max-content)`,
|
|
1525
1525
|
gap: 12
|
|
1526
1526
|
},
|
|
1527
|
-
children:
|
|
1528
|
-
(
|
|
1529
|
-
const
|
|
1530
|
-
n.row &&
|
|
1527
|
+
children: r.flatMap(
|
|
1528
|
+
(g) => i.map((p) => {
|
|
1529
|
+
const b = on(t, n, g, p), m = [
|
|
1530
|
+
n.row && g ? `${n.row[0]}=${g}` : "",
|
|
1531
1531
|
n.column && p ? `${n.column[0]}=${p}` : ""
|
|
1532
1532
|
].filter(Boolean).join(" · ");
|
|
1533
|
-
return /* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ N(
|
|
1534
1534
|
"article",
|
|
1535
1535
|
{
|
|
1536
1536
|
style: {
|
|
@@ -1541,23 +1541,23 @@ function on({
|
|
|
1541
1541
|
background: ue
|
|
1542
1542
|
},
|
|
1543
1543
|
children: [
|
|
1544
|
-
|
|
1545
|
-
/* @__PURE__ */
|
|
1544
|
+
m ? /* @__PURE__ */ w("div", { style: { marginBottom: 12, color: F, fontSize: 11 }, children: m }) : null,
|
|
1545
|
+
/* @__PURE__ */ w("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: Ee(
|
|
1546
1546
|
s,
|
|
1547
|
-
|
|
1547
|
+
b,
|
|
1548
1548
|
t.children === "text" ? t.defaultChildren ?? e.name : void 0
|
|
1549
1549
|
) })
|
|
1550
1550
|
]
|
|
1551
1551
|
},
|
|
1552
|
-
`${
|
|
1552
|
+
`${g ?? "default"}:${p ?? "default"}`
|
|
1553
1553
|
);
|
|
1554
1554
|
})
|
|
1555
1555
|
)
|
|
1556
1556
|
}
|
|
1557
1557
|
),
|
|
1558
|
-
n.additional.map(([
|
|
1559
|
-
/* @__PURE__ */
|
|
1560
|
-
/* @__PURE__ */
|
|
1558
|
+
n.additional.map(([g, p]) => /* @__PURE__ */ N("section", { style: { marginTop: 20 }, children: [
|
|
1559
|
+
/* @__PURE__ */ w("h2", { style: { margin: "0 0 10px", color: F, fontSize: 12 }, children: g }),
|
|
1560
|
+
/* @__PURE__ */ w("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: p.map((b) => /* @__PURE__ */ N(
|
|
1561
1561
|
"article",
|
|
1562
1562
|
{
|
|
1563
1563
|
style: {
|
|
@@ -1567,38 +1567,38 @@ function on({
|
|
|
1567
1567
|
background: ue
|
|
1568
1568
|
},
|
|
1569
1569
|
children: [
|
|
1570
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ w("div", { style: { marginBottom: 12, color: F, fontSize: 11 }, children: b }),
|
|
1571
1571
|
Ee(
|
|
1572
1572
|
s,
|
|
1573
|
-
{ ...t.defaultProps, [
|
|
1573
|
+
{ ...t.defaultProps, [g]: b },
|
|
1574
1574
|
t.children === "text" ? t.defaultChildren ?? e.name : void 0
|
|
1575
1575
|
)
|
|
1576
1576
|
]
|
|
1577
1577
|
},
|
|
1578
|
-
|
|
1578
|
+
b
|
|
1579
1579
|
)) })
|
|
1580
|
-
] },
|
|
1580
|
+
] }, g))
|
|
1581
1581
|
]
|
|
1582
1582
|
}
|
|
1583
1583
|
);
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function En(e) {
|
|
1586
1586
|
He(e.items);
|
|
1587
|
-
const t = {},
|
|
1587
|
+
const t = {}, o = [], n = [], r = e.maxVariantCells ?? 60;
|
|
1588
1588
|
for (const i of e.items) {
|
|
1589
1589
|
const s = Be(
|
|
1590
1590
|
e.kind,
|
|
1591
1591
|
i.id,
|
|
1592
1592
|
e.registryPrefix
|
|
1593
|
-
), a = e.registry[i.name],
|
|
1594
|
-
|
|
1593
|
+
), a = e.registry[i.name], l = () => /* @__PURE__ */ w(
|
|
1594
|
+
sn,
|
|
1595
1595
|
{
|
|
1596
1596
|
item: i,
|
|
1597
1597
|
entry: a,
|
|
1598
|
-
maxVariantCells:
|
|
1598
|
+
maxVariantCells: r
|
|
1599
1599
|
}
|
|
1600
1600
|
);
|
|
1601
|
-
t[s] = { component:
|
|
1601
|
+
t[s] = { component: l, children: "none" }, o.push({
|
|
1602
1602
|
id: i.id,
|
|
1603
1603
|
name: i.name,
|
|
1604
1604
|
section: i.section,
|
|
@@ -1615,17 +1615,17 @@ function Pn(e) {
|
|
|
1615
1615
|
collection: {
|
|
1616
1616
|
expectedCount: e.expectedCount ?? e.items.length,
|
|
1617
1617
|
assets: n,
|
|
1618
|
-
pages:
|
|
1618
|
+
pages: o
|
|
1619
1619
|
}
|
|
1620
1620
|
};
|
|
1621
1621
|
}
|
|
1622
|
-
const Oe = /^[a-f0-9]{64}$/,
|
|
1622
|
+
const Oe = /^[a-f0-9]{64}$/, an = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, cn = /^p\d+$/;
|
|
1623
1623
|
function ve(e) {
|
|
1624
|
-
return typeof e == "string" &&
|
|
1624
|
+
return typeof e == "string" && an.test(e) ? e : void 0;
|
|
1625
1625
|
}
|
|
1626
1626
|
function $e(e, t) {
|
|
1627
|
-
const
|
|
1628
|
-
return
|
|
1627
|
+
const o = new URL(e, t);
|
|
1628
|
+
return o.search = "", o.hash = "", o.pathname.endsWith("/") || (o.pathname = `${o.pathname}/`), o.href;
|
|
1629
1629
|
}
|
|
1630
1630
|
function ge(e) {
|
|
1631
1631
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
@@ -1641,80 +1641,80 @@ function Me(e) {
|
|
|
1641
1641
|
const t = e;
|
|
1642
1642
|
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) };
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function ln(e) {
|
|
1645
1645
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1646
|
-
const t = e,
|
|
1647
|
-
if (!
|
|
1646
|
+
const t = e, o = Me(t.before), n = Me(t.after);
|
|
1647
|
+
if (!o || !n || !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)
|
|
1648
1648
|
return null;
|
|
1649
|
-
const
|
|
1649
|
+
const r = t.heatmapUrl == null ? null : ve(t.heatmapUrl) ?? null;
|
|
1650
1650
|
return {
|
|
1651
|
-
before:
|
|
1651
|
+
before: o,
|
|
1652
1652
|
after: n,
|
|
1653
|
-
dimensionsMatch:
|
|
1653
|
+
dimensionsMatch: o.width === n.width && o.height === n.height,
|
|
1654
1654
|
changedPixels: Number(t.changedPixels),
|
|
1655
1655
|
totalPixels: Number(t.totalPixels),
|
|
1656
1656
|
diffRatio: Number(t.changedPixels) / Number(t.totalPixels),
|
|
1657
1657
|
threshold: t.threshold,
|
|
1658
|
-
heatmapUrl:
|
|
1658
|
+
heatmapUrl: r
|
|
1659
1659
|
};
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1661
|
+
function dn(e, t) {
|
|
1662
1662
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1663
|
-
const
|
|
1664
|
-
if (typeof
|
|
1665
|
-
const n = ge(
|
|
1666
|
-
if (!
|
|
1667
|
-
const i = ge(
|
|
1663
|
+
const o = e;
|
|
1664
|
+
if (typeof o.id != "string" || !o.id) return null;
|
|
1665
|
+
const n = ge(o), r = ge(o.before) ?? n;
|
|
1666
|
+
if (!r) return null;
|
|
1667
|
+
const i = ge(o.after);
|
|
1668
1668
|
if (t === "changed" && !i) return null;
|
|
1669
|
-
const s = i ?
|
|
1669
|
+
const s = i ? ln(o.pixelDiff) : null;
|
|
1670
1670
|
return {
|
|
1671
|
-
id:
|
|
1672
|
-
before:
|
|
1671
|
+
id: o.id,
|
|
1672
|
+
before: r,
|
|
1673
1673
|
...i ? { after: i } : {},
|
|
1674
1674
|
...i ? {
|
|
1675
|
-
domChanged:
|
|
1676
|
-
screenshotChanged:
|
|
1675
|
+
domChanged: r.domStructureHash !== i.domStructureHash,
|
|
1676
|
+
screenshotChanged: r.screenshotHash !== i.screenshotHash
|
|
1677
1677
|
} : {},
|
|
1678
1678
|
...s ? { pixelDiff: s } : {}
|
|
1679
1679
|
};
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1682
|
-
const
|
|
1681
|
+
function fn(e, t = []) {
|
|
1682
|
+
const o = new Set(t), n = o.size > 0, r = /* @__PURE__ */ new Set(), i = [
|
|
1683
1683
|
...e.styles.map((s) => s.affectedFrames ?? []),
|
|
1684
1684
|
...e.texts.map((s) => s.affectedFrames ?? []),
|
|
1685
1685
|
...e.operations.map((s) => s.affectedFrames ?? [])
|
|
1686
1686
|
];
|
|
1687
1687
|
for (const s of i)
|
|
1688
1688
|
for (const a of s) {
|
|
1689
|
-
if (n &&
|
|
1689
|
+
if (n && cn.test(a.id) && !o.has(a.id))
|
|
1690
1690
|
throw new Error(
|
|
1691
1691
|
`"Impact Screen"${a.name}"This internal editor ID (${a.id}) is used. A canonical screen ID is required.`
|
|
1692
1692
|
);
|
|
1693
|
-
!a.id || n && !
|
|
1693
|
+
!a.id || n && !o.has(a.id) || r.add(a.id);
|
|
1694
1694
|
}
|
|
1695
|
-
return [...
|
|
1695
|
+
return [...r].sort();
|
|
1696
1696
|
}
|
|
1697
|
-
async function Te(e, t,
|
|
1697
|
+
async function Te(e, t, o) {
|
|
1698
1698
|
const n = await e(`${t.replace(/\/$/, "")}/capture`, {
|
|
1699
1699
|
method: "POST",
|
|
1700
1700
|
headers: { "content-type": "application/json" },
|
|
1701
|
-
body: JSON.stringify(
|
|
1702
|
-
}),
|
|
1703
|
-
if (!n.ok ||
|
|
1701
|
+
body: JSON.stringify(o)
|
|
1702
|
+
}), r = await n.json();
|
|
1703
|
+
if (!n.ok || r.ok === !1)
|
|
1704
1704
|
throw new Error(
|
|
1705
|
-
typeof
|
|
1705
|
+
typeof r.error == "string" ? r.error : `Pygmalion visual QA capture failed (${n.status})`
|
|
1706
1706
|
);
|
|
1707
|
-
if (typeof
|
|
1707
|
+
if (typeof r.baselineId != "string" || !r.baselineId)
|
|
1708
1708
|
throw new Error("Pygmalion visual QA response has no baselineId");
|
|
1709
|
-
const i = Array.isArray(
|
|
1709
|
+
const i = Array.isArray(r.frames) ? r.frames.map((p) => dn(p, o.phase)).filter((p) => p != null) : [], s = Array.isArray(r.failures) ? r.failures.map((p) => {
|
|
1710
1710
|
if (!p || typeof p != "object" || Array.isArray(p)) return null;
|
|
1711
|
-
const
|
|
1712
|
-
return typeof
|
|
1713
|
-
}).filter((p) => p != null) : [], a = new Set(
|
|
1711
|
+
const b = p;
|
|
1712
|
+
return typeof b.id == "string" && typeof b.error == "string" ? { id: b.id, error: b.error } : null;
|
|
1713
|
+
}).filter((p) => p != null) : [], a = new Set(o.frameIds), g = new Set(i.map((p) => p.id)).size === i.length && i.every((p) => a.has(p.id)) && s.every((p) => a.has(p.id));
|
|
1714
1714
|
return {
|
|
1715
|
-
phase:
|
|
1716
|
-
baselineId:
|
|
1717
|
-
complete:
|
|
1715
|
+
phase: o.phase,
|
|
1716
|
+
baselineId: r.baselineId,
|
|
1717
|
+
complete: r.complete !== !1 && g && s.length === 0 && i.length === o.frameIds.length,
|
|
1718
1718
|
frames: i,
|
|
1719
1719
|
failures: s
|
|
1720
1720
|
};
|
|
@@ -1723,46 +1723,46 @@ const ye = {
|
|
|
1723
1723
|
mirror: "/__pygmalion-dev-control",
|
|
1724
1724
|
sessions: "/__pygmalion-design-session",
|
|
1725
1725
|
inspect: "/__pygmalion-inspect"
|
|
1726
|
-
},
|
|
1726
|
+
}, un = "pygmalion.designSessionId", pn = "/__pygmalion-qa", ae = /* @__PURE__ */ new Map();
|
|
1727
1727
|
function ke() {
|
|
1728
1728
|
var e;
|
|
1729
1729
|
return typeof window < "u" && ((e = window.crypto) != null && e.randomUUID) ? window.crypto.randomUUID() : `pygmalion-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function hn(e, t) {
|
|
1732
1732
|
if (e) return e;
|
|
1733
|
-
const
|
|
1734
|
-
if (
|
|
1733
|
+
const o = ae.get(t);
|
|
1734
|
+
if (o) return o;
|
|
1735
1735
|
try {
|
|
1736
1736
|
const n = window.localStorage.getItem(t);
|
|
1737
1737
|
if (n)
|
|
1738
1738
|
return ae.set(t, n), n;
|
|
1739
|
-
const
|
|
1740
|
-
return window.localStorage.setItem(t,
|
|
1739
|
+
const r = ke();
|
|
1740
|
+
return window.localStorage.setItem(t, r), ae.set(t, r), r;
|
|
1741
1741
|
} catch {
|
|
1742
1742
|
const n = ke();
|
|
1743
1743
|
return ae.set(t, n), n;
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
|
-
async function
|
|
1746
|
+
async function V(e) {
|
|
1747
1747
|
const t = await e.json();
|
|
1748
1748
|
if (!e.ok) throw new Error(t.error ?? `Pygmalion request failed (${e.status})`);
|
|
1749
1749
|
return t;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
var se, re, oe, c,
|
|
1751
|
+
function Nn(e = {}) {
|
|
1752
|
+
var se, re, oe, c, f;
|
|
1753
1753
|
const {
|
|
1754
1754
|
sessionId: t,
|
|
1755
|
-
sessionStorageKey:
|
|
1755
|
+
sessionStorageKey: o = un,
|
|
1756
1756
|
autoStart: n = !0,
|
|
1757
|
-
fetcher:
|
|
1757
|
+
fetcher: r = fetch,
|
|
1758
1758
|
formatApplyMessage: i
|
|
1759
|
-
} = e, s = ((se = e.endpoints) == null ? void 0 : se.mirror) ?? ye.mirror, a = ((re = e.endpoints) == null ? void 0 : re.sessions) ?? ye.sessions,
|
|
1760
|
-
() => JSON.parse(
|
|
1761
|
-
[
|
|
1759
|
+
} = e, s = ((se = e.endpoints) == null ? void 0 : se.mirror) ?? ye.mirror, a = ((re = e.endpoints) == null ? void 0 : re.sessions) ?? ye.sessions, l = ((oe = e.endpoints) == null ? void 0 : oe.inspect) ?? ye.inspect, g = e.visualQa != null, p = ((c = e.visualQa) == null ? void 0 : c.endpoint) ?? pn, b = JSON.stringify(((f = e.visualQa) == null ? void 0 : f.eligibleFrameIds) ?? []), m = le(
|
|
1760
|
+
() => JSON.parse(b),
|
|
1761
|
+
[b]
|
|
1762
1762
|
), v = le(
|
|
1763
|
-
() =>
|
|
1764
|
-
[t,
|
|
1765
|
-
), [
|
|
1763
|
+
() => hn(t, o),
|
|
1764
|
+
[t, o]
|
|
1765
|
+
), [y, R] = te({
|
|
1766
1766
|
state: "idle",
|
|
1767
1767
|
commit: null,
|
|
1768
1768
|
shortCommit: null,
|
|
@@ -1772,100 +1772,100 @@ function En(e = {}) {
|
|
|
1772
1772
|
warning: null,
|
|
1773
1773
|
error: null,
|
|
1774
1774
|
appOrigin: null
|
|
1775
|
-
}), [h, O] =
|
|
1775
|
+
}), [h, O] = te(null), [A, k] = te(null), [$, D] = te({
|
|
1776
1776
|
refs: [],
|
|
1777
1777
|
defaultRef: null,
|
|
1778
1778
|
worktreeRef: null
|
|
1779
|
-
}), S = Ne(null),
|
|
1780
|
-
async (
|
|
1779
|
+
}), S = Ne(null), x = Ne(null), T = L(
|
|
1780
|
+
async (d = !0, u) => {
|
|
1781
1781
|
if (u != null && S.current && await S.current.catch(() => {
|
|
1782
1782
|
}), S.current) return S.current;
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1783
|
+
const P = (async () => {
|
|
1784
|
+
R((I) => ({ ...I, state: "syncing", error: null }));
|
|
1785
1785
|
try {
|
|
1786
1786
|
const I = u != null;
|
|
1787
|
-
let M = await
|
|
1788
|
-
method:
|
|
1787
|
+
let M = await r(`${s}/${d || I ? "refresh" : "status"}`, {
|
|
1788
|
+
method: d || I ? "POST" : "GET",
|
|
1789
1789
|
...I ? {
|
|
1790
1790
|
headers: { "content-type": "application/json" },
|
|
1791
1791
|
body: JSON.stringify({ ref: u })
|
|
1792
1792
|
} : {}
|
|
1793
|
-
}), C = await
|
|
1794
|
-
const
|
|
1795
|
-
for (; !
|
|
1796
|
-
await new Promise((
|
|
1793
|
+
}), C = await V(M);
|
|
1794
|
+
const J = Date.now();
|
|
1795
|
+
for (; !d && C.state === "syncing" && Date.now() - J < 12e4; )
|
|
1796
|
+
await new Promise((ee) => window.setTimeout(ee, 500)), M = await r(`${s}/status`), C = await V(M);
|
|
1797
1797
|
if (C.state !== "ready" || !C.appOrigin || !C.commit)
|
|
1798
1798
|
throw new Error(C.error ?? "Pygmalion could not prepare the source preview");
|
|
1799
|
-
const
|
|
1800
|
-
await
|
|
1799
|
+
const G = await V(
|
|
1800
|
+
await r(`${a}/open`, {
|
|
1801
1801
|
method: "POST",
|
|
1802
1802
|
headers: { "content-type": "application/json" },
|
|
1803
1803
|
body: JSON.stringify({ sessionId: v, baseDevSha: C.commit })
|
|
1804
1804
|
})
|
|
1805
1805
|
);
|
|
1806
|
-
if (!
|
|
1807
|
-
throw new Error(
|
|
1808
|
-
let H =
|
|
1806
|
+
if (!G.ok || !G.session)
|
|
1807
|
+
throw new Error(G.error ?? "Pygmalion could not open the design session");
|
|
1808
|
+
let H = G.session;
|
|
1809
1809
|
if (H.branchName) {
|
|
1810
|
-
const
|
|
1811
|
-
await
|
|
1810
|
+
const ee = await V(
|
|
1811
|
+
await r(`${a}/check`, {
|
|
1812
1812
|
method: "POST",
|
|
1813
1813
|
headers: { "content-type": "application/json" },
|
|
1814
1814
|
body: JSON.stringify({ sessionId: H.id })
|
|
1815
1815
|
})
|
|
1816
1816
|
);
|
|
1817
|
-
if (!
|
|
1818
|
-
throw new Error(
|
|
1819
|
-
H =
|
|
1817
|
+
if (!ee.ok || !ee.session)
|
|
1818
|
+
throw new Error(ee.error ?? "Pygmalion could not check the design session");
|
|
1819
|
+
H = ee.session;
|
|
1820
1820
|
}
|
|
1821
|
-
|
|
1821
|
+
R(C), O(H), k(H.appOrigin ?? C.appOrigin);
|
|
1822
1822
|
} catch (I) {
|
|
1823
|
-
|
|
1823
|
+
R((M) => ({
|
|
1824
1824
|
...M,
|
|
1825
1825
|
state: "error",
|
|
1826
1826
|
error: I instanceof Error ? I.message : String(I)
|
|
1827
1827
|
}));
|
|
1828
1828
|
}
|
|
1829
1829
|
})();
|
|
1830
|
-
S.current =
|
|
1830
|
+
S.current = P;
|
|
1831
1831
|
try {
|
|
1832
|
-
await
|
|
1832
|
+
await P;
|
|
1833
1833
|
} finally {
|
|
1834
|
-
S.current ===
|
|
1834
|
+
S.current === P && (S.current = null);
|
|
1835
1835
|
}
|
|
1836
1836
|
},
|
|
1837
|
-
[
|
|
1838
|
-
), j =
|
|
1837
|
+
[r, s, a, v]
|
|
1838
|
+
), j = L(async () => {
|
|
1839
1839
|
try {
|
|
1840
|
-
const
|
|
1841
|
-
await
|
|
1840
|
+
const d = await V(
|
|
1841
|
+
await r(`${s}/refs`)
|
|
1842
1842
|
), u = {
|
|
1843
|
-
refs:
|
|
1844
|
-
defaultRef:
|
|
1845
|
-
worktreeRef:
|
|
1843
|
+
refs: d.refs ?? [],
|
|
1844
|
+
defaultRef: d.defaultRef ?? null,
|
|
1845
|
+
worktreeRef: d.worktreeRef ?? null
|
|
1846
1846
|
};
|
|
1847
|
-
return
|
|
1847
|
+
return D(u), u;
|
|
1848
1848
|
} catch {
|
|
1849
|
-
return
|
|
1849
|
+
return $;
|
|
1850
1850
|
}
|
|
1851
|
-
}, [
|
|
1852
|
-
async (
|
|
1851
|
+
}, [r, s, $]), X = L(
|
|
1852
|
+
async (d, u) => {
|
|
1853
1853
|
if (h != null && h.branchName && !(u != null && u.discardEdits))
|
|
1854
1854
|
throw new Error(
|
|
1855
1855
|
"This design session has unapplied edits against the current source. Apply or revert them, or pass discardEdits to switch anyway."
|
|
1856
1856
|
);
|
|
1857
|
-
await
|
|
1857
|
+
await T(!0, d);
|
|
1858
1858
|
},
|
|
1859
|
-
[
|
|
1860
|
-
),
|
|
1861
|
-
async (
|
|
1859
|
+
[T, h == null ? void 0 : h.branchName]
|
|
1860
|
+
), Y = L(
|
|
1861
|
+
async (d) => {
|
|
1862
1862
|
var C;
|
|
1863
1863
|
if (!h) throw new Error("Pygmalion design session is not ready");
|
|
1864
|
-
const u =
|
|
1865
|
-
if (u && (u.sessionId !== h.id || u.baseDevSha !== h.baseDevSha || u.revision !== h.revision || u.fingerprint !== JSON.stringify(
|
|
1864
|
+
const u = x.current;
|
|
1865
|
+
if (u && (u.sessionId !== h.id || u.baseDevSha !== h.baseDevSha || u.revision !== h.revision || u.fingerprint !== JSON.stringify(d)))
|
|
1866
1866
|
throw new Error("The code diff you checked is out of date. Please check the diff for the current changes again.");
|
|
1867
|
-
const
|
|
1868
|
-
await
|
|
1867
|
+
const P = await V(
|
|
1868
|
+
await r(`${a}/apply-visual`, {
|
|
1869
1869
|
method: "POST",
|
|
1870
1870
|
headers: { "content-type": "application/json" },
|
|
1871
1871
|
body: JSON.stringify({
|
|
@@ -1873,82 +1873,82 @@ function En(e = {}) {
|
|
|
1873
1873
|
baseDevSha: h.baseDevSha,
|
|
1874
1874
|
expectedRevision: h.revision,
|
|
1875
1875
|
...u ? { previewRevision: u.revision } : {},
|
|
1876
|
-
changes:
|
|
1876
|
+
changes: d
|
|
1877
1877
|
})
|
|
1878
1878
|
})
|
|
1879
1879
|
);
|
|
1880
|
-
if (!
|
|
1881
|
-
throw new Error(
|
|
1882
|
-
O(
|
|
1883
|
-
const I =
|
|
1880
|
+
if (!P.ok || !P.session)
|
|
1881
|
+
throw new Error(P.error ?? "Pygmalion could not apply the visual changes");
|
|
1882
|
+
O(P.session), P.session.appOrigin && k(P.session.appOrigin);
|
|
1883
|
+
const I = P.applied ?? d.styles.length + d.texts.length + d.operations.length;
|
|
1884
1884
|
let M;
|
|
1885
|
-
if (u != null && u.qaBaselineId && ((C = u.qaFrameIds) != null && C.length) &&
|
|
1885
|
+
if (u != null && u.qaBaselineId && ((C = u.qaFrameIds) != null && C.length) && P.session.appOrigin)
|
|
1886
1886
|
try {
|
|
1887
|
-
M = await Te(
|
|
1887
|
+
M = await Te(r, p, {
|
|
1888
1888
|
phase: "changed",
|
|
1889
1889
|
baselineId: u.qaBaselineId,
|
|
1890
|
-
basePath: $e(
|
|
1890
|
+
basePath: $e(P.session.appOrigin, window.location.origin),
|
|
1891
1891
|
frameIds: u.qaFrameIds
|
|
1892
1892
|
});
|
|
1893
|
-
} catch (
|
|
1894
|
-
const
|
|
1893
|
+
} catch (J) {
|
|
1894
|
+
const G = J instanceof Error ? J.message : String(J);
|
|
1895
1895
|
M = {
|
|
1896
1896
|
phase: "changed",
|
|
1897
1897
|
baselineId: u.qaBaselineId,
|
|
1898
1898
|
complete: !1,
|
|
1899
1899
|
frames: [],
|
|
1900
|
-
failures: u.qaFrameIds.map((H) => ({ id: H, error:
|
|
1900
|
+
failures: u.qaFrameIds.map((H) => ({ id: H, error: G }))
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
|
-
return
|
|
1903
|
+
return x.current = null, {
|
|
1904
1904
|
applied: I,
|
|
1905
|
-
branch:
|
|
1906
|
-
integration:
|
|
1907
|
-
message: i == null ? void 0 : i(
|
|
1905
|
+
branch: P.session.branchName ?? void 0,
|
|
1906
|
+
integration: P.session.integration.state,
|
|
1907
|
+
message: i == null ? void 0 : i(P.session, I),
|
|
1908
1908
|
...M ? { qa: M } : {}
|
|
1909
1909
|
};
|
|
1910
1910
|
},
|
|
1911
|
-
[
|
|
1912
|
-
),
|
|
1913
|
-
async (
|
|
1911
|
+
[r, i, p, h, a]
|
|
1912
|
+
), q = L(
|
|
1913
|
+
async (d) => {
|
|
1914
1914
|
var C;
|
|
1915
1915
|
if (!h) throw new Error("Pygmalion design session is not ready");
|
|
1916
|
-
|
|
1917
|
-
const u = await
|
|
1918
|
-
await
|
|
1916
|
+
x.current = null;
|
|
1917
|
+
const u = await V(
|
|
1918
|
+
await r(`${a}/preview-visual`, {
|
|
1919
1919
|
method: "POST",
|
|
1920
1920
|
headers: { "content-type": "application/json" },
|
|
1921
1921
|
body: JSON.stringify({
|
|
1922
1922
|
sessionId: h.id,
|
|
1923
1923
|
baseDevSha: h.baseDevSha,
|
|
1924
1924
|
expectedRevision: h.revision,
|
|
1925
|
-
changes:
|
|
1925
|
+
changes: d
|
|
1926
1926
|
})
|
|
1927
1927
|
})
|
|
1928
1928
|
);
|
|
1929
1929
|
if (!u.ok || !Number.isSafeInteger(u.revision))
|
|
1930
1930
|
throw new Error(u.error ?? "Pygmalion could not preview the visual changes");
|
|
1931
|
-
const
|
|
1931
|
+
const P = g ? fn(d, m) : [];
|
|
1932
1932
|
let I;
|
|
1933
|
-
const M = h.appOrigin ??
|
|
1934
|
-
if (
|
|
1933
|
+
const M = h.appOrigin ?? y.appOrigin;
|
|
1934
|
+
if (P.length > 0) {
|
|
1935
1935
|
if (!M)
|
|
1936
1936
|
throw new Error("Impact screen QA baseline preview not ready");
|
|
1937
|
-
if (I = await Te(
|
|
1937
|
+
if (I = await Te(r, p, {
|
|
1938
1938
|
phase: "baseline",
|
|
1939
1939
|
basePath: $e(M, window.location.origin),
|
|
1940
|
-
frameIds:
|
|
1940
|
+
frameIds: P
|
|
1941
1941
|
}), !I.complete)
|
|
1942
1942
|
throw new Error(
|
|
1943
|
-
((C = I.failures[0]) == null ? void 0 : C.error) ?? `Failed to capture ${
|
|
1943
|
+
((C = I.failures[0]) == null ? void 0 : C.error) ?? `Failed to capture ${P.length - I.frames.length} affected frames`
|
|
1944
1944
|
);
|
|
1945
1945
|
}
|
|
1946
|
-
return
|
|
1946
|
+
return x.current = {
|
|
1947
1947
|
sessionId: h.id,
|
|
1948
1948
|
baseDevSha: h.baseDevSha,
|
|
1949
1949
|
revision: u.revision,
|
|
1950
|
-
fingerprint: JSON.stringify(
|
|
1951
|
-
...I ? { qaBaselineId: I.baselineId, qaFrameIds:
|
|
1950
|
+
fingerprint: JSON.stringify(d),
|
|
1951
|
+
...I ? { qaBaselineId: I.baselineId, qaFrameIds: P } : {}
|
|
1952
1952
|
}, {
|
|
1953
1953
|
revision: u.revision,
|
|
1954
1954
|
files: Array.isArray(u.files) ? u.files : [],
|
|
@@ -1957,34 +1957,34 @@ function En(e = {}) {
|
|
|
1957
1957
|
};
|
|
1958
1958
|
},
|
|
1959
1959
|
[
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1960
|
+
r,
|
|
1961
|
+
y.appOrigin,
|
|
1962
|
+
m,
|
|
1963
1963
|
p,
|
|
1964
1964
|
h,
|
|
1965
1965
|
a,
|
|
1966
|
-
|
|
1966
|
+
g
|
|
1967
1967
|
]
|
|
1968
|
-
),
|
|
1969
|
-
async (
|
|
1970
|
-
if (
|
|
1971
|
-
const u = await
|
|
1972
|
-
await
|
|
1968
|
+
), Z = L(
|
|
1969
|
+
async (d) => {
|
|
1970
|
+
if (d.length === 0) return { files: [] };
|
|
1971
|
+
const u = await V(
|
|
1972
|
+
await r(`${l}/impact`, {
|
|
1973
1973
|
method: "POST",
|
|
1974
1974
|
headers: { "content-type": "application/json" },
|
|
1975
|
-
body: JSON.stringify({ componentFiles:
|
|
1975
|
+
body: JSON.stringify({ componentFiles: d })
|
|
1976
1976
|
})
|
|
1977
1977
|
);
|
|
1978
1978
|
if (u.error || u.ok === !1)
|
|
1979
1979
|
throw new Error(u.error ?? "Pygmalion could not calculate source impact");
|
|
1980
1980
|
return { files: Array.isArray(u.files) ? u.files : [] };
|
|
1981
1981
|
},
|
|
1982
|
-
[
|
|
1983
|
-
),
|
|
1982
|
+
[r, l]
|
|
1983
|
+
), E = L(async () => {
|
|
1984
1984
|
if (!(h != null && h.canRevert) || !h.headSha)
|
|
1985
1985
|
throw new Error("There are no reversible changes applied");
|
|
1986
|
-
const
|
|
1987
|
-
await
|
|
1986
|
+
const d = await V(
|
|
1987
|
+
await r(`${a}/revert-visual`, {
|
|
1988
1988
|
method: "POST",
|
|
1989
1989
|
headers: { "content-type": "application/json" },
|
|
1990
1990
|
body: JSON.stringify({
|
|
@@ -1995,77 +1995,77 @@ function En(e = {}) {
|
|
|
1995
1995
|
})
|
|
1996
1996
|
})
|
|
1997
1997
|
);
|
|
1998
|
-
if (!
|
|
1999
|
-
throw new Error(
|
|
2000
|
-
return
|
|
1998
|
+
if (!d.ok || d.reverted !== !0 || !d.operation || d.operation.kind !== "visual-revert" || !d.session)
|
|
1999
|
+
throw new Error(d.error ?? "Pygmalion could not revert the last visual change");
|
|
2000
|
+
return x.current = null, O(d.session), d.session.appOrigin && k(d.session.appOrigin), {
|
|
2001
2001
|
reverted: !0,
|
|
2002
|
-
operation:
|
|
2003
|
-
session:
|
|
2002
|
+
operation: d.operation,
|
|
2003
|
+
session: d.session
|
|
2004
2004
|
};
|
|
2005
|
-
}, [
|
|
2006
|
-
|
|
2007
|
-
n &&
|
|
2008
|
-
}, [n,
|
|
2005
|
+
}, [r, h, a]);
|
|
2006
|
+
ne(() => {
|
|
2007
|
+
n && T(!1);
|
|
2008
|
+
}, [n, T]), ne(() => {
|
|
2009
2009
|
n && j();
|
|
2010
2010
|
}, [n]);
|
|
2011
|
-
const
|
|
2011
|
+
const B = (h == null ? void 0 : h.appOrigin) ?? y.appOrigin ?? A, _ = (h == null ? void 0 : h.headSha) ?? (h == null ? void 0 : h.baseDevSha) ?? y.commit ?? "pending";
|
|
2012
2012
|
return {
|
|
2013
|
-
mirror:
|
|
2013
|
+
mirror: y,
|
|
2014
2014
|
session: h,
|
|
2015
2015
|
ready: A != null,
|
|
2016
|
-
appOrigin:
|
|
2017
|
-
previewRevision: `${
|
|
2018
|
-
previewSourceRevision:
|
|
2019
|
-
refresh:
|
|
2020
|
-
switchSource:
|
|
2021
|
-
sourceRefs:
|
|
2016
|
+
appOrigin: B,
|
|
2017
|
+
previewRevision: `${_}:${(h == null ? void 0 : h.revision) ?? 0}`,
|
|
2018
|
+
previewSourceRevision: _,
|
|
2019
|
+
refresh: T,
|
|
2020
|
+
switchSource: X,
|
|
2021
|
+
sourceRefs: $,
|
|
2022
2022
|
loadSourceRefs: j,
|
|
2023
|
-
previewVisual:
|
|
2024
|
-
inspectImpact:
|
|
2025
|
-
applyVisual:
|
|
2026
|
-
revertLastVisual:
|
|
2023
|
+
previewVisual: q,
|
|
2024
|
+
inspectImpact: Z,
|
|
2025
|
+
applyVisual: Y,
|
|
2026
|
+
revertLastVisual: E
|
|
2027
2027
|
};
|
|
2028
2028
|
}
|
|
2029
|
-
function
|
|
2029
|
+
function Rn({
|
|
2030
2030
|
value: e,
|
|
2031
2031
|
refs: t,
|
|
2032
|
-
onChange:
|
|
2032
|
+
onChange: o,
|
|
2033
2033
|
busy: n = !1,
|
|
2034
|
-
defaultRef:
|
|
2034
|
+
defaultRef: r = null,
|
|
2035
2035
|
worktreeRef: i = null,
|
|
2036
2036
|
label: s = "Source revision",
|
|
2037
2037
|
children: a,
|
|
2038
|
-
className:
|
|
2038
|
+
className: l
|
|
2039
2039
|
}) {
|
|
2040
|
-
const
|
|
2040
|
+
const g = le(
|
|
2041
2041
|
() => ({
|
|
2042
|
-
local: t.filter((
|
|
2043
|
-
remote: t.filter((
|
|
2042
|
+
local: t.filter((m) => m.kind === "local"),
|
|
2043
|
+
remote: t.filter((m) => m.kind === "remote")
|
|
2044
2044
|
}),
|
|
2045
2045
|
[t]
|
|
2046
2046
|
), p = le(() => {
|
|
2047
|
-
const
|
|
2048
|
-
return
|
|
2049
|
-
}, [
|
|
2050
|
-
return /* @__PURE__ */
|
|
2047
|
+
const m = new Set(t.map((v) => v.name));
|
|
2048
|
+
return r && m.add(r), i && m.add(i), m;
|
|
2049
|
+
}, [r, t, i]), b = e ?? r ?? "";
|
|
2050
|
+
return /* @__PURE__ */ N(
|
|
2051
2051
|
"span",
|
|
2052
2052
|
{
|
|
2053
|
-
className:
|
|
2053
|
+
className: l,
|
|
2054
2054
|
"data-pygmalion-source-ref": "",
|
|
2055
2055
|
"data-busy": n ? "" : void 0,
|
|
2056
2056
|
style: { position: "relative", display: "inline-flex", alignItems: "center" },
|
|
2057
2057
|
children: [
|
|
2058
|
-
a ?? /* @__PURE__ */
|
|
2059
|
-
/* @__PURE__ */
|
|
2058
|
+
a ?? /* @__PURE__ */ w("span", { "data-pygmalion-source-ref-value": "", children: b || s }),
|
|
2059
|
+
/* @__PURE__ */ N(
|
|
2060
2060
|
"select",
|
|
2061
2061
|
{
|
|
2062
|
-
value:
|
|
2062
|
+
value: b,
|
|
2063
2063
|
disabled: n,
|
|
2064
2064
|
"aria-label": s,
|
|
2065
2065
|
"data-pygmalion-source-ref-select": "",
|
|
2066
|
-
onChange: (
|
|
2067
|
-
const v =
|
|
2068
|
-
v && v !==
|
|
2066
|
+
onChange: (m) => {
|
|
2067
|
+
const v = m.target.value;
|
|
2068
|
+
v && v !== b && o(v);
|
|
2069
2069
|
},
|
|
2070
2070
|
style: {
|
|
2071
2071
|
position: "absolute",
|
|
@@ -2081,21 +2081,21 @@ function Nn({
|
|
|
2081
2081
|
margin: 0
|
|
2082
2082
|
},
|
|
2083
2083
|
children: [
|
|
2084
|
-
|
|
2085
|
-
i ? /* @__PURE__ */
|
|
2084
|
+
b && !p.has(b) ? /* @__PURE__ */ w("option", { value: b, children: b }) : null,
|
|
2085
|
+
i ? /* @__PURE__ */ N("option", { value: i, children: [
|
|
2086
2086
|
i,
|
|
2087
2087
|
" · uncommitted work"
|
|
2088
2088
|
] }) : null,
|
|
2089
|
-
|
|
2090
|
-
|
|
2089
|
+
g.local.length > 0 ? /* @__PURE__ */ w("optgroup", { label: "local", children: g.local.map((m) => /* @__PURE__ */ N("option", { value: m.name, children: [
|
|
2090
|
+
m.name,
|
|
2091
2091
|
" · ",
|
|
2092
|
-
|
|
2093
|
-
] },
|
|
2094
|
-
|
|
2095
|
-
|
|
2092
|
+
m.commit
|
|
2093
|
+
] }, m.fullName)) }) : null,
|
|
2094
|
+
g.remote.length > 0 ? /* @__PURE__ */ w("optgroup", { label: "remote", children: g.remote.map((m) => /* @__PURE__ */ N("option", { value: m.name, children: [
|
|
2095
|
+
m.name,
|
|
2096
2096
|
" · ",
|
|
2097
|
-
|
|
2098
|
-
] },
|
|
2097
|
+
m.commit
|
|
2098
|
+
] }, m.fullName)) }) : null
|
|
2099
2099
|
]
|
|
2100
2100
|
}
|
|
2101
2101
|
)
|
|
@@ -2103,56 +2103,57 @@ function Nn({
|
|
|
2103
2103
|
}
|
|
2104
2104
|
);
|
|
2105
2105
|
}
|
|
2106
|
-
const
|
|
2106
|
+
const Cn = {
|
|
2107
2107
|
editor: K,
|
|
2108
|
-
getObserverTree:
|
|
2109
|
-
isObservableProp:
|
|
2108
|
+
getObserverTree: Je,
|
|
2109
|
+
isObservableProp: Ve
|
|
2110
2110
|
};
|
|
2111
|
-
function
|
|
2111
|
+
function An(e) {
|
|
2112
2112
|
K.navigateToPageByName(e);
|
|
2113
2113
|
}
|
|
2114
|
-
function
|
|
2114
|
+
function On() {
|
|
2115
2115
|
K.openPreview();
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2117
|
+
function $n() {
|
|
2118
2118
|
const e = xe.entries.length > 0;
|
|
2119
2119
|
return e && xe.discardPending(), K.resetCurrentEdits() || e;
|
|
2120
2120
|
}
|
|
2121
|
-
function
|
|
2121
|
+
function Mn({
|
|
2122
2122
|
registry: e,
|
|
2123
2123
|
tokens: t,
|
|
2124
|
-
initialPages:
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2124
|
+
initialPages: o,
|
|
2125
|
+
viewportPresets: n,
|
|
2126
|
+
designImport: r,
|
|
2127
|
+
onTokensChange: i,
|
|
2128
|
+
appOrigin: s,
|
|
2129
|
+
previewRevision: a,
|
|
2130
|
+
previewCacheNamespace: l,
|
|
2131
|
+
previewArtifacts: g,
|
|
2132
|
+
previewArtifactEndpoint: p,
|
|
2133
|
+
previewConcurrency: b,
|
|
2134
|
+
previewOpen: m,
|
|
2135
|
+
onPreviewOpenChange: v,
|
|
2136
|
+
flowCanvas: y,
|
|
2137
|
+
onApply: R,
|
|
2138
|
+
onDesignChange: h,
|
|
2139
|
+
onInspectApply: O,
|
|
2140
|
+
onInspectPreview: A,
|
|
2141
|
+
onInspectImpact: k,
|
|
2141
2142
|
storyboardDiscovery: $ = !0,
|
|
2142
|
-
storyboardDiscoveryEndpoint:
|
|
2143
|
+
storyboardDiscoveryEndpoint: D = ct
|
|
2143
2144
|
}) {
|
|
2144
|
-
const [
|
|
2145
|
-
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
const
|
|
2149
|
-
return
|
|
2150
|
-
namespace:
|
|
2151
|
-
previewRevision:
|
|
2152
|
-
appOrigin:
|
|
2153
|
-
baselineEnvironment:
|
|
2154
|
-
allowStaleIdentity:
|
|
2155
|
-
pages:
|
|
2145
|
+
const [S, x] = te(!$), [T, j] = te();
|
|
2146
|
+
r && (r.assertComplete(), Le(r));
|
|
2147
|
+
const X = e ?? (r == null ? void 0 : r.getRegistry()), Y = t ?? (r == null ? void 0 : r.getTokens()), q = o ?? (r == null ? void 0 : r.getInitialPages());
|
|
2148
|
+
X && We(X), Y && Qe(Y), n && Xe(n), dt(i ?? null), s != null && Ye(s), a != null && Ze(a), et(l);
|
|
2149
|
+
const Z = T ?? g;
|
|
2150
|
+
return Z && q && S && tt(Z, {
|
|
2151
|
+
namespace: l ?? "",
|
|
2152
|
+
previewRevision: ut(),
|
|
2153
|
+
appOrigin: ft(),
|
|
2154
|
+
baselineEnvironment: nt(),
|
|
2155
|
+
allowStaleIdentity: T == null && !!p,
|
|
2156
|
+
pages: q.flatMap(
|
|
2156
2157
|
(E) => E.route && E.importPageId ? [
|
|
2157
2158
|
{
|
|
2158
2159
|
canonicalId: E.importPageId,
|
|
@@ -2166,66 +2167,66 @@ function $n({
|
|
|
2166
2167
|
}
|
|
2167
2168
|
] : []
|
|
2168
2169
|
)
|
|
2169
|
-
}),
|
|
2170
|
-
Pe(
|
|
2171
|
-
const E =
|
|
2170
|
+
}), b != null && rt(b), pt(v ?? null), y != null && ot(y), ht(R ?? null), mt(O ?? null), it(A ?? null), gt(k ?? null), q && K.initPagesFromComponents(q), ne(() => {
|
|
2171
|
+
Pe(h ?? null);
|
|
2172
|
+
const E = st(K);
|
|
2172
2173
|
return () => {
|
|
2173
2174
|
E(), Pe(null);
|
|
2174
2175
|
};
|
|
2175
|
-
}, [
|
|
2176
|
-
if (
|
|
2176
|
+
}, [h]), ne(() => {
|
|
2177
|
+
if (j(void 0), !S || !p || !(l != null && l.trim()) || !(a != null && a.trim()))
|
|
2177
2178
|
return;
|
|
2178
2179
|
const E = new AbortController();
|
|
2179
|
-
return
|
|
2180
|
-
namespace:
|
|
2181
|
-
sourceRevision:
|
|
2182
|
-
transport:
|
|
2183
|
-
endpoint:
|
|
2184
|
-
captureBaseUrl:
|
|
2180
|
+
return Xt({
|
|
2181
|
+
namespace: l,
|
|
2182
|
+
sourceRevision: at(a),
|
|
2183
|
+
transport: Vt({
|
|
2184
|
+
endpoint: p,
|
|
2185
|
+
captureBaseUrl: s
|
|
2185
2186
|
}),
|
|
2186
2187
|
signal: E.signal
|
|
2187
2188
|
}).then((B) => {
|
|
2188
|
-
!E.signal.aborted && B.status === "accepted" &&
|
|
2189
|
+
!E.signal.aborted && B.status === "accepted" && j(B.artifact);
|
|
2189
2190
|
}), () => E.abort();
|
|
2190
2191
|
}, [
|
|
2191
|
-
|
|
2192
|
+
p,
|
|
2193
|
+
l,
|
|
2192
2194
|
a,
|
|
2193
2195
|
s,
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
]), te(() => {
|
|
2196
|
+
S
|
|
2197
|
+
]), ne(() => {
|
|
2197
2198
|
let E = !0;
|
|
2198
2199
|
if (!$)
|
|
2199
|
-
return ie(void 0),
|
|
2200
|
+
return ie(void 0), x(!0), () => {
|
|
2200
2201
|
E = !1;
|
|
2201
2202
|
};
|
|
2202
2203
|
const B = new AbortController();
|
|
2203
|
-
return
|
|
2204
|
-
endpoint:
|
|
2204
|
+
return x(!1), ie(void 0), W(null), Fe({
|
|
2205
|
+
endpoint: D,
|
|
2205
2206
|
signal: B.signal,
|
|
2206
2207
|
pages: K.pages.map((_) => ({
|
|
2207
2208
|
..._,
|
|
2208
2209
|
id: _.importPageId ?? _.id,
|
|
2209
2210
|
importKind: _.importKind
|
|
2210
2211
|
})),
|
|
2211
|
-
assets: (
|
|
2212
|
+
assets: (r == null ? void 0 : r.getAssets("screens")) ?? []
|
|
2212
2213
|
}).then((_) => {
|
|
2213
|
-
E && (ie(_.baselineEnvironment),
|
|
2214
|
+
E && (ie(_.baselineEnvironment), W(_.graph));
|
|
2214
2215
|
}).catch(() => {
|
|
2215
|
-
E && (ie(void 0),
|
|
2216
|
+
E && (ie(void 0), W(null));
|
|
2216
2217
|
}).finally(() => {
|
|
2217
|
-
E &&
|
|
2218
|
+
E && x(!0);
|
|
2218
2219
|
}), () => {
|
|
2219
|
-
E = !1, B.abort(), ie(void 0),
|
|
2220
|
+
E = !1, B.abort(), ie(void 0), W(null);
|
|
2220
2221
|
};
|
|
2221
2222
|
}, [
|
|
2222
|
-
n,
|
|
2223
2223
|
r,
|
|
2224
|
+
o,
|
|
2224
2225
|
$,
|
|
2225
|
-
|
|
2226
|
-
]),
|
|
2227
|
-
|
|
2228
|
-
}, [
|
|
2226
|
+
D
|
|
2227
|
+
]), ne(() => {
|
|
2228
|
+
m == null || m === K.previewOpen || (m ? K.openPreview({ notifyHost: !1 }) : K.closePreview({ notifyHost: !1 }));
|
|
2229
|
+
}, [m]), S ? /* @__PURE__ */ w(lt, {}) : /* @__PURE__ */ w(
|
|
2229
2230
|
"div",
|
|
2230
2231
|
{
|
|
2231
2232
|
"data-pygmalion-storyboard-loading": "",
|
|
@@ -2244,60 +2245,62 @@ function $n({
|
|
|
2244
2245
|
);
|
|
2245
2246
|
}
|
|
2246
2247
|
export {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2248
|
+
Dn as DESIGN_IMPORT_KINDS,
|
|
2249
|
+
vn as PygmalionCatalogDocument,
|
|
2250
|
+
xn as PygmalionCatalogMatrix,
|
|
2251
|
+
In as PygmalionCatalogSection,
|
|
2252
|
+
Mn as PygmalionEditor,
|
|
2253
|
+
ct as STORYBOARD_ENVIRONMENT_CONTROL,
|
|
2254
|
+
zn as STORYBOARD_ENVIRONMENT_QUERY,
|
|
2255
|
+
Rn as SourceRefControl,
|
|
2256
|
+
Cn as __debug,
|
|
2257
|
+
_n as applyTokenOverride,
|
|
2258
|
+
Xt as bootstrapPreviewArtifact,
|
|
2259
|
+
Fn as clearPygmalionPreviewCache,
|
|
2260
|
+
En as createDesignComponentCatalog,
|
|
2261
|
+
rn as createDesignComponentVariantMatrix,
|
|
2262
|
+
Pn as createDesignGalleryCatalog,
|
|
2263
|
+
jn as createDesignImportController,
|
|
2264
|
+
Bn as createDesignScreenCollection,
|
|
2265
|
+
Vt as createPreviewArtifactHttpTransport,
|
|
2266
|
+
bn as createPreviewCacheNamespace,
|
|
2267
|
+
Gt as createPreviewRecipeFingerprint,
|
|
2268
|
+
Sn as createStoryboardCaptureRecipeIdentity,
|
|
2269
|
+
St as createStoryboardGraph,
|
|
2270
|
+
Dt as createStoryboardGraphFromDiscovery,
|
|
2271
|
+
Un as createStoryboardGraphViewModel,
|
|
2272
|
+
Hn as createStoryboardRouteUrl,
|
|
2273
|
+
en as designCatalogKey,
|
|
2273
2274
|
Be as designCatalogRegistryName,
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2275
|
+
Kn as expandDesignScreenCasesViewports,
|
|
2276
|
+
qn as expandDesignScreenCollectionViewports,
|
|
2277
|
+
Gn as getRecommendedPygmalionPreviewConcurrency,
|
|
2278
|
+
nt as getStoryboardBaselineEnvironment,
|
|
2278
2279
|
_e as getStoryboardDiscoveryBaselineEnvironment,
|
|
2279
|
-
|
|
2280
|
+
Vn as getStoryboardGraph,
|
|
2281
|
+
Jn as getViewportPresets,
|
|
2280
2282
|
Fe as loadStoryboardDiscovery,
|
|
2281
|
-
|
|
2283
|
+
Ln as mergeScreenPresets,
|
|
2282
2284
|
Ke as mergeStoryboardEnvironment,
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2285
|
+
wn as publishStoryboardDiscovery,
|
|
2286
|
+
An as pygmalionNavigate,
|
|
2287
|
+
On as pygmalionOpenPreview,
|
|
2288
|
+
$n as pygmalionResetCurrentEdits,
|
|
2289
|
+
Wn as reconstructRoutePreviewArtifactScreenshotV3,
|
|
2290
|
+
Qn as reconstructRoutePreviewArtifactSnapshotV3,
|
|
2291
|
+
Xn as resetTokenOverrides,
|
|
2292
|
+
Nt as resolveStoryboardScreenCases,
|
|
2291
2293
|
We as setComponentRegistry,
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2294
|
+
Ye as setPygmalionAppOrigin,
|
|
2295
|
+
rt as setPygmalionPreviewConcurrency,
|
|
2296
|
+
Ze as setPygmalionPreviewRevision,
|
|
2295
2297
|
ie as setStoryboardBaselineEnvironment,
|
|
2296
|
-
|
|
2298
|
+
W as setStoryboardGraph,
|
|
2297
2299
|
Qe as setTokens,
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2300
|
+
Xe as setViewportPresets,
|
|
2301
|
+
yt as storyboardScreenRecipeKey,
|
|
2302
|
+
Yn as subscribeStoryboardGraph,
|
|
2303
|
+
Nn as usePygmalionProject,
|
|
2304
|
+
Qt as validatePreviewArtifactBundle,
|
|
2302
2305
|
qe as validateRoutePreviewArtifactV3Browser
|
|
2303
2306
|
};
|