@nulib/clover 4.2.0 → 4.3.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/README.md +1 -1
- package/dist/components/Canvas/CanvasView.mjs +33 -4
- package/dist/components/Canvas/ChaptersMenu.mjs +6 -1
- package/dist/components/Canvas/ControlMenu.mjs +9 -2
- package/dist/components/Canvas/Controls.mjs +17 -4
- package/dist/components/Canvas/FrameAnimation.mjs +3 -0
- package/dist/components/Canvas/ImageControls.mjs +8 -3
- package/dist/components/Canvas/Placeholder.mjs +5 -2
- package/dist/components/Canvas/RowFits.mjs +3 -1
- package/dist/components/Canvas/media/MediaBody.mjs +3 -0
- package/dist/components/Canvas/media/Player.mjs +3 -0
- package/dist/components/Canvas/media/Transport.mjs +3 -0
- package/dist/components/Canvas/media/useMediaElement.mjs +32 -9
- package/dist/components/Items/masonry.mjs +2 -0
- package/dist/components/Map/MapView.mjs +42 -2
- package/dist/components/Map/maplibre-sheet.mjs +5 -0
- package/dist/components/Map/sheet.mjs +19 -0
- package/dist/components/Map/worker.mjs +28 -1
- package/dist/components/Scene/SceneView.mjs +3 -0
- package/dist/core/content-state.mjs +1 -11
- package/dist/core/load.mjs +9 -1
- package/dist/core/presentation.mjs +4 -5
- package/dist/core/sanitize.mjs +15 -3
- package/dist/core/svg-shape.mjs +2 -1
- package/dist/core/thumbnail.mjs +15 -4
- package/dist/core/trusted.mjs +26 -0
- package/dist/core/vtt.mjs +20 -9
- package/dist/index.d.mts +200 -1
- package/dist/index.mjs +11 -0
- package/dist/lib/renderer/CanvasRenderer.mjs +48 -7
- package/dist/lib/renderer/camera/CameraAnimator.mjs +39 -20
- package/dist/lib/renderer/input/GestureController.mjs +15 -5
- package/dist/map/index.d.mts +6 -1
- package/dist/styles/collection-select.css +1 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/default.css +1 -0
- package/dist/styles/items.css +1 -0
- package/dist/styles/map.css +1 -0
- package/dist/{web-components/Transport-VUxSEIQO.mjs → styles/media.css} +1 -1
- package/dist/styles/panel.css +1 -0
- package/dist/styles/scene.css +1 -0
- package/dist/styles/split.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +2 -0
- package/dist/templates/document/Document.mjs +12 -2
- package/dist/templates/document/Sheets.mjs +2 -0
- package/dist/templates/gallery/Gallery.mjs +3 -1
- package/dist/templates/index.d.mts +102 -6
- package/dist/templates/shared/Lightbox.mjs +50 -3
- package/dist/templates/shared/LightboxView.mjs +3 -1
- package/dist/templates.css +1 -1
- package/dist/ui/Button.mjs +3 -1
- package/dist/ui/ControlCluster.mjs +6 -3
- package/dist/ui/Markup.mjs +8 -7
- package/dist/ui/Tip.mjs +6 -1
- package/dist/ui/adoptSheet.mjs +19 -0
- package/dist/ui/sheets/map.mjs +5 -0
- package/dist/ui/sheets/media.mjs +5 -0
- package/dist/ui/sheets/scene.mjs +5 -0
- package/dist/web-components/{About-D1TBGGPL.mjs → About-uNCjvWgs.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-DTacmRA9.mjs → AnnotationItems-JwlcCvPo.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-DYc9ekWS.mjs → AnnotationMenu-BWyKEyvW.mjs} +1 -1
- package/dist/web-components/{AnnotationState--5ghW0C2.mjs → AnnotationState-Bhqs75Br.mjs} +1 -1
- package/dist/web-components/{Annotations-BG8lPjk1.mjs → Annotations-C7y0N8Lj.mjs} +1 -1
- package/dist/web-components/{Annotations-Bvc_FmJ5.mjs → Annotations-ZwcRh2UE.mjs} +2 -2
- package/dist/web-components/{Body-QQ1DmnbP.mjs → Body-DyrvRDkt.mjs} +1 -1
- package/dist/web-components/{BodyAlert-A4xRjOKr.mjs → BodyAlert-XV88XjL8.mjs} +1 -1
- package/dist/web-components/Button-BIaw5k1q.mjs +1 -0
- package/dist/web-components/{Camera-DqT_1MgD.mjs → Camera-7SlnmGtb.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-TZtR3zHf.mjs → Canvas2DBackend-DBGZRGid.mjs} +1 -1
- package/dist/web-components/CanvasView-CmDxczm9.mjs +2 -0
- package/dist/web-components/{CaptionDetails-DMRWmtaY.mjs → CaptionDetails-Bxz8AXMz.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-CMQiBqvx.mjs +1 -0
- package/dist/web-components/{Chevron-DFGbSGPI.mjs → Chevron-B3XaClVT.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-C80kdxvq.mjs → ChoiceMenu-pugo5zxI.mjs} +1 -1
- package/dist/web-components/{Collection-B4CxBsFL.mjs → Collection-Ch_FeSKp.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-DO8YO2p7.mjs → CollectionSelect-2jDEkOcK.mjs} +1 -1
- package/dist/web-components/{Connected-DthCPaHl.mjs → Connected-3hnIPSWM.mjs} +1 -1
- package/dist/web-components/{Connected-sYBn_9MK.mjs → Connected-Bne3I5E1.mjs} +1 -1
- package/dist/web-components/{Connected-CcbVqzmj.mjs → Connected-DuANHN93.mjs} +1 -1
- package/dist/web-components/{Contents-AVPYYXht.mjs → Contents-DIQrin_-.mjs} +1 -1
- package/dist/web-components/ControlMenu-BydnCTTQ.mjs +1 -0
- package/dist/web-components/ControlsFade-CleBsk-W.mjs +1 -0
- package/dist/web-components/CountMenu-CReBYVwu.mjs +1 -0
- package/dist/web-components/Cue-2zGQuUOC.mjs +1 -0
- package/dist/web-components/Document-pjc2qOX4.mjs +1 -0
- package/dist/web-components/{DomLayers-DlRapZ1u.mjs → DomLayers-D9X_FPto.mjs} +1 -1
- package/dist/web-components/{Download-Ci_JUTVd.mjs → Download-B8MpVqgk.mjs} +1 -1
- package/dist/web-components/{EntryBodies-C0ICfS2R.mjs → EntryBodies-DdpRfU5U.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-DxHhfRo_.mjs → EntryThumbnail-DM7Zjj1z.mjs} +1 -1
- package/dist/web-components/{FieldPill-CVfeeafm.mjs → FieldPill-BAql8_6s.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-AZpVvu0R.mjs → FrameAnimation-Dj46RxuL.mjs} +1 -1
- package/dist/web-components/Gallery-B9FNA02Z.mjs +1 -0
- package/dist/web-components/{HideToggle-0nlIo-f8.mjs → HideToggle-duXvDvDw.mjs} +1 -1
- package/dist/web-components/ImageControls-DODKjC0d.mjs +1 -0
- package/dist/web-components/{Items-Drd82_Jj.mjs → Items-BHTQJU7T.mjs} +1 -1
- package/dist/web-components/{Label-BIjqJ-_T.mjs → Label-D4dlrtpH.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-DkSc-n6g.mjs → LanguageChoice-DR3X-dtJ.mjs} +1 -1
- package/dist/web-components/LightboxView-D-aBaKfB.mjs +1 -0
- package/dist/web-components/{ListEnd-pq-BgaDI.mjs → ListEnd-CQ4vX-NW.mjs} +1 -1
- package/dist/web-components/{Loaded-CSO5NFhm.mjs → Loaded-DsNSPXWf.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-DK6xMmM1.mjs → LoadedCanvas-Cq7_O2bw.mjs} +1 -1
- package/dist/web-components/LoadedMap-0_prxuA4.mjs +1 -0
- package/dist/web-components/{Loading-CoJLSRkv.mjs → Loading-4PmhMeZ-.mjs} +1 -1
- package/dist/web-components/{Map-BEVtD52O.mjs → Map-B29Ba50b.mjs} +1 -1
- package/dist/web-components/MapView-nHeg39Kz.mjs +3 -0
- package/dist/web-components/Markup-BZ7l5GbG.mjs +2 -0
- package/dist/web-components/MediaBody-DH-rr_0N.mjs +1 -0
- package/dist/web-components/{MediaBody-Co23JjUJ.mjs → MediaBody-eSThjFzH.mjs} +1 -1
- package/dist/web-components/{NavDate-CYNK0Qmp.mjs → NavDate-0MsHRjBW.mjs} +1 -1
- package/dist/web-components/{Navigator-DrYPepzN.mjs → Navigator-qJ79A8Nk.mjs} +1 -1
- package/dist/web-components/{Pager-CN4lHURv.mjs → Pager-SPd_u0qz.mjs} +1 -1
- package/dist/web-components/{PagerLayout-DeqnSQcF.mjs → PagerLayout-CkSwDAnp.mjs} +1 -1
- package/dist/web-components/{Panel-CFYUlXup.mjs → Panel-C8r3EsWn.mjs} +1 -1
- package/dist/web-components/PanelPart-BA1NoeLA.mjs +1 -0
- package/dist/web-components/{PanelToggle-9ud55NNI.mjs → PanelToggle-CrKP8BqE.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-KUHUq-6q.mjs → PartOfManifest-BdDSxK4k.mjs} +1 -1
- package/dist/web-components/{Pending-mcmdyZPA.mjs → Pending-CmgVU1kF.mjs} +1 -1
- package/dist/web-components/{PlaceBox-DX4ZLDat.mjs → PlaceBox-D7HLNGxE.mjs} +1 -1
- package/dist/web-components/Placeholder-DVAlXejQ.mjs +1 -0
- package/dist/web-components/{Position-DO5qg5Sp.mjs → Position-C6KUAceQ.mjs} +1 -1
- package/dist/web-components/{Primitives-c9sIz0oQ.mjs → Primitives-ClQVjY6x.mjs} +1 -1
- package/dist/web-components/{Provider-a3xY016W.mjs → Provider-C0IUdU6v.mjs} +1 -1
- package/dist/web-components/{ReadMore-D_WmmKEP.mjs → ReadMore-BiEJA4yO.mjs} +1 -1
- package/dist/web-components/Root-Drt5N4_s.mjs +1 -0
- package/dist/web-components/Scene-C7t16NjC.mjs +1 -0
- package/dist/web-components/SceneView-BHg37-rs.mjs +1 -0
- package/dist/web-components/{Search-BgxEW1UT.mjs → Search-Bpd_lGzH.mjs} +1 -1
- package/dist/web-components/{Sections-DZVrhoAC.mjs → Sections-D_bS5IQH.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-6cSw7nbF.mjs → StandaloneItems-YV9O9M8F.mjs} +1 -1
- package/dist/web-components/{Status-DHTzuTkh.mjs → Status-BCG7AN9B.mjs} +1 -1
- package/dist/web-components/{Steps-Dkpy9KiJ.mjs → Steps-Dnn8Ajqf.mjs} +1 -1
- package/dist/web-components/TargetItems-xxbtePln.mjs +1 -0
- package/dist/web-components/Timeline-Danuk_Nn.mjs +1 -0
- package/dist/web-components/Tip-DPFWlNLu.mjs +1 -0
- package/dist/web-components/{Transcript-WvFFAJQM.mjs → Transcript-C-_DbUO5.mjs} +1 -1
- package/dist/web-components/{Transport-FxLp_bdW.mjs → Transport-BKona8RD.mjs} +1 -1
- package/dist/web-components/Transport-Bonmu77-.mjs +1 -0
- package/dist/web-components/{annotation-collection-BkC3nBPA.mjs → annotation-collection-nmxzo_hO.mjs} +1 -1
- package/dist/web-components/{annotation-name-Du2KAWoD.mjs → annotation-name-DoUUo-8D.mjs} +1 -1
- package/dist/web-components/{annotations-content-CEzAS-P2.mjs → annotations-content-Cl1upbdd.mjs} +1 -1
- package/dist/web-components/{body-DPlfbLt3.mjs → body-DC8Oq8rY.mjs} +1 -1
- package/dist/web-components/{canvas-BUwBftJW.mjs → canvas-gzoTnBxw.mjs} +1 -1
- package/dist/web-components/{cloverEngine-UNw5K4Xg.mjs → cloverEngine-CFL1Bd7n.mjs} +1 -1
- package/dist/web-components/{content-state-reader-GgQF2MvJ.mjs → content-state-reader-DYbmXxCp.mjs} +1 -1
- package/dist/web-components/controlGlyphs-d7KUIUwi.mjs +1 -0
- package/dist/web-components/{controls-CC9G5LxK.mjs → controls-VC9D1mwr.mjs} +1 -1
- package/dist/web-components/custom-elements.json +10 -2
- package/dist/web-components/{downloads-CmAYeEIz.mjs → downloads-D2cnWDbs.mjs} +1 -1
- package/dist/web-components/{dragToClose-DK-eM097.mjs → dragToClose-CzYeh_12.mjs} +1 -1
- package/dist/web-components/{engine-Dok0z8WP.mjs → engine-Dcfyp2DV.mjs} +1 -1
- package/dist/web-components/{engines-BD2IfwQF.mjs → engines-BMr7naGM.mjs} +1 -1
- package/dist/web-components/{fetchManifest-tQXcfFiz.mjs → fetchManifest-DxptUh4u.mjs} +1 -1
- package/dist/web-components/{fromManifest-BwQdeAuL.mjs → fromManifest-BpPFLVyZ.mjs} +1 -1
- package/dist/web-components/{glyphs-dp_HK3Ja.mjs → glyphs-BCnJl8py.mjs} +1 -1
- package/dist/web-components/hooks-Dz_5UXXp.mjs +1 -0
- package/dist/web-components/{image-layers-xcBsiad9.mjs → image-layers-BPnq7jk1.mjs} +1 -1
- package/dist/web-components/{imageService-4sFnmAFX.mjs → imageService-DFPkPNfe.mjs} +1 -1
- package/dist/web-components/index-ClM6Kq8w.mjs +1 -0
- package/dist/web-components/index.d.mts +4 -2
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BHporT5i.mjs +1 -0
- package/dist/web-components/{items-BUmOy2QY.mjs → items-D03KhDg6.mjs} +1 -1
- package/dist/web-components/label-r0ki6r1U.mjs +1 -0
- package/dist/web-components/{layout-B29v2RKK.mjs → layout-DVa_DnGH.mjs} +1 -1
- package/dist/web-components/{link-Ct5PpHEY.mjs → link-DxXxMXiw.mjs} +1 -1
- package/dist/web-components/logo-Br42Vlsk.mjs +1 -0
- package/dist/web-components/maplibre-sheet-CfiZ6JFk.mjs +1 -0
- package/dist/web-components/masonry-BZCdA3bV.mjs +1 -0
- package/dist/web-components/{models-BXcT4ijX.mjs → models-pO77sm3z.mjs} +1 -1
- package/dist/web-components/{nodes-BleXuYE6.mjs → nodes-CmL3eoRE.mjs} +1 -1
- package/dist/web-components/{overlayImage-BJtfot4Y.mjs → overlayImage-DFGetjMh.mjs} +1 -1
- package/dist/web-components/{panel-BxxV_JkD.mjs → panel-B1vzUm6_.mjs} +1 -1
- package/dist/web-components/part-DmRBh4pf.mjs +1 -0
- package/dist/web-components/{playerSurface-BXNLaFk0.mjs → playerSurface-CQ1wrIAQ.mjs} +1 -1
- package/dist/web-components/pointer-DWnCT3D3.mjs +1 -0
- package/dist/web-components/{provider-CPp0Sgr_.mjs → provider-U7xzX_0T.mjs} +1 -1
- package/dist/web-components/{range-regions-DAaOu0IS.mjs → range-regions-Di_lmVqZ.mjs} +1 -1
- package/dist/web-components/{read-more-lcqGslUd.mjs → read-more-BtA1sriO.mjs} +1 -1
- package/dist/web-components/{readingLanguages-FyVsSWJ8.mjs → readingLanguages-Ptho-Co9.mjs} +1 -1
- package/dist/web-components/rendererSurface-BgZPnAwj.mjs +22 -0
- package/dist/web-components/{renderers-BFS7hFVU.mjs → renderers-hoD3WKYA.mjs} +1 -1
- package/dist/web-components/{resource-Bufu7lAr.mjs → resource-DuTMsPEj.mjs} +1 -1
- package/dist/web-components/{sanitize-qIOeyIww.mjs → sanitize-BedC_UE5.mjs} +3 -3
- package/dist/web-components/{save-file-CoknKOPz.mjs → save-file-CLB5IM4a.mjs} +1 -1
- package/dist/web-components/{search-5ocrsYmT.mjs → search-Dd2Y1dsZ.mjs} +1 -1
- package/dist/web-components/shared-CCg1Iag8.mjs +1 -0
- package/dist/web-components/{show-link-DBaJj4s_.mjs → show-link-NjacLIdz.mjs} +1 -1
- package/dist/web-components/{sizedImage-jnOGcIIZ.mjs → sizedImage-CKOGmqhN.mjs} +1 -1
- package/dist/web-components/{split-P6J0qqf5.mjs → split-CcoXZcGX.mjs} +1 -1
- package/dist/web-components/{status-honoOMNx.mjs → status-B4a3Izph.mjs} +1 -1
- package/dist/web-components/styles-C7PVxtkQ.mjs +1 -0
- package/dist/web-components/svg-shape-D1K-WNrY.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-ez20ssEY.mjs +1 -0
- package/dist/web-components/{tip-BhNI83aT.mjs → tip-DeFPN33O.mjs} +1 -1
- package/dist/web-components/{toggle-CJKdi5KH.mjs → toggle-CGSnnjW-.mjs} +1 -1
- package/dist/web-components/trusted-Bvpx307M.mjs +1 -0
- package/dist/web-components/{useContainerName-_48Cdi0m.mjs → useContainerName-BfyeBf6_.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-CieBxGnK.mjs → useControlsVisibility-oRiMiQhD.mjs} +1 -1
- package/dist/web-components/useLazyPanelPane-CReKsr8z.mjs +1 -0
- package/dist/web-components/{useNearViewport-B34ebmIW.mjs → useNearViewport-BADiMpLi.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-DgRGFeP5.mjs → useScrollTrack-9QsMaHSx.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-BNA_92Dv.mjs → AnnotationItems-Cvh3jfmf.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-BIQYVR4N.mjs → AnnotationMenu-d5PT7q8D.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-BbwQqA1U.mjs → AnnotationState-DbtYTHMy.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-CZzOZAFP.mjs → Annotations-DKWYJOo2.mjs} +2 -2
- package/dist/web-components/viewer/{Annotations-P4XzAlNc.mjs → Annotations-D_wg4O99.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-DFfCzyjL.mjs → Canvas2DBackend-B4IXvdsN.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DPtE-RQQ.mjs → CaptionDetails-Bxh9VD7n.mjs} +1 -1
- package/dist/web-components/viewer/ChaptersMenu-CaAIaRZN.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-GkqyTQRQ.mjs → ChoiceMenu-Clp4Zeog.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-DjY_6qa6.mjs → Collection-C5BfoUOH.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DIOuI3Mv.mjs → Connected-9VGl2Xnx.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-D5T-mtiy.mjs → Connected-Cd2qwuuo.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DV-VxXuf.mjs → Contents-CsG9e7v2.mjs} +1 -1
- package/dist/web-components/viewer/ControlMenu-q_u_UC8q.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-Db3IWArv.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-Dn0-z5A9.mjs +1 -0
- package/dist/web-components/viewer/Cue-slOJQhPI.mjs +1 -0
- package/dist/web-components/viewer/Document-r3Sz3RfH.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-BCwCxPDU.mjs → DomLayers-CwHg1jZg.mjs} +1 -1
- package/dist/web-components/viewer/{Download-CL4IClAD.mjs → Download-Clx_e2ga.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-e40y47bl.mjs → EntryBodies-B4SnV6NJ.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-B_dP3w4o.mjs → EntryThumbnail-CsAqKh38.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-Hse1cDBE.mjs → FieldPill-NQfq8SXA.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-CE218DCr.mjs → FrameAnimation-wN2VNW7D.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-nX9kQlft.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-CYoqe_ez.mjs → HideToggle-B843JuKU.mjs} +1 -1
- package/dist/web-components/viewer/ImageControls--qeUY5kg.mjs +1 -0
- package/dist/web-components/viewer/{LanguageChoice-BmO-322r.mjs → LanguageChoice-CZ6K3Mhv.mjs} +1 -1
- package/dist/web-components/viewer/LightboxView-BcbP3cJD.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-DX1jsvJk.mjs → ListEnd-DbYDv46a.mjs} +1 -1
- package/dist/web-components/viewer/MapView-Dj7Iq7P2.mjs +3 -0
- package/dist/web-components/viewer/MediaBody-TN4XsCm7.mjs +1 -0
- package/dist/web-components/viewer/{MediaBody-SkIgrEMj.mjs → MediaBody-iAxGgXNy.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-BZgeaMG9.mjs → NavDate-Clj6OMa6.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-Co76p-1n.mjs → Navigator-DPdR3SYX.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-tUkN1-FV.mjs → PagerLayout-CtlmDRjI.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-DzZWRlK1.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-DXnbEPzS.mjs → PartOfManifest-NAXs2DYd.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-xrJ4CGdN.mjs → PlaceBox-C2k5Fsfo.mjs} +1 -1
- package/dist/web-components/viewer/Placeholder-DF6dRMjt.mjs +1 -0
- package/dist/web-components/viewer/{Search-DTg1cHZ3.mjs → Search-DoUc8tWu.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-BpBEQG8i.mjs → StandaloneItems-DuXasJO0.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-SpwMQdCL.mjs → Steps-B3MrG4Cv.mjs} +1 -1
- package/dist/web-components/viewer/TargetItems-DOFSQtYR.mjs +1 -0
- package/dist/web-components/viewer/{Transcript-rTAhuXCF.mjs → Transcript-Dy-FHWMo.mjs} +1 -1
- package/dist/web-components/viewer/Transport-C5wkxVOF.mjs +1 -0
- package/dist/web-components/viewer/{Transport-vKIDALE-.mjs → Transport-CUXmY_jW.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-B7pZiLVk.mjs → annotation-collection-A0PNdPhI.mjs} +1 -1
- package/dist/web-components/viewer/annotation-name-CfQs7Mb2.mjs +1 -0
- package/dist/web-components/viewer/{annotations-content-9AtLlPNn.mjs → annotations-content-B52-zM99.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-jRrYLrWa.mjs → cloverEngine-4sgpB7Rz.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-CPvkju6Q.mjs → content-state-reader-vtATl-W3.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-Co9kGk9q.mjs → dragToClose-B4rj1D3r.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-D7N9WhhF.mjs → fetchManifest-gAj8phm4.mjs} +1 -1
- package/dist/web-components/viewer/{host-DMD9LE4H.mjs → host-Hv8WXfiF.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-x_shzPvu.mjs → image-layers-gFEDKVkV.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DikPGzNO.mjs → link-DIh6ysyo.mjs} +1 -1
- package/dist/web-components/viewer/{overlayImage-33kKKB0T.mjs → overlayImage-BRjcH40Q.mjs} +1 -1
- package/dist/web-components/viewer/{range-regions-TH6WWGTT.mjs → range-regions-uPqjKIER.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-BxePmixF.mjs → renderers-C5EfPrd7.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-QXKiPlST.mjs → save-file-dIa0LCAn.mjs} +1 -1
- package/dist/web-components/viewer/{search-B_NePyas.mjs → search-Bbv9dCNq.mjs} +1 -1
- package/dist/web-components/viewer/styles-L1HpSoL2.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-Cu-jTDzs.mjs → useControlsVisibility-jopIdHZi.mjs} +1 -1
- package/dist/web-components/viewer/useLazyPanelPane-CoPgtYkx.mjs +1 -0
- package/dist/web-components/viewer/viewer-DqpSyvH-.mjs +29 -0
- package/dist/web-components/viewer/vtt-DpgB_K8v.mjs +5 -0
- package/dist/web-components/viewer-D2lGdifc.mjs +1 -0
- package/dist/web-components/vtt-KUQbi4PK.mjs +5 -0
- package/dist/web-components/worker-C9aVbya_.mjs +1 -0
- package/package.json +2 -1
- package/dist/web-components/Button-Cx6VE_UW.mjs +0 -1
- package/dist/web-components/CanvasView-DxZASM9E.mjs +0 -2
- package/dist/web-components/ChaptersMenu-BAZVVDrK.mjs +0 -1
- package/dist/web-components/ControlMenu-BjJsWnuZ.mjs +0 -1
- package/dist/web-components/ControlsFade-C-6WhSxB.mjs +0 -1
- package/dist/web-components/CountMenu-Dx8D_RJZ.mjs +0 -1
- package/dist/web-components/Cue-xuo5dgKE.mjs +0 -1
- package/dist/web-components/Document-BWdafeEi.mjs +0 -1
- package/dist/web-components/Gallery-C2PTJmvN.mjs +0 -1
- package/dist/web-components/ImageControls-tKVAMpaj.mjs +0 -1
- package/dist/web-components/LightboxView-Cuqx2H1m.mjs +0 -1
- package/dist/web-components/LoadedMap-DmPH-LKY.mjs +0 -1
- package/dist/web-components/MapView-DHJcn9gW.mjs +0 -3
- package/dist/web-components/Markup-Hm6bWOjm.mjs +0 -2
- package/dist/web-components/MediaBody-BpgNtpKZ.mjs +0 -1
- package/dist/web-components/PanelPart-CpUIRbxr.mjs +0 -1
- package/dist/web-components/Placeholder-0hE8q-SY.mjs +0 -1
- package/dist/web-components/Root-CU1o0wje.mjs +0 -1
- package/dist/web-components/Scene-CboEeptc.mjs +0 -1
- package/dist/web-components/SceneView-hcc78jQT.mjs +0 -1
- package/dist/web-components/TargetItems-CyOI9_Z4.mjs +0 -1
- package/dist/web-components/Timeline-B9tD3Rar.mjs +0 -1
- package/dist/web-components/Tip-nJSTYquc.mjs +0 -1
- package/dist/web-components/hooks-C4dJ5K_D.mjs +0 -1
- package/dist/web-components/index-DspT4wUm.mjs +0 -1
- package/dist/web-components/items-CWMI53aN.mjs +0 -1
- package/dist/web-components/label-BGjL7I4b.mjs +0 -1
- package/dist/web-components/logo-BFstM-0a.mjs +0 -1
- package/dist/web-components/masonry-0QfzOgbB.mjs +0 -1
- package/dist/web-components/part-D4gjnYmT.mjs +0 -1
- package/dist/web-components/pointer-CJELU3gI.mjs +0 -1
- package/dist/web-components/rendererSurface-nh6-EfuZ.mjs +0 -22
- package/dist/web-components/shared-DFAX0n3B.mjs +0 -1
- package/dist/web-components/styles-BwkYiCLC.mjs +0 -1
- package/dist/web-components/svg-shape-DLY3g7oq.mjs +0 -1
- package/dist/web-components/thumbnail-EbURh-UM.mjs +0 -1
- package/dist/web-components/useLazyPanelPane-Da3kJiOt.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-D6Jmujag.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-BsEpff6N.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-BowtN96W.mjs +0 -1
- package/dist/web-components/viewer/CountMenu-DCmA6HdK.mjs +0 -1
- package/dist/web-components/viewer/Cue-BjbVzrpl.mjs +0 -1
- package/dist/web-components/viewer/Document-4ZQd3W3o.mjs +0 -1
- package/dist/web-components/viewer/Gallery-F2sVj4ph.mjs +0 -1
- package/dist/web-components/viewer/ImageControls-C2G4x2Es.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-DKR8dXcg.mjs +0 -1
- package/dist/web-components/viewer/MapView-Df0wZjCh.mjs +0 -3
- package/dist/web-components/viewer/MediaBody-CataNonO.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Cl4Sst60.mjs +0 -1
- package/dist/web-components/viewer/Placeholder-B1AcizHL.mjs +0 -1
- package/dist/web-components/viewer/TargetItems-B6Icep5k.mjs +0 -1
- package/dist/web-components/viewer/Transport-z_kdVisw.mjs +0 -1
- package/dist/web-components/viewer/annotation-name-BKj1O9lA.mjs +0 -1
- package/dist/web-components/viewer/styles-Bedyz7_l.mjs +0 -1
- package/dist/web-components/viewer/useLazyPanelPane-BhLtRixT.mjs +0 -1
- package/dist/web-components/viewer/viewer-nfPJPwwt.mjs +0 -29
- package/dist/web-components/viewer/vtt-CUn4h5JB.mjs +0 -5
- package/dist/web-components/viewer-DN2Mo3vc.mjs +0 -1
- package/dist/web-components/vtt-C5M5WPSG.mjs +0 -5
- package/dist/web-components/worker-CjXN0dku.mjs +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var El=Object.defineProperty;var Ml=(t,e,n)=>e in t?El(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var P=(t,e,n)=>Ml(t,typeof e!="symbol"?e+"":e,n);import{s as sa}from"./styles-Bedyz7_l.mjs";function Tl(t={}){return Promise.resolve().then(()=>Lu).then(e=>e.initCloverI18n(t))}const ia="@layer clover{:is(clover-root,clover-items,clover-viewer,clover-panel,clover-read-more):not([hidden]){display:block}:is(clover-body,clover-canvas,clover-timeline,clover-scene):not([hidden]){display:block;height:var(--clover-body-height,60vh)}clover-split:not([hidden]){display:flex}:is(clover-label,clover-panel-toggle):not([hidden]){display:contents}clover-tab,clover-tip,clover-status>[slot]{display:none}}";let Il=null,vn=null;const Pl=()=>Il??(Il=import("./host-DMD9LE4H.mjs").then(t=>vn=t)),Ll=t=>t.trim().toLowerCase()==="false";function Al(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Ll(t);if(e==="number"){const s=Number(t);if(t.trim()===""||!Number.isFinite(s)){o("is not a number");return}if(n!==void 0&&s<n){o(`is less than ${n}`);return}return s}if(e==="data"){const s=t.trim();if(!/^[[{"]/.test(s))return t;try{return JSON.parse(s)}catch{o("is not JSON");return}}const r=t.trim().toLowerCase();if(e.includes(r))return r==="false"?false:r;o(`is not ${e.join(", ")}`)}const Ol=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function Nl(t){class e extends HTMLElement{constructor(){super(...arguments);P(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){sa(this.ownerDocument).inject("elements",ia)}}customElements.define(t.tag,e)}function Rl(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return Nl(t);const n=t.kind,o=t.properties??[],r=Object.entries(t.events??{});let s=null,i=null;const a=()=>i??(i=Promise.all([e().then(l=>s=l),Pl()]));class c extends HTMLElement{constructor(){super(...arguments);P(this,"kind",n);P(this,"needsRoot",!!t.needsRoot);P(this,"values",{});P(this,"kept",{});P(this,"props",{});P(this,"listeners",new Set);P(this,"warned",new Set);P(this,"handlers",Object.fromEntries(r.map(([d,h])=>[h.prop,(...p)=>{var v;if(h.keeps&&(this.kept[h.keeps]=p[0]??null,p[0]==null))return true;const m=h.detail==="first"?p[0]:Object.fromEntries(h.detail.map((w,_)=>[w,p[_]])),g=new CustomEvent(d,{detail:m,bubbles:!h.keeps,composed:!h.keeps,cancelable:!!h.cancelable}),b=this.dispatchEvent(g);if(!b&&h.cancelable){const w=p[p.length-1];(v=w==null?void 0:w.preventDefault)==null||v.call(w)}return b}])));P(this,"getProps",()=>this.props);P(this,"subscribe",d=>(this.listeners.add(d),()=>{this.listeners.delete(d)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const d of o){if(!Object.prototype.hasOwnProperty.call(this,d))continue;const h=this[d];delete this[d],h!=null&&(this.values[d]=h)}this.update(),this.warnOfAria(),sa(this.ownerDocument).inject("elements",ia),a().then(()=>{this.isConnected&&vn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||vn==null||vn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const d of["aria-label","aria-labelledby","role"])!this.hasAttribute(d)||this.warned.has(d)||(this.warned.add(d),console.warn(`<${t.tag}>: ${d} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const d={...this.handlers,...this.values};for(const[h,p]of Object.entries(t.attributes)){if(p.prop in this.values)continue;const m=this.getAttribute(h),g=Al(m,p,b=>{const v=`${h}=${m}`;this.warned.has(v)||(this.warned.add(v),console.warn(`<${t.tag}>: ${h}="${m}" ${b}; ignored.`))});g!==void 0&&(d[p.prop]=g)}Ol(d,this.props)||(this.props=d,this.listeners.forEach(h=>h()))}}P(c,"initCloverI18n",Tl);for(const l of o)Object.defineProperty(c.prototype,l,{configurable:true,enumerable:true,get(){return l in this.values?this.values[l]:this.getProps()[l]},set(u){u==null?delete this.values[l]:this.values[l]=u,this.update()}});for(const[,l]of r){if(!l.keeps)continue;const u=l.keeps;Object.defineProperty(c.prototype,u,{configurable:true,enumerable:true,get(){return this.kept[u]??null}})}customElements.define(t.tag,c)}var En,it,aa,Oe,$s,ca,la,ua,Ar,lr,ur,da,xn={},fa=[],Bl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mn=Array.isArray;function ne(t,e){for(var n in e)t[n]=e[n];return t}function Or(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ye(t,e,n){var o,r,s,i={};for(s in e)s=="key"?o=e[s]:s=="ref"?r=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?En.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)i[s]===void 0&&(i[s]=t.defaultProps[s]);return _n(t,i,o,r,null)}function _n(t,e,n,o,r){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++aa,__i:-1,__u:0};return r==null&&it.vnode!=null&&it.vnode(s),s}function $l(){return{current:null}}function Ct(t){return t.children}function oe(t,e){this.props=t,this.context=e}function tn(t,e){if(e==null)return t.__?tn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?tn(t):null}function ha(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return ha(t)}}function dr(t){(!t.__d&&(t.__d=true)&&Oe.push(t)&&!so.__r++||$s!=it.debounceRendering)&&(($s=it.debounceRendering)||ca)(so)}function so(){for(var t,e,n,o,r,s,i,a=1;Oe.length;)Oe.length>a&&Oe.sort(la),t=Oe.shift(),a=Oe.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=ne({},o)).__v=o.__v+1,it.vnode&&it.vnode(n),Nr(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??tn(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,ga(s,n,i),o.__e=o.__=null,n.__e!=r&&ha(n)));so.__r=0}function pa(t,e,n,o,r,s,i,a,c,l,u){var d,h,p,m,g,b,v,w=o&&o.__k||fa,_=e.length;for(c=Fl(n,e,w,c,_),d=0;d<_;d++)(p=n.__k[d])!=null&&(h=p.__i==-1?xn:w[p.__i]||xn,p.__i=d,b=Nr(t,p,h,r,s,i,a,c,l,u),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Rr(h.ref,null,p),u.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),(v=!!(4&p.__u))||h.__k===p.__k?c=ma(p,c,t,v):typeof p.type=="function"&&b!==void 0?c=b:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=g,c}function Fl(t,e,n,o,r){var s,i,a,c,l,u=n.length,d=u,h=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+h,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?_n(null,i,null,null,null):Mn(i)?_n(Ct,{children:i},null,null,null):i.constructor==null&&i.__b>0?_n(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,a=null,(l=i.__i=Dl(i,n,c,d))!=-1&&(d--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>u?h--:r<u&&h++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,i.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<u;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=tn(a)),ya(a,a));return o}function ma(t,e,n,o){var r,s;if(typeof t.type=="function"){for(r=t.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=t,e=ma(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=tn(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ve(t,e){return e=e||[],t==null||typeof t=="boolean"||(Mn(t)?t.some(function(n){ve(n,e)}):e.push(t)),e}function Dl(t,e,n,o){var r,s,i,a=t.key,c=t.type,l=e[n],u=l!=null&&(2&l.__u)==0;if(l===null&&t.key==null||u&&a==l.key&&c==l.type)return n;if(o>(u?1:0)){for(r=n-1,s=n+1;r>=0||s<e.length;)if((l=e[i=r>=0?r--:s++])!=null&&!(2&l.__u)&&a==l.key&&c==l.type)return i}return-1}function Fs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Bl.test(e)?n:n+"px"}function Yn(t,e,n,o,r){var s,i;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||Fs(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||Fs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(ua,"$1")),i=e.toLowerCase(),e=i in t||e=="onFocusOut"||e=="onFocusIn"?i.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?o?n.u=o.u:(n.u=Ar,t.addEventListener(e,s?ur:lr,s)):t.removeEventListener(e,s?ur:lr,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===false&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ds(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Ar++;else if(e.t<n.u)return;return n(it.event?it.event(e):e)}}}function Nr(t,e,n,o,r,s,i,a,c,l){var u,d,h,p,m,g,b,v,w,_,x,k,T,O,z,J,tt,Y=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(u=it.__b)&&u(e);t:if(typeof Y=="function")try{if(v=e.props,w="prototype"in Y&&Y.prototype.render,_=(u=Y.contextType)&&o[u.__c],x=u?_?_.props.value:u.__:o,n.__c?b=(d=e.__c=n.__c).__=d.__E:(w?e.__c=d=new Y(v,x):(e.__c=d=new oe(v,x),d.constructor=Y,d.render=Hl),_&&_.sub(d),d.props=v,d.state||(d.state={}),d.context=x,d.__n=o,h=d.__d=true,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&Y.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ne({},d.__s)),ne(d.__s,Y.getDerivedStateFromProps(v,d.__s))),p=d.props,m=d.state,d.__v=e,h)w&&Y.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&Y.getDerivedStateFromProps==null&&v!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,x),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,x)===false||e.__v==n.__v){for(e.__v!=n.__v&&(d.props=v,d.state=d.__s,d.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Z){Z&&(Z.__=e)}),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[],d.__h.length&&i.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,x),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,g)})}if(d.context=x,d.props=v,d.__P=t,d.__e=false,T=it.__r,O=0,w){for(d.state=d.__s,d.__d=false,T&&T(e),u=d.render(d.props,d.state,d.context),z=0;z<d._sb.length;z++)d.__h.push(d._sb[z]);d._sb=[]}else do d.__d=false,T&&T(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++O<25);d.state=d.__s,d.getChildContext!=null&&(o=ne(ne({},o),d.getChildContext())),w&&!h&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(p,m)),J=u,u!=null&&u.type===Ct&&u.key==null&&(J=va(u.props.children)),a=pa(t,Mn(J)?J:[J],e,n,o,r,s,i,a,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&i.push(d),b&&(d.__E=d.__=null)}catch(Z){if(e.__v=null,c||s!=null)if(Z.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(tt=s.length;tt--;)Or(s[tt]);fr(e)}else e.__e=n.__e,e.__k=n.__k,Z.then||fr(e);it.__e(Z,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=zl(n.__e,e,n,o,r,s,i,c,l);return(u=it.diffed)&&u(e),128&e.__u?void 0:a}function fr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(fr)}function ga(t,e,n){for(var o=0;o<n.length;o++)Rr(n[o],n[++o],n[++o]);it.__c&&it.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){it.__e(s,r.__v)}})}function va(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Mn(t)?t.map(va):ne({},t)}function zl(t,e,n,o,r,s,i,a,c){var l,u,d,h,p,m,g,b=n.props,v=e.props,w=e.type;if(w=="svg"?r="http://www.w3.org/2000/svg":w=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((p=s[l])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){t=p,s[l]=null;break}}if(t==null){if(w==null)return document.createTextNode(v);t=document.createElementNS(r,w,v.is&&v),a&&(it.__m&&it.__m(e,s),a=false),s=null}if(w==null)b===v||a&&t.data==v||(t.data=v);else{if(s=s&&En.call(t.childNodes),b=n.props||xn,!a&&s!=null)for(b={},l=0;l<t.attributes.length;l++)b[(p=t.attributes[l]).name]=p.value;for(l in b)if(p=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=p;else if(!(l in v)){if(l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v)continue;Yn(t,l,null,p,r)}}for(l in v)p=v[l],l=="children"?h=p:l=="dangerouslySetInnerHTML"?u=p:l=="value"?m=p:l=="checked"?g=p:a&&typeof p!="function"||b[l]===p||Yn(t,l,p,b[l],r);if(u)a||d&&(u.__html==d.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(d&&(t.innerHTML=""),pa(e.type=="template"?t.content:t,Mn(h)?h:[h],e,n,o,w=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&tn(n,0),a,c),s!=null)for(l=s.length;l--;)Or(s[l]);a||(l="value",w=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||w=="progress"&&!m||w=="option"&&m!=b[l])&&Yn(t,l,m,b[l],r),l="checked",g!=null&&g!=t[l]&&Yn(t,l,g,b[l],r))}return t}function Rr(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){it.__e(r,n)}}function ya(t,e,n){var o,r;if(it.unmount&&it.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Rr(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){it.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&ya(o[r],e,n||typeof t.type!="function");n||Or(t.__e),t.__c=t.__=t.__e=void 0}function Hl(t,e,n){return this.constructor(t,n)}function Sn(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),it.__&&it.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],Nr(e,t=(!o&&n||e).__k=ye(Ct,null,[t]),r||xn,xn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?En.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),ga(s,t,i)}function ba(t,e){Sn(t,e,ba)}function Wl(t,e,n){var o,r,s,i,a=ne({},t.props);for(s in t.type&&t.type.defaultProps&&(i=t.type.defaultProps),e)s=="key"?o=e[s]:s=="ref"?r=e[s]:a[s]=e[s]===void 0&&i!=null?i[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?En.call(arguments,2):n),_n(t.type,a,o||t.key,r||t.ref,null)}function ae(t){function e(n){var o,r;return this.getChildContext||(o=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&o.forEach(function(i){i.__e=true,dr(i)})},this.sub=function(s){o.add(s);var i=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.delete(s),i&&i.call(s)}}),n.children}return e.__c="__cC"+da++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}En=fa.slice,it={__e:function(t,e,n,o){for(var r,s,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),i=r.__d),i)return r.__E=r}catch(a){t=a}throw t}},aa=0,oe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},n),this.props)),t&&ne(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),dr(this))},oe.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),dr(this))},oe.prototype.render=Ct,Oe=[],ca=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,la=function(t,e){return t.__v.__b-e.__v.__b},so.__r=0,ua=/(PointerCapture)$|Capture$/i,Ar=0,lr=Ds(false),ur=Ds(true),da=0;var Ul=0;function f(t,e,n,o,r,s){e||(e={});var i,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?i=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ul,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return it.vnode&&it.vnode(l),l}var Ce,kt,jo,zs,en=0,_a=[],Mt=it,Hs=Mt.__b,Ws=Mt.__r,Us=Mt.diffed,js=Mt.__c,Vs=Mt.unmount,qs=Mt.__;function sn(t,e){Mt.__h&&Mt.__h(kt,t,en||e),en=0;var n=kt.__H||(kt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function H(t){return en=1,Br(Sa,t)}function Br(t,e,n){var o=sn(Ce++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Sa(void 0,e),function(a){var c=o.__N?o.__N[0]:o.__[0],l=o.t(c,a);c!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=kt,!kt.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!s||s.call(this,a,c,l);var d=o.__c.props!==a;return u.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=true)}}),s&&s.call(this,a,c,l)||d};kt.__f=true;var s=kt.shouldComponentUpdate,i=kt.componentWillUpdate;kt.componentWillUpdate=function(a,c,l){if(this.__e){var u=s;s=void 0,r(a,c,l),s=u}i&&i.call(this,a,c,l)},kt.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=sn(Ce++,3);!Mt.__s&&Fr(n.__H,e)&&(n.__=t,n.u=e,kt.__H.__h.push(n))}function Dt(t,e){var n=sn(Ce++,4);!Mt.__s&&Fr(n.__H,e)&&(n.__=t,n.u=e,kt.__h.push(n))}function R(t){return en=5,gt(function(){return{current:t}},[])}function wa(t,e,n){en=6,Dt(function(){if(typeof t=="function"){var o=t(e());return function(){t(null),o&&typeof o=="function"&&o()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function gt(t,e){var n=sn(Ce++,7);return Fr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function dt(t,e){return en=8,gt(function(){return t},e)}function zt(t){var e=kt.context[t.__c],n=sn(Ce++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(kt)),e.props.value):t.__}function xa(t,e){Mt.useDebugValue&&Mt.useDebugValue(e?e(t):t)}function $r(){var t=sn(Ce++,11);if(!t.__){for(var e=kt.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function jl(){for(var t;t=_a.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(no),t.__H.__h.forEach(hr),t.__H.__h=[]}catch(e){t.__H.__h=[],Mt.__e(e,t.__v)}}Mt.__b=function(t){kt=null,Hs&&Hs(t)},Mt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),qs&&qs(t,e)},Mt.__r=function(t){Ws&&Ws(t),Ce=0;var e=(kt=t.__c).__H;e&&(jo===kt?(e.__h=[],kt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(no),e.__h.forEach(hr),e.__h=[],Ce=0)),jo=kt},Mt.diffed=function(t){Us&&Us(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(_a.push(e)!==1&&zs===Mt.requestAnimationFrame||((zs=Mt.requestAnimationFrame)||Vl)(jl)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),jo=kt=null},Mt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(no),n.__h=n.__h.filter(function(o){return!o.__||hr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],Mt.__e(o,n.__v)}}),js&&js(t,e)},Mt.unmount=function(t){Vs&&Vs(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{no(o)}catch(r){e=r}}),n.__H=void 0,e&&Mt.__e(e,n.__v))};var Ks=typeof requestAnimationFrame=="function";function Vl(t){var e,n=function(){clearTimeout(o),Ks&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);Ks&&(e=requestAnimationFrame(n))}function no(t){var e=kt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),kt=e}function hr(t){var e=kt;t.__c=t.__(),kt=e}function Fr(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Sa(t,e){return typeof e=="function"?e(t):e}function ka(t,e){for(var n in e)t[n]=e[n];return t}function pr(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return true;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return true;return false}function Jt(t,e){var n=e(),o=H({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Dt(function(){r.__=n,r.u=e,Vo(r)&&s({t:r})},[t,n,e]),F(function(){return Vo(r)&&s({t:r}),t(function(){Vo(r)&&s({t:r})})},[t]),n}function Vo(t){var e,n,o=t.u,r=t.__;try{var s=o();return!((e=r)===(n=s)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return true}}function Ca(t){t()}function Ea(t){return t}function Ma(){return[false,Ca]}var Ta=Dt;function mr(t,e){this.props=t,this.context=e}function ql(t,e){function n(r){var s=this.props.ref,i=s==r.ref;return!i&&s&&(s.call?s(null):s.current=null),e?!e(this.props,r)||!i:pr(this.props,r)}function o(r){return this.shouldComponentUpdate=n,ye(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(mr.prototype=new oe).isPureReactComponent=true,mr.prototype.shouldComponentUpdate=function(t,e){return pr(this.props,t)||pr(this.state,e)};var Zs=it.__b;it.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Zs&&Zs(t)};var Kl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function te(t){function e(n){var o=ka({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=Kl,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Gs=function(t,e){return t==null?null:ve(ve(t).map(e))},Zl={map:Gs,forEach:Gs,count:function(t){return t?ve(t).length:0},only:function(t){var e=ve(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ve},Gl=it.__e;it.__e=function(t,e,n,o){if(t.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}Gl(t,e,n,o)};var Xs=it.unmount;function Ia(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),t.__c.__H=null),(t=ka({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=true,t.__c=null),t.__k=t.__k&&t.__k.map(function(o){return Ia(o,e,n)})),t}function Pa(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return Pa(o,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=true,t.__c.__P=n)),t}function _t(){this.__u=0,this.o=null,this.__b=null}function La(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function pt(t){var e,n,o;function r(s){if(e||(e=t()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw e;return ye(n,s)}return r.displayName="Lazy",r.__f=true,r}function yn(){this.i=null,this.l=null}it.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Xs&&Xs(t)},(_t.prototype=new oe).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=La(o.__v),s=false,i=function(){s||(s=true,n.__R=null,r?r(a):a())};n.__R=i;var a=function(){if(!--o.__u){if(o.state.__a){var c=o.state.__a;o.__v.__k[0]=Pa(c,c.__c.__P,c.__c.__O)}var l;for(o.setState({__a:o.__b=null});l=o.o.pop();)l.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(i,i)},_t.prototype.componentWillUnmount=function(){this.o=[]},_t.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ia(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&ye(Ct,null,t.fallback);return r&&(r.__u&=-33),[ye(Ct,null,e.__a?null:t.children),r]};var Ys=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Xl(t){return this.getChildContext=function(){return t.context},t.children}function Yl(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Sn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var o=e.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return true},insertBefore:function(r,s){this.childNodes.push(r),e.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}}Sn(ye(Xl,{context:e.context},t.__v),e.v)}function Jl(t,e){var n=ye(Yl,{__v:t,h:e});return n.containerInfo=e,n}(yn.prototype=new oe).__a=function(t){var e=this,n=La(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),Ys(e,t,o)):r()};n?n(s):s()}},yn.prototype.render=function(t){this.i=null,this.l=new Map;var e=ve(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},yn.prototype.componentDidUpdate=yn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ys(t,n,e)})};var Aa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ql=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,eu=/[A-Z0-9]/g,nu=typeof document<"u",ou=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function ru(t,e,n){return e.__k==null&&(e.textContent=""),Sn(t,e),typeof n=="function"&&n(),t?t.__c:null}function su(t,e,n){return ba(t,e),typeof n=="function"&&n(),t?t.__c:null}oe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(oe.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var Js=it.event;function iu(){}function au(){return this.cancelBubble}function cu(){return this.defaultPrevented}it.event=function(t){return Js&&(t=Js(t)),t.persist=iu,t.isPropagationStopped=au,t.isDefaultPrevented=cu,t.nativeEvent=t};var Dr,lu={enumerable:false,configurable:true,get:function(){return this.class}},Qs=it.vnode;it.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,o=e.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||nu&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===true?a="":c==="translate"&&a==="no"?a=false:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?i="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||ou(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":tu.test(i)&&(i=c):c=i="oninput":s&&Ql.test(i)?i=i.replace(eu,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ve(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=ve(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",lu)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=Aa,Qs&&Qs(t)};var ti=it.__r;it.__r=function(t){ti&&ti(t),Dr=t.__c};var ei=it.diffed;it.diffed=function(t){ei&&ei(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Dr=null};var uu={ReactCurrentDispatcher:{current:{readContext:function(t){return Dr.__n[t.__c].props.value},useCallback:dt,useContext:zt,useDebugValue:xa,useDeferredValue:Ea,useEffect:F,useId:$r,useImperativeHandle:wa,useInsertionEffect:Ta,useLayoutEffect:Dt,useMemo:gt,useReducer:Br,useRef:R,useState:H,useSyncExternalStore:Jt,useTransition:Ma}}};function du(t){return ye.bind(null,t)}function go(t){return!!t&&t.$$typeof===Aa}function fu(t){return go(t)&&t.type===Ct}function hu(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function pu(t){return go(t)?Wl.apply(null,arguments):t}function mu(t){return!!t.__k&&(Sn(null,t),true)}function gu(t){return t&&(t.base||t.nodeType===1&&t)||null}var vu=function(t,e){return t(e)},yu=function(t,e){return t(e)},bu=Ct,_u=go,re={useState:H,useId:$r,useReducer:Br,useEffect:F,useLayoutEffect:Dt,useInsertionEffect:Ta,useTransition:Ma,useDeferredValue:Ea,useSyncExternalStore:Jt,startTransition:Ca,useRef:R,useImperativeHandle:wa,useMemo:gt,useCallback:dt,useContext:zt,useDebugValue:xa,version:"18.3.1",Children:Zl,render:ru,hydrate:su,unmountComponentAtNode:mu,createPortal:Jl,createElement:ye,createContext:ae,createFactory:du,cloneElement:pu,createRef:$l,Fragment:Ct,isValidElement:go,isElement:_u,isFragment:fu,isMemo:hu,findDOMNode:gu,Component:oe,PureComponent:mr,memo:ql,forwardRef:te,flushSync:yu,unstable_batchedUpdates:vu,StrictMode:bu,Suspense:_t,SuspenseList:yn,lazy:pt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:uu};function zr(t){const e=Jt(xu,Su);return!!t||e}const Hr=t=>t?{"data-high-contrast":""}:{},wu="(prefers-contrast: more)",Oa=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(wu):null;function xu(t){var n;const e=Oa();return(n=e==null?void 0:e.addEventListener)==null||n.call(e,"change",t),()=>{var o;return(o=e==null?void 0:e.removeEventListener)==null?void 0:o.call(e,"change",t)}}const Su=()=>{var t;return!!((t=Oa())!=null&&t.matches)},Tn=ae(void 0),Tt=(...t)=>t.filter(Boolean).join(" "),vo=ae(null);function Ee(){return zt(vo)}function ce(t="This part"){const e=zt(vo);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function rt(t,e=Object.is,n){const{clover:o}=ce(n),r=R(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return Jt(o.store.subscribe,s)}const ku={subscribe:()=>()=>{}};function In(t,e){const n=zt(vo),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return Jt(o?o.subscribe:ku.subscribe,r)}const Cu=JSON.parse('{"commonClose":"Close","commonNext":"Next","commonPrevious":"Previous","commonSearch":"Search","commonViewAll":"View all","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Loading...","contentSearchPlaceholder":"Search","contentSearchResultsNone":"No results","contentSearchResult":"1 result","contentSearchResults":"{{count}} results","contentSearchError":"The search could not be completed.","contentSearchPosition":"Result {{index}} of {{total}}","contentSearchClear":"Clear search","canvasPosition":"Item {{index}} of {{total}}","canvasImage":"Image","bodyUnloadableImage":"This image could not be loaded.","bodyUnloadableVideo":"This video could not be loaded.","bodyUnloadableAudio":"This audio could not be loaded.","bodyUnloadableModel":"This model could not be loaded.","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","templateBack":"Back","templateBackTo":"Back to {{label}}","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","aboutDate":"Date","aboutHomepage":"Homepage","aboutSeeAlso":"See also","aboutProvider":"Provider","logo":"Logo","aboutManifest":"IIIF Manifest","aboutCanvas":"IIIF Canvas","aboutPartOf":"Part of","aboutOpenManifest":"Open the full Manifest","aboutCollection":"IIIF Collection","readingLanguage":"Language","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open the link","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","canvasViewerControls":"Viewer controls","canvasExpandControls":"Expand viewer controls","canvasCollapseControls":"Collapse viewer controls","canvasScrollBack":"Show previous controls","canvasScrollForward":"Show more controls","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","contentsSectionsIn":"Sections in","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","playerFill":"Fill frame","playerFit":"Fit to frame","frameRepeat":"Repeat","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),Na={es:()=>import("../es-B1NvdYp-.mjs"),fi:()=>import("../fi-BjtYZNLo.mjs"),fr:()=>import("../fr-Cd22Lziw.mjs"),nb:()=>import("../nb-CEwZDBiR.mjs"),nn:()=>import("../nn-jYQhr9RI.mjs"),no:()=>import("../no-CEwZDBiR.mjs"),pt:()=>import("../pt-CWR30SzS.mjs")};function Ra(){const t=[];return typeof document<"u"&&t.push(document.documentElement.lang),typeof navigator<"u"&&t.push(...navigator.languages??[],navigator.language),t.filter(Boolean)}const io=t=>t.split("-")[0];function Ba(t,e){return io(t).toLowerCase()===io(e).toLowerCase()}const qo=t=>t.includes("-")?io(t):null;function Eu(t,e,n=[]){if(!e.length)return;if(e.length===1)return e[0];const o=()=>e.includes("none")?"none":e.includes("@none")?"@none":e[0];if(!t)return e.includes("none")?"none":e[0];if(e.includes(t))return t;const r=qo(t);if(r&&e.includes(r))return r;const s=n.find(a=>e.includes(a));if(s)return s;const i=e.findIndex(a=>qo(a)===t);if(i!==-1)return e[i];for(const a of n){const c=qo(a);if(c&&e.includes(c))return c}return o()}function Wr(t,e){const[n,...o]=e?[e]:Ra();return Eu(n,t,o)??t[0]}const pe="clover",Yt={en:{[pe]:{...Cu}}};let Ye,$a=[],ao=0;const gr=new Set;function Ur(){ao++,gr.forEach(t=>t())}function Mu(t){const e=io(t);return e&&e!==t?[t,e]:[t]}const ni=new Map,Tu=t=>Object.prototype.hasOwnProperty.call(Na,t);function Iu(t){let e=ni.get(t);return e||(e=Na[t]().then(({default:n})=>{var o;Yt[t]={...Yt[t],[pe]:{...n,...(o=Yt[t])==null?void 0:o[pe]}},Ur()},()=>{}),ni.set(t,e)),e}function Fa(t){const e=t.find(n=>n==="en"||Tu(n));return e&&e!=="en"?Iu(e):Promise.resolve()}let Jn=[],oi="";function bn(){const t=Ye?`${ao}`:`${ao} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===oi)return Jn;oi=t;const e=Ye?[Ye]:Ra();return Jn=[...new Set([...e,...$a].flatMap(Mu).concat("en"))],Fa(Jn),Jn}function yo(t,e){if(t)return Ba(t,e||Xt.resolvedLanguage)?void 0:t}const Xt={get language(){return Ye??bn().find(t=>Yt[t])??"en"},get resolvedLanguage(){return bn().find(t=>{var e;return Object.keys(((e=Yt[t])==null?void 0:e[pe])??{}).length>0})??"en"},changeLanguage(t){Ye=t,Ur()},resolve(t,e,n=pe){var r,s;let o={text:t};for(const i of bn()){const a=(s=(r=Yt[i])==null?void 0:r[n])==null?void 0:s[t];if(a!==void 0){o={text:a,lang:i};break}}return e?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in e?String(e[a]):i)}:o},t(t,e,n=pe){return Xt.resolve(t,e,n).text},langOf(t,e,n=pe){return yo(Xt.resolve(t,void 0,n).lang,e)},ready(){return Fa(bn())},subscribe(t){return gr.add(t),()=>{gr.delete(t)}},getSnapshot(){return ao}};typeof document<"u"&&bn();function Pu(t={}){for(const[e,n]of Object.entries(t.resources??{}))for(const[o,r]of Object.entries(n??{}))Yt[e]??(Yt[e]={}),Yt[e][o]={...Yt[e][o],...r};return t.fallbackLng!==void 0&&($a=t.fallbackLng===false?[]:[t.fallbackLng].flat()),t.lng&&(Ye=t.lng),Ur(),Xt}const Lu=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:pe,cloverI18n:Xt,initCloverI18n:Pu,langWithin:yo},Symbol.toStringTag,{value:"Module"}));function Pt(t=pe,e){const n=Jt(Xt.subscribe,Xt.getSnapshot,Xt.getSnapshot),o=zt(Tn),r=e??o,s=dt((a,c)=>Xt.t(a,c,t),[t,n]),i=dt(a=>Xt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Xt}}function bo(t,e){const n=zt(Tn),o=R(null),[r,s]=H(""),i=dt(u=>{o.current=u,typeof t=="function"?t(u):t&&(t.current=u)},[t]);F(()=>{var d,h;const u=(d=o.current)==null?void 0:d.parentElement;e!==void 0||n!==void 0||!u||s(((h=u.closest("[lang]"))==null?void 0:h.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Pt(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const D=t=>Array.isArray(t)?t:t==null?[]:[t],Au=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function jr(t){return Au.includes(t)?t:"left-to-right"}const Ou=["individuals","paged","continuous","unordered"];function Nu(t){return D(t).find(n=>Ou.includes(n))??"individuals"}function Ru(t,e){if(!t.length)return[];if(e==="continuous")return[t.map((a,c)=>c)];if(e!=="paged")return t.map((a,c)=>[c]);const n=[];let o=[],r=0,s=false;const i=()=>{o.length&&n.push(o),o=[]};return t.forEach((a,c)=>{const l=D(a.behavior);if(l.includes("non-paged")){c===r&&r++,i(),n.push([c]);return}if(c===r||l.includes("facing-pages")){o.length&&(s=true),i(),n.push([c]);return}if(o.push(c),s){i(),s=false;return}o.length>1&&i()}),i(),n}function Bu(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const Da=["Independents","Composite","List"];function _o(t){return D(t==null?void 0:t.body).flatMap(e=>Da.includes(e==null?void 0:e.type)?D(e.items):[e])}function Vr(t){const e=D(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function za(t,e){const n=/(?:^|[#&])t=([^&]+)/.exec(e),o=n&&{t:n[1]},r=/(?:^|[#&])xywh=(?:pixel:)?([^&]+)/.exec(e);if(r){const[s,i,a,c]=r[1].split(",").map(Number);if([s,i,a,c].every(Number.isFinite))return{id:t,rect:{x:s,y:i,w:a,h:c},...o}}return o&&{id:t,...o}}function Qn(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return za(o,t.slice(e))??{id:o}}const n=t.indexOf("&t=");return n>=0?{id:t.slice(0,n),t:t.slice(n+3)}:{id:t}}const vr=t=>{var e;return Array.isArray(t)?vr(t[0]):Da.includes(t==null?void 0:t.type)?vr((e=t.items)==null?void 0:e[0]):t};function an(t){return $u(vr(t))}function $u(t){var n;if(typeof t=="string")return Qn(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return Qn(t.id??"");const e=typeof t.source=="string"?Qn(t.source):Qn(((n=t.source)==null?void 0:n.id)??"");for(const o of D(t.selector)){const r=o;if((r==null?void 0:r.type)==="PointSelector"){const[s,i,a]=[r.x,r.y,r.instant??r.t].map(Number),c=Number.isFinite(s)&&Number.isFinite(i);return{id:e.id,...c?{point:{x:s,y:i}}:{},...Number.isFinite(a)?{t:String(a)}:{}}}if((r==null?void 0:r.type)==="SvgSelector"&&r.value)return{id:e.id,svg:String(r.value)};if((r==null?void 0:r.type)==="FragmentSelector"&&r.value){const s=za(e.id,String(r.value));if(s)return s}}return e}const Pn=t=>t==="Audio"||t==="Sound",Fu=t=>{const e=D(t);return e.length>0&&e.every(n=>n==="supplementing")},Du=(t,e)=>Fu(t)&&!!(e.rect||e.svg||e.point)&&!e.t,ri=new WeakMap,zu={canvases:[],views:[],direction:"left-to-right"};function At(t){if(!t)return zu;let e=ri.get(t);if(!e){const n=(t.items??[]).filter(o=>(o==null?void 0:o.type)==="Canvas"||(o==null?void 0:o.type)==="Timeline"||(o==null?void 0:o.type)==="Scene");e={canvases:n,views:Ru(n,Nu(t.behavior)),direction:jr(t.viewingDirection)},ri.set(t,e)}return e}const si=new WeakMap;function $e(t,e){if(!e)return null;const n=At(t);let o=si.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);si.set(n,o)}return o.get(e)??null}function Ln(t,e){const{canvases:n,views:o}=At(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Bu(o,r)}const ii=new WeakMap,Hu=[];function Re(t,e){if(!t)return Hu;const n=Ln(t,e);let o=ii.get(t);o||ii.set(t,o=new Map);let r=o.get(n);if(!r){const s=At(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function Wu(t,e){var s,i;const{canvases:n,views:o}=At(t),r=(s=o[e])==null?void 0:s[0];return r===void 0?null:((i=n[r])==null?void 0:i.id)??null}function Uu(t){const e=t==null?void 0:t.start;if(!e)return null;const n=an(e);if(!n.id)return null;const o={canvasId:n.id};n.rect&&(o.region=n.rect);const r=n.t?Number(n.t.split(",")[0]):NaN;return Number.isFinite(r)&&(o.time=r),o}const Pe=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},ju=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function Vu(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=Re(n,o),i=a=>{const c=r[a];return((c==null?void 0:c.manifestId)===n.id||(c==null?void 0:c.manifestAs)===n.id)&&(!c.canvasId||s.some(l=>l.id===c.canvasId))};return e!==null&&i(e)?e:r.findIndex((a,c)=>i(c))}function yt(t,e,n=", "){if(!t)return{text:""};if(typeof t=="string")return{text:t};const o=Object.keys(t).filter(a=>{var c;return(c=t[a])==null?void 0:c.length});if(!o.length)return{text:""};const r=Wr(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"?void 0:r}}const qu=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function kn(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&qu.test(o));return n.length===1?n[0]:void 0}const nn={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Ku=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi)$/,Zu=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function Gu(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>r.length===4);return(o?Zu.test(o):Ku.test(e))?"rtl":void 0}function lt(t){return t?{lang:t,dir:Gu(t)}:{}}function Xu({clover:t,language:e}){const{t:n,langOf:o}=Pt(),[r,s]=H(null),i=R(n);return i.current=n,F(()=>{let a=null;return t.store.subscribe(()=>{const{manifest:c,canvasId:l,status:u}=t.store.get();if(u!=="ready"||l===a)return;const d=a===null;if(a=l,d)return;const h=$e(c,l),p=yt(h==null?void 0:h.label,e),m=i.current("canvasPosition",{index:Ln(c,l)+1,total:At(c).views.length});s({label:p.text,lang:p.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:nn,children:[r!=null&&r.label?f(Ct,{children:[f("span",{...lt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...lt(o("canvasPosition")),children:r.position})]})}const Yu=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function Ju(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||Yu(r))return;if(r.type==="SpecificResource"){r.source&&typeof r.source=="object"&&o(r.source,s);return}const i=s===void 0?{}:{choice:s};if(r.type==="TextualBody"||typeof r.value=="string")e.push({value:String(r.value??""),format:r.format,language:D(r.language)[0],...i});else if(r.type==="Image"&&r.id){const c=r.label??t.label;e.push({image:r.id,format:r.format,...c?{label:c}:{},...i})}else if(r.type==="Feature"){const c=((a=r.properties)==null?void 0:a.label)??t.label;c&&typeof c=="object"&&e.push({label:c,place:true,...i})}};for(const r of _o(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of D(r.items))o(i,s)}return e}const qr="content-search",ai=/\/search\/([0-2])\//;function Ha(t){if(!t)return null;let e=null;for(const n of D(t.service)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string")continue;const r=String(n.type??n["@type"]??""),s=[n.profile,n["@context"]].flat().map(a=>String(a??"")).join(" "),i=r==="SearchService2"?2:r==="SearchService1"?1:ai.test(s)?Number(ai.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(e??(e={id:o,version:i}))}return e}const Qu="contents",Nv=(t,e)=>`${t}#region-${e+1}`,td=t=>D(t==null?void 0:t.motivation).includes("linking");function Wa(t,e,n){const o=[];for(const r of D(t==null?void 0:t.items)){const s=D(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Ju(r);if(!i.length&&!td(r))continue;const a=an(D(r.target)[0]),c=a.id||n;!c||!r.id||o.push({id:r.id,setId:e,canvasId:c,target:a,motivation:s,bodies:i,annotation:r})}return o}const ed=t=>At(t).canvases.some(e=>D(e.items).some(n=>D(n==null?void 0:n.items).some(o=>D(o==null?void 0:o.body).some(r=>[r,...D(r==null?void 0:r.items)].some(s=>D(s==null?void 0:s.annotations).length>0)))));function nd(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=D(n==null?void 0:n.partOf).find(r=>/AnnotationCollection/.test(String((r==null?void 0:r.type)??(r==null?void 0:r["@type"])))&&r.label);if(o)return o.label}}const Ua=t=>D(t==null?void 0:t.partOf).filter(e=>(e==null?void 0:e.id)&&/AnnotationCollection/.test(String((e==null?void 0:e.type)??(e==null?void 0:e["@type"])))),ci=new WeakMap;function ja(t){var n;if(!t)return[];let e=ci.get(t);if(!e){const o=new Map;for(const r of At(t).canvases)for(const s of D(r.annotations)){if(!Array.isArray(s==null?void 0:s.items))continue;const i=s.id??`${r.id}#annotations`;let a=o.get(i);if(!a){const c=(n=Ua(s)[0])==null?void 0:n.id;a={id:i,label:nd(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Wa(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),ci.set(t,e)}return e}const li=new WeakMap,Va=[];function Rv(t){if(!t)return Va;let e=li.get(t);return e||(e=At(t).canvases.flatMap(n=>D(n.annotations).filter(o=>o==null?void 0:o.id).map(o=>({id:String(o.id),canvasId:String(n.id),fetched:Array.isArray(o.items)}))),li.set(t,e)),e}const Ko=new WeakMap,Zo=new WeakMap;function qa(t,e=od){var n;if(!Zo.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;Zo.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:Va,entries:o.flatMap(s=>s.entries)}:null)}return Zo.get(e)??rd(t)}const od=[];function rd(t){var r;if(!t)return null;if(Ko.has(t))return Ko.get(t);const e=At(t).canvases.flatMap(s=>D(s.annotations).flatMap(i=>Ua(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=e[0])==null?void 0:r.part.id,o=n?(()=>{var l,u;const s=e.filter(({part:d})=>d.id===n),i=(l=s.find(({part:d})=>d.label))==null?void 0:l.part.label,a=Number((u=s.find(({part:d})=>d.total))==null?void 0:u.part.total),c=ja(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:d,canvas:h})=>({id:String(d.id),canvasId:String(h.id),fetched:Array.isArray(d.items)})),entries:s.flatMap(({page:d})=>{var h;return((h=c.find(p=>p.id===d.id))==null?void 0:h.entries)??[]})}})():null;return Ko.set(t,o),o}const ui=new WeakMap,di=[];function Kr(t,e){const n=ja(t);if(!e.length)return n.length?n:di;const o=t??di;let r=ui.get(o);r||ui.set(o,r=new Map);let s=r.get(e);if(!s){const i=new Set(n.map(a=>a.id));s=[...n,...e.filter(a=>!i.has(a.id)&&!!i.add(a.id))],r.set(e,s)}return s}const fi=new WeakMap;function Ka(t,e,n,o=null){const r=Kr(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=fi.get(r);i||fi.set(r,i=new Map);let a=i.get(o);a||i.set(o,a=new Map);let c=a.get(s);return c||(c=[...r,...o?[o]:[],...s?[s]:[]],a.set(s,c)),c}const sd=t=>Number(t==null?void 0:t.duration)>0;function Za(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>Du(n.motivation,n.target)&&!sd(e(n.canvasId)))}const hi=new WeakMap;function id(t,e){const n=Kr(t,e);let o=hi.get(n);if(!o){const r=n.filter(s=>!Za(s,i=>$e(t,i)??void 0));o=r.length===n.length?n:r,hi.set(n,o)}return o}const pi=new WeakMap;function Zr(t,e,n,o){const r=Kr(t,e),s=pi.get(r);if(s&&s.hidden===n&&s.shown===o)return s.ids;const i=r.filter(c=>!n.includes(c.id)&&!o.includes(c.id)&&Za(c,l=>$e(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return pi.set(r,{hidden:n,shown:o,ids:a}),a}const mi=new WeakMap;function ad(t,e,n,o){const r=Zr(t,e,n,o),s=mi.get(r);if(s&&s.hidden===n)return s.ids;const i=[qr,Qu,...r.filter(a=>!n.includes(a))];return mi.set(r,{hidden:n,ids:i}),i}function cd(t){for(const e of D(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=D(n==null?void 0:n.partOf).find(r=>(r==null?void 0:r.id)&&(!r.type||r.type==="Manifest"));if(o)return o.id}}function Go(t,e){if(!e)return null;for(const n of t){const o=n.entries.find(r=>r.id===e);if(o)return o}return null}function gi(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"?D(e.motivation).includes("contentState"):e.type==="SpecificResource"}function ld(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ga({manifestId:t,canvasId:e,type:n="Canvas",region:o,time:r}){const s={id:e,type:n,...t&&t!==e?{partOf:[{id:t,type:"Manifest"}]}:{}},i=r!=null&&r>0?`t=${Math.round(r*100)/100}`:o?`xywh=${[o.x,o.y,o.w,o.h].map(Math.round).join(",")}`:null,a={"@context":`http://iiif.io/api/presentation/${n==="Canvas"?3:4}/context.json`,id:`${e}#content-state`,type:"Annotation",motivation:["contentState"],target:i?{type:"SpecificResource",source:s,selector:{type:"FragmentSelector",value:i}}:s};return{json:a,encoded:ld(a)}}const ud=/iiif\.io\/api\/presentation\/4\/context\.json/;function Xa(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&ud.test(o))}let vi=null;function Gr(){return vi??(vi=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),vi}async function Be(t){if(Xa(t))return t;const[e,{upgrade:n}]=await Promise.all([Gr(),import("../upgrade-eNW0DPXq.mjs")]);return await n(t,e)}function Xr(t,e,n={}){return((t==null?void 0:t.fetch)??globalThis.fetch)(e,{credentials:(t==null?void 0:t.credentials)??"same-origin",...n,headers:{...n.headers,...t==null?void 0:t.headers}})}const dd=t=>(t==null?void 0:t.credentials)==="include",fd=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class hd extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function on(t,e,n){const o=await Xr(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new hd(`${e} answered ${o.status}`,e,o.status);return o.json()}const yi=()=>import("./content-state-reader-CPvkju6Q.mjs"),pd=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function md(t){const e={"@context":vd,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of pd)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const bi=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},gd=/^(oa:)?Annotation(Page|Collection)$/;class to extends Error{constructor(){super(...arguments);P(this,"name","CloverContentError")}}const vd="http://iiif.io/api/presentation/4/context.json",yd=t=>/^https?:\/\//i.test(t);async function yr(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await on(e,t.id,n)}const bd=50;async function Yr(t,e){const n=t;if(Array.isArray(n.items)&&n.items.length||!n.first)return t;const o=[],r=new Set;let s=n.first;for(let i=0;s&&i<bd;i++){const a=typeof s=="string"?{id:s}:s;if(r.has(a.id??a))break;r.add(a.id??a);const c=a.items?a:await on(e.request,a.id,e.signal),l=await Be({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function Ya(t,e={}){return Be(await yr(t,e))}async function Ja(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return Be(await yr(o,e));if(o.type==="Collection"&&n<8){const r=await Yr(await Be(await yr(o,e)),e),s=await Ja(r,e,n+1);if(s)return s}}return null}async function _d(t,{request:e,signal:n}={}){Gr();const o=typeof t=="string"?await on(e,t.trim(),n):t,r=await Be(o);return r.type==="Collection"?Yr(r,{request:e,signal:n}):r}async function wd(t,e={}){var d;const{request:n,signal:o}=e;Gr();let r,s,i,a,c;const l=async h=>{const{resolveContentState:p}=await yi(),m=p(h);if(!m)throw new to("Unreadable content state");return r=m.target??r,s=m.manifestId??s,i=m.annotation??i,a=m.targets??a,on(n,m.id,o)};if(typeof t=="string")if(yd(t.trim()))c=await on(n,t.trim(),o);else{const{decodeContentState:h}=await yi(),p=h(t);if(!p)throw new to("Unreadable iiifContent");c=gi(p)?await l(p):p}else c=t;if(gi(c)&&(c=await l(c)),gd.test(String((c==null?void 0:c.type)??""))){const{annotationsContent:h}=await import("./annotations-content-9AtLlPNn.mjs");return h(c,e)}const u=await Be(c);switch((d=o==null?void 0:o.throwIfAborted)==null||d.call(o),u.type){case"Manifest":return{manifest:u,target:r,annotation:i,targets:a};case"Collection":{const h=await Yr(u,e),p=e.manifestId??s,m=p?(h.items??[]).find(b=>b.id===p&&b.type==="Manifest"):void 0,g=m?await Ya(m,e):await Ja(h,e);if(!g)throw new to("The Collection holds no Manifest");return{manifest:g,collection:h,target:r,annotation:i,targets:a}}case"Canvas":case"Timeline":case"Scene":{const h=u;return r??(r={canvasId:h.id}),{manifest:md(h),target:r,annotation:i}}default:throw new to(`Cannot show a ${String(u.type??"resource without a type")}`)}}const Qa=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function _i(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])Qa(r)&&e.push([n.id,o,r.id]);return e}async function xd(t,e,n,o){return Sd(await on(n,t,o),e)}async function Sd(t,e="urn:clover:annotation-page"){var r;const n=t;return Xa(n)?n:((r=(await Be({"@context":n["@context"]??"http://iiif.io/api/presentation/3/context.json",id:e,type:"Canvas",items:[{...n,"@context":void 0}]})).items)==null?void 0:r[0])??n}function kd(t,e){const n=t,o=e,r=c=>Array.isArray(c)?c:c?[c]:[],s=r(n.partOf),i=r(o.partOf),a=[...s.map(c=>({...i.find(l=>l.id&&l.id===c.id),...c})),...i.filter(c=>!s.some(l=>l.id===c.id))];return{...t,...n.label===void 0&&o.label!==void 0&&{label:o.label},...a.length&&{partOf:a}}}function Cd(t,e,n,o){let r=false;const s=(t.items??[]).map(i=>{if(i.id!==e||!Array.isArray(i[n]))return i;const a=i[n].map(c=>c.id!==o.id||!Qa(c)?c:(r=true,kd(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}function Ed(t){let e=t;const n=new Set;return{get:()=>e,set(o){const r=typeof o=="function"?o(e):o;Object.keys(r).some(i=>!Object.is(r[i],e[i]))&&(e={...e,...r},n.forEach(i=>i()))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Ke(t){let e=t;const n=new Set;return{get:()=>e,emit(o){e=o,n.forEach(r=>r(o))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Md(t,e,n){return{position:e,total:n,hasPrevious:e>0,hasNext:e+1<n,previous:()=>t.previous(),next:()=>t.next(),first:()=>t.first(),last:()=>t.last(),goTo:o=>t.goTo(o)}}const br={query:"",status:"idle",hits:[],set:null},wi={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:br,regions:null,targets:null,targetIndex:null};function Td(t={}){const e=Ed(wi),n=Ke(null),o=Ke(null),r=Ke(null),s=Ke(null),i=Ke(null),a=Ke(null);let c=null,l=null,u=[],d=[],h=[],p=0,m=null,g=null,b=null;const v=(y,E)=>{!g||y===E||(g={...g,items:g.items.map(L=>L.manifestId===y&&L.manifestAs!==E?{...L,manifestAs:E}:L)})},w=y=>{var L;const E=(L=e.get().manifest)==null?void 0:L.id;return!!E&&(E===y.manifestId||E===y.manifestAs)},_=()=>u.length||d.length||h.length?[...u,...d,...h]:wi.addedSets;let x=t.request,k=null;const T=new Set;let O="view",z=0;const J=(y,E,L)=>{if(T.has(L))return;T.add(L);const $=k==null?void 0:k.signal;xd(L,y,x,$).then(A=>{$!=null&&$.aborted||e.set(I=>I.manifest?{manifest:Cd(I.manifest,y,E,A)}:{})}).catch(()=>T.delete(L))},tt=()=>{const{manifest:y,canvasId:E}=e.get();if(y)for(const[L,$,A]of _i(O==="all"||z>0?At(y).canvases:Re(y,E)))J(L,$,A)};e.subscribe(tt);const Y=(y,E,L,$,A)=>{var W,st,nt;const{canvases:I}=At(y),U=wt=>!!wt&&I.some(Bt=>Bt.id===wt),V=Uu(y),St=U(L==null?void 0:L.canvasId)?L:U(V==null?void 0:V.canvasId)?V:null,Q=U($.canvasId)?$.canvasId:(St==null?void 0:St.canvasId)??(U($.defaultCanvasId)?$.defaultCanvasId:null)??((W=I[0])==null?void 0:W.id)??null;l==null||l.abort();const mt=A&&((st=Go(h,A))==null?void 0:st.canvasId)===Q?A:null,ht=St&&mt?{...St,region:void 0}:St,Ht=++p;u=[],e.set({status:"ready",search:br,regions:null,manifest:y,collection:E,canvasId:Q,target:ht&&ht.canvasId===Q?ht:null,addedSets:_(),annotationId:mt,targets:g});const Lt=y==null?void 0:y.structures;Array.isArray(Lt)&&JSON.stringify(Lt).includes("xywh=")&&import("./range-regions-TH6WWGTT.mjs").then(({contentsSet:wt})=>{p===Ht&&e.set({regions:wt(y)})}),ed(y)&&import("./image-layers-x_shzPvu.mjs").then(({imageLayers:wt})=>{p===Ht&&(u=wt(y),e.set({addedSets:_()}))}),Q&&Q!==$.canvasId&&((nt=t.onCanvasChange)==null||nt.call(t,Q))},Z=(y,E)=>e.set(L=>{const $=L.hiddenSets.filter(I=>I!==y),A=L.shownSets.filter(I=>I!==y);return E?{hiddenSets:$,shownSets:[...A,y]}:{hiddenSets:[...$,y],shownSets:A}}),C=(y,E)=>{var $,A,I;if(!y)return;if(($=t.isControlled)!=null&&$.call(t)){E&&e.set({target:E}),(A=t.onCanvasChange)==null||A.call(t,y);return}const L=e.get().canvasId!==y;e.set({canvasId:y,target:E}),L&&((I=t.onCanvasChange)==null||I.call(t,y))},S=(y,E=false)=>{const{manifest:L}=e.get(),$=Wu(L,y);C($,$&&E?{canvasId:$,autoplay:E}:null)},N=()=>{const{manifest:y,canvasId:E}=e.get();return{at:Ln(y,E),total:At(y).views.length}},j=()=>{k==null||k.abort();const y=new AbortController;return k=y,T.clear(),e.set({status:"loading",error:null,annotationId:null}),y.signal},G=y=>e.set({status:"error",error:y instanceof Error?y:new Error(String(y))});async function X(y,E={}){var $;const L=j();try{const A=await wd(y,{request:x,signal:L,manifestId:E.manifestId??void 0});if(L.aborted)return;const I=A.annotation,U=I?Wa({items:[I]},`${I.id}#content-state`):[];h=U.length?[{id:`${I.id}#content-state`,source:"added",entries:U}]:A.annotationSets??[];const V=m??(($=U[0])==null?void 0:$.id)??A.pick;m=null,e.set({throughCollection:!!A.collection}),g=A.targets??null,g&&v(g.items[0].manifestId,A.manifest.id),e.set({targetIndex:g?0:null}),Y(A.manifest,A.collection??null,A.target,E,V)}catch(A){L.aborted||G(A)}}const et=y=>{const{manifest:E,collection:L}=e.get();return(E==null?void 0:E.id)===y||(L==null?void 0:L.id)===y},xt=y=>{var E;return(((E=e.get().collection)==null?void 0:E.items)??[]).find(L=>L.id===y)??{id:y,type:"Manifest"}},at=(y,E)=>{var L,$;if(m=E,(L=t.isManifestControlled)!=null&&L.call(t)){($=t.onManifestChange)==null||$.call(t,y);return}ct({id:y,type:"Manifest"}).then(A=>{var I;return A&&((I=t.onManifestChange)==null?void 0:I.call(t,y))})},ct=async(y,E)=>{if(y.type==="Collection")return await X(y.id),e.get().status==="ready";const{collection:L}=e.get(),$=j(),A=m;m=null;const I=A?Go(h,A):null,U=typeof E=="string"?{canvasId:E}:E??b;b=null;try{const V=await Ya(y,{request:x,signal:$});return $.aborted?false:(v(y.id,V.id),Y(V,L,I?{canvasId:I.canvasId}:U??void 0,{},A),true)}catch(V){return $.aborted||G(V),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return x},setRequest(y){x=y},load:X,async openCollection(y){var L;const E=e.get().manifest;if(!(!E||((L=e.get().collection)==null?void 0:L.id)===y))try{const $=await _d(y,{request:x});if($.type!=="Collection"||e.get().manifest!==E)return;e.set({collection:$})}catch{}},async goToManifest(y,E){var $,A,I;if(et(y))return;const L=xt(y);if(L.type!=="Collection"&&(($=t.isManifestControlled)!=null&&$.call(t))){(A=t.onManifestChange)==null||A.call(t,y);return}await ct(L,E)&&((I=t.onManifestChange)==null||I.call(t,e.get().manifest.id))},goToTarget(y){var $,A,I;const E=($=e.get().targets)==null?void 0:$.items[y];if(!E)return;e.set({targetIndex:y});const L=E.canvasId?{canvasId:E.canvasId,...E.region&&{region:E.region},...E.time!==void 0&&{time:E.time}}:null;if(w(E)){L&&C(L.canvasId,L);return}if((A=t.isManifestControlled)!=null&&A.call(t)){b=L,(I=t.onManifestChange)==null||I.call(t,E.manifestId);return}ct(xt(E.manifestId),L??void 0).then(U=>{var V;return U&&((V=t.onManifestChange)==null?void 0:V.call(t,E.manifestId))})},async syncManifest(y){!y||et(y)||e.get().status!=="ready"||await ct(xt(y))},goTo(y,E){C(y,E?{...E,canvasId:y}:null)},next({autoplay:y=false,wrap:E=false}={}){const{at:L,total:$}=N();L+1<$?S(L+1,y):E&&$>1&&S(0,y)},previous(){const{at:y}=N();y>0&&S(y-1)},first(){S(0)},last(){S(N().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(y){y&&e.set({canvasId:y})},selectAnnotation(y){const{manifest:E,addedSets:L,canvasId:$,search:A,regions:I}=e.get(),U=Go(Ka(E,L,A.set,I),y);if(e.set({annotationId:U?y:null}),!U)return;a.emit(y);const{hiddenSets:V,shownSets:St}=e.get();U.setId!==qr&&Zr(E,L,V,St).includes(U.setId)&&Z(U.setId,true);const Q=Re(E,$).some(Ht=>Ht.id===U.canvasId),mt=$e(E,U.canvasId)!==null;!Q&&mt&&C(U.canvasId,null);const ht=mt?void 0:cd(U.annotation);ht&&at(ht,U.id)},async search(y){l==null||l.abort();const E=Ha(e.get().manifest),L=y.trim();if(!L||!E){l=null,e.set({search:br,annotationId:null});return}const $=new AbortController;l=$,e.set(A=>({search:{...A.search,query:L,status:"loading"}}));try{const{searchInto:A}=await import("./search-B_NePyas.mjs");await A(e,E,L,x,$.signal)}catch{e.set({search:{query:L,status:"error",hits:[],set:null}})}},setSetVisible(y,E){Z(y,E)},async loadAnnotations(y){if(c==null||c.abort(),!y){d=[],e.set({addedSets:_()});return}const E=new AbortController;c=E;try{const{loadAnnotationSets:L}=await import("./annotation-collection-B7pZiLVk.mjs"),$=await L(y,{request:x,signal:E.signal});if(E.signal.aborted)return;d=$,e.set({addedSets:_()})}catch{}},getContentState(){var Q;const{manifest:y,canvasId:E}=e.get();if(!y||!E)return null;const L=n.get(),$=o.get(),A=$&&$.currentTime>0?$.currentTime:null,I=Re(y,E),V=L&&I.some(mt=>mt.id===L.canvasId)&&!A?L:null,St=(V==null?void 0:V.canvasId)??E;return Ga({manifestId:y.id,canvasId:St,type:(Q=I.find(mt=>mt.id===St))==null?void 0:Q.type,region:V==null?void 0:V.region,time:A})},setAnnotationPages(y){y!==O&&(O=y,tt())},fetchAnnotationPages(y){const{manifest:E}=e.get();if(!E||!y.length)return;const L=new Set(y);for(const[$,A,I]of _i(At(E).canvases))L.has(I)&&J($,A,I)},holdAllAnnotationPages(){z++,tt();let y=true;return()=>{y&&z--,y=false}},dispose(){k==null||k.abort(),c==null||c.abort(),l==null||l.abort()}}}const Id=100;function tc(t,e){const n=R({read:t,onChange:e});n.current={read:t,onChange:e};const o=R(void 0),r=R("");return F(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),dt(()=>{!n.current.onChange||o.current!==void 0||(o.current=setTimeout(()=>{var i,a;o.current=void 0;const s=n.current.read();!s||s.encoded===r.current||(r.current=s.encoded,(a=(i=n.current).onChange)==null||a.call(i,s))},Id))},[])}function _r(t,e){return t==null||t.addEventListener("pause",e),t==null||t.addEventListener("seeked",e),()=>{t==null||t.removeEventListener("pause",e),t==null||t.removeEventListener("seeked",e)}}function ec(t,e){const n=tc(()=>t.getContentState(),e),o=!!e;F(()=>{if(!o)return;let r=t.store.get().canvasId;const s=t.store.subscribe(()=>{const l=t.store.get().canvasId;l!==r&&(r=l,n())}),i=t.viewport.subscribe(n);let a=_r(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=_r(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function Jr(t){const e=[];for(const n of D(t==null?void 0:t.items))for(const o of D(n==null?void 0:n.items))if(Vr(o))for(let r of _o(o))(r==null?void 0:r.type)==="Choice"&&(r=D(r.items)[0]),(r==null?void 0:r.type)==="SpecificResource"&&(r=typeof r.source=="string"?{id:r.source}:r.source),r&&e.push({body:r,annotation:o});return e}function Pd(t){return t.flatMap(e=>Jr(e).map(({body:n})=>n))}function Ld(t,e){if(!(t!=null&&t.length)||!e.canvases.length)return null;const n=e.canvases.map(r=>r.id),o=e.bodies.map(r=>r==null?void 0:r.format).filter(Boolean);return t.find(r=>{var s,i,a;return((s=r.canvasId)==null?void 0:s.some(c=>n.includes(c)))||((i=r.format)==null?void 0:i.some(c=>o.includes(c)))||!!((a=r.match)!=null&&a.call(r,e))})??null}function Ad(t,e){return t===e?true:!t||!e||t.length!==e.length?false:t.every((n,o)=>n.component===e[o].component&&n.match===e[o].match&&JSON.stringify([n.canvasId,n.format])===JSON.stringify([e[o].canvasId,e[o].format]))}function Od({iiifContent:t,canvasId:e,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:u,renderers:d,annotations:h,annotationPages:p="view",onContentStateChange:m,...g}){const b=e!==void 0,v=s!==void 0,w=R({controlled:b,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a});w.current={controlled:b,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[_]=H(()=>Td({request:l,onCanvasChange:at=>{var ct,y;return(y=(ct=w.current).onCanvasChange)==null?void 0:y.call(ct,at)},onManifestChange:at=>{var ct,y;return(y=(ct=w.current).onManifestChange)==null?void 0:y.call(ct,at)},isControlled:()=>w.current.controlled,isManifestControlled:()=>w.current.manifestControlled}));_.setRequest(l);const x=R({});x.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const k=fd(l),T=R(t);T.current=t;const O=Bd(t);F(()=>(_.load(T.current,x.current),()=>_.dispose()),[_,O,k]),F(()=>{b&&_.syncCanvas(e??null)},[_,b,e]);const[z,J]=H(_.store.get().status);F(()=>{let at=_.store.get().status;return _.store.subscribe(()=>{var E,L;const{status:ct,error:y}=_.store.get();ct!==at&&(at=ct,J(ct),(L=(E=w.current).onStatusChange)==null||L.call(E,ct,y))})},[_]);const tt=R(h);tt.current=h;const Y=Rd(h);F(()=>{_.loadAnnotations(tt.current??null)},[_,Y,k]),F(()=>{_.setAnnotationPages(p)},[_,p]),ec(_,m),F(()=>{v&&z==="ready"&&_.syncManifest(s??null)},[_,v,s,z]);const Z=Nd(_,at=>{var ct;return at.status==="ready"?((ct=at.manifest)==null?void 0:ct.id)??null:null});F(()=>{c&&Z&&_.search(c)},[_,c,Z]);const C=R(d);Ad(C.current,d)||(C.current=d);const S=C.current,[N,j]=H(),[G,X]=H(u);G!==u&&(X(u),j(void 0));const et=N??u;return[gt(()=>({clover:_,language:et,renderers:S,chooseLanguage:j}),[_,et,S]),z,g]}function Nd(t,e){return Jt(t.store.subscribe,()=>e(t.store.get()))}function Rd(t){const e=Array.isArray(t)?t:t?[t]:[];return JSON.stringify(e.map(n=>typeof n=="string"?n:(n==null?void 0:n.id)??"object"))}function Bd(t){return typeof t=="string"?t:t.id??t["@id"]??t}const $d=te(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=Od(s),u=bo(i,l.lang),d=zr(r);return f(vo.Provider,{value:a,children:f(Tn.Provider,{value:u.hostLanguage,children:f(e,{ref:u.ref,className:Tt("clover-root",n),"data-status":c,...Hr(d),...l,children:[o,f(Xu,{clover:a.clover,language:a.language})]})})})}),Fd=()=>f("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),Dd=()=>f(Ct,{children:[f("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),f("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),zd=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),Hd=()=>f("path",{fillRule:"evenodd",stroke:"none",d:"M256 40C166 40 100 108 100 196C100 300 216 420 246 452A14 14 0 0 0 266 452C296 420 412 300 412 196C412 108 346 40 256 40Z M256 136A60 60 0 1 1 256 256A60 60 0 1 1 256 136Z"}),Bv=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),nc=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),$v=()=>f(Ct,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),Fv=()=>f(Ct,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]}),Kt={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},Wd=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function Fe({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Pt(),c=R(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return jd(),F(()=>{const u=c.current;u&&xi(u)&&wr(u)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...lt(e),...o&&{tabIndex:-1,onMouseDown:u=>{var d;u.preventDefault(),(d=u.currentTarget.parentElement)==null||d.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const u=c.current;u&&xi(u)&&wr(u)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function eo(t){const e=t.target instanceof Element&&oc(t.target),n=e&&Qr(e);n&&wr(n)}function Qr(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function oc(t){const e=t.matches("input")?t.parentElement:null;return e&&Qr(e)?e:t}function xi(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function wr(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=Ud(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,s=n.right-o,i=e.getBoundingClientRect();let a=t.getBoundingClientRect();const c=a.right<=i.left?a.right-r:a.left>=i.right?s-a.left:s-r;a.width>c&&(t.style.setProperty("--clover-tip-room",`${Math.max(c,0)}px`),a=t.getBoundingClientRect());const l=a.left<r?r-a.left:a.right>s?s-a.right:0;l&&t.style.setProperty("--clover-tip-shift",`${l}px`)}function Ud(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:s,overflowX:i}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const a=i||s;if(!a||a==="visible")continue;const c=o.getBoundingClientRect();e=Math.max(e,c.left+o.clientLeft),n=Math.min(n,c.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let Si=0;function ki(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&oc(n);o&&Qr(o)&&e.add(o),e.forEach(r=>rc(r,"tipHidden",["pointerenter","focusout"]))}function rc(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function jd(){F(()=>(Si++===0&&(document.addEventListener("keydown",ki,true),document.addEventListener("pointerenter",eo,true),document.addEventListener("focus",eo,true)),()=>{--Si||(document.removeEventListener("keydown",ki,true),document.removeEventListener("pointerenter",eo,true),document.removeEventListener("focus",eo,true))}),[])}function Vd(t,e){const n=t.target;!e||n===e||e.contains(n)||Wd.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}const Ne=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c})=>{const u=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Tt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":u,onClick:r,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...lt(c),type:"button",children:[f("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:o}),f(Fe,{label:n,shortcut:a})]})},qd=ae("");function le(){return zt(qd)+$r()}const Xo=new Map;function Kd(t,e){const n=le(),o=R(e);o.current=e,F(()=>t?Zd(n,o):void 0,[t,n])}function Zd(t,e){for(const[n,o]of[...Xo])n!==t&&o.current();return Xo.set(t,e),()=>{Xo.delete(t)}}const Gd=pt(()=>import("./CaptionDetails-DPtE-RQQ.mjs"));function Xd(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const sc=(t,e)=>`${t}-label-${e}`,Yd=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Pt(),c=R(null),[l,u]=H(o);return o&&!l&&u(true),Kd(o,()=>r(false)),F(()=>{var d;o&&((d=c.current)==null||d.focus())},[o]),f("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:t,onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),r(true))},ref:c,tabIndex:-1,children:[f(Ne,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(nc,{})}),e.map((d,h)=>{const p=yt(d.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[p.text&&f("p",{className:"clover-canvas-caption-label",id:sc(t,h),...lt(p.lang),children:p.text}),l&&f(_t,{fallback:null,children:f(Gd,{summary:d.summary,metadata:d.metadata,comments:n==null?void 0:n.get(d.id),language:s})})]},d.id)})]})},Jd=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),Qd=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),tf=()=>f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),ef=()=>f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),nf=()=>f("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),Ci=()=>f(Ct,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),f("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),of=()=>f(Ct,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),rf=({children:t,label:e})=>f("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":e,children:t}),sf=112,af=128;function cf(t){Dt(()=>{const e=t==null?void 0:t.closest(".clover-canvas");if(!t||!e)return;const n=(s=false)=>{let i=t.offsetWidth,a=0;for(const p of s?[]:Array.from(t.children))!(p instanceof HTMLElement)||!p.offsetParent||(i=Math.min(i,p.offsetLeft),a=Math.max(a,p.offsetTop+p.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[p,m]of Object.entries(c)){const g=`--clover-canvas-controls-${p}`;a?e.style.setProperty(g,`${m}px`):e.style.removeProperty(g)}const l=t.offsetTop,u=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),d=e.clientHeight-2*l-c.height-((u==null?void 0:u.offsetHeight)??0),h=t.offsetLeft+i-l;a&&d<sf&&h>=af?e.dataset.popups="beside":delete e.dataset.popups};n();const o=new ResizeObserver(()=>n());o.observe(t),o.observe(e);const r=new MutationObserver(()=>n());return r.observe(t,{childList:true}),r.observe(e,{childList:true}),()=>{o.disconnect(),r.disconnect(),n(true)}},[t])}const wo=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},ic=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},ac=t=>{const e=t==null?void 0:t.closest(".clover-root"),n=t==null?void 0:t.closest("dialog");return e&&!(n&&e.contains(n))?e:(t==null?void 0:t.closest(".clover-canvas"))??null},lf=(t,e)=>{if(typeof t.webkitEnterFullscreen!="function")return;const n=e.closest(".clover-canvas"),o=!t.isConnected&&!!n;if(o&&n){const s=t.getAttribute("style");t.style.cssText="position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:contain;pointer-events:none",n.prepend(t),t.addEventListener("webkitendfullscreen",()=>{t.remove(),s===null?t.removeAttribute("style"):t.setAttribute("style",s)},{once:true})}const r=()=>{var s;try{(s=t.webkitEnterFullscreen)==null||s.call(t)}catch{}};o?requestAnimationFrame(r):r()},cc=async(t,e)=>{var o,r,s,i;const n=ac(t);if(n)try{if(wo()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!ic()){e&&t&&lf(e,t);return}const a=n;await(((s=a.requestFullscreen)==null?void 0:s.call(a))??((i=a.webkitRequestFullscreen)==null?void 0:i.call(a)))}catch{}};function ts(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=wo())!=null&&r.contains(t)))};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function uf({key:t,id:e,label:n,glyph:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c},l){const u=l==null?void 0:l[t];return u?f(u,{buttonProps:{id:e,type:"button","aria-label":n,...c&&{lang:c},...a&&{"aria-keyshortcuts":a.keys},onClick:r,...s!==void 0&&{"aria-expanded":s,"aria-controls":i}},icon:f(rf,{label:n,children:o}),label:n,tip:f(Fe,{label:n,shortcut:a})},t):f(Ne,{id:e,label:n,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const df=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=H(null),s=ts(o);cf(o);const i=dt(a=>{r(a),e==null||e(a)},[e]);return f("div",{className:"clover-canvas-controls","data-fit":t||void 0,"data-fullscreen":s,"data-testid":"clover-canvas-controls",ref:i,children:n})},ff=()=>()=>{};function hf(){return Jt(ff,ic)}const Ei=new WeakMap;function Ge(t,e){const[n,o]=H(()=>Ei.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{Ei.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function pf(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function mf(t,e,n){const o=t.ownerDocument,r=i=>i instanceof HTMLElement&&t.contains(i)&&!i.closest("[hidden]"),s=[o.getElementById(e),o.getElementById(n),...Array.from(t.querySelectorAll("button"))].find(r);s==null||s.focus()}function gf({cluster:t,ids:e,more:n,fits:o,onFits:r}){const s=R(o);s.current=o;const i=R(r);i.current=r;const a=R(new Map),c=R(e);c.current=e;const l=R(null),u=e.join(" ");return Dt(()=>{const d=t.ownerDocument,h=()=>{var T;const g=c.current,b=getComputedStyle(t),v=parseFloat(b.columnGap)||0;let w=t.clientWidth-(parseFloat(b.paddingLeft)||0)-(parseFloat(b.paddingRight)||0),_=0;for(const O of g){const z=(T=d.getElementById(O))==null?void 0:T.offsetWidth;z&&a.current.set(O,z),_=Math.max(_,a.current.get(O)??0)}for(const O of Array.from(t.children))!(O instanceof HTMLElement)||g.includes(O.id)||O.id===n||O.classList.contains("clover-canvas-more")||!O.offsetWidth||getComputedStyle(O).position==="absolute"||(w-=O.offsetWidth+v);const x=pf(g.map(O=>a.current.get(O)??_),w,v);if(x===s.current)return;const k=d.activeElement;l.current=k instanceof HTMLElement&&t.contains(k)?k.id:null,s.current=x,i.current(x)};h();const p=new ResizeObserver(()=>h());p.observe(t);const m=new MutationObserver(()=>h());return m.observe(t,{childList:true}),()=>{p.disconnect(),m.disconnect()}},[t,u,n]),Dt(()=>{const d=l.current;if(l.current=null,d===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&mf(t,d,n)},[o,t,n]),null}const vf=()=>import("./AnnotationMenu-BIQYVR4N.mjs"),yf=()=>import("./ChaptersMenu-D6Jmujag.mjs"),bf=()=>import("./ChoiceMenu-GkqyTQRQ.mjs"),_f=()=>import("./ImageControls-C2G4x2Es.mjs"),Mi=2,wf=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),xf=({renderer:t,instance:e,config:n,controlButtons:o,placeholder:r,placeholderIsMore:s=false,choices:i=[],selections:a={},onSelect:c,annotations:l=[],chapters:u=[],mediaElement:d=null,onChapter:h,request:p,hiddenPages:m,onPageVisibilityChange:g,selectedAnnotation:b=null,onAnnotationSelect:v,onAnnotationActivate:w,captionId:_,captionOpen:x=false,onCaptionToggle:k,placeId:T,placeOpen:O=false,onPlaceToggle:z,language:J,fit:tt=true,more:Y="auto",children:Z})=>{var Dn,zn,Ie,fn;const{t:C,langOf:S}=Pt(),[N,j]=H(false),[G,X]=H(false),et=`annotations-${e}`,xt=`${et}-menu`,at=C("informationPanelTabsAnnotations"),ct=S("informationPanelTabsAnnotations"),y=dt(q=>{var ft;X(false),w==null||w(null),q&&((ft=document.getElementById(et))==null||ft.focus())},[et,w]),E=n.annotations&&l.length>0&&v,[L,$]=H(false),A=`chapters-${e}`,I=`${A}-menu`,U=u.length>0&&!!h,V=R(false),St=R(null);F(()=>{const q=()=>{var ft;V.current=((ft=document.activeElement)==null?void 0:ft.id)===A};return document.addEventListener("focusin",q),()=>document.removeEventListener("focusin",q)},[A]);const Q=dt(()=>{var ft,_e;if(!V.current)return;V.current=false;const q=document.activeElement;q&&q!==document.body||(_e=(ft=St.current)==null?void 0:ft.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||_e.focus()},[]);F(()=>{U||Q()},[U,Q]),F(()=>()=>Q(),[Q]);const mt=dt(q=>{var ft;$(false),q&&((ft=document.getElementById(A))==null||ft.focus())},[A]),ht=n.information&&_&&k,Ht=n.map&&T&&z,Lt=`choice-${e}`,W=i.length===1?yt(i[0].label,J):null,st=(W==null?void 0:W.text)||C("canvasChoice"),nt=W!=null&&W.text?W.lang:S("canvasChoice"),wt=`${Lt}-menu`,Bt=(Dn=Ge(vf,!!E))==null?void 0:Dn.default,ee=(zn=Ge(yf,U))==null?void 0:zn.default,be=(Ie=Ge(bf,i.length>0&&!!c))==null?void 0:Ie.default,B=dt(q=>{var ft;j(false),q&&((ft=document.getElementById(Lt))==null||ft.focus())},[Lt]),ut=hf(),[bt,De]=H(null);F(()=>{St.current=(bt==null?void 0:bt.closest(".clover-canvas"))??null},[bt]);const ze=ts(bt),[ue,Me]=H(false),Rn=q=>f(Ne,{className:q,id:et,label:at,lang:ct,onClick:()=>X(ft=>!ft),expanded:G,controls:xt,children:f(Fd,{})},"annotations"),Bn=(()=>{const q=[],ft=t;return n.zoom&&ft&&q.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:Kt.zoomIn,label:C("imageZoomIn"),lang:S("imageZoomIn"),glyph:f(Jd,{}),onClick:()=>ft.zoomBy(Mi)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:Kt.zoomOut,label:C("imageZoomOut"),lang:S("imageZoomOut"),glyph:f(Qd,{}),onClick:()=>ft.zoomBy(1/Mi)}),n.fullPage&&ut&&q.push({key:"fullPage",id:`fullPage-${e}`,label:C(ze?"imageExitFullScreen":"imageFullScreen"),lang:S(ze?"imageExitFullScreen":"imageFullScreen"),glyph:ze?f(ef,{}):f(tf,{}),onClick:_e=>void cc(_e.currentTarget)}),n.rotation&&ft&&q.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:Kt.rotateRight,label:C("imageRotateRight"),lang:S("imageRotateRight"),glyph:f(Ci,{}),onClick:()=>ft.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:Kt.rotateLeft,label:C("imageRotateLeft"),lang:S("imageRotateLeft"),glyph:f(Ci,{}),onClick:()=>ft.rotateBy(-90)}),n.reset&&ft&&q.push({key:"reset",id:`reset-${e}`,shortcut:Kt.reset,label:C("imageResetZoom"),lang:S("imageResetZoom"),glyph:f(nf,{}),onClick:()=>ft.home()}),i.length&&q.push({key:"choice",id:Lt,label:st,lang:nt,glyph:f(of,{}),onClick:()=>j(_e=>!_e),expanded:N,controls:wt}),q})(),Zt=[...Bn.filter(q=>q.key!=="fullPage"),...Bn.filter(q=>q.key==="fullPage")].map(q=>({id:q.id,view:wf.has(q.key),node:uf(q,o)})),ln=[Ht&&{id:`place-${e}`,view:false,node:f(Ne,{id:`place-${e}`,label:C("mapLabel"),lang:S("mapLabel"),onClick:z,expanded:O,controls:T,children:f(Hd,{})},"place")},U&&{id:A,view:false,node:f(Ne,{id:A,label:C("playerChapters"),lang:S("playerChapters"),onClick:()=>$(q=>!q),expanded:L,controls:I,children:f(Dd,{})},"chapters")},E&&{id:et,view:false,node:Rn()},ht&&{id:`information-${e}`,view:false,node:f(Ne,{id:`information-${e}`,label:C("informationPanelTabsAbout"),lang:S("informationPanelTabsAbout"),onClick:k,expanded:x,controls:_,children:f(zd,{})},"information")},!!r&&{id:`placeholder-${e}`,view:false,node:f(re.Fragment,{children:r},"placeholder")}].filter(q=>!!q),$n=ln.filter(q=>q.id===`placeholder-${e}`),Wt=[...Zt.filter(q=>q.view),...$n],un=[...Zt.filter(q=>!q.view),...ln.filter(q=>!$n.includes(q))],de=[...Wt,...un],[He,To]=H(true),dn=Y==="always"||s,Nt=(fn=Ge(_f,tt&&(dn||!He)&&de.some(q=>q.view)))==null?void 0:fn.ImageControls,jt=He&&!dn||!Nt?[]:de.filter(q=>q.view),Te=s&&jt.length>0;F(()=>{jt.length||Me(false)},[jt.length]);const Fn=q=>q.filter(ft=>!jt.includes(ft)&&!(Te&&ft.id===`placeholder-${e}`)).map(({node:ft})=>ft);return f(Ct,{children:[f(df,{fit:tt,clusterRef:De,children:[Fn(Wt),Nt&&jt.length>0&&f(Nt,{instance:e,open:Te||ue,onOpenChange:Me,toggle:Te?r:void 0,children:jt.map(({node:q})=>q)}),Fn(un),Z]}),tt&&!dn&&bt&&f(gf,{cluster:bt,ids:de.map(({id:q})=>q),more:`more-${e}`,fits:He,onFits:To}),ee&&L&&U&&f(ee,{id:I,triggerId:A,label:C("playerChapters"),labelLang:S("playerChapters"),chapters:u,element:d,onChapter:h,request:p,onClose:mt}),Bt&&G&&E&&f(Bt,{id:xt,triggerId:et,label:at,labelLang:ct,annotations:l,hiddenPages:m,onPageVisibilityChange:g,selected:b,onSelect:v,onActivate:q=>w==null?void 0:w(q),onClose:y}),be&&N&&i.length>0&&c&&f(be,{id:wt,triggerId:Lt,label:st,labelLang:nt,language:J,choices:i,selections:a,onSelect:c,onClose:B})]})},Sf=["jpg","png","webp","gif"];class xr extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function es(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function xo(t){const e=Array.isArray(t)?t:t?[t]:[];for(const n of e){if(!n||typeof n!="object")continue;const o=n,r=String(o.type??o["@type"]??""),s=JSON.stringify(o.profile??""),i=/ImageService/i.test(r)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!r&&!o.profile,a=o["@id"]??o.id;if(i&&typeof a=="string")return es(a)}}function kf(t,e){if(!t||typeof t!="object")throw new xr("info.json is not an object",e??"");const n=t,o=Cf(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=es(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new xr("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(w=>typeof w=="string"),u=c.filter(w=>!!w&&typeof w=="object"),d=Ef(l),h=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...u.flatMap(w=>Array.isArray(w.supports)?w.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(w=>String(w).toLowerCase()).find(w=>Sf.includes(w))??"jpg",g=w=>{var x;const _=n[w]??((x=u.find(k=>k[w]!==void 0))==null?void 0:x[w]);return Number(_)>0?Number(_):void 0};let b=g("maxWidth"),v=g("maxHeight");return b&&!v&&(v=b),v&&!b&&(b=void 0),{id:s,version:o,level:d,width:i,height:a,tiles:Mf(n.tiles),sizes:Tf(n.sizes),maxWidth:b,maxHeight:v,maxArea:g("maxArea"),regionByPx:d>=1||h.has("regionByPx"),sizeByW:d>=1||h.has("sizeByW")||h.has("sizeByWh"),format:m,quality:"default"}}function Cf(t){const e=[].concat(t["@context"]??[]).map(String);return e.some(n=>n.includes("/image/3"))?3:e.some(n=>n.includes("/image/2"))?2:t.type==="ImageService3"?3:t["@id"]?2:3}function Ef(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Mf(t){return Array.isArray(t)?t.map(e=>{const n=Number(e==null?void 0:e.width),o=Number((e==null?void 0:e.height)??(e==null?void 0:e.width)),r=(Array.isArray(e==null?void 0:e.scaleFactors)?e.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,i)=>s-i);return{width:n,height:o,scaleFactors:r}}).filter(e=>e.width>0&&e.height>0&&e.scaleFactors.length):[]}function Tf(t){return Array.isArray(t)?t.map(e=>({width:Number(e==null?void 0:e.width),height:Number(e==null?void 0:e.height)})).filter(e=>e.width>0&&e.height>0).sort((e,n)=>e.width-n.width):[]}function co(t,e,n,o,r=t.quality){const s=e.x===0&&e.y===0&&e.width===t.width&&e.height===t.height,i=s?"full":`${e.x},${e.y},${e.width},${e.height}`,a=s&&n===t.width&&o===t.height;let c;return t.version===3?c=a?"max":`${n},${o}`:c=a?"full":`${n},`,`${t.id}/${i}/${c}/0/${r}.${t.format}`}function If(t){return t.version===2&&t.level===0?"native":void 0}const Yo=new Map;function lc(t,{request:e}={}){const n=es(t),o=Yo.get(n);if(o)return o;const r=`${n}/info.json`,s=Xr(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new xr(`info.json request failed with ${i.status}`,r,i.status);return kf(await i.json(),n)}).catch(i=>{throw Yo.delete(n),i});return Yo.set(n,s),s}function Pf(t){const e=Math.max(0,Math.floor(t||0)),n=Math.floor(e/3600),o=Math.floor(e%3600/60),r=String(e%60).padStart(2,"0");return n?`${n}:${String(o).padStart(2,"0")}:${r}`:`${o}:${r}`}function Dv(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function ns(t){if(!t)return;const[e,n]=t.split(","),o=Number(e);if(e===""||Number.isNaN(o))return;if(n===void 0||n==="")return{start:o};const r=Number(n);return Number.isNaN(r)?{start:o}:{start:o,end:r}}const Lf=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,Af=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,Of=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Af.test(e)),Nf={width:1600,height:900};function Rf(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(rn),r=e==="left-to-right"||e==="right-to-left",s=e==="right-to-left"||e==="bottom-to-top",i=r?o[0].height:o[0].width,a=t.map((l,u)=>u);s&&a.reverse();let c=0;for(const l of a){const u=o[l],d=i/(r?u.height:u.width),h=u.width*d,p=u.height*d;n[l]=r?{x:c,y:0,width:h,height:p}:{x:0,y:c,width:h,height:p},c+=r?h:p}return n}function rn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=uc(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=lo(t)[0])==null?void 0:s.body)??((i=uo(t)[0])==null?void 0:i.body),o=Number(n==null?void 0:n.width),r=Number(n==null?void 0:n.height);return o>0&&r>0?{width:o,height:r}:Nf}function uc(t){return t.accompanyingContainer??t.placeholderContainer}function Bf(t,e,n,o,r){return Lf(t.id,e.id,n,o,r)}function $f(t){const e=[];for(const n of t)dc(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=D(s.items).filter(a=>!!a&&typeof a=="object");i.length>1&&e.push({key:r,canvasId:n.id,label:s.label,items:i.map(a=>({label:a.label,id:a.id,...typeof a.type=="string"?{type:a.type}:{},...typeof a.format=="string"?{format:a.format}:{}}))})});return e}const Jo={};function Ff(t){if(t.type!=="Video"&&!Pn(t.type)||!t.format||Of(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=Jo[e]??(Jo[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function Df(t){const e={};for(const n of t){const o=n.items.findIndex(Ff);o>0&&(e[n.key]=o)}return e}const Qo=new WeakMap,tr=[];function zf(t){return _o(t).some(e=>((e==null?void 0:e.type)==="Choice"?D(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||Pn(o==null?void 0:o.type)))}function Sr(t){var i;const e=Qo.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!Vr(c))continue;const l=c.target?(i=an(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[u,d]=l.split(",").map(Number);Number.isFinite(u)&&n.push({annotation:c,start:u,end:Number.isFinite(d)?d:NaN})}if(n.every(a=>zf(a.annotation)))return Qo.set(t,tr),tr;n.sort((a,c)=>a.start-c.start);const o=Number(t.duration),r=Number.isFinite(o)&&o/n.length||.5;n.forEach((a,c)=>{var u;const l=(u=n[c+1])==null?void 0:u.start;a.end>a.start||(l!=null?a.end=l>a.start?l:a.start+r:Number.isFinite(o)&&o>a.start?a.end=o:a.end>a.start||(a.end=a.start+r))});const s=n.length>1?n:tr;return Qo.set(t,s),s}const Cn=t=>`frame:${t.id}`;function dc(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{Vr(r)&&_o(r).forEach((i,a)=>e(i,Bf(t,r,o,s,a),r))})})}function lo(t,e={},{allFrames:n=false}={}){const o=[];return os(t,e,(r,s,i)=>{r.body.type==="Image"&&o.push({body:r.body,region:r.region,...r.rotation?{rotation:r.rotation}:{},target:s,...i>=0?{frame:i}:{}})},n),o}function Hf(t,e={}){for(const n of t){let o;if(os(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function uo(t,e={}){const n=[];return os(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!Pn(a))return;const c=ns(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function Wf(t){const e=t.filter(o=>o.time&&typeof o.body.id=="string"),n=new Set(e.map(o=>o.time.start));if(!(e.length<2||n.size!==e.length))return e.sort((o,r)=>o.time.start-r.time.start).map(o=>{const r=Number(o.body.duration)||(o.time.end!==void 0?o.time.end-o.time.start:void 0);return{src:o.body.id,...o.body.format?{format:o.body.format}:{},start:o.time.start,...r?{duration:r}:{}}})}function os(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Sr(t),a=Math.min(e[Cn(t)]??0,Math.max(0,i.length-1));dc(t,(c,l,u)=>{const d=i.findIndex(g=>g.annotation===u);if(!o&&d>=0&&d!==a)return;const h=kr(c,e[l]??0);if(!h)return;const p=u.target?an(u.target):void 0,m=p==null?void 0:p.rect;n(h,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(h.body.width)||0,height:s||Number(h.body.height)||0},d,p==null?void 0:p.t)})}function fc(t){return hc(t).filter(e=>e.kind!=="transcript")}function Uf(t){const e=D(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function hc(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(D(r.motivation).includes("supplementing"))for(const s of D(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?D(i.items):[i];for(const c of a){const l=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof l=="string"&&/\.vtt(\?|$)/i.test(l))||typeof l!="string"||e.push({id:l,label:c.label,language:D(c.language)[0],kind:Uf(r)})}}return e}function jf(t){const e=[],n=r=>{const s=r,i=s==null?void 0:s.id;if(typeof i!="string"||e.some(c=>c.id===i))return;const a=s==null?void 0:s.format;(a?a!=="text/plain":!/\.txt(\?|$)/i.test(i))||e.push({id:i,label:s==null?void 0:s.label,language:D(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(D(s.motivation).includes("supplementing"))for(const i of D(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?D(a.items):[a]).forEach(n)}return D(t.rendering).forEach(n),e}function kr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=D(n.items);return kr(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=D(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=kr({type:"Image",...o});if(!s)return null;const i=(r==null?void 0:r.rotation)!=null?String(r.rotation):void 0;return{...s,region:(r==null?void 0:r.region)||s.region,...i?{rotation:i}:{}}}return n.type!=="Image"&&n.type!=="Video"&&!Pn(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function Vf(t,e,n={},{standIns:o=true}={}){const r=Rf(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const u=r[l],d=rn(c),h=u.width/d.width,p=u.height/d.height,m=x=>({x:u.x+x.x*h,y:u.y+x.y*p,width:x.width*h,height:x.height*p}),g=uo(c,n),b=lo(c,n,{allFrames:true}).map(x=>({...x,canvas:c})),v=uc(c);if(o&&!b.length&&g.some(x=>x.kind==="audio")&&v){const x=rn(v);for(const k of lo(v))b.push({...k,canvas:v,target:{x:k.target.x/x.width*d.width,y:k.target.y/x.height*d.height,width:k.target.width/x.width*d.width,height:k.target.height/x.height*d.height}})}const w=n[Cn(c)]??0;b.forEach(({body:x,target:k,region:T,rotation:O,frame:z,canvas:J},tt)=>{var S;const Y=xo(x.service);if(!Y&&!x.id)return;const Z=`${J.id}|${tt}|${x.id??Y}|${T??""}|${O??""}`,C=!(Y&&T);if(s.push({id:Z,service:Y,url:x.id,width:C&&Number(x.width)||void 0,height:C&&Number(x.height)||void 0,region:T,...O?{rotation:O}:{},placement:m(k),...z!=null&&z!==w?{hidden:true}:{}}),z!=null){const N=a[S=Cn(c)]??(a[S]=[]);(N[z]??(N[z]=[])).push(Z)}});const[_]=g;if(_!=null&&_.body.id){const x=Wf(g),k=x?x[0]:void 0;i.push({id:`${c.id}|media|${_.body.id}`,kind:_.kind,src:(k==null?void 0:k.src)??_.body.id,format:k?k.format:_.body.format,placement:m(_.target),duration:x?Number(c.duration)||void 0:Number(_.body.duration??c.duration)||void 0,...x?{segments:x}:{},poster:qf(c),captions:fc(c)})}}),{images:s,media:i,placements:r,frames:a}}function qf(t){var e;return(e=pc(t))==null?void 0:e.source}const zv=1280;function pc(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=lo(e)[0])==null?void 0:c.body;if(!n)return;const o=xo(n.service),r=typeof n.id=="string"?n.id:void 0,s=o?{service:o,fallback:r}:r?{src:r}:void 0;if(!s)return;const{width:i,height:a}=rn(e);return{source:s,width:i,height:a}}function Kf(t,e,n){const o=rn(t),r=e.width/o.width,s=e.height/o.height;return{x:e.x+n.x*r,y:e.y+n.y*s,width:n.width*r,height:n.height*s}}const Zf=({hidden:t})=>{const{t:e,langOf:n}=Pt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...lt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void cc(r.currentTarget),type:"button",children:[f("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),o]})},mc="50%";function gc(t,e=mc,n=null){const[o,r]=H(()=>typeof IntersectionObserver>"u");return F(()=>{if(o||!t)return;const s=new IntersectionObserver(i=>{i.some(a=>a.isIntersecting)&&(r(true),s.disconnect())},{root:n,rootMargin:e});return s.observe(t),()=>s.disconnect()},[t,o,e,n]),o}function Gf(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>n(wo()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Xf(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{const r=wo();n(r===t||!!r&&ac(t)===r&&(r==null?void 0:r.querySelector(".clover-canvas"))===t)};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}class Yf extends re.Component{constructor(){super(...arguments);P(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f("div",{className:"clover-canvas-error",role:"alert",lang:"en",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",children:"Something went wrong"}),n.message&&f("span",{className:"clover-canvas-error-body",children:`Error message: ${n.message}`})]}):this.props.children}}function wn({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:Tt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const Jf={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function Qf({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Pt(),s=Jf[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...lt(r(s)),children:o(s)})})}function th({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...lt(e),children:t})})}function So(t,e,n=false,o){const r=le(),{hostLanguage:s}=Pt(void 0,o);if(n)return{props:{},node:null};const i=yo(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...lt(i),children:t})}}const eh=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function Qt(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function se(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function An(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function nh(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function ie(...t){return t.reduce((e,n)=>nh(e,n),eh)}function oh(t){const e=t.a*t.d-t.b*t.c;if(!e||!Number.isFinite(e))return null;const n=1/e;return{a:t.d*n,b:-t.b*n,c:-t.c*n,d:t.a*n,e:(t.c*t.f-t.d*t.e)*n,f:(t.b*t.e-t.a*t.f)*n}}function me(t,e){return{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function Hv(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(sh).join(",")})`}function rh(t,e,n,o=new Float32Array(9)){const r=2/e,s=-2/n;return o[0]=t.a*r,o[1]=t.b*s,o[2]=0,o[3]=t.c*r,o[4]=t.d*s,o[5]=0,o[6]=t.e*r-1,o[7]=t.f*s+1,o[8]=1,o}function sh(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function vc(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function rs(t){if(!t.length)return null;let e=1/0,n=1/0,o=-1/0,r=-1/0;for(const s of t)e=Math.min(e,s.x),n=Math.min(n,s.y),o=Math.max(o,s.x+s.width),r=Math.max(r,s.y+s.height);return{x:e,y:n,width:o-e,height:r-n}}function ih(t,e){return t.x<e.x+e.width&&e.x<t.x+t.width&&t.y<e.y+e.height&&e.y<t.y+t.height}function ko(t,e){const n=[me(t,{x:e.x,y:e.y}),me(t,{x:e.x+e.width,y:e.y}),me(t,{x:e.x,y:e.y+e.height}),me(t,{x:e.x+e.width,y:e.y+e.height})],o=n.map(a=>a.x),r=n.map(a=>a.y),s=Math.min(...o),i=Math.min(...r);return{x:s,y:i,width:Math.max(...o)-s,height:Math.max(...r)-i}}function gn(t,e,n){return Math.min(Math.max(t,e),n)}const er=t=>!!(t&&"overlays"in t),ah=pt(()=>import("./MediaBody-CataNonO.mjs")),ch=()=>import("./AnnotationState-BbwQqA1U.mjs"),lh=new Map,uh={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:lh,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},dh=pt(()=>import("./FrameAnimation-CE218DCr.mjs")),Ti=pt(()=>import("./PlaceBox-xrJ4CGdN.mjs")),fh=pt(()=>import("./Placeholder-B1AcizHL.mjs")),hh=pt(()=>import("./ControlsFade-BowtN96W.mjs")),ph=()=>true,mh=pt(()=>import("./Placeholder-B1AcizHL.mjs").then(({PlaceholderToggle:t})=>({default:t}))),Ii={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},gh={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},vh={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",Kt.zoomIn.keys,Kt.zoomOut.keys,Kt.reset.keys,Kt.rotateRight.keys,Kt.rotateLeft.keys].join(" ")},yh={description:"canvasKeysMedia",keys:[Kt.play.keys,"J L",Kt.mute.keys].join(" ")},bh={description:"canvasKeysAnnotations",keys:"Escape"},_h=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||yc(t.body,t.src).length>0?f(Yf,{children:f(wh,{...t})}):null},wh=t=>{var Ts,Is,Ps,Ls,As,Os;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:u,highContrast:d,instanceId:h,className:p,options:m,navigator:g=false,controls:b=true,collapseControls:v="auto",controlButtons:w,annotations:_,onReady:x,onViewportChange:k,onContentStateChange:T,onMediaElement:O,onCaptionChange:z,caption:J,onEnded:tt,chapters:Y,highlightedChapter:Z,onChapterHighlight:C,placeholder:S=true,children:N}=t,{t:j}=Pt(),G=R(null),[X,et]=H(null),xt=Gf(X),at=ts(X),ct=Xf(X),y=bo(et),E=zr(d),L=!!e.controlsVisibility,A=(e.controlsVisibility??ph)(L?X:null,m==null?void 0:m.hideDelay,G),[I,U]=H(false),V=gc(X),St=le(),[Q]=H(()=>h??`clover-canvas-${St}`),mt=R(null),[ht,Ht]=H(null),Lt=er(ht)?ht:null,[W,st]=H(null),nt=b===false?null:b===true?Ii:{...Ii,...b},[wt,Bt]=H("loading"),[ee,be]=H(false),[B,ut]=H(0),bt=R(x),De=R(k),ze=R(m);bt.current=x,De.current=k,ze.current=m;const ue=jr(r),Me=gt(()=>$f(o??[]),[o]),Rn=gt(()=>Df(Me),[Me]),[Mo,Bn]=H({}),Zt=gt(()=>({...Rn,...Mo}),[Rn,Mo]),ln=(M,K)=>Bn(vt=>({...vt,[M]:K})),$n=gt(()=>_==null?void 0:_.filter(M=>!M.layer||(Zt[M.layer.key]??0)===M.layer.item),[_,Zt]),Wt=(Ts=_==null?void 0:_.find(M=>M.layer&&M.annotation.id===t.selectedAnnotation))==null?void 0:Ts.layer;F(()=>{Wt&&(Zt[Wt.key]??0)!==Wt.item&&ln(Wt.key,Wt.item)},[Wt==null?void 0:Wt.key,Wt==null?void 0:Wt.item,t.selectedAnnotation]);const un=!!(nt!=null&&nt.information),de=!!(_!=null&&_.length),He=Ge(ch,de),[To,dn]=H(null),Nt=de&&To||uh,jt=gt(()=>{var vt,Ot;const M=(vt=_==null?void 0:_.find(Ut=>Ut.annotation.id===Nt.selected))==null?void 0:vt.annotation,K=(Array.isArray(M==null?void 0:M.body)?M==null?void 0:M.body:[M==null?void 0:M.body]).find(Ut=>(Ut==null?void 0:Ut.type)==="Feature");return M&&K?{id:String(M.id),feature:K,name:((Ot=K.properties)==null?void 0:Ot.label)??M.label}:null},[_,Nt.selected]),Te=jt?`${jt.id}:${t.refind??0}`:null,[Fn,Dn]=H(null),zn=Te!==null&&Fn!==Te,Ie=gt(()=>{var Ut,qe;const M=(o??[]).map(qt=>qt.navPlace).filter(Boolean),K=M.length?M:t.navPlace?[t.navPlace]:[];if(!K.length)return null;const vt=K.flatMap(qt=>(qt==null?void 0:qt.type)==="FeatureCollection"?qt.features??[]:(qt==null?void 0:qt.type)==="Feature"?[qt]:[]);if(!vt.length)return null;const Ot=vt.length===1?(qe=(Ut=vt[0])==null?void 0:Ut.properties)==null?void 0:qe.label:void 0;return{feature:{type:"FeatureCollection",features:vt},name:Ot??t.label}},[o,t.navPlace,t.label]),fn=`place-box-${Q}`,[q,ft]=H(false),[_e,rl]=H(false),Hn=R(Nt);Hn.current=Nt;const Wn=dt(()=>Hn.current.release(),[]),{comments:Io,listedCount:ps}=Nt,We=gt(()=>un?(o??[]).filter(M=>Xd(M)||Io.has(M.id)):[],[o,un,Io]),Po=`caption-${Q}`,[sl,ms]=H(false),Lo=sl&&We.length>0,gs=dt(M=>{var K;ms(false),M&&((K=document.getElementById(`information-${Q}`))==null||K.focus())},[Q]),Vt=gt(()=>(o??[]).find(M=>Sr(M).length)??null,[o]),il=Vt?Sr(Vt):Sh,Ft=gt(()=>o!=null&&o.length?Vf(o,ue,Zt,{standIns:o.length>1}):null,[o,ue,Zt]),al=gt(()=>yc(s,i,a),[s,i,a]),ot=(Ft==null?void 0:Ft.media[0])??null,vs=!L&&(ot==null?void 0:ot.kind)==="video",cl=L||vs,ll=L?A:I,ul=gt(()=>{if(o!=null&&o.length)return Hf(o,Zt);const M=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(M==null?void 0:M.type)=="string"?M.type.toLowerCase():i?"image":void 0},[o,Zt,s,i]),[$t,dl]=H(null),Un=R(O);Un.current=O;const fl=dt(M=>{var K;dl(M),(K=Un.current)==null||K.call(Un,M)},[]),we=Ft?Ft.images:al,xe=!!ot&&(o==null?void 0:o.length)===1,Se=xe&&(ot==null?void 0:ot.kind)==="audio",hl=xe&&(ot==null?void 0:ot.kind)==="video",Ue=(o==null?void 0:o.length)===1&&!ot&&!Vt&&we.length===0,jn=!xe&&!Ue&&((Is=m==null?void 0:m.gestures)==null?void 0:Is.navigable)!==false,fe=o?`${n??""}
|
|
2
|
-
${o.map(M=>M.id).join("|")}`:null,je=gt(()=>{if(!o||!S)return[];const M=o.flatMap(K=>{const vt=pc(K),Ot=yt(K.label,u);return vt?[{...vt,alt:Ot.text,lang:Ot.lang}]:[]});return ue==="right-to-left"||ue==="bottom-to-top"?M.reverse():M},[o,ue,S,u]),[pl,ys]=H(false),[ml,bs]=H(null),Et=!Se&&je.length>0&&(ot?ml!==fe:!pl),_s=(M,{annotations:K=false,fullPage:vt=false}={})=>({...M,zoom:false,rotation:false,reset:false,fullPage:vt&&M.fullPage,annotations:K&&M.annotations}),hn=Ue&&at,ws=re.Children.count(N)>0,Ao=je.length>0&&!Se&&!ot,pn=nt?Et?We.length||ws||ps||ot&&(Y!=null&&Y.length)?_s(nt,{annotations:true}):null:xe||Ue?Me.length||We.length||ws||ps||ot&&(Y!=null&&Y.length)||hn&&nt.fullPage?_s(nt,{annotations:true,fullPage:hn}):null:nt:null,Oo=g&&!Et&&(ot?ot.kind==="audio"&&!xe&&we.length>0:true),[No,gl]=H(null),Ve=ot?No??ot.placement:null,[Vn,vl]=H(kh),Ro=gt(()=>{const M=(ot==null?void 0:ot.kind)==="video"&&$t&&Ve?[...we,{id:ot.id,placement:Ve,width:Ve.width,height:Ve.height,media:{element:$t}}]:we;return Vn.length?[...M,...Vn]:M},[we,ot,$t,Ve,Vn]),xs=xe&&(ot==null?void 0:ot.kind)==="video"&&No?No:Ft?rs(Ft.placements):null,yl=JSON.stringify([we,xs,Ro.length!==we.length&&[ot==null?void 0:ot.id,Ve],Vn.map(M=>M.id)]),qn=R(null),Bo=R(false),$o=()=>{ot?bs(Et?fe:null):ys(Et),Et||Wn()},Kn=R(null),bl=M=>{if($t&&!Et){$t.currentTime=M;return}Kn.current=M,Et&&$o()};F(()=>{!$t||Kn.current===null||($t.currentTime=Kn.current,Kn.current=null)},[$t]);const Fo=Array.isArray(s)?s[0]:s,It=[c,(Ps=o==null?void 0:o[0])==null?void 0:Ps.label,Fo==null?void 0:Fo.label].map(M=>yt(M,u)).find(M=>M.text),_l=gt(()=>{const M=yt(l,u);return M.text&&M.text!==(It==null?void 0:It.text)?M:void 0},[l,u,It==null?void 0:It.text]),Ss=So((It==null?void 0:It.text)||j("canvasImage"),It?It.lang:y.langOf("canvasImage"),false,y.hostLanguage),Zn=Et?[]:[...jn?[vh]:[],...ot?[yh]:[],...de?[bh]:[]],ks=`keys-${Q}`,wl=jn&&!Et&&!y.langOf("canvasRoleDescription")?j("canvasRoleDescription"):void 0,Do=!!pn&&We.length>0,xl=Do&&We.map((M,K)=>yt(M.label,u).text?sc(Po,K):null).filter(Boolean).join(" ")||void 0,Cs=R({canvases:o,scene:Ft,canvasKey:fe});Cs.current={canvases:o,scene:Ft,canvasKey:fe};const Gn=R(null),zo=dt(()=>{const{canvases:M,scene:K,canvasKey:vt}=Cs.current;Gn.current=M&&K&&qn.current===vt?{key:vt,canvases:M,placements:K.placements}:null},[]),Sl=!o||((Ls=Gn.current)==null?void 0:Ls.key)===fe,mn=tc(()=>{const M=Gn.current,K=mt.current;if(!M||n==="loading")return null;const vt=$t&&$t.currentTime>0?$t.currentTime:null,Ot=!vt&&K&&er(K)?bc(K.getBounds(),M.canvases,M.placements):null,Ut=M.canvases.find(qe=>qe.id===(Ot==null?void 0:Ot.canvasId))??M.canvases[0];return Ut?Ga({manifestId:n,canvasId:Ut.id,type:Ut.type,region:Ot&&{x:Ot.rect.x,y:Ot.rect.y,w:Ot.rect.width,h:Ot.rect.height},time:vt}):null},T);F(()=>_r($t,mn),[$t,mn]),F(()=>{const M=G.current;if(!M)return;const K=e(M,ze.current),vt=er(K)?K:null;mt.current=K,Ht(K),K.setDismiss(Wn);const Ot=K.on("open",()=>{var he;Wo(false),zo(),mn(),Bt("ready"),ut(Xn=>Xn+1),vt&&((he=bt.current)==null||he.call(bt,xh(vt,()=>Gn.current,Xn=>{var Rs,Bs;const Ns=Hn.current.placed.find(Uo=>Uo.id===Xn);return Ns?(Hn.current.select(Ns),(Bs=Array.from(((Rs=vt.overlays)==null?void 0:Rs.container.querySelectorAll("[id]"))??[]).find(Uo=>Uo.id===Xn))==null||Bs.focus({preventScroll:true}),true):false})))}),Ut=K.on("change",()=>{Wo(false),zo(),mn(),Bt("ready"),ut(he=>he+1)}),qe=K.on("error",()=>{K.isOpen||Bt("error")}),qt=K.on("unloadable",he=>be(!!he)),Cl=K.on("viewport",()=>{var he;vt&&((he=De.current)==null||he.call(De,vt.getBounds())),mn()});return()=>{Ot(),Ut(),qe(),qt(),Cl(),K.dispose(),mt.current=null,Ht(null)}},[h,e,Wn,zo]),F(()=>{if(!(!Lt||!W))return Lt.attachNavigator(W)},[Lt,W]),F(()=>{if(!(!ht||!Ue))return ht.setGestures({navigable:false}),()=>ht.setGestures({})},[ht,Ue]);const Ho=R(false);F(()=>{var K;if(hn)return;const M=!document.activeElement||document.activeElement===document.body;Ho.current&&M&&((K=G.current)==null||K.focus()),Ho.current=false},[hn]),F(()=>{const M=mt.current;if(Et&&(Bo.current=true),!M||!V||Et)return;const K=qn.current!==null&&qn.current!==fe;(!M.isOpen||K)&&Bt("loading");const vt=xe||Bo.current&&M.isOpen||K;qn.current=fe,Bo.current=false,M.setImages(Ro,{world:xs??void 0,fit:vt})},[yl,h,$t,V,Et]);const Es=R(n),[kl,Wo]=H(false);Dt(()=>{var M;n!==Es.current&&(Es.current=n,(M=mt.current)==null||M.clear(),Wo(true),Bt("loading"))},[n]);const Ms=wt==="loading"&&Ro.length>0&&V&&!Et;return f(Tn.Provider,{value:y.hostLanguage,children:f("figure",{"aria-labelledby":xl,className:Tt("clover-canvas",p),"data-testid":"clover-canvas","data-status":wt,...Hr(E),"data-unloadable":ee||void 0,"data-has-navigator":Oo,"data-fullscreen":xt,"data-exit":ct||void 0,"data-controls":cl?ll?"visible":"hidden":void 0,"data-media":ul,"data-recording":ot?"":void 0,"data-player":Se?"":void 0,"data-animated":Vt?"":void 0,"data-navigable":jn,"data-placeholder":je.length&&!Se?Et:void 0,ref:y.ref,onFocus:M=>{Ho.current=hn&&M.target.id===`fullPage-${Q}`},onKeyDown:M=>{if(M.key==="Escape"&&Lo&&!M.defaultPrevented){M.preventDefault(),gs(false);return}if(M.key==="Escape"&&!M.defaultPrevented&&!M.currentTarget.querySelector(".clover-canvas-menu")&&Wn()){M.preventDefault();return}Vd(M,G.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(pn||Oo)&&ot&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),vs&&f(_t,{fallback:null,children:f(hh,{element:X,hideDelay:m==null?void 0:m.hideDelay,picture:G,onChange:U})}),f(Zf,{hidden:!ct}),ht&&(pn||Ao)&&f(xf,{renderer:Lt,instance:Q,config:pn??gh,controlButtons:w,placeholderIsMore:Ao&&!ot,chapters:ot?Y:void 0,mediaElement:$t,onChapter:bl,request:m==null?void 0:m.request,placeholder:Ao&&f(_t,{fallback:null,children:f(mh,{instance:Q,media:!!ot,active:Et,onToggle:$o,more:!!nt&&(nt.zoom||nt.rotation||nt.reset||nt.fullPage)})}),fit:!L,more:v,choices:Et?[]:Me,selections:Zt,onSelect:ln,annotations:Nt.menu,hiddenPages:Nt.hiddenPages,onPageVisibilityChange:Nt.setPagesVisible,selectedAnnotation:Nt.selected,onAnnotationSelect:Nt.select,onAnnotationActivate:Nt.activate,captionId:Do?Po:void 0,captionOpen:Lo,onCaptionToggle:()=>ms(M=>!M),placeId:Ie?fn:void 0,placeOpen:q,onPlaceToggle:()=>{rl(true),ft(M=>!M)},language:u,children:pn&&N}),Oo&&f("div",{ref:st,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:G,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:de?"group":"img","aria-roledescription":wl,...Ss.props,"aria-describedby":Zn.length?ks:void 0,"aria-keyshortcuts":Zn.map(({keys:M})=>M).join(" ")||void 0,"aria-busy":Ms,tabIndex:0}),Ss.node,Zn.length>0&&f("span",{id:ks,style:nn,children:Zn.map(({description:M},K)=>f(re.Fragment,{children:[K>0&&" ",f("span",{...lt(y.langOf(M)),children:j(M)})]},M))}),f(Qf,{kind:"image",shown:ee&&!Et}),Ue&&!Et&&(It==null?void 0:It.text)&&f(th,{text:It.text,lang:It.lang||void 0}),(ot==null?void 0:ot.kind)==="audio"&&!Se&&we.length===0&&!Et&&(It==null?void 0:It.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...lt(It.lang||void 0),children:It.text}),je.length>0&&!Se&&f(_t,{fallback:null,children:f(fh,{instance:Q,stills:je,vertical:ue==="top-to-bottom"||ue==="bottom-to-top",media:!!ot,active:Et,lingering:wt==="loading"&&!kl,onToggle:$o,request:m==null?void 0:m.request})}),ht&&ot&&V&&!Et&&f(_t,{fallback:null,children:f(ah,{media:ot,request:m==null?void 0:m.request,fillable:hl,surface:ht,instance:Q,onElement:fl,onFit:gl,onCaptionChange:z,caption:J,navigable:jn,fullscreen:xe&&!!(nt!=null&&nt.fullPage),isFullscreen:at,onEnded:tt,chapters:Y,highlightedChapter:Z,onChapterHighlight:C,autoPlay:!Se&&je.length>0&&Nt.quietlyOpened!==fe,language:u,notes:Nt.timed,player:Se&&o?{canvas:o[0],title:It,partOf:_l}:void 0})}),Lt&&Vt&&(Ft==null?void 0:Ft.frames[Cn(Vt)])&&!Et&&f(_t,{fallback:null,children:f(dh,{renderer:Lt,frames:il,byFrame:Ft.frames[Cn(Vt)],animationKey:Vt.id,sceneVersion:B,autoplay:(As=m==null?void 0:m.animation)==null?void 0:As.autoplay,loop:(Os=m==null?void 0:m.animation)==null?void 0:Os.loop,onEnded:tt,language:u,duration:Number(Vt.duration),canvas:Vt,place:Ft.placements[o.indexOf(Vt)],onItems:vl},Vt.id)}),He&&de&&_&&f(He.AnnotationState,{given:t,annotations:$n??_,scene:Ft,renderer:Lt,sceneVersion:B,drawn:Sl,media:ot,mediaElement:$t,showPlaceholder:Et,canvasKey:fe,openImages:ys,openMedia:bs,host:G,onModel:dn,refind:t.refind??0}),Ms&&f(wn,{overlay:true}),jt&&f(_t,{fallback:null,children:f(Ti,{id:`place-of-${Q}`,open:zn,onClose:M=>{var K;Dn(Te),M&&((K=document.getElementById(jt.id))==null||K.focus())},feature:jt.feature,name:jt.name,language:u})}),Ie&&_e&&f(_t,{fallback:null,children:f(Ti,{id:fn,open:q,onClose:M=>{var K;ft(false),M&&((K=document.getElementById(`place-${Q}`))==null||K.focus())},feature:Ie.feature,name:Ie.name,language:u})}),Do&&f(Yd,{id:Po,canvases:We,comments:Io,open:Lo,onClose:gs,language:u})]})})};function xh(t,e,n){return{fitCanvasRect(o,r,s){const i=e(),a=(i==null?void 0:i.canvases.findIndex(c=>c.id===o))??-1;return!i||a===-1?false:(t.fitBounds(Kf(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?bc(t.getBounds(),o.canvases,o.placements):null},get backendKind(){return t.backendKind},get atHome(){return t.isAtHome},fitBounds:(o,r)=>t.fitBounds(o,r),fitItemRect:(o,r,s)=>t.fitItemRect(o,r,s),itemRectToWorld:(o,r)=>t.itemRectToWorld(o,r),getBounds:()=>t.getBounds(),getHomeBounds:()=>t.getHomeBounds(),getCamera:()=>t.getCamera(),home:o=>t.home(o),zoomBy:(o,r,s)=>t.zoomBy(o,r,s),panBy:(o,r,s)=>t.panBy(o,r,s),setRotation:(o,r)=>t.setRotation(o,r),getRotation:()=>t.getRotation(),rotateBy:o=>t.rotateBy(o),worldToScreenPoint:o=>t.worldToScreenPoint(o),screenToWorldPoint:o=>t.screenToWorldPoint(o),on:(o,r)=>t.on(o,r),zoomToAnnotation:n}}const Sh=[],kh=[];function yc(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=xo(s.service);return!a&&!s.id?null:{id:`${i}:${s.id??a}|${s.region??""}`,service:a,url:s.id,width:s.width,height:s.height,region:s.region}}).filter(s=>s!==null):(Array.isArray(e)?e:e?[e]:[]).filter(Boolean).map((s,i)=>({id:`${i}:${s}`,...n?{service:s}:{url:s}}))}function bc(t,e,n){let o=null;if(n.forEach((d,h)=>{const p=Math.max(t.x,d.x),m=Math.max(t.y,d.y),g=Math.min(t.x+t.width,d.x+d.width)-p,b=Math.min(t.y+t.height,d.y+d.height)-m;if(g<=0||b<=0)return;const v=g*b;(!o||v>o.area)&&(o={index:h,area:v,clip:{x:p,y:m,width:g,height:b}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=rn(i),l=c.width/a.width,u=c.height/a.height;return{canvasId:i.id,rect:{x:Math.round((s.x-a.x)*l),y:Math.round((s.y-a.y)*u),width:Math.round(s.width*l),height:Math.round(s.height*u)}}}function Ch(t,e,n,o){return gt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=yt(r.label,n);return{...r.id?{id:r.id}:{},label:s.text,lang:s.lang,start:r.start,end:r.end,...r.thumbnail?{thumbnail:r.thumbnail}:{}}}),[t,e,n,o])}function Eh(t,e,n,o){if(t.region){if(!e)return false;const{x:r,y:s,w:i,h:a}=t.region;if(!e.fitCanvasRect(t.canvasId,{x:r,y:s,width:i,height:a},true))return false}if(o&&(t.time!==void 0||t.autoplay)){if(!n)return false;const r=()=>{t.time!==void 0&&(n.currentTime=t.time),t.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?r():n.addEventListener("loadedmetadata",r,{once:true})}return true}function Mh(t,e){const n=t.store.get().manifest;if(e.canvasId&&At(n).canvases.some(r=>r.id===e.canvasId))t.goTo(e.canvasId);else if(e.manifestId&&e.manifestId!==(n==null?void 0:n.id))t.goToManifest(e.manifestId,e.canvasId);else return false;return true}function _c(t){if(typeof t=="string")return Pi(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?Pi(e.id):e}const Pi=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function wc(t){const e=D(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const Li=new WeakMap,Ai=[];function Th(t,e,n){if(!t||!e)return Ai;let o=Li.get(t);o||Li.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=u=>{if(!u||a.has(u.id??u))return;a.add(u.id??u);const d=!D(u.behavior).includes("no-nav");for(const h of D(u.items)){if((h==null?void 0:h.type)==="Range"){c(h);continue}if(!d)continue;const p=an(_c(h));if(p.id.split("#")[0]!==e)continue;const m=ns(p.t);m&&i.push({...u.id?{id:u.id}:{},label:u.label,...m,...wc(u)})}};for(const u of D(t.structures))c(u);i.sort((u,d)=>u.start-d.start);const l=i.length?i.map((u,d)=>{var h;return{...u,end:u.end??((h=i[d+1])==null?void 0:h.start)??n}}):Ai;return o.set(r,l),l}const Oi=new WeakMap,Ni=[];function Ih(t){if(!t)return Ni;const e=Oi.get(t);if(e)return e;const n=new Map(D(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var w,_;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],u=[],d=[];let h;for(const x of D(c.items))if((x==null?void 0:x.type)==="Range"){const k=r(x);l.push(...k),k.forEach(T=>u.push(...T.canvasIds))}else{const k=an(_c(x));if(!k.id)continue;h??(h=k),u.push(k.id),d.push(k)}const p=D(c.behavior);if(p.includes("no-nav"))return l;const m=h??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((w=l[0])==null?void 0:w.canvasId),canvasIds:[...new Set(u)],...p.includes("sequence")?{sequence:true}:{},...wc(c),children:l},b=ns(m==null?void 0:m.t);return b?g.time=b:!m&&((_=l[0])!=null&&_.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(p.includes("sequence")&&d.length>1&&!d.some(x=>x.t)||Ph(d,n))&&(g.parts=d.map(x=>({canvasId:x.id,...x.rect?{region:x.rect}:{}}))),[g]},s=D(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:Ni;return Oi.set(t,a),a}function Ph(t,e){return!t.length||t.some(n=>n.t)?false:t.some(n=>n.rect)?true:t.some((n,o)=>o>0&&e.get(n.id)!==(e.get(t[o-1].id)??NaN)+1)}function Wv(t,e,n,o){let r=null,s=null;const i=(l,u,d)=>!l||d>l.depth||d===l.depth&&!(l.sequence&&u.sequence),a=(l,u,d)=>{const h=d||l.id===o;if(e&&l.canvasIds.includes(e)&&(!l.time||n!==void 0&&n>=l.time.start&&(l.time.end===void 0||n<l.time.end))){const m={id:l.id,depth:u,...l.sequence?{sequence:true}:{}};i(r,l,u)&&(r=m),h&&i(s,l,u)&&(s=m)}l.children.forEach(p=>a(p,u+1,h))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function Lh(){const t=rt(n=>n.status),e=rt(n=>n.error);return gt(()=>({status:t,error:e}),[t,e])}function Ah(){return rt(t=>t.manifest)}function xc(){return rt(t=>At(t.manifest))}function ss(){return rt(t=>Re(t.manifest,t.canvasId))}function Oh(){return rt(t=>$e(t.manifest,t.canvasId))}function Nh(){const{clover:t}=ce("useNavigation"),e=rt(o=>Ln(o.manifest,o.canvasId)),n=rt(o=>At(o.manifest).views.length);return gt(()=>Md(t,e,n),[t,e,n])}function Rh(){return rt(t=>qa(t.manifest,t.addedSets))}function Uv(t){const{language:e}=ce("useLocalized");return gt(()=>yt(t,e),[t,e])}function jv(){return Pt().t}function Vv(){return Pt().langOf}const Bh=({options:t,onReady:e,onViewportChange:n,onMediaElement:o,onCaptionChange:r,caption:s,onEnded:i,placeholder:a=true,label:c,partOf:l,language:u,annotations:d,chapters:h,...p})=>{const m=ce("Canvas"),{clover:g}=m,b=Jt(g.captions.subscribe,g.captions.get,g.captions.get),v=s??b,w=u??m.language,_=ss(),{direction:x}=xc(),k=Ah(),T=Oh(),O=rt(B=>{var ut;return B.status==="loading"?"loading":((ut=B.manifest)==null?void 0:ut.id)??""}),z=rt(B=>B.target),J=rt(B=>Ka(B.manifest,B.addedSets,B.search.set,B.regions)),tt=rt(B=>ad(B.manifest,B.addedSets,B.hiddenSets,B.shownSets)),Y=rt(B=>Zr(B.manifest,B.addedSets,B.hiddenSets,B.shownSets)),Z=rt(B=>B.annotationId),C=R(Z);C.current=Z;const[S,N]=H(0);F(()=>g.found.subscribe(B=>{B&&B===C.current&&N(ut=>ut+1)}),[g]);const j=Jt(g.highlight.subscribe,g.highlight.get,g.highlight.get),G=Jt(g.chapter.subscribe,g.chapter.get,g.chapter.get),X=_.map(B=>B.id).join("|"),et=gt(()=>{if(d)return d;const B=_.map(ut=>ut.id);return J.flatMap(ut=>ut.entries.filter(bt=>B.includes(bt.canvasId)).map(bt=>({annotation:bt.annotation,targetIndex:B.indexOf(bt.canvasId),pageId:ut.id,...ut.label?{pageLabel:ut.label}:{},...bt.place?{place:bt.place}:{},...bt.layer?{layer:{key:bt.layer.key,item:bt.layer.item}}:{}})))},[d,J,_]),at=z?(B=>!!B&&_.some(ut=>ut.id===B))(z.canvasId):false,ct=R(null);at&&(ct.current=X);const y=a&&ct.current!==X,E=R(null),L=R(null),$=gt(()=>_.some(B=>uo(B).length>0),[_]),A=$?_.find(B=>uo(B).length>0):void 0,I=Ch(k,A,w,Th),U=R($);U.current=$;const V=s===void 0?m.language:void 0,St=A==null?void 0:A.id;F(()=>{if(!V||!A)return;const B=fc(A).find(ut=>ut.language&&Ba(ut.language,V));B&&g.captions.get()!==B.id&&g.captions.emit(B.id)},[V,St,g]);const Q=dt(()=>{const B=g.store.get().target;!B||!g.store.get().canvasId||Eh(B,E.current,L.current,U.current)&&g.consumeTarget()},[g]),mt=R(X);F(()=>{mt.current!==X&&(mt.current=X,L.current=null),z&&Q()},[z,X,Q]);const ht=R(e);ht.current=e;const Ht=dt(B=>{var ut;E.current=B,B.on("change",Q),Q(),(ut=ht.current)==null||ut.call(ht,B)},[Q]),Lt=dt(B=>{var bt;const ut=(bt=E.current)==null?void 0:bt.getCanvasRegion();g.viewport.emit(ut?{canvasId:ut.canvasId,region:{x:ut.rect.x,y:ut.rect.y,w:ut.rect.width,h:ut.rect.height}}:null),n==null||n(B)},[g,n]),W=dt(B=>{L.current=B,g.media.emit(B),B&&Q(),o==null||o(B)},[g,Q,o]),st=dt(()=>{i==null||i(),(Pe(k,"auto-advance")||Pe(T,"auto-advance"))&&g.next({autoplay:true,wrap:Pe(k,"repeat")})},[g,k,T,i]),nt=dt(B=>void Mh(g,B),[g]),wt=(t==null?void 0:t.request)??g.request,Bt=Pe(T,"auto-advance")||Pe(k,"auto-advance"),ee=Pe(T,"repeat")||Pe(k,"repeat"),be=gt(()=>({...t,request:wt,animation:(t==null?void 0:t.animation)??{autoplay:Bt,loop:ee}}),[t,wt,Bt,ee]);return _.length?f(_h,{...p,manifestId:O,navPlace:k==null?void 0:k.navPlace,canvases:_,viewingDirection:x,language:w,label:c??(T==null?void 0:T.label)??(k==null?void 0:k.label),partOf:l??(k==null?void 0:k.label),options:be,placeholder:y,onReady:Ht,onViewportChange:Lt,onMediaElement:W,caption:v,onCaptionChange:B=>{g.captions.emit((B==null?void 0:B.id)??null),r==null||r(B)},onEnded:st,annotations:et,hiddenPages:Y,unlistedPages:tt,onPageVisibilityChange:(B,ut)=>B.forEach(bt=>g.setSetVisible(bt,ut)),chapters:h??I,highlightedChapter:G,onChapterHighlight:B=>g.chapter.emit(B),selectedAnnotation:Z,refind:S,highlightedAnnotation:j,onAnnotationSelect:B=>g.selectAnnotation(B),onAnnotationLink:p.onAnnotationLink??nt,onAnnotationActive:B=>{var ut;g.highlight.emit(B),(ut=p.onAnnotationActive)==null||ut.call(p,B)}}):null},$h=6,Ze=new Set;function Fh(t){if(Ze.has(t))return true;for(;Ze.size>=$h;){let e;for(const n of Ze)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;Ze.delete(e),e.release()}return Ze.add(t),true}function Ri(t){Ze.delete(t)}function Dh(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function zh(t,e){if(!t.bleed)return{x:0,y:0};const n=t.transform,o=Math.hypot(n.a,n.b)*e,r=Math.hypot(n.c,n.d)*e;return{x:t.bleed.right&&o>0?1/o:0,y:t.bleed.bottom&&r>0?1/r:0}}const Hh=`#version 300 es
|
|
3
|
-
in vec2 a_position;
|
|
4
|
-
uniform mat3 u_matrix;
|
|
5
|
-
uniform vec4 u_crop;
|
|
6
|
-
out vec2 v_uv;
|
|
7
|
-
|
|
8
|
-
void main() {
|
|
9
|
-
vec3 clip = u_matrix * vec3(a_position, 1.0);
|
|
10
|
-
gl_Position = vec4(clip.xy, 0.0, 1.0);
|
|
11
|
-
v_uv = u_crop.xy + a_position * u_crop.zw;
|
|
12
|
-
}
|
|
13
|
-
`,Wh=`#version 300 es
|
|
14
|
-
precision highp float;
|
|
15
|
-
in vec2 v_uv;
|
|
16
|
-
uniform sampler2D u_texture;
|
|
17
|
-
uniform float u_opacity;
|
|
18
|
-
out vec4 outColor;
|
|
19
|
-
|
|
20
|
-
void main() {
|
|
21
|
-
outColor = texture(u_texture, v_uv) * u_opacity;
|
|
22
|
-
}
|
|
23
|
-
`;class fo{constructor(e,n,o){P(this,"kind","webgl2");P(this,"canvas");P(this,"maxTextureSize");P(this,"gl");P(this,"program",null);P(this,"vao",null);P(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});P(this,"textures",new Map);P(this,"cssWidth",1);P(this,"cssHeight",1);P(this,"pixelRatio",1);P(this,"matrixScratch",new Float32Array(9));P(this,"isLost",false);P(this,"callbacks");P(this,"handleLost",()=>{var e2,n2;this.isLost=true,this.textures.clear(),(n2=(e2=this.callbacks).onLost)==null||n2.call(e2)});this.canvas=e,this.gl=n,this.callbacks=o,this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)||4096;const r=Uh(n,Hh,Wh);this.program=r,this.uniforms={matrix:n.getUniformLocation(r,"u_matrix"),crop:n.getUniformLocation(r,"u_crop"),opacity:n.getUniformLocation(r,"u_opacity"),texture:n.getUniformLocation(r,"u_texture")};const s=n.createVertexArray();n.bindVertexArray(s);const i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),n.STATIC_DRAW);const a=n.getAttribLocation(r,"a_position");n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,false,0,0),n.bindVertexArray(null),this.vao=s,n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,false),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL),e.addEventListener("webglcontextlost",this.handleLost)}static create(e,n={}){let o=null;try{o=e.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{o=null}if(!o||typeof o.createShader!="function")return null;try{return new fo(e,o,n)}catch{return null}}resize(e,n,o){this.cssWidth=Math.max(1,e),this.cssHeight=Math.max(1,n),this.pixelRatio=o;const r=Math.max(1,Math.round(e*o)),s=Math.max(1,Math.round(n*o));this.canvas.width!==r&&(this.canvas.width=r),this.canvas.height!==s&&(this.canvas.height=s)}begin(){if(this.isLost)return;const e=this.gl;e.viewport(0,0,this.canvas.width,this.canvas.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.useProgram(this.program),e.bindVertexArray(this.vao),e.activeTexture(e.TEXTURE0),e.uniform1i(this.uniforms.texture,0)}draw(e){if(this.isLost||!Dh(e.source))return"skipped";const n=this.gl,o=this.upload(e);if(o==="tainted")return"tainted";if(!o)return"skipped";const r=e.crop??{x:0,y:0,width:e.width,height:e.height},s=zh(e,this.pixelRatio),i=ie(e.transform,Qt(r.x,r.y),se(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,rh(i,this.cssWidth,this.cssHeight,this.matrixScratch)),n.uniform4f(this.uniforms.crop,r.x/e.width,r.y/e.height,r.width/e.width,r.height/e.height),n.uniform1f(this.uniforms.opacity,e.opacity),n.bindTexture(n.TEXTURE_2D,o.texture),n.drawArrays(n.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(e){return!this.isLost&&this.textures.has(e)}release(e){const n=this.textures.get(e);n&&(this.isLost||this.gl.deleteTexture(n.texture),this.textures.delete(e))}dispose(){var e;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const n of[...this.textures.keys()])this.release(n);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(e=this.gl.getExtension("WEBGL_lose_context"))==null||e.loseContext(),this.isLost=true}upload(e){const n=this.gl,o=this.textures.get(e.key);if(o&&o.width===e.width&&o.height===e.height)return o;const r=(o==null?void 0:o.texture)??n.createTexture();if(!r)return null;n.bindTexture(n.TEXTURE_2D,r);try{n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e.source)}catch(i){if(o||n.deleteTexture(r),jh(i))return"tainted";throw i}n.generateMipmap(n.TEXTURE_2D),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR_MIPMAP_LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);const s={texture:r,width:e.width,height:e.height};return this.textures.set(e.key,s),s}}function Uh(t,e,n){const o=Bi(t,t.VERTEX_SHADER,e),r=Bi(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(!s)throw new Error("Could not create WebGL program");if(t.attachShader(s,o),t.attachShader(s,r),t.linkProgram(s),t.deleteShader(o),t.deleteShader(r),!t.getProgramParameter(s,t.LINK_STATUS)){const i=t.getProgramInfoLog(s);throw t.deleteProgram(s),new Error(`Could not link WebGL program: ${i}`)}return s}function Bi(t,e,n){const o=t.createShader(e);if(!o)throw new Error("Could not create WebGL shader");if(t.shaderSource(o,n),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){const r=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error(`Could not compile WebGL shader: ${r}`)}return o}function jh(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function Sc(t,e){return ie(Qt(e.width/2,e.height/2),An(t.rotation),se(t.zoom),Qt(-t.x,-t.y))}function kc(t,e){return ie(Qt(t.x,t.y),se(1/t.zoom),An(-t.rotation),Qt(-e.width/2,-e.height/2))}function $i(t,e,n){return me(kc(t,e),n)}function Vh(t,e,n){return me(Sc(t,e),n)}function Cr(t,e){return ko(kc(t,e),{x:0,y:0,width:e.width,height:e.height})}function qh(t,e,n=0,o=0){const r=ko(An(n),t),s=Math.max(1,e.width*(1-o*2)),i=Math.max(1,e.height*(1-o*2)),a=Math.min(s/Math.max(r.width,Number.EPSILON),i/Math.max(r.height,Number.EPSILON)),c=vc(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function ho(t,e,n,o,r){const s=me(ie(se(1/n),An(-o)),{x:e.x-r.width/2,y:e.y-r.height/2});return{x:t.x-s.x,y:t.y-s.y}}function Kh(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const Zh=.09,Gh=1e-4,Fi=.05,Xh=1e-4;class Yh{constructor(e,n=Zh){P(this,"current");P(this,"target",null);P(this,"timeConstant");this.current={...e},this.timeConstant=n}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){if(o||this.timeConstant===0){this.set(e.state);return}let r=e.anchor;if(r){const s=ho(r.world,r.screen,e.state.zoom,e.state.rotation,n);Math.hypot(s.x-e.state.x,s.y-e.state.y)*e.state.zoom>Fi&&(r=void 0)}this.target={state:{...e.state},anchor:r}}stop(){this.target=null}step(e,n){const o=this.target;if(!o)return false;const r=1-Math.exp(-Math.max(e,0)/this.timeConstant),s=this.current,i=o.state,a=Math.exp(Math.log(s.zoom)+(Math.log(i.zoom)-Math.log(s.zoom))*r),c=s.rotation+(i.rotation-s.rotation)*r;let l;return o.anchor?l=ho(o.anchor.world,o.anchor.screen,a,c,n):l={x:s.x+(i.x-s.x)*r,y:s.y+(i.y-s.y)*r},this.current={x:l.x,y:l.y,zoom:a,rotation:c},Math.abs(Math.log(i.zoom/a))<Gh&&Math.abs(i.rotation-c)<Xh&&Math.hypot(i.x-l.x,i.y-l.y)*a<Fi?(this.current={...i},this.target=null,false):true}}const Cc=5,Di=300,Jh=Cc*4;function zi(t,e=false){return t==="touch"||t==="pen"&&!e}function Qh(t){return t.pointerType==="pen"&&t.buttons===0}function tp(t,e,n){for(let o=t;o&&o!==e;o=o.parentElement)if((n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(o).overflowY))return true;return false}function Hi(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const Er={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true},nr=2,Wi=1.5,Ui=.1,ep=100,np=200,op=.002,rp=.01;class sp{constructor(e,n,o=Er){P(this,"pointers",new Map);P(this,"samples",[]);P(this,"down",null);P(this,"pinch",null);P(this,"lastTap",null);P(this,"lastPointerType","");P(this,"penHovers",false);P(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||Hi(e2.target,this.element))return;(r=(o2=this.element).setPointerCapture)==null||r.call(o2,e2.pointerId);const n2=this.local(e2);this.pointers.set(e2.pointerId,n2),this.pointers.size===1?(this.down={x:n2.x,y:n2.y,t:e2.timeStamp,moved:false},this.samples=[{x:n2.x,y:n2.y,t:e2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});P(this,"onPointerMove",e2=>{var r;Qh(e2)&&(this.penHovers=true);const n2=this.pointers.get(e2.pointerId);if(!n2)return;const o2=this.local(e2);if(this.pointers.set(e2.pointerId,o2),this.pointers.size===1){const s=o2.x-n2.x,i=o2.y-n2.y;this.down&&Math.hypot(o2.x-this.down.x,o2.y-this.down.y)>Cc&&(this.down.moved=true),(r=this.down)!=null&&r.moved&&this.options.navigable&&this.target.panBy(s,i,false),this.samples.push({x:o2.x,y:o2.y,t:e2.timeStamp});const a=e2.timeStamp-ep;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const s=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(s.distance/this.pinch.distance,s.mid,false),this.target.panBy(s.mid.x-this.pinch.mid.x,s.mid.y-this.pinch.mid.y,false),this.pinch=s}});P(this,"onPointerUp",e2=>{var c,l,u,d,h,p;if(!this.pointers.has(e2.pointerId))return;if(this.pointers.delete(e2.pointerId),(l=(c=this.element).releasePointerCapture)==null||l.call(c,e2.pointerId),this.pointers.size===1){this.pinch=null;const[m]=this.pointers.values();this.samples=[{...m,t:e2.timeStamp}];return}if(this.pointers.size>0)return;const n2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!n2)return;const o2=this.local(e2);if(!n2.moved&&e2.type==="pointerup"&&e2.timeStamp-n2.t<Di){if((d=(u=this.target).dismiss)!=null&&d.call(u)){this.lastTap=null;return}if(zi(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<Di&&Math.hypot(o2.x-m.x,o2.y-m.y)<Jh?(this.lastTap=null,this.zoomIn(o2)):this.lastTap={x:o2.x,y:o2.y,t:e2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?e2.shiftKey?this.target.zoomBy(1/nr,o2,true):this.zoomIn(o2):(p=(h=this.target).tap)==null||p.call(h,o2);return}if(!this.options.navigable)return;const s=this.samples[0],i=this.samples[this.samples.length-1],a=((i==null?void 0:i.t)??0)-((s==null?void 0:s.t)??0);if(s&&i&&a>0&&e2.timeStamp-i.t<50){const m=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3;Math.hypot(m,g)>np&&this.target.flick(m,g)}});P(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||zi(this.lastPointerType,this.penHovers)||Hi(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/nr,this.local(e2),true):this.zoomIn(this.local(e2))))});P(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&tp(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=ip(e2),r=n2?rp:op;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});P(this,"onKeyDown",e2=>{if(e2.target!==this.element||!this.options.navigable||e2.altKey||e2.metaKey||e2.ctrlKey)return;const n2=this.element.getBoundingClientRect(),o2=n2.width*Ui*(e2.shiftKey?3:1),r=n2.height*Ui*(e2.shiftKey?3:1);switch(e2.key){case"ArrowLeft":this.target.panBy(o2,0,true);break;case"ArrowRight":this.target.panBy(-o2,0,true);break;case"ArrowUp":this.target.panBy(0,r,true);break;case"ArrowDown":this.target.panBy(0,-r,true);break;case"+":case"=":this.target.zoomBy(Wi,void 0,true);break;case"-":case"_":this.target.zoomBy(1/Wi,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}e2.preventDefault()});this.element=e,this.target=n,this.options=o,e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp),e.addEventListener("dblclick",this.onDoubleClick),e.addEventListener("wheel",this.onWheel,{passive:false}),e.addEventListener("keydown",this.onKeyDown)}setOptions(e){this.options=e}dispose(){const e=this.element;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("dblclick",this.onDoubleClick),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown)}local(e){const n=this.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}zoomIn(e){var n,o;(o=(n=this.target).atMaxZoom)!=null&&o.call(n)?this.target.home():this.target.zoomBy(nr,e,true)}pinchState(){const[e,n]=[...this.pointers.values()];return{distance:Math.hypot(n.x-e.x,n.y-e.y),mid:{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}}}function ip(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class Ec extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const ji=new Set;async function ap(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=dd(r),i=lp(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return or(t,{signal:n,cors:true,withCredentials:s});if(i&&ji.has(i))return or(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await Xr(r,t,{mode:"cors",signal:n})}catch(h){if(up(h,n))throw h;const p=await or(t,{signal:n,cors:false,withCredentials:s});return i&&ji.add(i),p}if(!a.ok)throw new Ec(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await cp(c);const u=l.width,d=l.height;if(o&&(l.width>o||l.height>o)){const h=o/Math.max(l.width,l.height),p=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*h)),resizeHeight:Math.max(1,Math.floor(l.height*h)),resizeQuality:"high"});l.close(),l=p}if(n!=null&&n.aborted)throw l.close(),Mr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:u,naturalHeight:d,opaque:false}}async function cp(t){const e={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(t,e)}catch(n){if(n instanceof TypeError)return createImageBitmap(t);throw n}}function or(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Mr());return}const i=new Image;i.decoding="async",n&&(i.crossOrigin=o?"use-credentials":"anonymous");const a=()=>{i.onload=null,i.onerror=null,e==null||e.removeEventListener("abort",c)},c=()=>{a(),i.src="",s(Mr())};e==null||e.addEventListener("abort",c),i.onload=()=>{a();const l=()=>r({kind:"element",source:i,width:i.naturalWidth,height:i.naturalHeight,naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight,opaque:!n});typeof i.decode=="function"?i.decode().then(l,l):l()},i.onerror=()=>{a(),s(new Ec("Image failed to load",t))},i.src=t})}function lp(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function up(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Mr(){const t=new Error("Aborted");return t.name="AbortError",t}function Vi(t){t.kind==="bitmap"&&t.source.close()}const dp=192*1024*1024,fp=6,hp=2;class pp{constructor(e){P(this,"entries",new Map);P(this,"inFlight",0);P(this,"frame",0);P(this,"bytes",0);P(this,"wanted",[]);P(this,"disposed",false);P(this,"budget");P(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??dp,this.maxInFlight=e.maxInFlight??fp}get(e){const n=this.entries.get(e);if((n==null?void 0:n.state)==="ready")return n.lastUsed=this.frame,n.image}has(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="ready"}failed(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(e,n){var r;const o=this.entries.get(e);(o==null?void 0:o.state)!=="ready"&&((r=o==null?void 0:o.controller)==null||r.abort(),this.entries.set(e,{url:e,state:"ready",image:n,bytes:rr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=rr(n),this.flushWaiters(e))}prefetch(e){return Promise.all(e.map(n=>new Promise(o=>{const r=this.entries.get(n.url);if(r&&r.state!=="loading")return o();if(r){r.waiters.push(o);return}this.start({...n,priority:-1},o)}))).then(()=>{})}update(e){if(this.disposed)return;this.frame++;const n=new Set(e.map(o=>o.url));this.wanted=[...e].sort((o,r)=>o.priority-r.priority);for(const o of this.entries.values())o.state==="loading"&&!o.pinned&&!n.has(o.url)&&o.controller&&(o.controller.abort(),this.entries.delete(o.url),this.inFlight--);for(const o of this.wanted){const r=this.entries.get(o.url);r&&(r.lastUsed=this.frame)}this.pump(),this.evict(n)}dispose(){var e;this.disposed=true;for(const n of this.entries.values())(e=n.controller)==null||e.abort(),this.flushWaiters(n.url);this.entries.clear(),this.bytes=0}forEachReady(e){for(const n of this.entries.values())n.state==="ready"&&n.image&&e(n.url,n.image)}pump(){for(const e of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(e.url)||this.start(e)}}start(e,n){const o=new AbortController,r={url:e.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:o,pinned:!!n,waiters:n?[n]:[]};this.entries.set(e.url,r),this.inFlight++,this.attempt(r,e,o,e.url)}attempt(e,n,o,r){e.attempts++,this.options.load(r,o.signal).then(s=>{if(this.disposed||this.entries.get(e.url)!==e){Vi(s);return}e.state="ready",e.image=s,e.bytes=rr(s),e.controller=void 0,e.pinned=false,this.bytes+=e.bytes,this.settle(e)},s=>{if(!(o.signal.aborted||this.disposed)&&this.entries.get(e.url)===e){if(e.attempts<hp&&!mp(s,n)){this.attempt(e,n,o,n.fallbackUrl??n.url);return}e.state="failed",e.controller=void 0,e.pinned=false,this.settle(e)}})}settle(e){this.inFlight--,this.flushWaiters(e.url),this.options.onSettled(),this.pump()}flushWaiters(e){const n=this.entries.get(e);if(!n)return;const o=n.waiters;n.waiters=[],o.forEach(r=>r())}evict(e){if(this.bytes<=this.budget)return;const n=[...this.entries.values()].filter(o=>o.state==="ready"&&!e.has(o.url)).sort((o,r)=>o.lastUsed-r.lastUsed);for(const o of n){if(this.bytes<=this.budget)break;this.entries.delete(o.url),this.bytes-=o.bytes,o.image&&Vi(o.image),this.options.onEvict(o.url)}}}function rr(t){return t.width*t.height*4}function mp(t,e){if(e.fallbackUrl)return false;const n=t==null?void 0:t.status;return typeof n=="number"&&n>=400&&n<500&&n!==408&&n!==429}const gp=.1;class vp{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){P(this,"handle",0);P(this,"last",0);P(this,"disposed",false);P(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,gp):1/60;this.last=e2,this.tick(n2,e2)?this.invalidate():this.last=0});this.tick=e,this.raf=n,this.caf=o}invalidate(){this.disposed||this.handle||(this.handle=this.raf(this.frame))}drawNow(){this.disposed||(this.handle&&this.caf(this.handle),this.frame(performance.now()))}dispose(){this.disposed=true,this.handle&&this.caf(this.handle),this.handle=0}}const yp=2*1024*1024;function bp(t,e,n=yp){const o=new Set;let r=n,s=false;return{get deferred(){return s},getTile(i){const a=t(i);if(!a||a.kind==="media"||a.opaque||o.has(i)||e(i))return a;const c=a.width*a.height*4;if(o.size>0&&c>r){s=true;return}return r-=c,o.add(i),a}}}function _p(t){const e=/^(!)?(\d+(?:\.\d+)?)$/.exec((t==null?void 0:t.trim())??"");if(!e)return null;const n=Number(e[2]);if(n>360)return null;const o=n%360,r=!!e[1];return o||r?{degrees:o,mirror:r}:null}function wp(t,e,n){if(!t)return null;let o=t.trim().replace(/^xywh=/,""),r=false;o.startsWith("pct:")?(r=true,o=o.slice(4)):o.startsWith("pixel:")&&(o=o.slice(6));const s=o.split(",").map(Number);if(s.length!==4||s.some(m=>!Number.isFinite(m)))return null;let[i,a,c,l]=s;r&&(i=i/100*e,a=a/100*n,c=c/100*e,l=l/100*n);const u=Math.max(0,i),d=Math.max(0,a),h=Math.min(e,i+c),p=Math.min(n,a+l);return h<=u||p<=d?null:{x:u,y:d,width:h-u,height:p-d}}const sr=512,xp=16e6;function Mc(t,e,n){return{width:e,height:n,levels:[{scaleFactor:1,width:e,height:n,tileWidth:e,tileHeight:n,cols:1,rows:1}],tile:r=>({...r,url:t,region:{x:0,y:0,width:e,height:n}})}}function Sp(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(h,p,m)=>{const g=Math.ceil(e/h),b=Math.ceil(n/h);return{scaleFactor:h,width:g,height:b,tileWidth:p,tileHeight:m,cols:Math.ceil(g/p),rows:Math.ceil(b/m)}},i=(h,p)=>({scaleFactor:e/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const h of a.scaleFactors)o.push(s(h,a.width,a.height));else if(r)for(let h=1;;h*=2){const p=s(h,sr,sr);if(o.push(p),p.cols===1&&p.rows===1)break}const c=Math.max(0,...o.map(h=>h.scaleFactor));for(const h of t.sizes){const p=e/h.width;kp(t,h.width,h.height)&&p>c+1e-9&&o.push(i(h.width,h.height))}const l=o.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const h=Math.max(e,n)/sr;o.push(i(Math.ceil(e/h),Math.ceil(n/h)))}(!o.length||!a&&!r&&e*n<=xp)&&(o.some(h=>h.scaleFactor===1)||o.push(i(e,n)));const u=Cp(o).sort((h,p)=>p.scaleFactor-h.scaleFactor),d=If(t);return{width:e,height:n,levels:u,tile(h){const p=u[h.level],m=p.scaleFactor,g=p.cols===1&&p.rows===1;let b,v,w;if(g)b={x:0,y:0,width:e,height:n},v=p.width,w=p.height;else{const _=Math.round(h.col*p.tileWidth*m),x=Math.round(h.row*p.tileHeight*m);b={x:_,y:x,width:Math.min(Math.round(p.tileWidth*m),e-_),height:Math.min(Math.round(p.tileHeight*m),n-x)},v=Math.ceil(b.width/m),w=Math.ceil(b.height/m)}return{...h,region:b,url:co(t,b,v,w),fallbackUrl:d?co(t,b,v,w,d):void 0}}}}function kp(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Cp(t){const e=new Map;for(const n of t){const o=`${n.width}x${n.height}`,r=e.get(o);(!r||r.cols*r.rows<n.cols*n.rows)&&e.set(o,n)}return[...e.values()]}function Ep(t,e){const n=t.levels;for(let o=0;o<n.length;o++)if(n[o].scaleFactor<=e*(1+1e-6))return o;return n.length-1}function ke(t,e,n){const o=t.levels[e],r=o.tileWidth*o.scaleFactor,s=o.tileHeight*o.scaleFactor,i=Math.max(0,n.x),a=Math.max(0,n.y),c=Math.min(t.width,n.x+n.width),l=Math.min(t.height,n.y+n.height);if(c<=i||l<=a)return[];const u=Math.max(0,Math.floor(i/r)),d=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),h=Math.max(0,Math.floor(a/s)),p=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=h;g<=p;g++)for(let b=u;b<=d;b++)m.push({level:e,col:b,row:g});return m}async function Mp(t,e){if(t.media)return Tp(t,t.media);let n=null,o=null;if(t.service)try{n=Sp(await lc(t.service,e.infoOptions))}catch(h){o=h}if(!n){if(!t.url)throw o??new Error("Image has no source");const h=await e.loadStatic(t.url);e.cache.seed(t.url,h),n=Mc(t.url,h.naturalWidth,h.naturalHeight)}const r=t.width&&t.height&&t.width>0&&t.height>0?{width:t.width,height:t.height}:{width:n.width,height:n.height},s=wp(t.region,r.width,r.height)??{x:0,y:0,width:r.width,height:r.height},i=n.width/r.width,a=n.height/r.height,c={x:s.x*i,y:s.y*a,width:s.width*i,height:s.height*a},l=_p(t.rotation),u=l?Ip(c,l):void 0,d={id:t.id,spec:t,pyramid:n,size:r,clip:c,contentClip:s,rect:{x:0,y:0,width:s.width,height:s.height},...u?{turn:u}:{}};return await e.cache.prefetch(ke(n,0,c).map(h=>{const p=n.tile(h);return{url:p.url,fallbackUrl:p.fallbackUrl}})),d}const Tc="media:";function Tp(t,e){var a,c;const n=t.width||((a=t.placement)==null?void 0:a.width)||e.element.videoWidth||1600,o=t.height||((c=t.placement)==null?void 0:c.height)||e.element.videoHeight||900,r=`${Tc}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:Mc(r,n,o),media:{kind:"media",source:e.element,width:n,height:o,naturalWidth:n,naturalHeight:o},size:s,clip:i,contentClip:i,rect:{...i}}}function Ip(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=u=>Math.abs(u)<1e-12?0:u,s=r(Math.cos(o)),i=r(Math.sin(o)),a=Math.abs(t.width*s)+Math.abs(t.height*i),c=Math.abs(t.width*i)+Math.abs(t.height*s),l=ie(Qt(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},se(n?-1:1,1),Qt(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:oh(l),width:a,height:c}}function Ic(t){var e;return((e=t.turn)==null?void 0:e.orient)??Qt(-t.clip.x,-t.clip.y)}function Pp(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=ko(n.unorient,e),s=Math.max(r.x,o.x),i=Math.max(r.y,o.y);return{x:s,y:i,width:Math.max(0,Math.min(r.x+r.width,o.x+o.width)-s),height:Math.max(0,Math.min(r.y+r.height,o.y+o.height)-i)}}function Lp(t,e){const{turn:n,clip:o}=t;return n?me(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function qi(t){const{turn:e,clip:n,contentClip:o}=t;return e?{width:e.width*o.width/n.width,height:e.height*o.height/n.height}:o}function Ap(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return rs(t.map(o=>o.rect))}const e=qi(t[0]).height;let n=0;for(const o of t){const r=qi(o),s=r.width*e/r.height;o.rect={x:n,y:0,width:s,height:e},n+=s}return{x:0,y:0,width:n,height:e}}function Co(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function Op(t){const e=Co(t);return ie(Qt(t.rect.x,t.rect.y),se(e.x,e.y),Ic(t))}function Np(t,e){var n,o;return t.service===e.service&&t.url===e.url&&t.width===e.width&&t.height===e.height&&t.region===e.region&&t.rotation===e.rotation&&((n=t.media)==null?void 0:n.element)===((o=e.media)==null?void 0:o.element)&&JSON.stringify(t.placement)===JSON.stringify(e.placement)}const Rp=1e7,Bp=15e6,$p=2e7,Fp=2;function Dp(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=Sc(n,o),c=[],l=[],u=[],d=(h,p,m)=>{const g=h.tile(p);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const h of e){const{pyramid:p,clip:m,rect:g}=h,b=Co(h);if(t.wantOverview)for(const C of ke(p,0,m))d(p,C,$p);const v=Ki(h,n,o,r),w=i?Ki(h,i,o,r):v;if(u.push((v==null?void 0:v.target)??-1),!v&&!w)continue;const _=C=>S=>{const N=p.tile(S).region;return Math.hypot(N.x+N.width/2-C.x,N.y+N.height/2-C.y)};if(w){const C=_(w.center);for(const S of ke(p,0,w.area))d(p,S,C(S)/1e3);if(w.target>0)for(const S of ke(p,w.target,w.area))d(p,S,Rp+C(S))}if(!v)continue;const{area:x,target:k}=v,T=_(v.center),O=ke(p,0,x),z=k===0?[]:ke(p,k,x);if(w!==v){for(const S of O)d(p,S,T(S)/1e3);const C=k-Fp;if(C>0)for(const S of ke(p,C,x))d(p,S,Bp+T(S))}if(h.spec.hidden)continue;const Y=(k===0?O:z).every(C=>s(p.tile(C).url)!==void 0)?[k]:Array.from({length:k+1},(C,S)=>S),Z=ie(a,Qt(g.x,g.y),se(b.x,b.y),Ic(h));for(const C of Y){const S=C===0?O:C===k?z:ke(p,C,x),N=p.levels[C].cols*p.levels[C].rows>1;for(const j of S){const G=p.tile(j),X=s(G.url);if(!X)continue;const et=zp(h,G.region,X,Z,N);et&&c.push({...et,url:G.url})}}}return l.sort((h,p)=>h.priority-p.priority),{draws:c,wants:Hp(l),levels:u}}function Ki(t,e,n,o){const{pyramid:r,rect:s}=t,i=Cr(e,n);if(!ih(i,s))return null;const a=Co(t),c=Math.max(i.x,s.x),l=Math.max(i.y,s.y),u=Math.min(i.x+i.width,s.x+s.width),d=Math.min(i.y+i.height,s.y+s.height),h=1/(a.x*e.zoom*o);return{area:Pp(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(u-c)/a.x,height:(d-l)/a.y}),center:Lp(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Ep(r,h)}}function zp(t,e,n,o,r){const{clip:s}=t,i=Math.max(e.x,s.x),a=Math.max(e.y,s.y),c=Math.min(e.x+e.width,s.x+s.width),l=Math.min(e.y+e.height,s.y+s.height);if(c<=i||l<=a)return null;const u=n.width/e.width,d=n.height/e.height,h=1e-6;return{item:t,image:n,transform:ie(o,Qt(e.x,e.y),se(1/u,1/d)),crop:{x:(i-e.x)*u,y:(a-e.y)*d,width:(c-i)*u,height:(l-a)*d},bleed:{right:r&&c<s.x+s.width-h,bottom:r&&l<s.y+s.height-h}}}function Hp(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const Wp={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Up=2,jp=3,Vp=.1,qp=1e-6,Tr={top:0,right:0,bottom:0,left:0};function Zi(t,e="padding"){if(!t||typeof getComputedStyle!="function")return Tr;const n=getComputedStyle(t),o=r=>parseFloat(n.getPropertyValue(`${e}-${r}`))||0;return{top:o("top"),right:o("right"),bottom:o("bottom"),left:o("left")}}const Kp=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let Zp;class Gp{constructor(e,n={}){P(this,"host");P(this,"overlays",null);P(this,"options");P(this,"backend",null);P(this,"backendPreference");P(this,"contextLosses",0);P(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});P(this,"visible",true);P(this,"dom",null);P(this,"domAsked",false);P(this,"pending",null);P(this,"camera");P(this,"loop");P(this,"gestures");P(this,"gestureOptions",{});P(this,"cache");P(this,"navigator",null);P(this,"navigatorAsked",0);P(this,"viewport",{width:1,height:1});P(this,"inset",Tr);P(this,"pixelRatio",1);P(this,"items",[]);P(this,"worldBounds",null);P(this,"contentVersion",0);P(this,"opaqueUrls",new Set);P(this,"mediaByKey",new Map);P(this,"detachMedia",[]);P(this,"opened",false);P(this,"atHome",true);P(this,"lastEmitted",null);P(this,"generation",0);P(this,"listeners",new Map);P(this,"unloadable",false);P(this,"resizeObserver",null);P(this,"intersectionObserver",null);P(this,"releaseTimer",null);P(this,"dprQuery",null);P(this,"disposed",false);P(this,"dismisser",null);P(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o=this.camera.current,r=this.backend,s=bp(this.getTile,u=>r?r.has(u):true),i=Dp({items:this.items,camera:o,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=i.wants.filter(u=>!u.url.startsWith(Tc));return this.cache.update(a),i.draws.length?this.setUnloadable(false):a.length&&a.every(u=>this.cache.failed(u.url))&&this.setUnloadable(true),this.paint(i.draws),(c=this.overlays)==null||c.position(o,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(u=>!u.spec.hidden),this.worldBounds,Cr(o,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!Kh(this.lastEmitted,o))&&(this.lastEmitted={...o},this.opened&&this.emit("viewport")),n2||s.deferred});P(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));P(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});P(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...Wp,...ir(n)},Yp()&&(this.options.animationTime=0),this.camera=new Yh({x:0,y:0,zoom:1,rotation:0},this.options.animationTime),this.loop=new vp(this.tick),this.gestureOptions=ir(n.gestures??{}),this.gestures=new sp(e,this,{...Er,...this.gestureOptions}),this.cache=new pp({load:(o,r)=>this.loadTile(o,r),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:o=>{var r;return(r=this.backend)==null?void 0:r.release(o)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Xp(e),this.visible?this.acquireBackend():this.holder.hiddenSince=Gi(),this.measure(),this.observe()}get backendKind(){var e;return((e=this.backend)==null?void 0:e.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(e,n){let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(n),()=>o==null?void 0:o.delete(n)}async setImages(e,{world:n,fit:o=false}={}){const r=++this.generation,s=new Map(this.items.map(u=>[u.id,u])),i=await Promise.allSettled(e.map(u=>{const d=s.get(u.id);return d&&Np(d.spec,u)?(d.spec=u,Promise.resolve(d)):Mp(u,{cache:this.cache,loadStatic:h=>this.loadTile(h),infoOptions:{request:this.options.request}})}));if(r!==this.generation||this.disposed)return;const a=i.filter(u=>u.status==="fulfilled").map(u=>u.value),c=i.filter(u=>u.status==="rejected").map(u=>u.reason);this.items=a,this.watchMedia(a);const l=Ap(a);if(this.worldBounds=n?l?rs([n,l]):n:l,this.contentVersion++,c.length&&this.emit("error",c),this.setUnloadable(e.length>0&&!a.length&&c.length>0),!this.worldBounds){this.invalidate();return}this.opened?o?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(e){const n=new Set(e);let o=false;for(const r of this.items){const s=n.has(r.id);!!r.spec.hidden!==s&&(r.spec={...r.spec,hidden:s},o=true)}o&&this.invalidate()}isReady(e){const n=this.items.find(r=>r.id===e);if(!n)return false;if(n.spec.media)return true;const o=n.pyramid.levels[0];if(!o)return false;for(let r=0;r<o.rows;r++)for(let s=0;s<o.cols;s++)if(!this.getTile(n.pyramid.tile({level:0,col:s,row:r}).url))return false;return true}fitBounds(e,n=false,o=Tr){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i}){const{width:a,height:c}=this.viewport,{zoom:l}=qh(e,{width:Math.max(1,a-i-r),height:Math.max(1,c-o-s)},n);return{...ho(vc(e),{x:(a+i-r)/2,y:(c+o-s)/2},l,n,this.viewport),zoom:l,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*Vp;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,Zi((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return Cr(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var o;const e=((o=this.homeCamera())==null?void 0:o.zoom)??1,n=this.items.length?Math.min(...this.items.map(r=>Co(r).x)):1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.options.maxZoomPixelRatio/n)}}home(e=false){const n=this.homeCamera();n&&(this.atHome=true,this.animateTo(n,e))}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-qp)}zoomBy(e,n,o=true){const r=o?this.camera.destination:this.camera.current,s=n??{x:this.viewport.width/2,y:this.viewport.height/2},i=$i(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=gn(r.zoom*e,a,c),u=ho(i,s,l,r.rotation,this.viewport),d=this.constrain({...r,...u,zoom:l});this.atHome=false,o?this.camera.animateTo({state:d,anchor:{world:i,screen:s}},this.viewport):this.camera.set(d),this.invalidate()}panBy(e,n,o=false){const r=o?this.camera.destination:this.camera.current,s=me(ie(se(1/r.zoom),An(-r.rotation)),{x:e,y:n}),i=this.constrain({...r,x:r.x-s.x,y:r.y-s.y});this.atHome=false,o?this.camera.animateTo({state:i},this.viewport):this.camera.set(i),this.invalidate()}panTo(e,n=false){const o=n?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...o,...e}),n)}flick(e,n){this.panBy(e*.25,n*.25,true)}rotateBy(e){const n=this.camera.destination;this.setRotation(n.rotation*180/Math.PI+e)}setRotation(e,n=false){const o=this.camera.destination,r=e*Math.PI/180;this.animateTo(this.constrain({...o,rotation:r}),n)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(e){this.emit("tap",e)}setDismiss(e){this.dismisser=e}dismiss(){var e;return((e=this.dismisser)==null?void 0:e.call(this))??false}setGestures(e){this.gestures.setOptions({...Er,...this.gestureOptions,...ir(e)})}setInteracting(e){e&&this.camera.stop()}worldToScreenPoint(e){return Vh(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return $i(this.camera.current,this.viewport,e)}itemRectToWorld(e,n){const o=this.items[e];if(!o)return null;const{contentClip:r,clip:s}=o;if(o.turn)return ko(ie(Op(o),se(s.width/r.width,s.height/r.height)),n);const i=o.rect.width/r.width,a=o.rect.height/r.height;return{x:o.rect.x+(n.x-r.x)*i,y:o.rect.y+(n.y-r.y)*a,width:n.width*i,height:n.height*a}}attachNavigator(e){var s;(s=this.navigator)==null||s.dispose(),this.navigator=null;const n=++this.navigatorAsked;let o=null,r=false;return import("./Navigator-Co76p-1n.mjs").then(i=>{r||this.disposed||n!==this.navigatorAsked||(o=new i.Navigator(e,(a,c)=>this.panTo(a,c)),this.navigator=o,this.invalidate())}),()=>{r=true,o==null||o.dispose(),o&&this.navigator===o&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var e,n,o,r,s,i,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(e=this.resizeObserver)==null||e.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),(r=(o=this.dprQuery)==null?void 0:o.removeEventListener)==null||r.call(o,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(s=this.navigator)==null||s.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(i=this.dom)==null||i.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(c=>c()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(e){this.detachMedia.forEach(n=>n()),this.detachMedia=[],this.mediaByKey.clear();for(const n of e){if(!n.media||n.media.kind!=="media")continue;const o=n.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(o,n.media);const r=n.media.source,s=()=>this.invalidate(),i=["play","seeked","loadeddata","resize"];i.forEach(a=>r.addEventListener(a,s)),this.detachMedia.push(()=>i.forEach(a=>r.removeEventListener(a,s)))}}paint(e){const n=this.backend,o=[],r=(n==null?void 0:n.kind)==="webgl2";n==null||n.begin();for(const s of e){const{image:i}=s;if(!(i.kind==="media"||i.kind==="element"&&r&&(i.opaque||this.opaqueUrls.has(s.url)))&&n){if(n.draw({key:s.url,source:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1,bleed:s.bleed})!=="tainted"||i.kind==="bitmap")continue;this.opaqueUrls.add(s.url)}(i.kind==="element"||i.kind==="media")&&o.push({key:`${s.item.id}|${s.url}`,element:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1})}n==null||n.end(),this.dom?this.dom.sync(o):o.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-BCwCxPDU.mjs").then(({DomLayers:s})=>{if(this.disposed)return;const i=new s(this.host);this.overlays&&this.host.insertBefore(i.container,this.overlays.container),this.dom=i,this.invalidate()}))}loadTile(e,n){return ap(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof fo?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const e=2*Math.PI,n=Math.round(this.camera.destination.rotation/e)*e||0;return this.fit(this.worldBounds,n,this.inset)}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?gn(e.zoom,r,Math.max(s,e.zoom)):gn(e.zoom,r,s);return{...e,zoom:i,x:gn(e.x,o.x,o.x+o.width),y:gn(e.y,o.y,o.y+o.height)}}acquireBackend(e=true){var s,i;if(this.backend||this.pending||this.disposed)return;const n=document.createElement("canvas");n.className="clover-canvas-surface",n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(n,((s=this.dom)==null?void 0:s.container)??((i=this.overlays)==null?void 0:i.container)??null);const o=e&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<jp);let r=null;o&&(Fh(this.holder)||this.backendPreference==="webgl2")&&(r=fo.create(n,{onLost:this.onContextLost}),r||Ri(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(Zp??(Zp=import("./Canvas2DBackend-DFfCzyjL.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==n)return;this.pending=null;const c=a.create(n);c?this.install(c):this.none(n)}))}none(e){e.remove(),this.host.dataset.backend="none"}install(e){this.backend=e,this.host.dataset.backend=e.kind,e.resize(this.viewport.width,this.viewport.height,this.pixelRatio),e.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",e.kind),this.invalidate()}releaseBackend(){var n;if(Ri(this.holder),(n=this.pending)==null||n.remove(),this.pending=null,!this.backend)return;const e=this.backend.canvas;this.backend.dispose(),e.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(e=>{const n=e.some(o=>o.isIntersecting);this.setVisible(n)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(e){var n;if(this.visible=e,e){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(n=this.holder).hiddenSince??(n.hiddenSince=Gi()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(e=false){var c;const n=this.host.getBoundingClientRect(),o=Math.max(1,n.width),r=Math.max(1,n.height),s=Zi(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Up);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&Kp(s,this.inset))return;const a=this.viewport;if(this.viewport={width:o,height:r},this.inset=s,this.pixelRatio=i,(c=this.backend)==null||c.resize(o,r,i),this.opened)if(this.atHome)this.home(true);else{const l=this.camera.current,u=o/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*u}))}e?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var e,n,o,r;typeof window>"u"||typeof window.matchMedia!="function"||((n=(e=this.dprQuery)==null?void 0:e.removeEventListener)==null||n.call(e,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(r=(o=this.dprQuery).addEventListener)==null||r.call(o,"change",this.onPixelRatioChange))}setUnloadable(e){e!==this.unloadable&&(this.unloadable=e,this.emit("unloadable",e))}emit(e,n){var o;(o=this.listeners.get(e))==null||o.forEach(r=>r(n))}}const Gi=()=>typeof performance<"u"?performance.now():Date.now();function Xp(t){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:e,left:n,width:o,height:r}=t.getBoundingClientRect();return e+r>=0&&n+o>=0&&e<=window.innerHeight&&n<=window.innerWidth}function Yp(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ir(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const Jp=(t,e)=>new Gp(t,e),Qp=pt(()=>import("./Connected-D5T-mtiy.mjs")),tm=pt(()=>import("./Connected-DIOuI3Mv.mjs").then(t=>t.C));function em({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var m;const a=ce("Body");ec(a.clover,r);const c=ss(),l=gt(()=>Pd(c),[c]),u=Ld(n??a.renderers,{canvases:c,bodies:l}),d=u==null?void 0:u.component,h=((m=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:m.type)??"Canvas",p=rt(g=>g.status==="loading");return f("div",{"aria-busy":p,className:Tt("clover-body",t),"data-renderer":d?"custom":h.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[d?f(d,{canvases:c,bodies:l,children:s}):h==="Scene"?f(_t,{fallback:f(wn,{overlay:true}),children:f(tm,{...i,children:s})}):h==="Timeline"?f(_t,{fallback:f(wn,{overlay:true}),children:f(Qp,{...i,children:s})}):f(Bh,{...i,collapseControls:o,surface:Jp,children:s}),p&&f(wn,{overlay:true})]})}const nm={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function On(t){return t.replace(/<br\s*\/?>/gi,`
|
|
24
|
-
`).replace(/<[^>]*>/g,"").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,n)=>{if(n[0]==="#"){const o=n[1]==="x"||n[1]==="X"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return o>0&&o<=1114111?String.fromCodePoint(o):e}return nm[n.toLowerCase()]??e})}const om=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function rm(t,e=""){const n=t==null?void 0:t.split(";")[0].trim().toLowerCase();if(n)return n==="text/html"?"html":n==="text/markdown"?"markdown":"plain";const o=e.trim();return o.startsWith("<")&&o.endsWith(">")?"html":"plain"}function sm(t){return t.replace(/\r\n?/g,`
|
|
25
|
-
`).replace(/^\[\^[^\]]+\]:[ \t]*/gm,"").replace(/\[\^[^\]]+\]/g,"").replace(/^#{1,6}[ \t]+(\S.*?)(?:[ \t]+#+)?[ \t]*$/gm,"$1").replace(/^[ \t]*(?:[-*+]|\d+[.)])[ \t]+/gm,"").replace(/\[([^\]]+)\]\((?:https?:\/\/|mailto:)[^\s)]+\)/g,"$1").replace(/\*\*([^*]+)\*\*|__([^_]+)__/g,(e,n,o)=>n??o).replace(/\*([^*\s][^*]*)\*|_([^_\s][^_]*)_/g,(e,n,o)=>n??o).replace(/\\\n/g,`
|
|
26
|
-
`).replace(/\n\s*\n/g,`
|
|
27
|
-
`).trim()}const Eo=(t,e)=>e==="canvas"?$e(t.manifest,t.canvasId):t.manifest,Pc=ae(null),is=()=>zt(Pc),Je=te(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var h;const a=In(p=>{var m,g;return e==="canvas"?(m=$e(p.manifest,p.canvasId))==null?void 0:m.label:(g=p.manifest)==null?void 0:g.label},void 0),c=is(),l=(h=Ee())==null?void 0:h.language,{text:u,lang:d}=yt(n??(c?c.label:a),l);return u?f(o,{ref:i,className:Tt("clover-label",r),...lt(d),...s,children:On(u)}):null});function im(t,e,n){const o=(u,d)=>Math.min(Math.max(Math.round(u),0),d),r=n?o(n.x*t.width,t.width-1):0,s=n?o(n.y*t.height,t.height-1):0,i={x:r,y:s,width:n?Math.max(1,o(n.width*t.width,t.width-r)):t.width,height:n?Math.max(1,o(n.height*t.height,t.height-s)):t.height},a=i.width===t.width&&i.height===t.height;if(!a&&!t.regionByPx)return null;if(t.sizeByW){let u=Math.min(1,e/Math.max(i.width,i.height));return t.maxWidth&&(u=Math.min(u,t.maxWidth/i.width)),t.maxHeight&&(u=Math.min(u,t.maxHeight/i.height)),t.maxArea&&(u=Math.min(u,Math.sqrt(t.maxArea/(i.width*i.height)))),co(t,i,Math.max(1,Math.floor(i.width*u)),Math.max(1,Math.floor(i.height*u)))}if(!a)return null;const c=[...t.sizes].sort((u,d)=>u.width-d.width),l=c.find(u=>Math.max(u.width,u.height)>=e)??c.at(-1)??{width:t.width,height:t.height};return co(t,i,l.width,l.height)}function Qe(t){var e;return(e=Jr(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function am(t,{width:e,height:n}){if(t==="full")return{x:0,y:0,width:1,height:1};const o=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(t);if(!o)return null;const[r,s,i,a]=o.slice(2).map(Number),[c,l]=o[1]?[100,100]:[e,n];return{x:r/c,y:s/l,width:i/c,height:a/l}}function ge(t,e="full"){if(!t)return null;const n=xo(t.service);return n?e==="full"?{service:n,fallback:t.id}:{service:n,region:e,fallback:t.id}:t.id?{src:t.id}:null}function as(t){const e=t;return e?ge(D(e.thumbnail)[0])??ge(Qe(e))??ge(Qe(e.placeholderContainer))??ge(Qe(e.accompanyingContainer)):null}function cm(t){const e=t;return e?ge(Qe(e))??ge(Qe(e.placeholderContainer))??ge(Qe(e.accompanyingContainer))??ge(D(e.thumbnail)[0]):null}async function cs(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;try{const o=await lc(t.service,{request:n}),r=typeof t.region=="string"?am(t.region,o):t.region;return r===null?t.fallback:im(o,e,r)??t.fallback}catch{return t.fallback}}const qv=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ge,resolveThumbnail:cs,stillSource:cm,thumbnailSource:as},Symbol.toStringTag,{value:"Module"})),Xi='.clover-items-item[role="option"], .clover-items-link',Xe=new Map;let Rt=null,Gt=null,Ir=0;function ls(t){const e=Xe.get(t);if(!e)return;const n=t.clientHeight>0&&t.scrollHeight>t.clientHeight+1;n!==e.cut&&(e.cut=n,e.change(n))}function Pr(){cancelAnimationFrame(Ir),Ir=requestAnimationFrame(()=>Xe.forEach((t,e)=>ls(e)))}function Lc(t){var r,s;if(t.key!=="Escape")return;const e=new Set,n=(s=(r=document.activeElement)==null?void 0:r.closest)==null?void 0:s.call(r,Xi);n&&e.add(n);try{document.querySelectorAll(`:is(${Xi}):hover`).forEach(i=>e.add(i))}catch{}const o=[...e].filter(i=>i.dataset.fullHidden===void 0&&i.querySelector(".clover-items-label-full"));o.length&&(t.preventDefault(),t.stopPropagation(),o.forEach(i=>rc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function lm(){var t,e;Rt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>ls(o.target))),Gt=typeof MutationObserver>"u"?null:new MutationObserver(Pr),Gt==null||Gt.observe(document.head,{childList:true,subtree:true,characterData:true}),Gt==null||Gt.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Pr),document.addEventListener("keydown",Lc,true)}function um(){var t,e,n;cancelAnimationFrame(Ir),(t=Rt==null?void 0:Rt.disconnect)==null||t.call(Rt),Gt==null||Gt.disconnect(),Rt=Gt=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Pr),document.removeEventListener("keydown",Lc,true)}function dm(t,e){var n;return Xe.size||lm(),Xe.set(t,{change:e}),(n=Rt==null?void 0:Rt.observe)==null||n.call(Rt,t),ls(t),()=>{var o;Xe.delete(t),(o=Rt==null?void 0:Rt.unobserve)==null||o.call(Rt,t),Xe.size||um()}}const fm=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function Ac(t,e){if(typeof t!="string")return null;const n=fm.exec(t.trim());if(!n)return null;const[o,r,s,i=0,a=0,c=0]=n.slice(1,7).map(d=>d===void 0?void 0:Number(d)),l=new Date(Date.UTC(2e3,r-1,s,i,a,c));if(l.setUTCFullYear(o),l.getUTCMonth()!==r-1||l.getUTCDate()!==s)return null;const u=!i&&!a&&!c&&!Number(n[7]??0);return{at:l,precision:e??(u?s!==1?"day":r!==1?"month":"year":"time")}}const hm=pt(()=>import("./NavDate-BZgeaMG9.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function pm(t,e,n,o){const r=t.source!==void 0?t.source:as(t.resource),[s,i]=H(r==null?void 0:r.src),a=(r==null?void 0:r.src)??(r==null?void 0:r.service)??(r==null?void 0:r.fallback);return F(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return cs(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const mm=()=>f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",children:[f("path",{d:"M232 416a24 24 0 01-14.9-5.2L125.8 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.8l91.3-74.8A24 24 0 01256 120v272a24 24 0 01-24 24z"}),f("path",{d:"M336 176a112 112 0 010 160M384 128a176 176 0 010 256",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]});function gm({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=H(null),a=gc(s,mc,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=pm(t,e,n,a),[u,d]=H(false),{width:h,height:p}=t.resource??{},m=h&&p?h/p:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":u,"data-empty":c?void 0:true,style:c&&!(h&&p)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&Pn(t.media)&&f(mm,{}),c&&f("img",{src:c,alt:o,...lt(o?r:void 0),width:e,height:Math.round(e/m),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>d(true),onError:()=>d(true)}),t.duration?f("span",{className:"clover-items-duration",children:Pf(t.duration)}):null]})}function vm({text:t,lang:e,first:n}){const o=R(null),[r,s]=H(false);return F(()=>{const i=o.current;if(!(!i||!t))return dm(i,s)},[t]),f("span",{className:"clover-items-label","data-clamped":r||void 0,children:[!n&&" ",f("span",{ref:o,className:"clover-items-label-text",...lt(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...lt(e),"aria-hidden":"true",hidden:true,children:t})]})}function ym({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary"}){var u,d;const i=t.parts.map(h=>yt(t.parts.length===1?t.label:h.label,n)),a=r&&s==="summary"?yt(t.summary,n):null,c=r&&s==="navDate"?Ac(t.navDate):null,l=i.some(h=>h.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(d=(u=t.parts[0])==null?void 0:u.media)==null?void 0:d.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,p)=>{const m=i[p].text?{text:""}:yt(h.label,n);return f(gm,{part:h,size:e,request:o,alt:m.text,altLang:m.lang},h.id)})}),(l||c||(a==null?void 0:a.text))&&f("figcaption",{className:"clover-items-caption",children:[i.map((h,p)=>f(vm,{text:h.text,lang:h.lang,first:p===0},t.parts[p].id)),c&&f(_t,{fallback:null,children:f(hm,{value:t.navDate,className:"clover-items-date"})}),(a==null?void 0:a.text)&&f("span",{className:"clover-items-summary",...lt(a.lang),children:a.text.replace(/<[^>]*>/g,"")})]})]})}function bm(t){var e;return(e=Jr(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function Oc(t){const e=bm(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:e}}const Yi=new WeakMap;function Nc(t){if(!t)return[];let e=Yi.get(t);if(!e){const{canvases:n,views:o}=At(t);e=o.map(r=>{const s=r.map(i=>Oc(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>yt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),Yi.set(t,e)}return e}const Ji=new WeakMap;function po(t){if(!t)return[];let e=Ji.get(t);return e||(e=D(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[Oc(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=D(n.homepage)[0])==null?void 0:o.id)??n.id,...kn(D(n.homepage)[0])?{hrefLang:kn(D(n.homepage)[0])}:{}}}),Ji.set(t,e)),e}function Kv(t){return t?Array.isArray(t)?po({items:t}):t.type==="Collection"?po(t):Nc(t):[]}function Rc(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const us=(t,e="p")=>Rc(t)??e;function Bc(t,e,n="p"){const o=Rc(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function _m(t,e,{orientation:n="both",rtl:o=false,onActivate:r,onMove:s}={}){const[i,a]=H(Math.max(0,e)),c=R([]),l=R(r);l.current=r;const u=R(s);u.current=s,F(()=>{e>=0&&a(e)},[e]);const d=Math.min(i,Math.max(0,t-1)),h=dt(g=>{var b;a(g),(b=c.current[g])==null||b.focus()},[]),p=dt((g,b)=>{var T,O;const v=o?"ArrowLeft":"ArrowRight",w=o?"ArrowRight":"ArrowLeft",_=n!=="vertical",x=n!=="horizontal";let k=null;if(_&&g.key===v||x&&g.key==="ArrowDown")k=Math.min(t-1,b+1);else if(_&&g.key===w||x&&g.key==="ArrowUp")k=Math.max(0,b-1);else if(g.key==="Home")k=0;else if(g.key==="End")k=t-1;else if(g.key==="Enter"||g.key===" "){(T=l.current)==null||T.call(l,b,g),g.preventDefault();return}k!==null&&(g.preventDefault(),h(k),k!==b&&((O=u.current)==null||O.call(u,k,g)))},[t,n,o,h]);return{focused:d,itemProps:g=>({ref:b=>{c.current[g]=b},tabIndex:g===d?0:-1,onKeyDown:b=>p(b,g),onFocus:()=>a(g)})}}const wm=5,xm=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function $c({align:t="start",dragFree:e=false,itemCount:n=0}={}){const[o,r]=H(null),[s,i]=H(false),[a,c]=H(false),l=R(t);l.current=t;const u=e?"none":"x mandatory",d=dt(()=>{if(!o)return;const v=Math.abs(o.scrollLeft),w=o.scrollWidth-o.clientWidth;i(v>1),c(v<w-1)},[o]);F(()=>{if(!o)return;const v=o.style;v.overflowX="auto",v.overflowY="hidden",v.scrollSnapType=u,v.setProperty("--clover-track-align",t),v.overscrollBehaviorX="contain"},[o,u,t]),F(()=>{if(!o)return;let v=0;const w=()=>{cancelAnimationFrame(v),v=requestAnimationFrame(d)};d(),o.addEventListener("scroll",w,{passive:true});const _=typeof ResizeObserver<"u"?new ResizeObserver(w):null;return _==null||_.observe(o),o.firstElementChild&&(_==null||_.observe(o.firstElementChild)),()=>{cancelAnimationFrame(v),o.removeEventListener("scroll",w),_==null||_.disconnect()}},[o,d,n]);const h=dt((v,w=false)=>{if(!o||!v)return;const _=w||xm()?"auto":"smooth";o.scrollBy({left:v,behavior:_})},[o]),p=dt((v,{instant:w=false}={})=>{const _=o==null?void 0:o.querySelector(`[data-track-index="${v}"]`);if(!o||!_)return false;const x=o.getBoundingClientRect(),k=_.getBoundingClientRect(),T=getComputedStyle(o).direction==="rtl";return h(l.current==="center"?k.left+k.width/2-(x.left+x.width/2):T?k.right-x.right:k.left-x.left,w),true},[o,h]),m=dt(v=>{if(!o)return;const w=getComputedStyle(o).direction==="rtl";h(v*o.clientWidth*.9*(w?-1:1))},[o,h]),g=dt(()=>m(1),[m]),b=dt(()=>m(-1),[m]);return F(()=>{if(!o)return;let v=null,w=false;const _=O=>{O.pointerType!=="mouse"||O.button!==0||(v={x:O.clientX,scroll:o.scrollLeft},w=false)},x=O=>{var J;if(!v)return;const z=O.clientX-v.x;!w&&Math.abs(z)<wm||(w||(w=true,(J=o.setPointerCapture)==null||J.call(o,O.pointerId),o.style.scrollSnapType="none",o.dataset.dragging="true"),o.scrollLeft=v.scroll-z)},k=O=>{var z;v&&(v=null,w&&((z=o.releasePointerCapture)==null||z.call(o,O.pointerId),delete o.dataset.dragging,o.style.scrollSnapType=u))},T=O=>{w&&(w=false,O.preventDefault(),O.stopPropagation())};return o.addEventListener("pointerdown",_),o.addEventListener("pointermove",x),o.addEventListener("pointerup",k),o.addEventListener("pointercancel",k),o.addEventListener("click",T,true),()=>{o.removeEventListener("pointerdown",_),o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",k),o.removeEventListener("pointercancel",k),o.removeEventListener("click",T,true)}},[o,u]),{ref:r,canScrollPrev:s,canScrollNext:a,scrollPrev:b,scrollNext:g,scrollToIndex:p,measure:d}}const mo=te(function(e,n){return!Ee()||e.iiifContent!==void 0||e.items!==void 0?f(_t,{fallback:null,children:f(Sm,{...e,forwardedRef:n})}):f(km,{...e,forwardedRef:n})}),Sm=pt(()=>import("./StandaloneItems-BpBEQG8i.mjs"));function km({of:t="views",...e}){return t==="targets"?f(Em,{...e}):t==="annotations"?f(Tm,{...e}):t==="members"?f(Fc,{...e}):f(Im,{...e})}const Cm=pt(()=>import("./TargetItems-B6Icep5k.mjs"));function Em(t){return rt(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(_t,{fallback:null,children:f(Cm,{...t})}):null}const Mm=pt(()=>import("./AnnotationItems-BNA_92Dv.mjs"));function Tm(t){return rt(n=>!!qa(n.manifest,n.addedSets))?f(_t,{fallback:null,children:f(Mm,{...t})}):null}function Fc({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Ee(),s=rt(u=>u.collection),i=rt(u=>{var d;return((d=u.manifest)==null?void 0:d.id)??null}),a=po(s),c=jr(s==null?void 0:s.viewingDirection);if(!a.length)return null;const l=(u,d)=>{t==null||t(u,d),o.goToManifest(u.id)};if(n.layout==="pager"){const u=a.findIndex(d=>d.id===i);return f(zc,{...n,forwardedRef:e,steps:Dc(a,u,c,l),nameKey:"informationPanelTabsCollection",position:f(Lm,{position:u,total:a.length,list:d=>f(Fc,{layout:"list",forwardedRef:null,onSelect:d})})})}return f(Hc,{...n,forwardedRef:e,items:a,selected:a.findIndex(u=>u.id===i),navigation:"id",rtl:c==="right-to-left",language:r,request:o.request,showSummary:true,onActivate:l})}function Im({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Ee(),i=rt(d=>d.manifest),a=rt(d=>Ln(d.manifest,d.canvasId)),c=rt(d=>At(d.manifest).direction),l=Nc(i);if(l.length<(n?1:2))return null;const u=d=>r.goTo(d.id);return o.layout==="pager"?f(zc,{...o,forwardedRef:e,steps:Dc(l,a,c,u)}):f(Hc,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",language:s,request:r.request,onActivate:(d,h)=>{t==null||t(d,h),r.goTo(d.id)},followFocus:u})}function Dc(t,e,n,o){return{position:e,total:t.length,direction:n,step:(r,s)=>{const i=t[e+r];i&&o(i,s)}}}const Pm=pt(()=>import("./PagerLayout-tUkN1-FV.mjs")),Lm=pt(()=>import("./PagerLayout-tUkN1-FV.mjs").then(({CountMenu:t})=>({default:t})));function zc(t){return f(_t,{fallback:null,children:f(Pm,{...t})})}function Hc({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,layout:s="slider",thumbnailSize:i=200,request:a,language:c,showSummary:l=false,secondary:u="summary",heading:d,headingLevel:h=2,renderItem:p,onActivate:m,followFocus:g,as:b="section",className:v,"aria-label":w,size:_,singleItem:x,highContrast:k,...T}){var Lt;const{t:O}=Pt(),z=le(),J=bo(t,T.lang),{langOf:tt}=J,Y=zr(k),Z=s==="slider",C=o==="id",S=R(null),N=s==="masonry";F(()=>{const W=S.current;if(!N||!W)return;let st,nt=true;return import("../masonry-0QfzOgbB.mjs").then(({attachMasonry:wt})=>{nt&&(st=wt(W))}),()=>{nt=false,st==null||st()}},[N]);const j=$c({align:C?"center":"start",itemCount:e.length}),G=R(void 0);F(()=>()=>window.clearTimeout(G.current),[]);const X=_m(e.length,n,{orientation:s==="slider"?"horizontal":s==="list"?"vertical":"both",rtl:r,onActivate:(W,st)=>m(e[W],st),onMove:g?(W,st)=>{window.clearTimeout(G.current);const nt=()=>g(e[W]);st.repeat?G.current=window.setTimeout(nt,150):nt()}:void 0}),et=R(null),xt=R(false);xt.current=!!((Lt=et.current)!=null&&Lt.contains(et.current.ownerDocument.activeElement)),F(()=>{var wt;const W=et.current;if(!W||!xt.current)return;const{activeElement:st,body:nt}=W.ownerDocument;st&&st!==nt||(wt=W.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||wt.focus()},[e]);const at=R(false);F(()=>{var nt;if(n<0)return;const W=!at.current;if(Z){j.scrollToIndex(n,{instant:W})&&(at.current=true);return}at.current=true;const st=(nt=et.current)==null?void 0:nt.querySelector(`[data-track-index="${n}"]`);st&&Am(st,W)},[Z,n,j.scrollToIndex]);const ct=us(h),y=d?yt(d.label,c):null,E=d?yt(d.summary,c):null,L=w===void 0&&!!(y!=null&&y.text),$=So(O("itemsLabel"),tt("itemsLabel"),w!==void 0||L,J.hostLanguage),A=L?{"aria-labelledby":`${z}-title`}:w!==void 0?{"aria-label":w}:$.props,I=(W,st)=>p?p(W,{selected:st}):f(ym,{item:W,size:i,language:c,request:a,showSummary:l,secondary:u}),U=W=>!(p||yt(W.label,c).text||l&&u==="summary"&&yt(W.summary,c).text),V=(W,st)=>U(W)?O("canvasPosition",{index:st+1,total:e.length}):void 0,St=W=>U(W)?tt("canvasPosition"):void 0,Q=Z?{display:"flex",margin:0,padding:0,listStyle:"none"}:void 0,mt=Z?{flex:"0 0 auto",scrollSnapAlign:C?"center":"start"}:void 0,ht=C&&n>=0,Ht=W=>{const st=n+(W==="prev"?-1:1),nt=ht?st>=0&&st<e.length:W==="prev"?j.canScrollPrev:j.canScrollNext,wt=ht?W==="prev"?"commonPrevious":"commonNext":W==="prev"?"itemsScrollBack":"itemsScrollForward",Bt=O(wt),ee=be=>{if(!nt)return;if(!ht)return(W==="prev"?j.scrollPrev:j.scrollNext)();const B=e[st];g?g(B):m(B,be)};return f("button",{type:"button",className:`clover-items-scroll-${W}`,"aria-controls":ht?void 0:`${z}-viewport`,...lt(tt(wt)),"aria-disabled":!nt||void 0,tabIndex:nt?void 0:-1,onClick:ee,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:W==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:nn,children:Bt}),f(Fe,{label:Bt})]})};return f(Tn.Provider,{value:J.hostLanguage,children:f(b,{ref:J.ref,className:Tt("clover-items",v),"data-layout":s,"data-navigation":o,...Hr(Y),...T,children:[d&&((y==null?void 0:y.text)||(E==null?void 0:E.text))&&f("header",{className:"clover-items-header",children:[(y==null?void 0:y.text)&&f(ct,{className:"clover-items-title clover-title",id:`${z}-title`,...lt(y.lang),children:y.text}),(E==null?void 0:E.text)&&f("p",{className:"clover-items-description",...lt(E.lang),children:E.text.replace(/<[^>]*>/g,"")}),d.homepage&&f("a",{className:"clover-items-homepage",href:d.homepage,hrefLang:d.homepageLang,...lt(tt("commonViewAll")),children:O("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[Z&&Ht("prev"),f("div",{id:`${z}-viewport`,className:"clover-items-viewport",ref:Z?j.ref:S,children:C?f("div",{ref:et,role:"listbox",...A,"aria-orientation":Z?"horizontal":"vertical",className:"clover-items-track",style:Q,children:e.map((W,st)=>{const nt=st===n;return f("div",{id:`${z}-${st}`,role:"option","aria-selected":nt,"aria-label":V(W,st),...lt(St(W)),className:"clover-items-item","data-track-index":st,style:mt,...X.itemProps(st),onClick:wt=>m(W,wt),children:I(W,nt)},W.id)})}):f("ul",{...A,className:"clover-items-track",style:Q,children:e.map((W,st)=>f("li",{className:"clover-items-item","data-track-index":st,style:mt,children:f("a",{className:"clover-items-link",href:W.href,hrefLang:W.hrefLang,"aria-label":V(W,st),...lt(St(W)),draggable:false,onClick:nt=>m(W,nt),children:I(W,false)})},W.id))})}),Z&&Ht("next")]}),$.node]})})}function Am(t,e){var i;let n=t.parentElement;for(;n&&n!==document.body;){const{overflowY:a}=getComputedStyle(n);if(/(auto|scroll)/.test(a)&&n.scrollHeight>n.clientHeight)break;n=n.parentElement}if(!n||n===document.body)return;const o=n.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top<o.top?r.top-o.top:r.bottom>o.bottom?r.bottom-o.bottom:0;s&&((i=n.scrollBy)==null||i.call(n,{top:s,behavior:e?"auto":"smooth"}))}function Om(t,e){const{clover:n}=ce(e),o=Nh(),{direction:r}=xc(),s=rt(l=>l.collection),i=rt(l=>{var u;return((u=l.manifest)==null?void 0:u.id)??null}),a=rt(l=>{var u;return((u=l.targets)==null?void 0:u.items.length)??0}),c=rt(l=>Vu(l.targets,l.targetIndex,l.manifest,l.canvasId));if(t==="targets")return{position:c,total:a,direction:"left-to-right",step:l=>{const u=c+l;u>=0&&u<a&&n.goToTarget(u)}};if(t==="members"){const l=po(s),u=l.findIndex(d=>d.id===i);return{position:u,total:l.length,direction:"left-to-right",step:d=>{const h=l[u+d];h&&n.goToManifest(h.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Nm=te(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Pt(),{position:c,total:l}=e;if(l<2||c<0)return null;const u=c+1;return f(n,{ref:s,className:Tt("clover-pager-position",o),...r,children:[f("span",{"aria-hidden":"true",children:[u," / ",l]}),f("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]}),f("span",{style:nn,...lt(a("canvasPosition")),children:i("canvasPosition",{index:u,total:l})})]})}),Rm=te(function({of:e="views",...n},o){const r=Om(e,"Position");return f(Nm,{ref:o,...n,steps:r})});function Bm({className:t,loading:e,error:n}){const{t:o,langOf:r}=Pt(),{status:s,error:i}=Lh(),a=s==="loading",c=e!==void 0&&e!==false;return f(Ct,{children:[f("p",{className:Tt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:nn,children:[a&&(c?e:e===void 0&&f(wn,{})),a&&!c&&f("span",{style:nn,...lt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Tt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(Ct,{children:[f("p",{...lt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function $m(t,e=false,n=3){const o=e||om(t),r=e?`${n}
|
|
28
|
-
${t}`:t,[s,i]=H(null);return F(()=>{if(!o)return;let a=true;return Promise.all([import("../sanitize-qIOeyIww.mjs"),e?import("../markdown-CCYJwzFn.mjs"):null]).then(([{sanitizeHTML:c},l])=>{const u=l?l.markdownToHtml(t,{headingLevel:n}):t;a&&i({for:r,html:c(u,{markdown:!!l})})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s.html:null}const Fm=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),Wc=te(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=yt(n,o),u=lt(l),d=rm(r,c),h=d==="markdown",p=$m(d==="plain"?"":c,h,s);if(!c)return null;if(d==="plain")return f(e,{ref:a,...i,...u,children:c.split(/\r?\n/).map((g,b)=>f(re.Fragment,{children:[b>0&&f("br",{}),g]},b))});const m=typeof e=="string"&&Fm.has(e)&&p&&/<(p|ul|ol|div)[\s>]/i.test(p)?"div":e;return p!==null?f(m,{ref:a,...i,...u,dangerouslySetInnerHTML:{__html:p}}):f(e,{ref:a,...i,...u,children:h?sm(c):On(c)})}),Uc=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=yt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":yt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...lt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(Wc,{as:"dd",markup:r.value,language:e})]},s)})}):null,Dm=typeof window>"u"?F:Dt;function zm({children:t}){const{t:e}=Pt(),n=bo(),o=R(null),r=le(),s=re.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=Hm(o);return f("div",{className:"clover-read-more",children:[re.cloneElement(s,{ref:o,id:i,"data-read-more":a?"open":""}),(c||a)&&f("button",{type:"button",className:"clover-read-more-button","aria-expanded":a,"aria-controls":i,onClick:l,ref:n.ref,...lt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function Hm(t){const[e,n]=H(false),[o,r]=H(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return Dm(s),F(()=>{var d,h;const i=t.current;if(!i)return;let a=0;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(s)},l=typeof ResizeObserver>"u"?null:new ResizeObserver(c);l==null||l.observe(i);const u=typeof MutationObserver>"u"?null:new MutationObserver(c);return u==null||u.observe(document.head,{childList:true,subtree:true,characterData:true}),u==null||u.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),u==null||u.observe(i,{attributes:true,attributeFilter:["style"]}),(h=(d=document.fonts)==null?void 0:d.addEventListener)==null||h.call(d,"loadingdone",c),()=>{var p,m;cancelAnimationFrame(a),l==null||l.disconnect(),u==null||u.disconnect(),(m=(p=document.fonts)==null?void 0:p.removeEventListener)==null||m.call(p,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function cn(t,e,n){const o=is(),r=In(s=>{var i;return(i=Eo(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const Nn=()=>{var t;return(t=Ee())==null?void 0:t.language};function Qi({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=cn(t,"summary",n),i=Nn();return yt(s,i).text?f(zm,{children:f(Wc,{as:e,markup:s,language:i,className:Tt("clover-summary",o),...r})}):null}function Wm({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=cn(t,"metadata",e),i=Nn();return f(Uc,{metadata:s,language:i,renderValue:o,className:Tt("clover-metadata",n),...r})}function Um({of:t="manifest",value:e,className:n,...o}){const r=cn(t,"requiredStatement",e),s=Nn();return f(Uc,{metadata:r?[r]:null,language:s,className:Tt("clover-required-statement",n),...o})}function jm({of:t="manifest",value:e,className:n,...o}){const r=cn(t,"rights",e);return r?f("a",{href:r,className:Tt("clover-rights",n),...o,children:r}):null}function Vm({of:t="manifest",value:e,className:n,...o}){const r=cn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Tt("clover-id",n),...o,children:r}):null}function jc({property:t,className:e,of:n="manifest",value:o,...r}){const s=D(cn(n,t,o)),i=Nn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=yt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:kn(c),...lt(l.text?l.lang:void 0),children:l.text?On(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const qm=({className:t,...e})=>f(jc,{property:"homepage",className:Tt("clover-homepage",t),...e}),Km=({className:t,...e})=>f(jc,{property:"seeAlso",className:Tt("clover-see-also",t),...e});function Zm({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=In(g=>Eo(g,t),null),i=e??s,a=Nn(),c=i?as(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[u,d]=H(c==null?void 0:c.src),h=(m=Ee())==null?void 0:m.clover.request;if(F(()=>{if(!c)return d(void 0);if(c.src)return d(c.src);let g=true;return cs(c,n,h).then(b=>g&&d(b)),()=>{g=false}},[l,n]),!u)return null;const p=yt(i==null?void 0:i.label,a);return f("img",{src:u,alt:On(p.text),...lt(r.alt===void 0&&p.text?p.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Tt("clover-thumbnail",o),...r})}const Gm=typeof window>"u"?F:Dt,Vc=ae(null),Xm=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},Ym=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>D(t[e]).length>0),Lr=t=>!!t&&typeof t.id=="string",Jm=t=>{const e=D(t.homepage).find(Lr);return e?{id:e.id,hrefLang:kn(e)}:void 0},Qm=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=D(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=yt(o,e);if(r.text)return{text:On(r.text),lang:r.lang}}return null};function qc({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=In(u=>{var d;return(d=Eo(u,t))==null?void 0:d.provider},void 0),a=(l=Ee())==null?void 0:l.language,c=D(e!==void 0?e:i).filter(Ym);return c.length?f("ul",{className:Tt("clover-provider",r),...s,children:c.map((u,d)=>{const h=n?Jm(u):void 0,p=!!yt(u.label,a).text;return f(tg,{agent:u,homepage:h,children:o??f(Ct,{children:[f(Kc,{alt:p?"":void 0}),f(Je,{className:"clover-provider-label"})]})},u.id??d)})}):null}function tg({agent:t,homepage:e,children:n}){const o=R(null),[r,s]=H(null),i=dt(()=>{o.current&&!Xm(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(Pc.Provider,{value:t,children:f(Vc.Provider,{value:i,children:e?f("a",{ref:o,href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:e.hrefLang,className:"clover-provider-link",children:n}):f("span",{ref:o,className:"clover-provider-content",children:n})})})})}function Kc({of:t="manifest",value:e,alt:n,className:o,...r}){var h;const{t:s,langOf:i}=Pt(),a=is(),c=In(p=>{var m;return(m=Eo(p,t))==null?void 0:m.provider},void 0),l=(h=Ee())==null?void 0:h.language,d=(e!==void 0?D(e):a?[a]:D(c)).flatMap(p=>{if(!p||typeof p!="object")return[];const m=p;if(m.type!=="Agent"&&Lr(m)&&!m.logo)return[{image:m,agent:null}];const g=D(m.logo).find(Lr);return g?[{image:g,agent:m}]:[]});return d.length?f(Ct,{children:d.map(({image:p,agent:m},g)=>{const b=Qm(m,l);return f(eg,{src:p.id,alt:n??(b==null?void 0:b.text)??s("logo"),...lt(n!==void 0?void 0:b?b.lang:i("logo")),width:p.width,height:p.height,loading:"lazy",decoding:"async",className:Tt("clover-logo",o),...r},`${p.id}-${g}`)})}):null}function eg({alt:t,onError:e,...n}){const o=zt(Vc),[r,s]=H(false),i=dt(()=>s(true),[]);Gm(()=>{r&&(o==null||o())},[r,o]);const a=dt(c=>{var l;c!=null&&c.complete&&!c.naturalWidth&&((l=c.decode)==null||l.call(c).catch(i))},[i]);return r?null:f("img",{ref:a,alt:t,onError:c=>{e==null||e(c),i()},...n})}function ng(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=Wr(t,e);return o==="none"?t[0]:o}const og=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&yt({[e]:t[e]}).text):[];function rg(t){if(!t)return[];const e=[...Array.isArray(t.metadata)?t.metadata:[],t.requiredStatement].filter(Boolean),o=[t.label,t.summary,...e.flatMap(r=>[r==null?void 0:r.label,r==null?void 0:r.value])].map(og).filter(r=>r.length>1);return[...new Set(o.flat())]}function Zc(){const{language:t,chooseLanguage:e}=ce("About"),n=rt(s=>s.manifest),o=gt(()=>rg(n),[n]),r=ng(o,t);return r&&e?{languages:o,chosen:r,onChange:e}:null}const sg=pt(()=>import("./LanguageChoice-BmO-322r.mjs").then(t=>({default:t.LanguageChoice}))),Gc=ae(false);function ig({part:t}){const e=Zc();return e?f(_t,{fallback:null,children:f(sg,{...e,nameKey:"readingLanguage",part:t})}):null}function ta(t,e){const n=new Set,o=[];for(const r of t)for(const s of D(r==null?void 0:r.rendering)){const i=(s==null?void 0:s.id)??(s==null?void 0:s["@id"]);if(typeof i!="string"||n.has(i))continue;n.add(i);const a=yt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:kn(s)})}return o}function Xc(){const{language:t}=ce("Download"),e=rt(o=>o.manifest),n=rt(o=>Re(o.manifest,o.canvasId));return{page:ta(n,t),all:ta([e],t)}}const ag=pt(()=>import("./Download-CL4IClAD.mjs").then(({DownloadGroups:t})=>({default:t}))),cg=pt(()=>import("./NavDate-BZgeaMG9.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),lg=pt(()=>import("./PartOfManifest-DXnbEPzS.mjs"));function ug({languages:t=true,...e}){const n=zt(Gc);return f(dg,{...e,download:!n&&e.download!==false,choice:n||!t?null:f(ig,{part:"clover-about"})})}function dg({choice:t,canvasSummary:e=false,headingLevel:n=3,download:o=true,thumbnail:r=true,label:s=true,className:i,...a}){const{t:c,langOf:l}=Pt(),u=Xc(),d=rt(v=>v.manifest,Object.is,"About"),h=R(null);F(()=>{const v=h.current,w=v==null?void 0:v.querySelector(".clover-about-head");if(!v||!w||typeof ResizeObserver>"u")return;const _=new Set,x=()=>{const O=w.querySelector(".clover-about-thumbnail"),z=w.querySelector(".clover-about-label");for(const Z of[O,z])Z&&!_.has(Z)&&(_.add(Z),T.observe(Z));const J=v.style;if(!O){J.removeProperty("--clover-about-label-height"),J.removeProperty("--clover-about-thumbnail-width");return}const tt=`${(z==null?void 0:z.offsetHeight)??0}px`,Y=`${O.offsetWidth}px`;J.getPropertyValue("--clover-about-label-height")!==tt&&J.setProperty("--clover-about-label-height",tt),J.getPropertyValue("--clover-about-thumbnail-width")!==Y&&J.setProperty("--clover-about-thumbnail-width",Y)};let k=0;const T=new ResizeObserver(()=>{cancelAnimationFrame(k),k=requestAnimationFrame(x)});return T.observe(w),x(),()=>{cancelAnimationFrame(k),T.disconnect(),v.style.removeProperty("--clover-about-label-height"),v.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,d]);const p=le(),m=()=>{var _,x;const v=h.current;(x=((_=v==null?void 0:v.closest(".clover-sections-item"))==null?void 0:_.querySelector(".clover-sections-button"))??v)==null||x.focus({preventScroll:true})};if(!d)return null;const g=(v,w,_)=>{if(!w)return null;const{as:x,title:k,group:T}=Bc(n,`${p}-${v}`);return f("section",{className:"clover-about-section",...T,children:[f(x,{className:"clover-about-heading",...lt(l(v)),...k,children:c(v)}),_]})},b=v=>Array.isArray(d[v])?d[v].length>0:!!d[v];return f("div",{ref:h,className:Tt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(Zm,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(Je,{as:us(n),className:"clover-about-label clover-title"})]}),e&&f(Qi,{of:"canvas",className:"clover-about-summary"}),bi(d)&&d.partOf&&f(_t,{fallback:null,children:f(lg,{manifest:d,headingLevel:n,onOpened:m})}),f(Qi,{className:"clover-about-summary"}),f(Wm,{className:"clover-about-metadata"}),f(Um,{className:"clover-about-metadata"}),g("aboutDate",Ac(d.navDate),f(_t,{fallback:null,children:f(cg,{value:d.navDate,className:"clover-about-date"})})),g("aboutProvider",b("provider"),f(qc,{})),g("aboutRights",d.rights,f(jm,{})),g("aboutHomepage",b("homepage"),f(qm,{})),g("aboutSeeAlso",b("seeAlso"),f(Km,{})),g("download",o&&u.page.length+u.all.length>0,f(_t,{fallback:null,children:f(ag,{page:u.page,all:u.all,headingLevel:n+1})})),g(bi(d)?"aboutCanvas":"aboutManifest",d.id,f(Vm,{}))]})}const fg=pt(()=>import("./LanguageChoice-BmO-322r.mjs").then(t=>({default:t.LanguageChoice}))),hg=pt(()=>import("./ControlMenu-BsEpff6N.mjs")),pg=pt(()=>import("./Download-CL4IClAD.mjs").then(({DownloadGroups:t})=>({default:t})));function mg({languages:t=true,download:e=true}){const n=Zc(),{page:o,all:r}=Xc(),s=e&&o.length+r.length>0;return!(t&&n)&&!s?null:f("div",{className:"clover-about-actions",children:[s&&f(gg,{page:o,all:r}),t&&n&&f(_t,{fallback:null,children:f(fg,{...n,nameKey:"readingLanguage",part:"clover-about"})})]})}function gg({page:t,all:e}){const{t:n,langOf:o}=Pt(),[r,s]=H(false),a=`${le()}-download`,c=dt(l=>{var u;s(false),l&&((u=document.getElementById(a))==null||u.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const u=l.relatedTarget;r&&u&&!l.currentTarget.contains(u)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...lt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(vg,{}),f(Fe,{label:n("download")})]}),r&&f(_t,{fallback:null,children:f(hg,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(pg,{page:t,all:e,inPopover:true})})})]})}function vg(){return f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false",fill:"none",stroke:"currentColor",strokeWidth:"56",strokeLinecap:"round",strokeLinejoin:"round",children:f("path",{d:"M256 64v272M160 240l96 96 96-96M80 352v48a48 48 0 0 0 48 48h256a48 48 0 0 0 48-48v-48"})})}function yg(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of At(t).canvases){if(n.navPlace)return true;for(const o of D(n.annotations))for(const r of D(o==null?void 0:o.items))if(r!=null&&r.navPlace||D(r==null?void 0:r.motivation).includes("georeferencing")||D(r==null?void 0:r.body).some(i=>(i==null?void 0:i.type)==="Feature"||(i==null?void 0:i.type)==="FeatureCollection"))return true}return false}const bg=["about","targets","collection","contents","search","map","transcript","annotations"],Le={targets:t=>{var e;return(((e=t.targets)==null?void 0:e.items.length)??0)>1},collection:t=>{var e,n;return(((n=(e=t.collection)==null?void 0:e.items)==null?void 0:n.length)??0)>0||!!ju(t.manifest)},contents:t=>Ih(t.manifest).length>0,search:t=>!!Ha(t.manifest),map:t=>yg(t.manifest,t.collection),transcript:t=>Re(t.manifest,t.canvasId).some(e=>hc(e).length>0||jf(e).length>0),annotations:t=>id(t.manifest,t.addedSets).length>0},_g=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return bg.filter(o=>t[o]&&(!n||n.has(o)))};function ds(t){const e={about:true,targets:rt(Le.targets),collection:rt(Le.collection),contents:rt(Le.contents),search:rt(Le.search),map:rt(Le.map),transcript:rt(Le.transcript),annotations:rt(Le.annotations)};return _g(e,t)}function wg({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Tt("clover-chevron",e),"data-open":t||void 0,children:f("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Yc=typeof window>"u"?F:Dt,Jc=ae(null);function Zv(){return zt(Jc)}const Qc=ae(0);function Gv(){return zt(Qc)}function xg({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var Z;const a=le(),c=So(r??"",s,r===void 0),l=R([]),u=e==="tabs",{t:d,langOf:h}=Pt(),p=$c({dragFree:true,itemCount:t.length}),m=t.some(C=>C.value===n)?n:((Z=t[0])==null?void 0:Z.value)??null,g=R(new Set);m&&g.current.add(m);const b=R(null),[v,w]=H({value:null,count:0});F(()=>{var X;if(u||!m||b.current!==m)return;b.current=null;const C=t.findIndex(et=>et.value===m),S=document.getElementById(`${a}-panel-${C}`),N=(X=l.current[C])==null?void 0:X.parentElement;if(!S||!N)return;const j=N.getBoundingClientRect().bottom-S.getBoundingClientRect().top;if(j<=0)return;const G=ar(S);G&&(G.scrollTop-=j)},[m,u,t,a]);const _=C=>{var ct,y,E,L;const S=t.findIndex($=>$.value===m),N=document.getElementById(`${a}-panel-${S}`),j=C.target;if(!N||j===N||!N.contains(j)||!kg(j))return;const G=(y=(ct=l.current[S])==null?void 0:ct.parentElement)==null?void 0:y.getBoundingClientRect(),X=S+1<t.length?(L=(E=l.current[S+1])==null?void 0:E.parentElement)==null?void 0:L.getBoundingClientRect():void 0;if(!G)return;const et=j.getBoundingClientRect(),xt=et.top<G.bottom?Math.floor(et.top-G.bottom):X&&et.bottom>X.top?Math.ceil(Math.min(et.bottom-X.top,et.top-G.bottom)):0,at=xt?ar(N):null;at&&(at.scrollTop+=xt)},x=R(null),k=t.map(C=>C.value).join(`
|
|
29
|
-
`);Yc(()=>{const C=x.current;if(u||!C||typeof ResizeObserver>"u")return;const S=[...C.querySelectorAll(":scope > .clover-sections-item")],N=S.map(A=>A.firstElementChild),j=N[0],G=N[N.length-1],X=new Map,et=A=>(A&&X.get(A))??0,xt=document.scrollingElement;let at=null,ct=0;const y=()=>{const A=N.reduce((mt,ht)=>mt+et(ht),0);let I=0;S.forEach((mt,ht)=>{mt.style.setProperty("--clover-sections-before",`${I}px`),I+=et(N[ht]),mt.style.setProperty("--clover-sections-after",`${A-I}px`)}),C.style.setProperty("--clover-sections-total",`${A}px`);const U=j&&getComputedStyle(j);(U==null?void 0:U.position)==="sticky"&&G&&(ct=parseFloat(U.top)+parseFloat(getComputedStyle(G).bottom)||0);const V=getComputedStyle(C),St=parseFloat(V.lineHeight)||1.2*parseFloat(V.fontSize),Q=(at==null?void 0:at.clientHeight)??0;Q>0&&Q-ct-A<2*St?C.dataset.stacks="off":delete C.dataset.stacks},E=new ResizeObserver(A=>{var I,U;for(const V of A)N.includes(V.target)&&X.set(V.target,((U=(I=V.borderBoxSize)==null?void 0:I[0])==null?void 0:U.blockSize)??V.target.getBoundingClientRect().height);y()}),L=()=>{const A=ar(C);A!==at&&(at&&at!==xt&&E.unobserve(at),A&&A!==xt&&E.observe(A),at=A)},$=()=>{L(),y()};L();for(const A of N)A&&E.observe(A,{box:"border-box"});return window.addEventListener("resize",$),()=>{E.disconnect(),window.removeEventListener("resize",$);for(const A of S)A.style.removeProperty("--clover-sections-before"),A.style.removeProperty("--clover-sections-after");C.style.removeProperty("--clover-sections-total"),delete C.dataset.stacks}},[u,k,i]),F(()=>{if(u)return;const C=l.current.map(N=>N==null?void 0:N.parentElement).filter(N=>!!N),S=N=>{var et;if(N.ctrlKey)return;const j=N.currentTarget,G=ea(j);if(!G||G===document.scrollingElement)return;N.preventDefault();const X=N.deltaMode===1?parseFloat(getComputedStyle(j).lineHeight)||16:N.deltaMode===2?G.clientHeight:1;(et=ea(G)??document.scrollingElement)==null||et.scrollBy({left:N.deltaX*X,top:N.deltaY*X,behavior:"instant"})};for(const N of C)N.addEventListener("wheel",S,{passive:false});return()=>{for(const N of C)N.removeEventListener("wheel",S)}},[u,k]);const T=C=>{C!==m&&(b.current=C,u||w(S=>({value:C,count:S.count+1})),o==null||o(C))},O=(C,S)=>{var et;const N=t.length-1,[j,G]=u?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],X=C.key===G?(S+1)%t.length:C.key===j?(S-1+t.length)%t.length:C.key==="Home"?0:C.key==="End"?N:null;X!==null&&(C.preventDefault(),(et=l.current[X])==null||et.focus(),u&&T(t[X].value))},z=R(false);F(()=>{if(!u)return;const C=t.findIndex(at=>at.value===m),S=l.current[C],N=S==null?void 0:S.parentElement;if(!S||!N)return;const j=getComputedStyle(N),G=N.getBoundingClientRect(),X=S.getBoundingClientRect(),et=G.left+(parseFloat(j.scrollPaddingLeft)||0),xt=G.right-(parseFloat(j.scrollPaddingRight)||0);(X.left<et-1||X.right>xt+1)&&p.scrollToIndex(C,{instant:!z.current}),z.current=true},[m,u,t.length,p.scrollToIndex]);const J=C=>{const S=C==="prev"?p.canScrollPrev:p.canScrollNext,N=C==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${C}`,"aria-hidden":"true",tabIndex:-1,hidden:!S,...lt(h(N)),onMouseDown:j=>j.preventDefault(),onClick:C==="prev"?p.scrollPrev:p.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:C==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Fe,{label:d(N)})]})},tt=us(i,"div"),Y=(C,S)=>{const N=C.value===m;return f("button",{ref:j=>{l.current[S]=j},type:"button",id:`${a}-button-${S}`,className:"clover-sections-button","data-value":C.value,"data-track-index":u?S:void 0,"aria-controls":`${a}-panel-${S}`,...u?{role:"tab","aria-selected":N,tabIndex:N?0:-1}:{"aria-expanded":N,"aria-disabled":N||void 0},onClick:()=>T(C.value),onKeyDown:j=>O(j,S),children:[f("span",{className:"clover-sections-label",children:C.label}),!u&&f(wg,{open:N,className:"clover-sections-chevron"})]},C.value)};return f("div",{ref:x,className:"clover-sections","data-layout":e,onFocus:u?void 0:_,style:u?void 0:{"--clover-sections-count":t.length},children:[u&&f("div",{className:"clover-sections-tabs","data-more":[p.canScrollPrev&&"start",p.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:p.ref,...c.props,className:"clover-sections-list",children:t.map(Y)}),J("prev"),J("next")]})}),u&&c.node,t.map((C,S)=>{const N=C.value===m;return f("section",{className:"clover-sections-item","data-value":C.value,"data-open":N,style:u?void 0:{"--clover-sections-index":S},children:[!u&&f(tt,{className:"clover-sections-heading",children:[Y(C,S),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(Qc.Provider,{value:v.value===C.value?v.count:0,children:f(Sg,{id:`${a}-panel-${S}`,tabs:u,labelledBy:`${a}-button-${S}`,hidden:!N,actions:C.actions,children:g.current.has(C.value)?C.content:null})})]},C.value)})]})}function Sg({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=H(null),c=!o||!!r;return Yc(()=>{const l=i==null?void 0:i.parentElement;if(!c||!i||!l||typeof ResizeObserver>"u")return;const u=new ResizeObserver(()=>{const d=i.offsetWidth;d?(l.style.setProperty("--clover-sections-actions",`${d}px`),l.setAttribute("data-actions","")):(l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions"))});return u.observe(i),()=>{u.disconnect(),l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions")}},[i,c]),f(Ct,{children:[!e&&f("div",{ref:a,className:"clover-sections-actions",hidden:!c,children:r}),f("div",{id:t,role:e?"tabpanel":"region","aria-labelledby":n,tabIndex:e?0:void 0,className:"clover-sections-panel",hidden:o,children:f(Jc.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function ar(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(e).overflowY))return e;return document.scrollingElement}function ea(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll/.test(getComputedStyle(e).overflowY)&&e.scrollHeight>e.clientHeight)return e;return document.scrollingElement}function kg(t){try{return t.matches(":focus-visible")}catch{return true}}const Cg=pt(()=>import("./MapView-Df0wZjCh.mjs").then(t=>({default:t.RootMap}))),Eg=pt(()=>import("./Collection-DjY_6qa6.mjs").then(t=>({default:t.Collection}))),Mg=pt(()=>import("./TargetItems-B6Icep5k.mjs").then(t=>({default:t.TargetsSection}))),Tg=pt(()=>import("./Contents-DV-VxXuf.mjs").then(t=>({default:t.Contents}))),Ig=pt(()=>import("./Search-DTg1cHZ3.mjs").then(t=>({default:t.Search}))),Pg=pt(()=>import("./Transcript-rTAhuXCF.mjs").then(t=>({default:t.Transcript}))),Lg=pt(()=>import("./Annotations-CZzOZAFP.mjs").then(t=>({default:t.Annotations}))),Ae=t=>f(_t,{fallback:null,children:t}),Ag=()=>null,Og=te(function({layout:e="tabs",value:n,defaultValue:o,onValueChange:r,onClose:s,closeOnEscape:i=false,headingLevel:a=3,as:c="aside",download:l=true,languages:u=true,sections:d,labels:h,className:p,children:m,onKeyDown:g,...b},v){var A;const{clover:w}=ce("Panel"),_=R(null),{t:x,langOf:k,hostLanguage:T,i18n:O}=Pt(),z=So(x("informationPanelTabs"),k("informationPanelTabs"),!!(b["aria-label"]||b["aria-labelledby"])||!(["aside","section","nav"].includes(c)||b.role)),J=I=>{const U=k(I);return U?f("span",{...lt(U),children:x(I)}):x(I)},tt=(I,U)=>{const V=h==null?void 0:h[I];if(V===void 0)return J(U);if(typeof V=="string")return V;const St=Object.keys(V),Q=Wr(St,O.language);if(!Q)return J(U);const mt=yo(Q,T);return mt?f("span",{...lt(mt),children:V[Q]}):V[Q]},Y=ds(d),Z=I=>Y.includes(I),C=re.Children.toArray(m).filter(I=>re.isValidElement(I)&&I.type===Ag),S=e==="accordion"?a+1:a,N=u||l?f(mg,{languages:u,download:l}):void 0,j=C.length?C.map(({props:I})=>({value:I.value,label:I.label,content:I.children,...I.value==="about"&&{actions:N}})):[...Z("about")?[{value:"about",label:tt("about","informationPanelTabsAbout"),content:f(ug,{headingLevel:S,download:l}),actions:N}]:[],...Z("targets")?[{value:"targets",label:tt("targets","informationPanelTabsTargets"),content:Ae(f(Mg,{headingLevel:S}))}]:[],...Z("collection")?[{value:"collection",label:tt("collection","informationPanelTabsCollection"),content:Ae(f(Eg,{headingLevel:S}))}]:[],...Z("contents")?[{value:"contents",label:tt("contents","informationPanelTabsContents"),content:Ae(f(Tg,{}))}]:[],...Z("search")?[{value:"search",label:tt("search","informationPanelTabsSearch"),content:Ae(f(Ig,{headingLevel:S,sticky:true,size:"small"}))}]:[],...Z("map")?[{value:"map",label:tt("map","informationPanelTabsMap"),content:Ae(f(Cg,{}))}]:[],...Z("transcript")?[{value:"transcript",label:tt("transcript","transcriptLabel"),content:Ae(f(Pg,{sticky:true,size:"small"}))}]:[],...Z("annotations")?[{value:"annotations",label:tt("annotations","informationPanelTabsAnnotations"),content:Ae(f(Lg,{headingLevel:S}))}]:[]],G=rt(I=>I.search.query),X=j.some(I=>I.value==="search"),[et,xt]=H(()=>G&&X?"search":o??null),at=R(G&&X?G:"");F(()=>{X&&(G&&G!==at.current&&n===void 0&&xt("search"),at.current=G)},[G,X,n]);const ct=rt(I=>{var U;return I.annotationId&&((U=I.regions)!=null&&U.entries.some(V=>V.id===I.annotationId))?I.annotationId:null}),y=j.some(I=>I.value==="contents");F(()=>{ct&&y&&n===void 0&&xt("contents")},[ct,y,n]);const E=n!==void 0?n:et,L=(j.some(I=>I.value===E)?E:(A=j[0])==null?void 0:A.value)==="search";if(F(()=>{X&&w.setSetVisible(qr,L)},[w,X,L]),!j.length)return null;const $=()=>{var U;const I=_.current;I!=null&&I.contains(document.activeElement)&&((U=Ng(I))==null||U.focus()),s==null||s()};return f(c,{ref:I=>{_.current=I,typeof v=="function"?v(I):v&&(v.current=I)},className:Tt("clover-panel",p),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...z.props,onKeyDown:I=>{g==null||g(I),i&&s&&I.key==="Escape"&&!I.defaultPrevented&&(I.preventDefault(),$())},...b,children:[z.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":x("informationPanelClose"),...lt(k("informationPanelClose")),onClick:$,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(nc,{})}),f(Fe,{label:x("informationPanelClose")})]}),f(Gc.Provider,{value:j.some(I=>I.value==="about"),children:f(xg,{items:j,layout:e,value:n!==void 0?n:et,onValueChange:I=>{n===void 0&&xt(I),r==null||r(I)},label:x("informationPanelTabs"),labelLang:k("informationPanelTabs"),headingLevel:a})})]})});function Ng(t){for(let e=t;e&&e!==document.body;e=e.parentElement){if(!e.id)continue;const n=document.querySelector(`[aria-controls~="${e.id.replace(/["\\]/g,"\\$&")}"]`);if(n)return n}return null}const Rg=1,Bg=4,$g=8,Fg=500,Dg=4,na=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],tl=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function oo(t,e){if(t===void 0)return;if(typeof t=="number")return t;const n=parseFloat(t);if(!Number.isNaN(n))return t.endsWith("rem")?n*tl():t.endsWith("%")?n/100*e:n}const cr=t=>typeof t=="number"?`${t}px`:t,zg=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},Hg=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Wg=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function Ug(t){const e=i=>{let a=t[i];for(;a&&!a.classList.contains("clover-split-pane");)a=a[i];return a},n=e("previousElementSibling"),o=e("nextElementSibling"),r=o!=null&&o.hasAttribute("data-sized")?o:n!=null&&n.hasAttribute("data-sized")?n:null;return{sized:r,other:r===o?n:o}}function jg(t,e,n){const{sized:o,other:r}=Ug(t);if(!o)return null;const s=e.clientWidth,i=o.dataset.splitKey??"",a=n[i]??{},c=n[(r==null?void 0:r.dataset.splitKey)??""]??{},l=oo(a.min,s)??0,d=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(oo(c.min,s)??0),h=Math.max(l,Math.min(oo(a.max,s)??d,d)),p=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:h,after:p}}function Vg(t,e,n){const o=e!==void 0&&e>t.min+1&&e<t.max-1?[t.min,e,t.max]:[t.min,t.max],r=n??e??t.sized.getBoundingClientRect().width,s=o.find(i=>i>r+1)??o[0];return{to:s,own:e!==void 0&&Math.abs(s-e)<=1}}function qg(t,e){const n=e.sized.getBoundingClientRect().width,o=Rg*tl()*(t.shiftKey?4:1),r=e.after?"ArrowLeft":"ArrowRight",s=e.after?"ArrowRight":"ArrowLeft";if(t.key===r)return n+o;if(t.key===s)return n-o;if(t.key==="Home")return e.min;if(t.key==="End")return e.max}function oa(t){var n,o,r;const e=(o=(n=t.target)==null?void 0:n.closest)==null?void 0:o.call(n,".clover-tip");return!!(e&&((r=t.currentTarget)!=null&&r.contains(e)))}function Kg(t,e){let n=null,o=false,r=null,s=null;const i=a=>{s==null||s();const c=t(),l=c==null?void 0:c.ownerDocument.defaultView;if(!c||!l)return;const u=g=>Math.hypot(g.clientX-a.x,g.clientY-a.y)>a.reach,d=()=>{na.forEach(g=>l.removeEventListener(g,h,true)),l.removeEventListener("pointermove",p,true),clearTimeout(m),s=null},h=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&u(g))return d();g.preventDefault(),g.stopPropagation()}},p=g=>u(g)&&d();na.forEach(g=>l.addEventListener(g,h,true)),l.addEventListener("pointermove",p,true);const m=setTimeout(d,Fg);s=d};return{down(a){var u;if(o=false,r=null,a.defaultPrevented||a.button!==0||oa(a))return;const c=e().limits();if(!c)return;a.preventDefault(),n={found:c,x:a.clientX,from:c.sized.getBoundingClientRect().width,slop:a.pointerType==="touch"?$g:Bg,moved:false};const l=a.currentTarget;l.dataset.dragging="",(u=l.setPointerCapture)==null||u.call(l,a.pointerId)},move(a){const c=n;if(!c)return;const l=a.clientX-c.x;!c.moved&&Math.abs(l)<c.slop||(c.moved=true,e().resize(c.from+(c.found.after?-l:l)))},up(a){const c=n;o=(c==null?void 0:c.moved)??false,r=c&&!c.moved&&a.type==="pointerup"?{x:a.clientX,y:a.clientY,reach:c.slop*Dg}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||oa(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=qg(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const fs=ae(null);function hs(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Zg=te(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=R(null),l=R({}),[u,d]=H({});F(()=>d(zg(n)),[n]);const h=dt((m,g)=>d(b=>{const v={...b};return g===void 0?delete v[m]:v[m]=Math.round(g),Hg(n,v),v}),[n]),p=gt(()=>({sizes:u,setSize:h,specs:l,element:c}),[u,h]);return f(fs.Provider,{value:p,children:f(e,{ref:m=>{c.current=m,hs(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),el=te(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},u){const d=zt(fs),h=R(null),[p,m]=H(s??"");F(()=>{if(s)return m(s);const b=Wg(d==null?void 0:d.element.current);m(String(b.indexOf(h.current)))},[s,d]),d&&p&&(d.specs.current[p]={min:o,max:r,size:n});const g=d&&p?d.sizes[p]:void 0;return f(e,{ref:b=>{h.current=b,hs(u,b)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":p||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:cr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:cr(n),"--clover-split-max":cr(r),...a},...l,children:c})}),Gg=te(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=zt(fs),{t:l,langOf:u}=Pt(),d=R(null),[h,p]=H(),m=dt(()=>{const T=d.current,O=c==null?void 0:c.element.current;return!T||!O||!c?null:jg(T,O,c.specs.current)},[c]),g=dt(T=>{const O=m();if(!O||!c)return;const z=Math.min(O.max,Math.max(O.min,T));c.setSize(O.key,z),p({now:z,min:O.min,max:O.max})},[m,c]),b=dt(()=>{const T=m();T&&p({now:T.sized.getBoundingClientRect().width,min:T.min,max:T.max})},[m]);F(()=>{const T=c==null?void 0:c.element.current;if(b(),!T||typeof ResizeObserver>"u")return;let O=0;const z=new ResizeObserver(()=>{cancelAnimationFrame(O),O=requestAnimationFrame(b)});return z.observe(T),()=>{cancelAnimationFrame(O),z.disconnect()}},[b,c,c==null?void 0:c.sizes]);const v=T=>{var O;return Math.round(T/(((O=c==null?void 0:c.element.current)==null?void 0:O.clientWidth)||1)*100)},w=()=>{var tt,Y;const T=m();if(!T||!c)return;const O=((tt=c.element.current)==null?void 0:tt.clientWidth)??0,z=oo((Y=c.specs.current[T.key])==null?void 0:Y.size,O),J=Vg(T,z,c.sizes[T.key]);if(!J.own)return g(J.to);c.setSize(T.key,void 0),p({now:z,min:T.min,max:T.max})},_=R({limits:m,resize:g,step:w});_.current={limits:m,resize:g,step:w};const[x]=H(()=>Kg(()=>d.current,()=>_.current));F(()=>()=>x.dispose(),[x]);const k=i["aria-label"]??l("splitHandle");return f("div",{ref:T=>{d.current=T,hs(a,T)},role:"separator","aria-orientation":"vertical","aria-label":k,...lt(i["aria-label"]===void 0?u("splitHandle"):void 0),"aria-valuenow":h?v(h.now):void 0,"aria-valuemin":h?v(h.min):void 0,"aria-valuemax":h?v(h.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:T=>{o==null||o(T),x.down(T)},onPointerMove:T=>x.move(T),onPointerUp:T=>x.up(T),onPointerCancel:T=>x.up(T),onClick:T=>{r==null||r(T),x.click(T)},onKeyDown:T=>{s==null||s(T),x.key(T)},...i,children:[n,f(Fe,{label:k})]})});let nl;function Xg(t){nl=t}function Xv(){return nl}function Yg({open:t,onOpenChange:e,controls:n}){const{t:o,langOf:r}=Pt(),s=le().replace(/:/g,"");return f(Ne,{id:`panel-${s}`,label:o("informationPanelToggle"),lang:r("informationPanelToggle"),expanded:t,controls:n,onClick:()=>e(!t),children:f(Ct,{children:[f("rect",{x:"64",y:"96",width:"384",height:"320",rx:"40",fill:"none",strokeWidth:"36"}),f("path",{d:"M320 96v320",fill:"none",strokeWidth:"36"}),t&&f("path",{d:"M320 96h88a40 40 0 0 1 40 40v240a40 40 0 0 1-40 40h-88z"})]})})}let Jg,ro;const ol=()=>Jg??(Jg=import("./dragToClose-Co9kGk9q.mjs").then(t=>ro=t));function Qg(){ol()}function tv(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=R({enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i});a.current={enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i},F(()=>{const c=t.current;if(!c||(ro==null||ro.reset(c,a),!e))return;let l=true,u;return ol().then(d=>{l&&(u=d.attach(c,a))}),()=>{l=false,u==null||u()}},[t,e])}const ev=240,nv="16rem",ov="14rem",rv=31;function sv(t){const[e,n]=H(t),[o,r]=H(t);return F(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),ev);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function iv(t){const e=n=>t.querySelector(n);return e('[role="tab"][aria-selected="true"]')??e('.clover-sections-button[aria-expanded="true"]')??e(".clover-sections-button")}const av=typeof window>"u"?F:Dt;function cv(t,e){const[n,o]=H();return av(()=>{const r=t.current;if(!r)return;const s=()=>{const a=r.clientWidth;if(!a)return;const c=parseFloat(getComputedStyle(document.documentElement).fontSize);o(a>=e*(c||16))};if(s(),typeof ResizeObserver>"u")return;const i=new ResizeObserver(s);return i.observe(r),()=>i.disconnect()},[t,e]),n}const lv=typeof window>"u"?F:Dt;function uv({id:t,beside:e,defaultOpen:n,side:o,focus:r=iv,slides:s=true,alongside:i,followFocus:a}){var Z,C;const c=R(null),l=R(null),u=e===false,[d,h]=H(n),[p,m]=H(false),g=u?p:d,b=()=>document.querySelector(`button[aria-controls~="${t}"]`),v=()=>a(b),w=()=>{var S,N;(S=c.current)!=null&&S.contains(document.activeElement)&&((N=b())==null||N.focus(),v())},_=R(0),x=S=>{_.current=u&&S?3:0,_.current||v(),u&&m(S),h(S)},k=()=>{w(),x(false)},T=R(e),O=R(false);if(T.current===true&&e===false){const S=document.activeElement;O.current=!!(S&&((Z=c.current)!=null&&Z.contains(S)||(C=b())!=null&&C.contains(S)))}lv(()=>{var S;O.current&&(O.current=false,(S=b())==null||S.focus(),v()),e===true&&m(false),T.current=e},[e]);const z=sv(s&&u&&g),J=s&&u,tt=J?z.mounted:g,Y=J?z.open:g;return F(()=>{if(!_.current||!c.current)return;_.current-=1;const S=r(c.current);S==null||S.focus({preventScroll:true}),S&&document.activeElement===S&&(_.current=0)}),tv(c,{enabled:u&&Y,side:o,onClose:k,scrim:l,alongside:i,exits:!s}),{pane:c,over:u,open:g,shown:tt,opened:Y,setOpen:x,close:k,onKeyDown:S=>{u&&g&&S.key==="Escape"&&!S.defaultPrevented&&(S.preventDefault(),k())},scrim:u&&tt&&{ref:l,"data-open":Y,"aria-hidden":true,onMouseDown:S=>S.preventDefault(),onClick:k}}}const dv=typeof window>"u"?F:Dt;function fv(t,e,n){dv(()=>{const o=t.current,r=o==null?void 0:o.parentElement;if(!n||!o||!r)return;const s=()=>{const c=e();o.style.setProperty("--clover-template-spine-top",`${c?c.getBoundingClientRect().top-r.getBoundingClientRect().top:0}px`)};s();const i=new ResizeObserver(s);for(const c of Array.from(r.children))i.observe(c);const a=e();return a&&i.observe(a),()=>i.disconnect()},[t,n])}function hv({id:t,beside:e,defaultOpen:n,followFocus:o,body:r,sections:s,panel:i,load:a}){const c=uv({id:t,beside:e,defaultOpen:n,side:"end",followFocus:o}),l=!c.over&&c.open,u=R(null);fv(u,()=>r==null?void 0:r(),l&&!!r);const d=p=>{var m,g;(g=(m=p.target).closest)!=null&&g.call(m,`[aria-controls~="${t}"]`)&&(i||a==null||a(),c.over&&Qg())},h=f(pv,{sections:s,open:c.open,onOpenChange:p=>p&&!i&&a?a().then(()=>c.setOpen(true)):c.setOpen(p),controls:t});return{...c,id:t,docked:l,spine:u,toggle:h,Part:i,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:d,onFocus:d}}}function pv({sections:t,...e}){return ds(t).length?f(Yg,{...e}):null}function mv({pane:t,className:e,...n}){const{id:o,over:r,docked:s,Part:i}=t,a=ds(n.sections);return a.length?f(Ct,{children:[s&&f(Gg,{className:"clover-template-panel-handle","aria-controls":o}),s&&f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle}),f(el,{ref:t.pane,id:o,"data-spine":r||void 0,name:"panel","data-about":a.includes("about")||void 0,className:["clover-template-panel clover-template-drawer",e].filter(Boolean).join(" "),size:"24rem",min:r?void 0:ov,"data-open":t.opened,hidden:!t.shown,children:i&&f(i,{...n,onClose:r?t.close:void 0,closeOnEscape:r})}),t.scrim&&f("div",{className:"clover-template-scrim",...t.scrim})]}):null}const gv=30;function vv(){const t=R(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&yv()?r.focus():++n<gv&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function yv(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function bv({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",panelSections:i,panelLabels:a,download:c=true,languages:l=true,items:u="slider",singleItem:d=false,storageKey:h="clover-template-default",fill:p=false,collapseControls:m,...g}){const b=R(null),v=le().replace(/:/g,""),w=`${v}-panel`,_=Bc(n,`${v}-title`),x=hv({id:w,beside:cv(b,rv),defaultOpen:r??true,followFocus:vv(),sections:i,body:()=>{var O;return(O=b.current)==null?void 0:O.querySelector(".clover-template-default-body")},panel:Og}),k=x.over,T=o&&x.docked;return f($d,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":p||void 0,...e?_.group:null,...g,children:f(Zg,{ref:b,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?x.splitProps:{"data-panel":"beside"},children:[f(el,{className:"clover-template-default-main",min:k?void 0:nv,children:[e&&f("header",{className:"clover-template-default-header",children:[f(_v,{title:_}),f(mo,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(qc,{className:"clover-template-default-provider",children:f(Kc,{})})]}),f(Bm,{loading:false}),f(em,{className:"clover-template-default-body",collapseControls:m,children:o&&!T&&x.toggle}),f("div",{className:"clover-template-default-rail",children:[f("div",{className:"clover-template-default-rail-header",children:[f(Sv,{}),f(Rm,{})]}),u&&f(mo,{layout:u,singleItem:d})]})]}),o&&f(mv,{pane:x,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,headingLevel:e?xv(n):n})]})})}function _v({title:t}){const e=rt(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Rh();return wv(n==null?void 0:n.entries[0]),f(Ct,{children:[f(Je,{as:t.as,className:"clover-template-default-title clover-template-title clover-title",...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(Je,{as:"p",label:e,className:"clover-template-default-collection"}),f(mo,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(Je,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(mo,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function wv(t){const{clover:e}=ce(),n=rt(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=R(null);F(()=>{if(!t||!n||o.current===n)return;o.current=n;const{annotationId:r,canvasId:s}=e.store.get();!r&&s===t.canvasId&&e.selectAnnotation(t.id)},[e,t,n])}const xv=t=>t+1;function Sv(){const t=ss();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(re.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(Je,{label:e.label})]},e.id))})}const kv=()=>import("./renderers-BxePmixF.mjs"),Cv=pt(()=>import("./Document-4ZQd3W3o.mjs").then(t=>({default:t.Document}))),Ev=pt(()=>import("./Gallery-F2sVj4ph.mjs").then(t=>({default:t.Gallery}))),ra={default:bv,document:Cv,gallery:Ev},Mv={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["default","document","gallery"],panelSections:["default","document","gallery"],panelLabels:["default","document","gallery"],download:["default","document","gallery"],languages:["default","document","gallery"],storageKey:["default","document","gallery"],defaultSidebarOpen:["document"],size:["gallery"],height:["gallery"],gap:["gallery"],secondary:["gallery"],summary:["gallery"],lightboxItems:["gallery"]};function Tv({props:t}){const e=typeof t.template=="string"&&t.template in ra?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=Mv[i])==null?void 0:a.includes(e))??true)})),o=Ge(kv,!!t.renderers),r=gt(()=>o==null?void 0:o.toRenderers(t.renderers),[o,t.renderers]);if(t.renderers&&!o)return null;n.renderers=r,typeof n.storageKey=="string"&&(n.storageKey=n.storageKey.trim().toLowerCase()==="false"?false:n.storageKey);const s=ra[e];return f(_t,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const Iv=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Pv={mapWorkerUrl:Iv},Lv={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"panel-sections":{prop:"panelSections",type:"data"},"panel-labels":{prop:"panelLabels",type:"data"},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}};Xg(Pv.mapWorkerUrl);Rl(Lv,()=>Promise.resolve(Tv));export{Jl as $,R as A,em as B,Jt as C,el as D,mo as E,Gg as F,nv as G,mv as H,qd as I,Qg as J,rt as K,Je as L,ql as M,Rh as N,Uv as O,Rm as P,Ah as Q,$d as R,Bm as S,gt as T,_t as U,pt as V,Qi as W,ae as X,zt as Y,_d as Z,Dt as _,ce as a,tf as a$,Kv as a0,jr as a1,Dc as a2,zc as a3,kn as a4,Hc as a5,Vu as a6,yt as a7,us as a8,lt as a9,Yf as aA,tc as aB,Ga as aC,Gf as aD,Xf as aE,hf as aF,gc as aG,fd as aH,ts as aI,Fh as aJ,Ri as aK,Xd as aL,sc as aM,Kt as aN,nf as aO,Zf as aP,df as aQ,Ne as aR,zd as aS,Qf as aT,wn as aU,Yd as aV,Vd as aW,Jd as aX,Qd as aY,cc as aZ,ef as a_,At as aa,qa as ab,cd as ac,$e as ad,Pt as ae,So as af,Tt as ag,Nm as ah,te as ai,Om as aj,bo as ak,zr as al,Hr as am,Tn as an,Qh as ao,zi as ap,Di as aq,Cc as ar,ss as as,Bh as at,Hi as au,Vr as av,_o as aw,D as ax,re as ay,uf as az,mu as b,Gu as b$,ju as b0,Vm as b1,qm as b2,Ih as b3,ge as b4,wg as b5,Wv as b6,Dv as b7,Nv as b8,Ha as b9,Wa as bA,on as bB,qr as bC,as as bD,dd as bE,zv as bF,Of as bG,Ee as bH,er as bI,Xr as bJ,Du as bK,Kf as bL,Pf as bM,Wc as bN,rn as bO,Pn as bP,kr as bQ,hv as bR,On as bS,rm as bT,sm as bU,Wr as bV,Jh as bW,In as bX,Xv as bY,Ac as bZ,Xt as b_,Gv as ba,Re as bb,hc as bc,jf as bd,Zc as be,Ba as bf,Zv as bg,id as bh,Zr as bi,Rv as bj,Go as bk,ns as bl,ng as bm,yo as bn,Ge as bo,Mh as bp,ja as bq,xo as br,an as bs,Ya as bt,ev as bu,Xc as bv,bi as bw,Qu as bx,_c as by,Lf as bz,xc as c,Kd as c0,Sd as c1,nd as c2,Da as c3,Vh as c4,Ju as c5,Ff as c6,nc as c7,Bv as c8,$v as c9,Fv as ca,qh as cb,Dp as cc,$i as cd,Dh as ce,zh as cf,Hv as cg,ie as ch,Qt as ci,to as cj,zm as ck,Uc as cl,Og as cm,lc as cn,im as co,Tl as cp,qv as cq,Nh as d,H as e,le as f,jv as g,Vv as h,vv as i,uv as j,Ct as k,cv as l,rv as m,ru as n,Fe as o,qc as p,dt as q,cs as r,cm as s,Bc as t,f as u,nn as v,Kc as w,oe as x,F as y,Zg as z};
|