@vokril/ui-solid 0.27.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +19 -1
- package/dist/{AttributeGrid-XTVaiwLe.js → AttributeGrid-CASILa4u.js} +3 -3
- package/dist/{AttributeGrid-Qzt5LYnu.cjs → AttributeGrid-eND8YDby.cjs} +1 -1
- package/dist/{Button-U95Tz8F5.cjs → Button-Bb68ymNP.cjs} +1 -1
- package/dist/{Button-qtxB2SYf.js → Button-D-T0tyGF.js} +1 -1
- package/dist/CommandPalette-5FQRgPG9.cjs +2 -0
- package/dist/CommandPalette-Cj618AOz.js +4017 -0
- package/dist/{CopyButton-CsM8UeX5.cjs → CopyButton-B5gS2ft3.cjs} +1 -1
- package/dist/{CopyButton-NfxWzVHT.js → CopyButton-g-WSiBDZ.js} +1 -1
- package/dist/{DateRangePicker-C8IVJRT2.js → DateRangePicker-CJD9ADgB.js} +3 -3
- package/dist/{DateRangePicker-BKHxyHL4.cjs → DateRangePicker-Frc0HVxp.cjs} +1 -1
- package/dist/{GuidedTour-B61cbsdy.cjs → GuidedTour-B6q7lYhn.cjs} +1 -1
- package/dist/{GuidedTour-Dj41FCdE.js → GuidedTour-CFCvRJN4.js} +3 -3
- package/dist/{IconPicker-BZCQG8SO.cjs → IconPicker-CIbJb1ei.cjs} +1 -1
- package/dist/{IconPicker-DC9E35Ou.js → IconPicker-DYqNi5ud.js} +3 -3
- package/dist/{Modal-CaurOG_K.cjs → Modal-CY6ePolt.cjs} +1 -1
- package/dist/{Modal-DJpQqqTJ.js → Modal-NzZzHSwb.js} +2 -2
- package/dist/{PageSkeleton-DICmahMs.cjs → PageSkeleton-BPbb28-H.cjs} +1 -1
- package/dist/{PageSkeleton-C0eVQO20.js → PageSkeleton-CLnJO6uD.js} +3 -3
- package/dist/{SearchableSelect-DayP1Qs6.js → SearchableSelect-BvCm4enQ.js} +2 -2
- package/dist/{SearchableSelect-ClrAX2hK.cjs → SearchableSelect-CVqdVMOC.cjs} +1 -1
- package/dist/StatusBarNotificationBell-CJ3HuhRu.cjs +50 -0
- package/dist/{StatusBarNotificationBell-BRnCKU72.js → StatusBarNotificationBell-yryWdwyX.js} +4324 -3998
- package/dist/{Stepper-DTuchuOX.cjs → Stepper-Ci5JpLbS.cjs} +1 -1
- package/dist/{Stepper-aiuAdbkl.js → Stepper-D9i1Xclm.js} +1 -1
- package/dist/{TimeSeriesChart-SHx_cp8y.js → TimeSeriesChart-DOwi2lJs.js} +1 -1
- package/dist/{TimeSeriesChart-CvU0lxar.cjs → TimeSeriesChart-huvheefm.cjs} +1 -1
- package/dist/{ToggleButton-BcHNAGPy.cjs → ToggleButton-BFWh1_o5.cjs} +1 -1
- package/dist/{ToggleButton-BhP17bvW.js → ToggleButton-CFM8P3JY.js} +4 -4
- package/dist/_internal/contract/browser/workspace.d.cts +4 -0
- package/dist/_internal/contract/browser/workspace.d.ts +4 -0
- package/dist/_internal/contract/notification.d.cts +63 -4
- package/dist/_internal/contract/notification.d.ts +63 -4
- package/dist/_internal/contract/notificationCatalog.d.cts +7 -1
- package/dist/_internal/contract/notificationCatalog.d.ts +7 -1
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/{createDialogShellFocus-Vv3hhW-I.js → createDialogShellFocus-B4piXDU4.js} +1 -1
- package/dist/{createDialogShellFocus-CsrZ2GDZ.cjs → createDialogShellFocus-CJaw9-B9.cjs} +1 -1
- package/dist/{createResizableSidebar-DnHgvr7P.js → createResizableSidebar-BDUlX9-G.js} +3 -3
- package/dist/{createResizableSidebar-CeksJQ9Q.cjs → createResizableSidebar-BVJBU2kP.cjs} +1 -1
- package/dist/de-BqFZ0Ac8.cjs +1 -0
- package/dist/{server/de-CEltsqV5.js → de-q3NXnC0J.js} +27 -25
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +1 -1
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +2 -2
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +7 -7
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.js +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/messageKeys.d.cts +1 -1
- package/dist/i18n/messageKeys.d.ts +1 -1
- package/dist/{i18n-DW9kcu0G.js → i18n-CBlUGOyu.js} +2 -2
- package/dist/{server/i18n-DZ0JlZal.cjs → i18n-D3s-a2a0.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +199 -196
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/NotificationItem.d.cts +15 -1
- package/dist/notifications/NotificationItem.d.ts +15 -1
- package/dist/notifications/RunningProgressCards.d.cts +20 -0
- package/dist/notifications/RunningProgressCards.d.ts +20 -0
- package/dist/notifications/StatusBarNotificationBell.d.cts +17 -5
- package/dist/notifications/StatusBarNotificationBell.d.ts +17 -5
- package/dist/notifications/createNotificationPreviewRuntime.d.cts +2 -2
- package/dist/notifications/createNotificationPreviewRuntime.d.ts +2 -2
- package/dist/notifications/dismissableToastIds.d.cts +4 -1
- package/dist/notifications/dismissableToastIds.d.ts +4 -1
- package/dist/notifications/fireNotification.d.cts +33 -1
- package/dist/notifications/fireNotification.d.ts +33 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.js +43 -40
- package/dist/notifications/nativeEngine.d.cts +88 -5
- package/dist/notifications/nativeEngine.d.ts +88 -5
- package/dist/notifications/notificationCardServices.d.cts +4 -1
- package/dist/notifications/notificationCardServices.d.ts +4 -1
- package/dist/notifications/notificationCommands.d.cts +16 -4
- package/dist/notifications/notificationCommands.d.ts +16 -4
- package/dist/notifications/notificationOverlaySnapshot.d.cts +1 -0
- package/dist/notifications/notificationOverlaySnapshot.d.ts +1 -0
- package/dist/notifications/notificationService.d.cts +26 -0
- package/dist/notifications/notificationService.d.ts +26 -0
- package/dist/notifications/quietHours.d.cts +10 -0
- package/dist/notifications/quietHours.d.ts +10 -0
- package/dist/notifications/toast.d.cts +32 -1
- package/dist/notifications/toast.d.ts +32 -1
- package/dist/overlay/ConfirmDialog.d.cts +68 -2
- package/dist/overlay/ConfirmDialog.d.ts +68 -2
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +4 -4
- package/dist/{rowSource-C43bEUD4.js → rowSource-D__7o4h0.js} +1 -1
- package/dist/{rowSource-Dg-jndEu.cjs → rowSource-DiwTu_r8.cjs} +1 -1
- package/dist/server/{AttributeGrid-C_CvCXpC.cjs → AttributeGrid-B7sb3btp.cjs} +1 -1
- package/dist/server/{AttributeGrid-D8QYVZDq.js → AttributeGrid-CMi-UtWb.js} +3 -3
- package/dist/server/{Button-VKl-_GaO.cjs → Button-0AXWRw9Q.cjs} +1 -1
- package/dist/server/{Button-BPNNFcHc.js → Button-3yNrnn4P.js} +1 -1
- package/dist/server/{CommandPalette-COVjWlx9.js → CommandPalette-CozogFlk.js} +980 -947
- package/dist/server/CommandPalette-DQK6N98N.cjs +1 -0
- package/dist/server/{CopyButton-HDffWzaN.js → CopyButton-B6xd9Z6j.js} +1 -1
- package/dist/server/{CopyButton-rWDnbTBF.cjs → CopyButton-D8IN6Vnd.cjs} +1 -1
- package/dist/server/{DateRangePicker-Dl3zr-PD.js → DateRangePicker-C35q8BTw.js} +2 -2
- package/dist/server/{DateRangePicker-Dq0HGz27.cjs → DateRangePicker-KLZzyuPJ.cjs} +1 -1
- package/dist/server/{GuidedTour-BoPGRyX5.cjs → GuidedTour-DfV0yzqh.cjs} +1 -1
- package/dist/server/{GuidedTour-CIlHyRcR.js → GuidedTour-DmLbBttx.js} +3 -3
- package/dist/server/{IconPicker-BDS92veL.cjs → IconPicker-B1soopAp.cjs} +1 -1
- package/dist/server/{IconPicker-CZxYKJOT.js → IconPicker-B4aXspLw.js} +4 -4
- package/dist/server/{Modal-j54-C2Md.js → Modal-BheFQLs1.js} +2 -2
- package/dist/server/{Modal-CtJFoR96.cjs → Modal-BswxV8Pn.cjs} +1 -1
- package/dist/server/{PageSkeleton-B0V43uDV.cjs → PageSkeleton-DBo7hQq-.cjs} +1 -1
- package/dist/server/{PageSkeleton-BfGfda9G.js → PageSkeleton-DoxlE_bD.js} +3 -3
- package/dist/server/{SearchableSelect-ClQzcYdL.cjs → SearchableSelect-09ECcDlB.cjs} +1 -1
- package/dist/server/{SearchableSelect-DtcMC7Xu.js → SearchableSelect-vjhS4c-H.js} +2 -2
- package/dist/server/{StatusBarNotificationBell-FFpOkyUk.js → StatusBarNotificationBell-DdAdsduo.js} +4340 -4011
- package/dist/server/StatusBarNotificationBell-Z2LmIkM1.cjs +49 -0
- package/dist/server/{Stepper-CCEItuZb.cjs → Stepper-DxNrskdq.cjs} +1 -1
- package/dist/server/{Stepper-B7wf8h9G.js → Stepper-n5f9r-ye.js} +1 -1
- package/dist/server/{TimeSeriesChart-TsaZS7YU.cjs → TimeSeriesChart-BQVXUFoj.cjs} +1 -1
- package/dist/server/{TimeSeriesChart-DjNQiCn_.js → TimeSeriesChart-PAb95s6x.js} +1 -1
- package/dist/server/{ToggleButton-CHaIvApv.js → ToggleButton-FywO2CCI.js} +3 -3
- package/dist/server/{ToggleButton-D6Tux9wG.cjs → ToggleButton-TE3Xf2yD.cjs} +1 -1
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{createResizableSidebar-Dn9UMUf_.js → createResizableSidebar-BImbKlLe.js} +3 -3
- package/dist/server/{createResizableSidebar-B0NDaq7D.cjs → createResizableSidebar-GFgZIj-5.cjs} +1 -1
- package/dist/server/de-BqFZ0Ac8.cjs +1 -0
- package/dist/{de-CEltsqV5.js → server/de-q3NXnC0J.js} +27 -25
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +1 -1
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +2 -2
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +6 -6
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +1 -1
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/server/{i18n-DW9kcu0G.js → i18n-CBlUGOyu.js} +2 -2
- package/dist/{i18n-DZ0JlZal.cjs → server/i18n-D3s-a2a0.cjs} +1 -1
- package/dist/server/{index-BfR3Xipt.cjs → index-2mQPVEDR.cjs} +1 -1
- package/dist/server/{index-Wv18Fcu8.js → index-UIjsx3oJ.js} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +143 -140
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +43 -40
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +3 -3
- package/dist/server/{rowSource-CYYdnUFl.js → rowSource-D-wcDmFU.js} +1 -1
- package/dist/server/{rowSource-DoBeEg9N.cjs → rowSource-DltiY0o3.cjs} +1 -1
- package/dist/server/{tr-CxuAFkCi.js → tr-C_dUz00P.js} +32 -30
- package/dist/server/tr-D7bwe7tl.cjs +1 -0
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/solid/i18n/locales/de.json +2 -0
- package/dist/solid/i18n/locales/tr.json +2 -0
- package/dist/solid/notifications/NotificationHost.jsx +5 -4
- package/dist/solid/notifications/NotificationItem.jsx +40 -15
- package/dist/solid/notifications/NotificationPanel.jsx +8 -3
- package/dist/solid/notifications/NotificationsCenter.jsx +4 -1
- package/dist/solid/notifications/RunningProgressCards.jsx +29 -0
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +44 -17
- package/dist/solid/notifications/StatusBarNotificationBell.module.css.js +1 -0
- package/dist/solid/notifications/catalogAdapter.js +2 -1
- package/dist/solid/notifications/createNotificationPreviewRuntime.js +49 -35
- package/dist/solid/notifications/fireNotification.js +53 -27
- package/dist/solid/notifications/index.js +1 -1
- package/dist/solid/notifications/nativeEngine.js +129 -26
- package/dist/solid/notifications/notificationCardServices.js +1 -1
- package/dist/solid/notifications/notificationOverlaySnapshot.js +2 -0
- package/dist/solid/notifications/notificationOverlaySync.js +1 -0
- package/dist/solid/notifications/notificationService.js +46 -0
- package/dist/solid/notifications/quietHours.js +18 -0
- package/dist/solid/notifications/toast.js +30 -11
- package/dist/solid/overlay/ConfirmDialog.jsx +57 -17
- package/dist/solid/overlay/ConfirmDialog.module.css.js +1 -0
- package/dist/style.css +1 -1
- package/dist/{tr-CxuAFkCi.js → tr-C_dUz00P.js} +32 -30
- package/dist/tr-D7bwe7tl.cjs +1 -0
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-Bf8flX2t.cjs +0 -2
- package/dist/CommandPalette-CoIdCmZ0.js +0 -3977
- package/dist/StatusBarNotificationBell-B4v__j6s.cjs +0 -50
- package/dist/de-DRobPEJV.cjs +0 -1
- package/dist/server/CommandPalette-C_9Z8gVc.cjs +0 -1
- package/dist/server/StatusBarNotificationBell-D9oc6WVf.cjs +0 -49
- package/dist/server/de-DRobPEJV.cjs +0 -1
- package/dist/server/tr-BDbiY5YD.cjs +0 -1
- package/dist/tr-BDbiY5YD.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to `@vokril/ui-solid` are listed here. Versions follow
|
|
|
5
5
|
contain breaking changes. From 0.1.1 on, entries are written by Changesets
|
|
6
6
|
(`npm run release:version`) above the previous release.
|
|
7
7
|
|
|
8
|
+
## 0.28.0
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- The status bar bell hints at a progress that runs out of sight, as the reference's does (`notificationsStatus.ts:72-102`, `:153-182`): while neither its notification center nor a toast is showing in its window, the running progress cards — one the user or a silencing setting sent to the notification center is what the hint is for — put a dot on the bell, under do not disturb too, and its title and accessible name say how many: "Notifications ({count} in progress)", with a do-not-disturb variant (Turkish and German included). A toast counts only when the bell's window paints the realm's toasts — the window that owns the display, the test `NotificationHost` paints by —, so the bell registers its window with `KitHost.displayOwner` like the host and is mounted under the root's `HostWindowProvider`. An unread count keeps its badge in the dot's place. While its popover is open the bell is named after what a click does, "Hide notifications", as the reference's tooltip (`notificationsStatus.ts:154-156`); do not disturb names itself first, as there. `StatusBarNotificationBell` takes `onOpenChange(open)` (`StatusBarNotificationBellProps`), called whenever its popover's center opens or closes — also when the bell leaves the page while open —, so a host feeds it to `NotificationHost`'s `centerOpen` and the toast stack hides while the popover lists the same cards; until now the popover and the stack showed a running card twice.
|
|
13
|
+
|
|
14
|
+
Host note: the two new labels, "Notifications ({count} in progress)" and "Notifications (Do Not Disturb on, {count} in progress)", are message keys the host's dictionary must hold — the kit's key list is cut from it and is regenerated once it does.
|
|
15
|
+
- A confirmation can carry a checkbox (reference `IConfirmation.checkbox` / `IConfirmationResult.checkboxChecked`): `ConfirmOptions.checkbox` and `ConfirmDialogProps.checkbox` take a `ConfirmCheckbox` (`{ label, checked? }`), drawn under the message and reset to `checked` on every opening. Its state comes back with the answer: `onConfirm` and `onCancel` receive a `ConfirmCheckboxResult` (`{ checkboxChecked? }`, present only when the question had a checkbox, whichever button answered) — a callback that takes no argument still fits. `ConfirmationResult` (`{ confirmed, checkboxChecked? }`) is the answer a host's confirm verb gives a caller that asked with a checkbox; the host keeps its boolean verb for the callers without one. The two verbs are typed apart: `ConfirmCheckboxOptions` (`checkbox` required) for the verb that answers with a `ConfirmationResult`, `ConfirmBooleanOptions` (`checkbox?: never`) for the verb that answers `true` / `false`, so a checkbox cannot reach the boolean verb and lose its state there. One opening of the dialog is one question: the checkbox, like the countdown and the first focus, starts over when `open` turns true, so a host that asks its questions one after another closes the dialog between them or mounts one dialog per question.
|
|
16
|
+
- A confirmation can be sticky: `ConfirmDialog` and `ConfirmOptions` take `sticky`, a question that cannot be waved away (reference `IProgressDialogOptions.sticky`, which the shutdown join uses: "do not allow to dismiss"). The cancel button is not drawn, and Escape and a click on the backdrop do nothing: a press on the backdrop leaves the focus in the dialog, so Escape and the Tab ring stay the dialog's, and Escape is kept from reaching anything behind the modal wherever the focus is. Only the confirm button answers it, or the host takes the question back. A sticky danger question gives the first focus to the dialog itself rather than to its destructive button, and the dialog is read with its message (`aria-describedby`). `Modal` already offers the same through `closeDisabled` and `hideClose`.
|
|
17
|
+
- A notification can stay inside the app: a catalog definition's `delivery` takes `'in-app-only'` (`NotificationDelivery` is now `'in-app' | 'in-app-only' | 'os-only'`), and the raw verbs take `inAppOnly` on `ToastCommonOptions`. Such a notification gets its toast and its timeline entry under the same settings as any other, but none of the external channels — no OS notification, webhook or email digest, which an `in-app` message reaches whenever the user turned them on. It is for a notice that means nothing outside the app, such as a connection that came back on its own while the loss itself was only ever a progress (a progress never leaves the app). A progress definition may use either in-app delivery. The preview runtime's `NotificationPreviewDelivery.channel` is now a `NotificationDelivery`, and a progress reports its definition's delivery there.
|
|
18
|
+
- A notification's handle tells where its card is (reference `INotificationHandle.onDidChangeVisibility` / `onDidClose`): `ToastProgressHandle.state()` and `onDidChangeState`, and the same members on the engine's `NotificationHandle`, report the new `NotificationCardState` — `open` while the card is live (on the toast stack, or a running progress the user or a silencing setting sent to the notification center), `suppressed` when the notification settings gave it no place on the screen (its issue was turned down — "don't show again", "remind me later" —, it is an acknowledgment the master switch silences, a silencing setting took the finished card back, or its progress ended under one), `dismissed` when the user closed it (its close button, Escape, Delete, a gear-menu choice — a running progress only when the choice turned its notification down), `closed` when anything else did (its handle, the stack by id, its timer, or one of its actions that does not keep the card — an action answers the card, it does not send it away: the reference shows a progress whose button was chosen again in its next phase and drops it only after a cancel, `workbench/contrib/remote/browser/remote.ts:824-833`). The event fires once, when the card ends: leaving the toast stack for the notification center is no end. A caller that shows its progress again later can now tell a card the user closed from one the settings kept away. To tell them apart the stack has two closing verbs: `close(id)` stays the program's close, as before, and the new `dismiss(id)` is the user's — the realm's card verbs (`NotificationItemController.close`), the native overlay's close and the host's Escape and Delete use it, while an action and the host's primary-action command close as the program. The progress handle's own `dismiss()` is the program's close too (`closed`), not the stack's verb of the same name. The engine gains `suppress(silenced)`, which takes back from the toast stack the cards a predicate picks — a running progress goes to the notification center, still `open`; the others report `suppressed` —, and `reject(id)`, which ends the card under an id whose new issue got no card — the user turned it down, or it is an acknowledgment the master switch silences — (`suppressed`, a running progress too: nothing drives it any more); an acknowledgment on the screen stays, as it is answered, never taken away.
|
|
19
|
+
|
|
20
|
+
**Breaking:** a handle written outside the kit (a test double) adds `state` and `onDidChangeState`, and a stack written outside it adds `dismiss`.
|
|
21
|
+
- The native overlay's snapshot says whether the cards' gear menu offers "remind me later": `NotificationOverlayState.remindLaterEnabled`, from the same notification setting the DOM card's menu reads (`remindLaterEnabled`) and sent again when it changes. The overlay's realm reads no settings, so a host that drew the overlay's cards had to leave the entries out; it can now pass the snapshot's value to its `NotificationItemShell.remindLaterEnabled`.
|
|
22
|
+
- A progress toast with an explicit `id` addresses its card, so a caller no longer closes the card itself before issuing again. An issue that is shown updates the card under its id in place, as before: its age, place and focus stay — a card the notification center held comes back on the toast stack, newest. An issue a setting silences (do not disturb, quiet hours, a muted source …) keeps the card in the notification center, or sends it there, its handles `open` and the new handle driving it, instead of leaving the old card on the screen with nothing driving it. An issue the user turned down on a card ("don't show again", "remind me later") ends the card under its id — its handles report `suppressed`, a running progress's too —, since its program now holds the issue's handle, which drives nothing; so does an acknowledgment the master switch silences, except that an acknowledgment already on the screen stays there, as it is answered, never taken away. The isolated preview runtime has no center: its issue kept off the stack takes back the card shown under its id (`suppressed`). The in-place update is the kit's own semantics, not the reference's: the reference's model closes an equal notification and adds the new one on top, with a new age and place (`workbench/common/notifications.ts:215-232`), and never takes a progress for an equal one.
|
|
23
|
+
- "Remind me later" on a progress toast silences the progress again: the card carries the key of the text it was issued with (`NotificationInput.remindKey`, set once by the progress verb from the source and the initial text), and the card's menu prefers it over a key derived from the live title — derived from a countdown or a step label it matched no later issue and silenced nothing. An explicit `dontShowAgainKey` still wins, and the progress now forwards it to the card (`neverShowAgainKey`). The native overlay's copy of the card carries the same key (`NotificationOverlayItem.remindKey`).
|
|
24
|
+
- **Breaking:** a running progress is ended by its operation, not by the user or a setting, as in the reference — in 0.27.1 the user could close it. Its card has no close button while the progress runs (`notificationsViewer.ts:492-495`), Delete leaves it where it is (`notificationsCommands.ts:138-141`), and Escape — like every close of the user's, the stack's `dismiss` — does not end it but only takes it off the toast stack (`notificationsToasts.ts:481-489` hides the toasts and closes none). A setting that silences it (do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only") does the same instead of taking it back, and a progress issued while one is on opens its card there in the first place: the reference keeps a silenced progress in its center and shows no toast for it (`notificationsToasts.ts:143-153`, `workbench/services/progress/browser/progressService.ts:81-91`). The card lives on, its handles still `open` and every `update` still reaching it, and the notification centers draw it: `NotificationsCenter` and `NotificationPanel` list the realm's running progress cards above their records — the stack's own card with the realm's verbs, outside the panel's filters and untouched by "clear all" (the reference's `clearAll` spares a progress too). Drawing it presumes a mounted center: in a window that mounts none, a card sent off the toast stack is out of reach until its progress ends. The card comes back on the toast stack when its progress ends (`success`, `fail` — the outcome is news) or an issue under its id is shown, and it takes the newest place there, so the visible cap does not clip it under the toasts that came meanwhile; an outcome that comes while a setting still silences it ends the card `suppressed` instead, the timeline keeping its record. Its program can still close it. The one close of the user's that ends a running card is turning its notification down on it: the gear menu's "don't show again" and "remind me later", on the stack's card or on a center's copy, end it `dismissed`, as the reference's "Don't Show Again" closes its notification (`workbench/services/notification/common/notificationService.ts:207-217`) and a chosen button expires a running progress (`notificationsViewer.ts:519-529`) — sent to the center, its outcome would come back as a toast of a notification the user turned down; Escape stays a hide. New in the API: `NotificationItem.hidden` (the card is off the toast stack while it runs), `NativeNotificationEngineDependencies.isTurnedDown` (whether the user turned a card's notification down — the realm's service answers it from the keys the gear menu writes; unset, no card is), the pure `isProgressRunning(item)` (a developer preview's progress has no operation behind it and closes like any card — the catalog's preview toast and every card of `createNotificationPreviewRuntime` are `isolated`) and `isOnToastStack(item)` (the partition the host paints and the engine clips to the visible cap — an acknowledgment no longer counts against the cap of the stack it is not on), and `NotificationItem`'s `inCenter` (a center's copy carries neither the stack's DOM id nor a live region, and is not read to a screen reader again).
|
|
25
|
+
- A progress toast's buttons change in place: `ToastProgressHandle.updateActions(actions)` (reference `INotificationHandle.updateActions`) takes the new `ToastActionOptions` — the primary `action`, then `actions` — and replaces the card's buttons; `{}` removes them. The card keeps its place in the stack, its age, its focus and its expanded state, and is not read to a screen reader again, so a caller whose buttons follow a phase ("reconnect now" only while waiting) no longer re-issues the progress. `success` and `fail` keep the buttons.
|
|
26
|
+
|
|
27
|
+
**Breaking:** a handle written outside the kit (a test double) adds `updateActions`.
|
|
28
|
+
- A notification setting that silences takes back the cards already shown. When do not disturb, a source mute, the master switch, "urgent to the center only" or quiet hours change so that a shown card would not be shown if it were issued now, the realm's notification service takes it back from the toast stack — the same decision an issue gets, without the per-key "don't show again" and "remind me later" choices, which are made on the card and close it. A running progress is not the settings' to end: it goes to the notification center, its handles still `open`, as the reference removes the toast and keeps the notification in its center (`notificationsToasts.ts:143-153`); the other cards close, their handles report `suppressed` and the timeline keeps their records. An acknowledgment stays (it is answered, never taken away), and so does a developer preview. One question answers for the service: the engine takes it as `NativeNotificationEngineDependencies.isSilenced`, opens a progress issued under it in the notification center, and ends a progress whose outcome comes under it (`suppressed`) instead of bringing the card back on the toast stack. The reference reacts to the same moment under a policy the kit does not share: its do not disturb (the error-only filter) hides every toast, urgent ones and errors too, and a source's filter spares that source's errors and urgent cards. The kit follows its own issue decision: do not disturb and quiet hours spare urgent cards (unless `dndBlocksUrgent` / `quietHoursBlocksUrgent`), and a muted source loses its errors too. Quiet hours are scheduled do-not-disturb but no settings change marks the moment they begin, so the service also watches that moment while the stack has cards, through the new pure `nextQuietHoursStart(settings, now)` — it asks `isInQuietHours` at each candidate moment, so the two cannot disagree — and reads a long wait again every hour.
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- A confirmation's message is its accessible description: `ConfirmDialog` points `aria-describedby` at the message — after the place row when there is one, which was the only description before — and `SaveDiscardDialog` at its message, so a screen reader reads what the alertdialog asks with its title, also when the dialog itself takes the first focus. When a press has left the focus on `ConfirmDialog`'s backdrop, Escape stops there as it does in the dialog — nothing behind the modal takes it — and Tab goes back into the dialog.
|
|
33
|
+
- A progress toast shows what its options and its catalog payload carry instead of dropping it: `action` and `actions` become the card's buttons (a click counts for the source and, unless the action keeps the card, closes it — a running progress too, as in the reference — as the program's close: its handles report `closed`), and the body (`subtitle` / `description`), `markdown`, `icon`, `announce`, `defaultRoute` (with the source's page when none is given), `duration` (the fade after `success`, as the handle promised) and `dontShowAgainKey` reach the card. Behaviour note: `duration` was ignored before, so a caller that passes `0` or `Infinity` now keeps the success card until it is closed — the sticky meaning those values have on every other toast — instead of the success fade. The developer catalog's preview painted these while the real toast dropped them; the message verbs and the progress now build the card through one mapping. The isolated preview runtime's progress paints the same, its buttons inert; like the realm's, a preview card's button closes its card as the program's close, and `expireOnAction: false` now keeps it. A progress's buttons are live only: the timeline records none of them.
|
|
34
|
+
|
|
8
35
|
## 0.27.1
|
|
9
36
|
|
|
10
37
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -60,7 +60,25 @@ instances, see [Embedding in an application](#embedding-in-an-application)) and
|
|
|
60
60
|
`HostWindowProvider` (the window the root renders into); neither has a default, and a component
|
|
61
61
|
rendered without them throws. `NotificationHost` paints the realm's toasts; mount it once per
|
|
62
62
|
window, near the root. `centerOpen` tells it when the application's notification center is
|
|
63
|
-
showing (the stack hides meanwhile); a window without a center
|
|
63
|
+
showing (the stack hides meanwhile, the center lists the same cards); a window without a center
|
|
64
|
+
passes `() => false`. `StatusBarNotificationBell` opens the center in a popover and says when
|
|
65
|
+
through `onOpenChange`:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
const [centerOpen, setCenterOpen] = createSignal(false);
|
|
69
|
+
|
|
70
|
+
// in the status bar
|
|
71
|
+
<StatusBarNotificationBell onOpenChange={setCenterOpen} />;
|
|
72
|
+
// near the root, as above
|
|
73
|
+
<NotificationHost centerOpen={centerOpen} />;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
A running progress is ended by its operation, not by the user or a setting: Escape, do not
|
|
77
|
+
disturb and the like only send it off the toast stack into the notification center
|
|
78
|
+
(`NotificationsCenter`, which the bell opens, or `NotificationPanel`). Only turning its
|
|
79
|
+
notification down on the card ("don't show again", "remind me later") ends it. Mount a center in
|
|
80
|
+
every window that shows progress: the quickstart above mounts none, so there a progress sent off
|
|
81
|
+
the stack is out of reach until its operation ends.
|
|
64
82
|
|
|
65
83
|
## Stylesheets
|
|
66
84
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { insert as l, createComponent as c, effect as _, className as i, template as B, mergeProps as P, memo as T } from "solid-js/web";
|
|
2
2
|
import { createMemo as $, onMount as y, Show as w, For as L } from "solid-js";
|
|
3
|
-
import { S as O } from "./SearchableSelect-
|
|
4
|
-
import { B as V } from "./Button-
|
|
5
|
-
import { t as s } from "./i18n-
|
|
3
|
+
import { S as O } from "./SearchableSelect-BvCm4enQ.js";
|
|
4
|
+
import { B as V } from "./Button-D-T0tyGF.js";
|
|
5
|
+
import { t as s } from "./i18n-CBlUGOyu.js";
|
|
6
6
|
import { I as A, P as z } from "./Input-DkPhsdfk.js";
|
|
7
7
|
import { VpClose as M, VpSearch as H, VpCheck as x } from "@vokril/icons";
|
|
8
8
|
import { i as R } from "./iconScale.module-C3O0bxfp.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),v=require("solid-js"),T=require("./SearchableSelect-
|
|
1
|
+
"use strict";const t=require("solid-js/web"),v=require("solid-js"),T=require("./SearchableSelect-CVqdVMOC.cjs"),I=require("./Button-Bb68ymNP.cjs"),c=require("./i18n-D3s-a2a0.cjs"),S=require("./Input-CZruORyy.cjs"),k=require("@vokril/icons"),V=require("./iconScale.module-CzmKG1rf.cjs"),z=require("./keys-GMxY2wcl.cjs"),R=require("./bugIndicatingError-D2X5Hfgg.cjs");function w(e,r){return e<=0?r:String(e)}const P="vk_paginationRow_hg8fj",$="vk_paginationMeta_rPi8N",y="vk_paginationActions_gD2Fz",L="vk_paginationLabel_9x9Ah",O="vk_paginationSelect_h5BcT",N="vk_paginationPage_CYJRF",u={paginationRow:P,paginationMeta:$,paginationActions:y,paginationLabel:L,paginationSelect:O,paginationPage:N};var A=t.template("<div><span></span><div><label></label><span> / ");function M(e){const r=v.createMemo(()=>{const a=c.t("Unlimited");return e.pageSizeOptions.map(n=>({value:String(n),label:w(n,a)}))});return(()=>{var a=A(),n=a.firstChild,i=n.nextSibling,s=i.firstChild,g=s.nextSibling,_=g.firstChild;return t.insert(n,()=>c.t("Showing {shown} of {total} items",{shown:e.shownCount(),total:e.totalCount()})),t.insert(s,()=>c.t("Page size"),null),t.insert(s,t.createComponent(T.SearchableSelect,{size:"sm",get class(){return u.paginationSelect},get value(){return String(e.pageSize())},get options(){return r()},onChange:l=>{e.onPageSizeChange(Number(l))},searchable:!1,get ariaLabel(){return c.t("Page size")}}),null),t.insert(i,t.createComponent(I.Button,{size:"sm",variant:"secondary",get disabled(){return e.page()<=1},onClick:()=>e.onPageChange(Math.max(1,e.page()-1)),get children(){return c.t("Previous")}}),g),t.insert(g,()=>e.page(),_),t.insert(g,()=>e.totalPages(),null),t.insert(i,t.createComponent(I.Button,{size:"sm",variant:"secondary",get disabled(){return e.page()>=e.totalPages()},onClick:()=>e.onPageChange(Math.min(e.totalPages(),e.page()+1)),get children(){return c.t("Next")}}),null),t.effect(l=>{var h=u.paginationRow,m=u.paginationMeta,C=u.paginationActions,f=u.paginationLabel,p=u.paginationPage;return h!==l.e&&t.className(a,l.e=h),m!==l.t&&t.className(n,l.t=m),C!==l.a&&t.className(i,l.a=C),f!==l.o&&t.className(s,l.o=f),p!==l.i&&t.className(g,l.i=p),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()}const q="vk_toolbar_LSRmU",H="vk_toolbarHorizontal_qHM-8",x="vk_toolbarViewClip_Q893H",F="vk_toolbarScrollRoot_aYbLg",E="vk_toolbarScrollViewport_qBzjd",J="vk_toolbarScrollTrack_Tp8TN",X="vk_segmentedCapsule_k9EBy",K="vk_toolbarBtn_CcyXF",U="vk_toolbarBtnActive_UgTBV",j="vk_toolbarBtnIconOnly_BlE-b",D="vk_toolbarHorizontalBottom_qLzhJ",G="vk_toolbarVertical_EjHi2",Q="vk_toolbarVerticalRight_DBgEa",Y="vk_toolbarScrollRootVertical_VGLRy",Z="vk_toolbarScrollViewportVertical_RLF5g",W="vk_toolbarScrollTrackVertical_c1rBF",tt="vk_toolbarSettingsBtn_XXfMz",et="vk_toolbarIcon_0FvlL",ot="vk_toolbarSpacer_N3TbQ",at="vk_sortBadgePill_nVrIk",rt="vk_sortBadgeBtn_Is9PS",nt="vk_sortBadgeIcon_kw8oa",lt="vk_sortBadgeLabel_l-p33",ct="vk_sortBadgeClearBtn_ioOaP",it="vk_sortBadgeClearIcon_0e6Kd",st="vk_filterInputContainer_kegUv",bt="vk_filterSearchIcon_gI0m2",gt="vk_filterInput_bX9xM",ut="vk_filterClearBtn_WerJL",vt="vk_filterClearIcon_7fuAJ",o={toolbar:q,toolbarHorizontal:H,toolbarViewClip:x,toolbarScrollRoot:F,toolbarScrollViewport:E,toolbarScrollTrack:J,segmentedCapsule:X,toolbarBtn:K,toolbarBtnActive:U,toolbarBtnIconOnly:j,toolbarHorizontalBottom:D,toolbarVertical:G,toolbarVerticalRight:Q,toolbarScrollRootVertical:Y,toolbarScrollViewportVertical:Z,toolbarScrollTrackVertical:W,toolbarSettingsBtn:tt,toolbarIcon:et,toolbarSpacer:ot,sortBadgePill:at,sortBadgeBtn:rt,sortBadgeIcon:nt,sortBadgeLabel:lt,sortBadgeClearBtn:ct,sortBadgeClearIcon:it,filterInputContainer:st,filterSearchIcon:bt,filterInput:gt,filterClearBtn:ut,filterClearIcon:vt},_t="vk_searchRow_2pwXX",dt="vk_searchInput_PbDtG",Bt="vk_clearBtn_upa-E",d={searchRow:_t,searchInput:dt,clearBtn:Bt};var St=t.template("<div>");function kt(e){return t.createComponent(S.PressableSurface,{type:"button",get class(){return`${o.toolbarSettingsBtn} ${e.active?o.toolbarBtnActive:""}`},get onClick(){return e.onToggle},get"aria-pressed"(){return e.active},get"aria-label"(){return c.t("Search")},get title(){return c.t("Search")},get children(){return t.createComponent(k.VpSearch,{get class(){return o.toolbarIcon},"aria-hidden":"true"})}})}function ht(e){let r;return v.onMount(()=>r==null?void 0:r.focus()),(()=>{var a=St();return t.insert(a,t.createComponent(S.Input,t.mergeProps({ref(n){var i=r;typeof i=="function"?i(n):r=n},get class(){return d.searchInput},type:"search",size:"sm",get value(){return e.value},onInput:n=>e.onInput(n.currentTarget.value),onKeyDown:n=>{z.isKey(n,"Escape")&&e.onClose()},get placeholder(){return e.placeholder??c.t("Search…")}},()=>e.disabled!==void 0?{disabled:e.disabled}:{})),null),t.insert(a,t.createComponent(v.Show,{get when(){return e.value.length>0},get children(){return t.createComponent(S.PressableSurface,{type:"button",get class(){return d.clearBtn},onClick:()=>e.onInput(""),get"aria-label"(){return c.t("Clear search")},get title(){return c.t("Clear search")},get children(){return t.createComponent(k.VpClose,{get class(){return V.iconScale.iconSm},"aria-hidden":"true"})}})}}),null),t.effect(()=>t.className(a,d.searchRow)),a})()}const mt=Object.freeze({toolbar:o.toolbar,toolbarHorizontal:o.toolbarHorizontal,toolbarHorizontalBottom:o.toolbarHorizontalBottom,toolbarVertical:o.toolbarVertical,toolbarVerticalRight:o.toolbarVerticalRight,toolbarViewClip:o.toolbarViewClip,toolbarScrollRoot:o.toolbarScrollRoot,toolbarScrollViewport:o.toolbarScrollViewport,toolbarScrollTrack:o.toolbarScrollTrack,toolbarScrollRootVertical:o.toolbarScrollRootVertical,toolbarScrollViewportVertical:o.toolbarScrollViewportVertical,toolbarScrollTrackVertical:o.toolbarScrollTrackVertical,segmentedCapsule:o.segmentedCapsule,toolbarBtn:o.toolbarBtn,toolbarBtnActive:o.toolbarBtnActive,toolbarBtnIconOnly:o.toolbarBtnIconOnly,toolbarIcon:o.toolbarIcon,toolbarSpacer:o.toolbarSpacer,toolbarSettingsBtn:o.toolbarSettingsBtn,sortBadgePill:o.sortBadgePill,sortBadgeBtn:o.sortBadgeBtn,sortBadgeIcon:o.sortBadgeIcon,sortBadgeLabel:o.sortBadgeLabel,sortBadgeClearBtn:o.sortBadgeClearBtn,sortBadgeClearIcon:o.sortBadgeClearIcon,filterInputContainer:o.filterInputContainer,filterSearchIcon:o.filterSearchIcon,filterInput:o.filterInput,filterClearBtn:o.filterClearBtn,filterClearIcon:o.filterClearIcon});function Ct(e,r){const a=`${r}: `;throw new R.BugIndicatingError(`${a}Non-exhaustive switch: unexpected value ${JSON.stringify(e)}`)}const ft="vk_grid_uK6pm",pt="vk_card_33OV3",It="vk_item_UeZrE",Vt="vk_label_a-LFz",wt="vk_value_9ZQBt",Tt="vk_valueMono_knknq",zt="vk_boolOn_5zd-H",Rt="vk_boolOff_-6I4K",Pt="vk_stacked_2T--a",b={grid:ft,card:pt,item:It,label:Vt,value:wt,valueMono:Tt,boolOn:zt,boolOff:Rt,stacked:Pt};var B=t.template("<span>"),$t=t.template("<div>"),yt=t.template("<div><span>");function Lt(e,r){switch(e.kind){case"text":return(()=>{var a=B();return t.insert(a,()=>e.value(r)),t.effect(()=>t.className(a,b.value)),a})();case"mono":return(()=>{var a=B();return t.insert(a,()=>e.value(r)),t.effect(()=>t.className(a,b.valueMono)),a})();case"bool":return(()=>{var a=B();return t.insert(a,(()=>{var n=t.memo(()=>!!e.on(r));return()=>n()?t.createComponent(k.VpCheck,{get class(){return V.iconScale.iconSm},"aria-hidden":"true"}):"—"})()),t.effect(()=>t.className(a,`${b.value} ${e.on(r)?b.boolOn:b.boolOff}`)),a})();case"custom":return e.render(r);default:return Ct(e,"AttributeField.kind")}}function Ot(e){return t.createComponent(v.Show,{get when(){return e.row()!=null},get children(){var r=$t();return t.insert(r,t.createComponent(v.For,{get each(){return e.fields},children:a=>(()=>{var n=yt(),i=n.firstChild;return t.insert(i,()=>a.label),t.insert(n,()=>Lt(a,e.row()),null),t.effect(s=>{var g=b.item,_=b.label;return g!==s.e&&t.className(n,s.e=g),_!==s.t&&t.className(i,s.t=_),s},{e:void 0,t:void 0}),n})()})),t.effect(()=>t.className(r,`${b.grid} ${b[e.variant]??""}`)),r}})}exports.AttributeGrid=Ot;exports.Pagination=M;exports.ToolbarSearchRow=ht;exports.ToolbarSearchToggle=kt;exports.pageSizeOptionLabel=w;exports.resultTabToolbarClasses=mt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),a=require("solid-js"),J=require("./i18n-
|
|
1
|
+
"use strict";const t=require("solid-js/web"),a=require("solid-js"),J=require("./i18n-D3s-a2a0.cjs"),D=require("./tooltipCoordinator-DslqMlsI.cjs"),K="vk_spinner_s8rMh",Q="vk_xs_UVj9O",R="vk_sm_G7bj9",Y="vk_lg_SEaSa",L={spinner:K,xs:Q,sm:R,lg:Y};var ee=t.template("<span data-motion-exempt=true>");const te={xs:L.xs,sm:L.sm,md:"",lg:L.lg};function O(c){return(()=>{var e=ee();return t.effect(l=>{var r=`${L.spinner} ${te[c.size??"md"]} ${c.class??""}`,b=c.decorative?void 0:"status",s=c.decorative?void 0:c.label??J.t("Loading…"),y=c.decorative?"true":void 0;return r!==l.e&&t.className(e,l.e=r),b!==l.t&&t.setAttribute(e,"role",l.t=b),s!==l.a&&t.setAttribute(e,"aria-label",l.a=s),y!==l.o&&t.setAttribute(e,"aria-hidden",l.o=y),l},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()}const ie="vk_root_Zndmu",ne="vk_size2xs_kbyEZ",oe="vk_sizeXs_IUmg-",re="vk_sizeSm_s-iaT",ae="vk_sizeMd_bAI9d",le="vk_sizeLg_zhdkf",se="vk_variantPrimary_KTVgG",ce="vk_variantTonal_tkJNt",de="vk_variantSecondary_MA7xu",ve="vk_variantDanger_L30Uq",ue="vk_variantDangerSolid_htqc7",fe="vk_variantPrimarySolid_14Uwi",me="vk_variantLink_3AapU",pe="vk_variantGhost_x0-j-",ge="vk_variantOutline_xGu8I",_e="vk_active_QisSI",he="vk_iconOnly_bhObv",be="vk_pill_-qH8n",ye="vk_fullWidth_kr6EK",ke="vk_icon_h1rmS",Se="vk_label_6-wKp",Le="vk_responsiveLabel_4Ma2i",ze="vk_loading_EWpLB",xe="vk_iconHidden_Mlyq3",Te="vk_spinnerWrap_F8L1B",Ce="vk_inlineSpinner_uuJuB",Ae="vk_loadingLabelGroup_HO7pg",De="vk_labelText_v7v-A",Oe="vk_animatedDots_CPxN9",o={root:ie,size2xs:ne,sizeXs:oe,sizeSm:re,sizeMd:ae,sizeLg:le,variantPrimary:se,variantTonal:ce,variantSecondary:de,variantDanger:ve,variantDangerSolid:ue,variantPrimarySolid:fe,variantLink:me,variantGhost:pe,variantOutline:ge,active:_e,iconOnly:he,pill:be,fullWidth:ye,icon:ke,label:Se,responsiveLabel:Le,loading:ze,iconHidden:xe,spinnerWrap:Te,inlineSpinner:Ce,loadingLabelGroup:Ae,labelText:De,animatedDots:Oe};var h=t.template("<span aria-hidden=true>"),we=t.template("<span>"),Ie=t.template("<button>"),Pe=t.template("<span><span></span><span aria-hidden=true data-testid=button-animated-dots data-animated-dots=true>");const $e={primary:o.variantPrimary,primarySolid:o.variantPrimarySolid,tonal:o.variantTonal,secondary:o.variantSecondary,danger:o.variantDanger,dangerSolid:o.variantDangerSolid,ghost:o.variantGhost,outline:o.variantOutline,link:o.variantLink},Ne={"2xs":o.size2xs,xs:o.sizeXs,sm:o.sizeSm,md:o.sizeMd,lg:o.sizeLg};function We(c){let e=c;for(;typeof e=="function";)try{e=e()}catch{break}return typeof e=="string"?e.replace(/(?:\s*\.{2,}|\s*…)\s*$/,""):Array.isArray(e)&&e.every(l=>typeof l=="string")?e.join("").replace(/(?:\s*\.{2,}|\s*…)\s*$/,""):e}function Ee(c){const[e,l]=a.splitProps(c,["variant","size","iconOnly","active","pill","fullWidth","responsiveLabel","loading","loadingDelay","minLoadingDuration","loadingLabel","type","leadingIcon","trailingIcon","class","children","disabled","tooltip","tooltipShortcut","tooltipPlacement","title","aria-label","aria-description","ref","onPointerEnter","onPointerLeave","onFocusIn","onFocusOut","onClick"]);let r;const b=a.createUniqueId(),[s,y]=a.createSignal(!1);let z=!1,d,v,x=0,g;const w=()=>{r&&r.offsetWidth>0&&g===void 0&&(g=r.style.minWidth,r.style.minWidth=`${r.offsetWidth}px`)},k=()=>{r&&g!==void 0&&(r.style.minWidth=g,g=void 0)},S=n=>{n&&w(),z=n,y(n)};a.createEffect(()=>{const n=!!e.loading,i=typeof e.loadingDelay=="number"&&!Number.isNaN(e.loadingDelay)?e.loadingDelay:180,m=typeof e.minLoadingDuration=="number"&&!Number.isNaN(e.minLoadingDuration)?e.minLoadingDuration:350;if(n){if(w(),v!==void 0&&(clearTimeout(v),v=void 0),z)return;i<=0?(x=Date.now(),S(!0)):d===void 0&&(d=setTimeout(()=>{d=void 0,x=Date.now(),S(!0)},i))}else if(d!==void 0&&(clearTimeout(d),d=void 0),z){const u=Date.now()-x,p=m-u;p>0?v===void 0&&(v=setTimeout(()=>{v=void 0,S(!1),k()},p)):(S(!1),k())}else k()});let _;a.createEffect(()=>{e.loading||(_=e.children)}),a.onCleanup(()=>{d!==void 0&&(clearTimeout(d),d=void 0),v!==void 0&&(clearTimeout(v),v=void 0),k()});const T=()=>!!e.loading||s(),I=()=>{if(e.loadingLabel!==void 0)return typeof e.loadingLabel=="function"?e.loadingLabel():e.loadingLabel},G=()=>{const n=I();return n!==void 0?n:e.children!==void 0&&e.children!==""&&e.children!==null&&e.children!==!1?e.children:_!==void 0?_:e.children},q=()=>e.size==="2xs"||e.size==="xs"?"xs":"sm",F=()=>e.size==="2xs"||e.size==="xs"?"xs":e.size==="sm"?"sm":"md",C=()=>e.tooltip!==void 0?typeof e.tooltip=="function"?e.tooltip():e.tooltip:e.title,[P,M]=a.createSignal("");a.createEffect(()=>{var n;e.children,e.iconOnly,M(((n=r==null?void 0:r.textContent)==null?void 0:n.trim())??"")});const $=()=>!e.iconOnly&&P()!=="",H=()=>{const n=I();if(s()&&n)return n;if(e["aria-label"]!==void 0)return e["aria-label"];if(!$())return C()},U=()=>{if(e["aria-description"]!==void 0)return e["aria-description"];if(e["aria-label"]!==void 0||!$())return;const n=C();return n&&n!==P()?n:void 0},N=()=>{const n=C();!n||!r||(r.hasAttribute("title")&&(r.setAttribute("data-suppressed-title",r.getAttribute("title")??""),r.removeAttribute("title")),D.tooltipCoordinator.showTooltip({id:b,target:r,content:n,shortcut:e.tooltipShortcut,placement:e.tooltipPlacement}))},V=()=>{if(r&&r.hasAttribute("data-suppressed-title")){const n=r.getAttribute("data-suppressed-title");n&&r.setAttribute("title",n),r.removeAttribute("data-suppressed-title")}},A=()=>{V(),r&&D.tooltipCoordinator.hideTooltip(r)},j=()=>{r&&D.tooltipCoordinator.hideTooltip(r)};a.onCleanup(()=>{A()});const X=()=>{const n=e.variant??"secondary",i=e.size??(n==="link"?void 0:"md");return[o.root,$e[n],i===void 0?void 0:Ne[i],e.iconOnly?o.iconOnly:void 0,e.active?o.active:void 0,e.pill?o.pill:void 0,e.fullWidth?o.fullWidth:void 0,e.responsiveLabel?o.responsiveLabel:void 0,s()?o.loading:void 0,e.class].filter(u=>!!u).join(" ")};return(()=>{var n=Ie();return t.use(i=>{r=i,typeof e.ref=="function"&&e.ref(i)},n),t.spread(n,t.mergeProps(l,{get type(){return e.type??"button"},get class(){return X()},get disabled(){return e.disabled},get"aria-disabled"(){return T()&&!e.disabled?"true":void 0},get"aria-busy"(){return T()?"true":"false"},get"aria-label"(){return H()},get"aria-description"(){return U()},get title(){return t.memo(()=>e.tooltip!==void 0)()?void 0:e.title},onPointerEnter:i=>{N(),typeof e.onPointerEnter=="function"&&e.onPointerEnter(i)},onPointerLeave:i=>{A(),typeof e.onPointerLeave=="function"&&e.onPointerLeave(i)},onFocusIn:i=>{N(),typeof e.onFocusIn=="function"&&e.onFocusIn(i)},onFocusOut:i=>{A(),typeof e.onFocusOut=="function"&&e.onFocusOut(i)},onClick:i=>{if(e.disabled||T()){i.preventDefault();return}if(j(),typeof e.onClick=="function")e.onClick(i);else if(Array.isArray(e.onClick)){const[m,u]=e.onClick;m(u,i)}}}),!1,!0),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>e.leadingIcon!==void 0)()&&!s()},get children(){var i=h();return t.insert(i,()=>e.leadingIcon),t.effect(()=>t.className(i,o.icon)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!e.iconOnly)()&&s()},get children(){var i=h();return t.insert(i,t.createComponent(O,{get size(){return q()},decorative:!0})),t.effect(()=>t.className(i,o.inlineSpinner)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!!(e.children!==void 0||s()&&e.loadingLabel!==void 0))()&&!e.iconOnly},get children(){var i=we();return t.insert(i,(()=>{var m=t.memo(()=>!!s());return()=>m()?(()=>{var u=Pe(),p=u.firstChild,Z=p.nextSibling;return t.insert(p,()=>We(G())),t.effect(f=>{var W=o.loadingLabelGroup,E=o.labelText,B=o.animatedDots;return W!==f.e&&t.className(u,f.e=W),E!==f.t&&t.className(p,f.t=E),B!==f.a&&t.className(Z,f.a=B),f},{e:void 0,t:void 0,a:void 0}),u})():t.memo(()=>!!(e.loading&&_!==void 0))()?_:e.children})()),t.effect(()=>t.className(i,o.label)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!!e.iconOnly)()&&e.children!==void 0},get children(){var i=h();return t.insert(i,()=>e.children),t.effect(()=>t.className(i,`${o.icon} ${s()?o.iconHidden:""}`)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>e.trailingIcon!==void 0)()&&!s()},get children(){var i=h();return t.insert(i,()=>e.trailingIcon),t.effect(()=>t.className(i,o.icon)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!!e.iconOnly)()&&s()},get children(){var i=h();return t.insert(i,t.createComponent(O,{get size(){return F()},decorative:!0})),t.effect(()=>t.className(i,o.spinnerWrap)),i}}),null),n})()}exports.Button=Ee;exports.Spinner=O;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { effect as g, className as d, setAttribute as C, template as S, use as oi, spread as ri, mergeProps as ai, memo as f, insert as l, createComponent as p } from "solid-js/web";
|
|
2
2
|
import { splitProps as li, createUniqueId as si, createSignal as j, createEffect as w, onCleanup as q, Show as h } from "solid-js";
|
|
3
|
-
import { t as di } from "./i18n-
|
|
3
|
+
import { t as di } from "./i18n-CBlUGOyu.js";
|
|
4
4
|
import { t as B } from "./tooltipCoordinator-BzxEyKhA.js";
|
|
5
5
|
const ci = "vk_spinner_s8rMh", vi = "vk_xs_UVj9O", ui = "vk_sm_G7bj9", fi = "vk_lg_SEaSa", D = {
|
|
6
6
|
spinner: ci,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("solid-js/web"),o=require("solid-js"),Ct=require("./Kbd-BDZklpw9.cjs"),ye=require("./dialogFocusRestore-CL-ExfAA.cjs"),se=require("./Button-Bb68ymNP.cjs"),Pe=require("./createDialogShellFocus-CJaw9-B9.cjs"),Ce=require("./Input-CZruORyy.cjs"),on=require("./Textarea-CeAGf08O.cjs"),ve=require("./Modal-CY6ePolt.cjs"),Le=require("./OverlayScrollArea-BSlaXG1h.cjs"),Ae=require("./window-_BfSgFGO.cjs"),he=require("./anchoredLayout-Dstwa5OH.cjs"),f=require("./i18n-D3s-a2a0.cjs"),ge=require("./keys-GMxY2wcl.cjs"),Y=require("./GuidedTour-B6q7lYhn.cjs"),qe=require("./tooltipCoordinator-DslqMlsI.cjs"),fe=require("@vokril/icons"),_t=require("./DesktopContextMenuContext-DMGNVjaR.cjs"),Te=require("./ownerWindow-BCmJFMbR.cjs"),Je=require("./overlayStack-eD8AmuwY.cjs"),rn=require("./Popover-CWrR51eG.cjs"),an=require("./prefersReducedMotion-BQp-Q4UR.cjs"),st=require("./errorHandler-DoDAPpv2.cjs"),Ee=require("./EmptyState-B9TxGJ5v.cjs"),cn=require("./tablistKeyboard-DtVKTEWz.cjs"),kt=require("./kitHost-BfJExE1G.cjs"),ln="vk_wrapper_u7cKP",sn="vk_tooltip_ANskC",dn="vk_placementTop_Q5EkL",un="vk_placementBottom_VVLuu",mn="vk_placementLeft_uKF0H",hn="vk_placementRight_ObusA",De={wrapper:ln,tooltip:sn,placementTop:dn,placementBottom:un,placementLeft:mn,placementRight:hn};var vn=e.template("<div role=tooltip><span>"),fn=e.template("<div>");const gn=t=>{const[n,r]=o.createSignal(!1);let i;const c=()=>t.placement??"top",a=()=>t.delayMs??400,m=()=>{t.disabled||(u(),i=window.setTimeout(()=>r(!0),a()))},_=()=>{u(),r(!1)},u=()=>{i!==void 0&&(window.clearTimeout(i),i=void 0)};o.onCleanup(u);const h=()=>{switch(c()){case"bottom":return De.placementBottom;case"left":return De.placementLeft;case"right":return De.placementRight;case"top":default:return De.placementTop}};return(()=>{var v=fn();return v.$$focusout=_,v.$$focusin=m,v.addEventListener("pointerleave",_),v.addEventListener("pointerenter",m),e.insert(v,()=>t.children,null),e.insert(v,e.createComponent(o.Show,{get when(){return e.memo(()=>!!n())()&&!t.disabled},get children(){var s=vn(),k=s.firstChild;return e.insert(k,()=>t.content),e.insert(s,e.createComponent(o.Show,{get when(){return t.shortcut},get children(){return e.createComponent(Ct.Kbd,{size:"xs",get children(){return t.shortcut}})}}),null),e.effect(()=>e.className(s,`${De.tooltip} ${h()}`)),s}}),null),e.effect(()=>e.className(v,`${De.wrapper} ${t.class??""}`)),v})()};e.delegateEvents(["focusin","focusout"]);function We(t){let n=null,r=null,i=null;const c=()=>t.ownerDocument(),a=()=>{r===null&&(r=c().activeElement)},m=()=>{i==null||i(),i=null};return o.createEffect(o.on(()=>t.open(),(_,u)=>{if(_){n!==null&&i===null&&(i=an.neutralizeBackground(n));return}ye.shouldRestoreFocusOnDialogClose(u,_)&&(m(),ye.restoreFocusTo(r),r=null,n=null)})),o.onCleanup(()=>{m(),ye.restoreFocusTo(r),r=null,n=null}),{captureDialog:_=>{n=_,a()},captureReturnFocus:a}}function Re(){let t=!1;return{noteMouseDown(n){t=n},shouldCloseOnClick(n){const r=t;return t=!1,r&&n}}}const bn="vk_overlay_7-umT",wn="vk_dialog_3YL-7",Cn="vk_header_asYMs",_n="vk_title_0fm8I vk_titleLg_Iswm3",kn="vk_body_U-3RF",yn="vk_message_UsUIn",Sn="vk_checkbox_P8FRX",$n="vk_promptField_jlrF3",pn="vk_footer_orvoX",xn="vk_codeScroll_rzK59",An="vk_code_6rso-",Ln="vk_codePre_Lj6QF",te={overlay:bn,dialog:wn,header:Cn,title:_n,body:kn,message:yn,checkbox:Sn,promptField:$n,footer:pn,codeScroll:xn,code:An,codePre:Ln};var yt=e.template("<div tabindex=-1><div role=alertdialog aria-modal=true tabindex=-1><div><h3></h3></div><div><p></p></div><div>"),In=e.template("<pre><code>"),Mn=e.template("<p>"),Nn=e.template("<div tabindex=-1><div role=dialog aria-modal=true tabindex=-1><div><h3></h3></div><div></div><div>");const Oe=t=>((t==null?void 0:t())??Ae.getMainWindow().window).document;function En(t){const n=o.createUniqueId(),r=o.createUniqueId(),i=o.createUniqueId(),c=()=>t.place?`${r} ${i}`:i,[a,m]=o.createSignal(0);o.createEffect(()=>{var D;if(!t.open()){m(0);return}const $=t.confirmDelaySeconds??0;if(m($),$<=0)return;const O=((D=t.host)==null?void 0:D.call(t))??Ae.getMainWindow().window,w=O.setInterval(()=>{m(U=>U<=1?0:U-1)},1e3);o.onCleanup(()=>O.clearInterval(w))});const[_,u]=o.createSignal(!1);o.createEffect(o.on(()=>t.open(),$=>{var O;$&&u(((O=t.checkbox)==null?void 0:O.checked)??!1)}));const h=()=>t.checkbox?{checkboxChecked:_()}:{},v=We({open:()=>t.open(),ownerDocument:()=>Oe(t.host)});let s=null;const k=Re(),g=$=>{const O=$.target===$.currentTarget;k.noteMouseDown(O),O&&t.sticky&&$.preventDefault()},S=$=>{k.shouldCloseOnClick($.target===$.currentTarget)&&!t.sticky&&t.onCancel(h())},N=$=>{if($.target!==$.currentTarget)return;const O=ve.resolveDialogShellKeyIntent($.key,{confirmOnEnter:!1});if(O==="dismiss"){$.stopPropagation(),t.sticky||t.onCancel(h());return}O==="trap"&&s&&ve.trapTabFocusWithin(s,$)},E=$=>{const O=ve.resolveDialogShellKeyIntent($.key,{confirmOnEnter:!1});if(O==="dismiss"){$.stopPropagation(),t.sticky||t.onCancel(h());return}O==="trap"&&s&&ve.trapTabFocusWithin(s,$)},W=$=>{s=$,v.captureDialog($),he.requestOwnerAnimationFrame($,()=>{if(!$.isConnected)return;const O=Array.from($.querySelectorAll("button:not([disabled])"));(((t.variant??"default")==="danger"?t.sticky?void 0:O.find(U=>U.textContent===(t.cancelLabel??f.t("Cancel")))??O[0]:O[O.length-1]??O[0])??$).focus()})};return e.createComponent(o.Show,{get when(){return t.open()},get children(){return e.createComponent(ye.OverlayPortal,{modal:!0,get mount(){return Oe(t.host).body},idPrefix:"confirm-dialog",get children(){var $=yt(),O=$.firstChild,w=O.firstChild,D=w.firstChild,U=w.nextSibling,G=U.firstChild,j=U.nextSibling;return $.$$keydown=N,$.$$click=S,$.$$mousedown=g,O.$$keydown=E,e.use(W,O),e.setAttribute(O,"aria-labelledby",n),e.setAttribute(D,"id",n),e.insert(D,()=>t.title),e.insert(U,e.createComponent(o.Show,{get when(){return t.place},children:R=>e.createComponent(ve.ActionPlaceRow,{id:r,get place(){return R()}})}),G),e.setAttribute(G,"id",i),e.insert(G,()=>t.message),e.insert(U,e.createComponent(o.Show,{get when(){return t.code},children:R=>e.createComponent(Le.OverlayScrollArea,{get rootClass(){return te.codeScroll},get viewportClass(){return te.code},get children(){var ee=In(),J=ee.firstChild;return e.insert(J,R),e.effect(X=>{var C=te.codePre,T=f.t("Statement");return C!==X.e&&e.className(ee,X.e=C),T!==X.t&&e.setAttribute(ee,"aria-label",X.t=T),X},{e:void 0,t:void 0}),ee}})}),null),e.insert(U,e.createComponent(o.Show,{get when(){return t.checkbox},children:R=>e.createComponent(Pe.Checkbox,{get class(){return te.checkbox},get checked(){return _()},onChange:u,get children(){return R().label}})}),null),e.insert(j,e.createComponent(o.Show,{get when(){return!t.sticky},get children(){return e.createComponent(se.Button,{size:"lg",variant:"secondary",onClick:()=>t.onCancel(h()),get children(){return t.cancelLabel??f.t("Cancel")}})}}),null),e.insert(j,e.createComponent(se.Button,{size:"lg",get variant(){return(t.variant??"default")==="danger"?"dangerSolid":"primary"},get disabled(){return a()>0},onClick:()=>t.onConfirm(h()),get children(){return e.memo(()=>a()>0)()?f.t("{label} ({seconds})",{label:t.confirmLabel??f.t("Confirm"),seconds:a()}):t.confirmLabel??f.t("Confirm")}}),null),e.effect(R=>{var ee=te.overlay,J=te.dialog,X=c(),C=te.header,T=te.title,b=te.body,y=te.message,l=te.footer;return ee!==R.e&&e.className($,R.e=ee),J!==R.t&&e.className(O,R.t=J),X!==R.a&&e.setAttribute(O,"aria-describedby",R.a=X),C!==R.o&&e.className(w,R.o=C),T!==R.i&&e.className(D,R.i=T),b!==R.n&&e.className(U,R.n=b),y!==R.s&&e.className(G,R.s=y),l!==R.h&&e.className(j,R.h=l),R},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),$}})}})}function Dn(t){const n=o.createUniqueId(),r=o.createUniqueId(),i=We({open:()=>t.open(),ownerDocument:()=>Oe(t.host)});let c=null;const a=Re(),m=v=>{a.noteMouseDown(v.target===v.currentTarget)},_=v=>{a.shouldCloseOnClick(v.target===v.currentTarget)&&t.onChoice("cancel")},u=v=>{const s=ve.resolveDialogShellKeyIntent(v.key,{confirmOnEnter:!1});if(s==="dismiss"){v.stopPropagation(),t.onChoice("cancel");return}s==="trap"&&c&&ve.trapTabFocusWithin(c,v)},h=v=>{c=v,i.captureDialog(v),he.requestOwnerAnimationFrame(v,()=>{if(!v.isConnected)return;const s=Array.from(v.querySelectorAll("button:not([disabled])"));(s[s.length-1]??s[0]??v).focus()})};return e.createComponent(o.Show,{get when(){return t.open()},get children(){return e.createComponent(ye.OverlayPortal,{modal:!0,get mount(){return Oe(t.host).body},idPrefix:"save-discard-dialog",get children(){var v=yt(),s=v.firstChild,k=s.firstChild,g=k.firstChild,S=k.nextSibling,N=S.firstChild,E=S.nextSibling;return v.$$keydown=W=>{ge.isKey(W,"Escape")&&t.onChoice("cancel")},v.$$click=_,v.$$mousedown=m,s.$$keydown=u,e.use(h,s),e.setAttribute(s,"aria-labelledby",n),e.setAttribute(s,"aria-describedby",r),e.setAttribute(g,"id",n),e.insert(g,()=>t.title),e.setAttribute(N,"id",r),e.insert(N,()=>t.message),e.insert(E,e.createComponent(se.Button,{size:"lg",variant:"secondary",onClick:()=>t.onChoice("cancel"),get children(){return t.cancelLabel??f.t("Cancel")}}),null),e.insert(E,e.createComponent(se.Button,{size:"lg",variant:"dangerSolid",onClick:()=>t.onChoice("discard"),get children(){return t.discardLabel??f.t("Don't Save")}}),null),e.insert(E,e.createComponent(se.Button,{size:"lg",variant:"primary",onClick:()=>t.onChoice("save"),get children(){return t.saveLabel??f.t("Save")}}),null),e.effect(W=>{var $=te.overlay,O=te.dialog,w=te.header,D=te.title,U=te.body,G=te.message,j=te.footer;return $!==W.e&&e.className(v,W.e=$),O!==W.t&&e.className(s,W.t=O),w!==W.a&&e.className(k,W.a=w),D!==W.o&&e.className(g,W.o=D),U!==W.i&&e.className(S,W.i=U),G!==W.n&&e.className(N,W.n=G),j!==W.s&&e.className(E,W.s=j),W},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),v}})}})}function Pn(t){const n=o.createUniqueId(),[r,i]=o.createSignal(t.defaultValue??"");o.createEffect(o.on(()=>t.open(),k=>{k&&i(t.defaultValue??"")},{defer:!0}));const c=We({open:()=>t.open(),ownerDocument:()=>Oe(t.host)});let a=null;const m=Re(),_=k=>{m.noteMouseDown(k.target===k.currentTarget)},u=k=>{m.shouldCloseOnClick(k.target===k.currentTarget)&&t.onCancel()},h=k=>{const g=ve.resolveDialogShellKeyIntent(k.key,{confirmOnEnter:!t.multiline});if(g==="dismiss"){k.stopPropagation(),t.onCancel();return}else if(g==="confirm"){k.stopPropagation(),t.onConfirm(r());return}g==="trap"&&a&&ve.trapTabFocusWithin(a,k)},v=k=>{c.captureReturnFocus(),he.requestOwnerAnimationFrame(k,()=>{k.focus(),k.select()})},s=k=>{a=k,c.captureDialog(k)};return e.createComponent(o.Show,{get when(){return t.open()},get children(){return e.createComponent(ye.OverlayPortal,{modal:!0,get mount(){return Oe(t.host).body},idPrefix:"prompt-dialog",get children(){var k=Nn(),g=k.firstChild,S=g.firstChild,N=S.firstChild,E=S.nextSibling,W=E.nextSibling;return k.$$keydown=$=>{ge.isKey($,"Escape")&&t.onCancel()},k.$$click=u,k.$$mousedown=_,g.$$keydown=h,e.use(s,g),e.setAttribute(g,"aria-labelledby",n),e.setAttribute(N,"id",n),e.insert(N,()=>t.title),e.insert(E,e.createComponent(o.Show,{get when(){return t.message!==void 0},get children(){var $=Mn();return e.insert($,()=>t.message),e.effect(()=>e.className($,te.message)),$}}),null),e.insert(E,e.createComponent(o.Show,{get when(){return t.multiline},get fallback(){return e.createComponent(Ce.Input,{ref:v,get type(){return t.secret?"password":"text"},get class(){return te.promptField},get value(){return r()},get placeholder(){return t.placeholder??""},get"aria-label"(){return t.title},onInput:$=>i($.currentTarget.value)})},get children(){return e.createComponent(on.Textarea,{ref:v,rows:8,mono:!0,get class(){return te.promptField},get value(){return r()},get placeholder(){return t.placeholder??""},get"aria-label"(){return t.title},onInput:$=>i($.currentTarget.value)})}}),null),e.insert(W,e.createComponent(se.Button,{size:"lg",variant:"secondary",onClick:()=>t.onCancel(),get children(){return t.cancelLabel??f.t("Cancel")}}),null),e.insert(W,e.createComponent(se.Button,{size:"lg",variant:"primary",onClick:()=>t.onConfirm(r()),get children(){return t.confirmLabel??f.t("Save")}}),null),e.effect($=>{var O=te.overlay,w=te.dialog,D=te.header,U=te.title,G=te.body,j=te.footer;return O!==$.e&&e.className(k,$.e=O),w!==$.t&&e.className(g,$.t=w),D!==$.a&&e.className(S,$.a=D),U!==$.o&&e.className(N,$.o=U),G!==$.i&&e.className(E,$.i=G),j!==$.n&&e.className(W,$.n=j),$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),k}})}})}e.delegateEvents(["mousedown","click","keydown"]);const Tn=Object.freeze({root:Y.panel.root,header:Y.panel.header,headerMain:Y.panel.headerMain,headerActions:Y.panel.headerActions,title:Y.panel.title,toolbar:Y.panel.toolbar,toolbarSeparator:Y.panel.toolbarSeparator,toolbarSeparatorHorizontal:Y.panel.toolbarSeparatorHorizontal,bodyNoScroll:Y.panel.bodyNoScroll,emptyFill:Y.panel.emptyFill,footer:Y.panel.footer,headerRail:Y.panel.headerRail,titleRail:Y.panel.titleRail,titleWrapRail:Y.panel.titleWrapRail,actionsRail:Y.panel.actionsRail,countRail:Y.panel.countRail,headerAdmin:Y.panel.headerAdmin,titleAdmin:Y.panel.titleAdmin,titleWrapAdmin:Y.panel.titleWrapAdmin,actionsAdmin:Y.panel.actionsAdmin,countAdmin:Y.panel.countAdmin,bodyAdmin:Y.panel.bodyAdmin,titleStackAdmin:Y.panel.titleStackAdmin,titleRowAdmin:Y.panel.titleRowAdmin,subtitleAdmin:Y.panel.subtitleAdmin,headerAdminStacked:Y.panel.headerAdminStacked});function St(t,n){const r=o.createUniqueId(),i=()=>{const m=n();return m?typeof m=="string"?{content:m}:m:null},c=()=>{const m=i();!m||!m.content||(t.hasAttribute("title")&&(t.setAttribute("data-suppressed-title",t.getAttribute("title")??""),t.removeAttribute("title")),qe.tooltipCoordinator.showTooltip({id:r,target:t,content:m.content,shortcut:m.shortcut,placement:m.placement,offset:m.offset,delayMs:m.delayMs}))},a=()=>{if(t.hasAttribute("data-suppressed-title")){const m=t.getAttribute("data-suppressed-title");m&&t.setAttribute("title",m),t.removeAttribute("data-suppressed-title")}qe.tooltipCoordinator.hideTooltip(t)};t.addEventListener("pointerenter",c),t.addEventListener("pointerleave",a),t.addEventListener("focusin",c),t.addEventListener("focusout",a),o.onCleanup(()=>{a(),t.removeEventListener("pointerenter",c),t.removeEventListener("pointerleave",a),t.removeEventListener("focusin",c),t.removeEventListener("focusout",a)})}function On(t){return t!==void 0&&t.type!=="separator"}function $t(t){return t==="ArrowDown"||t==="ArrowUp"||t==="Home"||t==="End"||t==="ArrowRight"||t==="ArrowLeft"}function He(t,n,r){const i=t.length;if(i===0)return-1;let c=n;for(let a=0;a<i;a++)if(c=(c+r+i)%i,On(t[c]))return c;return-1}function it(t){return He(t,-1,1)}function pt(t){return He(t,t.length,-1)}function xt(t,n,r){switch(r){case"ArrowDown":return He(t,n,1);case"ArrowUp":return He(t,n<0?t.length:n,-1);case"Home":return it(t);case"End":return pt(t);case"ArrowRight":case"ArrowLeft":return n;default:return n}}const Xe=8,Qe=4,At=240,Lt=36,It=28;function Wn(t,n,r){return Math.max(n,Math.min(t,r))}function Mt(t){return Math.max(Lt,t*It)}function Nt(t){const{parentPanelRect:n,triggerRowRect:r,viewportWidth:i,viewportHeight:c}=t,a=n.right-Qe,m=a+At>i-Xe,_=m?n.left+Qe:a,u=Mt(t.submenuItemCount),h=Wn(r.top-Qe,Xe,c-u-Xe);return{x:_,y:h,flipLeft:m}}const Rn="vk_menu_7idth vk_surface_3ZOnl",Bn="vk_itemsViewport_e8jse vk_viewport_B94pk",Fn="vk_item_6-C-w vk_item_neWq-",zn="vk_itemLabel_4H-rz",qn="vk_itemText_xNl6M",Hn="vk_itemMeta_LWQ8A",Kn="vk_check_P9Ntk vk_check_dO3aK",Un="vk_itemIcon_JSYNd vk_itemIcon_bv6oS",Vn="vk_submenuChevron_bANqc vk_chevron_pb9D1",jn="vk_itemExpanded_JfVkt",Yn="vk_itemDanger_oJRgf",Gn="vk_separator_l-bM- vk_separator_zMw59",Xn="vk_visuallyHidden_CrSqj",ue={menu:Rn,itemsViewport:Bn,item:Fn,itemLabel:zn,itemText:qn,itemMeta:Hn,check:Kn,itemIcon:Un,submenuChevron:Vn,itemExpanded:jn,itemDanger:Yn,separator:Gn,visuallyHidden:Xn};var Qn=e.template("<div role=menu tabindex=-1>"),Jn=e.template("<div role=separator>"),dt=e.template("<span aria-hidden=true>"),Zn=e.template("<span><span>"),Ze=e.template("<span>"),eo=e.template("<span hidden data-context-menu-host>");const Z=8;function Ge(t){return t.type!=="separator"}function Et(t){let n,r,i=!1;o.onCleanup(()=>{i=!0});const c=()=>{const C=t.anchor??(t.depth===0&&t.left!==void 0&&t.top!==void 0?{left:t.left,top:t.top,width:0,height:0}:void 0);if(C){const T=t.hostWin.innerHeight,b=t.hostWin.innerWidth,y=T-(C.top+C.height)-Z,l=Math.max(36,t.items.length*28+12),d=t.anchorPosition===he.AnchorPosition.ABOVE||y<l&&C.top>y?Math.max(Z,C.top-l):C.top+C.height,M=200;return{left:t.anchorAlignment===he.AnchorAlignment.RIGHT||C.left+M>b-Z?Math.max(Z,C.left+C.width-M):C.left,top:d,right:void 0,bottom:void 0,maxHeight:void 0,maxWidth:void 0}}return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,maxHeight:void 0,maxWidth:void 0}},[a,m]=o.createSignal(c()),[_,u]=o.createSignal(null),[h,v]=o.createSignal(-1),[s,k]=o.createSignal(-1),g=o.createUniqueId(),S=C=>`ctx-hint-${g}-${C}`,N=[];let E;const W=()=>t.items.some(C=>Ge(C)&&C.icon!==void 0),$=()=>t.items.some(C=>Ge(C)&&C.checked!==void 0),O=C=>{var T;k(C),(T=N[C])==null||T.focus({preventScroll:!1})},w=(C,T,b,y)=>{if(!T.submenu||T.submenu.length===0||!n||h()===b&&_()!==null&&!y)return;const l=n.getBoundingClientRect(),x=C.getBoundingClientRect(),d=Nt({parentPanelRect:l,triggerRowRect:x,submenuItemCount:T.submenu.length,viewportWidth:t.hostWin.innerWidth,viewportHeight:t.hostWin.innerHeight});v(b);const M={x:d.x,y:d.y,items:T.submenu,flipLeft:d.flipLeft,autoFocus:y};y&&_()!==null?(u(null),queueMicrotask(()=>{i||u(M)})):u(M)},D=()=>{const C=h();u(null),v(-1),C>=0&&O(C)},U=C=>{var M,I;const T=C.key,b=s(),y=b>=0?t.items[b]:void 0,l=y&&Ge(y)?y:void 0,x=!!(l!=null&&l.submenu&&l.submenu.length>0);if(T==="ArrowRight"&&x&&l){C.preventDefault(),C.stopPropagation();const L=N[b];L&&w(L,l,b,!0);return}if(T==="ArrowLeft"&&t.depth>0){C.preventDefault(),C.stopPropagation(),(M=t.onRequestCloseSubmenu)==null||M.call(t);return}if((T==="Enter"||T===" ")&&b>=0&&N[b]&&n&&t.hostWin.document.activeElement===n){C.preventDefault(),C.stopPropagation(),(I=N[b])==null||I.click();return}if(!$t(T))return;C.preventDefault(),C.stopPropagation();const d=xt(t.items,b,T);d>=0&&O(d)},G=()=>{if(!n)return;const C=t.hostWin.innerWidth,T=t.hostWin.innerHeight,b=n&&r?Math.max(0,n.offsetHeight-r.offsetHeight):4,y=r?r.scrollHeight+b:0,l=Math.max(n.offsetHeight,n.scrollHeight,y),x=n&&r?Math.max(0,n.offsetWidth-r.offsetWidth):4,d=r?r.scrollWidth+x:0,M=Math.max(n.offsetWidth,n.scrollWidth,d),I=t.anchor??(t.depth===0&&t.left!==void 0&&t.top!==void 0?{left:t.left,top:t.top,width:0,height:0}:void 0);if(I){const B={width:M,height:l},ae={top:0,left:0,width:C,height:T},Me=T-(I.top+I.height)-Z,Ke=I.top-Z,Ue=t.anchorPosition===he.AnchorPosition.ABOVE||Me<Ke&&(Me<l||I.top>Me),_e=he.layout2d(ae,B,I,{anchorAlignment:t.anchorAlignment??he.AnchorAlignment.LEFT,anchorPosition:t.anchorPosition??(Ue?he.AnchorPosition.ABOVE:he.AnchorPosition.BELOW),margin:Z}),Be=_e.anchorPosition===he.AnchorPosition.ABOVE,Ve=Be&&I.top-Z<l?Math.max(0,I.top-Z):Math.max(0,T-_e.top-Z),je=Math.max(0,T-2*Z),Fe=Math.min(je,Ve),Ye=Math.min(l,Fe),Zt=Be?Math.max(Z,I.top-Ye):_e.top,en=Math.max(0,C-_e.left-Z),tn=Math.max(0,C-2*Z),nn=Math.min(tn,en),$e={left:_e.left,top:Zt,right:void 0,bottom:void 0,maxHeight:Fe,maxWidth:nn},Ne=a();if(Ne.left===$e.left&&Ne.top===$e.top&&Ne.right===$e.right&&Ne.bottom===$e.bottom&&Ne.maxHeight===$e.maxHeight&&Ne.maxWidth===$e.maxWidth)return;m($e);return}let L=t.left,P=t.right,A=t.top,p=t.bottom;P!==void 0?P=Math.max(Z,Math.min(P,C-M-Z)):L!==void 0&&(L=Math.max(Z,Math.min(L,C-M-Z))),p!==void 0?p=Math.max(Z,Math.min(p,T-l-Z)):A!==void 0&&(A=Math.max(Z,Math.min(A,T-l-Z)));const H=A!==void 0?A:p!==void 0?T-p-l:Z,z=Math.max(0,T-H-Z),q=Math.max(0,T-2*Z),oe=Math.min(q,z),F=L!==void 0?L:P!==void 0?C-P-M:Z,ne=Math.max(0,C-F-Z),ke=Math.max(0,C-2*Z),Se=Math.min(ke,ne),de={left:L,top:A,right:P,bottom:p,maxHeight:oe,maxWidth:Se},ie=a();ie.left===de.left&&ie.top===de.top&&ie.right===de.right&&ie.bottom===de.bottom&&ie.maxHeight===de.maxHeight&&ie.maxWidth===de.maxWidth||m(de)};o.onMount(()=>{queueMicrotask(()=>{if(i)return;const d=t.hostWin.document.documentElement.getAttribute("data-focus-modality")==="pointer";if(t.autoFocusFirst??(!d&&t.depth===0)){const I=it(t.items);if(I>=0){O(I);return}}n==null||n.focus()}),G();const C=t.hostWin,T=C.requestAnimationFrame(()=>G()),b=()=>G();C.addEventListener("resize",b),C.addEventListener("scroll",b,!0);const y=C.ResizeObserver;let l;if(y&&n){const x=new y(()=>G());x.observe(n),l=x}o.onCleanup(()=>{C.cancelAnimationFrame(T),C.removeEventListener("resize",b),C.removeEventListener("scroll",b,!0),l==null||l.disconnect()})}),o.onCleanup(()=>{E&&clearTimeout(E)}),o.createEffect(()=>{t.items.length,m(c()),queueMicrotask(()=>{i||G()})});const j=()=>{E&&(clearTimeout(E),E=void 0)},R=()=>{j(),E=setTimeout(()=>{u(null),v(-1)},200)},ee=(C,T,b)=>{if(j(),T.disabled||!T.submenu||T.submenu.length===0){R();return}w(C.currentTarget,T,b,!1)},J=C=>{if(!C)return;const T=t.shortcutResolver;return T?T(C):void 0},X=Je.useOverlayRegistration(()=>!0,"context-menu-panel",{type:"menu",element:()=>n,parent:t.parentLayer});return o.onMount(()=>{if(t.depth!==0)return;const C=t.hostWin,T=b=>{!ge.isKey(b,"Escape")||!X.isTopmost()||(b.stopPropagation(),b.stopImmediatePropagation(),t.onRequestClose())};C.addEventListener("keydown",T,!0),o.onCleanup(()=>C.removeEventListener("keydown",T,!0))}),(()=>{var C=Qn();C.addEventListener("mouseleave",()=>{var b;R(),(b=t.onMouseLeavePanel)==null||b.call(t)}),C.addEventListener("mouseenter",()=>{var b;j(),(b=t.onMouseEnterPanel)==null||b.call(t)}),C.$$keydown=U,C.$$contextmenu=b=>b.preventDefault(),C.$$click=b=>b.stopPropagation(),C.$$pointerdown=b=>b.stopPropagation(),C.$$mousedown=b=>b.stopPropagation();var T=n;return typeof T=="function"?e.use(T,C):n=C,e.insert(C,e.createComponent(Le.OverlayScrollArea,{get viewportClass(){return ue.itemsViewport},viewportRef:b=>r=b,get children(){return e.createComponent(o.For,{get each(){return t.items},children:(b,y)=>{if(!Ge(b))return(()=>{var L=Jn();return e.effect(()=>e.className(L,ue.separator)),L})();const l=()=>!!(b.submenu&&b.submenu.length>0),x=()=>{const L=b.checked;return typeof L=="function"?L():!!L},d=()=>{var L;return l()&&((L=_())==null?void 0:L.items)===b.submenu};let M;const I=()=>typeof b.label=="function"?b.label():b.label;return e.createComponent(Ce.PressableSurface,{type:"button",ref:L=>{N[y()]=L??null,St(L,()=>{const A=[M&&M.scrollWidth>M.clientWidth?I():"",b.hint??""].filter(Boolean).join(`
|
|
2
|
+
`);return A?{content:A,placement:"top",delayMs:650}:void 0})},get class(){return`${ue.item}${b.danger?` ${ue.itemDanger}`:""}`},get classList(){return{[ue.itemExpanded]:d()}},get role(){return e.memo(()=>!!b.checkedRole)()?`menuitem${b.checkedRole}`:"menuitem"},tabIndex:-1,get"aria-disabled"(){return b.disabled?!0:void 0},get"aria-checked"(){return e.memo(()=>!!b.checkedRole)()?x():void 0},get"aria-haspopup"(){return l()?"menu":void 0},get"aria-expanded"(){return e.memo(()=>!!l())()?d():void 0},get"aria-describedby"(){return e.memo(()=>!!b.hint)()?S(y()):void 0},onFocus:()=>k(y()),onMouseEnter:L=>{n&&t.hostWin.document.activeElement&&t.hostWin.document.activeElement!==n&&n.contains(t.hostWin.document.activeElement)&&n.focus({preventScroll:!0}),k(y()),ee(L,b,y())},onClick:()=>{var L;if(!b.disabled){if(l()){const P=N[y()];P&&w(P,b,y(),!0);return}(L=b.onSelect??b.onClick)==null||L(),b.keepOpenOnSelect||queueMicrotask(()=>t.onRequestClose())}},get children(){return[(()=>{var L=Zn(),P=L.firstChild;e.insert(L,e.createComponent(o.Show,{get when(){return $()},get children(){var p=dt();return e.insert(p,e.createComponent(o.Show,{get when(){return x()},get children(){return e.createComponent(fe.VpCheck,{})}})),e.effect(()=>e.className(p,ue.check)),p}}),P),e.insert(L,e.createComponent(o.Show,{get when(){return W()},get children(){var p=dt();return e.insert(p,()=>b.icon),e.effect(()=>e.className(p,ue.itemIcon)),p}}),P);var A=M;return typeof A=="function"?e.use(A,P):M=P,e.insert(P,I),e.effect(p=>{var H=ue.itemLabel,z=ue.itemText;return H!==p.e&&e.className(L,p.e=H),z!==p.t&&e.className(P,p.t=z),p},{e:void 0,t:void 0}),L})(),(()=>{var L=Ze();return e.insert(L,e.createComponent(o.Show,{get when(){return J(b.commandId)??b.shortcut},children:P=>(()=>{var A=Ze();return e.insert(A,P),A})()}),null),e.insert(L,e.createComponent(o.Show,{get when(){return l()},get children(){return e.createComponent(fe.VpChevronRight,{get class(){return ue.submenuChevron},"aria-hidden":"true"})}}),null),e.effect(()=>e.className(L,ue.itemMeta)),L})(),e.createComponent(o.Show,{get when(){return b.hint},get children(){var L=Ze();return e.insert(L,()=>b.hint),e.effect(P=>{var A=S(y()),p=ue.visuallyHidden;return A!==P.e&&e.setAttribute(L,"id",P.e=A),p!==P.t&&e.className(L,P.t=p),P},{e:void 0,t:void 0}),L}})]}})}})}}),null),e.insert(C,e.createComponent(o.Show,{get when(){return _()},children:b=>{const y=b().flipLeft?{right:t.hostWin.innerWidth-b().x}:{left:b().x};return e.createComponent(e.Portal,{get mount(){return t.hostWin.document.body},get children(){return e.createComponent(Et,e.mergeProps(y,{get top(){return b().y},get items(){return b().items},get depth(){return t.depth+1},get hostWin(){return t.hostWin},parentLayer:X,get autoFocusFirst(){return b().autoFocus},get onRequestClose(){return t.onRequestClose},onRequestCloseSubmenu:D,onMouseEnterPanel:()=>{var l;j(),(l=t.onMouseEnterPanel)==null||l.call(t)},onMouseLeavePanel:()=>{var l;R(),(l=t.onMouseLeavePanel)==null||l.call(t)},get shortcutResolver(){return t.shortcutResolver}}))}})}}),null),e.effect(b=>{var y=ue.menu,l=a().left!==void 0?`${a().left}px`:void 0,x=a().top!==void 0?`${a().top}px`:void 0,d=a().right!==void 0?`${a().right}px`:void 0,M=a().bottom!==void 0?`${a().bottom}px`:void 0,I=a().maxHeight!==void 0?`${a().maxHeight}px`:void 0,L=a().maxWidth!==void 0?`${Math.min(360,a().maxWidth??360)}px`:void 0,P=t.depth>0?`calc(var(--z-context-menu) + ${t.depth})`:void 0,A=t.depth;return y!==b.e&&e.className(C,b.e=y),l!==b.t&&e.setStyleProperty(C,"left",b.t=l),x!==b.a&&e.setStyleProperty(C,"top",b.a=x),d!==b.o&&e.setStyleProperty(C,"right",b.o=d),M!==b.i&&e.setStyleProperty(C,"bottom",b.i=M),I!==b.n&&e.setStyleProperty(C,"max-height",b.n=I),L!==b.s&&e.setStyleProperty(C,"max-width",b.s=L),P!==b.h&&e.setStyleProperty(C,"z-index",b.h=P),A!==b.r&&e.setAttribute(C,"data-desktop-menu-depth",b.r=A),b},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),C})()}function to(t){return t!==null&&t!==t.ownerDocument.body&&typeof t.focus=="function"}function Dt(t={}){const n=_t.useDesktopContextMenu();let r;const i=()=>{const u=n.state();if(u!=null&&u.ownerWindow)return u.ownerWindow;if(u!=null&&u.triggerEl){const v=Te.ownerWindow(u.triggerEl);if(v)return v}if(t.ownerWindow)return t.ownerWindow;const h=r?Te.ownerWindow(r):null;return h||Ae.getActiveWindow().window},c=()=>{var u;return t.shortcutResolver??((u=n.state())==null?void 0:u.shortcutResolver)??n.shortcutResolver},a=u=>{var s;const h=u.target;if(!h||h.closest("[data-desktop-menu-depth]"))return;const v=(s=n.state())==null?void 0:s.triggerEl;v&&(v===h||v.contains(h))||n.close()};let m=null;o.createComputed(o.on(n.state,(u,h)=>{if(u===null||h!=null)return;const v=i().document.activeElement;m=to(v)?v:null}));const _=u=>{const h=m;if(m=null,h===null||!h.isConnected)return;const v=u.activeElement;(v===null||v===u.body||v.closest("[data-desktop-menu-depth]")!==null)&&h.focus()};return o.createEffect(()=>{if(!n.state())return;const u=i(),h=()=>{n.close()},v=()=>{n.close()};u.addEventListener("mousedown",a),u.addEventListener("blur",h),u.addEventListener("dragstart",v,!0),o.onCleanup(()=>{u.removeEventListener("mousedown",a),u.removeEventListener("blur",h),u.removeEventListener("dragstart",v,!0),n.state()===null&&_(u.document)})}),[(()=>{var u=eo(),h=r;return typeof h=="function"?e.use(h,u):r=u,u})(),e.createComponent(o.Show,{get when(){return n.state()},children:u=>e.createComponent(e.Portal,{get mount(){return i().document.body},get children(){return e.createComponent(Et,{get left(){return u().left},get top(){return u().top},get right(){return u().right},get bottom(){return u().bottom},get anchor(){return u().anchor},get anchorAlignment(){return u().anchorAlignment},get anchorPosition(){return u().anchorPosition},get items(){return u().items},depth:0,get hostWin(){return i()},get onRequestClose(){return n.close},get shortcutResolver(){return c()}})}})})]}e.delegateEvents(["mousedown","pointerdown","click","contextmenu","keydown"]);function no(t){return t?"nodeType"in t?{el:t,toggle:!0}:t.type==="contextmenu"?{el:void 0,toggle:!1}:{el:t.currentTarget??t.target??void 0,toggle:!0}:{el:void 0,toggle:!1}}function Pt(t){const[n,r]=o.createSignal(null);return{state:n,open:(a,m,_,u)=>{const{el:h,toggle:v}=no(u),s=n();if(v&&s&&h&&s.triggerEl===h){r(null);return}const k=u?Te.ownerWindow(u):null;r({left:a,top:m,anchor:{left:a,top:m,width:0,height:0},items:_,...k?{ownerWindow:k}:{},...h?{triggerEl:h}:{},...t!=null&&t.shortcutResolver?{shortcutResolver:t.shortcutResolver}:{}})},openWithPlacement:(a,m)=>{const _=n();if(_&&a.triggerEl&&_.triggerEl===a.triggerEl){r(null);return}r({...t!=null&&t.shortcutResolver?{shortcutResolver:t.shortcutResolver}:{},...a,items:m})},close:()=>r(null),shortcutResolver:t==null?void 0:t.shortcutResolver}}const at=Pt();function Tt(t){if(t.separator||t.type==="separator")return{type:"separator",id:t.id};const n=t.shortcut??t.hint,r=t.onSelect??t.onClick;return{id:t.id,label:t.label,...t.icon!==void 0?{icon:t.icon}:{},...n!==void 0?{shortcut:n}:{},...t.danger!==void 0?{danger:t.danger}:{},...t.disabled!==void 0?{disabled:t.disabled}:{},...r?{onSelect:r}:{},...t.submenu?{submenu:t.submenu.map(Tt)}:{}}}function oo(t,n){t.preventDefault(),t.stopPropagation(),at.open(t.clientX,t.clientY,n.map(Tt),t)}function ro(){at.close()}function io(){return e.createComponent(_t.DesktopContextMenuContext.Provider,{value:at,get children(){return e.createComponent(Dt,{})}})}const ao="vk_root_B3p1P",co="vk_header_m86aH",lo="vk_headerClosable_qZJYa",so="vk_title_iMvk7",uo="vk_headerActions_nNOSK",mo="vk_body_gPJbb",ho="vk_section_IQiWf",vo="vk_sectionHeader_kxaBm",fo="vk_sectionTitle_ygxTo vk_sectionLabel_WuN5V",go="vk_sectionAside_1geCf",bo="vk_field_KGZ79",wo="vk_fieldText_-F0vc",Co="vk_fieldLabel_Edhqk",_o="vk_fieldDescription_UIVq3",ko="vk_fieldControl_6qm3p",yo="vk_separator_VeGkl vk_separator_zMw59",So="vk_footer_yuP7q",$o="vk_footerBetween_UbaYB",po="vk_footerStretch_1rukw",re={root:ao,header:co,headerClosable:lo,title:so,headerActions:uo,body:mo,section:ho,sectionHeader:vo,sectionTitle:fo,sectionAside:go,field:bo,fieldText:wo,fieldLabel:Co,fieldDescription:_o,fieldControl:ko,separator:yo,footer:So,footerBetween:$o,footerStretch:po};var xo=e.template("<div>"),Ot=e.template("<span>"),Ao=e.template("<section><div>"),Lo=e.template("<div><div><span></span></div><div>"),Io=e.template("<div role=separator>");function Ie(...t){return t.filter(n=>!!n).join(" ")}function Mo(t){const[n,r]=o.splitProps(t,["class"]);return e.createComponent(Y.Panel.Root,e.mergeProps({get class(){return Ie(re.root,n.class)}},r))}function No(t){return e.createComponent(Y.Panel.Header,{get class(){return Ie(re.header,t.onClose!==void 0&&re.headerClosable,t.class)},get children(){return[e.createComponent(Y.Panel.Title,{as:"h3",get class(){return re.title},get children(){return t.title}}),e.createComponent(o.Show,{get when(){return t.actions!==void 0||t.onClose!==void 0},get children(){var n=xo();return e.insert(n,()=>t.actions,null),e.insert(n,e.createComponent(o.Show,{get when(){return t.onClose!==void 0},get children(){return e.createComponent(se.Button,{variant:"ghost",size:"xs",iconOnly:!0,get leadingIcon(){return e.createComponent(fe.VpClose,{})},get"aria-label"(){return t.closeLabel??f.t("Close")},onClick:()=>{var r;return(r=t.onClose)==null?void 0:r.call(t)}})}}),null),e.effect(()=>e.className(n,re.headerActions)),n}})]}})}function Eo(t){return e.createComponent(Y.Panel.Body,{get class(){return Ie(re.body,t.class)},get children(){return t.children}})}function Do(t){const n=o.createUniqueId();return(()=>{var r=Ao(),i=r.firstChild;return e.setAttribute(r,"aria-labelledby",n),e.insert(i,e.createComponent(Y.Panel.Title,{as:"h4",id:n,get class(){return re.sectionTitle},get children(){return t.title}}),null),e.insert(i,e.createComponent(o.Show,{get when(){return t.aside!==void 0},get children(){var c=Ot();return e.insert(c,()=>t.aside),e.effect(()=>e.className(c,re.sectionAside)),c}}),null),e.insert(r,()=>t.children,null),e.effect(c=>{var a=Ie(re.section,t.class),m=re.sectionHeader;return a!==c.e&&e.className(r,c.e=a),m!==c.t&&e.className(i,c.t=m),c},{e:void 0,t:void 0}),r})()}function Po(t){const n=o.createUniqueId(),r=o.createUniqueId();return(()=>{var i=Lo(),c=i.firstChild,a=c.firstChild,m=c.nextSibling;return e.setAttribute(a,"id",n),e.insert(a,()=>t.label),e.insert(c,e.createComponent(o.Show,{get when(){return t.description!==void 0},get children(){var _=Ot();return e.setAttribute(_,"id",r),e.insert(_,()=>t.description),e.effect(()=>e.className(_,re.fieldDescription)),_}}),null),e.insert(m,e.createComponent(Ce.FormFieldAriaProvider,{value:{labelId:n,describedBy:()=>t.description!==void 0?r:void 0,wrapsControlInLabel:!1},get children(){return t.children}})),e.effect(_=>{var u=Ie(re.field,t.class),h=re.fieldText,v=re.fieldLabel,s=re.fieldControl;return u!==_.e&&e.className(i,_.e=u),h!==_.t&&e.className(c,_.t=h),v!==_.a&&e.className(a,_.a=v),s!==_.o&&e.className(m,_.o=s),_},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()}function To(t){return(()=>{var n=Io();return e.effect(()=>e.className(n,Ie(re.separator,t.class))),n})()}function Oo(t){const n=()=>t.align==="between"?re.footerBetween:t.align==="stretch"?re.footerStretch:void 0;return e.createComponent(Y.Panel.Footer,{get class(){return Ie(re.footer,n(),t.class)},get children(){return t.children}})}const Wo={Root:Mo,Header:No,Body:Eo,Section:Do,Field:Po,Separator:To,Footer:Oo},Ro="vk_backdrop_OD2hy",Bo="vk_drawer_TB0OC",Fo="vk_placementRight_qWrAL",zo="vk_placementLeft_zWVlF",qo="vk_placementBottom_ZOZT3",Ho="vk_sizeSm_GISo4",Ko="vk_sizeMd_GHr9h",Uo="vk_sizeLg_RCTZF",Vo="vk_contained_edUdc",jo="vk_header_NeiDb",Yo="vk_title_ku48d",Go="vk_closeBtn_1vaaT",Xo="vk_body_XAjO6",Qo="vk_bodyContent_8qDK-",Jo="vk_footer_vRDdY",ce={backdrop:Ro,drawer:Bo,placementRight:Fo,placementLeft:zo,placementBottom:qo,sizeSm:Ho,sizeMd:Ko,sizeLg:Uo,contained:Vo,header:jo,title:Yo,closeBtn:Go,body:Xo,bodyContent:Qo,footer:Jo};var Zo=e.template("<div aria-hidden=true>"),er=e.template("<h3>"),ut=e.template("<div>"),tr=e.template("<footer>"),nr=e.template("<div role=dialog tabindex=-1><header><button type=button></button></header><div>");function or(t){let n=null;const r=Re(),i=()=>t.container!==void 0,c=o.createMemo(N=>{var E;return t.open?N??((E=t.container)!=null&&E.isConnected?t.container.ownerDocument:Ae.getActiveWindow().document):null},null),a=Je.useOverlayRegistration(()=>t.open,"drawer",{get type(){return i()?"popover":"modal"},element:()=>n!=null&&n.isConnected?n:null,document:()=>c()??void 0}),m=We({open:()=>t.open,ownerDocument:()=>c()??Ae.getActiveWindow().document}),_=N=>{n=N,i()?m.captureReturnFocus():m.captureDialog(N),he.requestOwnerAnimationFrame(N,()=>{if(!N.isConnected)return;(N.querySelector('button:not([disabled]), input:not([disabled]), [tabindex="0"]')??N).focus()})},u=N=>{r.noteMouseDown(N.target===N.currentTarget)},h=N=>{r.shouldCloseOnClick(N.target===N.currentTarget)&&t.onClose()},v=N=>{ve.resolveDialogShellKeyIntent(N.key,{confirmOnEnter:!1})==="trap"&&n&&ve.trapTabFocusWithin(n,N)},s=()=>t.placement??"right",k=()=>t.size??"md",g=()=>s()==="left"?ce.placementLeft:s()==="bottom"?ce.placementBottom:ce.placementRight,S=()=>k()==="sm"?ce.sizeSm:k()==="lg"?ce.sizeLg:ce.sizeMd;return o.createEffect(()=>{var W;const N=(W=c())==null?void 0:W.defaultView;if(!N)return;const E=$=>{!ge.isKey($,"Escape")||!a.isTopmost()||($.stopPropagation(),$.stopImmediatePropagation(),t.onClose())};N.addEventListener("keydown",E,!0),o.onCleanup(()=>N.removeEventListener("keydown",E,!0))}),e.createComponent(o.Show,{get when(){return c()},children:N=>e.createComponent(e.Portal,{get mount(){return t.container??N().body},get children(){return[(()=>{var E=Zo();return E.$$click=h,E.$$mousedown=u,e.effect(()=>e.className(E,`${ce.backdrop} ${i()?ce.contained:""}`)),E})(),(()=>{var E=nr(),W=E.firstChild,$=W.firstChild,O=W.nextSibling;return E.$$keydown=v,e.use(_,E),e.insert(W,e.createComponent(o.Show,{get when(){return t.title},get fallback(){return ut()},get children(){var w=er();return e.insert(w,()=>t.title),e.effect(()=>e.className(w,ce.title)),w}}),$),e.addEventListener($,"click",t.onClose,!0),e.insert($,e.createComponent(fe.VpClose,{"aria-hidden":"true"})),e.insert(O,e.createComponent(Le.OverlayScrollArea,{get children(){var w=ut();return e.insert(w,()=>t.children),e.effect(()=>e.className(w,ce.bodyContent)),w}})),e.insert(E,e.createComponent(o.Show,{get when(){return t.footer},get children(){var w=tr();return e.insert(w,()=>t.footer),e.effect(()=>e.className(w,ce.footer)),w}}),null),e.effect(w=>{var D=`${ce.drawer} ${g()} ${S()} ${i()?ce.contained:""} ${t.class??""}`,U=i()?void 0:"true",G=t.ariaLabel??t.title??f.t("Drawer"),j=ce.header,R=ce.closeBtn,ee=f.t("Close drawer"),J=f.t("Close"),X=ce.body;return D!==w.e&&e.className(E,w.e=D),U!==w.t&&e.setAttribute(E,"aria-modal",w.t=U),G!==w.a&&e.setAttribute(E,"aria-label",w.a=G),j!==w.o&&e.className(W,w.o=j),R!==w.i&&e.className($,w.i=R),ee!==w.n&&e.setAttribute($,"aria-label",w.n=ee),J!==w.s&&e.setAttribute($,"title",w.s=J),X!==w.h&&e.className(O,w.h=X),w},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),E})()]}})})}e.delegateEvents(["mousedown","click","keydown"]);const rr="vk_list_iYUkw",ir="vk_listViewport_JwNDT",ar="vk_section_zygSY",cr="vk_sectionHeader_m2b8a",lr="vk_sectionLabel_WuN5V",sr="vk_sectionAside_P5VF4",dr="vk_item_ZIjh8 vk_item_neWq-",ur="vk_itemSelected_HK9is vk_itemSelected_f4xDB",mr="vk_itemActive_GPKO0 vk_itemActive_vyOXZ",hr="vk_itemDanger_hwpDy",vr="vk_check_mPaKX vk_check_dO3aK",fr="vk_icon_QIgcd vk_itemIcon_bv6oS",gr="vk_text_urFay",br="vk_labelLine_1jtiD",wr="vk_label_DTLHt vk_label_zTITb",Cr="vk_badge_sFW5I",_r="vk_description_gm3kI",kr="vk_meta_zRD2G vk_shortcut_S1oQc",yr="vk_trailing_5nqrI",Sr="vk_entry_FJLiI",$r="vk_entryMain_2COS4",pr="vk_entryDisabled_nigmQ vk_itemDisabled_OROlk",xr="vk_separator_NRGSq vk_separator_zMw59",Ar="vk_empty_TWf-X vk_empty_oOHu3",Lr="vk_search_uj4-c",Ir="vk_disclosure_WxAg6",Mr="vk_disclosureChevron_aw7Fx vk_chevron_pb9D1",Nr="vk_disclosureChevronOpen_WImPp",Er="vk_disclosureBody_StI9b",Dr="vk_disclosureBodyIndented_t4GxF",Pr="vk_visuallyHidden_u-q6B",K={list:rr,listViewport:ir,section:ar,sectionHeader:cr,sectionLabel:lr,sectionAside:sr,item:dr,itemSelected:ur,itemActive:mr,itemDanger:hr,check:vr,icon:fr,text:gr,labelLine:br,label:wr,badge:Cr,description:_r,meta:kr,trailing:yr,entry:Sr,entryMain:$r,entryDisabled:pr,separator:xr,empty:Ar,search:Lr,disclosure:Ir,disclosureChevron:Mr,disclosureChevronOpen:Nr,disclosureBody:Er,disclosureBodyIndented:Dr,visuallyHidden:Pr};var xe=e.template("<span>"),Tr=e.template("<div role=group><div><span>"),nt=e.template("<span aria-hidden=true>"),Wt=e.template("<span><span><span>"),Or=e.template("<div><span>"),Wr=e.template("<div role=separator>"),ct=e.template("<div>"),Rr=e.template("<div role=group>");function be(...t){return t.filter(n=>!!n).join(" ")}function Rt(t){return e.createComponent(Le.OverlayScrollArea,{get rootClass(){return be(K.list,t.class)},get viewportClass(){return K.listViewport},get role(){return t.role},get"aria-label"(){return t.ariaLabel},get children(){return t.children}})}function Bt(t){const n=o.createUniqueId();return(()=>{var r=Tr(),i=r.firstChild,c=i.firstChild;return e.setAttribute(r,"aria-labelledby",n),e.setAttribute(c,"id",n),e.insert(c,()=>t.label),e.insert(i,e.createComponent(o.Show,{get when(){return t.aside!==void 0},get children(){var a=xe();return e.insert(a,()=>t.aside),e.effect(()=>e.className(a,K.sectionAside)),a}}),null),e.insert(r,()=>t.children,null),e.effect(a=>{var m=be(K.section,t.class),_=K.sectionHeader,u=K.sectionLabel;return m!==a.e&&e.className(r,a.e=m),_!==a.t&&e.className(i,a.t=_),u!==a.a&&e.className(c,a.a=u),a},{e:void 0,t:void 0,a:void 0}),r})()}function Ft(t){const n=o.createUniqueId(),r=()=>t.role??(t.checked!==void 0?"menuitemcheckbox":"menuitem"),i=()=>r()==="menuitemcheckbox"||r()==="menuitemradio",c=()=>t.checked!==void 0||t.reserveCheck===!0,a=()=>t.icon!==void 0||t.reserveIcon===!0,m=()=>t.trailing!==void 0,_=()=>m()&&r()==="menuitem",u=()=>[e.createComponent(o.Show,{get when(){return c()},get children(){var s=nt();return e.insert(s,e.createComponent(o.Show,{get when(){return t.checked===!0},get children(){return e.createComponent(fe.VpCheck,{})}})),e.effect(()=>e.className(s,K.check)),s}}),e.createComponent(o.Show,{get when(){return a()},get children(){var s=nt();return e.insert(s,()=>t.icon),e.effect(()=>e.className(s,K.icon)),s}}),(()=>{var s=Wt(),k=s.firstChild,g=k.firstChild;return e.insert(g,()=>t.label),e.insert(k,e.createComponent(o.Show,{get when(){return t.badge!==void 0},get children(){var S=xe();return e.insert(S,()=>t.badge),e.effect(()=>e.className(S,K.badge)),S}}),null),e.insert(s,e.createComponent(o.Show,{get when(){return t.description!==void 0},get children(){var S=xe();return e.insert(S,()=>t.description),e.effect(()=>e.className(S,K.description)),S}}),null),e.effect(S=>{var N=K.text,E=t.title??t.hint,W=K.labelLine,$=K.label;return N!==S.e&&e.className(s,S.e=N),E!==S.t&&e.setAttribute(s,"title",S.t=E),W!==S.a&&e.className(k,S.a=W),$!==S.o&&e.className(g,S.o=$),S},{e:void 0,t:void 0,a:void 0,o:void 0}),s})(),e.createComponent(o.Show,{get when(){return t.meta!==void 0},get children(){var s=xe();return e.insert(s,()=>t.meta),e.effect(()=>e.className(s,K.meta)),s}}),e.createComponent(o.Show,{get when(){return _()},get children(){var s=xe();return s.$$click=k=>k.stopPropagation(),e.insert(s,()=>t.trailing),e.effect(()=>e.className(s,K.trailing)),s}}),e.createComponent(o.Show,{get when(){return t.hint},get children(){var s=xe();return e.setAttribute(s,"id",n),e.insert(s,()=>t.hint),e.effect(()=>e.className(s,K.visuallyHidden)),s}})],h=()=>be((t.selected||t.pressed)&&K.itemSelected,t.active&&K.itemActive,t.danger&&K.itemDanger),v=s=>e.createComponent(Ce.PressableSurface,{get as(){return _()?"div":"button"},ref:k=>{var g;return(g=t.ref)==null?void 0:g.call(t,k)},get id(){return t.id},get role(){return r()},class:s,get disabled(){return t.disabled},get"aria-checked"(){return e.memo(()=>!!i())()?t.checked===!0:void 0},get"aria-selected"(){return e.memo(()=>r()==="option")()?t.selected===!0:void 0},get"aria-current"(){return(r()==="menuitem"||r()==="button")&&t.selected===!0?"true":void 0},get"aria-pressed"(){return e.memo(()=>r()==="button"&&t.pressed!==void 0)()?t.pressed:void 0},get"aria-describedby"(){return t.hint?n:void 0},onClick:k=>{var g;t.disabled||(g=t.onSelect)==null||g.call(t,k)},onContextMenu:k=>{var g;return(g=t.onContextMenu)==null?void 0:g.call(t,k)},get children(){return u()}});return e.createComponent(o.Show,{get when(){return e.memo(()=>!!m())()&&!_()},get fallback(){return v(be(K.item,h(),t.class))},get children(){var s=Or(),k=s.firstChild;return e.insert(s,()=>v(K.entryMain),k),e.insert(k,()=>t.trailing),e.effect(g=>{var S=be(K.item,K.entry,h(),t.disabled&&K.entryDisabled,t.class),N=K.trailing;return S!==g.e&&e.className(s,g.e=S),N!==g.t&&e.className(k,g.t=N),g},{e:void 0,t:void 0}),s}})}function zt(t){return(()=>{var n=Wr();return e.effect(()=>e.className(n,be(K.separator,t.class))),n})()}function Br(t){return(()=>{var n=ct();return e.insert(n,()=>t.children),e.effect(()=>e.className(n,be(K.empty,t.class))),n})()}function Fr(t){return(()=>{var n=ct();return e.insert(n,()=>t.children),e.effect(()=>e.className(n,be(K.search,t.class))),n})()}function zr(t){const n=o.createUniqueId(),r=o.createUniqueId(),[i,c]=o.createSignal(t.defaultOpen??!1),a=()=>t.open!==void 0?t.open:i(),m=()=>t.icon!==void 0||t.reserveIcon===!0,_=()=>{var h;if(t.disabled)return;const u=!a();t.open===void 0&&c(u),(h=t.onToggle)==null||h.call(t,u)};return(()=>{var u=ct();return e.insert(u,e.createComponent(Ce.PressableSurface,{id:n,get class(){return K.item},get disabled(){return t.disabled},get"aria-expanded"(){return a()?"true":"false"},get"aria-controls"(){return a()?r:void 0},onClick:_,get children(){return[e.createComponent(o.Show,{get when(){return m()},get children(){var h=nt();return e.insert(h,()=>t.icon),e.effect(()=>e.className(h,K.icon)),h}}),(()=>{var h=Wt(),v=h.firstChild,s=v.firstChild;return e.insert(s,()=>t.label),e.insert(h,e.createComponent(o.Show,{get when(){return t.description!==void 0},get children(){var k=xe();return e.insert(k,()=>t.description),e.effect(()=>e.className(k,K.description)),k}}),null),e.effect(k=>{var g=K.text,S=K.labelLine,N=K.label;return g!==k.e&&e.className(h,k.e=g),S!==k.t&&e.className(v,k.t=S),N!==k.a&&e.className(s,k.a=N),k},{e:void 0,t:void 0,a:void 0}),h})(),e.createComponent(fe.VpChevronDown,{get class(){return be(K.disclosureChevron,a()&&K.disclosureChevronOpen)},"aria-hidden":"true"})]}}),null),e.insert(u,e.createComponent(o.Show,{get when(){return a()},get children(){var h=Rr();return e.setAttribute(h,"id",r),e.setAttribute(h,"aria-labelledby",n),e.insert(h,()=>t.children),e.effect(()=>e.className(h,be(K.disclosureBody,m()&&K.disclosureBodyIndented,t.bodyClass))),h}}),null),e.effect(()=>e.className(u,be(K.disclosure,t.class))),u})()}e.delegateEvents(["click"]);const qr="vk_menuList_Rdcyj",Hr={menuList:qr};var Kr=e.template("<div style=display:inline-block>");function qt(t){return"type"in t&&t.type==="separator"}function Ht(t){return"type"in t&&t.type==="section"}function Ur(t){const n=[];let r,i=[];const c=()=>{i.length>0&&n.push({kind:"rows",label:r,rows:i}),r=void 0,i=[]};for(const a of t)qt(a)?(c(),n.push({kind:"separator"})):Ht(a)?(c(),r=a.label):i.push(a);return c(),n}function Vr(t){const[n,r]=o.createSignal(!1);let i=null;const c=()=>t.open!==void 0?t.open:n(),a=g=>{t.onOpenChange&&t.onOpenChange(g),t.open===void 0&&r(g)},m=()=>{t.disabled||a(!c())},_=g=>{var S;g.disabled||(a(!1),(S=g.onSelect)==null||S.call(g))},u=o.createMemo(()=>t.items.filter(g=>!qt(g)&&!Ht(g))),h=o.createMemo(()=>u().some(g=>!!g.icon)),v=o.createMemo(()=>u().some(g=>g.checked!==void 0)),s=o.createMemo(()=>Ur(t.items)),k=g=>e.createComponent(o.For,{each:g,children:S=>e.createComponent(Ft,{get id(){return S.id},get label(){return S.label},get description(){return S.description},get icon(){return S.icon},get reserveIcon(){return h()},get checked(){return S.checked},get reserveCheck(){return v()},get selected(){return S.selected},get meta(){return S.shortcut},get danger(){return S.danger},get disabled(){return S.disabled},onSelect:()=>_(S)})});return(()=>{var g=Kr();return e.insert(g,e.createComponent(o.Show,{get when(){return t.trigger},get fallback(){return e.createComponent(se.Button,{ref:S=>i=S,get variant(){return t.variant??"secondary"},get size(){return t.size??"sm"},get disabled(){return t.disabled},onClick:m,"aria-haspopup":"menu",get"aria-expanded"(){return c()},get"aria-label"(){return t.ariaLabel??t.label??f.t("Actions")},get trailingIcon(){return e.createComponent(fe.VpChevronDown,{"aria-hidden":"true"})},get children(){return t.label??f.t("Actions")}})},children:S=>S()({open:c(),toggle:m,ref:N=>i=N,ariaProps:{"aria-haspopup":"menu","aria-expanded":c()}})}),null),e.insert(g,e.createComponent(rn.Popover,{open:c,onClose:()=>a(!1),anchor:()=>i,get placement(){return t.placement??"bottom-start"},role:"menu",get ariaLabel(){return t.ariaLabel??t.label??f.t("Dropdown menu")},get class(){return t.surfaceClass},get children(){return e.createComponent(Rt,{get class(){return`${Hr.menuList} ${t.menuClass??""}`},get children(){return e.createComponent(o.For,{get each(){return s()},children:S=>S.kind==="separator"?e.createComponent(zt,{}):S.label!==void 0?e.createComponent(Bt,{get label(){return S.label},get children(){return k(S.rows)}}):k(S.rows)})}})}}),null),e.effect(()=>e.className(g,t.class)),g})()}const jr="vk_surface_3ZOnl",Yr="vk_item_neWq-",Gr="vk_check_dO3aK",Xr="vk_shortcut_S1oQc",Qr="vk_chevron_pb9D1",Jr="vk_separator_zMw59",Zr="vk_itemActive_vyOXZ",ei="vk_itemSelected_f4xDB",ti="vk_itemDisabled_OROlk",ni="vk_label_zTITb",oi="vk_itemIcon_bv6oS",ri="vk_viewport_B94pk",ii="vk_empty_oOHu3",me={surface:jr,item:Yr,check:Gr,shortcut:Xr,chevron:Qr,separator:Jr,itemActive:Zr,itemSelected:ei,itemDisabled:ti,label:ni,itemIcon:oi,viewport:ri,empty:ii},ai=Object.freeze({surface:me.surface,viewport:me.viewport,item:me.item,itemActive:me.itemActive,itemSelected:me.itemSelected,itemDisabled:me.itemDisabled,label:me.label,itemIcon:me.itemIcon,check:me.check,shortcut:me.shortcut,chevron:me.chevron,separator:me.separator,empty:me.empty});var ci=e.template("<span aria-hidden=true style=display:none>"),li=e.template("<div><span>"),si=e.template("<div role=tooltip>"),di=e.template("<span>");function ui(){let t,n;const[r,i]=o.createSignal({top:-9999,left:-9999}),c=qe.tooltipCoordinator.activeTooltip,a=()=>Te.ownerWindow(t),m=()=>{const h=c(),v=a();return h!==null&&v!==null&&Te.ownerWindow(h.target)===v};o.createEffect(()=>{const h=c();if(!h||!m()){i({top:-9999,left:-9999});return}const v=()=>{if(!n||!h.target)return;if(!h.target.isConnected){qe.tooltipCoordinator.hideTooltip(h.target);return}const k=a();if(!k)return;const g=h.target.getBoundingClientRect(),S=n.getBoundingClientRect(),N=qe.computeAnchoredTooltipPosition({anchorRect:g,tooltipSize:{width:S.width||n.offsetWidth,height:S.height||n.offsetHeight},viewport:{width:k.innerWidth||1024,height:k.innerHeight||768},placement:h.placement,offset:h.offset});i({top:N.top,left:N.left})};v(),queueMicrotask(()=>{v()});const s=a();s&&typeof s.addEventListener=="function"&&(s.addEventListener("resize",v),o.onCleanup(()=>{typeof s.removeEventListener=="function"&&s.removeEventListener("resize",v)}))});const _=()=>{const h=c();return h?typeof h.content=="function"?h.content():h.content:null},u=()=>{const h=c();if(h)return typeof h.shortcut=="function"?h.shortcut():h.shortcut};return[(()=>{var h=ci(),v=t;return typeof v=="function"?e.use(v,h):t=h,h})(),e.createComponent(o.Show,{get when(){return e.memo(()=>!!m())()?a():null},children:h=>e.createComponent(ye.OverlayPortal,{type:"tooltip",get mount(){return h().document.body},element:()=>n,idPrefix:"tooltip-host",get children(){var v=si();return e.use(s=>{n=s},v),e.insert(v,e.createComponent(o.Show,{get when(){return u()},get fallback(){return(()=>{var s=di();return e.insert(s,_),s})()},get children(){var s=li(),k=s.firstChild;return e.insert(k,_),e.insert(s,e.createComponent(Ct.Kbd,{size:"xs",get shortcut(){return u()}}),null),e.effect(()=>e.className(s,Pe.styles.tooltipInner)),s}})),e.effect(s=>{var E;var k=(E=c())==null?void 0:E.id,g=`${Pe.styles.tooltip} ${Pe.styles.hostTooltip}`,S=`${r().top}px`,N=`${r().left}px`;return k!==s.e&&e.setAttribute(v,"id",s.e=k),g!==s.t&&e.className(v,s.t=g),S!==s.a&&e.setStyleProperty(v,"top",s.a=S),N!==s.o&&e.setStyleProperty(v,"left",s.o=N),s},{e:void 0,t:void 0,a:void 0,o:void 0}),v}})})]}function Kt(t,n){return t==="Escape"?"dismiss":t==="Enter"&&n.step==="name"&&n.nameMatches?"advance":"none"}const mi="vk_overlay_Fd-y-",hi="vk_dialog_Yf7zX",vi="vk_header_CYXMR",fi="vk_warningIcon_qizN5",gi="vk_title_DPV4m vk_titleLg_Iswm3",bi="vk_body_Zvd50",wi="vk_description_n-sBy",Ci="vk_resourceLine_BeZWP",_i="vk_resourceName_JQ9EK",ki="vk_field_JETn-",yi="vk_fieldLabel_u8YkC",Si="vk_input_Smbpd",$i="vk_inputMatch_k6go-",pi="vk_optionsList_XwOCV",xi="vk_optionRow_OYLHB",Ai="vk_optionLabel_pJHcY",Li="vk_optionDescription_Zi6is",Ii="vk_finalNote_PVV7h",Mi="vk_consequenceNote_oaOZl",Ni="vk_selectedOptions_7tn0k",Ei="vk_selectedList_LFTe1",Di="vk_codeScroll_7A6w3",Pi="vk_code_ozAuk",Ti="vk_codePre_01c25",Oi="vk_countdown_CJhCw",Wi="vk_footer_v0cjd",Ri="vk_footerSpacer_jQepg",Q={overlay:mi,dialog:hi,header:vi,warningIcon:fi,title:gi,body:bi,description:wi,resourceLine:Ci,resourceName:_i,field:ki,fieldLabel:yi,input:Si,inputMatch:$i,optionsList:pi,optionRow:xi,optionLabel:Ai,optionDescription:Li,finalNote:Ii,consequenceNote:Mi,selectedOptions:Ni,selectedList:Ei,codeScroll:Di,code:Pi,codePre:Ti,countdown:Oi,footer:Wi,footerSpacer:Ri},Ut={delete:{reversible:!1,lead:()=>f.t("You are about to permanently delete"),note:()=>f.t("This action cannot be undone."),confirmLabel:()=>f.t("Delete"),finalLabel:()=>f.t("Yes, delete now")},overwrite:{reversible:!1,lead:()=>f.t("You are about to delete or replace the existing data of"),note:()=>f.t("This action cannot be undone."),confirmLabel:()=>f.t("Continue"),finalLabel:()=>f.t("Yes, overwrite now")},convert:{reversible:!1,lead:()=>f.t("You are about to convert the stored values of"),note:()=>f.t("Values that do not fit the new type are rounded or cut; they do not come back."),confirmLabel:()=>f.t("Continue"),finalLabel:()=>f.t("Yes, convert now")},"end-session":{reversible:!1,lead:()=>f.t("You are about to terminate"),note:()=>f.t("An ended session cannot be resumed."),confirmLabel:()=>f.t("Continue"),finalLabel:()=>f.t("Yes, terminate now")},close:{reversible:!1,lead:()=>f.t("You are about to close"),note:()=>f.t("Every session inside it ends and its open transaction is rolled back; the data is kept and it can be opened again."),confirmLabel:()=>f.t("Close"),finalLabel:()=>f.t("Yes, close now")},"lock-out":{reversible:!1,lead:()=>f.t("You are about to take access away from the connected role"),note:()=>f.t("Open sessions keep working, but this connection cannot log in as this role again."),confirmLabel:()=>f.t("Continue"),finalLabel:()=>f.t("Yes, change it now")},"cancel-statement":{reversible:!0,lead:()=>f.t("You are about to stop the running statement of"),note:()=>f.t("The session stays open; the statement can be run again."),confirmLabel:()=>f.t("Stop statement")},"change-privileges":{reversible:!0,lead:()=>f.t("You are about to change the privileges of"),note:()=>f.t("The change can be reverted."),confirmLabel:()=>f.t("Apply")},change:{reversible:!0,lead:()=>f.t("You are about to change"),note:()=>f.t("The change can be reverted."),confirmLabel:()=>f.t("Apply")},rewrite:{reversible:!0,lead:()=>f.t("You are about to rebuild"),note:()=>f.t("No data is lost."),confirmLabel:()=>f.t("Rebuild")},"discard-cache":{reversible:!0,lead:()=>f.t("You are about to discard the cached contents of"),note:()=>f.t("No data is lost; the cache fills again as sessions run."),confirmLabel:()=>f.t("Discard")}};function lt(t){return!Ut[t].reversible}function Bi(t){return lt(t)?"typed":"confirm"}function Vt(t){const n=Ut[t],r={lead:n.lead(),note:n.note(),confirmLabel:n.confirmLabel()};return n.reversible?{...r,level:"confirm"}:{...r,level:"typed",finalLabel:n.finalLabel()}}var Fi=e.template("<div><span>"),zi=e.template("<span> <span>(<!>s)"),qi=e.template("<p> <span>"),Hi=e.template("<label><span>"),Ki=e.template("<div>"),Ui=e.template("<span>"),Vi=e.template("<span><span>"),ji=e.template("<p data-consequence-line> <span></span>."),Yi=e.template("<p>"),Gi=e.template("<div><span></span><ul>"),Xi=e.template("<li>"),Qi=e.template("<pre><code>");function jt(t){return(()=>{var n=Fi(),r=n.firstChild;return e.insert(n,e.createComponent(se.Button,{size:"md",variant:"secondary",get onClick(){return t.onCancel},get children(){return f.t("Cancel")}}),r),e.insert(n,e.createComponent(o.Show,{get when(){return t.step()==="name"},get children(){return e.createComponent(se.Button,{size:"md",variant:"dangerSolid",get disabled(){return!t.nameMatches()},get onClick(){return t.onAdvance},get children(){return t.confirmLabel()}})}}),null),e.insert(n,e.createComponent(o.Show,{get when(){return t.step()==="countdown"},get children(){return[e.createComponent(se.Button,{size:"md",variant:"secondary",get onClick(){return t.onBack},get children(){return f.t("Back")}}),e.createComponent(se.Button,{size:"md",variant:"dangerSolid",get disabled(){return!t.finalEnabled()},get onClick(){return t.onConfirm},get children(){return e.createComponent(o.Show,{get when(){return t.finalEnabled()},get fallback(){return(()=>{var i=zi(),c=i.firstChild,a=c.nextSibling,m=a.firstChild,_=m.nextSibling;return _.nextSibling,e.insert(i,()=>t.finalLabel(),c),e.insert(a,()=>t.countdown(),_),e.effect(()=>e.className(a,Q.countdown)),i})()},get children(){return t.finalLabel()}})}})]}}),null),e.insert(n,e.createComponent(o.Show,{get when(){return t.step()==="confirm"},get children(){return e.createComponent(se.Button,{size:"md",variant:"primary",get onClick(){return t.onConfirm},get children(){return t.confirmLabel()}})}}),null),e.effect(i=>{var c=Q.footer,a=Q.footerSpacer;return c!==i.e&&e.className(n,i.e=c),a!==i.t&&e.className(r,i.t=a),i},{e:void 0,t:void 0}),n})()}function Yt(t){return[(()=>{var n=qi(),r=n.firstChild,i=r.nextSibling;return e.insert(n,()=>f.t("To confirm, type the {label} below:",{label:t.request().resourceLabel}),r),e.insert(i,()=>t.request().resourceName),e.effect(c=>{var a=Q.resourceLine,m=Q.resourceName;return a!==c.e&&e.className(n,c.e=a),m!==c.t&&e.className(i,c.t=m),c},{e:void 0,t:void 0}),n})(),(()=>{var n=Hi(),r=n.firstChild;return e.insert(r,()=>t.request().resourceLabel),e.insert(n,e.createComponent(Ce.Input,{ref(i){var c=t.inputRef;typeof c=="function"?c(i):t.inputRef=i},get class(){return t.inputClass()},type:"text",autocomplete:"off",spellcheck:!1,get value(){return t.typedName()},onInput:i=>t.setTypedName(i.currentTarget.value),get"aria-label"(){return t.request().resourceLabel}}),null),e.effect(i=>{var c=Q.field,a=Q.fieldLabel;return c!==i.e&&e.className(n,i.e=c),a!==i.t&&e.className(r,i.t=a),i},{e:void 0,t:void 0}),n})()]}function ot(t){return e.createComponent(o.Show,{get when(){return t.options().length>0},get children(){var n=Ki();return e.insert(n,e.createComponent(o.For,{get each(){return t.options()},children:r=>e.createComponent(Pe.Checkbox,{get class(){return Q.optionRow},get checked(){return!!t.optionState()[r.id]},onChange:()=>t.toggleOption(r.id),get ariaLabel(){return r.label},get children(){var i=Vi(),c=i.firstChild;return e.insert(c,()=>r.label),e.insert(i,e.createComponent(o.Show,{get when(){return r.description},get children(){var a=Ui();return e.insert(a,()=>r.description),e.effect(()=>e.className(a,Q.optionDescription)),a}}),null),e.effect(()=>e.className(i,Q.optionLabel)),i}})})),e.effect(()=>e.className(n,Q.optionsList)),n}})}function rt(t){return[(()=>{var n=ji(),r=n.firstChild,i=r.nextSibling;return e.insert(n,()=>t.copy.lead,r),e.insert(i,()=>t.resourceName),e.effect(c=>{var a=Q.resourceLine,m=Q.resourceName;return a!==c.e&&e.className(n,c.e=a),m!==c.t&&e.className(i,c.t=m),c},{e:void 0,t:void 0}),n})(),(()=>{var n=Yi();return e.insert(n,()=>t.copy.note),e.effect(()=>e.className(n,Q.consequenceNote)),n})()]}function Gt(t){return e.createComponent(o.Show,{get when(){return t.options().length>0},get children(){var n=Gi(),r=n.firstChild,i=r.nextSibling;return e.insert(r,()=>f.t("Selected options")),e.insert(i,e.createComponent(o.For,{get each(){return t.options()},children:c=>(()=>{var a=Xi();return e.insert(a,()=>c.label),a})()})),e.effect(c=>{var a=Q.selectedOptions,m=Q.fieldLabel,_=Q.selectedList;return a!==c.e&&e.className(n,c.e=a),m!==c.t&&e.className(r,c.t=m),_!==c.a&&e.className(i,c.a=_),c},{e:void 0,t:void 0,a:void 0}),n}})}function Xt(t){return e.createComponent(Le.OverlayScrollArea,{get rootClass(){return Q.codeScroll},get viewportClass(){return Q.code},get children(){var n=Qi(),r=n.firstChild;return e.insert(r,()=>t.code),e.effect(i=>{var c=Q.codePre,a=f.t("Statement");return c!==i.e&&e.className(n,i.e=c),a!==i.t&&e.setAttribute(n,"aria-label",i.t=a),i},{e:void 0,t:void 0}),n}})}var mt=e.template("<p>"),Ji=e.template("<div tabindex=-1 role=presentation><div role=alertdialog aria-modal=true tabindex=-1><div><span aria-hidden=true>!</span><h3></h3></div><div>");const et=t=>lt(t.consequence),Zi=5;function ea(t){const n=o.createUniqueId(),r=o.createUniqueId(),[i,c]=o.createSignal(null),[a,m]=o.createSignal("name"),[_,u]=o.createSignal(""),[h,v]=o.createSignal({}),[s,k]=o.createSignal(0);let g=null,S=null,N=!1;const E=()=>{var d;return((d=i())==null?void 0:d.targetWin)??(t==null?void 0:t())??Ae.getMainWindow().window},W=()=>E().document,$=We({open:()=>i()!==null,ownerDocument:W});let O=null;const w=Re(),D=()=>{const d=g;g=null,d==null||d()},U=()=>{D();const d=S;S=null,d==null||d(),c(null)},G=()=>{D(),m("name"),u(""),v({}),k(0)},j=d=>{const M=i();if(!M)return;const I={confirmed:d,options:{...h()}};U(),G(),M.resolve(I)},R=()=>{const d=i();d&&(U(),G(),d.resolve({confirmed:!1,options:{}}))};o.onCleanup(()=>{N=!0,R()});const ee=d=>{var I;if(R(),N)return Promise.resolve({confirmed:!1,options:{}});const M=((I=d.host)==null?void 0:I.call(d))??(t==null?void 0:t())??Ae.getActiveWindow().window;return M.closed?Promise.resolve({confirmed:!1,options:{}}):new Promise(L=>{const P={};for(const H of d.options??[])P[H.id]=!!H.default;G(),v(P),et(d)||m("confirm");const A={...d,resolve:L,targetWin:M},p=()=>{i()===A&&R()};M.addEventListener("pagehide",p),M.addEventListener("unload",p),S=()=>{M.removeEventListener("pagehide",p),M.removeEventListener("unload",p)},c(A)})},J=o.createMemo(()=>{const d=i();return d?_().trim()===d.resourceName.trim():!1}),X=()=>{const d=i();if(!d||!et(d)||!J())return;const M=d.countdownSeconds??Zi;D(),m("countdown"),O!==null&&!O.contains(O.ownerDocument.activeElement)&&O.focus(),k(M);const I=d.targetWin;let L=!0;const P=I.setInterval(()=>{!L||i()!==d||k(A=>A<=1?(D(),0):A-1)},1e3);g=()=>{L=!1,I.clearInterval(P)}},C=()=>{D(),m("name")};o.createEffect(()=>{i()===null&&D()}),o.onCleanup(D);const T=d=>{w.noteMouseDown(d.target===d.currentTarget)},b=d=>{w.shouldCloseOnClick(d.target===d.currentTarget)&&j(!1)},y=d=>{const M=Kt(d.key,{step:a(),nameMatches:J()});M==="dismiss"?(d.stopPropagation(),j(!1)):M==="advance"?(d.preventDefault(),X()):O&&ve.trapTabFocusWithin(O,d)},l=d=>{O=d,$.captureDialog(d),he.requestOwnerAnimationFrame(d,()=>{d.contains(d.ownerDocument.activeElement)||d.focus()})};return[()=>{const d=()=>i(),M=()=>{var F;return((F=d())==null?void 0:F.options)??[]},I=o.createMemo(()=>{const F=d();return F===null?null:Vt(F.consequence)}),L=()=>a()==="countdown"&&s()===0,P=()=>{const F=d();return F!==null&&et(F)?F:null},A=()=>{var F,ne;return((F=d())==null?void 0:F.confirmLabel)??((ne=I())==null?void 0:ne.confirmLabel)??""},p=()=>{var ne;const F=I();return((ne=P())==null?void 0:ne.finalConfirmLabel)??((F==null?void 0:F.level)==="typed"?F.finalLabel:A())},H=()=>M().filter(F=>h()[F.id]===!0),z=F=>{v(ne=>({...ne,[F]:!ne[F]}))},q=F=>{queueMicrotask(()=>F.focus())},oe=()=>`${Q.input} ${J()?Q.inputMatch:""}`;return e.createComponent(o.Show,{get when(){return d()!==null},get children(){return e.createComponent(ye.OverlayPortal,{modal:!0,get mount(){return W().body},idPrefix:"dangerous-action-dialog",get children(){var F=Ji(),ne=F.firstChild,ke=ne.firstChild,Se=ke.firstChild,de=Se.nextSibling,ie=ke.nextSibling;return F.$$keydown=B=>{ge.isKey(B,"Escape")&&j(!1)},F.$$click=b,F.$$mousedown=T,ne.$$keydown=y,e.use(l,ne),e.setAttribute(ne,"aria-labelledby",n),e.setAttribute(de,"id",n),e.insert(de,()=>{var B;return((B=d())==null?void 0:B.title)??""}),e.insert(ie,e.createComponent(o.Show,{get when(){var B;return(B=d())==null?void 0:B.place},children:B=>e.createComponent(ve.ActionPlaceRow,{id:r,get place(){return B()}})}),null),e.insert(ie,e.createComponent(o.Show,{get when(){var B;return(B=d())==null?void 0:B.description},get children(){var B=mt();return e.insert(B,()=>d().description),e.effect(()=>e.className(B,Q.description)),B}}),null),e.insert(ie,e.createComponent(o.Show,{get when(){var B;return(B=d())==null?void 0:B.code},children:B=>e.createComponent(Xt,{get code(){return B()}})}),null),e.insert(ie,e.createComponent(o.Show,{get when(){return e.memo(()=>a()==="name")()?P():null},children:B=>[e.createComponent(Yt,{request:B,typedName:_,setTypedName:u,inputRef:q,inputClass:oe}),e.createComponent(ot,{options:M,optionState:h,toggleOption:z})]}),null),e.insert(ie,e.createComponent(o.Show,{get when(){return e.memo(()=>a()==="countdown")()?I():null},children:B=>[e.createComponent(rt,{get copy(){return B()},get resourceName(){var ae;return((ae=d())==null?void 0:ae.resourceName)??""}}),e.createComponent(Gt,{options:H}),(()=>{var ae=mt();return e.insert(ae,e.createComponent(o.Show,{get when(){return s()>0},get fallback(){return f.t("Press the button below to confirm.")},get children(){return f.t("The confirm button unlocks in {count}s.",{count:s()})}})),e.effect(()=>e.className(ae,Q.finalNote)),ae})()]}),null),e.insert(ie,e.createComponent(o.Show,{get when(){return e.memo(()=>a()==="confirm")()?I():null},children:B=>[e.createComponent(rt,{get copy(){return B()},get resourceName(){var ae;return((ae=d())==null?void 0:ae.resourceName)??""}}),e.createComponent(ot,{options:M,optionState:h,toggleOption:z})]}),null),e.insert(ne,e.createComponent(jt,{step:a,nameMatches:J,finalEnabled:L,countdown:s,confirmLabel:A,finalLabel:p,onCancel:()=>j(!1),onAdvance:X,onBack:C,onConfirm:()=>j(!0)}),null),e.effect(B=>{var Fe,Ye;var ae=Q.overlay,Me=Q.dialog,Ke=(Fe=d())!=null&&Fe.place?r:void 0,Ue=(Ye=I())==null?void 0:Ye.level,_e=Q.header,Be=Q.warningIcon,Ve=Q.title,je=Q.body;return ae!==B.e&&e.className(F,B.e=ae),Me!==B.t&&e.className(ne,B.t=Me),Ke!==B.a&&e.setAttribute(ne,"aria-describedby",B.a=Ke),Ue!==B.o&&e.setAttribute(ne,"data-confirmation-level",B.o=Ue),_e!==B.i&&e.className(ke,B.i=_e),Be!==B.n&&e.className(Se,B.n=Be),Ve!==B.s&&e.className(de,B.s=Ve),je!==B.h&&e.className(ie,B.h=je),B},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),F}})}})},ee]}e.delegateEvents(["mousedown","click","keydown"]);const ta="vk_window_cNPxa",na="vk_maximized_nbnO1",oa="vk_minimized_7iRrM",ra="vk_titlebar_x5HLa",ia="vk_titlebarDragging_UvwHD",aa="vk_titleInfo_CfnKC",ca="vk_windowIcon_kwo8N",la="vk_windowTitle_oh-oF",sa="vk_windowControls_VpW8D",da="vk_controlBtn_KeaeH",ua="vk_closeBtn_Mb5cO",ma="vk_body_n-l67",ha="vk_resizeGrip_NFWQc",le={window:ta,maximized:na,minimized:oa,titlebar:ra,titlebarDragging:ia,titleInfo:aa,windowIcon:ca,windowTitle:la,windowControls:sa,controlBtn:da,closeBtn:ua,body:ma,resizeGrip:ha};var va=e.template("<span>"),fa=e.template("<button type=button>"),ga=e.template("<div aria-hidden=true>"),ba=e.template("<div role=dialog tabindex=-1><div><div><span></span></div><div><button type=button></button><button type=button></button><button type=button>");function wa(t){var X,C,T,b;const[n,r]=o.createSignal(((X=t.initialPosition)==null?void 0:X.x)??24),[i,c]=o.createSignal(((C=t.initialPosition)==null?void 0:C.y)??24),[a,m]=o.createSignal(((T=t.initialSize)==null?void 0:T.width)??360),[_,u]=o.createSignal(((b=t.initialSize)==null?void 0:b.height)??220),[h,v]=o.createSignal(!1),[s,k]=o.createSignal(!1),[g,S]=o.createSignal(!1),N=()=>t.minWidth??240,E=()=>t.minHeight??140;let W=0,$=0,O=0,w=0;const D=y=>{if(s())return;const l=y.currentTarget;l.setPointerCapture(y.pointerId),S(!0),W=y.clientX,$=y.clientY,O=n(),w=i();const x=M=>{const I=M.clientX-W,L=M.clientY-$;r(Math.max(0,O+I)),c(Math.max(0,w+L))},d=M=>{try{l.releasePointerCapture(M.pointerId)}catch(I){st.bestEffortFailed("ignore if capture released",I)}l.removeEventListener("pointermove",x),l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",d),S(!1)};l.addEventListener("pointermove",x),l.addEventListener("pointerup",d),l.addEventListener("pointercancel",d)},U=y=>{if(y.preventDefault(),y.stopPropagation(),s()||h())return;const l=y.currentTarget;l.setPointerCapture(y.pointerId);const x=y.clientX,d=y.clientY,M=a(),I=_(),L=A=>{const p=A.clientX-x,H=A.clientY-d;m(Math.max(N(),M+p)),u(Math.max(E(),I+H))},P=A=>{try{l.releasePointerCapture(A.pointerId)}catch(p){st.bestEffortFailed("ignore if capture released",p)}l.removeEventListener("pointermove",L),l.removeEventListener("pointerup",P),l.removeEventListener("pointercancel",P)};l.addEventListener("pointermove",L),l.addEventListener("pointerup",P),l.addEventListener("pointercancel",P)},G=()=>{t.onMaximize?t.onMaximize():k(y=>!y)},j=()=>{t.onMinimize?t.onMinimize():v(y=>!y)};let R,ee=null;const J=Je.useOverlayRegistration(()=>t.isOpen,"floating-window",{type:"popover",element:()=>R});return o.createEffect(()=>{if(!t.isOpen)return;const y=R?Te.ownerWindow(R):null;if(!y)return;ee=y.document.activeElement??null;const l=y.requestAnimationFrame(()=>{R!=null&&R.isConnected&&R.focus()}),x=d=>{!ge.isKey(d,"Escape")||!J.isTopmost()||(d.stopPropagation(),d.stopImmediatePropagation(),t.onClose())};y.addEventListener("keydown",x,!0),o.onCleanup(()=>{y.cancelAnimationFrame(l),y.removeEventListener("keydown",x,!0);const d=y.document.activeElement;(d===null||d===y.document.body)&&(ee!=null&&ee.isConnected)&&ee.focus()})}),e.createComponent(o.Show,{get when(){return t.isOpen},get children(){var y=ba(),l=y.firstChild,x=l.firstChild,d=x.firstChild,M=x.nextSibling,I=M.firstChild,L=I.nextSibling,P=L.nextSibling;return e.use(A=>{R=A},y),l.$$dblclick=G,l.$$pointerdown=D,e.insert(x,e.createComponent(o.Show,{get when(){return t.icon},get children(){var A=va();return e.insert(A,()=>t.icon),e.effect(()=>e.className(A,le.windowIcon)),A}}),d),e.insert(d,()=>t.title),M.$$pointerdown=A=>A.stopPropagation(),I.$$click=j,e.insert(I,e.createComponent(fe.VpMinus,{"aria-hidden":"true"})),L.$$click=G,e.insert(L,e.createComponent(o.Show,{get when(){return s()},get fallback(){return e.createComponent(fe.VpArrowsMaximize,{"aria-hidden":"true"})},get children(){return e.createComponent(fe.VpArrowsMinimize,{"aria-hidden":"true"})}})),e.insert(M,e.createComponent(o.Show,{get when(){return t.onDetach},get children(){var A=fa();return e.addEventListener(A,"click",t.onDetach,!0),e.insert(A,e.createComponent(fe.VpExternalLink,{"aria-hidden":"true"})),e.effect(p=>{var H=le.controlBtn,z=f.t("Detach window");return H!==p.e&&e.className(A,p.e=H),z!==p.t&&e.setAttribute(A,"aria-label",p.t=z),p},{e:void 0,t:void 0}),A}}),P),e.addEventListener(P,"click",t.onClose,!0),e.insert(P,e.createComponent(fe.VpClose,{"aria-hidden":"true"})),e.insert(y,e.createComponent(o.Show,{get when(){return!h()},get children(){return[e.createComponent(Le.OverlayScrollArea,{get rootClass(){return le.body},get children(){return t.children}}),e.createComponent(o.Show,{get when(){return!s()},get children(){var A=ga();return A.$$pointerdown=U,e.effect(()=>e.className(A,le.resizeGrip)),A}})]}}),null),e.effect(A=>{var p=`${le.window} ${s()?le.maximized:""} ${h()?le.minimized:""} ${t.class??""}`,H=s()?{}:{left:`${n()}px`,top:`${i()}px`,width:`${a()}px`,height:h()?"auto":`${_()}px`},z=t.title,q=`${le.titlebar} ${g()?le.titlebarDragging:""}`,oe=le.titleInfo,F=le.windowTitle,ne=le.windowControls,ke=le.controlBtn,Se=f.t("Minimize"),de=le.controlBtn,ie=s()?f.t("Restore"):f.t("Maximize"),B=`${le.controlBtn} ${le.closeBtn}`,ae=f.t("Close window");return p!==A.e&&e.className(y,A.e=p),A.t=e.style(y,H,A.t),z!==A.a&&e.setAttribute(y,"aria-label",A.a=z),q!==A.o&&e.className(l,A.o=q),oe!==A.i&&e.className(x,A.i=oe),F!==A.n&&e.className(d,A.n=F),ne!==A.s&&e.className(M,A.s=ne),ke!==A.h&&e.className(I,A.h=ke),Se!==A.r&&e.setAttribute(I,"aria-label",A.r=Se),de!==A.d&&e.className(L,A.d=de),ie!==A.l&&e.setAttribute(L,"aria-label",A.l=ie),B!==A.u&&e.className(P,A.u=B),ae!==A.c&&e.setAttribute(P,"aria-label",A.c=ae),A},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0}),y}})}e.delegateEvents(["pointerdown","dblclick","click"]);function Qt(t,n){const r=n.split(/\s+/).filter(Boolean);return r.length>1&&r.every(i=>t.includes(i))}function Jt(t,n){const r=n.replace(/\s+/g,"");if(r.length<2)return!1;let i=0;for(const c of t)if(c===r[i]&&(i+=1),i===r.length)return!0;return!1}function ht(t,n){const r=t.title.toLowerCase(),i=t.category.toLowerCase(),c=(t.keywords??[]).join(" ").toLowerCase();return r===n?8:r.startsWith(n)?7:r.includes(n)?6:Qt(r,n)?5:i.includes(n)?3:c.includes(n)?2:Jt(r,n)?1:0}function Ca(t,n){const r=t.title.toLowerCase(),i=(t.description??"").toLowerCase();return r===n?8:r.startsWith(n)?7:r.includes(n)?6:Qt(r,n)?5:i.includes(n)?2:Jt(r,n)?1:0}function _a(t){return[t.title,t.description,t.ariaShortcut].filter(n=>!!n).join(", ")}const ka="vk_backdrop_aa9-b",ya="vk_backdropCompact_PkBAv",Sa="vk_backdropClassic_ehT8b",$a="vk_panel_unTU7",pa="vk_panelCompact_SIdhM",xa="vk_panelClassic_aiZlM",Aa="vk_searchRow_zeI45",La="vk_searchInput_oshkq",Ia="vk_results_zGg2V",Ma="vk_section_RoSyC",Na="vk_sectionTitle_JpTJl",Ea="vk_commandList_y7keL",Da="vk_commandItem_0v8jJ",Pa="vk_commandItemActive_Ar6PV",Ta="vk_commandMain_ogAdz",Oa="vk_commandTitle_auoxZ vk_titleSm_IecPV",Wa="vk_commandDescription_8zkPN",Ra="vk_commandShortcut_UAa5d",Ba="vk_commandRow_LX6zz",Fa="vk_configureBtn_OMS9G",za="vk_commandRowActive_uNRXl",V={backdrop:ka,backdropCompact:ya,backdropClassic:Sa,panel:$a,panelCompact:pa,panelClassic:xa,searchRow:Aa,searchInput:La,results:Ia,section:Ma,sectionTitle:Na,commandList:Ea,commandItem:Da,commandItemActive:Pa,commandMain:Ta,commandTitle:Oa,commandDescription:Wa,commandShortcut:Ra,commandRow:Ba,configureBtn:Fa,commandRowActive:za},qa="vk_tabsContainer_CiFoB",Ha="vk_tabButton_M-DwJ",Ka="vk_tabButtonActive_pgOkL",Ua="vk_tabBadge_sBmun",Va="vk_tabBadgeActive_N-q86",ja="vk_badge_meiW8",Ya="vk_badgeSetting_LSTcT",Ga="vk_badgeDb_ThJRG",Xa="vk_statusRow_QoKuX",we={tabsContainer:qa,tabButton:Ha,tabButtonActive:Ka,tabBadge:Ua,tabBadgeActive:Va,badge:ja,badgeSetting:Ya,badgeDb:Ga,statusRow:Xa};var Qa=e.template("<div role=tablist>"),Ja=e.template("<button type=button role=tab><span>"),Za=e.template("<span>●");function ec(t){const n=[{mode:"everywhere",label:"All"},{mode:"commands",label:"Actions"},{mode:"settings",label:"Settings"},{mode:"database",label:"Database"}],r=cn.createTablistKeyboardHandler();return(()=>{var i=Qa();return e.addEventListener(i,"keydown",r,!0),e.insert(i,e.createComponent(o.For,{each:n,children:c=>{const a=()=>t.activeMode()===c.mode;return(()=>{var m=Ja(),_=m.firstChild;return m.$$click=()=>t.onModeChange(c.mode),e.insert(_,()=>f.t(c.label)),e.insert(m,(()=>{var u=e.memo(()=>!!(c.mode==="database"&&t.hasWorkspaceContext()));return()=>u()?(()=>{var h=Za();return e.effect(()=>e.className(h,`${we.tabBadge} ${a()?we.tabBadgeActive:""}`)),h})():null})(),null),e.effect(u=>{var h=a(),v=a()?0:-1,s=`${we.tabButton} ${a()?we.tabButtonActive:""}`;return h!==u.e&&e.setAttribute(m,"aria-selected",u.e=h),v!==u.t&&e.setAttribute(m,"tabindex",u.t=v),s!==u.a&&e.className(m,u.a=s),u},{e:void 0,t:void 0,a:void 0}),m})()}})),e.effect(c=>{var a=we.tabsContainer,m=f.t("Search Everywhere");return a!==c.e&&e.className(i,c.e=a),m!==c.t&&e.setAttribute(i,"aria-label",c.t=m),c},{e:void 0,t:void 0}),i})()}e.delegateEvents(["keydown","click"]);function tc(t,n){const r=n.toLowerCase();return(t.labels??[]).some(i=>f.labelText(i).toLowerCase().includes(r))}function nc(t,n,r){const i=n.toLowerCase(),c=t.label.toLowerCase();if(c===i)return 8;if(c.startsWith(i))return 7;if(c.includes(i))return 6;const a=i.split(/\s+/).filter(Boolean);return a.length>1&&a.every(u=>c.includes(u))?5:t.categoryId.toLowerCase().includes(i)?4:(t.keywords??[]).some(u=>u.toLowerCase().includes(i))?3:(r.matches??tc)(t,n)?2:0}function vt(t,n,r){var c,a;const i=((c=r.breadcrumb)==null?void 0:c.call(r,t.categoryId))??"";return{id:`setting:${t.id}`,kind:"setting",title:((a=r.title)==null?void 0:a.call(r,t))??t.label,description:i||f.t("Settings"),category:f.t("Settings"),enabled:!0,score:n,run:()=>{r.open(t)},rawSetting:t}}function oc(t,n,r=20){if(t===null)return[];const i=n.trim(),c=t.items();if(!i)return(t.popular?t.popular(c):c).slice(0,r).map(_=>vt(_,1,t));const a=[];for(const m of c){const _=nc(m,i,t);_>0&&a.push({item:m,score:_})}return a.sort((m,_)=>_.score-m.score),a.slice(0,r).map(({item:m,score:_})=>vt(m,_,t))}const rc="SCHEMA",ic=2,ac=200,ft=40;function gt(t,n){const r=t.toLowerCase(),i=n.toLowerCase();return r===i?9:r.startsWith(i)?7:r.includes(i)?5:0}function cc(t){const[n,r]=o.createSignal([]),[i,c]=o.createSignal(!1),[a,m]=o.createSignal(null),_=kt.useKitHost(),u=_.databaseObjects,[h,v]=o.createSignal(0);if(u!==null){const W=u.onDidChange(()=>v($=>$+1));o.onCleanup(()=>W.dispose())}const s=()=>(h(),(u==null?void 0:u.getWorkspaceId())??null),k=()=>(h(),!!(u!=null&&u.hasActiveWorkspace())&&s()!==null),g=()=>(h(),(u==null?void 0:u.getSelectedSchema())??"");let S=0,N;const E=()=>{N!==void 0&&(clearTimeout(N),N=void 0)};return o.onCleanup(()=>{E(),S+=1}),o.createRenderEffect(()=>{const W=t.enabled(),$=t.query().trim();E();const O=++S;if(!W||!k()){r([]),c(!1),m(null);return}const w=u,D=g(),U=s(),G=(w==null?void 0:w.getSchemas())??[],j=D?[D]:G,R=()=>s()===U&&!!(w!=null&&w.hasActiveWorkspace())&&(w==null?void 0:w.getSelectedSchema())===D,ee=()=>O===S&&R()&&t.enabled();if($.length<ic){if(m(null),c(!1),D&&w){const J=w.getCachedObjectsForSchema(D);if(J&&J.length>0){const X=J.slice(0,10).map(C=>({id:`db:${D}:${C.objectType}:${C.objectName}`,kind:"database-object",title:C.objectName,description:`${C.objectType} · ${D}`,detail:D,category:f.t("Database"),objectType:C.objectType,schema:D,enabled:!0,score:1,run:()=>{R()&&w.openObject(D,C)}}));r(X);return}}r([]);return}if(r([]),j.length===0){c(!1),m(null);return}c(!0),m(null),N=setTimeout(async()=>{if(ee())try{let J=[];const X=(w==null?void 0:w.searchObjects)??null;if(U&&X!==null)J=[...await X(U,$,{limit:ft,schemas:j})];else if(w&&D){let y=w.getCachedObjectsForSchema(D);if(y||(y=await w.loadObjectsForSchema(D)),y){const l=$.toLowerCase();J=y.filter(x=>x.objectName.toLowerCase().includes(l)).slice(0,ft).map(x=>({owner:D,objectType:x.objectType,objectName:x.objectName,status:x.status}))}}if(!ee())return;const C=$.toLowerCase(),T=G.filter(y=>y.toLowerCase().includes(C)).slice(0,3).map(y=>({id:`db:schema:${y}`,kind:"database-object",title:y,description:`${f.t("Schema")} · ${y}`,detail:f.t("Schema"),category:f.t("Database"),objectType:rc,schema:y,enabled:!0,score:gt(y,$)+1,run:()=>{R()&&(w==null||w.navigateToSchema(y))}})),b=J.filter(y=>j.includes(y.owner)).map(y=>({id:`db:${y.owner}:${y.objectType}:${y.objectName}`,kind:"database-object",title:y.objectName,description:`${y.objectType} · ${y.owner}`,detail:y.owner,category:f.t("Database"),objectType:y.objectType,schema:y.owner,enabled:!0,score:gt(y.objectName,$),run:()=>{R()&&(w==null||w.openObject(y.owner,y))},rawDbObject:y}));r([...T,...b]),c(!1)}catch(J){if(!ee())return;const X=_.errorPresenter.text(J,f.t("Failed to search database objects"));m(X),c(!1)}},ac)}),{items:n,loading:i,error:a,hasWorkspaceContext:k,activeSchema:g}}function lc(t){const{mode:n,query:r,commands:i,recentCommandIds:c,categoryOrder:a,settingsItems:m,databaseItems:_}=t,u=r.trim().toLowerCase(),h=new Map;for(const g of i)h.set(g.id,g);const v=(g,S=1)=>({id:g.id,kind:"command",title:g.title,description:g.description,category:g.category,shortcut:g.shortcut,ariaShortcut:g.ariaShortcut,enabled:g.enabled,score:S,run:g.run,rawCommand:g});if(n==="settings")return m.length===0?[]:[{id:"section:settings",label:f.t("Settings"),items:m}];if(n==="database")return _.length===0?[]:[{id:"section:database",label:f.t("Database"),items:_}];if(n==="commands"){const g=u?i.map(w=>({cmd:w,score:ht(w,u)})).filter(w=>w.score>0).sort((w,D)=>D.score-w.score).map(w=>w.cmd):i,S=[],N=new Set;if(!u){const w=c.map(D=>h.get(D)).filter(D=>!!D);if(w.length>0){S.push({id:"recent",label:f.t("Recent"),items:w.map(D=>v(D))});for(const D of w)N.add(D.id)}}const E=new Map;for(const w of g){if(N.has(w.id))continue;const D=E.get(w.category)??[];D.push(w),E.set(w.category,D)}const W=a??[],$=w=>{const D=W.indexOf(w);return D===-1?W.length:D},O=[...E.keys()].sort((w,D)=>{const U=$(w)-$(D);return U!==0?U:w.localeCompare(D)});for(const w of O){const D=E.get(w)??[];S.push({id:`category:${w}`,label:w,items:D.map(U=>v(U))})}return S}const s=[];if(!u){const g=new Set,S=c.map(E=>h.get(E)).filter(E=>!!E);if(S.length>0){s.push({id:"everywhere:recent",label:f.t("Recent"),items:S.slice(0,5).map(E=>v(E))});for(const E of S)g.add(E.id)}const N=i.filter(E=>!g.has(E.id)).slice(0,10);return N.length>0&&s.push({id:"everywhere:actions",label:f.t("Actions"),items:N.map(E=>v(E))}),m.length>0&&s.push({id:"everywhere:settings",label:f.t("Settings"),items:m.slice(0,5)}),_.length>0&&s.push({id:"everywhere:database",label:f.t("Database"),items:_.slice(0,5)}),s}const k=i.map(g=>({cmd:g,score:ht(g,u)})).filter(g=>g.score>0).sort((g,S)=>S.score-g.score).slice(0,10).map(g=>v(g.cmd,g.score));return k.length>0&&s.push({id:"everywhere:actions",label:f.t("Actions"),items:k}),m.length>0&&s.push({id:"everywhere:settings",label:f.t("Settings"),items:m.slice(0,6)}),_.length>0&&s.push({id:"everywhere:database",label:f.t("Database"),items:_.slice(0,10)}),s}var sc=e.template("<div><div role=dialog aria-modal=true><div>"),bt=e.template("<div>"),wt=e.template("<section><div></div><div>"),ze=e.template("<span>"),tt=e.template("<span><span>"),dc=e.template("<span aria-hidden=true>"),uc=e.template("<span style=display:inline-flex;align-items:center;gap:0.4rem>");const pe="__palette_back__";function mc(t){return t.kind==="command"&&t.rawCommand?_a(t.rawCommand):[t.title,t.description,t.detail].filter(n=>!!n).join(", ")}function hc(t){const n=kt.useKitHost(),r=Je.useOverlayRegistration(()=>t.open,"command-palette",{type:"modal",document:()=>t.host().document}),[i,c]=o.createSignal(""),[a,m]=o.createSignal("everywhere"),[_,u]=o.createSignal(null),[h,v]=o.createSignal(null);let s;const k=o.createMemo(()=>{const l=new Map;for(const x of t.commands)l.set(x.id,x);return l}),g=o.createMemo(()=>{var x;if(h())return null;const l=i().toLowerCase();return((x=t.prefixModes)==null?void 0:x.find(d=>l.startsWith(d.prefix)))??null}),S=o.createMemo(()=>{const l=h();if(l)return l;const x=g();return x?{rootCommandId:`__prefix__:${x.prefix}`,descriptor:x.build()}:null}),N=o.createMemo(()=>{const l=S();if(!l)return[];const x=g(),d=(x?i().slice(x.prefix.length):i()).trim().toLowerCase();return d?l.descriptor.items.map(M=>({item:M,score:Ca(M,d)})).filter(M=>M.score>0).sort((M,I)=>I.score-M.score).map(M=>M.item):l.descriptor.items}),E=cc({query:i,enabled:()=>t.open&&!S()&&(a()==="everywhere"||a()==="database")}),W=o.createMemo(()=>!t.open||S()?[]:a()!=="everywhere"&&a()!=="settings"?[]:oc(n.settingsSearch,i(),a()==="settings"?40:8)),$=o.createMemo(()=>S()?[]:lc({mode:a(),query:i(),commands:t.commands,recentCommandIds:t.recentCommandIds,categoryOrder:t.categoryOrder,settingsItems:W(),databaseItems:E.items(),hasWorkspaceContext:E.hasWorkspaceContext()})),O=o.createMemo(()=>{const l=new Map;for(const x of $())for(const d of x.items)l.set(d.id,d);return l}),w=o.createMemo(()=>h()?[pe,...N().map(l=>l.id)]:g()?N().map(l=>l.id):$().flatMap(l=>l.items.filter(x=>x.enabled).map(x=>x.id))),D=l=>{const x=w();if(x.length===0)return;const d=_(),M=x.findIndex(P=>P===d),L=((M>=0?M:0)+l+x.length)%x.length;u(x[L]??null)},U=l=>{const x=["everywhere","commands","settings","database"],M=(x.indexOf(a())+l+x.length)%x.length;m(x[M]??"everywhere")},G=l=>{var d;if(!l.submenu)return;const x=l.submenu();v({rootCommandId:l.id,descriptor:x}),c(""),u(((d=x.items[0])==null?void 0:d.id)??pe),queueMicrotask(()=>s==null?void 0:s.focus())},j=()=>{v(null),c(""),u(null),queueMicrotask(()=>s==null?void 0:s.focus())},R=l=>{if(l.enabled){if(l.submenu){G(l);return}t.onCommandExecuted(l.id),l.run(),t.onClose()}},ee=l=>{const x=t.onConfigureKeybinding;x&&(x(l.id),t.onClose())},J=l=>{const x=h();x&&t.onCommandExecuted(x.rootCommandId),l.run(),t.onClose()},X=l=>{if(l.enabled){if(l.kind==="command"&&l.rawCommand){R(l.rawCommand);return}l.run(),t.onClose()}};o.createEffect(()=>{var x;if(!t.open){v(null),m("everywhere"),u(null);return}c(""),m("everywhere"),v(null);const l=t.consumePendingPickerId();if(l!==null){const d=k().get(l);if(d&&d.submenu){const M=d.submenu();v({rootCommandId:d.id,descriptor:M}),u(((x=M.items[0])==null?void 0:x.id)??pe)}}queueMicrotask(()=>s==null?void 0:s.focus())}),o.createEffect(()=>{if(!t.open)return;const l=w(),x=_();if(l.length===0){u(null);return}(!x||!l.includes(x))&&u(l[0]??null)}),o.createEffect(()=>{if(!t.open)return;const l=_();l&&queueMicrotask(()=>{const x=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(l):l.replace(/"/g,'\\"'),d=t.host().document.querySelector(`[data-cmd-entry-id="${x}"]`);d==null||d.scrollIntoView({block:"nearest"})})}),o.createEffect(()=>{if(!t.open)return;const l=d=>{if(r.isTopmost()&&!d.defaultPrevented&&!(d.target instanceof Element&&d.target.closest('[role="tablist"]'))){if(ge.isKey(d,"Escape")){if(d.preventDefault(),h()){j();return}t.onClose();return}if(ge.isKey(d,"Tab")&&!S()){d.preventDefault(),U(d.shiftKey?-1:1);return}if(ge.isKey(d,"ArrowDown")){d.preventDefault(),D(1);return}if(ge.isKey(d,"ArrowUp")){d.preventDefault(),D(-1);return}if(ge.isKey(d,"Enter")){const M=_();if(!M)return;if(d.preventDefault(),S()){if(M===pe){j();return}const P=N().find(A=>A.id===M);P&&J(P);return}const I=O().get(M);if(I){if(d.altKey&&I.kind==="command"&&I.rawCommand){ee(I.rawCommand);return}X(I);return}const L=k().get(M);if(L){if(d.altKey){ee(L);return}R(L)}}}},x=t.host();x.addEventListener("keydown",l),o.onCleanup(()=>{x.removeEventListener("keydown",l)})});const C=l=>l.items.length===0&&l.emptyText!==void 0?l.emptyText:f.t("No matches."),T=l=>{if(a()==="everywhere"){if(l.startsWith("/")||l.startsWith(">")){m("commands"),c(l.slice(1));return}if(l.startsWith("#")){m("settings"),c(l.slice(1));return}if(l.startsWith("@")){m("database"),c(l.slice(1));return}}c(l)},b=()=>{const l=h();return l?l.descriptor.title:a()==="everywhere"?f.t("Search everywhere..."):a()==="commands"?f.t("Search commands..."):a()==="settings"?f.t("Search settings..."):a()==="database"?f.t("Search database objects..."):f.t("Search commands...")},y=Pe.createDialogShellFocus({open:()=>t.open,onDismiss:()=>t.onClose(),ownerDocument:()=>t.host().document});return e.createComponent(o.Show,{get when(){return t.open},get children(){return e.createComponent(e.Portal,{get mount(){return t.host().document.body},get children(){var l=sc(),x=l.firstChild,d=x.firstChild;e.addEventListener(l,"keydown",y.handleKeyDown,!0),e.addEventListener(l,"mousedown",t.onClose,!0),x.$$mousedown=I=>I.stopPropagation();var M=y.captureDialog;return typeof M=="function"?e.use(M,x):y.captureDialog=x,e.insert(d,e.createComponent(Ce.Input,{ref:I=>{s=I},get class(){return V.searchInput},type:"text",get value(){return i()},get placeholder(){return b()},onInput:I=>{const L=I.currentTarget??I.target;T((L==null?void 0:L.value)??"")}})),e.insert(x,e.createComponent(o.Show,{get when(){return!S()},get children(){return e.createComponent(ec,{activeMode:a,onModeChange:m,get hasWorkspaceContext(){return E.hasWorkspaceContext}})}}),null),e.insert(x,e.createComponent(Le.OverlayScrollArea,{get viewportClass(){return V.results},get children(){return e.createComponent(o.Show,{get when(){return S()},get fallback(){return e.createComponent(o.Show,{get when(){return $().length>0},get fallback(){return e.createComponent(o.Show,{get when(){return a()==="database"},get fallback(){return e.createComponent(o.Show,{get when(){return a()==="settings"},get fallback(){return e.createComponent(o.Show,{get when(){return a()==="commands"},get fallback(){return e.createComponent(Ee.EmptyState,{size:"sm",get title(){return f.t("No matches found.")}})},get children(){return e.createComponent(Ee.EmptyState,{size:"sm",get title(){return f.t("No commands found.")}})}})},get children(){return e.createComponent(Ee.EmptyState,{size:"sm",get title(){return f.t("No settings found.")}})}})},get children(){return e.createComponent(o.Show,{get when(){return E.hasWorkspaceContext()},get fallback(){return e.createComponent(Ee.EmptyState,{size:"sm",get title(){return f.t("No database connected.")}})},get children(){return e.createComponent(o.Show,{get when(){return E.loading()},get fallback(){return e.createComponent(Ee.EmptyState,{size:"sm",get title(){return f.t("No database objects found.")}})},get children(){var I=bt();return e.insert(I,()=>f.t("Loading objects...")),e.effect(()=>e.className(I,we.statusRow)),I}})}})}})},get children(){return e.createComponent(o.For,{get each(){return $()},children:I=>(()=>{var L=wt(),P=L.firstChild,A=P.nextSibling;return e.insert(P,()=>I.label),e.insert(A,e.createComponent(o.For,{get each(){return I.items},children:p=>(()=>{var H=bt();return e.insert(H,e.createComponent(Ce.PressableSurface,{type:"button",get class(){return`${V.commandItem} ${_()===p.id?V.commandItemActive:""}`},get"attr:data-cmd-entry-id"(){return p.id},get"aria-label"(){return mc(p)},onMouseEnter:()=>{p.enabled&&u(p.id)},onClick:()=>X(p),get disabled(){return!p.enabled},get children(){return[(()=>{var z=tt(),q=z.firstChild;return e.insert(q,()=>p.title),e.insert(z,e.createComponent(o.Show,{get when(){return p.description},get children(){var oe=ze();return e.insert(oe,()=>p.description),e.effect(()=>e.className(oe,V.commandDescription)),oe}}),null),e.effect(oe=>{var F=V.commandMain,ne=V.commandTitle;return F!==oe.e&&e.className(z,oe.e=F),ne!==oe.t&&e.className(q,oe.t=ne),oe},{e:void 0,t:void 0}),z})(),(()=>{var z=uc();return e.insert(z,e.createComponent(o.Show,{get when(){return p.kind==="setting"},get children(){var q=ze();return e.insert(q,()=>f.t("Setting")),e.effect(()=>e.className(q,`${we.badge} ${we.badgeSetting}`)),q}}),null),e.insert(z,e.createComponent(o.Show,{get when(){return p.kind==="database-object"},get children(){var q=ze();return e.insert(q,()=>p.objectType||f.t("Database")),e.effect(()=>e.className(q,`${we.badge} ${we.badgeDb}`)),q}}),null),e.insert(z,e.createComponent(o.Show,{get when(){return p.shortcut},get children(){var q=dc();return e.insert(q,()=>p.shortcut),e.effect(()=>e.className(q,V.commandShortcut)),q}}),null),z})()]}}),null),e.insert(H,e.createComponent(o.Show,{get when(){return e.memo(()=>!!(p.kind==="command"&&p.rawCommand))()&&t.onConfigureKeybinding},get children(){return e.createComponent(se.Button,{get class(){return V.configureBtn},variant:"ghost",size:"sm",iconOnly:!0,tabIndex:-1,get"aria-label"(){return f.t("Configure Keybinding")},get title(){return f.t("Configure Keybinding")},onClick:z=>{z.stopPropagation(),p.rawCommand&&ee(p.rawCommand)},get leadingIcon(){return e.createComponent(fe.VpKeyboard,{"aria-hidden":"true"})}})}}),null),e.effect(()=>e.className(H,`${V.commandRow} ${_()===p.id?V.commandRowActive:""}`)),H})()})),e.effect(p=>{var H=V.section,z=V.sectionTitle,q=V.commandList;return H!==p.e&&e.className(L,p.e=H),z!==p.t&&e.className(P,p.t=z),q!==p.a&&e.className(A,p.a=q),p},{e:void 0,t:void 0,a:void 0}),L})()})}})},children:I=>(()=>{var L=wt(),P=L.firstChild,A=P.nextSibling;return e.insert(P,()=>I().descriptor.title),e.insert(A,e.createComponent(o.Show,{get when(){return h()},get children(){return e.createComponent(Ce.PressableSurface,{type:"button",get class(){return`${V.commandItem} ${_()===pe?V.commandItemActive:""}`},"attr:data-cmd-entry-id":pe,onMouseEnter:()=>u(pe),onClick:()=>j(),get children(){var p=tt(),H=p.firstChild;return e.insert(H,()=>f.t("← Back")),e.effect(z=>{var q=V.commandMain,oe=V.commandTitle;return q!==z.e&&e.className(p,z.e=q),oe!==z.t&&e.className(H,z.t=oe),z},{e:void 0,t:void 0}),p}})}}),null),e.insert(A,e.createComponent(o.Show,{get when(){return N().length>0},get fallback(){return e.createComponent(Ee.EmptyState,{size:"sm",get title(){return C(I().descriptor)}})},get children(){return e.createComponent(o.For,{get each(){return N()},children:p=>e.createComponent(Ce.PressableSurface,{type:"button",get class(){return`${V.commandItem} ${_()===p.id?V.commandItemActive:""}`},get"attr:data-cmd-entry-id"(){return p.id},onMouseEnter:()=>u(p.id),onClick:()=>J(p),get children(){return[(()=>{var H=tt(),z=H.firstChild;return e.insert(z,()=>p.title),e.insert(H,e.createComponent(o.Show,{get when(){return p.description},get children(){var q=ze();return e.insert(q,()=>p.description),e.effect(()=>e.className(q,V.commandDescription)),q}}),null),e.effect(q=>{var oe=V.commandMain,F=V.commandTitle;return oe!==q.e&&e.className(H,q.e=oe),F!==q.t&&e.className(z,q.t=F),q},{e:void 0,t:void 0}),H})(),e.createComponent(o.Show,{get when(){return p.isCurrent},get children(){var H=ze();return e.insert(H,()=>f.t("Current")),e.effect(()=>e.className(H,V.commandShortcut)),H}})]}})})}}),null),e.effect(p=>{var H=V.section,z=V.sectionTitle,q=V.commandList;return H!==p.e&&e.className(L,p.e=H),z!==p.t&&e.className(P,p.t=z),q!==p.a&&e.className(A,p.a=q),p},{e:void 0,t:void 0,a:void 0}),L})()})}}),null),e.effect(I=>{var L=`${V.backdrop} ${t.style==="compact"?V.backdropCompact:V.backdropClassic}`,P=`${V.panel} ${t.style==="compact"?V.panelCompact:V.panelClassic}`,A=f.t("Command Palette"),p=V.searchRow;return L!==I.e&&e.className(l,I.e=L),P!==I.t&&e.className(x,I.t=P),A!==I.a&&e.setAttribute(x,"aria-label",I.a=A),p!==I.o&&e.className(d,I.o=p),I},{e:void 0,t:void 0,a:void 0,o:void 0}),l}})}})}e.delegateEvents(["mousedown","keydown"]);exports.CommandPalette=hc;exports.ConfirmDialog=En;exports.ConsequenceLine=rt;exports.ContextMenu=io;exports.DesktopContextMenu=Dt;exports.Drawer=or;exports.DropdownMenu=Vr;exports.FloatingWindow=wa;exports.InputDialog=Pn;exports.MenuDisclosure=zr;exports.MenuEmpty=Br;exports.MenuItem=Ft;exports.MenuList=Rt;exports.MenuSearch=Fr;exports.MenuSection=Bt;exports.MenuSeparator=zt;exports.NameStep=Yt;exports.OptionList=ot;exports.PopoverPanel=Wo;exports.SUBMENU_ANCHOR_OVERLAP=Qe;exports.SUBMENU_ESTIMATED_ROW_HEIGHT=It;exports.SUBMENU_ESTIMATED_WIDTH=At;exports.SUBMENU_MIN_ESTIMATED_HEIGHT=Lt;exports.SUBMENU_VIEWPORT_MARGIN=Xe;exports.SaveDiscardDialog=Dn;exports.SelectedOptions=Gt;exports.StatementPreview=Xt;exports.StepFooter=jt;exports.Tooltip=gn;exports.TooltipHost=ui;exports.closeContextMenu=ro;exports.computeSubmenuPlacement=Nt;exports.confirmationLevelOf=Bi;exports.createDangerousActionDialog=ea;exports.createDesktopContextMenuApi=Pt;exports.createDialogFocusScope=We;exports.createOverlayCloseGuard=Re;exports.describeConsequence=Vt;exports.estimateSubmenuHeight=Mt;exports.firstFocusableMenuIndex=it;exports.isDesktopMenuNavigationKey=$t;exports.isIrreversible=lt;exports.lastFocusableMenuIndex=pt;exports.menuSurfaceClasses=ai;exports.nextFocusableMenuIndex=He;exports.openContextMenu=oo;exports.panelClasses=Tn;exports.resolveDangerousActionDialogKeyIntent=Kt;exports.resolveMenuFocusForKey=xt;exports.tooltip=St;
|