@nxgt/material 3.7.4 → 3.8.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.
Files changed (176) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +39 -6
  3. package/bin/nxgt-theme.js +6 -0
  4. package/dist/{async-slice-o_fpqeGX.js → async-slice-DDjaJY_F.js} +2 -2
  5. package/dist/background--Bf_EbFR.js +159 -0
  6. package/dist/backgrounds/backgrounds.css +2 -0
  7. package/dist/backgrounds/css-react/moon.css +97 -0
  8. package/dist/backgrounds.js +3 -139
  9. package/dist/browser-only-DQ94lWF8.js +18 -0
  10. package/dist/bubble-input-B7BVd9fX.js +237 -0
  11. package/dist/{button--cF4gY14.js → button-DbfdITBB.js} +51 -57
  12. package/dist/charts.js +3 -3
  13. package/dist/{chip-D1B1dL77.js → chip-DpySRqCy.js} +2 -2
  14. package/dist/{client-only.utils-lQ7GqP8w.js → client-only.utils-3nHNzCki.js} +1 -1
  15. package/dist/{code-editor-0CdGwKDg.js → code-editor-BiA14xua.js} +7 -7
  16. package/dist/code-editor.js +6 -6
  17. package/dist/{code-language-items-CGARRbVm.js → code-language-items-C_dJ6GVs.js} +2 -2
  18. package/dist/components/theme-tokens.css +34 -35
  19. package/dist/components/tones/app-tones.css +2 -1
  20. package/dist/components/tones/containers.css +4 -1
  21. package/dist/components/tones/index.css +2 -0
  22. package/dist/components/tones/surface.css +1 -0
  23. package/dist/components/tones/tokens.css +8 -3
  24. package/dist/components/tones/zone-paint.css +15 -0
  25. package/dist/components/ui/feedback/toast/toast-tokens.css +1 -0
  26. package/dist/components/ui/layout/app-shell/activity-backdrop.css +62 -1
  27. package/dist/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
  28. package/dist/components/ui/media/media-player/nxgt-media-player.css +7 -32
  29. package/dist/components/ui/primitives/field-box/field-box-tokens.css +5 -2
  30. package/dist/{components-DD7_NI6U.js → components-B9EIfMdd.js} +18652 -18553
  31. package/dist/components.js +24 -22
  32. package/dist/{dialog-DdJ1C4BR.js → dialog-CkIYpJXk.js} +55 -53
  33. package/dist/dist-B7RjY7SL.js +158 -0
  34. package/dist/dist-C4wtXCjf.js +593 -0
  35. package/dist/dist-DVRQkaTK.js +111 -0
  36. package/dist/dist-lmHmz_bu.js +419 -0
  37. package/dist/dnd.js +1 -1
  38. package/dist/dropdown-menu-BC5Tbhb9.js +908 -0
  39. package/dist/editor.js +527 -527
  40. package/dist/empty-state-s2CSjKXJ.js +126 -0
  41. package/dist/{escape-owner-B8k7DvFa.js → escape-owner-CripBce_.js} +2 -1
  42. package/dist/{field-blur-DFUazxsL.js → field-blur-DPLsMufs.js} +1 -1
  43. package/dist/{field-blur-context-Dw9ZAgBr.js → field-blur-context-1ZwJgsHE.js} +2 -2
  44. package/dist/has-text-content-Ds2dkHX_.js +10 -0
  45. package/dist/hooks.js +35 -33
  46. package/dist/{hover-card-D5iHS9q1.js → hover-card-Cox-tPDz.js} +41 -39
  47. package/dist/{i18n-provider-C6SBK_nO.js → i18n-provider-C6HhBw34.js} +1 -1
  48. package/dist/i18n.js +6 -6
  49. package/dist/{icon-badge-Bb5-73XP.js → icon-badge-q3Ve8gra.js} +3 -3
  50. package/dist/{icon-button-5A6Mrj6w.js → icon-button-DJcWpIhu.js} +2 -1
  51. package/dist/{in-dialog-AiwTD3DK.js → in-dialog-Vwkyp-M5.js} +6 -5
  52. package/dist/lib/backgrounds/background/available.d.ts +3 -3
  53. package/dist/lib/backgrounds/background/background.d.ts +7 -3
  54. package/dist/lib/backgrounds/background/types.d.ts +7 -1
  55. package/dist/lib/backgrounds/index.d.ts +1 -1
  56. package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +17 -0
  57. package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +6 -4
  58. package/dist/lib/components/ui/layout/app-shell/backdrop-layer.d.ts +11 -0
  59. package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +17 -0
  60. package/dist/lib/components/ui/layout/app-shell/theme-backdrop.d.ts +6 -0
  61. package/dist/lib/components/ui/layout/app-shell/use-activity-backdrop.d.ts +18 -0
  62. package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +9 -0
  63. package/dist/lib/hooks/resolve-theme.d.ts +46 -1
  64. package/dist/lib/hooks/theme-store.d.ts +35 -4
  65. package/dist/lib/hooks/use-theme.d.ts +20 -4
  66. package/dist/lib/i18n/resources/en/en.d.ts +4 -0
  67. package/dist/lib/i18n/resources/en/material.json.d.ts +4 -0
  68. package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
  69. package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -0
  70. package/dist/lib/i18n/resources/resources.d.ts +8 -0
  71. package/dist/lib/i18n/translator.d.ts +1 -1
  72. package/dist/lib/theme-picker/index.d.ts +7 -0
  73. package/dist/lib/theme-picker/partials/mini-background.d.ts +10 -0
  74. package/dist/lib/theme-picker/partials/mode-control.d.ts +5 -0
  75. package/dist/lib/theme-picker/partials/theme-tile.d.ts +12 -0
  76. package/dist/lib/theme-picker/theme-label.d.ts +7 -0
  77. package/dist/lib/theme-picker/theme-picker.d.ts +25 -0
  78. package/dist/lib/themes/index.d.ts +14 -0
  79. package/dist/lib/themes/nxgt-theme-provider.d.ts +29 -0
  80. package/dist/lib/themes/nxgt-theme.d.ts +22 -0
  81. package/dist/lib/themes/theme-context.d.ts +28 -0
  82. package/dist/lib/themes/theme-value.d.ts +5 -0
  83. package/dist/lib/vite/index.d.ts +1 -1
  84. package/dist/lib.js +3 -3
  85. package/dist/main.js +43 -39
  86. package/dist/map.js +8 -8
  87. package/dist/material.css +1 -1
  88. package/dist/nxgt-theme-CgSb9Obl.js +37 -0
  89. package/dist/pdf-reader.js +1 -1
  90. package/dist/print.js +2 -2
  91. package/dist/{public-SsiazLEv.js → public-Ce30uvp0.js} +591 -587
  92. package/dist/read-storage-C2J90bNm.js +10 -0
  93. package/dist/{rich-code-block-CwNwQs5z.js → rich-code-block-C2Fp_FDU.js} +5 -5
  94. package/dist/{sortable-provider-BvD98s8Y.js → sortable-provider-pVaEZzty.js} +3 -3
  95. package/dist/{spinner-CtGCPza-.js → spinner-CsHcmcpF.js} +2 -2
  96. package/dist/{stored-language-Bb7yX5uE.js → stored-language-BeIKw3-K.js} +15 -15
  97. package/dist/styles.css +8 -1
  98. package/dist/theme-context-BagPvRcz.js +16 -0
  99. package/dist/theme-picker.js +118 -0
  100. package/dist/theme-store-CSl51uNH.js +91 -0
  101. package/dist/theme-toggle-C8os82b4.js +48 -0
  102. package/dist/themes.js +42 -0
  103. package/dist/toggle-group-j8zaxEg1.js +69 -0
  104. package/dist/{toolbar-items-DsDDD5AY.js → toolbar-items-CqHvlTU8.js} +443 -589
  105. package/dist/tooltip-rhbqNmr3.js +1064 -0
  106. package/dist/{translate-material-Bsjc4Tow.js → translate-material-CGZljjp1.js} +2 -2
  107. package/dist/{translator-or2y0JJB.js → translator-DCYO4Ij3.js} +3 -3
  108. package/dist/{use-background-activity-B8jLHNop.js → use-background-activity-KxQgelFF.js} +1 -1
  109. package/dist/{use-chat-composer-DZ01a16D.js → use-chat-composer-CDrgWGMM.js} +4684 -4886
  110. package/dist/{use-heading-spy-ByOQNnFZ.js → use-heading-spy-DXo6IOX9.js} +52 -121
  111. package/dist/{use-material-translation-hLQzOjF0.js → use-material-translation-DkxcLbLM.js} +2 -2
  112. package/dist/use-slice-reducer-BGkeGtML.js +42 -0
  113. package/dist/use-theme-Cd-aiDJo.js +31 -0
  114. package/docs/README.md +2 -1
  115. package/docs/components/foundations.md +39 -0
  116. package/docs/components/navigation-and-layout.md +3 -3
  117. package/docs/getting-started.md +1 -1
  118. package/docs/guides/app-shell.md +46 -7
  119. package/docs/guides/backgrounds.md +43 -7
  120. package/docs/guides/i18n.md +1 -1
  121. package/docs/guides/themes.md +103 -0
  122. package/docs/guides/theming.md +288 -84
  123. package/docs/guides/vite-plugin.md +26 -0
  124. package/docs/previews/backgrounds-background-from-theme.webp +0 -0
  125. package/docs/previews/backgrounds-geometry-more.webp +0 -0
  126. package/docs/previews/backgrounds-geometry.webp +0 -0
  127. package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
  128. package/docs/previews/backgrounds-light-more.webp +0 -0
  129. package/docs/previews/backgrounds-light.webp +0 -0
  130. package/docs/previews/backgrounds-material-more.webp +0 -0
  131. package/docs/previews/backgrounds-matrix.webp +0 -0
  132. package/docs/previews/backgrounds-moon.webp +0 -0
  133. package/docs/previews/backgrounds-motif-shapes.webp +0 -0
  134. package/docs/previews/backgrounds-motifs.webp +0 -0
  135. package/docs/previews/foundations-themes-themepicker.webp +0 -0
  136. package/docs/roadmap.md +25 -0
  137. package/docs/troubleshooting.md +35 -7
  138. package/lib/backgrounds/backgrounds.css +2 -0
  139. package/lib/backgrounds/css-react/moon.css +97 -0
  140. package/lib/components/theme-tokens.css +34 -35
  141. package/lib/components/tones/app-tones.css +2 -1
  142. package/lib/components/tones/containers.css +4 -1
  143. package/lib/components/tones/index.css +2 -0
  144. package/lib/components/tones/surface.css +1 -0
  145. package/lib/components/tones/tokens.css +8 -3
  146. package/lib/components/tones/zone-paint.css +15 -0
  147. package/lib/components/ui/feedback/toast/toast-tokens.css +1 -0
  148. package/lib/components/ui/layout/app-shell/activity-backdrop.css +62 -1
  149. package/lib/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
  150. package/lib/components/ui/media/media-player/nxgt-media-player.css +7 -32
  151. package/lib/components/ui/primitives/field-box/field-box-tokens.css +5 -2
  152. package/lib/styles.css +8 -1
  153. package/lib/theme-picker/theme-picker-list.css +29 -0
  154. package/lib/theme-picker/theme-picker.css +192 -0
  155. package/lib/theme-picker/theme-tile-background.css +77 -0
  156. package/lib/theme-picker/theme-tile-textures-night.css +63 -0
  157. package/lib/theme-picker/theme-tile-textures.css +153 -0
  158. package/lib/themes/ambre.css +134 -0
  159. package/lib/themes/ardoise.css +133 -0
  160. package/lib/themes/bleumono.css +136 -0
  161. package/lib/themes/bluemoon.css +136 -0
  162. package/lib/themes/corail.css +136 -0
  163. package/lib/themes/foret.css +133 -0
  164. package/lib/themes/lavande.css +133 -0
  165. package/lib/themes/menthe.css +136 -0
  166. package/lib/themes/ocean.css +136 -0
  167. package/lib/themes/pink.css +134 -0
  168. package/lib/themes/prune.css +133 -0
  169. package/lib/themes/sable.css +133 -0
  170. package/lib/themes/slate.css +133 -0
  171. package/lib/themes/teal.css +137 -0
  172. package/package.json +30 -2
  173. package/dist/dropdown-menu-DWtgUVW7.js +0 -1490
  174. package/dist/empty-state-CRWLQ1sM.js +0 -191
  175. package/dist/tooltip-tmFoTU_d.js +0 -1582
  176. package/dist/use-slice-reducer-0r5dXnJe.js +0 -58
@@ -1,27 +1,31 @@
1
1
  import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
2
  import { n as t } from "./ui.utils-CAnKTCw5.js";
3
3
  import { t as n } from "./utils-Bcd2Z3ea.js";
4
- import { A as r, E as i, M as a, O as o, R as s, a as c, k as l, o as u, w as d } from "./tooltip-tmFoTU_d.js";
5
- import { $ as f, c as p, d as m, f as h, i as g, l as _, n as v, o as y, t as b, u as x } from "./dropdown-menu-DWtgUVW7.js";
6
- import { r as S, t as ee } from "./in-dialog-AiwTD3DK.js";
7
- import { C, D as w, E as T, O as te, S as E, T as ne, _ as re, f as ie, g as ae, k as oe, r as se, t as ce, u as le, w as ue } from "./dialog-DdJ1C4BR.js";
8
- import { S as de, a as D, d as O, g as fe, h as pe, i as me, m as he, n as k, r as ge, t as A, u as _e, w as ve } from "./toolbar-items-DsDDD5AY.js";
9
- import { t as j } from "./use-material-translation-hLQzOjF0.js";
10
- import { t as M } from "./button--cF4gY14.js";
11
- import { n as ye, t as be } from "./icon-button-5A6Mrj6w.js";
12
- import { t as xe } from "./useEvent-2fKq-6w8.js";
13
- import { i as Se, n as Ce, r as we, t as Te } from "./empty-state-CRWLQ1sM.js";
14
- import { n as Ee } from "./use-slice-reducer-0r5dXnJe.js";
15
- import { r as De } from "./use-csp-nonce-ZKs9k-ov.js";
16
- import { t as Oe } from "./client-only.utils-lQ7GqP8w.js";
17
- import { t as ke } from "./use-scroll-away-PQRFZkT2.js";
18
- import { ArrowLeft as Ae, BookOpenText as je, ChevronDown as Me, ChevronLeft as Ne, ChevronRight as Pe, ChevronUp as Fe, Download as Ie, Eraser as Le, FileText as Re, FileWarning as ze, FileX2 as Be, Highlighter as Ve, KeyRound as He, LayoutGrid as Ue, List as We, Loader2 as Ge, Maximize as Ke, MessageSquareText as qe, Minimize as Je, MoreVertical as Ye, MousePointer2 as Xe, MoveHorizontal as Ze, PanelLeft as Qe, Pen as $e, PencilLine as et, Printer as tt, RotateCw as nt, Search as rt, StickyNote as it, Type as at, Underline as ot, Undo2 as st, Volume2 as ct, X as lt, XIcon as ut, ZoomIn as dt, ZoomOut as ft } from "lucide-react";
19
- import * as N from "react";
20
- import { createContext as pt, memo as mt, useCallback as P, useContext as ht, useEffect as F, useId as gt, useLayoutEffect as I, useMemo as L, useReducer as _t, useRef as R, useState as z, useSyncExternalStore as vt } from "react";
21
- import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
22
- import { flushSync as yt } from "react-dom";
23
- import { createSlice as bt } from "@reduxjs/toolkit";
24
- import { STATE_ACTION_KEYS as U, describeError as xt, stateCopy as St } from "@nxgt/material-core/states";
4
+ import { o as r } from "./dist-DVRQkaTK.js";
5
+ import { c as i, i as a, l as o, n as s, o as c, s as l } from "./dist-lmHmz_bu.js";
6
+ import { a as u, o as d } from "./tooltip-rhbqNmr3.js";
7
+ import { i as f } from "./dist-C4wtXCjf.js";
8
+ import { r as p, t as m } from "./in-dialog-Vwkyp-M5.js";
9
+ import { C as h, D as g, E as _, O as v, S as y, T as b, _ as x, f as S, g as ee, k as te, r as ne, t as C, u as re, w } from "./dialog-CkIYpJXk.js";
10
+ import { c as T, d as ie, f as E, i as ae, l as oe, n as se, o as D, t as ce, u as O } from "./dropdown-menu-BC5Tbhb9.js";
11
+ import { S as le, a as k, d as A, g as ue, h as de, i as fe, m as pe, n as j, r as me, t as M, u as he, w as ge } from "./toolbar-items-CqHvlTU8.js";
12
+ import { t as N } from "./use-material-translation-DkxcLbLM.js";
13
+ import { t as _e } from "./button-DbfdITBB.js";
14
+ import { n as ve, t as ye } from "./icon-button-DJcWpIhu.js";
15
+ import { t as be } from "./useEvent-2fKq-6w8.js";
16
+ import { n as xe, t as Se } from "./toggle-group-j8zaxEg1.js";
17
+ import { n as Ce } from "./use-slice-reducer-BGkeGtML.js";
18
+ import { r as we } from "./use-csp-nonce-ZKs9k-ov.js";
19
+ import { n as Te, t as Ee } from "./empty-state-s2CSjKXJ.js";
20
+ import { t as De } from "./client-only.utils-3nHNzCki.js";
21
+ import { t as Oe } from "./use-scroll-away-PQRFZkT2.js";
22
+ import { ArrowLeft as ke, BookOpenText as Ae, ChevronDown as je, ChevronLeft as Me, ChevronRight as Ne, ChevronUp as Pe, Download as Fe, Eraser as Ie, FileText as Le, FileWarning as Re, FileX2 as ze, Highlighter as Be, KeyRound as Ve, LayoutGrid as He, List as Ue, Loader2 as We, Maximize as Ge, MessageSquareText as Ke, Minimize as qe, MoreVertical as Je, MousePointer2 as Ye, MoveHorizontal as Xe, PanelLeft as Ze, Pen as Qe, PencilLine as $e, Printer as et, RotateCw as tt, Search as nt, StickyNote as rt, Type as it, Underline as at, Undo2 as ot, Volume2 as st, X as ct, XIcon as lt, ZoomIn as ut, ZoomOut as dt } from "lucide-react";
23
+ import * as P from "react";
24
+ import { createContext as ft, memo as pt, useCallback as F, useContext as mt, useEffect as I, useId as ht, useLayoutEffect as L, useMemo as R, useReducer as gt, useRef as z, useState as B, useSyncExternalStore as _t } from "react";
25
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
26
+ import { flushSync as vt } from "react-dom";
27
+ import { createSlice as yt } from "@reduxjs/toolkit";
28
+ import { STATE_ACTION_KEYS as bt, describeError as xt, stateCopy as St } from "@nxgt/material-core/states";
25
29
  import { formatFileSize as Ct } from "@nxgt/material-core/format-file-size";
26
30
  import { anchorAt as wt, applyPageHighlight as Tt, classifyPdfError as Et, createPdfLinkService as Dt, layoutSpreads as Ot, mountedPages as kt, offsetOf as At, openPdfDocument as jt, pageAtOffset as Mt, planRender as Nt, renderPageToCanvas as Pt, rowStarts as Ft } from "@nxgt/material-core/pdf-reader";
27
31
  import { DEFAULT_PAGE_SIZE as It, FIT_PAGES as Lt, createPageSizesLoader as Rt, fitScale as zt, hitAt as Bt, labelLinkAnchors as Vt, mapPdfOutline as Ht, placeholderSize as Ut, readerFitScale as Wt, resolveDestinationPage as Gt, revealHit as Kt, rotatedSize as qt, searchDocument as Jt, stepHit as Yt, withPageMatches as Xt } from "@nxgt/material-core/pdf-viewer";
@@ -44,16 +48,16 @@ var on = Object.defineProperty, W = (e, t) => on(e, "name", {
44
48
  configurable: !0
45
49
  });
46
50
  function sn(e, t) {
47
- return N.useReducer((e, n) => t[e][n] ?? e, e);
51
+ return P.useReducer((e, n) => t[e][n] ?? e, e);
48
52
  }
49
53
  W(sn, "useStateMachine");
50
- var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
51
- let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: o = 600, ...c } = e, [l, u] = N.useState(null), [d, p] = N.useState(null), [m, h] = N.useState(null), [g, _] = N.useState(null), [v, y] = N.useState(null), [b, x] = N.useState(0), [S, ee] = N.useState(0), [C, w] = N.useState(!1), [T, te] = N.useState(!1), E = s(t, u), ne = f(i);
52
- return /* @__PURE__ */ V(dn, {
54
+ var cn = "ScrollArea", [ln, un] = i(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
55
+ let { __scopeScrollArea: n, type: i = "hover", dir: a, scrollHideDelay: s = 600, ...c } = e, [l, u] = P.useState(null), [d, p] = P.useState(null), [m, h] = P.useState(null), [g, _] = P.useState(null), [v, y] = P.useState(null), [b, x] = P.useState(0), [S, ee] = P.useState(0), [te, ne] = P.useState(!1), [C, re] = P.useState(!1), w = r(t, u), T = f(a);
56
+ return /* @__PURE__ */ H(dn, {
53
57
  scope: n,
54
- type: r,
55
- dir: ne,
56
- scrollHideDelay: o,
58
+ type: i,
59
+ dir: T,
60
+ scrollHideDelay: s,
57
61
  scrollArea: l,
58
62
  viewport: d,
59
63
  onViewportChange: p,
@@ -61,18 +65,18 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
61
65
  onContentChange: h,
62
66
  scrollbarX: g,
63
67
  onScrollbarXChange: _,
64
- scrollbarXEnabled: C,
65
- onScrollbarXEnabledChange: w,
68
+ scrollbarXEnabled: te,
69
+ onScrollbarXEnabledChange: ne,
66
70
  scrollbarY: v,
67
71
  onScrollbarYChange: y,
68
- scrollbarYEnabled: T,
69
- onScrollbarYEnabledChange: te,
72
+ scrollbarYEnabled: C,
73
+ onScrollbarYEnabledChange: re,
70
74
  onCornerWidthChange: x,
71
75
  onCornerHeightChange: ee,
72
- children: /* @__PURE__ */ V(a.div, {
73
- dir: ne,
76
+ children: /* @__PURE__ */ H(o.div, {
77
+ dir: T,
74
78
  ...c,
75
- ref: E,
79
+ ref: w,
76
80
  style: {
77
81
  position: "relative",
78
82
  "--radix-scroll-area-corner-width": b + "px",
@@ -81,80 +85,80 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
81
85
  }
82
86
  })
83
87
  });
84
- }, "ScrollArea")), pn = "ScrollAreaViewport", mn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
85
- let { __scopeScrollArea: n, children: r, nonce: i, ...o } = e, c = G(pn, n), l = s(t, N.useRef(null), c.onViewportChange);
86
- return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(hn, { nonce: i }), /* @__PURE__ */ V(a.div, {
88
+ }, "ScrollArea")), pn = "ScrollAreaViewport", mn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
89
+ let { __scopeScrollArea: n, children: i, nonce: a, ...s } = e, c = G(pn, n), l = r(t, P.useRef(null), c.onViewportChange);
90
+ return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(hn, { nonce: a }), /* @__PURE__ */ H(o.div, {
87
91
  "data-radix-scroll-area-viewport": "",
88
- ...o,
92
+ ...s,
89
93
  ref: l,
90
94
  style: {
91
95
  overflowX: c.scrollbarXEnabled ? "scroll" : "hidden",
92
96
  overflowY: c.scrollbarYEnabled ? "scroll" : "hidden",
93
97
  ...e.style
94
98
  },
95
- children: /* @__PURE__ */ V("div", {
99
+ children: /* @__PURE__ */ H("div", {
96
100
  ref: c.onContentChange,
97
101
  style: {
98
102
  minWidth: "100%",
99
103
  display: "table"
100
104
  },
101
- children: r
105
+ children: i
102
106
  })
103
107
  })] });
