@pdf-viewer/react 1.15.0-beta.1 → 1.15.0-beta.2

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 (97) hide show
  1. package/dist/{ToolbarLayout.module-5b9624f8.js → ToolbarLayout.module-ffef94eb.js} +1035 -988
  2. package/dist/components/RPController.js +4 -4
  3. package/dist/components/RPPages.js +4 -4
  4. package/dist/components/RPProvider.js +4 -4
  5. package/dist/components/layout/LayoutContainer.js +4 -4
  6. package/dist/components/layout/RPDefaultLayout.js +4 -4
  7. package/dist/components/layout/RPLayout.js +4 -4
  8. package/dist/components/layout/sidebar/RPSidebar.js +4 -4
  9. package/dist/components/layout/sidebar/Thumbnail.js +4 -4
  10. package/dist/components/layout/sidebar/Thumbnails.js +4 -4
  11. package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
  12. package/dist/components/layout/toolbar/DocumentDialog.js +4 -4
  13. package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +4 -4
  15. package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
  16. package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
  17. package/dist/components/layout/toolbar/MenuItem.js +3 -3
  18. package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
  19. package/dist/components/layout/toolbar/MostPageTool.js +4 -4
  20. package/dist/components/layout/toolbar/OtherTool.js +4 -4
  21. package/dist/components/layout/toolbar/Paginate.js +4 -4
  22. package/dist/components/layout/toolbar/PrintTool.js +4 -4
  23. package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
  24. package/dist/components/layout/toolbar/RPMoreOptions.js +4 -4
  25. package/dist/components/layout/toolbar/RPToolbar.js +4 -4
  26. package/dist/components/layout/toolbar/RPToolbarEnd.js +4 -4
  27. package/dist/components/layout/toolbar/RotateTool.js +3 -3
  28. package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
  29. package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
  30. package/dist/components/layout/toolbar/SearchResultNavigator.js +4 -4
  31. package/dist/components/layout/toolbar/SearchTool.js +4 -4
  32. package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
  33. package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
  34. package/dist/components/layout/toolbar/ToolbarCustom.js +4 -4
  35. package/dist/components/layout/toolbar/ToolbarDefault.js +4 -4
  36. package/dist/components/layout/toolbar/ToolbarLayout.js +4 -4
  37. package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
  38. package/dist/components/layout/toolbar/ZoomTool.js +4 -4
  39. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +4 -4
  40. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +4 -4
  41. package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
  42. package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
  43. package/dist/components/layout/toolbar/tools/InputPageTool.js +4 -4
  44. package/dist/components/layout/toolbar/tools/NextPageTool.js +4 -4
  45. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +4 -4
  46. package/dist/components/layout/toolbar/tools/PrintTool.js +4 -4
  47. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
  48. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +2 -2
  49. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
  50. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
  51. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +4 -4
  52. package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
  53. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +4 -4
  54. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +4 -4
  55. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
  56. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +4 -4
  57. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +4 -4
  58. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +3 -3
  59. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +4 -4
  60. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +4 -4
  61. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +3 -3
  62. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +4 -4
  63. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +4 -4
  64. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +3 -3
  65. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
  66. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +3 -3
  67. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +3 -3
  68. package/dist/components/page/AnnotationLayer.js +4 -4
  69. package/dist/components/page/CanvasLayer.js +4 -4
  70. package/dist/components/page/DualPage.js +4 -4
  71. package/dist/components/page/RPPage.js +4 -4
  72. package/dist/components/page/SinglePage.js +4 -4
  73. package/dist/components/page/TextHighlightLayer.js +4 -4
  74. package/dist/components/page/TextLayer.js +4 -4
  75. package/dist/components/ui/Checkbox.js +1 -1
  76. package/dist/components/ui/DropDown.js +3 -3
  77. package/dist/components/ui/LoadingIndicator.js +4 -4
  78. package/dist/components/ui/RPTooltip.js +118 -102
  79. package/dist/contexts/PaginationContext.js +4 -4
  80. package/dist/contexts/PrintContext.js +4 -4
  81. package/dist/contexts/RenderQueueProvider.js +4 -4
  82. package/dist/contexts/SearchContext.js +4 -4
  83. package/dist/contexts/ThumbnailsContext.js +4 -4
  84. package/dist/{floating-ui.react-dom-6b2fe0df.js → floating-ui.react-dom-d22a10b4.js} +3 -3
  85. package/dist/{index-f563c6f0.js → index-27c30844.js} +2 -2
  86. package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
  87. package/dist/main.js +4 -4
  88. package/dist/utils/hooks/useFileDownload.js +4 -4
  89. package/dist/utils/hooks/useLicense.js +1 -1
  90. package/dist/utils/hooks/usePaginate.js +4 -4
  91. package/dist/utils/hooks/usePresentPage.js +4 -4
  92. package/dist/utils/hooks/usePrint.js +4 -4
  93. package/dist/utils/hooks/useScrollToPage.js +4 -4
  94. package/dist/utils/hooks/useSearch.js +4 -4
  95. package/dist/utils/hooks/useThumbnail.js +4 -4
  96. package/dist/utils/hooks/useVirtualReactWindow.js +4 -4
  97. package/package.json +1 -1
