@react-pdf-kit/viewer 2.0.0-beta.8 → 2.0.0-rc.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 (196) hide show
  1. package/dist/Combination-136ff99c.js +698 -0
  2. package/dist/MostPageTool.module-13578ad6.js +6 -0
  3. package/dist/OtherTool.module-a4be5f1f.js +6 -0
  4. package/dist/Paginate.module-4eef00aa.js +8 -0
  5. package/dist/PaginationContext-9217cab4.js +201 -0
  6. package/dist/RPLayout.module-b4b23e29.js +14 -0
  7. package/dist/RPSplitter-f6acf13b.js +71 -0
  8. package/dist/RPToolbar.module-27d7fe77.js +10 -0
  9. package/dist/SearchTool.module-99f60dc7.js +16 -0
  10. package/dist/ToolbarLayout.module-6e339802.js +12 -0
  11. package/dist/ZoomTool.module-7082af8c.js +12 -0
  12. package/dist/assets/style.css +1 -1
  13. package/dist/assets/style.js +32 -30
  14. package/dist/components/RPController.js +81 -152
  15. package/dist/components/RPDropFileZone.js +1 -1
  16. package/dist/components/RPPages.js +1028 -122
  17. package/dist/components/RPProvider.js +57 -113
  18. package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
  19. package/dist/components/layout/LayoutContainer.js +31 -136
  20. package/dist/components/layout/LayoutWrapper.js +8 -4
  21. package/dist/components/layout/RPDefaultLayout.js +184 -86
  22. package/dist/components/layout/RPLayout.js +123 -105
  23. package/dist/components/layout/SkipLink.js +29 -0
  24. package/dist/components/layout/WrapperLayout.js +1 -1
  25. package/dist/components/layout/sidebar/RPSidebar.js +79 -112
  26. package/dist/components/layout/sidebar/RPSplitter.js +6 -59
  27. package/dist/components/layout/sidebar/Thumbnail.js +130 -125
  28. package/dist/components/layout/sidebar/Thumbnails.js +56 -119
  29. package/dist/components/layout/toolbar/DarkModeTool.js +7 -5
  30. package/dist/components/layout/toolbar/DocumentDialog.js +305 -131
  31. package/dist/components/layout/toolbar/DocumentProperties.js +13 -10
  32. package/dist/components/layout/toolbar/FileDownloadTool.js +34 -124
  33. package/dist/components/layout/toolbar/FileUploadTool.js +9 -6
  34. package/dist/components/layout/toolbar/FullScreenTool.js +17 -14
  35. package/dist/components/layout/toolbar/MenuItem.js +11 -8
  36. package/dist/components/layout/toolbar/MenuSeparator.js +8 -5
  37. package/dist/components/layout/toolbar/MostPageTool.js +66 -125
  38. package/dist/components/layout/toolbar/OtherTool.js +171 -112
  39. package/dist/components/layout/toolbar/Paginate.js +121 -116
  40. package/dist/components/layout/toolbar/PrintTool.js +55 -123
  41. package/dist/components/layout/toolbar/RPMenuItem.js +14 -11
  42. package/dist/components/layout/toolbar/RPMoreOptions.js +102 -154
  43. package/dist/components/layout/toolbar/RPToolbar.js +90 -79
  44. package/dist/components/layout/toolbar/RPToolbarEnd.js +69 -88
  45. package/dist/components/layout/toolbar/RotateTool.js +13 -10
  46. package/dist/components/layout/toolbar/ScrollModeTool.js +42 -39
  47. package/dist/components/layout/toolbar/SearchCloseButton.js +24 -10
  48. package/dist/components/layout/toolbar/SearchResultNavigator.js +74 -105
  49. package/dist/components/layout/toolbar/SearchTool.js +245 -121
  50. package/dist/components/layout/toolbar/SelectionModeTool.js +9 -6
  51. package/dist/components/layout/toolbar/ThumbnailTool.js +15 -122
  52. package/dist/components/layout/toolbar/ToolbarCustom.js +75 -143
  53. package/dist/components/layout/toolbar/ToolbarDefault.js +135 -122
  54. package/dist/components/layout/toolbar/ToolbarLayout.js +86 -81
  55. package/dist/components/layout/toolbar/ViewModeTool.js +47 -35
  56. package/dist/components/layout/toolbar/ZoomTool.js +129 -119
  57. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +18 -122
  58. package/dist/components/layout/toolbar/tools/DualPageTool.js +11 -129
  59. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +202 -0
  60. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +14 -123
  61. package/dist/components/layout/toolbar/tools/FileUploadTool.js +10 -8
  62. package/dist/components/layout/toolbar/tools/FirstPageTool.js +197 -0
  63. package/dist/components/layout/toolbar/tools/FullScreenTool.js +21 -18
  64. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
  65. package/dist/components/layout/toolbar/tools/InputPageTool.js +52 -136
  66. package/dist/components/layout/toolbar/tools/LastPageTool.js +197 -0
  67. package/dist/components/layout/toolbar/tools/NextPageTool.js +39 -129
  68. package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
  69. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +28 -118
  70. package/dist/components/layout/toolbar/tools/PrintTool.js +14 -123
  71. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +18 -9
  72. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +15 -13
  73. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +24 -14
  74. package/dist/components/layout/toolbar/tools/SinglePageTool.js +11 -129
  75. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +16 -6
  76. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +23 -131
  77. package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
  78. package/dist/components/layout/toolbar/tools/ZoomInTool.js +21 -18
  79. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +23 -136
  80. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +80 -141
  81. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +18 -15
  82. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +98 -105
  83. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -123
  84. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +17 -14
  85. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +29 -127
  86. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +31 -130
  87. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +28 -17
  88. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +63 -134
  89. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +33 -131
  90. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +41 -24
  91. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +58 -37
  92. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +44 -25
  93. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +56 -30
  94. package/dist/components/page/AnnotationLayer.js +130 -125
  95. package/dist/components/page/CanvasLayer.js +57 -126
  96. package/dist/components/page/CustomElement.js +1 -1
  97. package/dist/components/page/DualPage.js +69 -110
  98. package/dist/components/page/DualPageWithCover.js +131 -0
  99. package/dist/components/page/RPPage.js +126 -123
  100. package/dist/components/page/SinglePage.js +59 -110
  101. package/dist/components/page/TextHighlightLayer.js +187 -129
  102. package/dist/components/page/TextLayer.js +186 -125
  103. package/dist/components/ui/Button.js +14 -12
  104. package/dist/components/ui/Checkbox.js +78 -70
  105. package/dist/components/ui/DropDown.js +11 -8
  106. package/dist/components/ui/Input.js +12 -11
  107. package/dist/components/ui/LoadingIndicator.js +34 -127
  108. package/dist/components/ui/PasswordModal.js +44 -30
  109. package/dist/components/ui/RPTooltip.js +121 -135
  110. package/dist/contexts/DimensionPagesContext.js +1 -1
  111. package/dist/contexts/DropFileZoneContext.js +1 -1
  112. package/dist/contexts/ElementPageContext.js +1 -1
  113. package/dist/contexts/EventCallbackContext.js +12 -8
  114. package/dist/contexts/FileInputContext.js +1 -1
  115. package/dist/contexts/FullScreenContext.js +17 -10
  116. package/dist/contexts/HighlightContext.js +1 -1
  117. package/dist/contexts/LocalizationContext.js +25 -30
  118. package/dist/contexts/PagesRotateContext.js +1 -1
  119. package/dist/contexts/PaginationContext.js +15 -118
  120. package/dist/contexts/PrintContext.js +67 -131
  121. package/dist/contexts/RPDocumentContext.js +8 -8
  122. package/dist/contexts/RenderQueueProvider.js +48 -118
  123. package/dist/contexts/RotationContext.js +1 -1
  124. package/dist/contexts/ScrollModeContext.js +1 -1
  125. package/dist/contexts/SearchContext.js +66 -112
  126. package/dist/contexts/SelectionModeContext.js +1 -1
  127. package/dist/contexts/ThumbnailsContext.js +32 -131
  128. package/dist/contexts/ViewModeContext.js +19 -15
  129. package/dist/contexts/ZoomContext.js +23 -23
  130. package/dist/de_DE-a553b162.js +489 -0
  131. package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
  132. package/dist/index-61f59539.js +1198 -0
  133. package/dist/index-655864a7.js +27 -0
  134. package/dist/{index-c9a2990a.js → index-c0faa594.js} +64 -87
  135. package/dist/index-e3ee9457.js +150 -0
  136. package/dist/main.js +193 -130
  137. package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
  138. package/dist/types/components/layout/LayoutContainer.d.ts +1 -5
  139. package/dist/types/components/layout/LayoutWrapper.d.ts +1 -5
  140. package/dist/types/components/layout/SkipLink.d.ts +7 -0
  141. package/dist/types/components/layout/sidebar/Thumbnails.d.ts +1 -3
  142. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -3
  143. package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
  144. package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
  145. package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
  146. package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
  147. package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
  148. package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
  149. package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
  150. package/dist/types/components/page/RPPage.d.ts +1 -3
  151. package/dist/types/components/ui/Button.d.ts +1 -3
  152. package/dist/types/components/ui/Checkbox.d.ts +1 -0
  153. package/dist/types/components/ui/Input.d.ts +1 -3
  154. package/dist/types/components/ui/RPTooltip.d.ts +1 -3
  155. package/dist/types/locales/de_DE.json.d.ts +83 -0
  156. package/dist/types/locales/en_US.json.d.ts +2 -0
  157. package/dist/types/locales/it_IT.json.d.ts +2 -0
  158. package/dist/types/locales/pt_PT.json.d.ts +2 -0
  159. package/dist/types/locales/th_TH.json.d.ts +2 -0
  160. package/dist/types/locales/zh_CN.json.d.ts +2 -0
  161. package/dist/types/main.d.ts +8 -2
  162. package/dist/types/utils/annotations.d.ts +10 -1
  163. package/dist/types/utils/calculatePage.d.ts +3 -3
  164. package/dist/types/utils/hooks/usePresentPage.d.ts +2 -1
  165. package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
  166. package/dist/types/utils/types.d.ts +34 -3
  167. package/dist/types/utils/withRef.d.ts +5 -4
  168. package/dist/utils/annotations.js +145 -150
  169. package/dist/utils/calculatePage.js +17 -11
  170. package/dist/utils/getZoomLevel.js +9 -9
  171. package/dist/utils/highlight.js +139 -139
  172. package/dist/utils/hooks/useFileDownload.js +23 -130
  173. package/dist/utils/hooks/useHighlight.js +28 -28
  174. package/dist/utils/hooks/useLicense.js +1 -1
  175. package/dist/utils/hooks/useLoadPdf.js +1 -1
  176. package/dist/utils/hooks/useLocalization.js +17 -16
  177. package/dist/utils/hooks/usePageRotateContext.js +1 -1
  178. package/dist/utils/hooks/usePaginate.js +23 -126
  179. package/dist/utils/hooks/usePinch.js +1 -1
  180. package/dist/utils/hooks/usePresentPage.js +79 -129
  181. package/dist/utils/hooks/usePrint.js +175 -130
  182. package/dist/utils/hooks/useRotate.js +1 -1
  183. package/dist/utils/hooks/useScrollToPage.js +18 -121
  184. package/dist/utils/hooks/useSearch.js +149 -127
  185. package/dist/utils/hooks/useTextSelection.js +76 -0
  186. package/dist/utils/hooks/useThumbnail.js +50 -131
  187. package/dist/utils/hooks/useVirtualReactWindow.js +84 -128
  188. package/dist/utils/types.js +14 -13
  189. package/dist/utils/withRef.js +5 -5
  190. package/package.json +5 -4
  191. package/dist/LayoutWrapper-6224491f.js +0 -19
  192. package/dist/SearchCloseButton-08d57275.js +0 -33
  193. package/dist/ToolbarLayout.module-0aa7a2aa.js +0 -3557
  194. package/dist/floating-ui.react-dom-d22a10b4.js +0 -1474
  195. package/dist/index-3bf64864.js +0 -1886
  196. package/dist/th_TH-d627cd51.js +0 -398
