react-iiif-vault 1.0.10 → 1.0.11
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/bundle/cjs/index.js +3 -3
- package/dist/bundle/cjs/index.js.map +1 -1
- package/dist/bundle/esm/index.mjs +360 -355
- package/dist/bundle/esm/index.mjs.map +1 -1
- package/dist/canvas-panel/cjs/canvas-panel.js +2 -2
- package/dist/canvas-panel/cjs/canvas-panel.js.map +1 -1
- package/dist/canvas-panel/esm/canvas-panel.mjs +233 -228
- package/dist/canvas-panel/esm/canvas-panel.mjs.map +1 -1
- package/dist/index.umd.js +26 -26
- package/dist/index.umd.js.map +1 -1
- package/dist/react17/cjs/index.js +3 -3
- package/dist/react17/cjs/index.js.map +1 -1
- package/dist/react17/esm/index.mjs +360 -355
- package/dist/react17/esm/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d, jsxs as X, Fragment as Oe } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { AtlasAuto as Sn, ModeContext as xn, mergeStyles as Tn, RegionHighlight as
|
|
2
|
+
import Ee, { createContext as Te, Component as wn, createElement as St, isValidElement as Pn, useContext as ue, useMemo as N, useState as ie, useEffect as be, useRef as xe, useCallback as Q, useLayoutEffect as st, Fragment as Ye, useReducer as On, forwardRef as ct, useImperativeHandle as Et } from "react";
|
|
3
|
+
import { AtlasAuto as Sn, ModeContext as xn, mergeStyles as Tn, RegionHighlight as In, TileSet as En, HTMLPortal as Cn, useCanvas as jn } from "@atlas-viewer/atlas";
|
|
4
4
|
import { globalVault as Ct, Vault as xt } from "@iiif/helpers/vault";
|
|
5
5
|
import { createStylesHelper as ut } from "@iiif/helpers/styles";
|
|
6
6
|
import { expandTarget as ot } from "@iiif/helpers/annotation-targets";
|
|
@@ -9,7 +9,7 @@ import { expandTarget as Mn } from "@iiif/helpers";
|
|
|
9
9
|
import { ImageServiceLoader as Rn, getImageServices as it, createImageServiceRequest as Ln, imageServiceRequestToString as An } from "@atlas-viewer/iiif-image-api";
|
|
10
10
|
import { createThumbnailHelper as kn } from "@iiif/helpers/thumbnail";
|
|
11
11
|
import Nn from "react-dom";
|
|
12
|
-
const Vn =
|
|
12
|
+
const Vn = Te(null), tt = {
|
|
13
13
|
didCatch: !1,
|
|
14
14
|
error: null
|
|
15
15
|
};
|
|
@@ -100,7 +100,7 @@ const Bn = {
|
|
|
100
100
|
canvas: void 0,
|
|
101
101
|
annotation: void 0,
|
|
102
102
|
annotationPage: void 0
|
|
103
|
-
}, lt =
|
|
103
|
+
}, lt = Ee.createContext(Bn), je = () => ue(lt);
|
|
104
104
|
function Le({ value: e, children: t }) {
|
|
105
105
|
const n = je(), o = N(() => ({
|
|
106
106
|
...n,
|
|
@@ -108,7 +108,7 @@ function Le({ value: e, children: t }) {
|
|
|
108
108
|
}), [e, n]);
|
|
109
109
|
return /* @__PURE__ */ d(lt.Provider, { value: o, children: t });
|
|
110
110
|
}
|
|
111
|
-
const Ke =
|
|
111
|
+
const Ke = Ee.createContext({
|
|
112
112
|
vault: null,
|
|
113
113
|
setVaultInstance: (e) => {
|
|
114
114
|
}
|
|
@@ -176,7 +176,7 @@ function ye(e, t = []) {
|
|
|
176
176
|
!1
|
|
177
177
|
), t), o;
|
|
178
178
|
}
|
|
179
|
-
const Ge =
|
|
179
|
+
const Ge = Ee.createContext([]);
|
|
180
180
|
function Mt() {
|
|
181
181
|
const e = ue(Ge);
|
|
182
182
|
return ye(
|
|
@@ -255,37 +255,37 @@ function Oo(e, t, n, o = !1) {
|
|
|
255
255
|
const [x, M] = At(e, t);
|
|
256
256
|
if (f)
|
|
257
257
|
return x;
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
258
|
+
const C = x.findIndex((T) => T.id === n);
|
|
259
|
+
if (C === -1)
|
|
260
260
|
return [];
|
|
261
|
-
for (const
|
|
262
|
-
if (
|
|
263
|
-
return
|
|
261
|
+
for (const T of M)
|
|
262
|
+
if (T.includes(C))
|
|
263
|
+
return T.map((b) => x[b]);
|
|
264
264
|
return [{ id: a.id, type: "Canvas" }];
|
|
265
265
|
}
|
|
266
266
|
function At(e, t, { disablePaging: n, skipNonPaged: o } = {}) {
|
|
267
267
|
const r = t.behavior, a = r.includes("paged"), i = a ? !1 : r.includes("continuous"), s = a || i ? !1 : r.includes("individuals"), f = t.type === "Manifest" ? t.items : Rt(e, t);
|
|
268
268
|
if (i)
|
|
269
|
-
return [f, [f.map((
|
|
269
|
+
return [f, [f.map((C, T) => T)]];
|
|
270
270
|
if (s || !a || n)
|
|
271
|
-
return [f, f.map((
|
|
271
|
+
return [f, f.map((C, T) => [T])];
|
|
272
272
|
const h = [];
|
|
273
273
|
let u = [];
|
|
274
274
|
const y = () => {
|
|
275
275
|
u.length && (h.push([...u]), u = []);
|
|
276
276
|
};
|
|
277
277
|
let x = 0, M = !1;
|
|
278
|
-
for (let
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
|
|
278
|
+
for (let C = 0; C < f.length; C++) {
|
|
279
|
+
const T = e.get(f[C]);
|
|
280
|
+
if (T.behavior.includes("non-paged")) {
|
|
281
|
+
C === x && x++, o || (y(), h.push([C]), y());
|
|
282
282
|
continue;
|
|
283
283
|
}
|
|
284
|
-
if (
|
|
285
|
-
u.length && (M = !0), y(), h.push([
|
|
284
|
+
if (C === x || T.behavior.includes("facing-pages")) {
|
|
285
|
+
u.length && (M = !0), y(), h.push([C]), y();
|
|
286
286
|
continue;
|
|
287
287
|
}
|
|
288
|
-
if (u.push(
|
|
288
|
+
if (u.push(C), M) {
|
|
289
289
|
y(), M = !1;
|
|
290
290
|
continue;
|
|
291
291
|
}
|
|
@@ -301,46 +301,51 @@ function kt(e = {}, t = []) {
|
|
|
301
301
|
}, [i, o, ...t]);
|
|
302
302
|
}
|
|
303
303
|
function Wn({ startCanvas: e, disablePaging: t }) {
|
|
304
|
-
var
|
|
304
|
+
var T;
|
|
305
305
|
const n = ae(), o = Ce(), r = kt(), [a, i] = ie(void 0), s = r || o;
|
|
306
306
|
if (!s)
|
|
307
307
|
throw new Error("Nothing selected");
|
|
308
308
|
const [f, h] = N(
|
|
309
309
|
() => At(n, s, { disablePaging: t }),
|
|
310
310
|
[n, s, t]
|
|
311
|
-
), u =
|
|
311
|
+
), u = xe(h);
|
|
312
|
+
if (u.current !== h) {
|
|
313
|
+
const E = u.current[a][0], L = h.findIndex((P) => P.includes(E));
|
|
314
|
+
u.current = h, i(L);
|
|
315
|
+
}
|
|
316
|
+
const y = Q(
|
|
312
317
|
(b) => {
|
|
313
|
-
const E = h.findIndex((
|
|
318
|
+
const E = h.findIndex((L) => L.includes(b));
|
|
314
319
|
i(E === -1 ? 0 : E);
|
|
315
320
|
},
|
|
316
321
|
[f, h]
|
|
317
|
-
),
|
|
322
|
+
), x = Q(
|
|
318
323
|
(b) => {
|
|
319
|
-
const E = f.findIndex((
|
|
320
|
-
E !== -1 ?
|
|
324
|
+
const E = f.findIndex((L) => L.id === b);
|
|
325
|
+
E !== -1 ? y(E) : i(0);
|
|
321
326
|
},
|
|
322
327
|
[f, h]
|
|
323
|
-
),
|
|
328
|
+
), M = Q(() => {
|
|
324
329
|
i((b) => b >= h.length - 1 ? b : b + 1);
|
|
325
|
-
}, [h]),
|
|
330
|
+
}, [h]), C = Q(() => {
|
|
326
331
|
i((b) => b <= 0 ? 0 : b - 1);
|
|
327
332
|
}, [h]);
|
|
328
|
-
return typeof a > "u" && (e ?
|
|
329
|
-
visibleItems: ((
|
|
333
|
+
return typeof a > "u" && (e ? x(e) : i(0)), {
|
|
334
|
+
visibleItems: ((T = h[a]) == null ? void 0 : T.map((b) => f[b].id)) || [],
|
|
330
335
|
cursor: a,
|
|
331
336
|
items: f,
|
|
332
337
|
sequence: h,
|
|
333
338
|
hasPrevious: a > 0,
|
|
334
339
|
hasNext: a < h.length - 1,
|
|
335
340
|
setSequenceIndex: i,
|
|
336
|
-
setCanvasIndex:
|
|
337
|
-
setCanvasId:
|
|
338
|
-
next:
|
|
339
|
-
previous:
|
|
341
|
+
setCanvasIndex: y,
|
|
342
|
+
setCanvasId: x,
|
|
343
|
+
next: M,
|
|
344
|
+
previous: C
|
|
340
345
|
};
|
|
341
346
|
}
|
|
342
347
|
const De = () => {
|
|
343
|
-
}, Xe =
|
|
348
|
+
}, Xe = Te({
|
|
344
349
|
setCurrentCanvasId: De,
|
|
345
350
|
setCurrentCanvasIndex: De,
|
|
346
351
|
nextCanvas: De,
|
|
@@ -412,7 +417,7 @@ function zn() {
|
|
|
412
417
|
function Kn(e) {
|
|
413
418
|
return /* @__PURE__ */ d(ft, { vault: e.bridge.VaultContext.vault || void 0, resources: e.bridge.ResourceContext, children: /* @__PURE__ */ d(Ge.Provider, { value: e.bridge.VisibleCanvasReactContext, children: /* @__PURE__ */ d(Xe.Provider, { value: e.bridge.SimpleViewerReactContext, children: e.children }) }) });
|
|
414
419
|
}
|
|
415
|
-
const
|
|
420
|
+
const Ie = function(e) {
|
|
416
421
|
return function() {
|
|
417
422
|
const t = { type: e, getType: () => e, toString: () => e };
|
|
418
423
|
return (n, o) => ({
|
|
@@ -421,7 +426,7 @@ const Te = function(e) {
|
|
|
421
426
|
...o !== void 0 && { meta: o }
|
|
422
427
|
});
|
|
423
428
|
};
|
|
424
|
-
}, Qn = "@iiif/IMPORT_ENTITIES", Gn = "@iiif/MODIFY_ENTITY_FIELD", Xn = "@iiif/REORDER_ENTITY_FIELD", Jn = "@iiif/ADD_REFERENCE", Zn = "@iiif/UPDATE_REFERENCE", er = "@iiif/REMOVE_REFERENCE", tr = "@iiif/ADD_METADATA", nr = "@iiif/REMOVE_METADATA", rr = "@iiif/UPDATE_METADATA", or = "@iiif/REORDER_METADATA", ir =
|
|
429
|
+
}, Qn = "@iiif/IMPORT_ENTITIES", Gn = "@iiif/MODIFY_ENTITY_FIELD", Xn = "@iiif/REORDER_ENTITY_FIELD", Jn = "@iiif/ADD_REFERENCE", Zn = "@iiif/UPDATE_REFERENCE", er = "@iiif/REMOVE_REFERENCE", tr = "@iiif/ADD_METADATA", nr = "@iiif/REMOVE_METADATA", rr = "@iiif/UPDATE_METADATA", or = "@iiif/REORDER_METADATA", ir = Ie(Qn)(), ar = Ie(Gn)(), sr = Ie(Xn)(), cr = Ie(Jn)(), ur = Ie(er)(), lr = Ie(Zn)(), fr = Ie(tr)(), dr = Ie(rr)(), pr = Ie(nr)(), hr = Ie(or)(), nt = {
|
|
425
430
|
importEntities: ir,
|
|
426
431
|
modifyEntityField: ar,
|
|
427
432
|
reorderEntityField: sr,
|
|
@@ -441,7 +446,7 @@ function Tt(e) {
|
|
|
441
446
|
return typeof e != "string" && e && e.bindToVault;
|
|
442
447
|
}
|
|
443
448
|
function gr() {
|
|
444
|
-
const e = ae(), t =
|
|
449
|
+
const e = ae(), t = xe([]), n = yr(), o = N(() => `vault://annotation-page/${(/* @__PURE__ */ new Date()).getTime()}/${Math.round(Math.random() * 1e9).toString(16)}`, []);
|
|
445
450
|
st(() => {
|
|
446
451
|
const s = {
|
|
447
452
|
id: o,
|
|
@@ -521,7 +526,7 @@ function gr() {
|
|
|
521
526
|
}
|
|
522
527
|
];
|
|
523
528
|
}
|
|
524
|
-
const Vt =
|
|
529
|
+
const Vt = Te(null);
|
|
525
530
|
function mr() {
|
|
526
531
|
const e = ue(Vt);
|
|
527
532
|
return [
|
|
@@ -555,14 +560,14 @@ function br({
|
|
|
555
560
|
/* @__PURE__ */ d("button", { onClick: r, children: "Reset" })
|
|
556
561
|
] });
|
|
557
562
|
}
|
|
558
|
-
const pt =
|
|
563
|
+
const pt = Te(null);
|
|
559
564
|
function wr() {
|
|
560
565
|
return ue(pt);
|
|
561
566
|
}
|
|
562
|
-
const _t =
|
|
567
|
+
const _t = Te(
|
|
563
568
|
() => {
|
|
564
569
|
}
|
|
565
|
-
), Dt =
|
|
570
|
+
), Dt = Te(
|
|
566
571
|
() => {
|
|
567
572
|
}
|
|
568
573
|
);
|
|
@@ -579,7 +584,7 @@ function Se(e = {}, t = []) {
|
|
|
579
584
|
return o ? o(i) : i;
|
|
580
585
|
}, [i, o, ...t]);
|
|
581
586
|
}
|
|
582
|
-
const Bt =
|
|
587
|
+
const Bt = Te(() => {
|
|
583
588
|
});
|
|
584
589
|
function Pr(e) {
|
|
585
590
|
const t = Se(), n = ue(Bt);
|
|
@@ -593,21 +598,21 @@ function Or({
|
|
|
593
598
|
worldScale: o,
|
|
594
599
|
...r
|
|
595
600
|
}) {
|
|
596
|
-
const [a, i] = ie(), s = zn(), f = t || br, [h, u] = ie({}), y = Object.entries(h), [x, M] = ie({}),
|
|
597
|
-
|
|
601
|
+
const [a, i] = ie(), s = zn(), f = t || br, [h, u] = ie({}), y = Object.entries(h), [x, M] = ie({}), C = Object.entries(x), [T, b] = ie({}), E = N(() => o || Math.max(...Object.values(T)), [T]), L = N(() => ({ maxOverZoom: E || 1, ...r.runtimeOptions || {} }), [E, r.runtimeOptions]), P = Q((R, B) => {
|
|
602
|
+
b((j) => {
|
|
598
603
|
if (B === -1) {
|
|
599
|
-
const { [R]:
|
|
604
|
+
const { [R]: S, ...U } = j;
|
|
600
605
|
return U;
|
|
601
606
|
}
|
|
602
607
|
return { ...j, [R]: B };
|
|
603
608
|
});
|
|
604
609
|
}, []), F = Q((R, B, j) => {
|
|
605
|
-
u(({ [R]:
|
|
610
|
+
u(({ [R]: S, ...U }) => B ? {
|
|
606
611
|
...U,
|
|
607
612
|
[R]: { element: B, props: j }
|
|
608
613
|
} : U);
|
|
609
|
-
}, []),
|
|
610
|
-
M(({ [R]:
|
|
614
|
+
}, []), A = Q((R, B, j) => {
|
|
615
|
+
M(({ [R]: S, ...U }) => B ? {
|
|
611
616
|
...U,
|
|
612
617
|
[R]: { element: B, props: j }
|
|
613
618
|
} : U);
|
|
@@ -618,15 +623,15 @@ function Or({
|
|
|
618
623
|
{
|
|
619
624
|
...r,
|
|
620
625
|
containerProps: { style: { position: "relative" }, ...r.containerProps || {} },
|
|
621
|
-
htmlChildren: /* @__PURE__ */ d(Oe, { children: y.map(([R, { element: B, props: j }]) => /* @__PURE__ */ d(
|
|
626
|
+
htmlChildren: /* @__PURE__ */ d(Oe, { children: y.map(([R, { element: B, props: j }]) => /* @__PURE__ */ d(Ee.Fragment, { children: /* @__PURE__ */ d(B, { ...j || {} }) }, R)) }),
|
|
622
627
|
onCreated: (R) => {
|
|
623
628
|
i(R), r.onCreated && r.onCreated(R);
|
|
624
629
|
},
|
|
625
|
-
runtimeOptions:
|
|
626
|
-
children: /* @__PURE__ */ d(pt.Provider, { value: a, children: /* @__PURE__ */ d(Bt.Provider, { value:
|
|
630
|
+
runtimeOptions: L,
|
|
631
|
+
children: /* @__PURE__ */ d(pt.Provider, { value: a, children: /* @__PURE__ */ d(Bt.Provider, { value: P, children: /* @__PURE__ */ d(_t.Provider, { value: F, children: /* @__PURE__ */ d(Dt.Provider, { value: A, children: /* @__PURE__ */ d(Kn, { bridge: s, children: /* @__PURE__ */ d(xn.Provider, { value: r.mode || "explore", children: /* @__PURE__ */ d(vr, { children: e }) }) }) }) }) }) })
|
|
627
632
|
}
|
|
628
633
|
),
|
|
629
|
-
/* @__PURE__ */ d("div", { children:
|
|
634
|
+
/* @__PURE__ */ d("div", { children: C.map(([R, { element: B, props: j }]) => /* @__PURE__ */ d(Ee.Fragment, { children: /* @__PURE__ */ d(B, { ...j || {} }) }, R)) })
|
|
630
635
|
] });
|
|
631
636
|
}
|
|
632
637
|
const We = {}, qt = {
|
|
@@ -729,7 +734,7 @@ const Wt = ({
|
|
|
729
734
|
}) => {
|
|
730
735
|
const r = $t({ id: e }), a = ze(r, "atlas"), i = ze(r, "html"), s = Ut(r, ["atlas"]), f = Se(), h = N(() => Tn(t, a), [t, a]);
|
|
731
736
|
return f && r && r.target && r.target.selector && r.target.selector.type === "BoxSelector" && r.target.source && (r.target.source.id === f.id || r.target.source === f.id) ? /* @__PURE__ */ d(
|
|
732
|
-
|
|
737
|
+
In,
|
|
733
738
|
{
|
|
734
739
|
id: r.id,
|
|
735
740
|
isEditing: !0,
|
|
@@ -799,7 +804,7 @@ function Ht({
|
|
|
799
804
|
onClick: f,
|
|
800
805
|
children: t.service ? /* @__PURE__ */ X(Ye, { children: [
|
|
801
806
|
/* @__PURE__ */ d(
|
|
802
|
-
|
|
807
|
+
En,
|
|
803
808
|
{
|
|
804
809
|
tiles: {
|
|
805
810
|
id: t.service.id || t.service["@id"] || "unknown",
|
|
@@ -866,12 +871,12 @@ const xr = {
|
|
|
866
871
|
makeChoice: () => {
|
|
867
872
|
}
|
|
868
873
|
}, rt = { type: "unknown" }, ne = (e) => ({ type: "unknown", reason: e, annotations: { pages: [] } }), Tr = (e, t) => ({ type: "empty", width: e, height: t, annotations: { pages: [] }, image: null, images: [] });
|
|
869
|
-
function
|
|
874
|
+
function Ir(e, t) {
|
|
870
875
|
var o;
|
|
871
876
|
const n = (o = e == null ? void 0 : e.iiif) == null ? void 0 : o.meta[t];
|
|
872
877
|
return n ? n.annotationPageManager : null;
|
|
873
878
|
}
|
|
874
|
-
function
|
|
879
|
+
function Er(e, t) {
|
|
875
880
|
return ye(
|
|
876
881
|
(n) => {
|
|
877
882
|
const o = [];
|
|
@@ -880,7 +885,7 @@ function Ir(e, t) {
|
|
|
880
885
|
const r = Object.keys(n.iiif.entities.AnnotationPage);
|
|
881
886
|
for (const a of r)
|
|
882
887
|
if (!t || t.indexOf(a) !== -1) {
|
|
883
|
-
const i =
|
|
888
|
+
const i = Ir(n, a);
|
|
884
889
|
i && i.views && i.views[e] && o.push(a);
|
|
885
890
|
}
|
|
886
891
|
return o;
|
|
@@ -919,7 +924,7 @@ function zt(e, t = {}) {
|
|
|
919
924
|
manifest: o,
|
|
920
925
|
canvas: r,
|
|
921
926
|
canvases: a
|
|
922
|
-
}), [t.all, r, a, o]), s =
|
|
927
|
+
}), [t.all, r, a, o]), s = Er(e, t.all ? void 0 : i), f = Q(
|
|
923
928
|
(u) => {
|
|
924
929
|
e && n.setMetaValue(
|
|
925
930
|
[u, "annotationPageManager", "views"],
|
|
@@ -936,18 +941,18 @@ function zt(e, t = {}) {
|
|
|
936
941
|
return;
|
|
937
942
|
const x = n.getState(), M = [];
|
|
938
943
|
if (y != null && y.deselectOthers) {
|
|
939
|
-
const
|
|
940
|
-
for (const
|
|
941
|
-
const
|
|
942
|
-
|
|
944
|
+
const C = Object.keys(x.iiif.entities.AnnotationPage);
|
|
945
|
+
for (const T of C) {
|
|
946
|
+
const b = jr(x, T);
|
|
947
|
+
b && b.views && b.views[e] && M.push(T);
|
|
943
948
|
}
|
|
944
949
|
}
|
|
945
|
-
for (const
|
|
946
|
-
f(
|
|
950
|
+
for (const C of M)
|
|
951
|
+
f(C);
|
|
947
952
|
n.setMetaValue(
|
|
948
953
|
[u, "annotationPageManager", "views"],
|
|
949
|
-
(
|
|
950
|
-
...
|
|
954
|
+
(C) => C && C[e] ? C : {
|
|
955
|
+
...C || {},
|
|
951
956
|
[e]: !0
|
|
952
957
|
}
|
|
953
958
|
);
|
|
@@ -964,12 +969,12 @@ function zt(e, t = {}) {
|
|
|
964
969
|
function Mr(e, t) {
|
|
965
970
|
return ye((n, o) => o.get(e.map((r) => ({ id: r, type: t }))), [e, t]);
|
|
966
971
|
}
|
|
967
|
-
const Rr =
|
|
972
|
+
const Rr = Ee.createContext(new Rn());
|
|
968
973
|
function Je() {
|
|
969
974
|
return ue(Rr);
|
|
970
975
|
}
|
|
971
976
|
function Lr() {
|
|
972
|
-
const e = Je(), [t, n] = ie({}), o =
|
|
977
|
+
const e = Je(), [t, n] = ie({}), o = xe(!1);
|
|
973
978
|
return be(() => () => {
|
|
974
979
|
o.current = !0;
|
|
975
980
|
}, []), [Q(
|
|
@@ -1058,26 +1063,26 @@ function kr(e = Kt) {
|
|
|
1058
1063
|
throw new Error("getPaintables() accept either a canvas or list of annotations");
|
|
1059
1064
|
const y = Array.from(Array.isArray(u.body) ? u.body : [u.body]);
|
|
1060
1065
|
for (const x of y) {
|
|
1061
|
-
const [M, { selector:
|
|
1062
|
-
if (
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1066
|
+
const [M, { selector: C }] = Ar(x), T = e.get(M), b = (T.type || "unknown").toLowerCase();
|
|
1067
|
+
if (b === "choice") {
|
|
1068
|
+
const E = e.get(T.items, { parent: T.id }), L = a.length ? a.map((P) => E.find((F) => F.id === P)).filter(Boolean) : [E[0]];
|
|
1069
|
+
L.length === 0 && L.push(E[0]), f = {
|
|
1065
1070
|
type: "single-choice",
|
|
1066
|
-
items:
|
|
1067
|
-
id:
|
|
1068
|
-
label:
|
|
1069
|
-
selected:
|
|
1071
|
+
items: E.map((P) => ({
|
|
1072
|
+
id: P.id,
|
|
1073
|
+
label: P.label,
|
|
1074
|
+
selected: L.indexOf(P) !== -1
|
|
1070
1075
|
})),
|
|
1071
1076
|
label: M.label
|
|
1072
|
-
}, y.push(...
|
|
1077
|
+
}, y.push(...L);
|
|
1073
1078
|
continue;
|
|
1074
1079
|
}
|
|
1075
|
-
s.indexOf(
|
|
1076
|
-
type:
|
|
1080
|
+
s.indexOf(b) === -1 && s.push(b), h.push({
|
|
1081
|
+
type: b,
|
|
1077
1082
|
annotationId: u.id,
|
|
1078
|
-
resource:
|
|
1083
|
+
resource: T,
|
|
1079
1084
|
target: u.target,
|
|
1080
|
-
selector:
|
|
1085
|
+
selector: C
|
|
1081
1086
|
});
|
|
1082
1087
|
}
|
|
1083
1088
|
}
|
|
@@ -1108,19 +1113,19 @@ function Nr(e, t = []) {
|
|
|
1108
1113
|
throw new Error("Complex choice not supported yet");
|
|
1109
1114
|
i((M) => {
|
|
1110
1115
|
if (x) {
|
|
1111
|
-
const
|
|
1112
|
-
if (
|
|
1113
|
-
const
|
|
1114
|
-
return
|
|
1116
|
+
const T = M.filter((b) => b !== u);
|
|
1117
|
+
if (T.length === 0) {
|
|
1118
|
+
const b = s.items[0].resource.id;
|
|
1119
|
+
return b ? [b] : [];
|
|
1115
1120
|
}
|
|
1116
|
-
return
|
|
1121
|
+
return T;
|
|
1117
1122
|
}
|
|
1118
1123
|
if (y)
|
|
1119
1124
|
return [u];
|
|
1120
|
-
const
|
|
1121
|
-
if (
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1125
|
+
const C = [...M];
|
|
1126
|
+
if (C.length === 0 && s.items.length) {
|
|
1127
|
+
const T = s.items[0].resource.id;
|
|
1128
|
+
T && C.push(T);
|
|
1124
1129
|
}
|
|
1125
1130
|
return M.indexOf(u) !== -1 ? M : [...M, u];
|
|
1126
1131
|
});
|
|
@@ -1352,15 +1357,15 @@ const Hr = (e, t = []) => {
|
|
|
1352
1357
|
}, [n, ...t]);
|
|
1353
1358
|
};
|
|
1354
1359
|
function Gt(e, t, { canvasId: n, manifestId: o } = {}) {
|
|
1355
|
-
const r = ae(), a = Je(), i = N(() => kn(r, { imageServiceLoader: a }), [r, a]), [s, f] = ie(), h = Ce(o ? { id: o } : void 0), u = Se(n ? { id: n } : void 0), y = u || h, x =
|
|
1360
|
+
const r = ae(), a = Je(), i = N(() => kn(r, { imageServiceLoader: a }), [r, a]), [s, f] = ie(), h = Ce(o ? { id: o } : void 0), u = Se(n ? { id: n } : void 0), y = u || h, x = xe(!1);
|
|
1356
1361
|
if (be(() => (x.current = !1, () => {
|
|
1357
1362
|
x.current = !0;
|
|
1358
1363
|
}), []), !y)
|
|
1359
1364
|
throw new Error("Must be called under a manifest or canvas context.");
|
|
1360
1365
|
return Hr(
|
|
1361
1366
|
(M) => {
|
|
1362
|
-
i.getBestThumbnailAtSize(y, e, t).then((
|
|
1363
|
-
|
|
1367
|
+
i.getBestThumbnailAtSize(y, e, t).then((C) => {
|
|
1368
|
+
C.best && !x.current && f(C.best);
|
|
1364
1369
|
});
|
|
1365
1370
|
},
|
|
1366
1371
|
[y]
|
|
@@ -1397,7 +1402,7 @@ function Kr(e) {
|
|
|
1397
1402
|
return `${Math.floor(t / 60)}:${`${t % 60}`.padStart(2, "0")}`;
|
|
1398
1403
|
}
|
|
1399
1404
|
function yt(e) {
|
|
1400
|
-
const [t, n] = On(zr, Yr(e.duration)), o =
|
|
1405
|
+
const [t, n] = On(zr, Yr(e.duration)), o = xe(null), r = xe(null), a = xe(null), i = xe(!1), s = Q(() => {
|
|
1401
1406
|
r.current && o.current && (r.current.innerHTML = Kr(o.current.currentTime), a.current && (a.current.style.width = `${o.current.currentTime / e.duration * 100}%`), i.current !== o.current.muted && (i.current = o.current.muted, n(o.current.muted ? { type: "MUTE" } : { type: "UNMUTE" })));
|
|
1402
1407
|
}, [e.duration]), f = Q(() => {
|
|
1403
1408
|
o.current && (n({ type: "PLAY_REQUESTED" }), o.current.play().then(() => {
|
|
@@ -1413,23 +1418,23 @@ function yt(e) {
|
|
|
1413
1418
|
o.current && (o.current.muted = !0, n({ type: "MUTE" }));
|
|
1414
1419
|
}, []), M = Q(() => {
|
|
1415
1420
|
o.current && (o.current.muted = !1, n({ type: "UNMUTE" }));
|
|
1416
|
-
}, []),
|
|
1417
|
-
o.current && (o.current.muted = !1, o.current.volume =
|
|
1418
|
-
}, []),
|
|
1419
|
-
o.current && (o.current.currentTime = Math.max(0, Math.min(
|
|
1420
|
-
}, []),
|
|
1421
|
-
o.current && (o.current.currentTime = Math.max(0, Math.min(
|
|
1421
|
+
}, []), C = Q((E) => {
|
|
1422
|
+
o.current && (o.current.muted = !1, o.current.volume = E / 100, n({ type: "SET_VOLUME", volume: E }));
|
|
1423
|
+
}, []), T = Q((E) => {
|
|
1424
|
+
o.current && (o.current.currentTime = Math.max(0, Math.min(E * e.duration, e.duration)), s());
|
|
1425
|
+
}, []), b = Q((E) => {
|
|
1426
|
+
o.current && (o.current.currentTime = Math.max(0, Math.min(E, e.duration)), s());
|
|
1422
1427
|
}, []);
|
|
1423
1428
|
return be(() => {
|
|
1424
|
-
const
|
|
1429
|
+
const E = setInterval(() => {
|
|
1425
1430
|
s();
|
|
1426
1431
|
}, 350);
|
|
1427
|
-
return () => clearInterval(
|
|
1432
|
+
return () => clearInterval(E);
|
|
1428
1433
|
}, [s, e.duration]), be(() => {
|
|
1429
|
-
const
|
|
1434
|
+
const E = () => {
|
|
1430
1435
|
n({ type: "FINISHED" });
|
|
1431
|
-
},
|
|
1432
|
-
return
|
|
1436
|
+
}, L = o.current;
|
|
1437
|
+
return L == null || L.addEventListener("ended", E), () => L == null ? void 0 : L.removeEventListener("ended", E);
|
|
1433
1438
|
}, []), [
|
|
1434
1439
|
{ element: o, currentTime: r, progress: a },
|
|
1435
1440
|
t,
|
|
@@ -1440,13 +1445,13 @@ function yt(e) {
|
|
|
1440
1445
|
mute: x,
|
|
1441
1446
|
unmute: M,
|
|
1442
1447
|
toggleMute: y,
|
|
1443
|
-
setVolume:
|
|
1444
|
-
setDurationPercent:
|
|
1445
|
-
setTime:
|
|
1448
|
+
setVolume: C,
|
|
1449
|
+
setDurationPercent: T,
|
|
1450
|
+
setTime: b
|
|
1446
1451
|
}
|
|
1447
1452
|
];
|
|
1448
1453
|
}
|
|
1449
|
-
const Xt =
|
|
1454
|
+
const Xt = Te(null), Jt = Te(null), Zt = Te(null);
|
|
1450
1455
|
function xo() {
|
|
1451
1456
|
const e = ue(Xt);
|
|
1452
1457
|
if (!e)
|
|
@@ -1459,7 +1464,7 @@ function To() {
|
|
|
1459
1464
|
throw new Error("Ctx not found");
|
|
1460
1465
|
return e;
|
|
1461
1466
|
}
|
|
1462
|
-
function
|
|
1467
|
+
function Io() {
|
|
1463
1468
|
const e = ue(Zt);
|
|
1464
1469
|
if (!e)
|
|
1465
1470
|
throw new Error("Ctx not found");
|
|
@@ -1589,19 +1594,19 @@ function cn({ style: e }) {
|
|
|
1589
1594
|
}
|
|
1590
1595
|
);
|
|
1591
1596
|
}
|
|
1592
|
-
const un =
|
|
1593
|
-
function
|
|
1597
|
+
const un = Ee.createContext("en");
|
|
1598
|
+
function Eo(e) {
|
|
1594
1599
|
return /* @__PURE__ */ d(un.Provider, { value: e.language, children: e.children });
|
|
1595
1600
|
}
|
|
1596
1601
|
function gt() {
|
|
1597
|
-
return
|
|
1602
|
+
return Ee.useContext(un);
|
|
1598
1603
|
}
|
|
1599
|
-
function
|
|
1604
|
+
function It(e) {
|
|
1600
1605
|
return e.indexOf("-") !== -1 ? e.slice(0, e.indexOf("-")) : e;
|
|
1601
1606
|
}
|
|
1602
1607
|
function Qr({ as: e, language: t, children: n, viewingDirection: o, ...r }) {
|
|
1603
1608
|
const a = gt();
|
|
1604
|
-
return N(() =>
|
|
1609
|
+
return N(() => It(a) === It(t), [a, t]) ? e ? /* @__PURE__ */ d(e, { ...r, children: n }) : /* @__PURE__ */ d("span", { ...r, children: n }) : e ? /* @__PURE__ */ d(e, { ...r, lang: t, dir: o, children: n }) : /* @__PURE__ */ d("span", { ...r, lang: t, dir: o, children: n });
|
|
1605
1610
|
}
|
|
1606
1611
|
function ln(e, t, n) {
|
|
1607
1612
|
if (t.length === 0)
|
|
@@ -1691,7 +1696,7 @@ function Jr({
|
|
|
1691
1696
|
media: t,
|
|
1692
1697
|
playPause: n
|
|
1693
1698
|
}) {
|
|
1694
|
-
const o =
|
|
1699
|
+
const o = xe(null);
|
|
1695
1700
|
return t.youTubeId ? /* @__PURE__ */ X("div", { className: "video-container", part: "video-container", onClick: n, children: [
|
|
1696
1701
|
/* @__PURE__ */ d("style", { children: `
|
|
1697
1702
|
.video-container {
|
|
@@ -1751,25 +1756,25 @@ function fn({
|
|
|
1751
1756
|
throwOnUnknown: y,
|
|
1752
1757
|
backgroundStyle: x,
|
|
1753
1758
|
alwaysShowBackground: M,
|
|
1754
|
-
keepCanvasScale:
|
|
1755
|
-
enableSizes:
|
|
1756
|
-
enableYouTube:
|
|
1757
|
-
onClickPaintingAnnotation:
|
|
1758
|
-
children:
|
|
1759
|
+
keepCanvasScale: C = !1,
|
|
1760
|
+
enableSizes: T = !1,
|
|
1761
|
+
enableYouTube: b = !0,
|
|
1762
|
+
onClickPaintingAnnotation: E,
|
|
1763
|
+
children: L
|
|
1759
1764
|
}) {
|
|
1760
|
-
const
|
|
1765
|
+
const P = Se(), F = Ut(P, ["deep-zoom"]), [A] = mr(), R = wr(), B = ae(), j = N(() => ut(B), [B]), [S, U] = Wr({
|
|
1761
1766
|
strategies: u || ["images"],
|
|
1762
1767
|
defaultChoices: r == null ? void 0 : r.map(({ id: V }) => V)
|
|
1763
|
-
}), H =
|
|
1768
|
+
}), H = S.type === "images" ? S.choice : void 0, G = N(() => C ? 1 : Math.max(
|
|
1764
1769
|
1,
|
|
1765
|
-
...
|
|
1770
|
+
...S.type === "images" ? S.images.map((V) => {
|
|
1766
1771
|
var te;
|
|
1767
1772
|
return (V.width || 0) / ((te = V.target) == null ? void 0 : te.spatial.width);
|
|
1768
1773
|
}) : []
|
|
1769
|
-
), [
|
|
1774
|
+
), [C, S]);
|
|
1770
1775
|
Pr(G), be(() => {
|
|
1771
1776
|
o && o(U);
|
|
1772
|
-
}, [
|
|
1777
|
+
}, [S.annotations]), be(() => {
|
|
1773
1778
|
if (r)
|
|
1774
1779
|
for (const V of r)
|
|
1775
1780
|
typeof V.opacity < "u" && j.applyStyles({ id: V.id }, "atlas", {
|
|
@@ -1778,23 +1783,23 @@ function fn({
|
|
|
1778
1783
|
}, [r]), st(() => {
|
|
1779
1784
|
n && n(H);
|
|
1780
1785
|
}, [H]), Ve(
|
|
1781
|
-
R && (
|
|
1782
|
-
`canvas-portal-controls-${
|
|
1786
|
+
R && (S.type === "images" || S.type === "empty" || S.type === "textual-content" && i) ? "overlay" : "none",
|
|
1787
|
+
`canvas-portal-controls-${P == null ? void 0 : P.id}`,
|
|
1783
1788
|
pt.Provider,
|
|
1784
1789
|
i ? {
|
|
1785
1790
|
value: R || null,
|
|
1786
|
-
children: i(
|
|
1791
|
+
children: i(S)
|
|
1787
1792
|
} : {},
|
|
1788
|
-
[
|
|
1793
|
+
[P, R, S, ...f || []]
|
|
1789
1794
|
);
|
|
1790
1795
|
const Y = Gt({ maxWidth: 256, maxHeight: 256 });
|
|
1791
|
-
if (!
|
|
1796
|
+
if (!P)
|
|
1792
1797
|
return null;
|
|
1793
|
-
const Z =
|
|
1798
|
+
const Z = P.accompanyingCanvas, ee = Y && Y.type === "fixed" ? /* @__PURE__ */ d("world-object", { height: P.height, width: P.width, x: e, y: t, children: /* @__PURE__ */ d(
|
|
1794
1799
|
"world-image",
|
|
1795
1800
|
{
|
|
1796
1801
|
uri: Y.id,
|
|
1797
|
-
target: { x: 0, y: 0, width:
|
|
1802
|
+
target: { x: 0, y: 0, width: P.width, height: P.height },
|
|
1798
1803
|
display: Y.width && Y.height ? {
|
|
1799
1804
|
width: Y.width,
|
|
1800
1805
|
height: Y.height
|
|
@@ -1802,37 +1807,37 @@ function fn({
|
|
|
1802
1807
|
crop: void 0
|
|
1803
1808
|
}
|
|
1804
1809
|
) }) : null;
|
|
1805
|
-
if (
|
|
1810
|
+
if (S.type === "unknown") {
|
|
1806
1811
|
if (ee)
|
|
1807
1812
|
return ee;
|
|
1808
1813
|
if (y)
|
|
1809
|
-
throw new Error(
|
|
1814
|
+
throw new Error(S.reason || "Unknown image strategy");
|
|
1810
1815
|
return null;
|
|
1811
1816
|
}
|
|
1812
1817
|
const se = /* @__PURE__ */ X(Ye, { children: [
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
] }), me =
|
|
1818
|
+
A ? /* @__PURE__ */ d(at, { page: A }) : null,
|
|
1819
|
+
S.annotations && S.annotations.pages ? S.annotations.pages.map((V) => /* @__PURE__ */ d(at, { page: V }, V.id)) : null,
|
|
1820
|
+
L
|
|
1821
|
+
] }), me = S.type === "images" ? S.images.length : 0;
|
|
1817
1822
|
return /* @__PURE__ */ X(Oe, { children: [
|
|
1818
1823
|
/* @__PURE__ */ X(
|
|
1819
1824
|
"world-object",
|
|
1820
1825
|
{
|
|
1821
|
-
height:
|
|
1822
|
-
width:
|
|
1826
|
+
height: P.height,
|
|
1827
|
+
width: P.width,
|
|
1823
1828
|
x: e,
|
|
1824
1829
|
y: t,
|
|
1825
1830
|
...F,
|
|
1826
1831
|
children: [
|
|
1827
|
-
|
|
1828
|
-
|
|
1832
|
+
S.type === "empty" || M ? /* @__PURE__ */ d(cn, { style: x }) : null,
|
|
1833
|
+
S.type === "textual-content" ? S.items.map((V, te) => {
|
|
1829
1834
|
var $;
|
|
1830
1835
|
return /* @__PURE__ */ X(Oe, { children: [
|
|
1831
1836
|
/* @__PURE__ */ d(
|
|
1832
1837
|
Cn,
|
|
1833
1838
|
{
|
|
1834
|
-
onClick:
|
|
1835
|
-
le.stopPropagation(),
|
|
1839
|
+
onClick: E ? (le) => {
|
|
1840
|
+
le.stopPropagation(), E(V.annotationId, V, le);
|
|
1836
1841
|
} : void 0,
|
|
1837
1842
|
target: (($ = V.target) == null ? void 0 : $.spatial) || void 0,
|
|
1838
1843
|
children: /* @__PURE__ */ d("div", { "data-textual-content": !0, children: /* @__PURE__ */ d(Ne, { enableDangerouslySetInnerHTML: !0, children: V.text }) })
|
|
@@ -1842,8 +1847,8 @@ function fn({
|
|
|
1842
1847
|
se
|
|
1843
1848
|
] });
|
|
1844
1849
|
}) : null,
|
|
1845
|
-
|
|
1846
|
-
|
|
1850
|
+
S.type === "images" ? /* @__PURE__ */ X(Oe, { children: [
|
|
1851
|
+
S.images.map((V, te) => /* @__PURE__ */ d(
|
|
1847
1852
|
Ht,
|
|
1848
1853
|
{
|
|
1849
1854
|
isStatic: a,
|
|
@@ -1851,36 +1856,36 @@ function fn({
|
|
|
1851
1856
|
id: V.id,
|
|
1852
1857
|
thumbnail: te === 0 ? Y : void 0,
|
|
1853
1858
|
selector: V.selector,
|
|
1854
|
-
enableSizes:
|
|
1855
|
-
onClick:
|
|
1856
|
-
$.stopPropagation(),
|
|
1859
|
+
enableSizes: T,
|
|
1860
|
+
onClick: E ? ($) => {
|
|
1861
|
+
$.stopPropagation(), E(V.annotationId, V, $);
|
|
1857
1862
|
} : void 0
|
|
1858
1863
|
},
|
|
1859
1864
|
V.id + te
|
|
1860
1865
|
)),
|
|
1861
1866
|
se
|
|
1862
1867
|
] }) : null,
|
|
1863
|
-
|
|
1864
|
-
|
|
1868
|
+
S.type === "3d-model" ? /* @__PURE__ */ d(sn, { model: S.model }) : null,
|
|
1869
|
+
S.type === "media" ? /* @__PURE__ */ d(Oe, { children: S.media.type === "Sound" ? /* @__PURE__ */ X(nn, { media: S.media, mediaControlsDeps: h, children: [
|
|
1865
1870
|
ee,
|
|
1866
|
-
s ? s(
|
|
1867
|
-
] }) :
|
|
1871
|
+
s ? s(S) : null
|
|
1872
|
+
] }) : S.media.type === "Video" ? /* @__PURE__ */ X(on, { media: S.media, mediaControlsDeps: h, children: [
|
|
1868
1873
|
ee,
|
|
1869
|
-
s ? s(
|
|
1870
|
-
] }) :
|
|
1874
|
+
s ? s(S) : null
|
|
1875
|
+
] }) : S.media.type === "VideoYouTube" && b ? /* @__PURE__ */ X(Zr, { media: S.media, mediaControlsDeps: h, children: [
|
|
1871
1876
|
ee,
|
|
1872
|
-
s ? s(
|
|
1877
|
+
s ? s(S) : null
|
|
1873
1878
|
] }) : null }) : null
|
|
1874
1879
|
]
|
|
1875
1880
|
},
|
|
1876
|
-
`${
|
|
1881
|
+
`${P.id}/${S.type}/${me}`
|
|
1877
1882
|
),
|
|
1878
|
-
|
|
1883
|
+
S.type === "media" && S.media.type === "Sound" && Z ? /* @__PURE__ */ d(Qe, { canvas: Z.id, children: /* @__PURE__ */ d(fn, { renderViewerControls: i }) }) : null
|
|
1879
1884
|
] });
|
|
1880
1885
|
}
|
|
1881
1886
|
const eo = ct(function(t, n) {
|
|
1882
1887
|
const o = Ce(), r = Mt(), a = Nt(), { ViewerControls: i, MediaControls: s } = t.components || {};
|
|
1883
|
-
if (
|
|
1888
|
+
if (Et(n, () => a, [a]), !o)
|
|
1884
1889
|
return /* @__PURE__ */ d("div", {});
|
|
1885
1890
|
let f = 0;
|
|
1886
1891
|
return /* @__PURE__ */ X(Oe, { children: [
|
|
@@ -1943,7 +1948,7 @@ ge.ModelHTML = an;
|
|
|
1943
1948
|
const jo = ct(
|
|
1944
1949
|
function({ canvasId: t }, n) {
|
|
1945
1950
|
const o = jn(), r = zt(t || (o == null ? void 0 : o.id)), a = ae();
|
|
1946
|
-
return
|
|
1951
|
+
return Et(n, () => r, [t, o]), !o || r.enabledPageIds.length === 0 ? null : /* @__PURE__ */ d(Oe, { children: r.enabledPageIds.map((i) => /* @__PURE__ */ d(ge.RenderAnnotationPage, { page: a.get(i) }, i)) });
|
|
1947
1952
|
}
|
|
1948
1953
|
);
|
|
1949
1954
|
function dn({
|
|
@@ -1962,60 +1967,60 @@ function dn({
|
|
|
1962
1967
|
tableHeader: x
|
|
1963
1968
|
}) {
|
|
1964
1969
|
const M = N(() => {
|
|
1965
|
-
const
|
|
1966
|
-
for (const
|
|
1967
|
-
const
|
|
1968
|
-
for (const
|
|
1969
|
-
if (
|
|
1970
|
-
const F = `metadata.${
|
|
1971
|
-
|
|
1970
|
+
const T = (t || []).reduce((E, L) => [...E, ...L.keys], []), b = {};
|
|
1971
|
+
for (const E of e) {
|
|
1972
|
+
const L = E && E.label ? Object.values(E.label) : [];
|
|
1973
|
+
for (const P of L)
|
|
1974
|
+
if (P && P.length && (T.indexOf(`metadata.${P[0]}`) !== -1 || T.length === 0) && E) {
|
|
1975
|
+
const F = `metadata.${P[0]}`;
|
|
1976
|
+
b[F] = b[F] ? b[F] : [], b[F].push(E);
|
|
1972
1977
|
break;
|
|
1973
1978
|
}
|
|
1974
1979
|
}
|
|
1975
|
-
return
|
|
1980
|
+
return b;
|
|
1976
1981
|
}, [t, e]);
|
|
1977
1982
|
return Object.keys(M).length === 0 && o ? /* @__PURE__ */ d(Oe, { children: a }) || /* @__PURE__ */ d("div", { className: i.empty, children: s }) : t && t.length ? /* @__PURE__ */ X("table", { className: i.container, children: [
|
|
1978
1983
|
x,
|
|
1979
|
-
/* @__PURE__ */ d("tbody", { children: t.map((
|
|
1980
|
-
const
|
|
1981
|
-
for (const
|
|
1982
|
-
for (const
|
|
1983
|
-
|
|
1984
|
+
/* @__PURE__ */ d("tbody", { children: t.map((T, b) => {
|
|
1985
|
+
const E = [];
|
|
1986
|
+
for (const L of T.keys)
|
|
1987
|
+
for (const P of M[L] || [])
|
|
1988
|
+
E.push(
|
|
1984
1989
|
/* @__PURE__ */ d(
|
|
1985
1990
|
Ne,
|
|
1986
1991
|
{
|
|
1987
1992
|
enableDangerouslySetInnerHTML: r,
|
|
1988
1993
|
defaultText: f,
|
|
1989
1994
|
separator: u,
|
|
1990
|
-
children:
|
|
1995
|
+
children: P.value
|
|
1991
1996
|
},
|
|
1992
|
-
|
|
1997
|
+
b + "__" + L
|
|
1993
1998
|
)
|
|
1994
1999
|
);
|
|
1995
|
-
return
|
|
2000
|
+
return E.length === 0 ? null : /* @__PURE__ */ X("tr", { className: i.row, children: [
|
|
1996
2001
|
/* @__PURE__ */ d("td", { className: i.label, style: n ? { minWidth: n } : {}, children: /* @__PURE__ */ d(
|
|
1997
2002
|
Ne,
|
|
1998
2003
|
{
|
|
1999
2004
|
enableDangerouslySetInnerHTML: r,
|
|
2000
2005
|
separator: u,
|
|
2001
2006
|
defaultText: h,
|
|
2002
|
-
children:
|
|
2007
|
+
children: T.label
|
|
2003
2008
|
}
|
|
2004
2009
|
) }),
|
|
2005
|
-
/* @__PURE__ */ d("td", { className: i.value, children:
|
|
2006
|
-
] },
|
|
2010
|
+
/* @__PURE__ */ d("td", { className: i.value, children: E })
|
|
2011
|
+
] }, b);
|
|
2007
2012
|
}) }),
|
|
2008
2013
|
y
|
|
2009
2014
|
] }) : /* @__PURE__ */ X("table", { className: i.container, children: [
|
|
2010
2015
|
x,
|
|
2011
|
-
/* @__PURE__ */ d("tbody", { children: e && e.length ? e.map((
|
|
2016
|
+
/* @__PURE__ */ d("tbody", { children: e && e.length ? e.map((T, b) => T ? /* @__PURE__ */ X("tr", { className: i.row, children: [
|
|
2012
2017
|
/* @__PURE__ */ d("td", { className: i.label, style: n ? { minWidth: n } : {}, children: /* @__PURE__ */ d(
|
|
2013
2018
|
Ne,
|
|
2014
2019
|
{
|
|
2015
2020
|
enableDangerouslySetInnerHTML: r,
|
|
2016
2021
|
defaultText: f,
|
|
2017
2022
|
separator: u,
|
|
2018
|
-
children:
|
|
2023
|
+
children: T.label
|
|
2019
2024
|
}
|
|
2020
2025
|
) }),
|
|
2021
2026
|
/* @__PURE__ */ d("td", { className: i.value, children: /* @__PURE__ */ d(
|
|
@@ -2024,10 +2029,10 @@ function dn({
|
|
|
2024
2029
|
enableDangerouslySetInnerHTML: r,
|
|
2025
2030
|
defaultText: f,
|
|
2026
2031
|
separator: u,
|
|
2027
|
-
children:
|
|
2032
|
+
children: T.value
|
|
2028
2033
|
}
|
|
2029
2034
|
) })
|
|
2030
|
-
] },
|
|
2035
|
+
] }, b) : null) : null }),
|
|
2031
2036
|
y
|
|
2032
2037
|
] });
|
|
2033
2038
|
}
|
|
@@ -2118,59 +2123,59 @@ function Ro(e) {
|
|
|
2118
2123
|
var hn = { exports: {} };
|
|
2119
2124
|
(() => {
|
|
2120
2125
|
var e = { 296: (r, a, i) => {
|
|
2121
|
-
var s = /^\s+|\s+$/g, f = /^[-+]0x[0-9a-f]+$/i, h = /^0b[01]+$/i, u = /^0o[0-7]+$/i, y = parseInt, x = typeof i.g == "object" && i.g && i.g.Object === Object && i.g, M = typeof self == "object" && self && self.Object === Object && self,
|
|
2122
|
-
return
|
|
2126
|
+
var s = /^\s+|\s+$/g, f = /^[-+]0x[0-9a-f]+$/i, h = /^0b[01]+$/i, u = /^0o[0-7]+$/i, y = parseInt, x = typeof i.g == "object" && i.g && i.g.Object === Object && i.g, M = typeof self == "object" && self && self.Object === Object && self, C = x || M || Function("return this")(), T = Object.prototype.toString, b = Math.max, E = Math.min, L = function() {
|
|
2127
|
+
return C.Date.now();
|
|
2123
2128
|
};
|
|
2124
|
-
function
|
|
2125
|
-
var R = typeof
|
|
2126
|
-
return !!
|
|
2129
|
+
function P(A) {
|
|
2130
|
+
var R = typeof A;
|
|
2131
|
+
return !!A && (R == "object" || R == "function");
|
|
2127
2132
|
}
|
|
2128
|
-
function F(
|
|
2129
|
-
if (typeof
|
|
2130
|
-
return
|
|
2133
|
+
function F(A) {
|
|
2134
|
+
if (typeof A == "number")
|
|
2135
|
+
return A;
|
|
2131
2136
|
if (function(j) {
|
|
2132
|
-
return typeof j == "symbol" || /* @__PURE__ */ function(
|
|
2133
|
-
return !!
|
|
2134
|
-
}(j) &&
|
|
2135
|
-
}(
|
|
2137
|
+
return typeof j == "symbol" || /* @__PURE__ */ function(S) {
|
|
2138
|
+
return !!S && typeof S == "object";
|
|
2139
|
+
}(j) && T.call(j) == "[object Symbol]";
|
|
2140
|
+
}(A))
|
|
2136
2141
|
return NaN;
|
|
2137
|
-
if (
|
|
2138
|
-
var R = typeof
|
|
2139
|
-
|
|
2142
|
+
if (P(A)) {
|
|
2143
|
+
var R = typeof A.valueOf == "function" ? A.valueOf() : A;
|
|
2144
|
+
A = P(R) ? R + "" : R;
|
|
2140
2145
|
}
|
|
2141
|
-
if (typeof
|
|
2142
|
-
return
|
|
2143
|
-
|
|
2144
|
-
var B = h.test(
|
|
2145
|
-
return B || u.test(
|
|
2146
|
-
}
|
|
2147
|
-
r.exports = function(
|
|
2148
|
-
var j,
|
|
2149
|
-
if (typeof
|
|
2146
|
+
if (typeof A != "string")
|
|
2147
|
+
return A === 0 ? A : +A;
|
|
2148
|
+
A = A.replace(s, "");
|
|
2149
|
+
var B = h.test(A);
|
|
2150
|
+
return B || u.test(A) ? y(A.slice(2), B ? 2 : 8) : f.test(A) ? NaN : +A;
|
|
2151
|
+
}
|
|
2152
|
+
r.exports = function(A, R, B) {
|
|
2153
|
+
var j, S, U, H, G, Y, Z = 0, ee = !1, se = !1, me = !0;
|
|
2154
|
+
if (typeof A != "function")
|
|
2150
2155
|
throw new TypeError("Expected a function");
|
|
2151
2156
|
function V(re) {
|
|
2152
|
-
var oe = j, de =
|
|
2153
|
-
return j =
|
|
2157
|
+
var oe = j, de = S;
|
|
2158
|
+
return j = S = void 0, Z = re, H = A.apply(de, oe);
|
|
2154
2159
|
}
|
|
2155
2160
|
function te(re) {
|
|
2156
2161
|
var oe = re - Y;
|
|
2157
2162
|
return Y === void 0 || oe >= R || oe < 0 || se && re - Z >= U;
|
|
2158
2163
|
}
|
|
2159
2164
|
function $() {
|
|
2160
|
-
var re =
|
|
2165
|
+
var re = L();
|
|
2161
2166
|
if (te(re))
|
|
2162
2167
|
return le(re);
|
|
2163
2168
|
G = setTimeout($, function(oe) {
|
|
2164
2169
|
var de = R - (oe - Y);
|
|
2165
|
-
return se ?
|
|
2170
|
+
return se ? E(de, U - (oe - Z)) : de;
|
|
2166
2171
|
}(re));
|
|
2167
2172
|
}
|
|
2168
2173
|
function le(re) {
|
|
2169
|
-
return G = void 0, me && j ? V(re) : (j =
|
|
2174
|
+
return G = void 0, me && j ? V(re) : (j = S = void 0, H);
|
|
2170
2175
|
}
|
|
2171
2176
|
function fe() {
|
|
2172
|
-
var re =
|
|
2173
|
-
if (j = arguments,
|
|
2177
|
+
var re = L(), oe = te(re);
|
|
2178
|
+
if (j = arguments, S = this, Y = re, oe) {
|
|
2174
2179
|
if (G === void 0)
|
|
2175
2180
|
return function(de) {
|
|
2176
2181
|
return Z = de, G = setTimeout($, R), ee ? V(de) : H;
|
|
@@ -2180,19 +2185,19 @@ var hn = { exports: {} };
|
|
|
2180
2185
|
}
|
|
2181
2186
|
return G === void 0 && (G = setTimeout($, R)), H;
|
|
2182
2187
|
}
|
|
2183
|
-
return R = F(R) || 0,
|
|
2184
|
-
G !== void 0 && clearTimeout(G), Z = 0, j = Y =
|
|
2188
|
+
return R = F(R) || 0, P(B) && (ee = !!B.leading, U = (se = "maxWait" in B) ? b(F(B.maxWait) || 0, R) : U, me = "trailing" in B ? !!B.trailing : me), fe.cancel = function() {
|
|
2189
|
+
G !== void 0 && clearTimeout(G), Z = 0, j = Y = S = G = void 0;
|
|
2185
2190
|
}, fe.flush = function() {
|
|
2186
|
-
return G === void 0 ? H : le(
|
|
2191
|
+
return G === void 0 ? H : le(L());
|
|
2187
2192
|
}, fe;
|
|
2188
2193
|
};
|
|
2189
2194
|
}, 96: (r, a, i) => {
|
|
2190
|
-
var s = "Expected a function", f = NaN, h = "[object Symbol]", u = /^\s+|\s+$/g, y = /^[-+]0x[0-9a-f]+$/i, x = /^0b[01]+$/i, M = /^0o[0-7]+$/i,
|
|
2191
|
-
return
|
|
2195
|
+
var s = "Expected a function", f = NaN, h = "[object Symbol]", u = /^\s+|\s+$/g, y = /^[-+]0x[0-9a-f]+$/i, x = /^0b[01]+$/i, M = /^0o[0-7]+$/i, C = parseInt, T = typeof i.g == "object" && i.g && i.g.Object === Object && i.g, b = typeof self == "object" && self && self.Object === Object && self, E = T || b || Function("return this")(), L = Object.prototype.toString, P = Math.max, F = Math.min, A = function() {
|
|
2196
|
+
return E.Date.now();
|
|
2192
2197
|
};
|
|
2193
2198
|
function R(j) {
|
|
2194
|
-
var
|
|
2195
|
-
return !!j && (
|
|
2199
|
+
var S = typeof j;
|
|
2200
|
+
return !!j && (S == "object" || S == "function");
|
|
2196
2201
|
}
|
|
2197
2202
|
function B(j) {
|
|
2198
2203
|
if (typeof j == "number")
|
|
@@ -2200,20 +2205,20 @@ var hn = { exports: {} };
|
|
|
2200
2205
|
if (function(H) {
|
|
2201
2206
|
return typeof H == "symbol" || /* @__PURE__ */ function(G) {
|
|
2202
2207
|
return !!G && typeof G == "object";
|
|
2203
|
-
}(H) &&
|
|
2208
|
+
}(H) && L.call(H) == h;
|
|
2204
2209
|
}(j))
|
|
2205
2210
|
return f;
|
|
2206
2211
|
if (R(j)) {
|
|
2207
|
-
var
|
|
2208
|
-
j = R(
|
|
2212
|
+
var S = typeof j.valueOf == "function" ? j.valueOf() : j;
|
|
2213
|
+
j = R(S) ? S + "" : S;
|
|
2209
2214
|
}
|
|
2210
2215
|
if (typeof j != "string")
|
|
2211
2216
|
return j === 0 ? j : +j;
|
|
2212
2217
|
j = j.replace(u, "");
|
|
2213
2218
|
var U = x.test(j);
|
|
2214
|
-
return U || M.test(j) ?
|
|
2219
|
+
return U || M.test(j) ? C(j.slice(2), U ? 2 : 8) : y.test(j) ? f : +j;
|
|
2215
2220
|
}
|
|
2216
|
-
r.exports = function(j,
|
|
2221
|
+
r.exports = function(j, S, U) {
|
|
2217
2222
|
var H = !0, G = !0;
|
|
2218
2223
|
if (typeof j != "function")
|
|
2219
2224
|
throw new TypeError(s);
|
|
@@ -2230,7 +2235,7 @@ var hn = { exports: {} };
|
|
|
2230
2235
|
return le === void 0 || ve >= Z || ve < 0 || oe && pe - fe >= V;
|
|
2231
2236
|
}
|
|
2232
2237
|
function we() {
|
|
2233
|
-
var pe =
|
|
2238
|
+
var pe = A();
|
|
2234
2239
|
if (Be(pe))
|
|
2235
2240
|
return qe(pe);
|
|
2236
2241
|
$ = setTimeout(we, function(ve) {
|
|
@@ -2242,7 +2247,7 @@ var hn = { exports: {} };
|
|
|
2242
2247
|
return $ = void 0, de && se ? _e(pe) : (se = me = void 0, te);
|
|
2243
2248
|
}
|
|
2244
2249
|
function Me() {
|
|
2245
|
-
var pe =
|
|
2250
|
+
var pe = A(), ve = Be(pe);
|
|
2246
2251
|
if (se = arguments, me = this, le = pe, ve) {
|
|
2247
2252
|
if ($ === void 0)
|
|
2248
2253
|
return function(Pe) {
|
|
@@ -2253,12 +2258,12 @@ var hn = { exports: {} };
|
|
|
2253
2258
|
}
|
|
2254
2259
|
return $ === void 0 && ($ = setTimeout(we, Z)), te;
|
|
2255
2260
|
}
|
|
2256
|
-
return Z = B(Z) || 0, R(ee) && (re = !!ee.leading, V = (oe = "maxWait" in ee) ?
|
|
2261
|
+
return Z = B(Z) || 0, R(ee) && (re = !!ee.leading, V = (oe = "maxWait" in ee) ? P(B(ee.maxWait) || 0, Z) : V, de = "trailing" in ee ? !!ee.trailing : de), Me.cancel = function() {
|
|
2257
2262
|
$ !== void 0 && clearTimeout($), fe = 0, se = le = me = $ = void 0;
|
|
2258
2263
|
}, Me.flush = function() {
|
|
2259
|
-
return $ === void 0 ? te : qe(
|
|
2264
|
+
return $ === void 0 ? te : qe(A());
|
|
2260
2265
|
}, Me;
|
|
2261
|
-
}(j,
|
|
2266
|
+
}(j, S, { leading: H, maxWait: S, trailing: G });
|
|
2262
2267
|
};
|
|
2263
2268
|
}, 703: (r, a, i) => {
|
|
2264
2269
|
var s = i(414);
|
|
@@ -2267,10 +2272,10 @@ var hn = { exports: {} };
|
|
|
2267
2272
|
function h() {
|
|
2268
2273
|
}
|
|
2269
2274
|
h.resetWarningCache = f, r.exports = function() {
|
|
2270
|
-
function u(M,
|
|
2271
|
-
if (
|
|
2272
|
-
var
|
|
2273
|
-
throw
|
|
2275
|
+
function u(M, C, T, b, E, L) {
|
|
2276
|
+
if (L !== s) {
|
|
2277
|
+
var P = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
2278
|
+
throw P.name = "Invariant Violation", P;
|
|
2274
2279
|
}
|
|
2275
2280
|
}
|
|
2276
2281
|
function y() {
|
|
@@ -2313,7 +2318,7 @@ var hn = { exports: {} };
|
|
|
2313
2318
|
var o = {};
|
|
2314
2319
|
(() => {
|
|
2315
2320
|
n.r(o), n.d(o, { LazyLoadComponent: () => mt, LazyLoadImage: () => bn, trackWindowScroll: () => le });
|
|
2316
|
-
const r =
|
|
2321
|
+
const r = Ee;
|
|
2317
2322
|
var a = n.n(r), i = n(697);
|
|
2318
2323
|
const s = Nn;
|
|
2319
2324
|
var f = n.n(s);
|
|
@@ -2338,15 +2343,15 @@ var hn = { exports: {} };
|
|
|
2338
2343
|
return m;
|
|
2339
2344
|
}
|
|
2340
2345
|
function x(g, c, m) {
|
|
2341
|
-
return (c =
|
|
2346
|
+
return (c = C(c)) in g ? Object.defineProperty(g, c, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : g[c] = m, g;
|
|
2342
2347
|
}
|
|
2343
2348
|
function M(g, c) {
|
|
2344
2349
|
for (var m = 0; m < c.length; m++) {
|
|
2345
2350
|
var v = c[m];
|
|
2346
|
-
v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(g,
|
|
2351
|
+
v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(g, C(v.key), v);
|
|
2347
2352
|
}
|
|
2348
2353
|
}
|
|
2349
|
-
function
|
|
2354
|
+
function C(g) {
|
|
2350
2355
|
var c = function(m, v) {
|
|
2351
2356
|
if (u(m) !== "object" || m === null)
|
|
2352
2357
|
return m;
|
|
@@ -2361,25 +2366,25 @@ var hn = { exports: {} };
|
|
|
2361
2366
|
}(g);
|
|
2362
2367
|
return u(c) === "symbol" ? c : String(c);
|
|
2363
2368
|
}
|
|
2364
|
-
function
|
|
2365
|
-
return
|
|
2369
|
+
function T(g, c) {
|
|
2370
|
+
return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(m, v) {
|
|
2366
2371
|
return m.__proto__ = v, m;
|
|
2367
|
-
},
|
|
2372
|
+
}, T(g, c);
|
|
2368
2373
|
}
|
|
2369
|
-
function
|
|
2370
|
-
return
|
|
2374
|
+
function b(g) {
|
|
2375
|
+
return b = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(c) {
|
|
2371
2376
|
return c.__proto__ || Object.getPrototypeOf(c);
|
|
2372
|
-
},
|
|
2377
|
+
}, b(g);
|
|
2373
2378
|
}
|
|
2374
|
-
var
|
|
2379
|
+
var E = function(g) {
|
|
2375
2380
|
g.forEach(function(c) {
|
|
2376
2381
|
c.isIntersecting && c.target.onVisible();
|
|
2377
2382
|
});
|
|
2378
|
-
},
|
|
2383
|
+
}, L = {}, P = function(g) {
|
|
2379
2384
|
(function(l, p) {
|
|
2380
2385
|
if (typeof p != "function" && p !== null)
|
|
2381
2386
|
throw new TypeError("Super expression must either be null or a function");
|
|
2382
|
-
l.prototype = Object.create(p && p.prototype, { constructor: { value: l, writable: !0, configurable: !0 } }), Object.defineProperty(l, "prototype", { writable: !1 }), p &&
|
|
2387
|
+
l.prototype = Object.create(p && p.prototype, { constructor: { value: l, writable: !0, configurable: !0 } }), Object.defineProperty(l, "prototype", { writable: !1 }), p && T(l, p);
|
|
2383
2388
|
})(q, g);
|
|
2384
2389
|
var c, m, v, k, _ = (v = q, k = function() {
|
|
2385
2390
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
@@ -2393,13 +2398,13 @@ var hn = { exports: {} };
|
|
|
2393
2398
|
return !1;
|
|
2394
2399
|
}
|
|
2395
2400
|
}(), function() {
|
|
2396
|
-
var l, p =
|
|
2401
|
+
var l, p = b(v);
|
|
2397
2402
|
if (k) {
|
|
2398
|
-
var
|
|
2399
|
-
l = Reflect.construct(p, arguments,
|
|
2403
|
+
var I = b(this).constructor;
|
|
2404
|
+
l = Reflect.construct(p, arguments, I);
|
|
2400
2405
|
} else
|
|
2401
2406
|
l = p.apply(this, arguments);
|
|
2402
|
-
return function(
|
|
2407
|
+
return function(O, w) {
|
|
2403
2408
|
if (w && (u(w) === "object" || typeof w == "function"))
|
|
2404
2409
|
return w;
|
|
2405
2410
|
if (w !== void 0)
|
|
@@ -2408,19 +2413,19 @@ var hn = { exports: {} };
|
|
|
2408
2413
|
if (D === void 0)
|
|
2409
2414
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2410
2415
|
return D;
|
|
2411
|
-
}(
|
|
2416
|
+
}(O);
|
|
2412
2417
|
}(this, l);
|
|
2413
2418
|
});
|
|
2414
2419
|
function q(l) {
|
|
2415
2420
|
var p;
|
|
2416
|
-
if (function(
|
|
2417
|
-
if (!(
|
|
2421
|
+
if (function(O, w) {
|
|
2422
|
+
if (!(O instanceof w))
|
|
2418
2423
|
throw new TypeError("Cannot call a class as a function");
|
|
2419
2424
|
}(this, q), (p = _.call(this, l)).supportsObserver = !l.scrollPosition && l.useIntersectionObserver && h(), p.supportsObserver) {
|
|
2420
|
-
var
|
|
2421
|
-
p.observer = function(
|
|
2422
|
-
return
|
|
2423
|
-
}(
|
|
2425
|
+
var I = l.threshold;
|
|
2426
|
+
p.observer = function(O) {
|
|
2427
|
+
return L[O] = L[O] || new IntersectionObserver(E, { rootMargin: O + "px" }), L[O];
|
|
2428
|
+
}(I);
|
|
2424
2429
|
}
|
|
2425
2430
|
return p;
|
|
2426
2431
|
}
|
|
@@ -2431,17 +2436,17 @@ var hn = { exports: {} };
|
|
|
2431
2436
|
} }, { key: "componentDidUpdate", value: function() {
|
|
2432
2437
|
this.supportsObserver || this.updateVisibility();
|
|
2433
2438
|
} }, { key: "getPlaceholderBoundingBox", value: function() {
|
|
2434
|
-
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props.scrollPosition, p = this.placeholder.getBoundingClientRect(),
|
|
2435
|
-
return { bottom: l.y + p.bottom + w, left: l.x + p.left +
|
|
2439
|
+
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props.scrollPosition, p = this.placeholder.getBoundingClientRect(), I = f().findDOMNode(this.placeholder).style, O = parseInt(I.getPropertyValue("margin-left"), 10) || 0, w = parseInt(I.getPropertyValue("margin-top"), 10) || 0;
|
|
2440
|
+
return { bottom: l.y + p.bottom + w, left: l.x + p.left + O, right: l.x + p.right + O, top: l.y + p.top + w };
|
|
2436
2441
|
} }, { key: "isPlaceholderInViewport", value: function() {
|
|
2437
2442
|
if (typeof window > "u" || !this.placeholder)
|
|
2438
2443
|
return !1;
|
|
2439
|
-
var l = this.props, p = l.scrollPosition,
|
|
2440
|
-
return K -
|
|
2444
|
+
var l = this.props, p = l.scrollPosition, I = l.threshold, O = this.getPlaceholderBoundingBox(p), w = p.y + window.innerHeight, D = p.x, z = p.x + window.innerWidth, K = p.y;
|
|
2445
|
+
return K - I <= O.bottom && w + I >= O.top && D - I <= O.right && z + I >= O.left;
|
|
2441
2446
|
} }, { key: "updateVisibility", value: function() {
|
|
2442
2447
|
this.isPlaceholderInViewport() && this.props.onVisible();
|
|
2443
2448
|
} }, { key: "render", value: function() {
|
|
2444
|
-
var l = this, p = this.props,
|
|
2449
|
+
var l = this, p = this.props, I = p.className, O = p.height, w = p.placeholder, D = p.style, z = p.width;
|
|
2445
2450
|
if (w && typeof w.type != "function")
|
|
2446
2451
|
return a().cloneElement(w, { ref: function(W) {
|
|
2447
2452
|
return l.placeholder = W;
|
|
@@ -2457,14 +2462,14 @@ var hn = { exports: {} };
|
|
|
2457
2462
|
}
|
|
2458
2463
|
return W;
|
|
2459
2464
|
}({ display: "inline-block" }, D);
|
|
2460
|
-
return z !== void 0 && (K.width = z),
|
|
2465
|
+
return z !== void 0 && (K.width = z), O !== void 0 && (K.height = O), a().createElement("span", { className: I, ref: function(W) {
|
|
2461
2466
|
return l.placeholder = W;
|
|
2462
2467
|
}, style: K }, w);
|
|
2463
2468
|
} }], m && M(c.prototype, m), Object.defineProperty(c, "prototype", { writable: !1 }), q;
|
|
2464
2469
|
}(a().Component);
|
|
2465
|
-
|
|
2466
|
-
const F =
|
|
2467
|
-
var
|
|
2470
|
+
P.propTypes = { onVisible: i.PropTypes.func.isRequired, className: i.PropTypes.string, height: i.PropTypes.oneOfType([i.PropTypes.number, i.PropTypes.string]), placeholder: i.PropTypes.element, threshold: i.PropTypes.number, useIntersectionObserver: i.PropTypes.bool, scrollPosition: i.PropTypes.shape({ x: i.PropTypes.number.isRequired, y: i.PropTypes.number.isRequired }), width: i.PropTypes.oneOfType([i.PropTypes.number, i.PropTypes.string]) }, P.defaultProps = { className: "", placeholder: null, threshold: 100, useIntersectionObserver: !0 };
|
|
2471
|
+
const F = P;
|
|
2472
|
+
var A = n(296), R = n.n(A), B = n(96), j = n.n(B), S = function(g) {
|
|
2468
2473
|
var c = getComputedStyle(g, null);
|
|
2469
2474
|
return c.getPropertyValue("overflow") + c.getPropertyValue("overflow-y") + c.getPropertyValue("overflow-x");
|
|
2470
2475
|
};
|
|
@@ -2472,7 +2477,7 @@ var hn = { exports: {} };
|
|
|
2472
2477
|
if (!(g instanceof HTMLElement))
|
|
2473
2478
|
return window;
|
|
2474
2479
|
for (var c = g; c && c instanceof HTMLElement; ) {
|
|
2475
|
-
if (/(scroll|auto)/.test(
|
|
2480
|
+
if (/(scroll|auto)/.test(S(c)))
|
|
2476
2481
|
return c;
|
|
2477
2482
|
c = c.parentNode;
|
|
2478
2483
|
}
|
|
@@ -2543,10 +2548,10 @@ var hn = { exports: {} };
|
|
|
2543
2548
|
};
|
|
2544
2549
|
const le = function(g) {
|
|
2545
2550
|
var c = function(m) {
|
|
2546
|
-
(function(
|
|
2547
|
-
if (typeof
|
|
2551
|
+
(function(I, O) {
|
|
2552
|
+
if (typeof O != "function" && O !== null)
|
|
2548
2553
|
throw new TypeError("Super expression must either be null or a function");
|
|
2549
|
-
|
|
2554
|
+
I.prototype = Object.create(O && O.prototype, { constructor: { value: I, writable: !0, configurable: !0 } }), Object.defineProperty(I, "prototype", { writable: !1 }), O && ee(I, O);
|
|
2550
2555
|
})(p, m);
|
|
2551
2556
|
var v, k, _, q, l = (_ = p, q = function() {
|
|
2552
2557
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
@@ -2560,23 +2565,23 @@ var hn = { exports: {} };
|
|
|
2560
2565
|
return !1;
|
|
2561
2566
|
}
|
|
2562
2567
|
}(), function() {
|
|
2563
|
-
var
|
|
2568
|
+
var I, O = V(_);
|
|
2564
2569
|
if (q) {
|
|
2565
2570
|
var w = V(this).constructor;
|
|
2566
|
-
|
|
2571
|
+
I = Reflect.construct(O, arguments, w);
|
|
2567
2572
|
} else
|
|
2568
|
-
|
|
2569
|
-
return se(this,
|
|
2573
|
+
I = O.apply(this, arguments);
|
|
2574
|
+
return se(this, I);
|
|
2570
2575
|
});
|
|
2571
|
-
function p(
|
|
2572
|
-
var
|
|
2576
|
+
function p(I) {
|
|
2577
|
+
var O;
|
|
2573
2578
|
if (function(D, z) {
|
|
2574
2579
|
if (!(D instanceof z))
|
|
2575
2580
|
throw new TypeError("Cannot call a class as a function");
|
|
2576
|
-
}(this, p), (
|
|
2577
|
-
return se(
|
|
2578
|
-
var w =
|
|
2579
|
-
return
|
|
2581
|
+
}(this, p), (O = l.call(this, I)).useIntersectionObserver = I.useIntersectionObserver && h(), O.useIntersectionObserver)
|
|
2582
|
+
return se(O);
|
|
2583
|
+
var w = O.onChangeScroll.bind(me(O));
|
|
2584
|
+
return I.delayMethod === "debounce" ? O.delayedScroll = R()(w, I.delayTime) : I.delayMethod === "throttle" && (O.delayedScroll = j()(w, I.delayTime)), O.state = { scrollPosition: { x: te(), y: $() } }, O.baseComponentRef = a().createRef(), O;
|
|
2580
2585
|
}
|
|
2581
2586
|
return v = p, (k = [{ key: "componentDidMount", value: function() {
|
|
2582
2587
|
this.addListeners();
|
|
@@ -2591,7 +2596,7 @@ var hn = { exports: {} };
|
|
|
2591
2596
|
} }, { key: "onChangeScroll", value: function() {
|
|
2592
2597
|
this.useIntersectionObserver || this.setState({ scrollPosition: { x: te(), y: $() } });
|
|
2593
2598
|
} }, { key: "render", value: function() {
|
|
2594
|
-
var
|
|
2599
|
+
var I = this.props, O = (I.delayMethod, I.delayTime, function(D, z) {
|
|
2595
2600
|
if (D == null)
|
|
2596
2601
|
return {};
|
|
2597
2602
|
var K, W, ce = function(he, ke) {
|
|
@@ -2608,8 +2613,8 @@ var hn = { exports: {} };
|
|
|
2608
2613
|
K = J[W], z.indexOf(K) >= 0 || Object.prototype.propertyIsEnumerable.call(D, K) && (ce[K] = D[K]);
|
|
2609
2614
|
}
|
|
2610
2615
|
return ce;
|
|
2611
|
-
}(
|
|
2612
|
-
return a().createElement(g, Y({ forwardRef: this.baseComponentRef, scrollPosition: w },
|
|
2616
|
+
}(I, G)), w = this.useIntersectionObserver ? null : this.state.scrollPosition;
|
|
2617
|
+
return a().createElement(g, Y({ forwardRef: this.baseComponentRef, scrollPosition: w }, O));
|
|
2613
2618
|
} }]) && Z(v.prototype, k), Object.defineProperty(v, "prototype", { writable: !1 }), p;
|
|
2614
2619
|
}(a().Component);
|
|
2615
2620
|
return c.propTypes = { delayMethod: i.PropTypes.oneOf(["debounce", "throttle"]), delayTime: i.PropTypes.number, useIntersectionObserver: i.PropTypes.bool }, c.defaultProps = { delayMethod: "throttle", delayTime: 300, useIntersectionObserver: !0 }, c;
|
|
@@ -2669,11 +2674,11 @@ var hn = { exports: {} };
|
|
|
2669
2674
|
}(), function() {
|
|
2670
2675
|
var l, p = de(v);
|
|
2671
2676
|
if (k) {
|
|
2672
|
-
var
|
|
2673
|
-
l = Reflect.construct(p, arguments,
|
|
2677
|
+
var I = de(this).constructor;
|
|
2678
|
+
l = Reflect.construct(p, arguments, I);
|
|
2674
2679
|
} else
|
|
2675
2680
|
l = p.apply(this, arguments);
|
|
2676
|
-
return function(
|
|
2681
|
+
return function(O, w) {
|
|
2677
2682
|
if (w && (fe(w) === "object" || typeof w == "function"))
|
|
2678
2683
|
return w;
|
|
2679
2684
|
if (w !== void 0)
|
|
@@ -2682,12 +2687,12 @@ var hn = { exports: {} };
|
|
|
2682
2687
|
if (D === void 0)
|
|
2683
2688
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2684
2689
|
return D;
|
|
2685
|
-
}(
|
|
2690
|
+
}(O);
|
|
2686
2691
|
}(this, l);
|
|
2687
2692
|
});
|
|
2688
2693
|
function q(l) {
|
|
2689
|
-
return function(p,
|
|
2690
|
-
if (!(p instanceof
|
|
2694
|
+
return function(p, I) {
|
|
2695
|
+
if (!(p instanceof I))
|
|
2691
2696
|
throw new TypeError("Cannot call a class as a function");
|
|
2692
2697
|
}(this, q), _.call(this, l);
|
|
2693
2698
|
}
|
|
@@ -2756,16 +2761,16 @@ var hn = { exports: {} };
|
|
|
2756
2761
|
}(), function() {
|
|
2757
2762
|
var l, p = ve(v);
|
|
2758
2763
|
if (k) {
|
|
2759
|
-
var
|
|
2760
|
-
l = Reflect.construct(p, arguments,
|
|
2764
|
+
var I = ve(this).constructor;
|
|
2765
|
+
l = Reflect.construct(p, arguments, I);
|
|
2761
2766
|
} else
|
|
2762
2767
|
l = p.apply(this, arguments);
|
|
2763
|
-
return function(
|
|
2768
|
+
return function(O, w) {
|
|
2764
2769
|
if (w && (we(w) === "object" || typeof w == "function"))
|
|
2765
2770
|
return w;
|
|
2766
2771
|
if (w !== void 0)
|
|
2767
2772
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
2768
|
-
return pe(
|
|
2773
|
+
return pe(O);
|
|
2769
2774
|
}(this, l);
|
|
2770
2775
|
});
|
|
2771
2776
|
function q(l) {
|
|
@@ -2774,8 +2779,8 @@ var hn = { exports: {} };
|
|
|
2774
2779
|
if (!(z instanceof K))
|
|
2775
2780
|
throw new TypeError("Cannot call a class as a function");
|
|
2776
2781
|
})(this, q), p = _.call(this, l);
|
|
2777
|
-
var
|
|
2778
|
-
return p.state = { visible: D }, D && (
|
|
2782
|
+
var I = l.afterLoad, O = l.beforeLoad, w = l.scrollPosition, D = l.visibleByDefault;
|
|
2783
|
+
return p.state = { visible: D }, D && (O(), I()), p.onVisible = p.onVisible.bind(pe(p)), p.isScrollTracked = !!(w && Number.isFinite(w.x) && w.x >= 0 && Number.isFinite(w.y) && w.y >= 0), p;
|
|
2779
2784
|
}
|
|
2780
2785
|
return c = q, (m = [{ key: "componentDidUpdate", value: function(l, p) {
|
|
2781
2786
|
p.visible !== this.state.visible && this.props.afterLoad();
|
|
@@ -2784,8 +2789,8 @@ var hn = { exports: {} };
|
|
|
2784
2789
|
} }, { key: "render", value: function() {
|
|
2785
2790
|
if (this.state.visible)
|
|
2786
2791
|
return this.props.children;
|
|
2787
|
-
var l = this.props, p = l.className,
|
|
2788
|
-
return this.isScrollTracked || ce && h() ? a().createElement(F, { className: p, height: w, onVisible: this.onVisible, placeholder: D, scrollPosition: z, style: K, threshold: W, useIntersectionObserver: ce, width: J }) : a().createElement(Be, { className: p, delayMethod:
|
|
2792
|
+
var l = this.props, p = l.className, I = l.delayMethod, O = l.delayTime, w = l.height, D = l.placeholder, z = l.scrollPosition, K = l.style, W = l.threshold, ce = l.useIntersectionObserver, J = l.width;
|
|
2793
|
+
return this.isScrollTracked || ce && h() ? a().createElement(F, { className: p, height: w, onVisible: this.onVisible, placeholder: D, scrollPosition: z, style: K, threshold: W, useIntersectionObserver: ce, width: J }) : a().createElement(Be, { className: p, delayMethod: I, delayTime: O, height: w, onVisible: this.onVisible, placeholder: D, style: K, threshold: W, width: J });
|
|
2789
2794
|
} }]) && qe(c.prototype, m), Object.defineProperty(c, "prototype", { writable: !1 }), q;
|
|
2790
2795
|
}(a().Component);
|
|
2791
2796
|
Pe.propTypes = { afterLoad: i.PropTypes.func, beforeLoad: i.PropTypes.func, useIntersectionObserver: i.PropTypes.bool, visibleByDefault: i.PropTypes.bool }, Pe.defaultProps = { afterLoad: function() {
|
|
@@ -2887,11 +2892,11 @@ var hn = { exports: {} };
|
|
|
2887
2892
|
}(), function() {
|
|
2888
2893
|
var l, p = Ue(v);
|
|
2889
2894
|
if (k) {
|
|
2890
|
-
var
|
|
2891
|
-
l = Reflect.construct(p, arguments,
|
|
2895
|
+
var I = Ue(this).constructor;
|
|
2896
|
+
l = Reflect.construct(p, arguments, I);
|
|
2892
2897
|
} else
|
|
2893
2898
|
l = p.apply(this, arguments);
|
|
2894
|
-
return function(
|
|
2899
|
+
return function(O, w) {
|
|
2895
2900
|
if (w && (Ae(w) === "object" || typeof w == "function"))
|
|
2896
2901
|
return w;
|
|
2897
2902
|
if (w !== void 0)
|
|
@@ -2900,13 +2905,13 @@ var hn = { exports: {} };
|
|
|
2900
2905
|
if (D === void 0)
|
|
2901
2906
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2902
2907
|
return D;
|
|
2903
|
-
}(
|
|
2908
|
+
}(O);
|
|
2904
2909
|
}(this, l);
|
|
2905
2910
|
});
|
|
2906
2911
|
function q(l) {
|
|
2907
2912
|
var p;
|
|
2908
|
-
return function(
|
|
2909
|
-
if (!(
|
|
2913
|
+
return function(I, O) {
|
|
2914
|
+
if (!(I instanceof O))
|
|
2910
2915
|
throw new TypeError("Cannot call a class as a function");
|
|
2911
2916
|
}(this, q), (p = _.call(this, l)).state = { loaded: !1 }, p;
|
|
2912
2917
|
}
|
|
@@ -2916,8 +2921,8 @@ var hn = { exports: {} };
|
|
|
2916
2921
|
l.props.onLoad(p), l.props.afterLoad(), l.setState({ loaded: !0 });
|
|
2917
2922
|
};
|
|
2918
2923
|
} }, { key: "getImg", value: function() {
|
|
2919
|
-
var l = this.props, p = (l.afterLoad, l.beforeLoad, l.delayMethod, l.delayTime, l.effect, l.placeholder, l.placeholderSrc, l.scrollPosition, l.threshold, l.useIntersectionObserver, l.visibleByDefault, l.wrapperClassName, l.wrapperProps, function(
|
|
2920
|
-
if (
|
|
2924
|
+
var l = this.props, p = (l.afterLoad, l.beforeLoad, l.delayMethod, l.delayTime, l.effect, l.placeholder, l.placeholderSrc, l.scrollPosition, l.threshold, l.useIntersectionObserver, l.visibleByDefault, l.wrapperClassName, l.wrapperProps, function(I, O) {
|
|
2925
|
+
if (I == null)
|
|
2921
2926
|
return {};
|
|
2922
2927
|
var w, D, z = function(W, ce) {
|
|
2923
2928
|
if (W == null)
|
|
@@ -2926,24 +2931,24 @@ var hn = { exports: {} };
|
|
|
2926
2931
|
for (he = 0; he < Re.length; he++)
|
|
2927
2932
|
J = Re[he], ce.indexOf(J) >= 0 || (ke[J] = W[J]);
|
|
2928
2933
|
return ke;
|
|
2929
|
-
}(
|
|
2934
|
+
}(I, O);
|
|
2930
2935
|
if (Object.getOwnPropertySymbols) {
|
|
2931
|
-
var K = Object.getOwnPropertySymbols(
|
|
2936
|
+
var K = Object.getOwnPropertySymbols(I);
|
|
2932
2937
|
for (D = 0; D < K.length; D++)
|
|
2933
|
-
w = K[D],
|
|
2938
|
+
w = K[D], O.indexOf(w) >= 0 || Object.prototype.propertyIsEnumerable.call(I, w) && (z[w] = I[w]);
|
|
2934
2939
|
}
|
|
2935
2940
|
return z;
|
|
2936
2941
|
}(l, gn));
|
|
2937
2942
|
return a().createElement("img", Fe({}, p, { onLoad: this.onImageLoad() }));
|
|
2938
2943
|
} }, { key: "getLazyLoadImage", value: function() {
|
|
2939
|
-
var l = this.props, p = l.beforeLoad,
|
|
2940
|
-
return a().createElement(mt, { beforeLoad: p, className:
|
|
2944
|
+
var l = this.props, p = l.beforeLoad, I = l.className, O = l.delayMethod, w = l.delayTime, D = l.height, z = l.placeholder, K = l.scrollPosition, W = l.style, ce = l.threshold, J = l.useIntersectionObserver, he = l.visibleByDefault, ke = l.width;
|
|
2945
|
+
return a().createElement(mt, { beforeLoad: p, className: I, delayMethod: O, delayTime: w, height: D, placeholder: z, scrollPosition: K, style: W, threshold: ce, useIntersectionObserver: J, visibleByDefault: he, width: ke }, this.getImg());
|
|
2941
2946
|
} }, { key: "getWrappedLazyLoadImage", value: function(l) {
|
|
2942
|
-
var p = this.props,
|
|
2943
|
-
return a().createElement("span", Fe({ className: z + " lazy-load-image-background " +
|
|
2947
|
+
var p = this.props, I = p.effect, O = p.height, w = p.placeholderSrc, D = p.width, z = p.wrapperClassName, K = p.wrapperProps, W = this.state.loaded, ce = W ? " lazy-load-image-loaded" : "", J = W || !w ? {} : { backgroundImage: "url(".concat(w, ")"), backgroundSize: "100% 100%" };
|
|
2948
|
+
return a().createElement("span", Fe({ className: z + " lazy-load-image-background " + I + ce, style: bt(bt({}, J), {}, { color: "transparent", display: "inline-block", height: O, width: D }) }, K), l);
|
|
2944
2949
|
} }, { key: "render", value: function() {
|
|
2945
|
-
var l = this.props, p = l.effect,
|
|
2946
|
-
return (p ||
|
|
2950
|
+
var l = this.props, p = l.effect, I = l.placeholderSrc, O = l.visibleByDefault, w = l.wrapperClassName, D = l.wrapperProps, z = this.getLazyLoadImage();
|
|
2951
|
+
return (p || I) && !O || w || D ? this.getWrappedLazyLoadImage(z) : z;
|
|
2947
2952
|
} }]) && vn(c.prototype, m), Object.defineProperty(c, "prototype", { writable: !1 }), q;
|
|
2948
2953
|
}(a().Component);
|
|
2949
2954
|
et.propTypes = { onLoad: i.PropTypes.func, afterLoad: i.PropTypes.func, beforeLoad: i.PropTypes.func, delayMethod: i.PropTypes.string, delayTime: i.PropTypes.number, effect: i.PropTypes.string, placeholderSrc: i.PropTypes.string, threshold: i.PropTypes.number, useIntersectionObserver: i.PropTypes.bool, visibleByDefault: i.PropTypes.bool, wrapperClassName: i.PropTypes.string, wrapperProps: i.PropTypes.object }, et.defaultProps = { onLoad: function() {
|
|
@@ -3032,31 +3037,31 @@ function co({ fallback: e, size: t, classes: n, showLabel: o, alt: r, dereferenc
|
|
|
3032
3037
|
] });
|
|
3033
3038
|
}
|
|
3034
3039
|
function Lo({ flat: e, size: t, classes: n = {}, showLabel: o, figure: r, fallback: a }) {
|
|
3035
|
-
var M,
|
|
3036
|
-
const i =
|
|
3040
|
+
var M, C, T, b, E, L;
|
|
3041
|
+
const i = xe(null), { items: s, sequence: f, currentSequenceIndex: h, setSequenceIndex: u } = Nt(), y = {
|
|
3037
3042
|
row: ((M = n.selected) == null ? void 0 : M.row) || n.row,
|
|
3038
|
-
item: ((
|
|
3039
|
-
figure: ((
|
|
3040
|
-
img: ((
|
|
3041
|
-
label: ((
|
|
3042
|
-
imageWrapper: ((
|
|
3043
|
+
item: ((C = n.selected) == null ? void 0 : C.item) || n.item,
|
|
3044
|
+
figure: ((T = n.selected) == null ? void 0 : T.figure) || n.figure,
|
|
3045
|
+
img: ((b = n.selected) == null ? void 0 : b.img) || n.img,
|
|
3046
|
+
label: ((E = n.selected) == null ? void 0 : E.label) || n.label,
|
|
3047
|
+
imageWrapper: ((L = n.selected) == null ? void 0 : L.imageWrapper) || n.imageWrapper
|
|
3043
3048
|
};
|
|
3044
3049
|
st(() => {
|
|
3045
3050
|
if (!i.current)
|
|
3046
3051
|
return;
|
|
3047
|
-
const
|
|
3048
|
-
|
|
3052
|
+
const P = i.current.querySelector("[data-selected=true]");
|
|
3053
|
+
P && P.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
|
3049
3054
|
}, [h]);
|
|
3050
3055
|
const x = [];
|
|
3051
|
-
for (const
|
|
3052
|
-
const F = [],
|
|
3053
|
-
for (const R of
|
|
3056
|
+
for (const P of f) {
|
|
3057
|
+
const F = [], A = f[h] === P;
|
|
3058
|
+
for (const R of P) {
|
|
3054
3059
|
const B = s[R];
|
|
3055
3060
|
F.push(
|
|
3056
|
-
/* @__PURE__ */ d("div", { className:
|
|
3061
|
+
/* @__PURE__ */ d("div", { className: A ? y.item : n.item, children: /* @__PURE__ */ d(
|
|
3057
3062
|
so,
|
|
3058
3063
|
{
|
|
3059
|
-
classes:
|
|
3064
|
+
classes: A ? y : n,
|
|
3060
3065
|
canvasId: B.id,
|
|
3061
3066
|
size: t,
|
|
3062
3067
|
showLabel: o,
|
|
@@ -3076,10 +3081,10 @@ function Lo({ flat: e, size: t, classes: n = {}, showLabel: o, figure: r, fallba
|
|
|
3076
3081
|
"div",
|
|
3077
3082
|
{
|
|
3078
3083
|
onClick: (R) => {
|
|
3079
|
-
u(f.indexOf(
|
|
3084
|
+
u(f.indexOf(P));
|
|
3080
3085
|
},
|
|
3081
|
-
"data-selected":
|
|
3082
|
-
className:
|
|
3086
|
+
"data-selected": A,
|
|
3087
|
+
className: A ? y.row : n.row,
|
|
3083
3088
|
children: F
|
|
3084
3089
|
}
|
|
3085
3090
|
)
|
|
@@ -3144,49 +3149,49 @@ function Fo(e, t) {
|
|
|
3144
3149
|
return { id: n, isLoaded: o, error: r, manifest: a, requestId: i, cached: s };
|
|
3145
3150
|
}
|
|
3146
3151
|
function uo({ cacheKey: e } = {}) {
|
|
3147
|
-
const t = Se(), n = ht(), o = ae(), r = Je(), [a, i] = ie(void 0), [s, f] = ie(!1), [h, u] = ie("idle"), [y, x] = ie(void 0), M = t ? t.id : "undefined",
|
|
3152
|
+
const t = Se(), n = ht(), o = ae(), r = Je(), [a, i] = ie(void 0), [s, f] = ie(!1), [h, u] = ie("idle"), [y, x] = ie(void 0), M = t ? t.id : "undefined", C = N(() => {
|
|
3148
3153
|
try {
|
|
3149
3154
|
if (t && n.length) {
|
|
3150
|
-
const
|
|
3151
|
-
return
|
|
3152
|
-
id:
|
|
3153
|
-
width:
|
|
3154
|
-
height:
|
|
3155
|
+
const b = n[0], E = o.get(b.body[0]), P = it(E)[0];
|
|
3156
|
+
return P && r.loadServiceSync({
|
|
3157
|
+
id: P.id || P["@id"],
|
|
3158
|
+
width: P.width || t.width,
|
|
3159
|
+
height: P.height || t.height
|
|
3155
3160
|
}) || void 0;
|
|
3156
3161
|
}
|
|
3157
|
-
} catch (
|
|
3158
|
-
console.error(
|
|
3162
|
+
} catch (b) {
|
|
3163
|
+
console.error(b);
|
|
3159
3164
|
}
|
|
3160
|
-
}, [M, e, t]),
|
|
3165
|
+
}, [M, e, t]), T = h === "success" && a ? a : C;
|
|
3161
3166
|
return be(() => {
|
|
3162
3167
|
(async () => {
|
|
3163
3168
|
try {
|
|
3164
3169
|
if (t && n.length) {
|
|
3165
|
-
const
|
|
3166
|
-
if (!
|
|
3170
|
+
const b = n[0], E = o.get(b.body[0]), P = it(E)[0];
|
|
3171
|
+
if (!P)
|
|
3167
3172
|
return;
|
|
3168
3173
|
f(!0), u("loading");
|
|
3169
3174
|
try {
|
|
3170
3175
|
const F = await r.loadService({
|
|
3171
|
-
id:
|
|
3172
|
-
width:
|
|
3173
|
-
height:
|
|
3176
|
+
id: P.id || P["@id"],
|
|
3177
|
+
width: P.width || t.width,
|
|
3178
|
+
height: P.height || t.height
|
|
3174
3179
|
}) || void 0;
|
|
3175
3180
|
i(F), u("success"), f(!1);
|
|
3176
3181
|
} catch (F) {
|
|
3177
3182
|
u("error"), x(F);
|
|
3178
3183
|
}
|
|
3179
3184
|
}
|
|
3180
|
-
} catch (
|
|
3181
|
-
u("error"), x(
|
|
3185
|
+
} catch (b) {
|
|
3186
|
+
u("error"), x(b);
|
|
3182
3187
|
}
|
|
3183
3188
|
})();
|
|
3184
3189
|
}, [M, e]), N(() => ({
|
|
3185
|
-
data:
|
|
3190
|
+
data: T,
|
|
3186
3191
|
isFetching: s,
|
|
3187
3192
|
status: h,
|
|
3188
3193
|
error: y
|
|
3189
|
-
}), [
|
|
3194
|
+
}), [T, s, h, y]);
|
|
3190
3195
|
}
|
|
3191
3196
|
function Uo() {
|
|
3192
3197
|
const e = uo();
|
|
@@ -3223,7 +3228,7 @@ export {
|
|
|
3223
3228
|
no as Image,
|
|
3224
3229
|
Rr as ImageServiceLoaderContext,
|
|
3225
3230
|
Hn as InnerViewerProvider,
|
|
3226
|
-
|
|
3231
|
+
Eo as LanguageProvider,
|
|
3227
3232
|
Qr as LanguageString,
|
|
3228
3233
|
Ne as LocaleString,
|
|
3229
3234
|
Fn as ManifestContext,
|
|
@@ -3288,7 +3293,7 @@ export {
|
|
|
3288
3293
|
Xr as useLocaleString,
|
|
3289
3294
|
Ce as useManifest,
|
|
3290
3295
|
To as useMediaActions,
|
|
3291
|
-
|
|
3296
|
+
Io as useMediaElements,
|
|
3292
3297
|
xo as useMediaState,
|
|
3293
3298
|
Nr as usePaintables,
|
|
3294
3299
|
ht as usePaintingAnnotations,
|