@@ -1,10 +1,11 @@
1
1
  import { jsx as d, jsxs as Y } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import { P as S, c as ae, u as k, d as Fe, f as oe, e as We, a as E, b as Be, g as Ge } from "../../index-35c7f4a2.js";
4
- import { u as Xe, a as Ve, o as Ue, s as ze, f as qe, b as Ze, c as Ke, h as Je, d as Qe, l as et, e as tt, D as rt } from "../../floating-ui.react-dom-6b2fe0df.js";
5
- import { withRef as ot } from "../../utils/withRef.js";
3
+ import { useRef as Fe, useEffect as Be, useMemo as We, useLayoutEffect as Ge } from "react";
4
+ import { P as S, c as ae, u as k, d as Xe, e as Ve, a as E, b as Ue, f as ze } from "../../index-c9a2990a.js";
5
+ import { u as qe, a as Ze, o as Ke, s as Je, f as Qe, b as et, c as tt, h as rt, l as ot, d as nt, D as at } from "../../floating-ui.react-dom-d22a10b4.js";
6
+ import { withRef as st } from "../../utils/withRef.js";
6
7
  import "react-dom";
7
- var nt = "Arrow", se = a.forwardRef((e, r) => {
8
+ var it = "Arrow", se = a.forwardRef((e, r) => {
8
9
  const { children: t, width: o = 10, height: n = 5, ...i } = e;
9
10
  return /* @__PURE__ */ d(
10
11
  S.svg,
@@ -19,12 +20,27 @@ var nt = "Arrow", se = a.forwardRef((e, r) => {
19
20
  }
20
21
  );
21
22
  });
22
- se.displayName = nt;
23
- var at = se, B = "Popper", [ie, le] = ae(B), [st, ce] = ie(B), de = (e) => {
23
+ se.displayName = it;
24
+ var lt = se;
25
+ function ct(e) {
26
+ const r = Fe(e);
27
+ return Be(() => {
28
+ r.current = e;
29
+ }), We(
30
+ () => (...t) => {
31
+ var o;
32
+ return (o = r.current) === null || o === void 0 ? void 0 : o.call(r, ...t);
33
+ },
34
+ []
35
+ );
36
+ }
37
+ const oe = globalThis != null && globalThis.document ? Ge : () => {
38
+ };
39
+ var W = "Popper", [ie, le] = ae(W), [dt, ce] = ie(W), de = (e) => {
24
40
  const { __scopePopper: r, children: t } = e, [o, n] = a.useState(null);
25
- return /* @__PURE__ */ d(st, { scope: r, anchor: o, onAnchorChange: n, children: t });
41
+ return /* @__PURE__ */ d(dt, { scope: r, anchor: o, onAnchorChange: n, children: t });
26
42
  };
27
- de.displayName = B;
43
+ de.displayName = W;
28
44
  var pe = "PopperAnchor", ue = a.forwardRef(
29
45
  (e, r) => {
30
46
  const { __scopePopper: t, virtualRef: o, ...n } = e, i = ce(pe, t), l = a.useRef(null), h = k(r, l), s = a.useRef(null);
@@ -35,7 +51,7 @@ var pe = "PopperAnchor", ue = a.forwardRef(
35
51
  }
36
52
  );
37
53
  ue.displayName = pe;
38
- var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
54
+ var G = "PopperContent", [pt, ut] = ie(G), fe = a.forwardRef(
39
55
  (e, r) => {
40
56
  var Z, K, J, Q, ee, te;
41
57
  const {
@@ -52,43 +68,43 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
52
68
  hideWhenDetached: g = !1,
53
69
  updatePositionStrategy: u = "optimized",
54
70
  onPlaced: v,
55
- ...y
56
- } = e, m = ce(G, t), [w, x] = a.useState(null), T = k(r, (_) => x(_)), [C, b] = a.useState(null), P = Fe(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (i !== "center" ? "-" + i : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(p) ? p : [p], _e = U.length > 0, D = {
71
+ ...m
72
+ } = e, y = ce(G, t), [w, x] = a.useState(null), b = k(r, (_) => x(_)), [C, T] = a.useState(null), P = Xe(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (i !== "center" ? "-" + i : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(p) ? p : [p], _e = U.length > 0, D = {
57
73
  padding: Re,
58
- boundary: U.filter(dt),
74
+ boundary: U.filter(ht),
59
75
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
60
76
  altBoundary: _e
61
- }, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } = Xe({
77
+ }, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } = qe({
62
78
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
63
79
  strategy: "fixed",
64
80
  placement: Ee,
65
- whileElementsMounted: (..._) => Ve(..._, {
81
+ whileElementsMounted: (..._) => Ze(..._, {
66
82
  animationFrame: u === "always"
67
83
  }),
68
84
  elements: {
69
- reference: m.anchor
85
+ reference: y.anchor
70
86
  },
71
87
  middleware: [
72
- Ue({ mainAxis: n + V, alignmentAxis: l }),
73
- s && ze({
88
+ Ke({ mainAxis: n + V, alignmentAxis: l }),
89
+ s && Je({
74
90
  mainAxis: !0,
75
91
  crossAxis: !1,
76
- limiter: f === "partial" ? et() : void 0,
92
+ limiter: f === "partial" ? ot() : void 0,
77
93
  ...D
78
94
  }),
79
- s && qe({ ...D }),
80
- Ze({
95
+ s && Qe({ ...D }),
96
+ et({
81
97
  ...D,
82
98
  apply: ({ elements: _, rects: re, availableWidth: Me, availableHeight: $e }) => {
83
99
  const { width: je, height: Ye } = re.reference, L = _.floating.style;
84
100
  L.setProperty("--radix-popper-available-width", `${Me}px`), L.setProperty("--radix-popper-available-height", `${$e}px`), L.setProperty("--radix-popper-anchor-width", `${je}px`), L.setProperty("--radix-popper-anchor-height", `${Ye}px`);
85
101
  }
86
102
  }),
87
- C && Ke({ element: C, padding: h }),
88
- pt({ arrowWidth: N, arrowHeight: V }),
89
- g && Je({ strategy: "referenceHidden", ...D })
103
+ C && tt({ element: C, padding: h }),
104
+ vt({ arrowWidth: N, arrowHeight: V }),
105
+ g && rt({ strategy: "referenceHidden", ...D })
90
106
  ]
91
- }), [q, Ne] = ge(Se), I = Qe(v);
107
+ }), [q, Ne] = ge(Se), I = ct(v);
92
108
  oe(() => {
93
109
  H && (I == null || I());
94
110
  }, [H, I]);
@@ -120,11 +136,11 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
120
136
  },
121
137
  dir: e.dir,
122
138
  children: /* @__PURE__ */ d(
123
- it,
139
+ pt,
124
140
  {
125
141
  scope: t,
126
142
  placedSide: q,
127
- onArrowChange: b,
143
+ onArrowChange: T,
128
144
  arrowX: De,
129
145
  arrowY: He,
130
146
  shouldHideArrow: Ie,
@@ -133,10 +149,10 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
133
149
  {
134
150
  "data-side": q,
135
151
  "data-align": Ne,
136
- ...y,
137
- ref: T,
152
+ ...m,
153
+ ref: b,
138
154
  style: {
139
- ...y.style,
155
+ ...m.style,
140
156
  // if the PopperContent hasn't been placed yet (not all measurements done)
141
157
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
142
158
  animation: H ? void 0 : "none"
@@ -150,13 +166,13 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
150
166
  }
151
167
  );
152
168
  fe.displayName = G;
153
- var he = "PopperArrow", ct = {
169
+ var he = "PopperArrow", ft = {
154
170
  top: "bottom",
155
171
  right: "left",
156
172
  bottom: "top",
157
173
  left: "right"
158
174
  }, ve = a.forwardRef(function(r, t) {
159
- const { __scopePopper: o, ...n } = r, i = lt(he, o), l = ct[i.placedSide];
175
+ const { __scopePopper: o, ...n } = r, i = ut(he, o), l = ft[i.placedSide];
160
176
  return (
161
177
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
162
178
  // doesn't report size as we'd expect on SVG elements.
@@ -185,7 +201,7 @@ var he = "PopperArrow", ct = {
185
201
  visibility: i.shouldHideArrow ? "hidden" : void 0
186
202
  },
187
203
  children: /* @__PURE__ */ d(
188
- at,
204
+ lt,
189
205
  {
190
206
  ...n,
191
207
  ref: t,
@@ -201,24 +217,24 @@ var he = "PopperArrow", ct = {
201
217
  );
202
218
  });
203
219
  ve.displayName = he;
204
- function dt(e) {
220
+ function ht(e) {
205
221
  return e !== null;
206
222
  }
207
- var pt = (e) => ({
223
+ var vt = (e) => ({
208
224
  name: "transformOrigin",
209
225
  options: e,
210
226
  fn(r) {
211
- var m, w, x;
212
- const { placement: t, rects: o, middlewareData: n } = r, l = ((m = n.arrow) == null ? void 0 : m.centerOffset) !== 0, h = l ? 0 : e.arrowWidth, s = l ? 0 : e.arrowHeight, [p, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], g = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + s / 2;
213
- let v = "", y = "";
214
- return p === "bottom" ? (v = l ? f : `${g}px`, y = `${-s}px`) : p === "top" ? (v = l ? f : `${g}px`, y = `${o.floating.height + s}px`) : p === "right" ? (v = `${-s}px`, y = l ? f : `${u}px`) : p === "left" && (v = `${o.floating.width + s}px`, y = l ? f : `${u}px`), { data: { x: v, y } };
227
+ var y, w, x;
228
+ const { placement: t, rects: o, middlewareData: n } = r, l = ((y = n.arrow) == null ? void 0 : y.centerOffset) !== 0, h = l ? 0 : e.arrowWidth, s = l ? 0 : e.arrowHeight, [p, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], g = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + s / 2;
229
+ let v = "", m = "";
230
+ return p === "bottom" ? (v = l ? f : `${g}px`, m = `${-s}px`) : p === "top" ? (v = l ? f : `${g}px`, m = `${o.floating.height + s}px`) : p === "right" ? (v = `${-s}px`, m = l ? f : `${u}px`) : p === "left" && (v = `${o.floating.width + s}px`, m = l ? f : `${u}px`), { data: { x: v, y: m } };
215
231
  }
216
232
  });
217
233
  function ge(e) {
218
234
  const [r, t = "center"] = e.split("-");
219
235
  return [r, t];
220
236
  }
221
- var ut = de, ft = ue, ht = fe, vt = ve, gt = Object.freeze({
237
+ var gt = de, mt = ue, yt = fe, wt = ve, xt = Object.freeze({
222
238
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
223
239
  position: "absolute",
224
240
  border: 0,
@@ -230,23 +246,23 @@ var ut = de, ft = ue, ht = fe, vt = ve, gt = Object.freeze({
230
246
  clip: "rect(0, 0, 0, 0)",
231
247
  whiteSpace: "nowrap",
232
248
  wordWrap: "normal"
233
- }), yt = "VisuallyHidden", ye = a.forwardRef(
249
+ }), Ct = "VisuallyHidden", me = a.forwardRef(
234
250
  (e, r) => /* @__PURE__ */ d(
235
251
  S.span,
236
252
  {
237
253
  ...e,
238
254
  ref: r,
239
- style: { ...gt, ...e.style }
255
+ style: { ...xt, ...e.style }
240
256
  }
241
257
  )
242
258
  );
243
- ye.displayName = yt;
244
- var mt = ye, [M, Wt] = ae("Tooltip", [
259
+ me.displayName = Ct;
260
+ var Pt = me, [M, Ut] = ae("Tooltip", [
245
261
  le
246
- ]), $ = le(), me = "TooltipProvider", wt = 700, F = "tooltip.open", [xt, X] = M(me), we = (e) => {
262
+ ]), $ = le(), ye = "TooltipProvider", bt = 700, F = "tooltip.open", [Tt, X] = M(ye), we = (e) => {
247
263
  const {
248
264
  __scopeTooltip: r,
249
- delayDuration: t = wt,
265
+ delayDuration: t = bt,
250
266
  skipDelayDuration: o = 300,
251
267
  disableHoverableContent: n = !1,
252
268
  children: i
@@ -255,7 +271,7 @@ var mt = ye, [M, Wt] = ae("Tooltip", [
255
271
  const p = s.current;
256
272
  return () => window.clearTimeout(p);
257
273
  }, []), /* @__PURE__ */ d(
258
- xt,
274
+ Tt,
259
275
  {
260
276
  scope: r,
261
277
  isOpenDelayedRef: l,
@@ -278,8 +294,8 @@ var mt = ye, [M, Wt] = ae("Tooltip", [
278
294
  }
279
295
  );
280
296
  };
281
- we.displayName = me;
282
- var O = "Tooltip", [Ct, j] = M(O), xe = (e) => {
297
+ we.displayName = ye;
298
+ var O = "Tooltip", [At, j] = M(O), xe = (e) => {
283
299
  const {
284
300
  __scopeTooltip: r,
285
301
  children: t,
@@ -288,51 +304,51 @@ var O = "Tooltip", [Ct, j] = M(O), xe = (e) => {
288
304
  onOpenChange: i,
289
305
  disableHoverableContent: l,
290
306
  delayDuration: h
291
- } = e, s = X(O, e.__scopeTooltip), p = $(r), [c, f] = a.useState(null), g = tt(), u = a.useRef(0), v = l ?? s.disableHoverableContent, y = h ?? s.delayDuration, m = a.useRef(!1), [w, x] = We({
307
+ } = e, s = X(O, e.__scopeTooltip), p = $(r), [c, f] = a.useState(null), g = nt(), u = a.useRef(0), v = l ?? s.disableHoverableContent, m = h ?? s.delayDuration, y = a.useRef(!1), [w, x] = Ve({
292
308
  prop: o,
293
309
  defaultProp: n ?? !1,
294
310
  onChange: (N) => {
295
311
  N ? (s.onOpen(), document.dispatchEvent(new CustomEvent(F))) : s.onClose(), i == null || i(N);
296
312
  },
297
313
  caller: O
298
- }), T = a.useMemo(() => w ? m.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
299
- window.clearTimeout(u.current), u.current = 0, m.current = !1, x(!0);
300
- }, [x]), b = a.useCallback(() => {
314
+ }), b = a.useMemo(() => w ? y.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
315
+ window.clearTimeout(u.current), u.current = 0, y.current = !1, x(!0);
316
+ }, [x]), T = a.useCallback(() => {
301
317
  window.clearTimeout(u.current), u.current = 0, x(!1);
302
318
  }, [x]), P = a.useCallback(() => {
303
319
  window.clearTimeout(u.current), u.current = window.setTimeout(() => {
304
- m.current = !0, x(!0), u.current = 0;
305
- }, y);
306
- }, [y, x]);
320
+ y.current = !0, x(!0), u.current = 0;
321
+ }, m);
322
+ }, [m, x]);
307
323
  return a.useEffect(() => () => {
308
324
  u.current && (window.clearTimeout(u.current), u.current = 0);
309
- }, []), /* @__PURE__ */ d(ut, { ...p, children: /* @__PURE__ */ d(
310
- Ct,
325
+ }, []), /* @__PURE__ */ d(gt, { ...p, children: /* @__PURE__ */ d(
326
+ At,
311
327
  {
312
328
  scope: r,
313
329
  contentId: g,
314
330
  open: w,
315
- stateAttribute: T,
331
+ stateAttribute: b,
316
332
  trigger: c,
317
333
  onTriggerChange: f,
318
334
  onTriggerEnter: a.useCallback(() => {
319
335
  s.isOpenDelayedRef.current ? P() : C();
320
336
  }, [s.isOpenDelayedRef, P, C]),
321
337
  onTriggerLeave: a.useCallback(() => {
322
- v ? b() : (window.clearTimeout(u.current), u.current = 0);
323
- }, [b, v]),
338
+ v ? T() : (window.clearTimeout(u.current), u.current = 0);
339
+ }, [T, v]),
324
340
  onOpen: C,
325
- onClose: b,
341
+ onClose: T,
326
342
  disableHoverableContent: v,
327
343
  children: t
328
344
  }
329
345
  ) });
330
346
  };
331
347
  xe.displayName = O;
332
- var W = "TooltipTrigger", Ce = a.forwardRef(
348
+ var B = "TooltipTrigger", Ce = a.forwardRef(
333
349
  (e, r) => {
334
- const { __scopeTooltip: t, ...o } = e, n = j(W, t), i = X(W, t), l = $(t), h = a.useRef(null), s = k(r, h, n.onTriggerChange), p = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => p.current = !1, []);
335
- return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(ft, { asChild: !0, ...l, children: /* @__PURE__ */ d(
350
+ const { __scopeTooltip: t, ...o } = e, n = j(B, t), i = X(B, t), l = $(t), h = a.useRef(null), s = k(r, h, n.onTriggerChange), p = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => p.current = !1, []);
351
+ return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(mt, { asChild: !0, ...l, children: /* @__PURE__ */ d(
336
352
  S.button,
337
353
  {
338
354
  "aria-describedby": n.open ? n.contentId : void 0,
@@ -357,41 +373,41 @@ var W = "TooltipTrigger", Ce = a.forwardRef(
357
373
  ) });
358
374
  }
359
375
  );
360
- Ce.displayName = W;
361
- var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
376
+ Ce.displayName = B;
377
+ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
362
378
  forceMount: void 0
363
379
  }), R = "TooltipContent", Pe = a.forwardRef(
364
380
  (e, r) => {
365
- const t = Tt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...i } = e, l = j(R, e.__scopeTooltip);
366
- return /* @__PURE__ */ d(Be, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ d(Te, { side: n, ...i, ref: r }) : /* @__PURE__ */ d(bt, { side: n, ...i, ref: r }) });
381
+ const t = Rt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...i } = e, l = j(R, e.__scopeTooltip);
382
+ return /* @__PURE__ */ d(Ue, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ d(be, { side: n, ...i, ref: r }) : /* @__PURE__ */ d(_t, { side: n, ...i, ref: r }) });
367
383
  }
368
- ), bt = a.forwardRef((e, r) => {
384
+ ), _t = a.forwardRef((e, r) => {
369
385
  const t = j(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), i = k(r, n), [l, h] = a.useState(null), { trigger: s, onClose: p } = t, c = n.current, { onPointerInTransitChange: f } = o, g = a.useCallback(() => {
370
386
  h(null), f(!1);
371
387
  }, [f]), u = a.useCallback(
372
- (v, y) => {
373
- const m = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = _t(w, m.getBoundingClientRect()), T = Ot(w, x), C = St(y.getBoundingClientRect()), b = Dt([...T, ...C]);
374
- h(b), f(!0);
388
+ (v, m) => {
389
+ const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = Dt(w, y.getBoundingClientRect()), b = Ht(w, x), C = It(m.getBoundingClientRect()), T = kt([...b, ...C]);
390
+ h(T), f(!0);
375
391
  },
376
392
  [f]
377
393
  );
378
394
  return a.useEffect(() => () => g(), [g]), a.useEffect(() => {
379
395
  if (s && c) {
380
- const v = (m) => u(m, c), y = (m) => u(m, s);
381
- return s.addEventListener("pointerleave", v), c.addEventListener("pointerleave", y), () => {
382
- s.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave", y);
396
+ const v = (y) => u(y, c), m = (y) => u(y, s);
397
+ return s.addEventListener("pointerleave", v), c.addEventListener("pointerleave", m), () => {
398
+ s.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave", m);
383
399
  };
384
400
  }
385
401
  }, [s, c, u, g]), a.useEffect(() => {
386
402
  if (l) {
387
- const v = (y) => {
388
- const m = y.target, w = { x: y.clientX, y: y.clientY }, x = (s == null ? void 0 : s.contains(m)) || (c == null ? void 0 : c.contains(m)), T = !Nt(w, l);
389
- x ? g() : T && (g(), p());
403
+ const v = (m) => {
404
+ const y = m.target, w = { x: m.clientX, y: m.clientY }, x = (s == null ? void 0 : s.contains(y)) || (c == null ? void 0 : c.contains(y)), b = !Lt(w, l);
405
+ x ? g() : b && (g(), p());
390
406
  };
391
407
  return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
392
408
  }
393
- }, [s, c, l, p, g]), /* @__PURE__ */ d(Te, { ...e, ref: i });
394
- }), [At, Et] = M(O, { isInside: !1 }), Rt = Ge("TooltipContent"), Te = a.forwardRef(
409
+ }, [s, c, l, p, g]), /* @__PURE__ */ d(be, { ...e, ref: i });
410
+ }), [Ot, St] = M(O, { isInside: !1 }), Nt = ze("TooltipContent"), be = a.forwardRef(
395
411
  (e, r) => {
396
412
  const {
397
413
  __scopeTooltip: t,
@@ -410,7 +426,7 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
410
426
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
411
427
  }
412
428
  }, [s.trigger, c]), /* @__PURE__ */ d(
413
- rt,
429
+ at,
414
430
  {
415
431
  asChild: !0,
416
432
  disableOutsidePointerEvents: !1,
@@ -419,7 +435,7 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
419
435
  onFocusOutside: (f) => f.preventDefault(),
420
436
  onDismiss: c,
421
437
  children: /* @__PURE__ */ Y(
422
- ht,
438
+ yt,
423
439
  {
424
440
  "data-state": s.stateAttribute,
425
441
  ...p,
@@ -434,8 +450,8 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
434
450
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
435
451
  },
436
452
  children: [
437
- /* @__PURE__ */ d(Rt, { children: o }),
438
- /* @__PURE__ */ d(At, { scope: t, isInside: !0, children: /* @__PURE__ */ d(mt, { id: s.contentId, role: "tooltip", children: n || o }) })
453
+ /* @__PURE__ */ d(Nt, { children: o }),
454
+ /* @__PURE__ */ d(Ot, { scope: t, isInside: !0, children: /* @__PURE__ */ d(Pt, { id: s.contentId, role: "tooltip", children: n || o }) })
439
455
  ]
440
456
  }
441
457
  )
@@ -444,17 +460,17 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
444
460
  }
445
461
  );
446
462
  Pe.displayName = R;
447
- var be = "TooltipArrow", Ae = a.forwardRef(
463
+ var Te = "TooltipArrow", Ae = a.forwardRef(
448
464
  (e, r) => {
449
465
  const { __scopeTooltip: t, ...o } = e, n = $(t);
450
- return Et(
451
- be,
466
+ return St(
467
+ Te,
452
468
  t
453
- ).isInside ? null : /* @__PURE__ */ d(vt, { ...n, ...o, ref: r });
469
+ ).isInside ? null : /* @__PURE__ */ d(wt, { ...n, ...o, ref: r });
454
470
  }
455
471
  );
456
- Ae.displayName = be;
457
- function _t(e, r) {
472
+ Ae.displayName = Te;
473
+ function Dt(e, r) {
458
474
  const t = Math.abs(r.top - e.y), o = Math.abs(r.bottom - e.y), n = Math.abs(r.right - e.x), i = Math.abs(r.left - e.x);
459
475
  switch (Math.min(t, o, n, i)) {
460
476
  case i:
@@ -469,7 +485,7 @@ function _t(e, r) {
469
485
  throw new Error("unreachable");
470
486
  }
471
487
  }
472
- function Ot(e, r, t = 5) {
488
+ function Ht(e, r, t = 5) {
473
489
  const o = [];
474
490
  switch (r) {
475
491
  case "top":
@@ -499,7 +515,7 @@ function Ot(e, r, t = 5) {
499
515
  }
500
516
  return o;
501
517
  }
502
- function St(e) {
518
+ function It(e) {
503
519
  const { top: r, right: t, bottom: o, left: n } = e;
504
520
  return [
505
521
  { x: n, y: r },
@@ -508,7 +524,7 @@ function St(e) {
508
524
  { x: n, y: o }
509
525
  ];
510
526
  }
511
- function Nt(e, r) {
527
+ function Lt(e, r) {
512
528
  const { x: t, y: o } = e;
513
529
  let n = !1;
514
530
  for (let i = 0, l = r.length - 1; i < r.length; l = i++) {
@@ -517,11 +533,11 @@ function Nt(e, r) {
517
533
  }
518
534
  return n;
519
535
  }
520
- function Dt(e) {
536
+ function kt(e) {
521
537
  const r = e.slice();
522
- return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), Ht(r);
538
+ return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), Mt(r);
523
539
  }
524
- function Ht(e) {
540
+ function Mt(e) {
525
541
  if (e.length <= 1)
526
542
  return e.slice();
527
543
  const r = [];
@@ -551,11 +567,11 @@ function Ht(e) {
551
567
  }
552
568
  return t.pop(), r.length === 1 && t.length === 1 && r[0].x === t[0].x && r[0].y === t[0].y ? r : r.concat(t);
553
569
  }
554
- const It = "_tooltipContent_12gjy_1", Lt = "_tooltipArrow_12gjy_8", kt = "_fadeIn_12gjy_1", ne = {
555
- tooltipContent: It,
556
- tooltipArrow: Lt,
557
- fadeIn: kt
558
- }, Gt = ot(
570
+ const $t = "_tooltipContent_12gjy_1", jt = "_tooltipArrow_12gjy_8", Yt = "_fadeIn_12gjy_1", ne = {
571
+ tooltipContent: $t,
572
+ tooltipArrow: jt,
573
+ fadeIn: Yt
574
+ }, qt = st(
559
575
  ({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */ d(we, { children: /* @__PURE__ */ Y(xe, { delayDuration: 1e3, children: [
560
576
  /* @__PURE__ */ d(Ce, { asChild: !0, children: /* @__PURE__ */ d("div", { ref: n, className: t, style: o, children: e }) }),
561
577
  /* @__PURE__ */ Y(Pe, { className: ne.tooltipContent, sideOffset: 5, children: [
@@ -565,5 +581,5 @@ const It = "_tooltipContent_12gjy_1", Lt = "_tooltipArrow_12gjy_8", kt = "_fadeI
565
581
  ] }) })
566
582
  );
567
583
  export {
568
- Gt as default
584
+ qt as default
569
585
  };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { w as Bt, P as Dt, u as Et } from "../ToolbarLayout.module-5b9624f8.js";
3
+ import { w as Bt, P as Dt, u as Et } from "../ToolbarLayout.module-ffef94eb.js";
4
4
  import "./RPDocumentContext.js";
5
5
  import "../utils/appConsole.js";
6
6
  import "./GlobalCurrentPage.js";
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
75
75
  import "../components/icons/DarkPdfIcon.js";
76
76
  import "../SearchCloseButton-08d57275.js";
77
77
  import "../components/ui/RPTooltip.js";
78
- import "../index-35c7f4a2.js";
78
+ import "../index-c9a2990a.js";
79
79
  import "react-dom";
80
- import "../floating-ui.react-dom-6b2fe0df.js";
80
+ import "../floating-ui.react-dom-d22a10b4.js";
81
81
  import "../components/icons/CloseIcon.js";
82
82
  import "../components/ui/Checkbox.js";
83
83
  import "../components/icons/CheckIcon.js";
84
84
  import "./IconContext.js";
85
85
  import "../components/ui/DropDown.js";
86
- import "../index-f563c6f0.js";
86
+ import "../index-27c30844.js";
87
87
  import "../components/layout/toolbar/MenuItem.js";
88
88
  import "../components/layout/toolbar/MenuSeparator.js";
89
89
  import "../utils/dateFormatter.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { y as Ar, g as Br, c as Dr } from "../ToolbarLayout.module-5b9624f8.js";
3
+ import { y as Ar, g as Br, c as Dr } from "../ToolbarLayout.module-ffef94eb.js";
4
4
  import "../components/icons/ChevronUpIcon.js";
5
5
  import "../components/ui/Button.js";
6
6
  import "../clsx-0c6e471a.js";
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
75
75
  import "../components/icons/DarkPdfIcon.js";
76
76
  import "../SearchCloseButton-08d57275.js";
77
77
  import "../components/ui/RPTooltip.js";
78
- import "../index-35c7f4a2.js";
78
+ import "../index-c9a2990a.js";
79
79
  import "react-dom";
80
- import "../floating-ui.react-dom-6b2fe0df.js";
80
+ import "../floating-ui.react-dom-d22a10b4.js";
81
81
  import "../components/icons/CloseIcon.js";
82
82
  import "../components/ui/Checkbox.js";
83
83
  import "../components/icons/CheckIcon.js";
84
84
  import "./IconContext.js";
85
85
  import "../components/ui/DropDown.js";
86
- import "../index-f563c6f0.js";
86
+ import "../index-27c30844.js";
87
87
  import "../components/layout/toolbar/MenuItem.js";
88
88
  import "../components/layout/toolbar/MenuSeparator.js";
89
89
  import "../utils/dateFormatter.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../utils/Queue.js";
4
4
  import "../utils/renderPage.js";
5
- import { E as wo, f as yo, F as zo } from "../ToolbarLayout.module-5b9624f8.js";
5
+ import { E as wo, f as yo, F as zo } from "../ToolbarLayout.module-ffef94eb.js";
6
6
  import "pdfjs-dist";
7
7
  import "../components/icons/ChevronUpIcon.js";
8
8
  import "../components/ui/Button.js";
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
75
75
  import "../components/icons/DarkPdfIcon.js";
76
76
  import "../SearchCloseButton-08d57275.js";
77
77
  import "../components/ui/RPTooltip.js";
78
- import "../index-35c7f4a2.js";
78
+ import "../index-c9a2990a.js";
79
79
  import "react-dom";
80
- import "../floating-ui.react-dom-6b2fe0df.js";
80
+ import "../floating-ui.react-dom-d22a10b4.js";
81
81
  import "../components/icons/CloseIcon.js";
82
82
  import "../components/ui/Checkbox.js";
83
83
  import "../components/icons/CheckIcon.js";
84
84
  import "./IconContext.js";
85
85
  import "../components/ui/DropDown.js";
86
- import "../index-f563c6f0.js";
86
+ import "../index-27c30844.js";
87
87
  import "../components/layout/toolbar/MenuItem.js";
88
88
  import "../components/layout/toolbar/MenuSeparator.js";
89
89
  import "../utils/dateFormatter.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { C as Ao, e as Bo, d as Do } from "../ToolbarLayout.module-5b9624f8.js";
3
+ import { C as Ao, e as Bo, d as Do } from "../ToolbarLayout.module-ffef94eb.js";
4
4
  import "../components/icons/ChevronUpIcon.js";
5
5
  import "../components/ui/Button.js";
6
6
  import "../clsx-0c6e471a.js";
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
75
75
  import "../components/icons/DarkPdfIcon.js";
76
76
  import "../SearchCloseButton-08d57275.js";
77
77
  import "../components/ui/RPTooltip.js";
78
- import "../index-35c7f4a2.js";
78
+ import "../index-c9a2990a.js";
79
79
  import "react-dom";
80
- import "../floating-ui.react-dom-6b2fe0df.js";
80
+ import "../floating-ui.react-dom-d22a10b4.js";
81
81
  import "../components/icons/CloseIcon.js";
82
82
  import "../components/ui/Checkbox.js";
83
83
  import "../components/icons/CheckIcon.js";
84
84
  import "./IconContext.js";
85
85
  import "../components/ui/DropDown.js";
86
- import "../index-f563c6f0.js";
86
+ import "../index-27c30844.js";
87
87
  import "../components/layout/toolbar/MenuItem.js";
88
88
  import "../components/layout/toolbar/MenuSeparator.js";
89
89
  import "../utils/dateFormatter.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { A as zt, T as Bt, h as Dt } from "../ToolbarLayout.module-5b9624f8.js";
3
+ import { A as zt, T as Bt, h as Dt } from "../ToolbarLayout.module-ffef94eb.js";
4
4
  import "../components/icons/ChevronUpIcon.js";
5
5
  import "../components/ui/Button.js";
6
6
  import "../clsx-0c6e471a.js";
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
75
75
  import "../components/icons/DarkPdfIcon.js";
76
76
  import "../SearchCloseButton-08d57275.js";
77
77
  import "../components/ui/RPTooltip.js";
78
- import "../index-35c7f4a2.js";
78
+ import "../index-c9a2990a.js";
79
79
  import "react-dom";
80
- import "../floating-ui.react-dom-6b2fe0df.js";
80
+ import "../floating-ui.react-dom-d22a10b4.js";
81
81
  import "../components/icons/CloseIcon.js";
82
82
  import "../components/ui/Checkbox.js";
83
83
  import "../components/icons/CheckIcon.js";
84
84
  import "./IconContext.js";
85
85
  import "../components/ui/DropDown.js";
86
- import "../index-f563c6f0.js";
86
+ import "../index-27c30844.js";
87
87
  import "../components/layout/toolbar/MenuItem.js";
88
88
  import "../components/layout/toolbar/MenuSeparator.js";
89
89
  import "../utils/dateFormatter.js";
@@ -1,6 +1,6 @@
1
1
  import * as v from "react";
2
2
  import { useLayoutEffect as oe } from "react";
3
- import { u as Vt, P as It, a as ht, h as ie, f as se } from "./index-35c7f4a2.js";
3
+ import { u as Vt, P as It, a as ht, g as ie, h as se } from "./index-c9a2990a.js";
4
4
  import { jsx as zt } from "react/jsx-runtime";
5
5
  import * as re from "react-dom";
6
6
  function bt(t) {
@@ -1463,8 +1463,8 @@ export {
1463
1463
  On as a,
1464
1464
  Dn as b,
1465
1465
  Mn as c,
1466
- bt as d,
1467
- Rn as e,
1466
+ Rn as d,
1467
+ bt as e,
1468
1468
  Pn as f,
1469
1469
  Tn as h,
1470
1470
  Ln as l,