@kition/kit-editor 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { KitRpcError as he, isHello as co, KIT_UI_PROTOCOL as Bt, isHandshake as uo, KitPeer as ho, parseCommentAnchor as zn, HOST_SERVICE_CAPABILITY_PREFIX as Bn, parseKitView as _n, parseWatermark as fo, parseDocumentPermissions as mo, matchesShortcut as Hr, INVALID_PARAMS_REASON as At, LEASE_HELD_REASON as fn, ORIGIN_LABEL as po, HOST_ORIGIN_LABEL as go, parsePeers as wo, parsePresence as bo } from "@kition/kit-ui-protocol";
2
2
  import { fileErrorReason as th, isOpenableUrl as nh, openErrorReason as rh } from "@kition/kit-ui-protocol";
3
3
  import { brandTokens as yo, validBrand as vo, Dialog as st, Button as me, ElementsProvider as ko, MenuItem as le, RibbonButton as we, ICON_STROKE as $e, RibbonGroup as Me, StringsProvider as So, RibbonPresentationContext as vt, RibbonFitContext as Yt, lineSize as Co, MenuButton as lt, FULL_RIBBON_FIT as mn, menuKeyDown as xo, toast as pt, IconButton as De, OverflowStrip as Et, StatusBar as $o, StatusSpacer as Io, ZoomControl as Mo, Toaster as To, RibbonStack as Fe, ColorGrid as Vt, MenuSeparator as Ae, Choice as gt, Checkbox as Xt, LineMoreLabelContext as Ao, DropPanel as Eo } from "@kition/tessera-ui";
4
- import { Badge as oh, BarChart as ah, BarSeparator as sh, Button as lh, Card as ch, CardContent as dh, CardHeader as uh, Checkbox as hh, Choice as fh, ColorGrid as mh, ColorPicker as ph, ColorWheel as gh, Command as wh, CommandEmpty as bh, CommandGroup as yh, CommandInput as vh, CommandList as kh, CommandItem as Sh, CommandSeparator as Ch, CommandShortcut as xh, ConfirmProvider as $h, ContextMenu as Ih, CurveEditor as Mh, Dialog as Th, Disclosure as Ah, DockArea as Eh, EyeButton as Oh, Field as Rh, FloatingPanels as Dh, GradientSlider as Lh, Hint as Ph, Histogram as Nh, ICON_STROKE as Fh, IconButton as Wh, KeyframeLane as zh, LevelMeter as Bh, LineChart as _h, LineMoreLabelContext as Kh, MenuButton as Hh, MenuItem as qh, MenuSeparator as Uh, Modal as jh, ModalBody as Gh, ModalClose as Yh, ModalCloseButton as Vh, ModalContent as Xh, ModalDescription as Jh, ModalFooter as Zh, ModalHeader as Qh, ModalTitle as ef, ModalTrigger as tf, NumberField as nf, OverflowStrip as rf, PALETTE_COLORS as of, Panel as af, PanelFooter as sf, PasswordInput as lf, PieChart as cf, Popover as df, PopoverAnchor as uf, PopoverClose as hf, PopoverContent as ff, PopoverTrigger as mf, PreviewDialog as pf, RGB_IDENTITY as gf, RenameField as wf, RibbonButton as bf, RibbonGroup as yf, RibbonItem as vf, RibbonPresentationContext as kf, RibbonRow as Sf, RibbonStack as Cf, SLIDER_GRADIENTS as xf, STANDARD_COLORS as $f, Segmented as If, Select as Mf, Sheet as Tf, Spinner as Af, StatusBar as Ef, StatusSpacer as Of, Switch as Rf, TableSizePicker as Df, TextInput as Lf, Textarea as Pf, Thumbnail as Nf, TimecodeField as Ff, Toaster as Wf, Tooltip as zf, TooltipContent as Bf, TooltipProvider as _f, TooltipTrigger as Kf, TransportBar as Hf, WORKSPACE_ACTIONS as qf, WorkspaceLayout as Uf, ZoomControl as jf, addCurvePoint as Gf, automaticFloatingPosition as Yf, brandTokens as Vf, clampFloatingRect as Xf, contrast as Jf, deviceScale as Zf, dockHeights as Qf, formatTimecode as em, hitCurvePoint as tm, kitStoreKey as nm, lightnessAt as rm, lineSize as im, menuKeyDown as om, meterFraction as am, meterLayout as sm, moveCurvePoint as lm, overflowOf as cm, parseHex as dm, parseTimecode as um, rankScale as hm, readKitStore as fm, removeCurvePoint as mm, removeKitStore as pm, resizeFloatingRect as gm, rgbToHex as wm, sampleCurve as bm, sliderFraction as ym, sliderValueAt as vm, smoothHistogram as km, sortCurve as Sm, storedBytes as Cm, toast as xm, useAutoSize as $m, useConfirm as Im, useDialogFocus as Mm, useDismissableLayer as Tm, useKitStore as Am, useMediaQuery as Em, useWorkspaces as Om, wheelRadius as Rm, wheelValueAt as Dm, workspaceSlug as Lm, writeKitStore as Pm } from "@kition/tessera-ui";
4
+ import { Badge as oh, BarChart as ah, BarSeparator as sh, Button as lh, Card as ch, CardContent as dh, CardHeader as uh, Checkbox as hh, Choice as fh, ColorGrid as mh, ColorPicker as ph, ColorWheel as gh, Command as wh, CommandEmpty as bh, CommandGroup as yh, CommandInput as vh, CommandList as kh, CommandItem as Sh, CommandSeparator as Ch, CommandShortcut as xh, ConfirmProvider as $h, ContextMenu as Ih, CurveEditor as Mh, Dialog as Th, Disclosure as Ah, DockArea as Eh, EyeButton as Oh, Field as Rh, FloatingPanels as Dh, GradientSlider as Lh, Hint as Nh, Histogram as Ph, ICON_STROKE as Fh, IconButton as Wh, KeyframeLane as zh, LevelMeter as Bh, LineChart as _h, LineMoreLabelContext as Kh, MenuButton as Hh, MenuItem as Uh, MenuSeparator as qh, Modal as jh, ModalBody as Gh, ModalClose as Yh, ModalCloseButton as Vh, ModalContent as Xh, ModalDescription as Jh, ModalFooter as Zh, ModalHeader as Qh, ModalTitle as ef, ModalTrigger as tf, NumberField as nf, OverflowStrip as rf, PALETTE_COLORS as of, Panel as af, PanelFooter as sf, PasswordInput as lf, PieChart as cf, Popover as df, PopoverAnchor as uf, PopoverClose as hf, PopoverContent as ff, PopoverTrigger as mf, PreviewDialog as pf, RGB_IDENTITY as gf, RenameField as wf, RibbonButton as bf, RibbonGroup as yf, RibbonItem as vf, RibbonPresentationContext as kf, RibbonRow as Sf, RibbonStack as Cf, SLIDER_GRADIENTS as xf, STANDARD_COLORS as $f, Segmented as If, Select as Mf, Sheet as Tf, Spinner as Af, StatusBar as Ef, StatusSpacer as Of, Switch as Rf, TableSizePicker as Df, TextInput as Lf, Textarea as Nf, Thumbnail as Pf, TimecodeField as Ff, Toaster as Wf, Tooltip as zf, TooltipContent as Bf, TooltipProvider as _f, TooltipTrigger as Kf, TransportBar as Hf, WORKSPACE_ACTIONS as Uf, WorkspaceLayout as qf, ZoomControl as jf, addCurvePoint as Gf, automaticFloatingPosition as Yf, brandTokens as Vf, clampFloatingRect as Xf, contrast as Jf, deviceScale as Zf, dockHeights as Qf, formatTimecode as em, hitCurvePoint as tm, kitStoreKey as nm, lightnessAt as rm, lineSize as im, menuKeyDown as om, meterFraction as am, meterLayout as sm, moveCurvePoint as lm, overflowOf as cm, parseHex as dm, parseTimecode as um, rankScale as hm, readKitStore as fm, removeCurvePoint as mm, removeKitStore as pm, resizeFloatingRect as gm, rgbToHex as wm, sampleCurve as bm, sliderFraction as ym, sliderValueAt as vm, smoothHistogram as km, sortCurve as Sm, storedBytes as Cm, toast as xm, useAutoSize as $m, useConfirm as Im, useDialogFocus as Mm, useDismissableLayer as Tm, useKitStore as Am, useMediaQuery as Em, useWorkspaces as Om, wheelRadius as Rm, wheelValueAt as Dm, workspaceSlug as Lm, writeKitStore as Nm } from "@kition/tessera-ui";
5
5
  import { useRef as R, useState as B, useCallback as H, useEffect as J, useMemo as pe, useImperativeHandle as Oo, createContext as Ot, useContext as Le, useSyncExternalStore as He, useLayoutEffect as Te, Fragment as Ro } from "react";
6
6
  import { jsx as u, jsxs as M, Fragment as Ce } from "react/jsx-runtime";
7
- import { CommandGenericIcon as Do, HeadingIcon as qr, ListTreeIcon as Lo, CodeIcon as Po, ArrowRightLeftIcon as No, WaypointsIcon as Ur, GaugeIcon as Fo, SlidersHorizontalIcon as _t, ClipboardIcon as Wo, DatabaseIcon as Kn, HashIcon as pn, ArrowDownToLineIcon as zo, ZapIcon as Bo, PaintbrushIcon as _o, TextCursorInputIcon as Ko, ListOrderedIcon as Hn, NetworkIcon as Ho, MousePointerClickIcon as jr, PenToolIcon as Gr, PencilIcon as tt, HighlighterIcon as Yr, WholeWordIcon as qo, TextCursorIcon as Uo, RulerIcon as Ve, ClapperboardIcon as Vr, BrushIcon as Xr, BlendIcon as Qe, PaletteIcon as Rt, TypeIcon as Ue, PilcrowIcon as jo, SwatchBookIcon as Go, LayersIcon as kt, SplineIcon as gn, CameraIcon as Yo, Rows3Icon as Jr, FilmIcon as qn, BookmarkIcon as Zr, DiamondIcon as Qr, BoxIcon as ei, Grid3x3Icon as St, FrameIcon as Jt, FolderIcon as Un, ClockIcon as Vo, Volume2Icon as Xo, VideoIcon as ti, SettingsIcon as wn, ShapesIcon as _e, LightbulbIcon as Jo, SquareIcon as ct, CrosshairIcon as Zo, Grid2x2Icon as Qo, MoveUpRightIcon as ea, MessageSquareIcon as Dt, FileIcon as bn, TableIcon as yn, SquareFunctionIcon as ni, ComponentIcon as ta, WandSparklesIcon as vn, MousePointer2Icon as nt, BoldIcon as na, ItalicIcon as ri, UnderlineIcon as ra, StrikethroughIcon as ia, SubscriptIcon as oa, SuperscriptIcon as aa, SquareDashedIcon as jn, ContrastIcon as sa, HandIcon as ii, ChevronsDownUpIcon as la, ChevronsUpDownIcon as ca, LinkIcon as Ct, ShieldCheckIcon as da, LifeBuoyIcon as ua, TrashIcon as rt, BookOpenIcon as ha, ArrowLeftIcon as fa, ArrowRightIcon as Gn, ArrowUpIcon as Yn, ArrowDownIcon as Vn, ArrowLeftToLineIcon as ma, ArrowRightToLineIcon as pa, ClipLiftIcon as ga, ClipExtractIcon as wa, FastForwardIcon as ba, StepForwardIcon as Xn, EyeOffIcon as Jn, Undo2Icon as kn, Redo2Icon as oi, SaveIcon as ai, FileOutputIcon as ya, FileInputIcon as va, FolderOpenIcon as ka, XIcon as Zt, PrinterIcon as Sn, CopyIcon as Cn, ScissorsIcon as xn, ClipboardPasteIcon as si, PencilLineIcon as Sa, SearchIcon as li, ReplaceIcon as ci, AlignCenterHorizontalIcon as Ca, RotateCwIcon as $n, FlipHorizontalIcon as xa, MoveIcon as di, ScalingIcon as ui, MergeIcon as $a, SplitIcon as Ia, GroupIcon as In, UngroupIcon as Mn, LockIcon as Tn, LockOpenIcon as Ma, EyeIcon as An, ZoomInIcon as hi, PlayIcon as Ta, PauseIcon as Aa, DiscIcon as Ea, RotateCcwIcon as fi, CheckIcon as En, ToggleLeftIcon as Oa, ChevronRightIcon as On, ChevronLeftIcon as Ra, CropIcon as mi, PlusIcon as pi, ListIcon as Da, RepeatIcon as La, ArrowUpDownIcon as gi, FunnelIcon as wi, UnlinkIcon as Pa, RefreshCwIcon as bi, BringToFrontIcon as Qt, MagnetIcon as Na, PenLineIcon as it, PaintBucketIcon as xt, TablePropertiesIcon as Fa, ActivityIcon as Wa, ChartColumnIcon as je, ImageIcon as za, StickerIcon as Ba, PanelTopIcon as yi, PanelBottomIcon as _a, SigmaIcon as Ka, OmegaIcon as Ha, SquareCheckBigIcon as qa, SignatureIcon as Ua, CalendarIcon as ja, MusicIcon as Ga, QrCodeIcon as Ya, LayoutTemplateIcon as Va, FilePlusIcon as Xa, Columns2Icon as vi, SpellCheckIcon as Ja, LanguagesIcon as Za, TagIcon as ki, RulerDimensionLineIcon as Qa, RadiusIcon as es, DiameterIcon as ts, PackageIcon as ns, StickyNoteIcon as rs, MousePointerIcon as is, LassoIcon as os, MinusIcon as Si, RainbowIcon as as, ShellIcon as ss, CircleIcon as Ci, EraserIcon as xi, VectorPolygonIcon as ls, VectorSquareIcon as cs, WavesHorizontalIcon as ds, Move3dIcon as us, PipetteIcon as hs, CopyPlusIcon as fs, MoveHorizontalIcon as ms, CornerDownRightIcon as ps, UploadIcon as gs, StarIcon as $i, Share2Icon as ws, SendIcon as bs, MailIcon as ys, InfoIcon as vs, CircleQuestionMarkIcon as ks, FlagIcon as Ss, DownloadIcon as Cs, BellIcon as xs, ChevronDownIcon as Ii, ChevronsLeftIcon as $s, ChevronsRightIcon as Is, SparklesIcon as Lt, EllipsisIcon as Ms, RectangleHorizontalIcon as Mi, TriangleIcon as Ts, MoveRightIcon as As, SendToBackIcon as Es, CableIcon as Os, PenIcon as Ti, ChartColumnStackedIcon as Rs, ChartLineIcon as Zn, ChartAreaIcon as Ds, ChartPieIcon as Qn, ChartScatterIcon as Ls, RadarIcon as Ps, LayoutGridIcon as Ns, TrendingUpIcon as Fs, Table2Icon as Ws, Minimize2Icon as zs, FocusIcon as Ai, MenuIcon as Bs } from "@kition/tessera-icons/react";
7
+ import { CommandGenericIcon as Do, HeadingIcon as Ur, ListTreeIcon as Lo, CodeIcon as No, ArrowRightLeftIcon as Po, WaypointsIcon as qr, GaugeIcon as Fo, SlidersHorizontalIcon as _t, ClipboardIcon as Wo, DatabaseIcon as Kn, HashIcon as pn, ArrowDownToLineIcon as zo, ZapIcon as Bo, PaintbrushIcon as _o, TextCursorInputIcon as Ko, ListOrderedIcon as Hn, NetworkIcon as Ho, MousePointerClickIcon as jr, PenToolIcon as Gr, PencilIcon as tt, HighlighterIcon as Yr, WholeWordIcon as Uo, TextCursorIcon as qo, RulerIcon as Ve, ClapperboardIcon as Vr, BrushIcon as Xr, BlendIcon as Qe, PaletteIcon as Rt, TypeIcon as qe, PilcrowIcon as jo, SwatchBookIcon as Go, LayersIcon as kt, SplineIcon as gn, CameraIcon as Yo, Rows3Icon as Jr, FilmIcon as Un, BookmarkIcon as Zr, DiamondIcon as Qr, BoxIcon as ei, Grid3x3Icon as St, FrameIcon as Jt, FolderIcon as qn, ClockIcon as Vo, Volume2Icon as Xo, VideoIcon as ti, SettingsIcon as wn, ShapesIcon as _e, LightbulbIcon as Jo, SquareIcon as ct, CrosshairIcon as Zo, Grid2x2Icon as Qo, MoveUpRightIcon as ea, MessageSquareIcon as Dt, FileIcon as bn, TableIcon as yn, SquareFunctionIcon as ni, ComponentIcon as ta, WandSparklesIcon as vn, MousePointer2Icon as nt, BoldIcon as na, ItalicIcon as ri, UnderlineIcon as ra, StrikethroughIcon as ia, SubscriptIcon as oa, SuperscriptIcon as aa, SquareDashedIcon as jn, ContrastIcon as sa, HandIcon as ii, ChevronsDownUpIcon as la, ChevronsUpDownIcon as ca, LinkIcon as Ct, ShieldCheckIcon as da, LifeBuoyIcon as ua, TrashIcon as rt, BookOpenIcon as ha, ArrowLeftIcon as fa, ArrowRightIcon as Gn, ArrowUpIcon as Yn, ArrowDownIcon as Vn, ArrowLeftToLineIcon as ma, ArrowRightToLineIcon as pa, ClipLiftIcon as ga, ClipExtractIcon as wa, FastForwardIcon as ba, StepForwardIcon as Xn, EyeOffIcon as Jn, Undo2Icon as kn, Redo2Icon as oi, SaveIcon as ai, FileOutputIcon as ya, FileInputIcon as va, FolderOpenIcon as ka, XIcon as Zt, PrinterIcon as Sn, CopyIcon as Cn, ScissorsIcon as xn, ClipboardPasteIcon as si, PencilLineIcon as Sa, SearchIcon as li, ReplaceIcon as ci, AlignCenterHorizontalIcon as Ca, RotateCwIcon as $n, FlipHorizontalIcon as xa, MoveIcon as di, ScalingIcon as ui, MergeIcon as $a, SplitIcon as Ia, GroupIcon as In, UngroupIcon as Mn, LockIcon as Tn, LockOpenIcon as Ma, EyeIcon as An, ZoomInIcon as hi, PlayIcon as Ta, PauseIcon as Aa, DiscIcon as Ea, RotateCcwIcon as fi, CheckIcon as En, ToggleLeftIcon as Oa, ChevronRightIcon as On, ChevronLeftIcon as Ra, CropIcon as mi, PlusIcon as pi, ListIcon as Da, RepeatIcon as La, ArrowUpDownIcon as gi, FunnelIcon as wi, UnlinkIcon as Na, RefreshCwIcon as bi, BringToFrontIcon as Qt, MagnetIcon as Pa, PenLineIcon as it, PaintBucketIcon as xt, TablePropertiesIcon as Fa, ActivityIcon as Wa, ChartColumnIcon as je, ImageIcon as za, StickerIcon as Ba, PanelTopIcon as yi, PanelBottomIcon as _a, SigmaIcon as Ka, OmegaIcon as Ha, SquareCheckBigIcon as Ua, SignatureIcon as qa, CalendarIcon as ja, MusicIcon as Ga, QrCodeIcon as Ya, LayoutTemplateIcon as Va, FilePlusIcon as Xa, Columns2Icon as vi, SpellCheckIcon as Ja, LanguagesIcon as Za, TagIcon as ki, RulerDimensionLineIcon as Qa, RadiusIcon as es, DiameterIcon as ts, PackageIcon as ns, StickyNoteIcon as rs, MousePointerIcon as is, LassoIcon as os, MinusIcon as Si, RainbowIcon as as, ShellIcon as ss, CircleIcon as Ci, EraserIcon as xi, VectorPolygonIcon as ls, VectorSquareIcon as cs, WavesHorizontalIcon as ds, Move3dIcon as us, PipetteIcon as hs, CopyPlusIcon as fs, MoveHorizontalIcon as ms, CornerDownRightIcon as ps, UploadIcon as gs, StarIcon as $i, Share2Icon as ws, SendIcon as bs, MailIcon as ys, InfoIcon as vs, CircleQuestionMarkIcon as ks, FlagIcon as Ss, DownloadIcon as Cs, BellIcon as xs, ChevronDownIcon as Ii, ChevronsLeftIcon as $s, ChevronsRightIcon as Is, SparklesIcon as Lt, EllipsisIcon as Ms, RectangleHorizontalIcon as Mi, TriangleIcon as Ts, MoveRightIcon as As, SendToBackIcon as Es, CableIcon as Os, PenIcon as Ti, ChartColumnStackedIcon as Rs, ChartLineIcon as Zn, ChartAreaIcon as Ds, ChartPieIcon as Qn, ChartScatterIcon as Ls, RadarIcon as Ns, LayoutGridIcon as Ps, TrendingUpIcon as Fs, Table2Icon as Ws, Minimize2Icon as zs, FocusIcon as Ai, MenuIcon as Bs } from "@kition/tessera-icons/react";
8
8
  import * as lu from "@kition/tessera-icons/react";