104
- }, "ScrollAreaViewport")), hn = /* @__PURE__ */ N.memo(/* @__PURE__ */ W(function({ nonce: e }) {
105
- return /* @__PURE__ */ V("style", {
108
+ }, "ScrollAreaViewport")), hn = /* @__PURE__ */ P.memo(/* @__PURE__ */ W(function({ nonce: e }) {
109
+ return /* @__PURE__ */ H("style", {
106
110
  dangerouslySetInnerHTML: { __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}" },
107
111
  nonce: e
108
112
  });
109
- }, "ScrollAreaViewportStyle"), (e, t) => e.nonce === t.nonce), K = "ScrollAreaScrollbar", gn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
113
+ }, "ScrollAreaViewportStyle"), (e, t) => e.nonce === t.nonce), K = "ScrollAreaScrollbar", gn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
110
114
  let { forceMount: n, ...r } = e, i = G(K, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: o } = i, s = e.orientation === "horizontal";
111
- return N.useEffect(() => (s ? a(!0) : o(!0), () => {
115
+ return P.useEffect(() => (s ? a(!0) : o(!0), () => {
112
116
  s ? a(!1) : o(!1);
113
117
  }), [
114
118
  s,
115
119
  a,
116
120
  o
117
- ]), i.type === "hover" ? /* @__PURE__ */ V(_n, {
121
+ ]), i.type === "hover" ? /* @__PURE__ */ H(_n, {
118
122
  ...r,
119
123
  ref: t,
120
124
  forceMount: n
121
- }) : i.type === "scroll" ? /* @__PURE__ */ V(vn, {
125
+ }) : i.type === "scroll" ? /* @__PURE__ */ H(vn, {
122
126
  ...r,
123
127
  ref: t,
124
128
  forceMount: n
125
- }) : i.type === "auto" ? /* @__PURE__ */ V(yn, {
129
+ }) : i.type === "auto" ? /* @__PURE__ */ H(yn, {
126
130
  ...r,
127
131
  ref: t,
128
132
  forceMount: n
129
- }) : i.type === "always" ? /* @__PURE__ */ V(bn, {
133
+ }) : i.type === "always" ? /* @__PURE__ */ H(bn, {
130
134
  ...r,
131
135
  ref: t,
132
136
  "data-state": "visible"
133
137
  }) : null;
134
- }, "ScrollAreaScrollbar")), _n = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
135
- let { forceMount: n, ...r } = e, a = G(K, e.__scopeScrollArea), [o, s] = N.useState(!1);
136
- return N.useEffect(() => {
137
- let e = a.scrollArea, t = 0;
138
+ }, "ScrollAreaScrollbar")), _n = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
139
+ let { forceMount: n, ...r } = e, i = G(K, e.__scopeScrollArea), [o, s] = P.useState(!1);
140
+ return P.useEffect(() => {
141
+ let e = i.scrollArea, t = 0;
138
142
  if (e) {
139
143
  let n = /* @__PURE__ */ W(() => {
140
144
  window.clearTimeout(t), s(!0);
141
145
  }, "handlePointerEnter"), r = /* @__PURE__ */ W(() => {
142
- t = window.setTimeout(() => s(!1), a.scrollHideDelay);
146
+ t = window.setTimeout(() => s(!1), i.scrollHideDelay);
143
147
  }, "handlePointerLeave");
144
148
  return e.addEventListener("pointerenter", n), e.addEventListener("pointerleave", r), () => {
145
149
  window.clearTimeout(t), e.removeEventListener("pointerenter", n), e.removeEventListener("pointerleave", r);
146
150
  };
147
151
  }
148
- }, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ V(i, {
152
+ }, [i.scrollArea, i.scrollHideDelay]), /* @__PURE__ */ H(a, {
149
153
  present: n || o,
150
- children: /* @__PURE__ */ V(yn, {
154
+ children: /* @__PURE__ */ H(yn, {
151
155
  "data-state": o ? "visible" : "hidden",
152
156
  ...r,
153
157
  ref: t
154
158
  })
155
159
  });
156
- }, "ScrollAreaScrollbarHover")), vn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
157
- let { forceMount: n, ...r } = e, a = G(K, e.__scopeScrollArea), o = e.orientation === "horizontal", s = Y(() => u("SCROLL_END"), 100), [c, u] = sn("hidden", {
160
+ }, "ScrollAreaScrollbarHover")), vn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
161
+ let { forceMount: n, ...r } = e, i = G(K, e.__scopeScrollArea), o = e.orientation === "horizontal", s = Y(() => u("SCROLL_END"), 100), [c, u] = sn("hidden", {
158
162
  hidden: { SCROLL: "scrolling" },
159
163
  scrolling: {
160
164
  SCROLL_END: "idle",
@@ -170,17 +174,17 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
170
174
  POINTER_ENTER: "interacting"
171
175
  }
172
176
  });
