@pygmalionjs/pygmalion 0.5.3 → 0.5.4

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.
@@ -2,8 +2,8 @@ var Of = Object.defineProperty;
2
2
  var Bf = (e, t, n) => t in e ? Of(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ln = (e, t, n) => Bf(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as s, jsxs as g, Fragment as Ke } from "react/jsx-runtime";
5
- import { R as ei, u as jf, c as ha, b as Hc, g as Je, e as f, r as un, d as Vn, f as pa, h as Zt, i as Kc, j as Bn, o as He, k as Wf, l as Hf, m as Kf, n as Vf, p as Uf, q as qf, t as Yf, v as vs, w as Gf, x as Xf, y as Jf, z as Zf, A as Qf, B as eh, S as th, C as nh, D as rh, E as oh, G as ih, L as sh, H as ah, I as lh, J as ch, K as Vc, M as dh, O as Sl, P as uh, Q as Uc, T as fh, U as hh, V as ph, W as mh, X as gh, Y as bh, Z as qc, _ as xh, $ as yh, a0 as X, a1 as Nl, a2 as Il, a3 as vh, a4 as Qi, a5 as wh, a6 as Ho, a7 as ws, a8 as Sh, a9 as Yc, aa as Nh, ab as Ih, ac as Ch, ad as $h, s as Ph, ae as Gc, af as Xc, ag as Ss, ah as Jc, ai as Mh, aj as Eh, ak as Cl, al as kh, am as Ah, an as $l, ao as Rh, ap as Th, aq as Fh, ar as Lh, as as Dh, at as zh, au as _h, av as Oh, aw as Bh, ax as jh, ay as Wh, a as Hh, az as Kh, aA as Vh, aB as Uh, aC as qh, aD as Yh, aE as Gh, aF as Xh, aG as Jh, aH as Zh, aI as Qh, aJ as ep, aK as tp, aL as np, aM as rp, aN as op, aO as ip, aP as Pl } from "./FrozenRoutePreview-C9535oYO.js";
6
- import { aQ as Uw, aR as qw, aS as Yw, aT as Gw, aU as Xw, aV as Jw, aW as Zw, aX as Qw, aY as e0, aZ as t0, a_ as n0, a$ as r0, b0 as o0 } from "./FrozenRoutePreview-C9535oYO.js";
5
+ import { R as ei, u as jf, c as ha, b as Hc, g as Je, e as f, r as un, d as Vn, f as pa, h as Zt, i as Kc, j as Bn, o as He, k as Wf, l as Hf, m as Kf, n as Vf, p as Uf, q as qf, t as Yf, v as vs, w as Gf, x as Xf, y as Jf, z as Zf, A as Qf, B as eh, S as th, C as nh, D as rh, E as oh, G as ih, L as sh, H as ah, I as lh, J as ch, K as Vc, M as dh, O as Sl, P as uh, Q as Uc, T as fh, U as hh, V as ph, W as mh, X as gh, Y as bh, Z as qc, _ as xh, $ as yh, a0 as X, a1 as Nl, a2 as Il, a3 as vh, a4 as Qi, a5 as wh, a6 as Ho, a7 as ws, a8 as Sh, a9 as Yc, aa as Nh, ab as Ih, ac as Ch, ad as $h, s as Ph, ae as Gc, af as Xc, ag as Ss, ah as Jc, ai as Mh, aj as Eh, ak as Cl, al as kh, am as Ah, an as $l, ao as Rh, ap as Th, aq as Fh, ar as Lh, as as Dh, at as zh, au as _h, av as Oh, aw as Bh, ax as jh, ay as Wh, a as Hh, az as Kh, aA as Vh, aB as Uh, aC as qh, aD as Yh, aE as Gh, aF as Xh, aG as Jh, aH as Zh, aI as Qh, aJ as ep, aK as tp, aL as np, aM as rp, aN as op, aO as ip, aP as Pl } from "./FrozenRoutePreview-gn0xHRPG.js";
6
+ import { aQ as Uw, aR as qw, aS as Yw, aT as Gw, aU as Xw, aV as Jw, aW as Zw, aX as Qw, aY as e0, aZ as t0, a_ as n0, a$ as r0, b0 as o0 } from "./FrozenRoutePreview-gn0xHRPG.js";
7
7
  import { useRef as Ne, useLayoutEffect as ti, useSyncExternalStore as Xe, useCallback as St, useReducer as Zc, useEffect as le, memo as Qc, createElement as eo, useState as Y, useMemo as Ft } from "react";
8
8
  import { createPortal as sp } from "react-dom";
9
9
  const ma = {
@@ -620,7 +620,7 @@ function Fr(e) {
620
620
  function Xt() {
621
621
  return ar(gd);
622
622
  }
623
- function Kt(e, t) {
623
+ function Lt(e, t) {
624
624
  return e ? t ? {
625
625
  ...ar(e),
626
626
  ...ar(t),
@@ -706,10 +706,10 @@ function xa(e = {}) {
706
706
  );
707
707
  }
708
708
  let wd = xa(), Kr = 0, Fl = 0, Vo = 0, rs = !1;
709
- const zt = [], ht = /* @__PURE__ */ new Map(), Ht = /* @__PURE__ */ new Map(), mr = /* @__PURE__ */ new Set(), jt = /* @__PURE__ */ new Map(), gr = /* @__PURE__ */ new Map(), mt = /* @__PURE__ */ new Map(), Sd = /* @__PURE__ */ new Map(), ya = /* @__PURE__ */ new Map(), Ll = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new Map(), Eo = /* @__PURE__ */ new Map();
709
+ const _t = [], ht = /* @__PURE__ */ new Map(), Kt = /* @__PURE__ */ new Map(), mr = /* @__PURE__ */ new Set(), Wt = /* @__PURE__ */ new Map(), gr = /* @__PURE__ */ new Map(), mt = /* @__PURE__ */ new Map(), Sd = /* @__PURE__ */ new Map(), ya = /* @__PURE__ */ new Map(), Ll = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new Map(), Eo = /* @__PURE__ */ new Map();
710
710
  let ko = 0, Jp = 0, os = !1;
711
711
  const Uo = [], ri = /* @__PURE__ */ new Map();
712
- let Wt = 0, Qt = 0, cr = xd, Cs, Vr = null;
712
+ let Ht = 0, Qt = 0, cr = xd, Cs, Vr = null;
713
713
  const Ur = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ new Set(), oi = /* @__PURE__ */ new Set();
714
714
  let va = 0, wa = 0;
715
715
  const ii = /* @__PURE__ */ new Set(), si = /* @__PURE__ */ new Map(), Sa = /* @__PURE__ */ new Map();
@@ -828,14 +828,14 @@ function Ds() {
828
828
  return Kr;
829
829
  }
830
830
  function Un(e) {
831
- return ht.has(e) || mt.has(e) || Ht.has(e);
831
+ return ht.has(e) || mt.has(e) || Kt.has(e);
832
832
  }
833
833
  function Mi(e) {
834
834
  var t;
835
- return Un(e) && ((t = jt.get(e)) == null ? void 0 : t.stale) !== !0;
835
+ return Un(e) && ((t = Wt.get(e)) == null ? void 0 : t.stale) !== !0;
836
836
  }
837
837
  function Pa(e) {
838
- return jt.get(e) ?? null;
838
+ return Wt.get(e) ?? null;
839
839
  }
840
840
  function zs() {
841
841
  return wa;
@@ -892,7 +892,7 @@ function vt(e, t) {
892
892
  }
893
893
  }
894
894
  function Os(e) {
895
- return ht.has(e) || mt.has(e) || Ht.has(e) || lt.has(e);
895
+ return ht.has(e) || mt.has(e) || Kt.has(e) || lt.has(e);
896
896
  }
897
897
  function Nr(e) {
898
898
  const t = e == null ? void 0 : e.trim();
@@ -1152,10 +1152,10 @@ function Ea(e) {
1152
1152
  function ci(e) {
1153
1153
  const t = mt.get(e);
1154
1154
  if (!t) return !1;
1155
- mt.delete(e), Wt = Math.max(0, Wt - t.ownBytes);
1155
+ mt.delete(e), Ht = Math.max(0, Ht - t.ownBytes);
1156
1156
  for (const n of t.head) {
1157
1157
  const r = Ea(n.kind), o = r.get(n.key);
1158
- o && (o.references -= 1, !(o.references > 0) && (r.delete(n.key), Wt = Math.max(0, Wt - o.bytes)));
1158
+ o && (o.references -= 1, !(o.references > 0) && (r.delete(n.key), Ht = Math.max(0, Ht - o.bytes)));
1159
1159
  }
1160
1160
  return !0;
1161
1161
  }
@@ -1201,7 +1201,7 @@ function om(e, t, n, r) {
1201
1201
  p.references += 1;
1202
1202
  else {
1203
1203
  const m = l.length * 2;
1204
- d.set(u, { content: l, bytes: m, references: 1 }), Wt += m;
1204
+ d.set(u, { content: l, bytes: m, references: 1 }), Ht += m;
1205
1205
  }
1206
1206
  return { kind: c, key: u };
1207
1207
  }), a = (o.body.length + o.document.doctype.length + o.document.htmlAttributes.length + o.document.headAttributes.length + o.document.bodyAttributes.length + i.reduce((c, l) => c + l.key.length, 0)) * 2;
@@ -1213,7 +1213,7 @@ function om(e, t, n, r) {
1213
1213
  head: i,
1214
1214
  body: o.body,
1215
1215
  shadow: null
1216
- }), Wt += a, !0;
1216
+ }), Ht += a, !0;
1217
1217
  }
1218
1218
  function im(e, t) {
1219
1219
  let n = Ll.get(e);
@@ -1277,7 +1277,7 @@ function sm(e) {
1277
1277
  }, e.shadow;
1278
1278
  }
1279
1279
  function Dn(e) {
1280
- const t = Ht.get(e);
1280
+ const t = Kt.get(e);
1281
1281
  if (t) return sm(t);
1282
1282
  const n = mt.get(e);
1283
1283
  return n ? (mt.delete(e), n.lastAccess = Date.now(), mt.set(e, n), rm(n)) : null;
@@ -1346,7 +1346,7 @@ function Hs(e, t) {
1346
1346
  route: x.route,
1347
1347
  width: x.width ?? 390,
1348
1348
  height: x.height ?? 600,
1349
- environment: Kt(
1349
+ environment: Lt(
1350
1350
  t.baselineEnvironment,
1351
1351
  x.environment
1352
1352
  ),
@@ -1358,7 +1358,7 @@ function Hs(e, t) {
1358
1358
  const R = e.frames[w];
1359
1359
  if (!R) continue;
1360
1360
  const H = x.fingerprint != null && R.fingerprint === x.fingerprint, A = l && !(t.allowMatchingFrameIdentity && H) || x.fingerprint != null && !H;
1361
- if (jt.set(v, {
1361
+ if (Wt.set(v, {
1362
1362
  status: R.status,
1363
1363
  diagnostics: R.diagnostics,
1364
1364
  ...A ? { stale: !0 } : {},
@@ -1368,7 +1368,7 @@ function Hs(e, t) {
1368
1368
  )
1369
1369
  }), lt.add(v), R.snapshot && m) {
1370
1370
  const N = is(t.appOrigin, x.route);
1371
- mr.delete(v), Ht.set(v, {
1371
+ mr.delete(v), Kt.set(v, {
1372
1372
  bundle: m,
1373
1373
  frameId: w,
1374
1374
  previewBase: N,
@@ -1378,19 +1378,19 @@ function Hs(e, t) {
1378
1378
  Jt({ key: v }), hn(v), d(x, A), u += 1;
1379
1379
  continue;
1380
1380
  }
1381
- if (Un(v) && ((b = jt.get(v)) == null ? void 0 : b.stale) !== !0) {
1381
+ if (Un(v) && ((b = Wt.get(v)) == null ? void 0 : b.stale) !== !0) {
1382
1382
  d(x, !1);
1383
1383
  continue;
1384
1384
  }
1385
1385
  if (e.version === 2) {
1386
1386
  if (!e.frames[w]) continue;
1387
1387
  const H = is(t.appOrigin, x.route);
1388
- mr.delete(v), Ht.set(v, {
1388
+ mr.delete(v), Kt.set(v, {
1389
1389
  bundle: e,
1390
1390
  frameId: w,
1391
1391
  previewBase: H,
1392
1392
  shadow: null
1393
- }), jt.set(v, {
1393
+ }), Wt.set(v, {
1394
1394
  status: "ready",
1395
1395
  diagnostics: [],
1396
1396
  ...l ? { stale: !0 } : {},
@@ -1413,7 +1413,7 @@ function Hs(e, t) {
1413
1413
  }
1414
1414
  $ = $.replaceAll("__PYGMALION_PREVIEW_BASE__", R);
1415
1415
  }
1416
- Ri(v, $) ? (jt.set(v, {
1416
+ Ri(v, $) ? (Wt.set(v, {
1417
1417
  status: "ready",
1418
1418
  diagnostics: [],
1419
1419
  ...l ? { stale: !0 } : {},
@@ -1605,21 +1605,21 @@ function Jr() {
1605
1605
  }
1606
1606
  function dm() {
1607
1607
  var e;
1608
- for (let t = zt.length - 1; t >= 0; t -= 1)
1609
- (e = zt[t]) != null && e.cancelled && zt.splice(t, 1);
1608
+ for (let t = _t.length - 1; t >= 0; t -= 1)
1609
+ (e = _t[t]) != null && e.cancelled && _t.splice(t, 1);
1610
1610
  }
1611
1611
  function um() {
1612
- if (dm(), zt.length === 0) return null;
1612
+ if (dm(), _t.length === 0) return null;
1613
1613
  let e = 0, t = 0;
1614
- for (let o = 1; o < zt.length; o += 1) {
1615
- const i = zt[o], a = zt[e], c = zt[t];
1614
+ for (let o = 1; o < _t.length; o += 1) {
1615
+ const i = _t[o], a = _t[e], c = _t[t];
1616
1616
  i.order < a.order && (e = o), (i.priority < c.priority || i.priority === c.priority && i.order < c.order) && (t = o);
1617
1617
  }
1618
1618
  const r = t !== e && Vo >= Hp ? e : t;
1619
- return r === e ? Vo = 0 : Vo += 1, zt.splice(r, 1)[0] ?? null;
1619
+ return r === e ? Vo = 0 : Vo += 1, _t.splice(r, 1)[0] ?? null;
1620
1620
  }
1621
1621
  function fm() {
1622
- for (; Kr < wd && zt.length > 0; ) {
1622
+ for (; Kr < wd && _t.length > 0; ) {
1623
1623
  const e = um();
1624
1624
  if (!e) break;
1625
1625
  Kr += 1, Dl();
@@ -1629,7 +1629,7 @@ function fm() {
1629
1629
  };
1630
1630
  e.release = n, e.resolve(n);
1631
1631
  }
1632
- zt.length === 0 && (Vo = 0);
1632
+ _t.length === 0 && (Vo = 0);
1633
1633
  }
1634
1634
  function Bd(e = 0) {
1635
1635
  let t;
@@ -1641,7 +1641,7 @@ function Bd(e = 0) {
1641
1641
  priority: Number.isFinite(e) ? e : 0,
1642
1642
  release: null,
1643
1643
  resolve: r
1644
- }, Fl += 1, zt.push(t), Jr();
1644
+ }, Fl += 1, _t.push(t), Jr();
1645
1645
  }),
1646
1646
  updatePriority: (r) => {
1647
1647
  if (t.cancelled || t.release) return;
@@ -1666,7 +1666,7 @@ function Ut(e) {
1666
1666
  const n = mt.get(e);
1667
1667
  if (n)
1668
1668
  return mt.delete(e), n.lastAccess = Date.now(), mt.set(e, n), nm(n);
1669
- const r = Ht.get(e);
1669
+ const r = Kt.get(e);
1670
1670
  if (!r) return null;
1671
1671
  const o = cd(
1672
1672
  r.bundle,
@@ -1677,29 +1677,29 @@ function Ut(e) {
1677
1677
  o,
1678
1678
  r.previewBase
1679
1679
  );
1680
- return ((a = jt.get(e)) == null ? void 0 : a.stale) !== !0 && ki(i) && !mr.has(e) && (mr.add(e), Ta(e, i)), i;
1680
+ return ((a = Wt.get(e)) == null ? void 0 : a.stale) !== !0 && ki(i) && !mr.has(e) && (mr.add(e), Ta(e, i)), i;
1681
1681
  }
1682
1682
  function Ra(e, t, n = hr(e), r = Date.now()) {
1683
1683
  var c, l, d;
1684
1684
  const o = t.length * 2;
1685
1685
  if (!e || !ki(t) || o > ba)
1686
1686
  return !1;
1687
- Ht.delete(e), ci(e);
1687
+ Kt.delete(e), ci(e);
1688
1688
  const i = ht.get(e);
1689
- i && (Wt -= i.bytes, ht.delete(e));
1689
+ i && (Ht -= i.bytes, ht.delete(e));
1690
1690
  const a = Nr(n);
1691
1691
  om(e, t, a, r) || (ht.set(e, {
1692
1692
  bytes: o,
1693
1693
  value: t,
1694
1694
  namespace: a,
1695
1695
  lastAccess: r
1696
- }), Wt += o), br();
1696
+ }), Ht += o), br();
1697
1697
  try {
1698
- for (((c = jt.get(e)) == null ? void 0 : c.stale) === !0 && (jt.delete(e), Jt({ key: e })); ht.size + mt.size > Kp || Wt > Vp; ) {
1698
+ for (((c = Wt.get(e)) == null ? void 0 : c.stale) === !0 && (Wt.delete(e), Jt({ key: e })); ht.size + mt.size > Kp || Ht > Vp; ) {
1699
1699
  const u = ht.keys().next().value, p = mt.keys().next().value, m = u ? ((l = ht.get(u)) == null ? void 0 : l.lastAccess) ?? Number.POSITIVE_INFINITY : Number.POSITIVE_INFINITY, b = p ? ((d = mt.get(p)) == null ? void 0 : d.lastAccess) ?? Number.POSITIVE_INFINITY : Number.POSITIVE_INFINITY, x = m <= b ? u : p;
1700
1700
  if (!x) break;
1701
1701
  const w = ht.get(x);
1702
- w ? (Wt -= w.bytes, ht.delete(x)) : ci(x), lt.delete(x), hn(x);
1702
+ w ? (Ht -= w.bytes, ht.delete(x)) : ci(x), lt.delete(x), hn(x);
1703
1703
  }
1704
1704
  lt.add(e), hn(e);
1705
1705
  } finally {
@@ -1732,7 +1732,7 @@ function Ri(e, t) {
1732
1732
  return n && Ta(e, t), n;
1733
1733
  }
1734
1734
  function Hd(e) {
1735
- if (Ht.has(e)) return Promise.resolve(null);
1735
+ if (Kt.has(e)) return Promise.resolve(null);
1736
1736
  const t = Ut(e);
1737
1737
  if (t) return Promise.resolve(t);
1738
1738
  if (lt.has(e)) return Promise.resolve(null);
@@ -1772,7 +1772,7 @@ function Hd(e) {
1772
1772
  async function Fa(e) {
1773
1773
  const t = [...new Set(e.filter(Boolean))], n = /* @__PURE__ */ new Map(), r = [];
1774
1774
  for (const u of t) {
1775
- if (Ht.has(u)) continue;
1775
+ if (Kt.has(u)) continue;
1776
1776
  const p = Ut(u);
1777
1777
  p ? n.set(u, p) : lt.has(u) || r.push(u);
1778
1778
  }
@@ -1858,16 +1858,16 @@ async function Fa(e) {
1858
1858
  function hm(e) {
1859
1859
  const t = e ? Nr(e) : null;
1860
1860
  if (!t)
1861
- ht.clear(), mt.clear(), Sd.clear(), ya.clear(), Ht.clear(), mr.clear(), jt.clear(), gr.clear(), Wt = 0;
1861
+ ht.clear(), mt.clear(), Sd.clear(), ya.clear(), Kt.clear(), mr.clear(), Wt.clear(), gr.clear(), Ht = 0;
1862
1862
  else {
1863
1863
  for (const [r, o] of ht)
1864
- o.namespace === t && (ht.delete(r), Wt -= o.bytes);
1864
+ o.namespace === t && (ht.delete(r), Ht -= o.bytes);
1865
1865
  for (const [r, o] of [...mt])
1866
1866
  o.namespace === t && ci(r);
1867
- for (const r of Ht.keys())
1868
- hr(r) === t && (Ht.delete(r), mr.delete(r));
1869
- for (const r of jt.keys())
1870
- hr(r) === t && jt.delete(r);
1867
+ for (const r of Kt.keys())
1868
+ hr(r) === t && (Kt.delete(r), mr.delete(r));
1869
+ for (const r of Wt.keys())
1870
+ hr(r) === t && Wt.delete(r);
1871
1871
  }
1872
1872
  if (Qt += 1, !t) lt.clear();
1873
1873
  else
@@ -2172,7 +2172,7 @@ function Pm() {
2172
2172
  const n = qn.get(t.id);
2173
2173
  if (n == null) continue;
2174
2174
  const r = t.options.find((o) => o.value === n);
2175
- e = Kt(e, r == null ? void 0 : r.environment);
2175
+ e = Lt(e, r == null ? void 0 : r.environment);
2176
2176
  }
2177
2177
  return e;
2178
2178
  }
@@ -2183,17 +2183,17 @@ function yr() {
2183
2183
  return Kd;
2184
2184
  }
2185
2185
  function Cn(e, t) {
2186
- const n = t ?? e.id === f.activePageId;
2187
- return Kt(
2188
- e.environment,
2186
+ const n = t ?? e.id === f.activePageId, r = Lt(e.environment, e.interactiveEnvironment);
2187
+ return Lt(
2188
+ r,
2189
2189
  n ? Pm() : void 0
2190
2190
  );
2191
2191
  }
2192
- function Ot(e, t, n = {
2192
+ function Bt(e, t, n = {
2193
2193
  width: e.width ?? 390,
2194
2194
  height: e.height ?? 600
2195
2195
  }, r) {
2196
- const o = Kt(
2196
+ const o = Lt(
2197
2197
  Xt(),
2198
2198
  Cn(e, r)
2199
2199
  );
@@ -2212,7 +2212,7 @@ function Ot(e, t, n = {
2212
2212
  const Mm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2213
2213
  __proto__: null,
2214
2214
  pagePreviewEnvironment: Cn,
2215
- routePreviewCacheKey: Ot
2215
+ routePreviewCacheKey: Bt
2216
2216
  }, Symbol.toStringTag, { value: "Module" })), Em = /* @__PURE__ */ new Set(), qr = /* @__PURE__ */ new Map();
2217
2217
  let Pt = [];
2218
2218
  const Vd = 2;
@@ -2271,7 +2271,7 @@ function Rm(e, t) {
2271
2271
  route: e.route,
2272
2272
  width: n,
2273
2273
  height: r,
2274
- key: Ot(e, t)
2274
+ key: Bt(e, t)
2275
2275
  }, ui.set(e, i));
2276
2276
  const a = Ut(i.key);
2277
2277
  if (a != null) return a.length * 2;
@@ -2281,7 +2281,7 @@ function Rm(e, t) {
2281
2281
  function Tm(e, t) {
2282
2282
  var a;
2283
2283
  if (e.route == null) return null;
2284
- const n = ui.get(e), r = (n == null ? void 0 : n.key) ?? Ot(e, t), o = (a = Pa(r)) == null ? void 0 : a.screenshot;
2284
+ const n = ui.get(e), r = (n == null ? void 0 : n.key) ?? Bt(e, t), o = (a = Pa(r)) == null ? void 0 : a.screenshot;
2285
2285
  if (!o) return null;
2286
2286
  const i = e.width ?? 390;
2287
2287
  return i > 0 ? o.width / i : null;
@@ -2373,7 +2373,7 @@ const Dm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2373
2373
  CameraLayer: Gd,
2374
2374
  __debugReadEditorFrames: Fm
2375
2375
  }, Symbol.toStringTag, { value: "Module" }));
2376
- function _t(e) {
2376
+ function Ot(e) {
2377
2377
  return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
2378
2378
  }
2379
2379
  function qs(e) {
@@ -2401,9 +2401,9 @@ function Xd(e) {
2401
2401
  1,
2402
2402
  Math.ceil(
2403
2403
  Math.max(
2404
- _t(t.clientWidth),
2405
- _t(t.offsetWidth),
2406
- _t(t.scrollWidth),
2404
+ Ot(t.clientWidth),
2405
+ Ot(t.offsetWidth),
2406
+ Ot(t.scrollWidth),
2407
2407
  n.width,
2408
2408
  i - r
2409
2409
  )
@@ -2413,9 +2413,9 @@ function Xd(e) {
2413
2413
  1,
2414
2414
  Math.ceil(
2415
2415
  Math.max(
2416
- _t(t.clientHeight),
2417
- _t(t.offsetHeight),
2418
- _t(t.scrollHeight),
2416
+ Ot(t.clientHeight),
2417
+ Ot(t.offsetHeight),
2418
+ Ot(t.scrollHeight),
2419
2419
  n.height,
2420
2420
  a - o
2421
2421
  )
@@ -2424,15 +2424,15 @@ function Xd(e) {
2424
2424
  };
2425
2425
  }
2426
2426
  function Bl(e) {
2427
- const t = e, n = qs(e), r = _t(t.offsetWidth), o = _t(t.offsetHeight), i = _t(t.clientWidth), a = _t(t.clientHeight);
2427
+ const t = e, n = qs(e), r = Ot(t.offsetWidth), o = Ot(t.offsetHeight), i = Ot(t.clientWidth), a = Ot(t.clientHeight);
2428
2428
  return {
2429
2429
  width: Math.max(
2430
2430
  1,
2431
- Math.ceil(r || i || _t(n.width))
2431
+ Math.ceil(r || i || Ot(n.width))
2432
2432
  ),
2433
2433
  height: Math.max(
2434
2434
  1,
2435
- Math.ceil(o || a || _t(n.height))
2435
+ Math.ceil(o || a || Ot(n.height))
2436
2436
  )
2437
2437
  };
2438
2438
  }
@@ -2611,7 +2611,7 @@ function Zd() {
2611
2611
  }
2612
2612
  const Ym = 2, Gm = 18e4;
2613
2613
  let Xm = Gm;
2614
- const Bt = [], Wn = {
2614
+ const jt = [], Wn = {
2615
2615
  boots: 0,
2616
2616
  reuses: 0,
2617
2617
  parks: 0,
@@ -2635,7 +2635,7 @@ function Ys(e) {
2635
2635
  e.timer != null && clearTimeout(e.timer), e.iframe.remove(), Wn.evictions += 1;
2636
2636
  }
2637
2637
  function ja() {
2638
- const e = Bt.splice(0, Bt.length);
2638
+ const e = jt.splice(0, jt.length);
2639
2639
  for (const t of e) Ys(t);
2640
2640
  }
2641
2641
  function tu(e, t) {
@@ -2653,16 +2653,16 @@ function tu(e, t) {
2653
2653
  return !0;
2654
2654
  }
2655
2655
  function nu(e) {
2656
- return Bt.some((t) => tu(t, e));
2656
+ return jt.some((t) => tu(t, e));
2657
2657
  }
2658
2658
  function Zm(e) {
2659
2659
  let t = -1, n = -1;
2660
- for (let o = 0; o < Bt.length; o += 1) {
2661
- const i = Bt[o];
2660
+ for (let o = 0; o < jt.length; o += 1) {
2661
+ const i = jt[o];
2662
2662
  tu(i, e) && i.executed.length > n && (n = i.executed.length, t = o);
2663
2663
  }
2664
2664
  if (t < 0) return null;
2665
- const [r] = Bt.splice(t, 1);
2665
+ const [r] = jt.splice(t, 1);
2666
2666
  return r.timer != null && clearTimeout(r.timer), Wn.reuses += 1, { iframe: r.iframe, skip: r.executed.length };
2667
2667
  }
2668
2668
  function Qm(e, t, n) {
@@ -2677,10 +2677,10 @@ function Qm(e, t, n) {
2677
2677
  timer: null
2678
2678
  };
2679
2679
  for (o.timer = setTimeout(() => {
2680
- const c = Bt.indexOf(o);
2681
- c < 0 || (Bt.splice(c, 1), Ys(o));
2682
- }, Xm), (a = (i = o.timer) == null ? void 0 : i.unref) == null || a.call(i), Bt.push(o), Wn.parks += 1; Bt.length > Ym; ) {
2683
- const c = Bt.shift();
2680
+ const c = jt.indexOf(o);
2681
+ c < 0 || (jt.splice(c, 1), Ys(o));
2682
+ }, Xm), (a = (i = o.timer) == null ? void 0 : i.unref) == null || a.call(i), jt.push(o), Wn.parks += 1; jt.length > Ym; ) {
2683
+ const c = jt.shift();
2684
2684
  c && Ys(c);
2685
2685
  }
2686
2686
  }
@@ -2707,14 +2707,14 @@ function Ti(e = {}) {
2707
2707
  }
2708
2708
  async function x(A, N) {
2709
2709
  if (e.prepare) return e.prepare(A, N);
2710
- const { getDesignImportController: T } = await import("./FrozenRoutePreview-C9535oYO.js").then((E) => E.b2), j = T();
2710
+ const { getDesignImportController: T } = await import("./FrozenRoutePreview-gn0xHRPG.js").then((E) => E.b2), j = T();
2711
2711
  if (!j)
2712
2712
  throw new Error("The design import controller is not available.");
2713
2713
  return j.prepareScreenCapture(A, N);
2714
2714
  }
2715
2715
  async function w(A, N) {
2716
2716
  if (e.settle) return e.settle(A, N);
2717
- const { settleScreen: T } = await import("./FrozenRoutePreview-C9535oYO.js").then((j) => j.b1);
2717
+ const { settleScreen: T } = await import("./FrozenRoutePreview-gn0xHRPG.js").then((j) => j.b1);
2718
2718
  return T(A, N);
2719
2719
  }
2720
2720
  async function v(A, N) {
@@ -2857,7 +2857,7 @@ function Ti(e = {}) {
2857
2857
  },
2858
2858
  /** How many finished walks currently have an instance parked for reuse. */
2859
2859
  debugWarmInstancesParked() {
2860
- return Bt.length;
2860
+ return jt.length;
2861
2861
  }
2862
2862
  };
2863
2863
  }
@@ -2950,7 +2950,7 @@ function Fi(e, t, n) {
2950
2950
  const u = l.interactiveStateId ? (l.interactions ?? []).slice(((a = l.baseInteractions) == null ? void 0 : a.length) ?? 0) : [];
2951
2951
  r.push({
2952
2952
  screenId: c.screenId,
2953
- cacheKey: Ot(l, n, void 0, !1),
2953
+ cacheKey: Bt(l, n, void 0, !1),
2954
2954
  width: l.width ?? 390,
2955
2955
  height: un(l),
2956
2956
  steps: [...c.steps ?? [], ...u],
@@ -2960,8 +2960,8 @@ function Fi(e, t, n) {
2960
2960
  return r.length === 0 ? null : {
2961
2961
  id: e.id,
2962
2962
  url: to(Zt(), e.route, {
2963
- ...Kt(
2964
- Kt(
2963
+ ...Lt(
2964
+ Lt(
2965
2965
  jp(i),
2966
2966
  Xt()
2967
2967
  ),
@@ -3069,7 +3069,7 @@ function cu(e, t, n) {
3069
3069
  (p) => p.screenId === r
3070
3070
  );
3071
3071
  if (c < 0) return !1;
3072
- const l = Ot(e, n, t, !1), d = async (p) => {
3072
+ const l = Bt(e, n, t, !1), d = async (p) => {
3073
3073
  const m = Bn();
3074
3074
  if (!m) {
3075
3075
  Nn.controllerMissing += 1;
@@ -3646,7 +3646,7 @@ function Va(e, t, n) {
3646
3646
  route: e.route,
3647
3647
  width: e.width ?? 390,
3648
3648
  height: e.height ?? 600,
3649
- environment: Kt(
3649
+ environment: Lt(
3650
3650
  n,
3651
3651
  e.environment
3652
3652
  ),
@@ -5938,15 +5938,15 @@ const Fb = He(function({
5938
5938
  const { appOrigin: c, previewRevision: l } = Hm(), d = Ne(null), u = Ne(null), p = Ne(null), m = Ne(null), b = Ne(null), x = Ne(!1), w = Ne(Wm()), v = Ne(
5939
5939
  () => {
5940
5940
  }
5941
- ), S = Ne(null), $ = Ne(!1), R = Ne(null), H = Ne(0), A = Ne(null), [N, T] = Y(null), [j, E] = Y(!1), _ = (N == null ? void 0 : N.width) ?? t.width ?? 390, J = (N == null ? void 0 : N.height) ?? un(t), M = (N == null ? void 0 : N.x) ?? t.x ?? 0, W = (N == null ? void 0 : N.y) ?? t.y ?? 0, Z = Kt(
5941
+ ), S = Ne(null), $ = Ne(!1), R = Ne(null), H = Ne(0), A = Ne(null), [N, T] = Y(null), [j, E] = Y(!1), _ = (N == null ? void 0 : N.width) ?? t.width ?? 390, J = (N == null ? void 0 : N.height) ?? un(t), M = (N == null ? void 0 : N.x) ?? t.x ?? 0, W = (N == null ? void 0 : N.y) ?? t.y ?? 0, Z = Lt(
5942
5942
  Xt(),
5943
5943
  Cn(t, n)
5944
- ), q = Ot(
5944
+ ), q = Bt(
5945
5945
  t,
5946
5946
  l,
5947
5947
  void 0,
5948
5948
  n
5949
- ), Ee = Ot(
5949
+ ), Ee = Bt(
5950
5950
  t,
5951
5951
  l,
5952
5952
  t.authoredFrameSize ?? {
@@ -6404,7 +6404,7 @@ const Fb = He(function({
6404
6404
  if (window.removeEventListener("mousemove", Ce), window.removeEventListener("mouseup", it), !be) return;
6405
6405
  const tt = t.x ?? 0, nn = t.y ?? 0, dt = tt + (t.width ?? 390), Zn = nn + J;
6406
6406
  for (const [xn, xt] of Fu()) {
6407
- const Dt = xt.explicit ? 0 : Tu, $r = xt.x0 - Dt, mo = xt.y0 - Dt, go = xt.x1 + Dt, rn = xt.y1 + Dt;
6407
+ const zt = xt.explicit ? 0 : Tu, $r = xt.x0 - zt, mo = xt.y0 - zt, go = xt.x1 + zt, rn = xt.y1 + zt;
6408
6408
  if (xn !== t.section && tt < go && dt > $r && nn < rn && Zn > mo) {
6409
6409
  f.setPageSection(t.id, xn);
6410
6410
  break;
@@ -8093,7 +8093,7 @@ function hc({
8093
8093
  }
8094
8094
  }, z = a != null && a.isConnected ? a : null, gn = o != null && o.isConnected ? o : null, de = z != null && z.parentElement && z.parentElement !== Qe ? z.parentElement : null, gt = N === "container" && de ? de : z, ee = z ? Nt(z.getBoundingClientRect()) : null, G = de ? Nt(de.getBoundingClientRect()) : null, tn = N === "container" && gt && gt !== z ? Nt(gt.getBoundingClientRect()) : null, Ir = gn && gn !== z ? Nt(gn.getBoundingClientRect()) : null, ot = z ? je.getComputedStyle(z) : null, We = de ? je.getComputedStyle(de) : null, Xn = gt ? je.getComputedStyle(gt) : null, bt = z ? ct(z) : "", st = z ? kt(z) : null, Vt = z ? vh(z) : null, bn = z ? X.structuralEditKind(z) : null, Wi = z ? X.hasPendingValueEdit(z) : !1, Cr = z ? X.structuralBlockReason(z, "insert") : "No elements are selected.", po = z ? X.structuralBlockReason(z, "remove") : "No elements are selected.", $n = z ? X.structuralBlockReason(z, "move") : "No elements are selected.", Jn = z && z.parentElement ? Array.from(z.parentElement.children).indexOf(z) : -1, U = ((yl = z == null ? void 0 : z.parentElement) == null ? void 0 : yl.children.length) ?? 0, ie = st ? Je()[st.name] ?? null : null, Se = Vt && /^[A-Z]/.test(Vt.elementName) ? (st == null ? void 0 : st.name) ?? null : null, Le = z ? X.componentInsertBlockReason(z, Se) : "No elements are selected.", Re = fe.trim().toLocaleLowerCase(), be = en.filter(
8095
8095
  ([h, y]) => !Re || h.toLocaleLowerCase().includes(Re) || y.importPath.toLocaleLowerCase().includes(Re)
8096
- ), Ce = be.find(([h]) => h === ke) ?? be[0] ?? null, it = (Ce == null ? void 0 : Ce[1]) ?? null, tt = Ce ? Nl(Ce[0]) : null, dt = (z ? Il(z) : null) ?? 0, Zn = z ? mx(z, (st == null ? void 0 : st.props) ?? null, ie) : !1, xn = z ? gx(z, (st == null ? void 0 : st.props) ?? null, ie) : [], xt = z ? qu(z) : [], Dt = { count: xt.length }, $r = Ee && z && gn && gn !== z ? [z, gn] : null, mo = X.entries, go = Object.entries((st == null ? void 0 : st.primitiveProps) ?? {}), rn = _e, on = mo.reduce((h, y) => {
8096
+ ), Ce = be.find(([h]) => h === ke) ?? be[0] ?? null, it = (Ce == null ? void 0 : Ce[1]) ?? null, tt = Ce ? Nl(Ce[0]) : null, dt = (z ? Il(z) : null) ?? 0, Zn = z ? mx(z, (st == null ? void 0 : st.props) ?? null, ie) : !1, xn = z ? gx(z, (st == null ? void 0 : st.props) ?? null, ie) : [], xt = z ? qu(z) : [], zt = { count: xt.length }, $r = Ee && z && gn && gn !== z ? [z, gn] : null, mo = X.entries, go = Object.entries((st == null ? void 0 : st.primitiveProps) ?? {}), rn = _e, on = mo.reduce((h, y) => {
8097
8097
  const C = h.find((B) => B.el === y.el);
8098
8098
  return C ? (C.label = y.label, C.items.push(y)) : h.push({ id: y.id, el: y.el, label: y.label, items: [y] }), h;
8099
8099
  }, []), bo = rn.styles.length + rn.texts.length + rn.operations.length, xo = Ho() != null, Hi = xo && k !== ve, mf = on.filter(
@@ -8135,7 +8135,7 @@ function hc({
8135
8135
  ), Nf = Do(
8136
8136
  (de == null ? void 0 : de.style.getPropertyValue("height")) || "",
8137
8137
  (G == null ? void 0 : G.height) ?? 0
8138
- ), If = Do((z == null ? void 0 : z.style.getPropertyValue("width")) || "", (ee == null ? void 0 : ee.width) ?? 0), Cf = Do((z == null ? void 0 : z.style.getPropertyValue("height")) || "", (ee == null ? void 0 : ee.height) ?? 0), al = (ot == null ? void 0 : ot.getPropertyValue("align-self")) || "auto", $f = At(ot, "order"), kr = (z == null ? void 0 : z.style.getPropertyValue("grid-column")) || (ot == null ? void 0 : ot.getPropertyValue("grid-column")) || "auto", ll = Number(((wl = /span\s+(\d+)/.exec(kr)) == null ? void 0 : wl[1]) ?? 1), Yi = (ot == null ? void 0 : ot.getPropertyValue("position")) === "absolute", er = fs(de, (ee == null ? void 0 : ee.width) ?? 240), yt = v ?? Math.max(1, Dt.count), yo = Math.max(
8138
+ ), If = Do((z == null ? void 0 : z.style.getPropertyValue("width")) || "", (ee == null ? void 0 : ee.width) ?? 0), Cf = Do((z == null ? void 0 : z.style.getPropertyValue("height")) || "", (ee == null ? void 0 : ee.height) ?? 0), al = (ot == null ? void 0 : ot.getPropertyValue("align-self")) || "auto", $f = At(ot, "order"), kr = (z == null ? void 0 : z.style.getPropertyValue("grid-column")) || (ot == null ? void 0 : ot.getPropertyValue("grid-column")) || "auto", ll = Number(((wl = /span\s+(\d+)/.exec(kr)) == null ? void 0 : wl[1]) ?? 1), Yi = (ot == null ? void 0 : ot.getPropertyValue("position")) === "absolute", er = fs(de, (ee == null ? void 0 : ee.width) ?? 240), yt = v ?? Math.max(1, zt.count), yo = Math.max(
8139
8139
  0,
8140
8140
  ((G == null ? void 0 : G.width) ?? 0) - Ct.left - Ct.right
8141
8141
  ), Pf = Math.max(
@@ -8763,7 +8763,7 @@ function hc({
8763
8763
  /* @__PURE__ */ s("span", { className: `h-2 w-2 rounded-full ${Ki ? "bg-[#0d99ff]" : "bg-[#d4d4d8]"}` })
8764
8764
  ] }),
8765
8765
  /* @__PURE__ */ s("h2", { className: "truncate text-[14px] font-semibold", children: z ? bt : "Select a DOM element" }),
8766
- /* @__PURE__ */ s("p", { className: "mt-0.5 truncate text-[10px] text-[#71717a]", children: z ? `${Dt.count || 1} matching elements · Test realistic content states` : "Click an element on the canvas to inspect it" })
8766
+ /* @__PURE__ */ s("p", { className: "mt-0.5 truncate text-[10px] text-[#71717a]", children: z ? `${zt.count || 1} matching elements · Test realistic content states` : "Click an element on the canvas to inspect it" })
8767
8767
  ] }),
8768
8768
  /* @__PURE__ */ g("div", { className: "flex shrink-0 items-center gap-1", onMouseDown: (h) => h.stopPropagation(), children: [
8769
8769
  /* @__PURE__ */ s(
@@ -8867,7 +8867,7 @@ function hc({
8867
8867
  title: "Item count",
8868
8868
  action: /* @__PURE__ */ g("span", { className: "text-[10px] text-[#71717a]", children: [
8869
8869
  "Current: ",
8870
- Dt.count || 1
8870
+ zt.count || 1
8871
8871
  ] }),
8872
8872
  children: [
8873
8873
  /* @__PURE__ */ g("div", { className: "grid grid-cols-[32px_minmax(0,1fr)_32px] gap-1", children: [
@@ -8877,8 +8877,8 @@ function hc({
8877
8877
  type: "button",
8878
8878
  "aria-label": "Decrease item count",
8879
8879
  className: "h-8 rounded-md bg-[#f4f4f5] text-[16px] text-[#52525b] hover:bg-[#e9e9ee] disabled:text-[#c4c4c8]",
8880
- disabled: (v ?? (Dt.count || 1)) <= 1,
8881
- onClick: () => wo((v ?? (Dt.count || 1)) - 1),
8880
+ disabled: (v ?? (zt.count || 1)) <= 1,
8881
+ onClick: () => wo((v ?? (zt.count || 1)) - 1),
8882
8882
  children: "−"
8883
8883
  }
8884
8884
  ),
@@ -8892,7 +8892,7 @@ function hc({
8892
8892
  inputMode: "numeric",
8893
8893
  "aria-label": "Enter item count",
8894
8894
  value: v ?? "",
8895
- placeholder: String(Dt.count || 1),
8895
+ placeholder: String(zt.count || 1),
8896
8896
  className: "h-8 w-full rounded-md bg-[#f4f4f5] px-2 pr-8 text-center text-[12px] font-semibold tabular-nums text-[#18181b] outline-none focus:ring-1 focus:ring-inset focus:ring-[#0d99ff]",
8897
8897
  onChange: (h) => wo(h.currentTarget.value === "" ? null : Number(h.currentTarget.value))
8898
8898
  }
@@ -8905,7 +8905,7 @@ function hc({
8905
8905
  type: "button",
8906
8906
  "aria-label": "Increase item count",
8907
8907
  className: "h-8 rounded-md bg-[#f4f4f5] text-[16px] text-[#52525b] hover:bg-[#e9e9ee]",
8908
- onClick: () => wo((v ?? (Dt.count || 1)) + 1),
8908
+ onClick: () => wo((v ?? (zt.count || 1)) + 1),
8909
8909
  children: "+"
8910
8910
  }
8911
8911
  )
@@ -14925,11 +14925,11 @@ const bv = He(function({
14925
14925
  if (fe.id === f.activePageId) return 1;
14926
14926
  const ne = (F.canvas ?? "default") === f.activeCanvas, ke = (fe.canvas ?? "default") === f.activeCanvas;
14927
14927
  return ne !== ke ? ne ? -1 : 1 : 0;
14928
- }), b = m.map((F) => Ot(F, a)), x = [
14928
+ }), b = m.map((F) => Bt(F, a)), x = [
14929
14929
  ...new Set(
14930
14930
  m.flatMap((F) => [
14931
- Ot(F, a),
14932
- Ot(
14931
+ Bt(F, a),
14932
+ Bt(
14933
14933
  F,
14934
14934
  a,
14935
14935
  F.authoredFrameSize ?? {
@@ -14965,7 +14965,7 @@ const bv = He(function({
14965
14965
  } : null, O = new Map(f.pages.map((D) => [D.id, D])), $e = [];
14966
14966
  for (const D of f.pages) {
14967
14967
  if (D.route == null || D.layersImported || fo(D.importPageId ?? D.id)) continue;
14968
- const Pe = Ot(D, a), Oe = D.width ?? 390, oe = un(D), _e = (((Ae = D.interactions) == null ? void 0 : Ae.length) ?? 0) > 0, ve = D.importPageId ?? D.id, ye = Va(
14968
+ const Pe = Bt(D, a), Oe = D.width ?? 390, oe = un(D), _e = (((Ae = D.interactions) == null ? void 0 : Ae.length) ?? 0) > 0, ve = D.importPageId ?? D.id, ye = Va(
14969
14969
  {
14970
14970
  canonicalId: ve,
14971
14971
  route: D.route,
@@ -15010,7 +15010,7 @@ const bv = He(function({
15010
15010
  const Oe = Pe.width ?? 390, oe = un(Pe), _e = to(
15011
15011
  c,
15012
15012
  Pe.route,
15013
- Kt(
15013
+ Lt(
15014
15014
  fe,
15015
15015
  Cn(Pe)
15016
15016
  )
@@ -15090,7 +15090,7 @@ const bv = He(function({
15090
15090
  (Pe) => Pe.id === f.activePageId
15091
15091
  );
15092
15092
  return !D || D.route == null ? !1 : D.importLayers && !D.layersImported ? !0 : !D.layersImported && !Un(
15093
- Ot(D, a)
15093
+ Bt(D, a)
15094
15094
  );
15095
15095
  }
15096
15096
  });
@@ -16104,7 +16104,7 @@ function wv(e, t, n, r = xv) {
16104
16104
  url: to(
16105
16105
  t,
16106
16106
  i.route ?? "",
16107
- Kt(n, i.environment)
16107
+ Lt(n, i.environment)
16108
16108
  ),
16109
16109
  width: c,
16110
16110
  height: l
@@ -16541,7 +16541,7 @@ function Lc(e) {
16541
16541
  function kv(e) {
16542
16542
  return !!(e && typeof e == "object" && !Array.isArray(e));
16543
16543
  }
16544
- function Lt(e) {
16544
+ function Dt(e) {
16545
16545
  const t = e == null ? void 0 : e.trim();
16546
16546
  if (!t) return null;
16547
16547
  let n = t;
@@ -16553,7 +16553,7 @@ function Lt(e) {
16553
16553
  return n = n.split(/[?#]/, 1)[0].replace(/\/{2,}/g, "/"), n.startsWith("/") || (n = `/${n}`), n.length > 1 && (n = n.replace(/\/+$/, "")), n || "/";
16554
16554
  }
16555
16555
  function af(e) {
16556
- const t = Lt(e);
16556
+ const t = Dt(e);
16557
16557
  if (!t)
16558
16558
  throw new Error("A storyboard source route must be a non-empty path.");
16559
16559
  return `source-route:${encodeURIComponent(t)}`;
@@ -16573,7 +16573,7 @@ function il(e, t) {
16573
16573
  return o === r.length;
16574
16574
  }
16575
16575
  function Dc(e, t, n) {
16576
- const r = Lt(e);
16576
+ const r = Dt(e);
16577
16577
  if (!r) return [];
16578
16578
  const o = t.get(r);
16579
16579
  return o && !/[:*]/.test(r) ? [
@@ -16590,7 +16590,7 @@ function Av(e) {
16590
16590
  var n;
16591
16591
  const t = /* @__PURE__ */ new Map();
16592
16592
  for (const r of e ?? []) {
16593
- const o = Lt(r.path);
16593
+ const o = Dt(r.path);
16594
16594
  !o || t.has(o) || t.set(o, {
16595
16595
  id: af(o),
16596
16596
  name: o,
@@ -16625,17 +16625,17 @@ function Rv(e, t, n, r) {
16625
16625
  });
16626
16626
  }
16627
16627
  function Tv(e, t, n) {
16628
- const r = Lt(e.route);
16628
+ const r = Dt(e.route);
16629
16629
  if (!r) return [];
16630
16630
  const o = t.filter(
16631
16631
  (c) => {
16632
- const l = Lt(c.route);
16632
+ const l = Dt(c.route);
16633
16633
  return l ? il(l, r) : !1;
16634
16634
  }
16635
16635
  );
16636
16636
  if (!o.length) return [];
16637
16637
  const i = Lc(
16638
- Kt(n, e.environment)
16638
+ Lt(n, e.environment)
16639
16639
  ), a = o.filter(
16640
16640
  (c) => Lc(c.environment) === i
16641
16641
  );
@@ -16690,7 +16690,7 @@ function _i(e, t) {
16690
16690
  function Lv(e) {
16691
16691
  const t = /* @__PURE__ */ new Map();
16692
16692
  for (const n of e) {
16693
- const r = Lt(n.route);
16693
+ const r = Dt(n.route);
16694
16694
  if (!r) continue;
16695
16695
  const o = t.get(r);
16696
16696
  o ? o.push(n) : t.set(r, [n]);
@@ -16705,7 +16705,7 @@ function Lv(e) {
16705
16705
  function Dv(e) {
16706
16706
  const t = /* @__PURE__ */ new Map();
16707
16707
  for (const n of e) {
16708
- const r = Lt(n.route);
16708
+ const r = Dt(n.route);
16709
16709
  if (!r) continue;
16710
16710
  const o = t.get(r);
16711
16711
  o ? o.push(n.id) : t.set(r, [n.id]);
@@ -16742,14 +16742,14 @@ function _v(e, t) {
16742
16742
  function Ov(e, t) {
16743
16743
  const n = /* @__PURE__ */ new Map();
16744
16744
  for (const r of e) {
16745
- const o = Lt(r.route);
16745
+ const o = Dt(r.route);
16746
16746
  if (!o) continue;
16747
16747
  const i = `${o}\0${lf(r).join("")}`, a = n.get(i);
16748
16748
  a ? a.push(r) : n.set(i, [r]);
16749
16749
  }
16750
16750
  return [...n.values()].flatMap((r) => {
16751
16751
  if (r.length < 2) return [];
16752
- const o = Lt(r[0].route), i = t.get(o), a = r.find((c) => c.id === i) ?? [...r].sort(_i)[0];
16752
+ const o = Dt(r[0].route), i = t.get(o), a = r.find((c) => c.id === i) ?? [...r].sort(_i)[0];
16753
16753
  return r.filter((c) => c.id !== a.id).sort((c, l) => c.id.localeCompare(l.id)).map((c) => ({
16754
16754
  id: `discovery-variant:${encodeURIComponent(a.id)}:${encodeURIComponent(c.id)}`,
16755
16755
  from: a.id,
@@ -16761,7 +16761,7 @@ function Ov(e, t) {
16761
16761
  function Bv(e, t) {
16762
16762
  const n = /* @__PURE__ */ new Map();
16763
16763
  for (const r of e) {
16764
- const o = Lt(r.route);
16764
+ const o = Dt(r.route);
16765
16765
  if (!o) continue;
16766
16766
  const i = n.get(o);
16767
16767
  i ? i.push(r) : n.set(o, [r]);
@@ -16820,7 +16820,7 @@ function jv(e) {
16820
16820
  return [...t.values()].flatMap((r) => {
16821
16821
  const o = r[0], i = /* @__PURE__ */ new Map();
16822
16822
  for (const a of r) {
16823
- const c = Lt(a.route);
16823
+ const c = Dt(a.route);
16824
16824
  if (!c) continue;
16825
16825
  const l = i.get(c);
16826
16826
  l ? l.push(a) : i.set(c, [a]);
@@ -16842,10 +16842,10 @@ function jv(e) {
16842
16842
  }
16843
16843
  function Wv(e, t, n) {
16844
16844
  const r = new Set(
16845
- (t.routes ?? []).map((o) => Lt(o.path)).filter((o) => !!o)
16845
+ (t.routes ?? []).map((o) => Dt(o.path)).filter((o) => !!o)
16846
16846
  );
16847
16847
  return e.map((o) => {
16848
- const i = Lt(o.route);
16848
+ const i = Dt(o.route);
16849
16849
  if (!i || n.get(i) !== o.id)
16850
16850
  return o;
16851
16851
  const a = [...r].filter(
@@ -18247,8 +18247,8 @@ const Ow = {
18247
18247
  Promise.resolve().then(() => Vs),
18248
18248
  Promise.resolve().then(() => Mm),
18249
18249
  Promise.resolve().then(() => Sp),
18250
- import("./FrozenRoutePreview-C9535oYO.js").then((u) => u.b4),
18251
- import("./FrozenRoutePreview-C9535oYO.js").then((u) => u.b3)
18250
+ import("./FrozenRoutePreview-gn0xHRPG.js").then((u) => u.b4),
18251
+ import("./FrozenRoutePreview-gn0xHRPG.js").then((u) => u.b3)
18252
18252
  ]), a = i.getMountedShadowPreviewHandle(e), c = f.pages.find(
18253
18253
  (u) => u.id === e
18254
18254
  );
@@ -18406,7 +18406,7 @@ function Hw({
18406
18406
  route: K.route,
18407
18407
  width: K.width ?? 390,
18408
18408
  height: K.height ?? 600,
18409
- environment: Kt(
18409
+ environment: Lt(
18410
18410
  Xt(),
18411
18411
  K.environment
18412
18412
  ),
@@ -18742,7 +18742,7 @@ export {
18742
18742
  of as getViewportPresets,
18743
18743
  df as loadStoryboardDiscovery,
18744
18744
  Jw as mergeScreenPresets,
18745
- Kt as mergeStoryboardEnvironment,
18745
+ Lt as mergeStoryboardEnvironment,
18746
18746
  kw as publishStoryboardDiscovery,
18747
18747
  Bw as pygmalionNavigate,
18748
18748
  jw as pygmalionOpenPreview,