@aiquants/console-ui 0.8.2 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ pnpm add @aiquants/console-ui
21
21
  | `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
22
22
  | `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the topmost open modal dialog of a document, the tone table and the CSS text of a colour of both schemes, the layout arithmetic and the figure formulas, number, zoned-time and instant formatting, the reading of a number field's text, the rule of a text with nothing to read, the label catalogs, the read contract with its keep-last-good machine, and the keyset paging machine (listed below). Server-side loaders and hosts import from here without loading React. |
23
23
  | `@aiquants/console-ui/testing` | DOM-only: `scanColourRoles(root, { exclude })`, the colour-role scan a console runs on its own rendered DOM, text (the markers of a `List` included) and SVG graphics alike (see Tokens and colours), and the model of the modal dialog methods a test DOM lacks, `installDialogModel()` with `openModals()`, `pressEscape(dialog)` and `sendCloseRequest(dialog)` (see Testing in jsdom). It takes elements and loads no React. |
24
- | `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` (and their more-contrast colours on `[data-cui-root][data-cui-contrast="more"]`) and the component rules, all inside `@layer cui`. |
24
+ | `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` (with their more-contrast colours on `[data-cui-root][data-cui-contrast="more"]` and every duration at `0ms` on `[data-cui-root][data-cui-reduced-motion]`) and the component rules, all inside `@layer cui`. |
25
25
 
26
26
  The `/core` exports:
27
27
 
@@ -59,7 +59,8 @@ Load the stylesheet once, bind the package's neutral font variables to the host'
59
59
 
60
60
  ### Loading the stylesheet
61
61
 
62
- Every rule of the stylesheet sits in the cascade layer `cui`. Cascade layers rank in the order they are first declared, and the `cui` layer must rank above any layer that holds a reset: the paddings and borders the layout arithmetic counts (the card's 1 px rule and the 23 px padding inside it, the 44 px controls and rows, the 52 px rows that hold a control) are otherwise overridden by the reset (Tailwind's preflight sets `padding: 0; border: 0 solid` on every element in its `base` layer).
62
+ Every rule of the stylesheet sits in the cascade layer `cui`. Cascade layers rank in the order they are first declared, and the `cui` layer must rank above any layer that holds a reset: the paddings and borders the layout arithmetic counts (the card's 1 px rule and the 23 px padding inside it, the 44 px controls and rows, the 52 px rows that hold a control)
63
+ and the margin that centres a `Dialog` (the browser's own `margin: auto`, which the stylesheet restates) are otherwise overridden by the reset (Tailwind's preflight sets `margin: 0; padding: 0; border: 0 solid` on every element in its `base` layer).
63
64
  Unlayered host rules beat every layer whatever their order or specificity, so the host's reset must itself sit in a layer ranked below `cui`: an unlayered reset (normalize.css, modern-normalize, Tailwind v3's `@tailwind base`) overrides the package.
64
65
 
65
66
  - **Tailwind v4 host**: `@import` the stylesheet in the CSS entry after the Tailwind layer statement, so `cui` is declared after `base` (it then ranks last), or name the order explicitly:
@@ -137,6 +138,8 @@ A console shows every instant with `formatInstant(iso, formatLocale, timeZone)`
137
138
  A console has exactly one root: a `ConsoleUiRoot` rendered inside another one throws, because a second root would add a second live region and a second token scope and could switch the language partway through the console. A view that is also used inside a console built on the package therefore takes the root from its host instead of wrapping itself in one.
138
139
  `contrast` picks the contrast of the palette: `"standard"` (the default) or `"more"`, the more-contrast palette (see Tokens and colours). It is written to the root's `data-cui-contrast`, and any other value throws `RangeError` when the root renders instead of drawing the standard palette silently.
139
140
  A host with a contrast setting of its own maps that setting here; a host that follows the operating system passes `"more"` while `prefers-contrast: more` matches. Forced-colors mode (Windows high contrast) is not this setting: there the browser replaces the palette with system colours whatever `contrast` is (see Tokens and colours).
141
+ `reducedMotion` lets a host reduce the motion of every component whatever the operating system prefers: `true` marks the root with `data-cui-reduced-motion`, under which the package draws as it does for a reader whose `prefers-reduced-motion` is `reduce` (every duration `0ms`, the indeterminate progress segment resting in the middle of its track). Without it (or with `false`) the root carries no mark and the media query alone decides. A value other than a boolean throws `TypeError` when the root renders.
142
+ A host with a per-user motion setting passes that setting here (the operating system's preference still applies on its own); any part of the host that moves by its own rules reads the same setting.
140
143
 
141
144
  The root sets no font property: host content inside the root keeps its own font family, size, weight and line height, and inherits only the root's text colour (the `fg` role) and the `--cui-*` variables, drawn over the root's `surface` background. The package's body type (13/20) and sans face are declared by `Card` for what is drawn in it.
142
145
  The root declares no `color-scheme` either: every colour is a `light-dark()` pair, so the palette follows the scheme the root inherits. A host with its own light and dark modes binds them to `color-scheme` (`html { color-scheme: light; }` and `html.dark { color-scheme: dark; }`), so the console and the host never show different schemes; `color-scheme: light dark` on `:root` would follow the operating system instead and can disagree with the host's own switch.
@@ -155,7 +158,8 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
155
158
  - the dialog's measure `measure-dialog`, `calc(40ic + 2 * var(--cui-space-6))`: a paragraph of 40 ideographs (WCAG 1.4.8 keeps a CJK line at or below 40 characters; `ic` is the font's own ideograph advance) and the dialog's inset of 24 on both sides, its border included. It is the width of a `Dialog`, and a host that draws a box of the same outer width (an empty state's card) reads the same variable instead of copying the formula.
156
159
  Only the 20 px lines (`caption` and `body`) and the 28 px `title` line, whose difference from 44 is a multiple of 8, can be centred in a 44 px box on the lattice, and every control draws its text in `body` or `title`, except a compact `SegmentedControl` (a band of supplementary controls), whose 28 px faces draw `caption` text inside 44 px targets.
157
160
  - The token variables are declared on `[data-cui-root]` (never `:root`) with lengths in rem, the strokes (`border-width` 1, `focus-width` 2, `focus-offset` 2, `marker-width` 2) in px and the durations in ms. A browser snaps a used border width down to whole device pixels, so a rem stroke would leave the paddings that compensate for the border (`calc(… - var(--cui-border-width))`) off the lattice for a reader who enlarges the root font size; in px every lattice measure scales exactly with the root font size around a 1 px border.
158
- - Every duration is read from the `--cui-motion-*` variables, which are `0ms` while the reader prefers reduced motion (`prefers-reduced-motion: reduce`), so a component that moves stops without a rule of its own; no rule writes a duration by hand, and the indeterminate progress segment sweeps only for a reader who allows motion.
161
+ - Every duration is read from the `--cui-motion-*` variables, which are `0ms` while the reader prefers reduced motion (`prefers-reduced-motion: reduce`) and in a root the host asks to reduce motion (`reducedMotion`, the rule `[data-cui-root][data-cui-reduced-motion]` with the same declarations), so a component that moves stops without a rule of its own.
162
+ No rule writes a duration by hand, and the indeterminate progress segment sweeps only for a reader who allows motion, outside every root that has asked to reduce it (`:not([data-cui-reduced-motion] *)` on the moving element inside the media query; the stylesheet's tests hold every animation to that form).
159
163
  - Text and surface colours are applied through role attributes only. `data-cui-fg` paints text, `data-cui-surface` paints the surface text sits on, `data-cui-accent` paints non-text graphics, `data-cui-fill` paints the surface of a figure's shape (always the surface of the shape's group, which its text is measured on) and `data-cui-stroke` a figure's lines. Every role has a light and a dark value, written as `light-dark(<light>, <dark>)` (see Wrapping a console for the scheme). `CONTRAST_PAIRS.light` and `CONTRAST_PAIRS.dark` list the same pairs: for every role,
160
164
  the surfaces it may be drawn on with the WCAG 2 ratio on each in that scheme.
161
165
  Every pair meets AAA (`CONTRAST_MINIMUM`: 7 for text, 4.5 for large text, 3 for non-text; the lowest text and non-text ratios are 7.12 and 3.47 in the light scheme, 9.29 and 5.54 in the dark one), and a pair not in the table is never drawn. `Text` is the only component that paints caller text, and it paints only through a text role.
@@ -296,7 +300,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
296
300
  the rows shown at the press and at every commit while `busy` is up come before the page, the page's rows arrive in the commit in which `busy` falls (as `usePagedResource` delivers them), and the first of them is the marked element right after the last row shown before.
297
301
  A row a write added in front of or among the shown rows is not the page's, and a page that appended nothing after them (an empty last page) counts as adding nothing. Without `busy`, the rows shown at the press come before the page.
298
302
  - `data-cui-row-focus` is the public row-focus hook `LoadMore` finds rows by: inside `rows.ref` each shown row carries exactly one element with it (`rows.count` in all), and a row keeps that element while it stays shown (key rows by their record).
299
- `DataTable` rows and `RowButton` set it; a custom row list (cards, a tree, grouped rows) sets `data-cui-row-focus=""` on each row's focusable element (for example with `tabIndex={-1}`) and passes the element holding them as `rows.ref`.
303
+ `DataTable` rows, `RowButton` and `RowLink` set it; a custom row list (cards, a tree, grouped rows) sets `data-cui-row-focus=""` on each row's focusable element (for example with `tabIndex={-1}`) and passes the element holding them as `rows.ref`.
300
304
  A marked element inside a `DataTable` row detail within `rows.ref` (a row of a table nested in the detail) belongs to that nested list: `LoadMore` neither counts it nor moves focus to it, so a table whose details hold tables pages its own records.
301
305
  `DataTable`'s own rescue counts its rows by the same hook: the marked direct children of its body are its record rows, which give the positions focus moves by.
302
306
  In the first commit after a press, `LoadMore` throws when `rows.ref` is not attached or holds a number of marked elements other than `rows.count`.
@@ -309,7 +313,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
309
313
  In a field holding a value the dialog cancels the Escape's keydown in the capture phase (without stopping it, so a control inside, such as a list that closes on Escape, still gets it), so the browser makes no close request and the dialog stays open however often Escape is pressed.
310
314
  A `search` field holding a value is left to the browser: Chromium and Firefox clear the value as the keydown's default action and make no close request, so the next Escape closes the dialog.