173
- return N.useEffect(() => {
177
+ return P.useEffect(() => {
174
178
  if (c === "idle") {
175
- let e = window.setTimeout(() => u("HIDE"), a.scrollHideDelay);
179
+ let e = window.setTimeout(() => u("HIDE"), i.scrollHideDelay);
176
180
  return () => window.clearTimeout(e);
177
181
  }
178
182
  }, [
179
183
  c,
180
- a.scrollHideDelay,
184
+ i.scrollHideDelay,
181
185
  u
182
- ]), N.useEffect(() => {
183
- let e = a.viewport, t = o ? "scrollLeft" : "scrollTop";
186
+ ]), P.useEffect(() => {
187
+ let e = i.viewport, t = o ? "scrollLeft" : "scrollTop";
184
188
  if (e) {
185
189
  let n = e[t], r = /* @__PURE__ */ W(() => {
186
190
  let r = e[t];
@@ -189,13 +193,13 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
189
193
  return e.addEventListener("scroll", r), () => e.removeEventListener("scroll", r);
190
194
  }
191
195
  }, [
192
- a.viewport,
196
+ i.viewport,
193
197
  o,
194
198
  u,
195
199
  s
196
- ]), /* @__PURE__ */ V(i, {
200
+ ]), /* @__PURE__ */ H(a, {
197
201
  present: n || c !== "hidden",
198
- children: /* @__PURE__ */ V(bn, {
202
+ children: /* @__PURE__ */ H(bn, {
199
203
  "data-state": c === "hidden" ? "hidden" : "visible",
200
204
  ...r,
201
205
  ref: t,
@@ -203,23 +207,23 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
203
207
  onPointerLeave: l(e.onPointerLeave, () => u("POINTER_LEAVE"))
204
208
  })
205
209
  });
206
- }, "ScrollAreaScrollbarScroll")), yn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
207
- let n = G(K, e.__scopeScrollArea), { forceMount: r, ...a } = e, [o, s] = N.useState(!1), c = e.orientation === "horizontal", l = Y(() => {
210
+ }, "ScrollAreaScrollbarScroll")), yn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
211
+ let n = G(K, e.__scopeScrollArea), { forceMount: r, ...i } = e, [o, s] = P.useState(!1), c = e.orientation === "horizontal", l = Y(() => {
208
212
  if (n.viewport) {
209
213
  let e = n.viewport.offsetWidth < n.viewport.scrollWidth, t = n.viewport.offsetHeight < n.viewport.scrollHeight;
210
214
  s(c ? e : t);
211
215
  }
212
216
  }, 10);
213
- return X(n.viewport, l), X(n.content, l), /* @__PURE__ */ V(i, {
217
+ return X(n.viewport, l), X(n.content, l), /* @__PURE__ */ H(a, {
214
218
  present: r || o,
215
- children: /* @__PURE__ */ V(bn, {
219
+ children: /* @__PURE__ */ H(bn, {
216
220
  "data-state": o ? "visible" : "hidden",
217
- ...a,
221
+ ...i,
218
222
  ref: t
219
223
  })
220
224
  });
221
- }, "ScrollAreaScrollbarAuto")), bn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
222
- let { orientation: n = "vertical", ...r } = e, i = G(K, e.__scopeScrollArea), a = N.useRef(null), o = N.useRef(0), [s, c] = N.useState({
225
+ }, "ScrollAreaScrollbarAuto")), bn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
226
+ let { orientation: n = "vertical", ...r } = e, i = G(K, e.__scopeScrollArea), a = P.useRef(null), o = P.useRef(0), [s, c] = P.useState({
223
227
  content: 0,
224
228
  viewport: 0,
225
229
  scrollbar: {
@@ -239,7 +243,7 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
239
243
  function d(e, t) {
240
244
  return Nn(e, o.current, s, t);
241
245
  }
242
- return W(d, "getScrollPosition"), n === "horizontal" ? /* @__PURE__ */ V(xn, {
246
+ return W(d, "getScrollPosition"), n === "horizontal" ? /* @__PURE__ */ H(xn, {
243
247
  ...u,
244
248
  ref: t,
245
249
  onThumbPositionChange: () => {
@@ -254,7 +258,7 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
254
258
  onDragScroll: (e) => {
255
259
  i.viewport && (i.viewport.scrollLeft = d(e, i.dir));
256
260
  }
257
- }) : n === "vertical" ? /* @__PURE__ */ V(Sn, {
261
+ }) : n === "vertical" ? /* @__PURE__ */ H(Sn, {
258
262
  ...u,
259
263
  ref: t,
260
264
  onThumbPositionChange: () => {
@@ -270,55 +274,55 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
270
274
  i.viewport && (i.viewport.scrollTop = d(e));
271
275
  }
272
276
  }) : null;
273
- }, "ScrollAreaScrollbarVisible")), xn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
274
- let { sizes: n, onSizesChange: r, ...i } = e, a = G(K, e.__scopeScrollArea), [o, c] = N.useState(), l = N.useRef(null), u = s(t, l, a.onScrollbarXChange);
275
- return N.useEffect(() => {
277
+ }, "ScrollAreaScrollbarVisible")), xn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
278
+ let { sizes: n, onSizesChange: i, ...a } = e, o = G(K, e.__scopeScrollArea), [s, c] = P.useState(), l = P.useRef(null), u = r(t, l, o.onScrollbarXChange);
279
+ return P.useEffect(() => {
276
280
  l.current && c(getComputedStyle(l.current));
277
- }, [l]), /* @__PURE__ */ V(Tn, {
281
+ }, [l]), /* @__PURE__ */ H(Tn, {
278
282
  "data-orientation": "horizontal",
279
- ...i,
283
+ ...a,
280
284
  ref: u,
281
285
  sizes: n,
282
286
  style: {
283
287
  bottom: 0,
284
- left: a.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
285
- right: a.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
288
+ left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
289
+ right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
286
290
  "--radix-scroll-area-thumb-width": J(n) + "px",
287
291
  ...e.style
288
292
  },
289
293
  onThumbPointerDown: (t) => e.onThumbPointerDown(t.x),
290
294
  onDragScroll: (t) => e.onDragScroll(t.x),
291
295
  onWheelScroll: (t, n) => {
292
- if (a.viewport) {
293
- let r = a.viewport.scrollLeft + t.deltaX;
296
+ if (o.viewport) {
297
+ let r = o.viewport.scrollLeft + t.deltaX;
294
298
  e.onWheelScroll(r), In(r, n) && t.preventDefault();
295
299
  }
296
300
  },
297
301
  onResize: () => {
298
- l.current && a.viewport && o && r({
299
- content: a.viewport.scrollWidth,
300
- viewport: a.viewport.offsetWidth,
302
+ l.current && o.viewport && s && i({
303
+ content: o.viewport.scrollWidth,
304
+ viewport: o.viewport.offsetWidth,
301
305
  scrollbar: {
302
306
  size: l.current.clientWidth,
303
- paddingStart: q(o.paddingLeft),
304
- paddingEnd: q(o.paddingRight)
307
+ paddingStart: q(s.paddingLeft),
308
+ paddingEnd: q(s.paddingRight)
305
309
  }
306
310
  });
307
311
  }
308
312
  });
309
- }, "ScrollAreaScrollbarX")), Sn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
310
- let { sizes: n, onSizesChange: r, ...i } = e, a = G(K, e.__scopeScrollArea), [o, c] = N.useState(), l = N.useRef(null), u = s(t, l, a.onScrollbarYChange);
311
- return N.useEffect(() => {
313
+ }, "ScrollAreaScrollbarX")), Sn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
314
+ let { sizes: n, onSizesChange: i, ...a } = e, o = G(K, e.__scopeScrollArea), [s, c] = P.useState(), l = P.useRef(null), u = r(t, l, o.onScrollbarYChange);
315
+ return P.useEffect(() => {
312
316
  l.current && c(getComputedStyle(l.current));
313
- }, [l]), /* @__PURE__ */ V(Tn, {
317
+ }, [l]), /* @__PURE__ */ H(Tn, {
314
318
  "data-orientation": "vertical",
315
- ...i,
319
+ ...a,
316
320
  ref: u,
317
321
  sizes: n,
318
322
  style: {
319
323
  top: 0,
320
- right: a.dir === "ltr" ? 0 : void 0,
321
- left: a.dir === "rtl" ? 0 : void 0,
324
+ right: o.dir === "ltr" ? 0 : void 0,
325
+ left: o.dir === "rtl" ? 0 : void 0,
322
326
  bottom: "var(--radix-scroll-area-corner-height)",
323
327
  "--radix-scroll-area-thumb-height": J(n) + "px",
324
328
  ...e.style
@@ -326,26 +330,26 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
326
330
  onThumbPointerDown: (t) => e.onThumbPointerDown(t.y),
327
331
  onDragScroll: (t) => e.onDragScroll(t.y),
328
332
  onWheelScroll: (t, n) => {
329
- if (a.viewport) {
330
- let r = a.viewport.scrollTop + t.deltaY;
333
+ if (o.viewport) {
334
+ let r = o.viewport.scrollTop + t.deltaY;
331
335
  e.onWheelScroll(r), In(r, n) && t.preventDefault();
332
336
  }
333
337
  },
334
338
  onResize: () => {
335
- l.current && a.viewport && o && r({
336
- content: a.viewport.scrollHeight,
337
- viewport: a.viewport.offsetHeight,
339
+ l.current && o.viewport && s && i({
340
+ content: o.viewport.scrollHeight,
341
+ viewport: o.viewport.offsetHeight,
338
342
  scrollbar: {
339
343
  size: l.current.clientHeight,
340
- paddingStart: q(o.paddingTop),
341
- paddingEnd: q(o.paddingBottom)
344
+ paddingStart: q(s.paddingTop),
345
+ paddingEnd: q(s.paddingBottom)
342
346
  }
343
347
  });
344
348
  }
345
349
  });
346
- }, "ScrollAreaScrollbarY")), [Cn, wn] = ln(K), Tn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
347
- let { __scopeScrollArea: n, sizes: r, hasThumb: i, onThumbChange: o, onThumbPointerUp: c, onThumbPointerDown: u, onThumbPositionChange: f, onDragScroll: p, onWheelScroll: m, onResize: h, ...g } = e, _ = G(K, n), [v, y] = N.useState(null), b = s(t, y), x = N.useRef(null), S = N.useRef(""), ee = _.viewport, C = r.content - r.viewport, w = d(m), T = d(f), te = Y(h, 10);
348
- function E(e) {
350
+ }, "ScrollAreaScrollbarY")), [Cn, wn] = ln(K), Tn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
351
+ let { __scopeScrollArea: n, sizes: i, hasThumb: a, onThumbChange: c, onThumbPointerUp: u, onThumbPointerDown: d, onThumbPositionChange: f, onDragScroll: p, onWheelScroll: m, onResize: h, ...g } = e, _ = G(K, n), [v, y] = P.useState(null), b = r(t, y), x = P.useRef(null), S = P.useRef(""), ee = _.viewport, te = i.content - i.viewport, ne = s(m), C = s(f), re = Y(h, 10);
352
+ function w(e) {
349
353
  if (x.current) {
350
354
  let t = e.clientX - x.current.left, n = e.clientY - x.current.top;
351
355
  p({
@@ -354,26 +358,26 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
354
358
  });
355
359
  }
356
360
  }
357
- return W(E, "handleDragScroll"), N.useEffect(() => {
361
+ return W(w, "handleDragScroll"), P.useEffect(() => {
358
362
  let e = /* @__PURE__ */ W((e) => {
359
363
  let t = e.target;
360
- v?.contains(t) && w(e, C);
364
+ v?.contains(t) && ne(e, te);
361
365
  }, "handleWheel");
362
366
  return document.addEventListener("wheel", e, { passive: !1 }), () => document.removeEventListener("wheel", e, { passive: !1 });
363
367
  }, [
364
368
  ee,
365
369
  v,
366
- C,
367
- w
368
- ]), N.useEffect(T, [r, T]), X(v, te), X(_.content, te), /* @__PURE__ */ V(Cn, {
370
+ te,
371
+ ne
372
+ ]), P.useEffect(C, [i, C]), X(v, re), X(_.content, re), /* @__PURE__ */ H(Cn, {
369
373
  scope: n,
370
374
  scrollbar: v,
371
- hasThumb: i,
372
- onThumbChange: d(o),
373
- onThumbPointerUp: d(c),
374
- onThumbPositionChange: T,
375
- onThumbPointerDown: d(u),
376
- children: /* @__PURE__ */ V(a.div, {
375
+ hasThumb: a,
376
+ onThumbChange: s(c),
377
+ onThumbPointerUp: s(u),
378
+ onThumbPositionChange: C,
379
+ onThumbPointerDown: s(d),
380
+ children: /* @__PURE__ */ H(o.div, {
377
381
  ...g,
378
382
  ref: b,
379
383
  style: {
@@ -381,30 +385,30 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
381
385
  ...g.style
382
386
  },
383
387
  onPointerDown: l(e.onPointerDown, (e) => {
384
- e.button === 0 && (e.target.setPointerCapture(e.pointerId), x.current = v.getBoundingClientRect(), S.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", _.viewport && (_.viewport.style.scrollBehavior = "auto"), E(e));
388
+ e.button === 0 && (e.target.setPointerCapture(e.pointerId), x.current = v.getBoundingClientRect(), S.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", _.viewport && (_.viewport.style.scrollBehavior = "auto"), w(e));
385
389
  }),
386
- onPointerMove: l(e.onPointerMove, E),
390
+ onPointerMove: l(e.onPointerMove, w),
387
391
  onPointerUp: l(e.onPointerUp, (e) => {
388
392
  let t = e.target;
389
393
  t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), document.body.style.webkitUserSelect = S.current, _.viewport && (_.viewport.style.scrollBehavior = ""), x.current = null;
390
394
  })
391
395
  })
392
396
  });
393
- }, "ScrollAreaScrollbarImpl")), En = "ScrollAreaThumb", Dn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
394
- let { forceMount: n, ...r } = e, a = wn(En, e.__scopeScrollArea);
395
- return /* @__PURE__ */ V(i, {
396
- present: n || a.hasThumb,
397
- children: /* @__PURE__ */ V(On, {
397
+ }, "ScrollAreaScrollbarImpl")), En = "ScrollAreaThumb", Dn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
398
+ let { forceMount: n, ...r } = e, i = wn(En, e.__scopeScrollArea);
399
+ return /* @__PURE__ */ H(a, {
400
+ present: n || i.hasThumb,
401
+ children: /* @__PURE__ */ H(On, {
398
402
  ref: t,
399
403
  ...r
400
404
  })
401
405
  });
402
- }, "ScrollAreaThumb")), On = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
403
- let { __scopeScrollArea: n, style: r, ...i } = e, o = G(En, n), c = wn(En, n), { onThumbPositionChange: u } = c, d = s(t, c.onThumbChange), f = N.useRef(void 0), p = Y(() => {
406
+ }, "ScrollAreaThumb")), On = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
407
+ let { __scopeScrollArea: n, style: i, ...a } = e, s = G(En, n), c = wn(En, n), { onThumbPositionChange: u } = c, d = r(t, c.onThumbChange), f = P.useRef(void 0), p = Y(() => {
404
408
  f.current &&= (f.current(), void 0);
405
409
  }, 100);
406
- return N.useEffect(() => {
407
- let e = o.viewport;
410
+ return P.useEffect(() => {
411
+ let e = s.viewport;
408
412
  if (e) {
409
413
  let t = /* @__PURE__ */ W(() => {
410
414
  if (p(), !f.current) {
@@ -415,17 +419,17 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
415
419
  return u(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
416
420
  }
417
421
  }, [
418
- o.viewport,
422
+ s.viewport,
419
423
  p,
420
424
  u
421
- ]), /* @__PURE__ */ V(a.div, {
425
+ ]), /* @__PURE__ */ H(o.div, {
422
426
  "data-state": c.hasThumb ? "visible" : "hidden",
423
- ...i,
427
+ ...a,
424
428
  ref: d,
425
429
  style: {
426
430
  width: "var(--radix-scroll-area-thumb-width)",
427
431
  height: "var(--radix-scroll-area-thumb-height)",
428
- ...r
432
+ ...i
429
433
  },
430
434
  onPointerDownCapture: l(e.onPointerDownCapture, (e) => {
431
435
  let t = e.target.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
@@ -436,27 +440,27 @@ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */
436
440
  }),
437
441
  onPointerUp: l(e.onPointerUp, c.onThumbPointerUp)
438
442
  });
439
- }, "ScrollAreaThumbImpl")), kn = "ScrollAreaCorner", An = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
443
+ }, "ScrollAreaThumbImpl")), kn = "ScrollAreaCorner", An = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
440
444
  let n = G(kn, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
441
- return n.type !== "scroll" && r ? /* @__PURE__ */ V(jn, {
445
+ return n.type !== "scroll" && r ? /* @__PURE__ */ H(jn, {
442
446
  ...e,
443
447
  ref: t
444
448
  }) : null;
445
- }, "ScrollAreaCorner")), jn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
446
- let { __scopeScrollArea: n, ...r } = e, i = G(kn, n), [o, s] = N.useState(0), [c, l] = N.useState(0), u = !!(o && c), { onCornerWidthChange: d, onCornerHeightChange: f } = i;
449
+ }, "ScrollAreaCorner")), jn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ W(function(e, t) {
450
+ let { __scopeScrollArea: n, ...r } = e, i = G(kn, n), [a, s] = P.useState(0), [c, l] = P.useState(0), u = !!(a && c), { onCornerWidthChange: d, onCornerHeightChange: f } = i;
447
451
  return X(i.scrollbarX, () => {
448
452
  let e = i.scrollbarX?.offsetHeight || 0;
449
453
  i.onCornerHeightChange(e), l(e);
450
454
  }), X(i.scrollbarY, () => {
451
455
  let e = i.scrollbarY?.offsetWidth || 0;
452
456
  i.onCornerWidthChange(e), s(e);
453
- }), N.useEffect(() => () => {
457
+ }), P.useEffect(() => () => {
454
458
  d(0), f(0);
455
- }, [d, f]), u ? /* @__PURE__ */ V(a.div, {
459
+ }, [d, f]), u ? /* @__PURE__ */ H(o.div, {
456
460
  ...r,
457
461
  ref: t,
458
462
  style: {
459
- width: o,
463
+ width: a,
460
464
  height: c,
461
465
  position: "absolute",
462
466
  right: i.dir === "ltr" ? 0 : void 0,
@@ -516,15 +520,15 @@ var Ln = /* @__PURE__ */ W((e, t = () => {}) => {
516
520
  }), "loop"))(), () => window.cancelAnimationFrame(r);
517
521
  }, "addUnlinkedScrollListener");
518
522
  function Y(e, t) {
519
- let n = d(e), r = N.useRef(0);
520
- return N.useEffect(() => () => window.clearTimeout(r.current), []), N.useCallback(() => {
523
+ let n = s(e), r = P.useRef(0);
524
+ return P.useEffect(() => () => window.clearTimeout(r.current), []), P.useCallback(() => {
521
525
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
522
526
  }, [n, t]);
523
527
  }
524
528
  W(Y, "useDebounceCallback");
525
529
  function X(e, t) {
526
- let n = d(t);
527
- o(() => {
530
+ let n = s(t);
531
+ c(() => {
528
532
  let t = 0;
529
533
  if (e) {
530
534
  let r = new ResizeObserver(() => {
@@ -541,7 +545,7 @@ var Rn = fn, zn = mn, Bn = An;
541
545
  //#endregion
542
546
  //#region lib/components/ui/actions/toolbar/toolbar-toggle-group.tsx
543
547
  function Vn(e, t, n) {
544
- let [r, i] = z(t ?? "");
548
+ let [r, i] = B(t ?? "");
545
549
  return {
546
550
  value: e ?? r,
547
551
  onValueChange: (e) => {
@@ -550,27 +554,27 @@ function Vn(e, t, n) {
550
554
  };
551
555
  }
552
556
  function Hn(e) {
553
- let { label: t, children: r, priority: i, moreAs: a, disabled: o, className: s } = e, { spilled: c, inside: l, props: u } = fe({
557
+ let { label: t, children: r, priority: i, moreAs: a, disabled: o, className: s } = e, { spilled: c, inside: l, props: u } = ue({
554
558
  label: t,
555
559
  group: !0,
556
560
  choice: e.type,
557
561
  moreAs: a
558
- }, i), d = L(() => ({ spilled: c }), [c]), f = Vn(e.type === "single" ? e.value : void 0, e.type === "single" ? e.defaultValue : void 0, e.type === "single" ? e.onValueChange : void 0), p = {
562
+ }, i), d = R(() => ({ spilled: c }), [c]), f = Vn(e.type === "single" ? e.value : void 0, e.type === "single" ? e.defaultValue : void 0, e.type === "single" ? e.onValueChange : void 0), p = {
559
563
  ...u,
560
564
  "aria-label": t,
561
565
  disabled: o,
562
566
  "data-slot": "toolbar-toggle-group",
563
567
  className: n(l && "nxgt-toolbar-group", s),
564
- children: /* @__PURE__ */ V(he, {
568
+ children: /* @__PURE__ */ H(pe, {
565
569
  value: d,
566
570
  children: r
567
571
  })
568
572
  };
569
- return e.type === "single" ? /* @__PURE__ */ V(ve, {
573
+ return e.type === "single" ? /* @__PURE__ */ H(ge, {
570
574
  ...p,
571
575
  type: "single",
572
576
  ...f
573
- }) : /* @__PURE__ */ V(ve, {
577
+ }) : /* @__PURE__ */ H(ge, {
574
578
  ...p,
575
579
  type: "multiple",
576
580
  role: "group",
@@ -580,7 +584,7 @@ function Hn(e) {
580
584
  });
581
585
  }
582
586
  function Un({ value: e, ...t }) {
583
- return /* @__PURE__ */ V(me, {
587
+ return /* @__PURE__ */ H(fe, {
584
588
  ...t,
585
589
  toggle: !0,
586
590
  toggleValue: e
@@ -588,7 +592,7 @@ function Un({ value: e, ...t }) {
588
592
  }
589
593
  //#endregion
590
594
  //#region lib/components/touch-box.ts
591
- var Wn = "pointer-coarse:size-11 pointer-coarse:p-1.5 pointer-coarse:bg-clip-content", Gn = `${Wn} pointer-coarse:-m-1.5`, Kn = "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", qn = u("nxgt-sheet fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain", {
595
+ var Wn = "pointer-coarse:size-11 pointer-coarse:p-1.5 pointer-coarse:bg-clip-content", Gn = `${Wn} pointer-coarse:-m-1.5`, Kn = "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", qn = d("nxgt-sheet fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain", {
592
596
  variants: {
593
597
  side: {
594
598
  right: "inset-y-0 right-0 h-full w-[calc(100%-3.5rem)] sm:max-w-sm",
@@ -631,28 +635,28 @@ var Wn = "pointer-coarse:size-11 pointer-coarse:p-1.5 pointer-coarse:bg-clip-con
631
635
  //#endregion
632
636
  //#region lib/components/ui/overlays/sheet/sheet-parts.tsx
633
637
  function Jn({ className: e, ...t }) {
634
- return /* @__PURE__ */ V("div", {
638
+ return /* @__PURE__ */ H("div", {
635
639
  "data-slot": "sheet-header",
636
640
  className: n("flex flex-col gap-1.5 p-4", e),
637
641
  ...t
638
642
  });
639
643
  }
640
644
  function Yn({ className: e, ...t }) {
641
- return /* @__PURE__ */ V("div", {
645
+ return /* @__PURE__ */ H("div", {
642
646
  "data-slot": "sheet-footer",
643
647
  className: n("mt-auto flex flex-col gap-2 p-4 *:w-full", e),
644
648
  ...t
645
649
  });
646
650
  }
647
651
  function Xn({ className: e, ...t }) {
648
- return /* @__PURE__ */ V(te, {
652
+ return /* @__PURE__ */ H(v, {
649
653
  "data-slot": "sheet-title",
650
654
  className: n("text-foreground text-xl/7 font-medium tracking-tight", e),
651
655
  ...t
652
656
  });
653
657
  }
654
658
  function Zn({ className: e, ...t }) {
655
- return /* @__PURE__ */ V(ne, {
659
+ return /* @__PURE__ */ H(b, {
656
660
  "data-slot": "sheet-description",
657
661
  className: n("text-muted-foreground text-sm/5", e),
658
662
  ...t
@@ -661,43 +665,43 @@ function Zn({ className: e, ...t }) {
661
665
  //#endregion
662
666
  //#region lib/components/ui/overlays/sheet/sheet.tsx
663
667
  function Qn({ ...e }) {
664
- return /* @__PURE__ */ V(S, {
668
+ return /* @__PURE__ */ H(p, {
665
669
  value: e.modal ?? !0,
666
- children: /* @__PURE__ */ V(E, {
670
+ children: /* @__PURE__ */ H(y, {
667
671
  "data-slot": "sheet",
668
672
  ...e
669
673
  })
670
674
  });
671
675
  }
672
676
  function $n({ ...e }) {
673
- return /* @__PURE__ */ V(oe, {
677
+ return /* @__PURE__ */ H(te, {
674
678
  "data-slot": "sheet-trigger",
675
679
  ...e
676
680
  });
677
681
  }
678
682
  function er({ className: e, color: t, children: r, type: i = "button", variant: a = "ghost", ...o }) {
679
- let { t: s } = j();
680
- return /* @__PURE__ */ V(C, {
683
+ let { t: s } = N();
684
+ return /* @__PURE__ */ H(h, {
681
685
  "aria-label": r ? void 0 : s("material.buttons.close", "Close"),
682
686
  ...o,
683
687
  type: i,
684
- className: n("absolute top-2 right-2", ye({
688
+ className: n("absolute top-2 right-2", ve({
685
689
  variant: a,
686
690
  color: t,
687
691
  className: n(Kn, e)
688
692
  })),
689
693
  "data-slot": "sheet-close",
690
- children: r || /* @__PURE__ */ V(lt, { className: "size-4" })
694
+ children: r || /* @__PURE__ */ H(ct, { className: "size-4" })
691
695
  });
692
696
  }
693
697
  function tr({ ...e }) {
694
- return /* @__PURE__ */ V(w, {
698
+ return /* @__PURE__ */ H(g, {
695
699
  "data-slot": "sheet-portal",
696
700
  ...e
697
701
  });
698
702
  }
699
703
  function nr({ className: e, scrim: t = "dim", ...r }) {
700
- return /* @__PURE__ */ V(T, {
704
+ return /* @__PURE__ */ H(_, {
701
705
  "data-slot": "sheet-overlay",
702
706
  "data-scrim": t,
703
707
  className: n("nxgt-scrim fixed inset-0 z-50", e),
@@ -705,21 +709,21 @@ function nr({ className: e, scrim: t = "dim", ...r }) {
705
709
  });
706
710
  }
707
711
  function rr({ className: e, children: t, side: r = "right", withCloseButton: i, inset: a = !1, scrim: o, onOpenAutoFocus: s, onCloseAutoFocus: c, onEscapeKeyDown: l, ref: u, ...d }) {
708
- let { t: f } = j(), p = ae({
712
+ let { t: f } = N(), p = ee({
709
713
  onOpenAutoFocus: s,
710
714
  onCloseAutoFocus: c
711
- }), m = re({
715
+ }), g = x({
712
716
  ref: u,
713
717
  onEscapeKeyDown: l,
714
718
  ...d
715
719
  });
716
- return /* @__PURE__ */ V(ee, {
720
+ return /* @__PURE__ */ H(m, {
717
721
  value: !0,
718
- children: /* @__PURE__ */ H(tr, { children: [/* @__PURE__ */ V(nr, {
719
- ref: m.overlayRef,
722
+ children: /* @__PURE__ */ U(tr, { children: [/* @__PURE__ */ H(nr, {
723
+ ref: g.overlayRef,
720
724
  scrim: o
721
- }), /* @__PURE__ */ H(ue, {
722
- ref: m.ref,
725
+ }), /* @__PURE__ */ U(w, {
726
+ ref: g.ref,
723
727
  "data-slot": "sheet-content",
724
728
  "data-side": r,
725
729
  "data-inset": a || void 0,
@@ -729,17 +733,17 @@ function rr({ className: e, children: t, side: r = "right", withCloseButton: i,
729
733
  }), i && (r === "bottom" || a ? "pt-8" : "pt-[calc(2rem+env(safe-area-inset-top))]"), e),
730
734
  onOpenAutoFocus: p.onOpenAutoFocus,
731
735
  onCloseAutoFocus: p.onCloseAutoFocus,
732
- onEscapeKeyDown: m.onEscapeKeyDown,
736
+ onEscapeKeyDown: g.onEscapeKeyDown,
733
737
  ...d,
734
- ...m.outside,
735
- children: [t, i && /* @__PURE__ */ V(C, {
738
+ ...g.outside,
739
+ children: [t, i && /* @__PURE__ */ H(h, {
736
740
  "aria-label": f("material.buttons.close", "Close"),
737
- className: ye({
741
+ className: ve({
738
742
  variant: "tonal",
739
743
  color: "default",
740
744
  className: n("absolute right-3 top-3", "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", !a && r !== "bottom" && "top-[max(0.75rem,env(safe-area-inset-top))]", !a && r === "right" && "right-[max(0.75rem,env(safe-area-inset-right))]")
741
745
  }),
742
- children: /* @__PURE__ */ V(ut, { className: "size-4" })
746
+ children: /* @__PURE__ */ H(lt, { className: "size-4" })
743
747
  })]
744
748
  })] })
745
749
  });
@@ -747,31 +751,31 @@ function rr({ className: e, children: t, side: r = "right", withCloseButton: i,
747
751
  //#endregion
748
752
  //#region lib/components/ui/primitives/scroll-area/scroll-area.tsx
749
753
  function ir({ className: e, children: t, viewportProps: r, ...i }) {
750
- let a = De();
751
- return /* @__PURE__ */ H(Rn, {
754
+ let a = we();
755
+ return /* @__PURE__ */ U(Rn, {
752
756
  "data-slot": "scroll-area",
753
757
  className: n("relative", e),
754
758
  ...i,
755
759
  children: [
756
- /* @__PURE__ */ V(zn, {
760
+ /* @__PURE__ */ H(zn, {
757
761
  ...r,
758
762
  "data-slot": "scroll-area-viewport",
759
763
  nonce: a,
760
764
  className: n("focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", r?.className),
761
765
  children: t
762
766
  }),
763
- /* @__PURE__ */ V(ar, {}),
764
- /* @__PURE__ */ V(Bn, {})
767
+ /* @__PURE__ */ H(ar, {}),
768
+ /* @__PURE__ */ H(Bn, {})
765
769
  ]
766
770
  });
767
771
  }
768
772
  function ar({ className: e, orientation: t = "vertical", ...r }) {
769
- return /* @__PURE__ */ V(gn, {
773
+ return /* @__PURE__ */ H(gn, {
770
774
  "data-slot": "scroll-area-scrollbar",
771
775
  orientation: t,
772
776
  className: n("flex touch-none p-px transition-colors select-none", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
773
777
  ...r,
774
- children: /* @__PURE__ */ V(Dn, {
778
+ children: /* @__PURE__ */ H(Dn, {
775
779
  "data-slot": "scroll-area-thumb",
776
780
  className: "bg-border relative flex-1 rounded-full"
777
781
  })
@@ -780,8 +784,8 @@ function ar({ className: e, orientation: t = "vertical", ...r }) {
780
784
  //#endregion
781
785
  //#region lib/components/ui/feedback/error-state/partials/error-state-actions.tsx
782
786
  function or({ onRetry: e, retrying: t, retryLabel: n, action: r }) {
783
- let { t: i } = j(), [a, o] = z(!1);
784
- return /* @__PURE__ */ H(B, { children: [e && /* @__PURE__ */ V(M, {
787
+ let { t: i } = N(), [a, o] = B(!1);
788
+ return /* @__PURE__ */ U(V, { children: [e && /* @__PURE__ */ H(_e, {
785
789
  variant: "outlined",
786
790
  className: "text-foreground",
787
791
  "data-slot": "error-state-retry",
@@ -794,29 +798,29 @@ function or({ onRetry: e, retrying: t, retryLabel: n, action: r }) {
794
798
  t.then(e, e);
795
799
  }
796
800
  },
797
- children: n ?? i(U.retry.key, U.retry.fallback)
801
+ children: n ?? i(bt.retry.key, bt.retry.fallback)
798
802
  }), r] });
799
803
  }
800
804
  //#endregion
801
805
  //#region lib/components/ui/feedback/error-state/partials/error-state-details.tsx
802
806
  function sr({ details: e }) {
803
- let { t } = j(), n = (e) => t(U[e].key, U[e].fallback);
804
- return /* @__PURE__ */ H("details", {
807
+ let { t } = N(), n = (e) => t(bt[e].key, bt[e].fallback);
808
+ return /* @__PURE__ */ U("details", {
805
809
  "data-slot": "error-state-details",
806
810
  className: "w-full max-w-sm rounded border border-border px-3 py-2 text-left text-sm text-foreground",
807
- children: [/* @__PURE__ */ V("summary", {
811
+ children: [/* @__PURE__ */ H("summary", {
808
812
  className: "cursor-pointer font-medium",
809
813
  children: n("details")
810
- }), /* @__PURE__ */ V("dl", {
814
+ }), /* @__PURE__ */ H("dl", {
811
815
  className: "mt-2 flex flex-col gap-2",
812
- children: e.map((e, t) => /* @__PURE__ */ H("div", {
816
+ children: e.map((e, t) => /* @__PURE__ */ U("div", {
813
817
  className: "flex flex-col gap-0.5",
814
- children: [/* @__PURE__ */ H("dt", {
818
+ children: [/* @__PURE__ */ U("dt", {
815
819
  className: "font-medium",
816
820
  children: [n(t === 0 ? "detailsName" : "detailsCause"), `: ${e.name}`]
817
- }), /* @__PURE__ */ H("dd", {
821
+ }), /* @__PURE__ */ U("dd", {
818
822
  className: "break-words",
819
- children: [/* @__PURE__ */ H("span", {
823
+ children: [/* @__PURE__ */ U("span", {
820
824
  className: "font-medium",
821
825
  children: [n("detailsMessage"), ": "]
822
826
  }), e.message]
@@ -828,16 +832,16 @@ function sr({ details: e }) {
828
832
  //#endregion
829
833
  //#region lib/components/ui/feedback/error-state/error-state.tsx
830
834
  function cr(e, n) {
831
- return e === void 0 ? n.length > 0 && /* @__PURE__ */ V(sr, { details: n }) : t(e, n);
835
+ return e === void 0 ? n.length > 0 && /* @__PURE__ */ H(sr, { details: n }) : t(e, n);
832
836
  }
833
837
  function lr({ kind: e = "generic", size: t, title: n, description: r, illustration: i, icon: a, error: o, showDetails: s, details: c, onRetry: l, retrying: u, retryLabel: d, action: f, children: p, ...m }) {
834
- let { t: h } = j(), g = St(e, "error-state"), _ = s === !1 ? [] : xt(o), v = (l || f) && /* @__PURE__ */ V(or, {
838
+ let { t: h } = N(), g = St(e, "error-state"), _ = s === !1 ? [] : xt(o), v = (l || f) && /* @__PURE__ */ H(or, {
835
839
  onRetry: l,
836
840
  retrying: u,
837
841
  retryLabel: d,
838
842
  action: f
839
843
  });
840
- return /* @__PURE__ */ H(Ce, {
844
+ return /* @__PURE__ */ U(Te, {
841
845
  role: "alert",
842
846
  "data-slot": "error-state",
843
847
  kind: e,
@@ -854,29 +858,29 @@ function lr({ kind: e = "generic", size: t, title: n, description: r, illustrati
854
858
  //#endregion
855
859
  //#region lib/components/ui/media/pdf-viewer/pdf-reader-states.tsx
856
860
  function ur({ className: e }) {
857
- let { t } = j();
858
- return /* @__PURE__ */ V(Te, {
861
+ let { t } = N();
862
+ return /* @__PURE__ */ H(Ee, {
859
863
  size: "compact",
860
864
  kind: "empty",
861
865
  className: n("min-h-64 h-full", e),
862
- icon: /* @__PURE__ */ V(Be, { "aria-hidden": !0 }),
866
+ icon: /* @__PURE__ */ H(ze, { "aria-hidden": !0 }),
863
867
  title: t("material.pdf-reader.empty", "No document selected")
864
868
  });
865
869
  }
866
870
  function dr() {
867
- let { t: e } = j();
868
- return /* @__PURE__ */ H("div", {
871
+ let { t: e } = N();
872
+ return /* @__PURE__ */ U("div", {
869
873
  role: "status",
870
874
  className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-background/80 backdrop-blur-sm",
871
- children: [/* @__PURE__ */ V(Ge, { className: "size-8 animate-spin text-primary-text" }), /* @__PURE__ */ V("p", {
875
+ children: [/* @__PURE__ */ H(We, { className: "size-8 animate-spin text-primary-text" }), /* @__PURE__ */ H("p", {
872
876
  className: "text-sm text-muted-foreground",
873
877
  children: e("material.pdf-reader.loading", "Loading document…")
874
878
  })]
875
879
  });
876
880
  }
877
881
  function fr({ error: e, onRetry: t, title: n }) {
878
- let { t: r } = j();
879
- return /* @__PURE__ */ V(lr, {
882
+ let { t: r } = N();
883
+ return /* @__PURE__ */ H(lr, {
880
884
  size: "compact",
881
885
  className: "absolute inset-0",
882
886
  title: n ?? r("material.pdf-reader.error", "Failed to load document"),
@@ -886,20 +890,20 @@ function fr({ error: e, onRetry: t, title: n }) {
886
890
  });
887
891
  }
888
892
  function pr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
889
- let { t: i } = j(), a = gt(), o = R(null);
890
- return F(() => {
893
+ let { t: i } = N(), a = ht(), o = z(null);
894
+ return I(() => {
891
895
  t && o.current?.focus();
892
- }, [t]), /* @__PURE__ */ H("div", {
896
+ }, [t]), /* @__PURE__ */ U("div", {
893
897
  className: "absolute inset-0 flex flex-col items-center justify-center gap-4",
894
898
  children: [
895
- /* @__PURE__ */ V(He, { className: "size-10 text-primary-text opacity-70" }),
896
- /* @__PURE__ */ V("p", {
899
+ /* @__PURE__ */ H(Ve, { className: "size-10 text-primary-text opacity-70" }),
900
+ /* @__PURE__ */ H("p", {
897
901
  className: "text-sm font-semibold",
898
902
  children: i("material.pdf-reader.password", "Password protected")
899
903
  }),
900
- /* @__PURE__ */ H("div", {
904
+ /* @__PURE__ */ U("div", {
901
905
  className: "flex gap-2",
902
- children: [/* @__PURE__ */ V(ie, {
906
+ children: [/* @__PURE__ */ H(S, {
903
907
  type: "password",
904
908
  placeholder: i("material.pdf-reader.password-placeholder", "Enter password"),
905
909
  ref: o,
@@ -913,14 +917,14 @@ function pr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
913
917
  e.key === "Enter" && r();
914
918
  },
915
919
  autoFocus: !0
916
- }), /* @__PURE__ */ V(M, {
920
+ }), /* @__PURE__ */ H(_e, {
917
921
  variant: "filled",
918
922
  color: "primary",
919
923
  onClick: r,
920
924
  children: i("material.pdf-reader.unlock", "Unlock")
921
925
  })]
922
926
  }),
923
- t && /* @__PURE__ */ V("p", {
927
+ t && /* @__PURE__ */ H("p", {
924
928
  id: a,
925
929
  role: "alert",
926
930
  className: "text-sm text-error-text",
@@ -932,13 +936,13 @@ function pr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
932
936
  //#endregion
933
937
  //#region lib/components/ui/media/pdf-reader/use-open-focus-gate.ts
934
938
  function mr() {
935
- let e = R(!1);
939
+ let e = z(!1);
936
940
  return {
937
941
  gate: e,
938
942
  onOpenAutoFocus: () => {
939
943
  e.current = !0;
940
944
  },
941
- clear: P(() => {
945
+ clear: F(() => {
942
946
  e.current = !1;
943
947
  }, [])
944
948
  };
@@ -946,11 +950,11 @@ function mr() {
946
950
  //#endregion
947
951
  //#region lib/components/ui/media/pdf-reader/modes/dialog-mode.tsx
948
952
  function hr({ open: e, onOpenChange: t, title: n, children: r }) {
949
- let { t: i } = j(), a = mr();
950
- return /* @__PURE__ */ V(ce, {
953
+ let { t: i } = N(), a = mr();
954
+ return /* @__PURE__ */ H(C, {
951
955
  open: e,
952
956
  onOpenChange: t,
953
- children: /* @__PURE__ */ H(se, {
957
+ children: /* @__PURE__ */ U(ne, {
954
958
  size: "full",
955
959
  mobilePresentation: "fullscreen",
956
960
  "aria-describedby": void 0,
@@ -959,17 +963,17 @@ function hr({ open: e, onOpenChange: t, title: n, children: r }) {
959
963
  onPointerMoveCapture: a.clear,
960
964
  onKeyDownCapture: a.clear,
961
965
  className: "h-[min(56rem,calc(100dvh-4rem))] gap-0 overflow-hidden p-0 max-sm:h-dvh max-sm:p-0",
962
- children: [/* @__PURE__ */ V(le, {
966
+ children: [/* @__PURE__ */ H(re, {
963
967
  className: "sr-only",
964
968
  children: n || i("material.pdf-reader.label", "PDF reader")
965
- }), /* @__PURE__ */ V(pe, {
969
+ }), /* @__PURE__ */ H(de, {
966
970
  value: a.gate,
967
971
  children: r
968
972
  })]
969
973
  })
970
974
  });
971
975
  }
972
- var gr = bt({
976
+ var gr = yt({
973
977
  name: "pdf-reader",
974
978
  initialState: ((e) => ({
975
979
  size: "expanded",
@@ -1034,19 +1038,19 @@ var _r = {
1034
1038
  selectEscapeTarget: (e) => e.annotating ? "annotate" : e.searchOpen ? "search" : null,
1035
1039
  selectHeaderKind: (e) => e.annotating ? "annotate" : e.searchOpen ? "search" : "default",
1036
1040
  selectRailValue: (e) => e.panelOpen ? e.panelTab : ""
1037
- }, vr = pt(null), yr = pt(null);
1041
+ }, vr = ft(null), yr = ft(null);
1038
1042
  function br(e, t) {
1039
1043
  if (!e) throw Error(`${t} must be used within PdfReader`);
1040
1044
  return e;
1041
1045
  }
1042
- var Z = () => br(ht(vr), "useReaderChrome"), Q = () => br(ht(yr), "useReaderDocumentContext");
1046
+ var Z = () => br(mt(vr), "useReaderChrome"), Q = () => br(mt(yr), "useReaderDocumentContext");
1043
1047
  function xr(e) {
1044
1048
  return e < 600 ? "compact" : e < 840 ? "medium" : "expanded";
1045
1049
  }
1046
1050
  //#endregion
1047
1051
  //#region lib/components/ui/media/pdf-reader/use-container-size.ts
1048
1052
  function Sr(e, t) {
1049
- I(() => {
1053
+ L(() => {
1050
1054
  let n = e.current;
1051
1055
  if (!n || (t(xr(n.getBoundingClientRect().width)), typeof ResizeObserver > "u")) return;
1052
1056
  let r = new ResizeObserver((e) => {
@@ -1059,8 +1063,8 @@ function Sr(e, t) {
1059
1063
  //#endregion
1060
1064
  //#region lib/components/ui/media/pdf-reader/use-focus-hand-off.ts
1061
1065
  function Cr(e, t) {
1062
- let n = R(t);
1063
- F(() => {
1066
+ let n = z(t);
1067
+ I(() => {
1064
1068
  let r = n.current;
1065
1069
  n.current = t;
1066
1070
  let i = e.current;
@@ -1108,7 +1112,7 @@ function wr(e, { typing: t, inBar: n, scrollsSideways: r = !1, rtl: i = !1 }) {
1108
1112
  //#region lib/components/ui/media/pdf-reader/use-reader-keys.ts
1109
1113
  var Tr = 1, Er = "[role=\"toolbar\"], [role=\"menu\"], [role=\"radiogroup\"], [role=\"tablist\"], [role=\"listbox\"], [role=\"tree\"], [role=\"grid\"]";
1110
1114
  function Dr() {
1111
- let { chrome: e, chromeActions: t, frameRef: n, openSearch: r } = Z(), { state: i, actions: a, searchHits: o } = Q(), s = de(n) === "rtl", c = P((e) => {
1115
+ let { chrome: e, chromeActions: t, frameRef: n, openSearch: r } = Z(), { state: i, actions: a, searchHits: o } = Q(), s = le(n) === "rtl", c = F((e) => {
1112
1116
  if (e.defaultPrevented) return;
1113
1117
  let t = e.target, c = n.current?.querySelector("[data-slot=\"scroll-area-viewport\"]"), l = wr(e.nativeEvent, {
1114
1118
  typing: ["INPUT", "TEXTAREA"].includes(t.tagName),
@@ -1139,7 +1143,7 @@ function Dr() {
1139
1143
  s,
1140
1144
  o,
1141
1145
  i.numPages
1142
- ]), l = _r.selectEscapeTarget(e), u = P((e) => {
1146
+ ]), l = _r.selectEscapeTarget(e), u = F((e) => {
1143
1147
  if (e.key !== "Escape" || e.defaultPrevented) return;
1144
1148
  let r = e.target;
1145
1149
  !(r instanceof Node) || !n.current?.contains(r) || r instanceof Element && r.closest("[role=\"menu\"]") || (e.preventDefault(), e.stopPropagation(), l === "annotate" ? t.stopAnnotating() : t.closeSearchField());
@@ -1148,7 +1152,7 @@ function Dr() {
1148
1152
  l,
1149
1153
  n
1150
1154
  ]);
1151
- return xe("keydown", l ? u : null, void 0, !0), c;
1155
+ return be("keydown", l ? u : null, void 0, !0), c;
1152
1156
  }
1153
1157
  //#endregion
1154
1158
  //#region lib/components/ui/media/pdf-reader/format-locale.ts
@@ -1161,8 +1165,8 @@ function Or(e, t = "en") {
1161
1165
  //#endregion
1162
1166
  //#region lib/components/ui/media/pdf-reader/partials/announcer.tsx
1163
1167
  function kr() {
1164
- let { t: e, language: t } = j(), { state: n, scale: r, announcements: i } = Q(), [a, o] = z(""), { currentPage: s, numPages: c } = n, { recent: l } = i;
1165
- return F(() => {
1168
+ let { t: e, language: t } = N(), { state: n, scale: r, announcements: i } = Q(), [a, o] = B(""), { currentPage: s, numPages: c } = n, { recent: l } = i;
1169
+ return I(() => {
1166
1170
  !l("page") || c === 0 || o(e("material.pdf-reader.next.announce-page", "Page {page} of {total}", {
1167
1171
  page: s,
1168
1172
  total: c
@@ -1171,13 +1175,13 @@ function kr() {
1171
1175
  s,
1172
1176
  c,
1173
1177
  l
1174
- ]), F(() => {
1178
+ ]), I(() => {
1175
1179
  l("zoom") && o(e("material.pdf-reader.next.announce-zoom", "Zoom {level}", { level: Or(r, t ?? "en") }));
1176
1180
  }, [
1177
1181
  r,
1178
1182
  t,
1179
1183
  l
1180
- ]), /* @__PURE__ */ V("div", {
1184
+ ]), /* @__PURE__ */ H("div", {
1181
1185
  "aria-live": "polite",
1182
1186
  "aria-atomic": "true",
1183
1187
  className: "sr-only",
@@ -1187,8 +1191,8 @@ function kr() {
1187
1191
  //#endregion
1188
1192
  //#region lib/components/ui/media/pdf-reader/partials/reader-status.tsx
1189
1193
  function Ar({ onRetry: e }) {
1190
- let { t } = j(), { state: n, password: r } = Q();
1191
- if (n.isPasswordProtected) return /* @__PURE__ */ V(pr, {
1194
+ let { t } = N(), { state: n, password: r } = Q();
1195
+ if (n.isPasswordProtected) return /* @__PURE__ */ H(pr, {
1192
1196
  value: r.input,
1193
1197
  incorrect: n.passwordError ?? !1,
1194
1198
  onChange: r.setInput,
@@ -1196,13 +1200,13 @@ function Ar({ onRetry: e }) {
1196
1200
  });
1197
1201
  if (n.error) {
1198
1202
  let r = n.loadError ?? Error(n.error);
1199
- return /* @__PURE__ */ V(fr, {
1203
+ return /* @__PURE__ */ H(fr, {
1200
1204
  error: r,
1201
1205
  onRetry: e,
1202
1206
  title: Et(r).kind === "invalid" ? t("material.pdf-reader.next.invalid-error", "This file is not a valid PDF") : void 0
1203
1207
  });
1204
1208
  }
1205
- return n.isLoading ? /* @__PURE__ */ V(dr, {}) : null;
1209
+ return n.isLoading ? /* @__PURE__ */ H(dr, {}) : null;
1206
1210
  }
1207
1211
  //#endregion
1208
1212
  //#region lib/components/ui/media/pdf-reader/panel-surface.ts
@@ -1210,18 +1214,18 @@ var jr = "bg-[color-mix(in_oklab,var(--primary)_5%,var(--background))] dark:bg-[
1210
1214
  //#endregion
1211
1215
  //#region lib/components/ui/media/pdf-viewer/pdf-outline-sidebar.tsx
1212
1216
  function Mr({ items: e, onSelect: t, className: r }) {
1213
- let { t: i } = j();
1214
- return /* @__PURE__ */ V("div", {
1217
+ let { t: i } = N();
1218
+ return /* @__PURE__ */ H("div", {
1215
1219
  className: n("flex min-h-0 flex-1 flex-col", r),
1216
- children: e.length === 0 ? /* @__PURE__ */ V("p", {
1220
+ children: e.length === 0 ? /* @__PURE__ */ H("p", {
1217
1221
  className: "px-3 py-6 text-center text-xs text-muted-foreground",
1218
1222
  children: i("material.pdf-reader.outline-empty", "No outline in this document")
1219
- }) : /* @__PURE__ */ V(ir, {
1223
+ }) : /* @__PURE__ */ H(ir, {
1220
1224
  className: "flex-1",
1221
- children: /* @__PURE__ */ V("nav", {
1225
+ children: /* @__PURE__ */ H("nav", {
1222
1226
  className: "p-2",
1223
1227
  "aria-label": i("material.pdf-reader.outline", "Outline"),
1224
- children: e.map((e, n) => /* @__PURE__ */ V(Nr, {
1228
+ children: e.map((e, n) => /* @__PURE__ */ H(Nr, {
1225
1229
  item: e,
1226
1230
  depth: 0,
1227
1231
  onSelect: t
@@ -1231,22 +1235,22 @@ function Mr({ items: e, onSelect: t, className: r }) {
1231
1235
  });
1232
1236
  }
1233
1237
  function Nr({ item: e, depth: t, onSelect: n }) {
1234
- let { t: r } = j(), [i, a] = z(t < 1), o = e.items.length > 0;
1235
- return /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ H("button", {
1238
+ let { t: r } = N(), [i, a] = B(t < 1), o = e.items.length > 0;
1239
+ return /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("button", {
1236
1240
  type: "button",
1237
1241
  style: { paddingLeft: 8 + t * 12 },
1238
1242
  className: "flex w-full items-center gap-1 rounded px-2 py-1 text-left text-xs hover:bg-accent",
1239
1243
  onClick: () => {
1240
1244
  n(e), o && a((e) => !e);
1241
1245
  },
1242
- children: [o && /* @__PURE__ */ V("span", {
1246
+ children: [o && /* @__PURE__ */ H("span", {
1243
1247
  className: "text-muted-foreground",
1244
1248
  children: i ? "▾" : "▸"
1245
- }), /* @__PURE__ */ V("span", {
1249
+ }), /* @__PURE__ */ H("span", {
1246
1250
  className: "truncate",
1247
1251
  children: e.title || r("material.pdf-reader.untitled", "Untitled")
1248
1252
  })]
1249
- }), o && i && e.items.map((e, r) => /* @__PURE__ */ V(Nr, {
1253
+ }), o && i && e.items.map((e, r) => /* @__PURE__ */ H(Nr, {
1250
1254
  item: e,
1251
1255
  depth: t + 1,
1252
1256
  onSelect: n
@@ -1255,20 +1259,20 @@ function Nr({ item: e, depth: t, onSelect: n }) {
1255
1259
  //#endregion
1256
1260
  //#region lib/components/ui/media/pdf-reader/partials/search-field.tsx
1257
1261
  function Pr({ autoFocus: e = !0, stacked: t = !1 }) {
1258
- let { t: r } = j(), { state: i, actions: a, searchHits: o } = Q(), s = R(null), { chrome: c } = Z(), l = c.searchFocusTick;
1259
- F(() => {
1262
+ let { t: r } = N(), { state: i, actions: a, searchHits: o } = Q(), s = z(null), { chrome: c } = Z(), l = c.searchFocusTick;
1263
+ I(() => {
1260
1264
  e && s.current?.focus();
1261
1265
  }, [e, l]);
1262
1266
  let u = (e) => {
1263
1267
  e.key === "Enter" && (e.preventDefault(), o.jump(e.shiftKey ? -1 : 1));
1264
1268
  }, d = r("material.pdf-reader.search-prev", "Previous match (Shift+F3)"), f = r("material.pdf-reader.search-next", "Next match (F3)"), p = r("material.pdf-reader.search", "Search");
1265
- return /* @__PURE__ */ H("div", {
1269
+ return /* @__PURE__ */ U("div", {
1266
1270
  className: n("flex min-w-0 flex-1 items-center gap-1", t && "flex-wrap"),
1267
1271
  children: [
1268
- /* @__PURE__ */ V(D, {
1272
+ /* @__PURE__ */ H(k, {
1269
1273
  label: p,
1270
1274
  fit: !1,
1271
- children: /* @__PURE__ */ V(ie, {
1275
+ children: /* @__PURE__ */ H(S, {
1272
1276
  ref: s,
1273
1277
  type: "search",
1274
1278
  "aria-label": p,
@@ -1281,34 +1285,34 @@ function Pr({ autoFocus: e = !0, stacked: t = !1 }) {
1281
1285
  onKeyDown: u
1282
1286
  })
1283
1287
  }),
1284
- /* @__PURE__ */ V("span", {
1288
+ /* @__PURE__ */ H("span", {
1285
1289
  role: "status",
1286
1290
  className: n("shrink-0 text-muted-foreground text-xs tabular-nums", t ? "me-auto text-start empty:w-0" : "min-w-14 text-center"),
1287
1291
  children: i.searchQuery ? r("material.pdf-reader.next.search-count", "{count, plural, =0 {No match} one {# match} other {# matches}}", { count: o.hitCount }) : null
1288
1292
  }),
1289
- /* @__PURE__ */ H("div", {
1293
+ /* @__PURE__ */ U("div", {
1290
1294
  className: n(t ? "ms-auto flex gap-1" : "contents"),
1291
- children: [/* @__PURE__ */ V(D, {
1295
+ children: [/* @__PURE__ */ H(k, {
1292
1296
  label: d,
1293
- children: /* @__PURE__ */ V(be, {
1297
+ children: /* @__PURE__ */ H(ye, {
1294
1298
  variant: "ghost",
1295
1299
  color: "default",
1296
1300
  "aria-label": d,
1297
1301
  tooltip: d,
1298
1302
  disabled: o.hitCount === 0,
1299
1303
  onClick: () => o.jump(-1),
1300
- children: /* @__PURE__ */ V(Fe, {})
1304
+ children: /* @__PURE__ */ H(Pe, {})
1301
1305
  })
1302
- }), /* @__PURE__ */ V(D, {
1306
+ }), /* @__PURE__ */ H(k, {
1303
1307
  label: f,
1304
- children: /* @__PURE__ */ V(be, {
1308
+ children: /* @__PURE__ */ H(ye, {
1305
1309
  variant: "ghost",
1306
1310
  color: "default",
1307
1311
  "aria-label": f,
1308
1312
  tooltip: f,
1309
1313
  disabled: o.hitCount === 0,
1310
1314
  onClick: () => o.jump(1),
1311
- children: /* @__PURE__ */ V(Me, {})
1315
+ children: /* @__PURE__ */ H(je, {})
1312
1316
  })
1313
1317
  })]
1314
1318
  })
@@ -1468,15 +1472,15 @@ async function Yr(e, t, n) {
1468
1472
  //#endregion
1469
1473
  //#region lib/components/ui/media/pdf-reader/engine/use-thumbnail.ts
1470
1474
  function Xr(e) {
1471
- let { doc: t, pageNumber: n, width: r, rotation: i, box: a, host: o } = e, [s, c] = z(!1), l = R(null), u = R(e.onError);
1472
- I(() => {
1475
+ let { doc: t, pageNumber: n, width: r, rotation: i, box: a, host: o } = e, [s, c] = B(!1), l = z(null), u = z(e.onError);
1476
+ L(() => {
1473
1477
  u.current = e.onError;
1474
- }), F(() => {
1478
+ }), I(() => {
1475
1479
  let e = a.current;
1476
1480
  if (!e) return;
1477
1481
  let t = new IntersectionObserver(([e]) => c(!!e?.isIntersecting), { rootMargin: "240px 0px" });
1478
1482
  return t.observe(e), () => t.disconnect();
1479
- }, [a]), F(() => {
1483
+ }, [a]), I(() => {
1480
1484
  let e = o.current;
1481
1485
  if (!t || !e || !s) return;
1482
1486
  let a = new AbortController(), { signal: c } = a, d = document.createElement("canvas");
@@ -1495,7 +1499,7 @@ function Xr(e) {
1495
1499
  i,
1496
1500
  s,
1497
1501
  o
1498
- ]), F(() => () => {
1502
+ ]), I(() => () => {
1499
1503
  l.current?.cleanup(), l.current = null;
1500
1504
  }, [
1501
1505
  t,
@@ -1503,8 +1507,8 @@ function Xr(e) {
1503
1507
  s
1504
1508
  ]);
1505
1509
  }
1506
- var Zr = mt(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, current: o, tabStop: s, onGo: c }) {
1507
- let { t: l } = j(), u = R(null), d = R(null);
1510
+ var Zr = pt(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, current: o, tabStop: s, onGo: c }) {
1511
+ let { t: l } = N(), u = z(null), d = z(null);
1508
1512
  Xr({
1509
1513
  doc: t,
1510
1514
  pageNumber: e,
@@ -1514,7 +1518,7 @@ var Zr = mt(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, curr
1514
1518
  host: d
1515
1519
  });
1516
1520
  let f = Ut(r, 120 / qt(r ?? It, i).width, i);
1517
- return /* @__PURE__ */ H("button", {
1521
+ return /* @__PURE__ */ U("button", {
1518
1522
  ref: u,
1519
1523
  "data-lit": a ? "" : void 0,
1520
1524
  "data-page-number": e,
@@ -1524,11 +1528,11 @@ var Zr = mt(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, curr
1524
1528
  "aria-label": l("material.pdf-reader.go-to-page", "Go to page {page}", { page: e }),
1525
1529
  "aria-current": o ? "page" : void 0,
1526
1530
  className: n("flex cursor-pointer flex-col items-center gap-1 rounded-lg p-1.5 outline-none transition-colors hover:bg-foreground/5 focus-visible:ring-2 focus-visible:ring-ring", a && "bg-primary/10"),
1527
- children: [/* @__PURE__ */ V("div", {
1531
+ children: [/* @__PURE__ */ H("div", {
1528
1532
  ref: d,
1529
1533
  className: n("overflow-hidden rounded-sm bg-white shadow-sm [&>canvas]:block [&>canvas]:size-full", a && "ring-2 ring-primary-indicator"),
1530
1534
  style: f
1531
- }), /* @__PURE__ */ V("span", {
1535
+ }), /* @__PURE__ */ H("span", {
1532
1536
  "aria-hidden": !0,
1533
1537
  className: n("text-xs tabular-nums", a ? "font-semibold text-primary-text" : "text-muted-foreground"),
1534
1538
  children: e
@@ -1541,10 +1545,10 @@ var Zr = mt(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, curr
1541
1545
  End: (e, t) => t
1542
1546
  };
1543
1547
  function $r() {
1544
- let { t: e } = j(), { state: t, actions: n, doc: r, rowStarts: i } = Q(), { numPages: a, currentPage: o, rotation: s } = t, c = R(null), [l, u] = z(null), [d, f] = zr(i, o, a), p = Math.min(Math.max(l ?? o, 1), a);
1545
- return /* @__PURE__ */ V("div", {
1548
+ let { t: e } = N(), { state: t, actions: n, doc: r, rowStarts: i } = Q(), { numPages: a, currentPage: o, rotation: s } = t, c = z(null), [l, u] = B(null), [d, f] = zr(i, o, a), p = Math.min(Math.max(l ?? o, 1), a);
1549
+ return /* @__PURE__ */ H("div", {
1546
1550
  className: "min-h-0 flex-1 overflow-y-auto",
1547
- children: /* @__PURE__ */ V("div", {
1551
+ children: /* @__PURE__ */ H("div", {
1548
1552
  ref: c,
1549
1553
  role: "group",
1550
1554
  "aria-label": e("material.pdf-reader.thumbnails", "Page thumbnails"),
@@ -1565,7 +1569,7 @@ function $r() {
1565
1569
  className: "flex flex-col items-center gap-2 p-2",
1566
1570
  children: Array.from({ length: a }, (e, i) => {
1567
1571
  let a = i + 1;
1568
- return /* @__PURE__ */ V(Zr, {
1572
+ return /* @__PURE__ */ H(Zr, {
1569
1573
  pageNumber: a,
1570
1574
  doc: r,
1571
1575
  size: t.pageSizes?.[i],
@@ -1582,20 +1586,20 @@ function $r() {
1582
1586
  //#endregion
1583
1587
  //#region lib/components/ui/media/pdf-reader/partials/panel-content.tsx
1584
1588
  function ei() {
1585
- let { t: e } = j(), { chrome: t } = Z(), { state: n, onOutlineSelect: r } = Q();
1586
- return t.panelTab === "thumbs" ? /* @__PURE__ */ V($r, {}) : t.panelTab === "outline" ? n.outline.length === 0 ? /* @__PURE__ */ H("div", {
1589
+ let { t: e } = N(), { chrome: t } = Z(), { state: n, onOutlineSelect: r } = Q();
1590
+ return t.panelTab === "thumbs" ? /* @__PURE__ */ H($r, {}) : t.panelTab === "outline" ? n.outline.length === 0 ? /* @__PURE__ */ U("div", {
1587
1591
  className: "flex flex-col items-center gap-2 px-6 py-10 text-center text-muted-foreground text-sm",
1588
- children: [/* @__PURE__ */ V(We, {
1592
+ children: [/* @__PURE__ */ H(Ue, {
1589
1593
  "aria-hidden": !0,
1590
1594
  className: "size-6 opacity-60"
1591
- }), /* @__PURE__ */ V("p", { children: e("material.pdf-reader.next.outline-empty", "This document has no outline") })]
1592
- }) : /* @__PURE__ */ V(Mr, {
1595
+ }), /* @__PURE__ */ H("p", { children: e("material.pdf-reader.next.outline-empty", "This document has no outline") })]
1596
+ }) : /* @__PURE__ */ H(Mr, {
1593
1597
  items: n.outline,
1594
1598
  onSelect: r
1595
- }) : t.panelTab === "search" ? /* @__PURE__ */ V("div", {
1599
+ }) : t.panelTab === "search" ? /* @__PURE__ */ H("div", {
1596
1600
  className: "p-3",
1597
- children: /* @__PURE__ */ V(Pr, { stacked: !0 })
1598
- }) : /* @__PURE__ */ V("p", {
1601
+ children: /* @__PURE__ */ H(Pr, { stacked: !0 })
1602
+ }) : /* @__PURE__ */ H("p", {
1599
1603
  className: "p-4 text-muted-foreground text-sm",
1600
1604
  children: e("material.pdf-reader.next.annotations-empty", "No annotations yet")
1601
1605
  });
@@ -1619,13 +1623,13 @@ var ti = [
1619
1623
  "initialChrome",
1620
1624
  "showUnfinished"
1621
1625
  ], ii = {
1622
- thumbs: Ue,
1623
- outline: We,
1624
- annotations: qe,
1625
- search: rt
1626
+ thumbs: He,
1627
+ outline: Ue,
1628
+ annotations: Ke,
1629
+ search: nt
1626
1630
  };
1627
1631
  function ai() {
1628
- let { t: e } = j();
1632
+ let { t: e } = N();
1629
1633
  return {
1630
1634
  thumbs: e("material.pdf-reader.next.thumbnails", "Thumbnails"),
1631
1635
  outline: e("material.pdf-reader.outline", "Outline"),
@@ -1640,8 +1644,8 @@ function oi() {
1640
1644
  //#endregion
1641
1645
  //#region lib/components/ui/media/pdf-reader/partials/panel-tabs.tsx
1642
1646
  function si({ iconOnly: e }) {
1643
- let { t } = j(), { chrome: n, chromeActions: r } = Z(), i = ai(), a = oi(), o = e ? a : a.filter((e) => e !== "search");
1644
- return /* @__PURE__ */ V(we, {
1647
+ let { t } = N(), { chrome: n, chromeActions: r } = Z(), i = ai(), a = oi(), o = e ? a : a.filter((e) => e !== "search");
1648
+ return /* @__PURE__ */ H(Se, {
1645
1649
  type: "single",
1646
1650
  variant: "segmented",
1647
1651
  value: n.panelTab,
@@ -1650,11 +1654,11 @@ function si({ iconOnly: e }) {
1650
1654
  className: "mx-3 mt-3 mb-1 w-auto shrink-0",
1651
1655
  children: o.map((t) => {
1652
1656
  let n = ii[t];
1653
- return /* @__PURE__ */ H(Se, {
1657
+ return /* @__PURE__ */ U(xe, {
1654
1658
  value: t,
1655
1659
  "aria-label": e ? i[t] : void 0,
1656
1660
  className: "flex-1",
1657
- children: [/* @__PURE__ */ V(n, {}), e ? null : i[t]]
1661
+ children: [/* @__PURE__ */ H(n, {}), e ? null : i[t]]
1658
1662
  }, t);
1659
1663
  })
1660
1664
  });
@@ -1662,28 +1666,28 @@ function si({ iconOnly: e }) {
1662
1666
  //#endregion
1663
1667
  //#region lib/components/ui/media/pdf-reader/partials/phone-sheet.tsx
1664
1668
  function ci() {
1665
- let { t: e } = j(), { chrome: t, chromeActions: r, mode: i } = Z(), a = e("material.pdf-reader.next.panel", "Document panel"), o = /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(si, { iconOnly: !1 }), /* @__PURE__ */ V("div", {
1669
+ let { t: e } = N(), { chrome: t, chromeActions: r, mode: i } = Z(), a = e("material.pdf-reader.next.panel", "Document panel"), o = /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(si, { iconOnly: !1 }), /* @__PURE__ */ H("div", {
1666
1670
  className: "flex h-[min(46dvh,22rem)] min-h-0 flex-col",
1667
- children: /* @__PURE__ */ V(ei, {})
1671
+ children: /* @__PURE__ */ H(ei, {})
1668
1672
  })] });
1669
- return i === "fullscreen" ? t.panelOpen ? /* @__PURE__ */ H("aside", {
1673
+ return i === "fullscreen" ? t.panelOpen ? /* @__PURE__ */ U("aside", {
1670
1674
  "aria-label": a,
1671
1675
  className: n("absolute inset-x-0 bottom-0 z-20 flex flex-col rounded-t-2xl border-t pb-2 shadow-2xl", jr),
1672
- children: [/* @__PURE__ */ V(be, {
1676
+ children: [/* @__PURE__ */ H(ye, {
1673
1677
  variant: "ghost",
1674
1678
  color: "default",
1675
1679
  "aria-label": e("material.buttons.close", "Close"),
1676
1680
  className: "absolute end-1 top-1 z-10",
1677
1681
  onClick: () => r.closePanel(),
1678
- children: /* @__PURE__ */ V(lt, {})
1682
+ children: /* @__PURE__ */ H(ct, {})
1679
1683
  }), o]
1680
- }) : null : /* @__PURE__ */ V(Qn, {
1684
+ }) : null : /* @__PURE__ */ H(Qn, {
1681
1685
  open: t.panelOpen,
1682
1686
  onOpenChange: (e) => !e && r.closePanel(),
1683
- children: /* @__PURE__ */ H(rr, {
1687
+ children: /* @__PURE__ */ U(rr, {
1684
1688
  side: "bottom",
1685
1689
  className: n("gap-0 rounded-t-2xl p-0", jr),
1686
- children: [/* @__PURE__ */ V(Xn, {
1690
+ children: [/* @__PURE__ */ H(Xn, {
1687
1691
  className: "sr-only",
1688
1692
  children: a
1689
1693
  }), o]
@@ -1693,23 +1697,23 @@ function ci() {
1693
1697
  //#endregion
1694
1698
  //#region lib/components/ui/media/pdf-reader/partials/side-panel.tsx
1695
1699
  function li() {
1696
- let { t: e } = j(), { chrome: t } = Z();
1697
- return t.size === "compact" ? /* @__PURE__ */ V(ci, {}) : t.panelOpen ? /* @__PURE__ */ H("aside", {
1700
+ let { t: e } = N(), { chrome: t } = Z();
1701
+ return t.size === "compact" ? /* @__PURE__ */ H(ci, {}) : t.panelOpen ? /* @__PURE__ */ U("aside", {
1698
1702
  "aria-label": e("material.pdf-reader.next.panel", "Document panel"),
1699
1703
  className: n("flex h-full w-56 shrink-0 flex-col border-e border-border", jr),
1700
- children: [t.size === "medium" ? /* @__PURE__ */ V(si, { iconOnly: !0 }) : null, /* @__PURE__ */ V("div", {
1704
+ children: [t.size === "medium" ? /* @__PURE__ */ H(si, { iconOnly: !0 }) : null, /* @__PURE__ */ H("div", {
1701
1705
  className: "flex min-h-0 flex-1 flex-col",
1702
- children: /* @__PURE__ */ V(ei, {})
1706
+ children: /* @__PURE__ */ H(ei, {})
1703
1707
  })]
1704
1708
  }) : null;
1705
1709
  }
1706
1710
  //#endregion
1707
1711
  //#region lib/components/ui/media/pdf-reader/engine/use-page-canvas.ts
1708
1712
  function ui(e) {
1709
- let { doc: t, pageNumber: n, scale: r, rotation: i, host: a, cache: o, attempt: s } = e, [c, l] = z(null), u = R(null), d = R(e.onError), f = R(e.onDrawn);
1710
- return I(() => {
1713
+ let { doc: t, pageNumber: n, scale: r, rotation: i, host: a, cache: o, attempt: s } = e, [c, l] = B(null), u = z(null), d = z(e.onError), f = z(e.onDrawn);
1714
+ return L(() => {
1711
1715
  d.current = e.onError, f.current = e.onDrawn;
1712
- }), F(() => {
1716
+ }), I(() => {
1713
1717
  let e = a.current;
1714
1718
  if (!t || !e || !o) return;
1715
1719
  let s = {
@@ -1742,27 +1746,27 @@ function ui(e) {
1742
1746
  a,
1743
1747
  o,
1744
1748
  s
1745
- ]), F(() => () => {
1749
+ ]), I(() => () => {
1746
1750
  u.current?.cleanup(), u.current = null;
1747
1751
  }, [t, n]), c;
1748
1752
  }
1749
1753
  //#endregion
1750
1754
  //#region lib/components/ui/media/pdf-reader/engine/use-page-failure.ts
1751
1755
  function di() {
1752
- let [e, t] = z(null), [n, r] = z(0), i = R(null);
1756
+ let [e, t] = B(null), [n, r] = B(0), i = z(null);
1753
1757
  return {
1754
1758
  failure: e,
1755
1759
  attempt: n,
1756
1760
  box: i,
1757
- onError: P((e) => t({
1761
+ onError: F((e) => t({
1758
1762
  error: e,
1759
1763
  busy: !1
1760
1764
  }), []),
1761
- onDrawn: P(() => {
1765
+ onDrawn: F(() => {
1762
1766
  let e = i.current;
1763
1767
  e?.contains(document.activeElement) && e.closest("[data-slot=\"scroll-area-viewport\"]")?.focus({ preventScroll: !0 }), t(null);
1764
1768
  }, []),
1765
- retry: P(() => {
1769
+ retry: F(() => {
1766
1770
  t((e) => e && {
1767
1771
  ...e,
1768
1772
  busy: !0
@@ -1773,7 +1777,7 @@ function di() {
1773
1777
  //#endregion
1774
1778
  //#region lib/components/ui/media/pdf-viewer/use-pdf-link-labels.ts
1775
1779
  function fi(e) {
1776
- let { t } = j(), n = R(/* @__PURE__ */ new Map()), r = L(() => ({
1780
+ let { t } = N(), n = z(/* @__PURE__ */ new Map()), r = R(() => ({
1777
1781
  external: (e) => t("material.pdf-reader.link-external", "Link: {host}", { host: e }),
1778
1782
  goToPage: (e) => t("material.pdf-reader.go-to-page", "Go to page {page}", { page: e }),
1779
1783
  internal: t("material.pdf-reader.link-internal", "Link in document"),
@@ -1783,10 +1787,10 @@ function fi(e) {
1783
1787
  })
1784
1788
  }), [t]);
1785
1789
  return {
1786
- onAnnotations: P((e) => {
1790
+ onAnnotations: F((e) => {
1787
1791
  for (let t of e) t.id && n.current.set(t.id, t);
1788
1792
  }, []),
1789
- labelLinks: P((t) => Vt(t, (e) => n.current.get(e), (t) => Gt(e?.current, t), r), [e, r])
1793
+ labelLinks: F((t) => Vt(t, (e) => n.current.get(e), (t) => Gt(e?.current, t), r), [e, r])
1790
1794
  };
1791
1795
  }
1792
1796
  //#endregion
@@ -1861,13 +1865,13 @@ async function Si({ page: e, viewport: t }, n, r, i) {
1861
1865
  //#endregion
1862
1866
  //#region lib/components/ui/media/pdf-reader/engine/use-page-layers.ts
1863
1867
  function Ci(e) {
1864
- let { drawn: t, pageNumber: n, doc: r, linkService: i, highlight: a } = e, { text: o, annotations: s, page: c } = e, [l, u] = z(null), [d, f] = z(0), { onAnnotations: p, labelLinks: m } = fi(e.pdfRef);
1865
- F(() => {
1868
+ let { drawn: t, pageNumber: n, doc: r, linkService: i, highlight: a } = e, { text: o, annotations: s, page: c } = e, [l, u] = B(null), [d, f] = B(0), { onAnnotations: p, labelLinks: m } = fi(e.pdfRef);
1869
+ I(() => {
1866
1870
  let e = o.current;
1867
1871
  if (!t || !e) return;
1868
1872
  let n = new AbortController();
1869
1873
  return xi(t, e, n.signal).then((e) => e && u(e)).catch(() => {}), () => n.abort();
1870
- }, [t, o]), F(() => {
1874
+ }, [t, o]), I(() => {
1871
1875
  let e = s.current;
1872
1876
  if (!t || !e || !r || !i) return;
1873
1877
  let n = new AbortController();
@@ -1883,7 +1887,7 @@ function Ci(e) {
1883
1887
  r,
1884
1888
  i,
1885
1889
  p
1886
- ]), F(() => {
1890
+ ]), I(() => {
1887
1891
  d && m(c.current);
1888
1892
  }, [
1889
1893
  d,
@@ -1891,7 +1895,7 @@ function Ci(e) {
1891
1895
  c
1892
1896
  ]);
1893
1897
  let h = a.texts[n - 1], g = a.matches[n - 1], _ = a.current?.page === n ? a.current.hit : -1;
1894
- F(() => {
1898
+ I(() => {
1895
1899
  l && Tt(l, {
1896
1900
  text: h,
1897
1901
  matches: g,
@@ -1910,7 +1914,7 @@ function Ci(e) {
1910
1914
  //#region lib/components/ui/media/pdf-reader/engine/use-page-drawing.ts
1911
1915
  function wi(e) {
1912
1916
  let { doc: t, cache: n, pdfRef: r, pageRefs: i, highlight: a, linkService: o } = e, { scale: s, rotation: c, searchQuery: l, nightMode: u } = e;
1913
- return L(() => ({
1917
+ return R(() => ({
1914
1918
  doc: t,
1915
1919
  cache: n,
1916
1920
  pdfRef: r,
@@ -1935,7 +1939,7 @@ function wi(e) {
1935
1939
  ]);
1936
1940
  }
1937
1941
  function Ti(e, t) {
1938
- let { doc: n, scale: r, rotation: i, pageRefs: a } = t, o = R(null), s = R(null), c = R(null), l = R(null), u = di(), d = ui({
1942
+ let { doc: n, scale: r, rotation: i, pageRefs: a } = t, o = z(null), s = z(null), c = z(null), l = z(null), u = di(), d = ui({
1939
1943
  doc: n,
1940
1944
  pageNumber: e,
1941
1945
  scale: r,
@@ -1958,7 +1962,7 @@ function Ti(e, t) {
1958
1962
  highlight: t.highlight,
1959
1963
  searchQuery: t.searchQuery
1960
1964
  }), {
1961
- setPage: P((t) => {
1965
+ setPage: F((t) => {
1962
1966
  o.current = t, t ? a.current.set(e, t) : a.current.delete(e);
1963
1967
  }, [e, a]),
1964
1968
  canvas: s,
@@ -1982,36 +1986,36 @@ function Ei(e, t, n) {
1982
1986
  };
1983
1987
  }
1984
1988
  function Di(e) {
1985
- let { scroller: t, layout: n, currentPage: r } = e, [i, a] = z({
1989
+ let { scroller: t, layout: n, currentPage: r } = e, [i, a] = B({
1986
1990
  top: 0,
1987
1991
  height: 0
1988
- }), o = R({
1992
+ }), o = z({
1989
1993
  page: r,
1990
1994
  fraction: 0
1991
- }), s = R(r), c = R(null), l = R({
1995
+ }), s = z(r), c = z(null), l = z({
1992
1996
  options: e,
1993
1997
  layout: n
1994
1998
  });
1995
- I(() => {
1999
+ L(() => {
1996
2000
  l.current = {
1997
2001
  options: e,
1998
2002
  layout: n
1999
2003
  };
2000
2004
  });
2001
- let u = P((e, t) => {
2005
+ let u = F((e, t) => {
2002
2006
  e.scrollTop = t, c.current = e.scrollTop, a({
2003
2007
  top: e.scrollTop,
2004
2008
  height: e.clientHeight
2005
2009
  });
2006
2010
  }, []);
2007
- return I(() => {
2011
+ return L(() => {
2008
2012
  let e = t.current;
2009
2013
  e && u(e, At(n, o.current));
2010
2014
  }, [
2011
2015
  n,
2012
2016
  t,
2013
2017
  u
2014
- ]), I(() => {
2018
+ ]), L(() => {
2015
2019
  let e = t.current;
2016
2020
  !e || r === s.current || (s.current = r, o.current = {
2017
2021
  page: r,
@@ -2021,7 +2025,7 @@ function Di(e) {
2021
2025
  r,
2022
2026
  t,
2023
2027
  u
2024
- ]), F(() => {
2028
+ ]), I(() => {
2025
2029
  let e = t.current;
2026
2030
  if (!e) return;
2027
2031
  let n = 0, r = getComputedStyle(e).direction === "rtl", i = () => {
@@ -2046,7 +2050,7 @@ function Di(e) {
2046
2050
  //#region lib/components/ui/media/pdf-reader/engine/use-page-window.ts
2047
2051
  var Oi = 1;
2048
2052
  function ki(e, t, n = "_blank", r = "single") {
2049
- let { state: i, scale: a, doc: o, actions: s } = e, { goToPage: c } = s, { reportPage: l } = e, u = de(t), d = L(() => Fr(i.numPages, i.pageSizes ?? [], a, i.rotation, r, u), [
2053
+ let { state: i, scale: a, doc: o, actions: s } = e, { goToPage: c } = s, { reportPage: l } = e, u = le(t), d = R(() => Fr(i.numPages, i.pageSizes ?? [], a, i.rotation, r, u), [
2050
2054
  i.numPages,
2051
2055
  i.pageSizes,
2052
2056
  a,
@@ -2066,7 +2070,7 @@ function ki(e, t, n = "_blank", r = "single") {
2066
2070
  top: f.top - 20,
2067
2071
  height: f.height || (i.containerHeight ?? 800)
2068
2072
  }, Oi),
2069
- linkService: L(() => o ? Dt({
2073
+ linkService: R(() => o ? Dt({
2070
2074
  doc: o,
2071
2075
  goToPage: c,
2072
2076
  externalLinkTarget: n
@@ -2080,30 +2084,30 @@ function ki(e, t, n = "_blank", r = "single") {
2080
2084
  //#endregion
2081
2085
  //#region lib/components/ui/media/pdf-reader/partials/page-failure.tsx
2082
2086
  function Ai({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
2083
- let { t: o } = j(), s = Et(t).kind === "canvas" ? o("material.pdf-reader.next.canvas-error", "This page is too large to display on this device") : o("material.pdf-reader.next.page-error", "This page could not be displayed");
2084
- return /* @__PURE__ */ H("div", {
2087
+ let { t: o } = N(), s = Et(t).kind === "canvas" ? o("material.pdf-reader.next.canvas-error", "This page is too large to display on this device") : o("material.pdf-reader.next.page-error", "This page could not be displayed");
2088
+ return /* @__PURE__ */ U("div", {
2085
2089
  ref: a,
2086
2090
  "data-page-failure": "",
2087
2091
  "aria-busy": r || void 0,
2088
2092
  className: n("absolute inset-0 flex flex-col items-center gap-3 bg-muted p-4 text-center text-muted-foreground", "justify-start pt-[clamp(2rem,12%,7rem)]"),
2089
- children: [/* @__PURE__ */ H("div", {
2093
+ children: [/* @__PURE__ */ U("div", {
2090
2094
  role: "status",
2091
2095
  className: "flex flex-col items-center gap-3",
2092
- children: [/* @__PURE__ */ V(ze, {
2096
+ children: [/* @__PURE__ */ H(Re, {
2093
2097
  "aria-hidden": !0,
2094
2098
  className: "size-6 shrink-0"
2095
- }), /* @__PURE__ */ V("p", {
2099
+ }), /* @__PURE__ */ H("p", {
2096
2100
  className: "max-w-64 text-balance text-sm",
2097
2101
  children: s
2098
2102
  })]
2099
- }), /* @__PURE__ */ H(M, {
2103
+ }), /* @__PURE__ */ U(_e, {
2100
2104
  variant: "outlined",
2101
2105
  color: "default",
2102
2106
  size: "sm",
2103
2107
  "aria-disabled": r || void 0,
2104
2108
  onClick: r ? void 0 : i,
2105
2109
  "aria-label": o("material.pdf-reader.next.retry-page", "Retry page {page}", { page: e }),
2106
- children: [/* @__PURE__ */ V(nt, {
2110
+ children: [/* @__PURE__ */ H(tt, {
2107
2111
  "aria-hidden": !0,
2108
2112
  className: n(r && "animate-spin motion-reduce:animate-none")
2109
2113
  }), o("material.pdf-reader.retry", "Retry")]
@@ -2112,7 +2116,7 @@ function Ai({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
2112
2116
  }
2113
2117
  //#endregion
2114
2118
  //#region lib/components/ui/media/pdf-reader/partials/page-view.tsx
2115
- var ji = mt(function({ pageNumber: e, top: t, offset: r, width: i, height: a, env: o }) {
2119
+ var ji = pt(function({ pageNumber: e, top: t, offset: r, width: i, height: a, env: o }) {
2116
2120
  let { setPage: s, canvas: c, text: l, annotations: u, drawn: d, failed: f } = Ti(e, o), p = {
2117
2121
  top: t,
2118
2122
  left: `calc(50% + ${r}px)`,
@@ -2122,26 +2126,26 @@ var ji = mt(function({ pageNumber: e, top: t, offset: r, width: i, height: a, en
2122
2126
  "--scale-round-x": "1px",
2123
2127
  "--scale-round-y": "1px"
2124
2128
  };
2125
- return /* @__PURE__ */ H("div", {
2129
+ return /* @__PURE__ */ U("div", {
2126
2130
  ref: s,
2127
2131
  "data-page-number": e,
2128
2132
  "data-drawn": d ? "" : void 0,
2129
2133
  className: n("absolute overflow-hidden rounded-sm bg-white", "shadow-[0_1px_2px_rgb(0_0_0/0.08),0_4px_16px_-4px_rgb(0_0_0/0.18)]", o.nightMode && "pdf-night-page"),
2130
2134
  style: p,
2131
2135
  children: [
2132
- /* @__PURE__ */ V("div", {
2136
+ /* @__PURE__ */ H("div", {
2133
2137
  ref: c,
2134
2138
  className: "absolute inset-0 [&>canvas]:block [&>canvas]:size-full"
2135
2139
  }),
2136
- /* @__PURE__ */ V("div", {
2140
+ /* @__PURE__ */ H("div", {
2137
2141
  ref: l,
2138
2142
  className: "textLayer"
2139
2143
  }),
2140
- /* @__PURE__ */ V("div", {
2144
+ /* @__PURE__ */ H("div", {
2141
2145
  ref: u,
2142
2146
  className: "annotationLayer"
2143
2147
  }),
2144
- f.failure && /* @__PURE__ */ V(Ai, {
2148
+ f.failure && /* @__PURE__ */ H(Ai, {
2145
2149
  ref: f.box,
2146
2150
  pageNumber: e,
2147
2151
  error: f.failure.error,
@@ -2154,7 +2158,7 @@ var ji = mt(function({ pageNumber: e, top: t, offset: r, width: i, height: a, en
2154
2158
  //#endregion
2155
2159
  //#region lib/components/ui/media/pdf-reader/partials/viewport.tsx
2156
2160
  function Mi() {
2157
- let { t: e } = j(), { props: t, ...r } = Z(), i = Q(), a = R(null), { layout: o } = r, { layout: s, shown: c, linkService: l } = ki(i, a, t.externalLinkTarget, o.mode), u = wi({
2161
+ let { t: e } = N(), { props: t, ...r } = Z(), i = Q(), a = z(null), { layout: o } = r, { layout: s, shown: c, linkService: l } = ki(i, a, t.externalLinkTarget, o.mode), u = wi({
2158
2162
  doc: i.doc,
2159
2163
  cache: i.canvasCache,
2160
2164
  pdfRef: i.pdfRef,
@@ -2166,7 +2170,7 @@ function Mi() {
2166
2170
  searchQuery: i.state.searchQuery,
2167
2171
  nightMode: i.state.nightMode
2168
2172
  }), d = [];
2169
- for (let e = c.first; e <= c.last; e++) d.push(/* @__PURE__ */ V(ji, {
2173
+ for (let e = c.first; e <= c.last; e++) d.push(/* @__PURE__ */ H(ji, {
2170
2174
  pageNumber: e + 1,
2171
2175
  top: 20 + (s.tops[e] ?? 0),
2172
2176
  offset: (s.lefts[e] ?? 0) - s.maxWidth / 2,
@@ -2174,14 +2178,14 @@ function Mi() {
2174
2178
  height: s.heights[e] ?? 0,
2175
2179
  env: u
2176
2180
  }, e + 1));
2177
- return /* @__PURE__ */ V("section", {
2181
+ return /* @__PURE__ */ H("section", {
2178
2182
  ref: a,
2179
2183
  tabIndex: 0,
2180
2184
  "aria-label": e("material.pdf-reader.pages", "Pages"),
2181
2185
  "data-slot": "scroll-area-viewport",
2182
2186
  "data-layout": o.mode,
2183
2187
  className: n("size-full overflow-auto outline-none [overflow-anchor:none]", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", "scroll-pb-24"),
2184
- children: /* @__PURE__ */ V("div", {
2188
+ children: /* @__PURE__ */ H("div", {
2185
2189
  className: "relative min-w-full",
2186
2190
  style: {
2187
2191
  height: 20 + s.totalHeight + 112,
@@ -2195,14 +2199,14 @@ function Mi() {
2195
2199
  //#region lib/components/ui/media/pdf-reader/partials/body.tsx
2196
2200
  function Ni() {
2197
2201
  let { state: e, containerRef: t, handlers: n } = Q(), r = e.numPages > 0 && !e.error && !e.isPasswordProtected;
2198
- return /* @__PURE__ */ H("div", {
2202
+ return /* @__PURE__ */ U("div", {
2199
2203
  className: "flex min-h-0 min-w-0 flex-1",
2200
- children: [r ? /* @__PURE__ */ V(li, {}) : null, /* @__PURE__ */ H("div", {
2204
+ children: [r ? /* @__PURE__ */ H(li, {}) : null, /* @__PURE__ */ U("div", {
2201
2205
  ref: t,
2202
2206
  tabIndex: -1,
2203
2207
  "aria-busy": e.isLoading || void 0,
2204
2208
  className: "relative min-w-0 flex-1 overflow-hidden bg-[color-mix(in_oklab,var(--primary)_5%,var(--background))] outline-none dark:bg-[color-mix(in_oklab,var(--primary)_10%,var(--background))]",
2205
- children: [r ? /* @__PURE__ */ V(Mi, {}) : null, /* @__PURE__ */ V(Ar, { onRetry: () => {
2209
+ children: [r ? /* @__PURE__ */ H(Mi, {}) : null, /* @__PURE__ */ H(Ar, { onRetry: () => {
2206
2210
  t.current?.focus(), n.onRetry();
2207
2211
  } })]
2208
2212
  })]
@@ -2221,15 +2225,15 @@ function $() {
2221
2225
  //#endregion
2222
2226
  //#region lib/components/ui/media/pdf-reader/partials/fullscreen-exit.tsx
2223
2227
  function Pi() {
2224
- let { t: e } = j(), t = $(), { leave: n } = Z(), r = e("material.pdf-reader.exit-fullscreen", "Exit fullscreen");
2225
- return /* @__PURE__ */ V("div", {
2228
+ let { t: e } = N(), t = $(), { leave: n } = Z(), r = e("material.pdf-reader.exit-fullscreen", "Exit fullscreen");
2229
+ return /* @__PURE__ */ H("div", {
2226
2230
  className: "pointer-events-none absolute top-[max(0.75rem,env(safe-area-inset-top))] z-10 ltr:[inset-inline-end:max(0.75rem,env(safe-area-inset-right))] rtl:[inset-inline-end:max(0.75rem,env(safe-area-inset-left))]",
2227
- children: /* @__PURE__ */ V(O, {
2231
+ children: /* @__PURE__ */ H(A, {
2228
2232
  label: r,
2229
2233
  ...t,
2230
2234
  className: "pointer-events-auto",
2231
- children: /* @__PURE__ */ V(A, {
2232
- icon: /* @__PURE__ */ V(Je, {}),
2235
+ children: /* @__PURE__ */ H(M, {
2236
+ icon: /* @__PURE__ */ H(qe, {}),
2233
2237
  label: r,
2234
2238
  onClick: n
2235
2239
  })
@@ -2262,37 +2266,37 @@ function Fi(e, t, n = !0) {
2262
2266
  //#region lib/components/ui/media/pdf-reader/use-fullscreen-enabled.ts
2263
2267
  var Ii = () => () => {};
2264
2268
  function Li() {
2265
- return vt(Ii, () => document.fullscreenEnabled === !0, () => !1);
2269
+ return _t(Ii, () => document.fullscreenEnabled === !0, () => !1);
2266
2270
  }
2267
2271
  //#endregion
2268
2272
  //#region lib/components/ui/media/pdf-reader/partials/annotate-header.tsx
2269
2273
  function Ri() {
2270
- let { t: e } = j(), t = $(), { chromeActions: n, props: r } = Z(), i = e("material.pdf-reader.next.annotate-done", "Done"), a = e("material.pdf-reader.next.annotate-title", "Annotation");
2271
- return /* @__PURE__ */ H(O, {
2274
+ let { t: e } = N(), t = $(), { chromeActions: n, props: r } = Z(), i = e("material.pdf-reader.next.annotate-done", "Done"), a = e("material.pdf-reader.next.annotate-title", "Annotation");
2275
+ return /* @__PURE__ */ U(A, {
2272
2276
  label: a,
2273
2277
  variant: "docked",
2274
2278
  ...t,
2275
2279
  className: "shrink-0 border-b border-border",
2276
2280
  children: [
2277
- /* @__PURE__ */ H("div", {
2281
+ /* @__PURE__ */ U("div", {
2278
2282
  className: "flex min-w-0 flex-1 items-baseline gap-2 px-1.5",
2279
- children: [/* @__PURE__ */ V("span", {
2283
+ children: [/* @__PURE__ */ H("span", {
2280
2284
  className: "truncate font-semibold text-foreground",
2281
2285
  children: a
2282
- }), /* @__PURE__ */ V("span", {
2286
+ }), /* @__PURE__ */ H("span", {
2283
2287
  className: "shrink-0 whitespace-nowrap text-muted-foreground text-sm",
2284
2288
  children: e("material.pdf-reader.next.annotate-notes", "{count, plural, one {# note} other {# notes}}", { count: r.annotationCount ?? 0 })
2285
2289
  })]
2286
2290
  }),
2287
- /* @__PURE__ */ V(A, {
2288
- icon: /* @__PURE__ */ V(st, {}),
2291
+ /* @__PURE__ */ H(M, {
2292
+ icon: /* @__PURE__ */ H(ot, {}),
2289
2293
  label: e("material.pdf-reader.next.annotate-undo", "Undo"),
2290
2294
  disabled: !0
2291
2295
  }),
2292
- /* @__PURE__ */ V(D, {
2296
+ /* @__PURE__ */ H(k, {
2293
2297
  label: i,
2294
2298
  fit: !1,
2295
- children: /* @__PURE__ */ V(M, {
2299
+ children: /* @__PURE__ */ H(_e, {
2296
2300
  size: "sm",
2297
2301
  onClick: () => n.stopAnnotating(),
2298
2302
  className: "min-h-9 min-w-0 px-4",
@@ -2305,25 +2309,25 @@ function Ri() {
2305
2309
  //#endregion
2306
2310
  //#region lib/components/ui/media/pdf-reader/partials/header-title.tsx
2307
2311
  function zi() {
2308
- let { t: e, language: t } = j(), { chrome: n, props: r } = Z(), { state: i, bytes: a } = Q(), o = r.file ? Zt(r.file, r.fileName, e("material.pdf-reader.default-file-name", "document")) : "", s = i.numPages > 0 ? e("material.pdf-reader.next.meta", "{pages, plural, one {# page} other {# pages}} · {size}", {
2312
+ let { t: e, language: t } = N(), { chrome: n, props: r } = Z(), { state: i, bytes: a } = Q(), o = r.file ? Zt(r.file, r.fileName, e("material.pdf-reader.default-file-name", "document")) : "", s = i.numPages > 0 ? e("material.pdf-reader.next.meta", "{pages, plural, one {# page} other {# pages}} · {size}", {
2309
2313
  pages: i.numPages,
2310
2314
  size: Ct(a ?? 0, { locale: t ?? "en" })
2311
2315
  }) : "";
2312
- return /* @__PURE__ */ H("div", {
2316
+ return /* @__PURE__ */ U("div", {
2313
2317
  className: "flex min-w-0 flex-1 items-center gap-2.5 px-1.5",
2314
2318
  children: [
2315
- /* @__PURE__ */ V(Re, {
2319
+ /* @__PURE__ */ H(Le, {
2316
2320
  "aria-hidden": !0,
2317
2321
  className: "size-5 shrink-0 text-primary-text"
2318
2322
  }),
2319
- /* @__PURE__ */ V("span", {
2323
+ /* @__PURE__ */ H("span", {
2320
2324
  dir: "auto",
2321
2325
  className: "truncate font-semibold text-foreground",
2322
2326
  children: o
2323
2327
  }),
2324
- n.size !== "compact" && a !== null && s ? /* @__PURE__ */ V("span", {
2328
+ n.size !== "compact" && a !== null && s ? /* @__PURE__ */ H("span", {
2325
2329
  className: "shrink-0 whitespace-nowrap text-muted-foreground text-sm",
2326
- children: /* @__PURE__ */ V("bdi", { children: s })
2330
+ children: /* @__PURE__ */ H("bdi", { children: s })
2327
2331
  }) : null
2328
2332
  ]
2329
2333
  });
@@ -2331,25 +2335,25 @@ function zi() {
2331
2335
  //#endregion
2332
2336
  //#region lib/components/ui/media/pdf-reader/partials/mode-button.tsx
2333
2337
  function Bi({ action: e }) {
2334
- let { t } = j(), { leave: n, toggleFullscreen: r } = Z();
2338
+ let { t } = N(), { leave: n, toggleFullscreen: r } = Z();
2335
2339
  switch (e.kind) {
2336
- case "back": return /* @__PURE__ */ V(A, {
2337
- icon: /* @__PURE__ */ V(Ae, {}),
2340
+ case "back": return /* @__PURE__ */ H(M, {
2341
+ icon: /* @__PURE__ */ H(ke, {}),
2338
2342
  label: t("material.pdf-reader.next.back", "Back"),
2339
2343
  onClick: n
2340
2344
  });
2341
- case "close": return /* @__PURE__ */ V(A, {
2342
- icon: /* @__PURE__ */ V(lt, {}),
2345
+ case "close": return /* @__PURE__ */ H(M, {
2346
+ icon: /* @__PURE__ */ H(ct, {}),
2343
2347
  label: t("material.buttons.close", "Close"),
2344
2348
  onClick: n
2345
2349
  });
2346
- case "exit-fullscreen": return /* @__PURE__ */ V(A, {
2347
- icon: /* @__PURE__ */ V(Je, {}),
2350
+ case "exit-fullscreen": return /* @__PURE__ */ H(M, {
2351
+ icon: /* @__PURE__ */ H(qe, {}),
2348
2352
  label: t("material.pdf-reader.exit-fullscreen", "Exit fullscreen"),
2349
2353
  onClick: n
2350
2354
  });
2351
- case "fullscreen": return /* @__PURE__ */ V(A, {
2352
- icon: /* @__PURE__ */ V(Ke, {}),
2355
+ case "fullscreen": return /* @__PURE__ */ H(M, {
2356
+ icon: /* @__PURE__ */ H(Ge, {}),
2353
2357
  label: t("material.pdf-reader.fullscreen", "Fullscreen"),
2354
2358
  onClick: r
2355
2359
  });
@@ -2359,33 +2363,33 @@ function Bi({ action: e }) {
2359
2363
  //#region lib/components/ui/media/pdf-reader/partials/compact-items.tsx
2360
2364
  function Vi() {
2361
2365
  let { chromeActions: e } = Z(), t = ai();
2362
- return /* @__PURE__ */ H(B, { children: [oi().filter((e) => e !== "search").map((n) => {
2366
+ return /* @__PURE__ */ U(V, { children: [oi().filter((e) => e !== "search").map((n) => {
2363
2367
  let r = ii[n];
2364
- return /* @__PURE__ */ H(x, {
2368
+ return /* @__PURE__ */ U(O, {
2365
2369
  onSelect: () => e.openPanelTab(n),
2366
- children: [/* @__PURE__ */ V(r, {}), t[n]]
2370
+ children: [/* @__PURE__ */ H(r, {}), t[n]]
2367
2371
  }, n);
2368
- }), /* @__PURE__ */ V(y, {})] });
2372
+ }), /* @__PURE__ */ H(D, {})] });
2369
2373
  }
2370
2374
  function Hi() {
2371
- let { t: e } = j(), { actions: t } = Q();
2372
- return /* @__PURE__ */ H(B, { children: [
2373
- /* @__PURE__ */ V(y, {}),
2374
- /* @__PURE__ */ H(x, {
2375
+ let { t: e } = N(), { actions: t } = Q();
2376
+ return /* @__PURE__ */ U(V, { children: [
2377
+ /* @__PURE__ */ H(D, {}),
2378
+ /* @__PURE__ */ U(O, {
2375
2379
  onSelect: t.zoomIn,
2376
- children: [/* @__PURE__ */ V(dt, {}), e("material.pdf-reader.zoom-in", "Zoom in")]
2380
+ children: [/* @__PURE__ */ H(ut, {}), e("material.pdf-reader.zoom-in", "Zoom in")]
2377
2381
  }),
2378
- /* @__PURE__ */ H(x, {
2382
+ /* @__PURE__ */ U(O, {
2379
2383
  onSelect: t.zoomOut,
2380
- children: [/* @__PURE__ */ V(ft, {}), e("material.pdf-reader.zoom-out", "Zoom out")]
2384
+ children: [/* @__PURE__ */ H(dt, {}), e("material.pdf-reader.zoom-out", "Zoom out")]
2381
2385
  }),
2382
- /* @__PURE__ */ H(x, {
2386
+ /* @__PURE__ */ U(O, {
2383
2387
  onSelect: () => t.setFitMode("width"),
2384
- children: [/* @__PURE__ */ V(Ze, {}), e("material.pdf-reader.fit-width-full", "Fit Width")]
2388
+ children: [/* @__PURE__ */ H(Xe, {}), e("material.pdf-reader.fit-width-full", "Fit Width")]
2385
2389
  }),
2386
- /* @__PURE__ */ H(x, {
2390
+ /* @__PURE__ */ U(O, {
2387
2391
  onSelect: () => t.setFitMode("page"),
2388
- children: [/* @__PURE__ */ V(Ke, {}), e("material.pdf-reader.fit-page-full", "Fit Page")]
2392
+ children: [/* @__PURE__ */ H(Ge, {}), e("material.pdf-reader.fit-page-full", "Fit Page")]
2389
2393
  })
2390
2394
  ] });
2391
2395
  }
@@ -2397,27 +2401,27 @@ var Ui = [
2397
2401
  "spread-cover"
2398
2402
  ];
2399
2403
  function Wi() {
2400
- let { t: e } = j(), { chrome: t, chromeActions: n, layout: r } = Z(), i = gt(), a = r.narrow ? "single" : t.layout, o = {
2404
+ let { t: e } = N(), { chrome: t, chromeActions: n, layout: r } = Z(), i = ht(), a = r.narrow ? "single" : t.layout, o = {
2401
2405
  single: e("material.pdf-reader.next.layout-single", "Single page"),
2402
2406
  spread: e("material.pdf-reader.next.layout-two", "Two pages"),
2403
2407
  "spread-cover": e("material.pdf-reader.next.layout-two-cover", "Two pages with cover")
2404
2408
  };
2405
- return /* @__PURE__ */ H(B, { children: [
2406
- /* @__PURE__ */ V(g, { children: e("material.pdf-reader.next.layout", "Page layout") }),
2407
- /* @__PURE__ */ V(m, {
2409
+ return /* @__PURE__ */ U(V, { children: [
2410
+ /* @__PURE__ */ H(ae, { children: e("material.pdf-reader.next.layout", "Page layout") }),
2411
+ /* @__PURE__ */ H(ie, {
2408
2412
  value: a,
2409
2413
  "aria-label": e("material.pdf-reader.next.layout", "Page layout"),
2410
2414
  onValueChange: (e) => {
2411
2415
  e !== a && n.setLayout(e);
2412
2416
  },
2413
- children: Ui.map((e) => /* @__PURE__ */ V(h, {
2417
+ children: Ui.map((e) => /* @__PURE__ */ H(E, {
2414
2418
  value: e,
2415
2419
  disabled: r.narrow && e !== "single",
2416
2420
  "aria-describedby": r.narrow ? i : void 0,
2417
2421
  children: o[e]
2418
2422
  }, e))
2419
2423
  }),
2420
- r.narrow ? /* @__PURE__ */ V(g, {
2424
+ r.narrow ? /* @__PURE__ */ H(ae, {
2421
2425
  id: i,
2422
2426
  className: "pt-0 font-normal text-muted-foreground text-xs",
2423
2427
  children: e("material.pdf-reader.next.layout-narrow", "Two pages need a wider window")
@@ -2427,55 +2431,55 @@ function Wi() {
2427
2431
  //#endregion
2428
2432
  //#region lib/components/ui/media/pdf-reader/partials/more-menu.tsx
2429
2433
  function Gi() {
2430
- let { t: e } = j(), t = $(), { chrome: n, mode: r, openSearch: i, props: a } = Z(), { state: o, actions: s, fileActions: l } = Q(), u = c(), d = n.size === "compact", f = r === "fullscreen";
2431
- return /* @__PURE__ */ H(b, {
2434
+ let { t: e } = N(), t = $(), { chrome: n, mode: r, openSearch: i, props: a } = Z(), { state: o, actions: s, fileActions: c } = Q(), l = u(), d = n.size === "compact", f = r === "fullscreen";
2435
+ return /* @__PURE__ */ U(ce, {
2432
2436
  modal: !1,
2433
- children: [/* @__PURE__ */ V(p, {
2437
+ children: [/* @__PURE__ */ H(T, {
2434
2438
  asChild: !0,
2435
2439
  className: t.selectedLook === "morph" ? "rounded-[var(--c-ss)] focus:bg-(--m-bg) hover:bg-(--m-bg)" : void 0,
2436
- children: /* @__PURE__ */ V(A, {
2437
- icon: /* @__PURE__ */ V(Ye, {}),
2440
+ children: /* @__PURE__ */ H(M, {
2441
+ icon: /* @__PURE__ */ H(Je, {}),
2438
2442
  label: e("material.toolbar.more", "More")
2439
2443
  })
2440
- }), /* @__PURE__ */ H(v, {
2444
+ }), /* @__PURE__ */ U(se, {
2441
2445
  align: "end",
2442
- container: u,
2446
+ container: l,
2443
2447
  className: "min-w-52",
2444
2448
  children: [
2445
- f ? /* @__PURE__ */ H(x, {
2449
+ f ? /* @__PURE__ */ U(O, {
2446
2450
  onSelect: i,
2447
- children: [/* @__PURE__ */ V(rt, {}), e("material.pdf-reader.search", "Search")]
2451
+ children: [/* @__PURE__ */ H(nt, {}), e("material.pdf-reader.search", "Search")]
2448
2452
  }) : null,
2449
- d ? /* @__PURE__ */ V(Vi, {}) : null,
2450
- /* @__PURE__ */ H(x, {
2453
+ d ? /* @__PURE__ */ H(Vi, {}) : null,
2454
+ /* @__PURE__ */ U(O, {
2451
2455
  onSelect: s.rotate,
2452
- children: [/* @__PURE__ */ V(nt, {}), e("material.pdf-reader.rotate", "Rotate")]
2456
+ children: [/* @__PURE__ */ H(tt, {}), e("material.pdf-reader.rotate", "Rotate")]
2453
2457
  }),
2454
- /* @__PURE__ */ H(x, {
2455
- onSelect: l.print,
2456
- children: [/* @__PURE__ */ V(tt, {}), e("material.pdf-reader.print", "Print")]
2458
+ /* @__PURE__ */ U(O, {
2459
+ onSelect: c.print,
2460
+ children: [/* @__PURE__ */ H(et, {}), e("material.pdf-reader.print", "Print")]
2457
2461
  }),
2458
- d || f ? /* @__PURE__ */ H(x, {
2459
- onSelect: l.download,
2460
- children: [/* @__PURE__ */ V(Ie, {}), e("material.pdf-reader.download", "Download")]
2462
+ d || f ? /* @__PURE__ */ U(O, {
2463
+ onSelect: c.download,
2464
+ children: [/* @__PURE__ */ H(Fe, {}), e("material.pdf-reader.download", "Download")]
2461
2465
  }) : null,
2462
- /* @__PURE__ */ V(_, {
2466
+ /* @__PURE__ */ H(oe, {
2463
2467
  checked: o.nightMode,
2464
2468
  onCheckedChange: s.toggleNightMode,
2465
2469
  children: e("material.pdf-reader.night", "Night mode")
2466
2470
  }),
2467
- d ? /* @__PURE__ */ V(Hi, {}) : null,
2468
- /* @__PURE__ */ V(y, {}),
2469
- /* @__PURE__ */ V(Wi, {}),
2470
- a.showUnfinished ? /* @__PURE__ */ H(B, { children: [
2471
- /* @__PURE__ */ V(y, {}),
2472
- /* @__PURE__ */ H(x, {
2471
+ d ? /* @__PURE__ */ H(Hi, {}) : null,
2472
+ /* @__PURE__ */ H(D, {}),
2473
+ /* @__PURE__ */ H(Wi, {}),
2474
+ a.showUnfinished ? /* @__PURE__ */ U(V, { children: [
2475
+ /* @__PURE__ */ H(D, {}),
2476
+ /* @__PURE__ */ U(O, {
2473
2477
  disabled: !0,
2474
- children: [/* @__PURE__ */ V(ct, {}), e("material.pdf-reader.next.read-aloud", "Read aloud")]
2478
+ children: [/* @__PURE__ */ H(st, {}), e("material.pdf-reader.next.read-aloud", "Read aloud")]
2475
2479
  }),
2476
- /* @__PURE__ */ H(x, {
2480
+ /* @__PURE__ */ U(O, {
2477
2481
  disabled: !0,
2478
- children: [/* @__PURE__ */ V(je, {}), e("material.pdf-reader.next.reflow", "Reflowed text")]
2482
+ children: [/* @__PURE__ */ H(Ae, {}), e("material.pdf-reader.next.reflow", "Reflowed text")]
2479
2483
  })
2480
2484
  ] }) : null
2481
2485
  ]
@@ -2485,66 +2489,66 @@ function Gi() {
2485
2489
  //#endregion
2486
2490
  //#region lib/components/ui/media/pdf-reader/partials/search-header.tsx
2487
2491
  function Ki() {
2488
- let { t: e } = j(), t = $(), { chromeActions: n } = Z();
2489
- return /* @__PURE__ */ H(O, {
2492
+ let { t: e } = N(), t = $(), { chromeActions: n } = Z();
2493
+ return /* @__PURE__ */ U(A, {
2490
2494
  label: e("material.pdf-reader.search", "Search"),
2491
2495
  variant: "docked",
2492
2496
  ...t,
2493
2497
  className: "shrink-0 border-b border-border",
2494
- children: [/* @__PURE__ */ V(A, {
2495
- icon: /* @__PURE__ */ V(Ae, {}),
2498
+ children: [/* @__PURE__ */ H(M, {
2499
+ icon: /* @__PURE__ */ H(ke, {}),
2496
2500
  label: e("material.pdf-reader.next.search-close", "Close search"),
2497
2501
  onClick: () => n.closeSearchField()
2498
- }), /* @__PURE__ */ V(Pr, {})]
2502
+ }), /* @__PURE__ */ H(Pr, {})]
2499
2503
  });
2500
2504
  }
2501
2505
  //#endregion
2502
2506
  //#region lib/components/ui/media/pdf-reader/partials/header.tsx
2503
2507
  function qi() {
2504
2508
  let { chrome: e } = Z(), t = _r.selectHeaderKind(e);
2505
- return V(t === "annotate" ? Ri : t === "search" ? Ki : Ji, {});
2509
+ return H(t === "annotate" ? Ri : t === "search" ? Ki : Ji, {});
2506
2510
  }
2507
2511
  function Ji() {
2508
- let { t: e } = j(), t = $(), { chrome: n, mode: r, props: i, openSearch: a } = Z(), { fileActions: o } = Q(), s = n.size === "compact", c = Li(), l = Fi(r, n.size, i.allowFullscreen !== !1 && c);
2509
- return /* @__PURE__ */ H(O, {
2512
+ let { t: e } = N(), t = $(), { chrome: n, mode: r, props: i, openSearch: a } = Z(), { fileActions: o } = Q(), s = n.size === "compact", c = Li(), l = Fi(r, n.size, i.allowFullscreen !== !1 && c);
2513
+ return /* @__PURE__ */ U(A, {
2510
2514
  label: e("material.pdf-reader.next.header", "Document actions"),
2511
2515
  variant: "docked",
2512
2516
  ...t,
2513
2517
  className: "shrink-0 border-b border-border",
2514
2518
  children: [
2515
- l?.place === "start" ? /* @__PURE__ */ V(Bi, { action: l }) : null,
2516
- /* @__PURE__ */ V(zi, {}),
2517
- /* @__PURE__ */ V(A, {
2518
- icon: /* @__PURE__ */ V(rt, {}),
2519
+ l?.place === "start" ? /* @__PURE__ */ H(Bi, { action: l }) : null,
2520
+ /* @__PURE__ */ H(zi, {}),
2521
+ /* @__PURE__ */ H(M, {
2522
+ icon: /* @__PURE__ */ H(nt, {}),
2519
2523
  label: e("material.pdf-reader.search", "Search"),
2520
2524
  onClick: a,
2521
2525
  "data-focus-target": "search"
2522
2526
  }),
2523
- s ? null : /* @__PURE__ */ V(A, {
2524
- icon: /* @__PURE__ */ V(Ie, {}),
2527
+ s ? null : /* @__PURE__ */ H(M, {
2528
+ icon: /* @__PURE__ */ H(Fe, {}),
2525
2529
  label: e("material.pdf-reader.download", "Download"),
2526
2530
  onClick: o.download
2527
2531
  }),
2528
- /* @__PURE__ */ V(Gi, {}),
2529
- l?.place === "end" ? /* @__PURE__ */ V(Bi, { action: l }) : null
2532
+ /* @__PURE__ */ H(Gi, {}),
2533
+ l?.place === "end" ? /* @__PURE__ */ H(Bi, { action: l }) : null
2530
2534
  ]
2531
2535
  });
2532
2536
  }
2533
2537
  //#endregion
2534
2538
  //#region lib/components/ui/media/pdf-reader/use-pill-visibility.ts
2535
2539
  function Yi(e, t, n) {
2536
- let r = R(null);
2537
- I(() => {
2540
+ let r = z(null);
2541
+ L(() => {
2538
2542
  r.current = e.current?.querySelector("[data-slot=\"scroll-area-viewport\"]") ?? null;
2539
2543
  });
2540
- let i = ke(r), [a, o] = z(!1);
2541
- return F(() => {
2544
+ let i = Oe(r), [a, o] = B(!1);
2545
+ return I(() => {
2542
2546
  i || o(!1);
2543
- }, [i]), F(() => {
2547
+ }, [i]), I(() => {
2544
2548
  let e = t.current;
2545
2549
  if (!e || !i) return;
2546
2550
  let n = (e) => {
2547
- e.key === "Tab" && yt(() => o(!0));
2551
+ e.key === "Tab" && vt(() => o(!0));
2548
2552
  };
2549
2553
  return e.addEventListener("keydown", n, !0), () => e.removeEventListener("keydown", n, !0);
2550
2554
  }, [t, i]), i && !a && !n;
@@ -2558,13 +2562,13 @@ var Xi = {
2558
2562
  pink: "bg-pink-400",
2559
2563
  red: "bg-red-500"
2560
2564
  }, Zi = "inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-full border-0 bg-transparent px-2.5 text-inherit tabular-nums outline-0 outline-offset-2 transition-colors hover:bg-(--tb-hover) active:bg-(--tb-press) focus-visible:outline-2 focus-visible:outline-(--tb-focus,var(--primary-text))", Qi = {
2561
- pointer: /* @__PURE__ */ V(Xe, {}),
2562
- highlight: /* @__PURE__ */ V(Ve, {}),
2563
- underline: /* @__PURE__ */ V(ot, {}),
2564
- pen: /* @__PURE__ */ V($e, {}),
2565
- note: /* @__PURE__ */ V(it, {}),
2566
- text: /* @__PURE__ */ V(at, {}),
2567
- eraser: /* @__PURE__ */ V(Le, {})
2565
+ pointer: /* @__PURE__ */ H(Ye, {}),
2566
+ highlight: /* @__PURE__ */ H(Be, {}),
2567
+ underline: /* @__PURE__ */ H(at, {}),
2568
+ pen: /* @__PURE__ */ H(Qe, {}),
2569
+ note: /* @__PURE__ */ H(rt, {}),
2570
+ text: /* @__PURE__ */ H(it, {}),
2571
+ eraser: /* @__PURE__ */ H(Ie, {})
2568
2572
  }, $i = [
2569
2573
  "highlight",
2570
2574
  "pen",
@@ -2579,7 +2583,7 @@ var Xi = {
2579
2583
  "eraser"
2580
2584
  ];
2581
2585
  function ta() {
2582
- let { t: e } = j();
2586
+ let { t: e } = N();
2583
2587
  return {
2584
2588
  tool: {
2585
2589
  pointer: e("material.pdf-reader.next.tool-pointer", "Select"),
@@ -2600,49 +2604,49 @@ function ta() {
2600
2604
  };
2601
2605
  }
2602
2606
  function na() {
2603
- let { t: e } = j(), { chrome: t, chromeActions: r } = Z(), i = c(), a = ta(), o = t.size === "compact" ? $i : ea, s = e("material.pdf-reader.next.color", "Colour: {color}", { color: a.color[t.color] }), l = (e) => /* @__PURE__ */ V(Un, {
2607
+ let { t: e } = N(), { chrome: t, chromeActions: r } = Z(), i = u(), a = ta(), o = t.size === "compact" ? $i : ea, s = e("material.pdf-reader.next.color", "Colour: {color}", { color: a.color[t.color] }), c = (e) => /* @__PURE__ */ H(Un, {
2604
2608
  value: e,
2605
2609
  icon: Qi[e],
2606
2610
  label: a.tool[e]
2607
2611
  }, e);
2608
- return /* @__PURE__ */ H(B, { children: [
2609
- /* @__PURE__ */ H(Hn, {
2612
+ return /* @__PURE__ */ U(V, { children: [
2613
+ /* @__PURE__ */ U(Hn, {
2610
2614
  type: "single",
2611
2615
  label: e("material.pdf-reader.next.tools", "Annotation tools"),
2612
2616
  value: t.tool,
2613
2617
  onValueChange: (e) => r.setTool(e),
2614
2618
  children: [
2615
- l("pointer"),
2616
- /* @__PURE__ */ V(k, {}),
2617
- o.map(l)
2619
+ c("pointer"),
2620
+ /* @__PURE__ */ H(j, {}),
2621
+ o.map(c)
2618
2622
  ]
2619
2623
  }),
2620
- /* @__PURE__ */ V(k, {}),
2621
- /* @__PURE__ */ H(b, {
2624
+ /* @__PURE__ */ H(j, {}),
2625
+ /* @__PURE__ */ U(ce, {
2622
2626
  modal: !1,
2623
- children: [/* @__PURE__ */ V(D, {
2627
+ children: [/* @__PURE__ */ H(k, {
2624
2628
  label: s,
2625
- children: /* @__PURE__ */ V(p, {
2629
+ children: /* @__PURE__ */ H(T, {
2626
2630
  asChild: !0,
2627
- children: /* @__PURE__ */ V("button", {
2631
+ children: /* @__PURE__ */ H("button", {
2628
2632
  type: "button",
2629
2633
  "aria-label": s,
2630
2634
  className: Zi,
2631
- children: /* @__PURE__ */ V("span", {
2635
+ children: /* @__PURE__ */ H("span", {
2632
2636
  "aria-hidden": !0,
2633
2637
  className: n("size-[18px] rounded-full ring-2 ring-foreground/30", Xi[t.color])
2634
2638
  })
2635
2639
  })
2636
2640
  })
2637
- }), /* @__PURE__ */ V(v, {
2641
+ }), /* @__PURE__ */ H(se, {
2638
2642
  container: i,
2639
2643
  className: "min-w-36",
2640
- children: /* @__PURE__ */ V(m, {
2644
+ children: /* @__PURE__ */ H(ie, {
2641
2645
  value: t.color,
2642
2646
  onValueChange: (e) => r.setColor(e),
2643
- children: ni.map((e) => /* @__PURE__ */ H(h, {
2647
+ children: ni.map((e) => /* @__PURE__ */ U(E, {
2644
2648
  value: e,
2645
- children: [/* @__PURE__ */ V("span", {
2649
+ children: [/* @__PURE__ */ H("span", {
2646
2650
  "aria-hidden": !0,
2647
2651
  className: n("size-3.5 rounded-full", Xi[e])
2648
2652
  }), a.color[e]]
@@ -2655,18 +2659,18 @@ function na() {
2655
2659
  //#endregion
2656
2660
  //#region lib/components/ui/media/pdf-reader/partials/page-field.tsx
2657
2661
  function ra() {
2658
- let { t: e } = j(), { state: t, actions: n } = Q(), [r, i] = z(null), a = r ?? String(t.currentPage), o = () => {
2662
+ let { t: e } = N(), { state: t, actions: n } = Q(), [r, i] = B(null), a = r ?? String(t.currentPage), o = () => {
2659
2663
  let e = Number.parseInt(r ?? "", 10);
2660
2664
  Number.isFinite(e) && n.goToPage(e), i(null);
2661
2665
  };
2662
- return /* @__PURE__ */ H(_e, {
2666
+ return /* @__PURE__ */ U(he, {
2663
2667
  label: e("material.pdf-reader.next.page-group", "Page"),
2664
2668
  priority: "pinned",
2665
2669
  dir: "ltr",
2666
2670
  className: "gap-1.5 px-1.5 text-sm",
2667
- children: [/* @__PURE__ */ V(D, {
2671
+ children: [/* @__PURE__ */ H(k, {
2668
2672
  label: e("material.pdf-reader.next.page-go", "Go to page"),
2669
- children: /* @__PURE__ */ V("input", {
2673
+ children: /* @__PURE__ */ H("input", {
2670
2674
  type: "text",
2671
2675
  inputMode: "numeric",
2672
2676
  pattern: "[0-9]*",
@@ -2681,7 +2685,7 @@ function ra() {
2681
2685
  onBlur: () => i(null),
2682
2686
  className: "h-8 min-w-9 rounded-full bg-foreground/[0.07] px-2 text-center font-semibold text-foreground tabular-nums outline-0 [field-sizing:content] focus-visible:outline-2 focus-visible:outline-primary-text"
2683
2687
  })
2684
- }), /* @__PURE__ */ V("span", {
2688
+ }), /* @__PURE__ */ H("span", {
2685
2689
  "aria-hidden": !0,
2686
2690
  className: "text-muted-foreground tabular-nums",
2687
2691
  children: e("material.pdf-reader.next.page-total", "/ {total}", { total: t.numPages })
@@ -2699,44 +2703,44 @@ var ia = [
2699
2703
  2
2700
2704
  ];
2701
2705
  function aa() {
2702
- let { t: e, language: t } = j(), { state: n, actions: r, scale: i, limits: a } = Q(), o = c(), s = (e) => Or(e, t ?? "en"), l = n.fitMode === "custom" ? String(n.scale) : n.fitMode, u = (e) => e === "width" || e === "page" ? r.setFitMode(e) : r.setScale(Number(e)), d = e("material.pdf-reader.zoom-menu", "Zoom level {level}", { level: s(i) });
2703
- return /* @__PURE__ */ H(B, { children: [
2704
- /* @__PURE__ */ V(A, {
2705
- icon: /* @__PURE__ */ V(ft, {}),
2706
+ let { t: e, language: t } = N(), { state: n, actions: r, scale: i, limits: a } = Q(), o = u(), s = (e) => Or(e, t ?? "en"), c = n.fitMode === "custom" ? String(n.scale) : n.fitMode, l = (e) => e === "width" || e === "page" ? r.setFitMode(e) : r.setScale(Number(e)), d = e("material.pdf-reader.zoom-menu", "Zoom level {level}", { level: s(i) });
2707
+ return /* @__PURE__ */ U(V, { children: [
2708
+ /* @__PURE__ */ H(M, {
2709
+ icon: /* @__PURE__ */ H(dt, {}),
2706
2710
  label: e("material.pdf-reader.zoom-out", "Zoom out"),
2707
2711
  disabled: i <= a.minScale,
2708
2712
  onClick: r.zoomOut
2709
2713
  }),
2710
- /* @__PURE__ */ H(b, {
2714
+ /* @__PURE__ */ U(ce, {
2711
2715
  modal: !1,
2712
- children: [/* @__PURE__ */ V(D, {
2716
+ children: [/* @__PURE__ */ H(k, {
2713
2717
  label: d,
2714
- children: /* @__PURE__ */ V(p, {
2718
+ children: /* @__PURE__ */ H(T, {
2715
2719
  asChild: !0,
2716
- children: /* @__PURE__ */ V("button", {
2720
+ children: /* @__PURE__ */ H("button", {
2717
2721
  type: "button",
2718
2722
  "aria-label": d,
2719
2723
  className: Zi,
2720
2724
  children: s(i)
2721
2725
  })
2722
2726
  })
2723
- }), /* @__PURE__ */ V(v, {
2727
+ }), /* @__PURE__ */ H(se, {
2724
2728
  container: o,
2725
2729
  className: "min-w-36",
2726
- children: /* @__PURE__ */ H(m, {
2727
- value: l,
2728
- onValueChange: u,
2730
+ children: /* @__PURE__ */ U(ie, {
2731
+ value: c,
2732
+ onValueChange: l,
2729
2733
  children: [
2730
- /* @__PURE__ */ V(h, {
2734
+ /* @__PURE__ */ H(E, {
2731
2735
  value: "width",
2732
2736
  children: e("material.pdf-reader.fit-width-full", "Fit Width")
2733
2737
  }),
2734
- /* @__PURE__ */ V(h, {
2738
+ /* @__PURE__ */ H(E, {
2735
2739
  value: "page",
2736
2740
  children: e("material.pdf-reader.fit-page-full", "Fit Page")
2737
2741
  }),
2738
- /* @__PURE__ */ V(y, {}),
2739
- ia.map((e) => /* @__PURE__ */ V(h, {
2742
+ /* @__PURE__ */ H(D, {}),
2743
+ ia.map((e) => /* @__PURE__ */ H(E, {
2740
2744
  value: String(e),
2741
2745
  children: s(e)
2742
2746
  }, e))
@@ -2744,8 +2748,8 @@ function aa() {
2744
2748
  })
2745
2749
  })]
2746
2750
  }),
2747
- /* @__PURE__ */ V(A, {
2748
- icon: /* @__PURE__ */ V(dt, {}),
2751
+ /* @__PURE__ */ H(M, {
2752
+ icon: /* @__PURE__ */ H(ut, {}),
2749
2753
  label: e("material.pdf-reader.zoom-in", "Zoom in"),
2750
2754
  disabled: i >= a.maxScale,
2751
2755
  onClick: r.zoomIn
@@ -2755,19 +2759,19 @@ function aa() {
2755
2759
  //#endregion
2756
2760
  //#region lib/components/ui/media/pdf-reader/partials/pill-nav.tsx
2757
2761
  function oa() {
2758
- let { t: e } = j(), { chrome: t, chromeActions: n, props: r, mode: i } = Z(), { state: a, actions: o, rowStarts: s } = Q(), { size: c } = t;
2759
- return /* @__PURE__ */ H(B, { children: [
2760
- c === "medium" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(ge, {
2761
- icon: /* @__PURE__ */ V(Qe, {
2762
+ let { t: e } = N(), { chrome: t, chromeActions: n, props: r, mode: i } = Z(), { state: a, actions: o, rowStarts: s } = Q(), { size: c } = t;
2763
+ return /* @__PURE__ */ U(V, { children: [
2764
+ c === "medium" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(me, {
2765
+ icon: /* @__PURE__ */ H(Ze, {
2762
2766
  "aria-hidden": !0,
2763
2767
  className: "rtl:-scale-x-100"
2764
2768
  }),
2765
2769
  label: e("material.pdf-reader.next.panel-toggle", "Panel"),
2766
2770
  pressed: t.panelOpen,
2767
2771
  onPressedChange: () => n.togglePanel()
2768
- }), /* @__PURE__ */ V(k, {})] }) : null,
2769
- /* @__PURE__ */ V(A, {
2770
- icon: /* @__PURE__ */ V(Ne, {
2772
+ }), /* @__PURE__ */ H(j, {})] }) : null,
2773
+ /* @__PURE__ */ H(M, {
2774
+ icon: /* @__PURE__ */ H(Me, {
2771
2775
  "aria-hidden": !0,
2772
2776
  className: "rtl:rotate-180"
2773
2777
  }),
@@ -2775,9 +2779,9 @@ function oa() {
2775
2779
  disabled: Rr(s, a.currentPage, -1) === null,
2776
2780
  onClick: o.prevPage
2777
2781
  }),
2778
- /* @__PURE__ */ V(ra, {}),
2779
- /* @__PURE__ */ V(A, {
2780
- icon: /* @__PURE__ */ V(Pe, {
2782
+ /* @__PURE__ */ H(ra, {}),
2783
+ /* @__PURE__ */ H(M, {
2784
+ icon: /* @__PURE__ */ H(Ne, {
2781
2785
  "aria-hidden": !0,
2782
2786
  className: "rtl:rotate-180"
2783
2787
  }),
@@ -2785,23 +2789,23 @@ function oa() {
2785
2789
  disabled: Rr(s, a.currentPage, 1) === null,
2786
2790
  onClick: o.nextPage
2787
2791
  }),
2788
- c === "compact" ? null : /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(k, {}), /* @__PURE__ */ V(aa, {})] }),
2789
- r.annotate ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(k, {}), /* @__PURE__ */ V(A, {
2790
- icon: /* @__PURE__ */ V(et, {}),
2792
+ c === "compact" ? null : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(j, {}), /* @__PURE__ */ H(aa, {})] }),
2793
+ r.annotate ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(j, {}), /* @__PURE__ */ H(M, {
2794
+ icon: /* @__PURE__ */ H($e, {}),
2791
2795
  label: e("material.pdf-reader.next.annotate", "Annotate"),
2792
2796
  onClick: () => n.startAnnotating(),
2793
2797
  "data-focus-target": "annotate"
2794
2798
  })] }) : null,
2795
- i === "fullscreen" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(k, {}), /* @__PURE__ */ V(Gi, {})] }) : null
2799
+ i === "fullscreen" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(j, {}), /* @__PURE__ */ H(Gi, {})] }) : null
2796
2800
  ] });
2797
2801
  }
2798
2802
  //#endregion
2799
2803
  //#region lib/components/ui/media/pdf-reader/partials/pill.tsx
2800
2804
  function sa() {
2801
- let { t: e } = j(), t = $(), { chrome: n, frameRef: r } = Z(), { state: i, containerRef: a } = Q(), o = Yi(a, r, n.annotating);
2802
- return i.numPages === 0 ? null : /* @__PURE__ */ V("div", {
2805
+ let { t: e } = N(), t = $(), { chrome: n, frameRef: r } = Z(), { state: i, containerRef: a } = Q(), o = Yi(a, r, n.annotating);
2806
+ return i.numPages === 0 ? null : /* @__PURE__ */ H("div", {
2803
2807
  className: "pointer-events-none absolute inset-x-0 bottom-4 z-10 flex justify-center px-4",
2804
- children: /* @__PURE__ */ V(O, {
2808
+ children: /* @__PURE__ */ H(A, {
2805
2809
  label: n.annotating ? e("material.pdf-reader.next.tools", "Annotation tools") : e("material.pdf-reader.next.pill", "Reader controls"),
2806
2810
  ...t,
2807
2811
  density: n.annotating && n.size === "compact" && t.density ? "compact" : t.density,
@@ -2809,30 +2813,30 @@ function sa() {
2809
2813
  hidden: o,
2810
2814
  className: "pointer-events-auto",
2811
2815
  "data-focus-target": "pill",
2812
- children: n.annotating ? /* @__PURE__ */ V(na, {}) : /* @__PURE__ */ V(oa, {})
2816
+ children: n.annotating ? /* @__PURE__ */ H(na, {}) : /* @__PURE__ */ H(oa, {})
2813
2817
  })
2814
2818
  });
2815
2819
  }
2816
2820
  //#endregion
2817
2821
  //#region lib/components/ui/media/pdf-reader/partials/rail.tsx
2818
2822
  function ca() {
2819
- let { t: e } = j(), { chrome: t, chromeActions: n } = Z(), r = ai(), i = oi(), a = _r.selectRailValue(t), o = $();
2820
- return /* @__PURE__ */ V(O, {
2823
+ let { t: e } = N(), { chrome: t, chromeActions: n } = Z(), r = ai(), i = oi(), a = _r.selectRailValue(t), o = $();
2824
+ return /* @__PURE__ */ H(A, {
2821
2825
  label: e("material.pdf-reader.next.rail", "Document views"),
2822
2826
  variant: "docked",
2823
2827
  orientation: "vertical",
2824
2828
  ...o,
2825
2829
  className: "h-auto w-14 shrink-0 self-stretch border-e border-border",
2826
- children: /* @__PURE__ */ V(Hn, {
2830
+ children: /* @__PURE__ */ H(Hn, {
2827
2831
  type: "single",
2828
2832
  label: e("material.pdf-reader.next.panel-views", "Panel views"),
2829
2833
  value: a,
2830
2834
  onValueChange: (e) => n.openPanelTab(e),
2831
2835
  children: i.map((e) => {
2832
2836
  let t = ii[e];
2833
- return /* @__PURE__ */ V(Un, {
2837
+ return /* @__PURE__ */ H(Un, {
2834
2838
  value: e,
2835
- icon: /* @__PURE__ */ V(t, {}),
2839
+ icon: /* @__PURE__ */ H(t, {}),
2836
2840
  label: r[e],
2837
2841
  onClick: () => {
2838
2842
  e === a && n.closePanel();
@@ -2845,10 +2849,10 @@ function ca() {
2845
2849
  //#endregion
2846
2850
  //#region lib/components/ui/media/pdf-reader/partials/frame.tsx
2847
2851
  function la() {
2848
- let { t: e } = j(), { chrome: t, chromeActions: r, frameRef: i, mode: a, props: o } = Z();
2852
+ let { t: e } = N(), { chrome: t, chromeActions: r, frameRef: i, mode: a, props: o } = Z();
2849
2853
  Sr(i, r.setSize), Cr(i, t);
2850
2854
  let s = a === "fullscreen" && _r.selectHeaderKind(t) === "default", c = Dr();
2851
- return /* @__PURE__ */ H("section", {
2855
+ return /* @__PURE__ */ U("section", {
2852
2856
  ref: i,
2853
2857
  "data-slot": "pdf-reader",
2854
2858
  "data-mode": a,
@@ -2857,17 +2861,17 @@ function la() {
2857
2861
  onKeyDown: c,
2858
2862
  className: n("relative flex h-full min-h-0 flex-col overflow-hidden bg-background text-foreground", a === "embedded" && "rounded-xl border border-border", o.className),
2859
2863
  children: [
2860
- s ? null : /* @__PURE__ */ V(qi, {}),
2861
- /* @__PURE__ */ H("div", {
2864
+ s ? null : /* @__PURE__ */ H(qi, {}),
2865
+ /* @__PURE__ */ U("div", {
2862
2866
  className: "relative flex min-h-0 flex-1",
2863
2867
  children: [
2864
- s ? /* @__PURE__ */ V(Pi, {}) : null,
2865
- t.size === "expanded" ? /* @__PURE__ */ V(ca, {}) : null,
2866
- /* @__PURE__ */ V(Ni, {}),
2867
- /* @__PURE__ */ V(sa, {})
2868
+ s ? /* @__PURE__ */ H(Pi, {}) : null,
2869
+ t.size === "expanded" ? /* @__PURE__ */ H(ca, {}) : null,
2870
+ /* @__PURE__ */ H(Ni, {}),
2871
+ /* @__PURE__ */ H(sa, {})
2868
2872
  ]
2869
2873
  }),
2870
- /* @__PURE__ */ V(kr, {})
2874
+ /* @__PURE__ */ H(kr, {})
2871
2875
  ]
2872
2876
  });
2873
2877
  }
@@ -2883,7 +2887,7 @@ function ua(e, t, n) {
2883
2887
  //#endregion
2884
2888
  //#region lib/components/ui/media/pdf-viewer/use-pdf-file-actions.ts
2885
2889
  function da({ file: e, fileName: t, pdfRef: n, onDownload: r, onPrint: i }) {
2886
- let { t: a } = j(), o = () => n.current?.getData?.();
2890
+ let { t: a } = N(), o = () => n.current?.getData?.();
2887
2891
  return {
2888
2892
  download: r ?? (() => {
2889
2893
  e && Qt(e, {
@@ -2900,7 +2904,7 @@ function da({ file: e, fileName: t, pdfRef: n, onDownload: r, onPrint: i }) {
2900
2904
  //#endregion
2901
2905
  //#region lib/components/ui/media/pdf-viewer/use-pdf-outline-select.ts
2902
2906
  function fa(e, t) {
2903
- return P(async (n) => {
2907
+ return F(async (n) => {
2904
2908
  let r = e.current;
2905
2909
  if (!(!r || n.dest == null)) try {
2906
2910
  let e = typeof n.dest == "string" ? await r.getDestination(n.dest) : n.dest, i = Array.isArray(e) ? e[0] : e;
@@ -3102,7 +3106,7 @@ function xa(e, t) {
3102
3106
  //#endregion
3103
3107
  //#region lib/components/ui/media/pdf-viewer/use-pdf-computed-scale.ts
3104
3108
  function Sa(e) {
3105
- return P(() => e.fitMode === "custom" ? e.scale : Wt(e.fitMode, e.pageSizes ?? [], e.rotation, {
3109
+ return F(() => e.fitMode === "custom" ? e.scale : Wt(e.fitMode, e.pageSizes ?? [], e.rotation, {
3106
3110
  width: e.containerWidth,
3107
3111
  height: e.containerHeight ?? 600
3108
3112
  }), [
@@ -3117,7 +3121,7 @@ function Sa(e) {
3117
3121
  //#endregion
3118
3122
  //#region lib/components/ui/media/pdf-viewer/use-pdf-page-area.ts
3119
3123
  function Ca(e, t, n) {
3120
- F(() => {
3124
+ I(() => {
3121
3125
  let r = e.current;
3122
3126
  if (!r || !t) return;
3123
3127
  let i = new ResizeObserver((e) => {
@@ -3136,7 +3140,7 @@ function Ca(e, t, n) {
3136
3140
  t,
3137
3141
  n
3138
3142
  ]);
3139
- let [r] = z(() => Rt((e) => n({
3143
+ let [r] = B(() => Rt((e) => n({
3140
3144
  type: "SET_PAGE_SIZES",
3141
3145
  payload: e
3142
3146
  })));
@@ -3145,14 +3149,14 @@ function Ca(e, t, n) {
3145
3149
  //#endregion
3146
3150
  //#region lib/components/ui/media/pdf-viewer/use-pdf-page-report.ts
3147
3151
  function wa(e, t, n) {
3148
- let r = R(e.currentPage), i = P((e) => {
3152
+ let r = z(e.currentPage), i = F((e) => {
3149
3153
  let { state: i, options: a } = n.current, o = ga(e, i.numPages);
3150
3154
  o !== i.currentPage && (t({
3151
3155
  type: "SET_PAGE",
3152
3156
  payload: o
3153
3157
  }), r.current = o, a.onPageChange?.(o));
3154
3158
  }, [t, n]);
3155
- return F(() => {
3159
+ return I(() => {
3156
3160
  e.numPages === 0 || e.currentPage === r.current || (r.current = e.currentPage, n.current.options.onPageChange?.(e.currentPage));
3157
3161
  }, [
3158
3162
  e.currentPage,
@@ -3163,24 +3167,24 @@ function wa(e, t, n) {
3163
3167
  //#endregion
3164
3168
  //#region lib/components/ui/media/pdf-viewer/use-pdf-reader.ts
3165
3169
  function Ta(e) {
3166
- let [t, n] = _t(ya, e, _a), r = R(null), [i, a] = z(0), o = Ca(r, t.numPages > 0, n);
3167
- F(() => {
3170
+ let [t, n] = gt(ya, e, _a), r = z(null), [i, a] = B(0), o = Ca(r, t.numPages > 0, n);
3171
+ I(() => {
3168
3172
  o.reset(), n({
3169
3173
  type: "RESET_DOCUMENT",
3170
3174
  payload: { page: c.current.options.initialPage ?? 1 }
3171
3175
  });
3172
3176
  }, [en(e.file), o]);
3173
- let s = Sa(t), c = R({
3177
+ let s = Sa(t), c = z({
3174
3178
  state: t,
3175
3179
  options: e
3176
3180
  });
3177
- I(() => {
3181
+ L(() => {
3178
3182
  c.current = {
3179
3183
  state: t,
3180
3184
  options: e
3181
3185
  };
3182
3186
  });
3183
- let l = wa(t, n, c), u = P((e) => {
3187
+ let l = wa(t, n, c), u = F((e) => {
3184
3188
  let r = t.fitMode === "custom" ? t.scale : s();
3185
3189
  n({
3186
3190
  type: "SET_SCALE",
@@ -3223,8 +3227,8 @@ var Ea = {
3223
3227
  matches: []
3224
3228
  };
3225
3229
  function Da(e, t, n, r = 150) {
3226
- let [i, a] = z(Ea);
3227
- return F(() => {
3230
+ let [i, a] = B(Ea);
3231
+ return I(() => {
3228
3232
  a(Ea);
3229
3233
  let i = e.current;
3230
3234
  if (!i || n === 0 || !t.trim()) return;
@@ -3244,27 +3248,27 @@ function Da(e, t, n, r = 150) {
3244
3248
  //#endregion
3245
3249
  //#region lib/components/ui/media/pdf-viewer/use-pdf-search-hits.ts
3246
3250
  function Oa(e) {
3247
- let { pdfRef: t, query: n, numPages: r, goToPage: i, pageRefs: a, holdScrollSpy: o } = e, s = Da(t, n, r), [c, l] = z(-1), u = R(() => {});
3248
- F(() => {
3251
+ let { pdfRef: t, query: n, numPages: r, goToPage: i, pageRefs: a, holdScrollSpy: o } = e, s = Da(t, n, r), [c, l] = B(-1), u = z(() => {});
3252
+ I(() => {
3249
3253
  l(-1), u.current();
3250
3254
  }, [
3251
3255
  t,
3252
3256
  n,
3253
3257
  r
3254
- ]), F(() => () => u.current(), []);
3255
- let d = L(() => Array.from(s.matches, (e) => e?.length ?? 0), [s.matches]), f = d.reduce((e, t) => e + t, 0), p = c < 0 ? null : Bt(d, c), m = R({
3258
+ ]), I(() => () => u.current(), []);
3259
+ let d = R(() => Array.from(s.matches, (e) => e?.length ?? 0), [s.matches]), f = d.reduce((e, t) => e + t, 0), p = c < 0 ? null : Bt(d, c), m = z({
3256
3260
  counts: d,
3257
3261
  hitCount: f,
3258
3262
  hitIndex: c
3259
3263
  });
3260
- I(() => {
3264
+ L(() => {
3261
3265
  m.current = {
3262
3266
  counts: d,
3263
3267
  hitCount: f,
3264
3268
  hitIndex: c
3265
3269
  };
3266
3270
  });
3267
- let h = P((e) => {
3271
+ let h = F((e) => {
3268
3272
  let { counts: t, hitCount: n, hitIndex: r } = m.current, s = Yt(r, e, n);
3269
3273
  if (s < 0) return {
3270
3274
  index: 0,
@@ -3283,13 +3287,13 @@ function Oa(e) {
3283
3287
  i,
3284
3288
  a,
3285
3289
  o
3286
- ]), g = P(() => l(-1), []), _ = p?.page ?? 0, v = p?.hit ?? -1;
3290
+ ]), g = F(() => l(-1), []), _ = p?.page ?? 0, v = p?.hit ?? -1;
3287
3291
  return {
3288
3292
  hitIndex: c,
3289
3293
  hitCount: f,
3290
3294
  jump: h,
3291
3295
  reset: g,
3292
- highlight: L(() => ({
3296
+ highlight: R(() => ({
3293
3297
  texts: s.texts,
3294
3298
  matches: s.matches,
3295
3299
  current: _ ? {
@@ -3317,16 +3321,16 @@ async function ka(e, t, n) {
3317
3321
  //#endregion
3318
3322
  //#region lib/components/ui/media/pdf-reader/engine/use-engine-document.ts
3319
3323
  function Aa(e, t, n) {
3320
- let r = R({
3324
+ let r = z({
3321
3325
  file: e,
3322
3326
  events: n
3323
3327
  });
3324
- I(() => {
3328
+ L(() => {
3325
3329
  r.current = {
3326
3330
  file: e,
3327
3331
  events: n
3328
3332
  };
3329
- }), F(() => {
3333
+ }), I(() => {
3330
3334
  let e = r.current.file;
3331
3335
  if (!e) return;
3332
3336
  let t = new AbortController(), n;
@@ -3342,14 +3346,14 @@ function Aa(e, t, n) {
3342
3346
  //#endregion
3343
3347
  //#region lib/components/ui/media/pdf-reader/engine/use-reader-password.ts
3344
3348
  function ja() {
3345
- let [e, t] = z(""), n = R(null);
3349
+ let [e, t] = B(""), n = z(null);
3346
3350
  return {
3347
3351
  input: e,
3348
3352
  setInput: t,
3349
- ask: P((e) => {
3353
+ ask: F((e) => {
3350
3354
  n.current = e;
3351
3355
  }, []),
3352
- forget: P(() => {
3356
+ forget: F(() => {
3353
3357
  n.current = null, t("");
3354
3358
  }, []),
3355
3359
  submit: () => {
@@ -3360,8 +3364,8 @@ function ja() {
3360
3364
  //#endregion
3361
3365
  //#region lib/components/ui/media/pdf-reader/engine/use-reader-engine.ts
3362
3366
  function Ma(e) {
3363
- let [t, n] = z(null);
3364
- return F(() => {
3367
+ let [t, n] = B(null);
3368
+ return I(() => {
3365
3369
  if (!e) return;
3366
3370
  let t = Kr();
3367
3371
  return n(t), () => {
@@ -3370,7 +3374,7 @@ function Ma(e) {
3370
3374
  }, [e]), t;
3371
3375
  }
3372
3376
  function Na(e, t) {
3373
- let { actions: n, handlers: r } = t, [i, a] = z(null), o = R(null), [s, c] = z(null), l = ja(), u = Ma(i);
3377
+ let { actions: n, handlers: r } = t, [i, a] = B(null), o = z(null), [s, c] = B(null), l = ja(), u = Ma(i);
3374
3378
  return Aa(e, t.reloadKey, {
3375
3379
  onOpen: (e) => {
3376
3380
  o.current = e, a(e), r.onDocumentLoadSuccess(e), e.getOutline().then((e) => n.setOutline(Ht(e))).catch(() => {}), e.getDownloadInfo().then((e) => c(e.length)).catch(() => c(null));
@@ -3394,11 +3398,11 @@ function Na(e, t) {
3394
3398
  //#region lib/components/ui/media/pdf-reader/use-announcements.ts
3395
3399
  var Pa = 1e3;
3396
3400
  function Fa() {
3397
- let e = R({
3401
+ let e = z({
3398
3402
  page: -Infinity,
3399
3403
  zoom: -Infinity
3400
3404
  });
3401
- return L(() => ({
3405
+ return R(() => ({
3402
3406
  asked(t, n) {
3403
3407
  return (...r) => {
3404
3408
  e.current[t] = performance.now(), n(...r);
@@ -3444,7 +3448,7 @@ function za(e, t = "single") {
3444
3448
  onPageChange: e.onPageChange,
3445
3449
  onLoadSuccess: e.onLoadSuccess,
3446
3450
  onLoadError: e.onLoadError
3447
- }), { state: s, actions: c } = o, l = Na(n, o), { pdfRef: u } = l, d = Fa(), { asked: f } = d, p = L(() => f("page", c.goToPage), [f, c.goToPage]), m = R(/* @__PURE__ */ new Map()), h = R(0), g = Oa({
3451
+ }), { state: s, actions: c } = o, l = Na(n, o), { pdfRef: u } = l, d = Fa(), { asked: f } = d, p = R(() => f("page", c.goToPage), [f, c.goToPage]), m = z(/* @__PURE__ */ new Map()), h = z(0), g = Oa({
3448
3452
  pdfRef: u,
3449
3453
  query: s.searchQuery,
3450
3454
  numPages: s.numPages,
@@ -3459,7 +3463,7 @@ function za(e, t = "single") {
3459
3463
  pdfRef: u,
3460
3464
  onDownload: i,
3461
3465
  onPrint: a
3462
- }), v = fa(u, p), y = Ra(o, t), b = L(() => Ft(s.numPages, t), [s.numPages, t]), x = Ia({
3466
+ }), v = fa(u, p), y = Ra(o, t), b = R(() => Ft(s.numPages, t), [s.numPages, t]), x = Ia({
3463
3467
  reader: o,
3464
3468
  announcements: d,
3465
3469
  askedPage: p,
@@ -3485,13 +3489,13 @@ function za(e, t = "single") {
3485
3489
  //#endregion
3486
3490
  //#region lib/components/ui/media/pdf-reader/pdf-reader-provider.tsx
3487
3491
  function Ba({ props: e, children: t }) {
3488
- let [n, r] = Ee(gr, e.defaultLayout ? {
3492
+ let [n, r] = Ce(gr, e.defaultLayout ? {
3489
3493
  ...e.initialChrome,
3490
3494
  layout: e.defaultLayout
3491
- } : e.initialChrome), i = e.layout ?? n.layout, a = L(() => ({
3495
+ } : e.initialChrome), i = e.layout ?? n.layout, a = R(() => ({
3492
3496
  ...n,
3493
3497
  layout: i
3494
- }), [n, i]), { layout: o, onLayoutChange: s } = e, l = L(() => ({
3498
+ }), [n, i]), { layout: o, onLayoutChange: s } = e, c = R(() => ({
3495
3499
  ...r,
3496
3500
  setLayout: (e) => {
3497
3501
  e !== i && (s?.(e), o === void 0 && r.setLayout(e));
@@ -3501,16 +3505,16 @@ function Ba({ props: e, children: t }) {
3501
3505
  i,
3502
3506
  o,
3503
3507
  s
3504
- ]), u = L(() => ua(i, e.coverPage, a.size), [
3508
+ ]), l = R(() => ua(i, e.coverPage, a.size), [
3505
3509
  i,
3506
3510
  e.coverPage,
3507
3511
  a.size
3508
- ]), d = za(e, u.mode), f = R(null), p = c(), m = p !== null && p === f.current ? "fullscreen" : e.mode ?? "embedded", { onOpenChange: h, onBack: g, onExitFullscreen: _ } = e, v = a.size;
3509
- return /* @__PURE__ */ V(vr, {
3510
- value: L(() => ({
3512
+ ]), d = za(e, l.mode), f = z(null), p = u(), m = p !== null && p === f.current ? "fullscreen" : e.mode ?? "embedded", { onOpenChange: h, onBack: g, onExitFullscreen: _ } = e, v = a.size;
3513
+ return /* @__PURE__ */ H(vr, {
3514
+ value: R(() => ({
3511
3515
  chrome: a,
3512
- chromeActions: l,
3513
- layout: u,
3516
+ chromeActions: c,
3517
+ layout: l,
3514
3518
  mode: m,
3515
3519
  frameRef: f,
3516
3520
  props: e,
@@ -3518,15 +3522,15 @@ function Ba({ props: e, children: t }) {
3518
3522
  document.fullscreenElement ? document.exitFullscreen?.() : f.current?.requestFullscreen?.();
3519
3523
  },
3520
3524
  openSearch: () => {
3521
- v === "compact" ? l.openSearchField() : l.openPanelTab("search"), l.focusSearch();
3525
+ v === "compact" ? c.openSearchField() : c.openPanelTab("search"), c.focusSearch();
3522
3526
  },
3523
3527
  leave: () => {
3524
3528
  m === "dialog" ? h?.(!1) : m === "page" ? g?.() : (document.fullscreenElement && document.exitFullscreen?.(), _?.());
3525
3529
  }
3526
3530
  }), [
3527
3531
  a,
3532
+ c,
3528
3533
  l,
3529
- u,
3530
3534
  m,
3531
3535
  e,
3532
3536
  v,
@@ -3534,7 +3538,7 @@ function Ba({ props: e, children: t }) {
3534
3538
  g,
3535
3539
  _
3536
3540
  ]),
3537
- children: /* @__PURE__ */ V(yr, {
3541
+ children: /* @__PURE__ */ H(yr, {
3538
3542
  value: d,
3539
3543
  children: t
3540
3544
  })
@@ -3543,23 +3547,23 @@ function Ba({ props: e, children: t }) {
3543
3547
  //#endregion
3544
3548
  //#region lib/components/ui/media/pdf-reader/pdf-reader.tsx
3545
3549
  function Va(e) {
3546
- let t = e.file ? /* @__PURE__ */ V(Ba, {
3550
+ let t = e.file ? /* @__PURE__ */ H(Ba, {
3547
3551
  props: e,
3548
- children: /* @__PURE__ */ V(la, {})
3549
- }) : /* @__PURE__ */ V(ur, { className: e.className });
3550
- return e.mode === "dialog" ? /* @__PURE__ */ V(hr, {
3552
+ children: /* @__PURE__ */ H(la, {})
3553
+ }) : /* @__PURE__ */ H(ur, { className: e.className });
3554
+ return e.mode === "dialog" ? /* @__PURE__ */ H(hr, {
3551
3555
  open: e.open ?? !0,
3552
3556
  onOpenChange: e.onOpenChange,
3553
3557
  title: e.fileName,
3554
3558
  children: t
3555
3559
  }) : t;
3556
3560
  }
3557
- var Ha = Oe(Va), Ua = /* @__PURE__ */ e({ PdfReader: () => Ka }), Wa = new Set(ri);
3561
+ var Ha = De(Va), Ua = /* @__PURE__ */ e({ PdfReader: () => Ka }), Wa = new Set(ri);
3558
3562
  function Ga(e) {
3559
3563
  return Object.fromEntries(Object.entries(e).filter(([e]) => !Wa.has(e)));
3560
3564
  }
3561
3565
  function Ka(e) {
3562
- return /* @__PURE__ */ V(Ha, { ...Ga(e) });
3566
+ return /* @__PURE__ */ H(Ha, { ...Ga(e) });
3563
3567
  }
3564
3568
  //#endregion
3565
3569
  export { Un as _, ar as a, rr as c, Yn as d, Jn as f, Hn as g, Gn as h, ir as i, $n as l, Wn as m, Ua as n, Qn as o, Xn as p, lr as r, er as s, Ka as t, Zn as u, an as v };