9
9
  import { w as Fm } from "./chunks/workspaceTree-CpJ2i9hy.js";
10
10
  const en = ["menus", "line", "classic", "focus"], _s = ["menus", "line", "classic"], Ks = 720;
@@ -24,7 +24,7 @@ function Hs(e) {
24
24
  return null;
25
25
  }
26
26
  }
27
- function qs(e, t) {
27
+ function Us(e, t) {
28
28
  try {
29
29
  localStorage.setItem(Oi(e), t);
30
30
  } catch {
@@ -35,7 +35,7 @@ function Ri(e) {
35
35
  const t = e.allowed;
36
36
  return t?.length ? en.filter((n) => t.includes(n)) : en;
37
37
  }
38
- function Us({ stored: e, rules: t, kit: n, readOnly: r }) {
38
+ function qs({ stored: e, rules: t, kit: n, readOnly: r }) {
39
39
  const i = Ri(t), o = t.default === "focus" ? null : t.default, a = [e, o, r ? "menus" : null, n, "line"];
40
40
  for (const s of a) if (s && i.includes(s)) return s;
41
41
  return i.find((s) => s !== "focus") ?? "menus";
@@ -192,7 +192,7 @@ function al(e, t) {
192
192
  return r.hostHidden ? [] : [r.hostDisabled ? { ...n, enabled: !1 } : n];
193
193
  });
194
194
  }
195
- function Pi(e, t, n) {
195
+ function Ni(e, t, n) {
196
196
  let r = e, i = null;
197
197
  const o = /* @__PURE__ */ new Set(), a = (s) => {
198
198
  r = i ? { ...s, personal: i } : s;
@@ -224,7 +224,7 @@ function nr(e, t = null, n = document.documentElement) {
224
224
  if (r) for (const [i, o] of Object.entries(yo(t, e.colorScheme))) n.style.setProperty(i, o);
225
225
  n.dataset.brand = r ? "kit" : "host", n.style.colorScheme = e.colorScheme, n.dataset.colorScheme = e.colorScheme;
226
226
  }
227
- const Pt = () => typeof navigator < "u" && /Mac|iPhone|iPad/i.test(navigator.platform);
227
+ const Nt = () => typeof navigator < "u" && /Mac|iPhone|iPad/i.test(navigator.platform);
228
228
  function cu(e) {
229
229
  return new Promise((t) => {
230
230
  const n = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, r = () => window.parent.postMessage({ kitionKitUi: 1, ready: Bt, id: n }, "*"), i = (o) => {
@@ -251,8 +251,8 @@ function cu(e) {
251
251
  },
252
252
  stamp: async (m) => (await a.request("host/stamp", { path: m })).version,
253
253
  write: async (m, y, I) => {
254
- const P = y.buffer.slice(y.byteOffset, y.byteOffset + y.byteLength);
255
- return (await a.request("host/write", { path: m, bytes: P, mode: "save", ...I === void 0 ? {} : { expected: I } }, { transfer: !0 })).version || null;
254
+ const N = y.buffer.slice(y.byteOffset, y.byteOffset + y.byteLength);
255
+ return (await a.request("host/write", { path: m, bytes: N, mode: "save", ...I === void 0 ? {} : { expected: I } }, { transfer: !0 })).version || null;
256
256
  },
257
257
  lend: () => s.document.lend ?? null
258
258
  };
@@ -264,14 +264,14 @@ function cu(e) {
264
264
  });
265
265
  const f = vo(e.brand);
266
266
  nr(s.theme, f);
267
- const g = Pi(
267
+ const g = Ni(
268
268
  tr(s.ui),
269
269
  s.capabilities.includes("customize") ? async (m) => void await a.request("host/customize", { personal: { hide: m } }) : null,
270
270
  (m) => a.notify("ui/action", m)
271
271
  );
272
272
  a.on("ui/configure", (m) => g.replace(tr(m?.ui))), document.documentElement.lang = s.locale;
273
273
  const w = s.shortcuts, b = (m) => {
274
- w.some((y) => Hr(y, m, Pt())) && (m.preventDefault(), m.stopPropagation(), a.notify("host/shortcut", { key: m.key, code: m.code, meta: m.metaKey, ctrl: m.ctrlKey, shift: m.shiftKey, alt: m.altKey }));
274
+ w.some((y) => Hr(y, m, Nt())) && (m.preventDefault(), m.stopPropagation(), a.notify("host/shortcut", { key: m.key, code: m.code, meta: m.metaKey, ctrl: m.ctrlKey, shift: m.shiftKey, alt: m.altKey }));
275
275
  };
276
276
  window.addEventListener("keydown", b, !0), a.on("ui/theme", ({ theme: m }) => nr(m, f)), a.on("ui/locale", ({ locale: m }) => {
277
277
  document.documentElement.lang = m;
@@ -320,17 +320,17 @@ function cu(e) {
320
320
  onComments: (m) => a.on("comments/show", (y) => {
321
321
  const I = Array.isArray(y?.threads) ? y.threads : [];
322
322
  m(
323
- I.flatMap((P) => {
324
- const E = zn(P?.anchor);
325
- return E && typeof P?.id == "string" ? [{ id: P.id, anchor: E, resolved: P.resolved === !0, count: Number.isSafeInteger(P.count) ? P.count : 0 }] : [];
323
+ I.flatMap((N) => {
324
+ const E = zn(N?.anchor);
325
+ return E && typeof N?.id == "string" ? [{ id: N.id, anchor: E, resolved: N.resolved === !0, count: Number.isSafeInteger(N.count) ? N.count : 0 }] : [];
326
326
  })
327
327
  );
328
328
  }),
329
329
  activateComment: (m) => a.notify("comments/activated", { id: m }),
330
330
  locateComments: (m) => a.handle("comments/locate", async (y) => {
331
- const P = (Array.isArray(y?.anchors) ? y.anchors : []).map((q) => zn(q)), E = await m(P.filter((q) => q !== null));
331
+ const N = (Array.isArray(y?.anchors) ? y.anchors : []).map((U) => zn(U)), E = await m(N.filter((U) => U !== null));
332
332
  let Y = 0;
333
- return { found: P.map((q) => q ? E[Y++] === !0 : !1) };
333
+ return { found: N.map((U) => U ? E[Y++] === !0 : !1) };
334
334
  }),
335
335
  close: () => {
336
336
  window.removeEventListener("keydown", b, !0), a.close();
@@ -347,7 +347,7 @@ class Je extends Error {
347
347
  super(t.message), this.data = t, this.name = "KitModelError";
348
348
  }
349
349
  }
350
- const ll = /* @__PURE__ */ new Set(["edit.undo", "undo"]), cl = /* @__PURE__ */ new Set(["edit.redo", "redo"]), Oe = "read-only", Ne = Object.freeze({
350
+ const ll = /* @__PURE__ */ new Set(["edit.undo", "undo"]), cl = /* @__PURE__ */ new Set(["edit.redo", "redo"]), Oe = "read-only", Pe = Object.freeze({
351
351
  /**
352
352
  * Families whose commands only change what the person sees (zoom, selection, the playhead,
353
353
  * playback): they run even when their kit flags them `mutates`.
@@ -431,16 +431,16 @@ const ll = /* @__PURE__ */ new Set(["edit.undo", "undo"]), cl = /* @__PURE__ */
431
431
  });
432
432
  function dl(e) {
433
433
  const { id: t } = e, n = t.split(".")[0] ?? "";
434
- return Ne.editingCommands.includes(t) || Ne.documentSettings.includes(t) ? !0 : Ne.editingGroups.includes(n) ? !Ne.fileOutputs.test(t) : Ne.viewingCommands.includes(t) || Ne.viewingGroups.includes(n) ? !1 : e.mutates === !0;
434
+ return Pe.editingCommands.includes(t) || Pe.documentSettings.includes(t) ? !0 : Pe.editingGroups.includes(n) ? !Pe.fileOutputs.test(t) : Pe.viewingCommands.includes(t) || Pe.viewingGroups.includes(n) ? !1 : e.mutates === !0;
435
435
  }
436
436
  function ul(e, t) {
437
- return !t || !e ? /* @__PURE__ */ new Set() : new Set(e.filter((n) => typeof n == "string" && !Ne.editingCommands.includes(n) && !Ne.editingGroups.includes(n.split(".")[0] ?? "")));
437
+ return !t || !e ? /* @__PURE__ */ new Set() : new Set(e.filter((n) => typeof n == "string" && !Pe.editingCommands.includes(n) && !Pe.editingGroups.includes(n.split(".")[0] ?? "")));
438
438
  }
439
- function Ni(e, t) {
439
+ function Pi(e, t) {
440
440
  return t.size === 0 ? null : ll.has(e) ? "undo" : cl.has(e) ? "redo" : null;
441
441
  }
442
442
  function It(e, t) {
443
- return dl(e) && !t.has(e.id) && Ni(e.id, t) === null;
443
+ return dl(e) && !t.has(e.id) && Pi(e.id, t) === null;
444
444
  }
445
445
  function hl(e, t) {
446
446
  return t.size > 0 && It(e, t);
@@ -467,7 +467,7 @@ class Wi extends Error {
467
467
  super(n), this.reason = t, this.name = "KitEngineRefusal";
468
468
  }
469
469
  }
470
- const qt = { width: 0, height: 0, pinned: { left: 0, top: 0 }, revision: 0, dirty: !1, canUndo: !1, canRedo: !1, inspected: {} };
470
+ const Ut = { width: 0, height: 0, pinned: { left: 0, top: 0 }, revision: 0, dirty: !1, canUndo: !1, canRedo: !1, inspected: {} };
471
471
  class ot {
472
472
  constructor(t, n) {
473
473
  this.worker = t, this.info = n;
@@ -487,9 +487,9 @@ class ot {
487
487
  static async open(t, n, r, i = null, o = null, a = !1, s = !1) {
488
488
  const d = new Worker(new URL(
489
489
  /* @vite-ignore */
490
- "" + new URL("assets/kitEngine.worker-9PIHJagj.js", import.meta.url).href,
490
+ "" + new URL("assets/kitEngine.worker-D-kUyohc.js", import.meta.url).href,
491
491
  import.meta.url
492
- ), { type: "module" }), c = new ot(d, qt);
492
+ ), { type: "module" }), c = new ot(d, Ut);
493
493
  d.onmessage = (l) => c.settle(l.data), d.onerror = (l) => c.fail(new Error(l.message || "the kit engine stopped"));
494
494
  try {
495
495
  const l = o?.stored;
@@ -505,9 +505,9 @@ class ot {
505
505
  static async create(t, n, r, i, o = null, a = !1) {
506
506
  const s = new Worker(new URL(
507
507
  /* @vite-ignore */
508
- "" + new URL("assets/kitEngine.worker-9PIHJagj.js", import.meta.url).href,
508
+ "" + new URL("assets/kitEngine.worker-D-kUyohc.js", import.meta.url).href,
509
509
  import.meta.url
510
- ), { type: "module" }), d = new ot(s, qt);
510
+ ), { type: "module" }), d = new ot(s, Ut);
511
511
  s.onmessage = (c) => d.settle(c.data), s.onerror = (c) => d.fail(new Error(c.message || "the kit engine stopped"));
512
512
  try {
513
513
  return d.info = await d.call({ method: "create", manifest: t, name: n, width: r, height: i, lent: o, readOnly: a }), d;
@@ -547,7 +547,7 @@ class ot {
547
547
  */
548
548
  async execute(t, n = {}, r, i) {
549
549
  const o = { method: "execute", command: t, params: n, ...r ? { origin: r } : {}, ...i ? { agent: { state: i.state.state, set: i.set } } : {} }, { result: a, info: s, state: d, closed: c } = await this.call(o);
550
- return c && (this.closed = !0, this.info = qt), s && (this.info = s), i && d !== void 0 && (i.state.state = d), a;
550
+ return c && (this.closed = !0, this.info = Ut), s && (this.info = s), i && d !== void 0 && (i.state.state = d), a;
551
551
  }
552
552
  /** RGBA8 of the area at (`x`, `y`) document pixels shown at `scale` screen pixels per pixel. */
553
553
  async render(t, n, r, i, o) {
@@ -765,11 +765,11 @@ function kl(e, t, n, r, i, o = {}) {
765
765
  c.current = o.followFile;
766
766
  const l = R(null), p = R(i);
767
767
  p.current = i;
768
- const h = R(null), f = R(!1), [g, w] = B(null), [b, m] = B(null), [y, I] = B(null), [P, E] = B({ revision: 0, damage: null }), [Y, q] = B(!1), [V, j] = B(null), [D, Z] = B(null), [Q, fe] = B(!1), [ce, k] = B(!1), [O, U] = B(0), x = R(null);
768
+ const h = R(null), f = R(!1), [g, w] = B(null), [b, m] = B(null), [y, I] = B(null), [N, E] = B({ revision: 0, damage: null }), [Y, U] = B(!1), [V, j] = B(null), [D, Z] = B(null), [Q, fe] = B(!1), [ce, k] = B(!1), [O, q] = B(0), x = R(null);
769
769
  x.current ??= gl();
770
770
  const C = x.current, W = H((S = null) => {
771
771
  const $ = l.current;
772
- $ && (m($.info), I(p.current($.info)), q($.info.dirty), E((F) => ({ revision: F.revision + 1, damage: S })));
772
+ $ && (m($.info), I(p.current($.info)), U($.info.dirty), E((F) => ({ revision: F.revision + 1, damage: S })));
773
773
  }, []), _ = H(async (S) => {
774
774
  f.current = !0;
775
775
  try {
@@ -804,7 +804,7 @@ function kl(e, t, n, r, i, o = {}) {
804
804
  return S.then($, $), S;
805
805
  }, []), ne = H(async () => {
806
806
  for (; T.current.size; ) await Promise.allSettled([...T.current]);
807
- }, []), N = H(
807
+ }, []), P = H(
808
808
  async (S = () => !0) => {
809
809
  const $ = l.current;
810
810
  if (!(!$ || f.current || !h.current))
@@ -840,11 +840,11 @@ function kl(e, t, n, r, i, o = {}) {
840
840
  );
841
841
  J(() => {
842
842
  let S = !0;
843
- const $ = window.setInterval(() => void N(() => S), yl);
843
+ const $ = window.setInterval(() => void P(() => S), yl);
844
844
  return () => {
845
845
  S = !1, window.clearInterval($);
846
846
  };
847
- }, [r, N]);
847
+ }, [r, P]);
848
848
  const G = R(null), ue = H((S) => G.current ? G.current(S) : S(), []), ye = H(
849
849
  async (S, $, F, X) => {
850
850
  const ee = l.current;
@@ -852,7 +852,7 @@ function kl(e, t, n, r, i, o = {}) {
852
852
  const de = X.skipUnchangedPaint ? { revision: ee.info.revision, inspected: JSON.stringify(ee.info.inspected) } : null, oe = await ee.execute(S, $, X.origin, X.agent);
853
853
  if (l.current === ee) {
854
854
  if (ee.closed)
855
- return ee.dispose(), l.current = null, w(null), m(null), I(null), q(!1), k(!1), oe;
855
+ return ee.dispose(), l.current = null, w(null), m(null), I(null), U(!1), k(!1), oe;
856
856
  const ke = X.refresh ?? "all", dt = de != null && ee.info.revision === de.revision && JSON.stringify(ee.info.inspected) === de.inspected;
857
857
  ke === "all" ? W(dt ? rr : F) : ke === "repaint" && C.bump(F);
858
858
  }
@@ -862,13 +862,13 @@ function kl(e, t, n, r, i, o = {}) {
862
862
  ), Ie = H(
863
863
  async (S, $ = {}, F = null, X = {}) => l.current ? K(ue(() => ye(S, $, F, X))) : null,
864
864
  [ue, ye, K]
865
- ), Pe = H(async (S, $ = [], F = !1) => {
865
+ ), Ne = H(async (S, $ = [], F = !1) => {
866
866
  const X = l.current;
867
867
  if (!X) return null;
868
868
  const ee = X.info.revision, { value: de, changed: oe } = await K(X.tool(S, $, F));
869
869
  return l.current === X && oe && W(X.info.revision === ee ? rr : pl(de)), de;
870
870
  }, [W, K]);
871
- on.has(Pe) || on.set(Pe, G);
871
+ on.has(Ne) || on.set(Ne, G);
872
872
  const We = H(async () => l.current ? l.current.commands() : [], []), A = H(async () => ue(async () => l.current ? l.current.disabledCommands() : []), [ue]), L = H(async () => {
873
873
  const S = l.current;
874
874
  if (S) {
@@ -942,7 +942,7 @@ function kl(e, t, n, r, i, o = {}) {
942
942
  }),
943
943
  compare: ($, F) => S().replicaCompare($, F)
944
944
  };
945
- }, [e, t, ue, n, a, W]), se = H(() => U((S) => S + 1), []), ge = H(
945
+ }, [e, t, ue, n, a, W]), se = H(() => q((S) => S + 1), []), ge = H(
946
946
  async (S) => {
947
947
  if (!S) return;
948
948
  h.current = S, await e.stamp(n).catch(() => null) === S && k(!1);
@@ -953,7 +953,7 @@ function kl(e, t, n, r, i, o = {}) {
953
953
  const S = await e.stamp(n).catch(() => null);
954
954
  S && (h.current = S);
955
955
  }, [e, n]), z = pe(() => ({ get: C.get, subscribe: C.subscribe }), [C]);
956
- return { path: n, manifest: t, doc: g, info: b, state: y, change: P, repaints: z, dirty: Y, failure: V, openMs: D, saving: Q, conflict: ce, run: Ie, tool: Pe, commands: We, disabledCommands: A, save: L, replica: re, model: ie, draft: ae, reopen: se, keepMine: v, checkFile: N, holdFile: ge };
956
+ return { path: n, manifest: t, doc: g, info: b, state: y, change: N, repaints: z, dirty: Y, failure: V, openMs: D, saving: Q, conflict: ce, run: Ie, tool: Ne, commands: We, disabledCommands: A, save: L, replica: re, model: ie, draft: ae, reopen: se, keepMine: v, checkFile: P, holdFile: ge };
957
957
  }
958
958
  async function an(e, t) {
959
959
  const n = Math.min(1, t / Math.max(1, e.width, e.height)), r = Math.max(1, Math.round(e.width * n)), i = Math.max(1, Math.round(e.height * n)), o = await e.render(0, 0, n, r, i), a = document.createElement("canvas");
@@ -1075,7 +1075,7 @@ const xl = [
1075
1075
  [/^tool-lasso/, os],
1076
1076
  [/^tool-(pen|anchor)/, Gr],
1077
1077
  [/^tool-curvature/, gn],
1078
- [/^tool-(type|touch-type)/, Ue],
1078
+ [/^tool-(type|touch-type)/, qe],
1079
1079
  [/^tool-line$/, Si],
1080
1080
  [/^tool-arc/, as],
1081
1081
  [/^tool-spiral/, ss],
@@ -1091,7 +1091,7 @@ const xl = [
1091
1091
  [/^tool-shear/, ri],
1092
1092
  [/^tool-reshape/, ls],
1093
1093
  [/^tool-free-transform/, cs],
1094
- [/^tool-puppet/, Ur],
1094
+ [/^tool-puppet/, qr],
1095
1095
  [/^tool-(width|warp|twirl|pucker|bloat|scallop|crystallize|wrinkle)/, ds],
1096
1096
  [/^tool-shape-builder/, _e],
1097
1097
  [/^tool-bucket/, xt],
@@ -1133,10 +1133,10 @@ const Il = [
1133
1133
  [/equation|formula|function/, ni],
1134
1134
  [/sum|sigma/, Ka],
1135
1135
  [/symbol|special char/, Ha],
1136
- [/check ?box|checkbox/, qa],
1136
+ [/check ?box|checkbox/, Ua],
1137
1137
  [/comment|note/, Dt],
1138
- [/text|word ?art|caption/, Ue],
1139
- [/signature/, Ua],
1138
+ [/text|word ?art|caption/, qe],
1139
+ [/signature/, qa],
1140
1140
  [/date|time/, ja],
1141
1141
  [/number|numbering/, pn],
1142
1142
  [/video|movie|media/, ti],
@@ -1250,23 +1250,23 @@ const Il = [
1250
1250
  [/^(?:sort)$/, gi],
1251
1251
  [/^(?:filter)$/, wi],
1252
1252
  [/^(?:link)$/, Ct],
1253
- [/^(?:unlink)$/, Pa],
1253
+ [/^(?:unlink)$/, Na],
1254
1254
  [/^(?:increase|grow|raise)$/, Yn],
1255
1255
  [/^(?:decrease|shrink|lower)$/, Vn],
1256
1256
  [/^(?:refresh|reload|update|sync)$/, bi],
1257
1257
  [/^(?:define|edit|modify|configure)$/, tt],
1258
1258
  [/^(?:arrange|order|bring|send)$/, Qt],
1259
- [/^(?:snap)$/, Na],
1259
+ [/^(?:snap)$/, Pa],
1260
1260
  [/^(?:smooth|simplify)$/, gn],
1261
1261
  [/^(?:stroke|outline)$/, it],
1262
1262
  [/^(?:fill)$/, xt],
1263
1263
  [/^(?:mask)$/, jn]
1264
1264
  ], or = [
1265
- [/\b(?:heading|title)\b/, qr],
1265
+ [/\b(?:heading|title)\b/, Ur],
1266
1266
  [/\b(?:level|outline|tree)\b/, Lo],
1267
- [/\b(?:code)\b/, Po],
1268
- [/\b(?:direction)\b/, No],
1269
- [/\b(?:waypoints?|bends?)\b/, Ur],
1267
+ [/\b(?:code)\b/, No],
1268
+ [/\b(?:direction)\b/, Po],
1269
+ [/\b(?:waypoints?|bends?)\b/, qr],
1270
1270
  [/\b(?:stats|statistics|performance)\b/, Fo],
1271
1271
  [/\b(?:mixer)\b/, _t],
1272
1272
  [/\b(?:clipboard)\b/, Wo],
@@ -1282,22 +1282,22 @@ const Il = [
1282
1282
  [/\b(?:pen)\b/, Gr],
1283
1283
  [/\b(?:pencil)\b/, tt],
1284
1284
  [/\b(?:highlighter)\b/, Yr],
1285
- [/\b(?:word)\b/, qo],
1286
- [/\b(?:caret|cursor)\b/, Uo],
1285
+ [/\b(?:word)\b/, Uo],
1286
+ [/\b(?:caret|cursor)\b/, qo],
1287
1287
  [/\b(?:distance|perimeter|area)\b/, Ve],
1288
1288
  [/\b(?:work area)\b/, Vr],
1289
1289
  [/\b(?:brush|paint)\b/, Xr],
1290
1290
  [/\b(?:gradient)\b/, Qe],
1291
1291
  [/\b(?:transparen|opacity|blend)\b/, Qe],
1292
1292
  [/\b(?:colou?rs?|swatch|palette)\b/, Rt],
1293
- [/\b(?:font|character|typograph|text|type)\b/, Ue],
1293
+ [/\b(?:font|character|typograph|text|type)\b/, qe],
1294
1294
  [/\b(?:para(graph)?)\b/, jo],
1295
1295
  [/\b(?:presets?|styles?)\b/, Go],
1296
1296
  [/\b(?:layers?)\b/, kt],
1297
1297
  [/\b(?:paths?|anchor|point|bezier|curve)\b/, gn],
1298
1298
  [/\b(?:camera)\b/, Yo],
1299
1299
  [/\b(?:track)\b/, Jr],
1300
- [/\b(?:clip|footage|sequence|timeline|multicam)\b/, qn],
1300
+ [/\b(?:clip|footage|sequence|timeline|multicam)\b/, Un],
1301
1301
  [/\b(?:markers?|bookmark)\b/, Zr],
1302
1302
  [/\b(?:keys?|keyframe)\b/, Qr],
1303
1303
  [/\b(?:channel)\b/, _t],
@@ -1306,7 +1306,7 @@ const Il = [
1306
1306
  [/\b(?:frame|artboard)\b/, Jt],
1307
1307
  [/\b(?:data|database|source)\b/, Kn],
1308
1308
  [/\b(?:queue)\b/, Hn],
1309
- [/\b(?:project)\b/, Un],
1309
+ [/\b(?:project)\b/, qn],
1310
1310
  [/\b(?:comp(osition)?)\b/, kt],
1311
1311
  [/\b(?:playhead|time|duration)\b/, Vo],
1312
1312
  [/\b(?:audio|sound|volume)\b/, Xo],
@@ -1317,8 +1317,8 @@ const Il = [
1317
1317
  [/\b(?:solid)\b/, ct],
1318
1318
  [/\b(?:null)\b/, Zo],
1319
1319
  [/\b(?:adjustment)\b/, _t],
1320
- [/\b(?:footage|media)\b/, qn],
1321
- [/\b(?:folder)\b/, Un],
1320
+ [/\b(?:footage|media)\b/, Un],
1321
+ [/\b(?:folder)\b/, qn],
1322
1322
  [/\b(?:mosaic)\b/, Qo],
1323
1323
  [/\b(?:gradient mesh|mesh)\b/, St],
1324
1324
  [/\b(?:line|arrow)\b/, ea],
@@ -1344,7 +1344,7 @@ function Ge(e) {
1344
1344
  const a = Ml.find(([s]) => s.test(r) || s.test(i))?.[1];
1345
1345
  return a || (or.find(([s]) => s.test(o))?.[1] ?? Il.find(([s]) => s.test(o))?.[1] ?? at);
1346
1346
  }
1347
- function Nt(e) {
1347
+ function Pt(e) {
1348
1348
  return Object.values(e.schema ?? {}).some((t) => t.required);
1349
1349
  }
1350
1350
  const Tl = 6, sr = (e) => typeof e == "string" ? e : JSON.stringify(e);
@@ -1378,19 +1378,19 @@ function Ol({
1378
1378
  title: o
1379
1379
  }) {
1380
1380
  const a = e.schema ?? {}, [s, d] = B(() => Object.fromEntries(Object.entries(a).map(([m, y]) => [m, Al(y, i[m])]))), c = Object.entries(a), l = c.length > Tl, p = ([m, y]) => !l || y.required || i[m] !== void 0, h = c.filter(p), f = c.filter((m) => !p(m)), g = ([m, y]) => {
1381
- const I = (E) => d((Y) => ({ ...Y, [m]: E })), P = `param-${m}`;
1381
+ const I = (E) => d((Y) => ({ ...Y, [m]: E })), N = `param-${m}`;
1382
1382
  return [
1383
- /* @__PURE__ */ M("label", { htmlFor: P, title: y.description, children: [
1383
+ /* @__PURE__ */ M("label", { htmlFor: N, title: y.description, children: [
1384
1384
  m,
1385
1385
  y.required ? /* @__PURE__ */ u("span", { title: r.required, children: " *" }) : null
1386
1386
  ] }, `${m}-label`),
1387
- y.enum?.length ? /* @__PURE__ */ M("select", { id: P, className: "kui-field", value: s[m], onChange: (E) => I(E.target.value), children: [
1387
+ y.enum?.length ? /* @__PURE__ */ M("select", { id: N, className: "kui-field", value: s[m], onChange: (E) => I(E.target.value), children: [
1388
1388
  y.required ? null : /* @__PURE__ */ u("option", { value: "" }),
1389
1389
  y.enum.map((E) => /* @__PURE__ */ u("option", { value: String(E), children: String(E) }, String(E)))
1390
- ] }, m) : y.type === "boolean" ? /* @__PURE__ */ u("input", { id: P, type: "checkbox", checked: s[m] === "true", onChange: (E) => I(String(E.target.checked)) }, m) : /* @__PURE__ */ u(
1390
+ ] }, m) : y.type === "boolean" ? /* @__PURE__ */ u("input", { id: N, type: "checkbox", checked: s[m] === "true", onChange: (E) => I(String(E.target.checked)) }, m) : /* @__PURE__ */ u(
1391
1391
  "input",
1392
1392
  {
1393
- id: P,
1393
+ id: N,
1394
1394
  className: "kui-field",
1395
1395
  type: y.type === "number" || y.type === "integer" ? "number" : "text",
1396
1396
  value: s[m],
@@ -1403,8 +1403,8 @@ function Ol({
1403
1403
  }, w = Object.entries(a).some(([m, y]) => y.required && (s[m] ?? "").trim() === ""), b = () => {
1404
1404
  const m = {};
1405
1405
  for (const [y, I] of Object.entries(a)) {
1406
- const P = El(I, s[y] ?? "");
1407
- P !== void 0 && (m[y] = P);
1406
+ const N = El(I, s[y] ?? "");
1407
+ N !== void 0 && (m[y] = N);
1408
1408
  }
1409
1409
  t(m);
1410
1410
  };
@@ -1500,7 +1500,7 @@ function _i(e, t) {
1500
1500
  return i ? o.replace(/\{(\w+)\}/g, (a, s) => s in i ? String(i[s]) : a) : o;
1501
1501
  };
1502
1502
  }
1503
- const Ll = /* @__PURE__ */ new Set(["Cmd+N", "Cmd+W", "Cmd+O", "Cmd+P", "Cmd+Q", "Cmd+,", "Cmd+S", "Cmd+Shift+S", "Cmd+T", "Cmd+."]), Pl = Ll, lr = {
1503
+ const Ll = /* @__PURE__ */ new Set(["Cmd+N", "Cmd+W", "Cmd+O", "Cmd+P", "Cmd+Q", "Cmd+,", "Cmd+S", "Cmd+Shift+S", "Cmd+T", "Cmd+."]), Nl = Ll, lr = {
1504
1504
  "[": "BracketLeft",
1505
1505
  "]": "BracketRight",
1506
1506
  ",": "Comma",
@@ -1520,11 +1520,11 @@ function cr(e, t, n = Ki(), r = !1) {
1520
1520
  const i = e.split("+"), o = i.length > 1 && i[i.length - 1] === "" ? "+" : i.pop() ?? "", a = new Set(i.filter(Boolean)), s = a.has("Cmd"), d = n ? t.metaKey : t.ctrlKey, c = n ? t.ctrlKey : !1;
1521
1521
  return s !== d || a.has("Ctrl") !== c || a.has("Shift") !== t.shiftKey || a.has("Alt") !== t.altKey ? !1 : /^[A-Za-z]$/.test(o) ? t.code === `Key${o.toUpperCase()}` : /^[0-9]$/.test(o) ? t.code === `Digit${o}` : lr[o] ? t.code === lr[o] : o === "Delete" ? t.key === "Delete" || !r && t.key === "Backspace" : t.key === o;
1522
1522
  }
1523
- function Nl(e) {
1524
- return !e || Pl.has(e) ? !1 : e.includes("+") || /^(Delete|Backspace|PageUp|PageDown|F[0-9]{1,2})$/.test(e);
1523
+ function Pl(e) {
1524
+ return !e || Nl.has(e) ? !1 : e.includes("+") || /^(Delete|Backspace|PageUp|PageDown|F[0-9]{1,2})$/.test(e);
1525
1525
  }
1526
1526
  function Fl(e, t, n = Ki()) {
1527
- const r = e.filter((i) => Nl(i.shortcut));
1527
+ const r = e.filter((i) => Pl(i.shortcut));
1528
1528
  return r.find((i) => cr(i.shortcut, t, n, !0)) ?? r.find((i) => cr(i.shortcut, t, n));
1529
1529
  }
1530
1530
  const Wl = 4, Re = {
@@ -1556,7 +1556,7 @@ function fu(e, t, n = !1) {
1556
1556
  const o = Math.round(Math.min(e.x, e.x + r)), a = Math.round(Math.min(e.y, e.y + i)), s = Math.round(Math.max(e.x, e.x + r)), d = Math.round(Math.max(e.y, e.y + i));
1557
1557
  return { x: o, y: a, width: s - o, height: d - a };
1558
1558
  }
1559
- const Ut = 8e6, zl = 33554432, dr = 8192, Bl = [0.5, 0.25, 0], ur = 32, _l = 0.01, Kl = 64, Ee = 8;
1559
+ const qt = 8e6, zl = 33554432, dr = 8192, Bl = [0.5, 0.25, 0], ur = 32, _l = 0.01, Kl = 64, Ee = 8;
1560
1560
  function hr(e, t, n, r) {
1561
1561
  const i = (a, s) => ({ pinned: !1, off: t, s0: a, s1: n, d0: s, d1: t + n / r });
1562
1562
  if (e <= 0) return [i(0, t)];
@@ -1592,7 +1592,7 @@ function Hl(e) {
1592
1592
  const n = t.getContext("2d");
1593
1593
  return n ? (n.fillStyle = "#ffffff", n.fillRect(0, 0, Ee * 2, Ee * 2), n.fillStyle = "#e8e8ec", n.fillRect(0, 0, Ee, Ee), n.fillRect(Ee, Ee, Ee, Ee), e.createPattern(t, "repeat")) : null;
1594
1594
  }
1595
- class ql {
1595
+ class Ul {
1596
1596
  constructor(t, n, r, i, o = !0, a = () => {
1597
1597
  }) {
1598
1598
  this.canvas = t, this.doc = n, this.backdrop = r, this.onChange = i, this.framed = o, this.onRender = a;
@@ -1813,16 +1813,16 @@ class ql {
1813
1813
  x1: Math.min(this.doc.width, Math.ceil(t.area.x1 + b)),
1814
1814
  y1: Math.min(this.doc.height, Math.ceil(t.area.y1 + m))
1815
1815
  };
1816
- }, o = (w) => (w.x1 - w.x0) * (w.y1 - w.y0) * Math.min(1, r) ** 2 * Math.max(1, r) ** 2 <= Ut, { x0: a, y0: s, x1: d, y1: c } = Bl.map(i).find((w) => o(w)) ?? i(0);
1816
+ }, o = (w) => (w.x1 - w.x0) * (w.y1 - w.y0) * Math.min(1, r) ** 2 * Math.max(1, r) ** 2 <= qt, { x0: a, y0: s, x1: d, y1: c } = Bl.map(i).find((w) => o(w)) ?? i(0);
1817
1817
  if (d <= a || c <= s) return null;
1818
1818
  let l, p, h, f;
1819
1819
  if (r < 1) {
1820
1820
  let w = Math.max(1, Math.floor(1 / r));
1821
- for (; (d - a) / w * ((c - s) / w) > Ut; ) w += 1;
1821
+ for (; (d - a) / w * ((c - s) / w) > qt; ) w += 1;
1822
1822
  h = Math.ceil((d - a) / w), f = Math.ceil((c - s) / w), p = await this.doc.renderArea(a, s, a + h * w, s + f * w, h, f), l = { x: a, y: s, width: h * w, height: f * w, scale: 1 / w };
1823
1823
  } else {
1824
1824
  let w = r;
1825
- const b = (d - a) * (c - s) * w * w, m = i(0), y = Math.max(Ut, Math.min(zl, (m.x1 - m.x0) * (m.y1 - m.y0) * r * r));
1825
+ const b = (d - a) * (c - s) * w * w, m = i(0), y = Math.max(qt, Math.min(zl, (m.x1 - m.x0) * (m.y1 - m.y0) * r * r));
1826
1826
  b > y && (w = Math.max(1, w * Math.sqrt(y / b))), w = Math.max(1, Math.min(w, dr / (d - a), dr / (c - s))), h = Math.max(1, Math.ceil((d - a) * w)), f = Math.max(1, Math.ceil((c - s) * w)), p = await this.doc.render(a, s, w, h, f), l = { x: a, y: s, width: h / w, height: f / w, scale: w };
1827
1827
  }
1828
1828
  const g = document.createElement("canvas");
@@ -1896,15 +1896,15 @@ class ql {
1896
1896
  return c ? [c[0], c[1], c[2]] : null;
1897
1897
  }
1898
1898
  }
1899
- const Ul = "#f3f3f6";
1899
+ const ql = "#f3f3f6";
1900
1900
  function pr() {
1901
- return getComputedStyle(document.documentElement).getPropertyValue("--kit-canvas").trim() || Ul;
1901
+ return getComputedStyle(document.documentElement).getPropertyValue("--kit-canvas").trim() || ql;
1902
1902
  }
1903
1903
  const jl = 0.01, Gl = 100;
1904
1904
  function Yl(e, t = 1) {
1905
1905
  return e.pointerType !== "pen" ? 1 : e.pressure > 0 ? e.pressure : t;
1906
1906
  }
1907
- function qe(e, t, n = 1) {
1907
+ function Ue(e, t, n = 1) {
1908
1908
  const r = t.toImage(e.clientX, e.clientY), i = t.toScreen(r.x, r.y);
1909
1909
  return {
1910
1910
  x: r.x,
@@ -1936,35 +1936,35 @@ function Vl(e, t) {
1936
1936
  };
1937
1937
  }
1938
1938
  function Xl({ doc: e, change: t, repaint: n, tool: r, onView: i, onRender: o, viewMemory: a, initialArea: s = null, panBounds: d = null, decorate: c = null, animated: l = !1, spacePans: p = !0, framed: h = !0, children: f, ref: g }) {
1939
- const w = R(null), b = R(null), m = R(null), y = R(null), [I, P] = B(!1), E = R({ doc: e, onView: i, onRender: o, initialArea: s, panBounds: d });
1939
+ const w = R(null), b = R(null), m = R(null), y = R(null), [I, N] = B(!1), E = R({ doc: e, onView: i, onRender: o, initialArea: s, panBounds: d });
1940
1940
  E.current = { doc: e, onView: i, onRender: o, initialArea: s, panBounds: d };
1941
1941
  const Y = Vl(b, m);
1942
1942
  J(() => {
1943
1943
  const k = w.current;
1944
1944
  if (!k) return;
1945
1945
  let O = a.current != null;
1946
- const U = new ql(k, e, pr(), (_, T) => {
1946
+ const q = new Ul(k, e, pr(), (_, T) => {
1947
1947
  O && (a.current = _), E.current.onView({ ..._, width: k.clientWidth, height: k.clientHeight }, T);
1948
1948
  }, h, (_) => {
1949
1949
  E.current.doc === e && E.current.onRender?.(_);
1950
1950
  });
1951
- m.current = U, a.current && (U.view = { ...a.current }), U.setPanBounds(E.current.panBounds);
1951
+ m.current = q, a.current && (q.view = { ...a.current }), q.setPanBounds(E.current.panBounds);
1952
1952
  const x = new ResizeObserver(() => {
1953
1953
  if (!O && k.clientWidth > 0 && k.clientHeight > 0) {
1954
1954
  O = !0;
1955
1955
  const _ = E.current.initialArea;
1956
- _ ? U.fitArea(_) : U.fit();
1956
+ _ ? q.fitArea(_) : q.fit();
1957
1957
  }
1958
- O && U.resized(), U.render();
1958
+ O && q.resized(), q.render();
1959
1959
  });
1960
1960
  x.observe(k);
1961
1961
  const C = (_) => {
1962
- _.preventDefault(), _.ctrlKey || _.metaKey ? U.zoomTo(U.view.zoom * Math.exp(-_.deltaY * jl), _.clientX, _.clientY) : U.panBy(-_.deltaX, -_.deltaY);
1962
+ _.preventDefault(), _.ctrlKey || _.metaKey ? q.zoomTo(q.view.zoom * Math.exp(-_.deltaY * jl), _.clientX, _.clientY) : q.panBy(-_.deltaX, -_.deltaY);
1963
1963
  };
1964
1964
  k.addEventListener("wheel", C, { passive: !1 });
1965
- const W = typeof MutationObserver > "u" ? null : new MutationObserver(() => U.setBackdrop(pr()));
1965
+ const W = typeof MutationObserver > "u" ? null : new MutationObserver(() => q.setBackdrop(pr()));
1966
1966
  return W?.observe(document.documentElement, { attributes: !0, attributeFilter: ["style", "data-color-scheme", "data-brand", "class"] }), () => {
1967
- W?.disconnect(), x.disconnect(), k.removeEventListener("wheel", C), U.dispose(), m.current = null;
1967
+ W?.disconnect(), x.disconnect(), k.removeEventListener("wheel", C), q.dispose(), m.current = null;
1968
1968
  };
1969
1969
  }, [e, h, a]), J(() => m.current?.setPanBounds(d), [e, d]), J(() => {
1970
1970
  const k = m.current;
@@ -1972,10 +1972,10 @@ function Xl({ doc: e, change: t, repaint: n, tool: r, onView: i, onRender: o, vi
1972
1972
  O && Y.clear();
1973
1973
  }));
1974
1974
  }, [t]);
1975
- const q = R(n?.tick ?? 0);
1975
+ const U = R(n?.tick ?? 0);
1976
1976
  J(() => {
1977
1977
  const k = m.current;
1978
- !k || !n || n.tick === q.current || (q.current = n.tick, k.invalidate(), n.damage ? k.renderArea(n.damage) : k.render());
1978
+ !k || !n || n.tick === U.current || (U.current = n.tick, k.invalidate(), n.damage ? k.renderArea(n.damage) : k.render());
1979
1979
  }, [n]), J(() => {
1980
1980
  const k = m.current;
1981
1981
  if (!k || (k.decorate = c, k.draw(), !l || !c)) return;
@@ -1984,12 +1984,12 @@ function Xl({ doc: e, change: t, repaint: n, tool: r, onView: i, onRender: o, vi
1984
1984
  }, [l, c, e]), J(() => {
1985
1985
  if (!p) return;
1986
1986
  const k = (x) => x instanceof HTMLInputElement || x instanceof HTMLTextAreaElement, O = (x) => {
1987
- x.code === "Space" && !k(x.target) && P(!0);
1988
- }, U = (x) => {
1989
- x.code === "Space" && P(!1);
1987
+ x.code === "Space" && !k(x.target) && N(!0);
1988
+ }, q = (x) => {
1989
+ x.code === "Space" && N(!1);
1990
1990
  };
1991
- return window.addEventListener("keydown", O), window.addEventListener("keyup", U), () => {
1992
- window.removeEventListener("keydown", O), window.removeEventListener("keyup", U);
1991
+ return window.addEventListener("keydown", O), window.addEventListener("keyup", q), () => {
1992
+ window.removeEventListener("keydown", O), window.removeEventListener("keyup", q);
1993
1993
  };
1994
1994
  }, [p]), Oo(g, () => ({
1995
1995
  view: () => {
@@ -2013,28 +2013,28 @@ function Xl({ doc: e, change: t, repaint: n, tool: r, onView: i, onRender: o, vi
2013
2013
  const O = V();
2014
2014
  if (!O || k.button === 2) return;
2015
2015
  k.preventDefault();
2016
- const U = k.currentTarget.closest("[tabindex]");
2017
- U && document.activeElement !== U && U.focus({ preventScroll: !0 }), k.currentTarget.setPointerCapture(k.pointerId);
2018
- const x = I || k.button === 1 ? Re : r, C = qe(k, O.viewport);
2016
+ const q = k.currentTarget.closest("[tabindex]");
2017
+ q && document.activeElement !== q && q.focus({ preventScroll: !0 }), k.currentTarget.setPointerCapture(k.pointerId);
2018
+ const x = I || k.button === 1 ? Re : r, C = Ue(k, O.viewport);
2019
2019
  j.current = C.pressure, y.current = x.begin(C, O) || null;
2020
2020
  }, Z = (k) => {
2021
- const O = V(), U = y.current;
2022
- if (O && r.track?.(qe(k, O.viewport), O), O && !U && !I && k.buttons === 0 && r.hover?.(qe(k, O.viewport), O), !(!O || !U?.move))
2021
+ const O = V(), q = y.current;
2022
+ if (O && r.track?.(Ue(k, O.viewport), O), O && !q && !I && k.buttons === 0 && r.hover?.(Ue(k, O.viewport), O), !(!O || !q?.move))
2023
2023
  for (const x of k.nativeEvent.getCoalescedEvents?.() ?? [k.nativeEvent]) {
2024
- const C = qe(x, O.viewport, j.current);
2025
- j.current = C.pressure, U.move(C, O);
2024
+ const C = Ue(x, O.viewport, j.current);
2025
+ j.current = C.pressure, q.move(C, O);
2026
2026
  }
2027
2027
  }, Q = (k) => {
2028
- const O = V(), U = y.current;
2029
- y.current = null, O && U && U.end?.(qe(k, O.viewport, j.current), O);
2028
+ const O = V(), q = y.current;
2029
+ y.current = null, O && q && q.end?.(Ue(k, O.viewport, j.current), O);
2030
2030
  }, fe = R(() => {
2031
2031
  });
2032
2032
  fe.current = (k) => {
2033
2033
  const O = y.current;
2034
2034
  if (!O || k.key !== "Escape" || k.isComposing || k.metaKey || k.ctrlKey || k.altKey || k.shiftKey) return;
2035
2035
  y.current = null;
2036
- const U = V();
2037
- U && O.cancel?.(U), Y.clear(), k.preventDefault(), k.stopPropagation();
2036
+ const q = V();
2037
+ q && O.cancel?.(q), Y.clear(), k.preventDefault(), k.stopPropagation();
2038
2038
  }, J(() => {
2039
2039
  const k = (O) => fe.current(O);
2040
2040
  return window.addEventListener("keydown", k, !0), () => window.removeEventListener("keydown", k, !0);
@@ -2061,7 +2061,7 @@ function Xl({ doc: e, change: t, repaint: n, tool: r, onView: i, onRender: o, vi
2061
2061
  },
2062
2062
  onDoubleClick: (k) => {
2063
2063
  const O = V();
2064
- O && r.doubleClick?.(qe({ ...k, clientX: k.clientX, clientY: k.clientY, pressure: 1 }, O.viewport), O);
2064
+ O && r.doubleClick?.(Ue({ ...k, clientX: k.clientX, clientY: k.clientY, pressure: 1 }, O.viewport), O);
2065
2065
  },
2066
2066
  onContextMenu: (k) => k.preventDefault(),
2067
2067
  "data-testid": "kit-canvas-surface"
@@ -2079,8 +2079,8 @@ function Jl(e) {
2079
2079
  return t;
2080
2080
  }
2081
2081
  const Hi = /* @__PURE__ */ new WeakMap();
2082
- function qi(e) {
2083
- return [e, ...(Hi.get(e) ?? []).flatMap(qi)];
2082
+ function Ui(e) {
2083
+ return [e, ...(Hi.get(e) ?? []).flatMap(Ui)];
2084
2084
  }
2085
2085
  function gr(e, t) {
2086
2086
  if (!e || !t) return e ?? t ?? null;
@@ -2091,7 +2091,7 @@ function gr(e, t) {
2091
2091
  } finally {
2092
2092
  r.restore();
2093
2093
  }
2094
- const a = qi(e).filter((s) => !wt.has(s));
2094
+ const a = Ui(e).filter((s) => !wt.has(s));
2095
2095
  for (const s of a) wt.add(s);
2096
2096
  r.save();
2097
2097
  try {
@@ -2107,7 +2107,7 @@ const Ke = "kit:";
2107
2107
  function Ft(e) {
2108
2108
  return e.startsWith(Ke) ? `control:${e.slice(Ke.length)}` : `command:${e}`;
2109
2109
  }
2110
- function Ui(e) {
2110
+ function qi(e) {
2111
2111
  const t = [], n = /* @__PURE__ */ new Set();
2112
2112
  for (const r of e) {
2113
2113
  for (let o = 1; o <= r.path.length; o += 1) {
@@ -2134,7 +2134,7 @@ const ji = [
2134
2134
  function Zl(e) {
2135
2135
  if (!e) return null;
2136
2136
  const t = Object.keys(sn).flatMap((n) => (e[n] ?? []).map((r) => r.id));
2137
- return /* @__PURE__ */ new Set([...Ui(e.menus ?? []).map((n) => n.id), ...t, ...ji.map((n) => n.id)]);
2137
+ return /* @__PURE__ */ new Set([...qi(e.menus ?? []).map((n) => n.id), ...t, ...ji.map((n) => n.id)]);
2138
2138
  }
2139
2139
  function Gi({ commands: e, declaration: t, engineTools: n, agent: r, t: i, phrase: o, config: a }) {
2140
2140
  const s = [], d = /* @__PURE__ */ new Set(), c = (l, p, h, f, g = []) => {
@@ -2143,7 +2143,7 @@ function Gi({ commands: e, declaration: t, engineTools: n, agent: r, t: i, phras
2143
2143
  const w = Se(a, l, g);
2144
2144
  s.push({ id: l, kind: p, label: h, parent: f, hidden: w.hidden, disabled: w.disabled });
2145
2145
  };
2146
- for (const l of Ui(t?.menus ?? [])) c(l.id, l.kind, o(l.label), l.parent, l.menu);
2146
+ for (const l of qi(t?.menus ?? [])) c(l.id, l.kind, o(l.label), l.parent, l.menu);
2147
2147
  for (const l of e) {
2148
2148
  for (let p = 1; p <= l.menu.length; p += 1) {
2149
2149
  const h = p > 1 ? `menu:${l.menu.slice(0, p - 1).join("/")}` : null;
@@ -2157,7 +2157,7 @@ function Gi({ commands: e, declaration: t, engineTools: n, agent: r, t: i, phras
2157
2157
  for (const l of ji) (r || l.id !== "action:agent") && c(l.id, "action", i(l.label), null);
2158
2158
  return s;
2159
2159
  }
2160
- const Ql = () => !1, Wt = Ot(null), ec = Pi(nn, null, () => {
2160
+ const Ql = () => !1, Wt = Ot(null), ec = Ni(nn, null, () => {
2161
2161
  });
2162
2162
  function be() {
2163
2163
  const e = Le(Wt), t = e?.store ?? ec, n = He(t.subscribe, t.get);
@@ -2853,10 +2853,10 @@ function wu(e, t, n, r, i = (s) => s, o, a = {}) {
2853
2853
  []
2854
2854
  ), I = R(e);
2855
2855
  I.current = e;
2856
- const P = He(t.ui.subscribe, t.ui.get), E = a.history ?? null, [, Y] = B(0);
2856
+ const N = He(t.ui.subscribe, t.ui.get), E = a.history ?? null, [, Y] = B(0);
2857
2857
  J(() => E?.subscribe(() => Y((T) => T + 1)), [E]);
2858
- const q = R(E);
2859
- q.current = E;
2858
+ const U = R(E);
2859
+ U.current = E;
2860
2860
  const V = t.readOnly === !0, j = e.comments ?? Xi, D = H((T) => V && It(T, j), [j, V]);
2861
2861
  J(() => {
2862
2862
  c && c.commands().then(h);
@@ -2872,8 +2872,8 @@ function wu(e, t, n, r, i = (s) => s, o, a = {}) {
2872
2872
  const Z = H(async (T, K = {}) => {
2873
2873
  const ne = I.current.doc;
2874
2874
  if (!ne) return null;
2875
- const N = fe.current.get(T);
2876
- if (N?.mutates && Se(t.ui.get(), `command:${T}`, N.menu).denied || N && D(N)) return null;
2875
+ const P = fe.current.get(T);
2876
+ if (P?.mutates && Se(t.ui.get(), `command:${T}`, P.menu).denied || P && D(P)) return null;
2877
2877
  try {
2878
2878
  return JSON.parse(await ne.execute(T, K));
2879
2879
  } catch {
@@ -2883,16 +2883,16 @@ function wu(e, t, n, r, i = (s) => s, o, a = {}) {
2883
2883
  fe.current = Q;
2884
2884
  const ce = H(
2885
2885
  async (T, K) => {
2886
- const ne = Q.get(T), N = q.current, G = N ? yr[T] : void 0;
2887
- if (N && G) {
2886
+ const ne = Q.get(T), P = U.current, G = P ? yr[T] : void 0;
2887
+ if (P && G) {
2888
2888
  if (Se(t.ui.get(), `command:${T}`, ne?.menu).denied || Se(t.ui.get(), `action:${G}`).denied) return null;
2889
2889
  try {
2890
- return JSON.stringify({ done: await N[G]() !== !1 });
2890
+ return JSON.stringify({ done: await P[G]() !== !1 });
2891
2891
  } catch (ue) {
2892
2892
  return d(n("commandFailed"), ue), null;
2893
2893
  }
2894
2894
  }
2895
- if (!K && ne && Nt(ne) && !Se(t.ui.get(), `command:${T}`, ne.menu).denied && !D(ne))
2895
+ if (!K && ne && Pt(ne) && !Se(t.ui.get(), `command:${T}`, ne.menu).denied && !D(ne))
2896
2896
  return y(ne), null;
2897
2897
  try {
2898
2898
  return await I.current.run(T, K ?? {});
@@ -2901,25 +2901,25 @@ function wu(e, t, n, r, i = (s) => s, o, a = {}) {
2901
2901
  }
2902
2902
  },
2903
2903
  [Q, j, t, V, D, d, y, n]
2904
- ), k = E ? E.canUndo() : c?.info?.canUndo ?? !1, O = E ? E.canRedo() : c?.info?.canRedo ?? !1, U = H(
2904
+ ), k = E ? E.canUndo() : c?.info?.canUndo ?? !1, O = E ? E.canRedo() : c?.info?.canRedo ?? !1, q = H(
2905
2905
  (T, K) => {
2906
2906
  const ne = Q.get(T);
2907
- if (!ne || Se(P, `command:${T}`, ne.menu).denied) return !1;
2908
- const N = E ? yr[T] : void 0;
2909
- if (N) return N === "undo" ? k : O;
2907
+ if (!ne || Se(N, `command:${T}`, ne.menu).denied) return !1;
2908
+ const P = E ? yr[T] : void 0;
2909
+ if (P) return P === "undo" ? k : O;
2910
2910
  if (K.has(T) || D(ne)) return !1;
2911
- const G = V ? Ni(T, j) : null;
2911
+ const G = V ? Pi(T, j) : null;
2912
2912
  return G === null || (G === "undo" ? k : O);
2913
2913
  },
2914
- [Q, O, k, j, E, V, D, P]
2915
- ), x = H((T) => U(T, f), [f, U]), C = H(
2914
+ [Q, O, k, j, E, V, D, N]
2915
+ ), x = H((T) => q(T, f), [f, q]), C = H(
2916
2916
  async (T) => {
2917
2917
  const K = I.current.doc;
2918
2918
  if (!K) return !1;
2919
2919
  const ne = await I.current.disabledCommands().catch(() => null);
2920
- return ne != null && I.current.doc === K && U(T, new Set(ne));
2920
+ return ne != null && I.current.doc === K && q(T, new Set(ne));
2921
2921
  },
2922
- [U]
2922
+ [q]
2923
2923
  ), W = H(async () => {
2924
2924
  try {
2925
2925
  await I.current.save(), pt("success", n("saved"));
@@ -2994,7 +2994,7 @@ function lc({ command: e, params: t, ask: n, onRun: r, ...i }) {
2994
2994
  label: i.label ?? c(h?.title ?? e),
2995
2995
  disabled: i.disabled || !a(e),
2996
2996
  onClick: () => {
2997
- n ? o.ask(e) : r && t === void 0 && !(h && Nt(h)) ? r(e) : o.run(e, t);
2997
+ n ? o.ask(e) : r && t === void 0 && !(h && Pt(h)) ? r(e) : o.run(e, t);
2998
2998
  },
2999
2999
  onContextMenu: p ?? i.onContextMenu,
3000
3000
  "data-testid": `${d}-cmd-${e}`,
@@ -3056,7 +3056,7 @@ function cc({
3056
3056
  disabled: !l(e) || !!b?.disabled,
3057
3057
  checked: a,
3058
3058
  onSelect: () => {
3059
- i ? c.ask(e) : d && t === void 0 && !(m && Nt(m)) ? d(e) : c.run(e, t);
3059
+ i ? c.ask(e) : d && t === void 0 && !(m && Pt(m)) ? d(e) : c.run(e, t);
3060
3060
  },
3061
3061
  testId: `${h}-cmd-${e}`,
3062
3062
  uiId: `command:${e}`
@@ -3120,7 +3120,7 @@ function Cu({
3120
3120
  decorateUnder: l,
3121
3121
  children: p
3122
3122
  }) {
3123
- const h = te(), f = Xe(), g = R(null), { doc: w, change: b, failure: m, repaints: y } = h.session, [I, P] = B(null), E = He(y.subscribe, y.get), { t: Y } = h, q = f?.decorate ?? null, V = pe(() => gr(gr(l, q), c), [c, l, q]);
3123
+ const h = te(), f = Xe(), g = R(null), { doc: w, change: b, failure: m, repaints: y } = h.session, [I, N] = B(null), E = He(y.subscribe, y.get), { t: Y } = h, U = f?.decorate ?? null, V = pe(() => gr(gr(l, U), c), [c, l, U]);
3124
3124
  return /* @__PURE__ */ M("div", { className: "kui-canvas-region", "data-testid": s ?? `${h.testId}-canvas-region`, children: [
3125
3125
  m ? /* @__PURE__ */ M("div", { className: "kui-message", role: "alert", children: [
3126
3126
  /* @__PURE__ */ u("strong", { children: Y("openFailed") }),
@@ -3143,7 +3143,7 @@ function Cu({
3143
3143
  onView: (j, D) => {
3144
3144
  f?.viewZoom?.(j.zoom), a?.(j, D);
3145
3145
  },
3146
- onRender: (j) => P(j === null ? null : { doc: w, message: Dn(j) }),
3146
+ onRender: (j) => N(j === null ? null : { doc: w, message: Dn(j) }),
3147
3147
  children: [
3148
3148
  p,
3149
3149
  I?.doc === w ? /* @__PURE__ */ u(ac, { message: I.message, title: Y("renderFailed"), retryLabel: Y("retryRender"), onRetry: () => {
@@ -3159,7 +3159,7 @@ const vr = 1.25, hc = /* @__PURE__ */ new Set(["checkbox", "radio", "button", "s
3159
3159
  function kr(e) {
3160
3160
  return e instanceof HTMLInputElement ? !hc.has(e.type) : e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement && !e.classList.contains("kui-text-sink");
3161
3161
  }
3162
- function Pn() {
3162
+ function Nn() {
3163
3163
  const e = te(), t = be(), n = e.host.readOnly === !0, r = n && (e.comments?.size ?? 0) > 0, i = (o, a, s) => {
3164
3164
  const d = t.state(`action:${o}`), c = t.state(`command:${a}`);
3165
3165
  return { hidden: d.hidden || c.hostHidden || n && !r, disabled: !s || d.disabled || c.denied };
@@ -3167,7 +3167,7 @@ function Pn() {
3167
3167
  return { undo: i("undo", "edit.undo", e.canUndo), redo: i("redo", "edit.redo", e.canRedo), readOnly: n, commenting: r };
3168
3168
  }
3169
3169
  function fc({ before: e, mode: t }) {
3170
- const n = te(), r = be(), { session: i, host: o, t: a, testId: s } = n, { dirty: d } = i, c = (g) => r.state(`action:${g}`), { undo: l, redo: p, readOnly: h, commenting: f } = Pn();
3170
+ const n = te(), r = be(), { session: i, host: o, t: a, testId: s } = n, { dirty: d } = i, c = (g) => r.state(`action:${g}`), { undo: l, redo: p, readOnly: h, commenting: f } = Nn();
3171
3171
  return /* @__PURE__ */ M(Ce, { children: [
3172
3172
  e,
3173
3173
  /* @__PURE__ */ u(zt, { place: "action", as: "action" }),
@@ -3199,7 +3199,7 @@ function mc({ x: e, y: t, label: n, testId: r, onHide: i, onClose: o }) {
3199
3199
  }, [o]), /* @__PURE__ */ u("div", { className: "kui-dialog-backdrop kui-hide-menu-backdrop", onPointerDown: o, children: /* @__PURE__ */ u("div", { ref: a, className: "kui-popover kui-hide-menu", role: "menu", style: s ?? { left: e, top: t, visibility: "hidden" }, onPointerDown: (c) => c.stopPropagation(), children: /* @__PURE__ */ u(le, { label: n, onSelect: i, testId: r }) }) });
3200
3200
  }
3201
3201
  function pc({ top: e, status: t, statusEnd: n, onStatusClick: r, canvas: i, zoom: o, onKeyDown: a, statusBar: s = !0, hiddenCommands: d, fileChangedBar: c = !0, frame: l, children: p }) {
3202
- const h = te(), f = Xe(), { session: g, t: w, testId: b } = h, { dirty: m } = g, y = Le(Wt), I = be(), [P, E] = B(null), [Y, q] = B(null), V = H(() => q(null), []), j = R(async () => {
3202
+ const h = te(), f = Xe(), { session: g, t: w, testId: b } = h, { dirty: m } = g, y = Le(Wt), I = be(), [N, E] = B(null), [Y, U] = B(null), V = H(() => U(null), []), j = R(async () => {
3203
3203
  });
3204
3204
  j.current = async (x) => {
3205
3205
  try {
@@ -3213,7 +3213,7 @@ function pc({ top: e, status: t, statusEnd: n, onStatusClick: r, canvas: i, zoom
3213
3213
  const { store: Z } = I, Q = Z.customizable && h.host.declaration !== null, fe = pe(
3214
3214
  () => y && Q ? {
3215
3215
  ...y,
3216
- offerHide: (x, C, W) => q({ id: x, x: C, y: W }),
3216
+ offerHide: (x, C, W) => U({ id: x, x: C, y: W }),
3217
3217
  openCustomize: () => E(D.current()),
3218
3218
  hide: (x) => void j.current([...Z.get().personal, x])
3219
3219
  } : y,
@@ -3221,10 +3221,10 @@ function pc({ top: e, status: t, statusEnd: n, onStatusClick: r, canvas: i, zoom
3221
3221
  ), ce = (x) => x.currentTarget.ownerDocument.querySelector(".kui-dialog-backdrop") != null || x.target instanceof Element && x.target.closest(".kui-dialog") != null, k = (x) => {
3222
3222
  !l || x.nativeEvent.isComposing || ce(x) || l.keyDown(x) && (x.preventDefault(), x.stopPropagation());
3223
3223
  }, O = (x) => {
3224
- U(x);
3224
+ q(x);
3225
3225
  const C = !x.metaKey && !x.ctrlKey && !x.altKey && !x.shiftKey;
3226
3226
  l && C && x.key === "Escape" && !x.defaultPrevented && !x.nativeEvent.isComposing && !ce(x) && !kr(x.target) && l.escape() && x.preventDefault();
3227
- }, U = (x) => {
3227
+ }, q = (x) => {
3228
3228
  if (ce(x)) return;
3229
3229
  const C = x.target, W = kr(C);
3230
3230
  if (W && !((x.metaKey || x.ctrlKey) && !x.altKey && x.key.toLowerCase() === "s")) return;
@@ -3238,18 +3238,18 @@ function pc({ top: e, status: t, statusEnd: n, onStatusClick: r, canvas: i, zoom
3238
3238
  x.preventDefault();
3239
3239
  return;
3240
3240
  }
3241
- const K = I.config.add.find((ye) => ye.shortcut && !ye.disabled && Hr(ye.shortcut, x, Pt()));
3241
+ const K = I.config.add.find((ye) => ye.shortcut && !ye.disabled && Hr(ye.shortcut, x, Nt()));
3242
3242
  if (K) {
3243
3243
  x.preventDefault(), I.press(K.id);
3244
3244
  return;
3245
3245
  }
3246
- const ne = x.metaKey || x.ctrlKey, N = x.key.toLowerCase();
3247
- if (ne && N === "s") {
3246
+ const ne = x.metaKey || x.ctrlKey, P = x.key.toLowerCase();
3247
+ if (ne && P === "s") {
3248
3248
  x.preventDefault(), !I.state("action:save").denied && !h.host.readOnly && h.save();
3249
3249
  return;
3250
3250
  }
3251
- if (i?.current && ne && (N === "0" || N === "=" || N === "+" || N === "-")) {
3252
- x.preventDefault(), N === "0" ? i.current.fit() : i.current.zoomBy(N === "-" ? 1 / vr : vr);
3251
+ if (i?.current && ne && (P === "0" || P === "=" || P === "+" || P === "-")) {
3252
+ x.preventDefault(), P === "0" ? i.current.fit() : i.current.zoomBy(P === "-" ? 1 / vr : vr);
3253
3253
  return;
3254
3254
  }
3255
3255
  const G = Fl(d ? h.commands.filter((ye) => !d(ye.id)) : h.commands, x);
@@ -3315,10 +3315,10 @@ function pc({ top: e, status: t, statusEnd: n, onStatusClick: r, canvas: i, zoom
3315
3315
  },
3316
3316
  h.dialog.command.id
3317
3317
  ) : null,
3318
- P ? /* @__PURE__ */ u(
3318
+ N ? /* @__PURE__ */ u(
3319
3319
  oc,
3320
3320
  {
3321
- catalog: P,
3321
+ catalog: N,
3322
3322
  personal: I.config.personal,
3323
3323
  labels: { title: w("customizeTitle"), search: w("customizeSearch"), restore: w("customizeRestore"), cancel: w("cancel"), save: w("customizeSave") },
3324
3324
  onSave: (x) => {
@@ -3335,7 +3335,7 @@ function pc({ top: e, status: t, statusEnd: n, onStatusClick: r, canvas: i, zoom
3335
3335
  label: w("hideElement"),
3336
3336
  testId: `${b}-hide-element`,
3337
3337
  onHide: () => {
3338
- q(null), j.current([...I.store.get().personal, Y.id]);
3338
+ U(null), j.current([...I.store.get().personal, Y.id]);
3339
3339
  },
3340
3340
  onClose: V
3341
3341
  }
@@ -3365,7 +3365,7 @@ function wc({ label: e, path: t, children: n, uiId: r, testId: i }) {
3365
3365
  }, w = H(() => {
3366
3366
  const m = s.current?.getBoundingClientRect(), y = c.current;
3367
3367
  if (!m || !y) return;
3368
- const I = Math.max(0, window.innerHeight - 16), P = Math.min(y.scrollHeight, I), E = y.offsetWidth, Y = m.right - 2, q = Y + E <= window.innerWidth - 4 ? Y : m.left + 2 - E >= 4 ? m.left + 2 - E : Y, V = Math.max(4, Math.min(q, window.innerWidth - E - 4)), j = Math.max(8, Math.min(m.top - 4, window.innerHeight - 8 - P));
3368
+ const I = Math.max(0, window.innerHeight - 16), N = Math.min(y.scrollHeight, I), E = y.offsetWidth, Y = m.right - 2, U = Y + E <= window.innerWidth - 4 ? Y : m.left + 2 - E >= 4 ? m.left + 2 - E : Y, V = Math.max(4, Math.min(U, window.innerWidth - E - 4)), j = Math.max(8, Math.min(m.top - 4, window.innerHeight - 8 - N));
3369
3369
  p((D) => !D || D.left === V && D.top === j && D.maxHeight === I ? D : { left: V, top: j, maxHeight: I });
3370
3370
  }, []), b = l != null;
3371
3371
  return Te(() => {
@@ -3539,13 +3539,13 @@ function Ic({ tools: e, active: t, onSelect: n, columns: r = 1, onColumns: i, co
3539
3539
  I.current = n, Te(() => {
3540
3540
  y && I.current(y);
3541
3541
  }, [y]);
3542
- const P = [];
3542
+ const N = [];
3543
3543
  for (const D of m) {
3544
- const Z = P.at(-1);
3545
- Z && D.group != null && Z[0].group === D.group ? Z.push(D) : P.push([D]);
3544
+ const Z = N.at(-1);
3545
+ Z && D.group != null && Z[0].group === D.group ? Z.push(D) : N.push([D]);
3546
3546
  }
3547
3547
  const E = [];
3548
- for (const D of P) {
3548
+ for (const D of N) {
3549
3549
  const Z = E.at(-1);
3550
3550
  Z && Z[0][0].section === D[0].section ? Z.push(D) : E.push([D]);
3551
3551
  }
@@ -3553,24 +3553,24 @@ function Ic({ tools: e, active: t, onSelect: n, columns: r = 1, onColumns: i, co
3553
3553
  if (r !== "auto" || typeof ResizeObserver > "u") return;
3554
3554
  const D = w.current, Z = D?.parentElement;
3555
3555
  if (!D || !Z) return;
3556
- const Q = () => g(xc(P.length, E.length, Z.getBoundingClientRect().bottom - D.getBoundingClientRect().top)), fe = new ResizeObserver(Q);
3556
+ const Q = () => g(xc(N.length, E.length, Z.getBoundingClientRect().bottom - D.getBoundingClientRect().top)), fe = new ResizeObserver(Q);
3557
3557
  return fe.observe(Z), () => fe.disconnect();
3558
- }, [r, P.length, E.length]);
3559
- const Y = r === 2 || r === "auto" && f ? 2 : 1, q = o ? b.state(o) : { hidden: !1, disabled: !1 }, V = (D) => {
3558
+ }, [r, N.length, E.length]);
3559
+ const Y = r === 2 || r === "auto" && f ? 2 : 1, U = o ? b.state(o) : { hidden: !1, disabled: !1 }, V = (D) => {
3560
3560
  b.state(`tool:${D}`).denied || n(D);
3561
3561
  }, j = (D) => {
3562
3562
  const Z = (ce) => !b.state(`tool:${ce.id}`).denied, Q = D[0].group == null || !a ? void 0 : l.get(D[0].group), fe = D.find((ce) => ce.id === t) ?? D.find((ce) => ce.id === Q && Z(ce)) ?? D.find(Z) ?? D[0];
3563
3563
  return /* @__PURE__ */ u(vc, { tools: D, shown: fe, active: t, onSelect: V, rail: w, pressMs: s }, D[0].id);
3564
3564
  };
3565
3565
  return /* @__PURE__ */ M("div", { className: "kui-tool-rail", role: "toolbar", "aria-orientation": "vertical", "data-testid": `${d}-tool-rail`, "data-columns": Y, ref: w, children: [
3566
- i && r !== "auto" && !q.hidden ? /* @__PURE__ */ u(
3566
+ i && r !== "auto" && !U.hidden ? /* @__PURE__ */ u(
3567
3567
  "button",
3568
3568
  {
3569
3569
  type: "button",
3570
3570
  className: "kui-tool-rail-columns",
3571
3571
  "aria-label": c(r === 2 ? "railOneColumn" : "railTwoColumns"),
3572
3572
  title: c(r === 2 ? "railOneColumn" : "railTwoColumns"),
3573
- disabled: q.disabled,
3573
+ disabled: U.disabled,
3574
3574
  onClick: () => i(r === 2 ? 1 : 2),
3575
3575
  "data-testid": `${d}-tool-rail-columns`,
3576
3576
  "data-kit-ui-id": o,
@@ -3750,11 +3750,11 @@ function Lc(e, t) {
3750
3750
  schema: r.schema ?? null
3751
3751
  }));
3752
3752
  }
3753
- function Pc(e, t, n, r) {
3753
+ function Nc(e, t, n, r) {
3754
3754
  const i = r?.name || "another session";
3755
3755
  return new he(-32e3, `step ${t} (\`${e}\`) is not allowed: ${i} holds the lease on \`${n}\``, { reason: fn, command: e, step: t, scope: n, ...r ? { holder: r } : {} });
3756
3756
  }
3757
- async function Nc(e, t, n, r, i, o) {
3757
+ async function Pc(e, t, n, r, i, o) {
3758
3758
  if (!t) {
3759
3759
  const s = n ? e.list().find((d) => !d.holder.self && d.scope === "*") : void 0;
3760
3760
  if (s) throw o("*", s.holder);
@@ -3800,8 +3800,8 @@ function Ou(e, t, n, r = {}) {
3800
3800
  async (C, W = {}, _ = null, T = {}) => {
3801
3801
  const K = g.current.doc;
3802
3802
  if (!K) return null;
3803
- const ne = w.current, N = ne.doc === K && ne.map ? ne.map : await b(K);
3804
- if (Se(e.ui.get(), `command:${C}`, N.get(C) ?? []).denied) throw ht(C);
3803
+ const ne = w.current, P = ne.doc === K && ne.map ? ne.map : await b(K);
3804
+ if (Se(e.ui.get(), `command:${C}`, P.get(C) ?? []).denied) throw ht(C);
3805
3805
  if (o && m(C)) throw mt(C);
3806
3806
  try {
3807
3807
  return await c.run(C, W, _, T);
@@ -3810,13 +3810,13 @@ function Ou(e, t, n, r = {}) {
3810
3810
  }
3811
3811
  },
3812
3812
  [m, e, b, o, c.run]
3813
- ), I = r.agentSkipsUnchangedPaint === !0, P = R(r);
3814
- P.current = r;
3813
+ ), I = r.agentSkipsUnchangedPaint === !0, N = R(r);
3814
+ N.current = r;
3815
3815
  const E = pe(() => _i(Vi, e.init.locale), [e]), Y = r.agentLeaseScope != null;
3816
3816
  J(() => {
3817
3817
  Y && dn(e);
3818
3818
  }, [e, Y]);
3819
- const q = R(Promise.resolve()), V = R(null), j = R(null), [D, Z] = B(null), Q = H((C, W) => {
3819
+ const U = R(Promise.resolve()), V = R(null), j = R(null), [D, Z] = B(null), Q = H((C, W) => {
3820
3820
  j.current = { edit: C, revision: W }, Z(C);
3821
3821
  }, []), fe = R(!1), ce = R({ doc: null, version: null }), k = R(null);
3822
3822
  k.current ??= new Cl({
@@ -3838,12 +3838,12 @@ function Ou(e, t, n, r = {}) {
3838
3838
  const C = V.current ?? (j.current?.revision === l.info.revision ? j.current.edit : { by: "person" });
3839
3839
  C.by === "person" && j.current && (j.current = null, Z(null)), e.changed({ dirty: l.info.dirty, revision: l.info.revision, title: e.init.document.name, ...C });
3840
3840
  }, [l, e, h, f]);
3841
- const O = l?.info.schema?.reads ?? null, U = l?.info.schema?.newestAuthor ?? null, x = R(null);
3841
+ const O = l?.info.schema?.reads ?? null, q = l?.info.schema?.newestAuthor ?? null, x = R(null);
3842
3842
  return J(() => {
3843
- if (O === null || U === null || U <= O) return;
3844
- const C = `${O}:${U}`;
3845
- x.current !== C && (x.current = C, e.peer.notify("document/schema", { reads: O, newestAuthor: U }));
3846
- }, [e, U, O]), J(() => {
3843
+ if (O === null || q === null || q <= O) return;
3844
+ const C = `${O}:${q}`;
3845
+ x.current !== C && (x.current = C, e.peer.notify("document/schema", { reads: O, newestAuthor: q }));
3846
+ }, [e, q, O]), J(() => {
3847
3847
  if (!e.replica || !l) return;
3848
3848
  const C = l.info.replica ?? null, W = C ? C.join(",") : null, _ = ce.current;
3849
3849
  ce.current = { doc: l, version: W }, !(_.doc !== l || !C || W === _.version) && e.peer.notify("replica/changed", { version: C.slice().buffer });
@@ -3881,7 +3881,7 @@ function Ou(e, t, n, r = {}) {
3881
3881
  if (ie === !0) return ue(await T(!0), L);
3882
3882
  const S = se.info.context === !0 ? -1 : L.findIndex(($) => $.context != null);
3883
3883
  if (S >= 0) throw Dc(L[S].command, S);
3884
- return N(() => K(se, L, re, ae));
3884
+ return P(() => K(se, L, re, ae));
3885
3885
  });
3886
3886
  const K = async (A, L, re, ie) => {
3887
3887
  const ae = [], se = ie.by === "system" ? { kind: "system", principal: "kdm", label: ie.originLabel } : { kind: "agent", principal: e.init.document.comments?.me ?? "agent", label: "ai/run" }, ge = { last: null, meanwhile: !1 }, v = A.info.context === !0 ? { state: null } : null, z = ($) => ({ ...I ? { skipUnchangedPaint: !0 } : {}, origin: se, ...v ? { agent: { state: v, set: $ } } : {} });
@@ -3946,16 +3946,16 @@ function Ou(e, t, n, r = {}) {
3946
3946
  [],
3947
3947
  L
3948
3948
  ) : $(` The ${L.length} step(s) before it were rolled back: the document is as it was before the run.`, [], L);
3949
- }, N = (A) => {
3950
- const L = q.current.then(A, A);
3951
- return q.current = L.then(
3949
+ }, P = (A) => {
3950
+ const L = U.current.then(A, A);
3951
+ return U.current = L.then(
3952
3952
  () => {
3953
3953
  },
3954
3954
  () => {
3955
3955
  }
3956
3956
  ), L;
3957
3957
  }, G = async (A, L, re, ie, ae, se) => {
3958
- const ge = P.current.agentLeaseScope, v = ge ? dn(e) : null;
3958
+ const ge = N.current.agentLeaseScope, v = ge ? dn(e) : null;
3959
3959
  if (!ge || !v?.available) return ae();
3960
3960
  let z = "";
3961
3961
  try {
@@ -3964,7 +3964,7 @@ function Ou(e, t, n, r = {}) {
3964
3964
  z = "";
3965
3965
  }
3966
3966
  const S = w.current.commands?.get(L)?.mutates ?? !0;
3967
- return Nc(v, z, S, P.current.agentLeaseTtl, ae, ($, F) => (se.by === "agent" && e.notify({ level: "warning", title: E("agentLeaseHeld", { name: F?.name || E("someone") }) }), Pc(L, ie, $, F)));
3967
+ return Pc(v, z, S, N.current.agentLeaseTtl, ae, ($, F) => (se.by === "agent" && e.notify({ level: "warning", title: E("agentLeaseHeld", { name: F?.name || E("someone") }) }), Nc(L, ie, $, F)));
3968
3968
  };
3969
3969
  C.handle("ai/preview", async ({ maxSize: A, draft: L }) => ({ png: await an(L === !0 ? await T(!1) : W(), A) }));
3970
3970
  const ue = async (A, L) => {
@@ -3998,7 +3998,7 @@ function Ou(e, t, n, r = {}) {
3998
3998
  V.current = { by: "agent" };
3999
3999
  try {
4000
4000
  const ie = await _.merge(re, L), ae = g.current.doc;
4001
- return ae && Q({ by: "agent" }, ae.info.revision), ie.merged && P.current.draftMerged?.({ summary: ie.summary }), ie;
4001
+ return ae && Q({ by: "agent" }, ae.info.revision), ie.merged && N.current.draftMerged?.({ summary: ie.summary }), ie;
4002
4002
  } catch (ie) {
4003
4003
  throw ie instanceof Je ? xr(ie.data) : ie;
4004
4004
  } finally {
@@ -4032,11 +4032,11 @@ function Ou(e, t, n, r = {}) {
4032
4032
  return ae.length && _.edited(), v;
4033
4033
  })
4034
4034
  );
4035
- const Pe = C.on("document/fileChanged", () => void g.current.checkFile()), We = C.on("document/held", (A) => {
4035
+ const Ne = C.on("document/fileChanged", () => void g.current.checkFile()), We = C.on("document/held", (A) => {
4036
4036
  typeof A?.version == "string" && g.current.holdFile(A.version);
4037
4037
  });
4038
4038
  return e.replica && (C.handle("replica/version", async () => ({ version: await g.current.replica.version() })), C.handle("replica/export", ({ since: A }) => g.current.replica.exportChanges(A)), C.handle("replica/import", async ({ changes: A, blobs: L }) => ({ damage: await g.current.replica.importChanges(A, L) })), C.handle("replica/info", async () => ({ docId: await g.current.replica.docId() }))), () => {
4039
- Pe(), We();
4039
+ Ne(), We();
4040
4040
  };
4041
4041
  }, [d, Q, m, e, t.kitId, b, i, o, y, I, E]), { ...c, run: y, editedBy: D, comments: d };
4042
4042
  }
@@ -4054,7 +4054,7 @@ function Ru({ testId: e = "drawing", label: t, merge: n, exclude: r, primary: i
4054
4054
  const o = te(), { t: a } = o, s = !o.enabled("drawing.insert"), d = (p) => void o.run("drawing.insert", p), c = o.byId.has("draw.shape"), l = (p) => c ? void o.run("draw.shape", { preset: p }) : d({ geometry: { preset: p } });
4055
4055
  return /* @__PURE__ */ M(Me, { label: t ?? a("drawingIllustrations"), icon: _e, children: [
4056
4056
  /* @__PURE__ */ u(xe, { icon: _e, label: a("drawingShapes"), size: "large", disabled: s, testId: `${e}-shapes`, primary: !0, children: to.map((p) => /* @__PURE__ */ u(le, { icon: p.icon, label: a(p.label), testId: `${e}-shape-${p.preset}`, onSelect: () => l(p.preset) }, p.preset)) }),
4057
- /* @__PURE__ */ u(we, { icon: Ue, label: a("drawingTextBox"), size: "large", disabled: s, onClick: () => d({ kind: "textBox", text: "" }), "data-testid": `${e}-text-box`, primary: !0 }),
4057
+ /* @__PURE__ */ u(we, { icon: qe, label: a("drawingTextBox"), size: "large", disabled: s, onClick: () => d({ kind: "textBox", text: "" }), "data-testid": `${e}-text-box`, primary: !0 }),
4058
4058
  n ? /* @__PURE__ */ u(uc, { path: n, titles: Fc, exclude: r, primary: i?.length ? i : void 0 }) : null
4059
4059
  ] });
4060
4060
  }
@@ -4102,11 +4102,11 @@ function Hc(e) {
4102
4102
  };
4103
4103
  }, [t, o, n]), r;
4104
4104
  }
4105
- const qc = [
4105
+ const Uc = [
4106
4106
  { id: "bottomRight", label: "drawingShadowBottomRight", shadow: { blur: 4, distance: 3, angle: 45 } },
4107
4107
  { id: "bottom", label: "drawingShadowBottom", shadow: { blur: 4, distance: 3, angle: 90 } },
4108
4108
  { id: "around", label: "drawingShadowAround", shadow: { blur: 8, distance: 0, angle: 0 } }
4109
- ], Uc = [
4109
+ ], qc = [
4110
4110
  { preset: "textArchUp", label: "drawingWarpArchUp" },
4111
4111
  { preset: "textArchDown", label: "drawingWarpArchDown" },
4112
4112
  { preset: "textCircle", label: "drawingWarpCircle" },
@@ -4125,7 +4125,7 @@ const qc = [
4125
4125
  function jc({ disabled: e, testId: t = "drawing", onPick: n }) {
4126
4126
  const { t: r } = te();
4127
4127
  return /* @__PURE__ */ M(xe, { icon: vn, label: r("drawingTransform"), disabled: e, testId: `${t}-transform`, children: [
4128
- Uc.map((i) => /* @__PURE__ */ u(le, { label: r(i.label), testId: `${t}-warp-${i.preset}`, onSelect: () => n(i.preset) }, i.preset)),
4128
+ qc.map((i) => /* @__PURE__ */ u(le, { label: r(i.label), testId: `${t}-warp-${i.preset}`, onSelect: () => n(i.preset) }, i.preset)),
4129
4129
  /* @__PURE__ */ u(Ae, {}),
4130
4130
  /* @__PURE__ */ u(le, { label: r("drawingNoTransform"), testId: `${t}-no-warp`, onSelect: () => n(null) })
4131
4131
  ] });
@@ -4144,7 +4144,7 @@ function Du({ ids: e, testId: t = "drawing", effects: n = !0 }) {
4144
4144
  /* @__PURE__ */ u(le, { label: i("drawingNoFill"), testId: `${t}-no-fill`, onSelect: () => a({ fill: { none: !0 } }) })
4145
4145
  ] }),
4146
4146
  n ? /* @__PURE__ */ M(xe, { icon: Lt, label: i("drawingEffects"), disabled: o, testId: `${t}-effects`, children: [
4147
- qc.map((f) => /* @__PURE__ */ u(le, { label: i(f.label), testId: `${t}-shadow-${f.id}`, onSelect: () => a({ effects: { shadow: { color: { rgb: "#000000", alpha: 0.4 }, ...f.shadow } } }) }, f.id)),
4147
+ Uc.map((f) => /* @__PURE__ */ u(le, { label: i(f.label), testId: `${t}-shadow-${f.id}`, onSelect: () => a({ effects: { shadow: { color: { rgb: "#000000", alpha: 0.4 }, ...f.shadow } } }) }, f.id)),
4148
4148
  /* @__PURE__ */ u(le, { label: i("drawingNoShadow"), testId: `${t}-no-shadow`, onSelect: () => a({ effects: { shadow: null } }) }),
4149
4149
  /* @__PURE__ */ u(Ae, {}),
4150
4150
  /* @__PURE__ */ u(le, { label: i("drawingGlow"), testId: `${t}-glow`, onSelect: () => a({ effects: { glow: { color: { rgb: h, alpha: 0.6 }, size: 5 } } }) }),
@@ -4363,7 +4363,7 @@ function ed(e) {
4363
4363
  function ro(e) {
4364
4364
  return e === "line" || e === "lineMarkers" || e === "stackedLine" || e === "scatter" || e === "radar";
4365
4365
  }
4366
- const Nn = [
4366
+ const Pn = [
4367
4367
  { kind: "column", icon: je, label: "chartColumn" },
4368
4368
  {
4369
4369
  kind: "stackedColumn",
@@ -4377,9 +4377,9 @@ const Nn = [
4377
4377
  { kind: "pie", icon: Qn, label: "chartPie" },
4378
4378
  { kind: "doughnut", icon: Qn, label: "chartDoughnut" },
4379
4379
  { kind: "scatter", icon: Ls, label: "chartScatter" },
4380
- { kind: "radar", icon: Ps, label: "chartRadar" }
4380
+ { kind: "radar", icon: Ns, label: "chartRadar" }
4381
4381
  ], td = ["top", "bottom", "left", "right"];
4382
- function Pu({
4382
+ function Nu({
4383
4383
  testId: e = "chart",
4384
4384
  size: t = "large",
4385
4385
  primary: n
@@ -4394,7 +4394,7 @@ function Pu({
4394
4394
  disabled: !r.enabled("drawing.insert"),
4395
4395
  testId: `${e}-insert`,
4396
4396
  primary: n,
4397
- children: Nn.map((o) => /* @__PURE__ */ u(
4397
+ children: Pn.map((o) => /* @__PURE__ */ u(
4398
4398
  le,
4399
4399
  {
4400
4400
  icon: o.icon,
@@ -4427,7 +4427,7 @@ function nd(e) {
4427
4427
  };
4428
4428
  }, [t, e, n]), r;
4429
4429
  }
4430
- function Nu({
4430
+ function Pu({
4431
4431
  id: e,
4432
4432
  testId: t = "chart",
4433
4433
  dataEditable: n = !0,
@@ -4444,7 +4444,7 @@ function Nu({
4444
4444
  disabled: p || f,
4445
4445
  testId: `${t}-type`,
4446
4446
  primary: !0,
4447
- children: Nn.map((m) => /* @__PURE__ */ u(
4447
+ children: Pn.map((m) => /* @__PURE__ */ u(
4448
4448
  le,
4449
4449
  {
4450
4450
  icon: m.icon,
@@ -4459,12 +4459,12 @@ function Nu({
4459
4459
  ))
4460
4460
  }
4461
4461
  ) }),
4462
- /* @__PURE__ */ M(Me, { label: o("chartElements"), icon: Ns, children: [
4462
+ /* @__PURE__ */ M(Me, { label: o("chartElements"), icon: Ps, children: [
4463
4463
  /* @__PURE__ */ M(Fe, { children: [
4464
4464
  /* @__PURE__ */ u(
4465
4465
  we,
4466
4466
  {
4467
- icon: qr,
4467
+ icon: Ur,
4468
4468
  label: o("chartTitle"),
4469
4469
  pressed: a?.title != null,
4470
4470
  disabled: p,
@@ -4478,7 +4478,7 @@ function Nu({
4478
4478
  /* @__PURE__ */ M(
4479
4479
  xe,
4480
4480
  {
4481
- icon: Ue,
4481
+ icon: qe,
4482
4482
  label: o("chartLegend"),
4483
4483
  disabled: p,
4484
4484
  testId: `${t}-legend`,
@@ -4547,7 +4547,7 @@ function Nu({
4547
4547
  /* @__PURE__ */ u(
4548
4548
  we,
4549
4549
  {
4550
- icon: Ue,
4550
+ icon: qe,
4551
4551
  label: o("chartAxisTitles"),
4552
4552
  pressed: a?.xTitle != null || a?.yTitle != null,
4553
4553
  disabled: p || g,
@@ -4686,8 +4686,8 @@ function id({
4686
4686
  hidden: !d.shown
4687
4687
  };
4688
4688
  l && Object.assign(y, { min: p, max: h, major: f }), t({ [o]: y }), n();
4689
- }, m = (y, I, P) => {
4690
- const E = d[y], Y = P && E.trim() !== "" && !Number.isFinite(Number(E));
4689
+ }, m = (y, I, N) => {
4690
+ const E = d[y], Y = N && E.trim() !== "" && !Number.isFinite(Number(E));
4691
4691
  return [
4692
4692
  /* @__PURE__ */ u("label", { htmlFor: `chart-axis-${y}`, children: I }, `${y}-label`),
4693
4693
  /* @__PURE__ */ u(
@@ -4695,11 +4695,11 @@ function id({
4695
4695
  {
4696
4696
  id: `chart-axis-${y}`,
4697
4697
  className: "kui-field",
4698
- inputMode: P ? "decimal" : void 0,
4698
+ inputMode: N ? "decimal" : void 0,
4699
4699
  placeholder: i("chartAxisAuto"),
4700
4700
  "aria-invalid": Y,
4701
4701
  value: E,
4702
- onChange: (q) => c((V) => ({ ...V, [y]: q.target.value })),
4702
+ onChange: (U) => c((V) => ({ ...V, [y]: U.target.value })),
4703
4703
  "data-testid": `${r}-axis-${y}`
4704
4704
  },
4705
4705
  y
@@ -4871,7 +4871,7 @@ function od({
4871
4871
  value: p.kind,
4872
4872
  choices: [
4873
4873
  ["", o("chartSeriesTypeChart")],
4874
- ...Xc.map((b) => [b, o(Nn.find((m) => m.kind === b)?.label ?? b)])
4874
+ ...Xc.map((b) => [b, o(Pn.find((m) => m.kind === b)?.label ?? b)])
4875
4875
  ],
4876
4876
  onChange: (b) => h((m) => ({ ...m, kind: b })),
4877
4877
  testId: `${i}-series-kind`
@@ -4937,7 +4937,7 @@ function sd({
4937
4937
  }), n();
4938
4938
  }, g = (w, b, m) => l(
4939
4939
  (y) => y.map(
4940
- (I, P) => P === w ? I.map((E, Y) => Y === b ? m : E) : I
4940
+ (I, N) => N === w ? I.map((E, Y) => Y === b ? m : E) : I
4941
4941
  )
4942
4942
  );
4943
4943
  return /* @__PURE__ */ M(
@@ -4969,7 +4969,7 @@ function sd({
4969
4969
  "aria-label": i("chartSeriesName", { n: b + 1 }),
4970
4970
  value: w,
4971
4971
  onChange: (m) => d(
4972
- (y) => y.map((I, P) => P === b ? m.target.value : I)
4972
+ (y) => y.map((I, N) => N === b ? m.target.value : I)
4973
4973
  ),
4974
4974
  "data-testid": `${r}-data-series-${b}`
4975
4975
  }
@@ -4982,7 +4982,7 @@ function sd({
4982
4982
  "aria-label": i("chartCategoryName", { n: b + 1 }),
4983
4983
  value: w,
4984
4984
  onChange: (m) => a(
4985
- (y) => y.map((I, P) => P === b ? m.target.value : I)
4985
+ (y) => y.map((I, N) => N === b ? m.target.value : I)
4986
4986
  ),
4987
4987
  "data-testid": `${r}-data-category-${b}`
4988
4988
  }
@@ -5060,7 +5060,7 @@ function sd({
5060
5060
  }
5061
5061
  const ld = 4e3;
5062
5062
  function cd({ tool: e, onExit: t }) {
5063
- const n = te(), r = Xe(), i = be(), { undo: o } = Pn(), { host: a, t: s, testId: d, phrase: c } = n, l = r?.tools.find((b) => b.id === r.active), p = e ?? (l ? { label: c(l.label), icon: zi(l.icon, l.id) } : null), h = i.state("action:agent"), f = p?.icon, [g, w] = B(!0);
5063
+ const n = te(), r = Xe(), i = be(), { undo: o } = Nn(), { host: a, t: s, testId: d, phrase: c } = n, l = r?.tools.find((b) => b.id === r.active), p = e ?? (l ? { label: c(l.label), icon: zi(l.icon, l.id) } : null), h = i.state("action:agent"), f = p?.icon, [g, w] = B(!0);
5064
5064
  return J(() => {
5065
5065
  const b = setTimeout(() => w(!1), ld);
5066
5066
  return () => clearTimeout(b);
@@ -5188,7 +5188,7 @@ function Mr({ row: e, tree: t, primary: n }) {
5188
5188
  pressed: t.checked?.(e.command),
5189
5189
  disabled: !r.enabled(e.command) || l.disabled,
5190
5190
  onClick: () => {
5191
- t.onCommand && !(c && Nt(c)) ? t.onCommand(e.command) : r.run(e.command);
5191
+ t.onCommand && !(c && Pt(c)) ? t.onCommand(e.command) : r.run(e.command);
5192
5192
  },
5193
5193
  "data-testid": `${s}-cmd-${e.command}`,
5194
5194
  "data-kit-ui-id": `command:${e.command}`
@@ -5196,7 +5196,7 @@ function Mr({ row: e, tree: t, primary: n }) {
5196
5196
  );
5197
5197
  }
5198
5198
  function wd({ tab: e, nodes: t }) {
5199
- const { byId: n, phrase: r } = te(), i = Pn(), o = /* @__PURE__ */ new Set([...i.undo.hidden ? [] : ["edit.undo"], ...i.redo.hidden ? [] : ["edit.redo"]]), a = (f) => f.filter((g) => !o.has(g.command)), s = (f) => {
5199
+ const { byId: n, phrase: r } = te(), i = Nn(), o = /* @__PURE__ */ new Set([...i.undo.hidden ? [] : ["edit.undo"], ...i.redo.hidden ? [] : ["edit.redo"]]), a = (f) => f.filter((g) => !o.has(g.command)), s = (f) => {
5200
5200
  const g = f.find((w) => w.command !== "---");
5201
5201
  return g ? Ge(n.get(g.command) ?? { id: g.command.replace(Ke, ""), title: g.label }) : void 0;
5202
5202
  }, d = e.menu;
@@ -5213,7 +5213,7 @@ function wd({ tab: e, nodes: t }) {
5213
5213
  l.map((f) => /* @__PURE__ */ u(Me, { id: `menu:${f.path}`, label: r(f.label), icon: s(a(Ze(f.children))), children: /* @__PURE__ */ u("div", { className: "kui-command-grid", children: a(Ze(f.children)).map((g, w) => /* @__PURE__ */ u(Mr, { row: g, tree: d, primary: h(g) }, `${g.command}@${w}`)) }) }, f.path))
5214
5214
  ] });
5215
5215
  }
5216
- const Tr = { menus: Bs, line: Mi, classic: yi, focus: Ai }, Ar = () => Pt() ? "Cmd+\\" : "Ctrl+\\";
5216
+ const Tr = { menus: Bs, line: Mi, classic: yi, focus: Ai }, Ar = () => Nt() ? "Cmd+\\" : "Ctrl+\\";
5217
5217
  function bd({ display: e, shown: t, areas: n = !0 }) {
5218
5218
  const { t: r, testId: i } = te(), a = be().state("action:mode");
5219
5219
  if (a.hidden || e.allowed.length < 2) return null;
@@ -5273,13 +5273,13 @@ function Fu(e, { order: t, exclude: n = [], ...r }) {
5273
5273
  return vd(kd(e, t, n), r);
5274
5274
  }
5275
5275
  function Sd(e, t = !0) {
5276
- const { modes: n } = He(e.ui.subscribe, e.ui.get), r = e.kit.id, [i, o] = B(() => Hs(r)), [a, s] = B(() => n.default === "focus"), d = Ri(n), c = t ? d : d.filter((g) => g === "menus" || g === "focus"), l = t ? Us({ stored: i, rules: n, kit: e.display, readOnly: e.readOnly === !0 }) : "menus", p = H(
5276
+ const { modes: n } = He(e.ui.subscribe, e.ui.get), r = e.kit.id, [i, o] = B(() => Hs(r)), [a, s] = B(() => n.default === "focus"), d = Ri(n), c = t ? d : d.filter((g) => g === "menus" || g === "focus"), l = t ? qs({ stored: i, rules: n, kit: e.display, readOnly: e.readOnly === !0 }) : "menus", p = H(
5277
5277
  (g) => {
5278
5278
  if (g === "focus") {
5279
5279
  s(!0);
5280
5280
  return;
5281
5281
  }
5282
- qs(r, g), o(g), s(!1);
5282
+ Us(r, g), o(g), s(!1);
5283
5283
  },
5284
5284
  [r]
5285
5285
  ), h = H(() => s((g) => !g), []), f = H(() => s(!1), []);
@@ -5428,7 +5428,7 @@ function Ld(e) {
5428
5428
  function Lr(e) {
5429
5429
  return Fn(e).reduce((t, n) => t + n.offsetWidth, 0);
5430
5430
  }
5431
- function Pd({ mode: e, tab: t, nodes: n, panel: r, measure: i }) {
5431
+ function Nd({ mode: e, tab: t, nodes: n, panel: r, measure: i }) {
5432
5432
  const { t: o } = te(), a = be(), s = t.ribbon ?? (t.menu ? /* @__PURE__ */ u(wd, { tab: t, nodes: n }) : null), d = H((y) => o("lineMore", { group: y }), [o]), c = e === "line", l = `${e}:${t.id}`, [p, h] = B({ key: l, level: 0, groups: [], fresh: 0 }), f = p.key === l ? p.level : 0, g = p.key === l ? p.groups : [], w = pe(() => c ? mn : Rd(f, g), [g, f, c]), b = R({ width: 0, content: 0 }), m = R(null);
5433
5433
  return Te(() => {
5434
5434
  const y = r.current;
@@ -5450,8 +5450,8 @@ function Pd({ mode: e, tab: t, nodes: n, panel: r, measure: i }) {
5450
5450
  const y = r.current;
5451
5451
  if (c || !y || typeof ResizeObserver > "u") return;
5452
5452
  const I = new ResizeObserver(() => {
5453
- const P = b.current;
5454
- (y.clientWidth > P.width + 1 || Math.abs(Lr(y) - P.content) > 1) && h((E) => ({ key: l, level: 0, groups: E.groups, fresh: E.fresh + 1 }));
5453
+ const N = b.current;
5454
+ (y.clientWidth > N.width + 1 || Math.abs(Lr(y) - N.content) > 1) && h((E) => ({ key: l, level: 0, groups: E.groups, fresh: E.fresh + 1 }));
5455
5455
  });
5456
5456
  return m.current = I, I.observe(y), () => {
5457
5457
  I.disconnect(), m.current = null;
@@ -5459,34 +5459,34 @@ function Pd({ mode: e, tab: t, nodes: n, panel: r, measure: i }) {
5459
5459
  }, [l, c, r]), s ? /* @__PURE__ */ u(Et, { className: c ? "kui-line" : "kui-ribbon-body", panelClassName: c ? "kui-line-panel" : "kui-ribbon-panel", role: "tabpanel", resetKey: t.id, labels: { start: o("ribbonScrollStart"), end: o("ribbonScrollEnd") }, testId: "ribbon-scroll", panelRef: r, children: /* @__PURE__ */ u("fieldset", { className: "kui-element", disabled: a.state(Ye(t)).disabled, children: /* @__PURE__ */ u(Ao.Provider, { value: d, children: /* @__PURE__ */ u(vt.Provider, { value: c ? "line" : "full", children: /* @__PURE__ */ u(Yt.Provider, { value: w, children: s }) }) }) }) }) : null;
5460
5460
  }
5461
5461
  function Bu({ tabs: e, tab: t, onTab: n, defaultTab: r, title: i, actions: o, options: a, rail: s, sidebar: d, panels: c, focusTool: l, statusBar: p = !0, children: h, ...f }) {
5462
- const g = te(), { host: w, phrase: b, testId: m } = g, y = be(), I = R(null), P = R(null), E = w.readOnly === !0, Y = xd(), q = y.config.add, V = pe(() => {
5462
+ const g = te(), { host: w, phrase: b, testId: m } = g, y = be(), I = R(null), N = R(null), E = w.readOnly === !0, Y = xd(), U = y.config.add, V = pe(() => {
5463
5463
  if (!e.some((G) => G.menu)) return e;
5464
- const N = q.map((G) => G.place).filter((G) => G.startsWith("menu:") && !G.includes("/")).map((G) => G.slice(5)).filter((G, ue, ye) => ye.indexOf(G) === ue && !e.some((Ie) => Ie.id === G));
5465
- return N.length ? [...e, ...N.map((G) => ({ id: G, label: b(G), menu: { rows: [] } }))] : e;
5466
- }, [q, b, e]), j = pd(V), D = V.filter((N) => y.state(Ye(N)).hidden || E && !N.view ? !1 : !N.menu || N.ribbon ? !0 : (j.get(N.id)?.length ?? 0) > 0 || (N.menu.before?.length ?? 0) > 0 || y.buttons(`menu:${N.id}`).length > 0), Z = Sd(w, D.length > 0), [Q, fe] = B(r ?? null), ce = t ?? Q, k = D.find((N) => N.id === ce) ?? D.find((N) => N.id === r) ?? D.find((N) => N.id.toLowerCase() !== "file") ?? D[0] ?? null, O = k?.id ?? null, U = H(
5467
- (N) => {
5468
- fe(N), n?.(N);
5464
+ const P = U.map((G) => G.place).filter((G) => G.startsWith("menu:") && !G.includes("/")).map((G) => G.slice(5)).filter((G, ue, ye) => ye.indexOf(G) === ue && !e.some((Ie) => Ie.id === G));
5465
+ return P.length ? [...e, ...P.map((G) => ({ id: G, label: b(G), menu: { rows: [] } }))] : e;
5466
+ }, [U, b, e]), j = pd(V), D = V.filter((P) => y.state(Ye(P)).hidden || E && !P.view ? !1 : !P.menu || P.ribbon ? !0 : (j.get(P.id)?.length ?? 0) > 0 || (P.menu.before?.length ?? 0) > 0 || y.buttons(`menu:${P.id}`).length > 0), Z = Sd(w, D.length > 0), [Q, fe] = B(r ?? null), ce = t ?? Q, k = D.find((P) => P.id === ce) ?? D.find((P) => P.id === r) ?? D.find((P) => P.id.toLowerCase() !== "file") ?? D[0] ?? null, O = k?.id ?? null, q = H(
5467
+ (P) => {
5468
+ fe(P), n?.(P);
5469
5469
  },
5470
5470
  [n]
5471
5471
  );
5472
5472
  Te(() => {
5473
5473
  t !== void 0 && O !== null && O !== t && n?.(O);
5474
5474
  }, [O, n, t]);
5475
- const x = Cd(I, Z.chosen, O ?? "", Z.allowed), C = Z.focus ? "focus" : x.effective, W = (N) => (Pt() ? N.metaKey : N.ctrlKey) && !N.shiftKey && !N.altKey && N.code === "Backslash" ? !Z.allowed.includes("focus") || y.state("action:mode").denied ? !1 : (Z.toggleFocus(), !0) : !1, _ = () => Z.focus ? (Z.exitFocus(), !0) : !1, T = C === "focus", K = R(T);
5475
+ const x = Cd(I, Z.chosen, O ?? "", Z.allowed), C = Z.focus ? "focus" : x.effective, W = (P) => (Nt() ? P.metaKey : P.ctrlKey) && !P.shiftKey && !P.altKey && P.code === "Backslash" ? !Z.allowed.includes("focus") || y.state("action:mode").denied ? !1 : (Z.toggleFocus(), !0) : !1, _ = () => Z.focus ? (Z.exitFocus(), !0) : !1, T = C === "focus", K = R(T);
5476
5476
  Te(() => {
5477
5477
  if (K.current === T) return;
5478
5478
  K.current = T;
5479
- const N = document.activeElement;
5480
- if (N && N !== document.body && N.isConnected) return;
5479
+ const P = document.activeElement;
5480
+ if (P && P !== document.body && P.isConnected) return;
5481
5481
  ((T ? null : I.current?.querySelector(".kui-mode-button")) ?? I.current)?.focus({ preventScroll: !0 });
5482
5482
  }, [T]);
5483
5483
  const ne = T ? /* @__PURE__ */ u(cd, { tool: l, onExit: Z.exitFocus }) : /* @__PURE__ */ M(Ce, { children: [
5484
5484
  /* @__PURE__ */ M("div", { className: "kui-frame-top", "data-testid": `${m}-top-bar`, children: [
5485
5485
  i ? /* @__PURE__ */ u("div", { className: "kui-frame-title", children: i }) : null,
5486
- C === "menus" ? /* @__PURE__ */ u(Od, { tabs: D, menus: j }) : /* @__PURE__ */ u(Td, { tabs: D, active: O, onTab: U }),
5486
+ C === "menus" ? /* @__PURE__ */ u(Od, { tabs: D, menus: j }) : /* @__PURE__ */ u(Td, { tabs: D, active: O, onTab: q }),
5487
5487
  /* @__PURE__ */ u("div", { className: "kui-ribbon-end", children: /* @__PURE__ */ u(fc, { before: o, mode: /* @__PURE__ */ u(bd, { display: Z, shown: C, areas: D.length > 0 }) }) })
5488
5488
  ] }),
5489
- (C === "line" || C === "classic") && k ? /* @__PURE__ */ u(Pd, { mode: C, tab: k, nodes: j.get(k.id) ?? [], panel: P, measure: x.measure }) : null,
5489
+ (C === "line" || C === "classic") && k ? /* @__PURE__ */ u(Nd, { mode: C, tab: k, nodes: j.get(k.id) ?? [], panel: N, measure: x.measure }) : null,
5490
5490
  a ? /* @__PURE__ */ u(bc, { children: a }) : null
5491
5491
  ] });
5492
5492
  return /* @__PURE__ */ u(ao.Provider, { value: C, children: /* @__PURE__ */ u(so.Provider, { value: Z, children: /* @__PURE__ */ u(pc, { ...f, statusBar: p && !T, top: ne, frame: { ref: I, mode: C, chosen: Z.chosen, touch: Y, viewOnly: E, keyDown: W, escape: _ }, children: /* @__PURE__ */ M("div", { className: "kui-frame-body", children: [
@@ -5496,8 +5496,8 @@ function Bu({ tabs: e, tab: t, onTab: n, defaultTab: r, title: i, actions: o, op
5496
5496
  c && !T ? c : null
5497
5497
  ] }) }) }) });
5498
5498
  }
5499
- const Nd = new ArrayBuffer(0);
5500
- function Pr(e) {
5499
+ const Pd = new ArrayBuffer(0);
5500
+ function Nr(e) {
5501
5501
  return e.slice().buffer;
5502
5502
  }
5503
5503
  function Fd(e) {
@@ -5519,13 +5519,13 @@ class _u {
5519
5519
  push() {
5520
5520
  this.enqueue(async () => {
5521
5521
  const t = this.page.replica(), n = t.version();
5522
- this.pushed.includes(n) || (await this.engine.importChanges(Pr(t.exportChanges(this.pushed)), Nd), this.pushed = n);
5522
+ this.pushed.includes(n) || (await this.engine.importChanges(Nr(t.exportChanges(this.pushed)), Pd), this.pushed = n);
5523
5523
  });
5524
5524
  }
5525
5525
  /** Takes the worker's changes the page does not have yet. */
5526
5526
  pull() {
5527
5527
  this.enqueue(async () => {
5528
- const t = this.page.replica(), { changes: n } = await this.engine.exportChanges(Pr(t.version().encode()));
5528
+ const t = this.page.replica(), { changes: n } = await this.engine.exportChanges(Nr(t.version().encode()));
5529
5529
  if (this.closed || this.page.replica() !== t) return;
5530
5530
  const r = t.version(), i = this.pushed.includes(r), o = new Uint8Array(n);
5531
5531
  this.page.importChanges ? this.page.importChanges(o) : t.importChanges(o), i && (this.pushed = t.version()), t.version().equals(r) || this.pulled();
@@ -5587,7 +5587,7 @@ function Bd(e, t, n, r, i) {
5587
5587
  const d = e.measureText(r).width + o.padX * 2, c = o.height ?? Math.round(zd(a) * 1.2) + o.padY * 2, l = o.align === "center" ? t - d / 2 : t;
5588
5588
  e.fillStyle = s, e.beginPath(), e.roundRect(l, n, d, c, o.radius), e.fill(), e.fillStyle = o.color ?? (s === i.surface ? i.ink : i.surface), e.textBaseline = "middle", e.fillText(r, l + o.padX, n + c / 2);
5589
5589
  }
5590
- function Nr(e, t, n, r, i) {
5590
+ function Pr(e, t, n, r, i) {
5591
5591
  switch (r.kind) {
5592
5592
  case "marquee": {
5593
5593
  const o = i.marquee, a = t(r.x0, r.y0), s = t(r.x1, r.y1);
@@ -5663,11 +5663,11 @@ function _d(e, t = hn, n) {
5663
5663
  n && (l = n(s, { context: r, toScreen: i, view: o, style: t, overlays: e, index: d, frame: a, drawDefault: (h = s) => {
5664
5664
  r.save();
5665
5665
  try {
5666
- c(), Nr(r, i, o, h, t);
5666
+ c(), Pr(r, i, o, h, t);
5667
5667
  } finally {
5668
5668
  r.restore();
5669
5669
  }
5670
- } }) === !0), l || (r.restore(), r.save(), c(), Nr(r, i, o, s, t));
5670
+ } }) === !0), l || (r.restore(), r.save(), c(), Pr(r, i, o, s, t));
5671
5671
  } finally {
5672
5672
  r.restore();
5673
5673
  }
@@ -5684,29 +5684,29 @@ function Ku(e, t, n, r) {
5684
5684
  g.current = r;
5685
5685
  const w = R(d);
5686
5686
  w.current = d;
5687
- const b = R(0), m = R(null), [y, I] = B(0), P = R(r.initial), E = R(null), Y = Object.keys(r.hostTools ?? {}).find((v) => r.hostTools?.[v] === Re) ?? Re.id;
5688
- let q = a;
5689
- d(a) && (q = i.find((v) => !r.hidden?.has(v.id) && !d(v.id))?.id ?? Y, i.length && q !== a && s(q));
5690
- const V = r.hostTools?.[q] ?? (q === Re.id && !i.some((v) => v.id === q) ? Re : void 0);
5691
- P.current = q;
5687
+ const b = R(0), m = R(null), [y, I] = B(0), N = R(r.initial), E = R(null), Y = Object.keys(r.hostTools ?? {}).find((v) => r.hostTools?.[v] === Re) ?? Re.id;
5688
+ let U = a;
5689
+ d(a) && (U = i.find((v) => !r.hidden?.has(v.id) && !d(v.id))?.id ?? Y, i.length && U !== a && s(U));
5690
+ const V = r.hostTools?.[U] ?? (U === Re.id && !i.some((v) => v.id === U) ? Re : void 0);
5691
+ N.current = U;
5692
5692
  const j = R(/* @__PURE__ */ new Set());
5693
5693
  j.current = new Set(Object.keys(r.hostTools ?? {})), i.some((v) => v.id === Re.id) || j.current.add(Re.id);
5694
5694
  const D = H((v) => {
5695
5695
  if (w.current(v)) return;
5696
5696
  const z = ++b.current;
5697
- m.current = z, P.current = v, I(z), s(v);
5698
- }, []), Z = H((v) => c(() => v), []), Q = R(1), fe = R(null), ce = R(!1), k = R([]), O = R(null), U = H((v, z) => {
5697
+ m.current = z, N.current = v, I(z), s(v);
5698
+ }, []), Z = H((v) => c(() => v), []), Q = R(1), fe = R(null), ce = R(!1), k = R([]), O = R(null), q = H((v, z) => {
5699
5699
  if (!v) return;
5700
5700
  O.current = v, p(v);
5701
5701
  let S = null;
5702
5702
  for (const $ of v.requests)
5703
5703
  $.kind === "switchTool" ? (m.current === null || z === m.current) && !w.current($.id) && (S = $.id) : $.kind === "status" ? f($.text) : g.current.onDialog?.($.name, $.params);
5704
- S !== null && S !== P.current && (P.current = S, E.current = { id: S, serial: b.current }, j.current.has(S) || k.current.unshift({ name: "selectTool", args: [S, Q.current], settled: !0, coalesce: !1, selection: z }), s(S));
5704
+ S !== null && S !== N.current && (N.current = S, E.current = { id: S, serial: b.current }, j.current.has(S) || k.current.unshift({ name: "selectTool", args: [S, Q.current], settled: !0, coalesce: !1, selection: z }), s(S));
5705
5705
  }, []), x = R(!1), C = R(null), W = H((v, z) => {
5706
5706
  const S = document.activeElement ?? document.body;
5707
5707
  x.current = !0, C.current = 0;
5708
5708
  try {
5709
- S.dispatchEvent(new KeyboardEvent("keydown", { key: v, code: qd(v), shiftKey: z, bubbles: !0, cancelable: !0 }));
5709
+ S.dispatchEvent(new KeyboardEvent("keydown", { key: v, code: Ud(v), shiftKey: z, bubbles: !0, cancelable: !0 }));
5710
5710
  } finally {
5711
5711
  x.current = !1, C.current = null;
5712
5712
  }
@@ -5722,16 +5722,16 @@ function Ku(e, t, n, r) {
5722
5722
  continue;
5723
5723
  }
5724
5724
  if ("key" in v) {
5725
- v.key.length > 1 ? W(v.key, v.shift) : O.current?.wantsText ? U(await e("toolText", [v.key, Q.current], !0).catch(() => null)) : g.current.onDeferredKey ? g.current.onDeferredKey(v.key, v.shift) : W(v.key, v.shift);
5725
+ v.key.length > 1 ? W(v.key, v.shift) : O.current?.wantsText ? q(await e("toolText", [v.key, Q.current], !0).catch(() => null)) : g.current.onDeferredKey ? g.current.onDeferredKey(v.key, v.shift) : W(v.key, v.shift);
5726
5726
  continue;
5727
5727
  }
5728
- U(await e(v.name, v.args, v.settled).catch(() => null), v.selection), v.selection === m.current && (m.current = null);
5728
+ q(await e(v.name, v.args, v.settled).catch(() => null), v.selection), v.selection === m.current && (m.current = null);
5729
5729
  }
5730
5730
  } finally {
5731
5731
  ce.current = !1;
5732
5732
  }
5733
5733
  }
5734
- }, [U, W, e]), K = H((v, z, S, $ = !1, F) => {
5734
+ }, [q, W, e]), K = H((v, z, S, $ = !1, F) => {
5735
5735
  const X = k.current[k.current.length - 1];
5736
5736
  $ && C.current === null && X && "name" in X && X.coalesce && X.name === v ? k.current[k.current.length - 1] = { name: v, args: z, settled: S, coalesce: $, selection: F } : _({ name: v, args: z, settled: S, coalesce: $, selection: F }), T();
5737
5737
  }, [_, T]), ne = H((v) => !ce.current && !k.current.length ? v() : new Promise((z, S) => {
@@ -5740,24 +5740,24 @@ function Ku(e, t, n, r) {
5740
5740
  J(() => wl(e, ne), [ne, e]), J(() => {
5741
5741
  t && e("tools").then((v) => o(v ?? []));
5742
5742
  }, [t, e]);
5743
- const N = !!V;
5743
+ const P = !!V;
5744
5744
  J(() => {
5745
5745
  if (!t) {
5746
5746
  E.current = null;
5747
5747
  return;
5748
5748
  }
5749
- if (N) return;
5749
+ if (P) return;
5750
5750
  const v = E.current;
5751
- E.current = null, !(v?.id === q && v.serial === y) && K("selectTool", [q, Q.current], !0, !1, y);
5752
- }, [q, N, t, y, K]), J(() => {
5753
- if (!t || N) return;
5751
+ E.current = null, !(v?.id === U && v.serial === y) && K("selectTool", [U, Q.current], !0, !1, y);
5752
+ }, [U, P, t, y, K]), J(() => {
5753
+ if (!t || P) return;
5754
5754
  const v = fe.current ?? { x: 0, y: 0 };
5755
5755
  K("toolState", [v.x, v.y, "{}", Q.current], !1, !0);
5756
5756
  }, [n.revision, t]);
5757
5757
  const G = H((v, z, S, $, F = !1) => {
5758
5758
  Q.current = S, fe.current = { x: z.x, y: z.y }, K("pointer", [JSON.stringify({ action: v, x: z.x, y: z.y, mods: Gt(z), pressure: z.pressure, zoom: S })], $, F);
5759
5759
  }, [K]), ue = pe(() => V ?? {
5760
- id: q,
5760
+ id: U,
5761
5761
  cursor: l?.cursor || "default",
5762
5762
  begin: (v, { viewport: z }) => (G("down", v, z.view.zoom, !1), {
5763
5763
  move: (S, $) => G("drag", S, $.viewport.view.zoom, !1, !0),
@@ -5768,12 +5768,12 @@ function Ku(e, t, n, r) {
5768
5768
  }),
5769
5769
  hover: (v, { viewport: z }) => G("move", v, z.view.zoom, !1, !0),
5770
5770
  doubleClick: (v, { viewport: z }) => G("doubleClick", v, z.view.zoom, !0)
5771
- }, [q, V, G, l?.cursor, K]), ye = l?.overlays, { overlayStyle: Ie, drawOverlay: Pe } = r, We = Ud(), A = pe(() => {
5771
+ }, [U, V, G, l?.cursor, K]), ye = l?.overlays, { overlayStyle: Ie, drawOverlay: Ne } = r, We = qd(), A = pe(() => {
5772
5772
  const v = Wd(Ie);
5773
5773
  return We && !Ie?.accent ? { ...v, accent: We } : v;
5774
5774
  }, [We, Ie]), L = pe(
5775
- () => ye?.length && !V ? Jl(_d(ye, A, Pe)) : null,
5776
- [Pe, V, ye, A]
5775
+ () => ye?.length && !V ? Jl(_d(ye, A, Ne)) : null,
5776
+ [Ne, V, ye, A]
5777
5777
  ), re = H((v) => {
5778
5778
  if (V || !v.shiftKey && !v.altKey && !v.metaKey && !v.ctrlKey && v.key === "Escape" && g.current.escapable && !g.current.escapable()) return !1;
5779
5779
  const S = v.metaKey || v.ctrlKey, $ = v.key.length === 1 || Hd.has(v.key);
@@ -5791,22 +5791,22 @@ function Ku(e, t, n, r) {
5791
5791
  }, [V, T, K]), ie = H((v, z) => {
5792
5792
  const S = (z ? `Shift+${v}` : v).toLowerCase(), F = i.filter((ee) => !g.current.hidden?.has(ee.id)).filter((ee) => ee.shortcut?.toLowerCase() === S);
5793
5793
  if (!F.length) return null;
5794
- const X = F.findIndex((ee) => ee.id === q);
5794
+ const X = F.findIndex((ee) => ee.id === U);
5795
5795
  return F[(X + 1) % F.length].id;
5796
- }, [q, i]), ae = H(() => {
5797
- if (N) return;
5796
+ }, [U, i]), ae = H(() => {
5797
+ if (P) return;
5798
5798
  const v = fe.current ?? { x: 0, y: 0 };
5799
5799
  K("toolState", [v.x, v.y, "{}", Q.current], !1, !0);
5800
- }, [N, K]), se = H((v) => {
5801
- if (!Number.isFinite(v) || v <= 0 || Math.abs(v - Q.current) < 1e-9 || (Q.current = v, !t || N || !O.current)) return;
5800
+ }, [P, K]), se = H((v) => {
5801
+ if (!Number.isFinite(v) || v <= 0 || Math.abs(v - Q.current) < 1e-9 || (Q.current = v, !t || P || !O.current)) return;
5802
5802
  const z = fe.current ?? { x: 0, y: 0 };
5803
5803
  K("toolState", [z.x, z.y, "{}", v], !1, !0);
5804
- }, [N, t, K]), ge = H((v) => {
5804
+ }, [P, t, K]), ge = H((v) => {
5805
5805
  v && K("toolText", [v, Q.current], !0);
5806
5806
  }, [K]);
5807
5807
  return {
5808
5808
  tools: i,
5809
- active: q,
5809
+ active: U,
5810
5810
  select: D,
5811
5811
  setDenied: Z,
5812
5812
  refresh: ae,
@@ -5820,13 +5820,13 @@ function Ku(e, t, n, r) {
5820
5820
  toolForKey: ie
5821
5821
  };
5822
5822
  }
5823
- function qd(e) {
5823
+ function Ud(e) {
5824
5824
  if (/^[a-z]$/i.test(e)) return `Key${e.toUpperCase()}`;
5825
5825
  if (/^[0-9]$/.test(e)) return `Digit${e}`;
5826
5826
  const t = { ".": "Period", ",": "Comma", "/": "Slash", ";": "Semicolon", "'": "Quote", "[": "BracketLeft", "]": "BracketRight", "-": "Minus", "=": "Equal", "`": "Backquote", "\\": "Backslash", " ": "Space" };
5827
5827
  return e === "Delete" || e === "Backspace" ? e : t[e] ?? "";
5828
5828
  }
5829
- function Ud() {
5829
+ function qd() {
5830
5830
  const e = () => typeof document > "u" ? null : getComputedStyle(document.documentElement).getPropertyValue("--kit-primary").trim() || null, [t, n] = B(e);
5831
5831
  return J(() => {
5832
5832
  if (typeof MutationObserver > "u") return;
@@ -5866,7 +5866,7 @@ function Gd(e, t) {
5866
5866
  const n = JSON.stringify(t.map((r) => r.id));
5867
5867
  (Wr.get(e) ?? "[]") !== n && (Wr.set(e, n), e.peer.notify("document/conflicts", { conflicts: t }));
5868
5868
  }
5869
- function qu(e, t, n) {
5869
+ function Uu(e, t, n) {
5870
5870
  J(() => {
5871
5871
  if (!t) return;
5872
5872
  let r = !1;
@@ -5924,7 +5924,7 @@ function Xd(e) {
5924
5924
  let t = Br.get(e);
5925
5925
  return t || Br.set(e, t = Vd(e)), t;
5926
5926
  }
5927
- function Uu(e, t) {
5927
+ function qu(e, t) {
5928
5928
  const n = Xd(e), r = He(n.subscribe, n.peers, n.peers), i = t ? JSON.stringify(t) : null;
5929
5929
  return J(() => {
5930
5930
  i !== null && n.set(JSON.parse(i));
@@ -6166,7 +6166,7 @@ export {
6166
6166
  sh as BarSeparator,
6167
6167
  lh as Button,
6168
6168
  no as CHART_FORMATS,
6169
- Nn as CHART_KINDS,
6169
+ Pn as CHART_KINDS,
6170
6170
  Qc as CHART_MARKERS,
6171
6171
  at as COMMAND_FALLBACK_ICON,
6172
6172
  Qd as COMMENTS_PANEL_LABELS,
@@ -6175,8 +6175,8 @@ export {
6175
6175
  uh as CardHeader,
6176
6176
  id as ChartAxisDialog,
6177
6177
  sd as ChartDataDialog,
6178
- Nu as ChartDesignGroups,
6179
- Pu as ChartInsertMenu,
6178
+ Pu as ChartDesignGroups,
6179
+ Nu as ChartInsertMenu,
6180
6180
  od as ChartSeriesDialog,
6181
6181
  hh as Checkbox,
6182
6182
  fh as Choice,
@@ -6203,7 +6203,7 @@ export {
6203
6203
  hn as DEFAULT_OVERLAY_STYLE,
6204
6204
  en as DISPLAY_MODES,
6205
6205
  to as DRAWING_SHAPES,
6206
- Uc as DRAWING_WARPS,
6206
+ qc as DRAWING_WARPS,
6207
6207
  Wc as DRAWING_WEIGHTS,
6208
6208
  Th as Dialog,
6209
6209
  Ah as Disclosure,
@@ -6222,8 +6222,8 @@ export {
6222
6222
  Lh as GradientSlider,
6223
6223
  Re as HAND_TOOL,
6224
6224
  wr as HOST_ICONS,
6225
- Ph as Hint,
6226
- Nh as Histogram,
6225
+ Nh as Hint,
6226
+ Ph as Histogram,
6227
6227
  zt as HostButtons,
6228
6228
  Fh as ICON_STROKE,
6229
6229
  Gc as INK_TOOLS,
@@ -6242,8 +6242,8 @@ export {
6242
6242
  _h as LineChart,
6243
6243
  Kh as LineMoreLabelContext,
6244
6244
  Hh as MenuButton,
6245
- qh as MenuItem,
6246
- Uh as MenuSeparator,
6245
+ Uh as MenuItem,
6246
+ qh as MenuSeparator,
6247
6247
  jh as Modal,
6248
6248
  Gh as ModalBody,
6249
6249
  Yh as ModalClose,
@@ -6271,7 +6271,7 @@ export {
6271
6271
  mf as PopoverTrigger,
6272
6272
  pf as PreviewDialog,
6273
6273
  Oe as READ_ONLY_REASON,
6274
- Ne as READ_ONLY_RULES,
6274
+ Pe as READ_ONLY_RULES,
6275
6275
  Ll as RESERVED_SHORTCUTS,
6276
6276
  gf as RGB_IDENTITY,
6277
6277
  Mt as ReadOnlyError,
@@ -6297,8 +6297,8 @@ export {
6297
6297
  lu as TesseraIcons,
6298
6298
  Lf as TextInput,
6299
6299
  Dl as TextSink,
6300
- Pf as Textarea,
6301
- Nf as Thumbnail,
6300
+ Nf as Textarea,
6301
+ Pf as Thumbnail,
6302
6302
  Ff as TimecodeField,
6303
6303
  Wf as Toaster,
6304
6304
  vu as ToolButton,
@@ -6308,16 +6308,16 @@ export {
6308
6308
  _f as TooltipProvider,
6309
6309
  Kf as TooltipTrigger,
6310
6310
  Hf as TransportBar,
6311
- qf as WORKSPACE_ACTIONS,
6311
+ Uf as WORKSPACE_ACTIONS,
6312
6312
  _u as WorkerRelay,
6313
- Uf as WorkspaceLayout,
6313
+ qf as WorkspaceLayout,
6314
6314
  hu as ZOOM_TOOL,
6315
6315
  jf as ZoomControl,
6316
6316
  Gf as addCurvePoint,
6317
6317
  nr as applyTheme,
6318
6318
  Yf as automaticFloatingPosition,
6319
6319
  Iu as base64,
6320
- Nl as bindableShortcut,
6320
+ Pl as bindableShortcut,
6321
6321
  Vf as brandTokens,
6322
6322
  hd as catalogMenuTree,
6323
6323
  lo as catalogNames,
@@ -6340,14 +6340,14 @@ export {
6340
6340
  Qf as dockHeights,
6341
6341
  fu as dragRect,
6342
6342
  _d as drawEngineOverlays,
6343
- Nr as drawOverlayInStyle,
6343
+ Pr as drawOverlayInStyle,
6344
6344
  Yu as drawPresence,
6345
6345
  dl as editsDocument,
6346
6346
  th as fileErrorReason,
6347
6347
  em as formatTimecode,
6348
6348
  tm as hitCurvePoint,
6349
6349
  du as isFileChangedError,
6350
- Pt as isMac,
6350
+ Nt as isMac,
6351
6351
  nh as isOpenableUrl,
6352
6352
  Fi as isReadOnlyError,
6353
6353
  dn as kitLeases,
@@ -6364,7 +6364,7 @@ export {
6364
6364
  sm as meterLayout,
6365
6365
  Oi as modeStorageKey,
6366
6366
  lm as moveCurvePoint,
6367
- Nt as needsParams,
6367
+ Pt as needsParams,
6368
6368
  Hu as oneInFlight,
6369
6369
  rh as openErrorReason,
6370
6370
  cm as overflowOf,
@@ -6402,7 +6402,7 @@ export {
6402
6402
  nd as useChartSpec,
6403
6403
  Xu as useCommentAnchors,
6404
6404
  Im as useConfirm,
6405
- qu as useConflictReport,
6405
+ Uu as useConflictReport,
6406
6406
  Mm as useDialogFocus,
6407
6407
  Tm as useDismissableLayer,
6408
6408
  Au as useEngineQuery,
@@ -6418,7 +6418,7 @@ export {
6418
6418
  Eu as useLease,
6419
6419
  Ac as useLeases,
6420
6420
  Em as useMediaQuery,
6421
- Uu as usePresence,
6421
+ qu as usePresence,
6422
6422
  yu as useReadOnly,
6423
6423
  Gu as useRemoteCarets,
6424
6424
  ju as useRemoteSelections,
@@ -6430,5 +6430,5 @@ export {
6430
6430
  Zu as withPhrases,
6431
6431
  Lm as workspaceSlug,
6432
6432
  Fm as workspaceTree,
6433
- Pm as writeKitStore
6433
+ Nm as writeKitStore
6434
6434
  };