pixelagent 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,63 +1,63 @@
1
- import { jsxs as f, Fragment as J, jsx as a } from "react/jsx-runtime";
2
- import { useState as A, useEffect as U, useRef as j, useMemo as de, useLayoutEffect as cn, useCallback as T, useId as Tt } from "react";
3
- import { getElementDisplayLabel as et, getCssSelector as tt, getRelevantComputedStyles as Ne, getEditableTextInfo as xe, captureTextSnapshot as We, captureInlineStyles as Ue, restoreInlineStyles as Ae, restoreTextSnapshot as Se, getPreviewTargets as Re, clearTailwindStatePreview as Le, applyTailwindStatePreview as je, setEditableTextPreview as pt, readStateRuleDeclarations as pn, readReactSource as nt, detectStylingSystem as Rt, countElementInstances as Dt, getScopeSelector as Ot, copyToClipboard as Ft, getWindowSelectionText as Bt, getNearestReactComponentName as dn, getDomPath as fn, resolveElementFromEntry as _t, getAnnotationSessionDisplay as Ht, loadAnnotationSession as un, saveAnnotationSession as gn, DEFAULT_PIXEL_AGENT_UI_SETTINGS as hn, readHostThemeFromDocument as dt, resolvePixelAgentChrome as mn, applyHostThemeToDocument as xn, pixelAgentRootAttributes as bn, getElementsInArea as vn, formatAllAnnotations as wn, formatAnnotation as yn } from "@pixelagent/shared";
1
+ import { jsxs as d, Fragment as J, jsx as a } from "react/jsx-runtime";
2
+ import { useState as S, useEffect as W, useRef as V, useMemo as se, useLayoutEffect as un, useCallback as $, useId as at } from "react";
3
+ import { getElementDisplayLabel as rt, getCssSelector as ot, getRelevantComputedStyles as Ne, getEditableTextInfo as xe, captureTextSnapshot as je, captureInlineStyles as Ye, restoreInlineStyles as Se, restoreTextSnapshot as $e, getPreviewTargets as De, clearTailwindStatePreview as Ee, applyTailwindStatePreview as Xe, setEditableTextPreview as ft, readStateRuleDeclarations as fn, readReactSource as it, detectStylingSystem as Bt, countElementInstances as _t, getScopeSelector as Ht, copyToClipboard as Vt, getWindowSelectionText as Wt, getNearestReactComponentName as gn, getDomPath as hn, resolveElementFromEntry as Ut, getAnnotationSessionDisplay as jt, loadAnnotationSession as mn, saveAnnotationSession as xn, DEFAULT_PIXEL_AGENT_UI_SETTINGS as bn, readHostThemeFromDocument as gt, resolvePixelAgentChrome as vn, applyHostThemeToDocument as wn, pixelAgentRootAttributes as yn, getElementsInArea as kn, formatAllAnnotations as Nn, formatAnnotation as Cn } from "@pixelagent/shared";
4
4
  export * from "@pixelagent/shared";
