@brucesantos/design-space 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,113 +1,114 @@
1
- import { jsx as n, jsxs as x, Fragment as G } from "react/jsx-runtime";
2
- import { useState as z, useRef as q, useCallback as I, useEffect as K, useMemo as D, useContext as ft, createContext as wt, useLayoutEffect as Be } from "react";
3
- import { r as ye, s as gt, h as re, v as vt, a as ve, b as je, p as bt, P as $, c as qe, C as be, d as Ee, e as ae, t as ie, f as he, N as Ge, g as Ze, F as kt, i as Te, j as St, k as me, l as Ne, m as Ct, n as Fe, o as xt, q as Oe, u as yt, w as Nt, x as $t, y as Mt } from "./index-rWBjjVMg.js";
4
- import { H as Tn, z as Pn, A as _n, B as Rn, D as Fn, E as On, G as An, I as zn, J as Dn } from "./index-rWBjjVMg.js";
5
- import { createPortal as Lt } from "react-dom";
6
- function Et(e) {
7
- const t = e.scenarios ?? [], a = e.routes ?? [], r = e.components ?? [], o = new Map(t.map((i) => [i.id, i])), s = new Map(r.map((i) => [i.id, i])), d = new Map((e.personas ?? []).map((i) => [i.id, i])), l = new Map((e.fixtures ?? []).map((i) => [i.id, i])), p = new Map((e.rules ?? []).map((i) => [i.id, i])), h = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
8
- for (const i of t) {
9
- const w = ye(a, i.route ?? "");
10
- if (!w) continue;
11
- const S = w.definition.path;
12
- u.set(i.id, S);
13
- const M = h.get(S) ?? [];
14
- M.push(i), h.set(S, M);
1
+ import { jsx as o, jsxs as y, Fragment as G } from "react/jsx-runtime";
2
+ import { useState as D, useRef as q, useCallback as K, useEffect as V, useMemo as A, useContext as St, createContext as Ct, useLayoutEffect as qe } from "react";
3
+ import { r as Ne, s as yt, h as re, v as xt, a as be, b as Ge, p as Nt, P as M, c as Ze, C as ke, d as Pe, e as se, t as ie, f as he, N as Ye, g as Qe, F as $t, i as Re, j as Mt, k as me, l as $e, m as Et, n as ze, o as Lt, q as fe, u as Tt, w as Pt, x as Rt, y as _t } from "./index-CLox5DuH.js";
4
+ import { H as Zn, z as Yn, A as Qn, B as Xn, D as Jn, E as eo, G as to, I as no, J as oo } from "./index-CLox5DuH.js";
5
+ import { createPortal as Ft } from "react-dom";
6
+ import { r as Ot, i as zt, s as At } from "./hook-CeXcli-1.js";
7
+ function Dt(e) {
8
+ const t = e.scenarios ?? [], n = e.routes ?? [], r = e.components ?? [], s = new Map(t.map((d) => [d.id, d])), a = new Map(r.map((d) => [d.id, d])), c = new Map((e.personas ?? []).map((d) => [d.id, d])), l = new Map((e.fixtures ?? []).map((d) => [d.id, d])), h = new Map((e.rules ?? []).map((d) => [d.id, d])), p = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
9
+ for (const d of t) {
10
+ const g = Ne(n, d.route ?? "");
11
+ if (!g) continue;
12
+ const C = g.definition.path;
13
+ u.set(d.id, C);
14
+ const E = p.get(C) ?? [];
15
+ E.push(d), p.set(C, E);
15
16
  }
16
- const c = /* @__PURE__ */ new Set(), g = [];
17
- for (const i of a) {
18
- if (c.has(i.path)) continue;
19
- c.add(i.path);
20
- const w = h.get(i.path) ?? [];
21
- g.push({
22
- id: i.path,
23
- name: i.name?.trim() || w[0]?.title || i.path,
24
- description: i.description,
25
- route: i,
26
- href: gt(i.path, i.params),
27
- variations: w,
28
- group: i.group?.trim() || void 0,
29
- controls: Array.isArray(i.controls) ? i.controls : []
17
+ const i = /* @__PURE__ */ new Set(), f = [];
18
+ for (const d of n) {
19
+ if (i.has(d.path)) continue;
20
+ i.add(d.path);
21
+ const g = p.get(d.path) ?? [];
22
+ f.push({
23
+ id: d.path,
24
+ name: d.name?.trim() || g[0]?.title || d.path,
25
+ description: d.description,
26
+ route: d,
27
+ href: yt(d.path, d.params),
28
+ variations: g,
29
+ group: d.group?.trim() || void 0,
30
+ controls: Array.isArray(d.controls) ? d.controls : []
30
31
  });
31
32
  }
32
- const C = new Map(g.map((i) => [i.id, i])), N = (i) => i ? o.get(i) : void 0, E = (i) => i ? d.get(i) : void 0, R = E(e.defaultPersona)?.id, v = (i, w) => {
33
- if (!(!i || !w))
34
- return s.get(i)?.fixtures?.find((S) => S.id === w);
35
- }, L = (i = {}) => t.filter((w) => re(i.handoff, w.id)), b = (i) => {
36
- const w = ye(a, i);
37
- return w ? C.get(w.definition.path) : void 0;
38
- }, m = (i = {}) => {
39
- const { handoff: w } = i;
40
- return w ? g.map((S) => ({
41
- ...S,
42
- variations: S.variations.filter((M) => re(w, M.id))
33
+ const S = new Map(f.map((d) => [d.id, d])), N = (d) => d ? s.get(d) : void 0, $ = (d) => d ? c.get(d) : void 0, _ = $(e.defaultPersona)?.id, v = (d, g) => {
34
+ if (!(!d || !g))
35
+ return a.get(d)?.fixtures?.find((C) => C.id === g);
36
+ }, L = (d = {}) => t.filter((g) => re(d.handoff, g.id)), b = (d) => {
37
+ const g = Ne(n, d);
38
+ return g ? S.get(g.definition.path) : void 0;
39
+ }, m = (d = {}) => {
40
+ const { handoff: g } = d;
41
+ return g ? f.map((C) => ({
42
+ ...C,
43
+ variations: C.variations.filter((E) => re(g, E.id))
43
44
  })).filter(
44
- (S) => S.variations.length > 0 || (w.routes ?? []).length > 0 && je(w, S.href)
45
- ) : g;
46
- }, f = (i) => i ? i.permissions ? i.permissions : E(i.persona ?? R)?.permissions ?? [] : [], k = (i = {}) => Ye(m(i)), y = (i, w) => {
47
- const S = new Set(i?.route.components ?? []), M = w ? [w] : i?.variations ?? [];
48
- for (const F of M)
49
- for (const O of F.components ?? []) S.add(O);
50
- return [...S];
51
- }, T = (i) => r.filter((w) => ve(i, w.id));
45
+ (C) => C.variations.length > 0 || (g.routes ?? []).length > 0 && Ge(g, C.href)
46
+ ) : f;
47
+ }, w = (d) => d ? d.permissions ? d.permissions : $(d.persona ?? _)?.permissions ?? [] : [], k = (d = {}) => Xe(m(d)), x = (d, g) => {
48
+ const C = new Set(d?.route.components ?? []), E = g ? [g] : d?.variations ?? [];
49
+ for (const F of E)
50
+ for (const O of F.components ?? []) C.add(O);
51
+ return [...C];
52
+ }, T = (d) => r.filter((g) => be(d, g.id));
52
53
  return {
53
54
  product: e,
54
- screens: g,
55
- issues: vt(e),
56
- defaultPersona: R,
55
+ screens: f,
56
+ issues: xt(e),
57
+ defaultPersona: _,
57
58
  scenario: N,
58
- component: (i) => i ? s.get(i) : void 0,
59
+ component: (d) => d ? a.get(d) : void 0,
59
60
  componentFixture: v,
60
- resolveComponentFixture: (i, w) => {
61
- const S = i ? s.get(i) : void 0, M = v(i, w), F = v(i, S?.defaultFixture) ?? S?.fixtures?.[0];
61
+ resolveComponentFixture: (d, g) => {
62
+ const C = d ? a.get(d) : void 0, E = v(d, g), F = v(d, C?.defaultFixture) ?? C?.fixtures?.[0];
62
63
  return {
63
- fixture: M ?? F,
64
- requestedId: w,
65
- didFallback: !!(w && !M)
64
+ fixture: E ?? F,
65
+ requestedId: g,
66
+ didFallback: !!(g && !E)
66
67
  };
67
68
  },
68
- persona: E,
69
- fixture: (i) => i ? l.get(i) : void 0,
70
- rule: (i) => i ? p.get(i) : void 0,
71
- screen: (i) => i ? C.get(i) : void 0,
69
+ persona: $,
70
+ fixture: (d) => d ? l.get(d) : void 0,
71
+ rule: (d) => d ? h.get(d) : void 0,
72
+ screen: (d) => d ? S.get(d) : void 0,
72
73
  screenForPath: b,
73
- screenOf: (i) => {
74
- const w = i ? u.get(i.id) : void 0;
75
- return w ? C.get(w) : void 0;
74
+ screenOf: (d) => {
75
+ const g = d ? u.get(d.id) : void 0;
76
+ return g ? S.get(g) : void 0;
76
77
  },
77
78
  screensFor: m,
78
79
  flows: k,
79
- flowOf: (i, w) => {
80
- if (i)
81
- return k(w).find((S) => S.name === i.group);
80
+ flowOf: (d, g) => {
81
+ if (d)
82
+ return k(g).find((C) => C.name === d.group);
82
83
  },
83
- controlsOf: (i) => (i?.controls ?? []).flatMap((w) => w.controls ?? []),
84
- resolveControls: (i, w = {}) => Tt(i?.controls ?? [], w),
85
- rulesOf: (i) => (i?.rules ?? []).map((w) => p.get(w)).filter((w) => !!w),
86
- permissionsOf: f,
87
- scenariosForRoute: (i, w) => {
88
- const S = b(i);
89
- return S ? S.variations.filter((M) => re(w?.handoff, M.id)) : [];
84
+ controlsOf: (d) => (d?.controls ?? []).flatMap((g) => g.controls ?? []),
85
+ resolveControls: (d, g = {}) => It(d?.controls ?? [], g),
86
+ rulesOf: (d) => (d?.rules ?? []).map((g) => h.get(g)).filter((g) => !!g),
87
+ permissionsOf: w,
88
+ scenariosForRoute: (d, g) => {
89
+ const C = b(d);
90
+ return C ? C.variations.filter((E) => re(g?.handoff, E.id)) : [];
90
91
  },
91
92
  activeScenarios: L,
92
- search: (i, w) => {
93
- const S = X(i), M = L(w);
94
- return S ? M.filter(
93
+ search: (d, g) => {
94
+ const C = X(d), E = L(g);
95
+ return C ? E.filter(
95
96
  (F) => X(
96
97
  [
97
98
  F.title,
98
99
  F.id,
99
100
  F.intent ?? "",
100
101
  F.route,
101
- E(F.persona)?.name ?? "",
102
+ $(F.persona)?.name ?? "",
102
103
  (F.tags ?? []).join(" "),
103
104
  (F.expected ?? []).join(" ")
104
105
  ].join(" ")
105
- ).includes(S)
106
- ) : M;
106
+ ).includes(C)
107
+ ) : E;
107
108
  },
108
- searchScreens: (i, w) => {
109
- const S = X(i), M = m(w);
110
- return S ? M.filter(
109
+ searchScreens: (d, g) => {
110
+ const C = X(d), E = m(g);
111
+ return C ? E.filter(
111
112
  (F) => X(
112
113
  [
113
114
  F.name,
@@ -120,12 +121,12 @@ function Et(e) {
120
121
  (O.tags ?? []).join(" ")
121
122
  ])
122
123
  ].join(" ")
123
- ).includes(S)
124
- ) : M;
124
+ ).includes(C)
125
+ ) : E;
125
126
  },
126
- searchComponents: (i, w) => {
127
- const S = X(i), M = T(w);
128
- return S ? M.filter(
127
+ searchComponents: (d, g) => {
128
+ const C = X(d), E = T(g);
129
+ return C ? E.filter(
129
130
  (F) => X(
130
131
  [
131
132
  F.name,
@@ -134,125 +135,125 @@ function Et(e) {
134
135
  F.id,
135
136
  F.source ?? ""
136
137
  ].join(" ")
137
- ).includes(S)
138
- ) : M;
138
+ ).includes(C)
139
+ ) : E;
139
140
  },
140
141
  componentsFor: T,
141
- componentsOfScreen: (i, w) => y(i, w).map((S) => s.get(S)).filter((S) => !!S),
142
- usagesOf: (i, w) => i ? m(w).filter(
143
- (S) => S.route.components?.includes(i) || S.variations.some((M) => M.components?.includes(i))
142
+ componentsOfScreen: (d, g) => x(d, g).map((C) => a.get(C)).filter((C) => !!C),
143
+ usagesOf: (d, g) => d ? m(g).filter(
144
+ (C) => C.route.components?.includes(d) || C.variations.some((E) => E.components?.includes(d))
144
145
  ) : []
145
146
  };
146
147
  }
147
148
  function X(e) {
148
149
  return e.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, "").trim();
149
150
  }
150
- function Ye(e) {
151
- const t = [], a = /* @__PURE__ */ new Map();
152
- for (const o of e) {
153
- if (!o.group) {
154
- t.push(o);
151
+ function Xe(e) {
152
+ const t = [], n = /* @__PURE__ */ new Map();
153
+ for (const s of e) {
154
+ if (!s.group) {
155
+ t.push(s);
155
156
  continue;
156
157
  }
157
- const s = a.get(o.group) ?? [];
158
- s.push(o), a.set(o.group, s);
158
+ const a = n.get(s.group) ?? [];
159
+ a.push(s), n.set(s.group, a);
159
160
  }
160
- const r = [...a].map(([o, s]) => ({ name: o, screens: s }));
161
+ const r = [...n].map(([s, a]) => ({ name: s, screens: a }));
161
162
  return t.length > 0 ? [{ name: void 0, screens: t }, ...r] : r;
162
163
  }
163
- function ke(e) {
164
+ function Se(e) {
164
165
  const t = e.options ?? [];
165
- return e.default !== void 0 && t.some((a) => a.value === e.default) ? e.default : t[0]?.value ?? "";
166
- }
167
- function Tt(e, t = {}) {
168
- const a = {}, r = [], o = /* @__PURE__ */ new Set(), s = t.requested ?? {};
169
- for (const d of e)
170
- for (const l of d.controls ?? []) {
171
- if (o.has(l.id)) continue;
172
- o.add(l.id);
173
- const p = (g) => g !== void 0 && (l.options ?? []).some((C) => C.value === g);
174
- let h = ke(l);
166
+ return e.default !== void 0 && t.some((n) => n.value === e.default) ? e.default : t[0]?.value ?? "";
167
+ }
168
+ function It(e, t = {}) {
169
+ const n = {}, r = [], s = /* @__PURE__ */ new Set(), a = t.requested ?? {};
170
+ for (const c of e)
171
+ for (const l of c.controls ?? []) {
172
+ if (s.has(l.id)) continue;
173
+ s.add(l.id);
174
+ const h = (f) => f !== void 0 && (l.options ?? []).some((S) => S.value === f);
175
+ let p = Se(l);
175
176
  const u = t.scenario?.controls?.[l.id];
176
- p(u) && (h = u);
177
- const c = s[l.id];
178
- c !== void 0 && (p(c) ? h = c : r.push({ id: l.id, value: c, reason: "invalid-value", fallback: h })), a[l.id] = h;
177
+ h(u) && (p = u);
178
+ const i = a[l.id];
179
+ i !== void 0 && (h(i) ? p = i : r.push({ id: l.id, value: i, reason: "invalid-value", fallback: p })), n[l.id] = p;
179
180
  }
180
- for (const [d, l] of Object.entries(s))
181
- o.has(d) || r.push({ id: d, value: l, reason: "unknown-control" });
182
- return { values: a, invalid: r };
181
+ for (const [c, l] of Object.entries(a))
182
+ s.has(c) || r.push({ id: c, value: l, reason: "unknown-control" });
183
+ return { values: n, invalid: r };
183
184
  }
184
- function Pt(e, t) {
185
- return e ? Object.entries(e.controls ?? {}).every(([a, r]) => t?.[a] === r) : !1;
185
+ function Ut(e, t) {
186
+ return e ? Object.entries(e.controls ?? {}).every(([n, r]) => t?.[n] === r) : !1;
186
187
  }
187
- const _t = [
188
+ const Vt = [
188
189
  { id: "mobile", label: "Celular", width: 375, height: 812 },
189
190
  { id: "tablet", label: "Tablet", width: 768, height: 1024 },
190
191
  { id: "desktop", label: "Desktop", width: 1280, height: 800 },
191
192
  { id: "fit", label: "Ajustar" },
192
193
  { id: "custom", label: "Personalizado" }
193
- ], Pe = 25, _e = 150, fe = 100;
194
- function Qe(e, t, a) {
195
- const r = a !== void 0 ? e.screenForPath(a) : e.screenOf(t), o = t && r && e.screenOf(t)?.id === r.id ? t : void 0;
196
- return { screen: r, scenario: o };
197
- }
198
- function $e(e, t, a) {
199
- const r = new URLSearchParams(e), o = bt(r), s = r.get($.component) ?? void 0, d = ve(o, s) ? t.component(s) : void 0, l = r.get($.scenario) ?? void 0, p = d || !re(o, l) ? void 0 : t.scenario(l), h = r.get($.fixture) ?? void 0, u = d ? h ?? t.componentFixture(d.id, d.defaultFixture)?.id ?? d.fixtures?.[0]?.id : void 0, c = r.get($.network), g = d ? void 0 : Qe(t, p, a), C = g?.screen && g.screen.controls.length > 0 ? t.resolveControls(g.screen, {
200
- scenario: g.scenario,
201
- requested: qe(r)
194
+ ], _e = 25, Fe = 150, we = 100;
195
+ function Je(e, t, n) {
196
+ const r = n !== void 0 ? e.screenForPath(n) : e.screenOf(t), s = t && r && e.screenOf(t)?.id === r.id ? t : void 0;
197
+ return { screen: r, scenario: s };
198
+ }
199
+ function Me(e, t, n) {
200
+ const r = new URLSearchParams(e), s = Nt(r), a = r.get(M.component) ?? void 0, c = be(s, a) ? t.component(a) : void 0, l = r.get(M.scenario) ?? void 0, h = c || !re(s, l) ? void 0 : t.scenario(l), p = r.get(M.fixture) ?? void 0, u = c ? p ?? t.componentFixture(c.id, c.defaultFixture)?.id ?? c.fixtures?.[0]?.id : void 0, i = r.get(M.network), f = c ? void 0 : Je(t, h, n), S = f?.screen && f.screen.controls.length > 0 ? t.resolveControls(f.screen, {
201
+ scenario: f.scenario,
202
+ requested: Ze(r)
202
203
  }).values : void 0;
203
204
  return {
204
- scenario: p?.id,
205
- handoff: o,
206
- component: d?.id,
205
+ scenario: h?.id,
206
+ handoff: s,
207
+ component: c?.id,
207
208
  // Precedência: URL, cenário, padrão do produto. O preview de componente não
208
209
  // tem persona, então o padrão não se aplica a ele.
209
- persona: r.get($.persona) ?? p?.persona ?? (d ? void 0 : t.defaultPersona),
210
- fixture: d ? u : h ?? p?.fixture,
211
- network: zt(c) ? c : p?.network ?? "success",
212
- viewport: r.get($.viewport) ?? "fit",
213
- customWidth: Vt(r.get($.customWidth)),
214
- themeMode: r.get($.themeMode) ?? t.product.theme?.modes?.[0],
215
- locale: r.get($.locale) ?? t.product.theme?.locales?.[0],
216
- dataSource: r.get($.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
210
+ persona: r.get(M.persona) ?? h?.persona ?? (c ? void 0 : t.defaultPersona),
211
+ fixture: c ? u : p ?? h?.fixture,
212
+ network: jt(i) ? i : h?.network ?? "success",
213
+ viewport: r.get(M.viewport) ?? "fit",
214
+ customWidth: Zt(r.get(M.customWidth)),
215
+ themeMode: r.get(M.themeMode) ?? t.product.theme?.modes?.[0],
216
+ locale: r.get(M.locale) ?? t.product.theme?.locales?.[0],
217
+ dataSource: r.get(M.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
217
218
  // Sem parâmetro, o tema do chrome fica em aberto: o shell resolve pela
218
219
  // última escolha da pessoa e, na falta dela, pelo sistema.
219
- chromeTheme: Dt(r.get($.chromeTheme)) ? r.get($.chromeTheme) : void 0,
220
+ chromeTheme: qt(r.get(M.chromeTheme)) ? r.get(M.chromeTheme) : void 0,
220
221
  // Chrome visível por padrão. `?chrome=0` é o modo de revisão limpa e captura
221
222
  // de tela, então precisa ser explícito para não sumir sem pedido.
222
- chrome: r.get($.chrome) !== "0",
223
- inspector: r.get($.inspector) !== "0",
224
- panelTab: Ut(r.get($.panelTab)) ? r.get($.panelTab) : "variations",
225
- zoom: et(r.get($.zoom)),
226
- rotated: r.get($.rotated) === "1",
227
- highlight: r.get($.highlight) === "1",
228
- screenControls: C
223
+ chrome: r.get(M.chrome) !== "0",
224
+ inspector: r.get(M.inspector) !== "0",
225
+ panelTab: Gt(r.get(M.panelTab)) ? r.get(M.panelTab) : "variations",
226
+ zoom: nt(r.get(M.zoom)),
227
+ rotated: r.get(M.rotated) === "1",
228
+ highlight: r.get(M.highlight) === "1",
229
+ screenControls: S
229
230
  };
230
231
  }
231
- function se(e, t, a) {
232
- const r = new URLSearchParams(), o = t.scenario(e.scenario);
233
- if (e.component ? r.set($.component, e.component) : e.scenario && r.set($.scenario, e.scenario), e.persona && e.persona !== (o?.persona ?? t.defaultPersona) && r.set($.persona, e.persona), e.component && e.fixture ? r.set($.fixture, e.fixture) : e.fixture && e.fixture !== o?.fixture && r.set($.fixture, e.fixture), e.network !== (o?.network ?? "success") && r.set($.network, e.network), e.screenControls && !e.component) {
234
- const u = Qe(t, o, a), c = u.screen ? t.resolveControls(u.screen, { scenario: u.scenario }).values : {}, g = u.screen ? t.controlsOf(u.screen).map((C) => C.id) : Object.keys(e.screenControls);
235
- for (const C of g) {
236
- const N = e.screenControls[C];
237
- N !== void 0 && N !== c[C] && r.set(`${be}${C}`, N);
232
+ function ae(e, t, n) {
233
+ const r = new URLSearchParams(), s = t.scenario(e.scenario);
234
+ if (e.component ? r.set(M.component, e.component) : e.scenario && r.set(M.scenario, e.scenario), e.persona && e.persona !== (s?.persona ?? t.defaultPersona) && r.set(M.persona, e.persona), e.component && e.fixture ? r.set(M.fixture, e.fixture) : e.fixture && e.fixture !== s?.fixture && r.set(M.fixture, e.fixture), e.network !== (s?.network ?? "success") && r.set(M.network, e.network), e.screenControls && !e.component) {
235
+ const u = Je(t, s, n), i = u.screen ? t.resolveControls(u.screen, { scenario: u.scenario }).values : {}, f = u.screen ? t.controlsOf(u.screen).map((S) => S.id) : Object.keys(e.screenControls);
236
+ for (const S of f) {
237
+ const N = e.screenControls[S];
238
+ N !== void 0 && N !== i[S] && r.set(`${ke}${S}`, N);
238
239
  }
239
240
  }
240
- e.viewport !== "fit" && r.set($.viewport, e.viewport), e.viewport === "custom" && e.customWidth && r.set($.customWidth, String(e.customWidth));
241
- const s = t.product.theme?.modes?.[0];
242
- e.themeMode && e.themeMode !== s && r.set($.themeMode, e.themeMode);
243
- const d = t.product.theme?.locales?.[0];
244
- e.locale && e.locale !== d && r.set($.locale, e.locale);
241
+ e.viewport !== "fit" && r.set(M.viewport, e.viewport), e.viewport === "custom" && e.customWidth && r.set(M.customWidth, String(e.customWidth));
242
+ const a = t.product.theme?.modes?.[0];
243
+ e.themeMode && e.themeMode !== a && r.set(M.themeMode, e.themeMode);
244
+ const c = t.product.theme?.locales?.[0];
245
+ e.locale && e.locale !== c && r.set(M.locale, e.locale);
245
246
  const l = t.product.dataSources?.default ?? "fixtures";
246
- e.dataSource && e.dataSource !== l && r.set($.dataSource, e.dataSource), e.chromeTheme && r.set($.chromeTheme, e.chromeTheme), e.chrome || r.set($.chrome, "0"), e.inspector || r.set($.inspector, "0"), e.panelTab === "info" && r.set($.panelTab, "info");
247
- const p = et(e.zoom === void 0 ? null : String(e.zoom));
248
- p !== fe && r.set($.zoom, String(p)), e.rotated && r.set($.rotated, "1"), e.highlight && r.set($.highlight, "1"), Ee(r, e.handoff);
249
- const h = r.toString();
250
- return h ? `?${h}` : "";
251
- }
252
- function Xe(e, t = {}) {
253
- const a = !!t.frame, [r, o] = z(() => Se()), s = q(r), d = I((m) => {
254
- s.current = m, o(m);
255
- }, []), l = q(!1), p = I((m) => {
247
+ e.dataSource && e.dataSource !== l && r.set(M.dataSource, e.dataSource), e.chromeTheme && r.set(M.chromeTheme, e.chromeTheme), e.chrome || r.set(M.chrome, "0"), e.inspector || r.set(M.inspector, "0"), e.panelTab === "info" && r.set(M.panelTab, "info");
248
+ const h = nt(e.zoom === void 0 ? null : String(e.zoom));
249
+ h !== we && r.set(M.zoom, String(h)), e.rotated && r.set(M.rotated, "1"), e.highlight && r.set(M.highlight, "1"), Pe(r, e.handoff);
250
+ const p = r.toString();
251
+ return p ? `?${p}` : "";
252
+ }
253
+ function et(e, t = {}) {
254
+ const n = !!t.frame, [r, s] = D(() => Ce()), a = q(r), c = K((m) => {
255
+ a.current = m, s(m);
256
+ }, []), l = q(!1), h = K((m) => {
256
257
  l.current = !0;
257
258
  try {
258
259
  window.history.replaceState(null, "", m);
@@ -260,113 +261,113 @@ function Xe(e, t = {}) {
260
261
  l.current = !1;
261
262
  }
262
263
  }, []);
263
- K(() => {
264
- const m = () => d(Se());
264
+ V(() => {
265
+ const m = () => c(Ce());
265
266
  return window.addEventListener("popstate", m), () => window.removeEventListener("popstate", m);
266
- }, [d]), K(() => {
267
- if (!a) return;
268
- const m = window.history, { pushState: f, replaceState: k } = m, y = (T) => {
269
- const i = s.current;
270
- if (window.location.pathname !== i.path) return !1;
271
- const w = Ae(i.search, he(window.location.href).search), S = ie(i.path, w);
272
- if (`${window.location.pathname}${window.location.search}` !== S && k.call(m, m.state, "", `${S}${window.location.hash}`), w === i.search) return !0;
273
- const F = { path: i.path, search: w };
274
- return s.current = F, queueMicrotask(() => {
275
- s.current === F && (o(F), ae(
267
+ }, [c]), V(() => {
268
+ if (!n) return;
269
+ const m = window.history, { pushState: w, replaceState: k } = m, x = (T) => {
270
+ const d = a.current;
271
+ if (window.location.pathname !== d.path) return !1;
272
+ const g = Ae(d.search, he(window.location.href).search), C = ie(d.path, g);
273
+ if (`${window.location.pathname}${window.location.search}` !== C && k.call(m, m.state, "", `${C}${window.location.hash}`), g === d.search) return !0;
274
+ const F = { path: d.path, search: g };
275
+ return a.current = F, queueMicrotask(() => {
276
+ a.current === F && (s(F), se(
276
277
  window.parent === window ? void 0 : window.parent,
277
- { ds: 1, type: "navigate", url: S, replace: T },
278
+ { ds: 1, type: "navigate", url: C, replace: T },
278
279
  window.location.origin
279
280
  ));
280
281
  }), !0;
281
282
  };
282
- return m.replaceState = function(T, i, w) {
283
- k.call(m, T, i, w), l.current || y(!0);
284
- }, m.pushState = function(T, i, w) {
285
- const S = `${window.location.pathname}${window.location.search}${window.location.hash}`;
286
- k.call(m, T, i, w), !y(!1) && (k.call(m, m.state, "", S), f.call(m, T, i, w));
287
- }, y(!0), () => {
288
- m.pushState = f, m.replaceState = k;
283
+ return m.replaceState = function(T, d, g) {
284
+ k.call(m, T, d, g), l.current || x(!0);
285
+ }, m.pushState = function(T, d, g) {
286
+ const C = `${window.location.pathname}${window.location.search}${window.location.hash}`;
287
+ k.call(m, T, d, g), !x(!1) && (k.call(m, m.state, "", C), w.call(m, T, d, g));
288
+ }, x(!0), () => {
289
+ m.pushState = w, m.replaceState = k;
289
290
  };
290
- }, [a]), K(() => {
291
- if (!a || window.parent === window) return;
292
- const m = window.location.origin, f = (y) => {
293
- const T = Ze(y, { origin: m, source: window.parent });
291
+ }, [n]), V(() => {
292
+ if (!n || window.parent === window) return;
293
+ const m = window.location.origin, w = (x) => {
294
+ const T = Qe(x, { origin: m, source: window.parent });
294
295
  if (T?.type !== "location") return;
295
- const { path: i, search: w } = he(T.url);
296
- p(ie(i, w)), d({ path: i, search: w });
296
+ const { path: d, search: g } = he(T.url);
297
+ h(ie(d, g)), c({ path: d, search: g });
297
298
  };
298
- window.addEventListener("message", f);
299
- const k = Se();
300
- return ae(
299
+ window.addEventListener("message", w);
300
+ const k = Ce();
301
+ return se(
301
302
  window.parent,
302
303
  { ds: 1, type: "ready", url: ie(k.path, k.search) },
303
304
  m
304
- ), () => window.removeEventListener("message", f);
305
- }, [a, d, p]);
306
- const h = D(
307
- () => $e(r.search, e, r.path),
305
+ ), () => window.removeEventListener("message", w);
306
+ }, [n, c, h]);
307
+ const p = A(
308
+ () => Me(r.search, e, r.path),
308
309
  [r.path, r.search, e]
309
- ), u = I(
310
- (m, f, k = !1) => {
311
- if (a) {
312
- const T = ie(m, f), i = he(T);
313
- p(T), d(i), ae(
310
+ ), u = K(
311
+ (m, w, k = !1) => {
312
+ if (n) {
313
+ const T = ie(m, w), d = he(T);
314
+ h(T), c(d), se(
314
315
  window.parent === window ? void 0 : window.parent,
315
316
  { ds: 1, type: "navigate", url: T, replace: k },
316
317
  window.location.origin
317
318
  );
318
319
  return;
319
320
  }
320
- const y = `${m}${f}`;
321
- k ? window.history.replaceState(null, "", y) : window.history.pushState(null, "", y), d({ path: m, search: f });
321
+ const x = `${m}${w}`;
322
+ k ? window.history.replaceState(null, "", x) : window.history.pushState(null, "", x), c({ path: m, search: w });
322
323
  },
323
- [a, d, p]
324
- ), c = I(() => {
325
- const m = s.current;
326
- return m === r ? h : $e(m.search, e, m.path);
327
- }, [h, r, e]), g = I(
324
+ [n, c, h]
325
+ ), i = K(() => {
326
+ const m = a.current;
327
+ return m === r ? p : Me(m.search, e, m.path);
328
+ }, [p, r, e]), f = K(
328
329
  (m) => {
329
- const f = s.current, k = { ...c(), ...m }, y = Ae(se(k, e, f.path), f.search);
330
- y !== f.search && u(f.path, y, !0);
330
+ const w = a.current, k = { ...i(), ...m }, x = Ae(ae(k, e, w.path), w.search);
331
+ x !== w.search && u(w.path, x, !0);
331
332
  },
332
- [c, u, e]
333
- ), C = I(
333
+ [i, u, e]
334
+ ), S = K(
334
335
  (m) => {
335
- const f = c().screenControls ?? {};
336
- Object.entries(m).some(([y, T]) => f[y] !== T) && g({ screenControls: { ...f, ...m } });
336
+ const w = i().screenControls ?? {};
337
+ Object.entries(m).some(([x, T]) => w[x] !== T) && f({ screenControls: { ...w, ...m } });
337
338
  },
338
- [c, g]
339
- ), N = I(
340
- (m, f) => {
341
- const k = Rt(m, s.current, e, {
342
- controls: f?.controls
339
+ [i, f]
340
+ ), N = K(
341
+ (m, w) => {
342
+ const k = Kt(m, a.current, e, {
343
+ controls: w?.controls
343
344
  });
344
- u(k.path, k.search, f?.replace ?? !1);
345
+ u(k.path, k.search, w?.replace ?? !1);
345
346
  },
346
347
  [u, e]
347
- ), E = I(
348
+ ), $ = K(
348
349
  (m) => {
349
- const f = e.scenario(m);
350
- if (!f || !re(h.handoff, m)) return;
350
+ const w = e.scenario(m);
351
+ if (!w || !re(p.handoff, m)) return;
351
352
  const k = {
352
- ...h,
353
- scenario: f.id,
353
+ ...p,
354
+ scenario: w.id,
354
355
  component: void 0,
355
- persona: f.persona,
356
- fixture: f.fixture,
357
- network: f.network ?? "success",
356
+ persona: w.persona,
357
+ fixture: w.fixture,
358
+ network: w.network ?? "success",
358
359
  // Os controles voltam ao que o cenário fixa, sobre os padrões da tela.
359
360
  screenControls: void 0
360
361
  };
361
- u(f.route, se(k, e, f.route), !1);
362
+ u(w.route, ae(k, e, w.route), !1);
362
363
  },
363
- [h, u, e]
364
- ), R = I(
365
- (m, f) => {
364
+ [p, u, e]
365
+ ), _ = K(
366
+ (m, w) => {
366
367
  const k = e.component(m);
367
- if (!k || !ve(h.handoff, m)) return;
368
- const y = {
369
- ...h,
368
+ if (!k || !be(p.handoff, m)) return;
369
+ const x = {
370
+ ...p,
370
371
  scenario: void 0,
371
372
  component: k.id,
372
373
  persona: void 0,
@@ -374,29 +375,29 @@ function Xe(e, t = {}) {
374
375
  network: "success",
375
376
  screenControls: void 0
376
377
  };
377
- y.fixture = e.componentFixture(k.id, k.defaultFixture)?.id ?? k.fixtures?.[0]?.id, u("/", se(y, e), f?.replace ?? !1);
378
+ x.fixture = e.componentFixture(k.id, k.defaultFixture)?.id ?? k.fixtures?.[0]?.id, u("/", ae(x, e), w?.replace ?? !1);
378
379
  },
379
- [h, u, e]
380
- ), v = I(
381
- (m, f) => {
382
- const k = e.screensFor({ handoff: h.handoff }).find((i) => i.id === m);
380
+ [p, u, e]
381
+ ), v = K(
382
+ (m, w) => {
383
+ const k = e.screensFor({ handoff: p.handoff }).find((d) => d.id === m);
383
384
  if (!k) return;
384
- const y = k.variations[0];
385
- if (y) {
386
- const i = {
387
- ...h,
388
- scenario: y.id,
385
+ const x = k.variations[0];
386
+ if (x) {
387
+ const d = {
388
+ ...p,
389
+ scenario: x.id,
389
390
  component: void 0,
390
- persona: y.persona,
391
- fixture: y.fixture,
392
- network: y.network ?? "success",
391
+ persona: x.persona,
392
+ fixture: x.fixture,
393
+ network: x.network ?? "success",
393
394
  screenControls: void 0
394
395
  };
395
- u(y.route, se(i, e, y.route), f?.replace ?? !1);
396
+ u(x.route, ae(d, e, x.route), w?.replace ?? !1);
396
397
  return;
397
398
  }
398
399
  const T = {
399
- ...h,
400
+ ...p,
400
401
  scenario: void 0,
401
402
  component: void 0,
402
403
  persona: void 0,
@@ -404,161 +405,161 @@ function Xe(e, t = {}) {
404
405
  network: "success",
405
406
  screenControls: void 0
406
407
  };
407
- u(k.href, se(T, e, k.href), f?.replace ?? !1);
408
+ u(k.href, ae(T, e, k.href), w?.replace ?? !1);
408
409
  },
409
- [h, u, e]
410
- ), L = I(
411
- (m, f, k) => u(m || "/", f, k?.replace ?? !1),
410
+ [p, u, e]
411
+ ), L = K(
412
+ (m, w, k) => u(m || "/", w, k?.replace ?? !1),
412
413
  [u]
413
- ), b = D(() => At(h), [h]);
414
+ ), b = A(() => Bt(p), [p]);
414
415
  return {
415
416
  location: r,
416
- controls: h,
417
+ controls: p,
417
418
  viewport: b,
418
- setControls: g,
419
- setScreenControls: C,
419
+ setControls: f,
420
+ setScreenControls: S,
420
421
  navigate: N,
421
- openScenario: E,
422
- openComponent: R,
422
+ openScenario: $,
423
+ openComponent: _,
423
424
  openScreen: v,
424
425
  go: L
425
426
  };
426
427
  }
427
- function Rt(e, t, a, r = {}) {
428
- const o = e.split("#")[0] ?? e, s = o.indexOf("?"), d = (s === -1 ? o : o.slice(0, s)) || "/", l = s === -1 ? void 0 : o.slice(s + 1), p = new URLSearchParams(t.search), h = $e(t.search, a, t.path), u = !Ft(a, d, t.path);
429
- let c;
428
+ function Kt(e, t, n, r = {}) {
429
+ const s = e.split("#")[0] ?? e, a = s.indexOf("?"), c = (a === -1 ? s : s.slice(0, a)) || "/", l = a === -1 ? void 0 : s.slice(a + 1), h = new URLSearchParams(t.search), p = Me(t.search, n, t.path), u = !Ht(n, c, t.path);
430
+ let i;
430
431
  if (l === void 0 && r.controls === void 0)
431
- c = new URLSearchParams(t.search), u && (St(c), Je(c));
432
+ i = new URLSearchParams(t.search), u && (Mt(i), tt(i));
432
433
  else {
433
- const C = new URLSearchParams(l ?? "");
434
- c = new URLSearchParams();
435
- for (const [N, E] of p)
436
- !Ot(N) || C.has(N) || u && !Te(N) || c.append(N, E);
437
- h.scenario && !C.has($.scenario) && h.persona && h.persona !== a.defaultPersona && !c.has($.persona) && !C.has($.persona) && c.set($.persona, h.persona);
438
- for (const [N, E] of C) c.append(N, E);
434
+ const S = new URLSearchParams(l ?? "");
435
+ i = new URLSearchParams();
436
+ for (const [N, $] of h)
437
+ !Wt(N) || S.has(N) || u && !Re(N) || i.append(N, $);
438
+ p.scenario && !S.has(M.scenario) && p.persona && p.persona !== n.defaultPersona && !i.has(M.persona) && !S.has(M.persona) && i.set(M.persona, p.persona);
439
+ for (const [N, $] of S) i.append(N, $);
439
440
  if (r.controls) {
440
- const N = a.screenForPath(d), E = a.scenario(c.get($.scenario) ?? void 0), R = E && N && a.screenOf(E)?.id === N.id ? E : void 0, v = N ? a.resolveControls(N, { scenario: R }).values : {};
441
+ const N = n.screenForPath(c), $ = n.scenario(i.get(M.scenario) ?? void 0), _ = $ && N && n.screenOf($)?.id === N.id ? $ : void 0, v = N ? n.resolveControls(N, { scenario: _ }).values : {};
441
442
  for (const [L, b] of Object.entries(r.controls)) {
442
- const m = `${be}${L}`;
443
- v[L] === b ? c.delete(m) : c.set(m, b);
443
+ const m = `${ke}${L}`;
444
+ v[L] === b ? i.delete(m) : i.set(m, b);
444
445
  }
445
446
  }
446
447
  }
447
- h.handoff && Ee(c, h.handoff);
448
- const g = c.toString();
449
- return { path: d, search: g ? `?${g}` : "" };
448
+ p.handoff && Pe(i, p.handoff);
449
+ const f = i.toString();
450
+ return { path: c, search: f ? `?${f}` : "" };
450
451
  }
451
452
  function Ae(e, t) {
452
- const a = new URLSearchParams(e);
453
- Je(a);
454
- for (const [o, s] of new URLSearchParams(t))
455
- o === kt || Te(o) || a.append(o, s);
456
- const r = a.toString();
453
+ const n = new URLSearchParams(e);
454
+ tt(n);
455
+ for (const [s, a] of new URLSearchParams(t))
456
+ s === $t || Re(s) || n.append(s, a);
457
+ const r = n.toString();
457
458
  return r ? `?${r}` : "";
458
459
  }
459
- function Je(e) {
460
+ function tt(e) {
460
461
  for (const t of [...e.keys()])
461
- Te(t) || e.delete(t);
462
+ Re(t) || e.delete(t);
462
463
  }
463
- function Ft(e, t, a) {
464
- const r = e.screenForPath(t)?.id, o = e.screenForPath(a)?.id;
465
- return r === void 0 && o === void 0 ? t === a : r === o;
464
+ function Ht(e, t, n) {
465
+ const r = e.screenForPath(t)?.id, s = e.screenForPath(n)?.id;
466
+ return r === void 0 && s === void 0 ? t === n : r === s;
466
467
  }
467
- function Ot(e) {
468
- return e.startsWith(be) ? !1 : e !== $.scenario && e !== $.fixture && e !== $.component;
468
+ function Wt(e) {
469
+ return e.startsWith(ke) ? !1 : e !== M.scenario && e !== M.fixture && e !== M.component;
469
470
  }
470
- function At(e) {
471
+ function Bt(e) {
471
472
  if (e.viewport === "custom")
472
473
  return { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 };
473
- const t = _t.find((a) => a.id === e.viewport) ?? {
474
+ const t = Vt.find((n) => n.id === e.viewport) ?? {
474
475
  id: "fit",
475
476
  label: "Ajustar"
476
477
  };
477
478
  return e.rotated && t.width && t.height ? { ...t, width: t.height, height: t.width } : { ...t };
478
479
  }
479
- function et(e) {
480
- if (e === null) return fe;
480
+ function nt(e) {
481
+ if (e === null) return we;
481
482
  const t = Number.parseInt(e, 10);
482
- return Number.isFinite(t) ? Math.min(_e, Math.max(Pe, t)) : fe;
483
+ return Number.isFinite(t) ? Math.min(Fe, Math.max(_e, t)) : we;
483
484
  }
484
- function Se() {
485
+ function Ce() {
485
486
  return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
486
487
  }
487
- function zt(e) {
488
- return e !== null && Ge.includes(e);
488
+ function jt(e) {
489
+ return e !== null && Ye.includes(e);
489
490
  }
490
- function Dt(e) {
491
+ function qt(e) {
491
492
  return e === "dark" || e === "light";
492
493
  }
493
- function Ut(e) {
494
+ function Gt(e) {
494
495
  return e === "variations" || e === "info";
495
496
  }
496
- function Vt(e) {
497
+ function Zt(e) {
497
498
  if (!e) return;
498
499
  const t = Number.parseInt(e, 10);
499
500
  return Number.isFinite(t) && t > 0 ? t : void 0;
500
501
  }
501
- const Kt = "@brucesantos/design-space", ze = "0.12.0", It = {
502
- mobile: /* @__PURE__ */ x(G, { children: [
503
- /* @__PURE__ */ n("rect", { x: "7", y: "2.5", width: "10", height: "19", rx: "2" }),
504
- /* @__PURE__ */ n("path", { d: "M11 18.5h2" })
502
+ const Yt = "@brucesantos/design-space", De = "0.13.0", Qt = {
503
+ mobile: /* @__PURE__ */ y(G, { children: [
504
+ /* @__PURE__ */ o("rect", { x: "7", y: "2.5", width: "10", height: "19", rx: "2" }),
505
+ /* @__PURE__ */ o("path", { d: "M11 18.5h2" })
505
506
  ] }),
506
- tablet: /* @__PURE__ */ x(G, { children: [
507
- /* @__PURE__ */ n("rect", { x: "4.5", y: "2.5", width: "15", height: "19", rx: "2" }),
508
- /* @__PURE__ */ n("path", { d: "M11 18.5h2" })
507
+ tablet: /* @__PURE__ */ y(G, { children: [
508
+ /* @__PURE__ */ o("rect", { x: "4.5", y: "2.5", width: "15", height: "19", rx: "2" }),
509
+ /* @__PURE__ */ o("path", { d: "M11 18.5h2" })
509
510
  ] }),
510
- desktop: /* @__PURE__ */ x(G, { children: [
511
- /* @__PURE__ */ n("rect", { x: "2.5", y: "4", width: "19", height: "12.5", rx: "1.5" }),
512
- /* @__PURE__ */ n("path", { d: "M8.5 20.5h7M12 16.5v4" })
511
+ desktop: /* @__PURE__ */ y(G, { children: [
512
+ /* @__PURE__ */ o("rect", { x: "2.5", y: "4", width: "19", height: "12.5", rx: "1.5" }),
513
+ /* @__PURE__ */ o("path", { d: "M8.5 20.5h7M12 16.5v4" })
513
514
  ] }),
514
- fit: /* @__PURE__ */ n("path", { d: "M3 12h7M3 12l3-3M3 12l3 3M21 12h-7M21 12l-3-3M21 12l-3 3" }),
515
- rotate: /* @__PURE__ */ x(G, { children: [
516
- /* @__PURE__ */ n("path", { d: "M20 12a8 8 0 1 1-2.34-5.66" }),
517
- /* @__PURE__ */ n("path", { d: "M20 4v4.5h-4.5" })
515
+ fit: /* @__PURE__ */ o("path", { d: "M3 12h7M3 12l3-3M3 12l3 3M21 12h-7M21 12l-3-3M21 12l-3 3" }),
516
+ rotate: /* @__PURE__ */ y(G, { children: [
517
+ /* @__PURE__ */ o("path", { d: "M20 12a8 8 0 1 1-2.34-5.66" }),
518
+ /* @__PURE__ */ o("path", { d: "M20 4v4.5h-4.5" })
518
519
  ] }),
519
- minus: /* @__PURE__ */ n("path", { d: "M5 12h14" }),
520
- plus: /* @__PURE__ */ n("path", { d: "M5 12h14M12 5v14" }),
521
- "arrow-up-right": /* @__PURE__ */ n("path", { d: "M7 17 17 7M8 7h9v9" }),
522
- link: /* @__PURE__ */ x(G, { children: [
523
- /* @__PURE__ */ n("path", { d: "M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1" }),
524
- /* @__PURE__ */ n("path", { d: "M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1" })
520
+ minus: /* @__PURE__ */ o("path", { d: "M5 12h14" }),
521
+ plus: /* @__PURE__ */ o("path", { d: "M5 12h14M12 5v14" }),
522
+ "arrow-up-right": /* @__PURE__ */ o("path", { d: "M7 17 17 7M8 7h9v9" }),
523
+ link: /* @__PURE__ */ y(G, { children: [
524
+ /* @__PURE__ */ o("path", { d: "M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1" }),
525
+ /* @__PURE__ */ o("path", { d: "M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1" })
525
526
  ] }),
526
- check: /* @__PURE__ */ n("path", { d: "M5 12.5l4.5 4.5L19 7.5" }),
527
- fullscreen: /* @__PURE__ */ n("path", { d: "M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" }),
528
- components: /* @__PURE__ */ x(G, { children: [
529
- /* @__PURE__ */ n("rect", { x: "4", y: "4", width: "7", height: "7", rx: "1" }),
530
- /* @__PURE__ */ n("rect", { x: "13", y: "13", width: "7", height: "7", rx: "1" }),
531
- /* @__PURE__ */ n("path", { d: "M13 4h7v7M4 13v7h7", strokeDasharray: "2 2" })
527
+ check: /* @__PURE__ */ o("path", { d: "M5 12.5l4.5 4.5L19 7.5" }),
528
+ fullscreen: /* @__PURE__ */ o("path", { d: "M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" }),
529
+ components: /* @__PURE__ */ y(G, { children: [
530
+ /* @__PURE__ */ o("rect", { x: "4", y: "4", width: "7", height: "7", rx: "1" }),
531
+ /* @__PURE__ */ o("rect", { x: "13", y: "13", width: "7", height: "7", rx: "1" }),
532
+ /* @__PURE__ */ o("path", { d: "M13 4h7v7M4 13v7h7", strokeDasharray: "2 2" })
532
533
  ] }),
533
- external: /* @__PURE__ */ x(G, { children: [
534
- /* @__PURE__ */ n("path", { d: "M14 4h6v6M20 4l-8.5 8.5" }),
535
- /* @__PURE__ */ n("path", { d: "M18 14v4.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 4 18.5v-11A1.5 1.5 0 0 1 5.5 6H10" })
534
+ external: /* @__PURE__ */ y(G, { children: [
535
+ /* @__PURE__ */ o("path", { d: "M14 4h6v6M20 4l-8.5 8.5" }),
536
+ /* @__PURE__ */ o("path", { d: "M18 14v4.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 4 18.5v-11A1.5 1.5 0 0 1 5.5 6H10" })
536
537
  ] }),
537
- sun: /* @__PURE__ */ x(G, { children: [
538
- /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "4" }),
539
- /* @__PURE__ */ n("path", { d: "M12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4" })
538
+ sun: /* @__PURE__ */ y(G, { children: [
539
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "4" }),
540
+ /* @__PURE__ */ o("path", { d: "M12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4" })
540
541
  ] }),
541
- moon: /* @__PURE__ */ n("path", { d: "M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z" }),
542
- panel: /* @__PURE__ */ x(G, { children: [
543
- /* @__PURE__ */ n("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
544
- /* @__PURE__ */ n("path", { d: "M15 4v16" })
542
+ moon: /* @__PURE__ */ o("path", { d: "M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z" }),
543
+ panel: /* @__PURE__ */ y(G, { children: [
544
+ /* @__PURE__ */ o("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
545
+ /* @__PURE__ */ o("path", { d: "M15 4v16" })
545
546
  ] }),
546
- alert: /* @__PURE__ */ x(G, { children: [
547
- /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "9" }),
548
- /* @__PURE__ */ n("path", { d: "M12 7.5v5.5M12 16.2v.3" })
547
+ alert: /* @__PURE__ */ y(G, { children: [
548
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "9" }),
549
+ /* @__PURE__ */ o("path", { d: "M12 7.5v5.5M12 16.2v.3" })
549
550
  ] }),
550
- chevron: /* @__PURE__ */ n("path", { d: "M9 6l6 6-6 6" }),
551
- search: /* @__PURE__ */ x(G, { children: [
552
- /* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "6.5" }),
553
- /* @__PURE__ */ n("path", { d: "M20 20l-4.2-4.2" })
551
+ chevron: /* @__PURE__ */ o("path", { d: "M9 6l6 6-6 6" }),
552
+ search: /* @__PURE__ */ y(G, { children: [
553
+ /* @__PURE__ */ o("circle", { cx: "11", cy: "11", r: "6.5" }),
554
+ /* @__PURE__ */ o("path", { d: "M20 20l-4.2-4.2" })
554
555
  ] }),
555
- copy: /* @__PURE__ */ x(G, { children: [
556
- /* @__PURE__ */ n("rect", { x: "8.5", y: "8.5", width: "12", height: "12", rx: "2" }),
557
- /* @__PURE__ */ n("path", { d: "M15.5 8.5V5.5a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h3" })
556
+ copy: /* @__PURE__ */ y(G, { children: [
557
+ /* @__PURE__ */ o("rect", { x: "8.5", y: "8.5", width: "12", height: "12", rx: "2" }),
558
+ /* @__PURE__ */ o("path", { d: "M15.5 8.5V5.5a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h3" })
558
559
  ] })
559
560
  };
560
561
  function H({ name: e, size: t = 16 }) {
561
- return /* @__PURE__ */ n(
562
+ return /* @__PURE__ */ o(
562
563
  "svg",
563
564
  {
564
565
  className: "ds-icon",
@@ -572,7 +573,7 @@ function H({ name: e, size: t = 16 }) {
572
573
  strokeLinejoin: "round",
573
574
  "aria-hidden": "true",
574
575
  focusable: "false",
575
- children: It[e]
576
+ children: Qt[e]
576
577
  }
577
578
  );
578
579
  }
@@ -694,7 +695,7 @@ const oe = {
694
695
  error: "Erro",
695
696
  warning: "Aviso",
696
697
  close: "Fechar diagnóstico",
697
- invalidControl: (e, t, a) => `O controle \`${e}\` não tem a opção \`${t}\`. Exibindo \`${a}\`.`,
698
+ invalidControl: (e, t, n) => `O controle \`${e}\` não tem a opção \`${t}\`. Exibindo \`${n}\`.`,
698
699
  unknownControl: (e, t) => `A tela não tem o controle \`${e}\` (pedido \`${t}\` na URL). O parâmetro foi ignorado.`
699
700
  },
700
701
  pr: {
@@ -722,7 +723,7 @@ const oe = {
722
723
  empty: "Nada para mostrar ainda",
723
724
  emptyHint: "O produto ainda não registrou telas nem componentes."
724
725
  }
725
- }, Cn = {
726
+ }, Vn = {
726
727
  network: {
727
728
  success: "Success",
728
729
  loading: "Loading",
@@ -840,7 +841,7 @@ const oe = {
840
841
  error: "Error",
841
842
  warning: "Warning",
842
843
  close: "Close diagnostics",
843
- invalidControl: (e, t, a) => `Control \`${e}\` has no option \`${t}\`. Showing \`${a}\`.`,
844
+ invalidControl: (e, t, n) => `Control \`${e}\` has no option \`${t}\`. Showing \`${n}\`.`,
844
845
  unknownControl: (e, t) => `This screen has no control \`${e}\` (\`${t}\` requested in the URL). The parameter was ignored.`
845
846
  },
846
847
  pr: {
@@ -869,161 +870,161 @@ const oe = {
869
870
  emptyHint: "The product has not registered any screens or components yet."
870
871
  }
871
872
  };
872
- function Ht(e) {
873
+ function Xt(e) {
873
874
  if (!e) return oe;
874
875
  const t = { ...oe };
875
- for (const a of Object.keys(oe)) {
876
- const r = e[a];
877
- r && (t[a] = { ...oe[a], ...r });
876
+ for (const n of Object.keys(oe)) {
877
+ const r = e[n];
878
+ r && (t[n] = { ...oe[n], ...r });
878
879
  }
879
880
  return t;
880
881
  }
881
- const tt = wt(oe);
882
+ const ot = Ct(oe);
882
883
  function J() {
883
- return ft(tt);
884
+ return St(ot);
884
885
  }
885
- const xn = oe.network, Wt = [
886
+ const Kn = oe.network, Jt = [
886
887
  { id: "mobile", icon: "mobile" },
887
888
  { id: "tablet", icon: "tablet" },
888
889
  { id: "desktop", icon: "desktop" },
889
890
  { id: "fit", icon: "fit" }
890
- ], De = [25, 33, 50, 67, 75, 90, 100, 110, 125, 150];
891
+ ], Ie = [25, 33, 50, 67, 75, 90, 100, 110, 125, 150];
891
892
  function Ue(e, t) {
892
- return t > 0 ? De.find((a) => a > e) ?? _e : [...De].reverse().find((a) => a < e) ?? Pe;
893
+ return t > 0 ? Ie.find((n) => n > e) ?? Fe : [...Ie].reverse().find((n) => n < e) ?? _e;
893
894
  }
894
- function Bt({
895
+ function en({
895
896
  productName: e,
896
897
  viewportId: t,
897
- viewport: a,
898
+ viewport: n,
898
899
  zoom: r,
899
- rotated: o,
900
- highlight: s,
901
- theme: d,
900
+ rotated: s,
901
+ highlight: a,
902
+ theme: c,
902
903
  issues: l,
903
- linkUrl: p,
904
- onViewport: h,
904
+ linkUrl: h,
905
+ onViewport: p,
905
906
  onRotate: u,
906
- onZoom: c,
907
- onHighlight: g,
908
- onCleanReview: C,
907
+ onZoom: i,
908
+ onHighlight: f,
909
+ onCleanReview: S,
909
910
  onOpenFrame: N,
910
- onToggleTheme: E
911
+ onToggleTheme: $
911
912
  }) {
912
- const R = J(), v = R.topbar, [L, b] = z(!1), m = (t === "mobile" || t === "tablet") && !!(a.width && a.height), f = async () => {
913
+ const _ = J(), v = _.topbar, [L, b] = D(!1), m = (t === "mobile" || t === "tablet") && !!(n.width && n.height), w = async () => {
913
914
  try {
914
- await navigator.clipboard.writeText(p);
915
+ await navigator.clipboard.writeText(h);
915
916
  } catch {
916
- window.prompt(v.copyPrompt, p);
917
+ window.prompt(v.copyPrompt, h);
917
918
  }
918
919
  b(!0), window.setTimeout(() => b(!1), 1600);
919
920
  };
920
- return /* @__PURE__ */ x("header", { className: "ds-topbar", "aria-label": v.region, children: [
921
- /* @__PURE__ */ x("div", { className: "ds-topbar__product", children: [
922
- /* @__PURE__ */ n("span", { className: "ds-topbar__name", children: e }),
923
- /* @__PURE__ */ n(
921
+ return /* @__PURE__ */ y("header", { className: "ds-topbar", "aria-label": v.region, children: [
922
+ /* @__PURE__ */ y("div", { className: "ds-topbar__product", children: [
923
+ /* @__PURE__ */ o("span", { className: "ds-topbar__name", children: e }),
924
+ /* @__PURE__ */ o(
924
925
  "a",
925
926
  {
926
927
  className: "ds-topbar__version",
927
- href: `https://www.npmjs.com/package/${Kt}/v/${ze}`,
928
+ href: `https://www.npmjs.com/package/${Yt}/v/${De}`,
928
929
  target: "_blank",
929
930
  rel: "noreferrer",
930
- children: v.engineVersion(ze)
931
+ children: v.engineVersion(De)
931
932
  }
932
933
  )
933
934
  ] }),
934
- /* @__PURE__ */ x("div", { className: "ds-topbar__view", children: [
935
- /* @__PURE__ */ x("div", { className: "ds-group", role: "group", "aria-label": v.viewportGroup, children: [
936
- Wt.map((k) => {
937
- const y = R.viewport[k.id] ?? k.id;
938
- return /* @__PURE__ */ n(
935
+ /* @__PURE__ */ y("div", { className: "ds-topbar__view", children: [
936
+ /* @__PURE__ */ y("div", { className: "ds-group", role: "group", "aria-label": v.viewportGroup, children: [
937
+ Jt.map((k) => {
938
+ const x = _.viewport[k.id] ?? k.id;
939
+ return /* @__PURE__ */ o(
939
940
  "button",
940
941
  {
941
942
  type: "button",
942
943
  className: "ds-btn ds-btn--icon",
943
944
  "aria-pressed": t === k.id,
944
- "aria-label": y,
945
- title: y,
946
- onClick: () => h(k.id),
947
- children: /* @__PURE__ */ n(H, { name: k.icon })
945
+ "aria-label": x,
946
+ title: x,
947
+ onClick: () => p(k.id),
948
+ children: /* @__PURE__ */ o(H, { name: k.icon })
948
949
  },
949
950
  k.id
950
951
  );
951
952
  }),
952
- /* @__PURE__ */ n(
953
+ /* @__PURE__ */ o(
953
954
  "button",
954
955
  {
955
956
  type: "button",
956
957
  className: "ds-btn ds-btn--icon",
957
- "aria-pressed": o,
958
+ "aria-pressed": s,
958
959
  "aria-label": v.rotate,
959
960
  title: v.rotate,
960
961
  disabled: !m,
961
962
  onClick: u,
962
- children: /* @__PURE__ */ n(H, { name: "rotate" })
963
+ children: /* @__PURE__ */ o(H, { name: "rotate" })
963
964
  }
964
965
  )
965
966
  ] }),
966
- /* @__PURE__ */ x("div", { className: "ds-group", role: "group", children: [
967
- /* @__PURE__ */ n(
967
+ /* @__PURE__ */ y("div", { className: "ds-group", role: "group", children: [
968
+ /* @__PURE__ */ o(
968
969
  "button",
969
970
  {
970
971
  type: "button",
971
972
  className: "ds-btn ds-btn--icon",
972
973
  "aria-label": v.zoomOut,
973
974
  title: v.zoomOut,
974
- disabled: r <= Pe,
975
- onClick: () => c(Ue(r, -1)),
976
- children: /* @__PURE__ */ n(H, { name: "minus" })
975
+ disabled: r <= _e,
976
+ onClick: () => i(Ue(r, -1)),
977
+ children: /* @__PURE__ */ o(H, { name: "minus" })
977
978
  }
978
979
  ),
979
- /* @__PURE__ */ n(
980
+ /* @__PURE__ */ o(
980
981
  "button",
981
982
  {
982
983
  type: "button",
983
984
  className: "ds-btn ds-btn--zoom",
984
985
  "aria-label": v.zoomReset,
985
986
  title: v.zoomReset,
986
- onClick: () => c(fe),
987
+ onClick: () => i(we),
987
988
  children: v.zoomValue(r)
988
989
  }
989
990
  ),
990
- /* @__PURE__ */ n(
991
+ /* @__PURE__ */ o(
991
992
  "button",
992
993
  {
993
994
  type: "button",
994
995
  className: "ds-btn ds-btn--icon",
995
996
  "aria-label": v.zoomIn,
996
997
  title: v.zoomIn,
997
- disabled: r >= _e,
998
- onClick: () => c(Ue(r, 1)),
999
- children: /* @__PURE__ */ n(H, { name: "plus" })
998
+ disabled: r >= Fe,
999
+ onClick: () => i(Ue(r, 1)),
1000
+ children: /* @__PURE__ */ o(H, { name: "plus" })
1000
1001
  }
1001
1002
  )
1002
1003
  ] }),
1003
- /* @__PURE__ */ n(
1004
+ /* @__PURE__ */ o(
1004
1005
  "button",
1005
1006
  {
1006
1007
  type: "button",
1007
1008
  className: "ds-btn ds-btn--icon",
1008
- "aria-pressed": s,
1009
+ "aria-pressed": a,
1009
1010
  "aria-label": v.highlight,
1010
1011
  title: v.highlight,
1011
- onClick: g,
1012
- children: /* @__PURE__ */ n(H, { name: "components" })
1012
+ onClick: f,
1013
+ children: /* @__PURE__ */ o(H, { name: "components" })
1013
1014
  }
1014
1015
  ),
1015
- /* @__PURE__ */ n(
1016
+ /* @__PURE__ */ o(
1016
1017
  "button",
1017
1018
  {
1018
1019
  type: "button",
1019
1020
  className: "ds-btn ds-btn--icon",
1020
1021
  "aria-label": v.cleanReview,
1021
1022
  title: v.cleanReview,
1022
- onClick: C,
1023
- children: /* @__PURE__ */ n(H, { name: "fullscreen" })
1023
+ onClick: S,
1024
+ children: /* @__PURE__ */ o(H, { name: "fullscreen" })
1024
1025
  }
1025
1026
  ),
1026
- /* @__PURE__ */ n(
1027
+ /* @__PURE__ */ o(
1027
1028
  "button",
1028
1029
  {
1029
1030
  type: "button",
@@ -1031,96 +1032,96 @@ function Bt({
1031
1032
  "aria-label": v.openFrame,
1032
1033
  title: v.openFrame,
1033
1034
  onClick: N,
1034
- children: /* @__PURE__ */ n(H, { name: "external" })
1035
+ children: /* @__PURE__ */ o(H, { name: "external" })
1035
1036
  }
1036
1037
  )
1037
1038
  ] }),
1038
- /* @__PURE__ */ x("div", { className: "ds-topbar__tools", children: [
1039
- /* @__PURE__ */ n(
1039
+ /* @__PURE__ */ y("div", { className: "ds-topbar__tools", children: [
1040
+ /* @__PURE__ */ o(
1040
1041
  "button",
1041
1042
  {
1042
1043
  type: "button",
1043
1044
  className: "ds-btn ds-btn--icon",
1044
1045
  "aria-label": L ? v.copied : v.copyLink,
1045
1046
  title: L ? v.copied : v.copyLink,
1046
- onClick: f,
1047
- children: /* @__PURE__ */ n(H, { name: L ? "check" : "link" })
1047
+ onClick: w,
1048
+ children: /* @__PURE__ */ o(H, { name: L ? "check" : "link" })
1048
1049
  }
1049
1050
  ),
1050
- /* @__PURE__ */ n(
1051
+ /* @__PURE__ */ o(
1051
1052
  "button",
1052
1053
  {
1053
1054
  type: "button",
1054
1055
  className: "ds-btn ds-btn--icon",
1055
- "aria-label": d === "dark" ? v.lightMode : v.darkMode,
1056
- title: d === "dark" ? v.lightMode : v.darkMode,
1057
- onClick: E,
1058
- children: /* @__PURE__ */ n(H, { name: d === "dark" ? "sun" : "moon" })
1056
+ "aria-label": c === "dark" ? v.lightMode : v.darkMode,
1057
+ title: c === "dark" ? v.lightMode : v.darkMode,
1058
+ onClick: $,
1059
+ children: /* @__PURE__ */ o(H, { name: c === "dark" ? "sun" : "moon" })
1059
1060
  }
1060
1061
  ),
1061
- l.length > 0 && /* @__PURE__ */ n(jt, { issues: l })
1062
+ l.length > 0 && /* @__PURE__ */ o(tn, { issues: l })
1062
1063
  ] })
1063
1064
  ] });
1064
1065
  }
1065
- function jt({ issues: e }) {
1066
- const t = J(), [a, r] = z(!1), o = q(null), s = e.filter((p) => p.level === "error").length, d = e.length - s, l = t.topbar.diagnostics(s, d);
1067
- return K(() => {
1068
- if (!a) return;
1069
- const p = (u) => {
1070
- o.current?.contains(u.target) || r(!1);
1071
- }, h = (u) => {
1066
+ function tn({ issues: e }) {
1067
+ const t = J(), [n, r] = D(!1), s = q(null), a = e.filter((h) => h.level === "error").length, c = e.length - a, l = t.topbar.diagnostics(a, c);
1068
+ return V(() => {
1069
+ if (!n) return;
1070
+ const h = (u) => {
1071
+ s.current?.contains(u.target) || r(!1);
1072
+ }, p = (u) => {
1072
1073
  u.key === "Escape" && r(!1);
1073
1074
  };
1074
- return window.addEventListener("pointerdown", p), window.addEventListener("keydown", h), () => {
1075
- window.removeEventListener("pointerdown", p), window.removeEventListener("keydown", h);
1075
+ return window.addEventListener("pointerdown", h), window.addEventListener("keydown", p), () => {
1076
+ window.removeEventListener("pointerdown", h), window.removeEventListener("keydown", p);
1076
1077
  };
1077
- }, [a]), /* @__PURE__ */ x("div", { className: "ds-diagnostics", ref: o, children: [
1078
- /* @__PURE__ */ x(
1078
+ }, [n]), /* @__PURE__ */ y("div", { className: "ds-diagnostics", ref: s, children: [
1079
+ /* @__PURE__ */ y(
1079
1080
  "button",
1080
1081
  {
1081
1082
  type: "button",
1082
1083
  className: "ds-btn ds-diagnostics__trigger",
1083
- "data-level": s > 0 ? "error" : "warning",
1084
- "aria-expanded": a,
1084
+ "data-level": a > 0 ? "error" : "warning",
1085
+ "aria-expanded": n,
1085
1086
  "aria-label": l,
1086
1087
  title: l,
1087
- onClick: () => r((p) => !p),
1088
+ onClick: () => r((h) => !h),
1088
1089
  children: [
1089
- /* @__PURE__ */ n(H, { name: "alert" }),
1090
- /* @__PURE__ */ n("span", { children: s > 0 ? s : d })
1090
+ /* @__PURE__ */ o(H, { name: "alert" }),
1091
+ /* @__PURE__ */ o("span", { children: a > 0 ? a : c })
1091
1092
  ]
1092
1093
  }
1093
1094
  ),
1094
- a && /* @__PURE__ */ x("div", { className: "ds-diagnostics__popover", role: "dialog", "aria-label": t.diagnostics.title, children: [
1095
- /* @__PURE__ */ x("div", { className: "ds-diagnostics__head", children: [
1096
- /* @__PURE__ */ n("strong", { children: t.diagnostics.title }),
1097
- /* @__PURE__ */ n("span", { className: "ds-muted", children: l })
1095
+ n && /* @__PURE__ */ y("div", { className: "ds-diagnostics__popover", role: "dialog", "aria-label": t.diagnostics.title, children: [
1096
+ /* @__PURE__ */ y("div", { className: "ds-diagnostics__head", children: [
1097
+ /* @__PURE__ */ o("strong", { children: t.diagnostics.title }),
1098
+ /* @__PURE__ */ o("span", { className: "ds-muted", children: l })
1098
1099
  ] }),
1099
- /* @__PURE__ */ n("ul", { className: "ds-diagnostics__list", children: e.map((p, h) => /* @__PURE__ */ x("li", { className: "ds-diagnostics__item", "data-level": p.level, children: [
1100
- /* @__PURE__ */ n("span", { className: "ds-diagnostics__level", children: p.level === "error" ? t.diagnostics.error : t.diagnostics.warning }),
1101
- /* @__PURE__ */ n("code", { className: "ds-diagnostics__where", children: p.where }),
1102
- /* @__PURE__ */ n("span", { className: "ds-diagnostics__message", children: p.message })
1103
- ] }, `${p.where}-${h}`)) })
1100
+ /* @__PURE__ */ o("ul", { className: "ds-diagnostics__list", children: e.map((h, p) => /* @__PURE__ */ y("li", { className: "ds-diagnostics__item", "data-level": h.level, children: [
1101
+ /* @__PURE__ */ o("span", { className: "ds-diagnostics__level", children: h.level === "error" ? t.diagnostics.error : t.diagnostics.warning }),
1102
+ /* @__PURE__ */ o("code", { className: "ds-diagnostics__where", children: h.where }),
1103
+ /* @__PURE__ */ o("span", { className: "ds-diagnostics__message", children: h.message })
1104
+ ] }, `${h.where}-${p}`)) })
1104
1105
  ] })
1105
1106
  ] });
1106
1107
  }
1107
- const qt = 16;
1108
- function nt({ side: e, label: t, value: a, onChange: r, onStart: o, onEnd: s }) {
1109
- const d = q(void 0), l = e === "left" ? 1 : -1, p = (g) => {
1110
- if (g.button === 0) {
1111
- g.preventDefault(), d.current = { x: g.clientX, width: a };
1108
+ const nn = 16;
1109
+ function rt({ side: e, label: t, value: n, onChange: r, onStart: s, onEnd: a }) {
1110
+ const c = q(void 0), l = e === "left" ? 1 : -1, h = (f) => {
1111
+ if (f.button === 0) {
1112
+ f.preventDefault(), c.current = { x: f.clientX, width: n };
1112
1113
  try {
1113
- g.currentTarget.setPointerCapture(g.pointerId);
1114
+ f.currentTarget.setPointerCapture(f.pointerId);
1114
1115
  } catch {
1115
1116
  }
1116
- o?.();
1117
+ s?.();
1117
1118
  }
1118
- }, h = (g) => {
1119
- d.current && r(d.current.width + (g.clientX - d.current.x) * l);
1119
+ }, p = (f) => {
1120
+ c.current && r(c.current.width + (f.clientX - c.current.x) * l);
1120
1121
  }, u = () => {
1121
- d.current && (d.current = void 0, s?.());
1122
+ c.current && (c.current = void 0, a?.());
1122
1123
  };
1123
- return /* @__PURE__ */ n(
1124
+ return /* @__PURE__ */ o(
1124
1125
  "div",
1125
1126
  {
1126
1127
  className: "ds-resizer",
@@ -1128,166 +1129,166 @@ function nt({ side: e, label: t, value: a, onChange: r, onStart: o, onEnd: s })
1128
1129
  role: "separator",
1129
1130
  "aria-orientation": "vertical",
1130
1131
  "aria-label": t,
1131
- "aria-valuenow": a,
1132
+ "aria-valuenow": n,
1132
1133
  tabIndex: 0,
1133
- onPointerDown: p,
1134
- onPointerMove: h,
1134
+ onPointerDown: h,
1135
+ onPointerMove: p,
1135
1136
  onPointerUp: u,
1136
1137
  onPointerCancel: u,
1137
1138
  onLostPointerCapture: u,
1138
- onKeyDown: (g) => {
1139
- if (g.key !== "ArrowLeft" && g.key !== "ArrowRight") return;
1140
- g.preventDefault();
1141
- const C = g.key === "ArrowRight" ? 1 : -1;
1142
- r(a + C * l * qt);
1139
+ onKeyDown: (f) => {
1140
+ if (f.key !== "ArrowLeft" && f.key !== "ArrowRight") return;
1141
+ f.preventDefault();
1142
+ const S = f.key === "ArrowRight" ? 1 : -1;
1143
+ r(n + S * l * nn);
1143
1144
  }
1144
1145
  }
1145
1146
  );
1146
1147
  }
1147
- function Gt({
1148
+ function on({
1148
1149
  registry: e,
1149
1150
  handoff: t,
1150
- activeScreen: a,
1151
+ activeScreen: n,
1151
1152
  activeComponent: r,
1152
- onOpenScreen: o,
1153
- onOpenComponent: s,
1154
- width: d,
1153
+ onOpenScreen: s,
1154
+ onOpenComponent: a,
1155
+ width: c,
1155
1156
  onResize: l,
1156
- onResizeStart: p,
1157
- onResizeEnd: h
1157
+ onResizeStart: h,
1158
+ onResizeEnd: p
1158
1159
  }) {
1159
- const c = J().sidebar, [g, C] = z(""), [N, E] = z(() => /* @__PURE__ */ new Set()), R = q(null), v = e.screensFor({ handoff: t }), L = e.componentsFor(t), b = v.length > 0, m = L.length > 0, [f, k] = z(
1160
+ const i = J().sidebar, [f, S] = D(""), [N, $] = D(() => /* @__PURE__ */ new Set()), _ = q(null), v = e.screensFor({ handoff: t }), L = e.componentsFor(t), b = v.length > 0, m = L.length > 0, [w, k] = D(
1160
1161
  () => r || !b ? "components" : "screens"
1161
1162
  );
1162
- K(() => {
1163
- r && m ? k("components") : a && b && k("screens");
1164
- }, [r, a, m, b]);
1165
- const y = f;
1166
- K(() => {
1167
- const O = (U) => {
1168
- Qt(U) && (U.preventDefault(), R.current?.focus(), R.current?.select());
1163
+ V(() => {
1164
+ r && m ? k("components") : n && b && k("screens");
1165
+ }, [r, n, m, b]);
1166
+ const x = w;
1167
+ V(() => {
1168
+ const O = (I) => {
1169
+ an(I) && (I.preventDefault(), _.current?.focus(), _.current?.select());
1169
1170
  };
1170
1171
  return window.addEventListener("keydown", O), () => window.removeEventListener("keydown", O);
1171
1172
  }, []);
1172
- const T = D(
1173
- () => e.searchScreens(g, { handoff: t }),
1174
- [t, g, e]
1175
- ), i = D(
1176
- () => e.searchComponents(g, t),
1177
- [t, g, e]
1178
- ), w = D(() => Yt(i, c.ungrouped), [i, c.ungrouped]), S = D(() => Ye(T), [T]), M = g.trim().length > 0, F = (O) => E((U) => {
1179
- const P = new Set(U);
1173
+ const T = A(
1174
+ () => e.searchScreens(f, { handoff: t }),
1175
+ [t, f, e]
1176
+ ), d = A(
1177
+ () => e.searchComponents(f, t),
1178
+ [t, f, e]
1179
+ ), g = A(() => sn(d, i.ungrouped), [d, i.ungrouped]), C = A(() => Xe(T), [T]), E = f.trim().length > 0, F = (O) => $((I) => {
1180
+ const P = new Set(I);
1180
1181
  return P.has(O) ? P.delete(O) : P.add(O), P;
1181
1182
  });
1182
- return /* @__PURE__ */ x("nav", { className: "ds-sidebar", "aria-label": c.region, style: { width: d }, children: [
1183
- /* @__PURE__ */ x("div", { className: "ds-search", children: [
1184
- /* @__PURE__ */ n(H, { name: "search", size: 14 }),
1185
- /* @__PURE__ */ n(
1183
+ return /* @__PURE__ */ y("nav", { className: "ds-sidebar", "aria-label": i.region, style: { width: c }, children: [
1184
+ /* @__PURE__ */ y("div", { className: "ds-search", children: [
1185
+ /* @__PURE__ */ o(H, { name: "search", size: 14 }),
1186
+ /* @__PURE__ */ o(
1186
1187
  "input",
1187
1188
  {
1188
- ref: R,
1189
+ ref: _,
1189
1190
  className: "ds-input ds-search__input",
1190
1191
  type: "search",
1191
- value: g,
1192
- placeholder: c.searchPlaceholder,
1193
- "aria-label": c.searchLabel,
1194
- onChange: (O) => C(O.target.value),
1192
+ value: f,
1193
+ placeholder: i.searchPlaceholder,
1194
+ "aria-label": i.searchLabel,
1195
+ onChange: (O) => S(O.target.value),
1195
1196
  onKeyDown: (O) => {
1196
- O.key === "Escape" && C("");
1197
+ O.key === "Escape" && S("");
1197
1198
  }
1198
1199
  }
1199
1200
  ),
1200
- /* @__PURE__ */ n("kbd", { className: "ds-kbd", "aria-hidden": "true", children: c.searchShortcut })
1201
+ /* @__PURE__ */ o("kbd", { className: "ds-kbd", "aria-hidden": "true", children: i.searchShortcut })
1201
1202
  ] }),
1202
- /* @__PURE__ */ x("div", { className: "ds-tabs", role: "tablist", "aria-label": c.tabs, children: [
1203
- /* @__PURE__ */ n(
1203
+ /* @__PURE__ */ y("div", { className: "ds-tabs", role: "tablist", "aria-label": i.tabs, children: [
1204
+ /* @__PURE__ */ o(
1204
1205
  Ve,
1205
1206
  {
1206
- selected: y === "screens",
1207
- label: c.screensTab,
1208
- count: M ? T.length : void 0,
1207
+ selected: x === "screens",
1208
+ label: i.screensTab,
1209
+ count: E ? T.length : void 0,
1209
1210
  onSelect: () => k("screens")
1210
1211
  }
1211
1212
  ),
1212
- /* @__PURE__ */ n(
1213
+ /* @__PURE__ */ o(
1213
1214
  Ve,
1214
1215
  {
1215
- selected: y === "components",
1216
- label: c.componentsTab,
1217
- count: M ? i.length : void 0,
1216
+ selected: x === "components",
1217
+ label: i.componentsTab,
1218
+ count: E ? d.length : void 0,
1218
1219
  onSelect: () => k("components")
1219
1220
  }
1220
1221
  )
1221
1222
  ] }),
1222
- /* @__PURE__ */ n("div", { className: "ds-sidebar__list", role: "tabpanel", children: y === "screens" ? b ? T.length === 0 ? /* @__PURE__ */ n("p", { className: "ds-empty", children: c.noMatch(g) }) : S.map((O) => {
1223
- const U = /* @__PURE__ */ n("ul", { className: "ds-items", children: O.screens.map((V) => /* @__PURE__ */ n(
1224
- Zt,
1223
+ /* @__PURE__ */ o("div", { className: "ds-sidebar__list", role: "tabpanel", children: x === "screens" ? b ? T.length === 0 ? /* @__PURE__ */ o("p", { className: "ds-empty", children: i.noMatch(f) }) : C.map((O) => {
1224
+ const I = /* @__PURE__ */ o("ul", { className: "ds-items", children: O.screens.map((U) => /* @__PURE__ */ o(
1225
+ rn,
1225
1226
  {
1226
- screen: V,
1227
- active: V.id === a && !r,
1228
- onOpen: o
1227
+ screen: U,
1228
+ active: U.id === n && !r,
1229
+ onOpen: s
1229
1230
  },
1230
- V.id
1231
+ U.id
1231
1232
  )) });
1232
- if (O.name === void 0) return /* @__PURE__ */ n("div", { className: "ds-group-section", children: U }, "");
1233
- const P = `screens:${O.name}`, A = N.has(P) && !M;
1234
- return /* @__PURE__ */ x("section", { className: "ds-group-section", children: [
1235
- /* @__PURE__ */ x(
1233
+ if (O.name === void 0) return /* @__PURE__ */ o("div", { className: "ds-group-section", children: I }, "");
1234
+ const P = `screens:${O.name}`, z = N.has(P) && !E;
1235
+ return /* @__PURE__ */ y("section", { className: "ds-group-section", children: [
1236
+ /* @__PURE__ */ y(
1236
1237
  "button",
1237
1238
  {
1238
1239
  type: "button",
1239
1240
  className: "ds-group-section__head",
1240
- "aria-expanded": !A,
1241
- "aria-label": c.toggleGroup(O.name),
1241
+ "aria-expanded": !z,
1242
+ "aria-label": i.toggleGroup(O.name),
1242
1243
  onClick: () => F(P),
1243
1244
  children: [
1244
- /* @__PURE__ */ n(H, { name: "chevron", size: 12 }),
1245
- /* @__PURE__ */ n("span", { children: O.name }),
1246
- /* @__PURE__ */ n("span", { className: "ds-count", children: O.screens.length })
1245
+ /* @__PURE__ */ o(H, { name: "chevron", size: 12 }),
1246
+ /* @__PURE__ */ o("span", { children: O.name }),
1247
+ /* @__PURE__ */ o("span", { className: "ds-count", children: O.screens.length })
1247
1248
  ]
1248
1249
  }
1249
1250
  ),
1250
- !A && U
1251
+ !z && I
1251
1252
  ] }, P);
1252
- }) : /* @__PURE__ */ n("p", { className: "ds-empty", children: c.emptyScreens }) : m ? i.length === 0 ? /* @__PURE__ */ n("p", { className: "ds-empty", children: c.noMatch(g) }) : w.map(({ group: O, items: U }) => {
1253
- const P = N.has(O) && !M;
1254
- return /* @__PURE__ */ x("section", { className: "ds-group-section", children: [
1255
- /* @__PURE__ */ x(
1253
+ }) : /* @__PURE__ */ o("p", { className: "ds-empty", children: i.emptyScreens }) : m ? d.length === 0 ? /* @__PURE__ */ o("p", { className: "ds-empty", children: i.noMatch(f) }) : g.map(({ group: O, items: I }) => {
1254
+ const P = N.has(O) && !E;
1255
+ return /* @__PURE__ */ y("section", { className: "ds-group-section", children: [
1256
+ /* @__PURE__ */ y(
1256
1257
  "button",
1257
1258
  {
1258
1259
  type: "button",
1259
1260
  className: "ds-group-section__head",
1260
1261
  "aria-expanded": !P,
1261
- "aria-label": c.toggleGroup(O),
1262
+ "aria-label": i.toggleGroup(O),
1262
1263
  onClick: () => F(O),
1263
1264
  children: [
1264
- /* @__PURE__ */ n(H, { name: "chevron", size: 12 }),
1265
- /* @__PURE__ */ n("span", { children: O }),
1266
- /* @__PURE__ */ n("span", { className: "ds-count", children: U.length })
1265
+ /* @__PURE__ */ o(H, { name: "chevron", size: 12 }),
1266
+ /* @__PURE__ */ o("span", { children: O }),
1267
+ /* @__PURE__ */ o("span", { className: "ds-count", children: I.length })
1267
1268
  ]
1268
1269
  }
1269
1270
  ),
1270
- !P && /* @__PURE__ */ n("ul", { className: "ds-items", children: U.map((A) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
1271
+ !P && /* @__PURE__ */ o("ul", { className: "ds-items", children: I.map((z) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1271
1272
  "button",
1272
1273
  {
1273
1274
  type: "button",
1274
1275
  className: "ds-item",
1275
- "aria-current": A.id === r ? "true" : void 0,
1276
- onClick: () => s(A.id),
1277
- children: /* @__PURE__ */ n("span", { className: "ds-item__title", children: A.name })
1276
+ "aria-current": z.id === r ? "true" : void 0,
1277
+ onClick: () => a(z.id),
1278
+ children: /* @__PURE__ */ o("span", { className: "ds-item__title", children: z.name })
1278
1279
  }
1279
- ) }, A.id)) })
1280
+ ) }, z.id)) })
1280
1281
  ] }, O);
1281
- }) : /* @__PURE__ */ n("p", { className: "ds-empty", children: c.emptyComponents }) }),
1282
- /* @__PURE__ */ n(
1283
- nt,
1282
+ }) : /* @__PURE__ */ o("p", { className: "ds-empty", children: i.emptyComponents }) }),
1283
+ /* @__PURE__ */ o(
1284
+ rt,
1284
1285
  {
1285
1286
  side: "left",
1286
- label: c.resize,
1287
- value: d,
1287
+ label: i.resize,
1288
+ value: c,
1288
1289
  onChange: l,
1289
- onStart: p,
1290
- onEnd: h
1290
+ onStart: h,
1291
+ onEnd: p
1291
1292
  }
1292
1293
  )
1293
1294
  ] });
@@ -1295,10 +1296,10 @@ function Gt({
1295
1296
  function Ve({
1296
1297
  selected: e,
1297
1298
  label: t,
1298
- count: a,
1299
+ count: n,
1299
1300
  onSelect: r
1300
1301
  }) {
1301
- return /* @__PURE__ */ x(
1302
+ return /* @__PURE__ */ y(
1302
1303
  "button",
1303
1304
  {
1304
1305
  type: "button",
@@ -1308,155 +1309,155 @@ function Ve({
1308
1309
  tabIndex: e ? 0 : -1,
1309
1310
  onClick: r,
1310
1311
  children: [
1311
- /* @__PURE__ */ n("span", { children: t }),
1312
- a !== void 0 && /* @__PURE__ */ n("span", { className: "ds-count", children: a })
1312
+ /* @__PURE__ */ o("span", { children: t }),
1313
+ n !== void 0 && /* @__PURE__ */ o("span", { className: "ds-count", children: n })
1313
1314
  ]
1314
1315
  }
1315
1316
  );
1316
1317
  }
1317
- function Zt({
1318
+ function rn({
1318
1319
  screen: e,
1319
1320
  active: t,
1320
- onOpen: a
1321
+ onOpen: n
1321
1322
  }) {
1322
- return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ x(
1323
+ return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ y(
1323
1324
  "button",
1324
1325
  {
1325
1326
  type: "button",
1326
1327
  className: "ds-item",
1327
1328
  "aria-current": t ? "true" : void 0,
1328
- onClick: () => a(e.id),
1329
+ onClick: () => n(e.id),
1329
1330
  children: [
1330
- /* @__PURE__ */ n("span", { className: "ds-item__title", children: e.name }),
1331
- e.variations.length > 1 && /* @__PURE__ */ n("span", { className: "ds-count", children: e.variations.length })
1331
+ /* @__PURE__ */ o("span", { className: "ds-item__title", children: e.name }),
1332
+ e.variations.length > 1 && /* @__PURE__ */ o("span", { className: "ds-count", children: e.variations.length })
1332
1333
  ]
1333
1334
  }
1334
1335
  ) });
1335
1336
  }
1336
- function Yt(e, t) {
1337
- const a = /* @__PURE__ */ new Map();
1337
+ function sn(e, t) {
1338
+ const n = /* @__PURE__ */ new Map();
1338
1339
  for (const r of e) {
1339
- const o = r.group?.trim() || t, s = a.get(o) ?? [];
1340
- s.push(r), a.set(o, s);
1340
+ const s = r.group?.trim() || t, a = n.get(s) ?? [];
1341
+ a.push(r), n.set(s, a);
1341
1342
  }
1342
- return [...a].map(([r, o]) => ({ group: r, items: o }));
1343
+ return [...n].map(([r, s]) => ({ group: r, items: s }));
1343
1344
  }
1344
- function Qt(e) {
1345
+ function an(e) {
1345
1346
  return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === "k";
1346
1347
  }
1347
- function Xt({
1348
+ function cn({
1348
1349
  screen: e,
1349
1350
  variations: t,
1350
- components: a,
1351
+ components: n,
1351
1352
  deploy: r,
1352
- labels: o,
1353
- overrides: s
1353
+ labels: s,
1354
+ overrides: a
1354
1355
  }) {
1355
- const d = o.pr, l = [`## ${e.name}`, ""];
1356
+ const c = s.pr, l = [`## ${e.name}`, ""];
1356
1357
  e.description && l.push(e.description, ""), l.push(`\`${e.route.path}\``, "");
1357
- const p = r.deploymentUrl ? `https://${r.deploymentUrl}` : void 0, h = r.shortCommit ? d.commit(r.shortCommit) : void 0;
1358
- if (l.push(`### ${d.variations}`, ""), t.length === 0) {
1358
+ const h = r.deploymentUrl ? `https://${r.deploymentUrl}` : void 0, p = r.shortCommit ? c.commit(r.shortCommit) : void 0;
1359
+ if (l.push(`### ${c.variations}`, ""), t.length === 0) {
1359
1360
  const u = new URL(e.href, r.origin);
1360
- Ne(u.searchParams, s), l.push(`- [${o.panel.defaultVariation}](${u.toString()})`);
1361
+ $e(u.searchParams, a), l.push(`- [${s.panel.defaultVariation}](${u.toString()})`);
1361
1362
  }
1362
1363
  for (const u of t) {
1363
- const c = me(u, { origin: r.origin, overrides: s });
1364
- let g = `- [${ot(u.title)}](${c})`;
1365
- if (p) {
1366
- const C = me(u, { origin: p, overrides: s });
1367
- g += ` · [${h ?? d.immutableLink}](${C})`;
1368
- } else h && (g += ` · ${h}`);
1369
- l.push(g);
1364
+ const i = me(u, { origin: r.origin, overrides: a });
1365
+ let f = `- [${st(u.title)}](${i})`;
1366
+ if (h) {
1367
+ const S = me(u, { origin: h, overrides: a });
1368
+ f += ` · [${p ?? c.immutableLink}](${S})`;
1369
+ } else p && (f += ` · ${p}`);
1370
+ l.push(f);
1370
1371
  }
1371
- if (l.push(""), a.length > 0) {
1372
- l.push(`### ${d.components}`, ""), l.push(`| ${d.component} | ${d.source} |`, "| --- | --- |");
1373
- for (const u of a) {
1374
- const c = u.source ? `\`${we(u.source)}\`` : d.empty;
1375
- l.push(`| ${we(u.name)} (\`${u.id}\`) | ${c} |`);
1372
+ if (l.push(""), n.length > 0) {
1373
+ l.push(`### ${c.components}`, ""), l.push(`| ${c.component} | ${c.source} |`, "| --- | --- |");
1374
+ for (const u of n) {
1375
+ const i = u.source ? `\`${ge(u.source)}\`` : c.empty;
1376
+ l.push(`| ${ge(u.name)} (\`${u.id}\`) | ${i} |`);
1376
1377
  }
1377
1378
  l.push("");
1378
1379
  }
1379
- l.push(`### ${d.expected}`, ""), t.length === 0 && l.push(`**${o.panel.defaultVariation}**`, "", d.noExpected, "");
1380
+ l.push(`### ${c.expected}`, ""), t.length === 0 && l.push(`**${s.panel.defaultVariation}**`, "", c.noExpected, "");
1380
1381
  for (const u of t) {
1381
1382
  if (l.push(`**${u.title}**`, ""), u.expected?.length)
1382
- for (const c of u.expected) l.push(`- ${c}`);
1383
+ for (const i of u.expected) l.push(`- ${i}`);
1383
1384
  else
1384
- l.push(d.noExpected);
1385
+ l.push(c.noExpected);
1385
1386
  l.push("");
1386
1387
  }
1387
1388
  return `${l.join(`
1388
1389
  `).trimEnd()}
1389
1390
  `;
1390
1391
  }
1391
- function we(e) {
1392
+ function ge(e) {
1392
1393
  return e.replace(/\|/g, "\\|").replace(/\n/g, " ");
1393
1394
  }
1394
- function ot(e) {
1395
+ function st(e) {
1395
1396
  return e.replace(/([[\]])/g, "\\$1");
1396
1397
  }
1397
- function Jt({
1398
+ function ln({
1398
1399
  flow: e,
1399
1400
  registry: t,
1400
- open: a,
1401
+ open: n,
1401
1402
  deploy: r,
1402
- labels: o,
1403
- overrides: s
1403
+ labels: s,
1404
+ overrides: a
1404
1405
  }) {
1405
- const d = o.pr, l = [`## ${e.name}`, ""], p = r.deploymentUrl ? `https://${r.deploymentUrl}` : void 0, h = r.shortCommit ? d.commit(r.shortCommit) : void 0, u = (c, g) => {
1406
- if (a && a.screen.id === c.id) {
1407
- const E = new URL(a.location.path || "/", g), R = new URLSearchParams(a.location.search);
1408
- for (const v of Ct) R.delete(v);
1409
- for (const [v, L] of R) E.searchParams.append(v, L);
1410
- return Ne(E.searchParams, s), E.toString();
1406
+ const c = s.pr, l = [`## ${e.name}`, ""], h = r.deploymentUrl ? `https://${r.deploymentUrl}` : void 0, p = r.shortCommit ? c.commit(r.shortCommit) : void 0, u = (i, f) => {
1407
+ if (n && n.screen.id === i.id) {
1408
+ const $ = new URL(n.location.path || "/", f), _ = new URLSearchParams(n.location.search);
1409
+ for (const v of Et) _.delete(v);
1410
+ for (const [v, L] of _) $.searchParams.append(v, L);
1411
+ return $e($.searchParams, a), $.toString();
1411
1412
  }
1412
- const C = c.variations[0];
1413
- if (C) return me(C, { origin: g, overrides: s });
1414
- const N = new URL(c.href, g);
1415
- return Ne(N.searchParams, s), N.toString();
1413
+ const S = i.variations[0];
1414
+ if (S) return me(S, { origin: f, overrides: a });
1415
+ const N = new URL(i.href, f);
1416
+ return $e(N.searchParams, a), N.toString();
1416
1417
  };
1417
- for (const c of e.screens) {
1418
- l.push(`### ${c.name}`, ""), c.description && l.push(c.description, "");
1419
- let g = `\`${c.route.path}\` · [${d.open}](${u(c, r.origin)})`;
1420
- if (p ? g += ` · [${h ?? d.immutableLink}](${u(c, p)})` : h && (g += ` · ${h}`), l.push(g, ""), c.controls.length > 0) {
1421
- l.push(`**${d.controls}**`, "");
1422
- for (const v of c.controls) {
1418
+ for (const i of e.screens) {
1419
+ l.push(`### ${i.name}`, ""), i.description && l.push(i.description, "");
1420
+ let f = `\`${i.route.path}\` · [${c.open}](${u(i, r.origin)})`;
1421
+ if (h ? f += ` · [${p ?? c.immutableLink}](${u(i, h)})` : p && (f += ` · ${p}`), l.push(f, ""), i.controls.length > 0) {
1422
+ l.push(`**${c.controls}**`, "");
1423
+ for (const v of i.controls) {
1423
1424
  l.push(`- ${le(v.title)} (\`${v.id}\`)`);
1424
1425
  for (const L of v.controls) {
1425
- const b = ke(L), m = L.options.map(
1426
- (f) => f.value === b ? `${le(f.label)} (\`${f.value}\`, ${d.defaultOption})` : `${le(f.label)} (\`${f.value}\`)`
1426
+ const b = Se(L), m = L.options.map(
1427
+ (w) => w.value === b ? `${le(w.label)} (\`${w.value}\`, ${c.defaultOption})` : `${le(w.label)} (\`${w.value}\`)`
1427
1428
  ).join(" · ");
1428
1429
  l.push(` - ${le(L.label)} (\`c.${L.id}\`): ${m}`);
1429
1430
  }
1430
1431
  }
1431
1432
  l.push("");
1432
1433
  }
1433
- if (c.variations.length > 0) {
1434
- l.push(`**${d.shortcuts}**`, "");
1435
- for (const v of c.variations)
1434
+ if (i.variations.length > 0) {
1435
+ l.push(`**${c.shortcuts}**`, "");
1436
+ for (const v of i.variations)
1436
1437
  l.push(
1437
- `- [${ot(v.title)}](${me(v, { origin: r.origin, overrides: s })})`
1438
+ `- [${st(v.title)}](${me(v, { origin: r.origin, overrides: a })})`
1438
1439
  );
1439
1440
  l.push("");
1440
1441
  }
1441
- l.push(`**${d.expected}**`, "");
1442
- const C = a?.screen.id === c.id ? a.variation : void 0, N = C?.expected?.length ? C.expected : c.route.expected, E = c.variations.filter(
1443
- (v) => v.expected?.length && v.id !== C?.id
1442
+ l.push(`**${c.expected}**`, "");
1443
+ const S = n?.screen.id === i.id ? n.variation : void 0, N = S?.expected?.length ? S.expected : i.route.expected, $ = i.variations.filter(
1444
+ (v) => v.expected?.length && v.id !== S?.id
1444
1445
  );
1445
- if (!N?.length && E.length === 0 && l.push(d.noExpected, ""), N?.length) {
1446
+ if (!N?.length && $.length === 0 && l.push(c.noExpected, ""), N?.length) {
1446
1447
  for (const v of N) l.push(`- ${v}`);
1447
1448
  l.push("");
1448
1449
  }
1449
- for (const v of E) {
1450
+ for (const v of $) {
1450
1451
  l.push(`*${v.title}*`, "");
1451
1452
  for (const L of v.expected ?? []) l.push(`- ${L}`);
1452
1453
  l.push("");
1453
1454
  }
1454
- const R = t.componentsOfScreen(c);
1455
- if (R.length > 0) {
1456
- l.push(`**${d.components}**`, ""), l.push(`| ${d.component} | ${d.source} |`, "| --- | --- |");
1457
- for (const v of R) {
1458
- const L = v.source ? `\`${we(v.source)}\`` : d.empty;
1459
- l.push(`| ${we(v.name)} (\`${v.id}\`) | ${L} |`);
1455
+ const _ = t.componentsOfScreen(i);
1456
+ if (_.length > 0) {
1457
+ l.push(`**${c.components}**`, ""), l.push(`| ${c.component} | ${c.source} |`, "| --- | --- |");
1458
+ for (const v of _) {
1459
+ const L = v.source ? `\`${ge(v.source)}\`` : c.empty;
1460
+ l.push(`| ${ge(v.name)} (\`${v.id}\`) | ${L} |`);
1460
1461
  }
1461
1462
  l.push("");
1462
1463
  }
@@ -1468,51 +1469,51 @@ function Jt({
1468
1469
  function le(e) {
1469
1470
  return e.replace(/([*_[\]`])/g, "\\$1");
1470
1471
  }
1471
- function en(e) {
1472
- const { tab: t, onTab: a, width: r, onResize: o, onResizeStart: s, onResizeEnd: d } = e, l = J().panel, [p, h] = z(""), u = q(null), c = q(null), [g, C] = z(!1), [N, E] = z(() => /* @__PURE__ */ new Set()), R = (L) => E((b) => {
1472
+ function dn(e) {
1473
+ const { tab: t, onTab: n, width: r, onResize: s, onResizeStart: a, onResizeEnd: c } = e, l = J().panel, [h, p] = D(""), u = q(null), i = q(null), [f, S] = D(!1), [N, $] = D(() => /* @__PURE__ */ new Set()), _ = (L) => $((b) => {
1473
1474
  const m = new Set(b);
1474
1475
  return m.has(L) ? m.delete(L) : m.add(L), m;
1475
- }), v = p.trim().length > 0;
1476
- return K(() => {
1476
+ }), v = h.trim().length > 0;
1477
+ return V(() => {
1477
1478
  const L = (b) => {
1478
- on(b) && (b.preventDefault(), u.current?.focus(), u.current?.select());
1479
+ pn(b) && (b.preventDefault(), u.current?.focus(), u.current?.select());
1479
1480
  };
1480
1481
  return window.addEventListener("keydown", L), () => window.removeEventListener("keydown", L);
1481
- }, []), Be(() => {
1482
- C(rn(c.current, p));
1483
- }), /* @__PURE__ */ x("aside", { className: "ds-panel", "aria-label": l.region, style: { width: r }, children: [
1484
- /* @__PURE__ */ n(
1485
- nt,
1482
+ }, []), qe(() => {
1483
+ S(mn(i.current, h));
1484
+ }), /* @__PURE__ */ y("aside", { className: "ds-panel", "aria-label": l.region, style: { width: r }, children: [
1485
+ /* @__PURE__ */ o(
1486
+ rt,
1486
1487
  {
1487
1488
  side: "right",
1488
1489
  label: l.resize,
1489
1490
  value: r,
1490
- onChange: o,
1491
- onStart: s,
1492
- onEnd: d
1491
+ onChange: s,
1492
+ onStart: a,
1493
+ onEnd: c
1493
1494
  }
1494
1495
  ),
1495
- /* @__PURE__ */ x("div", { className: "ds-search", children: [
1496
- /* @__PURE__ */ n(H, { name: "search", size: 14 }),
1497
- /* @__PURE__ */ n(
1496
+ /* @__PURE__ */ y("div", { className: "ds-search", children: [
1497
+ /* @__PURE__ */ o(H, { name: "search", size: 14 }),
1498
+ /* @__PURE__ */ o(
1498
1499
  "input",
1499
1500
  {
1500
1501
  ref: u,
1501
1502
  className: "ds-input ds-search__input",
1502
1503
  type: "search",
1503
- value: p,
1504
+ value: h,
1504
1505
  placeholder: l.searchPlaceholder,
1505
1506
  "aria-label": l.searchLabel,
1506
- onChange: (L) => h(L.target.value),
1507
+ onChange: (L) => p(L.target.value),
1507
1508
  onKeyDown: (L) => {
1508
- L.key === "Escape" && h("");
1509
+ L.key === "Escape" && p("");
1509
1510
  }
1510
1511
  }
1511
1512
  ),
1512
- /* @__PURE__ */ n("kbd", { className: "ds-kbd", "aria-hidden": "true", children: l.searchShortcut })
1513
+ /* @__PURE__ */ o("kbd", { className: "ds-kbd", "aria-hidden": "true", children: l.searchShortcut })
1513
1514
  ] }),
1514
- /* @__PURE__ */ x("div", { className: "ds-tabs", role: "tablist", "aria-label": l.tabs, children: [
1515
- /* @__PURE__ */ n(
1515
+ /* @__PURE__ */ y("div", { className: "ds-tabs", role: "tablist", "aria-label": l.tabs, children: [
1516
+ /* @__PURE__ */ o(
1516
1517
  "button",
1517
1518
  {
1518
1519
  type: "button",
@@ -1520,11 +1521,11 @@ function en(e) {
1520
1521
  className: "ds-tab",
1521
1522
  "aria-selected": t === "variations",
1522
1523
  tabIndex: t === "variations" ? 0 : -1,
1523
- onClick: () => a("variations"),
1524
+ onClick: () => n("variations"),
1524
1525
  children: l.variationsTab
1525
1526
  }
1526
1527
  ),
1527
- /* @__PURE__ */ n(
1528
+ /* @__PURE__ */ o(
1528
1529
  "button",
1529
1530
  {
1530
1531
  type: "button",
@@ -1532,51 +1533,51 @@ function en(e) {
1532
1533
  className: "ds-tab",
1533
1534
  "aria-selected": t === "info",
1534
1535
  tabIndex: t === "info" ? 0 : -1,
1535
- onClick: () => a("info"),
1536
+ onClick: () => n("info"),
1536
1537
  children: l.infoTab
1537
1538
  }
1538
1539
  )
1539
1540
  ] }),
1540
- /* @__PURE__ */ x("div", { className: "ds-panel__body", role: "tabpanel", ref: c, children: [
1541
- t === "variations" ? /* @__PURE__ */ n(tn, { ...e, collapsed: N, onToggle: R, filtering: v }) : /* @__PURE__ */ n(nn, { ...e }),
1542
- g && /* @__PURE__ */ n("p", { className: "ds-empty", children: l.noMatch(p) })
1541
+ /* @__PURE__ */ y("div", { className: "ds-panel__body", role: "tabpanel", ref: i, children: [
1542
+ t === "variations" ? /* @__PURE__ */ o(un, { ...e, collapsed: N, onToggle: _, filtering: v }) : /* @__PURE__ */ o(hn, { ...e }),
1543
+ f && /* @__PURE__ */ o("p", { className: "ds-empty", children: l.noMatch(h) })
1543
1544
  ] })
1544
1545
  ] });
1545
1546
  }
1546
- function tn({
1547
+ function un({
1547
1548
  registry: e,
1548
1549
  controls: t,
1549
- screen: a,
1550
+ screen: n,
1550
1551
  variation: r,
1551
- component: o,
1552
- componentFixture: s,
1553
- onOpenScenario: d,
1552
+ component: s,
1553
+ componentFixture: a,
1554
+ onOpenScenario: c,
1554
1555
  onOpenComponent: l,
1555
- onChange: p
1556
+ onChange: h
1556
1557
  }) {
1557
- const h = J(), u = h.panel;
1558
- if (o) {
1559
- const b = o.fixtures ?? [];
1560
- if (b.length === 0) return /* @__PURE__ */ n("p", { className: "ds-empty", children: u.noComponentVariations });
1561
- const m = s.fixture;
1562
- return /* @__PURE__ */ x("div", { className: "ds-vcards", children: [
1563
- s.didFallback && s.requestedId && m && /* @__PURE__ */ n("p", { className: "ds-notice", children: u.fixtureFallback(s.requestedId, m.id) }),
1564
- /* @__PURE__ */ n(de, { title: o.name, hint: m?.description, children: /* @__PURE__ */ n(
1558
+ const p = J(), u = p.panel;
1559
+ if (s) {
1560
+ const b = s.fixtures ?? [];
1561
+ if (b.length === 0) return /* @__PURE__ */ o("p", { className: "ds-empty", children: u.noComponentVariations });
1562
+ const m = a.fixture;
1563
+ return /* @__PURE__ */ y("div", { className: "ds-vcards", children: [
1564
+ a.didFallback && a.requestedId && m && /* @__PURE__ */ o("p", { className: "ds-notice", children: u.fixtureFallback(a.requestedId, m.id) }),
1565
+ /* @__PURE__ */ o(de, { title: s.name, hint: m?.description, children: /* @__PURE__ */ o(
1565
1566
  ee,
1566
1567
  {
1567
1568
  label: u.componentVariations,
1568
1569
  value: m?.id ?? "",
1569
- options: b.map((f) => ({ value: f.id, label: f.label })),
1570
- onChange: (f) => p({ fixture: f })
1570
+ options: b.map((w) => ({ value: w.id, label: w.label })),
1571
+ onChange: (w) => h({ fixture: w })
1571
1572
  }
1572
1573
  ) })
1573
1574
  ] });
1574
1575
  }
1575
- if (!a) return /* @__PURE__ */ n("p", { className: "ds-empty", children: u.nothingSelected });
1576
- const c = a.variations, g = e.product, C = g.theme?.modes ?? [], N = g.theme?.locales ?? [], E = g.dataSources?.adapters ?? [], R = t.screenControls ?? {}, v = r && Pt(r, R) ? r : void 0, L = (b, m) => p({ screenControls: { ...R, [b]: m } });
1577
- return /* @__PURE__ */ x("div", { className: "ds-vcards", children: [
1578
- /* @__PURE__ */ x(de, { title: u.context, children: [
1579
- /* @__PURE__ */ n(
1576
+ if (!n) return /* @__PURE__ */ o("p", { className: "ds-empty", children: u.nothingSelected });
1577
+ const i = n.variations, f = e.product, S = f.theme?.modes ?? [], N = f.theme?.locales ?? [], $ = f.dataSources?.adapters ?? [], _ = t.screenControls ?? {}, v = r && Ut(r, _) ? r : void 0, L = (b, m) => h({ screenControls: { ..._, [b]: m } });
1578
+ return /* @__PURE__ */ y("div", { className: "ds-vcards", children: [
1579
+ /* @__PURE__ */ y(de, { title: u.context, children: [
1580
+ /* @__PURE__ */ o(
1580
1581
  ee,
1581
1582
  {
1582
1583
  label: u.persona,
@@ -1584,83 +1585,83 @@ function tn({
1584
1585
  options: [
1585
1586
  // Com persona padrão, "nenhuma" não é uma situação possível.
1586
1587
  ...e.defaultPersona ? [] : [{ value: "", label: u.none }],
1587
- ...g.personas.map((b) => ({ value: b.id, label: b.name }))
1588
+ ...f.personas.map((b) => ({ value: b.id, label: b.name }))
1588
1589
  ],
1589
- onChange: (b) => p({ persona: b || void 0 })
1590
+ onChange: (b) => h({ persona: b || void 0 })
1590
1591
  }
1591
1592
  ),
1592
- /* @__PURE__ */ n(
1593
+ /* @__PURE__ */ o(
1593
1594
  ee,
1594
1595
  {
1595
1596
  label: u.network,
1596
1597
  value: t.network,
1597
- options: Ge.map((b) => ({ value: b, label: h.network[b] })),
1598
- onChange: (b) => p({ network: b })
1598
+ options: Ye.map((b) => ({ value: b, label: p.network[b] })),
1599
+ onChange: (b) => h({ network: b })
1599
1600
  }
1600
1601
  ),
1601
- C.length > 1 && /* @__PURE__ */ n(
1602
+ S.length > 1 && /* @__PURE__ */ o(
1602
1603
  ee,
1603
1604
  {
1604
1605
  label: u.theme,
1605
- value: t.themeMode ?? C[0],
1606
- options: C.map((b) => ({ value: b, label: b })),
1607
- onChange: (b) => p({ themeMode: b })
1606
+ value: t.themeMode ?? S[0],
1607
+ options: S.map((b) => ({ value: b, label: b })),
1608
+ onChange: (b) => h({ themeMode: b })
1608
1609
  }
1609
1610
  ),
1610
- N.length > 1 && /* @__PURE__ */ n(
1611
+ N.length > 1 && /* @__PURE__ */ o(
1611
1612
  ee,
1612
1613
  {
1613
1614
  label: u.locale,
1614
1615
  value: t.locale ?? N[0],
1615
1616
  options: N.map((b) => ({ value: b, label: b })),
1616
- onChange: (b) => p({ locale: b })
1617
+ onChange: (b) => h({ locale: b })
1617
1618
  }
1618
1619
  ),
1619
- E.length > 0 && /* @__PURE__ */ n(
1620
+ $.length > 0 && /* @__PURE__ */ o(
1620
1621
  ee,
1621
1622
  {
1622
1623
  label: u.dataSource,
1623
1624
  value: t.dataSource ?? "fixtures",
1624
1625
  options: [
1625
1626
  { value: "fixtures", label: u.fixturesOption },
1626
- ...E.map((b) => ({ value: b.id, label: b.label }))
1627
+ ...$.map((b) => ({ value: b.id, label: b.label }))
1627
1628
  ],
1628
- onChange: (b) => p({ dataSource: b })
1629
+ onChange: (b) => h({ dataSource: b })
1629
1630
  }
1630
1631
  )
1631
1632
  ] }),
1632
- a.controls.map((b) => {
1633
+ n.controls.map((b) => {
1633
1634
  const m = e.component(b.component);
1634
- return /* @__PURE__ */ n(
1635
+ return /* @__PURE__ */ o(
1635
1636
  de,
1636
1637
  {
1637
1638
  title: b.title,
1638
1639
  hint: b.note,
1639
1640
  link: m ? { label: u.openComponent(m.name), onOpen: () => l(m.id) } : void 0,
1640
- children: b.controls.map((f) => /* @__PURE__ */ n(
1641
+ children: b.controls.map((w) => /* @__PURE__ */ o(
1641
1642
  ee,
1642
1643
  {
1643
- label: f.label,
1644
- hint: f.description,
1645
- value: R[f.id] ?? ke(f),
1646
- options: f.options ?? [],
1647
- onChange: (k) => L(f.id, k)
1644
+ label: w.label,
1645
+ hint: w.description,
1646
+ value: _[w.id] ?? Se(w),
1647
+ options: w.options ?? [],
1648
+ onChange: (k) => L(w.id, k)
1648
1649
  },
1649
- f.id
1650
+ w.id
1650
1651
  ))
1651
1652
  },
1652
1653
  b.id
1653
1654
  );
1654
1655
  }),
1655
- c.length > 0 && /* @__PURE__ */ n(de, { title: u.shortcuts, children: /* @__PURE__ */ n("ul", { className: "ds-items", "aria-label": u.variationsList, children: c.map((b) => /* @__PURE__ */ n("li", { "data-ds-filter": !0, children: /* @__PURE__ */ n(
1656
+ i.length > 0 && /* @__PURE__ */ o(de, { title: u.shortcuts, children: /* @__PURE__ */ o("ul", { className: "ds-items", "aria-label": u.variationsList, children: i.map((b) => /* @__PURE__ */ o("li", { "data-ds-filter": !0, children: /* @__PURE__ */ o(
1656
1657
  "button",
1657
1658
  {
1658
1659
  type: "button",
1659
1660
  className: "ds-item",
1660
1661
  title: b.intent,
1661
1662
  "aria-current": v?.id === b.id ? "true" : void 0,
1662
- onClick: () => d(b.id),
1663
- children: /* @__PURE__ */ n("span", { className: "ds-item__title", children: b.title })
1663
+ onClick: () => c(b.id),
1664
+ children: /* @__PURE__ */ o("span", { className: "ds-item__title", children: b.title })
1664
1665
  }
1665
1666
  ) }, b.id)) }) })
1666
1667
  ] });
@@ -1668,451 +1669,559 @@ function tn({
1668
1669
  function de({
1669
1670
  title: e,
1670
1671
  hint: t,
1671
- link: a,
1672
+ link: n,
1672
1673
  children: r
1673
1674
  }) {
1674
- return /* @__PURE__ */ x("section", { className: "ds-vcard", "data-ds-filter-group": !0, children: [
1675
- /* @__PURE__ */ x("header", { className: "ds-vcard__head", title: t ? `${e} — ${t}` : e, children: [
1676
- /* @__PURE__ */ n("h3", { className: "ds-vcard__title ds-section__title", "data-ds-filter-title": !0, children: e }),
1677
- a && /* @__PURE__ */ n(
1675
+ return /* @__PURE__ */ y("section", { className: "ds-vcard", "data-ds-filter-group": !0, children: [
1676
+ /* @__PURE__ */ y("header", { className: "ds-vcard__head", title: t ? `${e} — ${t}` : e, children: [
1677
+ /* @__PURE__ */ o("h3", { className: "ds-vcard__title ds-section__title", "data-ds-filter-title": !0, children: e }),
1678
+ n && /* @__PURE__ */ o(
1678
1679
  "button",
1679
1680
  {
1680
1681
  type: "button",
1681
1682
  className: "ds-btn ds-btn--icon ds-vcard__link",
1682
- "aria-label": a.label,
1683
- title: a.label,
1684
- onClick: a.onOpen,
1685
- children: /* @__PURE__ */ n(H, { name: "arrow-up-right", size: 14 })
1683
+ "aria-label": n.label,
1684
+ title: n.label,
1685
+ onClick: n.onOpen,
1686
+ children: /* @__PURE__ */ o(H, { name: "arrow-up-right", size: 14 })
1686
1687
  }
1687
1688
  )
1688
1689
  ] }),
1689
- /* @__PURE__ */ n("div", { className: "ds-vcard__body", children: r })
1690
+ /* @__PURE__ */ o("div", { className: "ds-vcard__body", children: r })
1690
1691
  ] });
1691
1692
  }
1692
1693
  function ee({
1693
1694
  label: e,
1694
1695
  hint: t,
1695
- value: a,
1696
+ value: n,
1696
1697
  options: r,
1697
- onChange: o
1698
+ onChange: s
1698
1699
  }) {
1699
- return /* @__PURE__ */ x("label", { className: "ds-vcard__field", "data-ds-filter": !0, title: t ? `${e} — ${t}` : e, children: [
1700
- /* @__PURE__ */ n("span", { className: "ds-visually-hidden", children: e }),
1701
- /* @__PURE__ */ n("select", { className: "ds-select", value: a, onChange: (s) => o(s.target.value), children: r.map((s) => /* @__PURE__ */ n("option", { value: s.value, children: s.label }, s.value)) })
1700
+ return /* @__PURE__ */ y("label", { className: "ds-vcard__field", "data-ds-filter": !0, title: t ? `${e} — ${t}` : e, children: [
1701
+ /* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: e }),
1702
+ /* @__PURE__ */ o("select", { className: "ds-select", value: n, onChange: (a) => s(a.target.value), children: r.map((a) => /* @__PURE__ */ o("option", { value: a.value, children: a.label }, a.value)) })
1702
1703
  ] });
1703
1704
  }
1704
- function nn({
1705
+ function hn({
1705
1706
  registry: e,
1706
1707
  controls: t,
1707
- deploy: a,
1708
+ deploy: n,
1708
1709
  location: r,
1709
- screen: o,
1710
- variation: s,
1711
- component: d,
1710
+ screen: s,
1711
+ variation: a,
1712
+ component: c,
1712
1713
  onOpenScenario: l,
1713
- onOpenComponent: p,
1714
- onOpenScreen: h
1714
+ onOpenComponent: h,
1715
+ onOpenScreen: p
1715
1716
  }) {
1716
- const u = J(), c = u.info, [g, C] = z(!1);
1717
- if (d) {
1718
- const f = e.usagesOf(d.id, { handoff: t.handoff });
1719
- return /* @__PURE__ */ x("div", { className: "ds-info", children: [
1720
- /* @__PURE__ */ x(ne, { title: c.component, children: [
1721
- /* @__PURE__ */ n(W, { term: c.name, children: d.name }),
1722
- /* @__PURE__ */ n(W, { term: c.id, children: /* @__PURE__ */ n("code", { children: d.id }) }),
1723
- d.group && /* @__PURE__ */ n(W, { term: c.group, children: d.group }),
1724
- d.description && /* @__PURE__ */ n(W, { term: c.description, children: d.description }),
1725
- d.source && /* @__PURE__ */ n(W, { term: c.source, children: /* @__PURE__ */ n("code", { children: d.source }) })
1717
+ const u = J(), i = u.info, [f, S] = D(!1);
1718
+ if (c) {
1719
+ const w = e.usagesOf(c.id, { handoff: t.handoff });
1720
+ return /* @__PURE__ */ y("div", { className: "ds-info", children: [
1721
+ /* @__PURE__ */ y(ne, { title: i.component, children: [
1722
+ /* @__PURE__ */ o(W, { term: i.name, children: c.name }),
1723
+ /* @__PURE__ */ o(W, { term: i.id, children: /* @__PURE__ */ o("code", { children: c.id }) }),
1724
+ c.group && /* @__PURE__ */ o(W, { term: i.group, children: c.group }),
1725
+ c.description && /* @__PURE__ */ o(W, { term: i.description, children: c.description }),
1726
+ c.source && /* @__PURE__ */ o(W, { term: i.source, children: /* @__PURE__ */ o("code", { children: c.source }) })
1726
1727
  ] }),
1727
- /* @__PURE__ */ n(ne, { title: c.usedIn, children: f.length === 0 ? /* @__PURE__ */ n("p", { className: "ds-muted", children: c.notUsed }) : /* @__PURE__ */ n("ul", { className: "ds-links", children: f.map((k) => {
1728
- const y = k.variations.find((T) => T.components?.includes(d.id)) ?? k.variations[0];
1729
- return /* @__PURE__ */ x("li", { "data-ds-filter": !0, children: [
1730
- /* @__PURE__ */ n(
1728
+ /* @__PURE__ */ o(ne, { title: i.usedIn, children: w.length === 0 ? /* @__PURE__ */ o("p", { className: "ds-muted", children: i.notUsed }) : /* @__PURE__ */ o("ul", { className: "ds-links", children: w.map((k) => {
1729
+ const x = k.variations.find((T) => T.components?.includes(c.id)) ?? k.variations[0];
1730
+ return /* @__PURE__ */ y("li", { "data-ds-filter": !0, children: [
1731
+ /* @__PURE__ */ o(
1731
1732
  "button",
1732
1733
  {
1733
1734
  type: "button",
1734
1735
  className: "ds-link",
1735
- onClick: () => y ? l(y.id) : h?.(k.id),
1736
+ onClick: () => x ? l(x.id) : p?.(k.id),
1736
1737
  children: k.name
1737
1738
  }
1738
1739
  ),
1739
- /* @__PURE__ */ n("code", { className: "ds-muted", children: k.id })
1740
+ /* @__PURE__ */ o("code", { className: "ds-muted", children: k.id })
1740
1741
  ] }, k.id);
1741
1742
  }) }) })
1742
1743
  ] });
1743
1744
  }
1744
- if (!o) return /* @__PURE__ */ n("p", { className: "ds-empty", children: u.panel.nothingSelected });
1745
- const N = s ? e.componentsOfScreen(o, s) : e.componentsOfScreen(o), E = e.persona(t.persona ?? s?.persona), R = e.rulesOf(s), v = t.screenControls ?? {}, L = s?.expected?.length ? s.expected : o.route.expected, b = t.handoff ? { handoff: t.handoff } : void 0, m = async () => {
1746
- const f = o.group ? e.flowOf(o, { handoff: t.handoff }) : void 0, k = f?.name ? Jt({
1747
- flow: { name: f.name, screens: f.screens },
1745
+ if (!s) return /* @__PURE__ */ o("p", { className: "ds-empty", children: u.panel.nothingSelected });
1746
+ const N = a ? e.componentsOfScreen(s, a) : e.componentsOfScreen(s), $ = e.persona(t.persona ?? a?.persona), _ = e.rulesOf(a), v = t.screenControls ?? {}, L = a?.expected?.length ? a.expected : s.route.expected, b = t.handoff ? { handoff: t.handoff } : void 0, m = async () => {
1747
+ const w = s.group ? e.flowOf(s, { handoff: t.handoff }) : void 0, k = w?.name ? ln({
1748
+ flow: { name: w.name, screens: w.screens },
1748
1749
  registry: e,
1749
- open: { screen: o, location: r, variation: s },
1750
- deploy: a,
1750
+ open: { screen: s, location: r, variation: a },
1751
+ deploy: n,
1751
1752
  labels: u,
1752
1753
  overrides: b
1753
- }) : Xt({
1754
- screen: o,
1755
- variations: o.variations,
1756
- components: e.componentsOfScreen(o),
1757
- deploy: a,
1754
+ }) : cn({
1755
+ screen: s,
1756
+ variations: s.variations,
1757
+ components: e.componentsOfScreen(s),
1758
+ deploy: n,
1758
1759
  labels: u,
1759
1760
  overrides: b
1760
1761
  });
1761
1762
  try {
1762
1763
  await navigator.clipboard.writeText(k);
1763
1764
  } catch {
1764
- window.prompt(c.copyPrompt, k);
1765
+ window.prompt(i.copyPrompt, k);
1765
1766
  }
1766
- C(!0), window.setTimeout(() => C(!1), 1600);
1767
+ S(!0), window.setTimeout(() => S(!1), 1600);
1767
1768
  };
1768
- return /* @__PURE__ */ x("div", { className: "ds-info", children: [
1769
- /* @__PURE__ */ x(ne, { title: c.screen, children: [
1770
- /* @__PURE__ */ n(W, { term: c.name, children: o.name }),
1771
- /* @__PURE__ */ n(W, { term: c.route, children: /* @__PURE__ */ n("code", { children: o.route.path }) }),
1772
- o.group && /* @__PURE__ */ n(W, { term: c.flow, children: o.group }),
1773
- o.description && /* @__PURE__ */ n(W, { term: c.description, children: o.description }),
1774
- /* @__PURE__ */ n(ue, { term: c.expected, items: L })
1769
+ return /* @__PURE__ */ y("div", { className: "ds-info", children: [
1770
+ /* @__PURE__ */ y(ne, { title: i.screen, children: [
1771
+ /* @__PURE__ */ o(W, { term: i.name, children: s.name }),
1772
+ /* @__PURE__ */ o(W, { term: i.route, children: /* @__PURE__ */ o("code", { children: s.route.path }) }),
1773
+ s.group && /* @__PURE__ */ o(W, { term: i.flow, children: s.group }),
1774
+ s.description && /* @__PURE__ */ o(W, { term: i.description, children: s.description }),
1775
+ /* @__PURE__ */ o(ue, { term: i.expected, items: L })
1775
1776
  ] }),
1776
- o.controls.length > 0 && /* @__PURE__ */ n(ne, { title: c.controls, children: o.controls.flatMap(
1777
- (f) => f.controls.map((k) => {
1778
- const y = v[k.id] ?? ke(k), T = k.options.find((i) => i.value === y);
1779
- return /* @__PURE__ */ x(W, { term: k.label, children: [
1780
- T?.label ?? y,
1777
+ s.controls.length > 0 && /* @__PURE__ */ o(ne, { title: i.controls, children: s.controls.flatMap(
1778
+ (w) => w.controls.map((k) => {
1779
+ const x = v[k.id] ?? Se(k), T = k.options.find((d) => d.value === x);
1780
+ return /* @__PURE__ */ y(W, { term: k.label, children: [
1781
+ T?.label ?? x,
1781
1782
  " ",
1782
- /* @__PURE__ */ n("code", { children: `c.${k.id}=${y}` })
1783
- ] }, `${f.id}/${k.id}`);
1783
+ /* @__PURE__ */ o("code", { children: `c.${k.id}=${x}` })
1784
+ ] }, `${w.id}/${k.id}`);
1784
1785
  })
1785
1786
  ) }),
1786
- s && /* @__PURE__ */ x(ne, { title: c.variation, children: [
1787
- /* @__PURE__ */ n(W, { term: c.name, children: s.title }),
1788
- /* @__PURE__ */ n(W, { term: c.id, children: /* @__PURE__ */ n("code", { children: s.id }) }),
1789
- E && /* @__PURE__ */ n(W, { term: c.persona, children: E.name }),
1790
- s.intent && /* @__PURE__ */ n(W, { term: c.intent, children: s.intent }),
1791
- /* @__PURE__ */ n(ue, { term: c.preconditions, items: s.preconditions }),
1792
- /* @__PURE__ */ n(ue, { term: c.actions, items: s.actions }),
1793
- /* @__PURE__ */ n(ue, { term: c.rules, items: R.map((f) => f.statement) }),
1794
- s.ticket && /* @__PURE__ */ n(W, { term: c.ticket, children: /* @__PURE__ */ n("code", { children: s.ticket }) })
1787
+ a && /* @__PURE__ */ y(ne, { title: i.variation, children: [
1788
+ /* @__PURE__ */ o(W, { term: i.name, children: a.title }),
1789
+ /* @__PURE__ */ o(W, { term: i.id, children: /* @__PURE__ */ o("code", { children: a.id }) }),
1790
+ $ && /* @__PURE__ */ o(W, { term: i.persona, children: $.name }),
1791
+ a.intent && /* @__PURE__ */ o(W, { term: i.intent, children: a.intent }),
1792
+ /* @__PURE__ */ o(ue, { term: i.preconditions, items: a.preconditions }),
1793
+ /* @__PURE__ */ o(ue, { term: i.actions, items: a.actions }),
1794
+ /* @__PURE__ */ o(ue, { term: i.rules, items: _.map((w) => w.statement) }),
1795
+ a.ticket && /* @__PURE__ */ o(W, { term: i.ticket, children: /* @__PURE__ */ o("code", { children: a.ticket }) })
1795
1796
  ] }),
1796
- N.length > 0 && /* @__PURE__ */ n(ne, { title: c.components, children: /* @__PURE__ */ n("ul", { className: "ds-links", children: N.map((f) => /* @__PURE__ */ x("li", { "data-ds-filter": !0, children: [
1797
- /* @__PURE__ */ n("button", { type: "button", className: "ds-link", onClick: () => p(f.id), children: f.name }),
1798
- f.source && /* @__PURE__ */ n("code", { className: "ds-muted", children: f.source })
1799
- ] }, f.id)) }) }),
1800
- /* @__PURE__ */ x("button", { type: "button", className: "ds-btn ds-btn--block", onClick: m, children: [
1801
- /* @__PURE__ */ n(H, { name: g ? "check" : "copy", size: 14 }),
1802
- /* @__PURE__ */ n("span", { children: g ? c.copiedForPr : c.copyForPr })
1797
+ N.length > 0 && /* @__PURE__ */ o(ne, { title: i.components, children: /* @__PURE__ */ o("ul", { className: "ds-links", children: N.map((w) => /* @__PURE__ */ y("li", { "data-ds-filter": !0, children: [
1798
+ /* @__PURE__ */ o("button", { type: "button", className: "ds-link", onClick: () => h(w.id), children: w.name }),
1799
+ w.source && /* @__PURE__ */ o("code", { className: "ds-muted", children: w.source })
1800
+ ] }, w.id)) }) }),
1801
+ /* @__PURE__ */ y("button", { type: "button", className: "ds-btn ds-btn--block", onClick: m, children: [
1802
+ /* @__PURE__ */ o(H, { name: f ? "check" : "copy", size: 14 }),
1803
+ /* @__PURE__ */ o("span", { children: f ? i.copiedForPr : i.copyForPr })
1803
1804
  ] })
1804
1805
  ] });
1805
1806
  }
1806
1807
  function ne({ title: e, children: t }) {
1807
- return /* @__PURE__ */ x("section", { className: "ds-section", "data-ds-filter-group": !0, children: [
1808
- /* @__PURE__ */ n("h2", { className: "ds-section__title", children: e }),
1809
- /* @__PURE__ */ n("div", { className: "ds-defs", children: t })
1808
+ return /* @__PURE__ */ y("section", { className: "ds-section", "data-ds-filter-group": !0, children: [
1809
+ /* @__PURE__ */ o("h2", { className: "ds-section__title", children: e }),
1810
+ /* @__PURE__ */ o("div", { className: "ds-defs", children: t })
1810
1811
  ] });
1811
1812
  }
1812
1813
  function W({ term: e, children: t }) {
1813
- return /* @__PURE__ */ x("dl", { className: "ds-def", "data-ds-filter": !0, children: [
1814
- /* @__PURE__ */ n("dt", { children: e }),
1815
- /* @__PURE__ */ n("dd", { children: t })
1814
+ return /* @__PURE__ */ y("dl", { className: "ds-def", "data-ds-filter": !0, children: [
1815
+ /* @__PURE__ */ o("dt", { children: e }),
1816
+ /* @__PURE__ */ o("dd", { children: t })
1816
1817
  ] });
1817
1818
  }
1818
1819
  function ue({ term: e, items: t }) {
1819
- return t?.length ? /* @__PURE__ */ x("dl", { className: "ds-def", "data-ds-filter": !0, children: [
1820
- /* @__PURE__ */ n("dt", { children: e }),
1821
- /* @__PURE__ */ n("dd", { children: /* @__PURE__ */ n("ul", { className: "ds-list", children: t.map((a) => /* @__PURE__ */ n("li", { children: a }, a)) }) })
1820
+ return t?.length ? /* @__PURE__ */ y("dl", { className: "ds-def", "data-ds-filter": !0, children: [
1821
+ /* @__PURE__ */ o("dt", { children: e }),
1822
+ /* @__PURE__ */ o("dd", { children: /* @__PURE__ */ o("ul", { className: "ds-list", children: t.map((n) => /* @__PURE__ */ o("li", { children: n }, n)) }) })
1822
1823
  ] }) : null;
1823
1824
  }
1824
- function on(e) {
1825
+ function pn(e) {
1825
1826
  return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === "f";
1826
1827
  }
1827
- function rn(e, t) {
1828
+ function mn(e, t) {
1828
1829
  if (!e) return !1;
1829
- const a = X(t), r = [...e.querySelectorAll("[data-ds-filter]")];
1830
- for (const o of r)
1831
- o.hidden = a.length > 0 && !X(o.textContent ?? "").includes(a);
1832
- for (const o of e.querySelectorAll("[data-ds-filter-group]")) {
1833
- const s = [...o.querySelectorAll("[data-ds-filter]")], d = X(
1834
- o.querySelector("[data-ds-filter-title], .ds-section__title")?.textContent ?? ""
1830
+ const n = X(t), r = [...e.querySelectorAll("[data-ds-filter]")];
1831
+ for (const s of r)
1832
+ s.hidden = n.length > 0 && !X(s.textContent ?? "").includes(n);
1833
+ for (const s of e.querySelectorAll("[data-ds-filter-group]")) {
1834
+ const a = [...s.querySelectorAll("[data-ds-filter]")], c = X(
1835
+ s.querySelector("[data-ds-filter-title], .ds-section__title")?.textContent ?? ""
1835
1836
  );
1836
- if (a.length > 0 && d.includes(a)) {
1837
- o.hidden = !1;
1838
- for (const l of s) l.hidden = !1;
1837
+ if (n.length > 0 && c.includes(n)) {
1838
+ s.hidden = !1;
1839
+ for (const l of a) l.hidden = !1;
1839
1840
  continue;
1840
1841
  }
1841
- o.hidden = a.length > 0 && s.every((l) => l.hidden);
1842
+ s.hidden = n.length > 0 && a.every((l) => l.hidden);
1842
1843
  }
1843
- return a.length > 0 && r.length > 0 && r.every((o) => o.hidden);
1844
+ return n.length > 0 && r.length > 0 && r.every((s) => s.hidden);
1844
1845
  }
1845
- const an = 24;
1846
- function sn({
1846
+ const fn = 24;
1847
+ function wn({
1847
1848
  location: e,
1848
1849
  viewport: t,
1849
- zoom: a,
1850
+ zoom: n,
1850
1851
  title: r,
1851
- resizing: o,
1852
- onFrameNavigate: s,
1853
- onShortcut: d,
1852
+ resizing: s,
1853
+ onFrameNavigate: a,
1854
+ onShortcut: c,
1854
1855
  onEffectiveZoom: l,
1855
- frameRef: p
1856
+ frameRef: h
1856
1857
  }) {
1857
- const h = q(null), u = cn(h), c = ie(e.path, e.search), [g] = z(c), C = q(c), N = q(c), E = typeof window > "u" ? "" : window.location.origin, R = I(
1858
- (w) => {
1859
- N.current = w;
1860
- const S = p.current?.contentWindow;
1858
+ const p = q(null), u = gn(p), i = ie(e.path, e.search), [f] = D(i), S = q(i), N = q(i), $ = typeof window > "u" ? "" : window.location.origin, _ = K(
1859
+ (g) => {
1860
+ N.current = g;
1861
+ const C = h.current?.contentWindow;
1861
1862
  try {
1862
- S?.location.replace(new URL(w, E).toString());
1863
+ C?.location.replace(new URL(g, $).toString());
1863
1864
  } catch {
1864
- p.current && (p.current.src = w);
1865
+ h.current && (h.current.src = g);
1865
1866
  }
1866
1867
  },
1867
- [p, E]
1868
+ [h, $]
1868
1869
  );
1869
- K(() => {
1870
- if (c === C.current) return;
1871
- const w = C.current;
1872
- C.current = c, Fe(w) !== Fe(c) ? R(c) : ae(p.current?.contentWindow, { ds: 1, type: "location", url: c }, E);
1873
- }, [c, p, R, E]), K(() => {
1874
- const w = (S) => {
1875
- const M = Ze(S, {
1876
- origin: E,
1877
- source: p.current?.contentWindow
1870
+ V(() => {
1871
+ if (i === S.current) return;
1872
+ const g = S.current;
1873
+ S.current = i, ze(g) !== ze(i) ? _(i) : se(h.current?.contentWindow, { ds: 1, type: "location", url: i }, $);
1874
+ }, [i, h, _, $]), V(() => {
1875
+ const g = (C) => {
1876
+ const E = Qe(C, {
1877
+ origin: $,
1878
+ source: h.current?.contentWindow
1878
1879
  });
1879
- if (M)
1880
- switch (M.type) {
1880
+ if (E)
1881
+ switch (E.type) {
1881
1882
  case "ready": {
1882
- if (M.url === C.current) return;
1883
- if (M.url === N.current) {
1884
- ae(
1885
- p.current?.contentWindow,
1886
- { ds: 1, type: "location", url: C.current },
1887
- E
1883
+ if (E.url === S.current) return;
1884
+ if (E.url === N.current) {
1885
+ se(
1886
+ h.current?.contentWindow,
1887
+ { ds: 1, type: "location", url: S.current },
1888
+ $
1888
1889
  );
1889
1890
  return;
1890
1891
  }
1891
- C.current = M.url, N.current = M.url, s(M.url, !0);
1892
+ S.current = E.url, N.current = E.url, a(E.url, !0);
1892
1893
  return;
1893
1894
  }
1894
1895
  case "navigate":
1895
- C.current = M.url, s(M.url, M.replace);
1896
+ S.current = E.url, a(E.url, E.replace);
1896
1897
  return;
1897
1898
  case "shortcut":
1898
- d(M.key);
1899
+ c(E.key);
1899
1900
  return;
1900
1901
  default:
1901
1902
  return;
1902
1903
  }
1903
1904
  };
1904
- return window.addEventListener("message", w), () => window.removeEventListener("message", w);
1905
- }, [p, s, d, E]);
1906
- const v = !!t.width, L = v ? an : 0, b = Math.max(0, u.width - L * 2), m = Math.max(0, u.height - L * 2), f = !t.width || b === 0 || t.width <= b, k = a === 100 && !f ? Math.max(10, Math.floor(b / t.width * 100)) : a, y = k / 100;
1907
- K(() => {
1905
+ return window.addEventListener("message", g), () => window.removeEventListener("message", g);
1906
+ }, [h, a, c, $]);
1907
+ const v = !!t.width, L = v ? fn : 0, b = Math.max(0, u.width - L * 2), m = Math.max(0, u.height - L * 2), w = !t.width || b === 0 || t.width <= b, k = n === 100 && !w ? Math.max(10, Math.floor(b / t.width * 100)) : n, x = k / 100;
1908
+ V(() => {
1908
1909
  l?.(k);
1909
1910
  }, [k, l]);
1910
- const T = t.width ?? b / y, i = t.height ?? m / y;
1911
- return /* @__PURE__ */ n("div", { className: "ds-canvas", ref: h, "data-fit": v ? void 0 : "true", children: /* @__PURE__ */ n(
1911
+ const T = t.width ?? b / x, d = t.height ?? m / x;
1912
+ return /* @__PURE__ */ o("div", { className: "ds-canvas", ref: p, "data-fit": v ? void 0 : "true", children: /* @__PURE__ */ o(
1912
1913
  "div",
1913
1914
  {
1914
1915
  className: "ds-canvas__box",
1915
- style: { width: Math.floor(T * y), height: Math.floor(i * y) },
1916
- children: /* @__PURE__ */ n(
1916
+ style: { width: Math.floor(T * x), height: Math.floor(d * x) },
1917
+ children: /* @__PURE__ */ o(
1917
1918
  "iframe",
1918
1919
  {
1919
- ref: p,
1920
- [xt]: "",
1920
+ ref: h,
1921
+ [Lt]: "",
1921
1922
  className: "ds-frame",
1922
- src: g,
1923
+ src: f,
1923
1924
  title: r,
1924
1925
  style: {
1925
1926
  width: Math.floor(T),
1926
- height: Math.floor(i),
1927
- transform: y === 1 ? void 0 : `scale(${y})`,
1928
- pointerEvents: o ? "none" : void 0
1927
+ height: Math.floor(d),
1928
+ transform: x === 1 ? void 0 : `scale(${x})`,
1929
+ pointerEvents: s ? "none" : void 0
1929
1930
  }
1930
1931
  }
1931
1932
  )
1932
1933
  }
1933
1934
  ) });
1934
1935
  }
1935
- function cn(e) {
1936
- const [t, a] = z({ width: 0, height: 0 });
1937
- return Be(() => {
1936
+ function gn(e) {
1937
+ const [t, n] = D({ width: 0, height: 0 });
1938
+ return qe(() => {
1938
1939
  const r = e.current;
1939
1940
  if (!r) return;
1940
- const o = () => {
1941
- const d = r.clientWidth, l = r.clientHeight;
1942
- a(
1943
- (p) => p.width === d && p.height === l ? p : { width: d, height: l }
1941
+ const s = () => {
1942
+ const c = r.clientWidth, l = r.clientHeight;
1943
+ n(
1944
+ (h) => h.width === c && h.height === l ? h : { width: c, height: l }
1944
1945
  );
1945
1946
  };
1946
- if (o(), typeof ResizeObserver > "u")
1947
- return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
1948
- const s = new ResizeObserver(o);
1949
- return s.observe(r), () => s.disconnect();
1947
+ if (s(), typeof ResizeObserver > "u")
1948
+ return window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
1949
+ const a = new ResizeObserver(s);
1950
+ return a.observe(r), () => a.disconnect();
1950
1951
  }, [e]), t;
1951
1952
  }
1952
- const rt = 2500;
1953
- class at extends Error {
1953
+ const at = 2500;
1954
+ class it extends Error {
1954
1955
  constructor(t) {
1955
1956
  super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
1956
1957
  }
1957
1958
  }
1958
- function Me(e) {
1959
+ function Ee(e) {
1959
1960
  if (e)
1960
1961
  return typeof e.data == "function" ? e.data() : e.data;
1961
1962
  }
1962
1963
  const Le = {
1963
1964
  id: "fixtures",
1964
1965
  label: "Fixtures",
1965
- load: async ({ scenario: e, fixture: t, network: a }) => {
1966
- switch (a) {
1966
+ load: async ({ scenario: e, fixture: t, network: n }) => {
1967
+ switch (n) {
1967
1968
  case "empty":
1968
1969
  return null;
1969
1970
  case "error":
1970
- throw new at(e.id);
1971
+ throw new it(e.id);
1971
1972
  case "loading":
1972
1973
  return new Promise(() => {
1973
1974
  });
1974
1975
  case "slow":
1975
- return await ln(rt), Me(t);
1976
+ return await vn(at), Ee(t);
1976
1977
  default:
1977
- return Me(t);
1978
+ return Ee(t);
1978
1979
  }
1979
1980
  }
1980
1981
  };
1981
- function yn(e) {
1982
- const { id: t, label: a, baseUrl: r, path: o, init: s, fallbackToFixture: d = !0 } = e;
1982
+ function Hn(e) {
1983
+ const { id: t, label: n, baseUrl: r, path: s, init: a, fallbackToFixture: c = !0 } = e;
1983
1984
  return {
1984
1985
  id: t,
1985
- label: a,
1986
+ label: n,
1986
1987
  load: async (l) => {
1987
- const p = new URL(o ? o(l) : l.scenario.route, r);
1988
+ const h = new URL(s ? s(l) : l.scenario.route, r);
1988
1989
  try {
1989
- const h = await fetch(p, s);
1990
- if (!h.ok) throw new Error(`${h.status} ${h.statusText}`);
1991
- return await h.json();
1992
- } catch (h) {
1993
- if (d) return Me(l.fixture);
1994
- throw new Error(`Adapter "${t}" falhou em ${p.toString()}`, { cause: h });
1990
+ const p = await fetch(h, a);
1991
+ if (!p.ok) throw new Error(`${p.status} ${p.statusText}`);
1992
+ return await p.json();
1993
+ } catch (p) {
1994
+ if (c) return Ee(l.fixture);
1995
+ throw new Error(`Adapter "${t}" falhou em ${h.toString()}`, { cause: p });
1995
1996
  }
1996
1997
  }
1997
1998
  };
1998
1999
  }
1999
- function ln(e) {
2000
+ function vn(e) {
2000
2001
  return new Promise((t) => setTimeout(t, e));
2001
2002
  }
2002
- function dn(e) {
2003
- const { scenario: t, fixture: a, network: r, adapter: o } = e, [s, d] = z({
2003
+ function bn(e) {
2004
+ const { scenario: t, fixture: n, network: r, adapter: s } = e, [a, c] = D({
2004
2005
  data: void 0,
2005
2006
  isLoading: !!t || r === "loading" || r === "slow",
2006
2007
  error: void 0
2007
2008
  });
2008
- return K(() => {
2009
+ return V(() => {
2009
2010
  if (!t)
2010
2011
  switch (r) {
2011
2012
  case "loading":
2012
- d({ data: void 0, isLoading: !0, error: void 0 });
2013
+ c({ data: void 0, isLoading: !0, error: void 0 });
2013
2014
  return;
2014
2015
  case "empty":
2015
- d({ data: null, isLoading: !1, error: void 0 });
2016
+ c({ data: null, isLoading: !1, error: void 0 });
2016
2017
  return;
2017
2018
  case "error":
2018
- d({
2019
+ c({
2019
2020
  data: void 0,
2020
2021
  isLoading: !1,
2021
- error: new at(e.screen ?? "—")
2022
+ error: new it(e.screen ?? "—")
2022
2023
  });
2023
2024
  return;
2024
2025
  case "slow": {
2025
- d({ data: void 0, isLoading: !0, error: void 0 });
2026
- const h = setTimeout(
2027
- () => d({ data: void 0, isLoading: !1, error: void 0 }),
2028
- rt
2026
+ c({ data: void 0, isLoading: !0, error: void 0 });
2027
+ const p = setTimeout(
2028
+ () => c({ data: void 0, isLoading: !1, error: void 0 }),
2029
+ at
2029
2030
  );
2030
- return () => clearTimeout(h);
2031
+ return () => clearTimeout(p);
2031
2032
  }
2032
2033
  default:
2033
- d({ data: void 0, isLoading: !1, error: void 0 });
2034
+ c({ data: void 0, isLoading: !1, error: void 0 });
2034
2035
  return;
2035
2036
  }
2036
2037
  let l = !0;
2037
- d({ data: void 0, isLoading: !0, error: void 0 });
2038
- const p = o ?? Le;
2039
- return Promise.resolve(p.load({ scenario: t, fixture: a, network: r })).then((h) => {
2040
- l && d({ data: h, isLoading: !1, error: void 0 });
2041
- }).catch((h) => {
2042
- l && d({
2038
+ c({ data: void 0, isLoading: !0, error: void 0 });
2039
+ const h = s ?? Le;
2040
+ return Promise.resolve(h.load({ scenario: t, fixture: n, network: r })).then((p) => {
2041
+ l && c({ data: p, isLoading: !1, error: void 0 });
2042
+ }).catch((p) => {
2043
+ l && c({
2043
2044
  data: void 0,
2044
2045
  isLoading: !1,
2045
- error: h instanceof Error ? h : new Error(String(h))
2046
+ error: p instanceof Error ? p : new Error(String(p))
2046
2047
  });
2047
2048
  }), () => {
2048
2049
  l = !1;
2049
2050
  };
2050
- }, [t, a, r, o, e.screen]), s;
2051
+ }, [t, n, r, s, e.screen]), a;
2051
2052
  }
2052
2053
  function Ke({ title: e, children: t }) {
2053
- return /* @__PURE__ */ x("div", { className: "ds-stage-empty", children: [
2054
- /* @__PURE__ */ n("h2", { className: "ds-stage-empty__title", children: e }),
2054
+ return /* @__PURE__ */ y("div", { className: "ds-stage-empty", children: [
2055
+ /* @__PURE__ */ o("h2", { className: "ds-stage-empty__title", children: e }),
2055
2056
  t
2056
2057
  ] });
2057
2058
  }
2058
- function Ie(e) {
2059
+ const kn = /* @__PURE__ */ Symbol.for("react.memo"), Sn = /* @__PURE__ */ Symbol.for("react.forward_ref");
2060
+ class ct extends Error {
2061
+ }
2062
+ function lt(e) {
2059
2063
  const t = [];
2060
- return e.querySelectorAll(`[${Oe}]`).forEach((a, r) => {
2061
- const o = a.getBoundingClientRect();
2062
- o.width === 0 && o.height === 0 || t.push({
2063
- key: `${r}`,
2064
- id: a.getAttribute(Oe) ?? "",
2065
- top: o.top,
2066
- left: o.left,
2067
- width: o.width,
2068
- height: o.height
2069
- });
2070
- }), t;
2064
+ let n = e;
2065
+ for (; n && (typeof n == "function" || typeof n == "object") && !t.includes(n); ) {
2066
+ t.push(n);
2067
+ const r = n.$$typeof;
2068
+ if (r === kn) n = n.type;
2069
+ else if (r === Sn) n = n.render;
2070
+ else break;
2071
+ }
2072
+ return t;
2071
2073
  }
2072
- const un = 16;
2073
- function hn({ registry: e }) {
2074
- const t = J(), [a, r] = z(() => Ie(document));
2075
- return K(() => {
2076
- let o = 0;
2077
- const s = () => {
2078
- o || (o = window.requestAnimationFrame(() => {
2079
- o = 0, r(Ie(document));
2074
+ function Cn(e) {
2075
+ const t = /* @__PURE__ */ new Map();
2076
+ for (const n of e) {
2077
+ const r = Array.isArray(n.implementation) ? n.implementation : n.implementation === void 0 ? [] : [n.implementation];
2078
+ for (const s of r)
2079
+ for (const a of lt(s)) {
2080
+ const c = t.get(a) ?? [];
2081
+ c.includes(n.id) || c.push(n.id), t.set(a, c);
2082
+ }
2083
+ }
2084
+ return t;
2085
+ }
2086
+ function yn(e, t) {
2087
+ const n = [];
2088
+ for (const r of [e.type, e.elementType])
2089
+ for (const s of lt(r))
2090
+ for (const a of t.get(s) ?? []) n.includes(a) || n.push(a);
2091
+ return n;
2092
+ }
2093
+ function xn(e) {
2094
+ return !!e && e.nodeType === 1;
2095
+ }
2096
+ function dt(e) {
2097
+ return typeof e.type == "string" && xn(e.stateNode);
2098
+ }
2099
+ function Te(e) {
2100
+ if (!e || typeof e != "object" || !("child" in e) || !("sibling" in e) || !("stateNode" in e))
2101
+ throw new ct("fiber sem child, sibling ou stateNode");
2102
+ }
2103
+ function ut(e, t) {
2104
+ for (let n = e.child; n; n = n.sibling)
2105
+ Te(n), dt(n) ? t.push(n.stateNode) : ut(n, t);
2106
+ }
2107
+ function Nn(e, t) {
2108
+ const n = [];
2109
+ if (t.size === 0) return n;
2110
+ for (const r of e) {
2111
+ const s = r?.current;
2112
+ if (Te(s), s.stateNode !== r) throw new ct("raiz sem `current.stateNode` de volta");
2113
+ const a = s.child ? [s.child] : [];
2114
+ for (; a.length > 0; ) {
2115
+ const c = a.pop();
2116
+ if (Te(c), c.sibling && a.push(c.sibling), c.child && a.push(c.child), dt(c)) continue;
2117
+ const l = yn(c, t);
2118
+ if (l.length === 0) continue;
2119
+ const h = [];
2120
+ ut(c, h), h.length > 0 && n.push({ ids: l, elements: h });
2121
+ }
2122
+ }
2123
+ return n;
2124
+ }
2125
+ let He = !1;
2126
+ function We(e) {
2127
+ He || (He = !0, console.warn(`[design-space] ${e}`));
2128
+ }
2129
+ function $n(e, t) {
2130
+ if (e.size === 0) return [];
2131
+ const n = Ot(t);
2132
+ if (!n)
2133
+ return We(
2134
+ `Destacar componentes: o React carregou antes do gancho do DevTools, então só a marcação \`${fe}\` é contornada. Importe "@brucesantos/design-space/devtools-hook" na primeira linha do ponto de entrada, antes de qualquer import de React.`
2135
+ ), [];
2136
+ try {
2137
+ return Nn(n, e);
2138
+ } catch (r) {
2139
+ return We(
2140
+ "Destacar componentes: a árvore do React não tem a forma esperada, então só a marcação " + `\`${fe}\` é contornada. ${r instanceof Error ? r.message : ""}`.trim()
2141
+ ), [];
2142
+ }
2143
+ }
2144
+ function Mn(e, t = /* @__PURE__ */ new Map()) {
2145
+ const n = e.defaultView ?? window, r = $n(t, n);
2146
+ e.querySelectorAll(`[${fe}]`).forEach((l) => {
2147
+ r.push({ ids: [l.getAttribute(fe) ?? ""], elements: [l] });
2148
+ });
2149
+ const s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
2150
+ for (const l of r) {
2151
+ const h = l.elements.filter((i) => i.isConnected && !i.closest(".ds-highlight"));
2152
+ if (h.length === 0) continue;
2153
+ const p = h.map((i) => (s.has(i) || s.set(i, s.size), s.get(i))).join(","), u = a.get(p) ?? { ids: [], elements: h };
2154
+ for (const i of l.ids) u.ids.includes(i) || u.ids.push(i);
2155
+ a.set(p, u);
2156
+ }
2157
+ const c = [];
2158
+ for (const [l, { ids: h, elements: p }] of a) {
2159
+ let u = 1 / 0, i = 1 / 0, f = -1 / 0, S = -1 / 0;
2160
+ for (const N of p) {
2161
+ const $ = N.getBoundingClientRect();
2162
+ $.width === 0 && $.height === 0 || (u = Math.min(u, $.top), i = Math.min(i, $.left), f = Math.max(f, $.right), S = Math.max(S, $.bottom));
2163
+ }
2164
+ u !== 1 / 0 && c.push({ key: l, ids: h, top: u, left: i, width: f - i, height: S - u });
2165
+ }
2166
+ return c;
2167
+ }
2168
+ function En(e, t) {
2169
+ return e.length === t.length && e.every((n, r) => {
2170
+ const s = t[r];
2171
+ return n.key === s.key && n.top === s.top && n.left === s.left && n.width === s.width && n.height === s.height && n.ids.join(`
2172
+ `) === s.ids.join(`
2173
+ `);
2174
+ });
2175
+ }
2176
+ const Ln = 16;
2177
+ function Tn({ registry: e }) {
2178
+ const t = J(), n = A(() => Cn(e.componentsFor()), [e]), [r, s] = D([]);
2179
+ return V(() => {
2180
+ zt(window);
2181
+ let a = 0;
2182
+ const c = () => {
2183
+ a || (a = window.requestAnimationFrame(() => {
2184
+ a = 0;
2185
+ const p = Mn(document, n);
2186
+ s((u) => En(u, p) ? u : p);
2080
2187
  }));
2081
- }, d = new MutationObserver((l) => {
2082
- l.some((h) => !(h.target instanceof Element ? h.target : h.target.parentElement)?.closest(".ds-highlight")) && s();
2188
+ }, l = new MutationObserver((p) => {
2189
+ p.some((i) => !(i.target instanceof Element ? i.target : i.target.parentElement)?.closest(".ds-highlight")) && c();
2083
2190
  });
2084
- return d.observe(document.body, { subtree: !0, childList: !0, attributes: !0, characterData: !0 }), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), document.addEventListener("transitionend", s, !0), document.addEventListener("animationend", s, !0), s(), () => {
2085
- o && window.cancelAnimationFrame(o), d.disconnect(), window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), document.removeEventListener("transitionend", s, !0), document.removeEventListener("animationend", s, !0);
2191
+ l.observe(document.body, { subtree: !0, childList: !0, attributes: !0, characterData: !0 }), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), document.addEventListener("transitionend", c, !0), document.addEventListener("animationend", c, !0);
2192
+ const h = At(c, window);
2193
+ return c(), () => {
2194
+ a && window.cancelAnimationFrame(a), l.disconnect(), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), document.removeEventListener("transitionend", c, !0), document.removeEventListener("animationend", c, !0), h();
2086
2195
  };
2087
- }, []), Lt(
2088
- /* @__PURE__ */ n("div", { className: "ds-highlight", "aria-hidden": "true", children: a.map((o) => {
2089
- const s = e.component(o.id);
2090
- return /* @__PURE__ */ n(
2196
+ }, [n]), Ft(
2197
+ /* @__PURE__ */ o("div", { className: "ds-highlight", "aria-hidden": "true", children: r.map((a) => {
2198
+ const c = a.ids.map((l) => ({ id: l, known: e.component(l) }));
2199
+ return /* @__PURE__ */ o(
2091
2200
  "div",
2092
2201
  {
2093
2202
  className: "ds-highlight__box",
2094
- "data-known": s ? "true" : "false",
2095
- "data-label": o.top < un ? "inside" : "above",
2096
- style: { top: o.top, left: o.left, width: o.width, height: o.height },
2097
- children: /* @__PURE__ */ n("span", { className: "ds-highlight__label", children: s ? s.name : t.highlight.notInCatalog(o.id) })
2203
+ "data-known": c.every((l) => l.known) ? "true" : "false",
2204
+ "data-label": a.top < Ln ? "inside" : "above",
2205
+ style: { top: a.top, left: a.left, width: a.width, height: a.height },
2206
+ children: /* @__PURE__ */ o("span", { className: "ds-highlight__label", children: c.map((l) => l.known ? l.known.name : t.highlight.notInCatalog(l.id)).join(" · ") })
2098
2207
  },
2099
- o.key
2208
+ a.key
2100
2209
  );
2101
2210
  }) }),
2102
2211
  document.body
2103
2212
  );
2104
2213
  }
2105
- function pn({ product: e, registry: t }) {
2106
- const a = J(), { location: r, controls: o, viewport: s, navigate: d, openScenario: l, setScreenControls: p } = Xe(
2214
+ function Pn({ product: e, registry: t }) {
2215
+ const n = J(), { location: r, controls: s, viewport: a, navigate: c, openScenario: l, setScreenControls: h } = et(
2107
2216
  t,
2108
2217
  { frame: !0 }
2109
- ), h = q(null);
2110
- K(() => {
2111
- const P = (A) => {
2112
- if (A.defaultPrevented || A.button !== 0 || A.metaKey || A.ctrlKey || A.shiftKey || A.altKey) return;
2113
- const V = A.target?.closest?.("a[href]");
2114
- if (!(V instanceof HTMLAnchorElement) || V.target && V.target !== "_self" || V.hasAttribute("download")) return;
2115
- const Z = V.getAttribute("href") ?? "";
2218
+ ), p = q(null);
2219
+ V(() => {
2220
+ const P = (z) => {
2221
+ if (z.defaultPrevented || z.button !== 0 || z.metaKey || z.ctrlKey || z.shiftKey || z.altKey) return;
2222
+ const U = z.target?.closest?.("a[href]");
2223
+ if (!(U instanceof HTMLAnchorElement) || U.target && U.target !== "_self" || U.hasAttribute("download")) return;
2224
+ const Z = U.getAttribute("href") ?? "";
2116
2225
  if (Z.startsWith("#")) return;
2117
2226
  let B;
2118
2227
  try {
@@ -2120,22 +2229,22 @@ function pn({ product: e, registry: t }) {
2120
2229
  } catch {
2121
2230
  return;
2122
2231
  }
2123
- B.origin === window.location.origin && (A.preventDefault(), d(`${B.pathname}${B.search}`));
2232
+ B.origin === window.location.origin && (z.preventDefault(), c(`${B.pathname}${B.search}`));
2124
2233
  };
2125
2234
  return document.addEventListener("click", P), () => document.removeEventListener("click", P);
2126
- }, [d]), K(() => {
2127
- const P = (A) => {
2235
+ }, [c]), V(() => {
2236
+ const P = (z) => {
2128
2237
  if (window.parent === window) return;
2129
- const V = mn(A);
2130
- if (!V) return;
2131
- const Z = A.target;
2132
- V === "C" && Z?.closest?.("input, textarea, select, [contenteditable='true'], [contenteditable='']") || (A.preventDefault(), ae(window.parent, { ds: 1, type: "shortcut", key: V }, window.location.origin));
2238
+ const U = Rn(z);
2239
+ if (!U) return;
2240
+ const Z = z.target;
2241
+ U === "C" && Z?.closest?.("input, textarea, select, [contenteditable='true'], [contenteditable='']") || (z.preventDefault(), se(window.parent, { ds: 1, type: "shortcut", key: U }, window.location.origin));
2133
2242
  };
2134
2243
  return window.addEventListener("keydown", P), () => window.removeEventListener("keydown", P);
2135
- }, []), K(() => {
2136
- const P = h.current;
2137
- if (!P || !o.handoff) return;
2138
- const A = () => {
2244
+ }, []), V(() => {
2245
+ const P = p.current;
2246
+ if (!P || !s.handoff) return;
2247
+ const z = () => {
2139
2248
  for (const Z of P.querySelectorAll("a[href]")) {
2140
2249
  const B = Z.getAttribute("href");
2141
2250
  if (!B || B.startsWith("#")) continue;
@@ -2146,103 +2255,103 @@ function pn({ product: e, registry: t }) {
2146
2255
  continue;
2147
2256
  }
2148
2257
  if (Y.origin !== window.location.origin) continue;
2149
- Ee(Y.searchParams, o.handoff);
2258
+ Pe(Y.searchParams, s.handoff);
2150
2259
  const ce = `${Y.pathname}${Y.search}${Y.hash}`;
2151
2260
  B !== ce && Z.setAttribute("href", ce);
2152
2261
  }
2153
2262
  };
2154
- A();
2155
- const V = new MutationObserver(A);
2156
- return V.observe(P, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["href"] }), () => V.disconnect();
2157
- }, [o.handoff]);
2158
- const u = t.scenario(o.scenario), c = t.component(o.component), g = D(() => {
2263
+ z();
2264
+ const U = new MutationObserver(z);
2265
+ return U.observe(P, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["href"] }), () => U.disconnect();
2266
+ }, [s.handoff]);
2267
+ const u = t.scenario(s.scenario), i = t.component(s.component), f = A(() => {
2159
2268
  const P = new URLSearchParams(r.search);
2160
2269
  return {
2161
- scenario: P.get($.scenario) ?? void 0,
2162
- component: P.get($.component) ?? void 0
2270
+ scenario: P.get(M.scenario) ?? void 0,
2271
+ component: P.get(M.component) ?? void 0
2163
2272
  };
2164
- }, [r.search]), C = !!(o.handoff && (g.scenario && !re(o.handoff, g.scenario) || g.component && !ve(o.handoff, g.component) || !g.component && !je(o.handoff, r.path, e.scenarios))), N = D(
2165
- () => t.resolveComponentFixture(c?.id, c ? o.fixture : void 0),
2166
- [c, o.fixture, t]
2167
- ), E = D(() => {
2273
+ }, [r.search]), S = !!(s.handoff && (f.scenario && !re(s.handoff, f.scenario) || f.component && !be(s.handoff, f.component) || !f.component && !Ge(s.handoff, r.path, e.scenarios))), N = A(
2274
+ () => t.resolveComponentFixture(i?.id, i ? s.fixture : void 0),
2275
+ [i, s.fixture, t]
2276
+ ), $ = A(() => {
2168
2277
  const P = N.fixture?.data;
2169
2278
  return typeof P == "function" ? P() : P;
2170
- }, [N.fixture]), R = t.persona(o.persona ?? u?.persona), v = t.fixture(o.fixture ?? u?.fixture), L = D(() => {
2171
- const P = o.dataSource ?? "fixtures";
2172
- return P === "fixtures" ? Le : e.dataSources?.adapters?.find((A) => A.id === P) ?? Le;
2173
- }, [o.dataSource, e.dataSources?.adapters]), { data: b, isLoading: m, error: f } = dn({
2279
+ }, [N.fixture]), _ = t.persona(s.persona ?? u?.persona), v = t.fixture(s.fixture ?? u?.fixture), L = A(() => {
2280
+ const P = s.dataSource ?? "fixtures";
2281
+ return P === "fixtures" ? Le : e.dataSources?.adapters?.find((z) => z.id === P) ?? Le;
2282
+ }, [s.dataSource, e.dataSources?.adapters]), { data: b, isLoading: m, error: w } = bn({
2174
2283
  scenario: u,
2175
2284
  fixture: v,
2176
- network: o.network,
2285
+ network: s.network,
2177
2286
  adapter: L,
2178
2287
  screen: r.path
2179
- }), k = D(() => u ? o.persona && o.persona !== (u.persona ?? t.defaultPersona) ? t.persona(o.persona)?.permissions ?? [] : t.permissionsOf(u) : t.persona(o.persona)?.permissions ?? [], [o.persona, t, u]), y = o.screenControls, T = D(() => y ?? {}, [y]), i = I(
2180
- (P, A) => p({ [P]: A }),
2181
- [p]
2182
- ), w = D(
2288
+ }), k = A(() => u ? s.persona && s.persona !== (u.persona ?? t.defaultPersona) ? t.persona(s.persona)?.permissions ?? [] : t.permissionsOf(u) : t.persona(s.persona)?.permissions ?? [], [s.persona, t, u]), x = s.screenControls, T = A(() => x ?? {}, [x]), d = K(
2289
+ (P, z) => h({ [P]: z }),
2290
+ [h]
2291
+ ), g = A(
2183
2292
  () => ({
2184
2293
  scenario: u,
2185
- persona: R,
2294
+ persona: _,
2186
2295
  permissions: k,
2187
2296
  can: (P) => k.includes(P),
2188
2297
  data: b,
2189
2298
  fixture: v,
2190
- network: o.network,
2299
+ network: s.network,
2191
2300
  isLoading: m,
2192
- error: f,
2301
+ error: w,
2193
2302
  rules: t.rulesOf(u),
2194
- viewport: s,
2195
- themeMode: o.themeMode,
2196
- locale: o.locale,
2197
- navigate: d,
2303
+ viewport: a,
2304
+ themeMode: s.themeMode,
2305
+ locale: s.locale,
2306
+ navigate: c,
2198
2307
  openScenario: l,
2199
2308
  controls: T,
2200
- setControl: i,
2201
- setControls: p
2309
+ setControl: d,
2310
+ setControls: h
2202
2311
  }),
2203
2312
  [
2204
2313
  u,
2205
- R,
2314
+ _,
2206
2315
  k,
2207
2316
  b,
2208
2317
  v,
2209
- o.network,
2210
- o.themeMode,
2211
- o.locale,
2318
+ s.network,
2319
+ s.themeMode,
2320
+ s.locale,
2212
2321
  m,
2213
- f,
2322
+ w,
2214
2323
  t,
2215
- s,
2216
- d,
2324
+ a,
2325
+ c,
2217
2326
  l,
2218
2327
  T,
2219
- i,
2220
- p
2328
+ d,
2329
+ h
2221
2330
  ]
2222
- ), S = ye(e.routes ?? [], r.path), M = e.wrapper, F = e.notFound, O = c?.preview, U = C ? /* @__PURE__ */ n(Ke, { title: a.shell.outsideHandoff, children: /* @__PURE__ */ n("p", { children: a.shell.outsideHandoffHint }) }) : O ? /* @__PURE__ */ n(
2331
+ ), C = Ne(e.routes ?? [], r.path), E = e.wrapper, F = e.notFound, O = i?.preview, I = S ? /* @__PURE__ */ o(Ke, { title: n.shell.outsideHandoff, children: /* @__PURE__ */ o("p", { children: n.shell.outsideHandoffHint }) }) : O ? /* @__PURE__ */ o(
2223
2332
  O,
2224
2333
  {
2225
2334
  fixture: N.fixture,
2226
- data: E,
2227
- viewport: s,
2228
- themeMode: o.themeMode ?? "default",
2229
- locale: o.locale ?? "default"
2335
+ data: $,
2336
+ viewport: a,
2337
+ themeMode: s.themeMode ?? "default",
2338
+ locale: s.locale ?? "default"
2230
2339
  }
2231
- ) : S ? /* @__PURE__ */ n(S.definition.screen, { params: S.params, context: w }) : F ? /* @__PURE__ */ n(F, { path: r.path }) : /* @__PURE__ */ n(Ke, { title: a.shell.noRoute, children: /* @__PURE__ */ x("p", { children: [
2232
- /* @__PURE__ */ n("code", { children: r.path }),
2340
+ ) : C ? /* @__PURE__ */ o(C.definition.screen, { params: C.params, context: g }) : F ? /* @__PURE__ */ o(F, { path: r.path }) : /* @__PURE__ */ o(Ke, { title: n.shell.noRoute, children: /* @__PURE__ */ y("p", { children: [
2341
+ /* @__PURE__ */ o("code", { children: r.path }),
2233
2342
  " ",
2234
- a.shell.noRouteHint
2343
+ n.shell.noRouteHint
2235
2344
  ] }) });
2236
2345
  return (
2237
2346
  // `display: contents` deixa o layout do produto como se este nó não
2238
2347
  // existisse: ele só serve de raiz para observar os links.
2239
- /* @__PURE__ */ x("div", { ref: h, style: { display: "contents" }, children: [
2240
- M && !C ? /* @__PURE__ */ n(M, { context: w, children: U }) : U,
2241
- o.highlight && !C && /* @__PURE__ */ n(hn, { registry: t })
2348
+ /* @__PURE__ */ y("div", { ref: p, style: { display: "contents" }, children: [
2349
+ E && !S ? /* @__PURE__ */ o(E, { context: g, children: I }) : I,
2350
+ s.highlight && !S && /* @__PURE__ */ o(Tn, { registry: t })
2242
2351
  ] })
2243
2352
  );
2244
2353
  }
2245
- function mn(e) {
2354
+ function Rn(e) {
2246
2355
  if (!e.altKey) {
2247
2356
  if (e.shiftKey && !e.metaKey && !e.ctrlKey && e.key === "C") return "C";
2248
2357
  if ((e.metaKey || e.ctrlKey) && !e.shiftKey) {
@@ -2257,302 +2366,302 @@ const pe = {
2257
2366
  rightWidth: "ds:right-width",
2258
2367
  appearance: "ds:appearance"
2259
2368
  };
2260
- function st(e) {
2369
+ function ht(e) {
2261
2370
  try {
2262
2371
  return window.localStorage.getItem(e) ?? void 0;
2263
2372
  } catch {
2264
2373
  return;
2265
2374
  }
2266
2375
  }
2267
- function it(e, t) {
2376
+ function pt(e, t) {
2268
2377
  try {
2269
2378
  window.localStorage.setItem(e, t);
2270
2379
  } catch {
2271
2380
  }
2272
2381
  }
2273
- function He(e, t, a) {
2274
- return Math.round(Math.min(a, Math.max(t, e)));
2382
+ function Be(e, t, n) {
2383
+ return Math.round(Math.min(n, Math.max(t, e)));
2275
2384
  }
2276
- function We(e, t, a, r) {
2277
- const [o, s] = z(() => {
2278
- const l = Number.parseInt(st(e) ?? "", 10);
2279
- return Number.isFinite(l) ? He(l, a, r) : t;
2280
- }), d = I(
2385
+ function je(e, t, n, r) {
2386
+ const [s, a] = D(() => {
2387
+ const l = Number.parseInt(ht(e) ?? "", 10);
2388
+ return Number.isFinite(l) ? Be(l, n, r) : t;
2389
+ }), c = K(
2281
2390
  (l) => {
2282
- const p = He(l, a, r);
2283
- s(p), it(e, String(p));
2391
+ const h = Be(l, n, r);
2392
+ a(h), pt(e, String(h));
2284
2393
  },
2285
- [e, r, a]
2394
+ [e, r, n]
2286
2395
  );
2287
- return [o, d];
2396
+ return [s, c];
2288
2397
  }
2289
- function fn() {
2398
+ function _n() {
2290
2399
  const e = "(prefers-color-scheme: dark)", t = () => {
2291
2400
  try {
2292
2401
  return window.matchMedia(e).matches ? "dark" : "light";
2293
2402
  } catch {
2294
2403
  return "light";
2295
2404
  }
2296
- }, [a, r] = z(t);
2297
- return K(() => {
2298
- let o;
2405
+ }, [n, r] = D(t);
2406
+ return V(() => {
2407
+ let s;
2299
2408
  try {
2300
- o = window.matchMedia(e);
2409
+ s = window.matchMedia(e);
2301
2410
  } catch {
2302
2411
  return;
2303
2412
  }
2304
- const s = () => r(o?.matches ? "dark" : "light");
2305
- return o.addEventListener?.("change", s), () => o?.removeEventListener?.("change", s);
2306
- }, []), a;
2413
+ const a = () => r(s?.matches ? "dark" : "light");
2414
+ return s.addEventListener?.("change", a), () => s?.removeEventListener?.("change", a);
2415
+ }, []), n;
2307
2416
  }
2308
- function wn() {
2309
- const e = st(pe.appearance);
2417
+ function Fn() {
2418
+ const e = ht(pe.appearance);
2310
2419
  return e === "dark" || e === "light" ? e : void 0;
2311
2420
  }
2312
- function Nn({ product: e }) {
2313
- const t = D(() => Et(e), [e]), a = D(() => Ht(e.theme?.labels), [e.theme?.labels]), [r] = z(() => yt());
2314
- return /* @__PURE__ */ n(tt.Provider, { value: a, children: r ? /* @__PURE__ */ n(pn, { product: e, registry: t }) : /* @__PURE__ */ n(gn, { product: e, registry: t }) });
2421
+ function Wn({ product: e }) {
2422
+ const t = A(() => Dt(e), [e]), n = A(() => Xt(e.theme?.labels), [e.theme?.labels]), [r] = D(() => Tt());
2423
+ return /* @__PURE__ */ o(ot.Provider, { value: n, children: r ? /* @__PURE__ */ o(Pn, { product: e, registry: t }) : /* @__PURE__ */ o(On, { product: e, registry: t }) });
2315
2424
  }
2316
- const Ce = { initial: 290, min: 200, max: 480 }, xe = { initial: 320, min: 260, max: 560 };
2317
- function gn({ product: e, registry: t }) {
2318
- const a = J(), r = D(() => Nt(e.deploy), [e.deploy]), { location: o, controls: s, viewport: d, setControls: l, openScenario: p, openComponent: h, openScreen: u, go: c } = Xe(t), g = q(o);
2319
- g.current = o;
2320
- const C = q(null), N = fn(), [E, R] = z(() => wn()), v = s.chromeTheme ?? E ?? N, [L, b] = We(
2425
+ const ye = { initial: 290, min: 200, max: 480 }, xe = { initial: 320, min: 260, max: 560 };
2426
+ function On({ product: e, registry: t }) {
2427
+ const n = J(), r = A(() => Pt(e.deploy), [e.deploy]), { location: s, controls: a, viewport: c, setControls: l, openScenario: h, openComponent: p, openScreen: u, go: i } = et(t), f = q(s);
2428
+ f.current = s;
2429
+ const S = q(null), N = _n(), [$, _] = D(() => Fn()), v = a.chromeTheme ?? $ ?? N, [L, b] = je(
2321
2430
  pe.leftWidth,
2322
- Ce.initial,
2323
- Ce.min,
2324
- Ce.max
2325
- ), [m, f] = We(
2431
+ ye.initial,
2432
+ ye.min,
2433
+ ye.max
2434
+ ), [m, w] = je(
2326
2435
  pe.rightWidth,
2327
2436
  xe.initial,
2328
2437
  xe.min,
2329
2438
  xe.max
2330
- ), [k, y] = z(!1), T = s.handoff, i = t.component(s.component), w = t.scenario(s.scenario), S = i ? void 0 : t.screensFor({ handoff: T }).find((_) => _.id === t.screenForPath(o.path)?.id), M = S && w && S.variations.some((_) => _.id === w.id) ? w : void 0, F = D(
2331
- () => t.resolveComponentFixture(i?.id, i ? s.fixture : void 0),
2332
- [i, s.fixture, t]
2333
- ), O = D(() => {
2334
- if (!S || S.controls.length === 0) return t.issues;
2335
- const { invalid: _ } = t.resolveControls(S, {
2336
- scenario: M,
2337
- requested: qe(o.search)
2439
+ ), [k, x] = D(!1), T = a.handoff, d = t.component(a.component), g = t.scenario(a.scenario), C = d ? void 0 : t.screensFor({ handoff: T }).find((R) => R.id === t.screenForPath(s.path)?.id), E = C && g && C.variations.some((R) => R.id === g.id) ? g : void 0, F = A(
2440
+ () => t.resolveComponentFixture(d?.id, d ? a.fixture : void 0),
2441
+ [d, a.fixture, t]
2442
+ ), O = A(() => {
2443
+ if (!C || C.controls.length === 0) return t.issues;
2444
+ const { invalid: R } = t.resolveControls(C, {
2445
+ scenario: E,
2446
+ requested: Ze(s.search)
2338
2447
  });
2339
- return _.length === 0 ? t.issues : [..._.map((Q) => ({
2448
+ return R.length === 0 ? t.issues : [...R.map((Q) => ({
2340
2449
  level: "warning",
2341
- where: `url:${be}${Q.id}`,
2342
- message: Q.reason === "invalid-value" ? a.diagnostics.invalidControl(Q.id, Q.value, Q.fallback ?? "") : a.diagnostics.unknownControl(Q.id, Q.value)
2450
+ where: `url:${ke}${Q.id}`,
2451
+ message: Q.reason === "invalid-value" ? n.diagnostics.invalidControl(Q.id, Q.value, Q.fallback ?? "") : n.diagnostics.unknownControl(Q.id, Q.value)
2343
2452
  })), ...t.issues];
2344
- }, [a, o.search, t, S, M]), U = t.screensFor({ handoff: T })[0], P = t.componentsFor(T)[0], A = !U && !P, V = D(() => {
2345
- const _ = new URLSearchParams(o.search);
2346
- return _.has($.scenario) || _.has($.component);
2347
- }, [o.search]), Z = o.path === "/" && !V && !t.screenForPath("/") && !A;
2348
- K(() => {
2349
- Z && (U ? u(U.id, { replace: !0 }) : P && h(P.id, { replace: !0 }));
2350
- }, [P, U, h, u, Z]);
2351
- const B = I(
2352
- () => l({ chrome: !s.chrome }),
2353
- [s.chrome, l]
2354
- ), Y = I(
2355
- (_) => {
2356
- if (_ === "C") {
2453
+ }, [n, s.search, t, C, E]), I = t.screensFor({ handoff: T })[0], P = t.componentsFor(T)[0], z = !I && !P, U = A(() => {
2454
+ const R = new URLSearchParams(s.search);
2455
+ return R.has(M.scenario) || R.has(M.component);
2456
+ }, [s.search]), Z = s.path === "/" && !U && !t.screenForPath("/") && !z;
2457
+ V(() => {
2458
+ Z && (I ? u(I.id, { replace: !0 }) : P && p(P.id, { replace: !0 }));
2459
+ }, [P, I, p, u, Z]);
2460
+ const B = K(
2461
+ () => l({ chrome: !a.chrome }),
2462
+ [a.chrome, l]
2463
+ ), Y = K(
2464
+ (R) => {
2465
+ if (R === "C") {
2357
2466
  B();
2358
2467
  return;
2359
2468
  }
2360
- window.dispatchEvent(new KeyboardEvent("keydown", { key: _.toLowerCase(), metaKey: !0 }));
2469
+ window.dispatchEvent(new KeyboardEvent("keydown", { key: R.toLowerCase(), metaKey: !0 }));
2361
2470
  },
2362
2471
  [B]
2363
2472
  );
2364
- K(() => {
2365
- const _ = (j) => {
2473
+ V(() => {
2474
+ const R = (j) => {
2366
2475
  !j.shiftKey || j.metaKey || j.ctrlKey || j.altKey || j.key !== "C" || j.target?.closest?.("input, textarea, select, [contenteditable='true'], [contenteditable='']") || (j.preventDefault(), Y(j.key));
2367
2476
  };
2368
- return window.addEventListener("keydown", _), () => window.removeEventListener("keydown", _);
2477
+ return window.addEventListener("keydown", R), () => window.removeEventListener("keydown", R);
2369
2478
  }, [Y]);
2370
- const ce = I(
2371
- (_, j) => {
2372
- const { path: Q, search: mt } = he(_);
2373
- c(Q, $t(mt, g.current.search), { replace: j });
2479
+ const ce = K(
2480
+ (R, j) => {
2481
+ const { path: Q, search: kt } = he(R);
2482
+ i(Q, Rt(kt, f.current.search), { replace: j });
2374
2483
  },
2375
- [c]
2376
- ), ct = () => {
2377
- let _;
2484
+ [i]
2485
+ ), mt = () => {
2486
+ let R;
2378
2487
  try {
2379
- _ = C.current?.contentWindow?.location.href;
2488
+ R = S.current?.contentWindow?.location.href;
2380
2489
  } catch {
2381
2490
  }
2382
- const j = Mt(_, window.location.origin, g.current);
2491
+ const j = _t(R, window.location.origin, f.current);
2383
2492
  window.open(j, "_blank", "noopener");
2384
- }, lt = () => {
2385
- const _ = v === "dark" ? "light" : "dark";
2386
- it(pe.appearance, _), R(_), l({ chromeTheme: _ });
2387
- }, te = (_) => l(_), dt = `${r.origin}${o.path}${o.search}`, ut = s.panelTab ?? "variations", Re = s.zoom ?? 100, [ht, pt] = z(Re);
2388
- return /* @__PURE__ */ x(
2493
+ }, ft = () => {
2494
+ const R = v === "dark" ? "light" : "dark";
2495
+ pt(pe.appearance, R), _(R), l({ chromeTheme: R });
2496
+ }, te = (R) => l(R), wt = `${r.origin}${s.path}${s.search}`, gt = a.panelTab ?? "variations", Oe = a.zoom ?? 100, [vt, bt] = D(Oe);
2497
+ return /* @__PURE__ */ y(
2389
2498
  "div",
2390
2499
  {
2391
2500
  className: "ds-root",
2392
2501
  "data-appearance": v,
2393
- "data-chrome": s.chrome ? "visible" : "hidden",
2502
+ "data-chrome": a.chrome ? "visible" : "hidden",
2394
2503
  "data-resizing": k ? "true" : void 0,
2395
- "data-viewport": d.id,
2504
+ "data-viewport": c.id,
2396
2505
  children: [
2397
- s.chrome && /* @__PURE__ */ n(
2398
- Bt,
2506
+ a.chrome && /* @__PURE__ */ o(
2507
+ en,
2399
2508
  {
2400
2509
  productName: e.name,
2401
2510
  deploy: r,
2402
- viewportId: s.viewport,
2403
- viewport: d,
2404
- zoom: ht,
2405
- rotated: !!s.rotated,
2406
- highlight: !!s.highlight,
2511
+ viewportId: a.viewport,
2512
+ viewport: c,
2513
+ zoom: vt,
2514
+ rotated: !!a.rotated,
2515
+ highlight: !!a.highlight,
2407
2516
  theme: v,
2408
2517
  issues: O,
2409
- linkUrl: dt,
2410
- onViewport: (_) => te({ viewport: _ }),
2411
- onRotate: () => te({ rotated: !s.rotated }),
2412
- onHighlight: () => te({ highlight: !s.highlight }),
2413
- onZoom: (_) => te({ zoom: _ }),
2518
+ linkUrl: wt,
2519
+ onViewport: (R) => te({ viewport: R }),
2520
+ onRotate: () => te({ rotated: !a.rotated }),
2521
+ onHighlight: () => te({ highlight: !a.highlight }),
2522
+ onZoom: (R) => te({ zoom: R }),
2414
2523
  onCleanReview: B,
2415
- onOpenFrame: ct,
2416
- onToggleTheme: lt
2524
+ onOpenFrame: mt,
2525
+ onToggleTheme: ft
2417
2526
  }
2418
2527
  ),
2419
- /* @__PURE__ */ x("div", { className: "ds-body", children: [
2420
- s.chrome && /* @__PURE__ */ n(
2421
- Gt,
2528
+ /* @__PURE__ */ y("div", { className: "ds-body", children: [
2529
+ a.chrome && /* @__PURE__ */ o(
2530
+ on,
2422
2531
  {
2423
2532
  registry: t,
2424
2533
  handoff: T,
2425
- activeScreen: S?.id,
2426
- activeComponent: i?.id,
2427
- onOpenScreen: (_) => u(_),
2428
- onOpenComponent: (_) => h(_),
2534
+ activeScreen: C?.id,
2535
+ activeComponent: d?.id,
2536
+ onOpenScreen: (R) => u(R),
2537
+ onOpenComponent: (R) => p(R),
2429
2538
  width: L,
2430
2539
  onResize: b,
2431
- onResizeStart: () => y(!0),
2432
- onResizeEnd: () => y(!1)
2540
+ onResizeStart: () => x(!0),
2541
+ onResizeEnd: () => x(!1)
2433
2542
  }
2434
2543
  ),
2435
- /* @__PURE__ */ n("main", { className: "ds-main", children: A ? /* @__PURE__ */ x("div", { className: "ds-chrome-empty", children: [
2436
- /* @__PURE__ */ n("h1", { className: "ds-chrome-empty__title", children: a.shell.empty }),
2437
- /* @__PURE__ */ n("p", { className: "ds-muted", children: a.shell.emptyHint })
2438
- ] }) : Z ? null : /* @__PURE__ */ n(
2439
- sn,
2544
+ /* @__PURE__ */ o("main", { className: "ds-main", children: z ? /* @__PURE__ */ y("div", { className: "ds-chrome-empty", children: [
2545
+ /* @__PURE__ */ o("h1", { className: "ds-chrome-empty__title", children: n.shell.empty }),
2546
+ /* @__PURE__ */ o("p", { className: "ds-muted", children: n.shell.emptyHint })
2547
+ ] }) : Z ? null : /* @__PURE__ */ o(
2548
+ wn,
2440
2549
  {
2441
- location: o,
2442
- viewport: d,
2443
- zoom: Re,
2444
- onEffectiveZoom: pt,
2445
- title: a.shell.frameTitle(e.name),
2550
+ location: s,
2551
+ viewport: c,
2552
+ zoom: Oe,
2553
+ onEffectiveZoom: bt,
2554
+ title: n.shell.frameTitle(e.name),
2446
2555
  resizing: k,
2447
2556
  onFrameNavigate: ce,
2448
2557
  onShortcut: Y,
2449
- frameRef: C
2558
+ frameRef: S
2450
2559
  }
2451
2560
  ) }),
2452
- s.chrome && /* @__PURE__ */ n(
2453
- en,
2561
+ a.chrome && /* @__PURE__ */ o(
2562
+ dn,
2454
2563
  {
2455
2564
  registry: t,
2456
- controls: s,
2565
+ controls: a,
2457
2566
  deploy: r,
2458
- location: o,
2459
- screen: S,
2460
- variation: M,
2461
- component: i,
2567
+ location: s,
2568
+ screen: C,
2569
+ variation: E,
2570
+ component: d,
2462
2571
  componentFixture: F,
2463
- tab: ut,
2464
- onTab: (_) => te({ panelTab: _ }),
2465
- onOpenScenario: p,
2466
- onOpenComponent: (_) => h(_),
2467
- onOpenScreen: (_) => u(_),
2572
+ tab: gt,
2573
+ onTab: (R) => te({ panelTab: R }),
2574
+ onOpenScenario: h,
2575
+ onOpenComponent: (R) => p(R),
2576
+ onOpenScreen: (R) => u(R),
2468
2577
  onChange: te,
2469
2578
  width: m,
2470
- onResize: f,
2471
- onResizeStart: () => y(!0),
2472
- onResizeEnd: () => y(!1)
2579
+ onResize: w,
2580
+ onResizeStart: () => x(!0),
2581
+ onResizeEnd: () => x(!1)
2473
2582
  }
2474
2583
  )
2475
2584
  ] }),
2476
- !s.chrome && /* @__PURE__ */ n(
2585
+ !a.chrome && /* @__PURE__ */ o(
2477
2586
  "button",
2478
2587
  {
2479
2588
  type: "button",
2480
2589
  className: "ds-restore",
2481
- "aria-label": a.shell.restoreChrome,
2482
- title: a.shell.restoreChrome,
2590
+ "aria-label": n.shell.restoreChrome,
2591
+ title: n.shell.restoreChrome,
2483
2592
  onClick: B,
2484
- children: /* @__PURE__ */ n("span", { className: "ds-restore__dot", "aria-hidden": "true" })
2593
+ children: /* @__PURE__ */ o("span", { className: "ds-restore__dot", "aria-hidden": "true" })
2485
2594
  }
2486
2595
  )
2487
2596
  ]
2488
2597
  }
2489
2598
  );
2490
2599
  }
2491
- function ge(e) {
2600
+ function ve(e) {
2492
2601
  return new Date(e.length === 10 ? `${e}T00:00:00` : e);
2493
2602
  }
2494
- function $n(e, t) {
2495
- const a = ge(e), r = ge(t);
2496
- let o = r.getFullYear() - a.getFullYear();
2497
- const s = r.getMonth() - a.getMonth();
2498
- return (s < 0 || s === 0 && r.getDate() < a.getDate()) && (o -= 1), o;
2603
+ function Bn(e, t) {
2604
+ const n = ve(e), r = ve(t);
2605
+ let s = r.getFullYear() - n.getFullYear();
2606
+ const a = r.getMonth() - n.getMonth();
2607
+ return (a < 0 || a === 0 && r.getDate() < n.getDate()) && (s -= 1), s;
2499
2608
  }
2500
- function Mn(e, t) {
2501
- const a = ge(e), r = ge(t);
2502
- return Math.floor((r.getTime() - a.getTime()) / 864e5);
2609
+ function jn(e, t) {
2610
+ const n = ve(e), r = ve(t);
2611
+ return Math.floor((r.getTime() - n.getTime()) / 864e5);
2503
2612
  }
2504
2613
  export {
2505
- Oe as COMPONENT_ATTRIBUTE,
2506
- be as CONTROL_PARAM_PREFIX,
2614
+ fe as COMPONENT_ATTRIBUTE,
2615
+ ke as CONTROL_PARAM_PREFIX,
2507
2616
  oe as DEFAULT_LABELS,
2508
- Nn as DesignSpace,
2509
- Cn as EN_US_LABELS,
2510
- xt as FRAME_ATTRIBUTE,
2511
- kt as FRAME_PARAM,
2512
- Tn as HANDOFF_PARAM,
2513
- xn as NETWORK_LABELS,
2514
- Ge as NETWORK_STATES,
2515
- $ as PARAM,
2516
- rt as SLOW_NETWORK_DELAY_MS,
2517
- at as SimulatedNetworkError,
2617
+ Wn as DesignSpace,
2618
+ Vn as EN_US_LABELS,
2619
+ Lt as FRAME_ATTRIBUTE,
2620
+ $t as FRAME_PARAM,
2621
+ Zn as HANDOFF_PARAM,
2622
+ Kn as NETWORK_LABELS,
2623
+ Ye as NETWORK_STATES,
2624
+ M as PARAM,
2625
+ at as SLOW_NETWORK_DELAY_MS,
2626
+ it as SimulatedNetworkError,
2518
2627
  Ke as StageEmpty,
2519
- _t as VIEWPORTS,
2520
- fe as ZOOM_DEFAULT,
2521
- _e as ZOOM_MAX,
2522
- Pe as ZOOM_MIN,
2523
- $n as ageInYears,
2524
- Ee as applyHandoffScope,
2525
- Ne as applyOverrides,
2526
- et as clampZoom,
2527
- Pn as commitUrl,
2528
- _n as componentUrl,
2529
- yn as createHttpAdapter,
2530
- Et as createRegistry,
2531
- Mn as daysBetween,
2628
+ Vt as VIEWPORTS,
2629
+ we as ZOOM_DEFAULT,
2630
+ Fe as ZOOM_MAX,
2631
+ _e as ZOOM_MIN,
2632
+ Bn as ageInYears,
2633
+ Pe as applyHandoffScope,
2634
+ $e as applyOverrides,
2635
+ nt as clampZoom,
2636
+ Yn as commitUrl,
2637
+ Qn as componentUrl,
2638
+ Hn as createHttpAdapter,
2639
+ Dt as createRegistry,
2640
+ jn as daysBetween,
2532
2641
  Le as fixtureAdapter,
2533
- Rn as formatIssues,
2534
- Nt as getDeployContext,
2535
- ve as handoffAllowsComponent,
2536
- je as handoffAllowsPath,
2642
+ Xn as formatIssues,
2643
+ Pt as getDeployContext,
2644
+ be as handoffAllowsComponent,
2645
+ Ge as handoffAllowsPath,
2537
2646
  re as handoffAllowsScenario,
2538
- Fn as hasErrors,
2539
- On as matchPath,
2540
- An as normalizeHandoffScope,
2647
+ Jn as hasErrors,
2648
+ eo as matchPath,
2649
+ to as normalizeHandoffScope,
2541
2650
  X as normalizeSearch,
2542
- $e as parseControls,
2543
- bt as parseHandoffScope,
2544
- ge as parseIsoDate,
2545
- Me as resolveFixture,
2546
- Ht as resolveLabels,
2547
- ye as resolveRoute,
2548
- At as resolveViewport,
2651
+ Me as parseControls,
2652
+ Nt as parseHandoffScope,
2653
+ ve as parseIsoDate,
2654
+ Ee as resolveFixture,
2655
+ Xt as resolveLabels,
2656
+ Ne as resolveRoute,
2657
+ Bt as resolveViewport,
2549
2658
  me as scenarioUrl,
2550
- se as serializeControls,
2551
- zn as serializeValue,
2552
- Xe as useDesignSpaceState,
2659
+ ae as serializeControls,
2660
+ no as serializeValue,
2661
+ et as useDesignSpaceState,
2553
2662
  J as useLabels,
2554
- dn as useScenarioData,
2555
- vt as validateProduct,
2556
- Dn as validateScenario
2663
+ bn as useScenarioData,
2664
+ xt as validateProduct,
2665
+ oo as validateScenario
2557
2666
  };
2558
2667
  //# sourceMappingURL=index.js.map