ryugi-artifacts 1.40.0 → 1.41.1

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,17 +1,17 @@
1
1
  import './stylex-Bp5PFQ3Y.css';
2
2
  import './index-uM2HnLXF.css';
3
- import { C as e, E as t, S as n, T as r, _ as i, a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./ids-DDz78ZZ5.js";
4
- import { d as T, f as E, g as D, h as O, l as k, m as A, n as j, o as ee, p as M, r as te, s as ne, t as re, u as ie } from "./relayConnection-CoSjRI7m.js";
5
- import { a as ae, i as N, o as P, r as F, s as oe, t as se } from "./Canvas-BBqpPRdY.js";
6
- import { a as ce, c as I, d as L, f as le, i as ue, l as R, m as z, n as de, o as fe, p as pe, r as me, s as he, t as B, u as V } from "./cloud-BA1xJLJk.js";
7
- import { A as H, C as U, D as ge, E as _e, M as ve, N as ye, O as be, P as xe, S as Se, T as Ce, a as we, c as Te, d as Ee, g as De, i as Oe, j as ke, k as Ae, l as je, m as Me, n as Ne, o as Pe, p as W, r as Fe, s as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He } from "./useCloudHeader-DwNI6tTZ.js";
8
- import { memo as Ue, useCallback as G, useEffect as K, useId as We, useLayoutEffect as Ge, useMemo as q, useReducer as Ke, useRef as J, useState as Y, useSyncExternalStore as qe } from "react";
9
- import { Accordion as Je, ActionIcon as Ye, Button as Xe, ColorPicker as Ze, DropdownMenu as Qe, Icon as $e, IconProvider as et, Input as tt, InputNumber as nt, Popover as rt, Segmented as it, Select as at, Slider as ot, Switch as st, TabsIndicator as ct, TabsList as lt, TabsPanel as ut, TabsRoot as dt, TabsTab as ft, Tree as pt } from "@lobehub/ui";
10
- import { ArrowDown as mt, ArrowRight as ht, Ban as gt, Check as _t, CheckCircle2 as vt, ChevronDown as yt, ChevronLeft as bt, ChevronRight as xt, Circle as St, CircleAlert as Ct, Clock3 as wt, CloudUpload as Tt, Code2 as Et, Columns3 as Dt, Copy as Ot, Download as kt, Ellipsis as At, Film as jt, Frame as Mt, Grid2X2 as Nt, Hand as Pt, Image as Ft, LoaderCircle as It, Maximize2 as Lt, MessageCirclePlus as Rt, Minus as zt, MousePointer2 as Bt, PanelRight as Vt, Play as Ht, RotateCcw as Ut, Rows3 as Wt, SlidersHorizontal as Gt, SquareDashed as Kt, Type as qt, X as Jt } from "lucide-react";
11
- import { useReducedMotion as Yt } from "motion/react";
3
+ import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, v as C, w, y as T } from "./ids-AIzX298J.js";
4
+ import { d as E, f as D, g as O, h as k, l as A, m as j, n as ee, o as te, p as ne, r as re, s as ie, t as ae, u as oe } from "./relayConnection-CoSjRI7m.js";
5
+ import { a as M, i as se, o as N, r as ce, s as le, t as ue } from "./Canvas-BsBvccuh.js";
6
+ import { a as P, c as de, d as F, f as fe, i as I, l as L, m as pe, n as me, o as he, p as ge, r as _e, s as R, t as z, u as B } from "./cloud-BA1xJLJk.js";
7
+ import { A as V, C as H, D as ve, E as ye, M as be, N as xe, O as Se, P as Ce, S as we, T as Te, a as Ee, c as De, d as Oe, g as ke, i as Ae, j as je, k as Me, l as Ne, m as Pe, n as Fe, o as U, p as Ie, r as Le, s as Re, t as ze, u as W, v as Be, w as Ve, x as He, y as Ue } from "./useCloudHeader-DwNI6tTZ.js";
8
+ import { memo as We, useCallback as G, useEffect as K, useId as Ge, useLayoutEffect as Ke, useMemo as q, useReducer as qe, useRef as J, useState as Y, useSyncExternalStore as Je } from "react";
9
+ import { Accordion as Ye, ActionIcon as Xe, Button as Ze, ColorPicker as Qe, DropdownMenu as $e, Icon as et, IconProvider as tt, Input as nt, InputNumber as rt, Popover as it, Segmented as at, Select as ot, Slider as st, Switch as ct, TabsIndicator as lt, TabsList as ut, TabsPanel as dt, TabsRoot as ft, TabsTab as pt, Tree as mt } from "@lobehub/ui";
10
+ import { ArrowDown as ht, ArrowRight as gt, Ban as _t, Check as vt, CheckCircle2 as yt, ChevronDown as bt, ChevronLeft as xt, ChevronRight as St, Circle as Ct, CircleAlert as wt, Clock3 as Tt, CloudUpload as Et, Code2 as Dt, Columns3 as Ot, Copy as kt, Download as At, Ellipsis as jt, Film as Mt, Frame as Nt, Grid2X2 as Pt, Hand as Ft, Image as It, LoaderCircle as Lt, Maximize2 as Rt, MessageCirclePlus as zt, Minus as Bt, MousePointer2 as Vt, PanelRight as Ht, Play as Ut, RotateCcw as Wt, Rows3 as Gt, SlidersHorizontal as Kt, SquareDashed as qt, Type as Jt, X as Yt } from "lucide-react";
11
+ import { useReducedMotion as Xt } from "motion/react";
12
12
  import { Fragment as X, jsx as Z, jsxs as Q } from "react/jsx-runtime";
13
13
  //#region src/shared/tweaks.ts
