@cherrystudio/file-preview 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +247 -2
  3. package/dist/Combination-BLg27FvF.js +1044 -0
  4. package/dist/EchartsChartRenderer-e2b5JysX.js +39859 -0
  5. package/dist/FilePreviewTooLarge-DkHa6toZ.js +27 -0
  6. package/dist/ImageFilePreview-Be0jdBJ-.js +2170 -0
  7. package/dist/PdfFilePreview-D3Ie0_mm.js +29747 -0
  8. package/dist/PowerPointFilePreview-BLfF0zcm.js +58032 -0
  9. package/dist/SpreadsheetFilePreview-DJdoyeis.js +3217 -0
  10. package/dist/WordFilePreview-DSqt7Uq2.js +4137 -0
  11. package/dist/assets/cmaps/78-EUC-H.bcmap +0 -0
  12. package/dist/assets/cmaps/78-EUC-V.bcmap +0 -0
  13. package/dist/assets/cmaps/78-H.bcmap +0 -0
  14. package/dist/assets/cmaps/78-RKSJ-H.bcmap +0 -0
  15. package/dist/assets/cmaps/78-RKSJ-V.bcmap +0 -0
  16. package/dist/assets/cmaps/78-V.bcmap +0 -0
  17. package/dist/assets/cmaps/78ms-RKSJ-H.bcmap +0 -0
  18. package/dist/assets/cmaps/78ms-RKSJ-V.bcmap +0 -0
  19. package/dist/assets/cmaps/83pv-RKSJ-H.bcmap +0 -0
  20. package/dist/assets/cmaps/90ms-RKSJ-H.bcmap +0 -0
  21. package/dist/assets/cmaps/90ms-RKSJ-V.bcmap +0 -0
  22. package/dist/assets/cmaps/90msp-RKSJ-H.bcmap +0 -0
  23. package/dist/assets/cmaps/90msp-RKSJ-V.bcmap +0 -0
  24. package/dist/assets/cmaps/90pv-RKSJ-H.bcmap +0 -0
  25. package/dist/assets/cmaps/90pv-RKSJ-V.bcmap +0 -0
  26. package/dist/assets/cmaps/Add-H.bcmap +0 -0
  27. package/dist/assets/cmaps/Add-RKSJ-H.bcmap +0 -0
  28. package/dist/assets/cmaps/Add-RKSJ-V.bcmap +0 -0
  29. package/dist/assets/cmaps/Add-V.bcmap +0 -0
  30. package/dist/assets/cmaps/Adobe-CNS1-0.bcmap +0 -0
  31. package/dist/assets/cmaps/Adobe-CNS1-1.bcmap +0 -0
  32. package/dist/assets/cmaps/Adobe-CNS1-2.bcmap +0 -0
  33. package/dist/assets/cmaps/Adobe-CNS1-3.bcmap +0 -0
  34. package/dist/assets/cmaps/Adobe-CNS1-4.bcmap +0 -0
  35. package/dist/assets/cmaps/Adobe-CNS1-5.bcmap +0 -0
  36. package/dist/assets/cmaps/Adobe-CNS1-6.bcmap +0 -0
  37. package/dist/assets/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  38. package/dist/assets/cmaps/Adobe-GB1-0.bcmap +0 -0
  39. package/dist/assets/cmaps/Adobe-GB1-1.bcmap +0 -0
  40. package/dist/assets/cmaps/Adobe-GB1-2.bcmap +0 -0
  41. package/dist/assets/cmaps/Adobe-GB1-3.bcmap +0 -0
  42. package/dist/assets/cmaps/Adobe-GB1-4.bcmap +0 -0
  43. package/dist/assets/cmaps/Adobe-GB1-5.bcmap +0 -0
  44. package/dist/assets/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  45. package/dist/assets/cmaps/Adobe-Japan1-0.bcmap +0 -0
  46. package/dist/assets/cmaps/Adobe-Japan1-1.bcmap +0 -0
  47. package/dist/assets/cmaps/Adobe-Japan1-2.bcmap +0 -0
  48. package/dist/assets/cmaps/Adobe-Japan1-3.bcmap +0 -0
  49. package/dist/assets/cmaps/Adobe-Japan1-4.bcmap +0 -0
  50. package/dist/assets/cmaps/Adobe-Japan1-5.bcmap +0 -0
  51. package/dist/assets/cmaps/Adobe-Japan1-6.bcmap +0 -0
  52. package/dist/assets/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  53. package/dist/assets/cmaps/Adobe-Korea1-0.bcmap +0 -0
  54. package/dist/assets/cmaps/Adobe-Korea1-1.bcmap +0 -0
  55. package/dist/assets/cmaps/Adobe-Korea1-2.bcmap +0 -0
  56. package/dist/assets/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  57. package/dist/assets/cmaps/B5-H.bcmap +0 -0
  58. package/dist/assets/cmaps/B5-V.bcmap +0 -0
  59. package/dist/assets/cmaps/B5pc-H.bcmap +0 -0
  60. package/dist/assets/cmaps/B5pc-V.bcmap +0 -0
  61. package/dist/assets/cmaps/CNS-EUC-H.bcmap +0 -0
  62. package/dist/assets/cmaps/CNS-EUC-V.bcmap +0 -0
  63. package/dist/assets/cmaps/CNS1-H.bcmap +0 -0
  64. package/dist/assets/cmaps/CNS1-V.bcmap +0 -0
  65. package/dist/assets/cmaps/CNS2-H.bcmap +0 -0
  66. package/dist/assets/cmaps/CNS2-V.bcmap +3 -0
  67. package/dist/assets/cmaps/ETHK-B5-H.bcmap +0 -0
  68. package/dist/assets/cmaps/ETHK-B5-V.bcmap +0 -0
  69. package/dist/assets/cmaps/ETen-B5-H.bcmap +0 -0
  70. package/dist/assets/cmaps/ETen-B5-V.bcmap +0 -0
  71. package/dist/assets/cmaps/ETenms-B5-H.bcmap +3 -0
  72. package/dist/assets/cmaps/ETenms-B5-V.bcmap +0 -0
  73. package/dist/assets/cmaps/EUC-H.bcmap +0 -0
  74. package/dist/assets/cmaps/EUC-V.bcmap +0 -0
  75. package/dist/assets/cmaps/Ext-H.bcmap +0 -0
  76. package/dist/assets/cmaps/Ext-RKSJ-H.bcmap +0 -0
  77. package/dist/assets/cmaps/Ext-RKSJ-V.bcmap +0 -0
  78. package/dist/assets/cmaps/Ext-V.bcmap +0 -0
  79. package/dist/assets/cmaps/GB-EUC-H.bcmap +0 -0
  80. package/dist/assets/cmaps/GB-EUC-V.bcmap +0 -0
  81. package/dist/assets/cmaps/GB-H.bcmap +4 -0
  82. package/dist/assets/cmaps/GB-V.bcmap +0 -0
  83. package/dist/assets/cmaps/GBK-EUC-H.bcmap +0 -0
  84. package/dist/assets/cmaps/GBK-EUC-V.bcmap +0 -0
  85. package/dist/assets/cmaps/GBK2K-H.bcmap +0 -0
  86. package/dist/assets/cmaps/GBK2K-V.bcmap +0 -0
  87. package/dist/assets/cmaps/GBKp-EUC-H.bcmap +0 -0
  88. package/dist/assets/cmaps/GBKp-EUC-V.bcmap +0 -0
  89. package/dist/assets/cmaps/GBT-EUC-H.bcmap +0 -0
  90. package/dist/assets/cmaps/GBT-EUC-V.bcmap +0 -0
  91. package/dist/assets/cmaps/GBT-H.bcmap +0 -0
  92. package/dist/assets/cmaps/GBT-V.bcmap +0 -0
  93. package/dist/assets/cmaps/GBTpc-EUC-H.bcmap +0 -0
  94. package/dist/assets/cmaps/GBTpc-EUC-V.bcmap +0 -0
  95. package/dist/assets/cmaps/GBpc-EUC-H.bcmap +0 -0
  96. package/dist/assets/cmaps/GBpc-EUC-V.bcmap +0 -0
  97. package/dist/assets/cmaps/H.bcmap +0 -0
  98. package/dist/assets/cmaps/HKdla-B5-H.bcmap +0 -0
  99. package/dist/assets/cmaps/HKdla-B5-V.bcmap +0 -0
  100. package/dist/assets/cmaps/HKdlb-B5-H.bcmap +0 -0
  101. package/dist/assets/cmaps/HKdlb-B5-V.bcmap +0 -0
  102. package/dist/assets/cmaps/HKgccs-B5-H.bcmap +0 -0
  103. package/dist/assets/cmaps/HKgccs-B5-V.bcmap +0 -0
  104. package/dist/assets/cmaps/HKm314-B5-H.bcmap +0 -0
  105. package/dist/assets/cmaps/HKm314-B5-V.bcmap +0 -0
  106. package/dist/assets/cmaps/HKm471-B5-H.bcmap +0 -0
  107. package/dist/assets/cmaps/HKm471-B5-V.bcmap +0 -0
  108. package/dist/assets/cmaps/HKscs-B5-H.bcmap +0 -0
  109. package/dist/assets/cmaps/HKscs-B5-V.bcmap +0 -0
  110. package/dist/assets/cmaps/Hankaku.bcmap +0 -0
  111. package/dist/assets/cmaps/Hiragana.bcmap +0 -0
  112. package/dist/assets/cmaps/KSC-EUC-H.bcmap +0 -0
  113. package/dist/assets/cmaps/KSC-EUC-V.bcmap +0 -0
  114. package/dist/assets/cmaps/KSC-H.bcmap +0 -0
  115. package/dist/assets/cmaps/KSC-Johab-H.bcmap +0 -0
  116. package/dist/assets/cmaps/KSC-Johab-V.bcmap +0 -0
  117. package/dist/assets/cmaps/KSC-V.bcmap +0 -0
  118. package/dist/assets/cmaps/KSCms-UHC-H.bcmap +0 -0
  119. package/dist/assets/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  120. package/dist/assets/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  121. package/dist/assets/cmaps/KSCms-UHC-V.bcmap +0 -0
  122. package/dist/assets/cmaps/KSCpc-EUC-H.bcmap +0 -0
  123. package/dist/assets/cmaps/KSCpc-EUC-V.bcmap +0 -0
  124. package/dist/assets/cmaps/Katakana.bcmap +0 -0
  125. package/dist/assets/cmaps/LICENSE +36 -0
  126. package/dist/assets/cmaps/NWP-H.bcmap +0 -0
  127. package/dist/assets/cmaps/NWP-V.bcmap +0 -0
  128. package/dist/assets/cmaps/RKSJ-H.bcmap +0 -0
  129. package/dist/assets/cmaps/RKSJ-V.bcmap +0 -0
  130. package/dist/assets/cmaps/Roman.bcmap +0 -0
  131. package/dist/assets/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  132. package/dist/assets/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  133. package/dist/assets/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  134. package/dist/assets/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  135. package/dist/assets/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  136. package/dist/assets/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  137. package/dist/assets/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  138. package/dist/assets/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  139. package/dist/assets/cmaps/UniGB-UCS2-H.bcmap +0 -0
  140. package/dist/assets/cmaps/UniGB-UCS2-V.bcmap +0 -0
  141. package/dist/assets/cmaps/UniGB-UTF16-H.bcmap +0 -0
  142. package/dist/assets/cmaps/UniGB-UTF16-V.bcmap +0 -0
  143. package/dist/assets/cmaps/UniGB-UTF32-H.bcmap +0 -0
  144. package/dist/assets/cmaps/UniGB-UTF32-V.bcmap +0 -0
  145. package/dist/assets/cmaps/UniGB-UTF8-H.bcmap +0 -0
  146. package/dist/assets/cmaps/UniGB-UTF8-V.bcmap +0 -0
  147. package/dist/assets/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  148. package/dist/assets/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  149. package/dist/assets/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  150. package/dist/assets/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  151. package/dist/assets/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  152. package/dist/assets/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  153. package/dist/assets/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  154. package/dist/assets/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  155. package/dist/assets/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  156. package/dist/assets/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  157. package/dist/assets/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  158. package/dist/assets/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  159. package/dist/assets/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  160. package/dist/assets/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  161. package/dist/assets/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  162. package/dist/assets/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  163. package/dist/assets/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  164. package/dist/assets/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  165. package/dist/assets/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  166. package/dist/assets/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  167. package/dist/assets/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  168. package/dist/assets/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  169. package/dist/assets/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  170. package/dist/assets/cmaps/UniKS-UCS2-H.bcmap +0 -0
  171. package/dist/assets/cmaps/UniKS-UCS2-V.bcmap +0 -0
  172. package/dist/assets/cmaps/UniKS-UTF16-H.bcmap +0 -0
  173. package/dist/assets/cmaps/UniKS-UTF16-V.bcmap +0 -0
  174. package/dist/assets/cmaps/UniKS-UTF32-H.bcmap +0 -0
  175. package/dist/assets/cmaps/UniKS-UTF32-V.bcmap +0 -0
  176. package/dist/assets/cmaps/UniKS-UTF8-H.bcmap +0 -0
  177. package/dist/assets/cmaps/UniKS-UTF8-V.bcmap +0 -0
  178. package/dist/assets/cmaps/V.bcmap +0 -0
  179. package/dist/assets/cmaps/WP-Symbol.bcmap +0 -0
  180. package/dist/assets/pdf.worker.js +77187 -0
  181. package/dist/assets/standard_fonts/FoxitDingbats.pfb +0 -0
  182. package/dist/assets/standard_fonts/FoxitFixed.pfb +0 -0
  183. package/dist/assets/standard_fonts/FoxitFixedBold.pfb +0 -0
  184. package/dist/assets/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  185. package/dist/assets/standard_fonts/FoxitFixedItalic.pfb +0 -0
  186. package/dist/assets/standard_fonts/FoxitSerif.pfb +0 -0
  187. package/dist/assets/standard_fonts/FoxitSerifBold.pfb +0 -0
  188. package/dist/assets/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  189. package/dist/assets/standard_fonts/FoxitSerifItalic.pfb +0 -0
  190. package/dist/assets/standard_fonts/FoxitSymbol.pfb +0 -0
  191. package/dist/assets/standard_fonts/LICENSE_FOXIT +27 -0
  192. package/dist/assets/standard_fonts/LICENSE_LIBERATION +102 -0
  193. package/dist/assets/standard_fonts/LiberationSans-Bold.ttf +0 -0
  194. package/dist/assets/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  195. package/dist/assets/standard_fonts/LiberationSans-Italic.ttf +0 -0
  196. package/dist/assets/standard_fonts/LiberationSans-Regular.ttf +0 -0
  197. package/dist/assets/xlsx.worker.js +61444 -0
  198. package/dist/core.d.ts +2 -0
  199. package/dist/core.js +3 -0
  200. package/dist/documentAnchor-J7GGLU15.js +69 -0
  201. package/dist/imageFilePreviewPlugin-CYLM2bwR.js +29 -0
  202. package/dist/jszip.min-uwqlc4KL.js +3108 -0
  203. package/dist/react.d.ts +105 -0
  204. package/dist/react.js +3114 -0
  205. package/dist/rolldown-runtime-B-lAHAz2.js +37 -0
  206. package/dist/rotate-ccw-YWx7RzY9.js +36 -0
  207. package/dist/selection-CQPD5a6C.js +47 -0
  208. package/dist/source-DjjzeN4t.d.ts +58 -0
  209. package/dist/source-Rx3etU3y.js +28 -0
  210. package/dist/styles.css +8778 -0
  211. package/dist/styles.js +0 -0
  212. package/dist/touchPinch-C4fl-9fg.js +34 -0
  213. package/dist/useTranslation-DMhY277o.js +7056 -0
  214. package/dist/zoom-out-DLOQGt1e.js +66 -0
  215. package/package.json +69 -3