5
- import { createPortal as Oe } from "react-dom";
6
- function Vt({
5
+ import { createPortal as Le } from "react-dom";
6
+ function Yt({
7
7
  element: e,
8
8
  selected: t,
9
9
  multiSelected: n = [],
10
10
  primarySelected: r = null
11
11
  }) {
12
- const [o, i] = A([]), s = r ?? t;
13
- if (U(() => {
14
- const d = /* @__PURE__ */ new Map(), h = n.length > 0;
15
- e && !t && !h && d.set(e, !1), t && d.set(t, !0);
16
- for (const u of n)
17
- d.set(u, !0);
18
- if (d.size === 0) {
12
+ const [o, i] = S([]), s = r ?? t;
13
+ if (W(() => {
14
+ const u = /* @__PURE__ */ new Map(), h = n.length > 0;
15
+ e && !t && !h && u.set(e, !1), t && u.set(t, !0);
16
+ for (const g of n)
17
+ u.set(g, !0);
18
+ if (u.size === 0) {
19
19
  i([]);
20
20
  return;
21
21
  }
22
- const g = () => {
22
+ const f = () => {
23
23
  i(
24
- Array.from(d.entries()).map(([u, m]) => ({
25
- rect: u.getBoundingClientRect(),
26
- label: et(u),
27
- isSelected: m,
28
- isPrimary: s !== null && u === s
24
+ Array.from(u.entries()).map(([g, x]) => ({
25
+ rect: g.getBoundingClientRect(),
26
+ label: rt(g),
27
+ isSelected: x,
28
+ isPrimary: s !== null && g === s
29
29
  }))
30
30
  );
31
31
  };
32
- g();
33
- const c = Array.from(d.keys()).map((u) => {
34
- const m = new ResizeObserver(g);
35
- return m.observe(u), m;
32
+ f();
33
+ const c = Array.from(u.keys()).map((g) => {
34
+ const x = new ResizeObserver(f);
35
+ return x.observe(g), x;
36
36
  });
37
- return window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), () => {
38
- for (const u of c) u.disconnect();
39
- window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
37
+ return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
38
+ for (const g of c) g.disconnect();
39
+ window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
40
40
  };
41
41
  }, [e, t, n, s]), o.length === 0) return null;
42
- const l = o.find((d) => d.isPrimary) ?? o.find((d) => d.isSelected) ?? o[0], p = o.filter((d) => d.isSelected).length;
43
- return /* @__PURE__ */ f(J, { children: [
44
- o.map((d, h) => /* @__PURE__ */ a(
42
+ const l = o.find((u) => u.isPrimary) ?? o.find((u) => u.isSelected) ?? o[0], p = o.filter((u) => u.isSelected).length;
43
+ return /* @__PURE__ */ d(J, { children: [
44
+ o.map((u, h) => /* @__PURE__ */ a(
45
45
  "div",
46
46
  {
47
47
  className: [
48
48
  "pa-highlight",
49
- d.isSelected ? "pa-highlight-selected" : "",
50
- d.isPrimary ? "pa-highlight-primary" : "",
51
- d.isSelected && !d.isPrimary && p > 1 ? "pa-highlight-scope" : ""
49
+ u.isSelected ? "pa-highlight-selected" : "",
50
+ u.isPrimary ? "pa-highlight-primary" : "",
51
+ u.isSelected && !u.isPrimary && p > 1 ? "pa-highlight-scope" : ""
52
52
  ].filter(Boolean).join(" "),
53
53
  style: {
54
- top: d.rect.top,
55
- left: d.rect.left,
56
- width: d.rect.width,
57
- height: d.rect.height
54
+ top: u.rect.top,
55
+ left: u.rect.left,
56
+ width: u.rect.width,
57
+ height: u.rect.height
58
58
  }
59
59
  },
60
- `${d.label}-${h}`
60
+ `${u.label}-${h}`
61
61
  )),
62
62
  /* @__PURE__ */ a(
63
63
  "div",
@@ -72,63 +72,63 @@ function Vt({
72
72
  )
73
73
  ] });
74
74
  }
75
- const Wt = 0.35, kn = 0.48;
76
- function Nn(e, t, n, r = Wt) {
75
+ const Xt = 0.35, Mn = 0.48;
76
+ function An(e, t, n, r = Xt) {
77
77
  if (e < 8 || t < 8) return null;
78
78
  const o = 1, i = Math.max(1, Math.round(e * o)), s = Math.max(1, Math.round(t * o)), l = document.createElement("canvas");
79
79
  l.width = i, l.height = s;
80
80
  const p = l.getContext("2d");
81
81
  if (!p) return null;
82
- const d = p.createImageData(i, s), h = d.data, g = Math.min(0.5, n / Math.min(e, t)), c = 0.3, u = 0.2, m = Math.max(0.4, g + 0.1);
83
- let v = 0;
84
- const N = new Float32Array(i * s * 2);
82
+ const u = p.createImageData(i, s), h = u.data, f = Math.min(0.5, n / Math.min(e, t)), c = 0.3, g = 0.2, x = Math.max(0.4, f + 0.1);
83
+ let y = 0;
84
+ const k = new Float32Array(i * s * 2);
85
85
  let E = 0;
86
- for (let w = 0; w < s; w++)
87
- for (let M = 0; M < i; M++) {
88
- const y = M / i - 0.5, S = w / s - 0.5, k = Cn(y, S, c, u, m), R = ft(0.8, 0, k - 0.15), P = ft(0, 1, R), $ = (y * P + 0.5) * i - M, D = (S * P + 0.5) * s - w;
89
- Math.abs($) > v && (v = Math.abs($)), Math.abs(D) > v && (v = Math.abs(D)), N[E++] = $, N[E++] = D;
86
+ for (let v = 0; v < s; v++)
87
+ for (let N = 0; N < i; N++) {
88
+ const w = N / i - 0.5, A = v / s - 0.5, F = zn(w, A, c, g, x), C = ht(0.8, 0, F - 0.15), P = ht(0, 1, C), I = (w * P + 0.5) * i - N, R = (A * P + 0.5) * s - v;
89
+ Math.abs(I) > y && (y = Math.abs(I)), Math.abs(R) > y && (y = Math.abs(R)), k[E++] = I, k[E++] = R;
90
90
  }
91
- if (v === 0) return null;
92
- v *= 0.4 * r;
93
- let x = 0;
94
- for (let w = 0; w < h.length; w += 4) {
95
- const M = N[x++] / v + 0.5, y = N[x++] / v + 0.5;
96
- h[w] = M * 255, h[w + 1] = y * 255, h[w + 2] = 0, h[w + 3] = 255;
91
+ if (y === 0) return null;
92
+ y *= 0.4 * r;
93
+ let m = 0;
94
+ for (let v = 0; v < h.length; v += 4) {
95
+ const N = k[m++] / y + 0.5, w = k[m++] / y + 0.5;
96
+ h[v] = N * 255, h[v + 1] = w * 255, h[v + 2] = 0, h[v + 3] = 255;
97
97
  }
98
- return p.putImageData(d, 0, 0), {
98
+ return p.putImageData(u, 0, 0), {
99
99
  href: l.toDataURL("image/png"),
100
- scale: v / o,
100
+ scale: y / o,
101
101
  width: i,
102
102
  height: s
103
103
  };
104
104
  }
105
- function Cn(e, t, n, r, o) {
105
+ function zn(e, t, n, r, o) {
106
106
  const i = Math.abs(e) - n + o, s = Math.abs(t) - r + o;
107
107
  return Math.min(Math.max(i, s), 0) + Math.hypot(Math.max(i, 0), Math.max(s, 0)) - o;
108
108
  }
109
- function ft(e, t, n) {
109
+ function ht(e, t, n) {
110
110
  const r = Math.max(0, Math.min(1, (n - e) / (t - e)));
111
111
  return r * r * (3 - 2 * r);
112
112
  }
113
- function Ze() {
113
+ function tt() {
114
114
  if (typeof navigator > "u") return !1;
115
115
  const e = navigator.userAgent;
116
116
  return !(/AppleWebKit/i.test(e) && !/Chrome|Chromium|Edg|OPR|CriOS|FxiOS/i.test(e) || /Firefox/i.test(e));
117
117
  }
118
- const Mn = {
118
+ const Sn = {
119
119
  default: "blur(4px) saturate(130%)",
120
120
  /** Toolbar — slightly stronger frost + refraction chain. */
121
121
  enhanced: "blur(6px) saturate(138%)"
122
122
  };
123
- function zn(e, t = "default") {
124
- const n = Mn[t], o = e !== null && Ze() ? `${n} url(#${e})` : n;
123
+ function Ln(e, t = "default") {
124
+ const n = Sn[t], o = e !== null && tt() ? `${n} url(#${e})` : n;
125
125
  return {
126
126
  backdropFilter: o,
127
127
  WebkitBackdropFilter: o
128
128
  };
129
129
  }
130
- let An = 0;
131
- function Ut({
130
+ let $n = 0;
131
+ function Gt({
132
132
  shape: e = "rect",
133
133
  cornerRadius: t,
134
134
  tint: n = "neutral",
@@ -137,26 +137,26 @@ function Ut({
137
137
  style: i,
138
138
  children: s
139
139
  }) {
140
- const l = t ?? (e === "capsule" ? 9999 : 20), p = r === "enhanced" ? kn : Wt, d = j(null), h = de(() => `pa-lg-${++An}`, []), [g, c] = A(null);
141
- cn(() => {
142
- const m = d.current;
143
- if (!m) return;
144
- let v = 0;
145
- const N = () => {
146
- cancelAnimationFrame(v), v = requestAnimationFrame(() => {
147
- const x = m.getBoundingClientRect(), w = Math.round(x.width), M = Math.round(x.height);
148
- if (w < 8 || M < 8) return;
149
- const y = e === "capsule" ? M / 2 : Math.min(l, w / 2, M / 2), S = Nn(w, M, y, p);
150
- S && c(S);
140
+ const l = t ?? (e === "capsule" ? 9999 : 20), p = r === "enhanced" ? Mn : Xt, u = V(null), h = se(() => `pa-lg-${++$n}`, []), [f, c] = S(null);
141
+ un(() => {
142
+ const x = u.current;
143
+ if (!x) return;
144
+ let y = 0;
145
+ const k = () => {
146
+ cancelAnimationFrame(y), y = requestAnimationFrame(() => {
147
+ const m = x.getBoundingClientRect(), v = Math.round(m.width), N = Math.round(m.height);
148
+ if (v < 8 || N < 8) return;
149
+ const w = e === "capsule" ? N / 2 : Math.min(l, v / 2, N / 2), A = An(v, N, w, p);
150
+ A && c(A);
151
151
  });
152
152
  };
153
- N();
154
- const E = new ResizeObserver(N);
155
- return E.observe(m), () => {
156
- cancelAnimationFrame(v), E.disconnect();
153
+ k();
154
+ const E = new ResizeObserver(k);
155
+ return E.observe(x), () => {
156
+ cancelAnimationFrame(y), E.disconnect();
157
157
  };
158
158
  }, [e, l, p]);
159
- const u = g && Ze() && typeof document < "u" ? Oe(
159
+ const g = f && tt() && typeof document < "u" ? Le(
160
160
  /* @__PURE__ */ a(
161
161
  "svg",
162
162
  {
@@ -172,7 +172,7 @@ function Ut({
172
172
  overflow: "hidden",
173
173
  pointerEvents: "none"
174
174
  },
175
- children: /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ f(
175
+ children: /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ d(
176
176
  "filter",
177
177
  {
178
178
  id: h,
@@ -180,16 +180,16 @@ function Ut({
180
180
  colorInterpolationFilters: "sRGB",
181
181
  x: "0",
182
182
  y: "0",
183
- width: g.width,
184
- height: g.height,
183
+ width: f.width,
184
+ height: f.height,
185
185
  children: [
186
186
  /* @__PURE__ */ a(
187
187
  "feImage",
188
188
  {
189
- href: g.href,
190
- xlinkHref: g.href,
191
- width: g.width,
192
- height: g.height,
189
+ href: f.href,
190
+ xlinkHref: f.href,
191
+ width: f.width,
192
+ height: f.height,
193
193
  preserveAspectRatio: "none",
194
194
  result: "map"
195
195
  }
@@ -199,7 +199,7 @@ function Ut({
199
199
  {
200
200
  in: "SourceGraphic",
201
201
  in2: "map",
202
- scale: g.scale,
202
+ scale: f.scale,
203
203
  xChannelSelector: "R",
204
204
  yChannelSelector: "G"
205
205
  }
@@ -211,17 +211,17 @@ function Ut({
211
211
  ),
212
212
  document.body
213
213
  ) : null;
214
- return /* @__PURE__ */ f(J, { children: [
215
- u,
216
- /* @__PURE__ */ f(
214
+ return /* @__PURE__ */ d(J, { children: [
215
+ g,
216
+ /* @__PURE__ */ d(
217
217
  "div",
218
218
  {
219
- ref: d,
219
+ ref: u,
220
220
  className: `pa-glass-surface pa-glass-surface--${e} pa-glass-surface--${n} ${o}`.trim(),
221
221
  style: {
222
222
  borderRadius: e === "capsule" ? "999px" : `${l}px`,
223
- ...zn(
224
- g && Ze() ? h : null,
223
+ ...Ln(
224
+ f && tt() ? h : null,
225
225
  r
226
226
  ),
227
227
  ...i
@@ -235,7 +235,7 @@ function Ut({
235
235
  )
236
236
  ] });
237
237
  }
238
- function G({
238
+ function X({
239
239
  variant: e = "regular",
240
240
  className: t = "",
241
241
  children: n,
@@ -251,7 +251,7 @@ function G({
251
251
  }
252
252
  );
253
253
  }
254
- function Fe({
254
+ function _e({
255
255
  variant: e = "sheet",
256
256
  side: t = "left",
257
257
  className: n = "",
@@ -259,7 +259,7 @@ function Fe({
259
259
  children: o
260
260
  }) {
261
261
  return /* @__PURE__ */ a(
262
- Ut,
262
+ Gt,
263
263
  {
264
264
  shape: "rect",
265
265
  cornerRadius: e === "popover" ? 16 : 20,
@@ -269,65 +269,65 @@ function Fe({
269
269
  }
270
270
  );
271
271
  }
272
- function at({
272
+ function st({
273
273
  defaultPosition: e = null,
274
274
  computeDefaultPosition: t
275
275
  } = {}) {
276
- const [n, r] = A(e), [o, i] = A(!1), s = j(null), l = j(null), p = T(() => {
276
+ const [n, r] = S(e), [o, i] = S(!1), s = V(null), l = V(null), p = $(() => {
277
277
  if (n !== null) return;
278
- const u = l.current;
279
- if (!u) return;
280
- const m = u.getBoundingClientRect();
278
+ const g = l.current;
279
+ if (!g) return;
280
+ const x = g.getBoundingClientRect();
281
281
  r(
282
- t ? t(m) : {
283
- x: (window.innerWidth - m.width) / 2,
284
- y: window.innerHeight - m.height - 24
282
+ t ? t(x) : {
283
+ x: (window.innerWidth - x.width) / 2,
284
+ y: window.innerHeight - x.height - 24
285
285
  }
286
286
  );
287
287
  }, [n, t]);
288
- U(() => {
288
+ W(() => {
289
289
  p();
290
- }, [p]), U(() => {
291
- const u = () => {
292
- r((m) => {
293
- if (!m || !l.current) return m;
294
- const v = l.current.getBoundingClientRect();
290
+ }, [p]), W(() => {
291
+ const g = () => {
292
+ r((x) => {
293
+ if (!x || !l.current) return x;
294
+ const y = l.current.getBoundingClientRect();
295
295
  return {
296
- x: Math.min(m.x, window.innerWidth - v.width),
297
- y: Math.min(m.y, window.innerHeight - v.height)
296
+ x: Math.min(x.x, window.innerWidth - y.width),
297
+ y: Math.min(x.y, window.innerHeight - y.height)
298
298
  };
299
299
  });
300
300
  };
301
- return window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
301
+ return window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
302
302
  }, []);
303
- const d = T(
304
- (u) => {
305
- if (u.button !== 0) return;
306
- const m = l.current;
307
- if (!m) return;
308
- let v = n;
309
- if (!v) {
310
- const N = m.getBoundingClientRect();
311
- v = { x: N.left, y: N.top }, r(v);
303
+ const u = $(
304
+ (g) => {
305
+ if (g.button !== 0) return;
306
+ const x = l.current;
307
+ if (!x) return;
308
+ let y = n;
309
+ if (!y) {
310
+ const k = x.getBoundingClientRect();
311
+ y = { x: k.left, y: k.top }, r(y);
312
312
  }
313
313
  s.current = {
314
- pointerId: u.pointerId,
315
- startX: u.clientX,
316
- startY: u.clientY,
317
- originX: v.x,
318
- originY: v.y
319
- }, i(!0), u.currentTarget.setPointerCapture(u.pointerId), u.preventDefault();
314
+ pointerId: g.pointerId,
315
+ startX: g.clientX,
316
+ startY: g.clientY,
317
+ originX: y.x,
318
+ originY: y.y
319
+ }, i(!0), g.currentTarget.setPointerCapture(g.pointerId), g.preventDefault();
320
320
  },
321
321
  [n]
322
- ), h = T((u) => {
323
- if (!s.current || s.current.pointerId !== u.pointerId) return;
324
- const m = l.current, v = (m == null ? void 0 : m.offsetWidth) ?? 320, N = (m == null ? void 0 : m.offsetHeight) ?? 48, E = u.clientX - s.current.startX, x = u.clientY - s.current.startY, w = Math.max(8, Math.min(window.innerWidth - v - 8, s.current.originX + E)), M = Math.max(8, Math.min(window.innerHeight - N - 8, s.current.originY + x));
325
- r({ x: w, y: M });
326
- }, []), g = T((u) => {
327
- if (!(!s.current || s.current.pointerId !== u.pointerId)) {
322
+ ), h = $((g) => {
323
+ if (!s.current || s.current.pointerId !== g.pointerId) return;
324
+ const x = l.current, y = (x == null ? void 0 : x.offsetWidth) ?? 320, k = (x == null ? void 0 : x.offsetHeight) ?? 48, E = g.clientX - s.current.startX, m = g.clientY - s.current.startY, v = Math.max(8, Math.min(window.innerWidth - y - 8, s.current.originX + E)), N = Math.max(8, Math.min(window.innerHeight - k - 8, s.current.originY + m));
325
+ r({ x: v, y: N });
326
+ }, []), f = $((g) => {
327
+ if (!(!s.current || s.current.pointerId !== g.pointerId)) {
328
328
  s.current = null, i(!1);
329
329
  try {
330
- u.currentTarget.releasePointerCapture(u.pointerId);
330
+ g.currentTarget.releasePointerCapture(g.pointerId);
331
331
  } catch {
332
332
  }
333
333
  }
@@ -345,15 +345,15 @@ function at({
345
345
  isDragging: o,
346
346
  style: c,
347
347
  dragHandleProps: {
348
- onPointerDown: d,
348
+ onPointerDown: u,
349
349
  onPointerMove: h,
350
- onPointerUp: g,
351
- onPointerCancel: g
350
+ onPointerUp: f,
351
+ onPointerCancel: f
352
352
  }
353
353
  };
354
354
  }
355
- function Sn({ className: e }) {
356
- return /* @__PURE__ */ f("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
355
+ function En({ className: e }) {
356
+ return /* @__PURE__ */ d("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
357
357
  /* @__PURE__ */ a(
358
358
  "path",
359
359
  {
@@ -378,8 +378,8 @@ function Sn({ className: e }) {
378
378
  )
379
379
  ] });
380
380
  }
381
- function Ln({ className: e }) {
382
- return /* @__PURE__ */ f("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
381
+ function Pn({ className: e }) {
382
+ return /* @__PURE__ */ d("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
383
383
  /* @__PURE__ */ a(
384
384
  "path",
385
385
  {
@@ -404,11 +404,11 @@ function Ln({ className: e }) {
404
404
  )
405
405
  ] });
406
406
  }
407
- function ce(e) {
407
+ function de(e) {
408
408
  const t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/i);
409
409
  return t ? parseFloat(t[1]) : null;
410
410
  }
411
- function $n(e) {
411
+ function In(e) {
412
412
  const t = e.trim();
413
413
  if (!t) return null;
414
414
  if (t.endsWith("%")) {
@@ -418,16 +418,16 @@ function $n(e) {
418
418
  const n = parseFloat(t);
419
419
  return Number.isFinite(n) && n >= 0 && n <= 1 ? n : null;
420
420
  }
421
- function jt(e) {
422
- const t = Yt(e);
421
+ function Kt(e) {
422
+ const t = qt(e);
423
423
  if (t !== null) return t > 0;
424
- const n = ce(e);
424
+ const n = de(e);
425
425
  return n !== null && n > 0;
426
426
  }
427
- function Yt(e) {
427
+ function qt(e) {
428
428
  const t = e.trim().split(/\s+/).filter(Boolean);
429
429
  if (t.length === 0) return null;
430
- const n = t.map((o) => ce(o));
430
+ const n = t.map((o) => de(o));
431
431
  if (n.some((o) => o === null)) return null;
432
432
  const r = n[0];
433
433
  return n.every((o) => o === r) ? r : null;
@@ -438,15 +438,15 @@ function fe(e) {
438
438
  const n = parseFloat(t[1]);
439
439
  return Number.isFinite(n) ? { num: n, unit: t[2].toLowerCase() } : null;
440
440
  }
441
- function Xt(e) {
441
+ function Jt(e) {
442
442
  return e === "" || e === "em" || e === "rem" ? 0.1 : 1;
443
443
  }
444
- function En(e, t) {
444
+ function Tn(e, t) {
445
445
  var o;
446
446
  const n = ((o = fe(e)) == null ? void 0 : o.unit) ?? "px";
447
- return `${Xt(n) < 1 ? Math.round(t * 10) / 10 : Math.round(t)}${n}`;
447
+ return `${Jt(n) < 1 ? Math.round(t * 10) / 10 : Math.round(t)}${n}`;
448
448
  }
449
- const Pn = {
449
+ const Rn = {
450
450
  padding: { kind: "uniform-px", min: 0, max: 80, step: 1 },
451
451
  margin: { kind: "uniform-px", min: 0, max: 80, step: 1 },
452
452
  width: { kind: "length", min: 0 },
@@ -460,22 +460,22 @@ const Pn = {
460
460
  "border-radius": { kind: "px", min: 0, max: 48, step: 1 },
461
461
  opacity: { kind: "opacity", min: 0, max: 1, step: 0.01 }
462
462
  };
463
- function Ye(e, t, n) {
463
+ function Ge(e, t, n) {
464
464
  var r;
465
465
  switch (n.kind) {
466
466
  case "opacity":
467
- return $n(t);
467
+ return In(t);
468
468
  case "px":
469
- return ce(t);
469
+ return de(t);
470
470
  case "uniform-px":
471
- return Yt(t);
471
+ return qt(t);
472
472
  case "length":
473
473
  return ((r = fe(t)) == null ? void 0 : r.num) ?? null;
474
474
  default:
475
475
  return null;
476
476
  }
477
477
  }
478
- function In(e, t, n) {
478
+ function On(e, t, n) {
479
479
  switch (n.kind) {
480
480
  case "opacity":
481
481
  return String(Math.round(t * 100) / 100);
@@ -486,7 +486,7 @@ function In(e, t, n) {
486
486
  return String(t);
487
487
  }
488
488
  }
489
- const Tn = /* @__PURE__ */ new Set([
489
+ const Dn = /* @__PURE__ */ new Set([
490
490
  "h1",
491
491
  "h2",
492
492
  "h3",
@@ -506,7 +506,7 @@ const Tn = /* @__PURE__ */ new Set([
506
506
  "blockquote",
507
507
  "cite",
508
508
  "figcaption"
509
- ]), Rn = /* @__PURE__ */ new Set(["button", "input", "select", "textarea"]), Dn = /* @__PURE__ */ new Set(["img", "video", "canvas", "svg", "picture"]), On = /* @__PURE__ */ new Set([
509
+ ]), Fn = /* @__PURE__ */ new Set(["button", "input", "select", "textarea"]), Bn = /* @__PURE__ */ new Set(["img", "video", "canvas", "svg", "picture"]), _n = /* @__PURE__ */ new Set([
510
510
  "div",
511
511
  "section",
512
512
  "article",
@@ -523,28 +523,28 @@ const Tn = /* @__PURE__ */ new Set([
523
523
  "summary",
524
524
  "fieldset"
525
525
  ]);
526
- function Fn(e) {
526
+ function Hn(e) {
527
527
  const t = (e ?? "").trim().toLowerCase();
528
528
  return !(!t || t === "transparent" || t === "rgba(0, 0, 0, 0)");
529
529
  }
530
- function Bn(e) {
530
+ function Vn(e) {
531
531
  const t = (e["border-style"] ?? "").trim().toLowerCase();
532
- return t && t !== "none" ? !0 : jt(e["border-width"] ?? "");
532
+ return t && t !== "none" ? !0 : Kt(e["border-width"] ?? "");
533
533
  }
534
- function _n(e, t, n) {
534
+ function Wn(e, t, n) {
535
535
  const r = e.toLowerCase(), o = /* @__PURE__ */ new Set(), i = (s) => {
536
536
  o.size < 2 && o.add(s);
537
537
  };
538
- return t !== "none" ? (i("content"), i("typography"), o) : Tn.has(r) ? (i("typography"), o) : Rn.has(r) ? (i("layout"), i("typography"), o) : Dn.has(r) ? (i("layout"), o) : On.has(r) ? (i("layout"), Bn(n) ? i("border") : Fn(n["background-color"]) && i("fill"), o) : r === "hr" ? (i("border"), o) : (i("layout"), o);
538
+ return t !== "none" ? (i("content"), i("typography"), o) : Dn.has(r) ? (i("typography"), o) : Fn.has(r) ? (i("layout"), i("typography"), o) : Bn.has(r) ? (i("layout"), o) : _n.has(r) ? (i("layout"), Vn(n) ? i("border") : Hn(n["background-color"]) && i("fill"), o) : r === "hr" ? (i("border"), o) : (i("layout"), o);
539
539
  }
540
- function Hn(e, t, n) {
541
- return _n(e.tagName, t, n);
540
+ function Un(e, t, n) {
541
+ return Wn(e.tagName, t, n);
542
542
  }
543
- function Vn(e, t) {
543
+ function jn(e, t) {
544
544
  return e.has(t);
545
545
  }
546
546
  const Ce = (e, t, n) => Math.min(n, Math.max(t, e));
547
- function rt(e) {
547
+ function Me(e) {
548
548
  const t = e.trim();
549
549
  if (!t) return null;
550
550
  const n = t.match(/^#([0-9a-f]{6})$/i);
@@ -570,153 +570,153 @@ function rt(e) {
570
570
  b: Ce(parseInt(o[3], 10), 0, 255)
571
571
  } : null;
572
572
  }
573
- function Gt(e) {
573
+ function Be(e) {
574
574
  const t = (n) => Ce(Math.round(n), 0, 255).toString(16).padStart(2, "0");
575
575
  return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
576
576
  }
577
- function Wn(e) {
577
+ function Yn(e) {
578
578
  return `rgb(${e.r}, ${e.g}, ${e.b})`;
579
579
  }
580
- function Kt({ r: e, g: t, b: n }) {
580
+ function Zt({ r: e, g: t, b: n }) {
581
581
  const r = e / 255, o = t / 255, i = n / 255, s = Math.max(r, o, i), l = Math.min(r, o, i), p = s - l;
582
- let d = 0;
583
- p !== 0 && (s === r ? d = (o - i) / p % 6 : s === o ? d = (i - r) / p + 2 : d = (r - o) / p + 4, d *= 60, d < 0 && (d += 360));
584
- const h = s === 0 ? 0 : p / s * 100, g = s * 100;
585
- return { h: d, s: h, v: g };
582
+ let u = 0;
583
+ p !== 0 && (s === r ? u = (o - i) / p % 6 : s === o ? u = (i - r) / p + 2 : u = (r - o) / p + 4, u *= 60, u < 0 && (u += 360));
584
+ const h = s === 0 ? 0 : p / s * 100, f = s * 100;
585
+ return { h: u, s: h, v: f };
586
586
  }
587
- function qt({ h: e, s: t, v: n }) {
587
+ function Qt({ h: e, s: t, v: n }) {
588
588
  const r = Ce(t, 0, 100) / 100, o = Ce(n, 0, 100) / 100, i = o * r, s = i * (1 - Math.abs(e / 60 % 2 - 1)), l = o - i;
589
- let p = 0, d = 0, h = 0;
590
- const g = (e % 360 + 360) % 360;
591
- return g < 60 ? (p = i, d = s) : g < 120 ? (p = s, d = i) : g < 180 ? (d = i, h = s) : g < 240 ? (d = s, h = i) : g < 300 ? (p = s, h = i) : (p = i, h = s), {
589
+ let p = 0, u = 0, h = 0;
590
+ const f = (e % 360 + 360) % 360;
591
+ return f < 60 ? (p = i, u = s) : f < 120 ? (p = s, u = i) : f < 180 ? (u = i, h = s) : f < 240 ? (u = s, h = i) : f < 300 ? (p = s, h = i) : (p = i, h = s), {
592
592
  r: Math.round((p + l) * 255),
593
- g: Math.round((d + l) * 255),
593
+ g: Math.round((u + l) * 255),
594
594
  b: Math.round((h + l) * 255)
595
595
  };
596
596
  }
597
- function ut(e) {
598
- const t = rt(e);
599
- return t ? Kt(t) : { h: 0, s: 0, v: 45 };
597
+ function mt(e) {
598
+ const t = Me(e);
599
+ return t ? Zt(t) : { h: 0, s: 0, v: 45 };
600
600
  }
601
- function Un(e) {
601
+ function Xn(e) {
602
602
  return e.replace(/^#/, "").toUpperCase().slice(0, 6);
603
603
  }
604
- function jn(e, t) {
604
+ function Gn(e, t) {
605
605
  const n = e.replace(/[^0-9a-f]/gi, "").slice(0, 6);
606
- return n.length < 6 ? t : rt(`#${n}`) ?? t;
606
+ return n.length < 6 ? t : Me(`#${n}`) ?? t;
607
607
  }
608
- function Yn(e) {
609
- return Gt(qt(e));
608
+ function Kn(e) {
609
+ return Be(Qt(e));
610
610
  }
611
- function Xn(e, t, n) {
612
- const r = gt((e - n.left) / n.width), o = gt((t - n.top) / n.height);
611
+ function qn(e, t, n) {
612
+ const r = xt((e - n.left) / n.width), o = xt((t - n.top) / n.height);
613
613
  return { x: r * 100, y: o * 100 };
614
614
  }
615
- function gt(e) {
615
+ function xt(e) {
616
616
  return Math.min(1, Math.max(0, e));
617
617
  }
618
- function Gn() {
618
+ function Jn() {
619
619
  if (typeof document > "u") return {};
620
620
  const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
621
621
  return t ? { "data-pa-chrome": t } : {};
622
622
  }
623
- function Xe({ label: e, value: t, onChange: n }) {
624
- const [r, o] = A(!1), [i, s] = A(() => ut(t)), l = j(null), p = j(null), d = j(null), h = Tt(), [g, c] = A({ top: 0, left: 0, width: 260 }), u = qt(i), m = Un(Gt(u)), v = rt(t) ? t : Wn(u), N = e.toLowerCase().includes("color") ? e : `${e} color`;
625
- U(() => {
626
- s(ut(t));
623
+ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
624
+ const [o, i] = S(!1), [s, l] = S(() => mt(t)), p = V(null), u = V(null), h = V(null), f = at(), [c, g] = S({ top: 0, left: 0, width: 260 }), x = Qt(s), y = Xn(Be(x)), k = Me(t) ? t : Yn(x), E = e.toLowerCase().includes("color") ? e : `${e} color`;
625
+ W(() => {
626
+ l(mt(t));
627
627
  }, [t]);
628
- const E = T(
629
- (k) => {
630
- s(k), n(Yn(k));
628
+ const m = $(
629
+ (C) => {
630
+ l(C), n(Kn(C));
631
631
  },
632
632
  [n]
633
- ), x = T(
634
- (k) => {
635
- E(Kt(k));
633
+ ), v = $(
634
+ (C) => {
635
+ m(Zt(C));
636
636
  },
637
- [E]
638
- ), w = T(() => {
639
- const k = l.current;
640
- if (!k) return;
641
- const R = k.getBoundingClientRect(), P = 260;
642
- let $ = R.left;
643
- $ + P > window.innerWidth - 12 && ($ = window.innerWidth - P - 12), $ = Math.max(12, $);
644
- let D = R.bottom + 8;
645
- const X = 320;
646
- D + X > window.innerHeight - 12 && (D = Math.max(12, R.top - X - 8)), c({ top: D, left: $, width: P });
637
+ [m]
638
+ ), N = $(() => {
639
+ const C = p.current;
640
+ if (!C) return;
641
+ const P = C.getBoundingClientRect(), I = 260;
642
+ let R = P.left;
643
+ R + I > window.innerWidth - 12 && (R = window.innerWidth - I - 12), R = Math.max(12, R);
644
+ let j = P.bottom + 8;
645
+ const G = 320;
646
+ j + G > window.innerHeight - 12 && (j = Math.max(12, P.top - G - 8)), g({ top: j, left: R, width: I });
647
647
  }, []);
648
- U(() => {
649
- if (!r) return;
650
- w();
651
- const k = (P) => {
652
- var D, X;
653
- const $ = P.target;
654
- (D = l.current) != null && D.contains($) || (X = p.current) != null && X.contains($) || o(!1);
655
- }, R = (P) => {
656
- P.key === "Escape" && o(!1);
648
+ W(() => {
649
+ if (!o) return;
650
+ N();
651
+ const C = (I) => {
652
+ var j, G;
653
+ const R = I.target;
654
+ (j = p.current) != null && j.contains(R) || (G = u.current) != null && G.contains(R) || i(!1);
655
+ }, P = (I) => {
656
+ I.key === "Escape" && i(!1);
657
657
  };
658
- return window.addEventListener("mousedown", k, !0), window.addEventListener("keydown", R), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), () => {
659
- window.removeEventListener("mousedown", k, !0), window.removeEventListener("keydown", R), window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
658
+ return window.addEventListener("mousedown", C, !0), window.addEventListener("keydown", P), window.addEventListener("resize", N), window.addEventListener("scroll", N, !0), () => {
659
+ window.removeEventListener("mousedown", C, !0), window.removeEventListener("keydown", P), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0);
660
660
  };
661
- }, [r, w]);
662
- const M = (k, R) => {
663
- var X;
664
- const P = (X = d.current) == null ? void 0 : X.getBoundingClientRect();
665
- if (!P) return;
666
- const { x: $, y: D } = Xn(k, R, P);
667
- E({ ...i, s: $, v: 100 - D });
668
- }, y = (k) => {
669
- k.preventDefault(), M(k.clientX, k.clientY);
670
- const R = ($) => M($.clientX, $.clientY), P = () => {
671
- window.removeEventListener("mousemove", R), window.removeEventListener("mouseup", P);
661
+ }, [o, N]);
662
+ const w = (C, P) => {
663
+ var G;
664
+ const I = (G = h.current) == null ? void 0 : G.getBoundingClientRect();
665
+ if (!I) return;
666
+ const { x: R, y: j } = qn(C, P, I);
667
+ m({ ...s, s: R, v: 100 - j });
668
+ }, A = (C) => {
669
+ C.preventDefault(), w(C.clientX, C.clientY);
670
+ const P = (R) => w(R.clientX, R.clientY), I = () => {
671
+ window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", I);
672
672
  };
673
- window.addEventListener("mousemove", R), window.addEventListener("mouseup", P);
674
- }, S = r ? Oe(
673
+ window.addEventListener("mousemove", P), window.addEventListener("mouseup", I);
674
+ }, F = o ? Le(
675
675
  /* @__PURE__ */ a(
676
676
  "div",
677
677
  {
678
678
  className: "pa-root pa-root--toolbar-portal pa-color-picker-portal",
679
679
  "data-pixelagent-picker-portal": !0,
680
- ...Gn(),
681
- children: /* @__PURE__ */ f(
680
+ ...Jn(),
681
+ children: /* @__PURE__ */ d(
682
682
  "div",
683
683
  {
684
- ref: p,
685
- id: h,
684
+ ref: u,
685
+ id: f,
686
686
  role: "dialog",
687
- "aria-label": N,
687
+ "aria-label": E,
688
688
  className: "pa-color-picker",
689
- style: { top: g.top, left: g.left, width: g.width },
689
+ style: { top: c.top, left: c.left, width: c.width },
690
690
  children: [
691
- /* @__PURE__ */ f("header", { className: "pa-color-picker-header", children: [
691
+ /* @__PURE__ */ d("header", { className: "pa-color-picker-header", children: [
692
692
  /* @__PURE__ */ a(
693
693
  "span",
694
694
  {
695
695
  className: "pa-color-picker-preview",
696
- style: { backgroundColor: v },
696
+ style: { backgroundColor: k },
697
697
  "aria-hidden": "true"
698
698
  }
699
699
  ),
700
- /* @__PURE__ */ a("span", { className: "pa-color-picker-header-label", children: N })
700
+ /* @__PURE__ */ a("span", { className: "pa-color-picker-header-label", children: E })
701
701
  ] }),
702
702
  /* @__PURE__ */ a(
703
703
  "div",
704
704
  {
705
- ref: d,
705
+ ref: h,
706
706
  className: "pa-color-picker-sb",
707
- style: { "--pa-picker-h": String(Math.round(i.h)) },
708
- onMouseDown: y,
707
+ style: { "--pa-picker-h": String(Math.round(s.h)) },
708
+ onMouseDown: A,
709
709
  children: /* @__PURE__ */ a(
710
710
  "span",
711
711
  {
712
712
  className: "pa-color-picker-sb-thumb",
713
- style: { left: `${i.s}%`, top: `${100 - i.v}%` },
713
+ style: { left: `${s.s}%`, top: `${100 - s.v}%` },
714
714
  "aria-hidden": "true"
715
715
  }
716
716
  )
717
717
  }
718
718
  ),
719
- /* @__PURE__ */ f("div", { className: "pa-color-picker-hue", children: [
719
+ /* @__PURE__ */ d("div", { className: "pa-color-picker-hue", children: [
720
720
  /* @__PURE__ */ a(
721
721
  "input",
722
722
  {
@@ -724,35 +724,35 @@ function Xe({ label: e, value: t, onChange: n }) {
724
724
  className: "pa-color-picker-hue-input",
725
725
  min: 0,
726
726
  max: 360,
727
- value: Math.round(i.h),
727
+ value: Math.round(s.h),
728
728
  "aria-label": "Hue",
729
- onChange: (k) => E({ ...i, h: parseFloat(k.target.value) })
729
+ onChange: (C) => m({ ...s, h: parseFloat(C.target.value) })
730
730
  }
731
731
  ),
732
732
  /* @__PURE__ */ a(
733
733
  "span",
734
734
  {
735
735
  className: "pa-color-picker-hue-thumb",
736
- style: { left: `${i.h / 360 * 100}%` },
736
+ style: { left: `${s.h / 360 * 100}%` },
737
737
  "aria-hidden": "true"
738
738
  }
739
739
  )
740
740
  ] }),
741
- /* @__PURE__ */ f("label", { className: "pa-color-picker-field", children: [
741
+ /* @__PURE__ */ d("label", { className: "pa-color-picker-field", children: [
742
742
  /* @__PURE__ */ a("span", { className: "pa-color-picker-field-label", children: "Hex" }),
743
743
  /* @__PURE__ */ a(
744
744
  "input",
745
745
  {
746
746
  className: "pa-input pa-color-picker-input",
747
747
  type: "text",
748
- value: m,
748
+ value: y,
749
749
  spellCheck: !1,
750
- onChange: (k) => x(jn(k.target.value, u))
750
+ onChange: (C) => v(Gn(C.target.value, x))
751
751
  }
752
752
  )
753
753
  ] }),
754
- /* @__PURE__ */ a("div", { className: "pa-color-picker-rgb", children: ["r", "g", "b"].map((k) => /* @__PURE__ */ f("label", { className: "pa-color-picker-field pa-color-picker-field--rgb", children: [
755
- /* @__PURE__ */ a("span", { className: "pa-color-picker-field-label", children: k.toUpperCase() }),
754
+ /* @__PURE__ */ a("div", { className: "pa-color-picker-rgb", children: ["r", "g", "b"].map((C) => /* @__PURE__ */ d("label", { className: "pa-color-picker-field pa-color-picker-field--rgb", children: [
755
+ /* @__PURE__ */ a("span", { className: "pa-color-picker-field-label", children: C.toUpperCase() }),
756
756
  /* @__PURE__ */ a(
757
757
  "input",
758
758
  {
@@ -760,14 +760,14 @@ function Xe({ label: e, value: t, onChange: n }) {
760
760
  type: "number",
761
761
  min: 0,
762
762
  max: 255,
763
- value: u[k],
764
- onChange: (R) => {
765
- const P = Kn(parseInt(R.target.value, 10));
766
- x({ ...u, [k]: P });
763
+ value: x[C],
764
+ onChange: (P) => {
765
+ const I = Zn(parseInt(P.target.value, 10));
766
+ v({ ...x, [C]: I });
767
767
  }
768
768
  }
769
769
  )
770
- ] }, k)) })
770
+ ] }, C)) })
771
771
  ]
772
772
  }
773
773
  )
@@ -775,22 +775,25 @@ function Xe({ label: e, value: t, onChange: n }) {
775
775
  ),
776
776
  document.body
777
777
  ) : null;
778
- return /* @__PURE__ */ f("div", { className: "pa-color-field", children: [
779
- /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
780
- /* @__PURE__ */ f(
778
+ return /* @__PURE__ */ d("div", { className: "pa-color-field", children: [
779
+ r ? /* @__PURE__ */ d("div", { className: "pa-color-field-label-row", children: [
780
+ /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
781
+ r
782
+ ] }) : /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
783
+ /* @__PURE__ */ d(
781
784
  "button",
782
785
  {
783
- ref: l,
786
+ ref: p,
784
787
  type: "button",
785
788
  className: "pa-color-field-trigger",
786
- "aria-expanded": r,
789
+ "aria-expanded": o,
787
790
  "aria-haspopup": "dialog",
788
- "aria-controls": r ? h : void 0,
791
+ "aria-controls": o ? f : void 0,
789
792
  onClick: () => {
790
- r || w(), o((k) => !k);
793
+ o || N(), i((C) => !C);
791
794
  },
792
795
  children: [
793
- /* @__PURE__ */ a("span", { className: "pa-color-field-swatch", style: { backgroundColor: v }, "aria-hidden": "true" }),
796
+ /* @__PURE__ */ a("span", { className: "pa-color-field-swatch", style: { backgroundColor: k }, "aria-hidden": "true" }),
794
797
  /* @__PURE__ */ a(
795
798
  "input",
796
799
  {
@@ -805,10 +808,10 @@ function Xe({ label: e, value: t, onChange: n }) {
805
808
  ]
806
809
  }
807
810
  ),
808
- S
811
+ F
809
812
  ] });
810
813
  }
811
- function Kn(e) {
814
+ function Zn(e) {
812
815
  return Number.isFinite(e) ? Math.min(255, Math.max(0, e)) : 0;
813
816
  }
814
817
  function we({
@@ -818,10 +821,10 @@ function we({
818
821
  badge: r,
819
822
  headerAction: o
820
823
  }) {
821
- const [i, s] = A(n), l = () => s((p) => !p);
822
- return /* @__PURE__ */ f("section", { className: `pa-edit-section ${i ? "pa-edit-section--open" : ""}`, children: [
823
- /* @__PURE__ */ f("div", { className: "pa-edit-section-header", children: [
824
- /* @__PURE__ */ f(
824
+ const [i, s] = S(n), l = () => s((p) => !p);
825
+ return /* @__PURE__ */ d("section", { className: `pa-edit-section ${i ? "pa-edit-section--open" : ""}`, children: [
826
+ /* @__PURE__ */ d("div", { className: "pa-edit-section-header", children: [
827
+ /* @__PURE__ */ d(
825
828
  "button",
826
829
  {
827
830
  type: "button",
@@ -878,63 +881,63 @@ const ye = [
878
881
  { value: "Helvetica, Arial, sans-serif", label: "Helvetica" },
879
882
  { value: '"JetBrains Mono", ui-monospace, monospace', label: "JetBrains Mono" },
880
883
  { value: "ui-monospace, monospace", label: "Monospace" }
881
- ], De = "";
882
- function $e(e) {
884
+ ], Fe = "";
885
+ function Pe(e) {
883
886
  var n;
884
887
  return (((n = e.split(",")[0]) == null ? void 0 : n.trim()) ?? "").replace(/^["']|["']$/g, "");
885
888
  }
886
- function qn(e) {
889
+ function Qn(e) {
887
890
  const t = e.trim();
888
891
  if (!t)
889
892
  return {
890
- selectValue: De,
893
+ selectValue: Fe,
891
894
  options: ye
892
895
  };
893
- const n = $e(t).toLowerCase(), r = ye.find(
894
- (i) => i.value === t || $e(i.value).toLowerCase() === n
896
+ const n = Pe(t).toLowerCase(), r = ye.find(
897
+ (i) => i.value === t || Pe(i.value).toLowerCase() === n
895
898
  );
896
899
  if (r)
897
900
  return { selectValue: r.value, options: ye };
898
901
  const o = ye.find((i) => {
899
- const s = $e(i.value).toLowerCase();
902
+ const s = Pe(i.value).toLowerCase();
900
903
  return t.toLowerCase().includes(s) || s.includes(n);
901
904
  });
902
905
  return o ? { selectValue: o.value, options: ye } : {
903
906
  selectValue: t,
904
907
  options: [
905
908
  ...ye,
906
- { value: t, label: $e(t) || "Custom" }
909
+ { value: t, label: Pe(t) || "Custom" }
907
910
  ]
908
911
  };
909
912
  }
910
- function Jn({ value: e, onChange: t }) {
911
- const { selectValue: n, options: r } = de(
912
- () => qn(e),
913
+ function ea({ value: e, onChange: t }) {
914
+ const { selectValue: n, options: r } = se(
915
+ () => Qn(e),
913
916
  [e]
914
917
  );
915
- return /* @__PURE__ */ f("label", { className: "pa-edit-stack-field", children: [
918
+ return /* @__PURE__ */ d("label", { className: "pa-edit-stack-field", children: [
916
919
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Font family" }),
917
- /* @__PURE__ */ f(
920
+ /* @__PURE__ */ d(
918
921
  "select",
919
922
  {
920
923
  className: "pa-select pa-font-family-select",
921
- value: n || De,
924
+ value: n || Fe,
922
925
  onChange: (o) => {
923
926
  const i = o.target.value;
924
- i && i !== De && t(i);
927
+ i && i !== Fe && t(i);
925
928
  },
926
929
  children: [
927
- /* @__PURE__ */ a("option", { value: De, disabled: !0, children: "Select font style" }),
930
+ /* @__PURE__ */ a("option", { value: Fe, disabled: !0, children: "Select font style" }),
928
931
  r.map((o) => /* @__PURE__ */ a("option", { value: o.value, children: o.label }, o.value))
929
932
  ]
930
933
  }
931
934
  )
932
935
  ] });
933
936
  }
934
- function ot(e, t, n) {
937
+ function lt(e, t, n) {
935
938
  return Math.min(n, Math.max(t, e));
936
939
  }
937
- function Jt({
940
+ function en({
938
941
  getValue: e,
939
942
  min: t = -1 / 0,
940
943
  max: n = 1 / 0,
@@ -942,30 +945,30 @@ function Jt({
942
945
  onChange: o,
943
946
  pxPerStep: i = 3
944
947
  }) {
945
- const [s, l] = A(!1), p = j(null), d = (c) => {
946
- const u = e();
947
- u === null || !Number.isFinite(u) || (c.preventDefault(), p.current = { startX: c.clientX, startValue: u }, l(!0), c.currentTarget.setPointerCapture(c.pointerId));
948
+ const [s, l] = S(!1), p = V(null), u = (c) => {
949
+ const g = e();
950
+ g === null || !Number.isFinite(g) || (c.preventDefault(), p.current = { startX: c.clientX, startValue: g }, l(!0), c.currentTarget.setPointerCapture(c.pointerId));
948
951
  }, h = (c) => {
949
- const u = p.current;
950
- if (!u) return;
951
- const m = Math.round((c.clientX - u.startX) / i);
952
- if (m === 0) return;
953
- const v = u.startValue + m * r, N = Math.round(v / r) * r;
954
- o(ot(N, t, n));
955
- }, g = (c) => {
952
+ const g = p.current;
953
+ if (!g) return;
954
+ const x = Math.round((c.clientX - g.startX) / i);
955
+ if (x === 0) return;
956
+ const y = g.startValue + x * r, k = Math.round(y / r) * r;
957
+ o(lt(k, t, n));
958
+ }, f = (c) => {
956
959
  p.current && (p.current = null, l(!1), c.currentTarget.hasPointerCapture(c.pointerId) && c.currentTarget.releasePointerCapture(c.pointerId));
957
960
  };
958
961
  return {
959
962
  scrubbing: s,
960
963
  handleProps: {
961
- onPointerDown: d,
964
+ onPointerDown: u,
962
965
  onPointerMove: h,
963
- onPointerUp: g,
964
- onPointerCancel: g
966
+ onPointerUp: f,
967
+ onPointerCancel: f
965
968
  }
966
969
  };
967
970
  }
968
- function le({
971
+ function pe({
969
972
  property: e,
970
973
  label: t,
971
974
  value: n,
@@ -973,44 +976,44 @@ function le({
973
976
  compact: o = !1
974
977
  }) {
975
978
  var E;
976
- const i = Pn[e] ?? { kind: "text" }, s = Ye(e, n, i), l = i.kind !== "text" && s !== null, p = o ? "pa-prop-row pa-prop-row--compact" : "pa-prop-row", d = o ? "pa-edit-field-label" : "pa-prop-label";
979
+ const i = Rn[e] ?? { kind: "text" }, s = Ge(e, n, i), l = i.kind !== "text" && s !== null, p = o ? "pa-prop-row pa-prop-row--compact" : "pa-prop-row", u = o ? "pa-edit-field-label" : "pa-prop-label";
977
980
  if (!l)
978
- return /* @__PURE__ */ f("label", { className: p, children: [
979
- /* @__PURE__ */ a("span", { className: d, children: t }),
981
+ return /* @__PURE__ */ d("label", { className: p, children: [
982
+ /* @__PURE__ */ a("span", { className: u, children: t }),
980
983
  /* @__PURE__ */ a(
981
984
  "input",
982
985
  {
983
986
  className: "pa-input",
984
987
  type: "text",
985
988
  value: n,
986
- onChange: (x) => r(x.target.value)
989
+ onChange: (m) => r(m.target.value)
987
990
  }
988
991
  )
989
992
  ] });
990
- const h = i.min ?? -1 / 0, g = i.max ?? 1 / 0, c = i.kind === "length", u = c ? Xt(((E = fe(n)) == null ? void 0 : E.unit) ?? "") : i.step ?? 1, m = (x) => r(
991
- c ? En(n, x) : In(e, x, i)
992
- ), v = Jt({
993
- getValue: () => Ye(e, n, i),
993
+ const h = i.min ?? -1 / 0, f = i.max ?? 1 / 0, c = i.kind === "length", g = c ? Jt(((E = fe(n)) == null ? void 0 : E.unit) ?? "") : i.step ?? 1, x = (m) => r(
994
+ c ? Tn(n, m) : On(e, m, i)
995
+ ), y = en({
996
+ getValue: () => Ge(e, n, i),
994
997
  min: h,
995
- max: g,
996
- step: u,
997
- onChange: m,
998
+ max: f,
999
+ step: g,
1000
+ onChange: x,
998
1001
  pxPerStep: i.kind === "opacity" ? 2 : 3
999
- }), N = (x) => {
1000
- if (x.key !== "ArrowUp" && x.key !== "ArrowDown") return;
1001
- const w = Ye(e, n, i);
1002
- if (w === null) return;
1003
- x.preventDefault();
1004
- const M = x.key === "ArrowUp" ? 1 : -1;
1005
- m(ot(w + M * u, h, g));
1002
+ }), k = (m) => {
1003
+ if (m.key !== "ArrowUp" && m.key !== "ArrowDown") return;
1004
+ const v = Ge(e, n, i);
1005
+ if (v === null) return;
1006
+ m.preventDefault();
1007
+ const N = m.key === "ArrowUp" ? 1 : -1;
1008
+ x(lt(v + N * g, h, f));
1006
1009
  };
1007
- return /* @__PURE__ */ f("div", { className: p, children: [
1010
+ return /* @__PURE__ */ d("div", { className: p, children: [
1008
1011
  /* @__PURE__ */ a(
1009
1012
  "span",
1010
1013
  {
1011
- className: `${d} pa-scrub-label${v.scrubbing ? " pa-scrub-label--active" : ""}`,
1014
+ className: `${u} pa-scrub-label${y.scrubbing ? " pa-scrub-label--active" : ""}`,
1012
1015
  title: "Drag to adjust",
1013
- ...v.handleProps,
1016
+ ...y.handleProps,
1014
1017
  children: t
1015
1018
  }
1016
1019
  ),
@@ -1020,15 +1023,15 @@ function le({
1020
1023
  className: "pa-input pa-prop-scrub-value",
1021
1024
  type: "text",
1022
1025
  value: n,
1023
- onChange: (x) => r(x.target.value),
1024
- onKeyDown: N,
1026
+ onChange: (m) => r(m.target.value),
1027
+ onKeyDown: k,
1025
1028
  "aria-label": `${t} value`,
1026
1029
  spellCheck: !1
1027
1030
  }
1028
1031
  )
1029
1032
  ] });
1030
1033
  }
1031
- function Zn(e) {
1034
+ function ta(e) {
1032
1035
  const t = e.trim().split(/\s+/).filter(Boolean), n = t[0] ?? "0px";
1033
1036
  if (t.length <= 1) return { top: n, right: n, bottom: n, left: n };
1034
1037
  const r = t[1];
@@ -1036,7 +1039,7 @@ function Zn(e) {
1036
1039
  const o = t[2];
1037
1040
  return t.length === 3 ? { top: n, right: r, bottom: o, left: r } : { top: n, right: r, bottom: o, left: t[3] };
1038
1041
  }
1039
- function Qn({ top: e, right: t, bottom: n, left: r }) {
1042
+ function na({ top: e, right: t, bottom: n, left: r }) {
1040
1043
  return e === t && t === n && n === r ? e : e === n && t === r ? `${e} ${t}` : t === r ? `${e} ${t} ${n}` : `${e} ${t} ${n} ${r}`;
1041
1044
  }
1042
1045
  function be(e) {
@@ -1047,10 +1050,10 @@ function ve(e) {
1047
1050
  const t = e.trim();
1048
1051
  return t === "" ? "0px" : /^-?\d+(?:\.\d+)?$/.test(t) ? `${t}px` : t;
1049
1052
  }
1050
- function ht(e, t) {
1053
+ function bt(e, t) {
1051
1054
  return e === t ? be(e) : `${be(e)}, ${be(t)}`;
1052
1055
  }
1053
- function mt(e, t) {
1056
+ function vt(e, t) {
1054
1057
  const n = e.split(",").map((r) => r.trim()).filter(Boolean);
1055
1058
  if (n.length === 0) return [t, t];
1056
1059
  if (n.length === 1) {
@@ -1059,41 +1062,41 @@ function mt(e, t) {
1059
1062
  }
1060
1063
  return [ve(n[0]), ve(n[1])];
1061
1064
  }
1062
- const xt = 12, it = {
1063
- width: xt,
1064
- height: xt,
1065
+ const wt = 12, ct = {
1066
+ width: wt,
1067
+ height: wt,
1065
1068
  viewBox: "0 0 12 12",
1066
1069
  fill: "none",
1067
1070
  "aria-hidden": !0
1068
1071
  };
1069
- function ea() {
1070
- return /* @__PURE__ */ f("svg", { ...it, children: [
1072
+ function aa() {
1073
+ return /* @__PURE__ */ d("svg", { ...ct, children: [
1071
1074
  /* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
1072
1075
  /* @__PURE__ */ a("line", { x1: "1.5", y1: "1.5", x2: "1.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" }),
1073
1076
  /* @__PURE__ */ a("line", { x1: "10.5", y1: "1.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
1074
1077
  ] });
1075
1078
  }
1076
- function ta() {
1077
- return /* @__PURE__ */ f("svg", { ...it, children: [
1079
+ function ra() {
1080
+ return /* @__PURE__ */ d("svg", { ...ct, children: [
1078
1081
  /* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
1079
1082
  /* @__PURE__ */ a("line", { x1: "1.5", y1: "1.5", x2: "10.5", y2: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
1080
1083
  /* @__PURE__ */ a("line", { x1: "1.5", y1: "10.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
1081
1084
  ] });
1082
1085
  }
1083
- function Ee({ side: e }) {
1086
+ function Ie({ side: e }) {
1084
1087
  const t = {
1085
1088
  top: { x1: 1.5, y1: 1.5, x2: 10.5, y2: 1.5 },
1086
1089
  right: { x1: 10.5, y1: 1.5, x2: 10.5, y2: 10.5 },
1087
1090
  bottom: { x1: 1.5, y1: 10.5, x2: 10.5, y2: 10.5 },
1088
1091
  left: { x1: 1.5, y1: 1.5, x2: 1.5, y2: 10.5 }
1089
1092
  }[e];
1090
- return /* @__PURE__ */ f("svg", { ...it, children: [
1093
+ return /* @__PURE__ */ d("svg", { ...ct, children: [
1091
1094
  /* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
1092
1095
  /* @__PURE__ */ a("line", { ...t, stroke: "currentColor", strokeWidth: "1.5" })
1093
1096
  ] });
1094
1097
  }
1095
- function na() {
1096
- return /* @__PURE__ */ f("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
1098
+ function oa() {
1099
+ return /* @__PURE__ */ d("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
1097
1100
  /* @__PURE__ */ a("rect", { x: "2", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
1098
1101
  /* @__PURE__ */ a("rect", { x: "8", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
1099
1102
  /* @__PURE__ */ a("rect", { x: "2", y: "8", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
@@ -1110,23 +1113,23 @@ function ke({
1110
1113
  scrubMin: s,
1111
1114
  onScrub: l
1112
1115
  }) {
1113
- const [p, d] = A(t);
1114
- U(() => {
1115
- d(t);
1116
+ const [p, u] = S(t);
1117
+ W(() => {
1118
+ u(t);
1116
1119
  }, [t]);
1117
- const h = Jt({
1120
+ const h = en({
1118
1121
  getValue: () => i,
1119
1122
  min: s,
1120
1123
  step: 1,
1121
1124
  onChange: l
1122
- }), g = i !== null;
1123
- return /* @__PURE__ */ f("label", { className: `pa-spacing-cell ${r ? "pa-spacing-cell--mixed" : ""}`, children: [
1125
+ }), f = i !== null;
1126
+ return /* @__PURE__ */ d("label", { className: `pa-spacing-cell ${r ? "pa-spacing-cell--mixed" : ""}`, children: [
1124
1127
  /* @__PURE__ */ a(
1125
1128
  "span",
1126
1129
  {
1127
- className: `pa-spacing-cell-icon${g ? " pa-spacing-cell-icon--scrub" : ""}${h.scrubbing ? " pa-spacing-cell-icon--active" : ""}`,
1128
- title: g ? "Drag to adjust" : void 0,
1129
- ...g ? h.handleProps : {},
1130
+ className: `pa-spacing-cell-icon${f ? " pa-spacing-cell-icon--scrub" : ""}${h.scrubbing ? " pa-spacing-cell-icon--active" : ""}`,
1131
+ title: f ? "Drag to adjust" : void 0,
1132
+ ...f ? h.handleProps : {},
1130
1133
  children: e
1131
1134
  }
1132
1135
  ),
@@ -1136,16 +1139,16 @@ function ke({
1136
1139
  className: "pa-input pa-spacing-cell-input",
1137
1140
  type: "text",
1138
1141
  value: p,
1139
- onChange: (c) => d(c.target.value),
1142
+ onChange: (c) => u(c.target.value),
1140
1143
  onBlur: () => o(p),
1141
1144
  onKeyDown: (c) => {
1142
1145
  if (c.key === "Enter") c.target.blur();
1143
1146
  else if (c.key === "Escape")
1144
- d(t), c.target.blur();
1145
- else if (g && (c.key === "ArrowUp" || c.key === "ArrowDown")) {
1147
+ u(t), c.target.blur();
1148
+ else if (f && (c.key === "ArrowUp" || c.key === "ArrowDown")) {
1146
1149
  c.preventDefault();
1147
- const u = c.key === "ArrowUp" ? 1 : -1;
1148
- l(ot(i + u, s, 1 / 0));
1150
+ const g = c.key === "ArrowUp" ? 1 : -1;
1151
+ l(lt(i + g, s, 1 / 0));
1149
1152
  }
1150
1153
  },
1151
1154
  "aria-label": n,
@@ -1154,13 +1157,13 @@ function ke({
1154
1157
  )
1155
1158
  ] });
1156
1159
  }
1157
- function bt({ property: e, label: t, value: n, onChange: r }) {
1158
- const o = Zn(n), [i, s] = A(!1), l = (c) => {
1159
- r(Qn({ ...o, ...c }));
1160
- }, p = o.left !== o.right, d = o.top !== o.bottom, h = e === "margin" ? -1 / 0 : 0, g = (c, u) => c === u ? ce(c) : null;
1161
- return /* @__PURE__ */ f("div", { className: "pa-prop-row pa-prop-row--compact pa-spacing-row", children: [
1160
+ function yt({ property: e, label: t, value: n, onChange: r }) {
1161
+ const o = ta(n), [i, s] = S(!1), l = (c) => {
1162
+ r(na({ ...o, ...c }));
1163
+ }, p = o.left !== o.right, u = o.top !== o.bottom, h = e === "margin" ? -1 / 0 : 0, f = (c, g) => c === g ? de(c) : null;
1164
+ return /* @__PURE__ */ d("div", { className: "pa-prop-row pa-prop-row--compact pa-spacing-row", children: [
1162
1165
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: t }),
1163
- /* @__PURE__ */ f(
1166
+ /* @__PURE__ */ d(
1164
1167
  "div",
1165
1168
  {
1166
1169
  className: `pa-spacing-control ${i ? "pa-spacing-control--split" : "pa-spacing-control--pair"}`,
@@ -1169,15 +1172,15 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1169
1172
  // Grid mirrors pair-view columns:
1170
1173
  // Col 1 (horizontal pair) → L on top, R on bottom
1171
1174
  // Col 2 (vertical pair) → T on top, B on bottom
1172
- /* @__PURE__ */ f("div", { className: "pa-spacing-grid", children: [
1175
+ /* @__PURE__ */ d("div", { className: "pa-spacing-grid", children: [
1173
1176
  /* @__PURE__ */ a(
1174
1177
  ke,
1175
1178
  {
1176
- icon: /* @__PURE__ */ a(Ee, { side: "left" }),
1179
+ icon: /* @__PURE__ */ a(Ie, { side: "left" }),
1177
1180
  display: be(o.left),
1178
1181
  ariaLabel: `${t} left`,
1179
1182
  onCommit: (c) => l({ left: ve(c) }),
1180
- scrubValue: ce(o.left),
1183
+ scrubValue: de(o.left),
1181
1184
  scrubMin: h,
1182
1185
  onScrub: (c) => l({ left: `${c}px` })
1183
1186
  }
@@ -1185,11 +1188,11 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1185
1188
  /* @__PURE__ */ a(
1186
1189
  ke,
1187
1190
  {
1188
- icon: /* @__PURE__ */ a(Ee, { side: "top" }),
1191
+ icon: /* @__PURE__ */ a(Ie, { side: "top" }),
1189
1192
  display: be(o.top),
1190
1193
  ariaLabel: `${t} top`,
1191
1194
  onCommit: (c) => l({ top: ve(c) }),
1192
- scrubValue: ce(o.top),
1195
+ scrubValue: de(o.top),
1193
1196
  scrubMin: h,
1194
1197
  onScrub: (c) => l({ top: `${c}px` })
1195
1198
  }
@@ -1197,11 +1200,11 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1197
1200
  /* @__PURE__ */ a(
1198
1201
  ke,
1199
1202
  {
1200
- icon: /* @__PURE__ */ a(Ee, { side: "right" }),
1203
+ icon: /* @__PURE__ */ a(Ie, { side: "right" }),
1201
1204
  display: be(o.right),
1202
1205
  ariaLabel: `${t} right`,
1203
1206
  onCommit: (c) => l({ right: ve(c) }),
1204
- scrubValue: ce(o.right),
1207
+ scrubValue: de(o.right),
1205
1208
  scrubMin: h,
1206
1209
  onScrub: (c) => l({ right: `${c}px` })
1207
1210
  }
@@ -1209,29 +1212,29 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1209
1212
  /* @__PURE__ */ a(
1210
1213
  ke,
1211
1214
  {
1212
- icon: /* @__PURE__ */ a(Ee, { side: "bottom" }),
1215
+ icon: /* @__PURE__ */ a(Ie, { side: "bottom" }),
1213
1216
  display: be(o.bottom),
1214
1217
  ariaLabel: `${t} bottom`,
1215
1218
  onCommit: (c) => l({ bottom: ve(c) }),
1216
- scrubValue: ce(o.bottom),
1219
+ scrubValue: de(o.bottom),
1217
1220
  scrubMin: h,
1218
1221
  onScrub: (c) => l({ bottom: `${c}px` })
1219
1222
  }
1220
1223
  )
1221
1224
  ] })
1222
- ) : /* @__PURE__ */ f("div", { className: "pa-spacing-pair", children: [
1225
+ ) : /* @__PURE__ */ d("div", { className: "pa-spacing-pair", children: [
1223
1226
  /* @__PURE__ */ a(
1224
1227
  ke,
1225
1228
  {
1226
- icon: /* @__PURE__ */ a(ea, {}),
1227
- display: ht(o.left, o.right),
1229
+ icon: /* @__PURE__ */ a(aa, {}),
1230
+ display: bt(o.left, o.right),
1228
1231
  mixed: p,
1229
1232
  ariaLabel: `${t} horizontal`,
1230
1233
  onCommit: (c) => {
1231
- const [u, m] = mt(c, o.left);
1232
- l({ left: u, right: m });
1234
+ const [g, x] = vt(c, o.left);
1235
+ l({ left: g, right: x });
1233
1236
  },
1234
- scrubValue: g(o.left, o.right),
1237
+ scrubValue: f(o.left, o.right),
1235
1238
  scrubMin: h,
1236
1239
  onScrub: (c) => l({ left: `${c}px`, right: `${c}px` })
1237
1240
  }
@@ -1239,15 +1242,15 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1239
1242
  /* @__PURE__ */ a(
1240
1243
  ke,
1241
1244
  {
1242
- icon: /* @__PURE__ */ a(ta, {}),
1243
- display: ht(o.top, o.bottom),
1244
- mixed: d,
1245
+ icon: /* @__PURE__ */ a(ra, {}),
1246
+ display: bt(o.top, o.bottom),
1247
+ mixed: u,
1245
1248
  ariaLabel: `${t} vertical`,
1246
1249
  onCommit: (c) => {
1247
- const [u, m] = mt(c, o.top);
1248
- l({ top: u, bottom: m });
1250
+ const [g, x] = vt(c, o.top);
1251
+ l({ top: g, bottom: x });
1249
1252
  },
1250
- scrubValue: g(o.top, o.bottom),
1253
+ scrubValue: f(o.top, o.bottom),
1251
1254
  scrubMin: h,
1252
1255
  onScrub: (c) => l({ top: `${c}px`, bottom: `${c}px` })
1253
1256
  }
@@ -1262,7 +1265,7 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1262
1265
  "aria-pressed": i,
1263
1266
  "aria-label": i ? "Collapse to pair view" : "Expand to per-side view",
1264
1267
  title: i ? "Collapse to pair view" : "Expand to per-side view",
1265
- children: /* @__PURE__ */ a(na, {})
1268
+ children: /* @__PURE__ */ a(oa, {})
1266
1269
  }
1267
1270
  )
1268
1271
  ]
@@ -1270,7 +1273,7 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
1270
1273
  )
1271
1274
  ] });
1272
1275
  }
1273
- function aa({ className: e }) {
1276
+ function ia({ className: e }) {
1274
1277
  return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
1275
1278
  "path",
1276
1279
  {
@@ -1279,7 +1282,7 @@ function aa({ className: e }) {
1279
1282
  }
1280
1283
  ) });
1281
1284
  }
1282
- function ra({ className: e }) {
1285
+ function sa({ className: e }) {
1283
1286
  return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
1284
1287
  "path",
1285
1288
  {
@@ -1288,7 +1291,7 @@ function ra({ className: e }) {
1288
1291
  }
1289
1292
  ) });
1290
1293
  }
1291
- function oa({ className: e }) {
1294
+ function la({ className: e }) {
1292
1295
  return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
1293
1296
  "path",
1294
1297
  {
@@ -1297,11 +1300,11 @@ function oa({ className: e }) {
1297
1300
  }
1298
1301
  ) });
1299
1302
  }
1300
- function ia({ className: e }) {
1303
+ function ca({ className: e }) {
1301
1304
  return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { fill: "currentColor", d: "M2 3h12v1.5H2V3zm0 3.5h12v1.5H2V6.5zm0 3.5h12v1.5H2V10zm0 3.5h12v1.5H2V13.5z" }) });
1302
1305
  }
1303
- function sa({ className: e }) {
1304
- return /* @__PURE__ */ f(
1306
+ function pa({ className: e }) {
1307
+ return /* @__PURE__ */ d(
1305
1308
  "svg",
1306
1309
  {
1307
1310
  className: e,
@@ -1321,7 +1324,7 @@ function sa({ className: e }) {
1321
1324
  }
1322
1325
  );
1323
1326
  }
1324
- function la({ className: e }) {
1327
+ function da({ className: e }) {
1325
1328
  return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
1326
1329
  "path",
1327
1330
  {
@@ -1330,48 +1333,48 @@ function la({ className: e }) {
1330
1333
  }
1331
1334
  ) });
1332
1335
  }
1333
- const ca = /^--(?:text|font-size)-(.+)$/, pa = ["--line-height", "--font-weight", "--letter-spacing"], da = [
1336
+ const ua = /^--(?:text|font-size)-(.+)$/, fa = ["--line-height", "--font-weight", "--letter-spacing"], ga = [
1334
1337
  "--text-",
1335
1338
  "--font-",
1336
1339
  "--leading-",
1337
1340
  "--line-height-"
1338
1341
  ];
1339
- function fa(e) {
1342
+ function ha(e) {
1340
1343
  const t = fe(e);
1341
1344
  return t !== null && (t.unit === "px" || t.unit === "rem" || t.unit === "em");
1342
1345
  }
1343
- function vt(e) {
1346
+ function kt(e) {
1344
1347
  return Math.round(e * 100) / 100;
1345
1348
  }
1346
- function wt(e, t) {
1349
+ function Nt(e, t) {
1347
1350
  const n = fe(e);
1348
- return n ? n.unit === "px" ? `${vt(n.num)}px` : n.unit === "rem" ? `${vt(n.num * t)}px` : e : e;
1351
+ return n ? n.unit === "px" ? `${kt(n.num)}px` : n.unit === "rem" ? `${kt(n.num * t)}px` : e : e;
1349
1352
  }
1350
- function ua(e) {
1353
+ function ma(e) {
1351
1354
  return e && e[0].toUpperCase() + e.slice(1);
1352
1355
  }
1353
- function ga(e) {
1354
- return /^h[1-6]$/i.test(e) ? e.toUpperCase() : e.split(/[-_]/).filter(Boolean).map((n) => /^\d*x?[sl]?$|^\d*xl$|^xs$|^sm$|^md$|^lg$|^xl$/i.test(n) ? n.toUpperCase() : ua(n)).join(" ");
1356
+ function xa(e) {
1357
+ return /^h[1-6]$/i.test(e) ? e.toUpperCase() : e.split(/[-_]/).filter(Boolean).map((n) => /^\d*x?[sl]?$|^\d*xl$|^xs$|^sm$|^md$|^lg$|^xl$/i.test(n) ? n.toUpperCase() : ma(n)).join(" ");
1355
1358
  }
1356
- function ha(e) {
1357
- return pa.some((t) => e.endsWith(t));
1359
+ function ba(e) {
1360
+ return fa.some((t) => e.endsWith(t));
1358
1361
  }
1359
- function ma(e, t = 16) {
1362
+ function va(e, t = 16) {
1360
1363
  const n = [];
1361
1364
  for (const [r, o] of Object.entries(e)) {
1362
- if (ha(r)) continue;
1363
- const i = r.match(ca);
1365
+ if (ba(r)) continue;
1366
+ const i = r.match(ua);
1364
1367
  if (!i) continue;
1365
1368
  const s = o.trim();
1366
- if (!fa(s)) continue;
1367
- const l = i[1], p = e[`${r}--line-height`] ?? e[`--leading-${l}`] ?? e[`--line-height-${l}`] ?? null, d = e[`${r}--font-weight`] ?? e[`--font-weight-${l}`] ?? null;
1369
+ if (!ha(s)) continue;
1370
+ const l = i[1], p = e[`${r}--line-height`] ?? e[`--leading-${l}`] ?? e[`--line-height-${l}`] ?? null, u = e[`${r}--font-weight`] ?? e[`--font-weight-${l}`] ?? null;
1368
1371
  n.push({
1369
1372
  id: l,
1370
- label: ga(l),
1373
+ label: xa(l),
1371
1374
  varName: r,
1372
- fontSize: wt(s, t),
1373
- lineHeight: p ? wt(p.trim(), t) : null,
1374
- fontWeight: d ? d.trim() : null
1375
+ fontSize: Nt(s, t),
1376
+ lineHeight: p ? Nt(p.trim(), t) : null,
1377
+ fontWeight: u ? u.trim() : null
1375
1378
  });
1376
1379
  }
1377
1380
  return n.sort((r, o) => {
@@ -1379,32 +1382,32 @@ function ma(e, t = 16) {
1379
1382
  return (((i = fe(o.fontSize)) == null ? void 0 : i.num) ?? 0) - (((s = fe(r.fontSize)) == null ? void 0 : s.num) ?? 0);
1380
1383
  }), n;
1381
1384
  }
1382
- function xa(e) {
1385
+ function wa(e) {
1383
1386
  const t = e.fontSize.replace(/px$/, "");
1384
1387
  return e.lineHeight ? `${t}/${e.lineHeight.replace(/px$/, "")}` : t;
1385
1388
  }
1386
- function Pe(e) {
1389
+ function Te(e) {
1387
1390
  var t;
1388
1391
  return e ? ((t = fe(e)) == null ? void 0 : t.num) ?? null : null;
1389
1392
  }
1390
- function ba(e, t, n) {
1391
- const r = Pe(t);
1393
+ function ya(e, t, n) {
1394
+ const r = Te(t);
1392
1395
  if (r === null) return null;
1393
- const o = Pe(n), i = e.filter((s) => {
1394
- const l = Pe(s.fontSize);
1396
+ const o = Te(n), i = e.filter((s) => {
1397
+ const l = Te(s.fontSize);
1395
1398
  return l !== null && Math.abs(l - r) < 0.5;
1396
1399
  });
1397
1400
  if (i.length === 0) return null;
1398
1401
  if (o !== null) {
1399
1402
  const s = i.find((l) => {
1400
- const p = Pe(l.lineHeight);
1403
+ const p = Te(l.lineHeight);
1401
1404
  return p !== null && Math.abs(p - o) < 0.5;
1402
1405
  });
1403
1406
  if (s) return s;
1404
1407
  }
1405
1408
  return i[0];
1406
1409
  }
1407
- function va(e) {
1410
+ function ka(e) {
1408
1411
  const t = /* @__PURE__ */ new Set(), n = (r) => {
1409
1412
  if (r)
1410
1413
  for (const o of Array.from(r)) {
@@ -1412,7 +1415,7 @@ function va(e) {
1412
1415
  if (i.style)
1413
1416
  for (let l = 0; l < i.style.length; l++) {
1414
1417
  const p = i.style[l];
1415
- p.startsWith("--") && da.some((d) => p.startsWith(d)) && t.add(p);
1418
+ p.startsWith("--") && ga.some((u) => p.startsWith(u)) && t.add(p);
1416
1419
  }
1417
1420
  const s = o.cssRules;
1418
1421
  s && n(s);
@@ -1425,24 +1428,24 @@ function va(e) {
1425
1428
  }
1426
1429
  return t;
1427
1430
  }
1428
- function wa() {
1431
+ function Na() {
1429
1432
  if (typeof document > "u") return [];
1430
- const e = va(document), t = document.documentElement, n = getComputedStyle(t), r = {};
1433
+ const e = ka(document), t = document.documentElement, n = getComputedStyle(t), r = {};
1431
1434
  for (const i of e) {
1432
1435
  const s = n.getPropertyValue(i).trim();
1433
1436
  s && (r[i] = s);
1434
1437
  }
1435
1438
  const o = parseFloat(n.fontSize) || 16;
1436
- return ma(r, o);
1439
+ return va(r, o);
1437
1440
  }
1438
- const yt = 264, kt = 360;
1439
- function ya() {
1441
+ const Ct = 264, Mt = 360;
1442
+ function Ca() {
1440
1443
  if (typeof document > "u") return {};
1441
1444
  const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
1442
1445
  return t ? { "data-pa-chrome": t } : {};
1443
1446
  }
1444
- function ka({ className: e }) {
1445
- return /* @__PURE__ */ f(
1447
+ function Ma({ className: e }) {
1448
+ return /* @__PURE__ */ d(
1446
1449
  "svg",
1447
1450
  {
1448
1451
  className: e,
@@ -1460,60 +1463,60 @@ function ka({ className: e }) {
1460
1463
  }
1461
1464
  );
1462
1465
  }
1463
- function Na({
1466
+ function Aa({
1464
1467
  presets: e,
1465
1468
  fontSize: t,
1466
1469
  lineHeight: n,
1467
1470
  onApply: r
1468
1471
  }) {
1469
- const [o, i] = A(!1), [s, l] = A(""), p = j(null), d = j(null), h = j(null), g = Tt(), [c, u] = A({ top: 0, left: 0, width: yt }), m = de(
1470
- () => ba(e, t, n),
1472
+ const [o, i] = S(!1), [s, l] = S(""), p = V(null), u = V(null), h = V(null), f = at(), [c, g] = S({ top: 0, left: 0, width: Ct }), x = se(
1473
+ () => ya(e, t, n),
1471
1474
  [e, t, n]
1472
- ), v = de(() => {
1473
- const x = s.trim().toLowerCase();
1474
- return x ? e.filter((w) => w.label.toLowerCase().includes(x) || w.id.toLowerCase().includes(x)) : e;
1475
- }, [e, s]), N = T(() => {
1476
- const x = p.current;
1477
- if (!x) return;
1478
- const w = x.getBoundingClientRect(), M = yt;
1479
- let y = w.right - M;
1480
- y + M > window.innerWidth - 12 && (y = window.innerWidth - M - 12), y = Math.max(12, y);
1481
- let S = w.bottom + 8;
1482
- S + kt > window.innerHeight - 12 && (S = Math.max(12, w.top - kt - 8)), u({ top: S, left: y, width: M });
1475
+ ), y = se(() => {
1476
+ const m = s.trim().toLowerCase();
1477
+ return m ? e.filter((v) => v.label.toLowerCase().includes(m) || v.id.toLowerCase().includes(m)) : e;
1478
+ }, [e, s]), k = $(() => {
1479
+ const m = p.current;
1480
+ if (!m) return;
1481
+ const v = m.getBoundingClientRect(), N = Ct;
1482
+ let w = v.right - N;
1483
+ w + N > window.innerWidth - 12 && (w = window.innerWidth - N - 12), w = Math.max(12, w);
1484
+ let A = v.bottom + 8;
1485
+ A + Mt > window.innerHeight - 12 && (A = Math.max(12, v.top - Mt - 8)), g({ top: A, left: w, width: N });
1483
1486
  }, []);
1484
- if (U(() => {
1485
- var M;
1487
+ if (W(() => {
1488
+ var N;
1486
1489
  if (!o) return;
1487
- N(), (M = h.current) == null || M.focus();
1488
- const x = (y) => {
1489
- var k, R;
1490
- const S = y.target;
1491
- (k = p.current) != null && k.contains(S) || (R = d.current) != null && R.contains(S) || i(!1);
1492
- }, w = (y) => {
1493
- y.key === "Escape" && i(!1);
1490
+ k(), (N = h.current) == null || N.focus();
1491
+ const m = (w) => {
1492
+ var F, C;
1493
+ const A = w.target;
1494
+ (F = p.current) != null && F.contains(A) || (C = u.current) != null && C.contains(A) || i(!1);
1495
+ }, v = (w) => {
1496
+ w.key === "Escape" && i(!1);
1494
1497
  };
1495
- return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", w), window.addEventListener("resize", N), window.addEventListener("scroll", N, !0), () => {
1496
- window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", w), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0);
1498
+ return window.addEventListener("mousedown", m, !0), window.addEventListener("keydown", v), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
1499
+ window.removeEventListener("mousedown", m, !0), window.removeEventListener("keydown", v), window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
1497
1500
  };
1498
- }, [o, N]), e.length === 0) return null;
1499
- const E = o ? Oe(
1501
+ }, [o, k]), e.length === 0) return null;
1502
+ const E = o ? Le(
1500
1503
  /* @__PURE__ */ a(
1501
1504
  "div",
1502
1505
  {
1503
1506
  className: "pa-root pa-root--toolbar-portal pa-text-styles-portal",
1504
1507
  "data-pixelagent-picker-portal": !0,
1505
- ...ya(),
1506
- children: /* @__PURE__ */ f(
1508
+ ...Ca(),
1509
+ children: /* @__PURE__ */ d(
1507
1510
  "div",
1508
1511
  {
1509
- ref: d,
1510
- id: g,
1512
+ ref: u,
1513
+ id: f,
1511
1514
  role: "dialog",
1512
1515
  "aria-label": "Text styles",
1513
1516
  className: "pa-text-styles",
1514
1517
  style: { top: c.top, left: c.left, width: c.width },
1515
1518
  children: [
1516
- /* @__PURE__ */ f("header", { className: "pa-text-styles-header", children: [
1519
+ /* @__PURE__ */ d("header", { className: "pa-text-styles-header", children: [
1517
1520
  /* @__PURE__ */ a("span", { className: "pa-text-styles-title", children: "Text styles" }),
1518
1521
  /* @__PURE__ */ a(
1519
1522
  "button",
@@ -1526,8 +1529,8 @@ function Na({
1526
1529
  }
1527
1530
  )
1528
1531
  ] }),
1529
- /* @__PURE__ */ f("div", { className: "pa-text-styles-search", children: [
1530
- /* @__PURE__ */ a(ka, { className: "pa-text-styles-search-icon" }),
1532
+ /* @__PURE__ */ d("div", { className: "pa-text-styles-search", children: [
1533
+ /* @__PURE__ */ a(Ma, { className: "pa-text-styles-search-icon" }),
1531
1534
  /* @__PURE__ */ a(
1532
1535
  "input",
1533
1536
  {
@@ -1537,30 +1540,30 @@ function Na({
1537
1540
  placeholder: "Search",
1538
1541
  value: s,
1539
1542
  spellCheck: !1,
1540
- onChange: (x) => l(x.target.value)
1543
+ onChange: (m) => l(m.target.value)
1541
1544
  }
1542
1545
  )
1543
1546
  ] }),
1544
- /* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Text styles", children: v.length === 0 ? /* @__PURE__ */ a("p", { className: "pa-text-styles-empty", children: "No matching styles" }) : v.map((x) => /* @__PURE__ */ f(
1547
+ /* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Text styles", children: y.length === 0 ? /* @__PURE__ */ a("p", { className: "pa-text-styles-empty", children: "No matching styles" }) : y.map((m) => /* @__PURE__ */ d(
1545
1548
  "button",
1546
1549
  {
1547
1550
  type: "button",
1548
1551
  role: "option",
1549
- "aria-selected": (m == null ? void 0 : m.id) === x.id,
1550
- className: `pa-text-styles-row ${(m == null ? void 0 : m.id) === x.id ? "pa-text-styles-row--active" : ""}`,
1552
+ "aria-selected": (x == null ? void 0 : x.id) === m.id,
1553
+ className: `pa-text-styles-row ${(x == null ? void 0 : x.id) === m.id ? "pa-text-styles-row--active" : ""}`,
1551
1554
  onClick: () => {
1552
- r(x), i(!1);
1555
+ r(m), i(!1);
1553
1556
  },
1554
1557
  children: [
1555
1558
  /* @__PURE__ */ a("span", { className: "pa-text-styles-specimen", "aria-hidden": "true", children: "Ag" }),
1556
- /* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", children: x.label }),
1557
- /* @__PURE__ */ f("span", { className: "pa-text-styles-row-metrics", children: [
1559
+ /* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", children: m.label }),
1560
+ /* @__PURE__ */ d("span", { className: "pa-text-styles-row-metrics", children: [
1558
1561
  "· ",
1559
- xa(x)
1562
+ wa(m)
1560
1563
  ] })
1561
1564
  ]
1562
1565
  },
1563
- x.id
1566
+ m.id
1564
1567
  )) })
1565
1568
  ]
1566
1569
  }
@@ -1569,7 +1572,7 @@ function Na({
1569
1572
  ),
1570
1573
  document.body
1571
1574
  ) : null;
1572
- return /* @__PURE__ */ f(J, { children: [
1575
+ return /* @__PURE__ */ d(J, { children: [
1573
1576
  /* @__PURE__ */ a(
1574
1577
  "button",
1575
1578
  {
@@ -1579,18 +1582,222 @@ function Na({
1579
1582
  "aria-label": "Text styles",
1580
1583
  "aria-haspopup": "dialog",
1581
1584
  "aria-expanded": o,
1582
- "aria-controls": o ? g : void 0,
1585
+ "aria-controls": o ? f : void 0,
1583
1586
  title: "Text styles",
1584
- onClick: (x) => {
1585
- x.stopPropagation(), o || N(), i((w) => !w);
1587
+ onClick: (m) => {
1588
+ m.stopPropagation(), o || k(), i((v) => !v);
1589
+ },
1590
+ children: /* @__PURE__ */ a(pa, { className: "pa-edit-section-action-icon" })
1591
+ }
1592
+ ),
1593
+ E
1594
+ ] });
1595
+ }
1596
+ function za(e) {
1597
+ return e && e[0].toUpperCase() + e.slice(1);
1598
+ }
1599
+ function Sa(e) {
1600
+ return (e.replace(/^--/, "").replace(/^color-/, "") || e.replace(/^--/, "")).split(/[-_]/).filter(Boolean).map(za).join(" ");
1601
+ }
1602
+ function La(e) {
1603
+ const t = [];
1604
+ for (const [n, r] of Object.entries(e)) {
1605
+ const o = r.trim();
1606
+ !o || !Me(o) || t.push({
1607
+ id: n.replace(/^--/, ""),
1608
+ name: Sa(n),
1609
+ value: o,
1610
+ varName: n
1611
+ });
1612
+ }
1613
+ return t;
1614
+ }
1615
+ function $a(e, t) {
1616
+ const n = Me(t);
1617
+ if (!n) return null;
1618
+ const r = Be(n);
1619
+ return e.find((o) => {
1620
+ const i = Me(o.value);
1621
+ return i !== null && Be(i) === r;
1622
+ }) ?? null;
1623
+ }
1624
+ function Ea(e) {
1625
+ const t = /* @__PURE__ */ new Set(), n = (r) => {
1626
+ if (r)
1627
+ for (const o of Array.from(r)) {
1628
+ const i = o;
1629
+ if (i.style)
1630
+ for (let l = 0; l < i.style.length; l++) {
1631
+ const p = i.style[l];
1632
+ p.startsWith("--") && t.add(p);
1633
+ }
1634
+ const s = o.cssRules;
1635
+ s && n(s);
1636
+ }
1637
+ };
1638
+ for (const r of Array.from(e.styleSheets))
1639
+ try {
1640
+ n(r.cssRules);
1641
+ } catch {
1642
+ }
1643
+ return t;
1644
+ }
1645
+ function Pa() {
1646
+ if (typeof document > "u") return [];
1647
+ const e = Ea(document), t = getComputedStyle(document.documentElement), n = {};
1648
+ for (const r of e) {
1649
+ const o = t.getPropertyValue(r).trim();
1650
+ o && (n[r] = o);
1651
+ }
1652
+ return La(n);
1653
+ }
1654
+ const At = 300, zt = 360;
1655
+ function Ia() {
1656
+ if (typeof document > "u") return {};
1657
+ const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
1658
+ return t ? { "data-pa-chrome": t } : {};
1659
+ }
1660
+ function Ta({ className: e }) {
1661
+ return /* @__PURE__ */ d("svg", { className: e, width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [
1662
+ /* @__PURE__ */ a("circle", { cx: "7", cy: "7", r: "4.5" }),
1663
+ /* @__PURE__ */ a("line", { x1: "10.5", y1: "10.5", x2: "14", y2: "14", strokeLinecap: "round" })
1664
+ ] });
1665
+ }
1666
+ function Ra({ className: e }) {
1667
+ return /* @__PURE__ */ d("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", "aria-hidden": "true", children: [
1668
+ /* @__PURE__ */ a("circle", { cx: "6.4", cy: "6.4", r: "3.4" }),
1669
+ /* @__PURE__ */ a("circle", { cx: "9.8", cy: "9.8", r: "3.4" })
1670
+ ] });
1671
+ }
1672
+ function qe({ presets: e, value: t, onApply: n, title: r = "Color" }) {
1673
+ const [o, i] = S(!1), [s, l] = S(""), p = V(null), u = V(null), h = V(null), f = at(), [c, g] = S({ top: 0, left: 0, width: At }), x = se(() => $a(e, t), [e, t]), y = se(() => {
1674
+ const m = s.trim().toLowerCase();
1675
+ return m ? e.filter(
1676
+ (v) => v.name.toLowerCase().includes(m) || v.id.toLowerCase().includes(m) || v.value.toLowerCase().includes(m)
1677
+ ) : e;
1678
+ }, [e, s]), k = $(() => {
1679
+ const m = p.current;
1680
+ if (!m) return;
1681
+ const v = m.getBoundingClientRect(), N = At;
1682
+ let w = v.right - N;
1683
+ w + N > window.innerWidth - 12 && (w = window.innerWidth - N - 12), w = Math.max(12, w);
1684
+ let A = v.bottom + 8;
1685
+ A + zt > window.innerHeight - 12 && (A = Math.max(12, v.top - zt - 8)), g({ top: A, left: w, width: N });
1686
+ }, []);
1687
+ if (W(() => {
1688
+ var N;
1689
+ if (!o) return;
1690
+ k(), (N = h.current) == null || N.focus();
1691
+ const m = (w) => {
1692
+ var F, C;
1693
+ const A = w.target;
1694
+ (F = p.current) != null && F.contains(A) || (C = u.current) != null && C.contains(A) || i(!1);
1695
+ }, v = (w) => {
1696
+ w.key === "Escape" && i(!1);
1697
+ };
1698
+ return window.addEventListener("mousedown", m, !0), window.addEventListener("keydown", v), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
1699
+ window.removeEventListener("mousedown", m, !0), window.removeEventListener("keydown", v), window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
1700
+ };
1701
+ }, [o, k]), e.length === 0) return null;
1702
+ const E = o ? Le(
1703
+ /* @__PURE__ */ a(
1704
+ "div",
1705
+ {
1706
+ className: "pa-root pa-root--toolbar-portal pa-text-styles-portal",
1707
+ "data-pixelagent-picker-portal": !0,
1708
+ ...Ia(),
1709
+ children: /* @__PURE__ */ d(
1710
+ "div",
1711
+ {
1712
+ ref: u,
1713
+ id: f,
1714
+ role: "dialog",
1715
+ "aria-label": r,
1716
+ className: "pa-text-styles",
1717
+ style: { top: c.top, left: c.left, width: c.width },
1718
+ children: [
1719
+ /* @__PURE__ */ d("header", { className: "pa-text-styles-header", children: [
1720
+ /* @__PURE__ */ a("span", { className: "pa-text-styles-title", children: r }),
1721
+ /* @__PURE__ */ a(
1722
+ "button",
1723
+ {
1724
+ type: "button",
1725
+ className: "pa-text-styles-close",
1726
+ "aria-label": `Close ${r.toLowerCase()}`,
1727
+ onClick: () => i(!1),
1728
+ children: "×"
1729
+ }
1730
+ )
1731
+ ] }),
1732
+ /* @__PURE__ */ d("div", { className: "pa-text-styles-search", children: [
1733
+ /* @__PURE__ */ a(Ta, { className: "pa-text-styles-search-icon" }),
1734
+ /* @__PURE__ */ a(
1735
+ "input",
1736
+ {
1737
+ ref: h,
1738
+ type: "text",
1739
+ className: "pa-input pa-text-styles-search-input",
1740
+ placeholder: "Search",
1741
+ value: s,
1742
+ spellCheck: !1,
1743
+ onChange: (m) => l(m.target.value)
1744
+ }
1745
+ )
1746
+ ] }),
1747
+ /* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Color tokens", children: y.length === 0 ? /* @__PURE__ */ a("p", { className: "pa-text-styles-empty", children: "No matching colors" }) : y.map((m) => /* @__PURE__ */ d(
1748
+ "button",
1749
+ {
1750
+ type: "button",
1751
+ role: "option",
1752
+ "aria-selected": (x == null ? void 0 : x.id) === m.id,
1753
+ className: `pa-text-styles-row ${(x == null ? void 0 : x.id) === m.id ? "pa-text-styles-row--active" : ""}`,
1754
+ onClick: () => {
1755
+ n(m.value), i(!1);
1756
+ },
1757
+ children: [
1758
+ /* @__PURE__ */ a(
1759
+ "span",
1760
+ {
1761
+ className: "pa-color-presets-swatch",
1762
+ style: { backgroundColor: m.value },
1763
+ "aria-hidden": "true"
1764
+ }
1765
+ ),
1766
+ /* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", title: m.name, children: m.name }),
1767
+ /* @__PURE__ */ a("span", { className: "pa-text-styles-row-metrics", children: m.value })
1768
+ ]
1769
+ },
1770
+ m.id
1771
+ )) })
1772
+ ]
1773
+ }
1774
+ )
1775
+ }
1776
+ ),
1777
+ document.body
1778
+ ) : null;
1779
+ return /* @__PURE__ */ d(J, { children: [
1780
+ /* @__PURE__ */ a(
1781
+ "button",
1782
+ {
1783
+ ref: p,
1784
+ type: "button",
1785
+ className: "pa-edit-section-action",
1786
+ "aria-label": `${r} tokens`,
1787
+ "aria-haspopup": "dialog",
1788
+ "aria-expanded": o,
1789
+ "aria-controls": o ? f : void 0,
1790
+ title: "Color tokens",
1791
+ onClick: (m) => {
1792
+ m.stopPropagation(), o || k(), i((v) => !v);
1586
1793
  },
1587
- children: /* @__PURE__ */ a(sa, { className: "pa-edit-section-action-icon" })
1794
+ children: /* @__PURE__ */ a(Ra, { className: "pa-edit-section-action-icon" })
1588
1795
  }
1589
1796
  ),
1590
1797
  E
1591
1798
  ] });
1592
1799
  }
1593
- function Ca({
1800
+ function Oa({
1594
1801
  options: e,
1595
1802
  value: t,
1596
1803
  ariaLabel: n,
@@ -1610,7 +1817,7 @@ function Ca({
1610
1817
  o.value
1611
1818
  )) });
1612
1819
  }
1613
- function Ma({
1820
+ function Da({
1614
1821
  options: e,
1615
1822
  ariaLabel: t,
1616
1823
  onToggle: n
@@ -1629,33 +1836,33 @@ function Ma({
1629
1836
  r.id
1630
1837
  )) });
1631
1838
  }
1632
- function Zt(e) {
1839
+ function tn(e) {
1633
1840
  const t = parseInt(e.trim(), 10);
1634
1841
  return Number.isFinite(t) ? t >= 600 : e.trim() === "bold" || e.trim() === "bolder";
1635
1842
  }
1636
- function za(e) {
1637
- return Zt(e) ? "400" : "700";
1843
+ function Fa(e) {
1844
+ return tn(e) ? "400" : "700";
1638
1845
  }
1639
- function Qt(e) {
1846
+ function nn(e) {
1640
1847
  return e.trim() === "italic" || e.trim() === "oblique";
1641
1848
  }
1642
- function Aa(e) {
1643
- return Qt(e) ? "normal" : "italic";
1849
+ function Ba(e) {
1850
+ return nn(e) ? "normal" : "italic";
1644
1851
  }
1645
- function Nt(e, t) {
1852
+ function St(e, t) {
1646
1853
  return e.split(/\s+/).includes(t);
1647
1854
  }
1648
- function Ct(e, t) {
1855
+ function Lt(e, t) {
1649
1856
  const n = new Set(
1650
1857
  e.trim().split(/\s+/).filter((r) => r && r !== "none")
1651
1858
  );
1652
1859
  return n.has(t) ? n.delete(t) : n.add(t), n.size === 0 ? "none" : Array.from(n).join(" ");
1653
1860
  }
1654
- function Sa(e) {
1861
+ function _a(e) {
1655
1862
  const t = e.trim();
1656
1863
  return t === "center" || t === "right" || t === "justify" ? t : "left";
1657
1864
  }
1658
- const Mt = [
1865
+ const $t = [
1659
1866
  "none",
1660
1867
  "solid",
1661
1868
  "dashed",
@@ -1665,7 +1872,7 @@ const Mt = [
1665
1872
  "ridge",
1666
1873
  "inset",
1667
1874
  "outset"
1668
- ], zt = [
1875
+ ], Et = [
1669
1876
  "block",
1670
1877
  "inline",
1671
1878
  "inline-block",
@@ -1675,8 +1882,8 @@ const Mt = [
1675
1882
  "inline-grid",
1676
1883
  "none",
1677
1884
  "contents"
1678
- ], La = /* @__PURE__ */ new Set(["flex", "inline-flex", "grid", "inline-grid"]);
1679
- function $a({
1885
+ ], Ha = /* @__PURE__ */ new Set(["flex", "inline-flex", "grid", "inline-grid"]);
1886
+ function Va({
1680
1887
  selectedElement: e,
1681
1888
  values: t,
1682
1889
  onPropertyChange: n,
@@ -1686,34 +1893,34 @@ function $a({
1686
1893
  onTextChange: s,
1687
1894
  targetScope: l,
1688
1895
  onTargetScopeChange: p,
1689
- elementState: d,
1896
+ elementState: u,
1690
1897
  onElementStateChange: h,
1691
- instanceCount: g,
1898
+ instanceCount: f,
1692
1899
  scopeHint: c,
1693
- stateHint: u
1900
+ stateHint: g
1694
1901
  }) {
1695
- var ae, q;
1696
- const [m] = A(() => wa()), v = (b) => {
1697
- const B = { "font-size": b.fontSize };
1698
- b.lineHeight && (B["line-height"] = b.lineHeight), b.fontWeight && (B["font-weight"] = b.fontWeight), r(B);
1699
- }, N = t["font-weight"] ?? "", E = t["font-style"] ?? "normal", x = t["text-decoration"] ?? "none", w = Sa(t["text-align"] ?? "left"), M = ((ae = t.display) == null ? void 0 : ae.trim()) ?? "", y = !!M, S = La.has(M), k = [...zt];
1700
- M && !zt.includes(M) && k.push(M);
1701
- const R = ((q = t.gap) == null ? void 0 : q.trim()) ?? "", P = R === "normal" || R === "" ? "0px" : R, $ = t["border-style"] ?? "none", D = [...Mt];
1702
- $ && !Mt.includes($) && D.push($);
1703
- const X = tt(e), ue = de(
1704
- () => Hn(
1902
+ var q, le;
1903
+ const [x] = S(() => Na()), [y] = S(() => Pa()), k = (b) => {
1904
+ const Z = { "font-size": b.fontSize };
1905
+ b.lineHeight && (Z["line-height"] = b.lineHeight), b.fontWeight && (Z["font-weight"] = b.fontWeight), r(Z);
1906
+ }, E = t["font-weight"] ?? "", m = t["font-style"] ?? "normal", v = t["text-decoration"] ?? "none", N = _a(t["text-align"] ?? "left"), w = ((q = t.display) == null ? void 0 : q.trim()) ?? "", A = !!w, F = Ha.has(w), C = [...Et];
1907
+ w && !Et.includes(w) && C.push(w);
1908
+ const P = ((le = t.gap) == null ? void 0 : le.trim()) ?? "", I = P === "normal" || P === "" ? "0px" : P, R = t["border-style"] ?? "none", j = [...$t];
1909
+ R && !$t.includes(R) && j.push(R);
1910
+ const G = ot(e), re = se(
1911
+ () => Un(
1705
1912
  e,
1706
1913
  xe(e).kind,
1707
1914
  Ne(e)
1708
1915
  ),
1709
1916
  [e]
1710
- ), K = (b) => Vn(ue, b);
1711
- return /* @__PURE__ */ f("div", { className: "pa-edit-sections", children: [
1712
- /* @__PURE__ */ f(we, { title: "Targeting", defaultOpen: K("targeting"), children: [
1713
- /* @__PURE__ */ f("div", { className: "pa-edit-field-grid pa-edit-field-grid--2", children: [
1714
- /* @__PURE__ */ f("label", { className: "pa-edit-mini-field", children: [
1917
+ ), K = (b) => jn(re, b);
1918
+ return /* @__PURE__ */ d("div", { className: "pa-edit-sections", children: [
1919
+ /* @__PURE__ */ d(we, { title: "Targeting", defaultOpen: K("targeting"), children: [
1920
+ /* @__PURE__ */ d("div", { className: "pa-edit-field-grid pa-edit-field-grid--2", children: [
1921
+ /* @__PURE__ */ d("label", { className: "pa-edit-mini-field", children: [
1715
1922
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Scope" }),
1716
- /* @__PURE__ */ f(
1923
+ /* @__PURE__ */ d(
1717
1924
  "select",
1718
1925
  {
1719
1926
  className: "pa-select",
@@ -1721,22 +1928,22 @@ function $a({
1721
1928
  onChange: (b) => p(b.target.value),
1722
1929
  children: [
1723
1930
  /* @__PURE__ */ a("option", { value: "this-instance", children: "This instance" }),
1724
- /* @__PURE__ */ f("option", { value: "all-instances", disabled: g <= 1, children: [
1931
+ /* @__PURE__ */ d("option", { value: "all-instances", disabled: f <= 1, children: [
1725
1932
  "All (",
1726
- g,
1933
+ f,
1727
1934
  ")"
1728
1935
  ] })
1729
1936
  ]
1730
1937
  }
1731
1938
  )
1732
1939
  ] }),
1733
- /* @__PURE__ */ f("label", { className: "pa-edit-mini-field", children: [
1940
+ /* @__PURE__ */ d("label", { className: "pa-edit-mini-field", children: [
1734
1941
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "State" }),
1735
- /* @__PURE__ */ f(
1942
+ /* @__PURE__ */ d(
1736
1943
  "select",
1737
1944
  {
1738
1945
  className: "pa-select",
1739
- value: d,
1946
+ value: u,
1740
1947
  onChange: (b) => h(b.target.value),
1741
1948
  children: [
1742
1949
  /* @__PURE__ */ a("option", { value: "normal", children: "Normal" }),
@@ -1750,9 +1957,9 @@ function $a({
1750
1957
  ] })
1751
1958
  ] }),
1752
1959
  c ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: c }) : null,
1753
- u ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: u }) : null
1960
+ g ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: g }) : null
1754
1961
  ] }),
1755
- o !== "none" && /* @__PURE__ */ a(we, { title: "Content", defaultOpen: K("content"), children: /* @__PURE__ */ f("label", { className: "pa-edit-stack-field", children: [
1962
+ o !== "none" && /* @__PURE__ */ a(we, { title: "Content", defaultOpen: K("content"), children: /* @__PURE__ */ d("label", { className: "pa-edit-stack-field", children: [
1756
1963
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Text" }),
1757
1964
  /* @__PURE__ */ a(
1758
1965
  "textarea",
@@ -1765,108 +1972,108 @@ function $a({
1765
1972
  }
1766
1973
  )
1767
1974
  ] }) }),
1768
- /* @__PURE__ */ f(
1975
+ /* @__PURE__ */ d(
1769
1976
  we,
1770
1977
  {
1771
1978
  title: "Typography",
1772
1979
  defaultOpen: K("typography"),
1773
1980
  headerAction: /* @__PURE__ */ a(
1774
- Na,
1981
+ Aa,
1775
1982
  {
1776
- presets: m,
1983
+ presets: x,
1777
1984
  fontSize: t["font-size"] ?? "",
1778
1985
  lineHeight: t["line-height"] ?? "",
1779
- onApply: v
1986
+ onApply: k
1780
1987
  }
1781
1988
  ),
1782
1989
  children: [
1783
1990
  /* @__PURE__ */ a(
1784
- Jn,
1991
+ ea,
1785
1992
  {
1786
1993
  value: t["font-family"] ?? "",
1787
1994
  onChange: (b) => n("font-family", b)
1788
1995
  }
1789
1996
  ),
1790
- /* @__PURE__ */ f("div", { className: "pa-edit-field-block", children: [
1997
+ /* @__PURE__ */ d("div", { className: "pa-edit-field-block", children: [
1791
1998
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Style" }),
1792
1999
  /* @__PURE__ */ a(
1793
- Ma,
2000
+ Da,
1794
2001
  {
1795
2002
  ariaLabel: "Text style",
1796
2003
  options: [
1797
2004
  {
1798
2005
  id: "bold",
1799
2006
  title: "Bold",
1800
- pressed: Zt(N),
2007
+ pressed: tn(E),
1801
2008
  content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--bold", children: "B" })
1802
2009
  },
1803
2010
  {
1804
2011
  id: "italic",
1805
2012
  title: "Italic",
1806
- pressed: Qt(E),
2013
+ pressed: nn(m),
1807
2014
  content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--italic", children: "I" })
1808
2015
  },
1809
2016
  {
1810
2017
  id: "underline",
1811
2018
  title: "Underline",
1812
- pressed: Nt(x, "underline"),
2019
+ pressed: St(v, "underline"),
1813
2020
  content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--underline", children: "U" })
1814
2021
  },
1815
2022
  {
1816
2023
  id: "strikethrough",
1817
2024
  title: "Strikethrough",
1818
- pressed: Nt(x, "line-through"),
1819
- content: /* @__PURE__ */ a(la, { className: "pa-segmented-icon" })
2025
+ pressed: St(v, "line-through"),
2026
+ content: /* @__PURE__ */ a(da, { className: "pa-segmented-icon" })
1820
2027
  }
1821
2028
  ],
1822
2029
  onToggle: (b) => {
1823
- b === "bold" ? n("font-weight", za(N)) : b === "italic" ? n("font-style", Aa(E)) : b === "underline" ? n(
2030
+ b === "bold" ? n("font-weight", Fa(E)) : b === "italic" ? n("font-style", Ba(m)) : b === "underline" ? n(
1824
2031
  "text-decoration",
1825
- Ct(x, "underline")
2032
+ Lt(v, "underline")
1826
2033
  ) : b === "strikethrough" && n(
1827
2034
  "text-decoration",
1828
- Ct(x, "line-through")
2035
+ Lt(v, "line-through")
1829
2036
  );
1830
2037
  }
1831
2038
  }
1832
2039
  )
1833
2040
  ] }),
1834
- /* @__PURE__ */ f("div", { className: "pa-edit-field-block", children: [
2041
+ /* @__PURE__ */ d("div", { className: "pa-edit-field-block", children: [
1835
2042
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Align" }),
1836
2043
  /* @__PURE__ */ a(
1837
- Ca,
2044
+ Oa,
1838
2045
  {
1839
2046
  ariaLabel: "Text align",
1840
- value: w,
2047
+ value: N,
1841
2048
  onChange: (b) => n("text-align", b),
1842
2049
  options: [
1843
2050
  {
1844
2051
  value: "left",
1845
2052
  title: "Align left",
1846
- content: /* @__PURE__ */ a(aa, { className: "pa-segmented-icon" })
2053
+ content: /* @__PURE__ */ a(ia, { className: "pa-segmented-icon" })
1847
2054
  },
1848
2055
  {
1849
2056
  value: "center",
1850
2057
  title: "Align center",
1851
- content: /* @__PURE__ */ a(ra, { className: "pa-segmented-icon" })
2058
+ content: /* @__PURE__ */ a(sa, { className: "pa-segmented-icon" })
1852
2059
  },
1853
2060
  {
1854
2061
  value: "right",
1855
2062
  title: "Align right",
1856
- content: /* @__PURE__ */ a(oa, { className: "pa-segmented-icon" })
2063
+ content: /* @__PURE__ */ a(la, { className: "pa-segmented-icon" })
1857
2064
  },
1858
2065
  {
1859
2066
  value: "justify",
1860
2067
  title: "Justify",
1861
- content: /* @__PURE__ */ a(ia, { className: "pa-segmented-icon" })
2068
+ content: /* @__PURE__ */ a(ca, { className: "pa-segmented-icon" })
1862
2069
  }
1863
2070
  ]
1864
2071
  }
1865
2072
  )
1866
2073
  ] }),
1867
- /* @__PURE__ */ f("div", { className: "pa-edit-field-grid pa-edit-field-grid--2 pa-edit-size-row", children: [
2074
+ /* @__PURE__ */ d("div", { className: "pa-edit-field-grid pa-edit-field-grid--2 pa-edit-size-row", children: [
1868
2075
  /* @__PURE__ */ a(
1869
- le,
2076
+ pe,
1870
2077
  {
1871
2078
  compact: !0,
1872
2079
  property: "font-size",
@@ -1876,7 +2083,7 @@ function $a({
1876
2083
  }
1877
2084
  ),
1878
2085
  /* @__PURE__ */ a(
1879
- le,
2086
+ pe,
1880
2087
  {
1881
2088
  compact: !0,
1882
2089
  property: "line-height",
@@ -1887,20 +2094,29 @@ function $a({
1887
2094
  )
1888
2095
  ] }),
1889
2096
  /* @__PURE__ */ a(
1890
- Xe,
2097
+ Ke,
1891
2098
  {
1892
2099
  label: "Color",
1893
2100
  value: t.color ?? "",
1894
- onChange: (b) => n("color", b)
2101
+ onChange: (b) => n("color", b),
2102
+ labelAction: /* @__PURE__ */ a(
2103
+ qe,
2104
+ {
2105
+ title: "Text color",
2106
+ presets: y,
2107
+ value: t.color ?? "",
2108
+ onApply: (b) => n("color", b)
2109
+ }
2110
+ )
1895
2111
  }
1896
2112
  )
1897
2113
  ]
1898
2114
  }
1899
2115
  ),
1900
- /* @__PURE__ */ f(we, { title: "Layout", defaultOpen: K("layout"), children: [
1901
- /* @__PURE__ */ f("div", { className: "pa-edit-split-fields", children: [
2116
+ /* @__PURE__ */ d(we, { title: "Layout", defaultOpen: K("layout"), children: [
2117
+ /* @__PURE__ */ d("div", { className: "pa-edit-split-fields", children: [
1902
2118
  /* @__PURE__ */ a(
1903
- le,
2119
+ pe,
1904
2120
  {
1905
2121
  compact: !0,
1906
2122
  property: "width",
@@ -1910,7 +2126,7 @@ function $a({
1910
2126
  }
1911
2127
  ),
1912
2128
  /* @__PURE__ */ a(
1913
- le,
2129
+ pe,
1914
2130
  {
1915
2131
  compact: !0,
1916
2132
  property: "height",
@@ -1921,7 +2137,7 @@ function $a({
1921
2137
  )
1922
2138
  ] }),
1923
2139
  /* @__PURE__ */ a(
1924
- bt,
2140
+ yt,
1925
2141
  {
1926
2142
  property: "padding",
1927
2143
  label: "Padding",
@@ -1930,7 +2146,7 @@ function $a({
1930
2146
  }
1931
2147
  ),
1932
2148
  /* @__PURE__ */ a(
1933
- bt,
2149
+ yt,
1934
2150
  {
1935
2151
  property: "margin",
1936
2152
  label: "Margin",
@@ -1938,40 +2154,49 @@ function $a({
1938
2154
  onChange: (b) => n("margin", b)
1939
2155
  }
1940
2156
  ),
1941
- y && /* @__PURE__ */ f("label", { className: "pa-prop-row pa-prop-row--compact", children: [
2157
+ A && /* @__PURE__ */ d("label", { className: "pa-prop-row pa-prop-row--compact", children: [
1942
2158
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Display" }),
1943
2159
  /* @__PURE__ */ a(
1944
2160
  "select",
1945
2161
  {
1946
2162
  className: "pa-select",
1947
- value: M,
2163
+ value: w,
1948
2164
  onChange: (b) => n("display", b.target.value),
1949
- children: k.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
2165
+ children: C.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
1950
2166
  }
1951
2167
  )
1952
2168
  ] }),
1953
- S && /* @__PURE__ */ a(
1954
- le,
2169
+ F && /* @__PURE__ */ a(
2170
+ pe,
1955
2171
  {
1956
2172
  compact: !0,
1957
2173
  property: "gap",
1958
2174
  label: "Gap",
1959
- value: P,
2175
+ value: I,
1960
2176
  onChange: (b) => n("gap", b)
1961
2177
  }
1962
2178
  )
1963
2179
  ] }),
1964
- /* @__PURE__ */ f(we, { title: "Fill", defaultOpen: K("fill"), children: [
2180
+ /* @__PURE__ */ d(we, { title: "Fill", defaultOpen: K("fill"), children: [
1965
2181
  /* @__PURE__ */ a(
1966
- Xe,
2182
+ Ke,
1967
2183
  {
1968
2184
  label: "Background",
1969
2185
  value: t["background-color"] ?? "",
1970
- onChange: (b) => n("background-color", b)
2186
+ onChange: (b) => n("background-color", b),
2187
+ labelAction: /* @__PURE__ */ a(
2188
+ qe,
2189
+ {
2190
+ title: "Fill color",
2191
+ presets: y,
2192
+ value: t["background-color"] ?? "",
2193
+ onApply: (b) => n("background-color", b)
2194
+ }
2195
+ )
1971
2196
  }
1972
2197
  ),
1973
2198
  /* @__PURE__ */ a(
1974
- le,
2199
+ pe,
1975
2200
  {
1976
2201
  compact: !0,
1977
2202
  property: "opacity",
@@ -1981,29 +2206,38 @@ function $a({
1981
2206
  }
1982
2207
  )
1983
2208
  ] }),
1984
- /* @__PURE__ */ f(we, { title: "Border", defaultOpen: K("border"), children: [
2209
+ /* @__PURE__ */ d(we, { title: "Border", defaultOpen: K("border"), children: [
1985
2210
  /* @__PURE__ */ a(
1986
- Xe,
2211
+ Ke,
1987
2212
  {
1988
2213
  label: "Border color",
1989
2214
  value: t["border-color"] ?? "",
1990
- onChange: (b) => n("border-color", b)
2215
+ onChange: (b) => n("border-color", b),
2216
+ labelAction: /* @__PURE__ */ a(
2217
+ qe,
2218
+ {
2219
+ title: "Border color",
2220
+ presets: y,
2221
+ value: t["border-color"] ?? "",
2222
+ onApply: (b) => n("border-color", b)
2223
+ }
2224
+ )
1991
2225
  }
1992
2226
  ),
1993
- /* @__PURE__ */ f("label", { className: "pa-edit-stack-field", children: [
2227
+ /* @__PURE__ */ d("label", { className: "pa-edit-stack-field", children: [
1994
2228
  /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Style" }),
1995
2229
  /* @__PURE__ */ a(
1996
2230
  "select",
1997
2231
  {
1998
2232
  className: "pa-select",
1999
- value: $,
2233
+ value: R,
2000
2234
  onChange: (b) => n("border-style", b.target.value),
2001
- children: D.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
2235
+ children: j.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
2002
2236
  }
2003
2237
  )
2004
2238
  ] }),
2005
2239
  /* @__PURE__ */ a(
2006
- le,
2240
+ pe,
2007
2241
  {
2008
2242
  compact: !0,
2009
2243
  property: "border-width",
@@ -2013,7 +2247,7 @@ function $a({
2013
2247
  }
2014
2248
  ),
2015
2249
  /* @__PURE__ */ a(
2016
- le,
2250
+ pe,
2017
2251
  {
2018
2252
  compact: !0,
2019
2253
  property: "border-radius",
@@ -2023,9 +2257,9 @@ function $a({
2023
2257
  }
2024
2258
  )
2025
2259
  ] })
2026
- ] }, X);
2260
+ ] }, G);
2027
2261
  }
2028
- const Ea = 50, Ge = [
2262
+ const Wa = 50, Je = [
2029
2263
  "font-family",
2030
2264
  "font-size",
2031
2265
  "font-weight",
@@ -2047,181 +2281,181 @@ const Ea = 50, Ge = [
2047
2281
  "border-radius",
2048
2282
  "opacity"
2049
2283
  ];
2050
- function Pa(e, t, n) {
2284
+ function Ua(e, t, n) {
2051
2285
  var ge;
2052
- const r = j([]), o = j(/* @__PURE__ */ new Set()), i = j([]), s = j([]), l = j([]), p = j(
2286
+ const r = V([]), o = V(/* @__PURE__ */ new Set()), i = V([]), s = V([]), l = V([]), p = V(
2053
2287
  null
2054
- ), [d, h] = A({}), [g, c] = A({}), [u, m] = A("none"), [v, N] = A(""), [E, x] = A(""), [w, M] = A(() => /* @__PURE__ */ new Map()), [y, S] = A(!1), k = T(() => {
2055
- const z = Array.from(o.current), I = u;
2288
+ ), [u, h] = S({}), [f, c] = S({}), [g, x] = S("none"), [y, k] = S(""), [E, m] = S(""), [v, N] = S(() => /* @__PURE__ */ new Map()), [w, A] = S(!1), F = $(() => {
2289
+ const z = Array.from(o.current), T = g;
2056
2290
  return {
2057
- inline: Ue(z, [...Ge]),
2058
- text: I !== "none" ? z.map((F) => We(F, I)) : []
2291
+ inline: Ye(z, [...Je]),
2292
+ text: T !== "none" ? z.map((D) => je(D, T)) : []
2059
2293
  };
2060
- }, [u]), R = T(() => {
2061
- l.current.push(k()), l.current.length > Ea && l.current.shift(), S(l.current.length > 0);
2062
- }, [k]), P = T(
2294
+ }, [g]), C = $(() => {
2295
+ l.current.push(F()), l.current.length > Wa && l.current.shift(), A(l.current.length > 0);
2296
+ }, [F]), P = $(
2063
2297
  (z) => {
2064
- var Z;
2298
+ var Q;
2065
2299
  if (!e) return;
2066
- const I = Array.from(o.current);
2067
- Ae(i.current.filter((_) => I.includes(_.element)));
2068
- for (const _ of s.current)
2069
- I.includes(_.element) && Se(_);
2070
- const F = Re(e, t);
2071
- r.current = F, o.current = new Set(F);
2072
- const O = new Set(i.current.map((_) => _.element)), W = F.filter((_) => !O.has(_));
2073
- if (W.length > 0 && (i.current = [
2300
+ const T = Array.from(o.current);
2301
+ Se(i.current.filter((B) => T.includes(B.element)));
2302
+ for (const B of s.current)
2303
+ T.includes(B.element) && $e(B);
2304
+ const D = De(e, t);
2305
+ r.current = D, o.current = new Set(D);
2306
+ const O = new Set(i.current.map((B) => B.element)), U = D.filter((B) => !O.has(B));
2307
+ if (U.length > 0 && (i.current = [
2074
2308
  ...i.current,
2075
- ...Ue(W, [...Ge])
2076
- ], u !== "none")) {
2077
- const _ = u;
2309
+ ...Ye(U, [...Je])
2310
+ ], g !== "none")) {
2311
+ const B = g;
2078
2312
  s.current = [
2079
2313
  ...s.current,
2080
- ...W.map((H) => We(H, _))
2314
+ ...U.map((_) => je(_, B))
2081
2315
  ];
2082
2316
  }
2083
- Le(I), je(F, n);
2084
- const Y = e ? ((Z = w.get(e)) == null ? void 0 : Z.get(n)) ?? [] : [];
2317
+ Ee(T), Xe(D, n);
2318
+ const Y = e ? ((Q = v.get(e)) == null ? void 0 : Q.get(n)) ?? [] : [];
2085
2319
  if (z && Y.length > 0)
2086
- for (const _ of Y)
2087
- if (_.property === "textContent" || _.property === "value")
2088
- for (const H of F)
2089
- pt(H, _.property, _.newValue);
2320
+ for (const B of Y)
2321
+ if (B.property === "textContent" || B.property === "value")
2322
+ for (const _ of D)
2323
+ ft(_, B.property, B.newValue);
2090
2324
  else
2091
- for (const H of F)
2092
- H.style.setProperty(_.property, _.newValue);
2325
+ for (const _ of D)
2326
+ _.style.setProperty(B.property, B.newValue);
2093
2327
  },
2094
- [e, t, n, w, u]
2328
+ [e, t, n, v, g]
2095
2329
  );
2096
- U(() => {
2330
+ W(() => {
2097
2331
  if (!e) {
2098
- r.current = [], o.current = /* @__PURE__ */ new Set(), i.current = [], s.current = [], l.current = [], h({}), c({}), m("none"), N(""), x(""), M(/* @__PURE__ */ new Map()), S(!1);
2332
+ r.current = [], o.current = /* @__PURE__ */ new Set(), i.current = [], s.current = [], l.current = [], h({}), c({}), x("none"), k(""), m(""), N(/* @__PURE__ */ new Map()), A(!1);
2099
2333
  return;
2100
2334
  }
2101
- const z = Re(e, t);
2102
- r.current = z, o.current = new Set(z), i.current = Ue(z, [...Ge]), l.current = [], S(!1);
2103
- const I = Ne(e);
2104
- h(I), c(I);
2105
- const F = xe(e);
2106
- m(F.kind), N(F.value), x(F.value);
2107
- const O = F.kind;
2108
- return s.current = O !== "none" ? z.map((W) => We(W, O)) : [], je(z, n), () => Le(z);
2109
- }, [e]), U(() => {
2335
+ const z = De(e, t);
2336
+ r.current = z, o.current = new Set(z), i.current = Ye(z, [...Je]), l.current = [], A(!1);
2337
+ const T = Ne(e);
2338
+ h(T), c(T);
2339
+ const D = xe(e);
2340
+ x(D.kind), k(D.value), m(D.value);
2341
+ const O = D.kind;
2342
+ return s.current = O !== "none" ? z.map((U) => je(U, O)) : [], Xe(z, n), () => Ee(z);
2343
+ }, [e]), W(() => {
2110
2344
  e && P(!0);
2111
- }, [t]), U(() => {
2112
- var _;
2345
+ }, [t]), W(() => {
2346
+ var B;
2113
2347
  if (!e) return;
2114
- const z = Re(e, t);
2115
- r.current = z, Ae(
2116
- i.current.filter((H) => z.includes(H.element))
2348
+ const z = De(e, t);
2349
+ r.current = z, Se(
2350
+ i.current.filter((_) => z.includes(_.element))
2117
2351
  );
2118
- const I = Ne(e), F = n === "normal" ? {} : pn(e, n);
2119
- for (const [H, Q] of Object.entries(F))
2120
- for (const he of z) he.style.setProperty(H, Q);
2121
- const O = ((_ = w.get(e)) == null ? void 0 : _.get(n)) ?? [];
2122
- for (const H of O)
2123
- if (!(H.property === "textContent" || H.property === "value"))
2124
- for (const Q of z)
2125
- Q.style.setProperty(H.property, H.newValue);
2126
- const W = p.current, Y = W !== null && W.element === e && W.state !== n, Z = W !== null && W.element !== e && n !== "normal";
2127
- if (Y || Z) {
2128
- const H = { ...I, ...F };
2129
- for (const Q of O)
2130
- Q.property === "textContent" || Q.property === "value" || (H[Q.property] = Q.newValue);
2131
- h(H);
2352
+ const T = Ne(e), D = n === "normal" ? {} : fn(e, n);
2353
+ for (const [_, ee] of Object.entries(D))
2354
+ for (const he of z) he.style.setProperty(_, ee);
2355
+ const O = ((B = v.get(e)) == null ? void 0 : B.get(n)) ?? [];
2356
+ for (const _ of O)
2357
+ if (!(_.property === "textContent" || _.property === "value"))
2358
+ for (const ee of z)
2359
+ ee.style.setProperty(_.property, _.newValue);
2360
+ const U = p.current, Y = U !== null && U.element === e && U.state !== n, Q = U !== null && U.element !== e && n !== "normal";
2361
+ if (Y || Q) {
2362
+ const _ = { ...T, ...D };
2363
+ for (const ee of O)
2364
+ ee.property === "textContent" || ee.property === "value" || (_[ee.property] = ee.newValue);
2365
+ h(_);
2132
2366
  }
2133
- p.current = { element: e, state: n }, Le(Array.from(o.current)), je(z, n), o.current = new Set(z);
2367
+ p.current = { element: e, state: n }, Ee(Array.from(o.current)), Xe(z, n), o.current = new Set(z);
2134
2368
  }, [n, e, t]);
2135
- const $ = T(
2136
- (z, I, F) => {
2137
- e && M((O) => {
2138
- const W = new Map(O), Y = new Map(W.get(e) ?? /* @__PURE__ */ new Map()), _ = (Y.get(n) ?? []).filter((H) => H.property !== z);
2139
- return F === I ? _.length === 0 ? Y.delete(n) : Y.set(n, _) : Y.set(n, [..._, { property: z, oldValue: I, newValue: F }]), Y.size === 0 ? W.delete(e) : W.set(e, Y), W;
2369
+ const I = $(
2370
+ (z, T, D) => {
2371
+ e && N((O) => {
2372
+ const U = new Map(O), Y = new Map(U.get(e) ?? /* @__PURE__ */ new Map()), B = (Y.get(n) ?? []).filter((_) => _.property !== z);
2373
+ return D === T ? B.length === 0 ? Y.delete(n) : Y.set(n, B) : Y.set(n, [...B, { property: z, oldValue: T, newValue: D }]), Y.size === 0 ? U.delete(e) : U.set(e, Y), U;
2140
2374
  });
2141
2375
  },
2142
2376
  [e, n]
2143
- ), D = T(
2377
+ ), R = $(
2144
2378
  (z) => {
2145
2379
  if (!e) return;
2146
- const I = { ...z };
2147
- I["border-width"] !== void 0 && !("border-style" in I) && (d["border-style"] ?? "none") === "none" && jt(I["border-width"]) && (I["border-style"] = "solid"), R(), h((F) => ({ ...F, ...I }));
2148
- for (const [F, O] of Object.entries(I)) {
2149
- const W = g[F] ?? "";
2380
+ const T = { ...z };
2381
+ T["border-width"] !== void 0 && !("border-style" in T) && (u["border-style"] ?? "none") === "none" && Kt(T["border-width"]) && (T["border-style"] = "solid"), C(), h((D) => ({ ...D, ...T }));
2382
+ for (const [D, O] of Object.entries(T)) {
2383
+ const U = f[D] ?? "";
2150
2384
  for (const Y of r.current)
2151
- Y.style.setProperty(F, O), o.current.add(Y);
2152
- $(F, W, O);
2385
+ Y.style.setProperty(D, O), o.current.add(Y);
2386
+ I(D, U, O);
2153
2387
  }
2154
2388
  },
2155
- [e, g, d, R, $]
2156
- ), X = T(
2157
- (z, I) => {
2158
- D({ [z]: I });
2389
+ [e, f, u, C, I]
2390
+ ), j = $(
2391
+ (z, T) => {
2392
+ R({ [z]: T });
2159
2393
  },
2160
- [D]
2161
- ), ue = T(
2394
+ [R]
2395
+ ), G = $(
2162
2396
  (z) => {
2163
- if (!(!e || u === "none")) {
2164
- R(), N(z);
2165
- for (const I of r.current)
2166
- pt(I, u, z), o.current.add(I);
2167
- $(u, E, z);
2397
+ if (!(!e || g === "none")) {
2398
+ C(), k(z);
2399
+ for (const T of r.current)
2400
+ ft(T, g, z), o.current.add(T);
2401
+ I(g, E, z);
2168
2402
  }
2169
2403
  },
2170
- [e, u, E, R, $]
2171
- ), K = T(() => {
2404
+ [e, g, E, C, I]
2405
+ ), re = $(() => {
2172
2406
  const z = l.current.pop();
2173
2407
  if (z) {
2174
- Ae(z.inline);
2175
- for (const I of z.text) Se(I);
2176
- if (S(l.current.length > 0), e) {
2408
+ Se(z.inline);
2409
+ for (const T of z.text) $e(T);
2410
+ if (A(l.current.length > 0), e) {
2177
2411
  h(Ne(e));
2178
- const I = xe(e);
2179
- I.kind !== "none" && N(I.value);
2412
+ const T = xe(e);
2413
+ T.kind !== "none" && k(T.value);
2180
2414
  }
2181
2415
  }
2182
- }, [e]), ae = T(() => {
2183
- Ae(i.current);
2184
- for (const z of s.current) Se(z);
2185
- if (l.current = [], S(!1), M(/* @__PURE__ */ new Map()), e) {
2416
+ }, [e]), K = $(() => {
2417
+ Se(i.current);
2418
+ for (const z of s.current) $e(z);
2419
+ if (l.current = [], A(!1), N(/* @__PURE__ */ new Map()), e) {
2186
2420
  h(Ne(e));
2187
2421
  const z = xe(e);
2188
- N(z.value);
2422
+ k(z.value);
2189
2423
  }
2190
- }, [e]), q = T(() => {
2191
- Ae(i.current);
2192
- for (const z of s.current) Se(z);
2193
- }, []), b = T(() => {
2194
- if (q(), Le(Array.from(o.current)), l.current = [], S(!1), M(/* @__PURE__ */ new Map()), e) {
2424
+ }, [e]), q = $(() => {
2425
+ Se(i.current);
2426
+ for (const z of s.current) $e(z);
2427
+ }, []), le = $(() => {
2428
+ if (q(), Ee(Array.from(o.current)), l.current = [], A(!1), N(/* @__PURE__ */ new Map()), e) {
2195
2429
  h(Ne(e));
2196
2430
  const z = xe(e);
2197
- z.kind !== "none" && N(z.value);
2431
+ z.kind !== "none" && k(z.value);
2198
2432
  }
2199
- }, [q, e]), B = e ? ((ge = w.get(e)) == null ? void 0 : ge.get(n)) ?? [] : [];
2200
- let re = 0;
2201
- for (const z of w.values())
2202
- for (const I of z.values()) re += I.length;
2203
- const se = T(() => {
2204
- M(/* @__PURE__ */ new Map());
2433
+ }, [q, e]), b = e ? ((ge = v.get(e)) == null ? void 0 : ge.get(n)) ?? [] : [];
2434
+ let Z = 0;
2435
+ for (const z of v.values())
2436
+ for (const T of z.values()) Z += T.length;
2437
+ const ce = $(() => {
2438
+ N(/* @__PURE__ */ new Map());
2205
2439
  }, []);
2206
2440
  return {
2207
- values: d,
2208
- textKind: u,
2209
- textValue: v,
2210
- pendingChanges: B,
2211
- pendingByElement: w,
2212
- totalPendingCount: re,
2213
- clearAllPending: se,
2214
- canUndo: y,
2215
- updateProperty: X,
2216
- updateProperties: D,
2217
- updateText: ue,
2218
- undo: K,
2219
- reset: ae,
2220
- clearPreviews: b,
2441
+ values: u,
2442
+ textKind: g,
2443
+ textValue: y,
2444
+ pendingChanges: b,
2445
+ pendingByElement: v,
2446
+ totalPendingCount: Z,
2447
+ clearAllPending: ce,
2448
+ canUndo: w,
2449
+ updateProperty: j,
2450
+ updateProperties: R,
2451
+ updateText: G,
2452
+ undo: re,
2453
+ reset: K,
2454
+ clearPreviews: le,
2221
2455
  revertPreviews: q
2222
2456
  };
2223
2457
  }
2224
- function Ia({
2458
+ function ja({
2225
2459
  selectedElement: e,
2226
2460
  hoveredElement: t,
2227
2461
  onSelectElement: n,
@@ -2231,50 +2465,50 @@ function Ia({
2231
2465
  elementState: s,
2232
2466
  onElementStateChange: l,
2233
2467
  onApply: p,
2234
- applyStatus: d,
2468
+ applyStatus: u,
2235
2469
  isToolbarTarget: h,
2236
- onPreviewApi: g
2470
+ onPreviewApi: f
2237
2471
  }) {
2238
2472
  const {
2239
2473
  values: c,
2240
- textKind: u,
2241
- textValue: m,
2242
- pendingChanges: v,
2243
- pendingByElement: N,
2474
+ textKind: g,
2475
+ textValue: x,
2476
+ pendingChanges: y,
2477
+ pendingByElement: k,
2244
2478
  totalPendingCount: E,
2245
- clearAllPending: x,
2246
- canUndo: w,
2247
- updateProperty: M,
2248
- updateProperties: y,
2249
- updateText: S,
2250
- undo: k,
2251
- reset: R,
2479
+ clearAllPending: m,
2480
+ canUndo: v,
2481
+ updateProperty: N,
2482
+ updateProperties: w,
2483
+ updateText: A,
2484
+ undo: F,
2485
+ reset: C,
2252
2486
  clearPreviews: P,
2253
- revertPreviews: $
2254
- } = Pa(e, o, s), { elementRef: D, isDragging: X, style: ue, dragHandleProps: K } = at({
2487
+ revertPreviews: I
2488
+ } = Ua(e, o, s), { elementRef: R, isDragging: j, style: G, dragHandleProps: re } = st({
2255
2489
  computeDefaultPosition: (O) => ({
2256
2490
  x: window.innerWidth - O.width - 16,
2257
2491
  y: 16
2258
2492
  })
2259
2493
  });
2260
- U(() => (g == null || g({ clearPreviews: P, revertPreviews: $ }), () => g == null ? void 0 : g(null)), [g, P, $]);
2261
- const ae = T(
2494
+ W(() => (f == null || f({ clearPreviews: P, revertPreviews: I }), () => f == null ? void 0 : f(null)), [f, P, I]);
2495
+ const K = $(
2262
2496
  (O) => {
2263
2497
  if (h(O.target)) return;
2264
2498
  const Y = document.elementsFromPoint(O.clientX, O.clientY).find(
2265
- (Z) => Z instanceof Element && !Z.closest(
2499
+ (Q) => Q instanceof Element && !Q.closest(
2266
2500
  "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
2267
2501
  )
2268
2502
  );
2269
2503
  r(Y ?? null);
2270
2504
  },
2271
2505
  [h, r]
2272
- ), q = T(
2506
+ ), q = $(
2273
2507
  (O) => {
2274
2508
  if (h(O.target)) return;
2275
2509
  O.preventDefault(), O.stopPropagation();
2276
2510
  const Y = document.elementsFromPoint(O.clientX, O.clientY).find(
2277
- (Z) => Z instanceof Element && !Z.closest(
2511
+ (Q) => Q instanceof Element && !Q.closest(
2278
2512
  "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
2279
2513
  )
2280
2514
  );
@@ -2282,32 +2516,32 @@ function Ia({
2282
2516
  },
2283
2517
  [h, n]
2284
2518
  );
2285
- U(() => (document.addEventListener("mousemove", ae, !0), document.addEventListener("click", q, !0), () => {
2286
- document.removeEventListener("mousemove", ae, !0), document.removeEventListener("click", q, !0);
2287
- }), [ae, q]);
2288
- const b = async () => {
2519
+ W(() => (document.addEventListener("mousemove", K, !0), document.addEventListener("click", q, !0), () => {
2520
+ document.removeEventListener("mousemove", K, !0), document.removeEventListener("click", q, !0);
2521
+ }), [K, q]);
2522
+ const le = async () => {
2289
2523
  if (E === 0) return;
2290
- const O = await p(N);
2291
- O.applied && (x(), O.skipRevert || $());
2292
- }, B = e ? nt(e) : null, re = e ? Rt(e) : null, se = e ? Dt(e) : 0, ge = e ? Ot(e, "all-instances") : "", z = s !== "normal" && re === "tailwind" ? "Tailwind variant preview: matching hover:/focus:/… classes are applied without the prefix." : s !== "normal" ? "State preview uses focus/disabled simulation where possible." : null, I = se > 1 ? o === "all-instances" ? `Preview & Apply on ${se} elements (${ge}).` : `This instance only — ${se - 1} other on page.` : o === "all-instances" ? "Only one match — scope has no effect." : null, F = de(() => !e || o !== "all-instances" ? [] : Re(e, "all-instances"), [e, o]);
2293
- return /* @__PURE__ */ f(J, { children: [
2524
+ const O = await p(k);
2525
+ O.applied && (m(), O.skipRevert || I());
2526
+ }, b = e ? it(e) : null, Z = e ? Bt(e) : null, ce = e ? _t(e) : 0, ge = e ? Ht(e, "all-instances") : "", z = s !== "normal" && Z === "tailwind" ? "Tailwind variant preview: matching hover:/focus:/… classes are applied without the prefix." : s !== "normal" ? "State preview uses focus/disabled simulation where possible." : null, T = ce > 1 ? o === "all-instances" ? `Preview & Apply on ${ce} elements (${ge}).` : `This instance only — ${ce - 1} other on page.` : o === "all-instances" ? "Only one match — scope has no effect." : null, D = se(() => !e || o !== "all-instances" ? [] : De(e, "all-instances"), [e, o]);
2527
+ return /* @__PURE__ */ d(J, { children: [
2294
2528
  /* @__PURE__ */ a(
2295
- Vt,
2529
+ Yt,
2296
2530
  {
2297
2531
  element: o === "all-instances" ? null : t,
2298
2532
  selected: e,
2299
- multiSelected: F,
2533
+ multiSelected: D,
2300
2534
  primarySelected: e
2301
2535
  }
2302
2536
  ),
2303
2537
  /* @__PURE__ */ a(
2304
2538
  "div",
2305
2539
  {
2306
- ref: D,
2307
- className: `pa-edit-panel-float ${X ? "pa-edit-panel-float--dragging" : ""}`,
2308
- style: ue,
2309
- children: /* @__PURE__ */ a(Fe, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */ f("div", { className: "pa-edit-panel-inner", children: [
2310
- /* @__PURE__ */ f("div", { className: "pa-edit-panel-header", children: [
2540
+ ref: R,
2541
+ className: `pa-edit-panel-float ${j ? "pa-edit-panel-float--dragging" : ""}`,
2542
+ style: G,
2543
+ children: /* @__PURE__ */ a(_e, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */ d("div", { className: "pa-edit-panel-inner", children: [
2544
+ /* @__PURE__ */ d("div", { className: "pa-edit-panel-header", children: [
2311
2545
  /* @__PURE__ */ a(
2312
2546
  "button",
2313
2547
  {
@@ -2315,8 +2549,8 @@ function Ia({
2315
2549
  className: "pa-edit-panel-drag",
2316
2550
  "aria-label": "Drag edit panel",
2317
2551
  title: "Drag to move",
2318
- ...K,
2319
- children: /* @__PURE__ */ f("span", { className: "pa-edit-panel-grip", "aria-hidden": "true", children: [
2552
+ ...re,
2553
+ children: /* @__PURE__ */ d("span", { className: "pa-edit-panel-grip", "aria-hidden": "true", children: [
2320
2554
  /* @__PURE__ */ a("span", {}),
2321
2555
  /* @__PURE__ */ a("span", {}),
2322
2556
  /* @__PURE__ */ a("span", {}),
@@ -2328,79 +2562,79 @@ function Ia({
2328
2562
  ),
2329
2563
  /* @__PURE__ */ a("h3", { className: "pa-edit-title", children: "Edit" })
2330
2564
  ] }),
2331
- e ? /* @__PURE__ */ f(J, { children: [
2332
- /* @__PURE__ */ f("div", { className: "pa-edit-meta", children: [
2565
+ e ? /* @__PURE__ */ d(J, { children: [
2566
+ /* @__PURE__ */ d("div", { className: "pa-edit-meta", children: [
2333
2567
  /* @__PURE__ */ a(
2334
2568
  "code",
2335
2569
  {
2336
2570
  className: "pa-edit-meta-label",
2337
- title: `This instance: ${tt(e)}
2571
+ title: `This instance: ${ot(e)}
2338
2572
  All instances: ${ge}`,
2339
- children: et(e)
2573
+ children: rt(e)
2340
2574
  }
2341
2575
  ),
2342
- ((B == null ? void 0 : B.sourceFile) || re) && /* @__PURE__ */ f("span", { className: "pa-edit-source", children: [
2343
- (B == null ? void 0 : B.sourceFile) && /* @__PURE__ */ f(J, { children: [
2344
- B.sourceFile,
2345
- B.lineNumber ? `:${B.lineNumber}` : ""
2576
+ ((b == null ? void 0 : b.sourceFile) || Z) && /* @__PURE__ */ d("span", { className: "pa-edit-source", children: [
2577
+ (b == null ? void 0 : b.sourceFile) && /* @__PURE__ */ d(J, { children: [
2578
+ b.sourceFile,
2579
+ b.lineNumber ? `:${b.lineNumber}` : ""
2346
2580
  ] }),
2347
- B != null && B.sourceFile && re ? " · " : "",
2348
- re ?? ""
2581
+ b != null && b.sourceFile && Z ? " · " : "",
2582
+ Z ?? ""
2349
2583
  ] })
2350
2584
  ] }),
2351
2585
  /* @__PURE__ */ a("div", { className: "pa-edit-panel-scroll", children: /* @__PURE__ */ a(
2352
- $a,
2586
+ Va,
2353
2587
  {
2354
2588
  selectedElement: e,
2355
2589
  values: c,
2356
- onPropertyChange: M,
2357
- onApplyPreset: y,
2358
- textKind: u,
2359
- textValue: m,
2360
- onTextChange: S,
2590
+ onPropertyChange: N,
2591
+ onApplyPreset: w,
2592
+ textKind: g,
2593
+ textValue: x,
2594
+ onTextChange: A,
2361
2595
  targetScope: o,
2362
2596
  onTargetScopeChange: i,
2363
2597
  elementState: s,
2364
2598
  onElementStateChange: l,
2365
- instanceCount: se,
2366
- scopeHint: I,
2599
+ instanceCount: ce,
2600
+ scopeHint: T,
2367
2601
  stateHint: z
2368
2602
  }
2369
2603
  ) }),
2370
- /* @__PURE__ */ f("div", { className: "pa-edit-panel-sticky", children: [
2371
- /* @__PURE__ */ f("div", { className: "pa-edit-actions", children: [
2372
- /* @__PURE__ */ a(G, { variant: "regular", onClick: k, disabled: !w, children: /* @__PURE__ */ f("span", { className: "pa-glass-btn-inner", children: [
2373
- /* @__PURE__ */ a(Sn, { className: "pa-glass-btn-icon" }),
2604
+ /* @__PURE__ */ d("div", { className: "pa-edit-panel-sticky", children: [
2605
+ /* @__PURE__ */ d("div", { className: "pa-edit-actions", children: [
2606
+ /* @__PURE__ */ a(X, { variant: "regular", onClick: F, disabled: !v, children: /* @__PURE__ */ d("span", { className: "pa-glass-btn-inner", children: [
2607
+ /* @__PURE__ */ a(En, { className: "pa-glass-btn-icon" }),
2374
2608
  /* @__PURE__ */ a("span", { children: "Undo" })
2375
2609
  ] }) }),
2376
2610
  /* @__PURE__ */ a(
2377
- G,
2611
+ X,
2378
2612
  {
2379
2613
  variant: "regular",
2380
- onClick: R,
2381
- disabled: v.length === 0,
2382
- children: /* @__PURE__ */ f("span", { className: "pa-glass-btn-inner", children: [
2383
- /* @__PURE__ */ a(Ln, { className: "pa-glass-btn-icon" }),
2614
+ onClick: C,
2615
+ disabled: y.length === 0,
2616
+ children: /* @__PURE__ */ d("span", { className: "pa-glass-btn-inner", children: [
2617
+ /* @__PURE__ */ a(Pn, { className: "pa-glass-btn-icon" }),
2384
2618
  /* @__PURE__ */ a("span", { children: "Reset" })
2385
2619
  ] })
2386
2620
  }
2387
2621
  )
2388
2622
  ] }),
2389
- /* @__PURE__ */ f("div", { className: "pa-edit-footer", children: [
2623
+ /* @__PURE__ */ d("div", { className: "pa-edit-footer", children: [
2390
2624
  /* @__PURE__ */ a(
2391
2625
  "span",
2392
2626
  {
2393
- className: d ? /fail/i.test(d) ? "pa-change-count pa-change-count--error" : "pa-change-count pa-change-count--success" : "pa-change-count",
2394
- children: d ?? `${E} pending change${E !== 1 ? "s" : ""}`
2627
+ className: u ? /fail/i.test(u) ? "pa-change-count pa-change-count--error" : "pa-change-count pa-change-count--success" : "pa-change-count",
2628
+ children: u ?? `${E} pending change${E !== 1 ? "s" : ""}`
2395
2629
  }
2396
2630
  ),
2397
2631
  /* @__PURE__ */ a(
2398
- G,
2632
+ X,
2399
2633
  {
2400
2634
  variant: "glass-primary",
2401
- onClick: b,
2635
+ onClick: le,
2402
2636
  disabled: E === 0,
2403
- title: B != null && B.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
2637
+ title: b != null && b.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
2404
2638
  children: "Apply"
2405
2639
  }
2406
2640
  )
@@ -2412,7 +2646,7 @@ All instances: ${ge}`,
2412
2646
  )
2413
2647
  ] });
2414
2648
  }
2415
- async function Ta(e, t = {}) {
2649
+ async function Ya(e, t = {}) {
2416
2650
  if (t.onApply)
2417
2651
  try {
2418
2652
  const r = await t.onApply(e);
@@ -2432,11 +2666,11 @@ async function Ta(e, t = {}) {
2432
2666
  } catch (r) {
2433
2667
  return { mode: "error", message: r instanceof Error ? r.message : String(r) };
2434
2668
  }
2435
- return await Ft(JSON.stringify(e, null, 2)), { mode: "clipboard" };
2669
+ return await Vt(JSON.stringify(e, null, 2)), { mode: "clipboard" };
2436
2670
  }
2437
- function Ra(e) {
2438
- const [t, n] = A(null);
2439
- return U(() => {
2671
+ function Xa(e) {
2672
+ const [t, n] = S(null);
2673
+ return W(() => {
2440
2674
  if (!e) {
2441
2675
  n(null);
2442
2676
  return;
@@ -2449,8 +2683,8 @@ function Ra(e) {
2449
2683
  };
2450
2684
  }, [e]), t;
2451
2685
  }
2452
- const pe = 8, ne = 8, Da = 12, Oa = 300, Fa = 280;
2453
- function Ke(e, t, n, r) {
2686
+ const ue = 8, ae = 8, Ga = 12, Ka = 300, qa = 280;
2687
+ function Ze(e, t, n, r) {
2454
2688
  return {
2455
2689
  top: e,
2456
2690
  left: t,
@@ -2460,10 +2694,10 @@ function Ke(e, t, n, r) {
2460
2694
  height: r
2461
2695
  };
2462
2696
  }
2463
- function Qe(e, t) {
2697
+ function nt(e, t) {
2464
2698
  return e.left < t.right && e.right > t.left && e.top < t.bottom && e.bottom > t.top;
2465
2699
  }
2466
- function Ba(e, t) {
2700
+ function Ja(e, t) {
2467
2701
  return {
2468
2702
  top: e.top - t,
2469
2703
  left: e.left - t,
@@ -2473,88 +2707,88 @@ function Ba(e, t) {
2473
2707
  height: e.height + t * 2
2474
2708
  };
2475
2709
  }
2476
- function _a() {
2710
+ function Za() {
2477
2711
  if (typeof document > "u") return null;
2478
2712
  const e = document.querySelector(
2479
2713
  "[data-pixelagent-toolbar-portal] .pa-toolbar-float"
2480
2714
  );
2481
- return e ? Ba(e.getBoundingClientRect(), Da) : null;
2715
+ return e ? Ja(e.getBoundingClientRect(), Ga) : null;
2482
2716
  }
2483
- function qe(e, t) {
2717
+ function Qe(e, t) {
2484
2718
  return Math.min(
2485
- Math.max(pe, e),
2486
- window.innerWidth - t - pe
2719
+ Math.max(ue, e),
2720
+ window.innerWidth - t - ue
2487
2721
  );
2488
2722
  }
2489
- function Ie(e, t) {
2723
+ function Re(e, t) {
2490
2724
  return Math.min(
2491
- Math.max(pe, e),
2492
- window.innerHeight - t - pe
2725
+ Math.max(ue, e),
2726
+ window.innerHeight - t - ue
2493
2727
  );
2494
2728
  }
2495
- function Ha(e) {
2496
- return e.top >= pe && e.left >= pe && e.right <= window.innerWidth - pe && e.bottom <= window.innerHeight - pe;
2729
+ function Qa(e) {
2730
+ return e.top >= ue && e.left >= ue && e.right <= window.innerWidth - ue && e.bottom <= window.innerHeight - ue;
2497
2731
  }
2498
- function Va(e, t) {
2499
- return t && Qe(e, t) ? !1 : Ha(e);
2732
+ function er(e, t) {
2733
+ return t && nt(e, t) ? !1 : Qa(e);
2500
2734
  }
2501
- function Wa(e, t = Oa, n = Fa) {
2502
- const r = _a(), i = e.top > window.innerHeight * 0.45 ? [
2503
- { placement: "above", top: e.top - n - ne, left: e.left },
2504
- { placement: "below", top: e.bottom + ne, left: e.left },
2505
- { placement: "right", top: e.top, left: e.right + ne },
2506
- { placement: "left", top: e.top, left: e.left - t - ne }
2735
+ function tr(e, t = Ka, n = qa) {
2736
+ const r = Za(), i = e.top > window.innerHeight * 0.45 ? [
2737
+ { placement: "above", top: e.top - n - ae, left: e.left },
2738
+ { placement: "below", top: e.bottom + ae, left: e.left },
2739
+ { placement: "right", top: e.top, left: e.right + ae },
2740
+ { placement: "left", top: e.top, left: e.left - t - ae }
2507
2741
  ] : [
2508
- { placement: "below", top: e.bottom + ne, left: e.left },
2509
- { placement: "above", top: e.top - n - ne, left: e.left },
2510
- { placement: "right", top: e.top, left: e.right + ne },
2511
- { placement: "left", top: e.top, left: e.left - t - ne }
2742
+ { placement: "below", top: e.bottom + ae, left: e.left },
2743
+ { placement: "above", top: e.top - n - ae, left: e.left },
2744
+ { placement: "right", top: e.top, left: e.right + ae },
2745
+ { placement: "left", top: e.top, left: e.left - t - ae }
2512
2746
  ];
2513
- for (const { top: p, left: d } of i) {
2514
- const h = Ke(
2515
- Ie(p, n),
2516
- qe(d, t),
2747
+ for (const { top: p, left: u } of i) {
2748
+ const h = Ze(
2749
+ Re(p, n),
2750
+ Qe(u, t),
2517
2751
  t,
2518
2752
  n
2519
2753
  );
2520
- if (Va(h, r))
2754
+ if (er(h, r))
2521
2755
  return { top: h.top, left: h.left };
2522
2756
  }
2523
- let s = Ie(e.top - n - ne, n), l = qe(e.left, t);
2757
+ let s = Re(e.top - n - ae, n), l = Qe(e.left, t);
2524
2758
  if (r) {
2525
- let p = Ke(s, l, t, n);
2526
- Qe(p, r) && (s = Ie(r.top - n - ne, n), p = Ke(s, l, t, n)), Qe(p, r) && (s = Ie(e.bottom + ne, n), l = qe(
2527
- Math.min(e.left, r.left - t - ne),
2759
+ let p = Ze(s, l, t, n);
2760
+ nt(p, r) && (s = Re(r.top - n - ae, n), p = Ze(s, l, t, n)), nt(p, r) && (s = Re(e.bottom + ae, n), l = Qe(
2761
+ Math.min(e.left, r.left - t - ae),
2528
2762
  t
2529
2763
  ));
2530
2764
  }
2531
2765
  return { top: s, left: l };
2532
2766
  }
2533
- function Ua({
2767
+ function nr({
2534
2768
  elements: e,
2535
2769
  areaBbox: t,
2536
2770
  onSubmit: n,
2537
2771
  onCancel: r
2538
2772
  }) {
2539
- const [o, i] = A(""), s = j(null), l = j(null), p = e[0] ?? null, d = t ? new DOMRect(t.x, t.y, t.width, t.height) : null, h = Ra(p), g = d ?? h, c = Bt(), u = p ? xe(p) : { kind: "none", value: "" }, m = u.kind !== "none" ? u.value : void 0;
2540
- if (U(() => {
2541
- var x;
2542
- (x = s.current) == null || x.focus();
2543
- }, [e]), U(() => {
2544
- const x = (w) => {
2545
- w.key === "Escape" && r();
2773
+ const [o, i] = S(""), s = V(null), l = V(null), p = e[0] ?? null, u = t ? new DOMRect(t.x, t.y, t.width, t.height) : null, h = Xa(p), f = u ?? h, c = Wt(), g = p ? xe(p) : { kind: "none", value: "" }, x = g.kind !== "none" ? g.value : void 0;
2774
+ if (W(() => {
2775
+ var m;
2776
+ (m = s.current) == null || m.focus();
2777
+ }, [e]), W(() => {
2778
+ const m = (v) => {
2779
+ v.key === "Escape" && r();
2546
2780
  };
2547
- return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
2548
- }, [r]), !g) return null;
2549
- const v = Wa(g), N = e.length > 1 ? `${e.length} selected` : p ? et(p) : "Area selection", E = (x) => {
2550
- o.trim() && n(o, x);
2781
+ return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
2782
+ }, [r]), !f) return null;
2783
+ const y = tr(f), k = e.length > 1 ? `${e.length} selected` : p ? rt(p) : "Area selection", E = (m) => {
2784
+ o.trim() && n(o, m);
2551
2785
  };
2552
2786
  return /* @__PURE__ */ a(
2553
- Fe,
2787
+ _e,
2554
2788
  {
2555
2789
  variant: "popover",
2556
- style: { top: v.top, left: v.left },
2557
- children: /* @__PURE__ */ f(
2790
+ style: { top: y.top, left: y.left },
2791
+ children: /* @__PURE__ */ d(
2558
2792
  "div",
2559
2793
  {
2560
2794
  ref: l,
@@ -2563,18 +2797,18 @@ function Ua({
2563
2797
  "aria-label": "Add annotation",
2564
2798
  className: "pa-popover-body",
2565
2799
  children: [
2566
- /* @__PURE__ */ a("div", { className: "pa-popover-header", children: /* @__PURE__ */ a("span", { className: "pa-popover-selector", children: N }) }),
2567
- (c || m) && /* @__PURE__ */ f("div", { className: "pa-popover-context", children: [
2568
- c && /* @__PURE__ */ f("p", { className: "pa-popover-context-line", children: [
2800
+ /* @__PURE__ */ a("div", { className: "pa-popover-header", children: /* @__PURE__ */ a("span", { className: "pa-popover-selector", children: k }) }),
2801
+ (c || x) && /* @__PURE__ */ d("div", { className: "pa-popover-context", children: [
2802
+ c && /* @__PURE__ */ d("p", { className: "pa-popover-context-line", children: [
2569
2803
  /* @__PURE__ */ a("span", { className: "pa-popover-context-label", children: "Selected" }),
2570
2804
  c
2571
2805
  ] }),
2572
- m && m !== c && /* @__PURE__ */ f("p", { className: "pa-popover-context-line", children: [
2806
+ x && x !== c && /* @__PURE__ */ d("p", { className: "pa-popover-context-line", children: [
2573
2807
  /* @__PURE__ */ a("span", { className: "pa-popover-context-label", children: "Element" }),
2574
- m
2808
+ x
2575
2809
  ] })
2576
2810
  ] }),
2577
- /* @__PURE__ */ f("label", { className: "pa-label", children: [
2811
+ /* @__PURE__ */ d("label", { className: "pa-label", children: [
2578
2812
  "Note",
2579
2813
  /* @__PURE__ */ a(
2580
2814
  "textarea",
@@ -2582,20 +2816,20 @@ function Ua({
2582
2816
  ref: s,
2583
2817
  className: "pa-textarea",
2584
2818
  value: o,
2585
- onChange: (x) => i(x.target.value),
2819
+ onChange: (m) => i(m.target.value),
2586
2820
  placeholder: "Describe the change...",
2587
2821
  rows: 3,
2588
- onKeyDown: (x) => {
2589
- x.key === "Enter" && (x.metaKey || x.ctrlKey) && (x.preventDefault(), E(x.shiftKey)), x.key === "Escape" && r();
2822
+ onKeyDown: (m) => {
2823
+ m.key === "Enter" && (m.metaKey || m.ctrlKey) && (m.preventDefault(), E(m.shiftKey)), m.key === "Escape" && r();
2590
2824
  }
2591
2825
  }
2592
2826
  )
2593
2827
  ] }),
2594
2828
  /* @__PURE__ */ a("p", { className: "pa-popover-hint", children: "⌘↵ Add · ⇧⌘↵ Add & next · Esc Cancel" }),
2595
- /* @__PURE__ */ f("div", { className: "pa-popover-actions", children: [
2596
- /* @__PURE__ */ a(G, { variant: "ghost", onClick: r, children: "Cancel" }),
2829
+ /* @__PURE__ */ d("div", { className: "pa-popover-actions", children: [
2830
+ /* @__PURE__ */ a(X, { variant: "ghost", onClick: r, children: "Cancel" }),
2597
2831
  /* @__PURE__ */ a(
2598
- G,
2832
+ X,
2599
2833
  {
2600
2834
  variant: "ghost",
2601
2835
  onClick: () => E(!0),
@@ -2604,7 +2838,7 @@ function Ua({
2604
2838
  }
2605
2839
  ),
2606
2840
  /* @__PURE__ */ a(
2607
- G,
2841
+ X,
2608
2842
  {
2609
2843
  variant: "glass-primary",
2610
2844
  onClick: () => E(!1),
@@ -2619,7 +2853,7 @@ function Ua({
2619
2853
  }
2620
2854
  );
2621
2855
  }
2622
- function ja({ area: e, isDragging: t }) {
2856
+ function ar({ area: e, isDragging: t }) {
2623
2857
  return !e || e.width < 2 || e.height < 2 ? null : /* @__PURE__ */ a(
2624
2858
  "div",
2625
2859
  {
@@ -2634,7 +2868,7 @@ function ja({ area: e, isDragging: t }) {
2634
2868
  }
2635
2869
  );
2636
2870
  }
2637
- function Ya(e) {
2871
+ function rr(e) {
2638
2872
  const { elements: t, note: n, areaBbox: r } = e, o = t[0];
2639
2873
  if (!o && r)
2640
2874
  return {
@@ -2653,7 +2887,7 @@ function Ya(e) {
2653
2887
  };
2654
2888
  if (!o)
2655
2889
  throw new Error("buildAnnotationEntry requires at least one element or areaBbox");
2656
- const i = o.getBoundingClientRect(), s = nt(o), l = Bt(), p = xe(o), d = p.kind !== "none" ? p.value : void 0, h = t.map((g) => tt(g));
2890
+ const i = o.getBoundingClientRect(), s = it(o), l = Wt(), p = xe(o), u = p.kind !== "none" ? p.value : void 0, h = t.map((f) => ot(f));
2657
2891
  return {
2658
2892
  id: crypto.randomUUID(),
2659
2893
  selector: h[0],
@@ -2667,17 +2901,17 @@ function Ya(e) {
2667
2901
  height: Math.round(i.height)
2668
2902
  },
2669
2903
  areaBbox: r,
2670
- domPath: fn(o),
2904
+ domPath: hn(o),
2671
2905
  selectedText: l,
2672
- elementText: d,
2906
+ elementText: u,
2673
2907
  sourceFile: s.sourceFile,
2674
2908
  lineNumber: s.lineNumber,
2675
- componentName: dn(o) ?? s.componentName,
2909
+ componentName: gn(o) ?? s.componentName,
2676
2910
  createdAt: Date.now()
2677
2911
  };
2678
2912
  }
2679
- function Xa(e) {
2680
- const t = _t(e);
2913
+ function or(e) {
2914
+ const t = Ut(e);
2681
2915
  if (t) return t.getBoundingClientRect();
2682
2916
  if (e.bbox) {
2683
2917
  const { x: n, y: r, width: o, height: i } = e.bbox;
@@ -2693,39 +2927,39 @@ function Xa(e) {
2693
2927
  }
2694
2928
  return null;
2695
2929
  }
2696
- function Ga(e) {
2930
+ function ir(e) {
2697
2931
  return `${Math.round(e.top)}:${Math.round(e.left)}:${Math.round(e.width)}:${Math.round(e.height)}`;
2698
2932
  }
2699
- const Ka = 20, qa = 96;
2700
- function Ja({
2933
+ const sr = 20, lr = 96;
2934
+ function cr({
2701
2935
  annotations: e,
2702
2936
  activeId: t,
2703
2937
  onActiveChange: n
2704
2938
  }) {
2705
- const [r, o] = A([]);
2706
- if (U(() => {
2939
+ const [r, o] = S([]);
2940
+ if (W(() => {
2707
2941
  if (e.length === 0) {
2708
2942
  o([]);
2709
2943
  return;
2710
2944
  }
2711
2945
  const l = () => {
2712
- const h = [], g = /* @__PURE__ */ new Map();
2713
- e.forEach((c, u) => {
2714
- const m = Xa(c);
2715
- if (!m) return;
2716
- const v = Ga(m), N = g.get(v) ?? 0;
2717
- g.set(v, N + 1), h.push({
2946
+ const h = [], f = /* @__PURE__ */ new Map();
2947
+ e.forEach((c, g) => {
2948
+ const x = or(c);
2949
+ if (!x) return;
2950
+ const y = ir(x), k = f.get(y) ?? 0;
2951
+ f.set(y, k + 1), h.push({
2718
2952
  id: c.id,
2719
- index: u + 1,
2720
- top: m.top + 6 - N * Ka,
2721
- left: m.right - 6,
2953
+ index: g + 1,
2954
+ top: x.top + 6 - k * sr,
2955
+ left: x.right - 6,
2722
2956
  note: c.note,
2723
- target: Ht(c).target,
2957
+ target: jt(c).target,
2724
2958
  rect: {
2725
- top: m.top,
2726
- left: m.left,
2727
- width: m.width,
2728
- height: m.height
2959
+ top: x.top,
2960
+ left: x.left,
2961
+ width: x.width,
2962
+ height: x.height
2729
2963
  }
2730
2964
  });
2731
2965
  }), o(h);
@@ -2733,20 +2967,20 @@ function Ja({
2733
2967
  l();
2734
2968
  const p = /* @__PURE__ */ new Set();
2735
2969
  for (const h of e) {
2736
- const g = _t(h);
2737
- g && p.add(g);
2970
+ const f = Ut(h);
2971
+ f && p.add(f);
2738
2972
  }
2739
- const d = Array.from(p).map((h) => {
2740
- const g = new ResizeObserver(l);
2741
- return g.observe(h), g;
2973
+ const u = Array.from(p).map((h) => {
2974
+ const f = new ResizeObserver(l);
2975
+ return f.observe(h), f;
2742
2976
  });
2743
2977
  return window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
2744
- for (const h of d) h.disconnect();
2978
+ for (const h of u) h.disconnect();
2745
2979
  window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
2746
2980
  };
2747
2981
  }, [e]), r.length === 0) return null;
2748
- const i = t ? r.find((l) => l.id === t) ?? null : null, s = i ? i.rect.top < qa : !1;
2749
- return /* @__PURE__ */ f(J, { children: [
2982
+ const i = t ? r.find((l) => l.id === t) ?? null : null, s = i ? i.rect.top < lr : !1;
2983
+ return /* @__PURE__ */ d(J, { children: [
2750
2984
  i && /* @__PURE__ */ a(
2751
2985
  "div",
2752
2986
  {
@@ -2774,7 +3008,7 @@ function Ja({
2774
3008
  },
2775
3009
  l.id
2776
3010
  )),
2777
- i && /* @__PURE__ */ f(
3011
+ i && /* @__PURE__ */ d(
2778
3012
  "div",
2779
3013
  {
2780
3014
  className: s ? "pa-annotation-preview pa-annotation-preview--below" : "pa-annotation-preview",
@@ -2791,24 +3025,24 @@ function Ja({
2791
3025
  )
2792
3026
  ] });
2793
3027
  }
2794
- const st = "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]";
2795
- function Te(e) {
2796
- return e instanceof Element ? !!e.closest(st) : !1;
3028
+ const pt = "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]";
3029
+ function Oe(e) {
3030
+ return e instanceof Element ? !!e.closest(pt) : !1;
2797
3031
  }
2798
- function At(e, t) {
3032
+ function Pt(e, t) {
2799
3033
  return document.elementsFromPoint(e, t).find(
2800
- (r) => r instanceof Element && !r.closest(st)
3034
+ (r) => r instanceof Element && !r.closest(pt)
2801
3035
  ) ?? null;
2802
3036
  }
2803
- function en(e) {
3037
+ function an(e) {
2804
3038
  return e ? e === "Copied all!" || e.startsWith("Copy failed") : !1;
2805
3039
  }
2806
- function tn({
3040
+ function rn({
2807
3041
  feedback: e,
2808
3042
  slotClassName: t,
2809
3043
  children: n
2810
3044
  }) {
2811
- return e && en(e) ? /* @__PURE__ */ a(
3045
+ return e && an(e) ? /* @__PURE__ */ a(
2812
3046
  "span",
2813
3047
  {
2814
3048
  className: `pa-status pa-copy-feedback-slot ${t}`,
@@ -2818,8 +3052,8 @@ function tn({
2818
3052
  }
2819
3053
  ) : /* @__PURE__ */ a(J, { children: n });
2820
3054
  }
2821
- function Za() {
2822
- return /* @__PURE__ */ f(
3055
+ function pr() {
3056
+ return /* @__PURE__ */ d(
2823
3057
  "svg",
2824
3058
  {
2825
3059
  width: "16",
@@ -2834,8 +3068,8 @@ function Za() {
2834
3068
  }
2835
3069
  );
2836
3070
  }
2837
- function Qa() {
2838
- return /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3071
+ function dr() {
3072
+ return /* @__PURE__ */ d("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2839
3073
  /* @__PURE__ */ a("circle", { cx: "8", cy: "8", r: "2.75", stroke: "currentColor", strokeWidth: "1.25" }),
2840
3074
  /* @__PURE__ */ a(
2841
3075
  "path",
@@ -2848,7 +3082,7 @@ function Qa() {
2848
3082
  )
2849
3083
  ] });
2850
3084
  }
2851
- function er() {
3085
+ function ur() {
2852
3086
  return /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a(
2853
3087
  "path",
2854
3088
  {
@@ -2859,8 +3093,8 @@ function er() {
2859
3093
  }
2860
3094
  ) });
2861
3095
  }
2862
- function tr() {
2863
- return /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3096
+ function fr() {
3097
+ return /* @__PURE__ */ d("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2864
3098
  /* @__PURE__ */ a(
2865
3099
  "path",
2866
3100
  {
@@ -2893,7 +3127,7 @@ function tr() {
2893
3127
  )
2894
3128
  ] });
2895
3129
  }
2896
- function nr({
3130
+ function gr({
2897
3131
  annotations: e,
2898
3132
  onClose: t,
2899
3133
  onCopyAll: n,
@@ -2903,35 +3137,35 @@ function nr({
2903
3137
  activeId: s,
2904
3138
  onActiveChange: l,
2905
3139
  copyStatus: p,
2906
- copiedEntryId: d,
3140
+ copiedEntryId: u,
2907
3141
  copyAllFrom: h
2908
3142
  }) {
2909
- const [g, c] = A(null), [u, m] = A(""), { elementRef: v, isDragging: N, style: E, dragHandleProps: x } = at({
2910
- computeDefaultPosition: (y) => ({
2911
- x: window.innerWidth - y.width - 16,
3143
+ const [f, c] = S(null), [g, x] = S(""), { elementRef: y, isDragging: k, style: E, dragHandleProps: m } = st({
3144
+ computeDefaultPosition: (w) => ({
3145
+ x: window.innerWidth - w.width - 16,
2912
3146
  y: 16
2913
3147
  })
2914
3148
  });
2915
- U(() => {
2916
- const y = (S) => {
2917
- S.key === "Escape" && t();
3149
+ W(() => {
3150
+ const w = (A) => {
3151
+ A.key === "Escape" && t();
2918
3152
  };
2919
- return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
3153
+ return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
2920
3154
  }, [t]);
2921
- const w = (y) => {
2922
- c(y.id), m(y.note);
2923
- }, M = (y) => {
2924
- u.trim() && (i(y, { note: u.trim() }), c(null));
3155
+ const v = (w) => {
3156
+ c(w.id), x(w.note);
3157
+ }, N = (w) => {
3158
+ g.trim() && (i(w, { note: g.trim() }), c(null));
2925
3159
  };
2926
3160
  return /* @__PURE__ */ a(
2927
3161
  "div",
2928
3162
  {
2929
- ref: v,
2930
- className: `pa-session-panel-float ${N ? "pa-session-panel-float--dragging" : ""}`,
3163
+ ref: y,
3164
+ className: `pa-session-panel-float ${k ? "pa-session-panel-float--dragging" : ""}`,
2931
3165
  style: E,
2932
- children: /* @__PURE__ */ f(Fe, { variant: "sheet", side: "right", children: [
2933
- /* @__PURE__ */ f("div", { className: "pa-session-header", children: [
2934
- /* @__PURE__ */ f("div", { className: "pa-session-header-main", children: [
3166
+ children: /* @__PURE__ */ d(_e, { variant: "sheet", side: "right", children: [
3167
+ /* @__PURE__ */ d("div", { className: "pa-session-header", children: [
3168
+ /* @__PURE__ */ d("div", { className: "pa-session-header-main", children: [
2935
3169
  /* @__PURE__ */ a(
2936
3170
  "button",
2937
3171
  {
@@ -2939,8 +3173,8 @@ function nr({
2939
3173
  className: "pa-session-drag",
2940
3174
  "aria-label": "Drag session panel",
2941
3175
  title: "Drag to move",
2942
- ...x,
2943
- children: /* @__PURE__ */ f("span", { className: "pa-session-grip", "aria-hidden": "true", children: [
3176
+ ...m,
3177
+ children: /* @__PURE__ */ d("span", { className: "pa-session-grip", "aria-hidden": "true", children: [
2944
3178
  /* @__PURE__ */ a("span", {}),
2945
3179
  /* @__PURE__ */ a("span", {}),
2946
3180
  /* @__PURE__ */ a("span", {}),
@@ -2950,21 +3184,21 @@ function nr({
2950
3184
  ] })
2951
3185
  }
2952
3186
  ),
2953
- /* @__PURE__ */ f("h3", { className: "pa-session-title", children: [
3187
+ /* @__PURE__ */ d("h3", { className: "pa-session-title", children: [
2954
3188
  "Session (",
2955
3189
  e.length,
2956
3190
  ")"
2957
3191
  ] })
2958
3192
  ] }),
2959
3193
  /* @__PURE__ */ a("p", { className: "pa-session-subtitle", children: "Persists until tab close" }),
2960
- /* @__PURE__ */ f("div", { className: "pa-session-actions", children: [
3194
+ /* @__PURE__ */ d("div", { className: "pa-session-actions", children: [
2961
3195
  /* @__PURE__ */ a(
2962
- tn,
3196
+ rn,
2963
3197
  {
2964
3198
  feedback: h === "session" ? p : null,
2965
3199
  slotClassName: "pa-copy-feedback-slot--session",
2966
3200
  children: /* @__PURE__ */ a(
2967
- G,
3201
+ X,
2968
3202
  {
2969
3203
  variant: "glass-primary",
2970
3204
  className: "pa-glass-btn--sm",
@@ -2975,52 +3209,52 @@ function nr({
2975
3209
  )
2976
3210
  }
2977
3211
  ),
2978
- /* @__PURE__ */ a(G, { variant: "ghost", onClick: t, "aria-label": "Close session panel", children: "✕" })
3212
+ /* @__PURE__ */ a(X, { variant: "ghost", onClick: t, "aria-label": "Close session panel", children: "✕" })
2979
3213
  ] })
2980
3214
  ] }),
2981
- /* @__PURE__ */ f("ul", { className: "pa-session-list", children: [
3215
+ /* @__PURE__ */ d("ul", { className: "pa-session-list", children: [
2982
3216
  e.length === 0 && /* @__PURE__ */ a("li", { className: "pa-session-empty", children: "No annotations yet. Click an element, drag an area, or Shift+click for multi-select." }),
2983
- e.map((y) => {
2984
- const S = Ht(y);
3217
+ e.map((w) => {
3218
+ const A = jt(w);
2985
3219
  return /* @__PURE__ */ a(
2986
3220
  "li",
2987
3221
  {
2988
- className: s === y.id ? "pa-session-item pa-session-item--active" : "pa-session-item",
2989
- onMouseEnter: () => l(y.id),
3222
+ className: s === w.id ? "pa-session-item pa-session-item--active" : "pa-session-item",
3223
+ onMouseEnter: () => l(w.id),
2990
3224
  onMouseLeave: () => l(null),
2991
- children: g === y.id ? /* @__PURE__ */ f("div", { className: "pa-session-edit", children: [
2992
- /* @__PURE__ */ f("label", { className: "pa-label", children: [
3225
+ children: f === w.id ? /* @__PURE__ */ d("div", { className: "pa-session-edit", children: [
3226
+ /* @__PURE__ */ d("label", { className: "pa-label", children: [
2993
3227
  "Note",
2994
3228
  /* @__PURE__ */ a(
2995
3229
  "textarea",
2996
3230
  {
2997
3231
  className: "pa-textarea",
2998
- value: u,
2999
- onChange: (k) => m(k.target.value),
3232
+ value: g,
3233
+ onChange: (F) => x(F.target.value),
3000
3234
  rows: 3
3001
3235
  }
3002
3236
  )
3003
3237
  ] }),
3004
- /* @__PURE__ */ f("div", { className: "pa-session-item-actions", children: [
3005
- /* @__PURE__ */ a(G, { variant: "ghost", onClick: () => c(null), children: "Cancel" }),
3238
+ /* @__PURE__ */ d("div", { className: "pa-session-item-actions", children: [
3239
+ /* @__PURE__ */ a(X, { variant: "ghost", onClick: () => c(null), children: "Cancel" }),
3006
3240
  /* @__PURE__ */ a(
3007
- G,
3241
+ X,
3008
3242
  {
3009
3243
  variant: "glass-primary",
3010
- onClick: () => M(y.id),
3011
- disabled: !u.trim(),
3244
+ onClick: () => N(w.id),
3245
+ disabled: !g.trim(),
3012
3246
  children: "Save"
3013
3247
  }
3014
3248
  )
3015
3249
  ] })
3016
- ] }) : /* @__PURE__ */ f(J, { children: [
3017
- /* @__PURE__ */ f("div", { className: "pa-session-content", children: [
3018
- /* @__PURE__ */ a("span", { className: "pa-session-target", children: S.target }),
3019
- /* @__PURE__ */ a("p", { className: "pa-session-note", children: S.note }),
3020
- S.meta && /* @__PURE__ */ a("p", { className: "pa-session-meta-line", children: S.meta })
3250
+ ] }) : /* @__PURE__ */ d(J, { children: [
3251
+ /* @__PURE__ */ d("div", { className: "pa-session-content", children: [
3252
+ /* @__PURE__ */ a("span", { className: "pa-session-target", children: A.target }),
3253
+ /* @__PURE__ */ a("p", { className: "pa-session-note", children: A.note }),
3254
+ A.meta && /* @__PURE__ */ a("p", { className: "pa-session-meta-line", children: A.meta })
3021
3255
  ] }),
3022
- /* @__PURE__ */ f("div", { className: "pa-session-item-actions", children: [
3023
- p === "Copied!" && d === y.id ? /* @__PURE__ */ a(
3256
+ /* @__PURE__ */ d("div", { className: "pa-session-item-actions", children: [
3257
+ p === "Copied!" && u === w.id ? /* @__PURE__ */ a(
3024
3258
  "span",
3025
3259
  {
3026
3260
  className: "pa-status pa-copy-feedback-slot pa-copy-feedback-slot--item",
@@ -3029,39 +3263,39 @@ function nr({
3029
3263
  children: "Copied!"
3030
3264
  }
3031
3265
  ) : /* @__PURE__ */ a(
3032
- G,
3266
+ X,
3033
3267
  {
3034
3268
  variant: "glass-primary",
3035
3269
  className: "pa-glass-btn--sm",
3036
- onClick: () => r(y.id),
3270
+ onClick: () => r(w.id),
3037
3271
  "aria-label": "Copy annotation",
3038
3272
  children: "Copy"
3039
3273
  }
3040
3274
  ),
3041
3275
  /* @__PURE__ */ a(
3042
- G,
3276
+ X,
3043
3277
  {
3044
3278
  variant: "ghost",
3045
3279
  className: "pa-glass-btn--sm pa-session-action-icon",
3046
- onClick: () => w(y),
3280
+ onClick: () => v(w),
3047
3281
  "aria-label": "Edit annotation note",
3048
3282
  children: "✎"
3049
3283
  }
3050
3284
  ),
3051
3285
  /* @__PURE__ */ a(
3052
- G,
3286
+ X,
3053
3287
  {
3054
3288
  variant: "ghost",
3055
3289
  className: "pa-glass-btn--sm pa-session-action-icon",
3056
- onClick: () => o(y.id),
3290
+ onClick: () => o(w.id),
3057
3291
  "aria-label": "Remove annotation",
3058
- children: /* @__PURE__ */ a(tr, {})
3292
+ children: /* @__PURE__ */ a(fr, {})
3059
3293
  }
3060
3294
  )
3061
3295
  ] })
3062
3296
  ] })
3063
3297
  },
3064
- y.id
3298
+ w.id
3065
3299
  );
3066
3300
  })
3067
3301
  ] })
@@ -3069,50 +3303,50 @@ function nr({
3069
3303
  }
3070
3304
  );
3071
3305
  }
3072
- function ar({
3306
+ function hr({
3073
3307
  open: e,
3074
3308
  onClose: t,
3075
3309
  hostTheme: n,
3076
3310
  chrome: r,
3077
3311
  onToggleHostTheme: o
3078
3312
  }) {
3079
- const i = j(null);
3080
- return U(() => {
3313
+ const i = V(null);
3314
+ return W(() => {
3081
3315
  if (!e) return;
3082
3316
  const s = (p) => {
3083
3317
  p.key === "Escape" && t();
3084
3318
  }, l = (p) => {
3085
- var h, g;
3086
- const d = p.target;
3087
- (h = i.current) != null && h.contains(d) || (g = d.closest) != null && g.call(d, "[data-pa-settings-trigger]") || t();
3319
+ var h, f;
3320
+ const u = p.target;
3321
+ (h = i.current) != null && h.contains(u) || (f = u.closest) != null && f.call(u, "[data-pa-settings-trigger]") || t();
3088
3322
  };
3089
3323
  return window.addEventListener("keydown", s), window.addEventListener("mousedown", l), () => {
3090
3324
  window.removeEventListener("keydown", s), window.removeEventListener("mousedown", l);
3091
3325
  };
3092
- }, [e, t]), e ? /* @__PURE__ */ a("div", { ref: i, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ a(Fe, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */ f("div", { className: "pa-settings-menu-inner", children: [
3093
- /* @__PURE__ */ f("header", { className: "pa-settings-menu-header", children: [
3326
+ }, [e, t]), e ? /* @__PURE__ */ a("div", { ref: i, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ a(_e, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */ d("div", { className: "pa-settings-menu-inner", children: [
3327
+ /* @__PURE__ */ d("header", { className: "pa-settings-menu-header", children: [
3094
3328
  /* @__PURE__ */ a("h4", { className: "pa-settings-menu-title", children: "Settings" }),
3095
3329
  /* @__PURE__ */ a("p", { className: "pa-settings-menu-subtitle", children: "Appearance and chrome" })
3096
3330
  ] }),
3097
- /* @__PURE__ */ f("section", { className: "pa-settings-section", children: [
3331
+ /* @__PURE__ */ d("section", { className: "pa-settings-section", children: [
3098
3332
  /* @__PURE__ */ a("span", { className: "pa-settings-section-label", children: "Host theme" }),
3099
- /* @__PURE__ */ f("div", { className: "pa-settings-row", children: [
3333
+ /* @__PURE__ */ d("div", { className: "pa-settings-row", children: [
3100
3334
  /* @__PURE__ */ a("span", { className: "pa-settings-row-value", children: n === "dark" ? "Dark canvas" : "Light canvas" }),
3101
3335
  /* @__PURE__ */ a(
3102
- G,
3336
+ X,
3103
3337
  {
3104
3338
  variant: "icon",
3105
3339
  onClick: o,
3106
3340
  "aria-label": n === "dark" ? "Switch host to light theme" : "Switch host to dark theme",
3107
3341
  title: n === "dark" ? "Light theme" : "Dark theme",
3108
- children: n === "dark" ? /* @__PURE__ */ a(Qa, {}) : /* @__PURE__ */ a(er, {})
3342
+ children: n === "dark" ? /* @__PURE__ */ a(dr, {}) : /* @__PURE__ */ a(ur, {})
3109
3343
  }
3110
3344
  )
3111
3345
  ] })
3112
3346
  ] }),
3113
- /* @__PURE__ */ f("section", { className: "pa-settings-section", children: [
3347
+ /* @__PURE__ */ d("section", { className: "pa-settings-section", children: [
3114
3348
  /* @__PURE__ */ a("span", { className: "pa-settings-section-label", children: "Glass chrome" }),
3115
- /* @__PURE__ */ f("p", { className: "pa-settings-hint", children: [
3349
+ /* @__PURE__ */ d("p", { className: "pa-settings-hint", children: [
3116
3350
  r === "dim" ? "Dim gray glass for readability on bright pages." : "Frosted glass for dark pages.",
3117
3351
  " ",
3118
3352
  "(auto)"
@@ -3120,29 +3354,29 @@ function ar({
3120
3354
  ] })
3121
3355
  ] }) }) }) : null;
3122
3356
  }
3123
- const St = "0 0 24 24";
3124
- function rr() {
3125
- return /* @__PURE__ */ f(J, { children: [
3357
+ const It = "0 0 24 24";
3358
+ function mr() {
3359
+ return /* @__PURE__ */ d(J, { children: [
3126
3360
  /* @__PURE__ */ a("rect", { x: "3", y: "14", width: "4", height: "4", fill: "currentColor" }),
3127
3361
  /* @__PURE__ */ a("path", { fill: "currentColor", d: "M7 5h12v12L7 5z" })
3128
3362
  ] });
3129
3363
  }
3130
- const or = "M4.5 2.5L4.5 17.25L9.1 12.9L11.35 19.15L13.55 17.95L11.05 11.85L16.85 11.85L4.5 2.5Z";
3131
- function ir({ size: e = 22, variant: t = "cursor" }) {
3364
+ const xr = "M4.5 2.5L4.5 17.25L9.1 12.9L11.35 19.15L13.55 17.95L11.05 11.85L16.85 11.85L4.5 2.5Z";
3365
+ function br({ size: e = 22, variant: t = "cursor" }) {
3132
3366
  return t === "pointer" ? /* @__PURE__ */ a(
3133
3367
  "svg",
3134
3368
  {
3135
3369
  className: "pa-brand-cursor pa-brand-cursor--pointer",
3136
3370
  width: e,
3137
3371
  height: e,
3138
- viewBox: St,
3372
+ viewBox: It,
3139
3373
  xmlns: "http://www.w3.org/2000/svg",
3140
3374
  "aria-hidden": "true",
3141
3375
  children: /* @__PURE__ */ a(
3142
3376
  "path",
3143
3377
  {
3144
3378
  fill: "currentColor",
3145
- d: or
3379
+ d: xr
3146
3380
  }
3147
3381
  )
3148
3382
  }
@@ -3152,19 +3386,19 @@ function ir({ size: e = 22, variant: t = "cursor" }) {
3152
3386
  className: "pa-brand-cursor pa-brand-cursor--minimal",
3153
3387
  width: e,
3154
3388
  height: e,
3155
- viewBox: St,
3389
+ viewBox: It,
3156
3390
  xmlns: "http://www.w3.org/2000/svg",
3157
3391
  "aria-hidden": "true",
3158
- children: /* @__PURE__ */ a(rr, {})
3392
+ children: /* @__PURE__ */ a(mr, {})
3159
3393
  }
3160
3394
  );
3161
3395
  }
3162
- const sr = ["element", "area", "multi"], lr = {
3396
+ const vr = ["element", "area", "multi"], wr = {
3163
3397
  element: "Click",
3164
3398
  area: "Area",
3165
3399
  multi: "Multi"
3166
3400
  };
3167
- function cr({
3401
+ function yr({
3168
3402
  rootAttributes: e,
3169
3403
  hostTheme: t,
3170
3404
  chrome: n,
@@ -3174,29 +3408,29 @@ function cr({
3174
3408
  onToggleHostTheme: s,
3175
3409
  active: l,
3176
3410
  mode: p,
3177
- captureMode: d,
3411
+ captureMode: u,
3178
3412
  annotationCount: h,
3179
- multiSelectCount: g,
3413
+ multiSelectCount: f,
3180
3414
  copyStatus: c,
3181
- copyAllFrom: u,
3182
- onActivateAnnotate: m,
3183
- onActivateEdit: v,
3184
- onDeactivate: N,
3415
+ copyAllFrom: g,
3416
+ onActivateAnnotate: x,
3417
+ onActivateEdit: y,
3418
+ onDeactivate: k,
3185
3419
  onCopyAll: E,
3186
- onCaptureModeChange: x,
3187
- onConfirmMultiSelect: w
3420
+ onCaptureModeChange: m,
3421
+ onConfirmMultiSelect: v
3188
3422
  }) {
3189
- const { elementRef: M, isDragging: y, style: S, dragHandleProps: k } = at(), R = /* @__PURE__ */ f(
3423
+ const { elementRef: N, isDragging: w, style: A, dragHandleProps: F } = st(), C = /* @__PURE__ */ d(
3190
3424
  "div",
3191
3425
  {
3192
- ref: M,
3193
- className: `pa-toolbar-float ${y ? "pa-toolbar-float--dragging" : ""}`,
3194
- style: S,
3426
+ ref: N,
3427
+ className: `pa-toolbar-float ${w ? "pa-toolbar-float--dragging" : ""}`,
3428
+ style: A,
3195
3429
  role: "toolbar",
3196
3430
  "aria-label": "PixelAgent",
3197
3431
  children: [
3198
3432
  !l && /* @__PURE__ */ a(
3199
- ar,
3433
+ hr,
3200
3434
  {
3201
3435
  open: r,
3202
3436
  onClose: i,
@@ -3205,7 +3439,7 @@ function cr({
3205
3439
  onToggleHostTheme: s
3206
3440
  }
3207
3441
  ),
3208
- /* @__PURE__ */ a(Ut, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */ f("div", { className: "pa-toolbar-inner", children: [
3442
+ /* @__PURE__ */ a(Gt, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */ d("div", { className: "pa-toolbar-inner", children: [
3209
3443
  /* @__PURE__ */ a(
3210
3444
  "button",
3211
3445
  {
@@ -3213,41 +3447,41 @@ function cr({
3213
3447
  className: "pa-toolbar-drag",
3214
3448
  "aria-label": "Drag PixelAgent toolbar",
3215
3449
  title: "Drag to move",
3216
- ...k,
3217
- children: /* @__PURE__ */ a(ir, { size: 22 })
3450
+ ...F,
3451
+ children: /* @__PURE__ */ a(br, { size: 22 })
3218
3452
  }
3219
3453
  ),
3220
3454
  /* @__PURE__ */ a("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
3221
- l ? /* @__PURE__ */ f(J, { children: [
3222
- /* @__PURE__ */ f("div", { className: "pa-toolbar-segment", children: [
3455
+ l ? /* @__PURE__ */ d(J, { children: [
3456
+ /* @__PURE__ */ d("div", { className: "pa-toolbar-segment", children: [
3223
3457
  /* @__PURE__ */ a("span", { className: "pa-mode-badge", children: p }),
3224
- p === "annotate" && /* @__PURE__ */ f(J, { children: [
3458
+ p === "annotate" && /* @__PURE__ */ d(J, { children: [
3225
3459
  /* @__PURE__ */ a(
3226
3460
  "select",
3227
3461
  {
3228
3462
  className: "pa-select pa-toolbar-capture-select",
3229
- value: d,
3230
- onChange: (P) => x(P.target.value),
3463
+ value: u,
3464
+ onChange: (P) => m(P.target.value),
3231
3465
  "aria-label": "Capture mode",
3232
- children: sr.map((P) => /* @__PURE__ */ a("option", { value: P, children: lr[P] }, P))
3466
+ children: vr.map((P) => /* @__PURE__ */ a("option", { value: P, children: wr[P] }, P))
3233
3467
  }
3234
3468
  ),
3235
- g > 0 && /* @__PURE__ */ a(
3236
- G,
3469
+ f > 0 && /* @__PURE__ */ a(
3470
+ X,
3237
3471
  {
3238
3472
  variant: "glass-primary",
3239
- onClick: w,
3473
+ onClick: v,
3240
3474
  "aria-label": "Annotate selected elements",
3241
- children: g
3475
+ children: f
3242
3476
  }
3243
3477
  ),
3244
3478
  /* @__PURE__ */ a(
3245
- tn,
3479
+ rn,
3246
3480
  {
3247
- feedback: u === "toolbar" ? c : null,
3481
+ feedback: g === "toolbar" ? c : null,
3248
3482
  slotClassName: "pa-copy-feedback-slot--toolbar",
3249
3483
  children: /* @__PURE__ */ a(
3250
- G,
3484
+ X,
3251
3485
  {
3252
3486
  variant: "glass-primary",
3253
3487
  onClick: E,
@@ -3261,11 +3495,11 @@ function cr({
3261
3495
  ] })
3262
3496
  ] }),
3263
3497
  /* @__PURE__ */ a(
3264
- G,
3498
+ X,
3265
3499
  {
3266
3500
  variant: "icon",
3267
3501
  className: "pa-toolbar-close",
3268
- onClick: N,
3502
+ onClick: k,
3269
3503
  "aria-label": "Close",
3270
3504
  children: /* @__PURE__ */ a(
3271
3505
  "svg",
@@ -3288,14 +3522,14 @@ function cr({
3288
3522
  )
3289
3523
  }
3290
3524
  )
3291
- ] }) : /* @__PURE__ */ f("div", { className: "pa-toolbar-segment", children: [
3292
- /* @__PURE__ */ a(G, { onClick: m, children: "Annotate" }),
3293
- /* @__PURE__ */ a(G, { onClick: v, children: "Edit" })
3525
+ ] }) : /* @__PURE__ */ d("div", { className: "pa-toolbar-segment", children: [
3526
+ /* @__PURE__ */ a(X, { onClick: x, children: "Annotate" }),
3527
+ /* @__PURE__ */ a(X, { onClick: y, children: "Edit" })
3294
3528
  ] }),
3295
- !l && /* @__PURE__ */ f(J, { children: [
3529
+ !l && /* @__PURE__ */ d(J, { children: [
3296
3530
  /* @__PURE__ */ a("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
3297
3531
  /* @__PURE__ */ a(
3298
- G,
3532
+ X,
3299
3533
  {
3300
3534
  variant: "icon",
3301
3535
  className: "pa-toolbar-settings",
@@ -3304,43 +3538,43 @@ function cr({
3304
3538
  "aria-label": "PixelAgent settings",
3305
3539
  "aria-expanded": r,
3306
3540
  title: "Settings",
3307
- children: /* @__PURE__ */ a(Za, {})
3541
+ children: /* @__PURE__ */ a(pr, {})
3308
3542
  }
3309
3543
  )
3310
3544
  ] }),
3311
- c && !en(c) && c !== "Copied!" && /* @__PURE__ */ a("span", { className: "pa-status pa-toolbar-status", role: "status", children: c })
3545
+ c && !an(c) && c !== "Copied!" && /* @__PURE__ */ a("span", { className: "pa-status pa-toolbar-status", role: "status", children: c })
3312
3546
  ] }) })
3313
3547
  ]
3314
3548
  }
3315
3549
  );
3316
- return typeof document > "u" ? R : Oe(
3550
+ return typeof document > "u" ? C : Le(
3317
3551
  /* @__PURE__ */ a(
3318
3552
  "div",
3319
3553
  {
3320
3554
  className: "pa-root pa-root--toolbar-portal",
3321
3555
  "data-pixelagent-toolbar-portal": !0,
3322
3556
  ...e,
3323
- children: R
3557
+ children: C
3324
3558
  }
3325
3559
  ),
3326
3560
  document.body
3327
3561
  );
3328
3562
  }
3329
- function pr() {
3330
- const e = j(un()), [t, n] = A(
3563
+ function kr() {
3564
+ const e = V(mn()), [t, n] = S(
3331
3565
  () => {
3332
3566
  var i;
3333
3567
  return ((i = e.current) == null ? void 0 : i.annotations) ?? [];
3334
3568
  }
3335
3569
  );
3336
- U(() => {
3337
- gn({ annotations: t });
3570
+ W(() => {
3571
+ xn({ annotations: t });
3338
3572
  }, [t]);
3339
- const r = T((i, s) => {
3573
+ const r = $((i, s) => {
3340
3574
  n(
3341
3575
  (l) => l.map((p) => p.id === i ? { ...p, ...s } : p)
3342
3576
  );
3343
- }, []), o = T((i) => {
3577
+ }, []), o = $((i) => {
3344
3578
  n((s) => s.filter((l) => l.id !== i));
3345
3579
  }, []);
3346
3580
  return {
@@ -3350,91 +3584,91 @@ function pr() {
3350
3584
  removeAnnotation: o
3351
3585
  };
3352
3586
  }
3353
- function dr({
3587
+ function Nr({
3354
3588
  ui: e,
3355
3589
  hostTheme: t,
3356
3590
  onHostThemeChange: n
3357
3591
  }) {
3358
- const r = de(
3359
- () => ({ ...hn, ...e }),
3592
+ const r = se(
3593
+ () => ({ ...bn, ...e }),
3360
3594
  [e]
3361
- ), [o, i] = A(
3362
- () => t ?? dt(r) ?? "dark"
3363
- ), [s, l] = A(!1), p = t ?? o;
3364
- U(() => {
3595
+ ), [o, i] = S(
3596
+ () => t ?? gt(r) ?? "dark"
3597
+ ), [s, l] = S(!1), p = t ?? o;
3598
+ W(() => {
3365
3599
  if (t !== void 0) return;
3366
3600
  const c = () => {
3367
- const v = dt(r);
3368
- v && i(v);
3601
+ const y = gt(r);
3602
+ y && i(y);
3369
3603
  };
3370
3604
  c();
3371
- const u = r.hostThemeAttribute, m = new MutationObserver(c);
3372
- return m.observe(document.documentElement, {
3605
+ const g = r.hostThemeAttribute, x = new MutationObserver(c);
3606
+ return x.observe(document.documentElement, {
3373
3607
  attributes: !0,
3374
- attributeFilter: [u]
3375
- }), () => m.disconnect();
3608
+ attributeFilter: [g]
3609
+ }), () => x.disconnect();
3376
3610
  }, [t, r]);
3377
- const d = de(
3378
- () => mn(r, p),
3611
+ const u = se(
3612
+ () => vn(r, p),
3379
3613
  [r, p]
3380
- ), h = T(() => {
3614
+ ), h = $(() => {
3381
3615
  const c = p === "dark" ? "light" : "dark";
3382
3616
  if (n) {
3383
3617
  n(c);
3384
3618
  return;
3385
3619
  }
3386
- i(c), xn(c, r);
3387
- }, [p, n, r]), g = T(() => {
3620
+ i(c), wn(c, r);
3621
+ }, [p, n, r]), f = $(() => {
3388
3622
  l((c) => !c);
3389
3623
  }, []);
3390
3624
  return {
3391
- chrome: d,
3392
- rootAttributes: bn(d),
3625
+ chrome: u,
3626
+ rootAttributes: yn(u),
3393
3627
  hostTheme: p,
3394
3628
  toggleHostTheme: h,
3395
3629
  settingsOpen: s,
3396
3630
  setSettingsOpen: l,
3397
- toggleSettings: g,
3631
+ toggleSettings: f,
3398
3632
  uiSettings: r
3399
3633
  };
3400
3634
  }
3401
- const fr = `.pa-root{--pa-glass-blur: 4px;--pa-glass-saturate: 130%;--pa-glass-opacity: .78;--pa-glass-tint: rgba(255, 255, 255, .08);--pa-glass-tint-accent: rgba(99, 102, 241, .32);--pa-glass-border: rgba(255, 255, 255, .28);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .18), inset -1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(0, 0, 0, .18);--pa-glass-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .14), 0 12px 40px rgba(0, 0, 0, .32);--pa-glass-specular: radial-gradient( ellipse 65% 45% at 22% 14%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 38%, transparent 72% );--pa-glass-underglow: radial-gradient( ellipse 95% 38% at 50% 100%, rgba(129, 140, 248, .18) 0%, transparent 60% );--pa-glass-radius-bar: 999px;--pa-glass-radius-panel: 20px;--pa-glass-radius-popover: 16px;--pa-glass-radius-control: 10px;--pa-glass-group-gap: 10px;--pa-glass-morph-duration: .32s;--pa-glass-morph-easing: cubic-bezier(.4, 0, .2, 1);--pa-glass-fallback-bg: rgba(28, 28, 30, .94);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-surface-fill: rgba(255, 255, 255, .06);--pa-glass-control-hover: rgba(255, 255, 255, .12);--pa-glass-control-active: rgba(255, 255, 255, .18);--pa-divider: rgba(255, 255, 255, .08);--pa-tooltip-bg: rgba(20, 20, 24, .82);--pa-tooltip-border: rgba(255, 255, 255, .14);--pa-toolbar-segment-bg: rgba(0, 0, 0, .28);--pa-toolbar-segment-border: rgba(255, 255, 255, .06);--pa-toolbar-divider-color: rgba(255, 255, 255, .12);--pa-text: rgba(255, 255, 255, .92);--pa-text-secondary: rgba(255, 255, 255, .62);--pa-accent: #818cf8;--pa-accent-bright: #a5b4fc;--pa-success: #6ee7b7;--pa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--pa-font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;--pa-z: 2147483640;--pa-field-bg: rgba(255, 255, 255, .04);--pa-field-bg-hover: rgba(255, 255, 255, .06);--pa-field-border: rgba(255, 255, 255, .12);--pa-field-border-hover: rgba(255, 255, 255, .2);--pa-field-border-focus: rgba(255, 255, 255, .32);--pa-field-radius: 8px}@media(prefers-reduced-transparency:reduce){.pa-root{--pa-glass-blur: 0px;--pa-glass-saturate: 100%;--pa-glass-opacity: 1;--pa-glass-tint: var(--pa-glass-fallback-bg);--pa-glass-tint-accent: rgba(99, 102, 241, .85);--pa-glass-border: var(--pa-glass-fallback-border);--pa-glass-rim: none;--pa-glass-specular: none;--pa-glass-underglow: none}}@media(prefers-reduced-motion:reduce){.pa-root{--pa-glass-morph-duration: 0ms}}.pa-root[data-pa-chrome=dim],.pa-root--toolbar-portal[data-pa-chrome=dim]{--pa-glass-blur: 16px;--pa-glass-saturate: 125%;--pa-glass-opacity: .88;--pa-glass-tint: rgba(92, 92, 96, .68);--pa-glass-tint-accent: rgba(100, 100, 104, .74);--pa-glass-surface-fill: rgba(96, 96, 100, .64);--pa-glass-border: rgba(255, 255, 255, .2);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .08), inset -1px 0 0 rgba(255, 255, 255, .08), inset 0 -1px 1px rgba(0, 0, 0, .22);--pa-glass-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 32px rgba(0, 0, 0, .14), 0 24px 48px rgba(0, 0, 0, .1);--pa-glass-specular: radial-gradient( ellipse 68% 48% at 22% 10%, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .1) 40%, transparent 72% );--pa-glass-underglow: none;--pa-glass-fallback-bg: rgba(82, 82, 86, .96);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-control-hover: rgba(255, 255, 255, .1);--pa-glass-control-active: rgba(255, 255, 255, .16);--pa-divider: rgba(255, 255, 255, .1);--pa-tooltip-bg: rgba(82, 82, 86, .96);--pa-tooltip-border: rgba(255, 255, 255, .18);--pa-toolbar-segment-bg: rgba(0, 0, 0, .18);--pa-toolbar-segment-border: rgba(255, 255, 255, .08);--pa-toolbar-divider-color: rgba(255, 255, 255, .14);--pa-text: rgba(255, 255, 255, .94);--pa-text-secondary: rgba(255, 255, 255, .58);--pa-accent: #a5b4fc;--pa-accent-bright: #c7d2fe;--pa-success: #6ee7b7;--pa-field-bg: rgba(255, 255, 255, .06);--pa-field-bg-hover: rgba(255, 255, 255, .09);--pa-field-border: rgba(255, 255, 255, .14);--pa-field-border-hover: rgba(255, 255, 255, .22);--pa-field-border-focus: rgba(255, 255, 255, .32)}.pa-glass-surface{position:relative;overflow:hidden;background:var(--pa-glass-surface-fill);border:1px solid var(--pa-glass-border);box-shadow:var(--pa-glass-shadow),var(--pa-glass-rim);border-radius:inherit;backdrop-filter:blur(4px) saturate(130%);-webkit-backdrop-filter:blur(4px) saturate(130%);will-change:backdrop-filter}.pa-glass-surface.pa-toolbar-glass{backdrop-filter:blur(6px) saturate(138%);-webkit-backdrop-filter:blur(6px) saturate(138%)}.pa-glass-surface-blur{display:none}.pa-glass-surface-bg{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:inherit;background:linear-gradient(180deg,#ffffff1a,#fff0 28%),linear-gradient(0deg,#ffffff08,#fff0 22%);pointer-events:none}@media(prefers-reduced-transparency:reduce){.pa-glass-surface{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border);box-shadow:none}.pa-glass-surface-bg{filter:none;background:transparent}}.pa-glass-surface--accent{background:var(--pa-glass-tint-accent)}.pa-glass-surface-shine{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-specular);mix-blend-mode:screen}.pa-glass-surface:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-underglow);mix-blend-mode:screen}@media(prefers-reduced-transparency:reduce){.pa-glass-surface-shine,.pa-glass-surface:after{display:none}}.pa-glass-surface-content{position:relative;z-index:3}.pa-glass-container{display:flex;align-items:center;gap:var(--pa-glass-group-gap);font-family:var(--pa-font)}.pa-toolbar-float{position:fixed;bottom:24px;left:50%;margin-left:-150px;z-index:var(--pa-z);touch-action:none}.pa-toolbar-float--dragging{-webkit-user-select:none;user-select:none}.pa-toolbar-inner{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 6px}.pa-toolbar-drag{all:unset;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;color:var(--pa-text);cursor:grab;touch-action:none;flex-shrink:0;transition:background .15s ease}.pa-toolbar-drag:hover{background:var(--pa-glass-control-hover)}.pa-brand-cursor{display:block;flex-shrink:0;pointer-events:none}.pa-brand-cursor--pointer{margin-top:-2px;margin-left:-1px}.pa-brand-cursor--minimal{display:block}.pa-toolbar-float--dragging .pa-toolbar-drag{cursor:grabbing;background:#ffffff24}.pa-toolbar-divider{width:1px;height:24px;background:var(--pa-toolbar-divider-color);flex-shrink:0}.pa-toolbar-segment{display:flex;align-items:center;gap:4px;padding:3px 4px;border-radius:999px;background:var(--pa-toolbar-segment-bg);border:1px solid var(--pa-toolbar-segment-border)}.pa-toolbar-capture-select{width:auto;min-width:76px;padding:6px 28px 6px 10px;font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;border-radius:999px;cursor:pointer}.pa-toolbar-close{margin-left:2px;flex-shrink:0}.pa-toolbar-status{font-size:11px;padding:0 8px;white-space:nowrap}.pa-settings-menu{position:absolute;right:8px;bottom:calc(100% + 12px);z-index:2;width:min(280px,calc(100vw - 32px));pointer-events:auto}.pa-settings-menu-panel{width:100%}.pa-settings-menu-inner{padding:14px 16px 16px}.pa-settings-menu-header{margin-bottom:14px}.pa-settings-menu-title{margin:0;font-size:14px;font-weight:600;color:var(--pa-text)}.pa-settings-menu-subtitle{margin:4px 0 0;font-size:11px;color:var(--pa-text-secondary)}.pa-settings-section{padding:12px 0;border-top:1px solid var(--pa-divider)}.pa-settings-section:first-of-type{border-top:none;padding-top:0}.pa-settings-section-label{display:block;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary);margin-bottom:8px}.pa-settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pa-settings-row-value{font-size:12px;color:var(--pa-text)}.pa-settings-hint{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text-secondary)}.pa-glass-group{flex-shrink:0}.pa-glass-group-inner{display:flex;align-items:center;gap:2px;padding:4px 6px}.pa-glass-group--brand .pa-glass-group-inner{padding:6px 14px}.pa-glass-btn{all:unset;box-sizing:border-box;cursor:pointer;font-family:var(--pa-font);font-size:12px;font-weight:500;color:var(--pa-text);padding:6px 12px;border-radius:var(--pa-glass-radius-control);white-space:nowrap;transition:background var(--pa-glass-morph-duration) var(--pa-glass-morph-easing),transform .12s ease,color var(--pa-glass-morph-duration) ease}.pa-glass-btn:hover:not(:disabled){background:var(--pa-glass-control-hover)}.pa-glass-btn:active:not(:disabled){transform:scale(.97);background:var(--pa-glass-control-active)}.pa-glass-btn:disabled{opacity:.38;cursor:not-allowed}.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{position:relative;color:#fff;font-weight:600;padding:8px 16px;background:#ffffff1a;backdrop-filter:blur(12px) saturate(140%);-webkit-backdrop-filter:blur(12px) saturate(140%);border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 1px #fff6,0 4px 16px #00000026}.pa-glass-btn--glass-primary:before,.pa-glass-btn--prominent:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,transparent 45%,transparent 100%);pointer-events:none}.pa-glass-btn--glass-primary:hover:not(:disabled),.pa-glass-btn--prominent:hover:not(:disabled){background:#ffffff29;border-color:#ffffff61;box-shadow:inset 0 1px #ffffff73,0 6px 20px #0003}@media(prefers-reduced-transparency:reduce){.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{backdrop-filter:none;-webkit-backdrop-filter:none;background:#3c3c46e6}}.pa-glass-btn--icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;color:#ffffffbf;background:#ffffff0f;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.14);box-shadow:inset 0 1px #ffffff1f}.pa-glass-btn--icon:hover:not(:disabled){color:#fff;background:#ffffff1f;border-color:#ffffff38}.pa-glass-btn--ghost{color:var(--pa-text-secondary);padding:6px 10px}.pa-glass-btn--ghost:hover:not(:disabled){color:var(--pa-text);background:#ffffff14}.pa-glass-btn--active{background:#6366f173;color:#fff}.pa-glass-btn--sm{padding:2px 8px;font-size:11px}.pa-glass-panel{font-family:var(--pa-font);color:var(--pa-text)}.pa-glass-panel--sheet.pa-glass-panel--left{position:fixed;top:16px;left:16px;z-index:var(--pa-z);width:288px;max-height:calc(100vh - 100px)}.pa-glass-panel--sheet.pa-glass-panel--right{position:fixed;top:16px;right:16px;z-index:var(--pa-z);width:360px;max-height:60vh}.pa-glass-panel--popover{position:fixed;z-index:calc(var(--pa-z) + 2);width:300px}.pa-glass-panel .pa-glass-surface-content{padding:14px;display:flex;flex-direction:column;gap:10px}.pa-glass-panel--sheet .pa-glass-surface-content{padding:14px;overflow-y:auto;max-height:inherit}.pa-glass-panel--sheet.pa-glass-panel--right:not(.pa-edit-panel-glass) .pa-glass-surface-content{padding:0;gap:0}.pa-toolbar-brand{font-weight:600;font-size:12px;color:var(--pa-accent-bright);letter-spacing:-.01em}.pa-mode-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--pa-text-secondary);padding:4px 10px}.pa-status{font-size:11px;font-weight:500;color:var(--pa-success);padding:4px 10px;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:12px;font-weight:600;white-space:nowrap;border-radius:999px;flex-shrink:0;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot--toolbar{padding:8px 16px;min-height:34px}.pa-copy-feedback-slot--session{padding:8px 14px;min-height:34px}.pa-copy-feedback-slot--item{padding:6px 10px;min-width:44px;min-height:28px;font-size:11px}@keyframes pa-status-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.pa-status{animation:none}}.pa-glass-divider{width:1px;height:16px;background:#ffffff26;margin:0 2px;flex-shrink:0}.pa-root{all:initial;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text)}.pa-root--toolbar-portal{all:unset;position:static;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text);pointer-events:none}.pa-root--toolbar-portal .pa-toolbar-float{pointer-events:auto}.pa-root *,.pa-root *:before,.pa-root *:after{box-sizing:border-box}.pa-highlight{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 2);border:2px solid var(--pa-accent);background:#6366f11f;border-radius:4px;box-shadow:0 0 0 1px #6366f140;transition:top .05s,left .05s,width .05s,height .05s,background var(--pa-glass-morph-duration) ease}.pa-highlight-selected{background:#6366f138;border-color:var(--pa-accent-bright);box-shadow:0 0 0 2px #6366f159,0 0 20px #6366f126}.pa-highlight-scope{background:#6366f129;border-style:dashed}.pa-highlight-primary{border-width:2px;background:#6366f147;box-shadow:0 0 0 3px #6366f173,0 0 24px #6366f133}.pa-annotation-badge{position:fixed;pointer-events:auto;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;z-index:calc(var(--pa-z) - 1);min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--pa-font);font-size:12px;font-weight:700;line-height:1;color:#fff;background:#6669f8;border:none;border-radius:999px;box-shadow:0 2px 10px #37348c52;transform:translate(-50%,-50%);transition:top .05s,left .05s,transform .08s ease,background .08s ease,box-shadow .08s ease}.pa-annotation-badge:hover,.pa-annotation-badge--active{background:#7c7ffa;transform:translate(-50%,-50%) scale(1.18);box-shadow:0 0 0 3px #6366f173,0 2px 14px #37348c73}.pa-annotation-preview{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);transform:translateY(-100%);display:flex;flex-direction:column;gap:3px;max-width:260px;padding:8px 10px;border-radius:8px;font-family:var(--pa-font);background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border);box-shadow:0 6px 24px #00000047}.pa-annotation-preview--below{transform:none}.pa-annotation-preview-target{font-family:var(--pa-font-mono, ui-monospace, monospace);font-size:10px;font-weight:600;letter-spacing:-.01em;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-annotation-preview-note{font-size:12px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}@media(prefers-reduced-transparency:reduce){.pa-annotation-preview{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-tooltip{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);font-family:var(--pa-font);font-size:12px;font-weight:600;letter-spacing:-.01em;color:var(--pa-text);padding:4px 8px;border-radius:6px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border)}@media(prefers-reduced-transparency:reduce){.pa-tooltip{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary);font-family:var(--pa-font)}.pa-select,.pa-input,.pa-textarea{font-family:var(--pa-font);font-size:12px;font-weight:400;line-height:1.4;color:var(--pa-text);background-color:var(--pa-field-bg);border:1px solid var(--pa-field-border);border-radius:var(--pa-field-radius);padding:8px 10px;outline:none;width:100%;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.pa-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='rgba(255,255,255,0.45)' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-select:hover:not(:focus),.pa-input:hover:not(:focus),.pa-textarea:hover:not(:focus){background-color:var(--pa-field-bg-hover);border-color:var(--pa-field-border-hover)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{background-color:#ffffff0d;border-color:var(--pa-field-border-focus);box-shadow:inset 0 1px #ffffff0f}.pa-textarea{resize:vertical;min-height:64px;line-height:1.5}@media(prefers-reduced-transparency:reduce){.pa-select,.pa-input,.pa-textarea{background-color:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{border-color:var(--pa-accent)}}.pa-popover-header{display:flex;flex-direction:column;gap:3px}.pa-popover-selector{font-size:11px;font-weight:500;color:var(--pa-accent-bright);word-break:break-all}.pa-popover-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:2px}.pa-edit-panel-float{position:fixed;right:16px;top:16px;z-index:calc(var(--pa-z) + 4);width:312px;max-height:calc(100vh - 32px)}.pa-edit-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-edit-panel-float .pa-glass-panel--sheet{position:relative;top:auto;left:auto;right:auto;width:100%;max-height:calc(100vh - 32px)}.pa-edit-panel-glass .pa-glass-surface-content{display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 32px);padding:14px 14px 12px}.pa-edit-panel-inner{display:flex;flex-direction:column;min-height:0;flex:1;gap:10px}.pa-edit-panel-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0 -4px;padding:0 4px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.pa-edit-panel-sticky{flex-shrink:0;padding-top:4px;border-top:1px solid rgba(255,255,255,.08)}.pa-edit-panel-header{display:flex;align-items:center;gap:8px}.pa-edit-panel-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-edit-panel-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-edit-panel-float--dragging .pa-edit-panel-drag{cursor:grabbing}.pa-edit-panel-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-edit-panel-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-edit-title{all:unset;display:block;font-size:14px;font-weight:600;letter-spacing:-.02em;flex:1}.pa-edit-hint{font-size:12px;color:var(--pa-text-secondary);margin:0;line-height:1.5}.pa-edit-state-hint{font-size:11px;color:var(--pa-text-secondary);margin:0 0 8px;line-height:1.45}.pa-edit-actions{display:flex;gap:8px;margin-top:8px}.pa-edit-actions .pa-glass-btn{display:inline-flex;align-items:center;justify-content:center}.pa-glass-btn-inner{display:inline-flex;align-items:center;gap:6px}.pa-glass-btn-icon{width:14px;height:14px;flex-shrink:0;opacity:.92}.pa-preview-disabled{opacity:.55;pointer-events:none}.pa-edit-meta{display:flex;flex-direction:column;gap:3px;margin-bottom:4px}.pa-edit-meta code,.pa-edit-meta-label{font-size:12px;font-weight:500;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-edit-source{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-source--warn{color:var(--pa-warning, #e8a838);line-height:1.4}.pa-edit-text-input{min-height:72px;font-size:13px;line-height:1.55}.pa-edit-sections{display:flex;flex-direction:column}.pa-edit-section{border-bottom:1px solid rgba(255,255,255,.06)}.pa-edit-section:last-child{border-bottom:none}.pa-edit-section-header{box-sizing:border-box;display:flex;align-items:center;gap:6px;width:100%;padding:10px 2px 8px;color:#ffffffb8}.pa-edit-section-header-toggle,.pa-edit-section-chevron-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;cursor:pointer}.pa-edit-section-header-toggle{flex:1;min-width:0;gap:8px}.pa-edit-section-header:hover{color:#ffffffeb}.pa-edit-section-title{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;text-align:left}.pa-edit-section-action{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;border-radius:6px;cursor:pointer;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-edit-section-action:hover,.pa-edit-section-action[aria-expanded=true]{color:#fffffff2;background:#ffffff14}.pa-edit-section-action-icon{width:15px;height:15px}.pa-edit-section-chevron-btn{flex-shrink:0;padding:2px;margin-left:6px}.pa-edit-section-badge{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-section-chevron{width:16px;height:16px;transform:rotate(-180deg);transition:transform .16s ease;opacity:.55}.pa-edit-section:not(.pa-edit-section--open) .pa-edit-section-chevron{transform:rotate(0)}.pa-edit-section-body{display:flex;flex-direction:column;gap:10px;padding:0 2px 12px}.pa-edit-field-label{display:block;font-size:10px;font-weight:500;letter-spacing:.04em;color:var(--pa-text-secondary);margin-bottom:5px}.pa-edit-stack-field{display:flex;flex-direction:column}.pa-edit-field-block{display:flex;flex-direction:column;gap:6px}.pa-edit-field-grid{display:grid;gap:10px}.pa-edit-field-grid--2{grid-template-columns:1fr 1fr}.pa-edit-mini-field{display:flex;flex-direction:column;min-width:0}.pa-edit-mini-field .pa-select{font-size:12px;padding:7px 8px}.pa-edit-inline-hint{font-size:10px;line-height:1.45;color:var(--pa-text-secondary);margin:0}.pa-edit-split-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}.pa-edit-split-fields .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-segmented{display:flex;width:100%;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#00000047;overflow:hidden}.pa-segmented-btn{all:unset;box-sizing:border-box;flex:1;display:inline-flex;align-items:center;justify-content:center;min-width:0;height:34px;color:#ffffff80;border-right:1px solid rgba(255,255,255,.1);cursor:pointer;transition:background .12s ease,color .12s ease}.pa-segmented-btn:last-child{border-right:none}.pa-segmented-btn:hover{background:#ffffff0f;color:#ffffffd1}.pa-segmented-btn--on{background:#ffffff24;color:#fffffff2}.pa-segmented-icon{display:block;width:16px;height:16px;flex-shrink:0}.pa-segmented-type{font-size:13px;font-weight:600;line-height:1;font-family:var(--pa-font, system-ui, sans-serif)}.pa-segmented-type--bold{font-weight:700}.pa-segmented-type--italic{font-style:italic;font-weight:600}.pa-segmented-type--underline{text-decoration:underline;text-underline-offset:2px}.pa-font-family-select{width:100%;font-size:13px;padding:9px 32px 9px 10px;color:#ffffffe0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff99' d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-font-family-select:invalid,.pa-font-family-select option[value=""]{color:#ffffff73}.pa-edit-size-row .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-edit-size-row .pa-prop-scrub-value{width:100%}.pa-color-field{display:flex;flex-direction:column;gap:6px}.pa-color-field-trigger{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:6px 8px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#00000038;cursor:pointer;transition:border-color .14s ease,background .14s ease}.pa-color-field-trigger:hover{border-color:#ffffff38;background:#ffffff0f}.pa-color-field-trigger[aria-expanded=true]{border-color:#818cf873;background:#6366f11f}.pa-color-field-swatch{width:28px;height:28px;flex-shrink:0;border-radius:8px;border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 0 0 1px #00000026}.pa-color-field-hex{flex:1;min-width:0;pointer-events:none;font-family:var(--pa-font-mono);font-size:12px}.pa-color-picker-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-color-picker-portal .pa-color-picker{pointer-events:auto}.pa-color-picker{position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;padding:14px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14;display:flex;flex-direction:column;gap:12px}.pa-color-picker-header{display:flex;align-items:center;gap:10px}.pa-color-picker-preview{width:22px;height:22px;flex-shrink:0;border-radius:6px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-color-picker-header-label{font-size:13px;font-weight:500;color:#ffffff8c;letter-spacing:-.01em}.pa-color-picker-sb{position:relative;width:100%;height:148px;border-radius:10px;border:1px solid rgba(255,255,255,.1);overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--pa-picker-h, 0) 100% 50%))}.pa-color-picker-sb-thumb{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #00000059,0 2px 6px #00000059;pointer-events:none}.pa-color-picker-hue{position:relative;height:14px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.pa-color-picker-hue-input{position:absolute;top:-4px;right:0;bottom:-4px;left:0;width:100%;height:calc(100% + 8px);margin:0;opacity:0;cursor:pointer}.pa-color-picker-hue-thumb{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #0000004d,0 1px 4px #00000059;pointer-events:none}.pa-color-picker-field{display:flex;flex-direction:column;gap:6px}.pa-color-picker-field--rgb{flex:1;min-width:0}.pa-color-picker-field-label{font-size:11px;font-weight:500;color:#ffffff73;letter-spacing:.02em}.pa-color-picker-input{width:100%;font-family:var(--pa-font-mono);font-size:12px;padding:8px 10px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-color-picker-input:hover{border-color:#fff3!important}.pa-color-picker-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-color-picker-rgb{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pa-color-picker-field--rgb .pa-color-picker-input{text-align:center;padding-left:6px!important;padding-right:6px!important}.pa-color-picker-input[type=number]::-webkit-inner-spin-button,.pa-color-picker-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pa-text-styles-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-text-styles{pointer-events:auto;position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;display:flex;flex-direction:column;padding:8px;gap:8px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14}.pa-text-styles-header{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 0}.pa-text-styles-title{font-size:13px;font-weight:600;color:#ffffffeb;letter-spacing:-.01em}.pa-text-styles-close{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;cursor:pointer;font-size:18px;line-height:1;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-text-styles-close:hover{color:#fffffff2;background:#ffffff14}.pa-text-styles-search{position:relative;display:flex;align-items:center}.pa-text-styles-search-icon{position:absolute;left:10px;color:#fff6;pointer-events:none}.pa-text-styles-search-input{width:100%;font-size:13px;padding:8px 10px 8px 30px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-text-styles-search-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-text-styles-list{display:flex;flex-direction:column;max-height:260px;overflow-y:auto;margin:0 -2px;padding:0 2px}.pa-text-styles-row{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border-radius:8px;cursor:pointer;color:#ffffffe6;transition:background .12s ease}.pa-text-styles-row:hover{background:#ffffff0f}.pa-text-styles-row--active{background:#ffffff1a}.pa-text-styles-specimen{flex-shrink:0;width:26px;font-size:18px;line-height:1;font-weight:500;text-align:center;color:#ffffffeb}.pa-text-styles-row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.pa-text-styles-row-metrics{flex-shrink:0;font-size:12px;color:#ffffff73}.pa-text-styles-empty{margin:0;padding:16px 10px;text-align:center;font-size:12px;color:#ffffff73}.pa-prop-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:10px;padding:2px 0}.pa-prop-row--compact{grid-template-columns:72px minmax(0,1fr)}.pa-prop-label{font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-scrub-label{cursor:ew-resize;-webkit-user-select:none;user-select:none;touch-action:none}.pa-scrub-label:hover,.pa-scrub-label--active{color:var(--pa-text)}.pa-prop-scrub-value{width:100%;text-align:left}.pa-spacing-control{display:flex;align-items:stretch;gap:6px;min-width:0}.pa-spacing-pair,.pa-spacing-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:1;min-width:0}.pa-spacing-grid{grid-template-rows:1fr 1fr}.pa-spacing-cell{position:relative;display:flex;align-items:center;min-width:0}.pa-spacing-cell-icon{position:absolute;left:7px;top:50%;transform:translateY(-50%);display:inline-flex;color:#ffffff8c;pointer-events:none}.pa-spacing-cell-icon--scrub{pointer-events:auto;cursor:ew-resize;touch-action:none}.pa-spacing-cell-icon--scrub:hover,.pa-spacing-cell-icon--active{color:var(--pa-text)}.pa-spacing-cell-input{width:100%;padding:6px 6px 6px 24px!important;text-align:left;font-family:var(--pa-font-mono);font-size:11px}.pa-spacing-cell--mixed .pa-spacing-cell-input{color:#ffffffb3}.pa-spacing-cell--mixed .pa-spacing-cell-icon{color:#fff6}.pa-spacing-toggle{all:unset;display:inline-flex;align-items:center;justify-content:center;width:26px;min-height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.08);color:#ffffff8c;cursor:pointer;flex-shrink:0;transition:background .12s ease,color .12s ease,border-color .12s ease}.pa-spacing-toggle:hover:not(:disabled){background:#ffffff0f;color:#ffffffe6}.pa-spacing-toggle--on{background:#ffffff1f;color:#fffffff2;border-color:#ffffff2e}.pa-spacing-toggle:disabled{opacity:.4;cursor:not-allowed}.pa-edit-panel-glass .pa-prop-row .pa-input{font-family:var(--pa-font-mono);font-size:11px;padding:6px 8px;border-radius:6px;color:#ffffffe0}.pa-edit-panel-glass .pa-select,.pa-edit-panel-glass .pa-textarea{border-radius:var(--pa-field-radius)}.pa-edit-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding-top:10px}.pa-change-count{font-size:11px;color:var(--pa-text-secondary)}.pa-change-count--success{color:var(--pa-success)}.pa-change-count--error{color:#fca5a5}.pa-popover-body{display:flex;flex-direction:column;gap:10px}.pa-popover-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pa-popover-context{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:var(--pa-field-radius);background:#0003;border:1px solid rgba(255,255,255,.08)}.pa-popover-context-line{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text)}.pa-popover-context-label{display:inline-block;min-width:52px;margin-right:6px;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-popover-hint{margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-area-select{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 3);border:2px dashed var(--pa-accent-bright);background:#6366f114;border-radius:4px}.pa-area-select--dragging{background:#6366f124}.pa-session-panel-float{position:fixed;top:16px;right:16px;z-index:calc(var(--pa-z) + 3);width:360px}.pa-session-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-session-panel-float .pa-glass-panel--sheet{position:relative;top:auto;right:auto;left:auto;width:100%}.pa-session-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-session-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-session-panel-float--dragging .pa-session-drag{cursor:grabbing}.pa-session-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-session-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-session-header{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:4px 8px;align-items:center;padding:14px;border-bottom:1px solid rgba(255,255,255,.1)}.pa-session-header-main{display:flex;align-items:center;gap:4px;grid-column:1;min-width:0}.pa-session-title{all:unset;font-size:14px;font-weight:600;letter-spacing:-.02em}.pa-session-subtitle{grid-column:1;margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-session-actions{grid-column:2;grid-row:1 / span 2}.pa-session-status{margin:0;padding:8px 14px 0;font-size:11px;color:var(--pa-accent-bright)}.pa-session-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.pa-session-target{font-size:11px;font-weight:600;font-family:var(--pa-font-mono, ui-monospace, monospace);color:var(--pa-accent-bright);letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-session-note{margin:0;font-size:13px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word}.pa-session-meta-line{margin:0;font-size:10px;line-height:1.35;color:var(--pa-text-secondary);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.pa-session-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.pa-session-badge{font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:999px;color:var(--pa-text-secondary);background:#ffffff14}.pa-session-edit{flex:1;display:flex;flex-direction:column;gap:8px}.pa-session-item-actions{display:flex;flex-shrink:0;flex-direction:row;align-items:center;gap:2px}.pa-session-action-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;padding-left:0;padding-right:0}.pa-session-list{list-style:none;margin:0;padding:10px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;max-height:calc(60vh - 60px)}.pa-session-item{display:flex;align-items:flex-start;gap:8px;padding:10px;background:#0000002e;border:1px solid rgba(255,255,255,.08);border-radius:var(--pa-glass-radius-control);transition:background .08s ease,border-color .08s ease,box-shadow .08s ease}.pa-session-item--active{border-color:var(--pa-accent-bright);background:#6366f129;box-shadow:0 0 0 1px #6366f159}.pa-session-empty{font-size:12px;color:var(--pa-text-secondary);padding:16px;text-align:center;line-height:1.5}`, Lt = "pixelagent-base-styles";
3402
- function ur() {
3403
- if (typeof document > "u" || document.getElementById(Lt)) return;
3635
+ const Cr = `.pa-root{--pa-glass-blur: 4px;--pa-glass-saturate: 130%;--pa-glass-opacity: .78;--pa-glass-tint: rgba(255, 255, 255, .08);--pa-glass-tint-accent: rgba(99, 102, 241, .32);--pa-glass-border: rgba(255, 255, 255, .28);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .18), inset -1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(0, 0, 0, .18);--pa-glass-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .14), 0 12px 40px rgba(0, 0, 0, .32);--pa-glass-specular: radial-gradient( ellipse 65% 45% at 22% 14%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 38%, transparent 72% );--pa-glass-underglow: radial-gradient( ellipse 95% 38% at 50% 100%, rgba(129, 140, 248, .18) 0%, transparent 60% );--pa-glass-radius-bar: 999px;--pa-glass-radius-panel: 20px;--pa-glass-radius-popover: 16px;--pa-glass-radius-control: 10px;--pa-glass-group-gap: 10px;--pa-glass-morph-duration: .32s;--pa-glass-morph-easing: cubic-bezier(.4, 0, .2, 1);--pa-glass-fallback-bg: rgba(28, 28, 30, .94);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-surface-fill: rgba(255, 255, 255, .06);--pa-glass-control-hover: rgba(255, 255, 255, .12);--pa-glass-control-active: rgba(255, 255, 255, .18);--pa-divider: rgba(255, 255, 255, .08);--pa-tooltip-bg: rgba(20, 20, 24, .82);--pa-tooltip-border: rgba(255, 255, 255, .14);--pa-toolbar-segment-bg: rgba(0, 0, 0, .28);--pa-toolbar-segment-border: rgba(255, 255, 255, .06);--pa-toolbar-divider-color: rgba(255, 255, 255, .12);--pa-text: rgba(255, 255, 255, .92);--pa-text-secondary: rgba(255, 255, 255, .62);--pa-accent: #818cf8;--pa-accent-bright: #a5b4fc;--pa-success: #6ee7b7;--pa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--pa-font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;--pa-z: 2147483640;--pa-field-bg: rgba(255, 255, 255, .04);--pa-field-bg-hover: rgba(255, 255, 255, .06);--pa-field-border: rgba(255, 255, 255, .12);--pa-field-border-hover: rgba(255, 255, 255, .2);--pa-field-border-focus: rgba(255, 255, 255, .32);--pa-field-radius: 8px}@media(prefers-reduced-transparency:reduce){.pa-root{--pa-glass-blur: 0px;--pa-glass-saturate: 100%;--pa-glass-opacity: 1;--pa-glass-tint: var(--pa-glass-fallback-bg);--pa-glass-tint-accent: rgba(99, 102, 241, .85);--pa-glass-border: var(--pa-glass-fallback-border);--pa-glass-rim: none;--pa-glass-specular: none;--pa-glass-underglow: none}}@media(prefers-reduced-motion:reduce){.pa-root{--pa-glass-morph-duration: 0ms}}.pa-root[data-pa-chrome=dim],.pa-root--toolbar-portal[data-pa-chrome=dim]{--pa-glass-blur: 16px;--pa-glass-saturate: 125%;--pa-glass-opacity: .88;--pa-glass-tint: rgba(92, 92, 96, .68);--pa-glass-tint-accent: rgba(100, 100, 104, .74);--pa-glass-surface-fill: rgba(96, 96, 100, .64);--pa-glass-border: rgba(255, 255, 255, .2);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .08), inset -1px 0 0 rgba(255, 255, 255, .08), inset 0 -1px 1px rgba(0, 0, 0, .22);--pa-glass-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 32px rgba(0, 0, 0, .14), 0 24px 48px rgba(0, 0, 0, .1);--pa-glass-specular: radial-gradient( ellipse 68% 48% at 22% 10%, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .1) 40%, transparent 72% );--pa-glass-underglow: none;--pa-glass-fallback-bg: rgba(82, 82, 86, .96);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-control-hover: rgba(255, 255, 255, .1);--pa-glass-control-active: rgba(255, 255, 255, .16);--pa-divider: rgba(255, 255, 255, .1);--pa-tooltip-bg: rgba(82, 82, 86, .96);--pa-tooltip-border: rgba(255, 255, 255, .18);--pa-toolbar-segment-bg: rgba(0, 0, 0, .18);--pa-toolbar-segment-border: rgba(255, 255, 255, .08);--pa-toolbar-divider-color: rgba(255, 255, 255, .14);--pa-text: rgba(255, 255, 255, .94);--pa-text-secondary: rgba(255, 255, 255, .58);--pa-accent: #a5b4fc;--pa-accent-bright: #c7d2fe;--pa-success: #6ee7b7;--pa-field-bg: rgba(255, 255, 255, .06);--pa-field-bg-hover: rgba(255, 255, 255, .09);--pa-field-border: rgba(255, 255, 255, .14);--pa-field-border-hover: rgba(255, 255, 255, .22);--pa-field-border-focus: rgba(255, 255, 255, .32)}.pa-glass-surface{position:relative;overflow:hidden;background:var(--pa-glass-surface-fill);border:1px solid var(--pa-glass-border);box-shadow:var(--pa-glass-shadow),var(--pa-glass-rim);border-radius:inherit;backdrop-filter:blur(4px) saturate(130%);-webkit-backdrop-filter:blur(4px) saturate(130%);will-change:backdrop-filter}.pa-glass-surface.pa-toolbar-glass{backdrop-filter:blur(6px) saturate(138%);-webkit-backdrop-filter:blur(6px) saturate(138%)}.pa-glass-surface-blur{display:none}.pa-glass-surface-bg{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:inherit;background:linear-gradient(180deg,#ffffff1a,#fff0 28%),linear-gradient(0deg,#ffffff08,#fff0 22%);pointer-events:none}@media(prefers-reduced-transparency:reduce){.pa-glass-surface{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border);box-shadow:none}.pa-glass-surface-bg{filter:none;background:transparent}}.pa-glass-surface--accent{background:var(--pa-glass-tint-accent)}.pa-glass-surface-shine{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-specular);mix-blend-mode:screen}.pa-glass-surface:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-underglow);mix-blend-mode:screen}@media(prefers-reduced-transparency:reduce){.pa-glass-surface-shine,.pa-glass-surface:after{display:none}}.pa-glass-surface-content{position:relative;z-index:3}.pa-glass-container{display:flex;align-items:center;gap:var(--pa-glass-group-gap);font-family:var(--pa-font)}.pa-toolbar-float{position:fixed;bottom:24px;left:50%;margin-left:-150px;z-index:var(--pa-z);touch-action:none}.pa-toolbar-float--dragging{-webkit-user-select:none;user-select:none}.pa-toolbar-inner{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 6px}.pa-toolbar-drag{all:unset;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;color:var(--pa-text);cursor:grab;touch-action:none;flex-shrink:0;transition:background .15s ease}.pa-toolbar-drag:hover{background:var(--pa-glass-control-hover)}.pa-brand-cursor{display:block;flex-shrink:0;pointer-events:none}.pa-brand-cursor--pointer{margin-top:-2px;margin-left:-1px}.pa-brand-cursor--minimal{display:block}.pa-toolbar-float--dragging .pa-toolbar-drag{cursor:grabbing;background:#ffffff24}.pa-toolbar-divider{width:1px;height:24px;background:var(--pa-toolbar-divider-color);flex-shrink:0}.pa-toolbar-segment{display:flex;align-items:center;gap:4px;padding:3px 4px;border-radius:999px;background:var(--pa-toolbar-segment-bg);border:1px solid var(--pa-toolbar-segment-border)}.pa-toolbar-capture-select{width:auto;min-width:76px;padding:6px 28px 6px 10px;font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;border-radius:999px;cursor:pointer}.pa-toolbar-close{margin-left:2px;flex-shrink:0}.pa-toolbar-status{font-size:11px;padding:0 8px;white-space:nowrap}.pa-settings-menu{position:absolute;right:8px;bottom:calc(100% + 12px);z-index:2;width:min(280px,calc(100vw - 32px));pointer-events:auto}.pa-settings-menu-panel{width:100%}.pa-settings-menu-inner{padding:14px 16px 16px}.pa-settings-menu-header{margin-bottom:14px}.pa-settings-menu-title{margin:0;font-size:14px;font-weight:600;color:var(--pa-text)}.pa-settings-menu-subtitle{margin:4px 0 0;font-size:11px;color:var(--pa-text-secondary)}.pa-settings-section{padding:12px 0;border-top:1px solid var(--pa-divider)}.pa-settings-section:first-of-type{border-top:none;padding-top:0}.pa-settings-section-label{display:block;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary);margin-bottom:8px}.pa-settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pa-settings-row-value{font-size:12px;color:var(--pa-text)}.pa-settings-hint{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text-secondary)}.pa-glass-group{flex-shrink:0}.pa-glass-group-inner{display:flex;align-items:center;gap:2px;padding:4px 6px}.pa-glass-group--brand .pa-glass-group-inner{padding:6px 14px}.pa-glass-btn{all:unset;box-sizing:border-box;cursor:pointer;font-family:var(--pa-font);font-size:12px;font-weight:500;color:var(--pa-text);padding:6px 12px;border-radius:var(--pa-glass-radius-control);white-space:nowrap;transition:background var(--pa-glass-morph-duration) var(--pa-glass-morph-easing),transform .12s ease,color var(--pa-glass-morph-duration) ease}.pa-glass-btn:hover:not(:disabled){background:var(--pa-glass-control-hover)}.pa-glass-btn:active:not(:disabled){transform:scale(.97);background:var(--pa-glass-control-active)}.pa-glass-btn:disabled{opacity:.38;cursor:not-allowed}.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{position:relative;color:#fff;font-weight:600;padding:8px 16px;background:#ffffff1a;backdrop-filter:blur(12px) saturate(140%);-webkit-backdrop-filter:blur(12px) saturate(140%);border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 1px #fff6,0 4px 16px #00000026}.pa-glass-btn--glass-primary:before,.pa-glass-btn--prominent:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,transparent 45%,transparent 100%);pointer-events:none}.pa-glass-btn--glass-primary:hover:not(:disabled),.pa-glass-btn--prominent:hover:not(:disabled){background:#ffffff29;border-color:#ffffff61;box-shadow:inset 0 1px #ffffff73,0 6px 20px #0003}@media(prefers-reduced-transparency:reduce){.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{backdrop-filter:none;-webkit-backdrop-filter:none;background:#3c3c46e6}}.pa-glass-btn--icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;color:#ffffffbf;background:#ffffff0f;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.14);box-shadow:inset 0 1px #ffffff1f}.pa-glass-btn--icon:hover:not(:disabled){color:#fff;background:#ffffff1f;border-color:#ffffff38}.pa-glass-btn--ghost{color:var(--pa-text-secondary);padding:6px 10px}.pa-glass-btn--ghost:hover:not(:disabled){color:var(--pa-text);background:#ffffff14}.pa-glass-btn--active{background:#6366f173;color:#fff}.pa-glass-btn--sm{padding:2px 8px;font-size:11px}.pa-glass-panel{font-family:var(--pa-font);color:var(--pa-text)}.pa-glass-panel--sheet.pa-glass-panel--left{position:fixed;top:16px;left:16px;z-index:var(--pa-z);width:288px;max-height:calc(100vh - 100px)}.pa-glass-panel--sheet.pa-glass-panel--right{position:fixed;top:16px;right:16px;z-index:var(--pa-z);width:360px;max-height:60vh}.pa-glass-panel--popover{position:fixed;z-index:calc(var(--pa-z) + 2);width:300px}.pa-glass-panel .pa-glass-surface-content{padding:14px;display:flex;flex-direction:column;gap:10px}.pa-glass-panel--sheet .pa-glass-surface-content{padding:14px;overflow-y:auto;max-height:inherit}.pa-glass-panel--sheet.pa-glass-panel--right:not(.pa-edit-panel-glass) .pa-glass-surface-content{padding:0;gap:0}.pa-toolbar-brand{font-weight:600;font-size:12px;color:var(--pa-accent-bright);letter-spacing:-.01em}.pa-mode-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--pa-text-secondary);padding:4px 10px}.pa-status{font-size:11px;font-weight:500;color:var(--pa-success);padding:4px 10px;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:12px;font-weight:600;white-space:nowrap;border-radius:999px;flex-shrink:0;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot--toolbar{padding:8px 16px;min-height:34px}.pa-copy-feedback-slot--session{padding:8px 14px;min-height:34px}.pa-copy-feedback-slot--item{padding:6px 10px;min-width:44px;min-height:28px;font-size:11px}@keyframes pa-status-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.pa-status{animation:none}}.pa-glass-divider{width:1px;height:16px;background:#ffffff26;margin:0 2px;flex-shrink:0}.pa-root{all:initial;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text)}.pa-root--toolbar-portal{all:unset;position:static;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text);pointer-events:none}.pa-root--toolbar-portal .pa-toolbar-float{pointer-events:auto}.pa-root *,.pa-root *:before,.pa-root *:after{box-sizing:border-box}.pa-highlight{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 2);border:2px solid var(--pa-accent);background:#6366f11f;border-radius:4px;box-shadow:0 0 0 1px #6366f140;transition:top .05s,left .05s,width .05s,height .05s,background var(--pa-glass-morph-duration) ease}.pa-highlight-selected{background:#6366f138;border-color:var(--pa-accent-bright);box-shadow:0 0 0 2px #6366f159,0 0 20px #6366f126}.pa-highlight-scope{background:#6366f129;border-style:dashed}.pa-highlight-primary{border-width:2px;background:#6366f147;box-shadow:0 0 0 3px #6366f173,0 0 24px #6366f133}.pa-annotation-badge{position:fixed;pointer-events:auto;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;z-index:calc(var(--pa-z) - 1);min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--pa-font);font-size:12px;font-weight:700;line-height:1;color:#fff;background:#6669f8;border:none;border-radius:999px;box-shadow:0 2px 10px #37348c52;transform:translate(-50%,-50%);transition:top .05s,left .05s,transform .08s ease,background .08s ease,box-shadow .08s ease}.pa-annotation-badge:hover,.pa-annotation-badge--active{background:#7c7ffa;transform:translate(-50%,-50%) scale(1.18);box-shadow:0 0 0 3px #6366f173,0 2px 14px #37348c73}.pa-annotation-preview{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);transform:translateY(-100%);display:flex;flex-direction:column;gap:3px;max-width:260px;padding:8px 10px;border-radius:8px;font-family:var(--pa-font);background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border);box-shadow:0 6px 24px #00000047}.pa-annotation-preview--below{transform:none}.pa-annotation-preview-target{font-family:var(--pa-font-mono, ui-monospace, monospace);font-size:10px;font-weight:600;letter-spacing:-.01em;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-annotation-preview-note{font-size:12px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}@media(prefers-reduced-transparency:reduce){.pa-annotation-preview{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-tooltip{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);font-family:var(--pa-font);font-size:12px;font-weight:600;letter-spacing:-.01em;color:var(--pa-text);padding:4px 8px;border-radius:6px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border)}@media(prefers-reduced-transparency:reduce){.pa-tooltip{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary);font-family:var(--pa-font)}.pa-select,.pa-input,.pa-textarea{font-family:var(--pa-font);font-size:12px;font-weight:400;line-height:1.4;color:var(--pa-text);background-color:var(--pa-field-bg);border:1px solid var(--pa-field-border);border-radius:var(--pa-field-radius);padding:8px 10px;outline:none;width:100%;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.pa-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='rgba(255,255,255,0.45)' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-select:hover:not(:focus),.pa-input:hover:not(:focus),.pa-textarea:hover:not(:focus){background-color:var(--pa-field-bg-hover);border-color:var(--pa-field-border-hover)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{background-color:#ffffff0d;border-color:var(--pa-field-border-focus);box-shadow:inset 0 1px #ffffff0f}.pa-textarea{resize:vertical;min-height:64px;line-height:1.5}@media(prefers-reduced-transparency:reduce){.pa-select,.pa-input,.pa-textarea{background-color:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{border-color:var(--pa-accent)}}.pa-popover-header{display:flex;flex-direction:column;gap:3px}.pa-popover-selector{font-size:11px;font-weight:500;color:var(--pa-accent-bright);word-break:break-all}.pa-popover-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:2px}.pa-edit-panel-float{position:fixed;right:16px;top:16px;z-index:calc(var(--pa-z) + 4);width:312px;max-height:calc(100vh - 32px)}.pa-edit-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-edit-panel-float .pa-glass-panel--sheet{position:relative;top:auto;left:auto;right:auto;width:100%;max-height:calc(100vh - 32px)}.pa-edit-panel-glass .pa-glass-surface-content{display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 32px);padding:14px 14px 12px}.pa-edit-panel-inner{display:flex;flex-direction:column;min-height:0;flex:1;gap:10px}.pa-edit-panel-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0 -4px;padding:0 4px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.pa-edit-panel-sticky{flex-shrink:0;padding-top:4px;border-top:1px solid rgba(255,255,255,.08)}.pa-edit-panel-header{display:flex;align-items:center;gap:8px}.pa-edit-panel-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-edit-panel-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-edit-panel-float--dragging .pa-edit-panel-drag{cursor:grabbing}.pa-edit-panel-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-edit-panel-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-edit-title{all:unset;display:block;font-size:14px;font-weight:600;letter-spacing:-.02em;flex:1}.pa-edit-hint{font-size:12px;color:var(--pa-text-secondary);margin:0;line-height:1.5}.pa-edit-state-hint{font-size:11px;color:var(--pa-text-secondary);margin:0 0 8px;line-height:1.45}.pa-edit-actions{display:flex;gap:8px;margin-top:8px}.pa-edit-actions .pa-glass-btn{display:inline-flex;align-items:center;justify-content:center}.pa-glass-btn-inner{display:inline-flex;align-items:center;gap:6px}.pa-glass-btn-icon{width:14px;height:14px;flex-shrink:0;opacity:.92}.pa-preview-disabled{opacity:.55;pointer-events:none}.pa-edit-meta{display:flex;flex-direction:column;gap:3px;margin-bottom:4px}.pa-edit-meta code,.pa-edit-meta-label{font-size:12px;font-weight:500;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-edit-source{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-source--warn{color:var(--pa-warning, #e8a838);line-height:1.4}.pa-edit-text-input{min-height:72px;font-size:13px;line-height:1.55}.pa-edit-sections{display:flex;flex-direction:column}.pa-edit-section{border-bottom:1px solid rgba(255,255,255,.06)}.pa-edit-section:last-child{border-bottom:none}.pa-edit-section-header{box-sizing:border-box;display:flex;align-items:center;gap:6px;width:100%;padding:10px 2px 8px;color:#ffffffb8}.pa-edit-section-header-toggle,.pa-edit-section-chevron-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;cursor:pointer}.pa-edit-section-header-toggle{flex:1;min-width:0;gap:8px}.pa-edit-section-header:hover{color:#ffffffeb}.pa-edit-section-title{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;text-align:left}.pa-edit-section-action{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;border-radius:6px;cursor:pointer;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-edit-section-action:hover,.pa-edit-section-action[aria-expanded=true]{color:#fffffff2;background:#ffffff14}.pa-edit-section-action-icon{width:15px;height:15px}.pa-edit-section-chevron-btn{flex-shrink:0;padding:2px;margin-left:6px}.pa-edit-section-badge{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-section-chevron{width:16px;height:16px;transform:rotate(-180deg);transition:transform .16s ease;opacity:.55}.pa-edit-section:not(.pa-edit-section--open) .pa-edit-section-chevron{transform:rotate(0)}.pa-edit-section-body{display:flex;flex-direction:column;gap:10px;padding:0 2px 12px}.pa-edit-field-label{display:block;font-size:10px;font-weight:500;letter-spacing:.04em;color:var(--pa-text-secondary);margin-bottom:5px}.pa-edit-stack-field{display:flex;flex-direction:column}.pa-edit-field-block{display:flex;flex-direction:column;gap:6px}.pa-edit-field-grid{display:grid;gap:10px}.pa-edit-field-grid--2{grid-template-columns:1fr 1fr}.pa-edit-mini-field{display:flex;flex-direction:column;min-width:0}.pa-edit-mini-field .pa-select{font-size:12px;padding:7px 8px}.pa-edit-inline-hint{font-size:10px;line-height:1.45;color:var(--pa-text-secondary);margin:0}.pa-edit-split-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}.pa-edit-split-fields .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-segmented{display:flex;width:100%;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#00000047;overflow:hidden}.pa-segmented-btn{all:unset;box-sizing:border-box;flex:1;display:inline-flex;align-items:center;justify-content:center;min-width:0;height:34px;color:#ffffff80;border-right:1px solid rgba(255,255,255,.1);cursor:pointer;transition:background .12s ease,color .12s ease}.pa-segmented-btn:last-child{border-right:none}.pa-segmented-btn:hover{background:#ffffff0f;color:#ffffffd1}.pa-segmented-btn--on{background:#ffffff24;color:#fffffff2}.pa-segmented-icon{display:block;width:16px;height:16px;flex-shrink:0}.pa-segmented-type{font-size:13px;font-weight:600;line-height:1;font-family:var(--pa-font, system-ui, sans-serif)}.pa-segmented-type--bold{font-weight:700}.pa-segmented-type--italic{font-style:italic;font-weight:600}.pa-segmented-type--underline{text-decoration:underline;text-underline-offset:2px}.pa-font-family-select{width:100%;font-size:13px;padding:9px 32px 9px 10px;color:#ffffffe0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff99' d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-font-family-select:invalid,.pa-font-family-select option[value=""]{color:#ffffff73}.pa-edit-size-row .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-edit-size-row .pa-prop-scrub-value{width:100%}.pa-color-field{display:flex;flex-direction:column;gap:6px}.pa-color-field-trigger{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:6px 8px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#00000038;cursor:pointer;transition:border-color .14s ease,background .14s ease}.pa-color-field-trigger:hover{border-color:#ffffff38;background:#ffffff0f}.pa-color-field-trigger[aria-expanded=true]{border-color:#818cf873;background:#6366f11f}.pa-color-field-swatch{width:28px;height:28px;flex-shrink:0;border-radius:8px;border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 0 0 1px #00000026}.pa-color-field-hex{flex:1;min-width:0;pointer-events:none;font-family:var(--pa-font-mono);font-size:12px}.pa-color-picker-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-color-picker-portal .pa-color-picker{pointer-events:auto}.pa-color-picker{position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;padding:14px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14;display:flex;flex-direction:column;gap:12px}.pa-color-picker-header{display:flex;align-items:center;gap:10px}.pa-color-picker-preview{width:22px;height:22px;flex-shrink:0;border-radius:6px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-color-picker-header-label{font-size:13px;font-weight:500;color:#ffffff8c;letter-spacing:-.01em}.pa-color-picker-sb{position:relative;width:100%;height:148px;border-radius:10px;border:1px solid rgba(255,255,255,.1);overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--pa-picker-h, 0) 100% 50%))}.pa-color-picker-sb-thumb{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #00000059,0 2px 6px #00000059;pointer-events:none}.pa-color-picker-hue{position:relative;height:14px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.pa-color-picker-hue-input{position:absolute;top:-4px;right:0;bottom:-4px;left:0;width:100%;height:calc(100% + 8px);margin:0;opacity:0;cursor:pointer}.pa-color-picker-hue-thumb{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #0000004d,0 1px 4px #00000059;pointer-events:none}.pa-color-picker-field{display:flex;flex-direction:column;gap:6px}.pa-color-picker-field--rgb{flex:1;min-width:0}.pa-color-picker-field-label{font-size:11px;font-weight:500;color:#ffffff73;letter-spacing:.02em}.pa-color-picker-input{width:100%;font-family:var(--pa-font-mono);font-size:12px;padding:8px 10px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-color-picker-input:hover{border-color:#fff3!important}.pa-color-picker-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-color-picker-rgb{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pa-color-picker-field--rgb .pa-color-picker-input{text-align:center;padding-left:6px!important;padding-right:6px!important}.pa-color-picker-input[type=number]::-webkit-inner-spin-button,.pa-color-picker-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pa-text-styles-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-text-styles{pointer-events:auto;position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;display:flex;flex-direction:column;padding:8px;gap:8px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14}.pa-text-styles-header{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 0}.pa-text-styles-title{font-size:13px;font-weight:600;color:#ffffffeb;letter-spacing:-.01em}.pa-text-styles-close{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;cursor:pointer;font-size:18px;line-height:1;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-text-styles-close:hover{color:#fffffff2;background:#ffffff14}.pa-text-styles-search{position:relative;display:flex;align-items:center}.pa-text-styles-search-icon{position:absolute;left:10px;color:#fff6;pointer-events:none}.pa-text-styles-search-input{width:100%;font-size:13px;padding:8px 10px 8px 30px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-text-styles-search-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-text-styles-list{display:flex;flex-direction:column;max-height:260px;overflow-y:auto;margin:0 -2px;padding:0 2px}.pa-text-styles-row{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border-radius:8px;cursor:pointer;color:#ffffffe6;transition:background .12s ease}.pa-text-styles-row:hover{background:#ffffff0f}.pa-text-styles-row--active{background:#ffffff1a}.pa-text-styles-specimen{flex-shrink:0;width:26px;font-size:18px;line-height:1;font-weight:500;text-align:center;color:#ffffffeb}.pa-text-styles-row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.pa-text-styles-row-metrics{flex-shrink:0;font-size:12px;color:#ffffff73}.pa-text-styles-empty{margin:0;padding:16px 10px;text-align:center;font-size:12px;color:#ffffff73}.pa-color-field-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}.pa-color-field-label-row .pa-edit-field-label{margin-bottom:0}.pa-color-presets-swatch{flex-shrink:0;width:18px;height:18px;border-radius:5px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-prop-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:10px;padding:2px 0}.pa-prop-row--compact{grid-template-columns:72px minmax(0,1fr)}.pa-prop-label{font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-scrub-label{cursor:ew-resize;-webkit-user-select:none;user-select:none;touch-action:none}.pa-scrub-label:hover,.pa-scrub-label--active{color:var(--pa-text)}.pa-prop-scrub-value{width:100%;text-align:left}.pa-spacing-control{display:flex;align-items:stretch;gap:6px;min-width:0}.pa-spacing-pair,.pa-spacing-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:1;min-width:0}.pa-spacing-grid{grid-template-rows:1fr 1fr}.pa-spacing-cell{position:relative;display:flex;align-items:center;min-width:0}.pa-spacing-cell-icon{position:absolute;left:7px;top:50%;transform:translateY(-50%);display:inline-flex;color:#ffffff8c;pointer-events:none}.pa-spacing-cell-icon--scrub{pointer-events:auto;cursor:ew-resize;touch-action:none}.pa-spacing-cell-icon--scrub:hover,.pa-spacing-cell-icon--active{color:var(--pa-text)}.pa-spacing-cell-input{width:100%;padding:6px 6px 6px 24px!important;text-align:left;font-family:var(--pa-font-mono);font-size:11px}.pa-spacing-cell--mixed .pa-spacing-cell-input{color:#ffffffb3}.pa-spacing-cell--mixed .pa-spacing-cell-icon{color:#fff6}.pa-spacing-toggle{all:unset;display:inline-flex;align-items:center;justify-content:center;width:26px;min-height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.08);color:#ffffff8c;cursor:pointer;flex-shrink:0;transition:background .12s ease,color .12s ease,border-color .12s ease}.pa-spacing-toggle:hover:not(:disabled){background:#ffffff0f;color:#ffffffe6}.pa-spacing-toggle--on{background:#ffffff1f;color:#fffffff2;border-color:#ffffff2e}.pa-spacing-toggle:disabled{opacity:.4;cursor:not-allowed}.pa-edit-panel-glass .pa-prop-row .pa-input{font-family:var(--pa-font-mono);font-size:11px;padding:6px 8px;border-radius:6px;color:#ffffffe0}.pa-edit-panel-glass .pa-select,.pa-edit-panel-glass .pa-textarea{border-radius:var(--pa-field-radius)}.pa-edit-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding-top:10px}.pa-change-count{font-size:11px;color:var(--pa-text-secondary)}.pa-change-count--success{color:var(--pa-success)}.pa-change-count--error{color:#fca5a5}.pa-popover-body{display:flex;flex-direction:column;gap:10px}.pa-popover-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pa-popover-context{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:var(--pa-field-radius);background:#0003;border:1px solid rgba(255,255,255,.08)}.pa-popover-context-line{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text)}.pa-popover-context-label{display:inline-block;min-width:52px;margin-right:6px;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-popover-hint{margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-area-select{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 3);border:2px dashed var(--pa-accent-bright);background:#6366f114;border-radius:4px}.pa-area-select--dragging{background:#6366f124}.pa-session-panel-float{position:fixed;top:16px;right:16px;z-index:calc(var(--pa-z) + 3);width:360px}.pa-session-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-session-panel-float .pa-glass-panel--sheet{position:relative;top:auto;right:auto;left:auto;width:100%}.pa-session-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-session-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-session-panel-float--dragging .pa-session-drag{cursor:grabbing}.pa-session-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-session-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-session-header{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:4px 8px;align-items:center;padding:14px;border-bottom:1px solid rgba(255,255,255,.1)}.pa-session-header-main{display:flex;align-items:center;gap:4px;grid-column:1;min-width:0}.pa-session-title{all:unset;font-size:14px;font-weight:600;letter-spacing:-.02em}.pa-session-subtitle{grid-column:1;margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-session-actions{grid-column:2;grid-row:1 / span 2}.pa-session-status{margin:0;padding:8px 14px 0;font-size:11px;color:var(--pa-accent-bright)}.pa-session-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.pa-session-target{font-size:11px;font-weight:600;font-family:var(--pa-font-mono, ui-monospace, monospace);color:var(--pa-accent-bright);letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-session-note{margin:0;font-size:13px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word}.pa-session-meta-line{margin:0;font-size:10px;line-height:1.35;color:var(--pa-text-secondary);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.pa-session-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.pa-session-badge{font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:999px;color:var(--pa-text-secondary);background:#ffffff14}.pa-session-edit{flex:1;display:flex;flex-direction:column;gap:8px}.pa-session-item-actions{display:flex;flex-shrink:0;flex-direction:row;align-items:center;gap:2px}.pa-session-action-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;padding-left:0;padding-right:0}.pa-session-list{list-style:none;margin:0;padding:10px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;max-height:calc(60vh - 60px)}.pa-session-item{display:flex;align-items:flex-start;gap:8px;padding:10px;background:#0000002e;border:1px solid rgba(255,255,255,.08);border-radius:var(--pa-glass-radius-control);transition:background .08s ease,border-color .08s ease,box-shadow .08s ease}.pa-session-item--active{border-color:var(--pa-accent-bright);background:#6366f129;box-shadow:0 0 0 1px #6366f159}.pa-session-empty{font-size:12px;color:var(--pa-text-secondary);padding:16px;text-align:center;line-height:1.5}`, Tt = "pixelagent-base-styles";
3636
+ function Mr() {
3637
+ if (typeof document > "u" || document.getElementById(Tt)) return;
3404
3638
  const e = document.createElement("style");
3405
- e.id = Lt, e.textContent = fr, document.head.appendChild(e);
3406
- }
3407
- ur();
3408
- const $t = "/__pixelagent/apply", Et = "pixelagent-runtime-styles";
3409
- let Pt = 0;
3410
- const Je = /* @__PURE__ */ new WeakMap();
3411
- function gr(e) {
3412
- let t = Je.get(e);
3639
+ e.id = Tt, e.textContent = Cr, document.head.appendChild(e);
3640
+ }
3641
+ Mr();
3642
+ const Rt = "/__pixelagent/apply", Ot = "pixelagent-runtime-styles";
3643
+ let Dt = 0;
3644
+ const et = /* @__PURE__ */ new WeakMap();
3645
+ function Ar(e) {
3646
+ let t = et.get(e);
3413
3647
  if (t) return t;
3414
3648
  for (const n of Array.from(e.classList))
3415
3649
  if (n.startsWith("pa-runtime-"))
3416
- return Je.set(e, n), n;
3417
- return Pt += 1, t = `pa-runtime-${Pt}`, Je.set(e, t), e.classList.add(t), t;
3650
+ return et.set(e, n), n;
3651
+ return Dt += 1, t = `pa-runtime-${Dt}`, et.set(e, t), e.classList.add(t), t;
3418
3652
  }
3419
- function hr() {
3420
- let e = document.getElementById(Et);
3421
- return e || (e = document.createElement("style"), e.id = Et, document.head.appendChild(e)), e;
3653
+ function zr() {
3654
+ let e = document.getElementById(Ot);
3655
+ return e || (e = document.createElement("style"), e.id = Ot, document.head.appendChild(e)), e;
3422
3656
  }
3423
- function mr(e, t, n, r) {
3424
- const o = hr(), i = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = new RegExp(
3657
+ function Sr(e, t, n, r) {
3658
+ const o = zr(), i = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = new RegExp(
3425
3659
  `(\\.${i}:${t}\\s*\\{)([\\s\\S]*?)(\\})`,
3426
3660
  "m"
3427
3661
  ), l = `${n}: ${r} !important`;
3428
3662
  let p = o.textContent ?? "";
3429
- const d = p.match(s);
3430
- if (d) {
3431
- const h = d[2], g = new RegExp(`(\\s*${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*:\\s*)[^;]+;?`);
3663
+ const u = p.match(s);
3664
+ if (u) {
3665
+ const h = u[2], f = new RegExp(`(\\s*${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*:\\s*)[^;]+;?`);
3432
3666
  let c;
3433
- if (g.test(h))
3434
- c = h.replace(g, `$1${r} !important;`);
3667
+ if (f.test(h))
3668
+ c = h.replace(f, `$1${r} !important;`);
3435
3669
  else {
3436
- const u = h.replace(/\s+$/, ""), m = u.endsWith(";") || u === "" ? "" : ";";
3437
- c = `${u}${m}
3670
+ const g = h.replace(/\s+$/, ""), x = g.endsWith(";") || g === "" ? "" : ";";
3671
+ c = `${g}${x}
3438
3672
  ${l};
3439
3673
  `;
3440
3674
  }
@@ -3449,11 +3683,11 @@ function mr(e, t, n, r) {
3449
3683
  `;
3450
3684
  o.textContent = p;
3451
3685
  }
3452
- function It(e) {
3686
+ function Ft(e) {
3453
3687
  const t = Math.min(e.startX, e.currentX), n = Math.min(e.startY, e.currentY), r = Math.abs(e.currentX - e.startX), o = Math.abs(e.currentY - e.startY);
3454
3688
  return { x: t, y: n, width: r, height: o };
3455
3689
  }
3456
- function xr({
3690
+ function Lr({
3457
3691
  ui: e,
3458
3692
  hostTheme: t,
3459
3693
  onHostThemeChange: n,
@@ -3461,180 +3695,180 @@ function xr({
3461
3695
  onApply: o,
3462
3696
  runtimeStateStyles: i
3463
3697
  } = {}) {
3464
- const s = dr({ ui: e, hostTheme: t, onHostThemeChange: n }), [l, p] = A(null);
3465
- U(() => {
3698
+ const s = Nr({ ui: e, hostTheme: t, onHostThemeChange: n }), [l, p] = S(null);
3699
+ W(() => {
3466
3700
  if (r || o) return;
3467
- let C = !1;
3468
- return fetch($t, { method: "GET" }).then((L) => {
3469
- !C && L.status === 405 && p($t);
3701
+ let M = !1;
3702
+ return fetch(Rt, { method: "GET" }).then((L) => {
3703
+ !M && L.status === 405 && p(Rt);
3470
3704
  }).catch(() => {
3471
3705
  }), () => {
3472
- C = !0;
3706
+ M = !0;
3473
3707
  };
3474
3708
  }, [r, o]);
3475
- const [d, h] = A(!1), [g, c] = A("idle"), [u, m] = A("element"), {
3476
- annotations: v,
3477
- setAnnotations: N,
3709
+ const [u, h] = S(!1), [f, c] = S("idle"), [g, x] = S("element"), {
3710
+ annotations: y,
3711
+ setAnnotations: k,
3478
3712
  updateAnnotation: E,
3479
- removeAnnotation: x
3480
- } = pr(), [w, M] = A(null), [y, S] = A(null), [k, R] = A([]), [P, $] = A(null), [D, X] = A(null), [ue, K] = A(!1), [ae, q] = A(null), b = d && g === "annotate" && v.length > 0 && !ue, [B, re] = A("this-instance"), [se, ge] = A("normal"), [z, I] = A(null), [F, O] = A(null), [W, Y] = A(null), Z = j(null), _ = j(null), H = T(
3481
- (C, L) => {
3482
- _.current && clearTimeout(_.current), I(C), O((L == null ? void 0 : L.entryId) ?? null), Y((L == null ? void 0 : L.copyAllFrom) ?? null), _.current = setTimeout(() => {
3483
- I(null), O(null), Y(null);
3713
+ removeAnnotation: m
3714
+ } = kr(), [v, N] = S(null), [w, A] = S(null), [F, C] = S([]), [P, I] = S(null), [R, j] = S(null), [G, re] = S(!1), [K, q] = S(null), le = u && f === "annotate" && y.length > 0 && !G, [b, Z] = S("this-instance"), [ce, ge] = S("normal"), [z, T] = S(null), [D, O] = S(null), [U, Y] = S(null), Q = V(null), B = V(null), _ = $(
3715
+ (M, L) => {
3716
+ B.current && clearTimeout(B.current), T(M), O((L == null ? void 0 : L.entryId) ?? null), Y((L == null ? void 0 : L.copyAllFrom) ?? null), B.current = setTimeout(() => {
3717
+ T(null), O(null), Y(null);
3484
3718
  }, 2500);
3485
3719
  },
3486
3720
  []
3487
- ), Q = T(
3488
- async (C, L, ee) => {
3489
- if (C)
3721
+ ), ee = $(
3722
+ async (M, L, te) => {
3723
+ if (M)
3490
3724
  try {
3491
- await Ft(C), H(L, ee);
3725
+ await Vt(M), _(L, te);
3492
3726
  } catch {
3493
- H("Copy failed — check clipboard permissions", ee);
3727
+ _("Copy failed — check clipboard permissions", te);
3494
3728
  }
3495
3729
  },
3496
- [H]
3497
- ), he = T(
3498
- (C, L) => {
3499
- C.length === 0 && !L || ($({ elements: C, areaBbox: L }), S(C[0] ?? null));
3730
+ [_]
3731
+ ), he = $(
3732
+ (M, L) => {
3733
+ M.length === 0 && !L || (I({ elements: M, areaBbox: L }), A(M[0] ?? null));
3500
3734
  },
3501
3735
  []
3502
- ), Be = T(
3503
- (C) => {
3504
- if (!(!d || g !== "annotate" || Te(C.target))) {
3505
- if (D) {
3506
- X(
3507
- (L) => L && { ...L, currentX: C.clientX, currentY: C.clientY }
3736
+ ), He = $(
3737
+ (M) => {
3738
+ if (!(!u || f !== "annotate" || Oe(M.target))) {
3739
+ if (R) {
3740
+ j(
3741
+ (L) => L && { ...L, currentX: M.clientX, currentY: M.clientY }
3508
3742
  );
3509
3743
  return;
3510
3744
  }
3511
- u !== "area" && M(At(C.clientX, C.clientY));
3745
+ g !== "area" && N(Pt(M.clientX, M.clientY));
3512
3746
  }
3513
3747
  },
3514
- [d, g, D, u]
3515
- ), _e = T(
3516
- (C) => {
3517
- !d || g !== "annotate" || Te(C.target) || u !== "area" || C.button !== 0 || (C.preventDefault(), C.stopPropagation(), X({
3518
- startX: C.clientX,
3519
- startY: C.clientY,
3520
- currentX: C.clientX,
3521
- currentY: C.clientY
3522
- }), $(null));
3748
+ [u, f, R, g]
3749
+ ), Ve = $(
3750
+ (M) => {
3751
+ !u || f !== "annotate" || Oe(M.target) || g !== "area" || M.button !== 0 || (M.preventDefault(), M.stopPropagation(), j({
3752
+ startX: M.clientX,
3753
+ startY: M.clientY,
3754
+ currentX: M.clientX,
3755
+ currentY: M.clientY
3756
+ }), I(null));
3523
3757
  },
3524
- [d, g, u]
3525
- ), He = T(() => {
3526
- if (!D) return;
3527
- const C = It(D);
3528
- if (X(null), C.width < 8 || C.height < 8) return;
3529
- const L = vn(C, st);
3530
- he(L, C);
3531
- }, [D, he]), Ve = T(
3532
- (C) => {
3533
- if (!d || g !== "annotate" || Te(C.target) || u === "area") return;
3534
- C.preventDefault(), C.stopPropagation();
3535
- const L = At(C.clientX, C.clientY);
3758
+ [u, f, g]
3759
+ ), We = $(() => {
3760
+ if (!R) return;
3761
+ const M = Ft(R);
3762
+ if (j(null), M.width < 8 || M.height < 8) return;
3763
+ const L = kn(M, pt);
3764
+ he(L, M);
3765
+ }, [R, he]), Ue = $(
3766
+ (M) => {
3767
+ if (!u || f !== "annotate" || Oe(M.target) || g === "area") return;
3768
+ M.preventDefault(), M.stopPropagation();
3769
+ const L = Pt(M.clientX, M.clientY);
3536
3770
  if (!L) return;
3537
- if (C.shiftKey || u === "multi") {
3538
- R((oe) => oe.includes(L) ? oe.filter((V) => V !== L) : [...oe, L]), S(L);
3771
+ if (M.shiftKey || g === "multi") {
3772
+ C((oe) => oe.includes(L) ? oe.filter((H) => H !== L) : [...oe, L]), A(L);
3539
3773
  return;
3540
3774
  }
3541
- const ee = k.length > 0 ? k : [L];
3542
- he(ee.includes(L) ? ee : [L]);
3775
+ const te = F.length > 0 ? F : [L];
3776
+ he(te.includes(L) ? te : [L]);
3543
3777
  },
3544
- [d, g, u, k, he]
3778
+ [u, f, g, F, he]
3545
3779
  );
3546
- U(() => {
3547
- !y || B !== "all-instances" || Dt(y) <= 1 && re("this-instance");
3548
- }, [y, B]), U(() => {
3549
- if (d)
3550
- return document.addEventListener("mousemove", Be, !0), document.addEventListener("mousedown", _e, !0), document.addEventListener("mouseup", He, !0), document.addEventListener("click", Ve, !0), () => {
3551
- document.removeEventListener("mousemove", Be, !0), document.removeEventListener("mousedown", _e, !0), document.removeEventListener("mouseup", He, !0), document.removeEventListener("click", Ve, !0);
3780
+ W(() => {
3781
+ !w || b !== "all-instances" || _t(w) <= 1 && Z("this-instance");
3782
+ }, [w, b]), W(() => {
3783
+ if (u)
3784
+ return document.addEventListener("mousemove", He, !0), document.addEventListener("mousedown", Ve, !0), document.addEventListener("mouseup", We, !0), document.addEventListener("click", Ue, !0), () => {
3785
+ document.removeEventListener("mousemove", He, !0), document.removeEventListener("mousedown", Ve, !0), document.removeEventListener("mouseup", We, !0), document.removeEventListener("click", Ue, !0);
3552
3786
  };
3553
- }, [d, Be, _e, He, Ve]);
3554
- const nn = T(
3555
- (C, L) => {
3556
- if (!P || !C.trim()) return;
3557
- const { elements: ee, areaBbox: oe } = P;
3558
- if (ee.length === 0 && !oe) return;
3559
- const Me = Ya({
3560
- elements: ee,
3561
- note: C,
3787
+ }, [u, He, Ve, We, Ue]);
3788
+ const on = $(
3789
+ (M, L) => {
3790
+ if (!P || !M.trim()) return;
3791
+ const { elements: te, areaBbox: oe } = P;
3792
+ if (te.length === 0 && !oe) return;
3793
+ const Ae = rr({
3794
+ elements: te,
3795
+ note: M,
3562
3796
  areaBbox: oe
3563
3797
  });
3564
- N((V) => [...V, Me]), K(!1), L ? ($(null), S(null)) : ($(null), S(null), R([]));
3798
+ k((H) => [...H, Ae]), re(!1), L ? (I(null), A(null)) : (I(null), A(null), C([]));
3565
3799
  },
3566
- [P, N]
3567
- ), an = T(() => {
3568
- $(null), S(null);
3569
- }, []), lt = T(
3570
- async (C) => {
3571
- const L = wn(v);
3572
- await Q(L, "Copied all!", { copyAllFrom: C });
3800
+ [P, k]
3801
+ ), sn = $(() => {
3802
+ I(null), A(null);
3803
+ }, []), dt = $(
3804
+ async (M) => {
3805
+ const L = Nn(y);
3806
+ await ee(L, "Copied all!", { copyAllFrom: M });
3573
3807
  },
3574
- [v, Q]
3575
- ), rn = T(
3576
- async (C) => {
3577
- const L = v.find((ee) => ee.id === C);
3578
- L && await Q(yn(L), "Copied!", { entryId: C });
3808
+ [y, ee]
3809
+ ), ln = $(
3810
+ async (M) => {
3811
+ const L = y.find((te) => te.id === M);
3812
+ L && await ee(Cn(L), "Copied!", { entryId: M });
3579
3813
  },
3580
- [v, Q]
3581
- ), on = T(
3582
- async (C) => {
3814
+ [y, ee]
3815
+ ), cn = $(
3816
+ async (M) => {
3583
3817
  const L = [];
3584
- for (const [V, te] of C)
3585
- for (const [me, ie] of te)
3586
- ie.length > 0 && L.push([V, me, ie]);
3818
+ for (const [H, ne] of M)
3819
+ for (const [me, ie] of ne)
3820
+ ie.length > 0 && L.push([H, me, ie]);
3587
3821
  if (L.length === 0) return { applied: !1 };
3588
3822
  if (i) {
3589
- for (const [V, te, me] of L) {
3590
- if (te === "normal") continue;
3591
- const ie = gr(V);
3823
+ for (const [H, ne, me] of L) {
3824
+ if (ne === "normal") continue;
3825
+ const ie = Ar(H);
3592
3826
  for (const ze of me)
3593
- V.style.removeProperty(ze.property), mr(ie, te, ze.property, ze.newValue);
3827
+ H.style.removeProperty(ze.property), Sr(ie, ne, ze.property, ze.newValue);
3594
3828
  }
3595
- for (const [V, te, me] of L)
3596
- if (te === "normal")
3829
+ for (const [H, ne, me] of L)
3830
+ if (ne === "normal")
3597
3831
  for (const ie of me)
3598
- V.style.setProperty(ie.property, ie.newValue);
3599
- return H("Change applied"), { applied: !0, skipRevert: !0 };
3832
+ H.style.setProperty(ie.property, ie.newValue);
3833
+ return _("Change applied"), { applied: !0, skipRevert: !0 };
3600
3834
  }
3601
- const ee = r ?? l ?? void 0, oe = [];
3602
- for (const [V, te, me] of L) {
3603
- const ie = nt(V), ze = {
3835
+ const te = r ?? l ?? void 0, oe = [];
3836
+ for (const [H, ne, me] of L) {
3837
+ const ie = it(H), ze = {
3604
3838
  schemaVersion: 1,
3605
- elementSelector: Ot(V, B),
3839
+ elementSelector: Ht(H, b),
3606
3840
  sourceFile: ie.sourceFile,
3607
3841
  lineNumber: ie.lineNumber,
3608
- targetScope: B,
3609
- state: te,
3610
- stylingSystem: Rt(V),
3842
+ targetScope: b,
3843
+ state: ne,
3844
+ stylingSystem: Bt(H),
3611
3845
  changes: me
3612
3846
  };
3613
- oe.push(await Ta(ze, { applyEndpoint: ee, onApply: o }));
3847
+ oe.push(await Ya(ze, { applyEndpoint: te, onApply: o }));
3614
3848
  }
3615
- const Me = oe.every(
3616
- (V) => V.mode === "mcp" && V.result.success && V.result.linesChanged.length > 0
3849
+ const Ae = oe.every(
3850
+ (H) => H.mode === "mcp" && H.result.success && H.result.linesChanged.length > 0
3617
3851
  );
3618
- return H(Me ? "Change applied" : "Apply failed"), oe.forEach((V, te) => {
3619
- V.mode === "error" ? console.error(`[pixelagent] Apply #${te} failed:`, V.message) : V.mode === "clipboard" ? console.warn(`[pixelagent] Apply #${te} fell back to clipboard`) : V.mode === "mcp" && !V.result.success && console.warn(`[pixelagent] Apply #${te} reported no changes:`, V.result);
3620
- }), { applied: Me };
3852
+ return _(Ae ? "Change applied" : "Apply failed"), oe.forEach((H, ne) => {
3853
+ H.mode === "error" ? console.error(`[pixelagent] Apply #${ne} failed:`, H.message) : H.mode === "clipboard" ? console.warn(`[pixelagent] Apply #${ne} fell back to clipboard`) : H.mode === "mcp" && !H.result.success && console.warn(`[pixelagent] Apply #${ne} reported no changes:`, H.result);
3854
+ }), { applied: Ae };
3621
3855
  },
3622
- [B, r, l, o, i, H]
3623
- ), ct = (C) => {
3624
- s.setSettingsOpen(!1), h(!0), c(C), S(null), M(null), $(null), R([]), X(null), q(null), C === "annotate" && K(!1);
3625
- }, sn = () => {
3626
- h(!1), c("idle"), S(null), M(null), $(null), R([]), X(null), K(!1), q(null);
3627
- }, ln = D ? It(D) : null;
3628
- return /* @__PURE__ */ f(
3856
+ [b, r, l, o, i, _]
3857
+ ), ut = (M) => {
3858
+ s.setSettingsOpen(!1), h(!0), c(M), A(null), N(null), I(null), C([]), j(null), q(null), M === "annotate" && re(!1);
3859
+ }, pn = () => {
3860
+ h(!1), c("idle"), A(null), N(null), I(null), C([]), j(null), re(!1), q(null);
3861
+ }, dn = R ? Ft(R) : null;
3862
+ return /* @__PURE__ */ d(
3629
3863
  "div",
3630
3864
  {
3631
- ref: Z,
3865
+ ref: Q,
3632
3866
  className: "pa-root",
3633
3867
  "data-pixelagent-root": !0,
3634
3868
  ...s.rootAttributes,
3635
3869
  children: [
3636
3870
  /* @__PURE__ */ a(
3637
- cr,
3871
+ yr,
3638
3872
  {
3639
3873
  rootAttributes: s.rootAttributes,
3640
3874
  hostTheme: s.hostTheme,
@@ -3643,96 +3877,96 @@ function xr({
3643
3877
  onToggleSettings: s.toggleSettings,
3644
3878
  onCloseSettings: () => s.setSettingsOpen(!1),
3645
3879
  onToggleHostTheme: s.toggleHostTheme,
3646
- active: d,
3647
- mode: g,
3648
- captureMode: u,
3649
- annotationCount: v.length,
3650
- multiSelectCount: k.length,
3880
+ active: u,
3881
+ mode: f,
3882
+ captureMode: g,
3883
+ annotationCount: y.length,
3884
+ multiSelectCount: F.length,
3651
3885
  copyStatus: z,
3652
- copyAllFrom: W,
3653
- onActivateAnnotate: () => ct("annotate"),
3654
- onActivateEdit: () => ct("edit"),
3655
- onDeactivate: sn,
3656
- onCopyAll: () => lt("toolbar"),
3657
- onCaptureModeChange: m,
3886
+ copyAllFrom: U,
3887
+ onActivateAnnotate: () => ut("annotate"),
3888
+ onActivateEdit: () => ut("edit"),
3889
+ onDeactivate: pn,
3890
+ onCopyAll: () => dt("toolbar"),
3891
+ onCaptureModeChange: x,
3658
3892
  onConfirmMultiSelect: () => {
3659
- k.length > 0 && he(k);
3893
+ F.length > 0 && he(F);
3660
3894
  }
3661
3895
  }
3662
3896
  ),
3663
- d && g === "annotate" && /* @__PURE__ */ f(J, { children: [
3897
+ u && f === "annotate" && /* @__PURE__ */ d(J, { children: [
3664
3898
  /* @__PURE__ */ a(
3665
- Vt,
3899
+ Yt,
3666
3900
  {
3667
- element: w,
3668
- selected: y,
3669
- multiSelected: k
3901
+ element: v,
3902
+ selected: w,
3903
+ multiSelected: F
3670
3904
  }
3671
3905
  ),
3672
3906
  /* @__PURE__ */ a(
3673
- Ja,
3907
+ cr,
3674
3908
  {
3675
- annotations: v,
3676
- activeId: ae,
3909
+ annotations: y,
3910
+ activeId: K,
3677
3911
  onActiveChange: q
3678
3912
  }
3679
3913
  ),
3680
- /* @__PURE__ */ a(ja, { area: ln, isDragging: !!D })
3914
+ /* @__PURE__ */ a(ar, { area: dn, isDragging: !!R })
3681
3915
  ] }),
3682
- d && g === "annotate" && P && /* @__PURE__ */ a(
3683
- Ua,
3916
+ u && f === "annotate" && P && /* @__PURE__ */ a(
3917
+ nr,
3684
3918
  {
3685
3919
  elements: P.elements,
3686
3920
  areaBbox: P.areaBbox,
3687
- onSubmit: nn,
3688
- onCancel: an
3921
+ onSubmit: on,
3922
+ onCancel: sn
3689
3923
  }
3690
3924
  ),
3691
- d && g === "edit" && /* @__PURE__ */ a(
3692
- Ia,
3925
+ u && f === "edit" && /* @__PURE__ */ a(
3926
+ ja,
3693
3927
  {
3694
- selectedElement: y,
3695
- hoveredElement: w,
3696
- onSelectElement: S,
3697
- onHoverElement: M,
3698
- targetScope: B,
3699
- onTargetScopeChange: re,
3700
- elementState: se,
3928
+ selectedElement: w,
3929
+ hoveredElement: v,
3930
+ onSelectElement: A,
3931
+ onHoverElement: N,
3932
+ targetScope: b,
3933
+ onTargetScopeChange: Z,
3934
+ elementState: ce,
3701
3935
  onElementStateChange: ge,
3702
- onApply: on,
3703
- applyStatus: g === "edit" ? z : null,
3704
- isToolbarTarget: Te
3936
+ onApply: cn,
3937
+ applyStatus: f === "edit" ? z : null,
3938
+ isToolbarTarget: Oe
3705
3939
  }
3706
3940
  ),
3707
- b && /* @__PURE__ */ a(
3708
- nr,
3941
+ le && /* @__PURE__ */ a(
3942
+ gr,
3709
3943
  {
3710
- annotations: v,
3711
- onClose: () => K(!0),
3712
- onCopyAll: () => lt("session"),
3713
- onCopyOne: rn,
3714
- onRemove: x,
3944
+ annotations: y,
3945
+ onClose: () => re(!0),
3946
+ onCopyAll: () => dt("session"),
3947
+ onCopyOne: ln,
3948
+ onRemove: m,
3715
3949
  onUpdate: E,
3716
- activeId: ae,
3950
+ activeId: K,
3717
3951
  onActiveChange: q,
3718
3952
  copyStatus: z,
3719
- copiedEntryId: F,
3720
- copyAllFrom: W
3953
+ copiedEntryId: D,
3954
+ copyAllFrom: U
3721
3955
  }
3722
3956
  )
3723
3957
  ]
3724
3958
  }
3725
3959
  );
3726
3960
  }
3727
- function br() {
3961
+ function $r() {
3728
3962
  return typeof process < "u" && process.env.NODE_ENV !== "production";
3729
3963
  }
3730
- function Nr() {
3731
- return br() ? /* @__PURE__ */ a(xr, {}) : null;
3964
+ function Rr() {
3965
+ return $r() ? /* @__PURE__ */ a(Lr, {}) : null;
3732
3966
  }
3733
3967
  export {
3734
- xr as PixelAgent,
3735
- Nr as PixelAgentDev,
3736
- br as isDevEnvironment
3968
+ Lr as PixelAgent,
3969
+ Rr as PixelAgentDev,
3970
+ $r as isDevEnvironment
3737
3971
  };
3738
3972
  //# sourceMappingURL=pixelagent.js.map