311
315
  A composing Escape, a close request that comes from no key (a phone's back gesture) and the close request of a browser that keeps a `search` field's value on Escape are refused at `cancel`: once a page has refused a close request, a browser that follows the HTML rule lets it refuse the next one only after the operator has interacted with the page (an Escape does not count), so there a second such request in a row closes the dialog.
312
- - A pressed `Button` (busy and unavailable ones included) or `RowButton` takes focus before its `onClick` or `onSelect` runs, without scrolling, when it does not have it: WebKit (Safari on iOS and macOS) and Firefox on macOS do not focus a button on a pointer press, so the element that had focus before the press would keep it, and a `Dialog` the press opens would return focus there when it closes. A keyboard press, which comes from the focused button, moves no focus. After a pointer press the browser draws no `:focus-visible` ring.
316
+ - A pressed `Button` (busy and unavailable ones included), `RowButton` or `RowLink` takes focus before its `onClick`, `onSelect` or `onNavigate` runs, without scrolling, when it does not have it: WebKit (Safari on iOS and macOS) and Firefox on macOS do not focus a button or a link on a pointer press, so the element that had focus before the press would keep it, and a `Dialog` the press opens would return focus there when it closes. A keyboard press, which comes from the focused button, moves no focus. After a pointer press the browser draws no `:focus-visible` ring.
313
317
  - The root owns the one announcer: `useAnnounce()` returns `announce(text)`. It writes to the root's polite live region or, while a `Dialog` (of this console or of another console on the page) is the topmost open modal, to that dialog's own polite region (which the modal leaves reachable while it hides every root's).
314
318
  Calls are coalesced over a quiet window: every call restarts a timer of `ANNOUNCE_SETTLE_MS` (150 ms), and when it passes without a call (or 1 s after the first pending call, so a stream of calls cannot hold the write back) the pending sentences are written to the region once, as one string in call order.
315
319
  A browser exposes the accessibility tree per rendering update, not per task, while one operator action spreads its calls over several tasks (an async handler continues after `await`, and React runs a default-lane commit's passive effects in a later task), so a write per task would let a later sentence replace an earlier one before it is read.
@@ -330,6 +334,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
330
334
  - A `Card`, or a `CardSection` with `region`, that the operator closes with Escape takes `onEscape` (`useEscapeToClose` on the element: the press inside calls it and does not reach an enclosing region); without `onEscape` the element has no key handler, so the press reaches the region around it. Returning focus to the control that opened it is the caller's. A non-modal region such as an inspector is drawn this way rather than as a `role="dialog"`.
331
335
  - `useEscapeToClose(onClose)` ignores Escape during IME composition and in a text field that holds a value, including a partly typed date, time or number field (its `value` is `""` while `validity.badInput` is true): closing the region would discard what the operator typed.
332
336
  Escape changes nothing in most of these fields (a `text`, `number` or `textarea` value stays; only a `search` field clears its value), so the operator leaves the field (Tab) or empties it before Escape closes the region.
337
+ It also ignores an Escape that a handler heard before the region has already cancelled (`preventDefault()`, on the React event or on the native one), and lets it go on: that handler used the press, such as a control inside that closes its list on Escape, or a page-level listener in the capture phase that closes a menu, so the same press does not close the region too, and the next Escape does. `onEscape` of `Card`, `CardSection` and a group `Figure`, and the open popup of a collapsible `Tabs`, follow the same rule.
333
338
 
334
339
  ### Reads
335
340
 
@@ -404,12 +409,12 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
404
409
 
405
410
  | Component / hook | Contract |
406
411
  | --- | --- |
407
- | `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS`, `useAccessFailure` | Root, token scope, language, format locale, time zone, announcer and its quiet window, and the host's presenter of access failures (`accessFailure`; `useAccessFailure()` returns it, see Wrapping a console). |
412
+ | `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS`, `useAccessFailure` | Root, token scope, contrast of the palette (`contrast`), the host's reduced motion (`reducedMotion`), language, format locale, time zone, announcer and its quiet window, and the host's presenter of access failures (`accessFailure`; `useAccessFailure()` returns it, see Wrapping a console). |
408
413
  | `Text`, `VisuallyHidden` | Text in a role, a type step and optionally a face (`face="mono"` for identifiers; an inline text that names a face is aligned to the top of its line, so the line stays on the lattice, see Layout); `space="preserve"` keeps the spaces and line breaks as written (`white-space: pre-wrap`, `data-cui-space="preserve"`) for a multi-line value such as a JSON document in a table cell or a line of a diff, whose kept lines still wrap at the column (unlike `CodeBlock`, no scroll frame and no focus stop); a paragraph (`as="p"`) carries the reading measure. Text read by assistive technology but not drawn. |
409
414
  | `Card`, `CardSection` | `h2` card (a named region that draws its content in the body type and the sans face) and flat `h3` section (a landmark only with `region`, for a non-modal region such as an inspector; `level={4}` draws an `h4` in the same step and weight for a section inside a section, so the outline does not skip a level); `headingRef` makes the heading a programmatic focus target (`tabIndex={-1}`). `onEscape` closes a card or a region section on Escape (only a region takes it; see Focus and announcements). A card or section that another control expands takes that control's `aria-controls` target as its `id` (the detail of a `SelectableList` is `<CardSection id={detailId} …>`), so the reference resolves. |
410
415
  | `Stack`, `Cluster` | Vertical and wrapping horizontal layout with a spacing token; `Cluster as="span"` is the phrasing form a control's content may hold (an inline-flex `span`, same gap tokens). |
411
416
  | `List`, `ListItem` | A list of items stacked with a spacing token (`gap`): a `ul` or an `ol` with an explicit `role="list"` (WebKit with VoiceOver does not expose a list without markers as a list), its items `li` that take the caller's `testId` (one for the items of a list, or one per item) and `dataAttributes` for their identity; the list derives no test id. `marker="bullet"` (a `ul`) or `"number"` (an `ol`) draws the foundation's markers in the items' `type` (`body` or `prose`) for items whose content carries no marker of its own (lines of text); `marker="none"` keeps the semantics and draws nothing for items that carry their own name, number or box (a disclosure, a row with a control, a link, a line that starts with its own number), and `ordered` picks the `ol` when the order means something. A marked list has a marker column at least 16 px (`space-4`) wide and as wide as its widest marker, shared by every item (a subgrid), and the text 8 px (`space-2`) after it: 24 px for a bullet and the numbers 1 to 9, further out together for longer numbers or wider text spacing. A list without markers carries its `gap` as `data-cui-gap`; a marked list, whose two axes differ, carries it as `data-cui-row-gap` (between the items) and the 8 px as `data-cui-column-gap="space-2"` (see Layout for what each attribute promises). The marker is one line of the list's type at the top of its item, in the text colour the item inherits: it never changes the item's height, it is text measured at 7:1 like any text (`scanColourRoles` reads one text per item) and forced colours repaint it as text; a bullet is hidden from assistive technology, a number is read. Items have no padding or border, so n items of k lines of a line L apart by g are nkL + (n − 1)g px high, on the lattice. An item may hold block content (a disclosure, a paragraph, a row of labels); a marked list's item text carries the reading measure. `label` names the list (`aria-label`; a blank one throws `RangeError` naming `testId`); `id` and `hidden` make it the `aria-controls` target of the control that shows it. `ListItem` throws outside a `List` and inside another item's content without a `List` of its own. |
412
- | `Button`, `Link`, `FragmentLink` | Buttons that keep focus when they cannot act (a pressed `Button` takes focus; see Focus and announcements); an in-document move drawn as a link (no `href`); a real link to a place in the same document (`href="#<targetId>"`, drawn like `Link`, with an optional `onFollow` called with the click event; the browser moves unless it calls `event.preventDefault()`, as a caller that moves the focus itself must, since the browser's move drops the focus when the target cannot take it), for a jump list whose entries assistive technology should list with the links. |
417
+ | `Button`, `Link`, `FragmentLink` | Buttons that keep focus when they cannot act (a pressed `Button` takes focus; see Focus and announcements); an in-document move drawn as a link (no `href`); a real link to a place in the same document (`href="#<targetId>"`, drawn like `Link`, with an optional `onFollow` called with the click event; the browser moves unless it calls `event.preventDefault()`, as a caller that moves the focus itself must, since the browser's move drops the focus when the target cannot take it), for a jump list whose entries assistive technology should list with the links. Each takes `keyShortcuts`, the keyboard shortcuts its caller handles in WAI-ARIA's notation (`Control+Enter Meta+Enter`), drawn unchanged as `aria-keyshortcuts`; an empty or white-space-only text throws `RangeError` naming the `testId`. |
413
418
  | `Pill` | A text status label, 28 px high (a body line it sits on stays 20 px), text width + 16 px wide, `vertical-align: top`; as a line of a `RowButton` it keeps that width. A line mixing a `Pill` and text is one `Text` span containing the `Pill`. |
414
419
  | `Notice`, `AlertMessage` | Quiet note; failure message read once per occurrence. Both are paragraphs with the reading measure. |
415
420
  | `AccessFailureNotice` | The in-place notice of an access failure, drawing the `AccessFailureView` `accessFailureView` of `@aiquants/auth-core` builds and deciding nothing the view does not say: the title (bold) and one paragraph per sentence on a `warning-tint` with the reading measure, then one `Button` per action in the view's order on the surface below the tint (the `warning-tint` has no border or focus pair), signing in (`sign-in`, `sign-in-again`, `sign-in-again-in-new-window`) primary and every other action (`retry`, `back`, `top`) secondary; a view without actions draws no row. `handlers` (`AccessFailureHandlers`) holds one function per action the view shows: an action without one throws `TypeError`. Read by the view's politeness (see Focus and announcements); `data-cui-access-failure` carries the kind. |
@@ -419,7 +424,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
419
424
  | `MetricTile`, `TileGrid` | Metric tiles (100 px high) and the divisor grid. A tile's value is a `Measured` count (`value`, optionally with `unit`) or text (`text`), `null` while not measured, when it must be `neutral`; its label, sublabel and value are paragraphs with the reading measure. `count` is checked against the element children: a Fragment's children count one by one, a condition that renders no tile (`false`, `null`) does not count, a text child throws, and a component child counts as one tile whatever it renders (a wrapper returning `null` or two tiles is still one), so render `MetricTile` elements directly. |
420
425
  | `DataTable`, `LoadMore` | Fixed-layout table in a focusable named scroll frame; load-more that moves focus to the first row the page appended or the end-of-records text. A column header may carry a second line under its name (`ColumnDef.note`, a block in the regular weight inside the `th`, so it is part of the header every cell is read with; k caption lines make the header row 44 + 20k). One column may be the row header (`ColumnDef.rowHeader`: its cells are `th scope="row"`, centred like the other cells in a `row-control` table; two throw `RangeError`). The row header column may carry secondary lines per row under its cell's content (`ColumnDef.rowHeaderNote: (row) => ReactNode`, `null` for a row without one): a block in the regular weight inside the bold `th`, drawn like a column header's note, so the lines are part of the row header every cell of the row is read with, and a `row` row with k body lines of note is 24 + 20(k + 1), on the lattice. Only the row header column takes one: the type refuses it on another column, and a column that has one without being the row header throws `RangeError` naming `testId`. `rowDetail` (`open`, `id`, `render`) follows every record row with its detail row, one cell across every column whose `id` is the `aria-controls` of the row's opening button (`Button` with `expanded` and `controls`): open, it shows `render(row)` right after its row in the reading and focus order, any number at once; closed, it is `hidden` and empty, so a collapsed button's reference resolves too. A detail row carries `data-cui-row-detail` (`open` or `closed`) and no row-focus hook, and adds no rule: its cell keeps the table's cell padding, so it stays on the lattice. `rowSize` is `row` (44 px rows), `row-control` (52 px, for rows that hold a control) or `row-compact` (28 = 4 + 20 + 3 + 1: one `body` line with 4 px above and below, k lines 8 + 20k) for a read-only line table such as a text diff, where 500 lines are 14,000 px high instead of 22,000. A compact row holds no control or focus target, as a control's 44 px target does not fit it: a cell holding a link, a button, a field, a disclosure, a label, an element with `tabindex` or `contenteditable` or a nested table throws `RangeError` naming `testId` after the render, and a compact table takes no `rowDetail` (the type refuses it). |
421
426
  | `CodeBlock` | Preformatted text (a JSON document, an excerpt of a log) drawn exactly as given in the mono face and the `body` type, without wrapping, in a scroll frame on `sunken` with 8 px padding: a region named by `label` that takes keyboard focus, so a long line can be scrolled into view from the keyboard. As a focusable frame it is never lower than the 44 px target (one line draws 44 px; k lines draw 2 × 8 + 20k px from two lines on). |
422
- | `SelectableList`, `RowButton` | Master list of selectable rows (`data-selected`, `aria-expanded`, `aria-controls`); the list carries an explicit `role="list"`, which WebKit needs to expose an unstyled list as a list. A pressed row takes focus before `onSelect` runs, as a pressed `Button` does (see Focus and announcements). |
427
+ | `SelectableList`, `RowButton`, `RowLink` | Master list of selectable rows (`data-selected`, `aria-expanded`, `aria-controls`); the list carries an explicit `role="list"`, which WebKit needs to expose an unstyled list as a list. A pressed row takes focus before `onSelect` runs, as a pressed `Button` does (see Focus and announcements). `RowLink` is the row as a real link (`href`), for a list whose rows open places with addresses of their own: a plain primary click takes focus and hands `href` to the host's router (`onNavigate`), while a click with a modifier key or another button keeps the browser's own behaviour on the real `href` (a new tab, a new window); `current` marks the row of the current page with `aria-current="page"` and draws it like a selected `RowButton`. It has `RowButton`'s shape, text, focus ring and `LoadMore` mark and holds the same phrasing content; list such rows in a `List` without markers and with the `space-1` gap (`marker="none"`, `gap="space-1"`), as `SelectableList` lists its own. Both rows take `keyShortcuts` as `Button` does. |
423
428
  | `ComparisonGrid` | Side-by-side comparison: a table named by its (visually hidden) `caption`, or one group per column named by its heading. Both layouts are in the DOM; each cell is a function called once per layout with `"table"` or `"stack"`, so every cell is rendered and mounted twice (the hidden copy included) and the caller gives each copy its own ids, test ids and refs. Cells must be presentational: no data read (`useResource`), announcement (`useAnnounce`) or focus management (`useFocusRescue`); keep state and effects above the grid and pass values into the cells. |
424
429
  | `Field`, `TextInput`, `PasswordInput`, `TextArea`, `Select`, `RadioGroup`, `CheckboxGroup` | Fields tied to their label, description and error with `useId`. `PasswordInput` masks what is typed, tells the browser's password manager what the password is (`autoComplete`: `new-password` for one the operator sets, `current-password` for a sign-in) and turns spell checking and capitalization off. `TextInput` takes the keyboard a touch device shows (`inputMode`: `numeric` or `decimal`; its value stays the typed text, which the caller parses) and fixed text drawn in front of the input in the same frame (`prefix`, such as a URI scheme; not part of the value, and the first text describing the input; a blank prefix throws). `TextInput`, `PasswordInput` and `Select` in a table cell or a repeated row whose headers show the name may hide their label (`labelHidden`; it stays tied by `for`). `TextInput` is `text`, `search`, `email` (the touch keyboard for an address, and the browser checks the address before a native form submits) or `datetime-local`. `TextInput`, `TextArea` and `Select` take `name`, under which a native form submits the value (one token without whitespace; an empty name, one holding whitespace or one that is not a string throws `RangeError`); a field without `name` renders none and submits nothing. `TextInput` of the `text`, `search` and `email` types and `TextArea` take `maxLength`, the most characters the field takes, counted in UTF-16 code units as the browser counts them (a positive integer: `0`, a negative number, a fraction, `NaN` or an infinity throws `RangeError`, and so does a `maxLength` on a `datetime-local` input, which the browser would ignore). `PasswordInput` takes neither. On a coarse pointer (a touch screen) the text of every field and of an input's prefix is the larger of the `body` step and 16 px, so iOS does not zoom the page each time a field takes focus; the line stays the step's, so a one-line field stays 44 px high. `CheckboxGroup` is a `fieldset` of native check boxes, each inside its 44 px label; it returns the chosen values in the options' order and refuses no option, repeated values and chosen values that are not options. Every field takes `errorId`, the id its error line takes (one token; generated when omitted), so another control can name the error as the reason it cannot act, such as the save button of a table row whose typed value cannot be read (`unavailable={{ reasonId: errorId }}`). Read a number field's text with `readDecimalText` or `readIntegerText`. |
425
430
  | `ProgressBar` | Determinate with a maximum (clamped at 100 %); indeterminate without, drawn as a quarter-length segment that sweeps the track when motion is allowed and rests in its middle otherwise. The visible label names the bar; the visible value text is hidden from assistive technology, which reads it once as the bar's `aria-valuetext`. |
@@ -429,7 +434,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
429
434
  | `Tabs` | The tab row of a console whose tabs are routes: a named `nav` of real links (not an ARIA `tablist`), the current one `aria-current="page"` with an `info-accent` marker and the medium weight. A plain click hands the tab's `href` to `onNavigate` (the host's router); a click with a modifier key or another button keeps the link's own behaviour. With `collapsible`, a container narrower than 48rem (an inline-size container query on the tab row's own width) folds the links into a full-width 44 px button naming the current tab and a popup of every tab below it (opened on press, closed on choosing a tab, Escape, a press outside or focus moving to an element outside the row, which keeps that focus where it went so the popup never covers it; focus lost to nothing, such as another window, leaves it open); a wider container is the ordinary wrapping row, so a caller that does not set it is unchanged. |
430
435
  | `Breadcrumb` | The trail to the current page: a `nav` named by the UI language's `breadcrumb` label around an ordered list of the ancestors' links (drawn like `Link`) and the current page's name as `aria-current="page"` text; separators are hidden from assistive technology. Clicks as `Tabs`. |
431
436
  | `Toolbar` | `role="toolbar"` with a roving tabindex over its buttons (see Focus and announcements), laid out like a `Cluster` with an 8 px gap. |
432
- | `Dialog` | A modal `<dialog>` named by its title, with its close button and its own live region (see Focus and announcements); at most 40 ideographs plus its padding wide (WCAG 1.4.8), never wider than the viewport less 24 px on each side. `description` (a confirmation's sentence) is drawn under the header as a paragraph with the reading measure and is the dialog's `aria-describedby`, so it is read with the dialog's name when the dialog opens; without it the dialog has no description. `initialFocus` names the element focus moves to when it opens (the first field of a form; see Focus and announcements). |
437
+ | `Dialog` | A modal `<dialog>` named by its title, with its close button and its own live region (see Focus and announcements); at most 40 ideographs plus its padding wide (WCAG 1.4.8), never wider than the viewport less 24 px on each side; centred in the viewport and never taller than the viewport (less any scrollbar) less 24 px above and below, cut down to the 4 px lattice. It declares both itself: a host's reset ranked below `cui` would otherwise remove the browser's centring margin and draw it at the top left, and the browser's own height limit falls off the lattice. `description` (a confirmation's sentence) is drawn under the header as a paragraph with the reading measure and is the dialog's `aria-describedby`, so it is read with the dialog's name when the dialog opens; without it the dialog has no description. `initialFocus` names the element focus moves to when it opens (the first field of a form; see Focus and announcements). |
433
438
  | `Figure`, `FigureNode`, `FigureEdge` | A drawing of nodes and edges (see Figures): `kind="group"` (a named `role="group"` at its natural size in a scroll frame, every node a 44 px toggle button with the foundation's focus ring, `onEscape`) or `kind="decorative"` (`aria-hidden`, cut down to the lattice as its container shrinks; `viewBox`, `pointer` and `svgRef` for a pannable one). `FigureNode` draws a box (`x`, `y` its top-left corner; a name, caption `notes` and a height from `figureBoxPlan`) or a disc (`x`, `y` its centre; its name under it, or none for `name: null`) in a `tone`, `selected` or not, with a `solid` or `dashed` outline, an optional tooltip (`title`) and, in a group figure, `press` (`label`, `description`, `expanded`, `controls`, `onPress`). `FigureEdge` draws a path (`d`) in an `emphasis` (`normal` or `high`) and a `weight` (1 to 4), with an optional arrowhead and tooltip. The parts paint only through role attributes and take no paint, class or style; `FigureNode` and `FigureEdge` throw outside a `Figure`, and every refusal (`RangeError`) names the part's `testId`: a size off the lattice, a blank name (or a box's `null` one), a box narrower than its plan, a note role not in the table on a face the node takes, a group node without `press` or a decorative one with it, a pressable node below 44 px or closer than 4 px to the edge, and a weight outside 1–4. |
434
439
  | `Switch` | An on/off setting that takes effect at once: `role="switch"` with `aria-checked`, named by its label; the thumb sits at the track's start when off and at its end when on, moving over `motion-1`. In a table cell whose headers show the name it may hide its label (`labelHidden`; the target is the 44 px box across the 52 px track). A cell holding more than one switch shows which is which instead: each label is a short visible name after a `VisuallyHidden` subject (the row and the column), so the name stays whole and contains the visible name. Takes `unavailable`, a `ref` and caller `dataAttributes`. |
435
440
  | `PanelTabs` | Tabs that switch one panel within the page: a `tablist` of `tab` buttons (the selected one `aria-selected`, drawn like a `Tabs` tab) and the `tabpanel` they control, named by the selected tab; a press on the selected tab asks for nothing. The panel may be described by visible text inside it (`panelDescribedBy`, such as a hint on scrolling a wide figure). A list of one tab is allowed. Refuses no tab, repeated keys and a selected key that is not a tab. |
@@ -486,6 +491,7 @@ pnpm --filter @aiquants/console-ui run test:coverage # exits non-zero below 100
486
491
  ```
487
492
 
488
493
  The stylesheet tests read `src/styles/components.css` with `node:fs` and parse it with postcss.
494
+ `tests/dialogBox.spec.tsx` measures a `Dialog`'s box in real Chromium, Firefox and WebKit through Playwright, so the test run needs the browsers of the installed `playwright` (`pnpm --filter @aiquants/console-ui exec playwright install chromium firefox webkit`).
489
495
 
490
496
  ### Testing in jsdom
491
497
 
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkRYHSVWM2cjs = require('./chunk-RYHSVWM2.cjs');var _chunkXLOWKWIIcjs = require('./chunk-XLOWKWII.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var He=_react.createContext.call(void 0, null),Ft=" ",St='[inert], [aria-hidden="true" i]',Oe="data-cui-dialog-announcer",Sn=`:scope > [${Oe}]`,Mn=e=>{if(e.closest(St)!==null)return{hidden:'an ancestor is inert or aria-hidden="true"'};let t=_chunkRYHSVWM2cjs.b.call(void 0, e.ownerDocument);if(t.kind==="none")return{region:e};if(t.kind==="undecidable")return{hidden:"focus is in no open modal dialog and they do not nest, so which one is topmost cannot be told"};let n=t.dialog;if(n.contains(e))return{region:e};let r=n.querySelector(Sn);return r===null?{hidden:"the topmost open modal dialog neither contains the console nor is a Dialog"}:r.closest(St)!==null?{hidden:'the topmost open modal dialog is a Dialog whose live region has an inert or aria-hidden="true" ancestor'}:{region:r}},In=e=>{try{e.querySelectorAll(_chunkRYHSVWM2cjs.a)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},pe= exports.ANNOUNCE_SETTLE_MS =150,$n=1e3,Mt=new WeakMap,Fn=(e,t)=>{let n=_nullishCoalesce(Mt.get(e), () => (new Set)),r={text:t};Mt.set(e,n.add(r)),setTimeout(()=>n.delete(r),pe);let a=e.ownerDocument.createElement("span");a.textContent=[...n].map(o=>o.text).join(Ft),e.replaceChildren(a)},An= exports.ConsoleUiRoot =({locale:e,formatLocale:t,timeZone:n,accessFailure:r,contrast:a="standard",testId:o,children:s})=>{if(_react.useContext.call(void 0, He)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");if(typeof r!="function")throw new TypeError("ConsoleUiRoot: accessFailure must be the host's presenter of access failures (a function)");if(!_chunkXLOWKWIIcjs.h.includes(a))throw new RangeError(`ConsoleUiRoot: contrast must be one of ${_chunkXLOWKWIIcjs.h.join(", ")}: ${String(a)}`);let i=_chunkRYHSVWM2cjs.p.call(void 0, e),[d]=Intl.getCanonicalLocales(t),p=_react.useMemo.call(void 0, ()=>new Intl.DateTimeFormat(d,{timeZone:n}).resolvedOptions().timeZone,[d,n]),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{In(u.current.ownerDocument)},[]);let b=_react.useCallback.call(void 0, f=>{if(f.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let h=()=>{let{texts:E,settle:R,deadline:T}=c.current;c.current=null,clearTimeout(R),clearTimeout(T);let v=u.current;if(v===null)return;let k=E.join(Ft),I=Mn(v);if("hidden"in I)throw new Error(`announce: the live region is hidden from assistive technology (${I.hidden}), so this announcement would be lost: ${k}`);Fn(I.region,k)},y=c.current;if(y===null){c.current={texts:[f],settle:setTimeout(h,pe),deadline:setTimeout(h,$n)};return}y.texts.push(f),clearTimeout(y.settle),y.settle=setTimeout(h,pe)},[]),m=_react.useMemo.call(void 0, ()=>({locale:e,formatLocale:d,timeZone:p,labels:i,announce:b,accessFailure:r}),[e,d,p,i,b,r]);return _jsxruntime.jsx.call(void 0, He.Provider,{value:m,children:_jsxruntime.jsxs.call(void 0, "div",{"data-cui-root":"","data-cui-contrast":a,"data-cui-surface":"surface","data-cui-fg":"fg","data-testid":o,children:[s,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${o}-announcer`,ref:u})]})})},C= exports.useConsoleUi =()=>{let e=_react.useContext.call(void 0, He);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},g=()=>{C()},Ke= exports.useAnnounce =()=>C().announce,Dn= exports.useAccessFailure =()=>C().accessFailure;var w=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};var ye=e=>{let t=e.currentTarget;t.ownerDocument.activeElement!==t&&t.focus({preventScroll:!0})};var Kn=new Set(["abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr"]),Un=e=>{for(let t of e.querySelectorAll("*")){let n=t.localName;if(!Kn.has(n)||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable"))return n}return null},O=(e,{testId:t,part:n,host:r})=>{_react.useLayoutEffect.call(void 0, ()=>{let a=Un(e.current);if(a!==null)throw new RangeError(`${t}: the ${n} is the content of a ${r} and holds only non-interactive phrasing content, not <${a}>`)})};var P=({fg:e,type:t,face:n,as:r="span",space:a,testId:o,id:s,tabIndex:l,ref:i,children:d})=>(g(),_jsxruntime.jsx.call(void 0, r,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":n,"data-cui-space":a,"data-cui-measure":r==="p"?"reading":void 0,"data-testid":o,id:s,tabIndex:l,ref:i,children:d}));var _n=/\s/,Ue=(e,t)=>{if(e===""||_n.test(e))throw new RangeError(`The id of ${t} must be one token without whitespace: "${e}"`);return e},X=(e,t)=>{if(e!==void 0){if(e.reason!==void 0){if(e.reason.trim()==="")throw new RangeError("An unavailable control needs a reason that is not blank");return t}return Ue(e.reasonId,"an unavailable control's reason")}},B=(...e)=>{let t=e.filter(n=>n!==void 0);return t.length===0?void 0:t.join(" ")};var Vn={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"body"}},Be=({subject:e,children:t})=>{let n=_react.useRef.call(void 0, null);return O(n,e),_jsxruntime.jsx.call(void 0, "span",{ref:n,children:t})},$= exports.Button =({variant:e,children:t,testId:n,type:r="button",onClick:a,unavailable:o,describedBy:s,expanded:l,controls:i,ref:d,dataAttributes:p,busy:u,busyLabel:c})=>{g();let b=_react.useId.call(void 0, ),m=X(o,b),f=u===!0||o!==void 0,h=Vn[e],y=E=>{if(ye(E),f){E.preventDefault();return}_optionalChain([a, 'optionalCall', _2 => _2(E)])};return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[_jsxruntime.jsx.call(void 0, "button",{className:"cui-button",type:r==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":h.fg,"data-cui-surface":h.surface,"data-cui-type":h.type,"data-testid":n,"aria-disabled":f?!0:void 0,"aria-busy":u===!0?!0:void 0,"aria-describedby":B(s,m),"aria-expanded":l,"aria-controls":i,onClick:y,ref:d,...w(p),children:_jsxruntime.jsx.call(void 0, Be,{subject:{testId:n,part:"label",host:"button"},children:u===!0?c:t})}),_optionalChain([o, 'optionalAccess', _3 => _3.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:b,testId:`${n}-reason`,children:o.reason})]})},Wn= exports.Link =({onNavigate:e,children:t,testId:n,ref:r})=>(g(),_jsxruntime.jsx.call(void 0, "button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"body","data-testid":n,onClick:e,ref:r,children:_jsxruntime.jsx.call(void 0, Be,{subject:{testId:n,part:"label",host:"button"},children:t})})),zn=/^[^\s#]+$/,Jn= exports.FragmentLink =({targetId:e,children:t,testId:n,onFollow:r,dataAttributes:a})=>{if(g(),!zn.test(e))throw new RangeError(`A fragment link needs the target's id without "#" or white space: "${e}"`);return _jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:`#${e}`,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":n,onClick:r,...w(a),children:_jsxruntime.jsx.call(void 0, Be,{subject:{testId:n,part:"label",host:"link"},children:t})})};var jn=({gap:e,testId:t,children:n})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:n})),_e= exports.Cluster =({gap:e,as:t="div",testId:n,children:r})=>(g(),_jsxruntime.jsx.call(void 0, t,{className:"cui-cluster","data-cui-gap":e,"data-testid":n,children:r}));var Qn=new Set(["sign-in","sign-in-again","sign-in-again-in-new-window"]),er=" ",tr= exports.AccessFailureNotice =({view:e,handlers:t,testId:n})=>{let r=Ke(),a=e.actions.map(({action:l,label:i})=>{let d=t[l];if(d===void 0)throw new TypeError(`AccessFailureNotice: no handler for the action ${JSON.stringify(l)}`);return{action:l,label:i,handler:d}}),o=e.politeness==="status"?[e.title,...e.sentences].join(er):null,s=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{o===null||s.current===o||(s.current=o,r(o))},[r,o]),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-access-failure","data-cui-access-failure":e.kind,"data-testid":n,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-notice cui-access-failure-message",role:e.politeness==="alert"?"alert":void 0,"data-cui-tone":"warning","data-cui-surface":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":`${n}-message`,children:[_jsxruntime.jsx.call(void 0, "p",{className:"cui-access-failure-title","data-cui-measure":"reading","data-testid":`${n}-title`,children:e.title}),e.sentences.map(l=>_jsxruntime.jsx.call(void 0, "p",{className:"cui-access-failure-sentence","data-cui-measure":"reading",children:l},l))]}),a.length===0?null:_jsxruntime.jsx.call(void 0, _e,{gap:"space-2",testId:`${n}-actions`,children:a.map(({action:l,label:i,handler:d})=>_jsxruntime.jsx.call(void 0, $,{variant:Qn.has(l)?"primary":"secondary",onClick:d,testId:`${n}-${l}`,children:i},l))})]})};var me=(e,t,n)=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),n(t))};var nr=({items:e,current:t,onNavigate:n,testId:r})=>{let{labels:a}=C();if(new Set(e.map(o=>o.id)).size!==e.length)throw new RangeError(`Breadcrumb keys must be unique: ${e.map(o=>o.id).join(", ")}`);return _jsxruntime.jsx.call(void 0, "nav",{className:"cui-breadcrumb","aria-label":a.breadcrumb,"data-testid":r,children:_jsxruntime.jsxs.call(void 0, "ol",{className:"cui-breadcrumb-list",role:"list","data-cui-type":"body",children:[e.map(o=>_jsxruntime.jsxs.call(void 0, "li",{className:"cui-breadcrumb-item",children:[_jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:o.href,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":`${r}-${o.id}`,onClick:s=>me(s,o.href,n),children:o.label}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-breadcrumb-separator","aria-hidden":"true","data-cui-fg":"fg-muted",children:"\u203A"})]},o.id)),_jsxruntime.jsx.call(void 0, "li",{className:"cui-breadcrumb-item",children:_jsxruntime.jsx.call(void 0, "span",{"aria-current":"page","data-cui-fg":"fg","data-testid":`${r}-current`,children:t})})]})})};var or=229,ar=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),ge=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&ar.has(e.type)&&(e.value!==""||e.validity.badInput),qe=e=>e.nativeEvent.isComposing||e.keyCode===or,_=(e,t)=>{e.key!=="Escape"||qe(e)||ge(e.target)||(e.stopPropagation(),t())},ir= exports.useEscapeToClose =e=>_react.useCallback.call(void 0, t=>_(t,e),[e]);var Kt=e=>e===void 0?void 0:t=>_(t,e),Ge= exports.Card =({id:e,title:t,description:n,actions:r,onEscape:a,testId:o,headingRef:s,ref:l,dataAttributes:i,children:d})=>{g();let p=_react.useId.call(void 0, ),u=Kt(a);return _jsxruntime.jsxs.call(void 0, "section",{className:"cui-card",id:e,"aria-labelledby":p,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:l,onKeyDown:u,...w(i),children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-header",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-heading",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-card-title",id:p,"data-cui-type":"title","data-testid":`${o}-heading`,ref:s,tabIndex:s===void 0?void 0:-1,children:t}),n===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:n})]}),r===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-actions",children:r})]}),d]})},sr={3:"h3",4:"h4"},dr= exports.CardSection =({id:e,title:t,subtitle:n,level:r=3,region:a=!1,onEscape:o,testId:s,headingRef:l,ref:i,dataAttributes:d,children:p})=>{g();let u=_react.useId.call(void 0, ),c=Kt(o),b=sr[r],m=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-section-heading",children:[_jsxruntime.jsx.call(void 0, b,{className:"cui-card-section-title",id:u,"data-cui-type":"body","data-testid":`${s}-heading`,ref:l,tabIndex:l===void 0?void 0:-1,children:t}),n===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:n})]}),p]});return a?_jsxruntime.jsx.call(void 0, "section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":s,ref:i,onKeyDown:c,...w(d),children:m}):_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section",id:e,"data-testid":s,ref:i,...w(d),children:m})};var ur=({label:e,code:t,testId:n})=>(g(),_jsxruntime.jsx.call(void 0, "section",{className:"cui-code-frame",tabIndex:0,"aria-label":e,"data-cui-surface":"sunken","data-testid":n,children:_jsxruntime.jsx.call(void 0, "pre",{className:"cui-code","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"mono","data-testid":`${n}-code`,children:t})}));var j=({ruleKey:e,css:t})=>_jsxruntime.jsx.call(void 0, "style",{href:e,precedence:"cui",children:t});var yr=({caption:e,attributes:t,columns:n,attributePx:r,columnMinPx:a,testId:o})=>{g();let s=_react.useId.call(void 0, );for(let u of[r,a])if(!(Number.isFinite(u)&&u>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${u}`);if(n.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let u of n)for(let c of t)if(!Object.hasOwn(u.cells,c.key))throw new RangeError(`Column "${u.key}" has no value for attribute "${c.key}"`);let l=r+n.length*a,i=`cui-comparison-a${r}-c${a}-n${n.length}`,d=u=>`[data-cui-comparison="${i}"][data-cui-comparison-layout="${u}"]`,p=`${d("table")}{display:none}@container (min-width:${_chunkRYHSVWM2cjs.O.call(void 0, l)}){${d("table")}{display:block}${d("stack")}{display:none}}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-cui-stack-below-px":l,"data-testid":o,children:[_jsxruntime.jsx.call(void 0, j,{ruleKey:i,css:p}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-frame","data-cui-comparison":i,"data-cui-comparison-layout":"table",children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-comparison-table","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "caption",{className:"cui-visually-hidden",children:e}),_jsxruntime.jsxs.call(void 0, "colgroup",{children:[_jsxruntime.jsx.call(void 0, "col",{style:{width:_chunkRYHSVWM2cjs.O.call(void 0, r)}}),n.map(u=>_jsxruntime.jsx.call(void 0, "col",{},u.key))]}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "td",{}),n.map(u=>_jsxruntime.jsx.call(void 0, "th",{scope:"col",children:u.heading},u.key))]})}),_jsxruntime.jsx.call(void 0, "tbody",{children:t.map(u=>_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "th",{scope:"row",children:u.label}),n.map(c=>_jsxruntime.jsx.call(void 0, "td",{children:c.cells[u.key]("table")},c.key))]},u.key))})]})}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-stack","data-cui-comparison":i,"data-cui-comparison-layout":"stack",children:n.map((u,c)=>{let b=`${s}-column-${c}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-comparison-column",role:"group","aria-labelledby":b,"data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-heading",id:b,children:u.heading}),_jsxruntime.jsx.call(void 0, "dl",{className:"cui-comparison-list",children:t.map(m=>_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, "dt",{children:m.label}),_jsxruntime.jsx.call(void 0, "dd",{children:u.cells[m.key]("stack")})]},m.key))})]},u.key)})})]})};var oe="[data-cui-row-focus]",Ve="[data-cui-row-detail]",fr=e=>e===null?[]:[...e.querySelectorAll(`:scope > ${oe}`)],Bt=(e,t)=>{let n=new Map;t!==null&&n.set(t,0);let r=-1;for(let a of e===null?[]:e.children)a.matches(oe)?(r+=1,n.set(a,r)):r>=0&&a.matches(Ve)&&n.set(a,r);return n},_t=(e,t,n,r)=>{let a=fr(t);if(a.length===0)return n;let o=r.get(e);if(o===void 0)throw new RangeError(`rowFocusTarget: <${e.localName}> left holding focus with no position in the table (only its rows, row details and empty text hold one)`);return a[Math.min(o,a.length-1)]};var br=e=>e+1,ae= exports.useFocusRescue =e=>{let t=_react.useRef.call(void 0, e),n=_react.useRef.call(void 0, null),r=_react.useRef.call(void 0, !1),[,a]=_react.useReducer.call(void 0, br,0),o=_react.useCallback.call(void 0, (s=>()=>{r.current&&s.contains(document.activeElement)&&(n.current=s,a())}),[]);return _react.useLayoutEffect.call(void 0, ()=>(r.current=!0,()=>{r.current=!1,n.current=null}),[]),_react.useLayoutEffect.call(void 0, ()=>{t.current=e}),_react.useLayoutEffect.call(void 0, ()=>{let s=n.current;if(s===null)return;n.current=null;let l=[null,document.body].includes(document.activeElement);s.isConnected||!l||_optionalChain([t, 'access', _4 => _4.current, 'call', _5 => _5(s), 'optionalAccess', _6 => _6.focus, 'call', _7 => _7()])}),o};var Er=new Map,vr='a[href], audio[controls], button, details, embed, iframe, img[usemap], input:not([type="hidden"]), label, select, textarea, video[controls], [tabindex], [contenteditable]',xr=(e,t,n)=>{_react.useLayoutEffect.call(void 0, ()=>{let r=e.current;if(t!=="row-compact"||r===null)return;let a=[...r.querySelectorAll(vr)].find(o=>o.parentElement!==r);if(a!==void 0)throw new RangeError(`${n}: a compact row holds no control or focus target (a ${_chunkRYHSVWM2cjs.s} px target does not fit its ${_chunkRYHSVWM2cjs.u} px; use row-control), not <${a.localName}>`)})},wr=(e,t)=>{let n=e.filter(a=>a.rowHeader===!0).map(a=>a.key);if(n.length>1)throw new RangeError(`${t}: a table has at most one row header column, not ${n.length} (${n.join(", ")})`);let r=e.find(a=>a.rowHeader!==!0&&a.rowHeaderNote!==void 0);if(r!==void 0)throw new RangeError(`${t}: a row header note belongs to the row header column, not to ${r.key}`)},Pr=e=>e==null?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:e}),Nr=(e,t,n,r,a)=>{let o=e.open(t);return _jsxruntime.jsx.call(void 0, "tr",{ref:a,hidden:!o,"data-cui-row-detail":o?"open":"closed","data-testid":`${r}-detail`,children:_jsxruntime.jsx.call(void 0, "td",{colSpan:n,id:e.id(t),children:o?e.render(t):null})})},Cr= exports.DataTable =({caption:e,captionHidden:t,columns:n,rows:r,rowKey:a,rowTestId:o,rowData:s,rowSize:l,rowDetail:i,empty:d,testId:p,ref:u})=>{g();let c=_react.useId.call(void 0, ),b=_react.useRef.call(void 0, null);xr(b,l,p);let m=_react.useRef.call(void 0, null),f=_react.useRef.call(void 0, Er),h=ae(R=>_t(R,b.current,m.current,f.current));_react.useLayoutEffect.call(void 0, ()=>{f.current=Bt(b.current,m.current)});let y=_react.useCallback.call(void 0, R=>{m.current=R;let T=h(R);return()=>{m.current=null,T()}},[h]),E=_chunkRYHSVWM2cjs.R.call(void 0, n);return wr(n,p),_jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":p,ref:u,children:r.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",tabIndex:-1,ref:y,testId:`${p}-empty`,children:d}):_jsxruntime.jsx.call(void 0, "section",{ref:h,className:"cui-table-frame",tabIndex:0,"aria-labelledby":c,"data-testid":`${p}-frame`,children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-table","data-cui-type":"body","data-cui-row-size":l,style:{"--cui-table-min":_chunkRYHSVWM2cjs.O.call(void 0, E)},children:[_jsxruntime.jsx.call(void 0, "caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:c,children:e}),_jsxruntime.jsx.call(void 0, "colgroup",{children:n.map(R=>_jsxruntime.jsx.call(void 0, "col",{style:R.width.fixedPx===void 0?void 0:{width:_chunkRYHSVWM2cjs.O.call(void 0, R.width.fixedPx)}},R.key))}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsx.call(void 0, "tr",{children:n.map(R=>_jsxruntime.jsxs.call(void 0, "th",{scope:"col","data-cui-align":R.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:[R.header,R.note===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:R.note})]},R.key))})}),_jsxruntime.jsx.call(void 0, "tbody",{ref:b,children:r.map(R=>_jsxruntime.jsxs.call(void 0, _react.Fragment,{children:[_jsxruntime.jsx.call(void 0, "tr",{ref:h,tabIndex:-1,"data-cui-row-focus":"","data-testid":o,...w(_optionalChain([s, 'optionalCall', _8 => _8(R)])),children:n.map(T=>T.rowHeader===!0?_jsxruntime.jsxs.call(void 0, "th",{scope:"row","data-cui-align":T.align,children:[T.cell(R),T.rowHeaderNote===void 0?null:Pr(T.rowHeaderNote(R))]},T.key):_jsxruntime.jsx.call(void 0, "td",{"data-cui-align":T.align,children:T.cell(R)},T.key))}),i===void 0?null:Nr(i,R,n.length,o,h)]},a(R)))})]})})})};var kr=({items:e,testId:t})=>{if(g(),new Set(e.map(n=>n.key)).size!==e.length)throw new RangeError(`Description keys must be unique: ${e.map(n=>n.key).join(", ")}`);return _jsxruntime.jsx.call(void 0, "dl",{className:"cui-description-list","data-cui-type":"body","data-testid":t,children:e.map(n=>_jsxruntime.jsxs.call(void 0, "div",{className:"cui-description-row","data-testid":`${t}-${n.key}`,children:[_jsxruntime.jsx.call(void 0, "dt",{"data-cui-fg":"fg-secondary",children:n.term}),_jsxruntime.jsx.call(void 0, "dd",{"data-cui-fg":"fg",children:n.description})]},n.key))})};var Wt=e=>{e instanceof HTMLElement&&e.isConnected&&e.focus()},Sr=(e,t)=>{if(t===null||!e.contains(t))throw new RangeError("A dialog's initial focus must be an element inside the dialog");return t},Mr=(e,t)=>{if(t.focus(),e.ownerDocument.activeElement!==t)throw e.close(),new RangeError("A dialog's initial focus must be an element that takes focus")},Ir=e=>e instanceof HTMLInputElement&&e.type==="search",$r= exports.Dialog =({title:e,description:t,open:n,onClose:r,initialFocus:a,testId:o,children:s})=>{let{labels:l}=C(),i=_react.useId.call(void 0, ),d=_react.useId.call(void 0, ),p=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, !1);return _react.useLayoutEffect.call(void 0, ()=>{let y=p.current;if(n&&!y.open){let E=a===void 0?null:Sr(y,a.current);u.current=y.ownerDocument.activeElement,y.showModal(),E!==null&&Mr(y,E)}else!n&&y.open&&y.close()},[n,a]),_react.useLayoutEffect.call(void 0, ()=>{let y=p.current;return()=>{y.open&&(y.close(),Wt(u.current),u.current=null)}},[]),_jsxruntime.jsxs.call(void 0, "dialog",{className:"cui-dialog","aria-labelledby":i,"aria-describedby":t===void 0?void 0:d,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:p,onClose:y=>{y.currentTarget.open||(Wt(u.current),u.current=null,n&&r())},onCancel:y=>{let E=c.current;c.current=!1,(E||ge(y.currentTarget.ownerDocument.activeElement))&&y.preventDefault()},onKeyDownCapture:y=>{let E=qe(y);c.current=E,y.key==="Escape"&&!E&&ge(y.target)&&!Ir(y.target)&&y.preventDefault()},onKeyUpCapture:()=>{c.current=!1},children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-dialog-header",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-dialog-title",id:i,"data-cui-type":"title",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-dialog-actions",children:_jsxruntime.jsx.call(void 0, $,{variant:"secondary",testId:`${o}-close`,onClick:()=>_optionalChain([p, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.close, 'call', _11 => _11()]),children:l.close})})]}),t===void 0?null:_jsxruntime.jsx.call(void 0, "div",{id:d,"data-cui-measure":"reading","data-testid":`${o}-description`,children:t}),s,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",[Oe]:"","data-testid":`${o}-announcer`})]})};var Dr=({summary:e,open:t,onOpenChange:n,testId:r,children:a})=>{g();let o=_react.useId.call(void 0, ),s=_react.useRef.call(void 0, null);return O(s,{testId:r,part:"summary",host:"button"}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-disclosure","data-testid":r,children:[_jsxruntime.jsxs.call(void 0, "button",{className:"cui-disclosure-button",type:"button","aria-expanded":t,"aria-controls":o,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${r}-button`,onClick:()=>n(!t),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-disclosure-marker","aria-hidden":"true",children:t?"\u25BE":"\u25B8"}),_jsxruntime.jsx.call(void 0, "span",{ref:s,children:e})]}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-disclosure-panel",id:o,hidden:!t,"data-testid":`${r}-panel`,children:a})]})};var _authcore = require('@aiquants/auth-core');var Hr=({tone:e,testId:t,children:n})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":t,children:n})),se= exports.AlertMessage =({occurrence:e,testId:t,children:n})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-measure":"reading","data-cui-occurrence":e,"data-testid":t,children:n},e));var Ze=({failure:e,place:t,deniedSentence:n,failed:r,retry:a,testId:o})=>{let{labels:s,accessFailure:l}=C();if(n.trim()==="")throw new RangeError("FailureMessage: deniedSentence must be a non-empty sentence");let i=e.status===null?null:_authcore.accessFailureKindOfStatus.call(void 0, e.status);return i===null?_jsxruntime.jsx.call(void 0, se,{occurrence:e.occurrence,testId:o,children:s.failureSentence(e,r)}):_jsxruntime.jsx.call(void 0, _react.Fragment,{children:l({kind:i,place:t,deniedSentence:i==="forbidden"?s.forbiddenBecause(n,e.reason):null,retry:a})},e.occurrence)};var Ur=/\s/,Qe=e=>{if(e!==void 0&&(typeof e!="string"||e===""||Ur.test(e)))throw new RangeError(`A control's name must be one token without whitespace: "${e}"`);return e},Yt=e=>{if(e!==void 0&&!(Number.isInteger(e)&&e>0))throw new RangeError(`A field's maxLength must be a positive integer: ${e}`);return e},Z=({description:e,error:t,errorId:n})=>{g();let r=_react.useId.call(void 0, ),a=_react.useId.call(void 0, ),o=_react.useId.call(void 0, ),s=n===void 0?o:Ue(n,"a field's error"),l=[e===void 0?null:a,t===void 0?null:s].filter(d=>d!==null).join(" ");return{control:{id:r,"aria-describedby":l===""?void 0:l,"aria-invalid":t===void 0?void 0:!0},descriptionId:a,errorId:s}},Q=({description:e,error:t,descriptionId:n,errorId:r,testId:a})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:n,testId:`${a}-description`,children:e}),t===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"danger-fg",type:"body",id:r,testId:`${a}-error`,children:t})]}),he=({htmlFor:e,hidden:t,children:n})=>_jsxruntime.jsx.call(void 0, "label",{className:t===!0?"cui-visually-hidden":"cui-field-label",htmlFor:e,"data-cui-type":"body",children:n}),Br= exports.Field =({label:e,description:t,error:n,errorId:r,testId:a,children:o})=>{let{control:s,descriptionId:l,errorId:i}=Z({label:e,description:t,error:n,errorId:r});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":a,children:[_jsxruntime.jsx.call(void 0, he,{htmlFor:s.id,hidden:void 0,children:e}),o(s),_jsxruntime.jsx.call(void 0, Q,{description:t,error:n,descriptionId:l,errorId:i,testId:a})]})},Zt=({label:e,description:t,error:n,errorId:r,value:a,onValueChange:o,type:s,name:l,maxLength:i,list:d,autoComplete:p,inputMode:u,prefix:c,labelHidden:b,required:m,testId:f,ref:h})=>{let{control:y,descriptionId:E,errorId:R}=Z({label:e,description:t,error:n,errorId:r}),T=_react.useId.call(void 0, );if(c!==void 0&&c.trim()==="")throw new RangeError("An input's prefix must not be blank");if(i!==void 0&&s==="datetime-local")throw new RangeError(`A ${s} input takes no maxLength: ${i}`);let v=s==="password",k=_jsxruntime.jsx.call(void 0, "input",{className:"cui-input",type:s,name:Qe(l),maxLength:Yt(i),value:a,list:d,autoComplete:p,inputMode:u,spellCheck:v?!1:void 0,autoCapitalize:v?"none":void 0,required:m,onChange:I=>o(I.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":f,ref:h,...y,"aria-describedby":B(c===void 0?void 0:T,y["aria-describedby"])});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":`${f}-field`,children:[_jsxruntime.jsx.call(void 0, he,{htmlFor:y.id,hidden:b,children:e}),c===void 0?k:_jsxruntime.jsxs.call(void 0, "div",{className:"cui-input-group",children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-input-prefix",id:T,"data-cui-fg":"fg-secondary","data-cui-surface":"sunken","data-cui-type":"body","data-testid":`${f}-prefix`,children:c}),k]}),_jsxruntime.jsx.call(void 0, Q,{description:t,error:n,descriptionId:E,errorId:R,testId:f})]})},_r= exports.TextInput =e=>_jsxruntime.jsx.call(void 0, Zt,{...e}),qr= exports.PasswordInput =e=>_jsxruntime.jsx.call(void 0, Zt,{...e,type:"password"}),Gr= exports.TextArea =({label:e,description:t,error:n,errorId:r,value:a,onValueChange:o,name:s,maxLength:l,required:i,testId:d,ref:p})=>{let{control:u,descriptionId:c,errorId:b}=Z({label:e,description:t,error:n,errorId:r});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":`${d}-field`,children:[_jsxruntime.jsx.call(void 0, he,{htmlFor:u.id,hidden:void 0,children:e}),_jsxruntime.jsx.call(void 0, "textarea",{className:"cui-input cui-textarea",name:Qe(s),maxLength:Yt(l),value:a,required:i,onChange:m=>o(m.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":d,ref:p,...u}),_jsxruntime.jsx.call(void 0, Q,{description:t,error:n,descriptionId:c,errorId:b,testId:d})]})},Vr= exports.Select =({label:e,description:t,error:n,errorId:r,value:a,options:o,onValueChange:s,name:l,labelHidden:i,unavailable:d,testId:p,ref:u})=>{let{control:c,descriptionId:b,errorId:m}=Z({label:e,description:t,error:n,errorId:r}),f=_react.useId.call(void 0, ),h=X(d,f);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":`${p}-field`,children:[_jsxruntime.jsx.call(void 0, he,{htmlFor:c.id,hidden:i,children:e}),_jsxruntime.jsx.call(void 0, "select",{className:"cui-input",name:Qe(l),value:a,onChange:y=>{d===void 0&&s(y.target.value)},"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":p,ref:u,...c,"aria-disabled":d===void 0?void 0:!0,"aria-describedby":B(c["aria-describedby"],h),children:o.map(y=>_jsxruntime.jsx.call(void 0, "option",{value:y.value,children:y.label},y.value))}),_jsxruntime.jsx.call(void 0, Q,{description:t,error:n,descriptionId:b,errorId:m,testId:p}),_optionalChain([d, 'optionalAccess', _12 => _12.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:f,testId:`${p}-reason`,children:d.reason})]})},Wr= exports.RadioGroup =({legend:e,description:t,error:n,errorId:r,value:a,options:o,onValueChange:s,testId:l,ref:i})=>{let d=_react.useId.call(void 0, ),{control:p,descriptionId:u,errorId:c}=Z({label:e,description:t,error:n,errorId:r});return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-radio-group","aria-describedby":p["aria-describedby"],"data-invalid":n!==void 0,"data-testid":l,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),o.map((b,m)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-radio","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"radio",name:d,value:b.value,checked:b.value===a,onChange:()=>s(b.value),"aria-invalid":p["aria-invalid"],"data-testid":`${l}-option-${b.value}`,ref:m===0?i:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:b.label})]},b.value)),_jsxruntime.jsx.call(void 0, Q,{description:t,error:n,descriptionId:u,errorId:c,testId:l})]})},zr= exports.CheckboxGroup =({legend:e,description:t,error:n,errorId:r,values:a,options:o,onValuesChange:s,testId:l,ref:i})=>{let{control:d,descriptionId:p,errorId:u}=Z({label:e,description:t,error:n,errorId:r}),c=o.map(f=>f.value);if(c.length===0||new Set(c).size!==c.length)throw new RangeError(`A check box group needs at least one option with unique values: ${c.join(", ")}`);let b=a.filter(f=>!c.includes(f));if(b.length>0)throw new RangeError(`The chosen values are not options: ${b.join(", ")}`);let m=new Set(a);return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-checkbox-group","aria-describedby":d["aria-describedby"],"data-invalid":n!==void 0,"data-testid":l,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-checkbox-group-legend","data-cui-type":"body",children:e}),o.map((f,h)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-checkbox","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"checkbox",value:f.value,checked:m.has(f.value),onChange:()=>s(c.filter(y=>y===f.value?!m.has(y):m.has(y))),"aria-invalid":d["aria-invalid"],"data-testid":`${l}-option-${f.value}`,ref:h===0?i:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:f.label})]},f.value)),_jsxruntime.jsx.call(void 0, Q,{description:t,error:n,descriptionId:p,errorId:u,testId:l})]})};var on=_react.createContext.call(void 0, null),Qt="surface",en={neutral:{face:"surface",line:"border-control"},info:{face:"info-tint",line:"info-accent"},success:{face:"success-tint",line:"success-accent"},warning:{face:"warning-tint",line:"warning-accent"},danger:{face:"danger-tint",line:"danger-accent"}},tn={face:"info-tint",line:"info-accent"},an={normal:"border-control",high:"info-accent"},Zr=["normal","high"],Qr=[1,2,3,4],D=_chunkRYHSVWM2cjs.v.space["space-2"],eo="fg",to="fg-secondary",sn=e=>{let t=_react.useContext.call(void 0, on);if(t===null)throw new Error(`${e} must be rendered inside Figure`);return t},et=(e,t,n)=>{if(!(Number.isFinite(n)&&n>0&&n%4===0))throw new RangeError(`${e}: ${t} must be a positive multiple of the ${4} px lattice: ${n}`)},no= exports.Figure =e=>{g();let t=_react.useId.call(void 0, ),{kind:n,widthPx:r,heightPx:a,testId:o,dataAttributes:s,children:l}=e;et(o,"widthPx",r),et(o,"heightPx",a);let i=_react.useMemo.call(void 0, ()=>({kind:n,widthPx:r,heightPx:a,arrowIds:{normal:`${t}-arrow-normal`,high:`${t}-arrow-high`}}),[n,r,a,t]),d=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "defs",{children:Zr.map(b=>_jsxruntime.jsx.call(void 0, "marker",{id:i.arrowIds[b],viewBox:`0 0 ${D} ${D}`,refX:D,refY:D/2,markerWidth:D,markerHeight:D,markerUnits:"userSpaceOnUse",orient:"auto","data-cui-emphasis":b,children:_jsxruntime.jsx.call(void 0, "path",{d:`M 0 0 L ${D} ${D/2} L 0 ${D} z`,"data-cui-stroke":an[b],"data-testid":`${o}-arrow-${b}`})},b))}),_jsxruntime.jsx.call(void 0, on.Provider,{value:i,children:l})]});if(e.kind==="group"){let{label:b,onEscape:m}=e;if(!_chunkRYHSVWM2cjs.h.call(void 0, b))throw new RangeError(`${o}: a group figure's label must hold a readable character: ${JSON.stringify(b)}`);return _jsxruntime.jsx.call(void 0, "div",{className:"cui-figure-frame","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{className:"cui-figure",role:"group","aria-label":b,viewBox:`0 0 ${r} ${a}`,"data-cui-figure":"group","data-cui-surface":Qt,"data-cui-face":"sans",style:{"--cui-figure-inline":_chunkRYHSVWM2cjs.O.call(void 0, r),"--cui-figure-block":_chunkRYHSVWM2cjs.O.call(void 0, a)},onKeyDown:m===void 0?void 0:f=>_(f,m),"data-testid":o,...w(s),children:d})})}let{viewBox:p,pointer:u,svgRef:c}=e;return _jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{ref:c,className:"cui-figure","aria-hidden":"true",viewBox:p===void 0?`0 0 ${r} ${a}`:p,"data-cui-figure":"decorative","data-cui-surface":Qt,"data-cui-face":"sans","data-cui-pan":u===void 0?void 0:"true","data-cui-cursor":_optionalChain([u, 'optionalAccess', _13 => _13.cursor]),style:{"--cui-figure-inline":_chunkRYHSVWM2cjs.O.call(void 0, r),"--cui-figure-ratio":String(a/r)},"data-testid":o,...w(s),..._optionalChain([u, 'optionalAccess', _14 => _14.handlers]),children:d})})},nn=(e,t)=>{try{return t()}catch(n){throw new RangeError(`${e}: ${n.message}`,{cause:n})}},ro=(e,t,n)=>{for(let r of t){let a=_chunkXLOWKWIIcjs.i.light[r.fg],o=n.find(s=>a[s]===void 0);if(o!==void 0)throw new RangeError(`${e}: the note ${JSON.stringify(r.text)} in ${r.fg} is not in the contrast table on ${o}, a face the node takes`)}},oo= exports.FigureNode =e=>{g();let t=sn("FigureNode"),n=_react.useId.call(void 0, ),{x:r,y:a,shape:o,tone:s,outline:l,selected:i,name:d,title:p,press:u,testId:c,dataAttributes:b}=e,m=e.notes===void 0?[]:e.notes;if(!(Number.isFinite(r)&&Number.isFinite(a)))throw new RangeError(`${c}: a node's position must be finite: ${r}, ${a}`);if(t.kind==="group"&&u===void 0)throw new RangeError(`${c}: every node of a group figure must be pressable (pass press)`);if(t.kind==="decorative"&&u!==void 0)throw new RangeError(`${c}: a node of a decorative figure cannot be pressed (it is hidden from assistive technology)`);if(u!==void 0&&!_chunkRYHSVWM2cjs.h.call(void 0, u.label))throw new RangeError(`${c}: a pressable node's label must hold a readable character: ${JSON.stringify(u.label)}`);let f=i?tn:en[s];ro(c,m,[en[s].face,tn.face]);let h,y,E;if(o.kind==="box"){if(d===null)throw new RangeError(`${c}: a box's name is drawn inside the box and sizes it, so it cannot be null (only a disc may be drawn without a name)`);let T=nn(c,()=>_chunkRYHSVWM2cjs.I.call(void 0, {name:d,notes:m.map(k=>k.text)}));if(et(c,"a box's widthPx",o.widthPx),o.widthPx<T.minWidthPx)throw new RangeError(`${c}: a box ${o.widthPx} px wide is narrower than its lines under the widest 1.4.12 spacing (${T.minWidthPx} px)`);h={width:o.widthPx,height:T.heightPx,left:r,top:a};let v=_chunkRYHSVWM2cjs.J.call(void 0, m.length);y=_jsxruntime.jsxs.call(void 0, "g",{"data-cui-surface":f.face,children:[_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-plate",width:o.widthPx,height:T.heightPx,rx:_chunkRYHSVWM2cjs.v.radius["radius-item"],"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`}),_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-name",x:v.insetPx,y:v.namePx,fontSize:_chunkRYHSVWM2cjs.v.type.body.size,"data-cui-fg":eo,"data-cui-figure-type":"body","data-testid":`${c}-name`,children:d}),m.map((k,I)=>_jsxruntime.jsx.call(void 0, "text",{x:v.insetPx,y:v.notesPx[I],fontSize:_chunkRYHSVWM2cjs.v.type.caption.size,"data-cui-fg":k.fg,"data-cui-figure-type":"caption","data-testid":`${c}-note-${I}`,children:k.text},I))]}),E=_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-ring",x:-_chunkRYHSVWM2cjs.M,y:-_chunkRYHSVWM2cjs.M,width:o.widthPx+2*_chunkRYHSVWM2cjs.M,height:T.heightPx+2*_chunkRYHSVWM2cjs.M,rx:_chunkRYHSVWM2cjs.v.radius["radius-item"]+_chunkRYHSVWM2cjs.M,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}else{let T=nn(c,()=>_chunkRYHSVWM2cjs.K.call(void 0, d,o.radiusPx));h={width:2*o.radiusPx,height:2*o.radiusPx,left:r-o.radiusPx,top:a-o.radiusPx},y=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "g",{"data-cui-surface":f.face,children:_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-plate",r:o.radiusPx,"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`})}),d===null?null:_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-label",x:0,y:T.extentBelowPx-_chunkRYHSVWM2cjs.v.type.caption.lineHeight/2,fontSize:_chunkRYHSVWM2cjs.v.type.caption.size,"data-cui-fg":to,"data-cui-figure-type":"caption","data-testid":`${c}-name`,children:d})]}),E=_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-ring",r:o.radiusPx+_chunkRYHSVWM2cjs.M,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}if(u!==void 0){if(h.width<_chunkRYHSVWM2cjs.s||h.height<_chunkRYHSVWM2cjs.s)throw new RangeError(`${c}: a pressable node must be at least the ${_chunkRYHSVWM2cjs.s} px target: ${h.width} \xD7 ${h.height}`);if(h.left<_chunkRYHSVWM2cjs.L||h.top<_chunkRYHSVWM2cjs.L||h.left+h.width+_chunkRYHSVWM2cjs.L>t.widthPx||h.top+h.height+_chunkRYHSVWM2cjs.L>t.heightPx)throw new RangeError(`${c}: a pressable node must keep ${_chunkRYHSVWM2cjs.L} px to the figure's edge for its focus ring`)}let R=u===void 0?{}:{role:"button",tabIndex:0,"aria-label":u.label,"aria-describedby":u.description===void 0?void 0:n,"aria-expanded":u.expanded,"aria-controls":u.expanded?u.controls:void 0,onClick:T=>{T.currentTarget.focus(),u.onPress()},onKeyDown:T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),T.repeat||u.onPress())}};return _jsxruntime.jsxs.call(void 0, "g",{className:"cui-figure-node",transform:`translate(${r} ${a})`,"data-cui-tone":s,"data-cui-outline":l,"data-selected":String(i),...R,"data-testid":c,...w(b),children:[p===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:p}),_optionalChain([u, 'optionalAccess', _15 => _15.description])===void 0?null:_jsxruntime.jsx.call(void 0, "desc",{id:n,"data-testid":`${c}-description`,children:u.description}),u===void 0?null:E,y]})},ao= exports.FigureEdge =({d:e,emphasis:t,weight:n,arrow:r,title:a,testId:o,dataAttributes:s})=>{g();let l=sn("FigureEdge");if(!Qr.includes(n))throw new RangeError(`${o}: an edge's weight must be 1, 2, 3 or 4: ${n}`);return _jsxruntime.jsx.call(void 0, "path",{className:"cui-figure-edge",d:e,markerEnd:r?`url(#${l.arrowIds[t]})`:void 0,"data-cui-stroke":an[t],"data-cui-weight":n,"data-cui-emphasis":t,"data-testid":o,...w(s),children:a===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:a})})};var io={1:"h1",2:"h2",3:"h3"},so= exports.Heading =({level:e,type:t,testId:n,headingRef:r,children:a})=>{g();let o=io[e];return _jsxruntime.jsx.call(void 0, o,{className:"cui-heading","data-cui-type":t,"data-cui-fg":"fg","data-testid":n,ref:r,tabIndex:r===void 0?void 0:-1,children:a})};var uo={removed:"danger-tint",added:"success-tint"},co= exports.InlineChange =({kind:e,testId:t,children:n})=>{if(g(),n==="")throw new RangeError(`${t}: a changed fragment must hold at least one character`);return _jsxruntime.jsx.call(void 0, e==="removed"?"del":"ins",{className:"cui-change","data-cui-change":e,"data-cui-surface":uo[e],"data-cui-fg":"fg","data-testid":t,children:n})};var yo={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},fo={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},tt= exports.Pill =({tone:e,variant:t,testId:n,dataAttributes:r,children:a})=>{g();let o=t==="tint"?yo[e]:{fg:"on-solid",surface:fo[e]};return _jsxruntime.jsx.call(void 0, "span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":o.fg,"data-cui-surface":o.surface,"data-cui-type":"caption","data-testid":n,...w(r),children:a})};var nt=({label:e,valueText:t,value:n,max:r,testId:a})=>{g();let o=_react.useId.call(void 0, );if(r!==null){if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Progress maximum must be positive: ${r}`);if(n===null||!(Number.isFinite(n)&&n>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${n}`)}let s=r===null?null:{max:r,now:Math.min(n,r)};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-progress","data-testid":a,children:[_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg",type:"body",id:o,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":o,"aria-valuetext":t,"aria-valuemin":s===null?void 0:0,"aria-valuemax":_optionalChain([s, 'optionalAccess', _16 => _16.max]),"aria-valuenow":_optionalChain([s, 'optionalAccess', _17 => _17.now]),"data-cui-surface":"sunken","data-cui-indeterminate":s===null,"data-testid":`${a}-bar`,children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:s===null?void 0:{inlineSize:`${s.now/s.max*100}%`},"data-testid":`${a}-fill`})}),_jsxruntime.jsx.call(void 0, "div",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-secondary",type:"body",testId:`${a}-value`,children:t})})]})};var ho=({title:e,status:t,progress:n,cancel:r,testId:a,children:o})=>_jsxruntime.jsxs.call(void 0, Ge,{title:e,actions:r===void 0?void 0:_jsxruntime.jsx.call(void 0, $,{variant:"secondary",busy:r.busy,busyLabel:r.busyLabel,onClick:r.onCancel,testId:`${a}-cancel`,children:r.label}),testId:a,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-job-status",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${a}-status`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:`${e} `}),_jsxruntime.jsx.call(void 0, tt,{tone:t.tone,variant:"tint",testId:`${a}-status-pill`,children:t.label})]}),n===void 0?null:_jsxruntime.jsx.call(void 0, nt,{...n,testId:`${a}-progress`}),o]});var rt=_react.createContext.call(void 0, null),Eo="space-2",vo= exports.List =e=>{g();let{gap:t,label:n,id:r,hidden:a,testId:o,children:s}=e;if(n!==void 0&&!_chunkRYHSVWM2cjs.h.call(void 0, n))throw new RangeError(`${o}: a list's label must hold a readable character: ${JSON.stringify(n)}`);let l=e.marker==="none"?void 0:e.type,i=l!==void 0,d=e.marker==="number"||e.marker==="none"&&e.ordered?"ol":"ul";return _jsxruntime.jsx.call(void 0, rt.Provider,{value:e.marker,children:_jsxruntime.jsx.call(void 0, d,{className:"cui-list",role:"list","aria-label":n,id:r,hidden:a,"data-cui-gap":i?void 0:t,"data-cui-row-gap":i?t:void 0,"data-cui-column-gap":i?Eo:void 0,"data-cui-marker":i?e.marker:void 0,"data-cui-type":l,"data-testid":o,children:s})})},xo= exports.ListItem =({testId:e,dataAttributes:t,children:n})=>{g();let r=_react.useContext.call(void 0, rt);if(r===null)throw new Error("ListItem must be rendered inside List, not inside another ListItem");return _jsxruntime.jsx.call(void 0, "li",{className:"cui-list-item","data-testid":e,...w(t),children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-list-body","data-cui-measure":r==="none"?void 0:"reading",children:_jsxruntime.jsx.call(void 0, rt.Provider,{value:null,children:n})})})};var cn=e=>[...e.querySelectorAll(oe)].filter(t=>{let n=t.closest(Ve);return n===null||!e.contains(n)}),Po=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let n=cn(t);if(n.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${n.length} ${oe} elements for ${e.count} rows`);return n},No=(e,t)=>{let n=-1;return e.forEach((r,a)=>{t.has(r)&&(n=a)}),e[n+1]},Co= exports.LoadMore =({onLoad:e,busy:t,done:n,failure:r,limit:a,rows:o,testId:s})=>{let{formatLocale:l,labels:i}=C(),d=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, !1),b=()=>{let y=o.ref.current;d.current={shown:new Set(y===null?[]:cn(y)),failureOccurrence:r===null?null:r.occurrence,busySeen:!1},e()};_react.useLayoutEffect.call(void 0, ()=>{let y=c.current;c.current=!1;let E=d.current;if(E===null)return;let R=Po(o);if(t){E.busySeen=!0,E.shown=new Set(R);return}let T=No(R,E.shown),v=r!==null&&r.occurrence!==E.failureOccurrence;if(!(E.busySeen||T!==void 0||v||n)||(d.current=null,v||T===void 0))return;let k=[null,document.body].includes(document.activeElement);(u.current!==null&&document.activeElement===u.current||y&&k)&&T.focus()});let m=ae(()=>n?p.current:u.current),f=_react.useCallback.call(void 0, (y=>{u.current=y;let E=m(y);return()=>{u.current=null,c.current=y===document.activeElement,E()}}),[m]),h=_react.useCallback.call(void 0, (y=>{p.current=y;let E=m(y);return()=>{p.current=null,E()}}),[m]);return n?_jsxruntime.jsx.call(void 0, "div",{className:"cui-load-more","data-testid":s,children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:h,testId:`${s}-end`,children:i.endOfRecords})}):_jsxruntime.jsxs.call(void 0, "div",{className:"cui-load-more","data-testid":s,children:[_jsxruntime.jsx.call(void 0, $,{variant:"secondary",busy:t,busyLabel:i.loading,onClick:b,ref:f,testId:`${s}-button`,children:i.loadMore(_chunkRYHSVWM2cjs.c.call(void 0, a,l))}),r===null?null:_jsxruntime.jsx.call(void 0, se,{occurrence:r.occurrence,testId:`${s}-failure`,children:i.loadFailed(r.reason)})]})};var Lo=({master:e,detail:t,masterMinPx:n,detailMinPx:r,testId:a})=>{g();let o=_chunkRYHSVWM2cjs.Q.call(void 0, {masterMinPx:n,detailMinPx:r,gapPx:_chunkRYHSVWM2cjs.v.space["space-6"]});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":a,children:[_jsxruntime.jsx.call(void 0, j,{ruleKey:o.key,css:o.css}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-master-detail","data-cui-master-detail":o.key,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-master`,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-detail`,children:t})]})]})};var we=e=>{let{formatLocale:t,labels:n}=C(),{testId:r}=e;if(e.keep===void 0){let{value:s,unit:l}=e;if(l!==void 0&&!_chunkRYHSVWM2cjs.h.call(void 0, l))throw new RangeError(`${r}: a unit must hold a readable character: ${JSON.stringify(l)}`);if(s===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-testid":r,children:n.unmeasured});let i=_chunkRYHSVWM2cjs.c.call(void 0, s,t);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-testid":r,children:_chunkRYHSVWM2cjs.e.call(void 0, i,l)})}let{text:a,keep:o}=e;if(a===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-cui-keep":o,"data-testid":r,children:n.unmeasured});if(!_chunkRYHSVWM2cjs.h.call(void 0, a))throw new RangeError(`${r}: a measured text must hold a readable character (pass null when the value was not measured): ${JSON.stringify(a)}`);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-cui-keep":o,"data-testid":r,children:a})};var So=({label:e,value:t,min:n,max:r,valueText:a,testId:o})=>{if(g(),!(Number.isFinite(n)&&Number.isFinite(r)&&n<r))throw new RangeError(`Meter needs a finite range with min below max: min ${n}, max ${r}`);if(!(Number.isFinite(t)&&t>=n&&t<=r))throw new RangeError(`Meter value must be a finite number in its range: value ${t}, min ${n}, max ${r}`);return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-meter","data-testid":o,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-track",role:"meter","aria-label":e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":t,"aria-valuetext":a,"data-cui-surface":"sunken","data-testid":`${o}-bar`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-fill","data-cui-accent":"info-accent",style:{inlineSize:`${(t-n)/(r-n)*100}%`},"data-testid":`${o}-fill`})}),_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${o}-value`,children:a})})]})};var Fo={ArrowLeft:-1,ArrowRight:1},Ao= exports.PanelTabs =({label:e,items:t,value:n,onValueChange:r,testId:a,panelDescribedBy:o,children:s})=>{g();let l=_react.useId.call(void 0, ),i=_react.useRef.call(void 0, new Map);if(t.length===0)throw new RangeError("PanelTabs needs at least one tab");let d=t.map(f=>f.id);if(new Set(d).size!==d.length)throw new RangeError(`Tab keys must be unique: ${d.join(", ")}`);let p=d.indexOf(n);if(p<0)throw new RangeError(`The selected tab "${n}" is not one of the tabs: ${d.join(", ")}`);let u=f=>`${l}-tab-${f}`,c=`${l}-panel`,b=f=>{let h=t[f];h.id!==n&&r(h.id),_optionalChain([i, 'access', _18 => _18.current, 'access', _19 => _19.get, 'call', _20 => _20(h.id), 'optionalAccess', _21 => _21.focus, 'call', _22 => _22()])};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-panel-tabs","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-tabs-list",role:"tablist","aria-label":e,onKeyDown:f=>{let h=t.findIndex(T=>i.current.get(T.id)===f.target),y=h<0?p:h,E=Fo[f.key],R;if(E!==void 0){let T=getComputedStyle(f.currentTarget).direction==="rtl"?-E:E;R=(y+T+t.length)%t.length}else if(f.key==="Home")R=0;else if(f.key==="End")R=t.length-1;else return;f.preventDefault(),b(R)},children:t.map((f,h)=>{let y=h===p;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-tab cui-panel-tab",type:"button",role:"tab",id:u(h),"aria-selected":y,"aria-controls":c,tabIndex:y?0:-1,"data-cui-fg":y?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${f.id}`,ref:E=>{E===null?i.current.delete(f.id):i.current.set(f.id,E)},onClick:()=>b(h),children:f.label},f.id)})}),_jsxruntime.jsx.call(void 0, "div",{role:"tabpanel",id:c,"aria-labelledby":u(p),"aria-describedby":o,"data-testid":`${a}-panel`,children:s})]})};var Oo=({failure:e,onReload:t,deniedSentence:n,failureMessage:r,rescueRef:a,testId:o})=>{let{labels:s}=C(),l=_jsxruntime.jsx.call(void 0, Ze,{failure:e,place:"read",deniedSentence:n,failed:r===void 0?s.loadFailed:r,retry:t,testId:`${o}-alert`});return e.status!==null&&_authcore.accessFailureKindOfStatus.call(void 0, e.status)!==null?_jsxruntime.jsx.call(void 0, "div",{className:"cui-resource-failed",ref:a,"data-testid":o,children:l},e.occurrence):_jsxruntime.jsxs.call(void 0, "div",{className:"cui-resource-failed","data-testid":o,children:[l,_jsxruntime.jsx.call(void 0, $,{variant:"secondary",busy:e.retrying,busyLabel:s.loading,onClick:t,ref:a,testId:`${o}-reload`,children:s.reload})]})};var Bo=({label:e,options:t,value:n,onValueChange:r,testId:a,density:o="regular"})=>{g();let s=_react.useId.call(void 0, ),l=new Set(t.map(i=>i.value));if(t.length<2||l.size!==t.length)throw new RangeError(`A segmented control needs at least two options with unique values: ${t.map(i=>i.value).join(", ")}`);if(!l.has(n))throw new RangeError(`The pressed value "${n}" is not one of the options: ${[...l].join(", ")}`);if(o!=="regular"&&o!=="compact")throw new RangeError(`A segmented control's density is "regular" or "compact", not ${JSON.stringify(o)}`);return o==="compact"?_jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-segmented-group","aria-labelledby":s,"data-cui-density":"compact","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-segmented-label",id:s,"data-cui-type":"caption",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===n;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-segment",type:"button","aria-pressed":d,"data-testid":`${a}-${i.value}`,onClick:()=>{d||r(i.value)},children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-segment-face","data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"caption","data-testid":`${a}-${i.value}-face`,children:i.label})},i.value)})})]}):_jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-segmented-group","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-segmented-legend","data-cui-type":"body",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===n;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-segment",type:"button","aria-pressed":d,"data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"body","data-testid":`${a}-${i.value}`,onClick:()=>{d||r(i.value)},children:i.label},i.value)})})]})};var fn=({selected:e,controls:t,onSelect:n,testId:r,dataAttributes:a,ref:o,children:s})=>{g();let l=_react.useRef.call(void 0, null);O(l,{testId:r,part:"row",host:"button"});let i=_react.useCallback.call(void 0, p=>{if(l.current=p,typeof o=="function")return o(p);o!=null&&(o.current=p)},[o]);return _jsxruntime.jsx.call(void 0, "button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":r,onClick:p=>{ye(p),n()},ref:i,...w(a),children:s})},Go= exports.SelectableList =({label:e,items:t,itemKey:n,selectedKey:r,onSelect:a,detailId:o,renderRow:s,rowTestId:l,rowData:i,empty:d,testId:p,ref:u})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-selectable","data-testid":p,ref:u,children:t.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",testId:`${p}-empty`,children:d}):_jsxruntime.jsx.call(void 0, "ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let b=n(c);return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, fn,{selected:b===r,controls:o,onSelect:()=>a(c),testId:l,dataAttributes:_optionalChain([i, 'optionalCall', _23 => _23(c)]),children:s(c)})},b)})})}));var Wo=({label:e,value:t,min:n,max:r,step:a,valueText:o,onValueChange:s,testId:l})=>{g();let i=_react.useId.call(void 0, );if(!([t,n,r,a].every(Number.isFinite)&&n<r&&a>0&&n<=t&&t<=r))throw new RangeError(`Slider needs finite min < max, a positive step and min <= value <= max: value ${t}, min ${n}, max ${r}, step ${a}`);let d=o(t);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-testid":`${l}-field`,children:[_jsxruntime.jsx.call(void 0, "label",{className:"cui-field-label",htmlFor:i,"data-cui-type":"body",children:e}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-slider",children:[_jsxruntime.jsx.call(void 0, "input",{className:"cui-slider-input",id:i,type:"range",min:n,max:r,step:a,value:t,"aria-valuetext":d,"data-testid":l,onChange:p=>s(p.currentTarget.valueAsNumber)}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-slider-value","aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${l}-value`,children:d})})]})]})};var gn={done:0,current:1,pending:2},zo={done:{fg:"on-solid",surface:"success-solid"},current:{fg:"on-solid",surface:"info-solid"},pending:{fg:"fg-secondary",surface:void 0}},Jo= exports.Stepper =({label:e,steps:t,testId:n})=>{let{labels:r}=C();if(t.length===0||new Set(t.map(o=>o.id)).size!==t.length)throw new RangeError(`A stepper needs at least one step with unique keys: ${t.map(o=>o.id).join(", ")}`);if(t.filter(o=>o.state==="current").length>1||t.some((o,s)=>s>0&&gn[o.state]<gn[t[s-1].state]))throw new RangeError(`Step states must run done, at most one current, then pending: ${t.map(o=>o.state).join(", ")}`);let a={done:r.stepDone,current:null,pending:r.stepPending};return _jsxruntime.jsx.call(void 0, "ol",{className:"cui-stepper",role:"list","aria-label":e,"data-cui-type":"body","data-testid":n,children:t.map((o,s)=>{let l=zo[o.state],i=a[o.state];return _jsxruntime.jsxs.call(void 0, "li",{className:"cui-step","aria-current":o.state==="current"?"step":void 0,"data-cui-step":o.state,"data-testid":`${n}-${o.id}`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-step-marker","aria-hidden":"true","data-cui-fg":l.fg,"data-cui-surface":l.surface,"data-cui-type":"caption",children:o.state==="done"?"\u2713":s+1}),_jsxruntime.jsxs.call(void 0, "span",{className:"cui-step-label","data-cui-fg":"fg",children:[o.label,i===null?null:_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:` (${i})`})]})]},o.id)})})};var Yo=({label:e,labelHidden:t,checked:n,onCheckedChange:r,unavailable:a,testId:o,ref:s,dataAttributes:l})=>{g();let i=_react.useId.call(void 0, ),d=_react.useRef.call(void 0, null);O(d,{testId:o,part:"label",host:"button"});let p=X(a,i),u=a!==void 0,c=_jsxruntime.jsxs.call(void 0, "button",{className:"cui-switch",type:"button",role:"switch","aria-checked":n,"aria-disabled":u?!0:void 0,"aria-describedby":B(p),"data-cui-fg":"fg","data-cui-type":"body","data-testid":o,ref:s,onClick:()=>{u||r(!n)},...w(l),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-track","aria-hidden":"true","data-cui-surface":n?"info-solid":"sunken","data-testid":`${o}-track`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-thumb","data-cui-surface":n?"surface":"neutral-solid","data-testid":`${o}-thumb`})}),_jsxruntime.jsx.call(void 0, "span",{className:t===!0?"cui-visually-hidden":void 0,ref:d,children:e})]});return _optionalChain([a, 'optionalAccess', _24 => _24.reason])===void 0?c:_jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[c,_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:i,testId:`${o}-reason`,children:a.reason})]})};var na=({label:e,items:t,currentId:n,onNavigate:r,testId:a,collapsible:o=!1})=>{if(g(),t.length===0)throw new RangeError("Tabs needs at least one tab");let s=new Set(t.map(m=>m.id));if(s.size!==t.length)throw new RangeError(`Tab keys must be unique: ${t.map(m=>m.id).join(", ")}`);let l=t.find(m=>m.id===n);if(l===void 0)throw new RangeError(`The current tab "${n}" is not one of the tabs: ${[...s].join(", ")}`);let[i,d]=_react.useState.call(void 0, !1),p=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useId.call(void 0, ),b=_react.useCallback.call(void 0, m=>{d(!1),m&&_optionalChain([p, 'access', _25 => _25.current, 'optionalAccess', _26 => _26.contains, 'call', _27 => _27(document.activeElement)])&&_optionalChain([u, 'access', _28 => _28.current, 'optionalAccess', _29 => _29.focus, 'call', _30 => _30()])},[]);return _react.useEffect.call(void 0, ()=>{if(!(o&&i))return;let m=y=>p.current!==null&&!p.current.contains(y),f=y=>{m(y.target)&&b(!0)},h=y=>{m(y.target)&&b(!1)};return document.addEventListener("pointerdown",f,!0),document.addEventListener("focusin",h,!0),()=>{document.removeEventListener("pointerdown",f,!0),document.removeEventListener("focusin",h,!0)}},[o,i,b]),_jsxruntime.jsxs.call(void 0, "nav",{ref:p,className:"cui-tabs","aria-label":e,"data-testid":a,"data-cui-collapsible":o?"":void 0,"data-cui-open":o&&i?"":void 0,onKeyDown:o&&i?m=>_(m,()=>b(!0)):void 0,children:[o?_jsxruntime.jsxs.call(void 0, "button",{ref:u,type:"button",className:"cui-tabs-summary","aria-expanded":i,"aria-controls":c,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${a}-summary`,onClick:()=>d(m=>!m),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-tabs-summary-label",children:l.label}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-tabs-summary-marker","aria-hidden":"true",children:i?"\u25B4":"\u25BE"})]}):null,_jsxruntime.jsx.call(void 0, "ul",{className:"cui-tabs-list",id:c,role:"list","data-cui-surface":o?"surface":void 0,children:t.map(m=>{let f=m.id===n;return _jsxruntime.jsx.call(void 0, "li",{className:"cui-tabs-item",children:_jsxruntime.jsx.call(void 0, "a",{className:"cui-tab",href:m.href,"aria-current":f?"page":void 0,"data-cui-fg":f?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${m.id}`,onClick:h=>{me(h,m.href,r),h.defaultPrevented&&b(!1)},children:m.label})},m.id)})})]})};var ia={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},sa= exports.MetricTile =e=>{g();let{label:t,sublabel:n,tone:r,testId:a,dataAttributes:o}=e;if((e.text===void 0?e.value===null:e.text===null)&&r!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${r}`);let l=`${a}-value`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":r,"data-testid":a,...w(o),children:[_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-label","data-cui-type":"caption","data-cui-measure":"reading",children:t}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption","data-cui-measure":"reading",children:n}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-value","data-cui-fg":ia[r],"data-cui-type":"heading","data-cui-measure":"reading",children:e.text===void 0?_jsxruntime.jsx.call(void 0, we,{value:e.value,unit:e.unit,testId:l}):_jsxruntime.jsx.call(void 0, we,{text:e.text,keep:"wrap",testId:l})})]})},En=e=>_react.Children.toArray(e).flatMap(t=>{if(!_react.isValidElement.call(void 0, t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===_react.Fragment?En(t.props.children):[t]}),da= exports.TileGrid =({count:e,minInlinePx:t,testId:n,children:r})=>{g();let a=_chunkRYHSVWM2cjs.T.call(void 0, e,t,_chunkRYHSVWM2cjs.v.space["space-2"]),o=En(r).length;if(o!==e)throw new RangeError(`TileGrid has ${o} tiles but count is ${e}`);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":n,children:[_jsxruntime.jsx.call(void 0, j,{ruleKey:a.key,css:a.css}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-tile-grid","data-cui-tile-grid":a.key,"data-cui-gap":"space-2",children:r})]})};var ke=e=>[...e.querySelectorAll("button")],ua= exports.Toolbar =({label:e,testId:t,children:n})=>{g();let r=_react.useRef.call(void 0, null),a=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{let i=ke(r.current),d=a.current!==null&&i.includes(a.current)?a.current:_nullishCoalesce(i[0], () => (null));a.current=d;for(let p of i)p.tabIndex=p===d?0:-1});let o=i=>{for(let d of ke(r.current))d.tabIndex=d===i?0:-1;a.current=i};return _jsxruntime.jsx.call(void 0, "div",{className:"cui-toolbar",role:"toolbar","aria-label":e,"aria-orientation":"horizontal","data-testid":t,ref:r,onFocus:i=>{let d=ke(i.currentTarget).find(p=>p.contains(i.target));d!==void 0&&o(d)},onKeyDown:i=>{let d=ke(i.currentTarget),p=d.indexOf(i.target);if(p===-1)return;let u=getComputedStyle(i.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",c=u==="ArrowRight"?"ArrowLeft":"ArrowRight",m={[u]:(p+1)%d.length,[c]:(p-1+d.length)%d.length,Home:0,End:d.length-1}[i.key];if(m===void 0)return;i.preventDefault();let f=d[m];o(f),f.focus()},children:n})};var ya=e=>{let[t,n]=_react.useState.call(void 0, {failure:null,count:0});return e!==null&&e!==t.failure?(n({failure:e,count:t.count+1}),t.count+1):t.count};var wn=e=>e===null?_chunkRYHSVWM2cjs.X:_chunkRYHSVWM2cjs.Y,Se=(e,t,n,r,a)=>{let[o,s]=_react.useState.call(void 0, ()=>({key:e,state:wn(e)})),[l,i]=_react.useState.call(void 0, 0),[d,p]=_react.useState.call(void 0, 0),u=_react.useRef.call(void 0, t),c=_react.useRef.call(void 0, null),b=_react.useRef.call(void 0, l);_react.useLayoutEffect.call(void 0, ()=>{u.current=t}),_react.useEffect.call(void 0, ()=>{if(e===null){s({key:null,state:_chunkRYHSVWM2cjs.X});return}let R=new AbortController;c.current=e;let T=l===b.current?"revision":"reload";return b.current=l,s(v=>Object.is(v.key,e)?{key:e,state:r(v.state,T)}:{key:e,state:_chunkRYHSVWM2cjs.Y}),u.current(R.signal).then(v=>{R.signal.aborted||(c.current=null,s(k=>({key:e,state:a(k.state,v)})))},v=>{R.signal.aborted||s(()=>{throw v})}),()=>{R.abort(),c.current=null}},[e,n,l,d]);let m=_react.useCallback.call(void 0, ()=>i(R=>R+1),[]),f=_react.useCallback.call(void 0, ()=>p(R=>R+1),[]),h=_react.useCallback.call(void 0, (R,T)=>{s(v=>Object.is(v.key,R)?{key:R,state:T(v.state)}:v)},[]),y=_react.useCallback.call(void 0, (R,T)=>{h(R,T),Object.is(c.current,R)&&f()},[h,f]);return{state:Object.is(o.key,e)?o.state:wn(e),reload:m,refresh:f,update:h,write:y}};var ba=(e,t,n)=>{let r=_react.useRef.call(void 0, t);_react.useLayoutEffect.call(void 0, ()=>{r.current=t});let a=_react.useCallback.call(void 0, y=>r.current.first(y),[]),{state:o,reload:s,refresh:l,update:i,write:d}=Se(e,a,n,_chunkRYHSVWM2cjs.$,_chunkRYHSVWM2cjs.aa),p=_react.useRef.call(void 0, {key:e,state:o});_react.useLayoutEffect.call(void 0, ()=>{p.current={key:e,state:o}});let u=_react.useRef.call(void 0, null),c=_react.useCallback.call(void 0, ()=>{_optionalChain([u, 'access', _31 => _31.current, 'optionalAccess', _32 => _32.controller, 'access', _33 => _33.abort, 'call', _34 => _34()]),u.current=null},[]);_react.useEffect.call(void 0, ()=>c,[e,n,c]);let b=_react.useCallback.call(void 0, ()=>{c(),s()},[c,s]),m=_react.useCallback.call(void 0, ()=>{c(),l()},[c,l]),f=_react.useCallback.call(void 0, ()=>{let{key:y,state:E}=p.current;if(y===null||E.kind!=="ready"||E.refreshing||E.value.next===null||E.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let R=E.value.next,T={key:y,controller:new AbortController,maps:[]};u.current=T,i(y,_chunkRYHSVWM2cjs.ba),r.current.next(R,T.controller.signal).then(v=>{u.current===T&&(u.current=null,i(y,k=>T.maps.reduce((I,Nn)=>_chunkRYHSVWM2cjs.da.call(void 0, I,Nn),_chunkRYHSVWM2cjs.ca.call(void 0, k,R,v))))},v=>{u.current===T&&i(y,()=>{throw v})})},[i]),h=_react.useCallback.call(void 0, (y,E)=>{let R=u.current;R!==null&&Object.is(R.key,y)&&R.maps.push(E),d(y,T=>_chunkRYHSVWM2cjs.da.call(void 0, T,E))},[d]);return{state:o,reload:b,refresh:m,loadMore:f,updateList:h}};var Ea=e=>typeof e=="object"&&e!==null&&typeof e.then=="function",va= exports.usePendingPress =()=>{let[e,t]=_react.useState.call(void 0, null),n=_react.useRef.call(void 0, null),r=_react.useCallback.call(void 0, (a,o)=>{let s=o();if(!Ea(s))return;let l=Symbol(a);n.current=l,t(a);let i=()=>{n.current===l&&(n.current=null,t(null))};s.then(i,i)},[]);return{pendingKey:e,press:r}};var wa=(e,t,n)=>{let{state:r,reload:a,refresh:o,write:s}=Se(e,t,n,_chunkRYHSVWM2cjs.Z,_chunkRYHSVWM2cjs._),l=_react.useCallback.call(void 0, (i,d)=>s(i,p=>_chunkRYHSVWM2cjs._.call(void 0, p,{ok:!0,value:d})),[s]);return{state:r,reload:a,refresh:o,put:l}};var Pa=({testId:e,children:t})=>(g(),_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden","data-testid":e,children:t}));exports.ANNOUNCE_SETTLE_MS = pe; exports.AccessFailureNotice = tr; exports.AlertMessage = se; exports.Breadcrumb = nr; exports.Button = $; exports.COMPACT_ROW_PX = _chunkRYHSVWM2cjs.u; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkRYHSVWM2cjs.o; exports.CONTRAST_MINIMUM = _chunkXLOWKWIIcjs.f; exports.CONTRAST_PAIRS = _chunkXLOWKWIIcjs.i; exports.Card = Ge; exports.CardSection = dr; exports.CheckboxGroup = zr; exports.Cluster = _e; exports.CodeBlock = ur; exports.ComparisonGrid = yr; exports.ConsoleUiRoot = An; exports.DataTable = Cr; exports.DescriptionList = kr; exports.Dialog = $r; exports.Disclosure = Dr; exports.FIGURE_RING_REACH_PX = _chunkRYHSVWM2cjs.L; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkRYHSVWM2cjs.C; exports.FailureMessage = Ze; exports.Field = Br; exports.Figure = no; exports.FigureEdge = ao; exports.FigureNode = oo; exports.FragmentLink = Jn; exports.HTTP_FORBIDDEN = _chunkRYHSVWM2cjs.U; exports.Heading = so; exports.InlineChange = co; exports.JobCard = ho; exports.LATTICE_PX = _chunkRYHSVWM2cjs.q; exports.Link = Wn; exports.List = vo; exports.ListItem = xo; exports.LoadMore = Co; exports.MORE_CONTRAST_MINIMUM = _chunkXLOWKWIIcjs.g; exports.MasterDetail = Lo; exports.Measured = we; exports.Meter = So; exports.MetricTile = sa; exports.Notice = Hr; exports.PanelTabs = Ao; exports.PasswordInput = qr; exports.Pill = tt; exports.ProgressBar = nt; exports.ROW_WITH_CONTROL_PX = _chunkRYHSVWM2cjs.t; exports.RadioGroup = Wr; exports.ResourceFailed = Oo; exports.RowButton = fn; exports.SegmentedControl = Bo; exports.Select = Vr; exports.SelectableList = Go; exports.Slider = Wo; exports.Stack = jn; exports.Stepper = Jo; exports.Switch = Yo; exports.TARGET_PX = _chunkRYHSVWM2cjs.s; exports.TOKENS = _chunkRYHSVWM2cjs.v; exports.TONES = _chunkRYHSVWM2cjs.ia; exports.TONE_HUES = _chunkRYHSVWM2cjs.ga; exports.TONE_ROLES = _chunkRYHSVWM2cjs.ha; exports.Tabs = na; exports.Text = P; exports.TextArea = Gr; exports.TextInput = _r; exports.TileGrid = da; exports.Toolbar = ua; exports.VisuallyHidden = Pa; exports.ZonedTimeError = _chunkRYHSVWM2cjs.i; exports.beginPage = _chunkRYHSVWM2cjs.ba; exports.beginPagedReload = _chunkRYHSVWM2cjs.$; exports.beginReload = _chunkRYHSVWM2cjs.Z; exports.ceil8 = _chunkRYHSVWM2cjs.z; exports.ceilToLattice = _chunkRYHSVWM2cjs.r; exports.cellContentInlinePx = _chunkRYHSVWM2cjs.A; exports.comparisonAttributePx = _chunkRYHSVWM2cjs.D; exports.contrastRatio = _chunkXLOWKWIIcjs.e; exports.countSampleText = _chunkRYHSVWM2cjs.F; exports.cssVar = _chunkRYHSVWM2cjs.w; exports.figureBoxPlan = _chunkRYHSVWM2cjs.I; exports.figureDiscLabelPlan = _chunkRYHSVWM2cjs.K; exports.fillLabel = _chunkRYHSVWM2cjs.m; exports.fixedColumnPx = _chunkRYHSVWM2cjs.B; exports.flatMapOutcome = _chunkRYHSVWM2cjs.W; exports.formatByteSize = _chunkRYHSVWM2cjs.d; exports.formatCount = _chunkRYHSVWM2cjs.c; exports.formatInstant = _chunkRYHSVWM2cjs.l; exports.goldenSectionPx = _chunkRYHSVWM2cjs.N; exports.hexToSrgb = _chunkXLOWKWIIcjs.a; exports.instantSampleText = _chunkRYHSVWM2cjs.E; exports.isReadableText = _chunkRYHSVWM2cjs.h; exports.keepLastGood = _chunkRYHSVWM2cjs._; exports.lightDark = _chunkRYHSVWM2cjs.ea; exports.mapOutcome = _chunkRYHSVWM2cjs.V; exports.mapPagedList = _chunkRYHSVWM2cjs.da; exports.masterDetailPlan = _chunkRYHSVWM2cjs.P; exports.monoTextWidthEm = _chunkRYHSVWM2cjs.y; exports.placeholderRule = _chunkRYHSVWM2cjs.fa; exports.pxToRem = _chunkRYHSVWM2cjs.O; exports.readDecimalText = _chunkRYHSVWM2cjs.f; exports.readIntegerText = _chunkRYHSVWM2cjs.g; exports.reasonAside = _chunkRYHSVWM2cjs.n; exports.resolveConsoleUiLabels = _chunkRYHSVWM2cjs.p; exports.settleFirstPage = _chunkRYHSVWM2cjs.aa; exports.settlePage = _chunkRYHSVWM2cjs.ca; exports.spacedTextWidthEm = _chunkRYHSVWM2cjs.H; exports.tableFrameMinInlinePx = _chunkRYHSVWM2cjs.S; exports.tableMinInlinePx = _chunkRYHSVWM2cjs.R; exports.textWidthEm = _chunkRYHSVWM2cjs.x; exports.tileGridPlan = _chunkRYHSVWM2cjs.T; exports.tileMinInlinePx = _chunkRYHSVWM2cjs.G; exports.toOffsetIso = _chunkRYHSVWM2cjs.j; exports.toWallTime = _chunkRYHSVWM2cjs.k; exports.topmostModalOf = _chunkRYHSVWM2cjs.b; exports.useAccessFailure = Dn; exports.useAnnounce = Ke; exports.useConsoleUi = C; exports.useEscapeToClose = ir; exports.useFailureOccurrence = ya; exports.useFocusRescue = ae; exports.usePagedResource = ba; exports.usePendingPress = va; exports.useResource = wa;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkRYHSVWM2cjs = require('./chunk-RYHSVWM2.cjs');var _chunkXLOWKWIIcjs = require('./chunk-XLOWKWII.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var Ke=_react.createContext.call(void 0, null),Dt=" ",It='[inert], [aria-hidden="true" i]',Ue="data-cui-dialog-announcer",In=`:scope > [${Ue}]`,$n=e=>{if(e.closest(It)!==null)return{hidden:'an ancestor is inert or aria-hidden="true"'};let t=_chunkRYHSVWM2cjs.b.call(void 0, e.ownerDocument);if(t.kind==="none")return{region:e};if(t.kind==="undecidable")return{hidden:"focus is in no open modal dialog and they do not nest, so which one is topmost cannot be told"};let n=t.dialog;if(n.contains(e))return{region:e};let r=n.querySelector(In);return r===null?{hidden:"the topmost open modal dialog neither contains the console nor is a Dialog"}:r.closest(It)!==null?{hidden:'the topmost open modal dialog is a Dialog whose live region has an inert or aria-hidden="true" ancestor'}:{region:r}},Fn=e=>{try{e.querySelectorAll(_chunkRYHSVWM2cjs.a)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},ge= exports.ANNOUNCE_SETTLE_MS =150,An=1e3,$t=new WeakMap,Dn=(e,t)=>{let n=_nullishCoalesce($t.get(e), () => (new Set)),r={text:t};$t.set(e,n.add(r)),setTimeout(()=>n.delete(r),ge);let a=e.ownerDocument.createElement("span");a.textContent=[...n].map(o=>o.text).join(Dt),e.replaceChildren(a)},Hn= exports.ConsoleUiRoot =({locale:e,formatLocale:t,timeZone:n,accessFailure:r,contrast:a="standard",reducedMotion:o=!1,testId:s,children:l})=>{if(_react.useContext.call(void 0, Ke)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");if(typeof r!="function")throw new TypeError("ConsoleUiRoot: accessFailure must be the host's presenter of access failures (a function)");if(!_chunkXLOWKWIIcjs.h.includes(a))throw new RangeError(`ConsoleUiRoot: contrast must be one of ${_chunkXLOWKWIIcjs.h.join(", ")}: ${String(a)}`);if(typeof o!="boolean")throw new TypeError(`ConsoleUiRoot: reducedMotion must be a boolean: ${String(o)}`);let d=_chunkRYHSVWM2cjs.p.call(void 0, e),[y]=Intl.getCanonicalLocales(t),u=_react.useMemo.call(void 0, ()=>new Intl.DateTimeFormat(y,{timeZone:n}).resolvedOptions().timeZone,[y,n]),c=_react.useRef.call(void 0, null),b=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{Fn(c.current.ownerDocument)},[]);let f=_react.useCallback.call(void 0, R=>{if(R.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let p=()=>{let{texts:h,settle:T,deadline:v}=b.current;b.current=null,clearTimeout(T),clearTimeout(v);let k=c.current;if(k===null)return;let $=h.join(Dt),oe=$n(k);if("hidden"in oe)throw new Error(`announce: the live region is hidden from assistive technology (${oe.hidden}), so this announcement would be lost: ${$}`);Dn(oe.region,$)},E=b.current;if(E===null){b.current={texts:[R],settle:setTimeout(p,ge),deadline:setTimeout(p,An)};return}E.texts.push(R),clearTimeout(E.settle),E.settle=setTimeout(p,ge)},[]),m=_react.useMemo.call(void 0, ()=>({locale:e,formatLocale:y,timeZone:u,labels:d,announce:f,accessFailure:r}),[e,y,u,d,f,r]);return _jsxruntime.jsx.call(void 0, Ke.Provider,{value:m,children:_jsxruntime.jsxs.call(void 0, "div",{"data-cui-root":"","data-cui-contrast":a,"data-cui-reduced-motion":o?"":void 0,"data-cui-surface":"surface","data-cui-fg":"fg","data-testid":s,children:[l,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${s}-announcer`,ref:c})]})})},C= exports.useConsoleUi =()=>{let e=_react.useContext.call(void 0, Ke);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},g=()=>{C()},Be= exports.useAnnounce =()=>C().announce,On= exports.useAccessFailure =()=>C().accessFailure;var w=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};var ae=e=>{let t=e.currentTarget;t.ownerDocument.activeElement!==t&&t.focus({preventScroll:!0})};var B=(e,t)=>{if(e!==void 0&&e.trim()==="")throw new RangeError(`${t}: the key shortcuts must name at least one shortcut, not a blank text: "${e}"`);return e};var Bn=new Set(["abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr"]),_n=e=>{for(let t of e.querySelectorAll("*")){let n=t.localName;if(!Bn.has(n)||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable"))return n}return null},D=(e,{testId:t,part:n,host:r})=>{_react.useLayoutEffect.call(void 0, ()=>{let a=_n(e.current);if(a!==null)throw new RangeError(`${t}: the ${n} is the content of a ${r} and holds only non-interactive phrasing content, not <${a}>`)})};var P=({fg:e,type:t,face:n,as:r="span",space:a,testId:o,id:s,tabIndex:l,ref:i,children:d})=>(g(),_jsxruntime.jsx.call(void 0, r,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":n,"data-cui-space":a,"data-cui-measure":r==="p"?"reading":void 0,"data-testid":o,id:s,tabIndex:l,ref:i,children:d}));var Gn=/\s/,_e=(e,t)=>{if(e===""||Gn.test(e))throw new RangeError(`The id of ${t} must be one token without whitespace: "${e}"`);return e},Y=(e,t)=>{if(e!==void 0){if(e.reason!==void 0){if(e.reason.trim()==="")throw new RangeError("An unavailable control needs a reason that is not blank");return t}return _e(e.reasonId,"an unavailable control's reason")}},_=(...e)=>{let t=e.filter(n=>n!==void 0);return t.length===0?void 0:t.join(" ")};var zn={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"body"}},qe=({subject:e,children:t})=>{let n=_react.useRef.call(void 0, null);return D(n,e),_jsxruntime.jsx.call(void 0, "span",{ref:n,children:t})},I= exports.Button =({variant:e,children:t,testId:n,type:r="button",onClick:a,unavailable:o,describedBy:s,expanded:l,controls:i,ref:d,dataAttributes:y,keyShortcuts:u,busy:c,busyLabel:b})=>{g();let f=_react.useId.call(void 0, ),m=Y(o,f),R=c===!0||o!==void 0,p=zn[e],E=h=>{if(ae(h),R){h.preventDefault();return}_optionalChain([a, 'optionalCall', _2 => _2(h)])};return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[_jsxruntime.jsx.call(void 0, "button",{className:"cui-button",type:r==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":p.fg,"data-cui-surface":p.surface,"data-cui-type":p.type,"data-testid":n,"aria-disabled":R?!0:void 0,"aria-busy":c===!0?!0:void 0,"aria-describedby":_(s,m),"aria-expanded":l,"aria-controls":i,"aria-keyshortcuts":B(u,n),onClick:E,ref:d,...w(y),children:_jsxruntime.jsx.call(void 0, qe,{subject:{testId:n,part:"label",host:"button"},children:c===!0?b:t})}),_optionalChain([o, 'optionalAccess', _3 => _3.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:f,testId:`${n}-reason`,children:o.reason})]})},Jn= exports.Link =({onNavigate:e,children:t,testId:n,ref:r,keyShortcuts:a})=>(g(),_jsxruntime.jsx.call(void 0, "button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"body","data-testid":n,"aria-keyshortcuts":B(a,n),onClick:e,ref:r,children:_jsxruntime.jsx.call(void 0, qe,{subject:{testId:n,part:"label",host:"button"},children:t})})),jn=/^[^\s#]+$/,Xn= exports.FragmentLink =({targetId:e,children:t,testId:n,onFollow:r,dataAttributes:a,keyShortcuts:o})=>{if(g(),!jn.test(e))throw new RangeError(`A fragment link needs the target's id without "#" or white space: "${e}"`);return _jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:`#${e}`,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":n,"aria-keyshortcuts":B(o,n),onClick:r,...w(a),children:_jsxruntime.jsx.call(void 0, qe,{subject:{testId:n,part:"label",host:"link"},children:t})})};var Zn=({gap:e,testId:t,children:n})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:n})),Ge= exports.Cluster =({gap:e,as:t="div",testId:n,children:r})=>(g(),_jsxruntime.jsx.call(void 0, t,{className:"cui-cluster","data-cui-gap":e,"data-testid":n,children:r}));var tr=new Set(["sign-in","sign-in-again","sign-in-again-in-new-window"]),nr=" ",rr= exports.AccessFailureNotice =({view:e,handlers:t,testId:n})=>{let r=Be(),a=e.actions.map(({action:l,label:i})=>{let d=t[l];if(d===void 0)throw new TypeError(`AccessFailureNotice: no handler for the action ${JSON.stringify(l)}`);return{action:l,label:i,handler:d}}),o=e.politeness==="status"?[e.title,...e.sentences].join(nr):null,s=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{o===null||s.current===o||(s.current=o,r(o))},[r,o]),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-access-failure","data-cui-access-failure":e.kind,"data-testid":n,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-notice cui-access-failure-message",role:e.politeness==="alert"?"alert":void 0,"data-cui-tone":"warning","data-cui-surface":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":`${n}-message`,children:[_jsxruntime.jsx.call(void 0, "p",{className:"cui-access-failure-title","data-cui-measure":"reading","data-testid":`${n}-title`,children:e.title}),e.sentences.map(l=>_jsxruntime.jsx.call(void 0, "p",{className:"cui-access-failure-sentence","data-cui-measure":"reading",children:l},l))]}),a.length===0?null:_jsxruntime.jsx.call(void 0, Ge,{gap:"space-2",testId:`${n}-actions`,children:a.map(({action:l,label:i,handler:d})=>_jsxruntime.jsx.call(void 0, I,{variant:tr.has(l)?"primary":"secondary",onClick:d,testId:`${n}-${l}`,children:i},l))})]})};var Z=(e,t,n)=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),n(t))};var or=({items:e,current:t,onNavigate:n,testId:r})=>{let{labels:a}=C();if(new Set(e.map(o=>o.id)).size!==e.length)throw new RangeError(`Breadcrumb keys must be unique: ${e.map(o=>o.id).join(", ")}`);return _jsxruntime.jsx.call(void 0, "nav",{className:"cui-breadcrumb","aria-label":a.breadcrumb,"data-testid":r,children:_jsxruntime.jsxs.call(void 0, "ol",{className:"cui-breadcrumb-list",role:"list","data-cui-type":"body",children:[e.map(o=>_jsxruntime.jsxs.call(void 0, "li",{className:"cui-breadcrumb-item",children:[_jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:o.href,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":`${r}-${o.id}`,onClick:s=>Z(s,o.href,n),children:o.label}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-breadcrumb-separator","aria-hidden":"true","data-cui-fg":"fg-muted",children:"\u203A"})]},o.id)),_jsxruntime.jsx.call(void 0, "li",{className:"cui-breadcrumb-item",children:_jsxruntime.jsx.call(void 0, "span",{"aria-current":"page","data-cui-fg":"fg","data-testid":`${r}-current`,children:t})})]})})};var ir=229,sr=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),he=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&sr.has(e.type)&&(e.value!==""||e.validity.badInput),Ve=e=>e.nativeEvent.isComposing||e.keyCode===ir,q=(e,t)=>{e.key!=="Escape"||e.nativeEvent.defaultPrevented||Ve(e)||he(e.target)||(e.stopPropagation(),t())},dr= exports.useEscapeToClose =e=>_react.useCallback.call(void 0, t=>q(t,e),[e]);var Bt=e=>e===void 0?void 0:t=>q(t,e),We= exports.Card =({id:e,title:t,description:n,actions:r,onEscape:a,testId:o,headingRef:s,ref:l,dataAttributes:i,children:d})=>{g();let y=_react.useId.call(void 0, ),u=Bt(a);return _jsxruntime.jsxs.call(void 0, "section",{className:"cui-card",id:e,"aria-labelledby":y,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:l,onKeyDown:u,...w(i),children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-header",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-heading",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-card-title",id:y,"data-cui-type":"title","data-testid":`${o}-heading`,ref:s,tabIndex:s===void 0?void 0:-1,children:t}),n===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:n})]}),r===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-actions",children:r})]}),d]})},lr={3:"h3",4:"h4"},ur= exports.CardSection =({id:e,title:t,subtitle:n,level:r=3,region:a=!1,onEscape:o,testId:s,headingRef:l,ref:i,dataAttributes:d,children:y})=>{g();let u=_react.useId.call(void 0, ),c=Bt(o),b=lr[r],f=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-section-heading",children:[_jsxruntime.jsx.call(void 0, b,{className:"cui-card-section-title",id:u,"data-cui-type":"body","data-testid":`${s}-heading`,ref:l,tabIndex:l===void 0?void 0:-1,children:t}),n===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:n})]}),y]});return a?_jsxruntime.jsx.call(void 0, "section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":s,ref:i,onKeyDown:c,...w(d),children:f}):_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section",id:e,"data-testid":s,ref:i,...w(d),children:f})};var pr=({label:e,code:t,testId:n})=>(g(),_jsxruntime.jsx.call(void 0, "section",{className:"cui-code-frame",tabIndex:0,"aria-label":e,"data-cui-surface":"sunken","data-testid":n,children:_jsxruntime.jsx.call(void 0, "pre",{className:"cui-code","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"mono","data-testid":`${n}-code`,children:t})}));var Q=({ruleKey:e,css:t})=>_jsxruntime.jsx.call(void 0, "style",{href:e,precedence:"cui",children:t});var mr=({caption:e,attributes:t,columns:n,attributePx:r,columnMinPx:a,testId:o})=>{g();let s=_react.useId.call(void 0, );for(let u of[r,a])if(!(Number.isFinite(u)&&u>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${u}`);if(n.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let u of n)for(let c of t)if(!Object.hasOwn(u.cells,c.key))throw new RangeError(`Column "${u.key}" has no value for attribute "${c.key}"`);let l=r+n.length*a,i=`cui-comparison-a${r}-c${a}-n${n.length}`,d=u=>`[data-cui-comparison="${i}"][data-cui-comparison-layout="${u}"]`,y=`${d("table")}{display:none}@container (min-width:${_chunkRYHSVWM2cjs.O.call(void 0, l)}){${d("table")}{display:block}${d("stack")}{display:none}}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-cui-stack-below-px":l,"data-testid":o,children:[_jsxruntime.jsx.call(void 0, Q,{ruleKey:i,css:y}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-frame","data-cui-comparison":i,"data-cui-comparison-layout":"table",children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-comparison-table","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "caption",{className:"cui-visually-hidden",children:e}),_jsxruntime.jsxs.call(void 0, "colgroup",{children:[_jsxruntime.jsx.call(void 0, "col",{style:{width:_chunkRYHSVWM2cjs.O.call(void 0, r)}}),n.map(u=>_jsxruntime.jsx.call(void 0, "col",{},u.key))]}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "td",{}),n.map(u=>_jsxruntime.jsx.call(void 0, "th",{scope:"col",children:u.heading},u.key))]})}),_jsxruntime.jsx.call(void 0, "tbody",{children:t.map(u=>_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "th",{scope:"row",children:u.label}),n.map(c=>_jsxruntime.jsx.call(void 0, "td",{children:c.cells[u.key]("table")},c.key))]},u.key))})]})}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-stack","data-cui-comparison":i,"data-cui-comparison-layout":"stack",children:n.map((u,c)=>{let b=`${s}-column-${c}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-comparison-column",role:"group","aria-labelledby":b,"data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-heading",id:b,children:u.heading}),_jsxruntime.jsx.call(void 0, "dl",{className:"cui-comparison-list",children:t.map(f=>_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, "dt",{children:f.label}),_jsxruntime.jsx.call(void 0, "dd",{children:u.cells[f.key]("stack")})]},f.key))})]},u.key)})})]})};var de="[data-cui-row-focus]",ze="[data-cui-row-detail]",gr=e=>e===null?[]:[...e.querySelectorAll(`:scope > ${de}`)],qt=(e,t)=>{let n=new Map;t!==null&&n.set(t,0);let r=-1;for(let a of e===null?[]:e.children)a.matches(de)?(r+=1,n.set(a,r)):r>=0&&a.matches(ze)&&n.set(a,r);return n},Gt=(e,t,n,r)=>{let a=gr(t);if(a.length===0)return n;let o=r.get(e);if(o===void 0)throw new RangeError(`rowFocusTarget: <${e.localName}> left holding focus with no position in the table (only its rows, row details and empty text hold one)`);return a[Math.min(o,a.length-1)]};var Rr=e=>e+1,le= exports.useFocusRescue =e=>{let t=_react.useRef.call(void 0, e),n=_react.useRef.call(void 0, null),r=_react.useRef.call(void 0, !1),[,a]=_react.useReducer.call(void 0, Rr,0),o=_react.useCallback.call(void 0, (s=>()=>{r.current&&s.contains(document.activeElement)&&(n.current=s,a())}),[]);return _react.useLayoutEffect.call(void 0, ()=>(r.current=!0,()=>{r.current=!1,n.current=null}),[]),_react.useLayoutEffect.call(void 0, ()=>{t.current=e}),_react.useLayoutEffect.call(void 0, ()=>{let s=n.current;if(s===null)return;n.current=null;let l=[null,document.body].includes(document.activeElement);s.isConnected||!l||_optionalChain([t, 'access', _4 => _4.current, 'call', _5 => _5(s), 'optionalAccess', _6 => _6.focus, 'call', _7 => _7()])}),o};var xr=new Map,wr='a[href], audio[controls], button, details, embed, iframe, img[usemap], input:not([type="hidden"]), label, select, textarea, video[controls], [tabindex], [contenteditable]',Pr=(e,t,n)=>{_react.useLayoutEffect.call(void 0, ()=>{let r=e.current;if(t!=="row-compact"||r===null)return;let a=[...r.querySelectorAll(wr)].find(o=>o.parentElement!==r);if(a!==void 0)throw new RangeError(`${n}: a compact row holds no control or focus target (a ${_chunkRYHSVWM2cjs.s} px target does not fit its ${_chunkRYHSVWM2cjs.u} px; use row-control), not <${a.localName}>`)})},Nr=(e,t)=>{let n=e.filter(a=>a.rowHeader===!0).map(a=>a.key);if(n.length>1)throw new RangeError(`${t}: a table has at most one row header column, not ${n.length} (${n.join(", ")})`);let r=e.find(a=>a.rowHeader!==!0&&a.rowHeaderNote!==void 0);if(r!==void 0)throw new RangeError(`${t}: a row header note belongs to the row header column, not to ${r.key}`)},Cr=e=>e==null?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:e}),kr=(e,t,n,r,a)=>{let o=e.open(t);return _jsxruntime.jsx.call(void 0, "tr",{ref:a,hidden:!o,"data-cui-row-detail":o?"open":"closed","data-testid":`${r}-detail`,children:_jsxruntime.jsx.call(void 0, "td",{colSpan:n,id:e.id(t),children:o?e.render(t):null})})},Lr= exports.DataTable =({caption:e,captionHidden:t,columns:n,rows:r,rowKey:a,rowTestId:o,rowData:s,rowSize:l,rowDetail:i,empty:d,testId:y,ref:u})=>{g();let c=_react.useId.call(void 0, ),b=_react.useRef.call(void 0, null);Pr(b,l,y);let f=_react.useRef.call(void 0, null),m=_react.useRef.call(void 0, xr),R=le(h=>Gt(h,b.current,f.current,m.current));_react.useLayoutEffect.call(void 0, ()=>{m.current=qt(b.current,f.current)});let p=_react.useCallback.call(void 0, h=>{f.current=h;let T=R(h);return()=>{f.current=null,T()}},[R]),E=_chunkRYHSVWM2cjs.R.call(void 0, n);return Nr(n,y),_jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":y,ref:u,children:r.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",tabIndex:-1,ref:p,testId:`${y}-empty`,children:d}):_jsxruntime.jsx.call(void 0, "section",{ref:R,className:"cui-table-frame",tabIndex:0,"aria-labelledby":c,"data-testid":`${y}-frame`,children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-table","data-cui-type":"body","data-cui-row-size":l,style:{"--cui-table-min":_chunkRYHSVWM2cjs.O.call(void 0, E)},children:[_jsxruntime.jsx.call(void 0, "caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:c,children:e}),_jsxruntime.jsx.call(void 0, "colgroup",{children:n.map(h=>_jsxruntime.jsx.call(void 0, "col",{style:h.width.fixedPx===void 0?void 0:{width:_chunkRYHSVWM2cjs.O.call(void 0, h.width.fixedPx)}},h.key))}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsx.call(void 0, "tr",{children:n.map(h=>_jsxruntime.jsxs.call(void 0, "th",{scope:"col","data-cui-align":h.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:[h.header,h.note===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:h.note})]},h.key))})}),_jsxruntime.jsx.call(void 0, "tbody",{ref:b,children:r.map(h=>_jsxruntime.jsxs.call(void 0, _react.Fragment,{children:[_jsxruntime.jsx.call(void 0, "tr",{ref:R,tabIndex:-1,"data-cui-row-focus":"","data-testid":o,...w(_optionalChain([s, 'optionalCall', _8 => _8(h)])),children:n.map(T=>T.rowHeader===!0?_jsxruntime.jsxs.call(void 0, "th",{scope:"row","data-cui-align":T.align,children:[T.cell(h),T.rowHeaderNote===void 0?null:Cr(T.rowHeaderNote(h))]},T.key):_jsxruntime.jsx.call(void 0, "td",{"data-cui-align":T.align,children:T.cell(h)},T.key))}),i===void 0?null:kr(i,h,n.length,o,R)]},a(h)))})]})})})};var Sr=({items:e,testId:t})=>{if(g(),new Set(e.map(n=>n.key)).size!==e.length)throw new RangeError(`Description keys must be unique: ${e.map(n=>n.key).join(", ")}`);return _jsxruntime.jsx.call(void 0, "dl",{className:"cui-description-list","data-cui-type":"body","data-testid":t,children:e.map(n=>_jsxruntime.jsxs.call(void 0, "div",{className:"cui-description-row","data-testid":`${t}-${n.key}`,children:[_jsxruntime.jsx.call(void 0, "dt",{"data-cui-fg":"fg-secondary",children:n.term}),_jsxruntime.jsx.call(void 0, "dd",{"data-cui-fg":"fg",children:n.description})]},n.key))})};var Jt=e=>{e instanceof HTMLElement&&e.isConnected&&e.focus()},Ir=(e,t)=>{if(t===null||!e.contains(t))throw new RangeError("A dialog's initial focus must be an element inside the dialog");return t},$r=(e,t)=>{if(t.focus(),e.ownerDocument.activeElement!==t)throw e.close(),new RangeError("A dialog's initial focus must be an element that takes focus")},Fr=e=>e instanceof HTMLInputElement&&e.type==="search",Ar= exports.Dialog =({title:e,description:t,open:n,onClose:r,initialFocus:a,testId:o,children:s})=>{let{labels:l}=C(),i=_react.useId.call(void 0, ),d=_react.useId.call(void 0, ),y=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, !1);return _react.useLayoutEffect.call(void 0, ()=>{let p=y.current;if(n&&!p.open){let E=a===void 0?null:Ir(p,a.current);u.current=p.ownerDocument.activeElement,p.showModal(),E!==null&&$r(p,E)}else!n&&p.open&&p.close()},[n,a]),_react.useLayoutEffect.call(void 0, ()=>{let p=y.current;return()=>{p.open&&(p.close(),Jt(u.current),u.current=null)}},[]),_jsxruntime.jsxs.call(void 0, "dialog",{className:"cui-dialog","aria-labelledby":i,"aria-describedby":t===void 0?void 0:d,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:y,onClose:p=>{p.currentTarget.open||(Jt(u.current),u.current=null,n&&r())},onCancel:p=>{let E=c.current;c.current=!1,(E||he(p.currentTarget.ownerDocument.activeElement))&&p.preventDefault()},onKeyDownCapture:p=>{let E=Ve(p);c.current=E,p.key==="Escape"&&!E&&he(p.target)&&!Fr(p.target)&&p.preventDefault()},onKeyUpCapture:()=>{c.current=!1},children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-dialog-header",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-dialog-title",id:i,"data-cui-type":"title",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-dialog-actions",children:_jsxruntime.jsx.call(void 0, I,{variant:"secondary",testId:`${o}-close`,onClick:()=>_optionalChain([y, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.close, 'call', _11 => _11()]),children:l.close})})]}),t===void 0?null:_jsxruntime.jsx.call(void 0, "div",{id:d,"data-cui-measure":"reading","data-testid":`${o}-description`,children:t}),s,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",[Ue]:"","data-testid":`${o}-announcer`})]})};var Or=({summary:e,open:t,onOpenChange:n,testId:r,children:a})=>{g();let o=_react.useId.call(void 0, ),s=_react.useRef.call(void 0, null);return D(s,{testId:r,part:"summary",host:"button"}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-disclosure","data-testid":r,children:[_jsxruntime.jsxs.call(void 0, "button",{className:"cui-disclosure-button",type:"button","aria-expanded":t,"aria-controls":o,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${r}-button`,onClick:()=>n(!t),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-disclosure-marker","aria-hidden":"true",children:t?"\u25BE":"\u25B8"}),_jsxruntime.jsx.call(void 0, "span",{ref:s,children:e})]}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-disclosure-panel",id:o,hidden:!t,"data-testid":`${r}-panel`,children:a})]})};var _authcore = require('@aiquants/auth-core');var Kr=({tone:e,testId:t,children:n})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":t,children:n})),ce= exports.AlertMessage =({occurrence:e,testId:t,children:n})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-measure":"reading","data-cui-occurrence":e,"data-testid":t,children:n},e));var et=({failure:e,place:t,deniedSentence:n,failed:r,retry:a,testId:o})=>{let{labels:s,accessFailure:l}=C();if(n.trim()==="")throw new RangeError("FailureMessage: deniedSentence must be a non-empty sentence");let i=e.status===null?null:_authcore.accessFailureKindOfStatus.call(void 0, e.status);return i===null?_jsxruntime.jsx.call(void 0, ce,{occurrence:e.occurrence,testId:o,children:s.failureSentence(e,r)}):_jsxruntime.jsx.call(void 0, _react.Fragment,{children:l({kind:i,place:t,deniedSentence:i==="forbidden"?s.forbiddenBecause(n,e.reason):null,retry:a})},e.occurrence)};var _r=/\s/,tt=e=>{if(e!==void 0&&(typeof e!="string"||e===""||_r.test(e)))throw new RangeError(`A control's name must be one token without whitespace: "${e}"`);return e},Qt=e=>{if(e!==void 0&&!(Number.isInteger(e)&&e>0))throw new RangeError(`A field's maxLength must be a positive integer: ${e}`);return e},te=({description:e,error:t,errorId:n})=>{g();let r=_react.useId.call(void 0, ),a=_react.useId.call(void 0, ),o=_react.useId.call(void 0, ),s=n===void 0?o:_e(n,"a field's error"),l=[e===void 0?null:a,t===void 0?null:s].filter(d=>d!==null).join(" ");return{control:{id:r,"aria-describedby":l===""?void 0:l,"aria-invalid":t===void 0?void 0:!0},descriptionId:a,errorId:s}},ne=({description:e,error:t,descriptionId:n,errorId:r,testId:a})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:n,testId:`${a}-description`,children:e}),t===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"danger-fg",type:"body",id:r,testId:`${a}-error`,children:t})]}),Te=({htmlFor:e,hidden:t,children:n})=>_jsxruntime.jsx.call(void 0, "label",{className:t===!0?"cui-visually-hidden":"cui-field-label",htmlFor:e,"data-cui-type":"body",children:n}),qr= exports.Field =({label:e,description:t,error:n,errorId:r,testId:a,children:o})=>{let{control:s,descriptionId:l,errorId:i}=te({label:e,description:t,error:n,errorId:r});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":a,children:[_jsxruntime.jsx.call(void 0, Te,{htmlFor:s.id,hidden:void 0,children:e}),o(s),_jsxruntime.jsx.call(void 0, ne,{description:t,error:n,descriptionId:l,errorId:i,testId:a})]})},en=({label:e,description:t,error:n,errorId:r,value:a,onValueChange:o,type:s,name:l,maxLength:i,list:d,autoComplete:y,inputMode:u,prefix:c,labelHidden:b,required:f,testId:m,ref:R})=>{let{control:p,descriptionId:E,errorId:h}=te({label:e,description:t,error:n,errorId:r}),T=_react.useId.call(void 0, );if(c!==void 0&&c.trim()==="")throw new RangeError("An input's prefix must not be blank");if(i!==void 0&&s==="datetime-local")throw new RangeError(`A ${s} input takes no maxLength: ${i}`);let v=s==="password",k=_jsxruntime.jsx.call(void 0, "input",{className:"cui-input",type:s,name:tt(l),maxLength:Qt(i),value:a,list:d,autoComplete:y,inputMode:u,spellCheck:v?!1:void 0,autoCapitalize:v?"none":void 0,required:f,onChange:$=>o($.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":m,ref:R,...p,"aria-describedby":_(c===void 0?void 0:T,p["aria-describedby"])});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":`${m}-field`,children:[_jsxruntime.jsx.call(void 0, Te,{htmlFor:p.id,hidden:b,children:e}),c===void 0?k:_jsxruntime.jsxs.call(void 0, "div",{className:"cui-input-group",children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-input-prefix",id:T,"data-cui-fg":"fg-secondary","data-cui-surface":"sunken","data-cui-type":"body","data-testid":`${m}-prefix`,children:c}),k]}),_jsxruntime.jsx.call(void 0, ne,{description:t,error:n,descriptionId:E,errorId:h,testId:m})]})},Gr= exports.TextInput =e=>_jsxruntime.jsx.call(void 0, en,{...e}),Vr= exports.PasswordInput =e=>_jsxruntime.jsx.call(void 0, en,{...e,type:"password"}),Wr= exports.TextArea =({label:e,description:t,error:n,errorId:r,value:a,onValueChange:o,name:s,maxLength:l,required:i,testId:d,ref:y})=>{let{control:u,descriptionId:c,errorId:b}=te({label:e,description:t,error:n,errorId:r});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":`${d}-field`,children:[_jsxruntime.jsx.call(void 0, Te,{htmlFor:u.id,hidden:void 0,children:e}),_jsxruntime.jsx.call(void 0, "textarea",{className:"cui-input cui-textarea",name:tt(s),maxLength:Qt(l),value:a,required:i,onChange:f=>o(f.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":d,ref:y,...u}),_jsxruntime.jsx.call(void 0, ne,{description:t,error:n,descriptionId:c,errorId:b,testId:d})]})},zr= exports.Select =({label:e,description:t,error:n,errorId:r,value:a,options:o,onValueChange:s,name:l,labelHidden:i,unavailable:d,testId:y,ref:u})=>{let{control:c,descriptionId:b,errorId:f}=te({label:e,description:t,error:n,errorId:r}),m=_react.useId.call(void 0, ),R=Y(d,m);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":n!==void 0,"data-testid":`${y}-field`,children:[_jsxruntime.jsx.call(void 0, Te,{htmlFor:c.id,hidden:i,children:e}),_jsxruntime.jsx.call(void 0, "select",{className:"cui-input",name:tt(l),value:a,onChange:p=>{d===void 0&&s(p.target.value)},"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":y,ref:u,...c,"aria-disabled":d===void 0?void 0:!0,"aria-describedby":_(c["aria-describedby"],R),children:o.map(p=>_jsxruntime.jsx.call(void 0, "option",{value:p.value,children:p.label},p.value))}),_jsxruntime.jsx.call(void 0, ne,{description:t,error:n,descriptionId:b,errorId:f,testId:y}),_optionalChain([d, 'optionalAccess', _12 => _12.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:m,testId:`${y}-reason`,children:d.reason})]})},Jr= exports.RadioGroup =({legend:e,description:t,error:n,errorId:r,value:a,options:o,onValueChange:s,testId:l,ref:i})=>{let d=_react.useId.call(void 0, ),{control:y,descriptionId:u,errorId:c}=te({label:e,description:t,error:n,errorId:r});return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-radio-group","aria-describedby":y["aria-describedby"],"data-invalid":n!==void 0,"data-testid":l,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),o.map((b,f)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-radio","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"radio",name:d,value:b.value,checked:b.value===a,onChange:()=>s(b.value),"aria-invalid":y["aria-invalid"],"data-testid":`${l}-option-${b.value}`,ref:f===0?i:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:b.label})]},b.value)),_jsxruntime.jsx.call(void 0, ne,{description:t,error:n,descriptionId:u,errorId:c,testId:l})]})},jr= exports.CheckboxGroup =({legend:e,description:t,error:n,errorId:r,values:a,options:o,onValuesChange:s,testId:l,ref:i})=>{let{control:d,descriptionId:y,errorId:u}=te({label:e,description:t,error:n,errorId:r}),c=o.map(m=>m.value);if(c.length===0||new Set(c).size!==c.length)throw new RangeError(`A check box group needs at least one option with unique values: ${c.join(", ")}`);let b=a.filter(m=>!c.includes(m));if(b.length>0)throw new RangeError(`The chosen values are not options: ${b.join(", ")}`);let f=new Set(a);return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-checkbox-group","aria-describedby":d["aria-describedby"],"data-invalid":n!==void 0,"data-testid":l,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-checkbox-group-legend","data-cui-type":"body",children:e}),o.map((m,R)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-checkbox","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"checkbox",value:m.value,checked:f.has(m.value),onChange:()=>s(c.filter(p=>p===m.value?!f.has(p):f.has(p))),"aria-invalid":d["aria-invalid"],"data-testid":`${l}-option-${m.value}`,ref:R===0?i:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:m.label})]},m.value)),_jsxruntime.jsx.call(void 0, ne,{description:t,error:n,descriptionId:y,errorId:u,testId:l})]})};var sn=_react.createContext.call(void 0, null),tn="surface",nn={neutral:{face:"surface",line:"border-control"},info:{face:"info-tint",line:"info-accent"},success:{face:"success-tint",line:"success-accent"},warning:{face:"warning-tint",line:"warning-accent"},danger:{face:"danger-tint",line:"danger-accent"}},rn={face:"info-tint",line:"info-accent"},dn={normal:"border-control",high:"info-accent"},eo=["normal","high"],to=[1,2,3,4],H=_chunkRYHSVWM2cjs.v.space["space-2"],no="fg",ro="fg-secondary",ln=e=>{let t=_react.useContext.call(void 0, sn);if(t===null)throw new Error(`${e} must be rendered inside Figure`);return t},nt=(e,t,n)=>{if(!(Number.isFinite(n)&&n>0&&n%4===0))throw new RangeError(`${e}: ${t} must be a positive multiple of the ${4} px lattice: ${n}`)},oo= exports.Figure =e=>{g();let t=_react.useId.call(void 0, ),{kind:n,widthPx:r,heightPx:a,testId:o,dataAttributes:s,children:l}=e;nt(o,"widthPx",r),nt(o,"heightPx",a);let i=_react.useMemo.call(void 0, ()=>({kind:n,widthPx:r,heightPx:a,arrowIds:{normal:`${t}-arrow-normal`,high:`${t}-arrow-high`}}),[n,r,a,t]),d=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "defs",{children:eo.map(b=>_jsxruntime.jsx.call(void 0, "marker",{id:i.arrowIds[b],viewBox:`0 0 ${H} ${H}`,refX:H,refY:H/2,markerWidth:H,markerHeight:H,markerUnits:"userSpaceOnUse",orient:"auto","data-cui-emphasis":b,children:_jsxruntime.jsx.call(void 0, "path",{d:`M 0 0 L ${H} ${H/2} L 0 ${H} z`,"data-cui-stroke":dn[b],"data-testid":`${o}-arrow-${b}`})},b))}),_jsxruntime.jsx.call(void 0, sn.Provider,{value:i,children:l})]});if(e.kind==="group"){let{label:b,onEscape:f}=e;if(!_chunkRYHSVWM2cjs.h.call(void 0, b))throw new RangeError(`${o}: a group figure's label must hold a readable character: ${JSON.stringify(b)}`);return _jsxruntime.jsx.call(void 0, "div",{className:"cui-figure-frame","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{className:"cui-figure",role:"group","aria-label":b,viewBox:`0 0 ${r} ${a}`,"data-cui-figure":"group","data-cui-surface":tn,"data-cui-face":"sans",style:{"--cui-figure-inline":_chunkRYHSVWM2cjs.O.call(void 0, r),"--cui-figure-block":_chunkRYHSVWM2cjs.O.call(void 0, a)},onKeyDown:f===void 0?void 0:m=>q(m,f),"data-testid":o,...w(s),children:d})})}let{viewBox:y,pointer:u,svgRef:c}=e;return _jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{ref:c,className:"cui-figure","aria-hidden":"true",viewBox:y===void 0?`0 0 ${r} ${a}`:y,"data-cui-figure":"decorative","data-cui-surface":tn,"data-cui-face":"sans","data-cui-pan":u===void 0?void 0:"true","data-cui-cursor":_optionalChain([u, 'optionalAccess', _13 => _13.cursor]),style:{"--cui-figure-inline":_chunkRYHSVWM2cjs.O.call(void 0, r),"--cui-figure-ratio":String(a/r)},"data-testid":o,...w(s),..._optionalChain([u, 'optionalAccess', _14 => _14.handlers]),children:d})})},on=(e,t)=>{try{return t()}catch(n){throw new RangeError(`${e}: ${n.message}`,{cause:n})}},ao=(e,t,n)=>{for(let r of t){let a=_chunkXLOWKWIIcjs.i.light[r.fg],o=n.find(s=>a[s]===void 0);if(o!==void 0)throw new RangeError(`${e}: the note ${JSON.stringify(r.text)} in ${r.fg} is not in the contrast table on ${o}, a face the node takes`)}},io= exports.FigureNode =e=>{g();let t=ln("FigureNode"),n=_react.useId.call(void 0, ),{x:r,y:a,shape:o,tone:s,outline:l,selected:i,name:d,title:y,press:u,testId:c,dataAttributes:b}=e,f=e.notes===void 0?[]:e.notes;if(!(Number.isFinite(r)&&Number.isFinite(a)))throw new RangeError(`${c}: a node's position must be finite: ${r}, ${a}`);if(t.kind==="group"&&u===void 0)throw new RangeError(`${c}: every node of a group figure must be pressable (pass press)`);if(t.kind==="decorative"&&u!==void 0)throw new RangeError(`${c}: a node of a decorative figure cannot be pressed (it is hidden from assistive technology)`);if(u!==void 0&&!_chunkRYHSVWM2cjs.h.call(void 0, u.label))throw new RangeError(`${c}: a pressable node's label must hold a readable character: ${JSON.stringify(u.label)}`);let m=i?rn:nn[s];ao(c,f,[nn[s].face,rn.face]);let R,p,E;if(o.kind==="box"){if(d===null)throw new RangeError(`${c}: a box's name is drawn inside the box and sizes it, so it cannot be null (only a disc may be drawn without a name)`);let T=on(c,()=>_chunkRYHSVWM2cjs.I.call(void 0, {name:d,notes:f.map(k=>k.text)}));if(nt(c,"a box's widthPx",o.widthPx),o.widthPx<T.minWidthPx)throw new RangeError(`${c}: a box ${o.widthPx} px wide is narrower than its lines under the widest 1.4.12 spacing (${T.minWidthPx} px)`);R={width:o.widthPx,height:T.heightPx,left:r,top:a};let v=_chunkRYHSVWM2cjs.J.call(void 0, f.length);p=_jsxruntime.jsxs.call(void 0, "g",{"data-cui-surface":m.face,children:[_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-plate",width:o.widthPx,height:T.heightPx,rx:_chunkRYHSVWM2cjs.v.radius["radius-item"],"data-cui-fill":m.face,"data-cui-stroke":m.line,"data-testid":`${c}-plate`}),_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-name",x:v.insetPx,y:v.namePx,fontSize:_chunkRYHSVWM2cjs.v.type.body.size,"data-cui-fg":no,"data-cui-figure-type":"body","data-testid":`${c}-name`,children:d}),f.map((k,$)=>_jsxruntime.jsx.call(void 0, "text",{x:v.insetPx,y:v.notesPx[$],fontSize:_chunkRYHSVWM2cjs.v.type.caption.size,"data-cui-fg":k.fg,"data-cui-figure-type":"caption","data-testid":`${c}-note-${$}`,children:k.text},$))]}),E=_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-ring",x:-_chunkRYHSVWM2cjs.M,y:-_chunkRYHSVWM2cjs.M,width:o.widthPx+2*_chunkRYHSVWM2cjs.M,height:T.heightPx+2*_chunkRYHSVWM2cjs.M,rx:_chunkRYHSVWM2cjs.v.radius["radius-item"]+_chunkRYHSVWM2cjs.M,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}else{let T=on(c,()=>_chunkRYHSVWM2cjs.K.call(void 0, d,o.radiusPx));R={width:2*o.radiusPx,height:2*o.radiusPx,left:r-o.radiusPx,top:a-o.radiusPx},p=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "g",{"data-cui-surface":m.face,children:_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-plate",r:o.radiusPx,"data-cui-fill":m.face,"data-cui-stroke":m.line,"data-testid":`${c}-plate`})}),d===null?null:_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-label",x:0,y:T.extentBelowPx-_chunkRYHSVWM2cjs.v.type.caption.lineHeight/2,fontSize:_chunkRYHSVWM2cjs.v.type.caption.size,"data-cui-fg":ro,"data-cui-figure-type":"caption","data-testid":`${c}-name`,children:d})]}),E=_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-ring",r:o.radiusPx+_chunkRYHSVWM2cjs.M,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}if(u!==void 0){if(R.width<_chunkRYHSVWM2cjs.s||R.height<_chunkRYHSVWM2cjs.s)throw new RangeError(`${c}: a pressable node must be at least the ${_chunkRYHSVWM2cjs.s} px target: ${R.width} \xD7 ${R.height}`);if(R.left<_chunkRYHSVWM2cjs.L||R.top<_chunkRYHSVWM2cjs.L||R.left+R.width+_chunkRYHSVWM2cjs.L>t.widthPx||R.top+R.height+_chunkRYHSVWM2cjs.L>t.heightPx)throw new RangeError(`${c}: a pressable node must keep ${_chunkRYHSVWM2cjs.L} px to the figure's edge for its focus ring`)}let h=u===void 0?{}:{role:"button",tabIndex:0,"aria-label":u.label,"aria-describedby":u.description===void 0?void 0:n,"aria-expanded":u.expanded,"aria-controls":u.expanded?u.controls:void 0,onClick:T=>{T.currentTarget.focus(),u.onPress()},onKeyDown:T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),T.repeat||u.onPress())}};return _jsxruntime.jsxs.call(void 0, "g",{className:"cui-figure-node",transform:`translate(${r} ${a})`,"data-cui-tone":s,"data-cui-outline":l,"data-selected":String(i),...h,"data-testid":c,...w(b),children:[y===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:y}),_optionalChain([u, 'optionalAccess', _15 => _15.description])===void 0?null:_jsxruntime.jsx.call(void 0, "desc",{id:n,"data-testid":`${c}-description`,children:u.description}),u===void 0?null:E,p]})},so= exports.FigureEdge =({d:e,emphasis:t,weight:n,arrow:r,title:a,testId:o,dataAttributes:s})=>{g();let l=ln("FigureEdge");if(!to.includes(n))throw new RangeError(`${o}: an edge's weight must be 1, 2, 3 or 4: ${n}`);return _jsxruntime.jsx.call(void 0, "path",{className:"cui-figure-edge",d:e,markerEnd:r?`url(#${l.arrowIds[t]})`:void 0,"data-cui-stroke":dn[t],"data-cui-weight":n,"data-cui-emphasis":t,"data-testid":o,...w(s),children:a===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:a})})};var lo={1:"h1",2:"h2",3:"h3"},uo= exports.Heading =({level:e,type:t,testId:n,headingRef:r,children:a})=>{g();let o=lo[e];return _jsxruntime.jsx.call(void 0, o,{className:"cui-heading","data-cui-type":t,"data-cui-fg":"fg","data-testid":n,ref:r,tabIndex:r===void 0?void 0:-1,children:a})};var po={removed:"danger-tint",added:"success-tint"},yo= exports.InlineChange =({kind:e,testId:t,children:n})=>{if(g(),n==="")throw new RangeError(`${t}: a changed fragment must hold at least one character`);return _jsxruntime.jsx.call(void 0, e==="removed"?"del":"ins",{className:"cui-change","data-cui-change":e,"data-cui-surface":po[e],"data-cui-fg":"fg","data-testid":t,children:n})};var mo={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},go={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},rt= exports.Pill =({tone:e,variant:t,testId:n,dataAttributes:r,children:a})=>{g();let o=t==="tint"?mo[e]:{fg:"on-solid",surface:go[e]};return _jsxruntime.jsx.call(void 0, "span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":o.fg,"data-cui-surface":o.surface,"data-cui-type":"caption","data-testid":n,...w(r),children:a})};var ot=({label:e,valueText:t,value:n,max:r,testId:a})=>{g();let o=_react.useId.call(void 0, );if(r!==null){if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Progress maximum must be positive: ${r}`);if(n===null||!(Number.isFinite(n)&&n>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${n}`)}let s=r===null?null:{max:r,now:Math.min(n,r)};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-progress","data-testid":a,children:[_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg",type:"body",id:o,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":o,"aria-valuetext":t,"aria-valuemin":s===null?void 0:0,"aria-valuemax":_optionalChain([s, 'optionalAccess', _16 => _16.max]),"aria-valuenow":_optionalChain([s, 'optionalAccess', _17 => _17.now]),"data-cui-surface":"sunken","data-cui-indeterminate":s===null,"data-testid":`${a}-bar`,children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:s===null?void 0:{inlineSize:`${s.now/s.max*100}%`},"data-testid":`${a}-fill`})}),_jsxruntime.jsx.call(void 0, "div",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-secondary",type:"body",testId:`${a}-value`,children:t})})]})};var To=({title:e,status:t,progress:n,cancel:r,testId:a,children:o})=>_jsxruntime.jsxs.call(void 0, We,{title:e,actions:r===void 0?void 0:_jsxruntime.jsx.call(void 0, I,{variant:"secondary",busy:r.busy,busyLabel:r.busyLabel,onClick:r.onCancel,testId:`${a}-cancel`,children:r.label}),testId:a,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-job-status",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${a}-status`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:`${e} `}),_jsxruntime.jsx.call(void 0, rt,{tone:t.tone,variant:"tint",testId:`${a}-status-pill`,children:t.label})]}),n===void 0?null:_jsxruntime.jsx.call(void 0, ot,{...n,testId:`${a}-progress`}),o]});var at=_react.createContext.call(void 0, null),xo="space-2",wo= exports.List =e=>{g();let{gap:t,label:n,id:r,hidden:a,testId:o,children:s}=e;if(n!==void 0&&!_chunkRYHSVWM2cjs.h.call(void 0, n))throw new RangeError(`${o}: a list's label must hold a readable character: ${JSON.stringify(n)}`);let l=e.marker==="none"?void 0:e.type,i=l!==void 0,d=e.marker==="number"||e.marker==="none"&&e.ordered?"ol":"ul";return _jsxruntime.jsx.call(void 0, at.Provider,{value:e.marker,children:_jsxruntime.jsx.call(void 0, d,{className:"cui-list",role:"list","aria-label":n,id:r,hidden:a,"data-cui-gap":i?void 0:t,"data-cui-row-gap":i?t:void 0,"data-cui-column-gap":i?xo:void 0,"data-cui-marker":i?e.marker:void 0,"data-cui-type":l,"data-testid":o,children:s})})},Po= exports.ListItem =({testId:e,dataAttributes:t,children:n})=>{g();let r=_react.useContext.call(void 0, at);if(r===null)throw new Error("ListItem must be rendered inside List, not inside another ListItem");return _jsxruntime.jsx.call(void 0, "li",{className:"cui-list-item","data-testid":e,...w(t),children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-list-body","data-cui-measure":r==="none"?void 0:"reading",children:_jsxruntime.jsx.call(void 0, at.Provider,{value:null,children:n})})})};var yn=e=>[...e.querySelectorAll(de)].filter(t=>{let n=t.closest(ze);return n===null||!e.contains(n)}),Co=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let n=yn(t);if(n.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${n.length} ${de} elements for ${e.count} rows`);return n},ko=(e,t)=>{let n=-1;return e.forEach((r,a)=>{t.has(r)&&(n=a)}),e[n+1]},Lo= exports.LoadMore =({onLoad:e,busy:t,done:n,failure:r,limit:a,rows:o,testId:s})=>{let{formatLocale:l,labels:i}=C(),d=_react.useRef.call(void 0, null),y=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, !1),b=()=>{let p=o.ref.current;d.current={shown:new Set(p===null?[]:yn(p)),failureOccurrence:r===null?null:r.occurrence,busySeen:!1},e()};_react.useLayoutEffect.call(void 0, ()=>{let p=c.current;c.current=!1;let E=d.current;if(E===null)return;let h=Co(o);if(t){E.busySeen=!0,E.shown=new Set(h);return}let T=ko(h,E.shown),v=r!==null&&r.occurrence!==E.failureOccurrence;if(!(E.busySeen||T!==void 0||v||n)||(d.current=null,v||T===void 0))return;let k=[null,document.body].includes(document.activeElement);(u.current!==null&&document.activeElement===u.current||p&&k)&&T.focus()});let f=le(()=>n?y.current:u.current),m=_react.useCallback.call(void 0, (p=>{u.current=p;let E=f(p);return()=>{u.current=null,c.current=p===document.activeElement,E()}}),[f]),R=_react.useCallback.call(void 0, (p=>{y.current=p;let E=f(p);return()=>{y.current=null,E()}}),[f]);return n?_jsxruntime.jsx.call(void 0, "div",{className:"cui-load-more","data-testid":s,children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:R,testId:`${s}-end`,children:i.endOfRecords})}):_jsxruntime.jsxs.call(void 0, "div",{className:"cui-load-more","data-testid":s,children:[_jsxruntime.jsx.call(void 0, I,{variant:"secondary",busy:t,busyLabel:i.loading,onClick:b,ref:m,testId:`${s}-button`,children:i.loadMore(_chunkRYHSVWM2cjs.c.call(void 0, a,l))}),r===null?null:_jsxruntime.jsx.call(void 0, ce,{occurrence:r.occurrence,testId:`${s}-failure`,children:i.loadFailed(r.reason)})]})};var Mo=({master:e,detail:t,masterMinPx:n,detailMinPx:r,testId:a})=>{g();let o=_chunkRYHSVWM2cjs.Q.call(void 0, {masterMinPx:n,detailMinPx:r,gapPx:_chunkRYHSVWM2cjs.v.space["space-6"]});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":a,children:[_jsxruntime.jsx.call(void 0, Q,{ruleKey:o.key,css:o.css}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-master-detail","data-cui-master-detail":o.key,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-master`,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-detail`,children:t})]})]})};var Ne=e=>{let{formatLocale:t,labels:n}=C(),{testId:r}=e;if(e.keep===void 0){let{value:s,unit:l}=e;if(l!==void 0&&!_chunkRYHSVWM2cjs.h.call(void 0, l))throw new RangeError(`${r}: a unit must hold a readable character: ${JSON.stringify(l)}`);if(s===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-testid":r,children:n.unmeasured});let i=_chunkRYHSVWM2cjs.c.call(void 0, s,t);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-testid":r,children:_chunkRYHSVWM2cjs.e.call(void 0, i,l)})}let{text:a,keep:o}=e;if(a===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-cui-keep":o,"data-testid":r,children:n.unmeasured});if(!_chunkRYHSVWM2cjs.h.call(void 0, a))throw new RangeError(`${r}: a measured text must hold a readable character (pass null when the value was not measured): ${JSON.stringify(a)}`);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-cui-keep":o,"data-testid":r,children:a})};var Io=({label:e,value:t,min:n,max:r,valueText:a,testId:o})=>{if(g(),!(Number.isFinite(n)&&Number.isFinite(r)&&n<r))throw new RangeError(`Meter needs a finite range with min below max: min ${n}, max ${r}`);if(!(Number.isFinite(t)&&t>=n&&t<=r))throw new RangeError(`Meter value must be a finite number in its range: value ${t}, min ${n}, max ${r}`);return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-meter","data-testid":o,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-track",role:"meter","aria-label":e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":t,"aria-valuetext":a,"data-cui-surface":"sunken","data-testid":`${o}-bar`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-fill","data-cui-accent":"info-accent",style:{inlineSize:`${(t-n)/(r-n)*100}%`},"data-testid":`${o}-fill`})}),_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${o}-value`,children:a})})]})};var Do={ArrowLeft:-1,ArrowRight:1},Ho= exports.PanelTabs =({label:e,items:t,value:n,onValueChange:r,testId:a,panelDescribedBy:o,children:s})=>{g();let l=_react.useId.call(void 0, ),i=_react.useRef.call(void 0, new Map);if(t.length===0)throw new RangeError("PanelTabs needs at least one tab");let d=t.map(m=>m.id);if(new Set(d).size!==d.length)throw new RangeError(`Tab keys must be unique: ${d.join(", ")}`);let y=d.indexOf(n);if(y<0)throw new RangeError(`The selected tab "${n}" is not one of the tabs: ${d.join(", ")}`);let u=m=>`${l}-tab-${m}`,c=`${l}-panel`,b=m=>{let R=t[m];R.id!==n&&r(R.id),_optionalChain([i, 'access', _18 => _18.current, 'access', _19 => _19.get, 'call', _20 => _20(R.id), 'optionalAccess', _21 => _21.focus, 'call', _22 => _22()])};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-panel-tabs","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-tabs-list",role:"tablist","aria-label":e,onKeyDown:m=>{let R=t.findIndex(T=>i.current.get(T.id)===m.target),p=R<0?y:R,E=Do[m.key],h;if(E!==void 0){let T=getComputedStyle(m.currentTarget).direction==="rtl"?-E:E;h=(p+T+t.length)%t.length}else if(m.key==="Home")h=0;else if(m.key==="End")h=t.length-1;else return;m.preventDefault(),b(h)},children:t.map((m,R)=>{let p=R===y;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-tab cui-panel-tab",type:"button",role:"tab",id:u(R),"aria-selected":p,"aria-controls":c,tabIndex:p?0:-1,"data-cui-fg":p?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${m.id}`,ref:E=>{E===null?i.current.delete(m.id):i.current.set(m.id,E)},onClick:()=>b(R),children:m.label},m.id)})}),_jsxruntime.jsx.call(void 0, "div",{role:"tabpanel",id:c,"aria-labelledby":u(y),"aria-describedby":o,"data-testid":`${a}-panel`,children:s})]})};var Uo=({failure:e,onReload:t,deniedSentence:n,failureMessage:r,rescueRef:a,testId:o})=>{let{labels:s}=C(),l=_jsxruntime.jsx.call(void 0, et,{failure:e,place:"read",deniedSentence:n,failed:r===void 0?s.loadFailed:r,retry:t,testId:`${o}-alert`});return e.status!==null&&_authcore.accessFailureKindOfStatus.call(void 0, e.status)!==null?_jsxruntime.jsx.call(void 0, "div",{className:"cui-resource-failed",ref:a,"data-testid":o,children:l},e.occurrence):_jsxruntime.jsxs.call(void 0, "div",{className:"cui-resource-failed","data-testid":o,children:[l,_jsxruntime.jsx.call(void 0, I,{variant:"secondary",busy:e.retrying,busyLabel:s.loading,onClick:t,ref:a,testId:`${o}-reload`,children:s.reload})]})};var qo=({label:e,options:t,value:n,onValueChange:r,testId:a,density:o="regular"})=>{g();let s=_react.useId.call(void 0, ),l=new Set(t.map(i=>i.value));if(t.length<2||l.size!==t.length)throw new RangeError(`A segmented control needs at least two options with unique values: ${t.map(i=>i.value).join(", ")}`);if(!l.has(n))throw new RangeError(`The pressed value "${n}" is not one of the options: ${[...l].join(", ")}`);if(o!=="regular"&&o!=="compact")throw new RangeError(`A segmented control's density is "regular" or "compact", not ${JSON.stringify(o)}`);return o==="compact"?_jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-segmented-group","aria-labelledby":s,"data-cui-density":"compact","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-segmented-label",id:s,"data-cui-type":"caption",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===n;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-segment",type:"button","aria-pressed":d,"data-testid":`${a}-${i.value}`,onClick:()=>{d||r(i.value)},children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-segment-face","data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"caption","data-testid":`${a}-${i.value}-face`,children:i.label})},i.value)})})]}):_jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-segmented-group","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-segmented-legend","data-cui-type":"body",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===n;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-segment",type:"button","aria-pressed":d,"data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"body","data-testid":`${a}-${i.value}`,onClick:()=>{d||r(i.value)},children:i.label},i.value)})})]})};var gn=e=>{let t=_react.useRef.call(void 0, null),n=_react.useCallback.call(void 0, r=>{if(t.current=r,typeof e=="function")return e(r);e!=null&&(e.current=r)},[e]);return{row:t,bindRow:n}},bn= exports.RowButton =({selected:e,controls:t,onSelect:n,testId:r,dataAttributes:a,ref:o,keyShortcuts:s,children:l})=>{g();let{row:i,bindRow:d}=gn(o);D(i,{testId:r,part:"row",host:"button"});let y=u=>{ae(u),n()};return _jsxruntime.jsx.call(void 0, "button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"aria-keyshortcuts":B(s,r),"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":r,onClick:y,ref:d,...w(a),children:l})},Wo= exports.RowLink =({href:e,current:t,onNavigate:n,testId:r,dataAttributes:a,ref:o,keyShortcuts:s,children:l})=>{g();let{row:i,bindRow:d}=gn(o);D(i,{testId:r,part:"row",host:"link"});let y=u=>{ae(u),Z(u,e,n)};return _jsxruntime.jsx.call(void 0, "a",{className:"cui-row-link",href:e,"aria-current":t?"page":void 0,"aria-keyshortcuts":B(s,r),"data-cui-row-focus":"","data-cui-surface":t?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":r,onClick:y,ref:d,...w(a),children:l})},zo= exports.SelectableList =({label:e,items:t,itemKey:n,selectedKey:r,onSelect:a,detailId:o,renderRow:s,rowTestId:l,rowData:i,empty:d,testId:y,ref:u})=>(g(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-selectable","data-testid":y,ref:u,children:t.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",testId:`${y}-empty`,children:d}):_jsxruntime.jsx.call(void 0, "ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let b=n(c);return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, bn,{selected:b===r,controls:o,onSelect:()=>a(c),testId:l,dataAttributes:_optionalChain([i, 'optionalCall', _23 => _23(c)]),children:s(c)})},b)})})}));var jo=({label:e,value:t,min:n,max:r,step:a,valueText:o,onValueChange:s,testId:l})=>{g();let i=_react.useId.call(void 0, );if(!([t,n,r,a].every(Number.isFinite)&&n<r&&a>0&&n<=t&&t<=r))throw new RangeError(`Slider needs finite min < max, a positive step and min <= value <= max: value ${t}, min ${n}, max ${r}, step ${a}`);let d=o(t);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-testid":`${l}-field`,children:[_jsxruntime.jsx.call(void 0, "label",{className:"cui-field-label",htmlFor:i,"data-cui-type":"body",children:e}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-slider",children:[_jsxruntime.jsx.call(void 0, "input",{className:"cui-slider-input",id:i,type:"range",min:n,max:r,step:a,value:t,"aria-valuetext":d,"data-testid":l,onChange:y=>s(y.currentTarget.valueAsNumber)}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-slider-value","aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${l}-value`,children:d})})]})]})};var Rn={done:0,current:1,pending:2},Xo={done:{fg:"on-solid",surface:"success-solid"},current:{fg:"on-solid",surface:"info-solid"},pending:{fg:"fg-secondary",surface:void 0}},Yo= exports.Stepper =({label:e,steps:t,testId:n})=>{let{labels:r}=C();if(t.length===0||new Set(t.map(o=>o.id)).size!==t.length)throw new RangeError(`A stepper needs at least one step with unique keys: ${t.map(o=>o.id).join(", ")}`);if(t.filter(o=>o.state==="current").length>1||t.some((o,s)=>s>0&&Rn[o.state]<Rn[t[s-1].state]))throw new RangeError(`Step states must run done, at most one current, then pending: ${t.map(o=>o.state).join(", ")}`);let a={done:r.stepDone,current:null,pending:r.stepPending};return _jsxruntime.jsx.call(void 0, "ol",{className:"cui-stepper",role:"list","aria-label":e,"data-cui-type":"body","data-testid":n,children:t.map((o,s)=>{let l=Xo[o.state],i=a[o.state];return _jsxruntime.jsxs.call(void 0, "li",{className:"cui-step","aria-current":o.state==="current"?"step":void 0,"data-cui-step":o.state,"data-testid":`${n}-${o.id}`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-step-marker","aria-hidden":"true","data-cui-fg":l.fg,"data-cui-surface":l.surface,"data-cui-type":"caption",children:o.state==="done"?"\u2713":s+1}),_jsxruntime.jsxs.call(void 0, "span",{className:"cui-step-label","data-cui-fg":"fg",children:[o.label,i===null?null:_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:` (${i})`})]})]},o.id)})})};var ea=({label:e,labelHidden:t,checked:n,onCheckedChange:r,unavailable:a,testId:o,ref:s,dataAttributes:l})=>{g();let i=_react.useId.call(void 0, ),d=_react.useRef.call(void 0, null);D(d,{testId:o,part:"label",host:"button"});let y=Y(a,i),u=a!==void 0,c=_jsxruntime.jsxs.call(void 0, "button",{className:"cui-switch",type:"button",role:"switch","aria-checked":n,"aria-disabled":u?!0:void 0,"aria-describedby":_(y),"data-cui-fg":"fg","data-cui-type":"body","data-testid":o,ref:s,onClick:()=>{u||r(!n)},...w(l),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-track","aria-hidden":"true","data-cui-surface":n?"info-solid":"sunken","data-testid":`${o}-track`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-thumb","data-cui-surface":n?"surface":"neutral-solid","data-testid":`${o}-thumb`})}),_jsxruntime.jsx.call(void 0, "span",{className:t===!0?"cui-visually-hidden":void 0,ref:d,children:e})]});return _optionalChain([a, 'optionalAccess', _24 => _24.reason])===void 0?c:_jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[c,_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:i,testId:`${o}-reason`,children:a.reason})]})};var aa=({label:e,items:t,currentId:n,onNavigate:r,testId:a,collapsible:o=!1})=>{if(g(),t.length===0)throw new RangeError("Tabs needs at least one tab");let s=new Set(t.map(f=>f.id));if(s.size!==t.length)throw new RangeError(`Tab keys must be unique: ${t.map(f=>f.id).join(", ")}`);let l=t.find(f=>f.id===n);if(l===void 0)throw new RangeError(`The current tab "${n}" is not one of the tabs: ${[...s].join(", ")}`);let[i,d]=_react.useState.call(void 0, !1),y=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useId.call(void 0, ),b=_react.useCallback.call(void 0, f=>{d(!1),f&&_optionalChain([y, 'access', _25 => _25.current, 'optionalAccess', _26 => _26.contains, 'call', _27 => _27(document.activeElement)])&&_optionalChain([u, 'access', _28 => _28.current, 'optionalAccess', _29 => _29.focus, 'call', _30 => _30()])},[]);return _react.useEffect.call(void 0, ()=>{if(!(o&&i))return;let f=p=>y.current!==null&&!y.current.contains(p),m=p=>{f(p.target)&&b(!0)},R=p=>{f(p.target)&&b(!1)};return document.addEventListener("pointerdown",m,!0),document.addEventListener("focusin",R,!0),()=>{document.removeEventListener("pointerdown",m,!0),document.removeEventListener("focusin",R,!0)}},[o,i,b]),_jsxruntime.jsxs.call(void 0, "nav",{ref:y,className:"cui-tabs","aria-label":e,"data-testid":a,"data-cui-collapsible":o?"":void 0,"data-cui-open":o&&i?"":void 0,onKeyDown:o&&i?f=>q(f,()=>b(!0)):void 0,children:[o?_jsxruntime.jsxs.call(void 0, "button",{ref:u,type:"button",className:"cui-tabs-summary","aria-expanded":i,"aria-controls":c,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${a}-summary`,onClick:()=>d(f=>!f),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-tabs-summary-label",children:l.label}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-tabs-summary-marker","aria-hidden":"true",children:i?"\u25B4":"\u25BE"})]}):null,_jsxruntime.jsx.call(void 0, "ul",{className:"cui-tabs-list",id:c,role:"list","data-cui-surface":o?"surface":void 0,children:t.map(f=>{let m=f.id===n;return _jsxruntime.jsx.call(void 0, "li",{className:"cui-tabs-item",children:_jsxruntime.jsx.call(void 0, "a",{className:"cui-tab",href:f.href,"aria-current":m?"page":void 0,"data-cui-fg":m?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${f.id}`,onClick:R=>{Z(R,f.href,r),R.defaultPrevented&&b(!1)},children:f.label})},f.id)})})]})};var la={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},ua= exports.MetricTile =e=>{g();let{label:t,sublabel:n,tone:r,testId:a,dataAttributes:o}=e;if((e.text===void 0?e.value===null:e.text===null)&&r!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${r}`);let l=`${a}-value`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":r,"data-testid":a,...w(o),children:[_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-label","data-cui-type":"caption","data-cui-measure":"reading",children:t}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption","data-cui-measure":"reading",children:n}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-value","data-cui-fg":la[r],"data-cui-type":"heading","data-cui-measure":"reading",children:e.text===void 0?_jsxruntime.jsx.call(void 0, Ne,{value:e.value,unit:e.unit,testId:l}):_jsxruntime.jsx.call(void 0, Ne,{text:e.text,keep:"wrap",testId:l})})]})},wn=e=>_react.Children.toArray(e).flatMap(t=>{if(!_react.isValidElement.call(void 0, t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===_react.Fragment?wn(t.props.children):[t]}),ca= exports.TileGrid =({count:e,minInlinePx:t,testId:n,children:r})=>{g();let a=_chunkRYHSVWM2cjs.T.call(void 0, e,t,_chunkRYHSVWM2cjs.v.space["space-2"]),o=wn(r).length;if(o!==e)throw new RangeError(`TileGrid has ${o} tiles but count is ${e}`);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":n,children:[_jsxruntime.jsx.call(void 0, Q,{ruleKey:a.key,css:a.css}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-tile-grid","data-cui-tile-grid":a.key,"data-cui-gap":"space-2",children:r})]})};var Se=e=>[...e.querySelectorAll("button")],ya= exports.Toolbar =({label:e,testId:t,children:n})=>{g();let r=_react.useRef.call(void 0, null),a=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{let i=Se(r.current),d=a.current!==null&&i.includes(a.current)?a.current:_nullishCoalesce(i[0], () => (null));a.current=d;for(let y of i)y.tabIndex=y===d?0:-1});let o=i=>{for(let d of Se(r.current))d.tabIndex=d===i?0:-1;a.current=i};return _jsxruntime.jsx.call(void 0, "div",{className:"cui-toolbar",role:"toolbar","aria-label":e,"aria-orientation":"horizontal","data-testid":t,ref:r,onFocus:i=>{let d=Se(i.currentTarget).find(y=>y.contains(i.target));d!==void 0&&o(d)},onKeyDown:i=>{let d=Se(i.currentTarget),y=d.indexOf(i.target);if(y===-1)return;let u=getComputedStyle(i.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",c=u==="ArrowRight"?"ArrowLeft":"ArrowRight",f={[u]:(y+1)%d.length,[c]:(y-1+d.length)%d.length,Home:0,End:d.length-1}[i.key];if(f===void 0)return;i.preventDefault();let m=d[f];o(m),m.focus()},children:n})};var ga=e=>{let[t,n]=_react.useState.call(void 0, {failure:null,count:0});return e!==null&&e!==t.failure?(n({failure:e,count:t.count+1}),t.count+1):t.count};var Cn=e=>e===null?_chunkRYHSVWM2cjs.X:_chunkRYHSVWM2cjs.Y,Ie=(e,t,n,r,a)=>{let[o,s]=_react.useState.call(void 0, ()=>({key:e,state:Cn(e)})),[l,i]=_react.useState.call(void 0, 0),[d,y]=_react.useState.call(void 0, 0),u=_react.useRef.call(void 0, t),c=_react.useRef.call(void 0, null),b=_react.useRef.call(void 0, l);_react.useLayoutEffect.call(void 0, ()=>{u.current=t}),_react.useEffect.call(void 0, ()=>{if(e===null){s({key:null,state:_chunkRYHSVWM2cjs.X});return}let h=new AbortController;c.current=e;let T=l===b.current?"revision":"reload";return b.current=l,s(v=>Object.is(v.key,e)?{key:e,state:r(v.state,T)}:{key:e,state:_chunkRYHSVWM2cjs.Y}),u.current(h.signal).then(v=>{h.signal.aborted||(c.current=null,s(k=>({key:e,state:a(k.state,v)})))},v=>{h.signal.aborted||s(()=>{throw v})}),()=>{h.abort(),c.current=null}},[e,n,l,d]);let f=_react.useCallback.call(void 0, ()=>i(h=>h+1),[]),m=_react.useCallback.call(void 0, ()=>y(h=>h+1),[]),R=_react.useCallback.call(void 0, (h,T)=>{s(v=>Object.is(v.key,h)?{key:h,state:T(v.state)}:v)},[]),p=_react.useCallback.call(void 0, (h,T)=>{R(h,T),Object.is(c.current,h)&&m()},[R,m]);return{state:Object.is(o.key,e)?o.state:Cn(e),reload:f,refresh:m,update:R,write:p}};var Ta=(e,t,n)=>{let r=_react.useRef.call(void 0, t);_react.useLayoutEffect.call(void 0, ()=>{r.current=t});let a=_react.useCallback.call(void 0, p=>r.current.first(p),[]),{state:o,reload:s,refresh:l,update:i,write:d}=Ie(e,a,n,_chunkRYHSVWM2cjs.$,_chunkRYHSVWM2cjs.aa),y=_react.useRef.call(void 0, {key:e,state:o});_react.useLayoutEffect.call(void 0, ()=>{y.current={key:e,state:o}});let u=_react.useRef.call(void 0, null),c=_react.useCallback.call(void 0, ()=>{_optionalChain([u, 'access', _31 => _31.current, 'optionalAccess', _32 => _32.controller, 'access', _33 => _33.abort, 'call', _34 => _34()]),u.current=null},[]);_react.useEffect.call(void 0, ()=>c,[e,n,c]);let b=_react.useCallback.call(void 0, ()=>{c(),s()},[c,s]),f=_react.useCallback.call(void 0, ()=>{c(),l()},[c,l]),m=_react.useCallback.call(void 0, ()=>{let{key:p,state:E}=y.current;if(p===null||E.kind!=="ready"||E.refreshing||E.value.next===null||E.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let h=E.value.next,T={key:p,controller:new AbortController,maps:[]};u.current=T,i(p,_chunkRYHSVWM2cjs.ba),r.current.next(h,T.controller.signal).then(v=>{u.current===T&&(u.current=null,i(p,k=>T.maps.reduce(($,oe)=>_chunkRYHSVWM2cjs.da.call(void 0, $,oe),_chunkRYHSVWM2cjs.ca.call(void 0, k,h,v))))},v=>{u.current===T&&i(p,()=>{throw v})})},[i]),R=_react.useCallback.call(void 0, (p,E)=>{let h=u.current;h!==null&&Object.is(h.key,p)&&h.maps.push(E),d(p,T=>_chunkRYHSVWM2cjs.da.call(void 0, T,E))},[d]);return{state:o,reload:b,refresh:f,loadMore:m,updateList:R}};var wa=e=>typeof e=="object"&&e!==null&&typeof e.then=="function",Pa= exports.usePendingPress =()=>{let[e,t]=_react.useState.call(void 0, null),n=_react.useRef.call(void 0, null),r=_react.useCallback.call(void 0, (a,o)=>{let s=o();if(!wa(s))return;let l=Symbol(a);n.current=l,t(a);let i=()=>{n.current===l&&(n.current=null,t(null))};s.then(i,i)},[]);return{pendingKey:e,press:r}};var Ca=(e,t,n)=>{let{state:r,reload:a,refresh:o,write:s}=Ie(e,t,n,_chunkRYHSVWM2cjs.Z,_chunkRYHSVWM2cjs._),l=_react.useCallback.call(void 0, (i,d)=>s(i,y=>_chunkRYHSVWM2cjs._.call(void 0, y,{ok:!0,value:d})),[s]);return{state:r,reload:a,refresh:o,put:l}};var ka=({testId:e,children:t})=>(g(),_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden","data-testid":e,children:t}));exports.ANNOUNCE_SETTLE_MS = ge; exports.AccessFailureNotice = rr; exports.AlertMessage = ce; exports.Breadcrumb = or; exports.Button = I; exports.COMPACT_ROW_PX = _chunkRYHSVWM2cjs.u; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkRYHSVWM2cjs.o; exports.CONTRAST_MINIMUM = _chunkXLOWKWIIcjs.f; exports.CONTRAST_PAIRS = _chunkXLOWKWIIcjs.i; exports.Card = We; exports.CardSection = ur; exports.CheckboxGroup = jr; exports.Cluster = Ge; exports.CodeBlock = pr; exports.ComparisonGrid = mr; exports.ConsoleUiRoot = Hn; exports.DataTable = Lr; exports.DescriptionList = Sr; exports.Dialog = Ar; exports.Disclosure = Or; exports.FIGURE_RING_REACH_PX = _chunkRYHSVWM2cjs.L; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkRYHSVWM2cjs.C; exports.FailureMessage = et; exports.Field = qr; exports.Figure = oo; exports.FigureEdge = so; exports.FigureNode = io; exports.FragmentLink = Xn; exports.HTTP_FORBIDDEN = _chunkRYHSVWM2cjs.U; exports.Heading = uo; exports.InlineChange = yo; exports.JobCard = To; exports.LATTICE_PX = _chunkRYHSVWM2cjs.q; exports.Link = Jn; exports.List = wo; exports.ListItem = Po; exports.LoadMore = Lo; exports.MORE_CONTRAST_MINIMUM = _chunkXLOWKWIIcjs.g; exports.MasterDetail = Mo; exports.Measured = Ne; exports.Meter = Io; exports.MetricTile = ua; exports.Notice = Kr; exports.PanelTabs = Ho; exports.PasswordInput = Vr; exports.Pill = rt; exports.ProgressBar = ot; exports.ROW_WITH_CONTROL_PX = _chunkRYHSVWM2cjs.t; exports.RadioGroup = Jr; exports.ResourceFailed = Uo; exports.RowButton = bn; exports.RowLink = Wo; exports.SegmentedControl = qo; exports.Select = zr; exports.SelectableList = zo; exports.Slider = jo; exports.Stack = Zn; exports.Stepper = Yo; exports.Switch = ea; exports.TARGET_PX = _chunkRYHSVWM2cjs.s; exports.TOKENS = _chunkRYHSVWM2cjs.v; exports.TONES = _chunkRYHSVWM2cjs.ia; exports.TONE_HUES = _chunkRYHSVWM2cjs.ga; exports.TONE_ROLES = _chunkRYHSVWM2cjs.ha; exports.Tabs = aa; exports.Text = P; exports.TextArea = Wr; exports.TextInput = Gr; exports.TileGrid = ca; exports.Toolbar = ya; exports.VisuallyHidden = ka; exports.ZonedTimeError = _chunkRYHSVWM2cjs.i; exports.beginPage = _chunkRYHSVWM2cjs.ba; exports.beginPagedReload = _chunkRYHSVWM2cjs.$; exports.beginReload = _chunkRYHSVWM2cjs.Z; exports.ceil8 = _chunkRYHSVWM2cjs.z; exports.ceilToLattice = _chunkRYHSVWM2cjs.r; exports.cellContentInlinePx = _chunkRYHSVWM2cjs.A; exports.comparisonAttributePx = _chunkRYHSVWM2cjs.D; exports.contrastRatio = _chunkXLOWKWIIcjs.e; exports.countSampleText = _chunkRYHSVWM2cjs.F; exports.cssVar = _chunkRYHSVWM2cjs.w; exports.figureBoxPlan = _chunkRYHSVWM2cjs.I; exports.figureDiscLabelPlan = _chunkRYHSVWM2cjs.K; exports.fillLabel = _chunkRYHSVWM2cjs.m; exports.fixedColumnPx = _chunkRYHSVWM2cjs.B; exports.flatMapOutcome = _chunkRYHSVWM2cjs.W; exports.formatByteSize = _chunkRYHSVWM2cjs.d; exports.formatCount = _chunkRYHSVWM2cjs.c; exports.formatInstant = _chunkRYHSVWM2cjs.l; exports.goldenSectionPx = _chunkRYHSVWM2cjs.N; exports.hexToSrgb = _chunkXLOWKWIIcjs.a; exports.instantSampleText = _chunkRYHSVWM2cjs.E; exports.isReadableText = _chunkRYHSVWM2cjs.h; exports.keepLastGood = _chunkRYHSVWM2cjs._; exports.lightDark = _chunkRYHSVWM2cjs.ea; exports.mapOutcome = _chunkRYHSVWM2cjs.V; exports.mapPagedList = _chunkRYHSVWM2cjs.da; exports.masterDetailPlan = _chunkRYHSVWM2cjs.P; exports.monoTextWidthEm = _chunkRYHSVWM2cjs.y; exports.placeholderRule = _chunkRYHSVWM2cjs.fa; exports.pxToRem = _chunkRYHSVWM2cjs.O; exports.readDecimalText = _chunkRYHSVWM2cjs.f; exports.readIntegerText = _chunkRYHSVWM2cjs.g; exports.reasonAside = _chunkRYHSVWM2cjs.n; exports.resolveConsoleUiLabels = _chunkRYHSVWM2cjs.p; exports.settleFirstPage = _chunkRYHSVWM2cjs.aa; exports.settlePage = _chunkRYHSVWM2cjs.ca; exports.spacedTextWidthEm = _chunkRYHSVWM2cjs.H; exports.tableFrameMinInlinePx = _chunkRYHSVWM2cjs.S; exports.tableMinInlinePx = _chunkRYHSVWM2cjs.R; exports.textWidthEm = _chunkRYHSVWM2cjs.x; exports.tileGridPlan = _chunkRYHSVWM2cjs.T; exports.tileMinInlinePx = _chunkRYHSVWM2cjs.G; exports.toOffsetIso = _chunkRYHSVWM2cjs.j; exports.toWallTime = _chunkRYHSVWM2cjs.k; exports.topmostModalOf = _chunkRYHSVWM2cjs.b; exports.useAccessFailure = On; exports.useAnnounce = Be; exports.useConsoleUi = C; exports.useEscapeToClose = dr; exports.useFailureOccurrence = ga; exports.useFocusRescue = le; exports.usePagedResource = Ta; exports.usePendingPress = Pa; exports.useResource = Ca;