@@ -0,0 +1,698 @@
1
+ import * as u from "react";
2
+ import { useState as ye } from "react";
3
+ import be from "react-dom";
4
+ import { u as Ee, P as ce, a as Se } from "./index-c0faa594.js";
5
+ import { jsx as ue } from "react/jsx-runtime";
6
+ import { a as z } from "./index-e3ee9457.js";
7
+ var we = "Portal", Ce = u.forwardRef((e, t) => {
8
+ var a;
9
+ const { container: n, ...r } = e, [c, i] = u.useState(!1);
10
+ Ee(() => i(!0), []);
11
+ const l = n || c && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
12
+ return l ? be.createPortal(/* @__PURE__ */ ue(ce.div, { ...r, ref: t }), l) : null;
13
+ });
14
+ Ce.displayName = we;
15
+ var _ = 0;
16
+ function wt() {
17
+ u.useEffect(() => {
18
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
19
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Z()), document.body.insertAdjacentElement("beforeend", e[1] ?? Z()), _++, () => {
20
+ _ === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _--;
21
+ };
22
+ }, []);
23
+ }
24
+ function Z() {
25
+ const e = document.createElement("span");
26
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
27
+ }
28
+ var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q = { bubbles: !1, cancelable: !0 }, Re = "FocusScope", Ae = u.forwardRef((e, t) => {
29
+ const {
30
+ loop: n = !1,
31
+ trapped: r = !1,
32
+ onMountAutoFocus: c,
33
+ onUnmountAutoFocus: i,
34
+ ...l
35
+ } = e, [a, S] = u.useState(null), b = z(c), g = z(i), f = u.useRef(null), v = Se(t, (o) => S(o)), h = u.useRef({
36
+ paused: !1,
37
+ pause() {
38
+ this.paused = !0;
39
+ },
40
+ resume() {
41
+ this.paused = !1;
42
+ }
43
+ }).current;
44
+ u.useEffect(() => {
45
+ if (r) {
46
+ let o = function(p) {
47
+ if (h.paused || !a)
48
+ return;
49
+ const y = p.target;
50
+ a.contains(y) ? f.current = y : A(f.current, { select: !0 });
51
+ }, s = function(p) {
52
+ if (h.paused || !a)
53
+ return;
54
+ const y = p.relatedTarget;
55
+ y !== null && (a.contains(y) || A(f.current, { select: !0 }));
56
+ }, d = function(p) {
57
+ if (document.activeElement === document.body)
58
+ for (const E of p)
59
+ E.removedNodes.length > 0 && A(a);
60
+ };
61
+ document.addEventListener("focusin", o), document.addEventListener("focusout", s);
62
+ const m = new MutationObserver(d);
63
+ return a && m.observe(a, { childList: !0, subtree: !0 }), () => {
64
+ document.removeEventListener("focusin", o), document.removeEventListener("focusout", s), m.disconnect();
65
+ };
66
+ }
67
+ }, [r, a, h.paused]), u.useEffect(() => {
68
+ if (a) {
69
+ $.add(h);
70
+ const o = document.activeElement;
71
+ if (!a.contains(o)) {
72
+ const d = new CustomEvent(U, q);
73
+ a.addEventListener(U, b), a.dispatchEvent(d), d.defaultPrevented || (Te(Fe(ie(a)), { select: !0 }), document.activeElement === o && A(a));
74
+ }
75
+ return () => {
76
+ a.removeEventListener(U, b), setTimeout(() => {
77
+ const d = new CustomEvent(j, q);
78
+ a.addEventListener(j, g), a.dispatchEvent(d), d.defaultPrevented || A(o ?? document.body, { select: !0 }), a.removeEventListener(j, g), $.remove(h);
79
+ }, 0);
80
+ };
81
+ }
82
+ }, [a, b, g, h]);
83
+ const w = u.useCallback(
84
+ (o) => {
85
+ if (!n && !r || h.paused)
86
+ return;
87
+ const s = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
88
+ if (s && d) {
89
+ const m = o.currentTarget, [p, y] = ke(m);
90
+ p && y ? !o.shiftKey && d === y ? (o.preventDefault(), n && A(p, { select: !0 })) : o.shiftKey && d === p && (o.preventDefault(), n && A(y, { select: !0 })) : d === m && o.preventDefault();
91
+ }
92
+ },
93
+ [n, r, h.paused]
94
+ );
95
+ return /* @__PURE__ */ ue(ce.div, { tabIndex: -1, ...l, ref: v, onKeyDown: w });
96
+ });
97
+ Ae.displayName = Re;
98
+ function Te(e, { select: t = !1 } = {}) {
99
+ const n = document.activeElement;
100
+ for (const r of e)
101
+ if (A(r, { select: t }), document.activeElement !== n)
102
+ return;
103
+ }
104
+ function ke(e) {
105
+ const t = ie(e), n = Q(t, e), r = Q(t.reverse(), e);
106
+ return [n, r];
107
+ }
108
+ function ie(e) {
109
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
110
+ acceptNode: (r) => {
111
+ const c = r.tagName === "INPUT" && r.type === "hidden";
112
+ return r.disabled || r.hidden || c ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
113
+ }
114
+ });
115
+ for (; n.nextNode(); )
116
+ t.push(n.currentNode);
117
+ return t;
118
+ }
119
+ function Q(e, t) {
120
+ for (const n of e)
121
+ if (!Pe(n, { upTo: t }))
122
+ return n;
123
+ }
124
+ function Pe(e, { upTo: t }) {
125
+ if (getComputedStyle(e).visibility === "hidden")
126
+ return !0;
127
+ for (; e; ) {
128
+ if (t !== void 0 && e === t)
129
+ return !1;
130
+ if (getComputedStyle(e).display === "none")
131
+ return !0;
132
+ e = e.parentElement;
133
+ }
134
+ return !1;
135
+ }
136
+ function Me(e) {
137
+ return e instanceof HTMLInputElement && "select" in e;
138
+ }
139
+ function A(e, { select: t = !1 } = {}) {
140
+ if (e && e.focus) {
141
+ const n = document.activeElement;
142
+ e.focus({ preventScroll: !0 }), e !== n && Me(e) && t && e.select();
143
+ }
144
+ }
145
+ var $ = Ne();
146
+ function Ne() {
147
+ let e = [];
148
+ return {
149
+ add(t) {
150
+ const n = e[0];
151
+ t !== n && (n == null || n.pause()), e = J(e, t), e.unshift(t);
152
+ },
153
+ remove(t) {
154
+ var n;
155
+ e = J(e, t), (n = e[0]) == null || n.resume();
156
+ }
157
+ };
158
+ }
159
+ function J(e, t) {
160
+ const n = [...e], r = n.indexOf(t);
161
+ return r !== -1 && n.splice(r, 1), n;
162
+ }
163
+ function Fe(e) {
164
+ return e.filter((t) => t.tagName !== "A");
165
+ }
166
+ var Le = function(e) {
167
+ if (typeof document > "u")
168
+ return null;
169
+ var t = Array.isArray(e) ? e[0] : e;
170
+ return t.ownerDocument.body;
171
+ }, k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {}, K = 0, le = function(e) {
172
+ return e && (e.host || le(e.parentNode));
173
+ }, Oe = function(e, t) {
174
+ return t.map(function(n) {
175
+ if (e.contains(n))
176
+ return n;
177
+ var r = le(n);
178
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
179
+ }).filter(function(n) {
180
+ return !!n;
181
+ });
182
+ }, Ie = function(e, t, n, r) {
183
+ var c = Oe(t, Array.isArray(e) ? e : [e]);
184
+ O[n] || (O[n] = /* @__PURE__ */ new WeakMap());
185
+ var i = O[n], l = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
186
+ !f || a.has(f) || (a.add(f), b(f.parentNode));
187
+ };
188
+ c.forEach(b);
189
+ var g = function(f) {
190
+ !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
191
+ if (a.has(v))
192
+ g(v);
193
+ else
194
+ try {
195
+ var h = v.getAttribute(r), w = h !== null && h !== "false", o = (k.get(v) || 0) + 1, s = (i.get(v) || 0) + 1;
196
+ k.set(v, o), i.set(v, s), l.push(v), o === 1 && w && L.set(v, !0), s === 1 && v.setAttribute(n, "true"), w || v.setAttribute(r, "true");
197
+ } catch (d) {
198
+ console.error("aria-hidden: cannot operate on ", v, d);
199
+ }
200
+ });
201
+ };
202
+ return g(t), a.clear(), K++, function() {
203
+ l.forEach(function(f) {
204
+ var v = k.get(f) - 1, h = i.get(f) - 1;
205
+ k.set(f, v), i.set(f, h), v || (L.has(f) || f.removeAttribute(r), L.delete(f)), h || f.removeAttribute(n);
206
+ }), K--, K || (k = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {});
207
+ };
208
+ }, Ct = function(e, t, n) {
209
+ n === void 0 && (n = "data-aria-hidden");
210
+ var r = Array.from(Array.isArray(e) ? e : [e]), c = t || Le(e);
211
+ return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), Ie(r, c, n, "aria-hidden")) : function() {
212
+ return null;
213
+ };
214
+ }, C = function() {
215
+ return C = Object.assign || function(t) {
216
+ for (var n, r = 1, c = arguments.length; r < c; r++) {
217
+ n = arguments[r];
218
+ for (var i in n)
219
+ Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
220
+ }
221
+ return t;
222
+ }, C.apply(this, arguments);
223
+ };
224
+ function se(e, t) {
225
+ var n = {};
226
+ for (var r in e)
227
+ Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
228
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
229
+ for (var c = 0, r = Object.getOwnPropertySymbols(e); c < r.length; c++)
230
+ t.indexOf(r[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[c]) && (n[r[c]] = e[r[c]]);
231
+ return n;
232
+ }
233
+ function xe(e, t, n) {
234
+ if (n || arguments.length === 2)
235
+ for (var r = 0, c = t.length, i; r < c; r++)
236
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
237
+ return e.concat(i || Array.prototype.slice.call(t));
238
+ }
239
+ var W = "right-scroll-bar-position", B = "width-before-scroll-bar", We = "with-scroll-bars-hidden", Be = "--removed-body-scroll-bar-size";
240
+ function H(e, t) {
241
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
242
+ }
243
+ function De(e, t) {
244
+ var n = ye(function() {
245
+ return {
246
+ // value
247
+ value: e,
248
+ // last callback
249
+ callback: t,
250
+ // "memoized" public interface
251
+ facade: {
252
+ get current() {
253
+ return n.value;
254
+ },
255
+ set current(r) {
256
+ var c = n.value;
257
+ c !== r && (n.value = r, n.callback(r, c));
258
+ }
259
+ }
260
+ };
261
+ })[0];
262
+ return n.callback = t, n.facade;
263
+ }
264
+ var _e = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
265
+ function Ue(e, t) {
266
+ var n = De(t || null, function(r) {
267
+ return e.forEach(function(c) {
268
+ return H(c, r);
269
+ });
270
+ });
271
+ return _e(function() {
272
+ var r = ee.get(n);
273
+ if (r) {
274
+ var c = new Set(r), i = new Set(e), l = n.current;
275
+ c.forEach(function(a) {
276
+ i.has(a) || H(a, null);
277
+ }), i.forEach(function(a) {
278
+ c.has(a) || H(a, l);
279
+ });
280
+ }
281
+ ee.set(n, e);
282
+ }, [e]), n;
283
+ }
284
+ function je(e) {
285
+ return e;
286
+ }
287
+ function Ke(e, t) {
288
+ t === void 0 && (t = je);
289
+ var n = [], r = !1, c = {
290
+ read: function() {
291
+ if (r)
292
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
293
+ return n.length ? n[n.length - 1] : e;
294
+ },
295
+ useMedium: function(i) {
296
+ var l = t(i, r);
297
+ return n.push(l), function() {
298
+ n = n.filter(function(a) {
299
+ return a !== l;
300
+ });
301
+ };
302
+ },
303
+ assignSyncMedium: function(i) {
304
+ for (r = !0; n.length; ) {
305
+ var l = n;
306
+ n = [], l.forEach(i);
307
+ }
308
+ n = {
309
+ push: function(a) {
310
+ return i(a);
311
+ },
312
+ filter: function() {
313
+ return n;
314
+ }
315
+ };
316
+ },
317
+ assignMedium: function(i) {
318
+ r = !0;
319
+ var l = [];
320
+ if (n.length) {
321
+ var a = n;
322
+ n = [], a.forEach(i), l = n;
323
+ }
324
+ var S = function() {
325
+ var g = l;
326
+ l = [], g.forEach(i);
327
+ }, b = function() {
328
+ return Promise.resolve().then(S);
329
+ };
330
+ b(), n = {
331
+ push: function(g) {
332
+ l.push(g), b();
333
+ },
334
+ filter: function(g) {
335
+ return l = l.filter(g), n;
336
+ }
337
+ };
338
+ }
339
+ };
340
+ return c;
341
+ }
342
+ function He(e) {
343
+ e === void 0 && (e = {});
344
+ var t = Ke(null);
345
+ return t.options = C({ async: !0, ssr: !1 }, e), t;
346
+ }
347
+ var fe = function(e) {
348
+ var t = e.sideCar, n = se(e, ["sideCar"]);
349
+ if (!t)
350
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
351
+ var r = t.read();
352
+ if (!r)
353
+ throw new Error("Sidecar medium not found");
354
+ return u.createElement(r, C({}, n));
355
+ };
356
+ fe.isSideCarExport = !0;
357
+ function Ve(e, t) {
358
+ return e.useMedium(t), fe;
359
+ }
360
+ var de = He(), V = function() {
361
+ }, D = u.forwardRef(function(e, t) {
362
+ var n = u.useRef(null), r = u.useState({
363
+ onScrollCapture: V,
364
+ onWheelCapture: V,
365
+ onTouchMoveCapture: V
366
+ }), c = r[0], i = r[1], l = e.forwardProps, a = e.children, S = e.className, b = e.removeScrollBar, g = e.enabled, f = e.shards, v = e.sideCar, h = e.noRelative, w = e.noIsolation, o = e.inert, s = e.allowPinchZoom, d = e.as, m = d === void 0 ? "div" : d, p = e.gapMode, y = se(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, T = Ue([n, t]), R = C(C({}, y), c);
367
+ return u.createElement(
368
+ u.Fragment,
369
+ null,
370
+ g && u.createElement(E, { sideCar: de, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!s, lockRef: n, gapMode: p }),
371
+ l ? u.cloneElement(u.Children.only(a), C(C({}, R), { ref: T })) : u.createElement(m, C({}, R, { className: S, ref: T }), a)
372
+ );
373
+ });
374
+ D.defaultProps = {
375
+ enabled: !0,
376
+ removeScrollBar: !0,
377
+ inert: !1
378
+ };
379
+ D.classNames = {
380
+ fullWidth: B,
381
+ zeroRight: W
382
+ };
383
+ var te, Xe = function() {
384
+ if (te)
385
+ return te;
386
+ if (typeof __webpack_nonce__ < "u")
387
+ return __webpack_nonce__;
388
+ };
389
+ function Ye() {
390
+ if (!document)
391
+ return null;
392
+ var e = document.createElement("style");
393
+ e.type = "text/css";
394
+ var t = Xe();
395
+ return t && e.setAttribute("nonce", t), e;
396
+ }
397
+ function Ge(e, t) {
398
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
399
+ }
400
+ function ze(e) {
401
+ var t = document.head || document.getElementsByTagName("head")[0];
402
+ t.appendChild(e);
403
+ }
404
+ var Ze = function() {
405
+ var e = 0, t = null;
406
+ return {
407
+ add: function(n) {
408
+ e == 0 && (t = Ye()) && (Ge(t, n), ze(t)), e++;
409
+ },
410
+ remove: function() {
411
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
412
+ }
413
+ };
414
+ }, qe = function() {
415
+ var e = Ze();
416
+ return function(t, n) {
417
+ u.useEffect(function() {
418
+ return e.add(t), function() {
419
+ e.remove();
420
+ };
421
+ }, [t && n]);
422
+ };
423
+ }, ve = function() {
424
+ var e = qe(), t = function(n) {
425
+ var r = n.styles, c = n.dynamic;
426
+ return e(r, c), null;
427
+ };
428
+ return t;
429
+ }, Qe = {
430
+ left: 0,
431
+ top: 0,
432
+ right: 0,
433
+ gap: 0
434
+ }, X = function(e) {
435
+ return parseInt(e || "", 10) || 0;
436
+ }, $e = function(e) {
437
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
438
+ return [X(n), X(r), X(c)];
439
+ }, Je = function(e) {
440
+ if (e === void 0 && (e = "margin"), typeof window > "u")
441
+ return Qe;
442
+ var t = $e(e), n = document.documentElement.clientWidth, r = window.innerWidth;
443
+ return {
444
+ left: t[0],
445
+ top: t[1],
446
+ right: t[2],
447
+ gap: Math.max(0, r - n + t[2] - t[0])
448
+ };
449
+ }, et = ve(), N = "data-scroll-locked", tt = function(e, t, n, r) {
450
+ var c = e.left, i = e.top, l = e.right, a = e.gap;
451
+ return n === void 0 && (n = "margin"), `
452
+ .`.concat(We, ` {
453
+ overflow: hidden `).concat(r, `;
454
+ padding-right: `).concat(a, "px ").concat(r, `;
455
+ }
456
+ body[`).concat(N, `] {
457
+ overflow: hidden `).concat(r, `;
458
+ overscroll-behavior: contain;
459
+ `).concat([
460
+ t && "position: relative ".concat(r, ";"),
461
+ n === "margin" && `
462
+ padding-left: `.concat(c, `px;
463
+ padding-top: `).concat(i, `px;
464
+ padding-right: `).concat(l, `px;
465
+ margin-left:0;
466
+ margin-top:0;
467
+ margin-right: `).concat(a, "px ").concat(r, `;
468
+ `),
469
+ n === "padding" && "padding-right: ".concat(a, "px ").concat(r, ";")
470
+ ].filter(Boolean).join(""), `
471
+ }
472
+
473
+ .`).concat(W, ` {
474
+ right: `).concat(a, "px ").concat(r, `;
475
+ }
476
+
477
+ .`).concat(B, ` {
478
+ margin-right: `).concat(a, "px ").concat(r, `;
479
+ }
480
+
481
+ .`).concat(W, " .").concat(W, ` {
482
+ right: 0 `).concat(r, `;
483
+ }
484
+
485
+ .`).concat(B, " .").concat(B, ` {
486
+ margin-right: 0 `).concat(r, `;
487
+ }
488
+
489
+ body[`).concat(N, `] {
490
+ `).concat(Be, ": ").concat(a, `px;
491
+ }
492
+ `);
493
+ }, ne = function() {
494
+ var e = parseInt(document.body.getAttribute(N) || "0", 10);
495
+ return isFinite(e) ? e : 0;
496
+ }, nt = function() {
497
+ u.useEffect(function() {
498
+ return document.body.setAttribute(N, (ne() + 1).toString()), function() {
499
+ var e = ne() - 1;
500
+ e <= 0 ? document.body.removeAttribute(N) : document.body.setAttribute(N, e.toString());
501
+ };
502
+ }, []);
503
+ }, rt = function(e) {
504
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, c = r === void 0 ? "margin" : r;
505
+ nt();
506
+ var i = u.useMemo(function() {
507
+ return Je(c);
508
+ }, [c]);
509
+ return u.createElement(et, { styles: tt(i, !t, c, n ? "" : "!important") });
510
+ }, Y = !1;
511
+ if (typeof window < "u")
512
+ try {
513
+ var I = Object.defineProperty({}, "passive", {
514
+ get: function() {
515
+ return Y = !0, !0;
516
+ }
517
+ });
518
+ window.addEventListener("test", I, I), window.removeEventListener("test", I, I);
519
+ } catch {
520
+ Y = !1;
521
+ }
522
+ var P = Y ? { passive: !1 } : !1, at = function(e) {
523
+ return e.tagName === "TEXTAREA";
524
+ }, he = function(e, t) {
525
+ if (!(e instanceof Element))
526
+ return !1;
527
+ var n = window.getComputedStyle(e);
528
+ return (
529
+ // not-not-scrollable
530
+ n[t] !== "hidden" && // contains scroll inside self
531
+ !(n.overflowY === n.overflowX && !at(e) && n[t] === "visible")
532
+ );
533
+ }, ot = function(e) {
534
+ return he(e, "overflowY");
535
+ }, ct = function(e) {
536
+ return he(e, "overflowX");
537
+ }, re = function(e, t) {
538
+ var n = t.ownerDocument, r = t;
539
+ do {
540
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
541
+ var c = me(e, r);
542
+ if (c) {
543
+ var i = pe(e, r), l = i[1], a = i[2];
544
+ if (l > a)
545
+ return !0;
546
+ }
547
+ r = r.parentNode;
548
+ } while (r && r !== n.body);
549
+ return !1;
550
+ }, ut = function(e) {
551
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
552
+ return [
553
+ t,
554
+ n,
555
+ r
556
+ ];
557
+ }, it = function(e) {
558
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
559
+ return [
560
+ t,
561
+ n,
562
+ r
563
+ ];
564
+ }, me = function(e, t) {
565
+ return e === "v" ? ot(t) : ct(t);
566
+ }, pe = function(e, t) {
567
+ return e === "v" ? ut(t) : it(t);
568
+ }, lt = function(e, t) {
569
+ return e === "h" && t === "rtl" ? -1 : 1;
570
+ }, st = function(e, t, n, r, c) {
571
+ var i = lt(e, window.getComputedStyle(t).direction), l = i * r, a = n.target, S = t.contains(a), b = !1, g = l > 0, f = 0, v = 0;
572
+ do {
573
+ if (!a)
574
+ break;
575
+ var h = pe(e, a), w = h[0], o = h[1], s = h[2], d = o - s - i * w;
576
+ (w || d) && me(e, a) && (f += d, v += w);
577
+ var m = a.parentNode;
578
+ a = m && m.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? m.host : m;
579
+ } while (
580
+ // portaled content
581
+ !S && a !== document.body || // self content
582
+ S && (t.contains(a) || t === a)
583
+ );
584
+ return (g && (c && Math.abs(f) < 1 || !c && l > f) || !g && (c && Math.abs(v) < 1 || !c && -l > v)) && (b = !0), b;
585
+ }, x = function(e) {
586
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
587
+ }, ae = function(e) {
588
+ return [e.deltaX, e.deltaY];
589
+ }, oe = function(e) {
590
+ return e && "current" in e ? e.current : e;
591
+ }, ft = function(e, t) {
592
+ return e[0] === t[0] && e[1] === t[1];
593
+ }, dt = function(e) {
594
+ return `
595
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
596
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
597
+ `);
598
+ }, vt = 0, M = [];
599
+ function ht(e) {
600
+ var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(vt++)[0], i = u.useState(ve)[0], l = u.useRef(e);
601
+ u.useEffect(function() {
602
+ l.current = e;
603
+ }, [e]), u.useEffect(function() {
604
+ if (e.inert) {
605
+ document.body.classList.add("block-interactivity-".concat(c));
606
+ var o = xe([e.lockRef.current], (e.shards || []).map(oe), !0).filter(Boolean);
607
+ return o.forEach(function(s) {
608
+ return s.classList.add("allow-interactivity-".concat(c));
609
+ }), function() {
610
+ document.body.classList.remove("block-interactivity-".concat(c)), o.forEach(function(s) {
611
+ return s.classList.remove("allow-interactivity-".concat(c));
612
+ });
613
+ };
614
+ }
615
+ }, [e.inert, e.lockRef.current, e.shards]);
616
+ var a = u.useCallback(function(o, s) {
617
+ if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
618
+ return !l.current.allowPinchZoom;
619
+ var d = x(o), m = n.current, p = "deltaX" in o ? o.deltaX : m[0] - d[0], y = "deltaY" in o ? o.deltaY : m[1] - d[1], E, T = o.target, R = Math.abs(p) > Math.abs(y) ? "h" : "v";
620
+ if ("touches" in o && R === "h" && T.type === "range")
621
+ return !1;
622
+ var F = re(R, T);
623
+ if (!F)
624
+ return !0;
625
+ if (F ? E = R : (E = R === "v" ? "h" : "v", F = re(R, T)), !F)
626
+ return !1;
627
+ if (!r.current && "changedTouches" in o && (p || y) && (r.current = E), !E)
628
+ return !0;
629
+ var G = r.current || E;
630
+ return st(G, s, o, G === "h" ? p : y, !0);
631
+ }, []), S = u.useCallback(function(o) {
632
+ var s = o;
633
+ if (!(!M.length || M[M.length - 1] !== i)) {
634
+ var d = "deltaY" in s ? ae(s) : x(s), m = t.current.filter(function(E) {
635
+ return E.name === s.type && (E.target === s.target || s.target === E.shadowParent) && ft(E.delta, d);
636
+ })[0];
637
+ if (m && m.should) {
638
+ s.cancelable && s.preventDefault();
639
+ return;
640
+ }
641
+ if (!m) {
642
+ var p = (l.current.shards || []).map(oe).filter(Boolean).filter(function(E) {
643
+ return E.contains(s.target);
644
+ }), y = p.length > 0 ? a(s, p[0]) : !l.current.noIsolation;
645
+ y && s.cancelable && s.preventDefault();
646
+ }
647
+ }
648
+ }, []), b = u.useCallback(function(o, s, d, m) {
649
+ var p = { name: o, delta: s, target: d, should: m, shadowParent: mt(d) };
650
+ t.current.push(p), setTimeout(function() {
651
+ t.current = t.current.filter(function(y) {
652
+ return y !== p;
653
+ });
654
+ }, 1);
655
+ }, []), g = u.useCallback(function(o) {
656
+ n.current = x(o), r.current = void 0;
657
+ }, []), f = u.useCallback(function(o) {
658
+ b(o.type, ae(o), o.target, a(o, e.lockRef.current));
659
+ }, []), v = u.useCallback(function(o) {
660
+ b(o.type, x(o), o.target, a(o, e.lockRef.current));
661
+ }, []);
662
+ u.useEffect(function() {
663
+ return M.push(i), e.setCallbacks({
664
+ onScrollCapture: f,
665
+ onWheelCapture: f,
666
+ onTouchMoveCapture: v
667
+ }), document.addEventListener("wheel", S, P), document.addEventListener("touchmove", S, P), document.addEventListener("touchstart", g, P), function() {
668
+ M = M.filter(function(o) {
669
+ return o !== i;
670
+ }), document.removeEventListener("wheel", S, P), document.removeEventListener("touchmove", S, P), document.removeEventListener("touchstart", g, P);
671
+ };
672
+ }, []);
673
+ var h = e.removeScrollBar, w = e.inert;
674
+ return u.createElement(
675
+ u.Fragment,
676
+ null,
677
+ w ? u.createElement(i, { styles: dt(c) }) : null,
678
+ h ? u.createElement(rt, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
679
+ );
680
+ }
681
+ function mt(e) {
682
+ for (var t = null; e !== null; )
683
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
684
+ return t;
685
+ }
686
+ const pt = Ve(de, ht);
687
+ var ge = u.forwardRef(function(e, t) {
688
+ return u.createElement(D, C({}, e, { ref: t, sideCar: pt }));
689
+ });
690
+ ge.classNames = D.classNames;
691
+ const Rt = ge;
692
+ export {
693
+ Ae as F,
694
+ Ce as P,
695
+ Rt as R,
696
+ Ct as h,
697
+ wt as u
698
+ };
@@ -0,0 +1,6 @@
1
+ const o = {
2
+ "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
3
+ };
4
+ export {
5
+ o as c
6
+ };
@@ -0,0 +1,6 @@
1
+ const o = {
2
+ "rp-other-tool-content": "_rp-other-tool-content_su718_1"
3
+ };
4
+ export {
5
+ o as c
6
+ };