@factorialco/f0-react 8.36.0 → 8.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPdfThumbnail-DtjnbxlK.js → ChatPdfThumbnail-D17gaAZw.js} +1 -1
- package/dist/{ChatPostComposerDialog-CKyQwOZh.js → ChatPostComposerDialog-Dzcwl3UT.js} +3 -3
- package/dist/{DocumentToolbar-DmU2Z6yx.js → DocumentToolbar-BF90Kcrb.js} +9 -9
- package/dist/{DocxViewer-C54WGD1S.js → DocxViewer-DXUC2CUW.js} +2 -2
- package/dist/{F0AiProcessingOverlay-BDqqztvk.js → F0AiProcessingOverlay-DTsO9rEl.js} +1 -1
- package/dist/{F0CanvasPanel-WVtVnJRZ.js → F0CanvasPanel-kbwLvapQ.js} +15672 -15669
- package/dist/{index-SaYqmPwO.js → F0DocumentViewer-Bk7ciWZW.js} +142 -149
- package/dist/{F0Map-CNWfSFZ1.js → F0Map-B_XG6Txo.js} +4 -4
- package/dist/{F0VideoPlayer-D7c3Yh3w.js → F0VideoPlayer-Cdq6rTqq.js} +48 -48
- package/dist/{MapProvider-27XPHPiu.js → MapProvider-DrUuwDLP.js} +13645 -13652
- package/dist/{SheetViewer-1drEsfd7.js → SheetViewer-DgLdv4qf.js} +3 -3
- package/dist/{TextViewer-EXSsPDXE.js → TextViewer-7qYfyanJ.js} +2 -2
- package/dist/ai.d.ts +32 -21
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +12 -12
- package/dist/component-status.js +1 -1
- package/dist/{experimental-B8-mgCce.js → experimental-B_Hvv6tU.js} +166 -165
- package/dist/experimental.d.ts +72 -67
- package/dist/experimental.js +63 -63
- package/dist/f0.d.ts +334 -104
- package/dist/f0.js +6788 -6781
- package/dist/i18n-provider-defaults.d.ts +12 -12
- package/dist/index-BGG-4WaL.js +4 -0
- package/dist/{index-C3NBN1Ds.js → index-BQthngzU.js} +2 -2
- package/dist/index-CzPx-LpF.js +8 -0
- package/dist/{index-BC3sRBhO.js → index-HEb5Ocnl.js} +3 -3
- package/dist/{index-P3wd7w_Q.js → index-QJVt3QQ2.js} +1 -1
- package/dist/pdfWorker-CX_u28dQ.js +13120 -0
- package/package.json +1 -1
- package/dist/index-6YSyIntj.js +0 -4
- package/dist/pdfWorker-Bt3dfOGU.js +0 -13120
- /package/dist/{index2.css → F0DocumentViewer.css} +0 -0
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import { S as E, z as Ce, u as X, A as Te, w as Le, j as Fe, k as De, l as Ve, B as Ee, m as He, E as Ue, G as Oe, H as We, J as je } from "./F0CanvasPanel-WVtVnJRZ.js";
|
|
2
1
|
import { jsx as r, jsxs as P } from "react/jsx-runtime";
|
|
3
|
-
import { lazy as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { lazy as X, forwardRef as ce, Suspense as Ce, useState as U, useRef as A, useCallback as w, useMemo as ie, useEffect as V } from "react";
|
|
3
|
+
import { S as E, z as _e, u as Y, A as Te, w as Le, j as Fe, k as De, l as Ve, B as Ee, m as He, E as Ue, G as We, H as Oe, J as je } from "./F0CanvasPanel-kbwLvapQ.js";
|
|
4
|
+
import { e as $e, D as ze, P as Be } from "./pdfWorker-CX_u28dQ.js";
|
|
5
|
+
import { F as Me } from "./Printer-BD-FEi_2.js";
|
|
6
6
|
import { d as G } from "./tooltip-CrXp1Uaz.js";
|
|
7
|
-
import './
|
|
7
|
+
import './F0DocumentViewer.css';const ut = [
|
|
8
|
+
"page-width",
|
|
9
|
+
"page-fit",
|
|
10
|
+
"0.5",
|
|
11
|
+
"0.75",
|
|
12
|
+
"1",
|
|
13
|
+
"1.25",
|
|
14
|
+
"1.5",
|
|
15
|
+
"2",
|
|
16
|
+
"3",
|
|
17
|
+
"4"
|
|
18
|
+
], Ie = ({
|
|
8
19
|
label: e,
|
|
9
20
|
width: t,
|
|
10
21
|
height: o
|
|
@@ -24,13 +35,13 @@ import './index2.css';const Ge = ({
|
|
|
24
35
|
}
|
|
25
36
|
)
|
|
26
37
|
}
|
|
27
|
-
),
|
|
38
|
+
), N = ({
|
|
28
39
|
label: e,
|
|
29
40
|
icon: t,
|
|
30
41
|
onClick: o,
|
|
31
42
|
size: i = "md"
|
|
32
43
|
}) => /* @__PURE__ */ r(
|
|
33
|
-
|
|
44
|
+
_e,
|
|
34
45
|
{
|
|
35
46
|
label: e,
|
|
36
47
|
icon: t,
|
|
@@ -39,10 +50,10 @@ import './index2.css';const Ge = ({
|
|
|
39
50
|
variant: "outline",
|
|
40
51
|
size: i
|
|
41
52
|
}
|
|
42
|
-
),
|
|
53
|
+
), Ae = (e) => G(
|
|
43
54
|
"z-10 flex flex-row items-center gap-2",
|
|
44
55
|
e === "top" ? "F0DocumentViewer__surface sticky top-0 justify-between px-6 py-4" : "absolute bottom-4 left-1/2 w-max max-w-[calc(100%-2rem)] -translate-x-1/2 gap-4 rounded-xl bg-f1-background-inverse p-2 text-f1-foreground-inverse shadow-lg backdrop-blur-sm"
|
|
45
|
-
),
|
|
56
|
+
), Ge = (e, t) => G(
|
|
46
57
|
"flex flex-row items-center gap-2",
|
|
47
58
|
e === "floating" && "dark",
|
|
48
59
|
t
|
|
@@ -57,15 +68,15 @@ import './index2.css';const Ge = ({
|
|
|
57
68
|
onNextPage: h,
|
|
58
69
|
onZoomIn: u,
|
|
59
70
|
onZoomOut: b,
|
|
60
|
-
onScaleChange:
|
|
71
|
+
onScaleChange: C,
|
|
61
72
|
rotatable: y,
|
|
62
73
|
onRotate: x,
|
|
63
|
-
onPrint:
|
|
74
|
+
onPrint: W,
|
|
64
75
|
onDownload: m,
|
|
65
|
-
actions:
|
|
76
|
+
actions: _,
|
|
66
77
|
placement: v
|
|
67
78
|
}) => {
|
|
68
|
-
const { pdfViewer: p } =
|
|
79
|
+
const { pdfViewer: p } = Y(), g = Ge(v);
|
|
69
80
|
return /* @__PURE__ */ P(
|
|
70
81
|
"div",
|
|
71
82
|
{
|
|
@@ -73,7 +84,7 @@ import './index2.css';const Ge = ({
|
|
|
73
84
|
role: "toolbar",
|
|
74
85
|
"aria-label": p.toolbar,
|
|
75
86
|
"data-placement": v,
|
|
76
|
-
className:
|
|
87
|
+
className: Ae(v),
|
|
77
88
|
children: [
|
|
78
89
|
i ? /* @__PURE__ */ P(
|
|
79
90
|
"span",
|
|
@@ -92,7 +103,7 @@ import './index2.css';const Ge = ({
|
|
|
92
103
|
) : null,
|
|
93
104
|
/* @__PURE__ */ P("div", { className: g, children: [
|
|
94
105
|
/* @__PURE__ */ r(
|
|
95
|
-
|
|
106
|
+
N,
|
|
96
107
|
{
|
|
97
108
|
label: p.previousPage,
|
|
98
109
|
onClick: c,
|
|
@@ -101,7 +112,7 @@ import './index2.css';const Ge = ({
|
|
|
101
112
|
}
|
|
102
113
|
),
|
|
103
114
|
/* @__PURE__ */ r(
|
|
104
|
-
|
|
115
|
+
N,
|
|
105
116
|
{
|
|
106
117
|
label: p.nextPage,
|
|
107
118
|
onClick: h,
|
|
@@ -112,7 +123,7 @@ import './index2.css';const Ge = ({
|
|
|
112
123
|
] }),
|
|
113
124
|
/* @__PURE__ */ P("div", { className: g, children: [
|
|
114
125
|
/* @__PURE__ */ r(
|
|
115
|
-
|
|
126
|
+
N,
|
|
116
127
|
{
|
|
117
128
|
label: p.zoomOut,
|
|
118
129
|
onClick: b,
|
|
@@ -120,7 +131,7 @@ import './index2.css';const Ge = ({
|
|
|
120
131
|
}
|
|
121
132
|
),
|
|
122
133
|
/* @__PURE__ */ r(
|
|
123
|
-
|
|
134
|
+
N,
|
|
124
135
|
{
|
|
125
136
|
label: p.zoomIn,
|
|
126
137
|
onClick: u,
|
|
@@ -134,13 +145,13 @@ import './index2.css';const Ge = ({
|
|
|
134
145
|
label: p.scaleSelector,
|
|
135
146
|
options: s,
|
|
136
147
|
value: l,
|
|
137
|
-
onChange: (R) =>
|
|
148
|
+
onChange: (R) => C(R)
|
|
138
149
|
}
|
|
139
150
|
)
|
|
140
151
|
] }),
|
|
141
152
|
/* @__PURE__ */ P("div", { className: g, children: [
|
|
142
153
|
y ? /* @__PURE__ */ r(
|
|
143
|
-
|
|
154
|
+
N,
|
|
144
155
|
{
|
|
145
156
|
label: p.rotate,
|
|
146
157
|
onClick: x,
|
|
@@ -148,23 +159,23 @@ import './index2.css';const Ge = ({
|
|
|
148
159
|
}
|
|
149
160
|
) : null,
|
|
150
161
|
/* @__PURE__ */ r(
|
|
151
|
-
|
|
162
|
+
N,
|
|
152
163
|
{
|
|
153
164
|
label: p.print,
|
|
154
|
-
onClick:
|
|
155
|
-
icon:
|
|
165
|
+
onClick: W,
|
|
166
|
+
icon: Me
|
|
156
167
|
}
|
|
157
168
|
),
|
|
158
169
|
/* @__PURE__ */ r(
|
|
159
|
-
|
|
170
|
+
N,
|
|
160
171
|
{
|
|
161
172
|
label: p.download,
|
|
162
173
|
onClick: m,
|
|
163
174
|
icon: He
|
|
164
175
|
}
|
|
165
176
|
),
|
|
166
|
-
|
|
167
|
-
|
|
177
|
+
_?.map((R, S) => /* @__PURE__ */ r(
|
|
178
|
+
N,
|
|
168
179
|
{
|
|
169
180
|
label: R.label,
|
|
170
181
|
onClick: R.onClick,
|
|
@@ -176,12 +187,35 @@ import './index2.css';const Ge = ({
|
|
|
176
187
|
]
|
|
177
188
|
}
|
|
178
189
|
);
|
|
179
|
-
},
|
|
190
|
+
}, Ze = (e, t) => t ? (Math.round(t * e) + 1e-3) / t : e, qe = (e, t = window.devicePixelRatio || 1) => {
|
|
180
191
|
!e || e.width === 0 || e.height === 0 || (e.style.width = `${e.width / t}px`, e.style.height = `${e.height / t}px`);
|
|
192
|
+
}, Je = () => {
|
|
193
|
+
const { pdfViewer: e } = Y();
|
|
194
|
+
return /* @__PURE__ */ P(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
role: "status",
|
|
198
|
+
"aria-busy": "true",
|
|
199
|
+
"aria-live": "polite",
|
|
200
|
+
"aria-label": e.loading,
|
|
201
|
+
className: G(
|
|
202
|
+
"F0DocumentViewer__surface flex h-full w-full flex-col overflow-hidden",
|
|
203
|
+
"border border-solid border-f1-border-secondary"
|
|
204
|
+
),
|
|
205
|
+
children: [
|
|
206
|
+
/* @__PURE__ */ P("div", { className: "flex flex-row items-center justify-between gap-2 px-6 py-4", children: [
|
|
207
|
+
/* @__PURE__ */ r(E, { className: "h-8 w-24 rounded-md" }),
|
|
208
|
+
/* @__PURE__ */ r(E, { className: "h-8 w-40 rounded-md" }),
|
|
209
|
+
/* @__PURE__ */ r(E, { className: "h-8 w-20 rounded-md" })
|
|
210
|
+
] }),
|
|
211
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 justify-center p-4", children: /* @__PURE__ */ r(E, { className: "h-full w-full max-w-[600px] rounded-md" }) })
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
);
|
|
181
215
|
}, de = async (e) => {
|
|
182
216
|
const t = await e.saveDocument();
|
|
183
217
|
return new Blob([new Uint8Array(t)], { type: "application/pdf" });
|
|
184
|
-
},
|
|
218
|
+
}, Ke = async (e) => {
|
|
185
219
|
if (!e)
|
|
186
220
|
return;
|
|
187
221
|
const t = URL.createObjectURL(await de(e)), o = document.createElement("iframe");
|
|
@@ -192,12 +226,12 @@ import './index2.css';const Ge = ({
|
|
|
192
226
|
};
|
|
193
227
|
o.contentWindow?.addEventListener("afterprint", i), setTimeout(i, 6e4);
|
|
194
228
|
}, document.body.appendChild(o);
|
|
195
|
-
},
|
|
229
|
+
}, Qe = async (e, t) => {
|
|
196
230
|
if (!e)
|
|
197
231
|
return;
|
|
198
232
|
const o = URL.createObjectURL(await de(e)), i = document.createElement("a");
|
|
199
233
|
i.href = o, i.download = t.length > 0 ? t : "document.pdf", document.body.appendChild(i), i.click(), i.remove(), URL.revokeObjectURL(o);
|
|
200
|
-
},
|
|
234
|
+
}, mt = async (e, t, o = !0) => {
|
|
201
235
|
let i = e, l;
|
|
202
236
|
try {
|
|
203
237
|
const c = await fetch(e, {
|
|
@@ -219,26 +253,26 @@ import './index2.css';const Ge = ({
|
|
|
219
253
|
"2",
|
|
220
254
|
"3",
|
|
221
255
|
"4"
|
|
222
|
-
], fe = Q.map(Number),
|
|
256
|
+
], fe = Q.map(Number), Xe = (e) => fe.find((t) => t > e), Ye = (e) => [...fe].reverse().find((t) => t < e), et = (e, t, o) => {
|
|
223
257
|
let i = null, l = 0;
|
|
224
258
|
return t.forEach((s, c) => {
|
|
225
259
|
if (!s)
|
|
226
260
|
return;
|
|
227
|
-
const h = s.offsetHeight, u = s.offsetTop, b = u + h,
|
|
261
|
+
const h = s.offsetHeight, u = s.offsetTop, b = u + h, C = e.offsetHeight - o, y = e.scrollTop + o, x = y + C;
|
|
228
262
|
if (!(y < b && x > u))
|
|
229
263
|
return;
|
|
230
264
|
let m;
|
|
231
265
|
if (y <= u)
|
|
232
266
|
m = x > b ? h : x - u;
|
|
233
267
|
else {
|
|
234
|
-
let
|
|
235
|
-
x < b && (
|
|
268
|
+
let _ = y - u;
|
|
269
|
+
x < b && (_ += b - x), m = h - _;
|
|
236
270
|
}
|
|
237
271
|
m > l && (l = m, i = c + 1);
|
|
238
272
|
}), i;
|
|
239
273
|
};
|
|
240
|
-
|
|
241
|
-
const
|
|
274
|
+
$e();
|
|
275
|
+
const tt = X(() => import("./SheetViewer-DgLdv4qf.js")), ot = X(() => import("./DocxViewer-DXUC2CUW.js")), nt = X(() => import("./TextViewer-7qYfyanJ.js")), se = 48, rt = 150, ue = ce((e, t) => {
|
|
242
276
|
const { kind: o = "pdf", mimeType: i, toolbar: l = "top", ...s } = e;
|
|
243
277
|
if (o === "pdf")
|
|
244
278
|
return /* @__PURE__ */ r(me, { ref: t, toolbar: l, ...s });
|
|
@@ -247,12 +281,12 @@ const ot = Y(() => import("./SheetViewer-1drEsfd7.js")), nt = Y(() => import("./
|
|
|
247
281
|
filename: h,
|
|
248
282
|
actions: u,
|
|
249
283
|
withCredentials: b = !0,
|
|
250
|
-
page:
|
|
284
|
+
page: C,
|
|
251
285
|
pagesToDisplay: y,
|
|
252
286
|
initialScale: x,
|
|
253
|
-
rotatable:
|
|
287
|
+
rotatable: W,
|
|
254
288
|
initialRotation: m,
|
|
255
|
-
onRotationChange:
|
|
289
|
+
onRotationChange: _,
|
|
256
290
|
onPdfLoaded: v,
|
|
257
291
|
onPageChange: p,
|
|
258
292
|
...g
|
|
@@ -263,9 +297,9 @@ const ot = Y(() => import("./SheetViewer-1drEsfd7.js")), nt = Y(() => import("./
|
|
|
263
297
|
ref: t,
|
|
264
298
|
...g,
|
|
265
299
|
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
266
|
-
children: /* @__PURE__ */ P(
|
|
300
|
+
children: /* @__PURE__ */ P(Ce, { fallback: /* @__PURE__ */ r(E, { className: "h-full w-full rounded-none" }), children: [
|
|
267
301
|
o === "sheet" ? /* @__PURE__ */ r(
|
|
268
|
-
|
|
302
|
+
tt,
|
|
269
303
|
{
|
|
270
304
|
url: c,
|
|
271
305
|
filename: h,
|
|
@@ -275,7 +309,7 @@ const ot = Y(() => import("./SheetViewer-1drEsfd7.js")), nt = Y(() => import("./
|
|
|
275
309
|
}
|
|
276
310
|
) : null,
|
|
277
311
|
o === "docx" ? /* @__PURE__ */ r(
|
|
278
|
-
|
|
312
|
+
ot,
|
|
279
313
|
{
|
|
280
314
|
url: c,
|
|
281
315
|
filename: h,
|
|
@@ -285,7 +319,7 @@ const ot = Y(() => import("./SheetViewer-1drEsfd7.js")), nt = Y(() => import("./
|
|
|
285
319
|
}
|
|
286
320
|
) : null,
|
|
287
321
|
o === "text" ? /* @__PURE__ */ r(
|
|
288
|
-
|
|
322
|
+
nt,
|
|
289
323
|
{
|
|
290
324
|
url: c,
|
|
291
325
|
name: h ?? "",
|
|
@@ -310,19 +344,19 @@ const me = ce((e, t) => {
|
|
|
310
344
|
withCredentials: h = !0,
|
|
311
345
|
rotatable: u = !1,
|
|
312
346
|
initialRotation: b = 0,
|
|
313
|
-
onRotationChange:
|
|
347
|
+
onRotationChange: C,
|
|
314
348
|
onPdfLoaded: y,
|
|
315
349
|
onPageChange: x,
|
|
316
|
-
actions:
|
|
350
|
+
actions: W,
|
|
317
351
|
toolbar: m = "top",
|
|
318
|
-
...
|
|
319
|
-
} = e, { pdfViewer: v } =
|
|
352
|
+
..._
|
|
353
|
+
} = e, { pdfViewer: v } = Y(), p = Math.max(
|
|
320
354
|
2,
|
|
321
355
|
typeof window > "u" ? 1 : window.devicePixelRatio || 1
|
|
322
|
-
), [g, R] = U(null), [S, ee] = U([]), [T, Z] = U(1), [k, te] = U(0), [L, q] = U(c), [F,
|
|
356
|
+
), [g, R] = U(null), [S, ee] = U([]), [T, Z] = U(1), [k, te] = U(0), [L, q] = U(c), [F, pe] = U(b), $ = A(null), J = A(null), O = A([]), z = s.length > 0 ? s.length : g?.numPages, B = w(
|
|
323
357
|
() => m === "top" ? J.current?.offsetHeight ?? 0 : 0,
|
|
324
358
|
[m]
|
|
325
|
-
), oe = S.find(Boolean), ne = (oe?.originalWidth ?? 595) * T, re = (oe?.originalHeight ?? 842) * T,
|
|
359
|
+
), oe = S.find(Boolean), ne = (oe?.originalWidth ?? 595) * T, re = (oe?.originalHeight ?? 842) * T, ge = ie(
|
|
326
360
|
() => [
|
|
327
361
|
{ value: "page-width", label: v.pageWidth },
|
|
328
362
|
{ value: "page-fit", label: v.pageFit },
|
|
@@ -332,22 +366,22 @@ const me = ce((e, t) => {
|
|
|
332
366
|
}))
|
|
333
367
|
],
|
|
334
368
|
[v.pageWidth, v.pageFit]
|
|
335
|
-
),
|
|
369
|
+
), he = ie(() => ({ url: o, withCredentials: h }), [o, h]), H = w(
|
|
336
370
|
(n) => {
|
|
337
|
-
const a = (z ?? 1) - 1, d = Math.min(Math.max(n, 0), a), f =
|
|
338
|
-
f && D instanceof HTMLElement && (D.scrollTop = f.offsetTop -
|
|
371
|
+
const a = (z ?? 1) - 1, d = Math.min(Math.max(n, 0), a), f = O.current[d], D = f?.offsetParent;
|
|
372
|
+
f && D instanceof HTMLElement && (D.scrollTop = f.offsetTop - B() - 10);
|
|
339
373
|
},
|
|
340
|
-
[z,
|
|
374
|
+
[z, B]
|
|
341
375
|
), j = w(
|
|
342
376
|
(n) => {
|
|
343
377
|
const a = S[k - 1], d = $.current;
|
|
344
378
|
if (!a || !d)
|
|
345
379
|
return;
|
|
346
|
-
const f = J.current?.offsetHeight ?? 0, D = F === 90 || F === 270, I = D ? a.originalHeight : a.originalWidth,
|
|
380
|
+
const f = J.current?.offsetHeight ?? 0, D = F === 90 || F === 270, I = D ? a.originalHeight : a.originalWidth, ke = D ? a.originalWidth : a.originalHeight, Ne = n === "page-width" ? (d.clientWidth - se) / I : (d.clientHeight - f - se) / ke;
|
|
347
381
|
Z(Ne), q(n);
|
|
348
382
|
},
|
|
349
383
|
[S, k, F]
|
|
350
|
-
),
|
|
384
|
+
), be = w(
|
|
351
385
|
(n) => {
|
|
352
386
|
if (n === "page-width" || n === "page-fit") {
|
|
353
387
|
j(n);
|
|
@@ -356,50 +390,50 @@ const me = ce((e, t) => {
|
|
|
356
390
|
Z(Number(n)), q(n);
|
|
357
391
|
},
|
|
358
392
|
[j]
|
|
359
|
-
),
|
|
393
|
+
), M = w((n) => {
|
|
360
394
|
if (n === void 0)
|
|
361
395
|
return;
|
|
362
396
|
Z(n);
|
|
363
397
|
const a = Q.find((d) => Number(d) === n);
|
|
364
398
|
a && q(a);
|
|
365
|
-
}, []),
|
|
366
|
-
() =>
|
|
367
|
-
[T,
|
|
368
|
-
),
|
|
369
|
-
() =>
|
|
370
|
-
[T,
|
|
371
|
-
),
|
|
372
|
-
|
|
399
|
+
}, []), we = w(
|
|
400
|
+
() => M(Xe(T)),
|
|
401
|
+
[T, M]
|
|
402
|
+
), xe = w(
|
|
403
|
+
() => M(Ye(T)),
|
|
404
|
+
[T, M]
|
|
405
|
+
), ve = w(() => {
|
|
406
|
+
pe((n) => {
|
|
373
407
|
const a = (n + 90) % 360;
|
|
374
|
-
return
|
|
408
|
+
return C?.(a), a;
|
|
375
409
|
});
|
|
376
|
-
}, [
|
|
410
|
+
}, [C]), ye = w(
|
|
377
411
|
(n) => {
|
|
378
412
|
R(n), y?.(n), setTimeout(() => {
|
|
379
413
|
te(l + 1), H(l);
|
|
380
414
|
}, 0);
|
|
381
415
|
},
|
|
382
416
|
[y, l, H]
|
|
383
|
-
),
|
|
417
|
+
), Pe = w(
|
|
384
418
|
(n) => {
|
|
385
419
|
const a = n.target;
|
|
386
420
|
if (!(a instanceof HTMLElement))
|
|
387
421
|
return;
|
|
388
|
-
const d =
|
|
422
|
+
const d = et(
|
|
389
423
|
a,
|
|
390
|
-
|
|
391
|
-
|
|
424
|
+
O.current,
|
|
425
|
+
B()
|
|
392
426
|
);
|
|
393
427
|
d && te(d);
|
|
394
428
|
},
|
|
395
|
-
[
|
|
396
|
-
),
|
|
397
|
-
|
|
398
|
-
}, [g]),
|
|
399
|
-
|
|
429
|
+
[B]
|
|
430
|
+
), Re = w(() => {
|
|
431
|
+
Ke(g);
|
|
432
|
+
}, [g]), Se = w(() => {
|
|
433
|
+
Qe(g, i);
|
|
400
434
|
}, [g, i]);
|
|
401
435
|
V(() => {
|
|
402
|
-
R(null), ee([]),
|
|
436
|
+
R(null), ee([]), O.current = [];
|
|
403
437
|
}, [o]), V(() => {
|
|
404
438
|
H(l);
|
|
405
439
|
}, [l, H]), V(() => {
|
|
@@ -410,12 +444,12 @@ const me = ce((e, t) => {
|
|
|
410
444
|
(L === "page-width" || L === "page-fit") && j(L);
|
|
411
445
|
}, [F]);
|
|
412
446
|
const K = A();
|
|
413
|
-
|
|
447
|
+
je({
|
|
414
448
|
ref: $,
|
|
415
449
|
onResize: () => {
|
|
416
450
|
clearTimeout(K.current), K.current = setTimeout(() => {
|
|
417
451
|
(L === "page-width" || L === "page-fit") && j(L);
|
|
418
|
-
},
|
|
452
|
+
}, rt);
|
|
419
453
|
}
|
|
420
454
|
}), V(function() {
|
|
421
455
|
return () => clearTimeout(K.current);
|
|
@@ -436,40 +470,40 @@ const me = ce((e, t) => {
|
|
|
436
470
|
totalPages: z,
|
|
437
471
|
hasDocument: !!g?.numPages,
|
|
438
472
|
selectedScale: L,
|
|
439
|
-
scaleOptions:
|
|
473
|
+
scaleOptions: ge,
|
|
440
474
|
onPreviousPage: () => H(k - 2),
|
|
441
475
|
onNextPage: () => H(k),
|
|
442
|
-
onZoomIn:
|
|
443
|
-
onZoomOut:
|
|
444
|
-
onScaleChange:
|
|
476
|
+
onZoomIn: we,
|
|
477
|
+
onZoomOut: xe,
|
|
478
|
+
onScaleChange: be,
|
|
445
479
|
rotatable: u,
|
|
446
|
-
onRotate:
|
|
447
|
-
onPrint:
|
|
448
|
-
onDownload:
|
|
449
|
-
actions:
|
|
480
|
+
onRotate: ve,
|
|
481
|
+
onPrint: Re,
|
|
482
|
+
onDownload: Se,
|
|
483
|
+
actions: W
|
|
450
484
|
};
|
|
451
485
|
return /* @__PURE__ */ P(
|
|
452
486
|
"div",
|
|
453
487
|
{
|
|
454
488
|
ref: t,
|
|
455
|
-
...
|
|
489
|
+
..._,
|
|
456
490
|
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
457
491
|
children: [
|
|
458
492
|
/* @__PURE__ */ P(
|
|
459
493
|
"div",
|
|
460
494
|
{
|
|
461
495
|
ref: $,
|
|
462
|
-
onScroll:
|
|
496
|
+
onScroll: Pe,
|
|
463
497
|
className: "F0DocumentViewer__surface relative flex h-full flex-col overflow-auto [scrollbar-gutter:stable_both-edges]",
|
|
464
498
|
children: [
|
|
465
499
|
m === "top" ? /* @__PURE__ */ r(le, { ...ae }) : null,
|
|
466
500
|
o ? /* @__PURE__ */ r(
|
|
467
|
-
|
|
501
|
+
ze,
|
|
468
502
|
{
|
|
469
|
-
file:
|
|
470
|
-
onLoadSuccess:
|
|
503
|
+
file: he,
|
|
504
|
+
onLoadSuccess: ye,
|
|
471
505
|
loading: /* @__PURE__ */ r(
|
|
472
|
-
|
|
506
|
+
Ie,
|
|
473
507
|
{
|
|
474
508
|
label: v.loading,
|
|
475
509
|
width: ne,
|
|
@@ -487,7 +521,7 @@ const me = ce((e, t) => {
|
|
|
487
521
|
{
|
|
488
522
|
className: "overflow-hidden rounded-lg border border-solid border-f1-border-secondary shadow-md",
|
|
489
523
|
pageNumber: d,
|
|
490
|
-
scale:
|
|
524
|
+
scale: Ze(
|
|
491
525
|
T,
|
|
492
526
|
F === 90 || F === 270 ? S[a]?.originalHeight : S[a]?.originalWidth
|
|
493
527
|
),
|
|
@@ -505,10 +539,10 @@ const me = ce((e, t) => {
|
|
|
505
539
|
renderForms: !0,
|
|
506
540
|
renderTextLayer: !0,
|
|
507
541
|
inputRef: (f) => {
|
|
508
|
-
|
|
542
|
+
O.current[a] = f;
|
|
509
543
|
},
|
|
510
|
-
onRenderSuccess: () =>
|
|
511
|
-
|
|
544
|
+
onRenderSuccess: () => qe(
|
|
545
|
+
O.current[a]?.querySelector(
|
|
512
546
|
"canvas"
|
|
513
547
|
),
|
|
514
548
|
p
|
|
@@ -539,62 +573,21 @@ const me = ce((e, t) => {
|
|
|
539
573
|
);
|
|
540
574
|
});
|
|
541
575
|
me.displayName = "PdfViewerBase";
|
|
542
|
-
const
|
|
543
|
-
const { pdfViewer: e } = X();
|
|
544
|
-
return /* @__PURE__ */ P(
|
|
545
|
-
"div",
|
|
546
|
-
{
|
|
547
|
-
role: "status",
|
|
548
|
-
"aria-busy": "true",
|
|
549
|
-
"aria-live": "polite",
|
|
550
|
-
"aria-label": e.loading,
|
|
551
|
-
className: G(
|
|
552
|
-
"F0DocumentViewer__surface flex h-full w-full flex-col overflow-hidden",
|
|
553
|
-
"border border-solid border-f1-border-secondary"
|
|
554
|
-
),
|
|
555
|
-
children: [
|
|
556
|
-
/* @__PURE__ */ P("div", { className: "flex flex-row items-center justify-between gap-2 px-6 py-4", children: [
|
|
557
|
-
/* @__PURE__ */ r(E, { className: "h-8 w-24 rounded-md" }),
|
|
558
|
-
/* @__PURE__ */ r(E, { className: "h-8 w-40 rounded-md" }),
|
|
559
|
-
/* @__PURE__ */ r(E, { className: "h-8 w-20 rounded-md" })
|
|
560
|
-
] }),
|
|
561
|
-
/* @__PURE__ */ r("div", { className: "flex flex-1 justify-center p-4", children: /* @__PURE__ */ r(E, { className: "h-full w-full max-w-[600px] rounded-md" }) })
|
|
562
|
-
]
|
|
563
|
-
}
|
|
564
|
-
);
|
|
565
|
-
}, lt = [
|
|
566
|
-
"page-width",
|
|
567
|
-
"page-fit",
|
|
568
|
-
"0.5",
|
|
569
|
-
"0.75",
|
|
570
|
-
"1",
|
|
571
|
-
"1.25",
|
|
572
|
-
"1.5",
|
|
573
|
-
"2",
|
|
574
|
-
"3",
|
|
575
|
-
"4"
|
|
576
|
-
], pe = Oe(
|
|
576
|
+
const at = Ue(
|
|
577
577
|
We(
|
|
578
578
|
"F0DocumentViewer",
|
|
579
|
-
|
|
579
|
+
Oe(ue, Je)
|
|
580
580
|
)
|
|
581
|
-
),
|
|
582
|
-
__proto__: null,
|
|
583
|
-
F0DocumentViewer: pe,
|
|
584
|
-
F0PdfViewer: st,
|
|
585
|
-
configurePdfWorker: Ie,
|
|
586
|
-
pdfScales: lt
|
|
587
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
581
|
+
), pt = at;
|
|
588
582
|
export {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
583
|
+
at as F,
|
|
584
|
+
N as T,
|
|
585
|
+
pt as a,
|
|
586
|
+
Ye as b,
|
|
587
|
+
Ge as c,
|
|
588
|
+
mt as d,
|
|
595
589
|
Q as f,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
Ze as t
|
|
590
|
+
Xe as n,
|
|
591
|
+
ut as p,
|
|
592
|
+
Ae as t
|
|
600
593
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as B, Fragment as De } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as ie, useMemo as ze, useEffect as j, useState as E, useRef as N, useLayoutEffect as Hn, useContext as Xn, createContext as Yn, useCallback as O, useId as Un, useImperativeHandle as Gn } from "react";
|
|
3
|
-
import { y as we, a5 as Zn, v as en, a6 as nt, a7 as lt, a8 as Oe, a9 as oe, aa as tn, u as se, z as Fe, ab as Kn, ac as qn, ad as Vn, j as Jn, ae as Qn, af as nn, ag as ea, ah as ta, ai as Rt, aj as an, ak as na } from "./F0CanvasPanel-
|
|
4
|
-
import { c as aa, d as oa, e as la } from "./MapProvider-
|
|
3
|
+
import { y as we, a5 as Zn, v as en, a6 as nt, a7 as lt, a8 as Oe, a9 as oe, aa as tn, u as se, z as Fe, ab as Kn, ac as qn, ad as Vn, j as Jn, ae as Qn, af as nn, ag as ea, ah as ta, ai as Rt, aj as an, ak as na } from "./F0CanvasPanel-kbwLvapQ.js";
|
|
4
|
+
import { c as aa, d as oa, e as la } from "./MapProvider-DrUuwDLP.js";
|
|
5
5
|
import { d as D, f as ra } from "./tooltip-CrXp1Uaz.js";
|
|
6
6
|
import { createPortal as ia } from "react-dom";
|
|
7
7
|
const sa = (e, t) => ({
|
|
@@ -1527,11 +1527,11 @@ const Lo = {
|
|
|
1527
1527
|
}, []);
|
|
1528
1528
|
return j(() => () => a.current?.disconnect(), []), { containerRef: l, isDark: e };
|
|
1529
1529
|
}, Ya = {
|
|
1530
|
-
maplibre: () => import("./index-
|
|
1530
|
+
maplibre: () => import("./index-BQthngzU.js").then((e) => e.createMaplibreAdapter),
|
|
1531
1531
|
// Google needs its script in the page before a map can be constructed, so the
|
|
1532
1532
|
// loader resolves only once the API is up - which is what keeps the factory
|
|
1533
1533
|
// itself synchronous for every engine.
|
|
1534
|
-
google: (e) => import("./index-
|
|
1534
|
+
google: (e) => import("./index-QJVt3QQ2.js").then((t) => t.loadGoogleAdapter(e))
|
|
1535
1535
|
}, at = /* @__PURE__ */ new Map(), Ua = (e, t) => {
|
|
1536
1536
|
const a = at.get(e);
|
|
1537
1537
|
if (a)
|