14
- function Xt() {
14
+ function Zt() {
15
15
  let e = (e) => !!e && typeof e == "object" && !Array.isArray(e), t = (e, t = 512) => typeof e == "string" && e.length <= t, n = (e) => typeof e == "number" && Number.isFinite(e) && Math.abs(e) <= 1e9, r = (e) => typeof e == "string" && /^#[\da-f]{6}$/i.test(e);
16
16
  function i(e, i) {
17
17
  if (e.type === "text") return t(i);
@@ -114,8 +114,8 @@ function Xt() {
114
114
  reconcileTweakValues: s
115
115
  };
116
116
  }
117
- var { readTweakSchema: Zt, readTweakValues: Qt, reconcileTweakValues: $t } = Xt(), en = (e) => Math.min(1, Math.max(0, e)), tn = (e) => Math.round(e * 1e3) / 1e3;
118
- function nn(e, t, n, r) {
117
+ var { readTweakSchema: Qt, readTweakValues: $t, reconcileTweakValues: en } = Zt(), tn = (e) => Math.min(1, Math.max(0, e)), nn = (e) => Math.round(e * 1e3) / 1e3;
118
+ function rn(e, t, n, r) {
119
119
  let i = Math.round(n.x), a = Math.round(n.y);
120
120
  if (!t) return {
121
121
  page: e,
@@ -139,11 +139,11 @@ function nn(e, t, n, r) {
139
139
  }]
140
140
  }, { rect: s } = r;
141
141
  return s.width > 0 && s.height > 0 && (o.offset = {
142
- x: tn(en((n.x - s.x) / s.width)),
143
- y: tn(en((n.y - s.y) / s.height))
142
+ x: nn(tn((n.x - s.x) / s.width)),
143
+ y: nn(tn((n.y - s.y) / s.height))
144
144
  }), o;
145
145
  }
146
- function rn(e, t) {
146
+ function an(e, t) {
147
147
  let n = t.flatMap((e) => e.path ? [{
148
148
  board: e.boardId,
149
149
  path: e.path,
@@ -160,7 +160,7 @@ function rn(e, t) {
160
160
  }))
161
161
  } : null;
162
162
  }
163
- function an(e, t) {
163
+ function on(e, t) {
164
164
  if (!e.board) return {
165
165
  x: e.x,
166
166
  y: e.y
@@ -171,27 +171,27 @@ function an(e, t) {
171
171
  y: n.y + e.y
172
172
  } : null;
173
173
  }
174
- var on = (e) => `${Math.round(e * 100)}%`;
175
- function sn(e) {
176
- if (e.group) return e.verdict === "reject" ? R.t("anchor.rejected", { group: e.group }) : e.group;
177
- if (!e.board) return R.t("anchor.page", { page: e.page });
174
+ var sn = (e) => `${Math.round(e * 100)}%`;
175
+ function cn(e) {
176
+ if (e.group) return e.verdict === "reject" ? L.t("anchor.rejected", { group: e.group }) : e.group;
177
+ if (!e.board) return L.t("anchor.page", { page: e.page });
178
178
  let t = e.nodes ?? [];
179
- if (t.length > 1) return R.t("anchor.elements", {
179
+ if (t.length > 1) return L.t("anchor.elements", {
180
180
  board: e.board,
181
181
  count: t.length
182
182
  });
183
183
  if (!t[0]) return e.board;
184
- let n = e.offset ? ` · ${on(e.offset.x)}, ${on(e.offset.y)}` : "";
184
+ let n = e.offset ? ` · ${sn(e.offset.x)}, ${sn(e.offset.y)}` : "";
185
185
  return `${e.board} · ${t[0].path}${n}`;
186
186
  }
187
- var cn = (e) => e.verdict ? R.t("anchor.evidenceUpdated") : R.t("anchor.stale"), ln = (e) => e.messages[0]?.at ?? e.statusAt;
188
- function un(e) {
189
- let t = e.filter((e) => e.anchor?.verdict !== "pass").sort((e, t) => ln(e) < ln(t) ? -1 : +(ln(e) > ln(t)));
187
+ var ln = (e) => e.verdict ? L.t("anchor.evidenceUpdated") : L.t("anchor.stale"), un = (e) => e.messages[0]?.at ?? e.statusAt;
188
+ function dn(e) {
189
+ let t = e.filter((e) => e.anchor?.verdict !== "pass").sort((e, t) => un(e) < un(t) ? -1 : +(un(e) > un(t)));
190
190
  return new Map(t.map((e, t) => [e.id, t + 1]));
191
191
  }
192
192
  //#endregion
193
193
  //#region src/viewer/components/CommentLayer.tsx
194
- var dn = 28, fn = 300, pn = 14, mn = {
194
+ var fn = 28, pn = 300, mn = 14, hn = {
195
195
  pin: {
196
196
  kVAEAm: "x10l6tqk",
197
197
  kzqmXN: "xgd8bvy",
@@ -239,30 +239,30 @@ var dn = 28, fn = 300, pn = 14, mn = {
239
239
  kjBf7l: "x1ynndj3",
240
240
  $$css: !0
241
241
  }
242
- }, hn = (e, t) => ({
242
+ }, gn = (e, t) => ({
243
243
  x: e.x + t.x * e.k,
244
244
  y: e.y + t.y * e.k
245
245
  });
246
- function gn(e, t) {
247
- let n = e + dn + pn;
248
- return n + fn > t - 12 ? Math.max(12, e - pn - fn) : n;
246
+ function _n(e, t) {
247
+ let n = e + fn + mn;
248
+ return n + pn > t - 12 ? Math.max(12, e - mn - pn) : n;
249
249
  }
250
- function _n({ view: e, page: t, boards: n, width: r, threads: i, stale: a, numbers: o, showResolved: s, draft: c, openId: l, actions: u, agent: d, onOpen: f, onSubmit: p, onCancelDraft: m }) {
251
- let { t: h } = L(), g = i.filter((e) => e.anchor.page === t && e.anchor.verdict !== "pass" && e.messages.some((e) => !e.deleted) && (s || e.status === "open" || e.id === l)), _ = i.find((e) => e.id === l), v = _ ? an(_.anchor, n) : null, y = c ? an(c, n) : null;
250
+ function vn({ view: e, page: t, boards: n, width: r, threads: i, stale: a, numbers: o, showResolved: s, draft: c, openId: l, actions: u, agent: d, onOpen: f, onSubmit: p, onCancelDraft: m }) {
251
+ let { t: h } = F(), g = i.filter((e) => e.anchor.page === t && e.anchor.verdict !== "pass" && e.messages.some((e) => !e.deleted) && (s || e.status === "open" || e.id === l)), _ = i.find((e) => e.id === l), v = _ ? on(_.anchor, n) : null, y = c ? on(c, n) : null;
252
252
  return /* @__PURE__ */ Q("div", {
253
253
  "data-chrome": "comments",
254
254
  className: "x10l6tqk x10a8y8t x47corl xb3r6kr x1q8xho0",
255
255
  children: [
256
256
  g.map((t) => {
257
- let r = an(t.anchor, n);
257
+ let r = on(t.anchor, n);
258
258
  if (!r) return null;
259
- let i = hn(e, r), s = t.messages[0]?.author;
259
+ let i = gn(e, r), s = t.messages[0]?.author;
260
260
  return /* @__PURE__ */ Z("button", {
261
261
  type: "button",
262
262
  "aria-label": h("comments.pin", { number: o.get(t.id) ?? "" }),
263
263
  "data-verdict": t.anchor.verdict,
264
264
  onClick: () => f(t.id === l ? null : t.id),
265
- ...D(mn.pin, s === "agent" && mn.agent, t.anchor.verdict === "reject" && mn.reject, t.status === "resolved" && mn.resolved, a.has(t.id) && mn.stale, t.id === l && mn.open),
265
+ ...O(hn.pin, s === "agent" && hn.agent, t.anchor.verdict === "reject" && hn.reject, t.status === "resolved" && hn.resolved, a.has(t.id) && hn.stale, t.id === l && hn.open),
266
266
  style: {
267
267
  left: i.x,
268
268
  top: i.y
@@ -273,15 +273,15 @@ function _n({ view: e, page: t, boards: n, width: r, threads: i, stale: a, numbe
273
273
  _ ? /* @__PURE__ */ Z("div", {
274
274
  className: "x10l6tqk xdzyupr x1jcbksy x1odjw0f xixl9f9 x12ilycc x1d5q07e x67bb7w xt0e3qv x1hx0egp",
275
275
  style: v ? {
276
- left: gn(hn(e, v).x, r),
277
- top: hn(e, v).y - dn
276
+ left: _n(gn(e, v).x, r),
277
+ top: gn(e, v).y - fn
278
278
  } : {
279
279
  right: 12,
280
280
  top: 64
281
281
  },
282
- children: /* @__PURE__ */ Z(De, {
282
+ children: /* @__PURE__ */ Z(ke, {
283
283
  thread: _,
284
- label: `#${o.get(_.id)} ${sn(_.anchor)}${a.has(_.id) ? ` · ${cn(_.anchor)}` : ""}`,
284
+ label: `#${o.get(_.id)} ${cn(_.anchor)}${a.has(_.id) ? ` · ${ln(_.anchor)}` : ""}`,
285
285
  actions: u,
286
286
  agent: d,
287
287
  onClose: () => f(null)
@@ -290,21 +290,21 @@ function _n({ view: e, page: t, boards: n, width: r, threads: i, stale: a, numbe
290
290
  c && y ? /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("span", {
291
291
  className: "x10l6tqk xgd8bvy x1fgtraw x1717udv xrvj5dj x1ku5rj1 x983p9h xdh2fpr x1y0btm7 xg29ltk x10a7yas xfungia xqfszdh x1j6dyjg x1s688f x105ttfm x67bb7w x1ypdohk",
292
292
  style: {
293
- left: hn(e, y).x,
294
- top: hn(e, y).y
293
+ left: gn(e, y).x,
294
+ top: gn(e, y).y
295
295
  }
296
296
  }), /* @__PURE__ */ Q("div", {
297
297
  className: "x10l6tqk xdzyupr x1jcbksy x1odjw0f xixl9f9 x12ilycc x1d5q07e x67bb7w xt0e3qv x1hx0egp",
298
298
  style: {
299
- left: gn(hn(e, y).x, r),
300
- top: hn(e, y).y - dn
299
+ left: _n(gn(e, y).x, r),
300
+ top: gn(e, y).y - fn
301
301
  },
302
302
  children: [
303
303
  /* @__PURE__ */ Z("div", {
304
304
  className: "x78zum5 x6s0dn4 x17d4w8g x889kno xqin4a2 x1j6dyjg xddlp02 xb3r6kr xuxw1ft xlyipyv",
305
- children: h("comments.anchoredTo", { label: sn(c) })
305
+ children: h("comments.anchoredTo", { label: cn(c) })
306
306
  }),
307
- /* @__PURE__ */ Z(ze, {
307
+ /* @__PURE__ */ Z(Be, {
308
308
  autoFocus: !0,
309
309
  placeholder: h("comments.addPlaceholder"),
310
310
  onSubmit: p,
@@ -321,12 +321,12 @@ function _n({ view: e, page: t, boards: n, width: r, threads: i, stale: a, numbe
321
321
  }
322
322
  //#endregion
323
323
  //#region src/viewer/comments/CommentsPanel.tsx
324
- var vn = (e) => new Date(e).toLocaleTimeString(R.language, {
324
+ var yn = (e) => new Date(e).toLocaleTimeString(L.language, {
325
325
  hour: "2-digit",
326
326
  minute: "2-digit"
327
327
  });
328
- function yn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTab: o, onOpen: s, onClose: c }) {
329
- let { t: l } = L(), u = e.filter((e) => e.anchor.page === t && e.anchor.verdict !== "pass" && e.messages.some((e) => !e.deleted)), d = u.filter((e) => e.status === "open"), f = (a === "open" ? d : u).sort((e, t) => (r.get(e.id) ?? 0) - (r.get(t.id) ?? 0));
328
+ function bn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTab: o, onOpen: s, onClose: c }) {
329
+ let { t: l } = F(), u = e.filter((e) => e.anchor.page === t && e.anchor.verdict !== "pass" && e.messages.some((e) => !e.deleted)), d = u.filter((e) => e.status === "open"), f = (a === "open" ? d : u).sort((e, t) => (r.get(e.id) ?? 0) - (r.get(t.id) ?? 0));
330
330
  return /* @__PURE__ */ Q("aside", {
331
331
  className: "ryugi-inspector",
332
332
  "data-chrome": !0,
@@ -347,7 +347,7 @@ function yn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTa
347
347
  title: l("chrome.closeCommentsTitle"),
348
348
  onClick: c,
349
349
  className: "xvc5jky x1717udv xc342km xjbqb8w xddlp02 xytdrwj x1ypdohk xrvj5dj",
350
- children: /* @__PURE__ */ Z(Jt, { size: 14 })
350
+ children: /* @__PURE__ */ Z(Yt, { size: 14 })
351
351
  })
352
352
  ]
353
353
  }),
@@ -375,7 +375,7 @@ function yn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTa
375
375
  className: "x98rzlu x2lwn1j x1odjw0f",
376
376
  children: [f.length === 0 ? /* @__PURE__ */ Q("div", {
377
377
  className: "x78zum5 x6s0dn4 x167g77z x1dypa6k xfifm61 x1bo0w0s",
378
- children: [/* @__PURE__ */ Z(Rt, {
378
+ children: [/* @__PURE__ */ Z(zt, {
379
379
  size: 14,
380
380
  "aria-hidden": !0
381
381
  }), l("comments.emptyCanvas")]
@@ -416,12 +416,12 @@ function yn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTa
416
416
  children: [
417
417
  /* @__PURE__ */ Z("span", {
418
418
  className: "xo2rkog x1s688f",
419
- children: t ? Ve(t).label : ""
419
+ children: t ? He(t).label : ""
420
420
  }),
421
421
  e.status === "resolved" ? /* @__PURE__ */ Z("span", { children: l("common.resolved") }) : null,
422
422
  /* @__PURE__ */ Z("span", {
423
423
  className: "xvc5jky xc7n51q",
424
- children: t ? vn(t.at) : ""
424
+ children: t ? yn(t.at) : ""
425
425
  })
426
426
  ]
427
427
  }),
@@ -430,7 +430,7 @@ function yn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTa
430
430
  0: { className: "x8q42hb x1fao0z8 x1s31vzs xddlp02 xb3r6kr xuxw1ft xlyipyv" },
431
431
  1: { className: "x8q42hb x1fao0z8 x1s31vzs xb3r6kr xuxw1ft xlyipyv xy1pa3r" }
432
432
  }[!!o | 0],
433
- children: [sn(e.anchor), o ? ` · ${cn(e.anchor)}` : ""]
433
+ children: [cn(e.anchor), o ? ` · ${ln(e.anchor)}` : ""]
434
434
  }),
435
435
  /* @__PURE__ */ Z("div", {
436
436
  className: "xfifm61 x1dbl2gt xo2rkog x104kibb x1h7i4cw x1ua5tub xb3r6kr xj0a0fe",
@@ -450,13 +450,13 @@ function yn({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTa
450
450
  }
451
451
  //#endregion
452
452
  //#region src/viewer/components/DebugHud.tsx
453
- var bn = 1e3, xn = 250, Sn = 33, Cn = [
453
+ var xn = 1e3, Sn = 250, Cn = 33, wn = [
454
454
  "live",
455
455
  "snapshot",
456
456
  "placeholder",
457
457
  "empty"
458
458
  ];
459
- function wn({ renders: e, scaling: t }) {
459
+ function Tn({ renders: e, scaling: t }) {
460
460
  let [n, r] = Y({
461
461
  fps: 0,
462
462
  worst: 0,
@@ -467,21 +467,21 @@ function wn({ renders: e, scaling: t }) {
467
467
  for (e.push({
468
468
  at: o,
469
469
  ms: o - t
470
- }), t = o; e.length && o - e[0].at >= bn;) e.shift();
471
- if (o - n >= xn) {
470
+ }), t = o; e.length && o - e[0].at >= xn;) e.shift();
471
+ if (o - n >= Sn) {
472
472
  n = o;
473
473
  let t = e.reduce((e, t) => e + t.ms, 0);
474
474
  r({
475
475
  fps: t ? Math.round(e.length * 1e3 / t) : 0,
476
476
  worst: Math.round(Math.max(0, ...e.map((e) => e.ms))),
477
- slow: e.filter((e) => e.ms > Sn).length
477
+ slow: e.filter((e) => e.ms > Cn).length
478
478
  });
479
479
  }
480
480
  i = requestAnimationFrame(a);
481
481
  };
482
482
  return i = requestAnimationFrame(a), () => cancelAnimationFrame(i);
483
483
  }, []);
484
- let i = Cn.map((t) => `${t} ${[...e.values()].filter((e) => e.tier === t).length}`);
484
+ let i = wn.map((t) => `${t} ${[...e.values()].filter((e) => e.tier === t).length}`);
485
485
  return /* @__PURE__ */ Z("div", {
486
486
  "data-chrome": "debug",
487
487
  "aria-hidden": "true",
@@ -491,7 +491,7 @@ function wn({ renders: e, scaling: t }) {
491
491
  }
492
492
  //#endregion
493
493
  //#region src/viewer/components/ExpandedBoard.tsx
494
- function Tn({ id: e, board: n, src: r, interactive: i, onClose: a, parameterAction: o, parameters: s, frameRef: c, onFrameLoad: l }) {
494
+ function En({ id: e, board: n, src: r, interactive: i, onClose: a, parameterAction: o, parameters: s, frameRef: c, onFrameLoad: l }) {
495
495
  return /* @__PURE__ */ Q("div", {
496
496
  "data-chrome": !0,
497
497
  className: "x10l6tqk x10a8y8t x1355qak x78zum5 xdt5ytf x184qs1t",
@@ -506,11 +506,11 @@ function Tn({ id: e, board: n, src: r, interactive: i, onClose: a, parameterActi
506
506
  })]
507
507
  }),
508
508
  o,
509
- /* @__PURE__ */ Z(Ye, {
510
- icon: Jt,
509
+ /* @__PURE__ */ Z(Xe, {
510
+ icon: Yt,
511
511
  size: "small",
512
- title: V("chrome.closeEsc"),
513
- "aria-label": V("chrome.close"),
512
+ title: B("chrome.closeEsc"),
513
+ "aria-label": B("chrome.close"),
514
514
  onClick: a
515
515
  })
516
516
  ]
@@ -523,7 +523,7 @@ function Tn({ id: e, board: n, src: r, interactive: i, onClose: a, parameterActi
523
523
  height: n.h,
524
524
  marginBottom: 36
525
525
  },
526
- children: /* @__PURE__ */ Z(N, {
526
+ children: /* @__PURE__ */ Z(se, {
527
527
  src: r,
528
528
  title: n.title ?? e,
529
529
  barScale: 1,
@@ -561,7 +561,7 @@ function Tn({ id: e, board: n, src: r, interactive: i, onClose: a, parameterActi
561
561
  }
562
562
  //#endregion
563
563
  //#region src/viewer/lib/handPose.ts
564
- var En = "M9.2 14H23.4V19.5C23.4 24.5 21 27.6 17 27.6H15.6C12 27.6 9.2 25 9.2 21.5Z", Dn = [
564
+ var Dn = "M9.2 14H23.4V19.5C23.4 24.5 21 27.6 17 27.6H15.6C12 27.6 9.2 25 9.2 21.5Z", On = [
565
565
  [
566
566
  14.5,
567
567
  17.1,
@@ -589,7 +589,7 @@ var En = "M9.2 14H23.4V19.5C23.4 24.5 21 27.6 17 27.6H15.6C12 27.6 9.2 25 9.2 21
589
589
  8,
590
590
  4
591
591
  ]
592
- ], On = {
592
+ ], kn = {
593
593
  from: {
594
594
  x: 10.85,
595
595
  y: 16.5
@@ -608,7 +608,7 @@ var En = "M9.2 14H23.4V19.5C23.4 24.5 21 27.6 17 27.6H15.6C12 27.6 9.2 25 9.2 21
608
608
  x: 2.9,
609
609
  y: 16.6
610
610
  }]
611
- }, kn = {
611
+ }, An = {
612
612
  from: {
613
613
  x: 9.8,
614
614
  y: 23
@@ -627,12 +627,12 @@ var En = "M9.2 14H23.4V19.5C23.4 24.5 21 27.6 17 27.6H15.6C12 27.6 9.2 25 9.2 21
627
627
  x: 3.3,
628
628
  y: 19.4
629
629
  }]
630
- }, An = (e) => Math.round(e * 100) / 100, jn = (e, t, n) => An(e + (t - e) * n), Mn = ([e, t], n) => ({
631
- x: jn(e.x, t.x, n),
632
- y: jn(e.y, t.y, n)
630
+ }, jn = (e) => Math.round(e * 100) / 100, Mn = (e, t, n) => jn(e + (t - e) * n), Nn = ([e, t], n) => ({
631
+ x: Mn(e.x, t.x, n),
632
+ y: Mn(e.y, t.y, n)
633
633
  });
634
- function Nn(e, t) {
635
- let n = Mn(e.control, t), r = Mn(e.tip, t), { from: i } = e;
634
+ function Pn(e, t) {
635
+ let n = Nn(e.control, t), r = Nn(e.tip, t), { from: i } = e;
636
636
  return {
637
637
  from: i,
638
638
  control: n,
@@ -640,19 +640,19 @@ function Nn(e, t) {
640
640
  d: `M${i.x} ${i.y}Q${n.x} ${n.y} ${r.x} ${r.y}`
641
641
  };
642
642
  }
643
- function Pn(e, t) {
643
+ function Fn(e, t) {
644
644
  return {
645
- index: Nn(On, e),
646
- thumb: Nn(kn, e),
647
- fingers: Dn.map(([e, n, r, i, a, o, s]) => {
648
- let c = jn(i, a, t);
645
+ index: Pn(kn, e),
646
+ thumb: Pn(An, e),
647
+ fingers: On.map(([e, n, r, i, a, o, s]) => {
648
+ let c = Mn(i, a, t);
649
649
  return {
650
650
  x: e - r / 2,
651
- y: An(n - c),
651
+ y: jn(n - c),
652
652
  width: r,
653
653
  height: c,
654
654
  radius: r / 2,
655
- transform: `rotate(${jn(o, s, t)} ${e} ${n})`
655
+ transform: `rotate(${Mn(o, s, t)} ${e} ${n})`
656
656
  };
657
657
  }),
658
658
  seam: Math.min(1, Math.max(0, e * 1.6))
@@ -660,7 +660,7 @@ function Pn(e, t) {
660
660
  }
661
661
  //#endregion
662
662
  //#region src/viewer/lib/spring.ts
663
- function Fn({ value: e, velocity: t }, n, r, i = 520, a = 28) {
663
+ function In({ value: e, velocity: t }, n, r, i = 520, a = 28) {
664
664
  let o = t + (i * (n - e) - a * t) * r;
665
665
  return {
666
666
  value: e + o * r,
@@ -669,8 +669,8 @@ function Fn({ value: e, velocity: t }, n, r, i = 520, a = 28) {
669
669
  }
670
670
  //#endregion
671
671
  //#region src/viewer/components/HandCursor.tsx
672
- var In = "#423d38", Ln = 30, Rn = "[data-hand-drawn], [data-hand-drawn] * { cursor: none !important; }", zn = (e) => Math.round(e * 100) / 100, Bn = (e, t) => Math.abs(e.value - t) < 5e-4 && Math.abs(e.velocity) < .005;
673
- function Vn({ viewport: e, hand: t }) {
672
+ var Ln = "#423d38", Rn = 30, zn = "[data-hand-drawn], [data-hand-drawn] * { cursor: none !important; }", Bn = (e) => Math.round(e * 100) / 100, Vn = (e, t) => Math.abs(e.value - t) < 5e-4 && Math.abs(e.velocity) < .005;
673
+ function Hn({ viewport: e, hand: t }) {
674
674
  let n = J(null), r = J(t !== null), [i, a] = Y(null), [o, s] = Y({
675
675
  pinch: 0,
676
676
  curl: 0
@@ -702,13 +702,13 @@ function Vn({ viewport: e, hand: t }) {
702
702
  return t.addEventListener("pointermove", o), t.addEventListener("pointerdown", o), t.addEventListener("pointerover", s), t.addEventListener("pointerleave", c), () => {
703
703
  t.removeEventListener("pointermove", o), t.removeEventListener("pointerdown", o), t.removeEventListener("pointerover", s), t.removeEventListener("pointerleave", c);
704
704
  };
705
- }, [e]), Ge(() => {
705
+ }, [e]), Ke(() => {
706
706
  r.current = t !== null, a(r.current ? n.current : null);
707
- }, [t]), Ge(() => {
707
+ }, [t]), Ke(() => {
708
708
  e.current?.toggleAttribute("data-hand-drawn", u);
709
709
  }, [e, u]), K(() => {
710
710
  let e = c.current, t = e.goal;
711
- if (e.goal = l, Bn(e.pinch, l) && Bn(e.curl, l)) return;
711
+ if (e.goal = l, Vn(e.pinch, l) && Vn(e.curl, l)) return;
712
712
  if (matchMedia("(prefers-reduced-motion: reduce)").matches) {
713
713
  e.pinch = {
714
714
  value: l,
@@ -725,8 +725,8 @@ function Vn({ viewport: e, hand: t }) {
725
725
  let n = performance.now(), r = n, i = 0, a = (o) => {
726
726
  let c = Math.min(1 / 30, (o - r) / 1e3);
727
727
  r = o;
728
- let u = o - n >= Ln ? l : t;
729
- e.pinch = Fn(e.pinch, l, c), e.curl = Fn(e.curl, u, c), u === l && Bn(e.pinch, l) && Bn(e.curl, l) ? (e.pinch = {
728
+ let u = o - n >= Rn ? l : t;
729
+ e.pinch = In(e.pinch, l, c), e.curl = In(e.curl, u, c), u === l && Vn(e.pinch, l) && Vn(e.curl, l) ? (e.pinch = {
730
730
  value: l,
731
731
  velocity: 0
732
732
  }, e.curl = {
@@ -739,7 +739,7 @@ function Vn({ viewport: e, hand: t }) {
739
739
  };
740
740
  return i = requestAnimationFrame(a), () => cancelAnimationFrame(i);
741
741
  }, [l]), !u) return null;
742
- let { index: d, thumb: f, fingers: p, seam: m } = Pn(o.pinch, o.curl), h = p.map((e, t) => /* @__PURE__ */ Z("rect", {
742
+ let { index: d, thumb: f, fingers: p, seam: m } = Fn(o.pinch, o.curl), h = p.map((e, t) => /* @__PURE__ */ Z("rect", {
743
743
  x: e.x,
744
744
  y: e.y,
745
745
  width: e.width,
@@ -747,10 +747,10 @@ function Vn({ viewport: e, hand: t }) {
747
747
  rx: e.radius,
748
748
  transform: e.transform
749
749
  }, t));
750
- return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("style", { children: Rn }), /* @__PURE__ */ Q("svg", {
750
+ return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("style", { children: zn }), /* @__PURE__ */ Q("svg", {
751
751
  "data-hand-cursor": "",
752
- "data-pinch": zn(o.pinch),
753
- "data-curl": zn(o.curl),
752
+ "data-pinch": Bn(o.pinch),
753
+ "data-curl": Bn(o.curl),
754
754
  width: "32",
755
755
  height: "32",
756
756
  viewBox: "0 0 32 32",
@@ -759,15 +759,15 @@ function Vn({ viewport: e, hand: t }) {
759
759
  style: { transform: `translate(${i.x - 16}px, ${i.y - 16}px)` },
760
760
  children: [
761
761
  /* @__PURE__ */ Q("g", {
762
- fill: In,
763
- stroke: In,
762
+ fill: Ln,
763
+ stroke: Ln,
764
764
  strokeWidth: "2",
765
765
  strokeLinejoin: "round",
766
- children: [h, /* @__PURE__ */ Z("path", { d: En })]
766
+ children: [h, /* @__PURE__ */ Z("path", { d: Dn })]
767
767
  }),
768
768
  /* @__PURE__ */ Q("g", {
769
769
  fill: "none",
770
- stroke: In,
770
+ stroke: Ln,
771
771
  strokeLinecap: "round",
772
772
  children: [/* @__PURE__ */ Z("path", {
773
773
  d: d.d,
@@ -779,7 +779,7 @@ function Vn({ viewport: e, hand: t }) {
779
779
  }),
780
780
  /* @__PURE__ */ Q("g", {
781
781
  fill: "#fff",
782
- children: [h, /* @__PURE__ */ Z("path", { d: En })]
782
+ children: [h, /* @__PURE__ */ Z("path", { d: Dn })]
783
783
  }),
784
784
  /* @__PURE__ */ Z("path", {
785
785
  d: d.d,
@@ -791,7 +791,7 @@ function Vn({ viewport: e, hand: t }) {
791
791
  /* @__PURE__ */ Z("path", {
792
792
  d: f.d,
793
793
  fill: "none",
794
- stroke: In,
794
+ stroke: Ln,
795
795
  strokeOpacity: m,
796
796
  strokeWidth: "6",
797
797
  strokeLinecap: "round"
@@ -804,7 +804,7 @@ function Vn({ viewport: e, hand: t }) {
804
804
  strokeLinecap: "round"
805
805
  }),
806
806
  /* @__PURE__ */ Z("path", {
807
- d: En,
807
+ d: Dn,
808
808
  fill: "#fff"
809
809
  })
810
810
  ]
@@ -812,21 +812,21 @@ function Vn({ viewport: e, hand: t }) {
812
812
  }
813
813
  //#endregion
814
814
  //#region src/viewer/verdicts/GroupVerdict.tsx
815
- var Hn = (e, t) => new Date(e).toLocaleTimeString(t, {
815
+ var Un = (e, t) => new Date(e).toLocaleTimeString(t, {
816
816
  hour: "2-digit",
817
817
  minute: "2-digit",
818
818
  hour12: !1
819
819
  });
820
- function Un({ verdict: e, evidenceAt: t, canJudge: n, onPass: r, onReject: i, onUndo: a }) {
821
- let { t: o, i18n: s } = L();
820
+ function Wn({ verdict: e, evidenceAt: t, canJudge: n, onPass: r, onReject: i, onUndo: a }) {
821
+ let { t: o, i18n: s } = F();
822
822
  return e.state === "pass" ? /* @__PURE__ */ Q(X, { children: [
823
823
  /* @__PURE__ */ Q("span", {
824
824
  className: "x78zum5 x6s0dn4 x17d4w8g x1hm9lzh xk50ysn xvn0vjr",
825
- children: [/* @__PURE__ */ Z(_t, { size: 13 }), o("verdict.passed")]
825
+ children: [/* @__PURE__ */ Z(vt, { size: 13 }), o("verdict.passed")]
826
826
  }),
827
827
  e.at && /* @__PURE__ */ Z("span", {
828
828
  className: "xo1l8bm xfifm61 xddlp02",
829
- children: Hn(e.at, s.language)
829
+ children: Un(e.at, s.language)
830
830
  }),
831
831
  n && /* @__PURE__ */ Z("button", {
832
832
  type: "button",
@@ -836,7 +836,7 @@ function Un({ verdict: e, evidenceAt: t, canJudge: n, onPass: r, onReject: i, on
836
836
  })
837
837
  ] }) : e.state === "reject" ? /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Q("span", {
838
838
  className: "x78zum5 x6s0dn4 x17d4w8g x1hm9lzh xk50ysn x104s22n",
839
- children: [/* @__PURE__ */ Z(Jt, { size: 13 }), o("verdict.rejected")]
839
+ children: [/* @__PURE__ */ Z(Yt, { size: 13 }), o("verdict.rejected")]
840
840
  }), /* @__PURE__ */ Z("span", {
841
841
  className: "xo1l8bm xfifm61 xddlp02",
842
842
  children: o("verdict.waitingFix", { count: e.rejectThreads })
@@ -847,7 +847,7 @@ function Un({ verdict: e, evidenceAt: t, canJudge: n, onPass: r, onReject: i, on
847
847
  }),
848
848
  e.evidenceUpdated && t > 0 && /* @__PURE__ */ Z("span", {
849
849
  className: "xo1l8bm xfifm61 xddlp02",
850
- children: o("verdict.evidenceUpdatedAt", { time: Hn(t, s.language) })
850
+ children: o("verdict.evidenceUpdatedAt", { time: Un(t, s.language) })
851
851
  }),
852
852
  n && /* @__PURE__ */ Q(X, { children: [
853
853
  /* @__PURE__ */ Z("span", { className: "x1i1rx1s x1kpxq89 xjgtzcg xcn5yip" }),
@@ -855,32 +855,32 @@ function Un({ verdict: e, evidenceAt: t, canJudge: n, onPass: r, onReject: i, on
855
855
  type: "button",
856
856
  onClick: r,
857
857
  className: "x78zum5 x6s0dn4 x1nejdyq x1717udv xc342km xjbqb8w xjb2p0i x1qlqyl8 xk50ysn x1ypdohk x1bo0w0s x1de4qr5",
858
- children: [/* @__PURE__ */ Z(_t, { size: 13 }), o("verdict.pass")]
858
+ children: [/* @__PURE__ */ Z(vt, { size: 13 }), o("verdict.pass")]
859
859
  }),
860
860
  /* @__PURE__ */ Q("button", {
861
861
  type: "button",
862
862
  onClick: i,
863
863
  className: "x78zum5 x6s0dn4 x1nejdyq x1717udv xc342km xjbqb8w xjb2p0i x1qlqyl8 xk50ysn x1ypdohk x1bo0w0s xm31nxl",
864
- children: [/* @__PURE__ */ Z(Jt, { size: 13 }), o("verdict.reject")]
864
+ children: [/* @__PURE__ */ Z(Yt, { size: 13 }), o("verdict.reject")]
865
865
  })
866
866
  ] })
867
867
  ] });
868
868
  }
869
869
  //#endregion
870
870
  //#region src/viewer/components/Labels.tsx
871
- var Wn = 150, Gn = 240, Kn = 12, qn = 13, Jn = 26, Yn = (e, t) => e === null ? null : e / t;
872
- function Xn(e, t) {
871
+ var Gn = 150, Kn = 240, qn = 12, Jn = 13, Yn = 26, Xn = (e, t) => e === null ? null : e / t;
872
+ function Zn(e, t) {
873
873
  let n = document.createElement("a");
874
874
  n.href = e, n.download = t, n.click();
875
875
  }
876
- function Zn({ view: e, boards: n, groups: r, allBoards: a, contentBase: o, versions: s, pending: u, playing: d, onExpand: f, onTogglePlay: p, onReplay: m, parameters: h, activeParameters: _, onToggleParameters: v, verdicts: y }) {
877
- let b = Yn(i(g, e.k), qn), x = Yn(i(c, e.k), Kn);
876
+ function Qn({ view: e, boards: n, groups: r, allBoards: i, contentBase: o, versions: s, pending: c, playing: l, onExpand: u, onTogglePlay: d, onReplay: f, parameters: p, activeParameters: m, onToggleParameters: g, verdicts: _ }) {
877
+ let y = Xn(C(h, e.k), Jn), b = Xn(C(v, e.k), qn);
878
878
  return /* @__PURE__ */ Q("div", {
879
879
  className: "x10l6tqk x10a8y8t x47corl xb3r6kr",
880
- children: [b !== null && r.map(([t, n]) => {
881
- let r = n.boards.map((e) => a[e]).filter((e) => !!e);
880
+ children: [y !== null && r.map(([t, n]) => {
881
+ let r = n.boards.map((e) => i[e]).filter((e) => !!e);
882
882
  if (r.length === 0) return null;
883
- let i = Math.min(...r.map((e) => e.x)), o = Math.min(...r.map((e) => e.y)), s = y?.states[t];
883
+ let a = Math.min(...r.map((e) => e.x)), o = Math.min(...r.map((e) => e.y)), s = _?.states[t];
884
884
  return /* @__PURE__ */ Q("div", {
885
885
  "data-group-label": t,
886
886
  "data-chrome": s ? "group-label" : void 0,
@@ -889,9 +889,9 @@ function Zn({ view: e, boards: n, groups: r, allBoards: a, contentBase: o, versi
889
889
  1: { className: "x10l6tqk x78zum5 x6s0dn4 x17d4w8g x1hj3fc7 x4z9k3i x1s688f xo2rkog xuxw1ft x67bb7w" }
890
890
  }[!!s | 0],
891
891
  style: {
892
- left: e.x + i * e.k,
892
+ left: e.x + a * e.k,
893
893
  top: e.y + o * e.k,
894
- transform: `scale(${b}) translateY(calc(-100% - ${Jn}px))`
894
+ transform: `scale(${y}) translateY(calc(-100% - ${Yn}px))`
895
895
  },
896
896
  children: [
897
897
  /* @__PURE__ */ Z("span", {
@@ -899,28 +899,28 @@ function Zn({ view: e, boards: n, groups: r, allBoards: a, contentBase: o, versi
899
899
  children: t
900
900
  }),
901
901
  n.title,
902
- s && y && /* @__PURE__ */ Z(Un, {
902
+ s && _ && /* @__PURE__ */ Z(Wn, {
903
903
  verdict: s,
904
- evidenceAt: y.evidenceAt(t),
905
- canJudge: y.canJudge,
906
- onPass: () => y.pass(t),
907
- onReject: () => y.startReject(t),
908
- onUndo: () => y.undoPass(t)
904
+ evidenceAt: _.evidenceAt(t),
905
+ canJudge: _.canJudge,
906
+ onPass: () => _.pass(t),
907
+ onReject: () => _.startReject(t),
908
+ onUndo: () => _.undoPass(t)
909
909
  })
910
910
  ]
911
911
  }, t);
912
- }), x !== null && n.map(([n, r]) => {
913
- let i = l(r, e);
912
+ }), b !== null && n.map(([n, r]) => {
913
+ let i = a(r, e);
914
914
  if (!i) return null;
915
- let a = i.width / x, c = ae(s, r.file) && !u.has(n), g = c && P(r, s);
915
+ let h = i.width / b, _ = M(s, r.file) && !c.has(n), v = _ && N(r, s);
916
916
  return /* @__PURE__ */ Q("div", {
917
917
  "data-chrome": "board-label",
918
918
  className: "x10l6tqk x78zum5 x6s0dn4 xxk0z11 x1hj3fc7 x1120s5i x1bo0w0s x67bb7w",
919
919
  style: {
920
920
  left: i.left,
921
921
  top: i.top,
922
- width: a,
923
- transform: `scale(${x}) translateY(-100%)`
922
+ width: h,
923
+ transform: `scale(${b}) translateY(-100%)`
924
924
  },
925
925
  children: [
926
926
  /* @__PURE__ */ Q("span", {
@@ -929,7 +929,7 @@ function Zn({ view: e, boards: n, groups: r, allBoards: a, contentBase: o, versi
929
929
  t(r) && /* @__PURE__ */ Z("span", {
930
930
  "data-board-type": r.type,
931
931
  className: "x2lah0s xamitd3 x78zum5 xddlp02",
932
- children: r.type === "video" ? /* @__PURE__ */ Z(jt, { size: 12 }) : /* @__PURE__ */ Z(Ft, { size: 12 })
932
+ children: r.type === "video" ? /* @__PURE__ */ Z(Mt, { size: 12 }) : /* @__PURE__ */ Z(It, { size: 12 })
933
933
  }),
934
934
  r.title ?? n,
935
935
  /* @__PURE__ */ Z("span", {
@@ -938,64 +938,64 @@ function Zn({ view: e, boards: n, groups: r, allBoards: a, contentBase: o, versi
938
938
  })
939
939
  ]
940
940
  }),
941
- c && a >= Wn && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(Ye, {
942
- icon: Lt,
941
+ _ && h >= Gn && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(Xe, {
942
+ icon: Rt,
943
943
  size: {
944
944
  blockSize: 22,
945
945
  size: 13
946
946
  },
947
- title: V("chrome.expand"),
948
- "aria-label": V("chrome.expandBoard", { id: n }),
949
- onClick: () => f(n)
950
- }), /* @__PURE__ */ Z(Ye, {
951
- icon: kt,
947
+ title: B("chrome.expand"),
948
+ "aria-label": B("chrome.expandBoard", { id: n }),
949
+ onClick: () => u(n)
950
+ }), /* @__PURE__ */ Z(Xe, {
951
+ icon: At,
952
952
  size: {
953
953
  blockSize: 22,
954
954
  size: 13
955
955
  },
956
- title: V("chrome.download"),
957
- "aria-label": V("chrome.downloadBoard", { id: n }),
958
- onClick: () => Xn(`${o}${r.file}`, r.file.split("/").pop() ?? `${n}.html`)
956
+ title: B("chrome.download"),
957
+ "aria-label": B("chrome.downloadBoard", { id: n }),
958
+ onClick: () => Zn(`${o}${r.file}`, r.file.split("/").pop() ?? `${n}.html`)
959
959
  })] }),
960
- c && h?.[n] !== void 0 && a >= Wn && /* @__PURE__ */ Q("button", {
960
+ _ && p?.[n] !== void 0 && h >= Gn && /* @__PURE__ */ Q("button", {
961
961
  type: "button",
962
- "aria-label": V("chrome.parametersBoard", { id: n }),
963
- "aria-expanded": _ === n,
964
- onClick: (e) => v?.(n, e.currentTarget),
962
+ "aria-label": B("chrome.parametersBoard", { id: n }),
963
+ "aria-expanded": m === n,
964
+ onClick: (e) => g?.(n, e.currentTarget),
965
965
  ...{
966
966
  0: { className: "x78zum5 x6s0dn4 x1jnr06f x1qx5ct2 xdwrcjd xlkn9b3 xmkeg23 x1y0btm7 x1lvdfi3 x1kogg8i xjbqb8w x12zwl0d x12ogdgn xqfszdh x1j6dyjg x1s688f x1vyo3qp x1ypdohk" },
967
967
  1: { className: "x78zum5 x6s0dn4 x1jnr06f x1qx5ct2 xdwrcjd xlkn9b3 xmkeg23 x1y0btm7 x1lvdfi3 x1kogg8i xqfszdh x1j6dyjg x1s688f x1vyo3qp x1ypdohk xyq41xo x1oo6j1a x1f7m26b" }
968
- }[_ === n | 0],
968
+ }[m === n | 0],
969
969
  children: [
970
- /* @__PURE__ */ Z(Gt, { size: 11 }),
971
- V("chrome.parameters"),
970
+ /* @__PURE__ */ Z(Kt, { size: 11 }),
971
+ B("chrome.parameters"),
972
972
  " ",
973
- h[n] || "!"
973
+ p[n] || "!"
974
974
  ]
975
975
  }),
976
- g && a >= Gn && d.has(n) && /* @__PURE__ */ Z(Ye, {
977
- icon: Ut,
976
+ v && h >= Kn && l.has(n) && /* @__PURE__ */ Z(Xe, {
977
+ icon: Wt,
978
978
  size: {
979
979
  blockSize: 22,
980
980
  size: 13
981
981
  },
982
- title: V("chrome.replay"),
983
- "aria-label": V("chrome.replayBoard", { id: n }),
984
- onClick: () => m(n)
982
+ title: B("chrome.replay"),
983
+ "aria-label": B("chrome.replayBoard", { id: n }),
984
+ onClick: () => f(n)
985
985
  }),
986
- g && a >= Gn && /* @__PURE__ */ Q("button", {
986
+ v && h >= Kn && /* @__PURE__ */ Q("button", {
987
987
  type: "button",
988
- "aria-pressed": d.has(n),
989
- "aria-label": d.has(n) ? V("chrome.stopBoard", { id: n }) : V("chrome.playBoard", { id: n }),
990
- onClick: () => p(n),
988
+ "aria-pressed": l.has(n),
989
+ "aria-label": l.has(n) ? B("chrome.stopBoard", { id: n }) : B("chrome.playBoard", { id: n }),
990
+ onClick: () => d(n),
991
991
  ...{
992
992
  0: { className: "x78zum5 x6s0dn4 x1jnr06f x1qx5ct2 xdwrcjd xlkn9b3 xmkeg23 x1y0btm7 x1lvdfi3 x1kogg8i xjbqb8w x12zwl0d x12ogdgn xqfszdh x1j6dyjg x1s688f x1vyo3qp x1ypdohk" },
993
993
  1: { className: "x78zum5 x6s0dn4 x1jnr06f x1qx5ct2 xdwrcjd xlkn9b3 xmkeg23 x1y0btm7 x1lvdfi3 x1kogg8i xqfszdh x1j6dyjg x1s688f x1vyo3qp x1ypdohk xyq41xo x1oo6j1a x1f7m26b" }
994
- }[!!d.has(n) | 0],
995
- children: [/* @__PURE__ */ Z(Ht, {
994
+ }[!!l.has(n) | 0],
995
+ children: [/* @__PURE__ */ Z(Ut, {
996
996
  size: 11,
997
997
  strokeWidth: 2.4
998
- }), d.has(n) ? V("chrome.playing") : V("chrome.play")]
998
+ }), l.has(n) ? B("chrome.playing") : B("chrome.play")]
999
999
  })
1000
1000
  ]
1001
1001
  }, n);
@@ -1004,18 +1004,18 @@ function Zn({ view: e, boards: n, groups: r, allBoards: a, contentBase: o, versi
1004
1004
  }
1005
1005
  //#endregion
1006
1006
  //#region src/viewer/components/Toolbar.tsx
1007
- function Qn({ pages: e, page: t, onPageChange: n, tool: r, onToolChange: i, commenting: a = !1 }) {
1008
- let { t: o } = L(), s = e.find((e) => e.id === t);
1007
+ function $n({ pages: e, page: t, onPageChange: n, tool: r, onToolChange: i, commenting: a = !1 }) {
1008
+ let { t: o } = F(), s = e.find((e) => e.id === t);
1009
1009
  return /* @__PURE__ */ Q("div", {
1010
1010
  "data-chrome": !0,
1011
1011
  className: "x10l6tqk x1eu8d0j x78zum5 x6s0dn4 x195vfkc x1vqgdyp xfn1xvj x12ilycc xmkeg23 x1y0btm7 x12xov25 x1q4ynmn x1cqdj14 x4z9k3i xo2rkog x1n327nk x12lbrt0",
1012
1012
  children: [
1013
- /* @__PURE__ */ Z(Qe, {
1013
+ /* @__PURE__ */ Z($e, {
1014
1014
  placement: "bottomLeft",
1015
1015
  items: e.map((e) => ({
1016
1016
  key: e.id,
1017
1017
  label: e.name,
1018
- icon: e.id === t ? _t : void 0,
1018
+ icon: e.id === t ? vt : void 0,
1019
1019
  onClick: () => n(e.id)
1020
1020
  })),
1021
1021
  children: /* @__PURE__ */ Q("button", {
@@ -1025,31 +1025,31 @@ function Qn({ pages: e, page: t, onPageChange: n, tool: r, onToolChange: i, comm
1025
1025
  children: [/* @__PURE__ */ Z("span", {
1026
1026
  className: "x1s688f x1racy4e xb3r6kr xlyipyv",
1027
1027
  children: s?.name ?? o("chrome.noPages")
1028
- }), /* @__PURE__ */ Z(yt, {
1028
+ }), /* @__PURE__ */ Z(bt, {
1029
1029
  size: 14,
1030
1030
  className: "xddlp02"
1031
1031
  })]
1032
1032
  })
1033
1033
  }),
1034
1034
  /* @__PURE__ */ Z("span", { className: "x1i1rx1s xlup9mm xjgtzcg xh6qj2i" }),
1035
- /* @__PURE__ */ Z(Ye, {
1036
- icon: Bt,
1035
+ /* @__PURE__ */ Z(Xe, {
1036
+ icon: Vt,
1037
1037
  size: "small",
1038
1038
  active: r === "select",
1039
1039
  title: o("chrome.selectTitle"),
1040
1040
  "aria-label": o("chrome.select"),
1041
1041
  onClick: () => i("select")
1042
1042
  }),
1043
- /* @__PURE__ */ Z(Ye, {
1044
- icon: Pt,
1043
+ /* @__PURE__ */ Z(Xe, {
1044
+ icon: Ft,
1045
1045
  size: "small",
1046
1046
  active: r === "hand",
1047
1047
  title: o("chrome.handTitle"),
1048
1048
  "aria-label": o("chrome.hand"),
1049
1049
  onClick: () => i("hand")
1050
1050
  }),
1051
- a ? /* @__PURE__ */ Z(Ye, {
1052
- icon: Rt,
1051
+ a ? /* @__PURE__ */ Z(Xe, {
1052
+ icon: zt,
1053
1053
  size: "small",
1054
1054
  active: r === "comment",
1055
1055
  title: o("chrome.commentTitle"),
@@ -1059,8 +1059,8 @@ function Qn({ pages: e, page: t, onPageChange: n, tool: r, onToolChange: i, comm
1059
1059
  ]
1060
1060
  });
1061
1061
  }
1062
- function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut: a, onFit: o, onActualSize: s, inspectorOpen: c, onToggleInspector: l, verify: u, onNextVerify: d }) {
1063
- let { t: f } = L(), p = (e) => /* @__PURE__ */ Z("span", {
1062
+ function er({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut: a, onFit: o, onActualSize: s, inspectorOpen: c, onToggleInspector: l, verify: u, onNextVerify: d }) {
1063
+ let { t: f } = F(), p = (e) => /* @__PURE__ */ Z("span", {
1064
1064
  className: "xddlp02 x1fao0z8 xfifm61",
1065
1065
  children: e
1066
1066
  });
@@ -1073,7 +1073,7 @@ function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
1073
1073
  title: f("verdict.nextPending"),
1074
1074
  onClick: d,
1075
1075
  className: "x78zum5 x6s0dn4 x17d4w8g x1gnnpzl x1xijbu4 xc342km xjbqb8w x1bo0w0s xqfszdh x4z9k3i xk50ysn x1ypdohk",
1076
- children: [/* @__PURE__ */ Z(_t, {
1076
+ children: [/* @__PURE__ */ Z(vt, {
1077
1077
  size: 13,
1078
1078
  className: "xvn0vjr"
1079
1079
  }), f("verdict.progress", {
@@ -1089,7 +1089,7 @@ function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
1089
1089
  1: { className: "xci0xqf x1hagigm x16rqkct xux1nz0 x1s780dp xaatb59 x1ucus7e" }
1090
1090
  }[!!t | 0] })
1091
1091
  }),
1092
- n.length > 0 && /* @__PURE__ */ Z(rt, {
1092
+ n.length > 0 && /* @__PURE__ */ Z(it, {
1093
1093
  placement: "bottomRight",
1094
1094
  content: /* @__PURE__ */ Z("ul", {
1095
1095
  className: "x1ghz6dp x12ulsxz xwn43p0 x1lr1uin x4z9k3i x1dbl2gt",
@@ -1102,8 +1102,8 @@ function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
1102
1102
  })
1103
1103
  }),
1104
1104
  /* @__PURE__ */ Z("span", { className: "x1i1rx1s xlup9mm xjgtzcg xh6qj2i" }),
1105
- /* @__PURE__ */ Z(Ye, {
1106
- icon: Vt,
1105
+ /* @__PURE__ */ Z(Xe, {
1106
+ icon: Ht,
1107
1107
  size: "small",
1108
1108
  active: c,
1109
1109
  "aria-label": f("chrome.toggleInspector"),
@@ -1111,7 +1111,7 @@ function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
1111
1111
  title: f("chrome.inspector"),
1112
1112
  onClick: l
1113
1113
  }),
1114
- /* @__PURE__ */ Z(Qe, {
1114
+ /* @__PURE__ */ Z($e, {
1115
1115
  placement: "bottomRight",
1116
1116
  items: [
1117
1117
  {
@@ -1146,7 +1146,7 @@ function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
1146
1146
  children: [/* @__PURE__ */ Q("span", {
1147
1147
  className: "xss6m8b x15hfatp x1hr2gdg",
1148
1148
  children: [Math.round(r * 100), "%"]
1149
- }), /* @__PURE__ */ Z(yt, {
1149
+ }), /* @__PURE__ */ Z(bt, {
1150
1150
  size: 14,
1151
1151
  className: "xddlp02"
1152
1152
  })]
@@ -1158,24 +1158,24 @@ function $n({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
1158
1158
  }
1159
1159
  //#endregion
1160
1160
  //#region src/viewer/lib/board-comments.ts
1161
- var er = (e) => typeof e == "object" && !!e && Array.isArray(e.threads), tr = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
1162
- function nr(e) {
1163
- return er(e.comments) ? {
1161
+ var tr = (e) => typeof e == "object" && !!e && Array.isArray(e.threads), nr = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
1162
+ function rr(e) {
1163
+ return tr(e.comments) ? {
1164
1164
  comments: e.comments,
1165
- stale: tr(e.staleThreads)
1165
+ stale: nr(e.staleThreads)
1166
1166
  } : null;
1167
1167
  }
1168
- function rr(e, t) {
1168
+ function ir(e, t) {
1169
1169
  if (typeof e != "object" || !e) return null;
1170
1170
  let n = e;
1171
- return n.type !== "board-comments" || t !== null && n.artifact !== t || !er(n.comments) ? null : {
1171
+ return n.type !== "board-comments" || t !== null && n.artifact !== t || !tr(n.comments) ? null : {
1172
1172
  comments: n.comments,
1173
- stale: tr(n.stale)
1173
+ stale: nr(n.stale)
1174
1174
  };
1175
1175
  }
1176
1176
  //#endregion
1177
1177
  //#region src/viewer/lib/payload.ts
1178
- function ir(e, t) {
1178
+ function ar(e, t) {
1179
1179
  return t.canvas === null && e.canvas !== null ? {
1180
1180
  ...e,
1181
1181
  warnings: t.warnings,
@@ -1190,7 +1190,7 @@ function ir(e, t) {
1190
1190
  }
1191
1191
  //#endregion
1192
1192
  //#region src/viewer/hooks/useCanvasData.ts
1193
- var ar = {
1193
+ var or = {
1194
1194
  canvas: null,
1195
1195
  warnings: [],
1196
1196
  pending: [],
@@ -1199,17 +1199,17 @@ var ar = {
1199
1199
  contentBase: "",
1200
1200
  stale: !1
1201
1201
  };
1202
- function or({ live: e, revision: t, load: n, send: r, boardComments: i, comment: a }) {
1203
- let [o, s] = Y(ar), [c, l] = Y(!1), [u, d] = Y(null);
1202
+ function sr({ live: e, revision: t, load: n, send: r, boardComments: i, comment: a }) {
1203
+ let [o, s] = Y(or), [c, l] = Y(!1), [u, d] = Y(null);
1204
1204
  return K(() => {
1205
1205
  let e = !1;
1206
1206
  return n().then(({ data: t }) => {
1207
1207
  if (e) return;
1208
- s((e) => ir(e, {
1209
- ...ar,
1208
+ s((e) => ar(e, {
1209
+ ...or,
1210
1210
  ...t
1211
1211
  }));
1212
- let n = nr(t);
1212
+ let n = rr(t);
1213
1213
  n && d(n), l(!0);
1214
1214
  }, () => !e && l(!0)), () => {
1215
1215
  e = !0;
@@ -1227,8 +1227,8 @@ function or({ live: e, revision: t, load: n, send: r, boardComments: i, comment:
1227
1227
  }
1228
1228
  //#endregion
1229
1229
  //#region src/viewer/hooks/useBoardComments.ts
1230
- function sr({ comments: e, comment: t, page: n, boards: r, inspector: i }) {
1231
- let [a, o] = Y(null), [s, c] = Y(null), l = J(null), u = q(() => e?.comments.threads ?? [], [e]), d = q(() => new Set(e?.stale ?? []), [e]), f = q(() => un(u), [u]);
1230
+ function cr({ comments: e, comment: t, page: n, boards: r, inspector: i }) {
1231
+ let [a, o] = Y(null), [s, c] = Y(null), l = J(null), u = q(() => e?.comments.threads ?? [], [e]), d = q(() => new Set(e?.stale ?? []), [e]), f = q(() => dn(u), [u]);
1232
1232
  K(() => {
1233
1233
  o(null), c(null);
1234
1234
  }, [n]);
@@ -1256,7 +1256,7 @@ function sr({ comments: e, comment: t, page: n, boards: r, inspector: i }) {
1256
1256
  let r = l.current;
1257
1257
  if (l.current = null, t.phase !== "cancel" || !r || r.boardId !== e) return;
1258
1258
  let a = i.hover, o = a && a.boardId === e && a.id === r.id ? a.rect : void 0, s = p(e, r.id);
1259
- m(nn(n, e, r, o && s ? {
1259
+ m(rn(n, e, r, o && s ? {
1260
1260
  rect: o,
1261
1261
  path: s
1262
1262
  } : void 0));
@@ -1269,10 +1269,10 @@ function sr({ comments: e, comment: t, page: n, boards: r, inspector: i }) {
1269
1269
  onCanvasClick: G((e) => {
1270
1270
  if (!n) return;
1271
1271
  let t = Object.entries(r).find(([, t]) => t.page === n && e.x >= t.x && e.x <= t.x + t.w && e.y >= t.y && e.y <= t.y + t.h);
1272
- m(t ? nn(n, t[0], {
1272
+ m(t ? rn(n, t[0], {
1273
1273
  x: e.x - t[1].x,
1274
1274
  y: e.y - t[1].y
1275
- }) : nn(n, null, e));
1275
+ }) : rn(n, null, e));
1276
1276
  }, [
1277
1277
  n,
1278
1278
  r,
@@ -1280,7 +1280,7 @@ function sr({ comments: e, comment: t, page: n, boards: r, inspector: i }) {
1280
1280
  ]),
1281
1281
  commentSelection: G(() => {
1282
1282
  if (!n) return !1;
1283
- let e = rn(n, i.selectedTargets.map((e) => ({
1283
+ let e = an(n, i.selectedTargets.map((e) => ({
1284
1284
  boardId: e.boardId,
1285
1285
  rect: e.rect,
1286
1286
  path: p(e.boardId, e.id)
@@ -1343,14 +1343,14 @@ function sr({ comments: e, comment: t, page: n, boards: r, inspector: i }) {
1343
1343
  }
1344
1344
  //#endregion
1345
1345
  //#region src/shared/thumbnail.ts
1346
- var cr = "<style>:root{--ink:#333;--muted:#85817c;--paper:#fff;--bg:#f3f2f0;--border:#dedcd7;--block:#f2f1ee;--alert:#f7eee4}@media (prefers-color-scheme: dark){:root{--ink:#e5e5e5;--muted:#a0a0a0;--paper:#292929;--bg:#1c1c1c;--border:#424242;--block:#353535;--alert:#3b342e}}text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,sans-serif}rect{stroke-width:.8;vector-effect:non-scaling-stroke}</style>", lr = (e) => e.replace(/[&<>"']/g, (e) => ({
1346
+ var lr = "<style>:root{--ink:#333;--muted:#85817c;--paper:#fff;--bg:#f3f2f0;--border:#dedcd7;--block:#f2f1ee;--alert:#f7eee4}@media (prefers-color-scheme: dark){:root{--ink:#e5e5e5;--muted:#a0a0a0;--paper:#292929;--bg:#1c1c1c;--border:#424242;--block:#353535;--alert:#3b342e}}text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,sans-serif}rect{stroke-width:.8;vector-effect:non-scaling-stroke}</style>", ur = (e) => e.replace(/[&<>"']/g, (e) => ({
1347
1347
  "&": "&amp;",
1348
1348
  "<": "&lt;",
1349
1349
  ">": "&gt;",
1350
1350
  "\"": "&quot;",
1351
1351
  "'": "&apos;"
1352
- })[e]), ur = (e, t, n, r, i = "var(--paper)", a = "none") => `<rect x="${e}" y="${t}" width="${n}" height="${r}" fill="${i}" stroke="${a}"/>`, dr = (e, t, n, r = 9, i = "var(--ink)", a = 400) => `<text x="${e}" y="${t}" font-size="${r}" fill="${i}" font-weight="${a}">${lr(n)}</text>`;
1353
- function fr(e, t, n, r) {
1352
+ })[e]), dr = (e, t, n, r, i = "var(--paper)", a = "none") => `<rect x="${e}" y="${t}" width="${n}" height="${r}" fill="${i}" stroke="${a}"/>`, fr = (e, t, n, r = 9, i = "var(--ink)", a = 400) => `<text x="${e}" y="${t}" font-size="${r}" fill="${i}" font-weight="${a}">${ur(n)}</text>`;
1353
+ function pr(e, t, n, r) {
1354
1354
  let i = [], a = "", o = 0;
1355
1355
  for (let s of e.slice(0, 4e3)) {
1356
1356
  let e = t * (s.codePointAt(0) >= 11904 ? 1 : .55);
@@ -1362,14 +1362,14 @@ function fr(e, t, n, r) {
1362
1362
  }
1363
1363
  return a && i.push(a), i;
1364
1364
  }
1365
- function pr(e) {
1366
- let t = (e) => Math.round(Number.isFinite(e) ? Math.min(1e5, Math.max(1, e)) : 1), n = t(e.w), r = t(e.h), i = Math.max(1, Math.round(Math.min(n / 14, r / 6))), a = fr(e.title || e.id, i, n * .8, 2), o = r / 2 - a.length * i * 1.25 / 2 + i * .8, s = a.map((e, t) => dr(n / 2, o + t * i * 1.25, e, i, "var(--ink)", 600)).join(""), c = e.title ? dr(n / 2, o + a.length * i * 1.25 + i * .3, e.id, Math.max(1, Math.round(i * .55)), "var(--muted)") : "";
1367
- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${r}" width="${n}" height="${r}"><title>${lr(e.title || e.id)}</title>${cr}<style>text{text-anchor:middle}</style>${ur(0, 0, n, r, "var(--paper)", "var(--border)")}${s}${c}</svg>`;
1365
+ function mr(e) {
1366
+ let t = (e) => Math.round(Number.isFinite(e) ? Math.min(1e5, Math.max(1, e)) : 1), n = t(e.w), r = t(e.h), i = Math.max(1, Math.round(Math.min(n / 14, r / 6))), a = pr(e.title || e.id, i, n * .8, 2), o = r / 2 - a.length * i * 1.25 / 2 + i * .8, s = a.map((e, t) => fr(n / 2, o + t * i * 1.25, e, i, "var(--ink)", 600)).join(""), c = e.title ? fr(n / 2, o + a.length * i * 1.25 + i * .3, e.id, Math.max(1, Math.round(i * .55)), "var(--muted)") : "";
1367
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${r}" width="${n}" height="${r}"><title>${ur(e.title || e.id)}</title>${lr}<style>text{text-anchor:middle}</style>${dr(0, 0, n, r, "var(--paper)", "var(--border)")}${s}${c}</svg>`;
1368
1368
  }
1369
1369
  //#endregion
1370
1370
  //#region src/viewer/lib/snapshot-store.ts
1371
- var mr = 80, hr = 400, gr = ({ artifact: e, file: t, version: n, scheme: r, w: i, h: a }) => `${e}|${t}|${n}|${r}|${i}x${a}`;
1372
- async function _r(e, t, n) {
1371
+ var hr = 80, gr = 400, _r = ({ artifact: e, file: t, version: n, scheme: r, w: i, h: a }) => `${e}|${t}|${n}|${r}|${i}x${a}`;
1372
+ async function vr(e, t, n) {
1373
1373
  let r = await createImageBitmap(e, {
1374
1374
  resizeWidth: Math.max(1, t),
1375
1375
  resizeHeight: Math.max(1, n),
@@ -1377,7 +1377,7 @@ async function _r(e, t, n) {
1377
1377
  }), i = new OffscreenCanvas(r.width, r.height);
1378
1378
  return i.getContext("2d").drawImage(r, 0, 0), r.close(), i.convertToBlob({ type: "image/png" });
1379
1379
  }
1380
- function vr(e = typeof indexedDB > "u" ? void 0 : indexedDB) {
1380
+ function yr(e = typeof indexedDB > "u" ? void 0 : indexedDB) {
1381
1381
  let t = null, n = () => t ??= new Promise((t) => {
1382
1382
  if (!e) return t(null);
1383
1383
  try {
@@ -1398,11 +1398,11 @@ function vr(e = typeof indexedDB > "u" ? void 0 : indexedDB) {
1398
1398
  });
1399
1399
  }, i = async () => {
1400
1400
  let [e, t] = await Promise.all([r("readonly", (e) => e.getAllKeys()), r("readonly", (e) => e.getAll())]);
1401
- if (!e || !t || e.length <= hr) return;
1401
+ if (!e || !t || e.length <= gr) return;
1402
1402
  let n = e.map((e, n) => ({
1403
1403
  key: e,
1404
1404
  at: t[n]?.at ?? 0
1405
- })).sort((e, t) => e.at - t.at).slice(0, e.length - hr);
1405
+ })).sort((e, t) => e.at - t.at).slice(0, e.length - gr);
1406
1406
  for (let { key: e } of n) await r("readwrite", (t) => t.delete(e));
1407
1407
  };
1408
1408
  return {
@@ -1417,7 +1417,7 @@ function vr(e = typeof indexedDB > "u" ? void 0 : indexedDB) {
1417
1417
  }
1418
1418
  };
1419
1419
  }
1420
- function yr({ persistence: e = vr(), resize: t = _r, createUrl: n = (e) => URL.createObjectURL(e), revokeUrl: r = (e) => URL.revokeObjectURL(e) } = {}) {
1420
+ function br({ persistence: e = yr(), resize: t = vr, createUrl: n = (e) => URL.createObjectURL(e), revokeUrl: r = (e) => URL.revokeObjectURL(e) } = {}) {
1421
1421
  let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = (e) => {
1422
1422
  for (let [t, n] of a) t.startsWith(`${e}@`) && (a.delete(t), n.then(r, () => void 0));
1423
1423
  }, u = (e, t) => {
@@ -1439,7 +1439,7 @@ function yr({ persistence: e = vr(), resize: t = _r, createUrl: n = (e) => URL.c
1439
1439
  let s = i.get(e);
1440
1440
  if (!s) return Promise.resolve(null);
1441
1441
  let c = o >= s.scale, l = `${e}@${c ? "full" : o}`, u = a.get(l);
1442
- for (u ? a.delete(l) : u = c ? Promise.resolve(n(s.blob)) : t(s.blob, Math.round(s.width * o), Math.round(s.height * o)).then(n), a.set(l, u); a.size > mr;) {
1442
+ for (u ? a.delete(l) : u = c ? Promise.resolve(n(s.blob)) : t(s.blob, Math.round(s.width * o), Math.round(s.height * o)).then(n), a.set(l, u); a.size > hr;) {
1443
1443
  let [e, t] = a.entries().next().value;
1444
1444
  a.delete(e), t.then(r, () => void 0);
1445
1445
  }
@@ -1454,64 +1454,77 @@ function yr({ persistence: e = vr(), resize: t = _r, createUrl: n = (e) => URL.c
1454
1454
  }
1455
1455
  //#endregion
1456
1456
  //#region src/viewer/lib/tier-controller.ts
1457
- var br = 1500, xr = 150, Sr = 2, Cr = 3e3, wr = 8e3;
1458
- function Tr({ now: e = () => performance.now(), schedule: t = (e, t) => window.setTimeout(e, t), cancel: n = (e) => window.clearTimeout(e), onChange: r }) {
1459
- let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = {
1457
+ var xr = 1500, Sr = 150, Cr = 2, wr = 2, Tr = 3e3, Er = 8e3;
1458
+ function Dr({ now: e = () => performance.now(), schedule: t = (e, t) => window.setTimeout(e, t), cancel: n = (e) => window.clearTimeout(e), onChange: r }) {
1459
+ let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), c = {
1460
1460
  id: null,
1461
1461
  since: 0
1462
- }, u = (e) => {
1462
+ }, l = (e) => {
1463
1463
  let t = i.get(e);
1464
1464
  t && !t.ready && (t.ready = !0, t.timer !== void 0 && n(t.timer), t.timer = void 0, r());
1465
- }, d = (e) => {
1465
+ }, u = (e) => {
1466
1466
  let t = i.get(e);
1467
1467
  t?.timer !== void 0 && n(t.timer), i.delete(e);
1468
1468
  };
1469
1469
  return {
1470
1470
  loaded(e) {
1471
1471
  let r = i.get(e);
1472
- r && !r.ready && (r.timer !== void 0 && n(r.timer), r.timer = t(() => u(e), Cr));
1472
+ r && !r.ready && (r.timer !== void 0 && n(r.timer), r.timer = t(() => l(e), Tr));
1473
1473
  },
1474
- ready: u,
1475
- update(f) {
1476
- let p = e(), m = new Set(f.boards.map((e) => e.id));
1477
- for (let e of [...i.keys()]) m.has(e) || d(e);
1478
- f.hovered !== l.id && (l.timer !== void 0 && n(l.timer), l = {
1479
- id: f.hovered,
1480
- since: p,
1481
- timer: f.hovered ? t(r, xr) : void 0
1474
+ ready: l,
1475
+ update(d) {
1476
+ let f = e(), p = new Set(d.boards.map((e) => e.id));
1477
+ for (let e of [...i.keys()]) p.has(e) || u(e);
1478
+ d.hovered !== c.id && (c.timer !== void 0 && n(c.timer), c = {
1479
+ id: d.hovered,
1480
+ since: f,
1481
+ timer: d.hovered ? t(r, Sr) : void 0
1482
1482
  });
1483
- let h = f.hoverPromotes && l.id && p - l.since >= xr ? l.id : null, g = h ? /* @__PURE__ */ new Set([...f.pinned, h]) : f.pinned, _ = o({
1484
- ...f,
1483
+ let h = d.hoverPromotes && c.id && f - c.since >= Sr ? c.id : null, g = h ? /* @__PURE__ */ new Set([...d.pinned, h]) : d.pinned, _ = m({
1484
+ ...d,
1485
1485
  pinned: g
1486
1486
  });
1487
- if (!f.scaling) {
1487
+ if (!d.scaling) {
1488
1488
  let e = /* @__PURE__ */ new Set();
1489
- for (let [t, n] of _) n === "live" && (a.set(t, p), e.add(t));
1490
- for (let n of c) {
1491
- if (e.has(n) || !m.has(n)) continue;
1492
- let i = p - (a.get(n) ?? -Infinity);
1493
- i >= br || (e.add(n), s.has(n) || s.set(n, t(() => {
1494
- s.delete(n), r();
1495
- }, br - i)));
1489
+ for (let [t, n] of _) n === "live" && (a.set(t, f), e.add(t));
1490
+ for (let n of s) {
1491
+ if (e.has(n) || !p.has(n)) continue;
1492
+ let i = f - (a.get(n) ?? -Infinity);
1493
+ i >= xr || (e.add(n), o.has(n) || o.set(n, t(() => {
1494
+ o.delete(n), r();
1495
+ }, xr - i)));
1496
+ }
1497
+ s = e;
1498
+ let n = (d.warm ?? []).filter((e) => p.has(e) && !s.has(e)), c = new Set(n);
1499
+ for (let e of [...i.keys()]) !s.has(e) && !c.has(e) && u(e);
1500
+ let m = [...i.values()].filter((e) => !e.ready).length, h = d.boards.map((e) => e.id).filter((e) => s.has(e) && !i.has(e)).sort((e, t) => Number(g.has(t)) - Number(g.has(e)));
1501
+ for (let e of h) {
1502
+ if (m >= Cr) break;
1503
+ let n = { ready: !1 };
1504
+ i.set(e, n), n.timer = t(() => l(e), Er), m++;
1496
1505
  }
1497
- c = e;
1498
- for (let e of [...i.keys()]) c.has(e) || d(e);
1499
- let n = [...i.values()].filter((e) => !e.ready).length, o = f.boards.map((e) => e.id).filter((e) => c.has(e) && !i.has(e)).sort((e, t) => Number(g.has(t)) - Number(g.has(e)));
1500
- for (let e of o) {
1501
- if (n >= Sr) break;
1502
- let r = { ready: !1 };
1503
- i.set(e, r), r.timer = t(() => u(e), wr), n++;
1506
+ let v = [...i.keys()].filter((e) => !s.has(e)).length;
1507
+ for (let e of n) {
1508
+ if (m >= Cr || v >= wr) break;
1509
+ if (i.has(e)) continue;
1510
+ let n = { ready: !1 };
1511
+ i.set(e, n), n.timer = t(() => l(e), Er), m++, v++;
1504
1512
  }
1505
1513
  }
1506
1514
  let v = /* @__PURE__ */ new Map();
1507
1515
  for (let [e, t] of _) {
1508
1516
  let n = i.get(e);
1509
- n ? v.set(e, {
1517
+ n && s.has(e) ? v.set(e, {
1510
1518
  tier: "live",
1511
1519
  mounted: !0,
1512
1520
  ready: n.ready
1521
+ }) : n ? v.set(e, {
1522
+ tier: d.snapshots.has(e) ? "snapshot" : "placeholder",
1523
+ mounted: !0,
1524
+ ready: n.ready,
1525
+ warming: !0
1513
1526
  }) : v.set(e, {
1514
- tier: t === "live" ? f.snapshots.has(e) ? "snapshot" : "placeholder" : t,
1527
+ tier: t === "live" ? d.snapshots.has(e) ? "snapshot" : "placeholder" : t,
1515
1528
  mounted: !1,
1516
1529
  ready: !1
1517
1530
  });
@@ -1522,8 +1535,8 @@ function Tr({ now: e = () => performance.now(), schedule: t = (e, t) => window.s
1522
1535
  }
1523
1536
  //#endregion
1524
1537
  //#region src/viewer/hooks/useBoardTiers.ts
1525
- var Er = 3e3, Dr = null;
1526
- function Or() {
1538
+ var Or = 3e3, kr = null;
1539
+ function Ar() {
1527
1540
  let e = typeof matchMedia == "function" ? matchMedia("(prefers-color-scheme: dark)") : null, [t, n] = Y(!!e?.matches);
1528
1541
  return K(() => {
1529
1542
  if (!e) return;
@@ -1531,49 +1544,56 @@ function Or() {
1531
1544
  return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
1532
1545
  }, [e]), t ? "dark" : "light";
1533
1546
  }
1534
- function kr({ artifact: e, boards: n, versions: r, pending: i, view: a, scaling: s, viewport: c, pinned: l, hovered: u, hoverPromotes: d, persistable: p, store: m }) {
1535
- let h = m ?? (Dr ??= yr()), [, g] = Ke((e) => e + 1, 0), [_] = Y(() => Tr({ onChange: g })), v = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, y = Or(), b = J(/* @__PURE__ */ new Map()), x = J(/* @__PURE__ */ new Map()), S = n.filter(([e, n]) => !t(n) && ae(r, n.file) && !i.has(e)), C = new Map(S.map(([t, n]) => [t, gr({
1547
+ function jr({ artifact: e, boards: n, versions: r, pending: i, view: a, scaling: o, viewport: s, pinned: l, hovered: u, hoverPromotes: d, persistable: f, store: p }) {
1548
+ let h = p ?? (kr ??= br()), [, g] = qe((e) => e + 1, 0), [_] = Y(() => Dr({ onChange: g })), v = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, y = Ar(), b = J(/* @__PURE__ */ new Map()), x = J(/* @__PURE__ */ new Map()), C = n.filter(([e, n]) => !t(n) && M(r, n.file) && !i.has(e)), w = new Map(C.map(([t, n]) => [t, _r({
1536
1549
  artifact: e,
1537
1550
  file: n.file,
1538
1551
  version: r[n.file] ?? 0,
1539
1552
  scheme: y,
1540
1553
  w: n.w,
1541
1554
  h: n.h
1542
- })])), w = J(C);
1543
- w.current = C;
1544
- let T = J(p);
1545
- T.current = p;
1546
- let E = J(s);
1547
- E.current = s, K(() => h.subscribe(() => g()), [h]);
1548
- let D = J(/* @__PURE__ */ new Set());
1555
+ })])), T = J(w);
1556
+ T.current = w;
1557
+ let E = J(f);
1558
+ E.current = f;
1559
+ let D = J(o);
1560
+ D.current = o, K(() => h.subscribe(() => g()), [h]);
1561
+ let O = J(/* @__PURE__ */ new Set());
1549
1562
  K(() => {
1550
- for (let e of C.values()) h.has(e) || D.current.has(e) || (D.current.add(e), h.load(e));
1563
+ for (let e of w.values()) h.has(e) || O.current.has(e) || (O.current.add(e), h.load(e));
1551
1564
  });
1552
- let O = new Set([...C].filter(([, e]) => h.has(e) && !h.isUnsupported(e)).map(([e]) => e)), k = _.update({
1553
- boards: S.map(([e, t]) => ({
1554
- id: e,
1555
- x: t.x,
1556
- y: t.y,
1557
- w: t.w,
1558
- h: t.h
1559
- })),
1565
+ let k = new Set([...w].filter(([, e]) => h.has(e) && !h.isUnsupported(e)).map(([e]) => e)), A = C.map(([e, t]) => ({
1566
+ id: e,
1567
+ x: t.x,
1568
+ y: t.y,
1569
+ w: t.w,
1570
+ h: t.h
1571
+ })), j = new Set([...w].filter(([, e]) => h.isUnsupported(e)).map(([e]) => e)), ee = o ? [] : c({
1572
+ boards: A,
1560
1573
  view: a,
1561
- viewport: c,
1574
+ viewport: s,
1575
+ snapshots: k,
1576
+ skip: j
1577
+ }), te = _.update({
1578
+ boards: A,
1579
+ view: a,
1580
+ viewport: s,
1562
1581
  pinned: l,
1563
- snapshots: O,
1564
- scaling: s,
1582
+ snapshots: k,
1583
+ scaling: o,
1565
1584
  hovered: u,
1566
- hoverPromotes: d
1567
- }), A = J(a.k);
1568
- s || (A.current = a.k);
1569
- let j = f(A.current, v), [ee, M] = Y({}), te = J(/* @__PURE__ */ new Set()), ne = J(/* @__PURE__ */ new Set()), re = J(/* @__PURE__ */ new Set());
1585
+ hoverPromotes: d,
1586
+ warm: ee
1587
+ }), ne = J(a.k);
1588
+ o || (ne.current = a.k);
1589
+ let re = S(ne.current, v), [ie, ae] = Y({}), oe = J(/* @__PURE__ */ new Set()), se = J(/* @__PURE__ */ new Set()), N = J(/* @__PURE__ */ new Set());
1570
1590
  K(() => {
1571
- for (let [e, t] of C) {
1572
- let n = k.get(e);
1573
- if (!O.has(e) || !(n?.tier === "snapshot" || n?.mounted)) continue;
1574
- let r = `${t}#${h.revision(t)}@${j}`;
1575
- ee[e]?.name === r || te.current.has(r) || re.current.has(r) || (te.current.add(r), h.url(t, j).then((t) => {
1576
- te.current.delete(r), t && ne.current.has(t) ? re.current.add(r) : t && M((n) => n[e]?.name === r ? n : {
1591
+ for (let [e, t] of w) {
1592
+ let n = te.get(e);
1593
+ if (!k.has(e) || !(n?.tier === "snapshot" || n?.mounted)) continue;
1594
+ let r = `${t}#${h.revision(t)}@${re}`;
1595
+ ie[e]?.name === r || oe.current.has(r) || N.current.has(r) || (oe.current.add(r), h.url(t, re).then((t) => {
1596
+ oe.current.delete(r), t && se.current.has(t) ? N.current.add(r) : t && ae((n) => n[e]?.name === r ? n : {
1577
1597
  ...n,
1578
1598
  [e]: {
1579
1599
  name: r,
@@ -1583,25 +1603,25 @@ function kr({ artifact: e, boards: n, versions: r, pending: i, view: a, scaling:
1583
1603
  }));
1584
1604
  }
1585
1605
  });
1586
- let ie = G((e, t) => {
1587
- t.startsWith("blob:") && (ne.current.add(t), M((n) => {
1606
+ let ce = G((e, t) => {
1607
+ t.startsWith("blob:") && (se.current.add(t), ae((n) => {
1588
1608
  if (n[e]?.url !== t) return n;
1589
1609
  let { [e]: r, ...i } = n;
1590
1610
  return i;
1591
1611
  }));
1592
- }, []), N = q(() => new Map(n.map(([e, t]) => [e, `data:image/svg+xml;charset=utf-8,${encodeURIComponent(pr({
1612
+ }, []), le = q(() => new Map(n.map(([e, t]) => [e, `data:image/svg+xml;charset=utf-8,${encodeURIComponent(mr({
1593
1613
  id: e,
1594
1614
  title: t.title,
1595
1615
  w: t.w,
1596
1616
  h: t.h
1597
- }))}`])), [n]), P = J([]), F = J(null), oe = J(0), se = G(() => {
1598
- if (!(F.current || E.current)) for (; P.current.length;) {
1599
- let e = P.current.shift(), t = b.current.get(e)?.contentWindow, n = w.current.get(e);
1617
+ }))}`])), [n]), ue = J([]), P = J(null), de = J(0), F = G(() => {
1618
+ if (!(P.current || D.current)) for (; ue.current.length;) {
1619
+ let e = ue.current.shift(), t = b.current.get(e)?.contentWindow, n = T.current.get(e);
1600
1620
  if (!t || !n || h.isUnsupported(n)) continue;
1601
- let r = ++oe.current, i = window.setTimeout(() => {
1602
- F.current?.request === r && (h.markUnsupported(n), F.current = null, g(), se());
1603
- }, Er);
1604
- F.current = {
1621
+ let r = ++de.current, i = window.setTimeout(() => {
1622
+ P.current?.request === r && (h.markUnsupported(n), P.current = null, g(), F());
1623
+ }, Or);
1624
+ P.current = {
1605
1625
  id: e,
1606
1626
  key: n,
1607
1627
  request: r,
@@ -1613,14 +1633,14 @@ function kr({ artifact: e, boards: n, versions: r, pending: i, view: a, scaling:
1613
1633
  }, "*");
1614
1634
  return;
1615
1635
  }
1616
- }, [h, v]), ce = J(se);
1617
- ce.current = se, K(() => {
1618
- s || se();
1619
- }, [s, se]), K(() => () => {
1620
- F.current && window.clearTimeout(F.current.timer);
1636
+ }, [h, v]), fe = J(F);
1637
+ fe.current = F, K(() => {
1638
+ o || F();
1639
+ }, [o, F]), K(() => () => {
1640
+ P.current && window.clearTimeout(P.current.timer);
1621
1641
  }, []), K(() => {
1622
1642
  let e = (e) => {
1623
- P.current.includes(e) || P.current.push(e), se();
1643
+ ue.current.includes(e) || ue.current.push(e), F();
1624
1644
  }, t = (t) => {
1625
1645
  let n = t.data?.type;
1626
1646
  if (typeof n != "string" || !n.startsWith("ryugi:board:")) return;
@@ -1629,30 +1649,30 @@ function kr({ artifact: e, boards: n, versions: r, pending: i, view: a, scaling:
1629
1649
  if (n === "ryugi:board:ready") _.ready(r), e(r);
1630
1650
  else if (n === "ryugi:board:changed") e(r);
1631
1651
  else if (n === "ryugi:board:snapshot") {
1632
- let e = F.current;
1652
+ let e = P.current;
1633
1653
  if (!e || e.id !== r || t.data.request !== e.request) return;
1634
- window.clearTimeout(e.timer), F.current = null;
1654
+ window.clearTimeout(e.timer), P.current = null;
1635
1655
  let { blob: n, width: i, height: a } = t.data;
1636
1656
  n instanceof Blob && typeof i == "number" && typeof a == "number" ? h.put(e.key, {
1637
1657
  blob: n,
1638
1658
  width: i,
1639
1659
  height: a,
1640
1660
  scale: v
1641
- }, { persist: T.current(r) }) : (h.markUnsupported(e.key), g()), se();
1661
+ }, { persist: E.current(r) }) : (h.markUnsupported(e.key), g()), F();
1642
1662
  }
1643
1663
  }
1644
1664
  };
1645
1665
  return window.addEventListener("message", t), () => window.removeEventListener("message", t);
1646
1666
  }, [
1647
1667
  _,
1648
- se,
1668
+ F,
1649
1669
  h,
1650
1670
  v
1651
1671
  ]);
1652
1672
  let I = G((e) => (x.current.has(e) || x.current.set(e, (t) => {
1653
- t ? b.current.set(e, t) : (b.current.delete(e), P.current = P.current.filter((t) => t !== e), F.current?.id === e && (window.clearTimeout(F.current.timer), F.current = null, ce.current()));
1654
- }), x.current.get(e)), []), L = G((e) => _.loaded(e), [_]), le = n.filter(([, e]) => t(e)), ue = o({
1655
- boards: le.map(([e, t]) => ({
1673
+ t ? b.current.set(e, t) : (b.current.delete(e), ue.current = ue.current.filter((t) => t !== e), P.current?.id === e && (window.clearTimeout(P.current.timer), P.current = null, fe.current()));
1674
+ }), x.current.get(e)), []), L = G((e) => _.loaded(e), [_]), pe = n.filter(([, e]) => t(e)), me = m({
1675
+ boards: pe.map(([e, t]) => ({
1656
1676
  id: e,
1657
1677
  x: t.x,
1658
1678
  y: t.y,
@@ -1660,45 +1680,45 @@ function kr({ artifact: e, boards: n, versions: r, pending: i, view: a, scaling:
1660
1680
  h: t.h
1661
1681
  })),
1662
1682
  view: a,
1663
- viewport: c,
1683
+ viewport: s,
1664
1684
  pinned: /* @__PURE__ */ new Set(),
1665
- snapshots: new Set(le.map(([e]) => e))
1666
- }), R = /* @__PURE__ */ new Map();
1667
- for (let [e, t] of ue) R.set(e, {
1685
+ snapshots: new Set(pe.map(([e]) => e))
1686
+ }), he = /* @__PURE__ */ new Map();
1687
+ for (let [e, t] of me) he.set(e, {
1668
1688
  tier: t,
1669
1689
  mounted: !1,
1670
1690
  image: null,
1671
1691
  overlay: !1,
1672
1692
  hidden: !1
1673
1693
  });
1674
- for (let [e, t] of k) {
1675
- let n = C.get(e), r = ee[e], i = O.has(e) && r?.name.startsWith(`${n}#`) ? r.url : null, a = t.tier === "empty" ? null : i ?? N.get(e) ?? null;
1676
- R.set(e, {
1694
+ for (let [e, t] of te) {
1695
+ let n = w.get(e), r = ie[e], i = k.has(e) && r?.name.startsWith(`${n}#`) ? r.url : null, a = t.tier === "empty" ? null : i ?? le.get(e) ?? null;
1696
+ he.set(e, {
1677
1697
  tier: t.tier,
1678
1698
  mounted: t.mounted,
1679
1699
  image: a,
1680
- overlay: t.mounted && (!t.ready || s && !!i),
1681
- hidden: t.mounted && t.ready && s && !!i
1700
+ overlay: t.mounted && (!t.ready || !!t.warming || o && !!i),
1701
+ hidden: t.mounted && (!!t.warming || t.ready && o && !!i)
1682
1702
  });
1683
1703
  }
1684
1704
  return {
1685
- renders: R,
1705
+ renders: he,
1686
1706
  frameRef: I,
1687
1707
  loaded: L,
1688
- imageFailed: ie
1708
+ imageFailed: ce
1689
1709
  };
1690
1710
  }
1691
1711
  //#endregion
1692
1712
  //#region src/shared/verdicts.ts
1693
- var Ar = (e) => e.messages[0]?.at ?? e.statusAt;
1694
- function jr(e, t, n) {
1695
- let r = e.filter((e) => e.anchor.group === t && e.anchor.verdict && e.messages.some((e) => !e.deleted)).sort((e, t) => Ar(e) < Ar(t) ? -1 : +(Ar(e) > Ar(t))), i = r.filter((e) => e.anchor.verdict === "reject" && e.status === "open").length, a = r.at(-1);
1713
+ var Mr = (e) => e.messages[0]?.at ?? e.statusAt;
1714
+ function Nr(e, t, n) {
1715
+ let r = e.filter((e) => e.anchor.group === t && e.anchor.verdict && e.messages.some((e) => !e.deleted)).sort((e, t) => Mr(e) < Mr(t) ? -1 : +(Mr(e) > Mr(t))), i = r.filter((e) => e.anchor.verdict === "reject" && e.status === "open").length, a = r.at(-1);
1696
1716
  if (!a) return {
1697
1717
  state: "pending",
1698
1718
  evidenceUpdated: !1,
1699
1719
  rejectThreads: i
1700
1720
  };
1701
- let o = Ar(a);
1721
+ let o = Mr(a);
1702
1722
  return n.has(a.id) ? {
1703
1723
  state: "pending",
1704
1724
  at: o,
@@ -1716,11 +1736,11 @@ function jr(e, t, n) {
1716
1736
  rejectThreads: i
1717
1737
  };
1718
1738
  }
1719
- function Mr(e, t, n) {
1739
+ function Pr(e, t, n) {
1720
1740
  return Object.entries(e).filter(([, e]) => e.verify === !0 && e.boards.some((e) => t[e]?.page === n));
1721
1741
  }
1722
- function Nr(e, t, n, r, i) {
1723
- let a = Mr(e, t, n), o = a.map(([e]) => [e, jr(r, e, i).state]), s = o.find(([, e]) => e !== "pass")?.[0];
1742
+ function Fr(e, t, n, r, i) {
1743
+ let a = Pr(e, t, n), o = a.map(([e]) => [e, Nr(r, e, i).state]), s = o.find(([, e]) => e !== "pass")?.[0];
1724
1744
  return {
1725
1745
  passed: o.filter(([, e]) => e === "pass").length,
1726
1746
  total: a.length,
@@ -1729,14 +1749,14 @@ function Nr(e, t, n, r, i) {
1729
1749
  }
1730
1750
  //#endregion
1731
1751
  //#region src/viewer/hooks/useVerdicts.ts
1732
- function Pr({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a }) {
1733
- let [o, s] = Y(null), c = q(() => e?.groups ?? {}, [e]), l = q(() => e?.boards ?? {}, [e]), u = q(() => Object.fromEntries(Mr(c, l, t).map(([e]) => [e, jr(n, e, r)])), [
1752
+ function Ir({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a }) {
1753
+ let [o, s] = Y(null), c = q(() => e?.groups ?? {}, [e]), l = q(() => e?.boards ?? {}, [e]), u = q(() => Object.fromEntries(Pr(c, l, t).map(([e]) => [e, Nr(n, e, r)])), [
1734
1754
  c,
1735
1755
  l,
1736
1756
  t,
1737
1757
  n,
1738
1758
  r
1739
- ]), d = q(() => Nr(c, l, t, n, r), [
1759
+ ]), d = q(() => Fr(c, l, t, n, r), [
1740
1760
  c,
1741
1761
  l,
1742
1762
  t,
@@ -1792,8 +1812,8 @@ function Pr({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a
1792
1812
  }
1793
1813
  //#endregion
1794
1814
  //#region src/viewer/verdicts/RejectComposer.tsx
1795
- function Fr({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
1796
- let { t: a } = L();
1815
+ function Lr({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
1816
+ let { t: a } = F();
1797
1817
  return /* @__PURE__ */ Q("div", {
1798
1818
  "data-chrome": "reject",
1799
1819
  className: "x10l6tqk xk3oba8 xj6ak53 xb3r6kr xixl9f9 x12ilycc x1d5q07e xqfszdh xfifm61 xo2rkog xt0e3qv",
@@ -1819,7 +1839,7 @@ function Fr({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
1819
1839
  })
1820
1840
  ]
1821
1841
  }),
1822
- /* @__PURE__ */ Z(ze, {
1842
+ /* @__PURE__ */ Z(Be, {
1823
1843
  autoFocus: !0,
1824
1844
  placeholder: a("verdict.reasonPlaceholder"),
1825
1845
  onSubmit: r,
@@ -1834,7 +1854,7 @@ function Fr({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
1834
1854
  }
1835
1855
  //#endregion
1836
1856
  //#region src/shared/inspector.ts
1837
- var Ir = [
1857
+ var Rr = [
1838
1858
  "width",
1839
1859
  "height",
1840
1860
  "position",
@@ -1851,7 +1871,7 @@ var Ir = [
1851
1871
  "font-size",
1852
1872
  "color",
1853
1873
  "box-shadow"
1854
- ], Lr = "M14.5 3a10.5 10.5 0 1 1-4.2 20.1l-5 1.6c-.9.3-1.7-.5-1.4-1.4l1.6-5A10.5 10.5 0 0 1 14.5 3z", Rr = `<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='${Lr}' fill='none' stroke='white' stroke-width='4' stroke-linejoin='round'/><path d='${Lr}' fill='#c65d3b'/><path d='M14.5 9.3v8.4M10.3 13.5h8.4' stroke='white' stroke-width='2.4' stroke-linecap='round'/></svg>`, zr = `url("data:image/svg+xml,${encodeURIComponent(Rr)}") 4 24, crosshair`, Br = (e) => !!e && typeof e == "object" && !Array.isArray(e), $ = (e, t) => typeof e == "string" && e.length <= t, Vr = (e) => typeof e == "number" && Number.isFinite(e) && Math.abs(e) <= 1e8, Hr = (e) => Number.isSafeInteger(e) && e > 0, Ur = (e) => e === null || Br(e) && Vr(e.x) && Vr(e.y) && Vr(e.width) && Vr(e.height) && e.width >= 0 && e.height >= 0, Wr = (e) => Ir.some((t) => t === e), Gr = /* @__PURE__ */ new Set([
1874
+ ], zr = "M14.5 3a10.5 10.5 0 1 1-4.2 20.1l-5 1.6c-.9.3-1.7-.5-1.4-1.4l1.6-5A10.5 10.5 0 0 1 14.5 3z", Br = `<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='${zr}' fill='none' stroke='white' stroke-width='4' stroke-linejoin='round'/><path d='${zr}' fill='#c65d3b'/><path d='M14.5 9.3v8.4M10.3 13.5h8.4' stroke='white' stroke-width='2.4' stroke-linecap='round'/></svg>`, Vr = `url("data:image/svg+xml,${encodeURIComponent(Br)}") 4 24, crosshair`, Hr = (e) => !!e && typeof e == "object" && !Array.isArray(e), $ = (e, t) => typeof e == "string" && e.length <= t, Ur = (e) => typeof e == "number" && Number.isFinite(e) && Math.abs(e) <= 1e8, Wr = (e) => Number.isSafeInteger(e) && e > 0, Gr = (e) => e === null || Hr(e) && Ur(e.x) && Ur(e.y) && Ur(e.width) && Ur(e.height) && e.width >= 0 && e.height >= 0, Kr = (e) => Rr.some((t) => t === e), qr = /* @__PURE__ */ new Set([
1855
1875
  "Frame",
1856
1876
  "Column",
1857
1877
  "Row",
@@ -1861,28 +1881,28 @@ var Ir = [
1861
1881
  "Image",
1862
1882
  "Button"
1863
1883
  ]);
1864
- function Kr(e) {
1884
+ function Jr(e) {
1865
1885
  if (!Array.isArray(e) || e.length > 2500) return !1;
1866
1886
  let t = /* @__PURE__ */ new Map();
1867
1887
  for (let n of e) {
1868
- if (!Br(n) || !Hr(n.id) || t.has(n.id) || !$(n.name, 100) || !$(n.tag, 80) || !$(n.selector, 200) || !$(n.path, 4e3) || !Gr.has(n.kind) || !Array.isArray(n.children) || n.children.length > e.length || n.children.some((e) => !Hr(e)) || new Set(n.children).size !== n.children.length || (t.size === 0 ? n.parentId !== null : !Hr(n.parentId) || !t.has(n.parentId))) return !1;
1888
+ if (!Hr(n) || !Wr(n.id) || t.has(n.id) || !$(n.name, 100) || !$(n.tag, 80) || !$(n.selector, 200) || !$(n.path, 4e3) || !qr.has(n.kind) || !Array.isArray(n.children) || n.children.length > e.length || n.children.some((e) => !Wr(e)) || new Set(n.children).size !== n.children.length || (t.size === 0 ? n.parentId !== null : !Wr(n.parentId) || !t.has(n.parentId))) return !1;
1869
1889
  t.set(n.id, n);
1870
1890
  }
1871
1891
  for (let e of t.values()) if (e.children.some((n) => t.get(n)?.parentId !== e.id) || e.parentId !== null && !t.get(e.parentId)?.children.includes(e.id)) return !1;
1872
1892
  return !0;
1873
1893
  }
1874
- function qr(e) {
1875
- if (!Br(e) || !$(e.session, 128) || !e.session || !$(e.connection, 128) || !e.connection) return null;
1894
+ function Yr(e) {
1895
+ if (!Hr(e) || !$(e.session, 128) || !e.session || !$(e.connection, 128) || !e.connection) return null;
1876
1896
  let t = !1;
1877
1897
  switch (e.type) {
1878
1898
  case "ryugi:inspect:tree":
1879
- t = typeof e.truncated == "boolean" && Kr(e.nodes);
1899
+ t = typeof e.truncated == "boolean" && Jr(e.nodes);
1880
1900
  break;
1881
1901
  case "ryugi:inspect:hover":
1882
- t = Ur(e.rect) && (e.id === void 0 || e.id === null || Hr(e.id));
1902
+ t = Gr(e.rect) && (e.id === void 0 || e.id === null || Wr(e.id));
1883
1903
  break;
1884
1904
  case "ryugi:inspect:rect":
1885
- t = Hr(e.id) && e.rect !== null && Ur(e.rect);
1905
+ t = Wr(e.id) && e.rect !== null && Gr(e.rect);
1886
1906
  break;
1887
1907
  case "ryugi:inspect:selection": {
1888
1908
  if (![
@@ -1892,18 +1912,18 @@ function qr(e) {
1892
1912
  "primary"
1893
1913
  ].includes(e.reason) || e.toggle !== void 0 && typeof e.toggle != "boolean") break;
1894
1914
  let n = e.selection;
1895
- t = n === null || Br(n) && Hr(n.id) && $(n.name, 100) && $(n.tag, 80) && $(n.selector, 200) && n.rect !== null && Ur(n.rect) && $(n.html, 2e4) && [
1915
+ t = n === null || Hr(n) && Wr(n.id) && $(n.name, 100) && $(n.tag, 80) && $(n.selector, 200) && n.rect !== null && Gr(n.rect) && $(n.html, 2e4) && [
1896
1916
  "fixed",
1897
1917
  "fill",
1898
1918
  "hug"
1899
- ].includes(n.widthMode) && ["fixed", "hug"].includes(n.heightMode) && Br(n.css) && Ir.every((e) => $(n.css[e], 2e3));
1919
+ ].includes(n.widthMode) && ["fixed", "hug"].includes(n.heightMode) && Hr(n.css) && Rr.every((e) => $(n.css[e], 2e3));
1900
1920
  break;
1901
1921
  }
1902
1922
  case "ryugi:inspect:targets":
1903
- t = Hr(e.request) && Array.isArray(e.targets) && e.targets.length <= 2500 && new Set(e.targets.map((e) => Br(e) ? e.id : null)).size === e.targets.length && e.targets.every((e) => Br(e) && Hr(e.id) && $(e.name, 100) && e.rect !== null && Ur(e.rect));
1923
+ t = Wr(e.request) && Array.isArray(e.targets) && e.targets.length <= 2500 && new Set(e.targets.map((e) => Hr(e) ? e.id : null)).size === e.targets.length && e.targets.every((e) => Hr(e) && Wr(e.id) && $(e.name, 100) && e.rect !== null && Gr(e.rect));
1904
1924
  break;
1905
1925
  case "ryugi:inspect:details":
1906
- t = Hr(e.request) && Array.isArray(e.nodes) && e.nodes.length <= 2500 && e.nodes.every((e) => Br(e) && Hr(e.id) && $(e.text, 200) && $(e.html, 2e3));
1926
+ t = Wr(e.request) && Array.isArray(e.nodes) && e.nodes.length <= 2500 && e.nodes.every((e) => Hr(e) && Wr(e.id) && $(e.text, 200) && $(e.html, 2e3));
1907
1927
  break;
1908
1928
  case "ryugi:inspect:drag":
1909
1929
  t = [
@@ -1911,16 +1931,16 @@ function qr(e) {
1911
1931
  "move",
1912
1932
  "end",
1913
1933
  "cancel"
1914
- ].includes(e.phase) && Vr(e.x) && Vr(e.y) && typeof e.append == "boolean" && (e.id === void 0 || Hr(e.id));
1934
+ ].includes(e.phase) && Ur(e.x) && Ur(e.y) && typeof e.append == "boolean" && (e.id === void 0 || Wr(e.id));
1915
1935
  break;
1916
1936
  case "ryugi:inspect:tweaks":
1917
- t = Array.isArray(e.tweaks) && e.tweaks.length <= 2500 && e.tweaks.every((e) => Br(e) && Hr(e.id) && $(e.name, 200) && Wr(e.property) && $(e.from, 2e3) && $(e.value, 300));
1937
+ t = Array.isArray(e.tweaks) && e.tweaks.length <= 2500 && e.tweaks.every((e) => Hr(e) && Wr(e.id) && $(e.name, 200) && Kr(e.property) && $(e.from, 2e3) && $(e.value, 300));
1918
1938
  break;
1919
1939
  case "ryugi:inspect:wheel":
1920
- t = Vr(e.deltaX) && Vr(e.deltaY) && Vr(e.x) && Vr(e.y) && typeof e.zoom == "boolean";
1940
+ t = Ur(e.deltaX) && Ur(e.deltaY) && Ur(e.x) && Ur(e.y) && typeof e.zoom == "boolean";
1921
1941
  break;
1922
1942
  case "ryugi:inspect:pan":
1923
- t = Vr(e.deltaX) && Vr(e.deltaY);
1943
+ t = Ur(e.deltaX) && Ur(e.deltaY);
1924
1944
  break;
1925
1945
  case "ryugi:inspect:key": t = $(e.code, 32) && $(e.key, 32) && [
1926
1946
  "down",
@@ -1934,7 +1954,7 @@ function qr(e) {
1934
1954
  }
1935
1955
  //#endregion
1936
1956
  //#region src/viewer/hooks/useInspector.ts
1937
- function Jr(e) {
1957
+ function Xr(e) {
1938
1958
  let [t, n] = Y({
1939
1959
  frames: {},
1940
1960
  selection: null,
@@ -2011,7 +2031,7 @@ function Jr(e) {
2011
2031
  let e = (e) => {
2012
2032
  let t = Array.from(i.current).find(([, t]) => t.element.contentWindow === e.source);
2013
2033
  if (!t) return;
2014
- let [a, o] = t, l = qr(e.data);
2034
+ let [a, o] = t, l = Yr(e.data);
2015
2035
  if (!(!l || l.connection !== o.connection || o.session !== null && o.session !== l.session) && (r.current.options.enabled || l.type === "ryugi:inspect:tweaks") && !(r.current.options.playing.has(a) && l.type !== "ryugi:inspect:tweaks")) {
2016
2036
  if (l.type === "ryugi:inspect:tree") {
2017
2037
  o.session = l.session;
@@ -2279,7 +2299,7 @@ function Jr(e) {
2279
2299
  }
2280
2300
  //#endregion
2281
2301
  //#region src/viewer/hooks/useMarqueeSelection.ts
2282
- function Yr(e, t, n, r) {
2302
+ function Zr(e, t, n, r) {
2283
2303
  let i = J(null), [a, o] = Y(!1), [s, c] = Y(null), { cancelDrag: l } = t, u = G(() => {
2284
2304
  i.current = null, c(null), o(!1), l();
2285
2305
  }, [l]);
@@ -2327,7 +2347,7 @@ function Yr(e, t, n, r) {
2327
2347
  }
2328
2348
  //#endregion
2329
2349
  //#region src/viewer/lib/selection.ts
2330
- function Xr({ boards: e, frames: t, targets: n, details: r }) {
2350
+ function Qr({ boards: e, frames: t, targets: n, details: r }) {
2331
2351
  let i = /* @__PURE__ */ new Map();
2332
2352
  for (let [n, r] of Object.entries(t)) {
2333
2353
  let t = e[n];
@@ -2369,15 +2389,15 @@ function Xr({ boards: e, frames: t, targets: n, details: r }) {
2369
2389
  nodes: [...i.values()]
2370
2390
  };
2371
2391
  }
2372
- var Zr = (e) => e.id.length <= k.id && e.board.length <= k.board && e.file.length <= k.file && e.tag.length <= k.tag && e.path.length <= k.path && e.name.length <= k.name, Qr = (e) => new TextEncoder().encode(JSON.stringify(e)).length;
2373
- function $r(e, t = ie) {
2374
- let n = e.selected.filter((e) => Zr(e) && e.text.length <= k.text && e.html.length <= k.html), r = e.tweaks.filter((e) => Zr(e) && e.from.length <= k.from && e.value.length <= k.value), i = {
2392
+ var $r = (e) => e.id.length <= A.id && e.board.length <= A.board && e.file.length <= A.file && e.tag.length <= A.tag && e.path.length <= A.path && e.name.length <= A.name, ei = (e) => new TextEncoder().encode(JSON.stringify(e)).length;
2393
+ function ti(e, t = oe) {
2394
+ let n = e.selected.filter((e) => $r(e) && e.text.length <= A.text && e.html.length <= A.html), r = e.tweaks.filter((e) => $r(e) && e.from.length <= A.from && e.value.length <= A.value), i = {
2375
2395
  ...e,
2376
2396
  selected: n,
2377
2397
  tweaks: r,
2378
- nodes: e.nodes.filter(Zr).slice(0, T)
2398
+ nodes: e.nodes.filter($r).slice(0, E)
2379
2399
  };
2380
- for (let e = Qr(i); e > t && i.nodes.length; e = Qr(i)) i = {
2400
+ for (let e = ei(i); e > t && i.nodes.length; e = ei(i)) i = {
2381
2401
  ...i,
2382
2402
  nodes: i.nodes.slice(0, Math.floor(i.nodes.length * Math.min(.95, t / e)))
2383
2403
  };
@@ -2385,9 +2405,9 @@ function $r(e, t = ie) {
2385
2405
  }
2386
2406
  //#endregion
2387
2407
  //#region src/viewer/hooks/useSelectionSync.ts
2388
- var ei = crypto.randomUUID();
2389
- function ti({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
2390
- let a = J(0), { frames: o, selectedTargets: s, details: c, revision: l } = r, u = JSON.stringify(s.map(({ boardId: e, id: t }) => [e, t])), d = q(() => JSON.parse(u), [u]), f = q(() => Xr({
2408
+ var ni = crypto.randomUUID();
2409
+ function ri({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
2410
+ let a = J(0), { frames: o, selectedTargets: s, details: c, revision: l } = r, u = JSON.stringify(s.map(({ boardId: e, id: t }) => [e, t])), d = q(() => JSON.parse(u), [u]), f = q(() => Qr({
2391
2411
  boards: t ?? {},
2392
2412
  frames: o,
2393
2413
  targets: d.map(([e, t]) => ({
@@ -2405,10 +2425,10 @@ function ti({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
2405
2425
  if (!e || !i || !n) return;
2406
2426
  let t = setTimeout(() => {
2407
2427
  let t = l !== a.current;
2408
- a.current = l, i($r({
2428
+ a.current = l, i(ti({
2409
2429
  type: "selection",
2410
2430
  artifact: e,
2411
- tab: ei,
2431
+ tab: ni,
2412
2432
  human: t,
2413
2433
  ...f
2414
2434
  }));
@@ -2424,12 +2444,12 @@ function ti({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
2424
2444
  }
2425
2445
  //#endregion
2426
2446
  //#region src/viewer/hooks/usePanZoom.ts
2427
- var ni = {
2447
+ var ii = {
2428
2448
  top: 64,
2429
2449
  right: 24,
2430
2450
  bottom: 24,
2431
2451
  left: 24
2432
- }, ri = .01, ii = 420, ai = 150, oi = 100, si = p(.2, 0, 0, 1), ci = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, li = `[data-chrome]${[
2452
+ }, ai = .01, oi = 420, si = 150, ci = 100, li = f(.2, 0, 0, 1), ui = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, di = `[data-chrome]${[
2433
2453
  "board-label",
2434
2454
  "group-label",
2435
2455
  "video-controls",
@@ -2437,59 +2457,59 @@ var ni = {
2437
2457
  "reject",
2438
2458
  "parameters"
2439
2459
  ].map((e) => `:not([data-chrome="${e}"])`).join("")}`;
2440
- function ui(e, t, n, r) {
2460
+ function fi(e, t, n, r) {
2441
2461
  for (let i = e; i && i !== t; i = i.parentElement) {
2442
2462
  let { overflowX: e, overflowY: t } = getComputedStyle(i);
2443
2463
  if (r && /auto|scroll/.test(t) && i.scrollHeight > i.clientHeight || n && /auto|scroll/.test(e) && i.scrollWidth > i.clientWidth) return !0;
2444
2464
  }
2445
2465
  return !1;
2446
2466
  }
2447
- function di(t) {
2448
- let r = J(null), [i, a] = Y({
2467
+ function pi(t) {
2468
+ let n = J(null), [i, a] = Y({
2449
2469
  x: 0,
2450
2470
  y: 0,
2451
2471
  k: .5
2452
- }), [o, s] = Y(!1), [c, l] = Y(!1), d = J(null), f = J(/* @__PURE__ */ new Map()), p = J(i);
2472
+ }), [o, s] = Y(!1), [c, l] = Y(!1), u = J(null), f = J(/* @__PURE__ */ new Map()), p = J(i);
2453
2473
  p.current = i;
2454
2474
  let m = J(null), h = G(() => {
2455
2475
  m.current !== null && cancelAnimationFrame(m.current), m.current = null;
2456
2476
  }, []);
2457
2477
  K(() => h, [h]);
2458
2478
  let [g, _] = Y(!1), v = J(i.k), y = J(-Infinity), b = J(void 0);
2459
- Ge(() => {
2479
+ Ke(() => {
2460
2480
  if (i.k === v.current) return;
2461
2481
  v.current = i.k;
2462
- let e = Date.now(), t = e - y.current < oi;
2482
+ let e = Date.now(), t = e - y.current < ci;
2463
2483
  y.current = e, (t || b.current !== void 0) && (_(!0), clearTimeout(b.current), b.current = setTimeout(() => {
2464
2484
  b.current = void 0, _(!1);
2465
- }, ai));
2485
+ }, si));
2466
2486
  }, [i.k]), K(() => () => clearTimeout(b.current), []);
2467
- let [S, w] = Y(() => ({
2487
+ let [x, S] = Y(() => ({
2468
2488
  width: typeof innerWidth == "number" ? innerWidth : 0,
2469
2489
  height: typeof innerHeight == "number" ? innerHeight : 0
2470
2490
  }));
2471
2491
  K(() => {
2472
- let e = r.current;
2492
+ let e = n.current;
2473
2493
  if (!e || typeof ResizeObserver != "function") return;
2474
- let t = new ResizeObserver(() => w((t) => t.width === e.clientWidth && t.height === e.clientHeight ? t : {
2494
+ let t = new ResizeObserver(() => S((t) => t.width === e.clientWidth && t.height === e.clientHeight ? t : {
2475
2495
  width: e.clientWidth,
2476
2496
  height: e.clientHeight
2477
2497
  }));
2478
2498
  return t.observe(e), () => t.disconnect();
2479
2499
  }, []);
2480
- let T = G((e, t) => a((n) => ({
2500
+ let C = G((e, t) => a((n) => ({
2481
2501
  ...n,
2482
2502
  x: n.x + e,
2483
2503
  y: n.y + t
2484
- })), []), E = G((e) => {
2485
- e.zoom ? a((t) => n(t, Math.exp(-e.deltaY * ri), e.x, e.y)) : T(-e.deltaX, -e.deltaY);
2486
- }, [T]);
2504
+ })), []), E = G((t) => {
2505
+ t.zoom ? a((n) => e(n, Math.exp(-t.deltaY * ai), t.x, t.y)) : C(-t.deltaX, -t.deltaY);
2506
+ }, [C]);
2487
2507
  K(() => {
2488
- let e = r.current;
2508
+ let e = n.current;
2489
2509
  if (!e) return;
2490
2510
  let t = (t) => {
2491
2511
  let n = t.target, r = t.ctrlKey || t.metaKey;
2492
- if (n?.closest?.(li) || !r && ui(n, e, t.deltaX, t.deltaY)) return;
2512
+ if (n?.closest?.(di) || !r && fi(n, e, t.deltaX, t.deltaY)) return;
2493
2513
  t.preventDefault(), h();
2494
2514
  let i = e.getBoundingClientRect(), a = t.deltaMode === 1 ? 16 : t.deltaMode === 2 ? e.clientHeight : 1;
2495
2515
  E({
@@ -2499,11 +2519,11 @@ function di(t) {
2499
2519
  y: t.clientY - i.top,
2500
2520
  zoom: r
2501
2521
  });
2502
- }, n = (e) => {
2522
+ }, r = (e) => {
2503
2523
  e.ctrlKey && e.preventDefault();
2504
2524
  };
2505
- return e.addEventListener("wheel", t, { passive: !1 }), window.addEventListener("wheel", n, { passive: !1 }), () => {
2506
- e.removeEventListener("wheel", t), window.removeEventListener("wheel", n);
2525
+ return e.addEventListener("wheel", t, { passive: !1 }), window.addEventListener("wheel", r, { passive: !1 }), () => {
2526
+ e.removeEventListener("wheel", t), window.removeEventListener("wheel", r);
2507
2527
  };
2508
2528
  }, [E, h]), K(() => {
2509
2529
  let e = (e) => e.target?.closest?.("input, textarea, select, [contenteditable], [data-chrome]"), t = (t) => {
@@ -2517,7 +2537,7 @@ function di(t) {
2517
2537
  }, []);
2518
2538
  let D = t === "hand" || o, O = G((e) => {
2519
2539
  let t = e.pointerType === "touch", n = e.button === 1;
2520
- (t || (D || n) && (e.button === 0 || n)) && e.currentTarget.contains(e.target) && (e.target.closest("[data-chrome]") || (h(), e.currentTarget.setPointerCapture(e.pointerId), d.current = {
2540
+ (t || (D || n) && (e.button === 0 || n)) && e.currentTarget.contains(e.target) && (e.target.closest("[data-chrome]") || (h(), e.currentTarget.setPointerCapture(e.pointerId), u.current = {
2521
2541
  x: e.clientX,
2522
2542
  y: e.clientY
2523
2543
  }, t && f.current.set(e.pointerId, {
@@ -2534,12 +2554,12 @@ function di(t) {
2534
2554
  });
2535
2555
  let n = [...f.current.values()];
2536
2556
  if (t.length >= 2) {
2537
- a((e) => x(e, [t[0], t[1]], [n[0], n[1]]));
2557
+ a((e) => T(e, [t[0], t[1]], [n[0], n[1]]));
2538
2558
  return;
2539
2559
  }
2540
2560
  }
2541
- let t = d.current;
2542
- t && (d.current = {
2561
+ let t = u.current;
2562
+ t && (u.current = {
2543
2563
  x: e.clientX,
2544
2564
  y: e.clientY
2545
2565
  }, a((n) => ({
@@ -2550,50 +2570,50 @@ function di(t) {
2550
2570
  }, []), A = G((e) => {
2551
2571
  e ? f.current.delete(e.pointerId) : f.current.clear();
2552
2572
  let t = [...f.current.values()][0];
2553
- d.current = t ? { ...t } : null, t || l(!1);
2573
+ u.current = t ? { ...t } : null, t || l(!1);
2554
2574
  }, []), j = () => {
2555
- let e = r.current;
2575
+ let e = n.current;
2556
2576
  return {
2557
2577
  cx: (e?.clientWidth ?? 0) / 2,
2558
2578
  cy: (e?.clientHeight ?? 0) / 2
2559
2579
  };
2560
2580
  };
2561
2581
  return {
2562
- viewportRef: r,
2582
+ viewportRef: n,
2563
2583
  view: i,
2564
2584
  scaling: g,
2565
- size: S,
2585
+ size: x,
2566
2586
  place: a,
2567
- fit: G((e, t = ni, n = {}) => {
2568
- let i = r.current;
2569
- if (!i || !e) return;
2570
- let o = u(e, {
2571
- width: i.clientWidth,
2572
- height: i.clientHeight
2587
+ fit: G((e, t = ii, i = {}) => {
2588
+ let o = n.current;
2589
+ if (!o || !e) return;
2590
+ let s = d(e, {
2591
+ width: o.clientWidth,
2592
+ height: o.clientHeight
2573
2593
  }, t);
2574
- if (h(), !n.animate || ci()) {
2575
- a(o);
2594
+ if (h(), !i.animate || ui()) {
2595
+ a(s);
2576
2596
  return;
2577
2597
  }
2578
- let s = p.current, c = performance.now(), l = () => {
2579
- let e = Math.min(1, (performance.now() - c) / ii);
2580
- a(e === 1 ? o : C(s, o, si(e))), m.current = e === 1 ? null : requestAnimationFrame(l);
2598
+ let c = p.current, l = performance.now(), u = () => {
2599
+ let e = Math.min(1, (performance.now() - l) / oi);
2600
+ a(e === 1 ? s : r(c, s, li(e))), m.current = e === 1 ? null : requestAnimationFrame(u);
2581
2601
  };
2582
- m.current = requestAnimationFrame(l);
2602
+ m.current = requestAnimationFrame(u);
2583
2603
  }, [h]),
2584
- zoomBy: G((e) => {
2585
- let { cx: t, cy: r } = j();
2586
- a((i) => n(i, e, t, r));
2587
- }, []),
2588
- zoomTo: G((t) => {
2604
+ zoomBy: G((t) => {
2589
2605
  let { cx: n, cy: r } = j();
2590
2606
  a((i) => e(i, t, n, r));
2591
2607
  }, []),
2592
- panBy: T,
2608
+ zoomTo: G((e) => {
2609
+ let { cx: t, cy: n } = j();
2610
+ a((r) => w(r, e, t, n));
2611
+ }, []),
2612
+ panBy: C,
2593
2613
  wheelAt: E,
2594
2614
  panning: D,
2595
2615
  setSpaceHeld: s,
2596
- cursor: c ? "grabbing" : D ? "grab" : t === "comment" ? zr : "default",
2616
+ cursor: c ? "grabbing" : D ? "grab" : t === "comment" ? Vr : "default",
2597
2617
  hand: c ? "pinch" : D ? "open" : null,
2598
2618
  handlers: {
2599
2619
  onPointerDown: O,
@@ -2605,7 +2625,7 @@ function di(t) {
2605
2625
  }
2606
2626
  //#endregion
2607
2627
  //#region src/viewer/inspector/InspectionOutline.tsx
2608
- function fi({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
2628
+ function mi({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
2609
2629
  return t.width <= 0 || t.height <= 0 ? null : /* @__PURE__ */ Q("div", {
2610
2630
  className: `ri-outline${a ? " ri-outline-selected" : ""}`,
2611
2631
  "aria-hidden": "true",
@@ -2640,30 +2660,30 @@ function fi({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
2640
2660
  }
2641
2661
  //#endregion
2642
2662
  //#region src/viewer/inspector/Layers.tsx
2643
- var pi = {
2644
- Frame: Mt,
2645
- Column: Dt,
2646
- Row: Wt,
2647
- Grid: Nt,
2648
- Title: qt,
2649
- Text: qt,
2650
- Image: Ft,
2651
- Button: Bt
2652
- }, mi = (e, t, n) => `${encodeURIComponent(e)}:${encodeURIComponent(t)}:${n}`;
2653
- function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o }) {
2663
+ var hi = {
2664
+ Frame: Nt,
2665
+ Column: Ot,
2666
+ Row: Gt,
2667
+ Grid: Pt,
2668
+ Title: Jt,
2669
+ Text: Jt,
2670
+ Image: It,
2671
+ Button: Vt
2672
+ }, gi = (e, t, n) => `${encodeURIComponent(e)}:${encodeURIComponent(t)}:${n}`;
2673
+ function _i({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o }) {
2654
2674
  let [s, c] = Y([]), l = J(null), u = J(null), d = J(!1), { treeData: f, byKey: p } = q(() => {
2655
2675
  let n = /* @__PURE__ */ new Map(), r = [];
2656
2676
  for (let [a, o] of e) {
2657
2677
  let e = t[a];
2658
2678
  if (!e?.nodes[0]) continue;
2659
2679
  let s = new Map(e.nodes.map((e) => [e.id, e])), c = i.has(a), l = (t, r) => {
2660
- let i = mi(a, e.session, t.id);
2680
+ let i = gi(a, e.session, t.id);
2661
2681
  n.set(i, {
2662
2682
  boardId: a,
2663
2683
  node: t,
2664
2684
  parentKey: r
2665
2685
  });
2666
- let u = r === null ? "Frame" : t.kind, d = r === null ? o.title || a : t.name, f = pi[u];
2686
+ let u = r === null ? "Frame" : t.kind, d = r === null ? o.title || a : t.name, f = hi[u];
2667
2687
  return {
2668
2688
  key: i,
2669
2689
  disabled: c,
@@ -2677,7 +2697,7 @@ function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select
2677
2697
  title: `${t.tag} · ${d || t.selector}`,
2678
2698
  children: [/* @__PURE__ */ Z("span", {
2679
2699
  className: "ri-layer-kind",
2680
- children: V(`inspector.kind.${u}`)
2700
+ children: B(`inspector.kind.${u}`)
2681
2701
  }), /* @__PURE__ */ Z("span", {
2682
2702
  className: "ri-layer-name",
2683
2703
  children: d ? `“${d}”` : `<${t.tag}>`
@@ -2689,7 +2709,7 @@ function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select
2689
2709
  }),
2690
2710
  c && /* @__PURE__ */ Z("span", {
2691
2711
  className: "ri-playing",
2692
- children: V("inspector.playing")
2712
+ children: B("inspector.playing")
2693
2713
  })
2694
2714
  ] }),
2695
2715
  children: t.children.flatMap((e) => {
@@ -2708,7 +2728,7 @@ function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select
2708
2728
  e,
2709
2729
  t,
2710
2730
  i
2711
- ]), m = n && t[n.boardId] ? mi(n.boardId, t[n.boardId].session, n.node.id) : null, h = r ? r.flatMap((e) => t[e.boardId] ? [mi(e.boardId, t[e.boardId].session, e.id)] : []) : m ? [m] : [], g = [], _ = m ? p.get(m)?.parentKey : null;
2731
+ ]), m = n && t[n.boardId] ? gi(n.boardId, t[n.boardId].session, n.node.id) : null, h = r ? r.flatMap((e) => t[e.boardId] ? [gi(e.boardId, t[e.boardId].session, e.id)] : []) : m ? [m] : [], g = [], _ = m ? p.get(m)?.parentKey : null;
2712
2732
  for (; _;) g.push(_), _ = p.get(_)?.parentKey;
2713
2733
  let v = [m, ...g].filter((e) => !!e && !!p.get(e)?.node.children.length).join("|");
2714
2734
  K(() => {
@@ -2722,13 +2742,13 @@ function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select
2722
2742
  return /* @__PURE__ */ Q(X, { children: [
2723
2743
  /* @__PURE__ */ Q("div", {
2724
2744
  className: "ri-layer-heading",
2725
- children: [/* @__PURE__ */ Z("span", { children: V("inspector.layers") }), /* @__PURE__ */ Z("span", { children: b ? V("inspector.elements", { count: b }) : V("common.loading") })]
2745
+ children: [/* @__PURE__ */ Z("span", { children: B("inspector.layers") }), /* @__PURE__ */ Z("span", { children: b ? B("inspector.elements", { count: b }) : B("common.loading") })]
2726
2746
  }),
2727
2747
  /* @__PURE__ */ Q("div", {
2728
2748
  ref: l,
2729
2749
  className: "ri-layers",
2730
2750
  role: "region",
2731
- "aria-label": V("inspector.domLayers"),
2751
+ "aria-label": B("inspector.domLayers"),
2732
2752
  onClickCapture: (e) => {
2733
2753
  d.current = e.shiftKey || e.metaKey || e.ctrlKey;
2734
2754
  },
@@ -2745,7 +2765,7 @@ function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select
2745
2765
  let e = u.current ? p.get(u.current) : null;
2746
2766
  e && o(e.boardId, null), u.current = null;
2747
2767
  },
2748
- children: [/* @__PURE__ */ Z(pt, {
2768
+ children: [/* @__PURE__ */ Z(mt, {
2749
2769
  treeData: f,
2750
2770
  size: "small",
2751
2771
  multiple: !0,
@@ -2775,26 +2795,26 @@ function hi({ boards: e, frames: t, selection: n, targets: r, playing: i, select
2775
2795
  }
2776
2796
  }), !f.length && /* @__PURE__ */ Z("p", {
2777
2797
  className: "ri-hint",
2778
- children: V("inspector.waitingBoard")
2798
+ children: B("inspector.waitingBoard")
2779
2799
  })]
2780
2800
  }),
2781
2801
  Object.values(t).some((e) => e.truncated) && /* @__PURE__ */ Z("p", {
2782
2802
  className: "ri-limit",
2783
2803
  role: "status",
2784
- children: V("inspector.truncated")
2804
+ children: B("inspector.truncated")
2785
2805
  })
2786
2806
  ] });
2787
2807
  }
2788
2808
  //#endregion
2789
2809
  //#region src/viewer/inspector/Properties.tsx
2790
- var gi = (e) => Number.isFinite(parseFloat(e)) ? Math.round(parseFloat(e) * 100) / 100 : 0, _i = (e) => e.map(([e, t]) => ({
2810
+ var vi = (e) => Number.isFinite(parseFloat(e)) ? Math.round(parseFloat(e) * 100) / 100 : 0, yi = (e) => e.map(([e, t]) => ({
2791
2811
  value: e,
2792
2812
  label: t
2793
- })), vi = (e) => {
2813
+ })), bi = (e) => {
2794
2814
  let t = e.match(/^rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)$/);
2795
2815
  return t ? "#" + t.slice(1).filter((e) => e !== void 0).map((e, t) => Math.round(Number(e) * (t === 3 ? 255 : 1)).toString(16).padStart(2, "0")).join("") : e;
2796
2816
  };
2797
- function yi({ label: e, children: t, controlId: n }) {
2817
+ function xi({ label: e, children: t, controlId: n }) {
2798
2818
  return /* @__PURE__ */ Q("div", {
2799
2819
  className: "ri-field",
2800
2820
  children: [n ? /* @__PURE__ */ Z("label", {
@@ -2807,12 +2827,12 @@ function yi({ label: e, children: t, controlId: n }) {
2807
2827
  }), t]
2808
2828
  });
2809
2829
  }
2810
- function bi({ label: e, property: t, node: n, change: r, unit: i = "px", max: a, min: o = 0, step: s = 1, sizing: c }) {
2811
- let l = We(), u = /* @__PURE__ */ Z(nt, {
2830
+ function Si({ label: e, property: t, node: n, change: r, unit: i = "px", max: a, min: o = 0, step: s = 1, sizing: c }) {
2831
+ let l = Ge(), u = /* @__PURE__ */ Z(rt, {
2812
2832
  id: l,
2813
2833
  size: "small",
2814
2834
  controls: !1,
2815
- value: gi(n.css[t]),
2835
+ value: vi(n.css[t]),
2816
2836
  suffix: i || void 0,
2817
2837
  min: o,
2818
2838
  max: a,
@@ -2822,7 +2842,7 @@ function bi({ label: e, property: t, node: n, change: r, unit: i = "px", max: a,
2822
2842
  },
2823
2843
  style: { width: "100%" }
2824
2844
  });
2825
- return /* @__PURE__ */ Z(yi, {
2845
+ return /* @__PURE__ */ Z(xi, {
2826
2846
  label: e,
2827
2847
  controlId: l,
2828
2848
  children: c ? /* @__PURE__ */ Q("div", {
@@ -2837,16 +2857,16 @@ function bi({ label: e, property: t, node: n, change: r, unit: i = "px", max: a,
2837
2857
  }) : u
2838
2858
  });
2839
2859
  }
2840
- function xi({ label: e, property: t, values: n, node: r, change: i }) {
2841
- let a = We(), o = r.css[t], s = n.some(([e]) => e === o) ? n : [...n, [o, o]];
2842
- return /* @__PURE__ */ Z(yi, {
2860
+ function Ci({ label: e, property: t, values: n, node: r, change: i }) {
2861
+ let a = Ge(), o = r.css[t], s = n.some(([e]) => e === o) ? n : [...n, [o, o]];
2862
+ return /* @__PURE__ */ Z(xi, {
2843
2863
  label: e,
2844
2864
  controlId: a,
2845
- children: /* @__PURE__ */ Z(at, {
2865
+ children: /* @__PURE__ */ Z(ot, {
2846
2866
  size: "small",
2847
2867
  id: a,
2848
2868
  value: o,
2849
- options: _i(s),
2869
+ options: yi(s),
2850
2870
  onChange: (e) => {
2851
2871
  typeof e == "string" && i(t, e);
2852
2872
  },
@@ -2854,67 +2874,67 @@ function xi({ label: e, property: t, values: n, node: r, change: i }) {
2854
2874
  })
2855
2875
  });
2856
2876
  }
2857
- function Si({ node: e, change: t }) {
2877
+ function wi({ node: e, change: t }) {
2858
2878
  let n = {
2859
2879
  node: e,
2860
2880
  change: t
2861
- }, r = We(), i = We(), [a, o] = Y(e.css["box-shadow"]);
2881
+ }, r = Ge(), i = Ge(), [a, o] = Y(e.css["box-shadow"]);
2862
2882
  return K(() => o(e.css["box-shadow"]), [e.css["box-shadow"]]), /* @__PURE__ */ Q(X, { children: [
2863
2883
  /* @__PURE__ */ Q("section", {
2864
2884
  className: "ri-section",
2865
2885
  children: [
2866
- /* @__PURE__ */ Z("h2", { children: V("inspector.size") }),
2867
- /* @__PURE__ */ Z(bi, {
2886
+ /* @__PURE__ */ Z("h2", { children: B("inspector.size") }),
2887
+ /* @__PURE__ */ Z(Si, {
2868
2888
  ...n,
2869
- label: V("inspector.width"),
2889
+ label: B("inspector.width"),
2870
2890
  property: "width",
2871
2891
  sizing: /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("label", {
2872
2892
  className: "ri-sr-only",
2873
2893
  htmlFor: r,
2874
- children: V("inspector.widthSizing")
2875
- }), /* @__PURE__ */ Z(at, {
2894
+ children: B("inspector.widthSizing")
2895
+ }), /* @__PURE__ */ Z(ot, {
2876
2896
  id: r,
2877
2897
  size: "small",
2878
2898
  value: e.widthMode,
2879
- options: _i([
2880
- ["fixed", V("inspector.fixed")],
2881
- ["fill", V("inspector.fill")],
2882
- ["hug", V("inspector.hug")]
2899
+ options: yi([
2900
+ ["fixed", B("inspector.fixed")],
2901
+ ["fill", B("inspector.fill")],
2902
+ ["hug", B("inspector.hug")]
2883
2903
  ]),
2884
- onChange: (n) => t("width", n === "fill" ? "100%" : n === "hug" ? "max-content" : `${gi(e.css.width) || e.rect.width}px`)
2904
+ onChange: (n) => t("width", n === "fill" ? "100%" : n === "hug" ? "max-content" : `${vi(e.css.width) || e.rect.width}px`)
2885
2905
  })] })
2886
2906
  }),
2887
- /* @__PURE__ */ Z(bi, {
2907
+ /* @__PURE__ */ Z(Si, {
2888
2908
  ...n,
2889
- label: V("inspector.height"),
2909
+ label: B("inspector.height"),
2890
2910
  property: "height",
2891
2911
  sizing: /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("label", {
2892
2912
  className: "ri-sr-only",
2893
2913
  htmlFor: i,
2894
- children: V("inspector.heightSizing")
2895
- }), /* @__PURE__ */ Z(at, {
2914
+ children: B("inspector.heightSizing")
2915
+ }), /* @__PURE__ */ Z(ot, {
2896
2916
  id: i,
2897
2917
  size: "small",
2898
2918
  value: e.heightMode,
2899
- options: _i([["hug", V("inspector.hug")], ["fixed", V("inspector.fixed")]]),
2900
- onChange: (n) => t("height", n === "hug" ? "auto" : `${gi(e.css.height) || e.rect.height}px`)
2919
+ options: yi([["hug", B("inspector.hug")], ["fixed", B("inspector.fixed")]]),
2920
+ onChange: (n) => t("height", n === "hug" ? "auto" : `${vi(e.css.height) || e.rect.height}px`)
2901
2921
  })] })
2902
2922
  }),
2903
- /* @__PURE__ */ Z(xi, {
2923
+ /* @__PURE__ */ Z(Ci, {
2904
2924
  ...n,
2905
- label: V("inspector.position"),
2925
+ label: B("inspector.position"),
2906
2926
  property: "position",
2907
2927
  values: [
2908
- ["static", V("inspector.inline")],
2909
- ["relative", V("inspector.relative")],
2910
- ["absolute", V("inspector.absolute")],
2911
- ["fixed", V("inspector.fixed")],
2912
- ["sticky", V("inspector.sticky")]
2928
+ ["static", B("inspector.inline")],
2929
+ ["relative", B("inspector.relative")],
2930
+ ["absolute", B("inspector.absolute")],
2931
+ ["fixed", B("inspector.fixed")],
2932
+ ["sticky", B("inspector.sticky")]
2913
2933
  ]
2914
2934
  }),
2915
- /* @__PURE__ */ Z(bi, {
2935
+ /* @__PURE__ */ Z(Si, {
2916
2936
  ...n,
2917
- label: V("inspector.grow"),
2937
+ label: B("inspector.grow"),
2918
2938
  property: "flex-grow",
2919
2939
  unit: "",
2920
2940
  max: 100
@@ -2924,74 +2944,74 @@ function Si({ node: e, change: t }) {
2924
2944
  /* @__PURE__ */ Q("section", {
2925
2945
  className: "ri-section",
2926
2946
  children: [
2927
- /* @__PURE__ */ Z("h2", { children: V("inspector.layout") }),
2928
- /* @__PURE__ */ Z(xi, {
2947
+ /* @__PURE__ */ Z("h2", { children: B("inspector.layout") }),
2948
+ /* @__PURE__ */ Z(Ci, {
2929
2949
  ...n,
2930
- label: V("inspector.layout"),
2950
+ label: B("inspector.layout"),
2931
2951
  property: "display",
2932
2952
  values: [
2933
- ["flex", V("inspector.stack")],
2934
- ["grid", V("inspector.grid")],
2935
- ["block", V("inspector.block")],
2936
- ["inline", V("inspector.inline")],
2937
- ["inline-flex", V("inspector.inlineStack")],
2938
- ["none", V("inspector.hidden")]
2953
+ ["flex", B("inspector.stack")],
2954
+ ["grid", B("inspector.grid")],
2955
+ ["block", B("inspector.block")],
2956
+ ["inline", B("inspector.inline")],
2957
+ ["inline-flex", B("inspector.inlineStack")],
2958
+ ["none", B("inspector.hidden")]
2939
2959
  ]
2940
2960
  }),
2941
- (e.css.display === "flex" || e.css.display === "inline-flex") && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(yi, {
2942
- label: V("inspector.direction"),
2943
- children: /* @__PURE__ */ Z(it, {
2961
+ (e.css.display === "flex" || e.css.display === "inline-flex") && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(xi, {
2962
+ label: B("inspector.direction"),
2963
+ children: /* @__PURE__ */ Z(at, {
2944
2964
  size: "small",
2945
2965
  block: !0,
2946
2966
  value: e.css["flex-direction"],
2947
2967
  options: [{
2948
2968
  value: "row",
2949
- icon: /* @__PURE__ */ Z(ht, {
2969
+ icon: /* @__PURE__ */ Z(gt, {
2950
2970
  size: 14,
2951
2971
  "aria-hidden": !0
2952
2972
  }),
2953
2973
  label: /* @__PURE__ */ Z("span", {
2954
2974
  className: "ri-sr-only",
2955
- children: V("inspector.horizontal")
2975
+ children: B("inspector.horizontal")
2956
2976
  }),
2957
- title: V("inspector.horizontal")
2977
+ title: B("inspector.horizontal")
2958
2978
  }, {
2959
2979
  value: "column",
2960
- icon: /* @__PURE__ */ Z(mt, {
2980
+ icon: /* @__PURE__ */ Z(ht, {
2961
2981
  size: 14,
2962
2982
  "aria-hidden": !0
2963
2983
  }),
2964
2984
  label: /* @__PURE__ */ Z("span", {
2965
2985
  className: "ri-sr-only",
2966
- children: V("inspector.vertical")
2986
+ children: B("inspector.vertical")
2967
2987
  }),
2968
- title: V("inspector.vertical")
2988
+ title: B("inspector.vertical")
2969
2989
  }],
2970
2990
  onChange: (e) => t("flex-direction", e)
2971
2991
  })
2972
- }), /* @__PURE__ */ Z(yi, {
2973
- label: V("inspector.align"),
2974
- children: /* @__PURE__ */ Z(it, {
2992
+ }), /* @__PURE__ */ Z(xi, {
2993
+ label: B("inspector.align"),
2994
+ children: /* @__PURE__ */ Z(at, {
2975
2995
  size: "small",
2976
2996
  block: !0,
2977
- "aria-label": V("inspector.align"),
2997
+ "aria-label": B("inspector.align"),
2978
2998
  value: e.css["align-items"],
2979
- options: _i([
2980
- ["flex-start", V("inspector.start")],
2981
- ["center", V("inspector.center")],
2982
- ["stretch", V("inspector.fill")]
2999
+ options: yi([
3000
+ ["flex-start", B("inspector.start")],
3001
+ ["center", B("inspector.center")],
3002
+ ["stretch", B("inspector.fill")]
2983
3003
  ]),
2984
3004
  onChange: (e) => t("align-items", e)
2985
3005
  })
2986
3006
  })] }),
2987
- /* @__PURE__ */ Z(bi, {
3007
+ /* @__PURE__ */ Z(Si, {
2988
3008
  ...n,
2989
- label: V("inspector.gap"),
3009
+ label: B("inspector.gap"),
2990
3010
  property: "gap"
2991
3011
  }),
2992
- /* @__PURE__ */ Z(bi, {
3012
+ /* @__PURE__ */ Z(Si, {
2993
3013
  ...n,
2994
- label: V("inspector.padding"),
3014
+ label: B("inspector.padding"),
2995
3015
  property: "padding"
2996
3016
  })
2997
3017
  ]
@@ -2999,69 +3019,69 @@ function Si({ node: e, change: t }) {
2999
3019
  /* @__PURE__ */ Q("section", {
3000
3020
  className: "ri-section",
3001
3021
  children: [
3002
- /* @__PURE__ */ Z("h2", { children: V("inspector.appearance") }),
3003
- /* @__PURE__ */ Z(yi, {
3004
- label: V("inspector.fill"),
3005
- children: /* @__PURE__ */ Z(Ze, {
3022
+ /* @__PURE__ */ Z("h2", { children: B("inspector.appearance") }),
3023
+ /* @__PURE__ */ Z(xi, {
3024
+ label: B("inspector.fill"),
3025
+ children: /* @__PURE__ */ Z(Qe, {
3006
3026
  size: "small",
3007
3027
  trigger: "field",
3008
3028
  alpha: !0,
3009
3029
  recent: !1,
3010
- value: vi(e.css["background-color"]),
3030
+ value: bi(e.css["background-color"]),
3011
3031
  onChange: (e) => t("background-color", e)
3012
3032
  })
3013
3033
  }),
3014
- /* @__PURE__ */ Z(bi, {
3034
+ /* @__PURE__ */ Z(Si, {
3015
3035
  ...n,
3016
- label: V("inspector.opacity"),
3036
+ label: B("inspector.opacity"),
3017
3037
  property: "opacity",
3018
3038
  unit: "",
3019
3039
  max: 1,
3020
3040
  step: .1
3021
3041
  }),
3022
- /* @__PURE__ */ Z(bi, {
3042
+ /* @__PURE__ */ Z(Si, {
3023
3043
  ...n,
3024
- label: V("inspector.radius"),
3044
+ label: B("inspector.radius"),
3025
3045
  property: "border-radius"
3026
3046
  }),
3027
- /* @__PURE__ */ Z(xi, {
3047
+ /* @__PURE__ */ Z(Ci, {
3028
3048
  ...n,
3029
- label: V("inspector.border"),
3049
+ label: B("inspector.border"),
3030
3050
  property: "border-style",
3031
3051
  values: [
3032
3052
  ["none", /* @__PURE__ */ Q("span", {
3033
3053
  className: "ri-option",
3034
- children: [/* @__PURE__ */ Z(gt, {
3054
+ children: [/* @__PURE__ */ Z(_t, {
3035
3055
  size: 13,
3036
3056
  "aria-hidden": !0
3037
- }), V("inspector.none")]
3057
+ }), B("inspector.none")]
3038
3058
  })],
3039
3059
  ["solid", /* @__PURE__ */ Q("span", {
3040
3060
  className: "ri-option",
3041
- children: [/* @__PURE__ */ Z(zt, {
3061
+ children: [/* @__PURE__ */ Z(Bt, {
3042
3062
  size: 13,
3043
3063
  "aria-hidden": !0
3044
- }), V("inspector.solid")]
3064
+ }), B("inspector.solid")]
3045
3065
  })],
3046
3066
  ["dashed", /* @__PURE__ */ Q("span", {
3047
3067
  className: "ri-option",
3048
- children: [/* @__PURE__ */ Z(Kt, {
3068
+ children: [/* @__PURE__ */ Z(qt, {
3049
3069
  size: 13,
3050
3070
  "aria-hidden": !0
3051
- }), V("inspector.dashed")]
3071
+ }), B("inspector.dashed")]
3052
3072
  })],
3053
3073
  ["dotted", /* @__PURE__ */ Q("span", {
3054
3074
  className: "ri-option",
3055
- children: [/* @__PURE__ */ Z(At, {
3075
+ children: [/* @__PURE__ */ Z(jt, {
3056
3076
  size: 13,
3057
3077
  "aria-hidden": !0
3058
- }), V("inspector.dotted")]
3078
+ }), B("inspector.dotted")]
3059
3079
  })]
3060
3080
  ]
3061
3081
  })
3062
3082
  ]
3063
3083
  }),
3064
- /* @__PURE__ */ Z(Je, {
3084
+ /* @__PURE__ */ Z(Ye, {
3065
3085
  indicatorPlacement: "end",
3066
3086
  gap: 0,
3067
3087
  keepMounted: !0,
@@ -3077,30 +3097,30 @@ function Si({ node: e, change: t }) {
3077
3097
  },
3078
3098
  items: [{
3079
3099
  key: "typography",
3080
- title: V("inspector.typography"),
3081
- children: /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(bi, {
3100
+ title: B("inspector.typography"),
3101
+ children: /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(Si, {
3082
3102
  ...n,
3083
- label: V("inspector.fontSize"),
3103
+ label: B("inspector.fontSize"),
3084
3104
  property: "font-size",
3085
3105
  min: 1
3086
- }), /* @__PURE__ */ Z(yi, {
3087
- label: V("inspector.color"),
3088
- children: /* @__PURE__ */ Z(Ze, {
3106
+ }), /* @__PURE__ */ Z(xi, {
3107
+ label: B("inspector.color"),
3108
+ children: /* @__PURE__ */ Z(Qe, {
3089
3109
  size: "small",
3090
3110
  trigger: "field",
3091
3111
  alpha: !0,
3092
3112
  recent: !1,
3093
- value: vi(e.css.color),
3113
+ value: bi(e.css.color),
3094
3114
  onChange: (e) => t("color", e)
3095
3115
  })
3096
3116
  })] })
3097
3117
  }, {
3098
3118
  key: "effects",
3099
- title: V("inspector.effects"),
3100
- children: /* @__PURE__ */ Z(yi, {
3101
- label: V("inspector.shadow"),
3102
- children: /* @__PURE__ */ Z(tt, {
3103
- "aria-label": V("inspector.shadow"),
3119
+ title: B("inspector.effects"),
3120
+ children: /* @__PURE__ */ Z(xi, {
3121
+ label: B("inspector.shadow"),
3122
+ children: /* @__PURE__ */ Z(nt, {
3123
+ "aria-label": B("inspector.shadow"),
3104
3124
  size: "small",
3105
3125
  value: a,
3106
3126
  onChange: (e) => o(e.target.value),
@@ -3114,31 +3134,31 @@ function Si({ node: e, change: t }) {
3114
3134
  }
3115
3135
  //#endregion
3116
3136
  //#region src/viewer/inspector/InspectorPanel.tsx
3117
- var Ci = [
3137
+ var Ti = [
3118
3138
  "Properties",
3119
3139
  "Code",
3120
3140
  "Tweaks"
3121
- ], wi = Ue(function({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o, change: s, reset: c, enabled: l, onClose: u }) {
3141
+ ], Ei = We(function({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o, change: s, reset: c, enabled: l, onClose: u }) {
3122
3142
  let [d, f] = Y("Properties"), [p, m] = Y(""), h = n?.node, g = Object.entries(t).flatMap(([e, t]) => t.tweaks.map((t) => ({
3123
3143
  ...t,
3124
3144
  boardId: e
3125
3145
  }))), _ = h ? `${h.selector} {\n${Object.entries(h.css).map(([e, t]) => ` ${e}: ${t};`).join("\n")}\n}` : "", v = async (e) => {
3126
3146
  try {
3127
- await navigator.clipboard.writeText(e), m(V("inspector.copied"));
3147
+ await navigator.clipboard.writeText(e), m(B("inspector.copied"));
3128
3148
  } catch {
3129
- m(V("inspector.copyFailed"));
3149
+ m(B("inspector.copyFailed"));
3130
3150
  }
3131
3151
  };
3132
- return /* @__PURE__ */ Z(et, {
3152
+ return /* @__PURE__ */ Z(tt, {
3133
3153
  config: { "aria-hidden": !0 },
3134
3154
  children: /* @__PURE__ */ Z("aside", {
3135
3155
  className: "ryugi-inspector",
3136
3156
  "data-chrome": !0,
3137
- "aria-label": V("inspector.label"),
3138
- children: /* @__PURE__ */ Q(dt, {
3157
+ "aria-label": B("inspector.label"),
3158
+ children: /* @__PURE__ */ Q(ft, {
3139
3159
  value: d,
3140
3160
  onValueChange: (e) => {
3141
- Ci.includes(e) && f(e);
3161
+ Ti.includes(e) && f(e);
3142
3162
  },
3143
3163
  size: "small",
3144
3164
  variant: "rounded",
@@ -3146,29 +3166,29 @@ var Ci = [
3146
3166
  children: [
3147
3167
  /* @__PURE__ */ Q("header", {
3148
3168
  className: "ri-header",
3149
- children: [/* @__PURE__ */ Q(lt, {
3169
+ children: [/* @__PURE__ */ Q(ut, {
3150
3170
  className: "ri-tabs",
3151
3171
  activateOnFocus: !0,
3152
3172
  style: { alignSelf: "center" },
3153
- "aria-label": V("inspector.views"),
3154
- children: [/* @__PURE__ */ Z(ct, {}), Ci.map((e) => /* @__PURE__ */ Q(ft, {
3173
+ "aria-label": B("inspector.views"),
3174
+ children: [/* @__PURE__ */ Z(lt, {}), Ti.map((e) => /* @__PURE__ */ Q(pt, {
3155
3175
  value: e,
3156
- children: [V(`inspector.tab.${e}`), e === "Tweaks" && g.length > 0 && /* @__PURE__ */ Z(St, {
3176
+ children: [B(`inspector.tab.${e}`), e === "Tweaks" && g.length > 0 && /* @__PURE__ */ Z(Ct, {
3157
3177
  className: "ri-change-dot",
3158
3178
  size: 4,
3159
3179
  fill: "currentColor",
3160
3180
  "aria-hidden": !0
3161
3181
  })]
3162
3182
  }, e))]
3163
- }), /* @__PURE__ */ Z(Ye, {
3164
- icon: Jt,
3183
+ }), /* @__PURE__ */ Z(Xe, {
3184
+ icon: Yt,
3165
3185
  size: "small",
3166
- "aria-label": V("inspector.close"),
3167
- title: V("inspector.close"),
3186
+ "aria-label": B("inspector.close"),
3187
+ title: B("inspector.close"),
3168
3188
  onClick: u
3169
3189
  })]
3170
3190
  }),
3171
- /* @__PURE__ */ Z(hi, {
3191
+ /* @__PURE__ */ Z(_i, {
3172
3192
  boards: e,
3173
3193
  frames: t,
3174
3194
  selection: n,
@@ -3180,17 +3200,17 @@ var Ci = [
3180
3200
  /* @__PURE__ */ Q("div", {
3181
3201
  className: "ri-node-meta",
3182
3202
  children: [
3183
- /* @__PURE__ */ Z("code", { children: r.length > 1 ? V("inspector.selected", { count: r.length }) : h ? `<${h.tag}>` : V("inspector.selectElement") }),
3203
+ /* @__PURE__ */ Z("code", { children: r.length > 1 ? B("inspector.selected", { count: r.length }) : h ? `<${h.tag}>` : B("inspector.selectElement") }),
3184
3204
  h && /* @__PURE__ */ Q("span", {
3185
3205
  className: "ri-node-id",
3186
- children: [`${n.boardId}#${h.id}`, /* @__PURE__ */ Z(Ye, {
3187
- icon: Ot,
3206
+ children: [`${n.boardId}#${h.id}`, /* @__PURE__ */ Z(Xe, {
3207
+ icon: kt,
3188
3208
  size: {
3189
3209
  blockSize: 16,
3190
3210
  size: 10
3191
3211
  },
3192
- "aria-label": V("inspector.copyNode"),
3193
- title: V("inspector.copyNode"),
3212
+ "aria-label": B("inspector.copyNode"),
3213
+ title: B("inspector.copyNode"),
3194
3214
  onClick: () => void v(`${n.boardId}#${h.id}`)
3195
3215
  })]
3196
3216
  }),
@@ -3201,45 +3221,45 @@ var Ci = [
3201
3221
  }),
3202
3222
  h && /* @__PURE__ */ Q("span", {
3203
3223
  className: "ri-live",
3204
- children: [/* @__PURE__ */ Z(St, {
3224
+ children: [/* @__PURE__ */ Z(Ct, {
3205
3225
  size: 6,
3206
3226
  fill: "currentColor",
3207
3227
  "aria-hidden": !0
3208
- }), V("inspector.live")]
3228
+ }), B("inspector.live")]
3209
3229
  })
3210
3230
  ]
3211
3231
  }),
3212
3232
  r.length > 1 && /* @__PURE__ */ Z("p", {
3213
3233
  className: "ri-hint",
3214
3234
  style: { margin: "8px 16px" },
3215
- children: V("inspector.lastSelected")
3235
+ children: B("inspector.lastSelected")
3216
3236
  }),
3217
3237
  /* @__PURE__ */ Q("div", {
3218
3238
  className: "ri-panel-body",
3219
3239
  children: [
3220
- /* @__PURE__ */ Z(ut, {
3240
+ /* @__PURE__ */ Z(dt, {
3221
3241
  value: "Properties",
3222
- children: h && l ? /* @__PURE__ */ Z(Si, {
3242
+ children: h && l ? /* @__PURE__ */ Z(wi, {
3223
3243
  node: h,
3224
3244
  change: s
3225
3245
  }, `${n.boardId}:${t[n.boardId]?.session}:${h.id}`) : /* @__PURE__ */ Z("p", {
3226
3246
  className: "ri-empty",
3227
- children: V(l ? "inspector.pickElement" : "inspector.closeExpanded")
3247
+ children: B(l ? "inspector.pickElement" : "inspector.closeExpanded")
3228
3248
  })
3229
3249
  }),
3230
- /* @__PURE__ */ Z(ut, {
3250
+ /* @__PURE__ */ Z(dt, {
3231
3251
  value: "Code",
3232
3252
  children: h ? /* @__PURE__ */ Q("div", {
3233
3253
  className: "ri-code",
3234
3254
  children: [
3235
3255
  /* @__PURE__ */ Q("div", {
3236
3256
  className: "ri-code-heading",
3237
- children: [/* @__PURE__ */ Z("h2", { children: V("inspector.computedCss") }), /* @__PURE__ */ Z(Xe, {
3257
+ children: [/* @__PURE__ */ Z("h2", { children: B("inspector.computedCss") }), /* @__PURE__ */ Z(Ze, {
3238
3258
  size: "small",
3239
3259
  type: "text",
3240
- icon: Ot,
3260
+ icon: kt,
3241
3261
  onClick: () => void v(_),
3242
- children: V("inspector.copy")
3262
+ children: B("inspector.copy")
3243
3263
  })]
3244
3264
  }),
3245
3265
  /* @__PURE__ */ Z("pre", {
@@ -3248,12 +3268,12 @@ var Ci = [
3248
3268
  }),
3249
3269
  /* @__PURE__ */ Q("div", {
3250
3270
  className: "ri-code-heading",
3251
- children: [/* @__PURE__ */ Z("h2", { children: "HTML" }), /* @__PURE__ */ Z(Xe, {
3271
+ children: [/* @__PURE__ */ Z("h2", { children: "HTML" }), /* @__PURE__ */ Z(Ze, {
3252
3272
  size: "small",
3253
3273
  type: "text",
3254
- icon: Ot,
3274
+ icon: kt,
3255
3275
  onClick: () => void v(h.html),
3256
- children: V("inspector.copy")
3276
+ children: B("inspector.copy")
3257
3277
  })]
3258
3278
  }),
3259
3279
  /* @__PURE__ */ Z("pre", {
@@ -3263,21 +3283,21 @@ var Ci = [
3263
3283
  /* @__PURE__ */ Z("p", {
3264
3284
  className: "ri-hint",
3265
3285
  role: "status",
3266
- children: p || V("inspector.fromDom")
3286
+ children: p || B("inspector.fromDom")
3267
3287
  })
3268
3288
  ]
3269
3289
  }) : /* @__PURE__ */ Z("p", {
3270
3290
  className: "ri-empty",
3271
- children: V("inspector.selectForCode")
3291
+ children: B("inspector.selectForCode")
3272
3292
  })
3273
3293
  }),
3274
- /* @__PURE__ */ Z(ut, {
3294
+ /* @__PURE__ */ Z(dt, {
3275
3295
  value: "Tweaks",
3276
3296
  children: /* @__PURE__ */ Q("section", {
3277
3297
  className: "ri-section",
3278
3298
  children: [
3279
3299
  /* @__PURE__ */ Q("h2", { children: [
3280
- V("inspector.sessionChanges"),
3300
+ B("inspector.sessionChanges"),
3281
3301
  " ",
3282
3302
  /* @__PURE__ */ Z("span", {
3283
3303
  className: "ri-count",
@@ -3286,7 +3306,7 @@ var Ci = [
3286
3306
  ] }),
3287
3307
  /* @__PURE__ */ Z("p", {
3288
3308
  className: "ri-hint",
3289
- children: V("inspector.changesApply")
3309
+ children: B("inspector.changesApply")
3290
3310
  }),
3291
3311
  /* @__PURE__ */ Z("div", {
3292
3312
  className: "ri-tweaks",
@@ -3305,15 +3325,15 @@ var Ci = [
3305
3325
  }),
3306
3326
  !g.length && /* @__PURE__ */ Z("p", {
3307
3327
  className: "ri-hint",
3308
- children: V("inspector.noChanges")
3328
+ children: B("inspector.noChanges")
3309
3329
  }),
3310
- /* @__PURE__ */ Z(Xe, {
3311
- icon: Ut,
3330
+ /* @__PURE__ */ Z(Ze, {
3331
+ icon: Wt,
3312
3332
  size: "small",
3313
3333
  block: !0,
3314
3334
  disabled: !g.length,
3315
3335
  onClick: c,
3316
- children: V("inspector.resetPreview")
3336
+ children: B("inspector.resetPreview")
3317
3337
  })
3318
3338
  ]
3319
3339
  })
@@ -3323,14 +3343,14 @@ var Ci = [
3323
3343
  /* @__PURE__ */ Q("footer", {
3324
3344
  className: "ri-footer",
3325
3345
  children: [
3326
- /* @__PURE__ */ Z(St, {
3346
+ /* @__PURE__ */ Z(Ct, {
3327
3347
  className: "ri-status-dot",
3328
3348
  size: 5,
3329
3349
  fill: "currentColor",
3330
3350
  "aria-hidden": !0
3331
3351
  }),
3332
- g.length ? V("inspector.previewChanges", { count: g.length }) : V("inspector.liveInspection"),
3333
- /* @__PURE__ */ Z("span", { children: V("inspector.previewOnly") })
3352
+ g.length ? B("inspector.previewChanges", { count: g.length }) : B("inspector.liveInspection"),
3353
+ /* @__PURE__ */ Z("span", { children: B("inspector.previewOnly") })
3334
3354
  ]
3335
3355
  })
3336
3356
  ]
@@ -3340,92 +3360,92 @@ var Ci = [
3340
3360
  });
3341
3361
  //#endregion
3342
3362
  //#region src/viewer/hooks/usePageQuery.ts
3343
- function Ti(e, t) {
3363
+ function Di(e, t) {
3344
3364
  if (t === null) return e;
3345
3365
  let n = new URL(e);
3346
3366
  return n.searchParams.set("page", t), n.href;
3347
3367
  }
3348
- function Ei() {
3349
- let e = v(), t = G((t) => (e.addEventListener("popstate", t), e.addEventListener("ryugi:pagechange", t), () => {
3368
+ function Oi() {
3369
+ let e = b(), t = G((t) => (e.addEventListener("popstate", t), e.addEventListener("ryugi:pagechange", t), () => {
3350
3370
  e.removeEventListener("popstate", t), e.removeEventListener("ryugi:pagechange", t);
3351
3371
  }), [e]);
3352
- return [qe(t, () => new URLSearchParams(e.location.search).get("page")), G((t, n) => {
3372
+ return [Je(t, () => new URLSearchParams(e.location.search).get("page")), G((t, n) => {
3353
3373
  let r = new URL(e.location.href);
3354
3374
  r.searchParams.get("page") !== t && (t === null ? r.searchParams.delete("page") : r.searchParams.set("page", t), e.history[n ? "replaceState" : "pushState"](e.history.state, "", r), e.dispatchEvent(new Event("ryugi:pagechange")));
3355
3375
  }, [e])];
3356
3376
  }
3357
3377
  //#endregion
3358
3378
  //#region src/viewer/hooks/useArtboardPage.ts
3359
- function Di({ canvas: e, layout: t, fitPage: n, fitFocus: r, startAtFocus: i = !1 }) {
3360
- let [a, o] = Y(null), s = J(void 0), c = J(void 0), l = J(null), u = J(!1), [d, f] = Ei(), p = J(d), m = G((e, t = !0) => {
3361
- o(e), l.current = e, p.current = e, f(e, t);
3362
- }, [f]);
3379
+ function ki({ canvas: e, layout: t, fitPage: n, fitFocus: r, startAtFocus: i = !1 }) {
3380
+ let [a, o] = Y(null), c = J(void 0), l = J(void 0), u = J(null), d = J(!1), [f, p] = Oi(), m = J(f), h = G((e, t = !0) => {
3381
+ o(e), u.current = e, m.current = e, p(e, t);
3382
+ }, [p]);
3363
3383
  return K(() => {
3364
3384
  if (!e || !t) return;
3365
- let n = e.pages[0]?.id ?? null, h = (t) => t && e.pages.some((e) => e.id === t) ? t : null;
3366
- if (!u.current) {
3367
- u.current = !0, s.current = e.activePage, c.current = e.focus?.at;
3368
- let r = i && e.focus ? w(e, t, e.focus.target)?.page : void 0, a = h(d) ?? (d === null ? h(r) ?? h(e.activePage) ?? n : n);
3369
- m(a);
3385
+ let n = e.pages[0]?.id ?? null, g = (t) => t && e.pages.some((e) => e.id === t) ? t : null;
3386
+ if (!d.current) {
3387
+ d.current = !0, c.current = e.activePage, l.current = e.focus?.at;
3388
+ let r = i && e.focus ? s(e, t, e.focus.target)?.page : void 0, a = g(f) ?? (f === null ? g(r) ?? g(e.activePage) ?? n : n);
3389
+ h(a);
3370
3390
  return;
3371
3391
  }
3372
- if (d !== p.current) {
3373
- c.current = e.focus?.at, s.current = e.activePage, m(h(d) ?? n);
3392
+ if (f !== m.current) {
3393
+ l.current = e.focus?.at, c.current = e.activePage, h(g(f) ?? n);
3374
3394
  return;
3375
3395
  }
3376
- let g = e.focus;
3377
- if (g && g.at !== c.current) {
3378
- c.current = g.at, s.current = e.activePage;
3379
- let n = w(e, t, g.target);
3396
+ let _ = e.focus;
3397
+ if (_ && _.at !== l.current) {
3398
+ l.current = _.at, c.current = e.activePage;
3399
+ let n = s(e, t, _.target);
3380
3400
  if (n) {
3381
- o(n.page), l.current = null, p.current = n.page, f(n.page, !0), r(g.target, n);
3401
+ o(n.page), u.current = null, m.current = n.page, p(n.page, !0), r(_.target, n);
3382
3402
  return;
3383
3403
  }
3384
3404
  }
3385
- e.activePage !== s.current && (s.current = e.activePage, e.activePage) ? m(h(e.activePage) ?? n) : (!a || !e.pages.some((e) => e.id === a)) && m(n);
3405
+ e.activePage !== c.current && (c.current = e.activePage, e.activePage) ? h(g(e.activePage) ?? n) : (!a || !e.pages.some((e) => e.id === a)) && h(n);
3386
3406
  }, [
3387
3407
  e,
3388
3408
  t,
3389
3409
  r,
3390
3410
  a,
3391
3411
  i,
3392
- d,
3393
- m,
3394
- f
3412
+ f,
3413
+ h,
3414
+ p
3395
3415
  ]), K(() => {
3396
- l.current !== null && l.current === a && n(a) && (l.current = null);
3416
+ u.current !== null && u.current === a && n(a) && (u.current = null);
3397
3417
  }), {
3398
3418
  page: a,
3399
3419
  changePage: (t) => {
3400
- e?.pages.some((e) => e.id === t) && m(t, !1);
3420
+ e?.pages.some((e) => e.id === t) && h(t, !1);
3401
3421
  }
3402
3422
  };
3403
3423
  }
3404
3424
  //#endregion
3405
3425
  //#region src/viewer/components/PhoneArtboardBar.tsx
3406
- function Oi({ pages: e, page: t, onPageChange: n }) {
3426
+ function Ai({ pages: e, page: t, onPageChange: n }) {
3407
3427
  if (e.length < 2) return null;
3408
3428
  let r = e.find((e) => e.id === t);
3409
- return /* @__PURE__ */ Z(Qe, {
3429
+ return /* @__PURE__ */ Z($e, {
3410
3430
  placement: "bottomLeft",
3411
3431
  items: e.map((e) => ({
3412
3432
  key: e.id,
3413
3433
  label: e.name,
3414
- icon: e.id === t ? _t : void 0,
3434
+ icon: e.id === t ? vt : void 0,
3415
3435
  onClick: () => n(e.id)
3416
3436
  })),
3417
3437
  children: /* @__PURE__ */ Q("button", {
3418
3438
  type: "button",
3419
- "aria-label": V("chrome.switchPage"),
3439
+ "aria-label": B("chrome.switchPage"),
3420
3440
  className: "x78zum5 x6s0dn4 x195vfkc xeuugli x1717udv xc342km xjbqb8w x1bo0w0s xqfszdh x4z9k3i x1ypdohk",
3421
3441
  children: [/* @__PURE__ */ Z("span", {
3422
3442
  className: "xb3r6kr xuxw1ft xlyipyv",
3423
3443
  children: r?.name ?? t
3424
- }), /* @__PURE__ */ Z(yt, { size: 13 })]
3444
+ }), /* @__PURE__ */ Z(bt, { size: 13 })]
3425
3445
  })
3426
3446
  });
3427
3447
  }
3428
- function ki({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a }) {
3448
+ function ji({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a }) {
3429
3449
  return /* @__PURE__ */ Q("header", {
3430
3450
  "data-chrome": !0,
3431
3451
  className: "x2lah0s xdd8jsf x78zum5 x6s0dn4 x883omv x1hr3lfm xso031l x1q0q8m5 xtrfj0v x1rozbrz xo2rkog xqfszdh xif65rj",
@@ -3434,14 +3454,14 @@ function ki({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a
3434
3454
  className: "xeuugli xb3r6kr xuxw1ft xlyipyv x1s688f",
3435
3455
  children: e
3436
3456
  }),
3437
- /* @__PURE__ */ Z(Oi, {
3457
+ /* @__PURE__ */ Z(Ai, {
3438
3458
  pages: t,
3439
3459
  page: n,
3440
3460
  onPageChange: r
3441
3461
  }),
3442
3462
  /* @__PURE__ */ Z("span", { className: "x98rzlu" }),
3443
3463
  a === void 0 ? null : /* @__PURE__ */ Z("i", {
3444
- title: V(a ? "chrome.live" : "chrome.reconnecting"),
3464
+ title: B(a ? "chrome.live" : "chrome.reconnecting"),
3445
3465
  ...{
3446
3466
  0: { className: "xci0xqf x1hagigm x2lah0s x16rqkct xxwmxtg" },
3447
3467
  1: { className: "xci0xqf x1hagigm x2lah0s x16rqkct xux1nz0" }
@@ -3453,7 +3473,7 @@ function ki({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a
3453
3473
  }
3454
3474
  //#endregion
3455
3475
  //#region src/viewer/components/ghost.ts
3456
- var Ai = { ghost: {
3476
+ var Mi = { ghost: {
3457
3477
  k1xSpc: "xrvj5dj",
3458
3478
  kgQiWS: "x1ku5rj1",
3459
3479
  kmuXW: "x2lah0s",
@@ -3469,9 +3489,9 @@ var Ai = { ghost: {
3469
3489
  kIyJzY: "xgdialr",
3470
3490
  k3aq6I: "x19kf12q",
3471
3491
  $$css: !0
3472
- } }, ji = 120, Mi = .5, Ni = 110, Pi = .4, Fi = .25;
3473
- function Ii(e, t, n) {
3474
- if (!e || Ee()) return {
3492
+ } }, Ni = 120, Pi = .5, Fi = 110, Ii = .4, Li = .25;
3493
+ function Ri(e, t, n) {
3494
+ if (!e || Oe()) return {
3475
3495
  done: Promise.resolve(),
3476
3496
  cancel: () => {}
3477
3497
  };
@@ -3484,19 +3504,19 @@ function Ii(e, t, n) {
3484
3504
  cancel: () => r.cancel()
3485
3505
  };
3486
3506
  }
3487
- function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClose: s }) {
3488
- let { viewportRef: c, view: l, place: u, handlers: d } = di("hand"), f = J(null), p = J(null), m = J(null), h = J(null), [g, _] = Y(null), v = J(null), y = J(l);
3507
+ function zi({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClose: s }) {
3508
+ let { viewportRef: c, view: l, place: u, handlers: d } = pi("hand"), f = J(null), p = J(null), m = J(null), h = J(null), [g, _] = Y(null), v = J(null), y = J(l);
3489
3509
  y.current = l;
3490
3510
  let b = J(!1), x = J(null), S = J(!1), C = i.indexOf(e), w = C > 0 ? i[C - 1] : void 0, T = C >= 0 ? i[C + 1] : void 0, E = () => ({
3491
3511
  width: c.current?.clientWidth ?? n.w,
3492
3512
  height: c.current?.clientHeight ?? n.h
3493
- }), O = (e) => {
3513
+ }), D = (e) => {
3494
3514
  let t = y.current, r = c.current?.getBoundingClientRect();
3495
3515
  if (!e || !r) return null;
3496
3516
  let i = e.w / (n.w * t.k);
3497
3517
  return `translate(${e.x - r.left - i * t.x}px, ${e.y - r.top - i * t.y}px) scale(${i})`;
3498
3518
  }, k = () => [m.current, h.current];
3499
- Ge(() => {
3519
+ Ke(() => {
3500
3520
  let { width: e, height: t } = E(), r = n.interactive ? Math.min(1, e / n.w, t / n.h) : Math.min(1, e / n.w), i = {
3501
3521
  k: r,
3502
3522
  x: (e - n.w * r) / 2,
@@ -3504,14 +3524,14 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3504
3524
  };
3505
3525
  if (u(i), y.current = i, !b.current) {
3506
3526
  b.current = !0;
3507
- let e = O(a);
3508
- e && Re(f.current, [{ transform: e }, { transform: "none" }], {
3509
- duration: je.duration,
3510
- easing: je.easing
3511
- }), Re(p.current, [{ opacity: 0 }, { opacity: 1 }], {
3527
+ let e = D(a);
3528
+ e && W(f.current, [{ transform: e }, { transform: "none" }], {
3529
+ duration: Ne.duration,
3530
+ easing: Ne.easing
3531
+ }), W(p.current, [{ opacity: 0 }, { opacity: 1 }], {
3512
3532
  duration: 200,
3513
- easing: Ie
3514
- }), k().forEach((e, t) => void Re(e, [{
3533
+ easing: Re
3534
+ }), k().forEach((e, t) => void W(e, [{
3515
3535
  opacity: 0,
3516
3536
  transform: `translateY(${t ? 12 : -8}px)`
3517
3537
  }, {
@@ -3520,19 +3540,19 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3520
3540
  }], {
3521
3541
  duration: 180,
3522
3542
  delay: 90,
3523
- easing: Ie
3543
+ easing: Re
3524
3544
  }));
3525
3545
  } else if (x.current) {
3526
3546
  let { dir: t, leaving: n } = x.current;
3527
- x.current = null, n(), Re(f.current, [{
3547
+ x.current = null, n(), W(f.current, [{
3528
3548
  transform: `translateX(${t * e * .35}px)`,
3529
3549
  opacity: 0
3530
3550
  }, {
3531
3551
  transform: "none",
3532
3552
  opacity: 1
3533
3553
  }], {
3534
- duration: je.duration,
3535
- easing: je.easing
3554
+ duration: Ne.duration,
3555
+ easing: Ne.easing
3536
3556
  });
3537
3557
  }
3538
3558
  }, [
@@ -3545,35 +3565,35 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3545
3565
  ]);
3546
3566
  let A = () => {
3547
3567
  let e = f.current?.style.transform || "none";
3548
- _(null), Re(f.current, [{ transform: e }, { transform: "none" }], {
3549
- duration: je.duration,
3550
- easing: je.easing
3551
- }), [p.current, ...k()].forEach((e) => void Re(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 1 }], {
3568
+ _(null), W(f.current, [{ transform: e }, { transform: "none" }], {
3569
+ duration: Ne.duration,
3570
+ easing: Ne.easing
3571
+ }), [p.current, ...k()].forEach((e) => void W(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 1 }], {
3552
3572
  duration: 200,
3553
- easing: Ie
3573
+ easing: Re
3554
3574
  }));
3555
3575
  }, j = async () => {
3556
3576
  if (S.current) return;
3557
3577
  S.current = !0;
3558
- let e = f.current?.style.transform || "none", t = O(a), n = {
3578
+ let e = f.current?.style.transform || "none", t = D(a), n = {
3559
3579
  duration: 100,
3560
- easing: Te
3580
+ easing: De
3561
3581
  };
3562
3582
  await Promise.all([
3563
- t ? Ii(f.current, [{ transform: e }, { transform: t }], {
3583
+ t ? Ri(f.current, [{ transform: e }, { transform: t }], {
3564
3584
  duration: 240,
3565
- easing: Te
3566
- }).done : Ii(f.current, [{ opacity: 1 }, { opacity: 0 }], n).done,
3567
- Ii(p.current, [{ opacity: Number(p.current?.style.opacity || 1) }, { opacity: 0 }], {
3585
+ easing: De
3586
+ }).done : Ri(f.current, [{ opacity: 1 }, { opacity: 0 }], n).done,
3587
+ Ri(p.current, [{ opacity: Number(p.current?.style.opacity || 1) }, { opacity: 0 }], {
3568
3588
  duration: 240,
3569
- easing: Te
3589
+ easing: De
3570
3590
  }).done,
3571
- ...k().map((e) => Ii(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 0 }], n).done)
3591
+ ...k().map((e) => Ri(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 0 }], n).done)
3572
3592
  ]), s();
3573
- }, M = async (e, t) => {
3593
+ }, ee = async (e, t) => {
3574
3594
  if (!t || S.current) return;
3575
3595
  S.current = !0;
3576
- let n = f.current?.style.transform || "none", r = Ii(f.current, [{
3596
+ let n = f.current?.style.transform || "none", r = Ri(f.current, [{
3577
3597
  transform: n,
3578
3598
  opacity: 1
3579
3599
  }, {
@@ -3581,13 +3601,13 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3581
3601
  opacity: 0
3582
3602
  }], {
3583
3603
  duration: 180,
3584
- easing: Te
3604
+ easing: De
3585
3605
  });
3586
3606
  await r.done, x.current = {
3587
3607
  dir: e,
3588
3608
  leaving: r.cancel
3589
3609
  }, S.current = !1, _(null), o(t);
3590
- }, te = (e) => {
3610
+ }, ne = (e) => {
3591
3611
  let t = v.current;
3592
3612
  if (S.current || t?.mode === "dismiss" || t?.mode === "swipe" || (t && (t.mode = "pan"), d.onPointerDown(e), t)) return;
3593
3613
  [
@@ -3595,7 +3615,7 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3595
3615
  p.current,
3596
3616
  ...k()
3597
3617
  ].forEach((e) => e?.getAnimations().forEach((e) => e.cancel()));
3598
- let n = ne();
3618
+ let n = ie();
3599
3619
  n.add(e.clientX, e.clientY, performance.now()), v.current = {
3600
3620
  id: e.pointerId,
3601
3621
  x: e.clientX,
@@ -3609,7 +3629,7 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3609
3629
  t.track.add(e.clientX, e.clientY, performance.now());
3610
3630
  let r = e.clientX - t.x, a = e.clientY - t.y;
3611
3631
  if (t.mode === "pending") {
3612
- let o = ee(r, a);
3632
+ let o = te(r, a);
3613
3633
  if (!o) return;
3614
3634
  let s = n.w * l.k <= E().width + 1;
3615
3635
  t.mode = o === "y" && a > 0 && l.y >= -.5 ? "dismiss" : o === "x" && s && i.length > 1 ? "swipe" : "pan", t.mode !== "pan" && d.onPointerUp(e);
@@ -3619,18 +3639,18 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3619
3639
  dx: r,
3620
3640
  dy: a
3621
3641
  });
3622
- }, ie = (e) => {
3642
+ }, ae = (e) => {
3623
3643
  let t = v.current;
3624
3644
  if (!t || t.id !== e.pointerId || (v.current = null, t.mode === "pan" || t.mode === "pending")) return d.onPointerUp(e);
3625
3645
  let n = t.track.velocity(performance.now()), r = e.clientX - t.x, i = e.clientY - t.y;
3626
- if (t.mode === "dismiss") return i > ji && n.y > -.4 || n.y > Mi ? void j() : A();
3627
- let a = n.x < -.4 ? 1 : n.x > Pi ? -1 : 0, o = r < -110 ? 1 : r > Ni ? -1 : 0, s = a === 0 ? o : o === 0 || o === a ? a : 0, c = s === 1 ? T : s === -1 ? w : void 0;
3628
- c && s ? M(s, c) : A();
3629
- }, { width: ae, height: N } = E(), P, oe = 1, se = 1;
3646
+ if (t.mode === "dismiss") return i > Ni && n.y > -.4 || n.y > Pi ? void j() : A();
3647
+ let a = n.x < -.4 ? 1 : n.x > Ii ? -1 : 0, o = r < -110 ? 1 : r > Fi ? -1 : 0, s = a === 0 ? o : o === 0 || o === a ? a : 0, c = s === 1 ? T : s === -1 ? w : void 0;
3648
+ c && s ? ee(s, c) : A();
3649
+ }, { width: oe, height: M } = E(), se, N = 1, le = 1;
3630
3650
  if (g?.axis === "y") {
3631
3651
  let e = Math.max(0, g.dy), t = 1 - Math.min(e / 900, .3);
3632
- P = `translate(${g.dx * .6 + (1 - t) * ae / 2}px, ${e + (1 - t) * N / 2}px) scale(${t})`, oe = 1 - Math.min(e / 420, .85), se = Math.max(0, 1 - e / ji);
3633
- } else g?.axis === "x" && (P = `translateX(${g.dx > 0 && !w || g.dx < 0 && !T ? g.dx * Fi : g.dx}px)`);
3652
+ se = `translate(${g.dx * .6 + (1 - t) * oe / 2}px, ${e + (1 - t) * M / 2}px) scale(${t})`, N = 1 - Math.min(e / 420, .85), le = Math.max(0, 1 - e / Ni);
3653
+ } else g?.axis === "x" && (se = `translateX(${g.dx > 0 && !w || g.dx < 0 && !T ? g.dx * Li : g.dx}px)`);
3634
3654
  return /* @__PURE__ */ Q("div", {
3635
3655
  "data-phone-board": !0,
3636
3656
  className: "xixxii4 x10a8y8t x68pp3s x78zum5 xdt5ytf xo2rkog xqfszdh",
@@ -3638,19 +3658,19 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3638
3658
  /* @__PURE__ */ Z("div", {
3639
3659
  ref: p,
3640
3660
  className: "x10l6tqk x10a8y8t x184qs1t",
3641
- style: g ? { opacity: oe } : void 0
3661
+ style: g ? { opacity: N } : void 0
3642
3662
  }),
3643
3663
  /* @__PURE__ */ Q("header", {
3644
3664
  ref: m,
3645
3665
  className: "x1n2onr6 x2lah0s xdd8jsf x78zum5 x6s0dn4 x195vfkc x135b78x xv54qhq xso031l x1q0q8m5 xtrfj0v x1rozbrz",
3646
- style: g ? { opacity: se } : void 0,
3666
+ style: g ? { opacity: le } : void 0,
3647
3667
  children: [
3648
3668
  /* @__PURE__ */ Z("button", {
3649
3669
  type: "button",
3650
- "aria-label": V("phone.backToCanvas"),
3670
+ "aria-label": B("phone.backToCanvas"),
3651
3671
  onClick: () => void j(),
3652
- ...D(Ai.ghost),
3653
- children: /* @__PURE__ */ Z(bt, { size: 22 })
3672
+ ...O(Mi.ghost),
3673
+ children: /* @__PURE__ */ Z(xt, { size: 22 })
3654
3674
  }),
3655
3675
  /* @__PURE__ */ Q("span", {
3656
3676
  className: "x98rzlu xeuugli x78zum5 xdt5ytf x12mrbbr",
@@ -3675,9 +3695,9 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3675
3695
  /* @__PURE__ */ Z("div", {
3676
3696
  ref: c,
3677
3697
  "data-board-body": !0,
3678
- onPointerDown: te,
3698
+ onPointerDown: ne,
3679
3699
  onPointerMove: re,
3680
- onPointerUp: ie,
3700
+ onPointerUp: ae,
3681
3701
  onPointerCancel: (e) => {
3682
3702
  let t = v.current;
3683
3703
  t?.id === e.pointerId && ((t.mode === "dismiss" || t.mode === "swipe") && A(), v.current = null), d.onPointerCancel(e);
@@ -3687,7 +3707,7 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3687
3707
  ref: f,
3688
3708
  "data-board-stage": !0,
3689
3709
  className: "x10l6tqk x10a8y8t x1hj3fc7",
3690
- style: P ? { transform: P } : void 0,
3710
+ style: se ? { transform: se } : void 0,
3691
3711
  children: /* @__PURE__ */ Z("div", {
3692
3712
  className: "x10l6tqk xu96u03 x13vifvy x1hj3fc7",
3693
3713
  style: {
@@ -3695,7 +3715,7 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3695
3715
  height: n.h,
3696
3716
  transform: `translate(${l.x}px, ${l.y}px) scale(${l.k})`
3697
3717
  },
3698
- children: t(n) ? /* @__PURE__ */ Z(F, {
3718
+ children: t(n) ? /* @__PURE__ */ Z(ce, {
3699
3719
  id: e,
3700
3720
  board: n,
3701
3721
  src: r,
@@ -3717,15 +3737,15 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3717
3737
  i.length > 1 ? /* @__PURE__ */ Q("div", {
3718
3738
  ref: h,
3719
3739
  className: "x1n2onr6 x2lah0s x78zum5 x6s0dn4 xdqyycr x1iorvi4 xe1blv6 x178xt8z x13fuv20 xxu5053 x1rozbrz",
3720
- style: g ? { opacity: se } : void 0,
3740
+ style: g ? { opacity: le } : void 0,
3721
3741
  children: [
3722
3742
  /* @__PURE__ */ Z("button", {
3723
3743
  type: "button",
3724
- "aria-label": V("phone.previousBoard"),
3744
+ "aria-label": B("phone.previousBoard"),
3725
3745
  disabled: !w,
3726
- onClick: () => void M(-1, w),
3727
- ...D(Ai.ghost),
3728
- children: /* @__PURE__ */ Z(bt, { size: 20 })
3746
+ onClick: () => void ee(-1, w),
3747
+ ...O(Mi.ghost),
3748
+ children: /* @__PURE__ */ Z(xt, { size: 20 })
3729
3749
  }),
3730
3750
  /* @__PURE__ */ Z("span", {
3731
3751
  className: "x98rzlu x78zum5 xl56j7k x17d4w8g",
@@ -3739,11 +3759,11 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3739
3759
  }),
3740
3760
  /* @__PURE__ */ Z("button", {
3741
3761
  type: "button",
3742
- "aria-label": V("phone.nextBoard"),
3762
+ "aria-label": B("phone.nextBoard"),
3743
3763
  disabled: !T,
3744
- onClick: () => void M(1, T),
3745
- ...D(Ai.ghost),
3746
- children: /* @__PURE__ */ Z(xt, { size: 20 })
3764
+ onClick: () => void ee(1, T),
3765
+ ...O(Mi.ghost),
3766
+ children: /* @__PURE__ */ Z(St, { size: 20 })
3747
3767
  })
3748
3768
  ]
3749
3769
  }) : null
@@ -3752,13 +3772,13 @@ function Li({ id: e, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
3752
3772
  }
3753
3773
  //#endregion
3754
3774
  //#region src/viewer/lib/questions.ts
3755
- var Ri = (e) => ({
3775
+ var Bi = (e) => ({
3756
3776
  minX: e.x,
3757
3777
  minY: e.y,
3758
3778
  maxX: e.x + e.w,
3759
3779
  maxY: e.y + e.h
3760
3780
  });
3761
- function zi(e, t, n) {
3781
+ function Vi(e, t, n) {
3762
3782
  let r = t.pages[n];
3763
3783
  if (!r) return [];
3764
3784
  let i = /* @__PURE__ */ new Set(), a = [];
@@ -3770,7 +3790,7 @@ function zi(e, t, n) {
3770
3790
  id: t,
3771
3791
  title: o.title ?? t,
3772
3792
  boards: c,
3773
- bounds: Ri(s)
3793
+ bounds: Bi(s)
3774
3794
  });
3775
3795
  }
3776
3796
  }
@@ -3778,7 +3798,7 @@ function zi(e, t, n) {
3778
3798
  id: t,
3779
3799
  title: r.title ?? t,
3780
3800
  boards: [t],
3781
- bounds: Ri(r)
3801
+ bounds: Bi(r)
3782
3802
  });
3783
3803
  a.sort((e, t) => e.bounds.minY - t.bounds.minY || e.bounds.minX - t.bounds.minX);
3784
3804
  let o = Object.entries(e.notes ?? {}).filter(([e, t]) => t.page === n && t.kind === "title" && r.notes[e]).map(([e, t]) => ({
@@ -3790,31 +3810,31 @@ function zi(e, t, n) {
3790
3810
  let t = o.filter((t) => t.rect.y + t.rect.h <= e.bounds.minY).sort((e, t) => t.rect.y - e.rect.y)[0], n = t?.id ?? null;
3791
3811
  s.has(n) || s.set(n, {
3792
3812
  id: n,
3793
- title: t?.text ?? R.t("common.other"),
3813
+ title: t?.text ?? L.t("common.other"),
3794
3814
  questions: []
3795
3815
  }), s.get(n).questions.push(e);
3796
3816
  }
3797
3817
  let c = (e) => o.find((t) => t.id === e)?.rect.y ?? -Infinity;
3798
3818
  return [...s.values()].sort((e, t) => c(t.id) - c(e.id));
3799
3819
  }
3800
- var Bi = (e) => e.flatMap((e) => e.questions);
3801
- function Vi(e, t) {
3802
- let n = Bi(e);
3820
+ var Hi = (e) => e.flatMap((e) => e.questions);
3821
+ function Ui(e, t) {
3822
+ let n = Hi(e);
3803
3823
  if (t) {
3804
3824
  let r = e.find((e) => e.id === t)?.questions[0] ?? n.find((e) => e.id === t) ?? n.find((e) => e.boards.includes(t));
3805
3825
  if (r) return r;
3806
3826
  }
3807
3827
  return n[0] ?? null;
3808
3828
  }
3809
- function Hi(e, t, n) {
3829
+ function Wi(e, t, n) {
3810
3830
  let r = e.findIndex((e) => e.id === t);
3811
3831
  return r === -1 ? null : e[r + n] ?? null;
3812
3832
  }
3813
- var Ui = .66, Wi = (e, t, n) => e.id === t?.id ? "current" : n[e.id]?.state === "pass" ? "pass" : n[e.id]?.state === "reject" ? "reject" : "open";
3814
- function Gi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, onPageChange: o, onPick: s, snap: c, onSnap: l, verdicts: u = {} }) {
3815
- let { t: d } = L(), f = Bi(e), p = t ? f.findIndex((e) => e.id === t.id) : -1;
3816
- return /* @__PURE__ */ Z(te, {
3817
- snaps: [78, Ui],
3833
+ var Gi = .66, Ki = (e, t, n) => e.id === t?.id ? "current" : n[e.id]?.state === "pass" ? "pass" : n[e.id]?.state === "reject" ? "reject" : "open";
3834
+ function qi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, onPageChange: o, onPick: s, snap: c, onSnap: l, verdicts: u = {} }) {
3835
+ let { t: d } = F(), f = Hi(e), p = t ? f.findIndex((e) => e.id === t.id) : -1;
3836
+ return /* @__PURE__ */ Z(re, {
3837
+ snaps: [78, Gi],
3818
3838
  snap: c,
3819
3839
  onSnap: l,
3820
3840
  onScrim: () => l(78),
@@ -3826,8 +3846,8 @@ function Gi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
3826
3846
  "aria-label": d("questions.previous"),
3827
3847
  disabled: !n,
3828
3848
  onClick: () => n && s(n),
3829
- ...D(Ai.ghost),
3830
- children: /* @__PURE__ */ Z(bt, { size: 20 })
3849
+ ...O(Mi.ghost),
3850
+ children: /* @__PURE__ */ Z(xt, { size: 20 })
3831
3851
  }),
3832
3852
  /* @__PURE__ */ Q("span", {
3833
3853
  "data-question-bar": !0,
@@ -3859,7 +3879,7 @@ function Gi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
3859
3879
  "data-progress": !0,
3860
3880
  className: "x78zum5 x1ed6fcf",
3861
3881
  children: f.map((e) => {
3862
- let n = Wi(e, t, u);
3882
+ let n = Ki(e, t, u);
3863
3883
  return /* @__PURE__ */ Z("span", {
3864
3884
  "data-mark": n,
3865
3885
  ...{
@@ -3881,8 +3901,8 @@ function Gi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
3881
3901
  "aria-label": d("questions.next"),
3882
3902
  disabled: !r,
3883
3903
  onClick: () => r && s(r),
3884
- ...D(Ai.ghost),
3885
- children: /* @__PURE__ */ Z(xt, { size: 20 })
3904
+ ...O(Mi.ghost),
3905
+ children: /* @__PURE__ */ Z(St, { size: 20 })
3886
3906
  })
3887
3907
  ]
3888
3908
  }),
@@ -3890,7 +3910,7 @@ function Gi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
3890
3910
  className: "xwxc41k xqfszdh",
3891
3911
  children: [i.length > 1 ? /* @__PURE__ */ Z("div", {
3892
3912
  className: "x78zum5 x13a6bvl x1hr3lfm x12ulsxz",
3893
- children: /* @__PURE__ */ Z(Oi, {
3913
+ children: /* @__PURE__ */ Z(Ai, {
3894
3914
  pages: i,
3895
3915
  page: a,
3896
3916
  onPageChange: o
@@ -3927,159 +3947,159 @@ function Gi({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
3927
3947
  }
3928
3948
  //#endregion
3929
3949
  //#region src/viewer/layouts/PhoneArtboard.tsx
3930
- var Ki = {
3950
+ var Ji = {
3931
3951
  top: 16,
3932
3952
  right: 16,
3933
3953
  bottom: 94,
3934
3954
  left: 16
3935
- }, qi = 8, Ji = /* @__PURE__ */ new Set(), Yi = [];
3936
- function Xi({ id: e, canvas: t, layout: n, warnings: r, pending: i, contentBase: a, versions: o, live: c, loaded: l, agent: u, comments: d, actions: f }) {
3937
- let { viewportRef: p, view: m, size: h, fit: g, handlers: _ } = di("hand"), [v, y] = Y(null), [x, S] = Y(78), [C, w] = Y(null), T = J(null), E = G((e, t = !1) => e ? (y(e.id), g(e.bounds, Ki, { animate: t }), !0) : !1, [g]), { page: D, changePage: O } = Di({
3955
+ }, Yi = 8, Xi = /* @__PURE__ */ new Set(), Zi = [];
3956
+ function Qi({ id: e, canvas: t, layout: n, warnings: r, pending: i, contentBase: a, versions: o, live: s, loaded: c, agent: d, comments: f, actions: p }) {
3957
+ let { viewportRef: m, view: h, size: g, fit: _, handlers: v } = pi("hand"), [y, b] = Y(null), [x, S] = Y(78), [C, w] = Y(null), T = J(null), E = G((e, t = !1) => e ? (b(e.id), _(e.bounds, Ji, { animate: t }), !0) : !1, [_]), { page: D, changePage: O } = ki({
3938
3958
  canvas: t,
3939
3959
  layout: n,
3940
3960
  fitPage: G((e) => {
3941
3961
  let r = n?.pages[e];
3942
- return !t || !r ? !1 : (E(Vi(zi(t, n, e), t.focus?.target)) || (y(null), r.bounds && g(r.bounds, Ki)), !0);
3962
+ return !t || !r ? !1 : (E(Ui(Vi(t, n, e), t.focus?.target)) || (b(null), r.bounds && _(r.bounds, Ji)), !0);
3943
3963
  }, [
3944
3964
  t,
3945
3965
  n,
3946
- g,
3966
+ _,
3947
3967
  E
3948
3968
  ]),
3949
3969
  fitFocus: G((e, r) => {
3950
- t && n && E(Vi(zi(t, n, r.page), e)) || g(r.bounds, Ki);
3970
+ t && n && E(Ui(Vi(t, n, r.page), e)) || _(r.bounds, Ji);
3951
3971
  }, [
3952
3972
  t,
3953
3973
  n,
3954
- g,
3974
+ _,
3955
3975
  E
3956
3976
  ]),
3957
3977
  startAtFocus: !0
3958
- }), k = q(() => t && n && D ? zi(t, n, D) : [], [
3978
+ }), k = q(() => t && n && D ? Vi(t, n, D) : [], [
3959
3979
  t,
3960
3980
  n,
3961
3981
  D
3962
- ]), A = q(() => Bi(k), [k]), j = A.find((e) => e.id === v) ?? null, ee = (e) => {
3982
+ ]), A = q(() => Hi(k), [k]), j = A.find((e) => e.id === y) ?? null, ee = (e) => {
3963
3983
  E(e, !0), S(78);
3964
- }, M = t?.boards ?? {}, te = q(() => Object.entries(t?.boards ?? {}).filter(([, e]) => e.page === D), [t, D]), ne = Object.entries(t?.groups ?? {}).filter(([, e]) => e.boards.some((e) => M[e]?.page === D)), re = Object.entries(t?.notes ?? {}).filter(([, e]) => e.page === D), ie = q(() => new Set(i), [i]), ae = q(() => new Set(d?.stale ?? []), [d]), N = Pr({
3984
+ }, te = t?.boards ?? {}, ne = q(() => Object.entries(t?.boards ?? {}).filter(([, e]) => e.page === D), [t, D]), re = Object.entries(t?.groups ?? {}).filter(([, e]) => e.boards.some((e) => te[e]?.page === D)), ie = Object.entries(t?.notes ?? {}).filter(([, e]) => e.page === D), ae = q(() => new Set(i), [i]), oe = q(() => new Set(f?.stale ?? []), [f]), M = Ir({
3965
3985
  canvas: t,
3966
3986
  page: D,
3967
- threads: d?.comments.threads ?? Yi,
3968
- stale: ae,
3987
+ threads: f?.comments.threads ?? Zi,
3988
+ stale: oe,
3969
3989
  versions: o
3970
- }), P = (e) => {
3971
- let t = p.current.getBoundingClientRect(), n = (e.clientX - t.left - m.x) / m.k, r = (e.clientY - t.top - m.y) / m.k;
3972
- return te.find(([, e]) => n >= e.x && n <= e.x + e.w && r >= e.y && r <= e.y + e.h)?.[0] ?? null;
3973
- }, F = (e) => {
3974
- _.onPointerDown(e);
3990
+ }), se = (e) => {
3991
+ let t = m.current.getBoundingClientRect(), n = (e.clientX - t.left - h.x) / h.k, r = (e.clientY - t.top - h.y) / h.k;
3992
+ return ne.find(([, e]) => n >= e.x && n <= e.x + e.w && r >= e.y && r <= e.y + e.h)?.[0] ?? null;
3993
+ }, N = (e) => {
3994
+ v.onPointerDown(e);
3975
3995
  let t = !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome]");
3976
3996
  T.current = T.current || t ? null : {
3977
3997
  pointer: e.pointerId,
3978
3998
  x: e.clientX,
3979
3999
  y: e.clientY
3980
4000
  };
3981
- }, oe = (e) => {
3982
- _.onPointerMove(e);
3983
- let t = T.current;
3984
- t && (t.pointer !== e.pointerId || Math.hypot(e.clientX - t.x, e.clientY - t.y) > qi) && (T.current = null);
3985
4001
  }, ce = (e) => {
3986
- _.onPointerUp(e);
4002
+ v.onPointerMove(e);
4003
+ let t = T.current;
4004
+ t && (t.pointer !== e.pointerId || Math.hypot(e.clientX - t.x, e.clientY - t.y) > Yi) && (T.current = null);
4005
+ }, le = (e) => {
4006
+ v.onPointerUp(e);
3987
4007
  let t = T.current;
3988
4008
  if (T.current = null, t?.pointer !== e.pointerId) return;
3989
- let n = P(e);
4009
+ let n = se(e);
3990
4010
  n && w(n);
3991
- }, I = C ? M[C] : void 0, L = p.current?.getBoundingClientRect(), le = I && L ? {
3992
- x: L.left + m.x + I.x * m.k,
3993
- y: L.top + m.y + I.y * m.k,
3994
- w: I.w * m.k,
3995
- h: I.h * m.k
3996
- } : void 0, ue = (e) => !t?.groups?.[e.id], R = C ? k.find((e) => e.questions.some((e) => e.boards.includes(C))) : void 0, z = R?.questions.find((e) => e.boards.includes(C)), de = C ? z ? ue(z) ? R.questions.filter(ue).map((e) => e.id) : z.boards : [C] : [];
4011
+ }, P = C ? te[C] : void 0, de = m.current?.getBoundingClientRect(), F = P && de ? {
4012
+ x: de.left + h.x + P.x * h.k,
4013
+ y: de.top + h.y + P.y * h.k,
4014
+ w: P.w * h.k,
4015
+ h: P.h * h.k
4016
+ } : void 0, fe = (e) => !t?.groups?.[e.id], I = C ? k.find((e) => e.questions.some((e) => e.boards.includes(C))) : void 0, L = I?.questions.find((e) => e.boards.includes(C)), pe = C ? L ? fe(L) ? I.questions.filter(fe).map((e) => e.id) : L.boards : [C] : [];
3997
4017
  return /* @__PURE__ */ Q("div", {
3998
4018
  className: "xixxii4 x10a8y8t x78zum5 xdt5ytf x184qs1t",
3999
4019
  children: [
4000
- /* @__PURE__ */ Z(ki, {
4020
+ /* @__PURE__ */ Z(ji, {
4001
4021
  title: t?.title || e,
4002
4022
  pages: t?.pages ?? [],
4003
4023
  page: D,
4004
4024
  onPageChange: O,
4005
- actions: f,
4006
- live: c
4025
+ actions: p,
4026
+ live: s
4007
4027
  }),
4008
4028
  /* @__PURE__ */ Q("div", {
4009
- ref: p,
4029
+ ref: m,
4010
4030
  className: "x1n2onr6 x98rzlu x2lwn1j xb3r6kr x5ve5x3 x87ps6o xqfszdh xo2rkog",
4011
- onPointerDown: F,
4012
- onPointerMove: oe,
4013
- onPointerUp: ce,
4031
+ onPointerDown: N,
4032
+ onPointerMove: ce,
4033
+ onPointerUp: le,
4014
4034
  onPointerCancel: (e) => {
4015
- _.onPointerCancel(e), T.current = null;
4035
+ v.onPointerCancel(e), T.current = null;
4016
4036
  },
4017
- children: [t && n ? /* @__PURE__ */ Q(s, {
4037
+ children: [t && n ? /* @__PURE__ */ Q(u, {
4018
4038
  resetKey: t,
4019
- children: [/* @__PURE__ */ Z(se, {
4020
- view: m,
4021
- renders: b({
4022
- boards: te.map(([e, t]) => ({
4039
+ children: [/* @__PURE__ */ Z(ue, {
4040
+ view: h,
4041
+ renders: l({
4042
+ boards: ne.map(([e, t]) => ({
4023
4043
  id: e,
4024
4044
  ...t
4025
4045
  })),
4026
- view: m,
4027
- viewport: h
4046
+ view: h,
4047
+ viewport: g
4028
4048
  }),
4029
- boards: te,
4030
- notes: re,
4049
+ boards: ne,
4050
+ notes: ie,
4031
4051
  contentBase: a,
4032
4052
  versions: o,
4033
- pending: ie,
4034
- playing: Ji,
4053
+ pending: ae,
4054
+ playing: Xi,
4035
4055
  replays: {},
4036
4056
  inspecting: !1,
4037
4057
  frameRef: () => () => {},
4038
4058
  frameLoaded: () => {},
4039
- live: c,
4040
- writing: c ? t.writing : void 0,
4041
- agent: u
4042
- }), /* @__PURE__ */ Z(Zn, {
4043
- view: m,
4044
- boards: te,
4045
- groups: ne,
4046
- allBoards: M,
4059
+ live: s,
4060
+ writing: s ? t.writing : void 0,
4061
+ agent: d
4062
+ }), /* @__PURE__ */ Z(Qn, {
4063
+ view: h,
4064
+ boards: ne,
4065
+ groups: re,
4066
+ allBoards: te,
4047
4067
  contentBase: a,
4048
4068
  versions: o,
4049
- pending: ie,
4050
- playing: Ji,
4069
+ pending: ae,
4070
+ playing: Xi,
4051
4071
  onExpand: w,
4052
4072
  onTogglePlay: w,
4053
4073
  onReplay: () => {},
4054
- verdicts: N
4074
+ verdicts: M
4055
4075
  })]
4056
4076
  }) : /* @__PURE__ */ Z("div", {
4057
4077
  className: "x10l6tqk x10a8y8t xrvj5dj x1ku5rj1 xggk2y7 x1bo0w0s xif65rj x2b8uid",
4058
- children: l ? r[0] ?? "Waiting for the agent to write canvas.json…" : "Connecting…"
4078
+ children: c ? r[0] ?? "Waiting for the agent to write canvas.json…" : "Connecting…"
4059
4079
  }), A.length > 0 ? /* @__PURE__ */ Z("div", {
4060
4080
  "data-chrome": !0,
4061
4081
  className: "x10l6tqk x10a8y8t x1n327nk x47corl",
4062
- children: /* @__PURE__ */ Z(Gi, {
4082
+ children: /* @__PURE__ */ Z(qi, {
4063
4083
  rounds: k,
4064
4084
  current: j,
4065
- previous: v ? Hi(A, v, -1) : null,
4066
- next: v ? Hi(A, v, 1) : null,
4085
+ previous: y ? Wi(A, y, -1) : null,
4086
+ next: y ? Wi(A, y, 1) : null,
4067
4087
  pages: t?.pages ?? [],
4068
4088
  page: D,
4069
4089
  onPageChange: O,
4070
4090
  onPick: ee,
4071
4091
  snap: x,
4072
4092
  onSnap: S,
4073
- verdicts: N.states
4093
+ verdicts: M.states
4074
4094
  })
4075
4095
  }) : null]
4076
4096
  }),
4077
- C && I ? /* @__PURE__ */ Z(Li, {
4097
+ C && P ? /* @__PURE__ */ Z(zi, {
4078
4098
  id: C,
4079
- board: I,
4080
- src: `${a}${I.file}?v=${o[I.file] ?? 0}`,
4081
- siblings: de,
4082
- origin: le,
4099
+ board: P,
4100
+ src: `${a}${P.file}?v=${o[P.file] ?? 0}`,
4101
+ siblings: pe,
4102
+ origin: F,
4083
4103
  onOpen: w,
4084
4104
  onClose: () => w(null)
4085
4105
  }) : null
@@ -4088,7 +4108,7 @@ function Xi({ id: e, canvas: t, layout: n, warnings: r, pending: i, contentBase:
4088
4108
  }
4089
4109
  //#endregion
4090
4110
  //#region src/viewer/hooks/useBoardTweaks.ts
4091
- function Zi(e) {
4111
+ function $i(e) {
4092
4112
  let t = J({}), [n, r] = Y(t.current), i = J(/* @__PURE__ */ new Map()), a = J(/* @__PURE__ */ new Map()), o = G((e, n) => {
4093
4113
  t.current = {
4094
4114
  ...t.current,
@@ -4113,9 +4133,9 @@ function Zi(e) {
4113
4133
  let r = [...i.current.values()].find((t) => t.element.contentWindow === e.source && t.connection === n.connection);
4114
4134
  if (!r || r.session && r.session !== n.session || n.error !== null && (typeof n.error != "string" || n.error.length > 512)) return;
4115
4135
  r.session = n.session;
4116
- let a = Zt(n.schema);
4136
+ let a = Qt(n.schema);
4117
4137
  n.error && (a.schema = null, a.error = n.error);
4118
- let c = t.current[r.boardId], l = a.schema ? $t(a.schema, c?.values, c?.schema ?? void 0) : {};
4138
+ let c = t.current[r.boardId], l = a.schema ? en(a.schema, c?.values, c?.schema ?? void 0) : {};
4119
4139
  o(r.boardId, {
4120
4140
  ...a,
4121
4141
  values: l
@@ -4141,7 +4161,7 @@ function Zi(e) {
4141
4161
  connection: n.connection
4142
4162
  }, "*"));
4143
4163
  }, []), u = G((e, n) => {
4144
- let r = t.current[e], i = r?.schema && Qt(r.schema, n);
4164
+ let r = t.current[e], i = r?.schema && $t(r.schema, n);
4145
4165
  r && i && (o(e, {
4146
4166
  ...r,
4147
4167
  values: i
@@ -4159,23 +4179,23 @@ function Zi(e) {
4159
4179
  }, [u]),
4160
4180
  reset: G((e) => {
4161
4181
  let n = t.current[e]?.schema;
4162
- n && u(e, $t(n));
4182
+ n && u(e, en(n));
4163
4183
  }, [u])
4164
4184
  };
4165
4185
  }
4166
- var Qi = (e, t) => ({
4186
+ var ea = (e, t) => ({
4167
4187
  left: t.x + (e.x + e.w) * t.k + 12,
4168
4188
  top: t.y + e.y * t.k
4169
4189
  });
4170
- function $i(e, t, n) {
4171
- let r = Qi(e, t);
4190
+ function ta(e, t, n) {
4191
+ let r = ea(e, t);
4172
4192
  return {
4173
4193
  x: Math.min(Math.max(12, r.left), Math.max(12, n.width - 352 - 12)) - r.left,
4174
4194
  y: Math.min(Math.max(60, r.top), Math.max(60, n.height - 604 - 12)) - r.top
4175
4195
  };
4176
4196
  }
4177
- function ea({ control: e, value: t, change: n }) {
4178
- let r = We(), i = e.type === "enum" && e.options.length <= 3, a = i ? "fieldset" : "div", o;
4197
+ function na({ control: e, value: t, change: n }) {
4198
+ let r = Ge(), i = e.type === "enum" && e.options.length <= 3, a = i ? "fieldset" : "div", o;
4179
4199
  return o = e.type === "color" ? /* @__PURE__ */ Q("div", {
4180
4200
  className: "rt-color",
4181
4201
  children: [e.options && /* @__PURE__ */ Z("div", {
@@ -4189,13 +4209,13 @@ function ea({ control: e, value: t, change: n }) {
4189
4209
  style: { backgroundColor: r.value },
4190
4210
  onClick: () => n(r.value)
4191
4211
  }, r.value))
4192
- }), /* @__PURE__ */ Z(Ze, {
4212
+ }), /* @__PURE__ */ Z(Qe, {
4193
4213
  size: "small",
4194
4214
  alpha: !1,
4195
4215
  recent: !1,
4196
4216
  value: t,
4197
4217
  onChange: n,
4198
- children: /* @__PURE__ */ Q(Xe, {
4218
+ children: /* @__PURE__ */ Q(Ze, {
4199
4219
  id: r,
4200
4220
  "aria-label": e.label,
4201
4221
  size: "small",
@@ -4205,14 +4225,14 @@ function ea({ control: e, value: t, change: n }) {
4205
4225
  }), /* @__PURE__ */ Z("code", { children: String(t) })]
4206
4226
  })
4207
4227
  })]
4208
- }) : e.type === "boolean" ? /* @__PURE__ */ Z(st, {
4228
+ }) : e.type === "boolean" ? /* @__PURE__ */ Z(ct, {
4209
4229
  id: r,
4210
4230
  "aria-label": e.label,
4211
4231
  checked: t,
4212
4232
  onChange: n
4213
4233
  }) : e.type === "range" ? /* @__PURE__ */ Q("div", {
4214
4234
  className: "rt-range",
4215
- children: [/* @__PURE__ */ Z(ot, {
4235
+ children: [/* @__PURE__ */ Z(st, {
4216
4236
  "aria-labelledby": `${r}-label`,
4217
4237
  value: t,
4218
4238
  min: e.min,
@@ -4220,7 +4240,7 @@ function ea({ control: e, value: t, change: n }) {
4220
4240
  step: e.step,
4221
4241
  onChange: n
4222
4242
  }), /* @__PURE__ */ Z("output", { children: String(t) })]
4223
- }) : e.type === "number" ? /* @__PURE__ */ Z(nt, {
4243
+ }) : e.type === "number" ? /* @__PURE__ */ Z(rt, {
4224
4244
  id: r,
4225
4245
  "aria-label": e.label,
4226
4246
  size: "small",
@@ -4232,13 +4252,13 @@ function ea({ control: e, value: t, change: n }) {
4232
4252
  e !== null && n(e);
4233
4253
  },
4234
4254
  style: { width: "100%" }
4235
- }) : e.type === "enum" ? i ? /* @__PURE__ */ Z(it, {
4255
+ }) : e.type === "enum" ? i ? /* @__PURE__ */ Z(at, {
4236
4256
  size: "small",
4237
4257
  block: !0,
4238
4258
  value: t,
4239
4259
  options: e.options,
4240
4260
  onChange: n
4241
- }) : /* @__PURE__ */ Z(at, {
4261
+ }) : /* @__PURE__ */ Z(ot, {
4242
4262
  id: r,
4243
4263
  size: "small",
4244
4264
  value: t,
@@ -4247,7 +4267,7 @@ function ea({ control: e, value: t, change: n }) {
4247
4267
  typeof e == "string" && n(e);
4248
4268
  },
4249
4269
  style: { width: "100%" }
4250
- }) : /* @__PURE__ */ Z(tt, {
4270
+ }) : /* @__PURE__ */ Z(nt, {
4251
4271
  id: r,
4252
4272
  "aria-label": e.label,
4253
4273
  size: "small",
@@ -4265,19 +4285,19 @@ function ea({ control: e, value: t, change: n }) {
4265
4285
  }), o]
4266
4286
  });
4267
4287
  }
4268
- function ta({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a, onClose: o }) {
4288
+ function ra({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a, onClose: o }) {
4269
4289
  let s = J(null), c = /* @__PURE__ */ new Map();
4270
4290
  for (let e of Object.entries(n.schema?.controls ?? {})) {
4271
- let t = e[1].section || V("parameters.controls");
4291
+ let t = e[1].section || B("parameters.controls");
4272
4292
  c.has(t) || c.set(t, []), c.get(t).push(e);
4273
4293
  }
4274
4294
  let l = Object.entries(n.values).filter(([e, t]) => t !== n.schema?.controls[e]?.default).length;
4275
- return /* @__PURE__ */ Q(et, {
4295
+ return /* @__PURE__ */ Q(tt, {
4276
4296
  config: { "aria-hidden": !0 },
4277
4297
  children: [/* @__PURE__ */ Q("aside", {
4278
4298
  className: "ryugi-parameters",
4279
4299
  "data-chrome": "parameters",
4280
- "aria-label": V("parameters.title"),
4300
+ "aria-label": B("parameters.title"),
4281
4301
  style: {
4282
4302
  position: r ? "absolute" : "relative",
4283
4303
  ...r,
@@ -4285,22 +4305,22 @@ function ta({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
4285
4305
  maxHeight: r ? `min(604px, calc(100% - ${Math.max(0, r.top)}px - 12px))` : "min(604px, calc(100vh - 112px))"
4286
4306
  },
4287
4307
  onKeyDown: (e) => {
4288
- e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !He(e.nativeEvent) && o();
4308
+ e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !Ue(e.nativeEvent) && o();
4289
4309
  },
4290
4310
  children: [
4291
4311
  /* @__PURE__ */ Q("header", {
4292
4312
  className: "rt-header",
4293
4313
  children: [
4294
- /* @__PURE__ */ Z(Gt, {
4314
+ /* @__PURE__ */ Z(Kt, {
4295
4315
  size: 15,
4296
4316
  "aria-hidden": !0
4297
4317
  }),
4298
- /* @__PURE__ */ Z("h2", { children: V("parameters.title") }),
4299
- /* @__PURE__ */ Z(Ye, {
4300
- icon: Jt,
4318
+ /* @__PURE__ */ Z("h2", { children: B("parameters.title") }),
4319
+ /* @__PURE__ */ Z(Xe, {
4320
+ icon: Yt,
4301
4321
  size: "small",
4302
- "aria-label": V("parameters.close"),
4303
- title: V("parameters.close"),
4322
+ "aria-label": B("parameters.close"),
4323
+ title: B("parameters.close"),
4304
4324
  onClick: o
4305
4325
  })
4306
4326
  ]
@@ -4308,12 +4328,12 @@ function ta({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
4308
4328
  /* @__PURE__ */ Q("div", {
4309
4329
  className: "rt-board",
4310
4330
  children: [
4311
- /* @__PURE__ */ Z(Et, {
4331
+ /* @__PURE__ */ Z(Dt, {
4312
4332
  size: 17,
4313
4333
  "aria-hidden": !0
4314
4334
  }),
4315
4335
  /* @__PURE__ */ Q("div", { children: [/* @__PURE__ */ Z("strong", { children: t }), /* @__PURE__ */ Z("code", { children: e })] }),
4316
- /* @__PURE__ */ Z("span", { children: V("parameters.currentBoard") })
4336
+ /* @__PURE__ */ Z("span", { children: B("parameters.currentBoard") })
4317
4337
  ]
4318
4338
  }),
4319
4339
  /* @__PURE__ */ Q("div", {
@@ -4326,7 +4346,7 @@ function ta({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
4326
4346
  }),
4327
4347
  [...c].map(([e, t]) => /* @__PURE__ */ Q("section", {
4328
4348
  className: "rt-section",
4329
- children: [/* @__PURE__ */ Z("h3", { children: e }), t.map(([e, t]) => /* @__PURE__ */ Z(ea, {
4349
+ children: [/* @__PURE__ */ Z("h3", { children: e }), t.map(([e, t]) => /* @__PURE__ */ Z(na, {
4330
4350
  control: t,
4331
4351
  value: n.values[e],
4332
4352
  change: (t) => i(e, t)
@@ -4334,12 +4354,12 @@ function ta({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
4334
4354
  }, e)),
4335
4355
  n.schema && /* @__PURE__ */ Q("div", {
4336
4356
  className: "rt-declaration",
4337
- children: [/* @__PURE__ */ Z("span", { children: V("parameters.declaredBy") }), /* @__PURE__ */ Z(Xe, {
4357
+ children: [/* @__PURE__ */ Z("span", { children: B("parameters.declaredBy") }), /* @__PURE__ */ Z(Ze, {
4338
4358
  size: "small",
4339
4359
  type: "text",
4340
- icon: Et,
4360
+ icon: Dt,
4341
4361
  onClick: () => s.current?.showModal(),
4342
- children: V("parameters.viewDeclaration")
4362
+ children: B("parameters.viewDeclaration")
4343
4363
  })]
4344
4364
  })
4345
4365
  ]
@@ -4348,50 +4368,50 @@ function ta({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
4348
4368
  className: "rt-footer",
4349
4369
  children: [/* @__PURE__ */ Z("span", {
4350
4370
  role: "status",
4351
- children: l ? V("parameters.changed", { count: l }) : V("parameters.defaults")
4352
- }), /* @__PURE__ */ Z(Xe, {
4371
+ children: l ? B("parameters.changed", { count: l }) : B("parameters.defaults")
4372
+ }), /* @__PURE__ */ Z(Ze, {
4353
4373
  size: "small",
4354
4374
  type: "text",
4355
- icon: Ut,
4375
+ icon: Wt,
4356
4376
  disabled: !l,
4357
4377
  onClick: a,
4358
- children: V("parameters.reset")
4378
+ children: B("parameters.reset")
4359
4379
  })]
4360
4380
  })
4361
4381
  ]
4362
4382
  }), /* @__PURE__ */ Q("dialog", {
4363
4383
  ref: s,
4364
4384
  className: "rt-dialog",
4365
- "aria-label": V("parameters.declaration"),
4385
+ "aria-label": B("parameters.declaration"),
4366
4386
  onKeyDown: (e) => e.stopPropagation(),
4367
4387
  children: [
4368
- /* @__PURE__ */ Q("header", { children: [/* @__PURE__ */ Z("h2", { children: V("parameters.declaration") }), /* @__PURE__ */ Z(Ye, {
4369
- icon: Jt,
4388
+ /* @__PURE__ */ Q("header", { children: [/* @__PURE__ */ Z("h2", { children: B("parameters.declaration") }), /* @__PURE__ */ Z(Xe, {
4389
+ icon: Yt,
4370
4390
  size: "small",
4371
- "aria-label": V("parameters.closeDeclaration"),
4391
+ "aria-label": B("parameters.closeDeclaration"),
4372
4392
  onClick: () => s.current?.close()
4373
4393
  })] }),
4374
4394
  /* @__PURE__ */ Z("pre", {
4375
4395
  tabIndex: 0,
4376
4396
  children: JSON.stringify(n.schema, null, 2)
4377
4397
  }),
4378
- /* @__PURE__ */ Z("h3", { children: V("parameters.currentValues") }),
4398
+ /* @__PURE__ */ Z("h3", { children: B("parameters.currentValues") }),
4379
4399
  /* @__PURE__ */ Z("pre", {
4380
4400
  tabIndex: 0,
4381
4401
  children: JSON.stringify(n.values, null, 2)
4382
4402
  }),
4383
- /* @__PURE__ */ Z("p", { children: V("parameters.sessionOnly") })
4403
+ /* @__PURE__ */ Z("p", { children: B("parameters.sessionOnly") })
4384
4404
  ]
4385
4405
  })]
4386
4406
  });
4387
4407
  }
4388
4408
  //#endregion
4389
4409
  //#region src/viewer/layouts/ArtboardView.tsx
4390
- function na(e) {
4391
- return Me("(max-width: 640px)") ? /* @__PURE__ */ Z(Xi, { ...e }) : /* @__PURE__ */ Z(ra, { ...e });
4410
+ function ia(e) {
4411
+ return Pe("(max-width: 640px)") ? /* @__PURE__ */ Z(Qi, { ...e }) : /* @__PURE__ */ Z(aa, { ...e });
4392
4412
  }
4393
- function ra({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: a, contentBase: o, versions: c, live: l, loaded: u, send: d, agent: f, comments: p, comment: m, actions: h }) {
4394
- let [g, _] = Y("select"), { viewportRef: v, view: y, scaling: b, size: x, fit: S, zoomBy: C, zoomTo: w, cursor: T, hand: D, handlers: O, panBy: k, wheelAt: A, panning: j, setSpaceHeld: ee } = di(g), [M, te] = Y(!1), [ne] = Y(() => new URLSearchParams(location.search).has("debug")), [re, ie] = Y("open"), ae = (e) => e && r?.pages[e]?.bounds || null, { page: N, changePage: P } = Di({
4413
+ function aa({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: a, contentBase: o, versions: s, live: c, loaded: l, send: d, agent: f, comments: p, comment: m, actions: h }) {
4414
+ let [g, _] = Y("select"), { viewportRef: v, view: y, scaling: b, size: x, fit: S, zoomBy: C, zoomTo: w, cursor: T, hand: E, handlers: O, panBy: k, wheelAt: A, panning: j, setSpaceHeld: ee } = pi(g), [te, ne] = Y(!1), [re] = Y(() => new URLSearchParams(location.search).has("debug")), [ie, ae] = Y("open"), oe = (e) => e && r?.pages[e]?.bounds || null, { page: M, changePage: se } = ki({
4395
4415
  canvas: n,
4396
4416
  layout: r,
4397
4417
  fitPage: G((e) => {
@@ -4399,151 +4419,151 @@ function ra({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: a,
4399
4419
  return t ? (S(t), !0) : !1;
4400
4420
  }, [r, S]),
4401
4421
  fitFocus: G((e, t) => S(t.bounds), [S])
4402
- }), [F, ce] = Y(null), [I, L] = Y(() => /* @__PURE__ */ new Set()), [le, ue] = Y({}), R = Zi(e), [z, de] = Y(null), fe = J(null);
4403
- K(() => de(null), [N, e]);
4404
- let pe = () => {
4405
- de(null), fe.current?.focus();
4406
- }, me = (e, t) => {
4407
- fe.current = t;
4422
+ }), [N, ce] = Y(null), [P, de] = Y(() => /* @__PURE__ */ new Set()), [F, fe] = Y({}), I = $i(e), [L, pe] = Y(null), me = J(null);
4423
+ K(() => pe(null), [M, e]);
4424
+ let he = () => {
4425
+ pe(null), me.current?.focus();
4426
+ }, ge = (e, t) => {
4427
+ me.current = t;
4408
4428
  let r = n?.boards[e], i = v.current;
4409
- if (z !== e && !F && r && i) {
4410
- let e = $i(r, y, {
4429
+ if (L !== e && !N && r && i) {
4430
+ let e = ta(r, y, {
4411
4431
  width: i.clientWidth,
4412
4432
  height: i.clientHeight
4413
4433
  });
4414
4434
  (e.x || e.y) && k(e.x, e.y);
4415
4435
  }
4416
- de((t) => t === e ? null : e);
4417
- }, he = g === "select" && !F && !j, B = g === "comment", H = Jr({
4418
- enabled: !F && (g === "select" || B || M),
4419
- mode: B ? "comment" : "select",
4420
- playing: I,
4436
+ pe((t) => t === e ? null : e);
4437
+ }, _e = g === "select" && !N && !j, R = g === "comment", z = Xr({
4438
+ enabled: !N && (g === "select" || R || te),
4439
+ mode: R ? "comment" : "select",
4440
+ playing: P,
4421
4441
  onInput: (e, t) => {
4422
4442
  let r = n?.boards[e];
4423
4443
  r && (t.type === "ryugi:inspect:wheel" ? A({
4424
4444
  ...t,
4425
4445
  x: y.x + (r.x + t.x) * y.k,
4426
4446
  y: y.y + (r.y + t.y) * y.k
4427
- }) : t.type === "ryugi:inspect:pan" ? k(t.deltaX, t.deltaY) : t.type === "ryugi:inspect:drag" ? B ? U.onFrameDrag(e, t) : he && W.drag(t.phase, r.x + t.x, r.y + t.y, t.append, t.id ? {
4447
+ }) : t.type === "ryugi:inspect:pan" ? k(t.deltaX, t.deltaY) : t.type === "ryugi:inspect:drag" ? R ? V.onFrameDrag(e, t) : _e && U.drag(t.phase, r.x + t.x, r.y + t.y, t.append, t.id ? {
4428
4448
  boardId: e,
4429
4449
  id: t.id
4430
- } : void 0) : t.code === "Space" ? ee(t.down) : t.down && we(t));
4450
+ } : void 0) : t.code === "Space" ? ee(t.down) : t.down && Te(t));
4431
4451
  }
4432
4452
  });
4433
- ti({
4453
+ ri({
4434
4454
  artifact: t,
4435
4455
  boards: n?.boards,
4436
- live: l,
4437
- inspector: H,
4456
+ live: c,
4457
+ inspector: z,
4438
4458
  send: d
4439
4459
  });
4440
- let U = sr({
4460
+ let V = cr({
4441
4461
  comments: p,
4442
4462
  comment: m,
4443
- page: N,
4463
+ page: M,
4444
4464
  boards: n?.boards ?? {},
4445
- inspector: H
4446
- }), ge = Pr({
4465
+ inspector: z
4466
+ }), H = Ir({
4447
4467
  canvas: n,
4448
- page: N,
4449
- threads: U.threads,
4450
- stale: U.stale,
4451
- versions: c,
4468
+ page: M,
4469
+ threads: V.threads,
4470
+ stale: V.stale,
4471
+ versions: s,
4452
4472
  comment: m
4453
- }), _e = ge.rejecting ? ge.origin(ge.rejecting) : null, ve = () => {
4454
- let e = ge.progress.next && N ? r?.pages[N]?.groups[ge.progress.next] : void 0;
4473
+ }), ve = H.rejecting ? H.origin(H.rejecting) : null, ye = () => {
4474
+ let e = H.progress.next && M ? r?.pages[M]?.groups[H.progress.next] : void 0;
4455
4475
  e && S({
4456
4476
  minX: e.x,
4457
4477
  minY: e.y,
4458
4478
  maxX: e.x + e.w,
4459
4479
  maxY: e.y + e.h
4460
4480
  });
4461
- }, ye = (e) => {
4462
- (e !== "comment" || m) && (e === "comment" && g === "select" && U.commentSelection(), e !== "comment" && U.close(), _(e));
4463
4481
  }, be = (e) => {
4464
- let t = U.threads.find((t) => t.id === e), r = t && an(t.anchor, n?.boards ?? {}), i = v.current;
4465
- r && i && k(i.clientWidth / 2 - (y.x + r.x * y.k), i.clientHeight / 2 - (y.y + r.y * y.k)), U.setOpenId(e);
4466
- }, xe = G(() => te(!1), []);
4482
+ (e !== "comment" || m) && (e === "comment" && g === "select" && V.commentSelection(), e !== "comment" && V.close(), _(e));
4483
+ }, xe = (e) => {
4484
+ let t = V.threads.find((t) => t.id === e), r = t && on(t.anchor, n?.boards ?? {}), i = v.current;
4485
+ r && i && k(i.clientWidth / 2 - (y.x + r.x * y.k), i.clientHeight / 2 - (y.y + r.y * y.k)), V.setOpenId(e);
4486
+ }, Se = G(() => ne(!1), []);
4467
4487
  K(() => {
4468
- F && ee(!1);
4469
- }, [F, ee]);
4470
- let Se = q(() => new Set(a), [a]), Ce = n?.pages ?? [];
4488
+ N && ee(!1);
4489
+ }, [N, ee]);
4490
+ let Ce = q(() => new Set(a), [a]), we = n?.pages ?? [];
4471
4491
  K(() => {
4472
4492
  document.title = n?.title || e;
4473
- }, [n?.title, e]), E("artboard");
4474
- function we(e) {
4493
+ }, [n?.title, e]), D("artboard");
4494
+ function Te(e) {
4475
4495
  if ("target" in e && e.target?.closest?.("input, textarea, select, [contenteditable], [role=\"tree\"], [role=\"treeitem\"], [data-chrome=\"parameters\"]")) return;
4476
4496
  let t = () => {
4477
4497
  "preventDefault" in e && e.preventDefault();
4478
4498
  }, n = e.metaKey || e.ctrlKey;
4479
- e.key === "Escape" && B ? U.close() || ye("select") : e.key === "Escape" ? z ? pe() : (ce(null), H.clearSelection(), W.reset()) : n && (e.key === "=" || e.key === "+") ? (t(), C(1.25)) : n && e.key === "-" ? (t(), C(.8)) : e.shiftKey && e.code === "Digit1" ? S(ae(N)) : e.shiftKey && e.code === "Digit0" ? w(1) : !n && !e.shiftKey && e.key.toLowerCase() === "v" ? ye("select") : !n && !e.shiftKey && e.key.toLowerCase() === "h" ? ye("hand") : !n && !e.shiftKey && e.key.toLowerCase() === "c" && (t(), ye("comment"));
4499
+ e.key === "Escape" && R ? V.close() || be("select") : e.key === "Escape" ? L ? he() : (ce(null), z.clearSelection(), U.reset()) : n && (e.key === "=" || e.key === "+") ? (t(), C(1.25)) : n && e.key === "-" ? (t(), C(.8)) : e.shiftKey && e.code === "Digit1" ? S(oe(M)) : e.shiftKey && e.code === "Digit0" ? w(1) : !n && !e.shiftKey && e.key.toLowerCase() === "v" ? be("select") : !n && !e.shiftKey && e.key.toLowerCase() === "h" ? be("hand") : !n && !e.shiftKey && e.key.toLowerCase() === "c" && (t(), be("comment"));
4480
4500
  }
4481
- K(() => (window.addEventListener("keydown", we), () => window.removeEventListener("keydown", we)));
4482
- let Te = n?.boards ?? {}, Ee = q(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === N), [n, N]), De = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => Te[e]?.page === N)), Oe = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === N), ke = F ? Te[F] : void 0, Ae = Object.fromEntries(Object.entries(R.states).flatMap(([e, t]) => {
4501
+ K(() => (window.addEventListener("keydown", Te), () => window.removeEventListener("keydown", Te)));
4502
+ let Ee = n?.boards ?? {}, De = q(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === M), [n, M]), Oe = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => Ee[e]?.page === M)), ke = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === M), Ae = N ? Ee[N] : void 0, je = Object.fromEntries(Object.entries(I.states).flatMap(([e, t]) => {
4483
4503
  let n = Object.keys(t.schema?.controls ?? {}).length;
4484
4504
  return n || t.error ? [[e, n]] : [];
4485
- })), je = z ? R.states[z] : void 0, Me = z ? Te[z] : void 0, Ne = (e) => z && je && Me && (je.schema || je.error) ? /* @__PURE__ */ Z(ta, {
4486
- boardId: z,
4487
- title: Me.title ?? z,
4488
- state: je,
4489
- anchor: e ? Qi(Me, y) : void 0,
4490
- onChange: (e, t) => R.change(z, e, t),
4491
- onReset: () => R.reset(z),
4492
- onClose: pe
4493
- }) : null, Pe = ke ? (c[ke.file] ?? 0) > 0 && !Se.has(F) : !1, W = Yr(Ee, H, y.k, [
4505
+ })), Me = L ? I.states[L] : void 0, Ne = L ? Ee[L] : void 0, Pe = (e) => L && Me && Ne && (Me.schema || Me.error) ? /* @__PURE__ */ Z(ra, {
4506
+ boardId: L,
4507
+ title: Ne.title ?? L,
4508
+ state: Me,
4509
+ anchor: e ? ea(Ne, y) : void 0,
4510
+ onChange: (e, t) => I.change(L, e, t),
4511
+ onReset: () => I.reset(L),
4512
+ onClose: he
4513
+ }) : null, Fe = Ae ? (s[Ae.file] ?? 0) > 0 && !Ce.has(N) : !1, U = Zr(De, z, y.k, [
4494
4514
  g,
4495
- F,
4496
4515
  N,
4516
+ M,
4497
4517
  j
4498
- ]), Fe = (e) => {
4518
+ ]), Ie = (e) => {
4499
4519
  let t = v.current.getBoundingClientRect();
4500
4520
  return {
4501
4521
  x: (e.clientX - t.left - y.x) / y.k,
4502
4522
  y: (e.clientY - t.top - y.y) / y.k
4503
4523
  };
4504
- }, [Ie, Le] = Y(null), Re = (e) => Ee.find(([, t]) => e.x >= t.x && e.x <= t.x + t.w && e.y >= t.y && e.y <= t.y + t.h)?.[0] ?? null, ze = W.marquee, Be = q(() => /* @__PURE__ */ new Set([
4505
- ...I,
4506
- ...[F, z].filter((e) => !!e),
4507
- ...H.selectedTargets.map((e) => e.boardId),
4508
- ...Object.entries(H.frames).filter(([, e]) => e.tweaks.length > 0).map(([e]) => e),
4509
- ...ze ? Ee.filter(([, e]) => e.x < ze.x + ze.width && e.x + e.w > ze.x && e.y < ze.y + ze.height && e.y + e.h > ze.y).map(([e]) => e) : []
4524
+ }, [Le, Re] = Y(null), ze = (e) => De.find(([, t]) => e.x >= t.x && e.x <= t.x + t.w && e.y >= t.y && e.y <= t.y + t.h)?.[0] ?? null, W = U.marquee, Be = q(() => /* @__PURE__ */ new Set([
4525
+ ...P,
4526
+ ...[N, L].filter((e) => !!e),
4527
+ ...z.selectedTargets.map((e) => e.boardId),
4528
+ ...Object.entries(z.frames).filter(([, e]) => e.tweaks.length > 0).map(([e]) => e),
4529
+ ...W ? De.filter(([, e]) => e.x < W.x + W.width && e.x + e.w > W.x && e.y < W.y + W.height && e.y + e.h > W.y).map(([e]) => e) : []
4510
4530
  ]), [
4511
- I,
4512
- F,
4513
- z,
4514
- H.selectedTargets,
4515
- H.frames,
4516
- ze,
4517
- Ee
4518
- ]), Ve = kr({
4531
+ P,
4532
+ N,
4533
+ L,
4534
+ z.selectedTargets,
4535
+ z.frames,
4536
+ W,
4537
+ De
4538
+ ]), Ve = jr({
4519
4539
  artifact: t ?? e,
4520
- boards: Ee,
4521
- versions: c,
4522
- pending: Se,
4540
+ boards: De,
4541
+ versions: s,
4542
+ pending: Ce,
4523
4543
  view: y,
4524
4544
  scaling: b,
4525
4545
  viewport: x,
4526
4546
  pinned: Be,
4527
- hovered: H.hover?.boardId ?? Ie,
4528
- hoverPromotes: g === "select" || B,
4547
+ hovered: z.hover?.boardId ?? Le,
4548
+ hoverPromotes: g === "select" || R,
4529
4549
  persistable: (e) => {
4530
- let t = R.states[e];
4531
- return !(t?.schema && JSON.stringify(t.values) !== JSON.stringify($t(t.schema))) && !H.frames[e]?.tweaks.length;
4550
+ let t = I.states[e];
4551
+ return !(t?.schema && JSON.stringify(t.values) !== JSON.stringify(en(t.schema))) && !z.frames[e]?.tweaks.length;
4532
4552
  }
4533
4553
  }), He = q(() => {
4534
4554
  let e = /* @__PURE__ */ new Map();
4535
4555
  return (t) => (e.has(t) || e.set(t, (e) => {
4536
- R.refFor(t)(e), H.refFor(t)(e), Ve.frameRef(t)(e);
4556
+ I.refFor(t)(e), z.refFor(t)(e), Ve.frameRef(t)(e);
4537
4557
  }), e.get(t));
4538
4558
  }, [
4539
- R.refFor,
4540
- H.refFor,
4559
+ I.refFor,
4560
+ z.refFor,
4541
4561
  Ve.frameRef
4542
4562
  ]), Ue = G((e) => {
4543
- R.loaded(e), H.loaded(e), Ve.loaded(e);
4563
+ I.loaded(e), z.loaded(e), Ve.loaded(e);
4544
4564
  }, [
4545
- R.loaded,
4546
- H.loaded,
4565
+ I.loaded,
4566
+ z.loaded,
4547
4567
  Ve.loaded
4548
4568
  ]);
4549
4569
  return /* @__PURE__ */ Q("div", {
@@ -4554,213 +4574,213 @@ function ra({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: a,
4554
4574
  className: "x98rzlu xeuugli x1n2onr6 xh8yej3 x5yr21d xb3r6kr x5ve5x3 x87ps6o x184qs1t xqfszdh xo2rkog",
4555
4575
  style: { cursor: T },
4556
4576
  onClickCapture: (e) => {
4557
- !F && (B || j) && e.target.closest("[data-video-surface]") && e.stopPropagation();
4577
+ !N && (R || j) && e.target.closest("[data-video-surface]") && e.stopPropagation();
4558
4578
  },
4559
4579
  onPointerDown: (e) => {
4560
- if (O.onPointerDown(e), B && !j && !F && e.button === 0 && e.pointerType !== "touch" && e.currentTarget.contains(e.target) && !e.target.closest("[data-chrome]") && (e.preventDefault(), U.onCanvasClick(Fe(e))), !he || e.pointerType === "touch" || e.button !== 0 || !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome], [data-video-surface]")) return;
4561
- let t = Fe(e);
4562
- e.currentTarget.setPointerCapture(e.pointerId), W.drag("start", t.x, t.y, e.shiftKey || e.metaKey || e.ctrlKey);
4580
+ if (O.onPointerDown(e), R && !j && !N && e.button === 0 && e.pointerType !== "touch" && e.currentTarget.contains(e.target) && !e.target.closest("[data-chrome]") && (e.preventDefault(), V.onCanvasClick(Ie(e))), !_e || e.pointerType === "touch" || e.button !== 0 || !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome], [data-video-surface]")) return;
4581
+ let t = Ie(e);
4582
+ e.currentTarget.setPointerCapture(e.pointerId), U.drag("start", t.x, t.y, e.shiftKey || e.metaKey || e.ctrlKey);
4563
4583
  },
4564
4584
  onPointerMove: (e) => {
4565
- if (O.onPointerMove(e), Le(Re(Fe(e))), W.dragging()) {
4585
+ if (O.onPointerMove(e), Re(ze(Ie(e))), U.dragging()) {
4566
4586
  e.buttons === 1 && e.currentTarget.setPointerCapture(e.pointerId);
4567
- let t = Fe(e);
4568
- W.drag("move", t.x, t.y);
4587
+ let t = Ie(e);
4588
+ U.drag("move", t.x, t.y);
4569
4589
  }
4570
4590
  },
4571
4591
  onPointerUp: (e) => {
4572
- if (O.onPointerUp(e), W.dragging()) {
4573
- let t = Fe(e);
4574
- W.drag("end", t.x, t.y);
4592
+ if (O.onPointerUp(e), U.dragging()) {
4593
+ let t = Ie(e);
4594
+ U.drag("end", t.x, t.y);
4575
4595
  }
4576
4596
  },
4577
4597
  onPointerCancel: (e) => {
4578
- O.onPointerCancel(e), W.reset();
4598
+ O.onPointerCancel(e), U.reset();
4579
4599
  },
4580
4600
  children: [
4581
- /* @__PURE__ */ Z(Vn, {
4601
+ /* @__PURE__ */ Z(Hn, {
4582
4602
  viewport: v,
4583
- hand: D
4603
+ hand: E
4584
4604
  }),
4585
- ne && /* @__PURE__ */ Z(wn, {
4605
+ re && /* @__PURE__ */ Z(Tn, {
4586
4606
  renders: Ve.renders,
4587
4607
  scaling: b
4588
4608
  }),
4589
- n && r && /* @__PURE__ */ Q(s, {
4609
+ n && r && /* @__PURE__ */ Q(u, {
4590
4610
  resetKey: n,
4591
4611
  children: [
4592
- /* @__PURE__ */ Z(se, {
4612
+ /* @__PURE__ */ Z(ue, {
4593
4613
  view: y,
4594
4614
  renders: Ve.renders,
4595
- boards: Ee,
4596
- notes: Oe,
4615
+ boards: De,
4616
+ notes: ke,
4597
4617
  contentBase: o,
4598
- versions: c,
4599
- pending: Se,
4600
- playing: I,
4601
- replays: le,
4602
- inspecting: he || B && !F && !j,
4618
+ versions: s,
4619
+ pending: Ce,
4620
+ playing: P,
4621
+ replays: F,
4622
+ inspecting: _e || R && !N && !j,
4603
4623
  frameRef: He,
4604
4624
  frameLoaded: Ue,
4605
- live: l,
4606
- writing: l ? n.writing : void 0,
4625
+ live: c,
4626
+ writing: c ? n.writing : void 0,
4607
4627
  agent: f,
4608
4628
  onExpand: ce,
4609
4629
  onImageError: Ve.imageFailed
4610
4630
  }),
4611
- /* @__PURE__ */ Z(Zn, {
4631
+ /* @__PURE__ */ Z(Qn, {
4612
4632
  view: y,
4613
- boards: Ee,
4614
- groups: De,
4615
- allBoards: Te,
4633
+ boards: De,
4634
+ groups: Oe,
4635
+ allBoards: Ee,
4616
4636
  contentBase: o,
4617
- versions: c,
4618
- pending: Se,
4619
- playing: I,
4637
+ versions: s,
4638
+ pending: Ce,
4639
+ playing: P,
4620
4640
  onExpand: ce,
4621
- onTogglePlay: (e) => L((t) => oe(t, e)),
4622
- onReplay: (e) => ue((t) => ({
4641
+ onTogglePlay: (e) => de((t) => le(t, e)),
4642
+ onReplay: (e) => fe((t) => ({
4623
4643
  ...t,
4624
4644
  [e]: (t[e] ?? 0) + 1
4625
4645
  })),
4626
- parameters: Ae,
4627
- activeParameters: z,
4628
- onToggleParameters: me,
4629
- verdicts: ge
4646
+ parameters: je,
4647
+ activeParameters: L,
4648
+ onToggleParameters: ge,
4649
+ verdicts: H
4630
4650
  }),
4631
- ge.rejecting && _e && /* @__PURE__ */ Z(Fr, {
4632
- group: ge.rejecting,
4633
- left: y.x + _e.x * y.k,
4634
- top: y.y + _e.y * y.k + 8,
4635
- onSubmit: ge.submitReject,
4636
- onCancel: ge.cancelReject
4651
+ H.rejecting && ve && /* @__PURE__ */ Z(Lr, {
4652
+ group: H.rejecting,
4653
+ left: y.x + ve.x * y.k,
4654
+ top: y.y + ve.y * y.k + 8,
4655
+ onSubmit: H.submitReject,
4656
+ onCancel: H.cancelReject
4637
4657
  }),
4638
- B && /* @__PURE__ */ Z(_n, {
4658
+ R && /* @__PURE__ */ Z(vn, {
4639
4659
  view: y,
4640
- page: N,
4641
- boards: Te,
4660
+ page: M,
4661
+ boards: Ee,
4642
4662
  width: v.current?.clientWidth ?? 0,
4643
- threads: U.threads,
4644
- stale: U.stale,
4645
- numbers: U.numbers,
4646
- showResolved: re === "all",
4647
- draft: U.draft,
4648
- openId: U.openId,
4649
- actions: U.actions,
4663
+ threads: V.threads,
4664
+ stale: V.stale,
4665
+ numbers: V.numbers,
4666
+ showResolved: ie === "all",
4667
+ draft: V.draft,
4668
+ openId: V.openId,
4669
+ actions: V.actions,
4650
4670
  agent: f,
4651
- onOpen: U.setOpenId,
4652
- onSubmit: U.submit,
4653
- onCancelDraft: U.cancelDraft
4671
+ onOpen: V.setOpenId,
4672
+ onSubmit: V.submit,
4673
+ onCancelDraft: V.cancelDraft
4654
4674
  })
4655
4675
  ]
4656
4676
  }),
4657
- (he || B) && !W.marquee && H.hover && Te[H.hover.boardId] && /* @__PURE__ */ Z(fi, {
4658
- board: Te[H.hover.boardId],
4659
- rect: H.hover.rect,
4677
+ (_e || R) && !U.marquee && z.hover && Ee[z.hover.boardId] && /* @__PURE__ */ Z(mi, {
4678
+ board: Ee[z.hover.boardId],
4679
+ rect: z.hover.rect,
4660
4680
  view: y,
4661
- nodeId: H.hover.id ? `${H.hover.boardId}#${H.hover.id}` : void 0
4681
+ nodeId: z.hover.id ? `${z.hover.boardId}#${z.hover.id}` : void 0
4662
4682
  }),
4663
- !F && H.targets.map((e) => Te[e.boardId] && /* @__PURE__ */ Z(fi, {
4664
- board: Te[e.boardId],
4683
+ !N && z.targets.map((e) => Ee[e.boardId] && /* @__PURE__ */ Z(mi, {
4684
+ board: Ee[e.boardId],
4665
4685
  rect: e.rect,
4666
4686
  view: y,
4667
4687
  name: e.name,
4668
4688
  selected: !0
4669
4689
  }, `${e.boardId}:${e.id}`)),
4670
- W.selecting && /* @__PURE__ */ Z("div", {
4690
+ U.selecting && /* @__PURE__ */ Z("div", {
4671
4691
  className: "ri-selection-capture",
4672
4692
  "aria-hidden": "true"
4673
4693
  }),
4674
- W.marquee && /* @__PURE__ */ Z("div", {
4694
+ U.marquee && /* @__PURE__ */ Z("div", {
4675
4695
  className: "ri-marquee",
4676
4696
  "aria-hidden": "true",
4677
4697
  style: {
4678
- left: y.x + W.marquee.x * y.k,
4679
- top: y.y + W.marquee.y * y.k,
4680
- width: W.marquee.width * y.k,
4681
- height: W.marquee.height * y.k
4698
+ left: y.x + U.marquee.x * y.k,
4699
+ top: y.y + U.marquee.y * y.k,
4700
+ width: U.marquee.width * y.k,
4701
+ height: U.marquee.height * y.k
4682
4702
  }
4683
4703
  }),
4684
4704
  (!n || !r) && /* @__PURE__ */ Z("div", {
4685
4705
  className: "x10l6tqk x10a8y8t x78zum5 x6s0dn4 xl56j7k xggk2y7 x1bo0w0s xif65rj x2b8uid x47corl",
4686
- children: u ? i[0] ?? V("chrome.waitingCanvas") : V("common.connecting")
4706
+ children: l ? i[0] ?? B("chrome.waitingCanvas") : B("common.connecting")
4687
4707
  }),
4688
- /* @__PURE__ */ Z(Qn, {
4689
- pages: Ce,
4690
- page: N,
4691
- onPageChange: P,
4708
+ /* @__PURE__ */ Z($n, {
4709
+ pages: we,
4710
+ page: M,
4711
+ onPageChange: se,
4692
4712
  tool: g,
4693
- onToolChange: ye,
4713
+ onToolChange: be,
4694
4714
  commenting: !!m
4695
4715
  }),
4696
- /* @__PURE__ */ Z($n, {
4716
+ /* @__PURE__ */ Z(er, {
4697
4717
  actions: h,
4698
- live: l,
4718
+ live: c,
4699
4719
  warnings: i,
4700
4720
  zoom: y.k,
4701
4721
  onZoomIn: () => C(1.25),
4702
4722
  onZoomOut: () => C(.8),
4703
- onFit: () => S(ae(N)),
4723
+ onFit: () => S(oe(M)),
4704
4724
  onActualSize: () => w(1),
4705
- inspectorOpen: M,
4706
- onToggleInspector: () => te((e) => !e),
4707
- verify: ge.progress,
4708
- onNextVerify: ve
4725
+ inspectorOpen: te,
4726
+ onToggleInspector: () => ne((e) => !e),
4727
+ verify: H.progress,
4728
+ onNextVerify: ye
4709
4729
  }),
4710
- !F && Ne(!0),
4711
- F && ke && Pe && /* @__PURE__ */ Z(Tn, {
4712
- id: F,
4713
- board: ke,
4714
- src: `${o}${ke.file}?v=${c[ke.file] ?? 0}`,
4715
- interactive: ke.interactive === !0,
4730
+ !N && Pe(!0),
4731
+ N && Ae && Fe && /* @__PURE__ */ Z(En, {
4732
+ id: N,
4733
+ board: Ae,
4734
+ src: `${o}${Ae.file}?v=${s[Ae.file] ?? 0}`,
4735
+ interactive: Ae.interactive === !0,
4716
4736
  onClose: () => ce(null),
4717
- frameRef: R.refFor(F, "expanded"),
4718
- onFrameLoad: () => R.loaded(F, "expanded"),
4719
- parameterAction: Ae[F] === void 0 ? void 0 : /* @__PURE__ */ Z(et, {
4737
+ frameRef: I.refFor(N, "expanded"),
4738
+ onFrameLoad: () => I.loaded(N, "expanded"),
4739
+ parameterAction: je[N] === void 0 ? void 0 : /* @__PURE__ */ Z(tt, {
4720
4740
  config: { "aria-hidden": !0 },
4721
- children: /* @__PURE__ */ Z(Xe, {
4722
- icon: Gt,
4741
+ children: /* @__PURE__ */ Z(Ze, {
4742
+ icon: Kt,
4723
4743
  size: "small",
4724
4744
  type: "text",
4725
- "aria-expanded": z === F,
4726
- onClick: (e) => me(F, e.currentTarget),
4727
- children: V("chrome.parameters")
4745
+ "aria-expanded": L === N,
4746
+ onClick: (e) => ge(N, e.currentTarget),
4747
+ children: B("chrome.parameters")
4728
4748
  })
4729
4749
  }),
4730
- parameters: z === F ? Ne(!1) : void 0
4750
+ parameters: L === N ? Pe(!1) : void 0
4731
4751
  })
4732
4752
  ]
4733
4753
  }),
4734
- B && /* @__PURE__ */ Z(yn, {
4735
- threads: U.threads,
4736
- page: N,
4737
- stale: U.stale,
4738
- numbers: U.numbers,
4739
- openId: U.openId,
4740
- tab: re,
4741
- onTab: ie,
4742
- onOpen: be,
4743
- onClose: () => ye("select")
4754
+ R && /* @__PURE__ */ Z(bn, {
4755
+ threads: V.threads,
4756
+ page: M,
4757
+ stale: V.stale,
4758
+ numbers: V.numbers,
4759
+ openId: V.openId,
4760
+ tab: ie,
4761
+ onTab: ae,
4762
+ onOpen: xe,
4763
+ onClose: () => be("select")
4744
4764
  }),
4745
- M && !B && /* @__PURE__ */ Z(wi, {
4746
- boards: Ee,
4747
- frames: H.frames,
4748
- selection: H.selection,
4749
- targets: H.targets,
4750
- select: H.select,
4751
- hoverNode: H.hoverNode,
4752
- change: H.change,
4753
- reset: H.reset,
4754
- playing: I,
4755
- enabled: !F,
4756
- onClose: xe
4765
+ te && !R && /* @__PURE__ */ Z(Ei, {
4766
+ boards: De,
4767
+ frames: z.frames,
4768
+ selection: z.selection,
4769
+ targets: z.targets,
4770
+ select: z.select,
4771
+ hoverNode: z.hoverNode,
4772
+ change: z.change,
4773
+ reset: z.reset,
4774
+ playing: P,
4775
+ enabled: !N,
4776
+ onClose: Se
4757
4777
  })
4758
4778
  ]
4759
4779
  });
4760
4780
  }
4761
4781
  //#endregion
4762
4782
  //#region src/viewer/hooks/useHtmlData.ts
4763
- function ia(e, { live: t, revision: n, load: r, send: i }) {
4783
+ function oa(e, { live: t, revision: n, load: r, send: i }) {
4764
4784
  let [a, o] = Y(null);
4765
4785
  return K(() => {
4766
4786
  let t = !1;
@@ -4789,12 +4809,12 @@ function ia(e, { live: t, revision: n, load: r, send: i }) {
4789
4809
  }
4790
4810
  //#endregion
4791
4811
  //#region src/viewer/layouts/HtmlView.tsx
4792
- function aa({ id: e, feed: t, actions: n }) {
4793
- let { data: r, send: i } = ia(e, t);
4812
+ function sa({ id: e, feed: t, actions: n }) {
4813
+ let { data: r, send: i } = oa(e, t);
4794
4814
  K(() => {
4795
4815
  document.title = r?.title || e;
4796
- }, [r?.title, e]), E("html");
4797
- let a = r?.found && !r.warnings.includes("index.html not found"), o = a ? `${r.contentBase}index.html?v=${r.version}` : null, { frameRef: s, src: c, onLoad: l } = Pe(o, {
4816
+ }, [r?.title, e]), D("html");
4817
+ let a = r?.found && !r.warnings.includes("index.html not found"), o = a ? `${r.contentBase}index.html?v=${r.version}` : null, { frameRef: s, src: c, onLoad: l } = U(o, {
4798
4818
  onError: (t) => i({
4799
4819
  type: "runtime-error",
4800
4820
  artifact: `html/${e}`,
@@ -4816,7 +4836,7 @@ function aa({ id: e, feed: t, actions: n }) {
4816
4836
  ref: s,
4817
4837
  title: r.title,
4818
4838
  src: c,
4819
- sandbox: we,
4839
+ sandbox: Ee,
4820
4840
  allow: "clipboard-write",
4821
4841
  onLoad: l,
4822
4842
  className: "x1lliihq xh8yej3 x5yr21d xc342km"
@@ -4825,18 +4845,18 @@ function aa({ id: e, feed: t, actions: n }) {
4825
4845
  children: r ? r.warnings[0] ?? "Waiting for the agent to write index.html…" : "Connecting…"
4826
4846
  }),
4827
4847
  n,
4828
- /* @__PURE__ */ Z(j, { warnings: r?.warnings ?? [] })
4848
+ /* @__PURE__ */ Z(ee, { warnings: r?.warnings ?? [] })
4829
4849
  ]
4830
4850
  });
4831
4851
  }
4832
4852
  //#endregion
4833
4853
  //#region src/viewer/components/TypeIcon.tsx
4834
- function oa({ type: e, size: t = 16 }) {
4835
- let { fill: n, stroke: r } = M[e];
4854
+ function ca({ type: e, size: t = 16 }) {
4855
+ let { fill: n, stroke: r } = ne[e];
4836
4856
  return /* @__PURE__ */ Q("svg", {
4837
4857
  width: t,
4838
4858
  height: t,
4839
- viewBox: A,
4859
+ viewBox: j,
4840
4860
  "aria-hidden": "true",
4841
4861
  style: {
4842
4862
  flex: "none",
@@ -4857,12 +4877,12 @@ function oa({ type: e, size: t = 16 }) {
4857
4877
  }
4858
4878
  //#endregion
4859
4879
  //#region src/viewer/components/ArtifactThumbnail.tsx
4860
- function sa({ src: e, type: t }) {
4880
+ function la({ src: e, type: t }) {
4861
4881
  let [n, r] = Y(null);
4862
4882
  return /* @__PURE__ */ Q("div", {
4863
4883
  className: "library-thumbnail",
4864
4884
  "aria-hidden": "true",
4865
- children: [/* @__PURE__ */ Z(oa, {
4885
+ children: [/* @__PURE__ */ Z(ca, {
4866
4886
  type: t,
4867
4887
  size: 24
4868
4888
  }), e && n !== e && /* @__PURE__ */ Z("img", {
@@ -4879,7 +4899,7 @@ function sa({ src: e, type: t }) {
4879
4899
  }
4880
4900
  //#endregion
4881
4901
  //#region src/viewer/components/PublicationStatus.tsx
4882
- var ca = {
4902
+ var ua = {
4883
4903
  summary: {
4884
4904
  k1xSpc: "x3nfvp2",
4885
4905
  kGNEyG: "x6s0dn4",
@@ -4911,8 +4931,8 @@ var ca = {
4911
4931
  $$css: !0
4912
4932
  }
4913
4933
  };
4914
- function la({ publication: e, published: t, publishedAt: n, online: r, onPublish: i, compact: a = !1, busy: o = !1 }) {
4915
- let { t: s, i18n: c } = L(), l = Yt(), u = e?.phase ?? (t ? "published" : "waiting"), d = t && u !== "published", f = ue(u), p = s(`publication.${d ? `update_${u}` : u}`), m = f ? It : u === "failed" ? Ct : u === "published" ? vt : wt, h = u === "failed" ? ca.failed : u === "published" ? ca.success : void 0, g = /* @__PURE__ */ Z($e, {
4934
+ function da({ publication: e, published: t, publishedAt: n, online: r, onPublish: i, compact: a = !1, busy: o = !1 }) {
4935
+ let { t: s, i18n: c } = F(), l = Xt(), u = e?.phase ?? (t ? "published" : "waiting"), d = t && u !== "published", f = I(u), p = s(`publication.${d ? `update_${u}` : u}`), m = f ? Lt : u === "failed" ? wt : u === "published" ? yt : Tt, h = u === "failed" ? ua.failed : u === "published" ? ua.success : void 0, g = /* @__PURE__ */ Z(et, {
4916
4936
  icon: m,
4917
4937
  spin: f && !l,
4918
4938
  size: a ? 14 : 16,
@@ -4920,13 +4940,13 @@ function la({ publication: e, published: t, publishedAt: n, online: r, onPublish
4920
4940
  });
4921
4941
  if (a) return /* @__PURE__ */ Q("span", {
4922
4942
  role: "status",
4923
- ...D(ca.summary, h),
4943
+ ...O(ua.summary, h),
4924
4944
  children: [g, p]
4925
4945
  });
4926
4946
  let _ = e?.publishedAt ?? n, v = i && !f && u !== "published" && u !== "not-ready";
4927
4947
  return /* @__PURE__ */ Q("section", {
4928
4948
  "aria-label": s("publication.label"),
4929
- ...D(ca.card, h),
4949
+ ...O(ua.card, h),
4930
4950
  children: [
4931
4951
  /* @__PURE__ */ Q("div", {
4932
4952
  role: "status",
@@ -4951,7 +4971,7 @@ function la({ publication: e, published: t, publishedAt: n, online: r, onPublish
4951
4971
  disabled: o,
4952
4972
  onClick: i,
4953
4973
  className: "x78zum5 x6s0dn4 xl56j7k x17d4w8g x1rz828m x36usyh xc342km x1sxf85j x19ckca5 xs0jrwl xln7xf2 xfifm61 x1ypdohk",
4954
- children: [/* @__PURE__ */ Z(Tt, {
4974
+ children: [/* @__PURE__ */ Z(Et, {
4955
4975
  size: 14,
4956
4976
  "aria-hidden": "true"
4957
4977
  }), s(u === "failed" ? "publication.retry" : "publication.publishNow")]
@@ -4972,14 +4992,14 @@ function la({ publication: e, published: t, publishedAt: n, online: r, onPublish
4972
4992
  }
4973
4993
  //#endregion
4974
4994
  //#region src/shared/brand.ts
4975
- var ua = "0 0 512 512", da = "<g transform=\"translate(82 136.317460) scale(0.613756614)\"><g transform=\"translate(0.000000,390.000000) scale(0.100000,-0.100000)\" stroke=\"none\"><path d=\"M4945 3889 c-339 -44 -682 -239 -905 -517 -139 -172 -232 -355 -365 -717 -136 -368 -285 -735 -360 -890 -219 -449 -524 -768 -849 -887 -121 -44 -215 -60 -356 -60 -162 0 -244 18 -450 97 -291 111 -420 144 -650 166 -257 24 -637 -19 -772 -87 -148 -75 -249 -247 -235 -399 19 -197 186 -344 392 -346 40 -1 127 11 205 27 115 23 160 28 300 28 242 1 372 -29 671 -155 226 -95 467 -149 662 -149 252 0 548 74 789 197 394 201 708 521 988 1008 83 144 271 529 405 830 220 493 300 632 436 759 121 112 226 162 424 201 44 9 108 29 143 45 165 77 274 285 244 467 -31 188 -168 334 -354 378 -70 16 -249 18 -363 4z M765 3139 c-202 -11 -415 -48 -497 -86 -91 -44 -151 -101 -193 -186 -123 -248 31 -525 307 -554 38 -4 99 3 204 23 137 27 167 29 384 29 205 0 249 -3 347 -23 225 -45 387 -106 658 -247 182 -94 308 -144 463 -182 138 -35 350 -39 447 -9 174 53 275 152 305 299 26 130 -40 267 -158 323 -52 25 -72 28 -227 35 -248 11 -328 37 -576 187 -232 140 -384 213 -585 281 -283 95 -541 127 -879 110z M620 2104 c-273 -32 -384 -65 -471 -143 -235 -208 -136 -589 172 -660 68 -16 129 -13 272 14 400 73 702 31 1167 -163 239 -99 350 -125 535 -125 193 0 338 51 448 157 117 113 139 261 56 375 -50 69 -99 85 -294 92 -245 10 -332 35 -563 163 -224 123 -456 211 -693 262 -111 23 -149 26 -359 29 -129 2 -251 1 -270 -1z\"/></g></g>";
4995
+ var fa = "0 0 512 512", pa = "<g transform=\"translate(82 136.317460) scale(0.613756614)\"><g transform=\"translate(0.000000,390.000000) scale(0.100000,-0.100000)\" stroke=\"none\"><path d=\"M4945 3889 c-339 -44 -682 -239 -905 -517 -139 -172 -232 -355 -365 -717 -136 -368 -285 -735 -360 -890 -219 -449 -524 -768 -849 -887 -121 -44 -215 -60 -356 -60 -162 0 -244 18 -450 97 -291 111 -420 144 -650 166 -257 24 -637 -19 -772 -87 -148 -75 -249 -247 -235 -399 19 -197 186 -344 392 -346 40 -1 127 11 205 27 115 23 160 28 300 28 242 1 372 -29 671 -155 226 -95 467 -149 662 -149 252 0 548 74 789 197 394 201 708 521 988 1008 83 144 271 529 405 830 220 493 300 632 436 759 121 112 226 162 424 201 44 9 108 29 143 45 165 77 274 285 244 467 -31 188 -168 334 -354 378 -70 16 -249 18 -363 4z M765 3139 c-202 -11 -415 -48 -497 -86 -91 -44 -151 -101 -193 -186 -123 -248 31 -525 307 -554 38 -4 99 3 204 23 137 27 167 29 384 29 205 0 249 -3 347 -23 225 -45 387 -106 658 -247 182 -94 308 -144 463 -182 138 -35 350 -39 447 -9 174 53 275 152 305 299 26 130 -40 267 -158 323 -52 25 -72 28 -227 35 -248 11 -328 37 -576 187 -232 140 -384 213 -585 281 -283 95 -541 127 -879 110z M620 2104 c-273 -32 -384 -65 -471 -143 -235 -208 -136 -589 172 -660 68 -16 129 -13 272 14 400 73 702 31 1167 -163 239 -99 350 -125 535 -125 193 0 338 51 448 157 117 113 139 261 56 375 -50 69 -99 85 -294 92 -245 10 -332 35 -563 163 -224 123 -456 211 -693 262 -111 23 -149 26 -359 29 -129 2 -251 1 -270 -1z\"/></g></g>";
4976
4996
  //#endregion
4977
4997
  //#region src/viewer/components/RyugiMark.tsx
4978
- function fa({ size: e = 16, color: t }) {
4998
+ function ma({ size: e = 16, color: t }) {
4979
4999
  return /* @__PURE__ */ Z("svg", {
4980
5000
  width: e,
4981
5001
  height: e,
4982
- viewBox: ua,
5002
+ viewBox: fa,
4983
5003
  fill: "currentColor",
4984
5004
  "aria-hidden": "true",
4985
5005
  style: {
@@ -4987,40 +5007,40 @@ function fa({ size: e = 16, color: t }) {
4987
5007
  display: "block",
4988
5008
  color: t
4989
5009
  },
4990
- dangerouslySetInnerHTML: { __html: da }
5010
+ dangerouslySetInnerHTML: { __html: pa }
4991
5011
  });
4992
5012
  }
4993
5013
  //#endregion
4994
5014
  //#region src/viewer/lib/artifact-list.ts
4995
- function pa(e, t = Date.now()) {
4996
- let n = new Intl.RelativeTimeFormat(R.language, { numeric: "always" }), r = Math.floor(Math.max(0, t - e) / 6e4);
4997
- return r === 0 ? R.t("time.justNow") : r < 60 ? n.format(-r, "minute") : r < 1440 ? n.format(-Math.floor(r / 60), "hour") : n.format(-Math.floor(r / 1440), "day");
5015
+ function ha(e, t = Date.now()) {
5016
+ let n = new Intl.RelativeTimeFormat(L.language, { numeric: "always" }), r = Math.floor(Math.max(0, t - e) / 6e4);
5017
+ return r === 0 ? L.t("time.justNow") : r < 60 ? n.format(-r, "minute") : r < 1440 ? n.format(-Math.floor(r / 60), "hour") : n.format(-Math.floor(r / 1440), "day");
4998
5018
  }
4999
5019
  //#endregion
5000
5020
  //#region src/viewer/lib/error-text.ts
5001
- function ma(e, t) {
5002
- return typeof e == "string" && R.exists(`errors.${e}`) ? R.t(`errors.${e}`) : t;
5021
+ function ga(e, t) {
5022
+ return typeof e == "string" && L.exists(`errors.${e}`) ? L.t(`errors.${e}`) : t;
5003
5023
  }
5004
- var ha = (e) => typeof e == "object" && !!e && [
5024
+ var _a = (e) => typeof e == "object" && !!e && [
5005
5025
  "private",
5006
5026
  "public",
5007
5027
  "total",
5008
5028
  "publishes"
5009
5029
  ].includes(e.kind) && typeof e.max == "number";
5010
- function ga({ kind: e, max: t }) {
5011
- return R.t(`planLimit.${e}`, { max: t });
5030
+ function va({ kind: e, max: t }) {
5031
+ return L.t(`planLimit.${e}`, { max: t });
5012
5032
  }
5013
- function _a(e, t) {
5014
- return e.code === "plan_limit" && ha(e.limit) ? ga(e.limit) : ma(e.code, typeof e.error == "string" ? e.error : t);
5033
+ function ya(e, t) {
5034
+ return e.code === "plan_limit" && _a(e.limit) ? va(e.limit) : ga(e.code, typeof e.error == "string" ? e.error : t);
5015
5035
  }
5016
5036
  //#endregion
5017
5037
  //#region src/viewer/lib/version.ts
5018
- var va = "1.40.0", ya = 100, ba = 2e3, xa = 50, Sa = (e, t = ya) => typeof e == "string" && e.length > 0 && e.length <= t, Ca = (e) => typeof e == "number" && Number.isFinite(e), wa = (e) => Ca(e) && e >= 0 && e <= 1;
5019
- function Ta(e) {
5020
- if (!Array.isArray(e) || e.length === 0 || e.length > xa) return null;
5038
+ var ba = "1.41.1", xa = 100, Sa = 2e3, Ca = 50, wa = (e, t = xa) => typeof e == "string" && e.length > 0 && e.length <= t, Ta = (e) => typeof e == "number" && Number.isFinite(e), Ea = (e) => Ta(e) && e >= 0 && e <= 1;
5039
+ function Da(e) {
5040
+ if (!Array.isArray(e) || e.length === 0 || e.length > Ca) return null;
5021
5041
  let t = [];
5022
5042
  for (let n of e) {
5023
- if (!be(n) || !Sa(n.board) || !Sa(n.path, ba)) return null;
5043
+ if (!Se(n) || !wa(n.board) || !wa(n.path, Sa)) return null;
5024
5044
  t.push({
5025
5045
  board: n.board,
5026
5046
  path: n.path
@@ -5028,24 +5048,24 @@ function Ta(e) {
5028
5048
  }
5029
5049
  return t;
5030
5050
  }
5031
- function Ea(e) {
5032
- if (!be(e) || Array.isArray(e)) return null;
5051
+ function Oa(e) {
5052
+ if (!Se(e) || Array.isArray(e)) return null;
5033
5053
  let t = Object.entries(e);
5034
- return t.length > xa || !t.every(([e, t]) => Sa(e) && Sa(t)) ? null : Object.fromEntries(t);
5054
+ return t.length > Ca || !t.every(([e, t]) => wa(e) && wa(t)) ? null : Object.fromEntries(t);
5035
5055
  }
5036
- function Da(e) {
5037
- if (!be(e) || !Sa(e.page) || !Ca(e.x) || !Ca(e.y)) return null;
5056
+ function ka(e) {
5057
+ if (!Se(e) || !wa(e.page) || !Ta(e.x) || !Ta(e.y)) return null;
5038
5058
  let t = {
5039
5059
  page: e.page,
5040
5060
  x: e.x,
5041
5061
  y: e.y
5042
5062
  };
5043
5063
  if (e.board !== void 0) {
5044
- if (!Sa(e.board)) return null;
5064
+ if (!wa(e.board)) return null;
5045
5065
  t.board = e.board;
5046
5066
  }
5047
5067
  if (e.group !== void 0) {
5048
- if (!Sa(e.group)) return null;
5068
+ if (!wa(e.group)) return null;
5049
5069
  t.group = e.group;
5050
5070
  }
5051
5071
  if (e.verdict !== void 0) {
@@ -5053,36 +5073,36 @@ function Da(e) {
5053
5073
  t.verdict = e.verdict;
5054
5074
  }
5055
5075
  if (e.nodes !== void 0) {
5056
- let n = Ta(e.nodes);
5076
+ let n = Da(e.nodes);
5057
5077
  if (!n) return null;
5058
5078
  t.nodes = n;
5059
5079
  }
5060
5080
  if (e.offset !== void 0) {
5061
5081
  let n = e.offset;
5062
- if (!t.nodes || !be(n) || !wa(n.x) || !wa(n.y)) return null;
5082
+ if (!t.nodes || !Se(n) || !Ea(n.x) || !Ea(n.y)) return null;
5063
5083
  t.offset = {
5064
5084
  x: n.x,
5065
5085
  y: n.y
5066
5086
  };
5067
5087
  }
5068
5088
  if (e.hashes !== void 0) {
5069
- let n = Ea(e.hashes);
5089
+ let n = Oa(e.hashes);
5070
5090
  if (!n) return null;
5071
5091
  t.hashes = n;
5072
5092
  }
5073
5093
  return t;
5074
5094
  }
5075
- var Oa = {
5076
- read: Da,
5095
+ var Aa = {
5096
+ read: ka,
5077
5097
  same: (e, t) => e.page === t.page && e.board === t.board && e.group === t.group && e.verdict === t.verdict && e.x === t.x && e.y === t.y,
5078
5098
  missing: "a new thread needs a board anchor (page, x, y); dropped it"
5079
- }, ka = () => ({
5099
+ }, ja = () => ({
5080
5100
  version: 1,
5081
5101
  threads: []
5082
- }), Aa = (e) => ve(e, Oa), ja = (e, t, n, r, i, a) => Ae(e, t, n, r, i, a, Oa);
5083
- function Ma(e, t, n, r, i) {
5084
- if (t.op !== "create") return Ce(e, t, n, r, i);
5085
- let a = H(t.anchor, "human", t.text, n, r, i);
5102
+ }), Ma = (e) => be(e, Aa), Na = (e, t, n, r, i, a) => Me(e, t, n, r, i, a, Aa);
5103
+ function Pa(e, t, n, r, i) {
5104
+ if (t.op !== "create") return Te(e, t, n, r, i);
5105
+ let a = V(t.anchor, "human", t.text, n, r, i);
5086
5106
  if (t.anchor.verdict !== "pass") return {
5087
5107
  ...e,
5088
5108
  threads: [...e.threads, a]
@@ -5103,10 +5123,10 @@ function Ma(e, t, n, r, i) {
5103
5123
  }]
5104
5124
  };
5105
5125
  }
5106
- function Na(e, t, n, r, i) {
5126
+ function Fa(e, t, n, r, i) {
5107
5127
  if (t.op === "resolve" && e.threads.find((e) => e.id === t.threadId)?.anchor.verdict === "reject") throw Error("a reject closes only when your human partner passes the group");
5108
5128
  if (t.op === "add") {
5109
- let a = H(t.anchor, "agent", t.text, n, r, { name: i });
5129
+ let a = V(t.anchor, "agent", t.text, n, r, { name: i });
5110
5130
  return {
5111
5131
  file: {
5112
5132
  ...e,
@@ -5116,7 +5136,7 @@ function Na(e, t, n, r, i) {
5116
5136
  messageId: a.messages[0].id
5117
5137
  };
5118
5138
  }
5119
- return U(e, t, n, r, i);
5139
+ return H(e, t, n, r, i);
5120
5140
  }
5121
5141
  //#endregion
5122
- export { S as ARTIFACT_TYPES, na as ArtboardView, sa as ArtifactThumbnail, r as BOARD_TYPES, s as CanvasErrorBoundary, le as HTML_LANG, we as HTML_SANDBOX, aa as HtmlView, W as PHONE_QUERY, a as PreviewView, la as PublicationStatus, Oe as RailSwitch, fa as RyugiMark, M as TYPE_GLYPHS, A as TYPE_ICON_VIEWBOX, he as Trans, oa as TypeIcon, va as VIEWER_VERSION, h as ViewerProvider, Se as applyAgentOp, U as applyAgentThreadOp, Na as applyBoardAgentOp, Ma as applyBoardHumanOp, Be as applyHumanOp, Ce as applyThreadOp, Oa as boardAnchors, rr as boardCommentsFromMessage, nr as boardCommentsFromPayload, _ as cloudErrorDetails, re as createRelayConnection, I as createViewerI18n, _e as documentAnchors, ka as emptyBoardComments, ge as emptyComments, ma as errorText, R as i18n, y as isArtifactId, m as isArtifactType, t as isMediaBoard, be as isObject, ha as isPlanLimit, B as isVisibility, ja as mergeBoardComments, Ae as mergeComments, H as openThread, de as ownLink, Ti as pageLink, pe as parseAcceptLanguage, ke as parseComments, ga as planLimitMessage, me as publishState, ue as publishing, Da as readBoardAnchor, Le as readCloudHeader, ce as readPublication, pa as relativeUpdatedAt, Ne as reportCloudHeader, z as resolveLocale, _a as responseErrorText, Aa as savedBoardComments, ve as savedComments, fe as syncNote, V as t, O as typeFaviconHref, ye as unreadThreads, or as useCanvasData, Fe as useCloudHeader, Me as useMedia, Ei as usePageQuery, Pe as useSandboxFrame, d as useSystemTheme, L as useTranslation, E as useTypeFavicon, xe as waitingOn };
5142
+ export { i as ARTIFACT_TYPES, ia as ArtboardView, la as ArtifactThumbnail, n as BOARD_TYPES, u as CanvasErrorBoundary, fe as HTML_LANG, Ee as HTML_SANDBOX, sa as HtmlView, Ie as PHONE_QUERY, o as PreviewView, da as PublicationStatus, Ae as RailSwitch, ma as RyugiMark, ne as TYPE_GLYPHS, j as TYPE_ICON_VIEWBOX, R as Trans, ca as TypeIcon, ba as VIEWER_VERSION, _ as ViewerProvider, we as applyAgentOp, H as applyAgentThreadOp, Fa as applyBoardAgentOp, Pa as applyBoardHumanOp, Ve as applyHumanOp, Te as applyThreadOp, Aa as boardAnchors, ir as boardCommentsFromMessage, rr as boardCommentsFromPayload, y as cloudErrorDetails, ae as createRelayConnection, de as createViewerI18n, ye as documentAnchors, ja as emptyBoardComments, ve as emptyComments, ga as errorText, L as i18n, x as isArtifactId, g as isArtifactType, t as isMediaBoard, Se as isObject, _a as isPlanLimit, z as isVisibility, Na as mergeBoardComments, Me as mergeComments, V as openThread, me as ownLink, Di as pageLink, ge as parseAcceptLanguage, je as parseComments, va as planLimitMessage, _e as publishState, I as publishing, ka as readBoardAnchor, ze as readCloudHeader, P as readPublication, ha as relativeUpdatedAt, Fe as reportCloudHeader, pe as resolveLocale, ya as responseErrorText, Ma as savedBoardComments, be as savedComments, he as syncNote, B as t, k as typeFaviconHref, xe as unreadThreads, sr as useCanvasData, Le as useCloudHeader, Pe as useMedia, Oi as usePageQuery, U as useSandboxFrame, p as useSystemTheme, F as useTranslation, D as useTypeFavicon, Ce as waitingOn };