@pygmalionjs/pygmalion 0.6.18 → 0.6.19

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.
@@ -374,7 +374,7 @@ function An(t, e) {
374
374
  }
375
375
  var E = /* @__PURE__ */ Symbol("mobx administration"), Fe = /* @__PURE__ */ (function() {
376
376
  function t(n) {
377
- n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Atom@" + ae() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = N.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n;
377
+ n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Atom@" + ae() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = M.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n;
378
378
  }
379
379
  var e = t.prototype;
380
380
  return e.onBO = function() {
@@ -1007,7 +1007,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1007
1007
  }, e;
1008
1008
  })(Fe), U = /* @__PURE__ */ (function() {
1009
1009
  function t(n) {
1010
- this.dependenciesState_ = N.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = N.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new cn(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = se.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || w(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + ae() : "ComputedValue"), n.set && (this.setter_ = qe(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? We.structural : We.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive;
1010
+ this.dependenciesState_ = M.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = M.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new cn(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = se.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || w(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + ae() : "ComputedValue"), n.set && (this.setter_ = qe(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? We.structural : We.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive;
1011
1011
  }
1012
1012
  var e = t.prototype;
1013
1013
  return e.onBecomeStale_ = function() {
@@ -1045,7 +1045,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1045
1045
  }, e.trackAndCompute = function() {
1046
1046
  var r = this.value_, i = (
1047
1047
  /* see #1208 */
1048
- this.dependenciesState_ === N.NOT_TRACKING_
1048
+ this.dependenciesState_ === M.NOT_TRACKING_
1049
1049
  ), o = this.computeValue_(!0), s = i || Jt(r) || Jt(o) || !this.equals_(r, o);
1050
1050
  return s && (this.value_ = o, process.env.NODE_ENV !== "production" && j() && Ye({
1051
1051
  observableKind: "computed",
@@ -1143,10 +1143,10 @@ U.isRunningSetterMask_ = 2;
1143
1143
  U.isBeingObservedMask_ = 4;
1144
1144
  U.isPendingUnobservationMask_ = 8;
1145
1145
  U.diffValueMask_ = 16;
1146
- var Cn = /* @__PURE__ */ et("ComputedValue", U), N;
1146
+ var Cn = /* @__PURE__ */ et("ComputedValue", U), M;
1147
1147
  (function(t) {
1148
1148
  t[t.NOT_TRACKING_ = -1] = "NOT_TRACKING_", t[t.UP_TO_DATE_ = 0] = "UP_TO_DATE_", t[t.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", t[t.STALE_ = 2] = "STALE_";
1149
- })(N || (N = {}));
1149
+ })(M || (M = {}));
1150
1150
  var se;
1151
1151
  (function(t) {
1152
1152
  t[t.NONE = 0] = "NONE", t[t.LOG = 1] = "LOG", t[t.BREAK = 2] = "BREAK";
@@ -1159,12 +1159,12 @@ function Jt(t) {
1159
1159
  }
1160
1160
  function hr(t) {
1161
1161
  switch (t.dependenciesState_) {
1162
- case N.UP_TO_DATE_:
1162
+ case M.UP_TO_DATE_:
1163
1163
  return !1;
1164
- case N.NOT_TRACKING_:
1165
- case N.STALE_:
1164
+ case M.NOT_TRACKING_:
1165
+ case M.STALE_:
1166
1166
  return !0;
1167
- case N.POSSIBLY_STALE_: {
1167
+ case M.POSSIBLY_STALE_: {
1168
1168
  for (var e = Vr(!0), n = tt(), r = t.observing_, i = r.length, o = 0; o < i; o++) {
1169
1169
  var s = r[o];
1170
1170
  if (Cn(s)) {
@@ -1176,7 +1176,7 @@ function hr(t) {
1176
1176
  } catch {
1177
1177
  return Me(n), Ot(e), !0;
1178
1178
  }
1179
- if (t.dependenciesState_ === N.STALE_)
1179
+ if (t.dependenciesState_ === M.STALE_)
1180
1180
  return Me(n), Ot(e), !0;
1181
1181
  }
1182
1182
  }
@@ -1217,7 +1217,7 @@ function Kc(t) {
1217
1217
  process.env.NODE_ENV !== "production" && t.observing_.length === 0 && (typeof t.requiresObservable_ == "boolean" ? t.requiresObservable_ : b.reactionRequiresObservable) && console.warn("[mobx] Derivation '" + t.name_ + "' is created/updated without reading any observable value.");
1218
1218
  }
1219
1219
  function Uc(t) {
1220
- for (var e = t.observing_, n = t.observing_ = t.newObserving_, r = N.UP_TO_DATE_, i = 0, o = t.unboundDepsCount_, s = 0; s < o; s++) {
1220
+ for (var e = t.observing_, n = t.observing_ = t.newObserving_, r = M.UP_TO_DATE_, i = 0, o = t.unboundDepsCount_, s = 0; s < o; s++) {
1221
1221
  var a = n[s];
1222
1222
  a.diffValue === 0 && (a.diffValue = 1, i !== s && (n[i] = a), i++), a.dependenciesState_ > r && (r = a.dependenciesState_);
1223
1223
  }
@@ -1229,14 +1229,14 @@ function Uc(t) {
1229
1229
  var u = n[i];
1230
1230
  u.diffValue === 1 && (u.diffValue = 0, Yc(u, t));
1231
1231
  }
1232
- r !== N.UP_TO_DATE_ && (t.dependenciesState_ = r, t.onBecomeStale_());
1232
+ r !== M.UP_TO_DATE_ && (t.dependenciesState_ = r, t.onBecomeStale_());
1233
1233
  }
1234
1234
  function pr(t) {
1235
1235
  var e = t.observing_;
1236
1236
  t.observing_ = [];
1237
1237
  for (var n = e.length; n--; )
1238
1238
  jo(e[n], t);
1239
- t.dependenciesState_ = N.NOT_TRACKING_;
1239
+ t.dependenciesState_ = M.NOT_TRACKING_;
1240
1240
  }
1241
1241
  function Lo(t) {
1242
1242
  var e = tt();
@@ -1261,10 +1261,10 @@ function Ot(t) {
1261
1261
  b.allowStateReads = t;
1262
1262
  }
1263
1263
  function Fo(t) {
1264
- if (t.dependenciesState_ !== N.UP_TO_DATE_) {
1265
- t.dependenciesState_ = N.UP_TO_DATE_;
1264
+ if (t.dependenciesState_ !== M.UP_TO_DATE_) {
1265
+ t.dependenciesState_ = M.UP_TO_DATE_;
1266
1266
  for (var e = t.observing_, n = e.length; n--; )
1267
- e[n].lowestObserverState_ = N.UP_TO_DATE_;
1267
+ e[n].lowestObserverState_ = M.UP_TO_DATE_;
1268
1268
  }
1269
1269
  }
1270
1270
  var Xt = function() {
@@ -1315,18 +1315,18 @@ function Vo(t) {
1315
1315
  return e !== null ? (e.runId_ !== t.lastAccessedBy_ && (t.lastAccessedBy_ = e.runId_, e.newObserving_[e.unboundDepsCount_++] = t, !t.isBeingObserved && b.trackingContext && (t.isBeingObserved = !0, t.onBO())), t.isBeingObserved) : (t.observers_.size === 0 && b.inBatch > 0 && zo(t), !1);
1316
1316
  }
1317
1317
  function Bo(t) {
1318
- t.lowestObserverState_ !== N.STALE_ && (t.lowestObserverState_ = N.STALE_, t.observers_.forEach(function(e) {
1319
- e.dependenciesState_ === N.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t), e.onBecomeStale_()), e.dependenciesState_ = N.STALE_;
1318
+ t.lowestObserverState_ !== M.STALE_ && (t.lowestObserverState_ = M.STALE_, t.observers_.forEach(function(e) {
1319
+ e.dependenciesState_ === M.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t), e.onBecomeStale_()), e.dependenciesState_ = M.STALE_;
1320
1320
  }));
1321
1321
  }
1322
1322
  function Jc(t) {
1323
- t.lowestObserverState_ !== N.STALE_ && (t.lowestObserverState_ = N.STALE_, t.observers_.forEach(function(e) {
1324
- e.dependenciesState_ === N.POSSIBLY_STALE_ ? (e.dependenciesState_ = N.STALE_, process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t)) : e.dependenciesState_ === N.UP_TO_DATE_ && (t.lowestObserverState_ = N.UP_TO_DATE_);
1323
+ t.lowestObserverState_ !== M.STALE_ && (t.lowestObserverState_ = M.STALE_, t.observers_.forEach(function(e) {
1324
+ e.dependenciesState_ === M.POSSIBLY_STALE_ ? (e.dependenciesState_ = M.STALE_, process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t)) : e.dependenciesState_ === M.UP_TO_DATE_ && (t.lowestObserverState_ = M.UP_TO_DATE_);
1325
1325
  }));
1326
1326
  }
1327
1327
  function Xc(t) {
1328
- t.lowestObserverState_ === N.UP_TO_DATE_ && (t.lowestObserverState_ = N.POSSIBLY_STALE_, t.observers_.forEach(function(e) {
1329
- e.dependenciesState_ === N.UP_TO_DATE_ && (e.dependenciesState_ = N.POSSIBLY_STALE_, e.onBecomeStale_());
1328
+ t.lowestObserverState_ === M.UP_TO_DATE_ && (t.lowestObserverState_ = M.POSSIBLY_STALE_, t.observers_.forEach(function(e) {
1329
+ e.dependenciesState_ === M.UP_TO_DATE_ && (e.dependenciesState_ = M.POSSIBLY_STALE_, e.onBecomeStale_());
1330
1330
  }));
1331
1331
  }
1332
1332
  function Ho(t, e) {
@@ -1361,7 +1361,7 @@ function Ko(t, e, n) {
1361
1361
  }
1362
1362
  var Oe = /* @__PURE__ */ (function() {
1363
1363
  function t(n, r, i, o) {
1364
- n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Reaction@" + ae() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = N.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = se.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = i, this.requiresObservable_ = o;
1364
+ n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Reaction@" + ae() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = M.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = se.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = i, this.requiresObservable_ = o;
1365
1365
  }
1366
1366
  var e = t.prototype;
1367
1367
  return e.onBecomeStale_ = function() {
@@ -1715,23 +1715,23 @@ var bu = 0, yu = /* @__PURE__ */ (function(t) {
1715
1715
  d = p;
1716
1716
  function S(O) {
1717
1717
  f = void 0;
1718
- var P;
1718
+ var A;
1719
1719
  try {
1720
- P = He(i + " - runid: " + u + " - yield " + m++, l.next).call(l, O);
1721
- } catch (A) {
1722
- return p(A);
1720
+ A = He(i + " - runid: " + u + " - yield " + m++, l.next).call(l, O);
1721
+ } catch (x) {
1722
+ return p(x);
1723
1723
  }
1724
- _(P);
1724
+ _(A);
1725
1725
  }
1726
1726
  function y(O) {
1727
1727
  f = void 0;
1728
- var P;
1728
+ var A;
1729
1729
  try {
1730
- P = He(i + " - runid: " + u + " - yield " + m++, l.throw).call(l, O);
1731
- } catch (A) {
1732
- return p(A);
1730
+ A = He(i + " - runid: " + u + " - yield " + m++, l.throw).call(l, O);
1731
+ } catch (x) {
1732
+ return p(x);
1733
1733
  }
1734
- _(P);
1734
+ _(A);
1735
1735
  }
1736
1736
  function _(O) {
1737
1737
  if ($(O == null ? void 0 : O.then)) {
@@ -2365,12 +2365,12 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2365
2365
  if (i.data_.size !== s.size)
2366
2366
  i.keysAtom_.reportChanged();
2367
2367
  else
2368
- for (var O = i.data_.keys(), P = s.keys(), A = O.next(), I = P.next(); !A.done; ) {
2369
- if (A.value !== I.value) {
2368
+ for (var O = i.data_.keys(), A = s.keys(), x = O.next(), P = A.next(); !x.done; ) {
2369
+ if (x.value !== P.value) {
2370
2370
  i.keysAtom_.reportChanged();
2371
2371
  break;
2372
2372
  }
2373
- A = O.next(), I = P.next();
2373
+ x = O.next(), P = A.next();
2374
2374
  }
2375
2375
  i.data_ = s;
2376
2376
  }), this;
@@ -4851,29 +4851,29 @@ function Jl(t, e = {}) {
4851
4851
  { length: f },
4852
4852
  () => ({ width: 0, height: 0, frames: [] })
4853
4853
  );
4854
- s.forEach((A, I) => {
4854
+ s.forEach((x, P) => {
4855
4855
  let D = 0;
4856
4856
  for (let V = 1; V < h.length; V += 1)
4857
4857
  h[V].height < h[D].height && (D = V);
4858
4858
  const k = h[D], z = k.frames.length === 0 ? 0 : k.height + n;
4859
- k.frames.push({ index: I, y: z }), k.width = Math.max(k.width, A.width), k.height = z + A.height;
4859
+ k.frames.push({ index: P, y: z }), k.width = Math.max(k.width, x.width), k.height = z + x.height;
4860
4860
  });
4861
- const g = h.reduce((A, I) => A + I.width, 0) + n * Math.max(0, h.length - 1);
4861
+ const g = h.reduce((x, P) => x + P.width, 0) + n * Math.max(0, h.length - 1);
4862
4862
  if (g > o && f > 1) continue;
4863
- const p = Math.max(...h.map((A) => A.height)), m = Array.from({ length: s.length });
4863
+ const p = Math.max(...h.map((x) => x.height)), m = Array.from({ length: s.length });
4864
4864
  let S = 0;
4865
- for (const A of h) {
4866
- for (const I of A.frames)
4867
- m[I.index] = {
4868
- ...s[I.index],
4865
+ for (const x of h) {
4866
+ for (const P of x.frames)
4867
+ m[P.index] = {
4868
+ ...s[P.index],
4869
4869
  x: S,
4870
- y: I.y
4870
+ y: P.y
4871
4871
  };
4872
- S += A.width + n;
4872
+ S += x.width + n;
4873
4873
  }
4874
4874
  const y = Math.max(1, g * p), _ = g / Math.max(1, p), O = Math.abs(
4875
4875
  Math.log(_ / r)
4876
- ), P = Math.max(0, 1 - a / y);
4876
+ ), A = Math.max(0, 1 - a / y);
4877
4877
  c.push({
4878
4878
  frames: m,
4879
4879
  width: g,
@@ -4882,7 +4882,7 @@ function Jl(t, e = {}) {
4882
4882
  columnCount: f,
4883
4883
  // Empty-space cost stops a wide row of one-sheet columns from winning
4884
4884
  // solely because it happens to match the target aspect ratio.
4885
- score: O + P * 1.2
4885
+ score: O + A * 1.2
4886
4886
  });
4887
4887
  }
4888
4888
  const u = c.reduce(
@@ -6137,13 +6137,13 @@ function qs(t, e, n, r, i, o, s) {
6137
6137
  domStyle: Gn(l),
6138
6138
  ...S
6139
6139
  });
6140
- const O = l.display === "flex" || l.display === "inline-flex", P = O && l.flexDirection.startsWith("row") ? "columns" : "rows", A = Ae(P === "columns" ? l.columnGap : l.rowGap), I = Math.round(
6140
+ const O = l.display === "flex" || l.display === "inline-flex", A = O && l.flexDirection.startsWith("row") ? "columns" : "rows", x = Ae(A === "columns" ? l.columnGap : l.rowGap), P = Math.round(
6141
6141
  (Ae(l.paddingTop) + Ae(l.paddingRight) + Ae(l.paddingBottom) + Ae(l.paddingLeft)) / 4
6142
- ), D = Ae(l.borderTopWidth), k = Gt(P, {
6142
+ ), D = Ae(l.borderTopWidth), k = Gt(A, {
6143
6143
  name: _,
6144
6144
  ...Qi(f, e, l.display, h),
6145
- gap: Number.isFinite(A) ? A : 0,
6146
- padding: I,
6145
+ gap: Number.isFinite(x) ? x : 0,
6146
+ padding: P,
6147
6147
  justify: O ? jd[l.justifyContent] ?? "start" : "start",
6148
6148
  alignItems: O ? zd[l.alignItems] ?? "start" : "start",
6149
6149
  fill: Kn(l.backgroundColor),
@@ -6182,17 +6182,17 @@ function qs(t, e, n, r, i, o, s) {
6182
6182
  break;
6183
6183
  }
6184
6184
  if (Ce.nodeType === Node.TEXT_NODE) {
6185
- const x = (Ce.textContent ?? "").replace(/\s+/g, " ").trim();
6186
- if (!x) continue;
6185
+ const N = (Ce.textContent ?? "").replace(/\s+/g, " ").trim();
6186
+ if (!N) continue;
6187
6187
  if (r.count += 1, r.maxDepth = Math.max(r.maxDepth, n + 1), typeof ((vt = t.ownerDocument) == null ? void 0 : vt.createRange) == "function")
6188
6188
  try {
6189
6189
  const ze = t.ownerDocument.createRange();
6190
6190
  ze.selectNodeContents(Ce);
6191
- const M = ze.getBoundingClientRect();
6192
- (M.width >= 1 || M.height >= 1) && Zi(
6191
+ const I = ze.getBoundingClientRect();
6192
+ (I.width >= 1 || I.height >= 1) && Zi(
6193
6193
  r,
6194
6194
  [...s, k.children.length],
6195
- M,
6195
+ I,
6196
6196
  h
6197
6197
  );
6198
6198
  } catch {
@@ -6200,7 +6200,7 @@ function qs(t, e, n, r, i, o, s) {
6200
6200
  k.children.push(
6201
6201
  Gt("text", {
6202
6202
  name: "text",
6203
- text: x,
6203
+ text: N,
6204
6204
  fontSize: Ae(l.fontSize) || 14,
6205
6205
  fontWeight: Number(l.fontWeight) || 400,
6206
6206
  color: Kn(l.color) || "#191f28",
@@ -6209,11 +6209,11 @@ function qs(t, e, n, r, i, o, s) {
6209
6209
  })
6210
6210
  );
6211
6211
  } else if (Ce.nodeType === Node.ELEMENT_NODE) {
6212
- const x = qs(Ce, f, n + 1, r, i, o, [
6212
+ const N = qs(Ce, f, n + 1, r, i, o, [
6213
6213
  ...s,
6214
6214
  k.children.length
6215
6215
  ]);
6216
- x && k.children.push(x);
6216
+ N && k.children.push(N);
6217
6217
  }
6218
6218
  }
6219
6219
  return k;
@@ -7070,11 +7070,11 @@ function _f(t, e, n = {}) {
7070
7070
  heightMode: p.heightMode ?? (S == null ? void 0 : S.heightMode) ?? m.heightMode,
7071
7071
  maxHeight: p.maxHeight ?? (S == null ? void 0 : S.maxHeight) ?? m.maxHeight
7072
7072
  });
7073
- for (const P of r.get(m.id) ?? [])
7073
+ for (const A of r.get(m.id) ?? [])
7074
7074
  o.push({
7075
- ...P,
7076
- id: `${P.id}:viewport:${p.id}`,
7077
- name: `${P.name} · ${p.label}`,
7075
+ ...A,
7076
+ id: `${A.id}:viewport:${p.id}`,
7077
+ name: `${A.name} · ${p.label}`,
7078
7078
  section: O,
7079
7079
  pageId: y
7080
7080
  });
@@ -7188,8 +7188,8 @@ function Sf({
7188
7188
  sourcePath: y,
7189
7189
  codeName: _,
7190
7190
  coverageRoutes: O,
7191
- ...P
7192
- }) => P
7191
+ ...A
7192
+ }) => A
7193
7193
  )
7194
7194
  },
7195
7195
  coverage: {
@@ -7403,7 +7403,7 @@ ${l.join(`
7403
7403
  };
7404
7404
  c();
7405
7405
  const u = async (l, d, f) => {
7406
- var y, _;
7406
+ var y, _, O;
7407
7407
  const h = [];
7408
7408
  let g = !d.preset;
7409
7409
  if (d.preset)
@@ -7416,27 +7416,27 @@ ${l.join(`
7416
7416
  });
7417
7417
  else
7418
7418
  try {
7419
- const O = await e.executeScreenPreset(
7419
+ const A = await e.executeScreenPreset(
7420
7420
  { pageId: d.pageId, route: d.route, preset: Ct(d.preset) },
7421
7421
  { iframe: l }
7422
7422
  );
7423
- O && !O.complete ? h.push({
7423
+ A && !A.complete ? h.push({
7424
7424
  stage: "preset",
7425
7425
  code: "preset_rejected",
7426
7426
  label: "screen preset",
7427
- message: O.message ?? "The host refused to apply the screen preset.",
7428
- actual: O.details
7427
+ message: A.message ?? "The host refused to apply the screen preset.",
7428
+ actual: A.details
7429
7429
  }) : g = !0;
7430
- } catch (O) {
7430
+ } catch (A) {
7431
7431
  h.push({
7432
7432
  stage: "preset",
7433
7433
  code: "preset_error",
7434
7434
  label: "screen preset",
7435
- message: `An error occurred while applying the screen preset:${String(O).slice(0, 160)}`
7435
+ message: `An error occurred while applying the screen preset:${String(A).slice(0, 160)}`
7436
7436
  });
7437
7437
  }
7438
7438
  let p = wf(((y = d.interactions) == null ? void 0 : y.length) ?? 0), m = Of(((_ = d.assertions) == null ? void 0 : _.length) ?? 0);
7439
- h.length === 0 && (p = await Nr(
7439
+ h.length === 0 && ((O = f == null ? void 0 : f.onBeforeInteractions) == null || O.call(f), p = await Nr(
7440
7440
  l,
7441
7441
  d.interactions ?? [],
7442
7442
  f
@@ -7524,7 +7524,7 @@ ${l.join(`
7524
7524
  ...d
7525
7525
  }),
7526
7526
  captureIframeWhenStable: async (l, d = {}) => {
7527
- var I;
7527
+ var P;
7528
7528
  const {
7529
7529
  settleMs: f = 1e3,
7530
7530
  timeoutMs: h = 8e3,
@@ -7540,10 +7540,10 @@ ${l.join(`
7540
7540
  if (!(m != null && m.body) || !S) return null;
7541
7541
  const y = Date.now();
7542
7542
  let _ = Date.now(), O = m.body.querySelectorAll("*").length;
7543
- const P = S.MutationObserver, A = new P(() => {
7543
+ const A = S.MutationObserver, x = new A(() => {
7544
7544
  _ = Date.now(), O = m.body.querySelectorAll("*").length;
7545
7545
  });
7546
- A.observe(m.body, { childList: !0, subtree: !0, attributes: !0, characterData: !0 });
7546
+ x.observe(m.body, { childList: !0, subtree: !0, attributes: !0, characterData: !0 });
7547
7547
  try {
7548
7548
  await new Promise((D) => {
7549
7549
  const k = () => {
@@ -7557,10 +7557,10 @@ ${l.join(`
7557
7557
  S.setTimeout(k, 100);
7558
7558
  });
7559
7559
  } finally {
7560
- A.disconnect();
7560
+ x.disconnect();
7561
7561
  }
7562
7562
  try {
7563
- await ((I = m.fonts) == null ? void 0 : I.ready), await new Promise((D) => {
7563
+ await ((P = m.fonts) == null ? void 0 : P.ready), await new Promise((D) => {
7564
7564
  S.requestAnimationFrame(() => D());
7565
7565
  });
7566
7566
  } catch {
@@ -10628,65 +10628,65 @@ function Vh({
10628
10628
  var vt, Ce;
10629
10629
  const O = (vt = s.current) == null ? void 0 : vt.contentDocument;
10630
10630
  if (!(O != null && O.head)) return;
10631
- const P = ++l.current, A = [];
10632
- let I = O.querySelector(
10631
+ const A = ++l.current, x = [];
10632
+ let P = O.querySelector(
10633
10633
  "style[data-pygmalion-frozen-overrides]"
10634
10634
  );
10635
- p ? I || (I = O.createElement("style"), I.dataset.pygmalionFrozenOverrides = "", O.head.append(I)) : I == null || I.remove(), I && I.textContent !== p && (I.textContent = p), a.current();
10635
+ p ? P || (P = O.createElement("style"), P.dataset.pygmalionFrozenOverrides = "", O.head.append(P)) : P == null || P.remove(), P && P.textContent !== p && (P.textContent = p), a.current();
10636
10636
  const D = [];
10637
10637
  let k = 0, z = 0;
10638
- for (const x of m)
10638
+ for (const N of m)
10639
10639
  try {
10640
- O.querySelector(x.selector);
10640
+ O.querySelector(N.selector);
10641
10641
  } catch {
10642
- A.push(`Style selector cannot be applied:${x.key}`);
10642
+ x.push(`Style selector cannot be applied:${N.key}`);
10643
10643
  }
10644
- for (const x of S) {
10644
+ for (const N of S) {
10645
10645
  let ze = [];
10646
10646
  try {
10647
- ze = [...O.querySelectorAll(x.selector)];
10647
+ ze = [...O.querySelectorAll(N.selector)];
10648
10648
  } catch {
10649
- A.push(`DOM selector cannot be applied:${x.key}`);
10649
+ x.push(`DOM selector cannot be applied:${N.key}`);
10650
10650
  continue;
10651
10651
  }
10652
- if (x.staleReason && ze.length > 0) {
10653
- A.push(x.staleReason), (x.component || x.key.endsWith(":component-props")) && (z += ze.length);
10652
+ if (N.staleReason && ze.length > 0) {
10653
+ x.push(N.staleReason), (N.component || N.key.endsWith(":component-props")) && (z += ze.length);
10654
10654
  continue;
10655
10655
  }
10656
- for (const M of ze) {
10657
- if (x.component) {
10658
- const R = x.component, ge = le()[R.name];
10656
+ for (const I of ze) {
10657
+ if (N.component) {
10658
+ const R = N.component, ge = le()[R.name];
10659
10659
  if (!ge) {
10660
- A.push(
10660
+ x.push(
10661
10661
  `Component registry entry not found:${R.name}`
10662
- ), z += 1, M.setAttribute("data-pygmalion-sandbox-replay", "stale"), D.push(() => {
10663
- M.removeAttribute("data-pygmalion-sandbox-replay");
10662
+ ), z += 1, I.setAttribute("data-pygmalion-sandbox-replay", "stale"), D.push(() => {
10663
+ I.removeAttribute("data-pygmalion-sandbox-replay");
10664
10664
  });
10665
10665
  continue;
10666
10666
  }
10667
10667
  if (ge.children === "nodes") {
10668
- A.push(
10668
+ x.push(
10669
10669
  "Components that use node children cannot be safely replayed in a frozen sandbox."
10670
- ), z += 1, M.setAttribute("data-pygmalion-sandbox-replay", "stale"), D.push(() => {
10671
- M.removeAttribute("data-pygmalion-sandbox-replay");
10670
+ ), z += 1, I.setAttribute("data-pygmalion-sandbox-replay", "stale"), D.push(() => {
10671
+ I.removeAttribute("data-pygmalion-sandbox-replay");
10672
10672
  });
10673
10673
  continue;
10674
10674
  }
10675
10675
  const Ee = O.createElement("pygmalion-sandbox-root");
10676
- Ee.setAttribute("data-pygmalion-sandbox-replay", "applied"), Ee.style.display = "contents", M.before(Ee);
10677
- const oi = M.hasAttribute("hidden");
10678
- M.setAttribute("hidden", ""), M.setAttribute("data-pygmalion-sandbox-replay", "source");
10676
+ Ee.setAttribute("data-pygmalion-sandbox-replay", "applied"), Ee.style.display = "contents", I.before(Ee);
10677
+ const oi = I.hasAttribute("hidden");
10678
+ I.setAttribute("hidden", ""), I.setAttribute("data-pygmalion-sandbox-replay", "source");
10679
10679
  let bt = vo(Ee);
10680
10680
  const Ia = () => {
10681
10681
  const ve = bt;
10682
- bt = null, Ee.remove(), M.toggleAttribute("hidden", oi), M.removeAttribute("data-pygmalion-sandbox-replay"), ve && queueMicrotask(() => ve.unmount());
10682
+ bt = null, Ee.remove(), I.toggleAttribute("hidden", oi), I.removeAttribute("data-pygmalion-sandbox-replay"), ve && queueMicrotask(() => ve.unmount());
10683
10683
  };
10684
10684
  D.push(Ia);
10685
10685
  const si = (ve) => {
10686
- if (l.current !== P) return;
10686
+ if (l.current !== A) return;
10687
10687
  z += 1;
10688
10688
  const Pa = ve instanceof Error ? ve.message : String(ve), ai = `Component sandbox rendering failed:${R.name} · ${Pa}`;
10689
- A.push(ai), Ee.setAttribute("data-pygmalion-sandbox-replay", "stale"), M.toggleAttribute("hidden", oi), g("stale"), f((Ca) => {
10689
+ x.push(ai), Ee.setAttribute("data-pygmalion-sandbox-replay", "stale"), I.toggleAttribute("hidden", oi), g("stale"), f((Ca) => {
10690
10690
  const ci = [.../* @__PURE__ */ new Set([...Ca, ai])];
10691
10691
  return o == null || o(ci), ci;
10692
10692
  });
@@ -10709,52 +10709,52 @@ function Vh({
10709
10709
  }
10710
10710
  continue;
10711
10711
  }
10712
- if (x.hidden != null) {
10713
- const R = M.hasAttribute("hidden");
10714
- M.toggleAttribute("hidden", x.hidden), D.push(() => M.toggleAttribute("hidden", R));
10712
+ if (N.hidden != null) {
10713
+ const R = I.hasAttribute("hidden");
10714
+ I.toggleAttribute("hidden", N.hidden), D.push(() => I.toggleAttribute("hidden", R));
10715
10715
  }
10716
- if (x.attributes)
10717
- for (const [R, ge] of Object.entries(x.attributes)) {
10718
- const Ee = M.getAttribute(R);
10719
- ge == null ? M.removeAttribute(R) : M.setAttribute(R, ge), D.push(() => {
10720
- Ee == null ? M.removeAttribute(R) : M.setAttribute(R, Ee);
10716
+ if (N.attributes)
10717
+ for (const [R, ge] of Object.entries(N.attributes)) {
10718
+ const Ee = I.getAttribute(R);
10719
+ ge == null ? I.removeAttribute(R) : I.setAttribute(R, ge), D.push(() => {
10720
+ Ee == null ? I.removeAttribute(R) : I.setAttribute(R, Ee);
10721
10721
  });
10722
10722
  }
10723
- if (x.replaceChildrenHtml != null) {
10724
- const R = M.innerHTML;
10725
- M.innerHTML = x.replaceChildrenHtml, D.push(() => {
10726
- M.innerHTML = R;
10723
+ if (N.replaceChildrenHtml != null) {
10724
+ const R = I.innerHTML;
10725
+ I.innerHTML = N.replaceChildrenHtml, D.push(() => {
10726
+ I.innerHTML = R;
10727
10727
  });
10728
10728
  }
10729
- if (x.text == null) continue;
10730
- if (x.textNodeOrdinal == null) {
10731
- const R = M.textContent;
10732
- M.textContent = x.text, D.push(() => {
10733
- M.textContent = R;
10729
+ if (N.text == null) continue;
10730
+ if (N.textNodeOrdinal == null) {
10731
+ const R = I.textContent;
10732
+ I.textContent = N.text, D.push(() => {
10733
+ I.textContent = R;
10734
10734
  });
10735
10735
  continue;
10736
10736
  }
10737
- const Na = ((Ce = O.defaultView) == null ? void 0 : Ce.Node.TEXT_NODE) ?? 3, Vt = [...M.childNodes].filter(
10737
+ const Na = ((Ce = O.defaultView) == null ? void 0 : Ce.Node.TEXT_NODE) ?? 3, Vt = [...I.childNodes].filter(
10738
10738
  (R) => {
10739
10739
  var ge;
10740
10740
  return R.nodeType === Na && !!((ge = R.textContent) != null && ge.trim());
10741
10741
  }
10742
- )[x.textNodeOrdinal];
10742
+ )[N.textNodeOrdinal];
10743
10743
  if (!Vt) continue;
10744
10744
  const Ma = Vt.textContent;
10745
- Vt.textContent = x.text, D.push(() => {
10745
+ Vt.textContent = N.text, D.push(() => {
10746
10746
  Vt.textContent = Ma;
10747
10747
  });
10748
10748
  }
10749
10749
  }
10750
10750
  a.current = () => {
10751
- for (const x of D.reverse()) x();
10751
+ for (const N of D.reverse()) N();
10752
10752
  };
10753
- const V = [...new Set(A)];
10753
+ const V = [...new Set(x)];
10754
10754
  g(
10755
10755
  z > 0 ? "stale" : k > 0 ? "applied" : "none"
10756
10756
  ), f(
10757
- (x) => JSON.stringify(x) === JSON.stringify(V) ? x : V
10757
+ (N) => JSON.stringify(N) === JSON.stringify(V) ? N : V
10758
10758
  ), o == null || o(V);
10759
10759
  };
10760
10760
  return di(() => (_(), () => {
@@ -10785,10 +10785,10 @@ function Vh({
10785
10785
  const O = s.current;
10786
10786
  if (!O) return;
10787
10787
  c.current();
10788
- const P = O.contentDocument;
10789
- c.current = t.heightMode === "document" && P ? dl(P, (A) => {
10790
- var I;
10791
- (I = u.current) == null || I.call(u, A);
10788
+ const A = O.contentDocument;
10789
+ c.current = t.heightMode === "document" && A ? dl(A, (x) => {
10790
+ var P;
10791
+ (P = u.current) == null || P.call(u, x);
10792
10792
  }) : () => {
10793
10793
  }, r == null || r(O);
10794
10794
  }