@@ -0,0 +1,1044 @@
1
+ import { O as useCallbackRef$1, V as useComposedRefs, k as Primitive } from "./useTranslation-DMhY277o.js";
2
+ import * as React$1 from "react";
3
+ import { useState } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.4_@types+react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
6
+ var count = 0;
7
+ var guards = null;
8
+ function useFocusGuards() {
9
+ React$1.useEffect(() => {
10
+ if (!guards) guards = {
11
+ start: createFocusGuard(),
12
+ end: createFocusGuard()
13
+ };
14
+ const { start, end } = guards;
15
+ if (document.body.firstElementChild !== start) document.body.insertAdjacentElement("afterbegin", start);
16
+ if (document.body.lastElementChild !== end) document.body.insertAdjacentElement("beforeend", end);
17
+ count++;
18
+ return () => {
19
+ if (count === 1) {
20
+ guards?.start.remove();
21
+ guards?.end.remove();
22
+ guards = null;
23
+ }
24
+ count = Math.max(0, count - 1);
25
+ };
26
+ }, []);
27
+ }
28
+ function createFocusGuard() {
29
+ const element = document.createElement("span");
30
+ element.setAttribute("data-radix-focus-guard", "");
31
+ element.tabIndex = 0;
32
+ element.style.outline = "none";
33
+ element.style.opacity = "0";
34
+ element.style.position = "fixed";
35
+ element.style.pointerEvents = "none";
36
+ return element;
37
+ }
38
+ //#endregion
39
+ //#region ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.12_@types+react-dom@19.2.3_@types+react@19.2.7__@types+_b22110495742530a214dbc90f70d7adb/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
40
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
41
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
42
+ var EVENT_OPTIONS = {
43
+ bubbles: false,
44
+ cancelable: true
45
+ };
46
+ var FOCUS_SCOPE_NAME = "FocusScope";
47
+ var FocusScope = React$1.forwardRef((props, forwardedRef) => {
48
+ const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
49
+ const [container, setContainer] = React$1.useState(null);
50
+ const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
51
+ const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
52
+ const lastFocusedElementRef = React$1.useRef(null);
53
+ const composedRefs = useComposedRefs(forwardedRef, setContainer);
54
+ const focusScope = React$1.useRef({
55
+ paused: false,
56
+ pause() {
57
+ this.paused = true;
58
+ },
59
+ resume() {
60
+ this.paused = false;
61
+ }
62
+ }).current;
63
+ React$1.useEffect(() => {
64
+ if (trapped) {
65
+ let handleFocusIn2 = function(event) {
66
+ if (focusScope.paused || !container) return;
67
+ const target = event.target;
68
+ if (container.contains(target)) lastFocusedElementRef.current = target;
69
+ else focus(lastFocusedElementRef.current, { select: true });
70
+ }, handleFocusOut2 = function(event) {
71
+ if (focusScope.paused || !container) return;
72
+ const relatedTarget = event.relatedTarget;
73
+ if (relatedTarget === null) return;
74
+ if (!container.contains(relatedTarget)) focus(lastFocusedElementRef.current, { select: true });
75
+ }, handleMutations2 = function(mutations) {
76
+ if (document.activeElement !== document.body) return;
77
+ for (const mutation of mutations) if (mutation.removedNodes.length > 0) focus(container);
78
+ };
79
+ document.addEventListener("focusin", handleFocusIn2);
80
+ document.addEventListener("focusout", handleFocusOut2);
81
+ const mutationObserver = new MutationObserver(handleMutations2);
82
+ if (container) mutationObserver.observe(container, {
83
+ childList: true,
84
+ subtree: true
85
+ });
86
+ return () => {
87
+ document.removeEventListener("focusin", handleFocusIn2);
88
+ document.removeEventListener("focusout", handleFocusOut2);
89
+ mutationObserver.disconnect();
90
+ };
91
+ }
92
+ }, [
93
+ trapped,
94
+ container,
95
+ focusScope.paused
96
+ ]);
97
+ React$1.useEffect(() => {
98
+ if (container) {
99
+ focusScopesStack.add(focusScope);
100
+ const previouslyFocusedElement = document.activeElement;
101
+ if (!container.contains(previouslyFocusedElement)) {
102
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
103
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
104
+ container.dispatchEvent(mountEvent);
105
+ if (!mountEvent.defaultPrevented) {
106
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
107
+ if (document.activeElement === previouslyFocusedElement) focus(container);
108
+ }
109
+ }
110
+ return () => {
111
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
112
+ setTimeout(() => {
113
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
114
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
115
+ container.dispatchEvent(unmountEvent);
116
+ if (!unmountEvent.defaultPrevented) focus(previouslyFocusedElement ?? document.body, { select: true });
117
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
118
+ focusScopesStack.remove(focusScope);
119
+ }, 0);
120
+ };
121
+ }
122
+ }, [
123
+ container,
124
+ onMountAutoFocus,
125
+ onUnmountAutoFocus,
126
+ focusScope
127
+ ]);
128
+ const handleKeyDown = React$1.useCallback((event) => {
129
+ if (!loop && !trapped) return;
130
+ if (focusScope.paused) return;
131
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
132
+ const focusedElement = document.activeElement;
133
+ if (isTabKey && focusedElement) {
134
+ const container2 = event.currentTarget;
135
+ const [first, last] = getTabbableEdges(container2);
136
+ if (!(first && last)) {
137
+ if (focusedElement === container2) event.preventDefault();
138
+ } else if (!event.shiftKey && focusedElement === last) {
139
+ event.preventDefault();
140
+ if (loop) focus(first, { select: true });
141
+ } else if (event.shiftKey && focusedElement === first) {
142
+ event.preventDefault();
143
+ if (loop) focus(last, { select: true });
144
+ }
145
+ }
146
+ }, [
147
+ loop,
148
+ trapped,
149
+ focusScope.paused
150
+ ]);
151
+ return /* @__PURE__ */ jsx(Primitive.div, {
152
+ tabIndex: -1,
153
+ ...scopeProps,
154
+ ref: composedRefs,
155
+ onKeyDown: handleKeyDown
156
+ });
157
+ });
158
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
159
+ function focusFirst(candidates, { select = false } = {}) {
160
+ const previouslyFocusedElement = document.activeElement;
161
+ for (const candidate of candidates) {
162
+ focus(candidate, { select });
163
+ if (document.activeElement !== previouslyFocusedElement) return;
164
+ }
165
+ }
166
+ function getTabbableEdges(container) {
167
+ const candidates = getTabbableCandidates(container);
168
+ return [findVisible(candidates, container), findVisible(candidates.reverse(), container)];
169
+ }
170
+ function getTabbableCandidates(container) {
171
+ const nodes = [];
172
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
173
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
174
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
175
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
176
+ } });
177
+ while (walker.nextNode()) nodes.push(walker.currentNode);
178
+ return nodes;
179
+ }
180
+ function findVisible(elements, container) {
181
+ const canUseCheckVisibility = typeof container.checkVisibility === "function" && container.checkVisibility({ checkVisibilityCSS: true });
182
+ for (const element of elements) if (!(canUseCheckVisibility ? !element.checkVisibility({ checkVisibilityCSS: true }) : isHidden(element, { upTo: container }))) return element;
183
+ }
184
+ function isHidden(node, { upTo }) {
185
+ if (getComputedStyle(node).visibility === "hidden") return true;
186
+ while (node) {
187
+ if (upTo !== void 0 && node === upTo) return false;
188
+ if (getComputedStyle(node).display === "none") return true;
189
+ node = node.parentElement;
190
+ }
191
+ return false;
192
+ }
193
+ function isSelectableInput(element) {
194
+ return element instanceof HTMLInputElement && "select" in element;
195
+ }
196
+ function focus(element, { select = false } = {}) {
197
+ if (element && element.focus) {
198
+ const previouslyFocusedElement = document.activeElement;
199
+ element.focus({ preventScroll: true });
200
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
201
+ }
202
+ }
203
+ var focusScopesStack = createFocusScopesStack();
204
+ function createFocusScopesStack() {
205
+ let stack = [];
206
+ return {
207
+ add(focusScope) {
208
+ const activeFocusScope = stack[0];
209
+ if (focusScope !== activeFocusScope) activeFocusScope?.pause();
210
+ stack = arrayRemove(stack, focusScope);
211
+ stack.unshift(focusScope);
212
+ },
213
+ remove(focusScope) {
214
+ stack = arrayRemove(stack, focusScope);
215
+ stack[0]?.resume();
216
+ }
217
+ };
218
+ }
219
+ function arrayRemove(array, item) {
220
+ const updatedArray = [...array];
221
+ const index = updatedArray.indexOf(item);
222
+ if (index !== -1) updatedArray.splice(index, 1);
223
+ return updatedArray;
224
+ }
225
+ function removeLinks(items) {
226
+ return items.filter((item) => item.tagName !== "A");
227
+ }
228
+ //#endregion
229
+ //#region ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
230
+ var getDefaultParent = function(originalTarget) {
231
+ if (typeof document === "undefined") return null;
232
+ return (Array.isArray(originalTarget) ? originalTarget[0] : originalTarget).ownerDocument.body;
233
+ };
234
+ var counterMap = /* @__PURE__ */ new WeakMap();
235
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
236
+ var markerMap = {};
237
+ var lockCount = 0;
238
+ var unwrapHost = function(node) {
239
+ return node && (node.host || unwrapHost(node.parentNode));
240
+ };
241
+ var correctTargets = function(parent, targets) {
242
+ return targets.map(function(target) {
243
+ if (parent.contains(target)) return target;
244
+ var correctedTarget = unwrapHost(target);
245
+ if (correctedTarget && parent.contains(correctedTarget)) return correctedTarget;
246
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
247
+ return null;
248
+ }).filter(function(x) {
249
+ return Boolean(x);
250
+ });
251
+ };
252
+ /**
253
+ * Marks everything except given node(or nodes) as aria-hidden
254
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
255
+ * @param [parentNode] - top element, defaults to document.body
256
+ * @param {String} [markerName] - a special attribute to mark every node
257
+ * @param {String} [controlAttribute] - html Attribute to control
258
+ * @return {Undo} undo command
259
+ */
260
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
261
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
262
+ if (!markerMap[markerName]) markerMap[markerName] = /* @__PURE__ */ new WeakMap();
263
+ var markerCounter = markerMap[markerName];
264
+ var hiddenNodes = [];
265
+ var elementsToKeep = /* @__PURE__ */ new Set();
266
+ var elementsToStop = new Set(targets);
267
+ var keep = function(el) {
268
+ if (!el || elementsToKeep.has(el)) return;
269
+ elementsToKeep.add(el);
270
+ keep(el.parentNode);
271
+ };
272
+ targets.forEach(keep);
273
+ var deep = function(parent) {
274
+ if (!parent || elementsToStop.has(parent)) return;
275
+ Array.prototype.forEach.call(parent.children, function(node) {
276
+ if (elementsToKeep.has(node)) deep(node);
277
+ else try {
278
+ var attr = node.getAttribute(controlAttribute);
279
+ var alreadyHidden = attr !== null && attr !== "false";
280
+ var counterValue = (counterMap.get(node) || 0) + 1;
281
+ var markerValue = (markerCounter.get(node) || 0) + 1;
282
+ counterMap.set(node, counterValue);
283
+ markerCounter.set(node, markerValue);
284
+ hiddenNodes.push(node);
285
+ if (counterValue === 1 && alreadyHidden) uncontrolledNodes.set(node, true);
286
+ if (markerValue === 1) node.setAttribute(markerName, "true");
287
+ if (!alreadyHidden) node.setAttribute(controlAttribute, "true");
288
+ } catch (e) {
289
+ console.error("aria-hidden: cannot operate on ", node, e);
290
+ }
291
+ });
292
+ };
293
+ deep(parentNode);
294
+ elementsToKeep.clear();
295
+ lockCount++;
296
+ return function() {
297
+ hiddenNodes.forEach(function(node) {
298
+ var counterValue = counterMap.get(node) - 1;
299
+ var markerValue = markerCounter.get(node) - 1;
300
+ counterMap.set(node, counterValue);
301
+ markerCounter.set(node, markerValue);
302
+ if (!counterValue) {
303
+ if (!uncontrolledNodes.has(node)) node.removeAttribute(controlAttribute);
304
+ uncontrolledNodes.delete(node);
305
+ }
306
+ if (!markerValue) node.removeAttribute(markerName);
307
+ });
308
+ lockCount--;
309
+ if (!lockCount) {
310
+ counterMap = /* @__PURE__ */ new WeakMap();
311
+ counterMap = /* @__PURE__ */ new WeakMap();
312
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
313
+ markerMap = {};
314
+ }
315
+ };
316
+ };
317
+ /**
318
+ * Marks everything except given node(or nodes) as aria-hidden
319
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
320
+ * @param [parentNode] - top element, defaults to document.body
321
+ * @param {String} [markerName] - a special attribute to mark every node
322
+ * @return {Undo} undo command
323
+ */
324
+ var hideOthers = function(originalTarget, parentNode, markerName) {
325
+ if (markerName === void 0) markerName = "data-aria-hidden";
326
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
327
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
328
+ if (!activeParentNode) return function() {
329
+ return null;
330
+ };
331
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
332
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
333
+ };
334
+ //#endregion
335
+ //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
336
+ var __assign = function() {
337
+ __assign = Object.assign || function __assign(t) {
338
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
339
+ s = arguments[i];
340
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
341
+ }
342
+ return t;
343
+ };
344
+ return __assign.apply(this, arguments);
345
+ };
346
+ function __rest(s, e) {
347
+ var t = {};
348
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
349
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") {
350
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
351
+ }
352
+ return t;
353
+ }
354
+ function __spreadArray(to, from, pack) {
355
+ if (pack || arguments.length === 2) {
356
+ for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {
357
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
358
+ ar[i] = from[i];
359
+ }
360
+ }
361
+ return to.concat(ar || Array.prototype.slice.call(from));
362
+ }
363
+ //#endregion
364
+ //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
365
+ var zeroRightClassName = "right-scroll-bar-position";
366
+ var fullWidthClassName = "width-before-scroll-bar";
367
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
368
+ /**
369
+ * Name of a CSS variable containing the amount of "hidden" scrollbar
370
+ * ! might be undefined ! use will fallback!
371
+ */
372
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
373
+ //#endregion
374
+ //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.7_react@19.2.3/node_modules/use-callback-ref/dist/es2015/assignRef.js
375
+ /**
376
+ * Assigns a value for a given ref, no matter of the ref format
377
+ * @param {RefObject} ref - a callback function or ref object
378
+ * @param value - a new value
379
+ *
380
+ * @see https://github.com/theKashey/use-callback-ref#assignref
381
+ * @example
382
+ * const refObject = useRef();
383
+ * const refFn = (ref) => {....}
384
+ *
385
+ * assignRef(refObject, "refValue");
386
+ * assignRef(refFn, "refValue");
387
+ */
388
+ function assignRef(ref, value) {
389
+ if (typeof ref === "function") ref(value);
390
+ else if (ref) ref.current = value;
391
+ return ref;
392
+ }
393
+ //#endregion
394
+ //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.7_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useRef.js
395
+ /**
396
+ * creates a MutableRef with ref change callback
397
+ * @param initialValue - initial ref value
398
+ * @param {Function} callback - a callback to run when value changes
399
+ *
400
+ * @example
401
+ * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
402
+ * ref.current = 1;
403
+ * // prints 0 -> 1
404
+ *
405
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
406
+ * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
407
+ * @returns {MutableRefObject}
408
+ */
409
+ function useCallbackRef(initialValue, callback) {
410
+ var ref = useState(function() {
411
+ return {
412
+ value: initialValue,
413
+ callback,
414
+ facade: {
415
+ get current() {
416
+ return ref.value;
417
+ },
418
+ set current(value) {
419
+ var last = ref.value;
420
+ if (last !== value) {
421
+ ref.value = value;
422
+ ref.callback(value, last);
423
+ }
424
+ }
425
+ }
426
+ };
427
+ })[0];
428
+ ref.callback = callback;
429
+ return ref.facade;
430
+ }
431
+ //#endregion
432
+ //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.7_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
433
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React$1.useLayoutEffect : React$1.useEffect;
434
+ var currentValues = /* @__PURE__ */ new WeakMap();
435
+ /**
436
+ * Merges two or more refs together providing a single interface to set their value
437
+ * @param {RefObject|Ref} refs
438
+ * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
439
+ *
440
+ * @see {@link mergeRefs} a version without buit-in memoization
441
+ * @see https://github.com/theKashey/use-callback-ref#usemergerefs
442
+ * @example
443
+ * const Component = React.forwardRef((props, ref) => {
444
+ * const ownRef = useRef();
445
+ * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
446
+ * return <div ref={domRef}>...</div>
447
+ * }
448
+ */
449
+ function useMergeRefs(refs, defaultValue) {
450
+ var callbackRef = useCallbackRef(defaultValue || null, function(newValue) {
451
+ return refs.forEach(function(ref) {
452
+ return assignRef(ref, newValue);
453
+ });
454
+ });
455
+ useIsomorphicLayoutEffect(function() {
456
+ var oldValue = currentValues.get(callbackRef);
457
+ if (oldValue) {
458
+ var prevRefs_1 = new Set(oldValue);
459
+ var nextRefs_1 = new Set(refs);
460
+ var current_1 = callbackRef.current;
461
+ prevRefs_1.forEach(function(ref) {
462
+ if (!nextRefs_1.has(ref)) assignRef(ref, null);
463
+ });
464
+ nextRefs_1.forEach(function(ref) {
465
+ if (!prevRefs_1.has(ref)) assignRef(ref, current_1);
466
+ });
467
+ }
468
+ currentValues.set(callbackRef, refs);
469
+ }, [refs]);
470
+ return callbackRef;
471
+ }
472
+ //#endregion
473
+ //#region ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.7_react@19.2.3/node_modules/use-sidecar/dist/es2015/medium.js
474
+ function ItoI(a) {
475
+ return a;
476
+ }
477
+ function innerCreateMedium(defaults, middleware) {
478
+ if (middleware === void 0) middleware = ItoI;
479
+ var buffer = [];
480
+ var assigned = false;
481
+ return {
482
+ read: function() {
483
+ if (assigned) throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
484
+ if (buffer.length) return buffer[buffer.length - 1];
485
+ return defaults;
486
+ },
487
+ useMedium: function(data) {
488
+ var item = middleware(data, assigned);
489
+ buffer.push(item);
490
+ return function() {
491
+ buffer = buffer.filter(function(x) {
492
+ return x !== item;
493
+ });
494
+ };
495
+ },
496
+ assignSyncMedium: function(cb) {
497
+ assigned = true;
498
+ while (buffer.length) {
499
+ var cbs = buffer;
500
+ buffer = [];
501
+ cbs.forEach(cb);
502
+ }
503
+ buffer = {
504
+ push: function(x) {
505
+ return cb(x);
506
+ },
507
+ filter: function() {
508
+ return buffer;
509
+ }
510
+ };
511
+ },
512
+ assignMedium: function(cb) {
513
+ assigned = true;
514
+ var pendingQueue = [];
515
+ if (buffer.length) {
516
+ var cbs = buffer;
517
+ buffer = [];
518
+ cbs.forEach(cb);
519
+ pendingQueue = buffer;
520
+ }
521
+ var executeQueue = function() {
522
+ var cbs = pendingQueue;
523
+ pendingQueue = [];
524
+ cbs.forEach(cb);
525
+ };
526
+ var cycle = function() {
527
+ return Promise.resolve().then(executeQueue);
528
+ };
529
+ cycle();
530
+ buffer = {
531
+ push: function(x) {
532
+ pendingQueue.push(x);
533
+ cycle();
534
+ },
535
+ filter: function(filter) {
536
+ pendingQueue = pendingQueue.filter(filter);
537
+ return buffer;
538
+ }
539
+ };
540
+ }
541
+ };
542
+ }
543
+ function createSidecarMedium(options) {
544
+ if (options === void 0) options = {};
545
+ var medium = innerCreateMedium(null);
546
+ medium.options = __assign({
547
+ async: true,
548
+ ssr: false
549
+ }, options);
550
+ return medium;
551
+ }
552
+ //#endregion
553
+ //#region ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.7_react@19.2.3/node_modules/use-sidecar/dist/es2015/exports.js
554
+ var SideCar = function(_a) {
555
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
556
+ if (!sideCar) throw new Error("Sidecar: please provide `sideCar` property to import the right car");
557
+ var Target = sideCar.read();
558
+ if (!Target) throw new Error("Sidecar medium not found");
559
+ return React$1.createElement(Target, __assign({}, rest));
560
+ };
561
+ SideCar.isSideCarExport = true;
562
+ function exportSidecar(medium, exported) {
563
+ medium.useMedium(exported);
564
+ return SideCar;
565
+ }
566
+ //#endregion
567
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/medium.js
568
+ var effectCar = createSidecarMedium();
569
+ //#endregion
570
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
571
+ var nothing = function() {};
572
+ /**
573
+ * Removes scrollbar from the page and contain the scroll within the Lock
574
+ */
575
+ var RemoveScroll = React$1.forwardRef(function(props, parentRef) {
576
+ var ref = React$1.useRef(null);
577
+ var _a = React$1.useState({
578
+ onScrollCapture: nothing,
579
+ onWheelCapture: nothing,
580
+ onTouchMoveCapture: nothing
581
+ }), callbacks = _a[0], setCallbacks = _a[1];
582
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, [
583
+ "forwardProps",
584
+ "children",
585
+ "className",
586
+ "removeScrollBar",
587
+ "enabled",
588
+ "shards",
589
+ "sideCar",
590
+ "noRelative",
591
+ "noIsolation",
592
+ "inert",
593
+ "allowPinchZoom",
594
+ "as",
595
+ "gapMode"
596
+ ]);
597
+ var SideCar = sideCar;
598
+ var containerRef = useMergeRefs([ref, parentRef]);
599
+ var containerProps = __assign(__assign({}, rest), callbacks);
600
+ return React$1.createElement(React$1.Fragment, null, enabled && React$1.createElement(SideCar, {
601
+ sideCar: effectCar,
602
+ removeScrollBar,
603
+ shards,
604
+ noRelative,
605
+ noIsolation,
606
+ inert,
607
+ setCallbacks,
608
+ allowPinchZoom: !!allowPinchZoom,
609
+ lockRef: ref,
610
+ gapMode
611
+ }), forwardProps ? React$1.cloneElement(React$1.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React$1.createElement(Container, __assign({}, containerProps, {
612
+ className,
613
+ ref: containerRef
614
+ }), children));
615
+ });
616
+ RemoveScroll.defaultProps = {
617
+ enabled: true,
618
+ removeScrollBar: true,
619
+ inert: false
620
+ };
621
+ RemoveScroll.classNames = {
622
+ fullWidth: fullWidthClassName,
623
+ zeroRight: zeroRightClassName
624
+ };
625
+ var getNonce = function() {
626
+ if (typeof __webpack_nonce__ !== "undefined") return __webpack_nonce__;
627
+ };
628
+ //#endregion
629
+ //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.7_react@19.2.3/node_modules/react-style-singleton/dist/es2015/singleton.js
630
+ function makeStyleTag() {
631
+ if (!document) return null;
632
+ var tag = document.createElement("style");
633
+ tag.type = "text/css";
634
+ var nonce = getNonce();
635
+ if (nonce) tag.setAttribute("nonce", nonce);
636
+ return tag;
637
+ }
638
+ function injectStyles(tag, css) {
639
+ if (tag.styleSheet) tag.styleSheet.cssText = css;
640
+ else tag.appendChild(document.createTextNode(css));
641
+ }
642
+ function insertStyleTag(tag) {
643
+ (document.head || document.getElementsByTagName("head")[0]).appendChild(tag);
644
+ }
645
+ var stylesheetSingleton = function() {
646
+ var counter = 0;
647
+ var stylesheet = null;
648
+ return {
649
+ add: function(style) {
650
+ if (counter == 0) {
651
+ if (stylesheet = makeStyleTag()) {
652
+ injectStyles(stylesheet, style);
653
+ insertStyleTag(stylesheet);
654
+ }
655
+ }
656
+ counter++;
657
+ },
658
+ remove: function() {
659
+ counter--;
660
+ if (!counter && stylesheet) {
661
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
662
+ stylesheet = null;
663
+ }
664
+ }
665
+ };
666
+ };
667
+ //#endregion
668
+ //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.7_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
669
+ /**
670
+ * creates a hook to control style singleton
671
+ * @see {@link styleSingleton} for a safer component version
672
+ * @example
673
+ * ```tsx
674
+ * const useStyle = styleHookSingleton();
675
+ * ///
676
+ * useStyle('body { overflow: hidden}');
677
+ */
678
+ var styleHookSingleton = function() {
679
+ var sheet = stylesheetSingleton();
680
+ return function(styles, isDynamic) {
681
+ React$1.useEffect(function() {
682
+ sheet.add(styles);
683
+ return function() {
684
+ sheet.remove();
685
+ };
686
+ }, [styles && isDynamic]);
687
+ };
688
+ };
689
+ //#endregion
690
+ //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.7_react@19.2.3/node_modules/react-style-singleton/dist/es2015/component.js
691
+ /**
692
+ * create a Component to add styles on demand
693
+ * - styles are added when first instance is mounted
694
+ * - styles are removed when the last instance is unmounted
695
+ * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
696
+ */
697
+ var styleSingleton = function() {
698
+ var useStyle = styleHookSingleton();
699
+ var Sheet = function(_a) {
700
+ var styles = _a.styles, dynamic = _a.dynamic;
701
+ useStyle(styles, dynamic);
702
+ return null;
703
+ };
704
+ return Sheet;
705
+ };
706
+ //#endregion
707
+ //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
708
+ var zeroGap = {
709
+ left: 0,
710
+ top: 0,
711
+ right: 0,
712
+ gap: 0
713
+ };
714
+ var parse = function(x) {
715
+ return parseInt(x || "", 10) || 0;
716
+ };
717
+ var getOffset = function(gapMode) {
718
+ var cs = window.getComputedStyle(document.body);
719
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
720
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
721
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
722
+ return [
723
+ parse(left),
724
+ parse(top),
725
+ parse(right)
726
+ ];
727
+ };
728
+ var getGapWidth = function(gapMode) {
729
+ if (gapMode === void 0) gapMode = "margin";
730
+ if (typeof window === "undefined") return zeroGap;
731
+ var offsets = getOffset(gapMode);
732
+ var documentWidth = document.documentElement.clientWidth;
733
+ var windowWidth = window.innerWidth;
734
+ return {
735
+ left: offsets[0],
736
+ top: offsets[1],
737
+ right: offsets[2],
738
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
739
+ };
740
+ };
741
+ //#endregion
742
+ //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
743
+ var Style = styleSingleton();
744
+ var lockAttribute = "data-scroll-locked";
745
+ var getStyles = function(_a, allowRelative, gapMode, important) {
746
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
747
+ if (gapMode === void 0) gapMode = "margin";
748
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
749
+ allowRelative && "position: relative ".concat(important, ";"),
750
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
751
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
752
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
753
+ };
754
+ var getCurrentUseCounter = function() {
755
+ var counter = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
756
+ return isFinite(counter) ? counter : 0;
757
+ };
758
+ var useLockAttribute = function() {
759
+ React$1.useEffect(function() {
760
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
761
+ return function() {
762
+ var newCounter = getCurrentUseCounter() - 1;
763
+ if (newCounter <= 0) document.body.removeAttribute(lockAttribute);
764
+ else document.body.setAttribute(lockAttribute, newCounter.toString());
765
+ };
766
+ }, []);
767
+ };
768
+ /**
769
+ * Removes page scrollbar and blocks page scroll when mounted
770
+ */
771
+ var RemoveScrollBar = function(_a) {
772
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
773
+ useLockAttribute();
774
+ var gap = React$1.useMemo(function() {
775
+ return getGapWidth(gapMode);
776
+ }, [gapMode]);
777
+ return React$1.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
778
+ };
779
+ //#endregion
780
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
781
+ var passiveSupported = false;
782
+ if (typeof window !== "undefined") try {
783
+ var options = Object.defineProperty({}, "passive", { get: function() {
784
+ passiveSupported = true;
785
+ return true;
786
+ } });
787
+ window.addEventListener("test", options, options);
788
+ window.removeEventListener("test", options, options);
789
+ } catch (err) {
790
+ passiveSupported = false;
791
+ }
792
+ var nonPassive = passiveSupported ? { passive: false } : false;
793
+ //#endregion
794
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
795
+ var alwaysContainsScroll = function(node) {
796
+ return node.tagName === "TEXTAREA";
797
+ };
798
+ var elementCanBeScrolled = function(node, overflow) {
799
+ if (!(node instanceof Element)) return false;
800
+ var styles = window.getComputedStyle(node);
801
+ return styles[overflow] !== "hidden" && !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible");
802
+ };
803
+ var elementCouldBeVScrolled = function(node) {
804
+ return elementCanBeScrolled(node, "overflowY");
805
+ };
806
+ var elementCouldBeHScrolled = function(node) {
807
+ return elementCanBeScrolled(node, "overflowX");
808
+ };
809
+ var locationCouldBeScrolled = function(axis, node) {
810
+ var ownerDocument = node.ownerDocument;
811
+ var current = node;
812
+ do {
813
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) current = current.host;
814
+ if (elementCouldBeScrolled(axis, current)) {
815
+ var _a = getScrollVariables(axis, current);
816
+ if (_a[1] > _a[2]) return true;
817
+ }
818
+ current = current.parentNode;
819
+ } while (current && current !== ownerDocument.body);
820
+ return false;
821
+ };
822
+ var getVScrollVariables = function(_a) {
823
+ return [
824
+ _a.scrollTop,
825
+ _a.scrollHeight,
826
+ _a.clientHeight
827
+ ];
828
+ };
829
+ var getHScrollVariables = function(_a) {
830
+ return [
831
+ _a.scrollLeft,
832
+ _a.scrollWidth,
833
+ _a.clientWidth
834
+ ];
835
+ };
836
+ var elementCouldBeScrolled = function(axis, node) {
837
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
838
+ };
839
+ var getScrollVariables = function(axis, node) {
840
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
841
+ };
842
+ var getDirectionFactor = function(axis, direction) {
843
+ /**
844
+ * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
845
+ * and then increasingly negative as you scroll towards the end of the content.
846
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
847
+ */
848
+ return axis === "h" && direction === "rtl" ? -1 : 1;
849
+ };
850
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
851
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
852
+ var delta = directionFactor * sourceDelta;
853
+ var target = event.target;
854
+ var targetInLock = endTarget.contains(target);
855
+ var shouldCancelScroll = false;
856
+ var isDeltaPositive = delta > 0;
857
+ var availableScroll = 0;
858
+ var availableScrollTop = 0;
859
+ do {
860
+ if (!target) break;
861
+ var _a = getScrollVariables(axis, target), position = _a[0];
862
+ var elementScroll = _a[1] - _a[2] - directionFactor * position;
863
+ if (position || elementScroll) {
864
+ if (elementCouldBeScrolled(axis, target)) {
865
+ availableScroll += elementScroll;
866
+ availableScrollTop += position;
867
+ }
868
+ }
869
+ var parent_1 = target.parentNode;
870
+ target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
871
+ } while (!targetInLock && target !== document.body || targetInLock && (endTarget.contains(target) || endTarget === target));
872
+ if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) shouldCancelScroll = true;
873
+ else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) shouldCancelScroll = true;
874
+ return shouldCancelScroll;
875
+ };
876
+ //#endregion
877
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
878
+ var getTouchXY = function(event) {
879
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
880
+ };
881
+ var getDeltaXY = function(event) {
882
+ return [event.deltaX, event.deltaY];
883
+ };
884
+ var extractRef = function(ref) {
885
+ return ref && "current" in ref ? ref.current : ref;
886
+ };
887
+ var deltaCompare = function(x, y) {
888
+ return x[0] === y[0] && x[1] === y[1];
889
+ };
890
+ var generateStyle = function(id) {
891
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
892
+ };
893
+ var idCounter = 0;
894
+ var lockStack = [];
895
+ function RemoveScrollSideCar(props) {
896
+ var shouldPreventQueue = React$1.useRef([]);
897
+ var touchStartRef = React$1.useRef([0, 0]);
898
+ var activeAxis = React$1.useRef();
899
+ var id = React$1.useState(idCounter++)[0];
900
+ var Style = React$1.useState(styleSingleton)[0];
901
+ var lastProps = React$1.useRef(props);
902
+ React$1.useEffect(function() {
903
+ lastProps.current = props;
904
+ }, [props]);
905
+ React$1.useEffect(function() {
906
+ if (props.inert) {
907
+ document.body.classList.add("block-interactivity-".concat(id));
908
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
909
+ allow_1.forEach(function(el) {
910
+ return el.classList.add("allow-interactivity-".concat(id));
911
+ });
912
+ return function() {
913
+ document.body.classList.remove("block-interactivity-".concat(id));
914
+ allow_1.forEach(function(el) {
915
+ return el.classList.remove("allow-interactivity-".concat(id));
916
+ });
917
+ };
918
+ }
919
+ }, [
920
+ props.inert,
921
+ props.lockRef.current,
922
+ props.shards
923
+ ]);
924
+ var shouldCancelEvent = React$1.useCallback(function(event, parent) {
925
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
926
+ var touch = getTouchXY(event);
927
+ var touchStart = touchStartRef.current;
928
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
929
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
930
+ var currentAxis;
931
+ var target = event.target;
932
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
933
+ if ("touches" in event && moveDirection === "h" && target.type === "range") return false;
934
+ var selection = window.getSelection();
935
+ var anchorNode = selection && selection.anchorNode;
936
+ if (anchorNode ? anchorNode === target || anchorNode.contains(target) : false) return false;
937
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
938
+ if (!canBeScrolledInMainDirection) return true;
939
+ if (canBeScrolledInMainDirection) currentAxis = moveDirection;
940
+ else {
941
+ currentAxis = moveDirection === "v" ? "h" : "v";
942
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
943
+ }
944
+ if (!canBeScrolledInMainDirection) return false;
945
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) activeAxis.current = currentAxis;
946
+ if (!currentAxis) return true;
947
+ var cancelingAxis = activeAxis.current || currentAxis;
948
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
949
+ }, []);
950
+ var shouldPrevent = React$1.useCallback(function(_event) {
951
+ var event = _event;
952
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) return;
953
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
954
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
955
+ return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
956
+ })[0];
957
+ if (sourceEvent && sourceEvent.should) {
958
+ if (event.cancelable) event.preventDefault();
959
+ return;
960
+ }
961
+ if (!sourceEvent) {
962
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
963
+ return node.contains(event.target);
964
+ });
965
+ if (shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation) {
966
+ if (event.cancelable) event.preventDefault();
967
+ }
968
+ }
969
+ }, []);
970
+ var shouldCancel = React$1.useCallback(function(name, delta, target, should) {
971
+ var event = {
972
+ name,
973
+ delta,
974
+ target,
975
+ should,
976
+ shadowParent: getOutermostShadowParent(target)
977
+ };
978
+ shouldPreventQueue.current.push(event);
979
+ setTimeout(function() {
980
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
981
+ return e !== event;
982
+ });
983
+ }, 1);
984
+ }, []);
985
+ var scrollTouchStart = React$1.useCallback(function(event) {
986
+ touchStartRef.current = getTouchXY(event);
987
+ activeAxis.current = void 0;
988
+ }, []);
989
+ var scrollWheel = React$1.useCallback(function(event) {
990
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
991
+ }, []);
992
+ var scrollTouchMove = React$1.useCallback(function(event) {
993
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
994
+ }, []);
995
+ React$1.useEffect(function() {
996
+ lockStack.push(Style);
997
+ props.setCallbacks({
998
+ onScrollCapture: scrollWheel,
999
+ onWheelCapture: scrollWheel,
1000
+ onTouchMoveCapture: scrollTouchMove
1001
+ });
1002
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
1003
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
1004
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1005
+ return function() {
1006
+ lockStack = lockStack.filter(function(inst) {
1007
+ return inst !== Style;
1008
+ });
1009
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
1010
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1011
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1012
+ };
1013
+ }, []);
1014
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
1015
+ return React$1.createElement(React$1.Fragment, null, inert ? React$1.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? React$1.createElement(RemoveScrollBar, {
1016
+ noRelative: props.noRelative,
1017
+ gapMode: props.gapMode
1018
+ }) : null);
1019
+ }
1020
+ function getOutermostShadowParent(node) {
1021
+ var shadowParent = null;
1022
+ while (node !== null) {
1023
+ if (node instanceof ShadowRoot) {
1024
+ shadowParent = node.host;
1025
+ node = node.host;
1026
+ }
1027
+ node = node.parentNode;
1028
+ }
1029
+ return shadowParent;
1030
+ }
1031
+ //#endregion
1032
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/sidecar.js
1033
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1034
+ //#endregion
1035
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.7_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
1036
+ var ReactRemoveScroll = React$1.forwardRef(function(props, ref) {
1037
+ return React$1.createElement(RemoveScroll, __assign({}, props, {
1038
+ ref,
1039
+ sideCar: sidecar_default
1040
+ }));
1041
+ });
1042
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
1043
+ //#endregion
1044
+ export { useFocusGuards as i, hideOthers as n, FocusScope as r, ReactRemoveScroll as t };