@nulib/clover 4.0.0-beta.1 → 4.0.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 +7 -7
- package/dist/components/Annotations/Annotations.mjs +165 -204
- package/dist/components/Annotations/EntryBodies.mjs +28 -3
- package/dist/components/Annotations/languages.mjs +1 -17
- package/dist/components/Body/BodyAlert.mjs +2 -1
- package/dist/components/Body/Caption.mjs +2 -1
- package/dist/components/Body/CaptionDetails.mjs +2 -1
- package/dist/components/Body/glyphs.mjs +9 -0
- package/dist/components/Canvas/AnnotationMenu.mjs +76 -60
- package/dist/components/Canvas/AnnotationState.mjs +9 -2
- package/dist/components/Canvas/Annotations.mjs +16 -7
- package/dist/components/Canvas/CanvasView.mjs +173 -32
- package/dist/components/Canvas/ChoiceMenu.mjs +51 -31
- package/dist/components/Canvas/Connected.mjs +38 -4
- package/dist/components/Canvas/ControlMenu.mjs +6 -4
- package/dist/components/Canvas/Controls.mjs +17 -1
- package/dist/components/Canvas/FrameAnimation.mjs +568 -167
- package/dist/components/Canvas/LoadedCanvas.mjs +5 -3
- package/dist/components/Canvas/PlaceBox.mjs +74 -0
- package/dist/components/Canvas/Placeholder.mjs +2 -1
- package/dist/components/Canvas/fromManifest.mjs +2 -1
- package/dist/components/Canvas/layout.mjs +121 -32
- package/dist/components/Canvas/media/MediaBody.mjs +32 -6
- package/dist/components/Canvas/media/Player.mjs +11 -25
- package/dist/components/Canvas/media/Transport.mjs +94 -61
- package/dist/components/Canvas/media/TransportButton.mjs +2 -1
- package/dist/components/Canvas/media/placeMenu.mjs +19 -0
- package/dist/components/Canvas/media/seekGaps.mjs +43 -0
- package/dist/components/Canvas/media/sequence.mjs +96 -0
- package/dist/components/Canvas/media/useMediaElement.mjs +22 -3
- package/dist/components/Collection/Collection.mjs +2 -1
- package/dist/components/CollectionSelect/CollectionSelect.mjs +5 -2
- package/dist/components/Contents/Contents.mjs +163 -34
- package/dist/components/Download/Download.mjs +34 -38
- package/dist/components/Download/downloads.mjs +40 -0
- package/dist/components/Items/AnnotationItems.mjs +165 -0
- package/dist/components/Items/CountMenu.mjs +89 -0
- package/dist/components/Items/Item.mjs +24 -17
- package/dist/components/Items/Items.mjs +65 -37
- package/dist/components/Items/Pager.mjs +39 -79
- package/dist/components/Items/PagerLayout.mjs +41 -0
- package/dist/components/Items/Position.mjs +103 -0
- package/dist/components/Items/StandaloneItems.mjs +12 -4
- package/dist/components/Items/TargetItems.mjs +202 -0
- package/dist/components/Label/Label.mjs +2 -1
- package/dist/components/Map/MapView.mjs +367 -57
- package/dist/components/Panel/About.mjs +36 -7
- package/dist/components/Panel/AboutActions.mjs +117 -0
- package/dist/components/Panel/Panel.mjs +58 -18
- package/dist/components/Panel/PartOfManifest.mjs +4 -3
- package/dist/components/Panel/ReadingLanguages.mjs +20 -0
- package/dist/components/Primitives/Primitives.mjs +18 -3
- package/dist/components/Provider/Provider.mjs +19 -5
- package/dist/components/Root/Announcer.mjs +3 -2
- package/dist/components/Root/Root.mjs +5 -2
- package/dist/components/Root/useRootState.mjs +14 -2
- package/dist/components/Scene/SceneView.mjs +23 -6
- package/dist/components/Search/Search.mjs +3 -2
- package/dist/components/Split/Split.mjs +4 -1
- package/dist/components/Status/Status.mjs +10 -2
- package/dist/components/Timeline/playerSurface.mjs +2 -1
- package/dist/components/Transcript/Transcript.mjs +42 -23
- package/dist/core/annotation-bodies.mjs +25 -5
- package/dist/core/annotation-collection.mjs +3 -2
- package/dist/core/annotation-name.mjs +12 -9
- package/dist/core/annotation-sets.mjs +139 -10
- package/dist/core/annotations-content.mjs +8 -1
- package/dist/core/annotations.mjs +8 -1
- package/dist/core/choice-key.mjs +5 -0
- package/dist/core/clover.mjs +105 -20
- package/dist/core/content-state-reader.mjs +33 -2
- package/dist/core/dates-format.mjs +30 -0
- package/dist/core/dates.mjs +19 -0
- package/dist/core/geo.mjs +46 -5
- package/dist/core/image-layers.mjs +96 -0
- package/dist/core/items.mjs +4 -2
- package/dist/core/language-choice.mjs +30 -0
- package/dist/core/link.mjs +15 -1
- package/dist/core/load.mjs +4 -2
- package/dist/core/pages.mjs +20 -1
- package/dist/core/presentation.mjs +6 -4
- package/dist/core/range-regions.mjs +70 -0
- package/dist/core/ranges.mjs +52 -18
- package/dist/core/region.mjs +7 -2
- package/dist/core/sanitize.mjs +86 -1
- package/dist/core/save-file.mjs +33 -0
- package/dist/core/selectors.mjs +12 -0
- package/dist/core/upgrade.mjs +23 -0
- package/dist/core/value.mjs +11 -23
- package/dist/hooks/useFullscreenExit.mjs +26 -0
- package/dist/hooks/useHighContrast.mjs +27 -0
- package/dist/i18n/autonym.mjs +11 -0
- package/dist/i18n/config.mjs +3 -8
- package/dist/{core → i18n}/direction.mjs +5 -1
- package/dist/i18n/languages.mjs +44 -0
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/{ui → i18n}/useContainerName.mjs +5 -4
- package/dist/{react/language.mjs → i18n/useRootLanguage.mjs} +2 -2
- package/dist/index.d.mts +393 -53
- package/dist/index.mjs +6 -2
- package/dist/lib/fullscreen.mjs +6 -1
- package/dist/lib/renderer/CanvasRenderer.mjs +28 -5
- package/dist/lib/renderer/math/affine.mjs +14 -0
- package/dist/lib/renderer/scene/planFrame.mjs +12 -12
- package/dist/lib/renderer/scene/regions.mjs +11 -1
- package/dist/lib/renderer/scene/sceneItem.mjs +72 -9
- package/dist/lib/time.mjs +10 -0
- package/dist/map/index.d.mts +26 -4
- package/dist/react/fetchManifest.mjs +19 -0
- package/dist/react/hooks.mjs +7 -1
- package/dist/react/readingLanguages.mjs +16 -0
- package/dist/react/usePagesReached.mjs +42 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +87 -9
- package/dist/templates/document/Document.mjs +5 -1
- package/dist/templates/index.d.mts +21 -3
- package/dist/templates.css +1 -1
- package/dist/ui/BodyUnloadable.mjs +34 -0
- package/dist/ui/Button.mjs +2 -1
- package/dist/ui/Chevron.mjs +34 -0
- package/dist/ui/ControlCluster.mjs +6 -3
- package/dist/ui/EntryThumbnail.mjs +60 -0
- package/dist/ui/ExitFullscreen.mjs +2 -1
- package/dist/ui/FieldPill.mjs +5 -4
- package/dist/ui/HideToggle.mjs +2 -1
- package/dist/ui/LanguageChoice.mjs +45 -0
- package/dist/ui/ListEnd.mjs +29 -0
- package/dist/ui/Markup.mjs +27 -8
- package/dist/ui/NavDate.mjs +29 -0
- package/dist/ui/ReadMore.mjs +3 -2
- package/dist/ui/Sections.mjs +19 -28
- package/dist/ui/Steps.mjs +4 -3
- package/dist/ui/Tip.mjs +9 -4
- package/dist/web-components/About-DhOGPFaI.mjs +1 -0
- package/dist/web-components/AnnotationItems-CNP4CJiT.mjs +1 -0
- package/dist/web-components/AnnotationMenu-BCwwwfbb.mjs +1 -0
- package/dist/web-components/AnnotationState-CavxnAAq.mjs +1 -0
- package/dist/web-components/Annotations-DDjSrBL5.mjs +2 -0
- package/dist/web-components/Annotations-rBmeI5sR.mjs +1 -0
- package/dist/web-components/Body-DaY1UJIy.mjs +1 -0
- package/dist/web-components/BodyAlert-COKp19lq.mjs +1 -0
- package/dist/web-components/BodyUnloadable-DcTM7hHF.mjs +1 -0
- package/dist/web-components/Button-DLFYqtz9.mjs +1 -0
- package/dist/web-components/{Camera-cdCqKMup.mjs → Camera-Cp5ma-6C.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-CnLEHRs4.mjs → Canvas2DBackend-3PToh87Z.mjs} +1 -1
- package/dist/web-components/CanvasView-BWQ4SK2b.mjs +2 -0
- package/dist/web-components/CaptionDetails-DSziiuQV.mjs +1 -0
- package/dist/web-components/Chevron-r-_hUPn8.mjs +1 -0
- package/dist/web-components/ChoiceMenu-DTuEEUeM.mjs +1 -0
- package/dist/web-components/Collection-B9swJtPW.mjs +1 -0
- package/dist/web-components/CollectionSelect-CBWUbqQi.mjs +1 -0
- package/dist/web-components/Connected-B2d6EoFl.mjs +1 -0
- package/dist/web-components/Connected-BSRM9FJY.mjs +1 -0
- package/dist/web-components/Connected-BnpxYeJN.mjs +1 -0
- package/dist/web-components/Contents-D7FPxSH-.mjs +1 -0
- package/dist/web-components/ControlMenu-Crtho2cs.mjs +1 -0
- package/dist/web-components/CountMenu-DyTp_J4k.mjs +1 -0
- package/dist/web-components/Cue-CbZaGwZh.mjs +1 -0
- package/dist/web-components/Document-BfltLWZZ.mjs +1 -0
- package/dist/web-components/DocumentPanel-ZSe40cV4.mjs +1 -0
- package/dist/web-components/{DomLayers-BD4QPbl6.mjs → DomLayers-CTGub6wo.mjs} +1 -1
- package/dist/web-components/Download-BOYNIb7C.mjs +1 -0
- package/dist/web-components/EntryBodies-Bfd2Z42z.mjs +1 -0
- package/dist/web-components/EntryThumbnail-DQE8ajI9.mjs +1 -0
- package/dist/web-components/FieldPill-D5DNJWLy.mjs +1 -0
- package/dist/web-components/FrameAnimation-IfR1czfc.mjs +1 -0
- package/dist/web-components/Gallery-DD06BDQo.mjs +1 -0
- package/dist/web-components/HideToggle-DL911R1Z.mjs +1 -0
- package/dist/web-components/Items-BHzT9A73.mjs +1 -0
- package/dist/web-components/Label-KabnxuMN.mjs +1 -0
- package/dist/web-components/LanguageChoice-DT1UPiDn.mjs +1 -0
- package/dist/web-components/LightboxBody-BhRhdXo6.mjs +1 -0
- package/dist/web-components/ListEnd-CbwNlty-.mjs +1 -0
- package/dist/web-components/{Loaded-D5xmFRSo.mjs → Loaded-BWfEBJyg.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-CdZ5WOWz.mjs +1 -0
- package/dist/web-components/LoadedMap-DQyQVRVQ.mjs +1 -0
- package/dist/web-components/{Loading-CBKfwsML.mjs → Loading-zw74TdAz.mjs} +1 -1
- package/dist/web-components/{Map-Bcgp_R8H.mjs → Map--dJhk0_0.mjs} +1 -1
- package/dist/web-components/MapView-duA5WGsu.mjs +3 -0
- package/dist/web-components/Markup-D-kioDf9.mjs +2 -0
- package/dist/web-components/MediaBody-CoOiVXcv.mjs +1 -0
- package/dist/web-components/MediaBody-d8ErTuwT.mjs +1 -0
- package/dist/web-components/NavDate-BQHuyLOC.mjs +1 -0
- package/dist/web-components/{Navigator-BSJbEbuJ.mjs → Navigator-B3U21_ti.mjs} +1 -1
- package/dist/web-components/Pager-DnJknq92.mjs +1 -0
- package/dist/web-components/PagerLayout-CvOmKtSW.mjs +1 -0
- package/dist/web-components/Panel-CIdjOznL.mjs +1 -0
- package/dist/web-components/{PanelToggle-mUDw73zI.mjs → PanelToggle-CFtWIeWv.mjs} +1 -1
- package/dist/web-components/PartOfManifest-F87jIrf9.mjs +1 -0
- package/dist/web-components/{Pending-BPOQ2z1L.mjs → Pending-CYAQajKu.mjs} +1 -1
- package/dist/web-components/PlaceBox-BtIbIotm.mjs +1 -0
- package/dist/web-components/Placeholder-TIyj4ZjR.mjs +1 -0
- package/dist/web-components/Position-BkWBRBfW.mjs +1 -0
- package/dist/web-components/Primitives-BmODPlnK.mjs +1 -0
- package/dist/web-components/Provider-C8se8i4I.mjs +1 -0
- package/dist/web-components/ReadMore-BwGFsLS2.mjs +1 -0
- package/dist/web-components/Root-CAJB0-Mh.mjs +1 -0
- package/dist/web-components/Scene-Ctcdt7CD.mjs +1 -0
- package/dist/web-components/SceneView-B6bEx_7x.mjs +1 -0
- package/dist/web-components/Search-CbmK9vLp.mjs +1 -0
- package/dist/web-components/Sections-Dy5_pkyQ.mjs +2 -0
- package/dist/web-components/StandaloneItems-BmUnBp0H.mjs +1 -0
- package/dist/web-components/Status-Dww3Pyf4.mjs +1 -0
- package/dist/web-components/Steps-o_UprQfZ.mjs +1 -0
- package/dist/web-components/TargetItems-BBOGDubv.mjs +1 -0
- package/dist/web-components/Timeline-CfIF4APc.mjs +1 -0
- package/dist/web-components/Tip-BbexILXs.mjs +1 -0
- package/dist/web-components/Transcript-ZVXM3ZDA.mjs +1 -0
- package/dist/web-components/annotation-collection-7SS1ELcO.mjs +1 -0
- package/dist/web-components/annotation-name-CYkZopdd.mjs +1 -0
- package/dist/web-components/annotations-content-Bdtn50sf.mjs +1 -0
- package/dist/web-components/body-CkOBHlJ0.mjs +1 -0
- package/dist/web-components/canvas-CWf_Fag8.mjs +1 -0
- package/dist/web-components/choice-key-BUNebLKe.mjs +1 -0
- package/dist/web-components/{cloverEngine-B4LinbSt.mjs → cloverEngine-6djEHNCD.mjs} +2 -2
- package/dist/web-components/content-state-reader-Ahh6artg.mjs +1 -0
- package/dist/web-components/{controls-Dj2BybWb.mjs → controls-BJrZVQkS.mjs} +1 -1
- package/dist/web-components/custom-elements.json +109 -13
- package/dist/web-components/dates-DR3gfcON.mjs +1 -0
- package/dist/web-components/downloads-CqVWo-yn.mjs +1 -0
- package/dist/web-components/{engine-BSt8LTso.mjs → engine-B-sscpLa.mjs} +1 -1
- package/dist/web-components/{engines-CC0OEsVE.mjs → engines-DfCHjbt3.mjs} +1 -1
- package/dist/web-components/es-BYfHUZ7P.mjs +1 -0
- package/dist/web-components/fetchManifest-BIzne1Pj.mjs +1 -0
- package/dist/web-components/fi-B5y2qr8T.mjs +1 -0
- package/dist/web-components/fr-ChezCx6V.mjs +1 -0
- package/dist/web-components/fromManifest-gg5Wx14y.mjs +1 -0
- package/dist/web-components/glyphs-JYl2STEr.mjs +1 -0
- package/dist/web-components/hooks-x7rO95CS.mjs +1 -0
- package/dist/web-components/image-layers-BjbeyHBS.mjs +1 -0
- package/dist/web-components/{imageService-dsdmcegU.mjs → imageService-0eTvQ-3h.mjs} +1 -1
- package/dist/web-components/index-BZ7b9k0N.mjs +1 -0
- package/dist/web-components/index.d.mts +95 -10
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-CnAIl9fS.mjs +1 -0
- package/dist/web-components/items-F6hJgdAS.mjs +1 -0
- package/dist/web-components/label-CI88KH2_.mjs +1 -0
- package/dist/web-components/layout-De1MOSYe.mjs +1 -0
- package/dist/web-components/link-GEdiEwlR.mjs +1 -0
- package/dist/web-components/logo-Ckwj7FlP.mjs +1 -0
- package/dist/web-components/models-59cEeiAA.mjs +1 -0
- package/dist/web-components/nb-8J22f9Td.mjs +1 -0
- package/dist/web-components/nn-Dv1EvzI1.mjs +1 -0
- package/dist/web-components/no-8J22f9Td.mjs +1 -0
- package/dist/web-components/{nodes-B7JRwBgl.mjs → nodes-CTw9OqlA.mjs} +1 -1
- package/dist/web-components/{overlayImage-0OgQl1TL.mjs → overlayImage-BMt4UTlR.mjs} +1 -1
- package/dist/web-components/{panel-CjXfre-g.mjs → panel-C17Rl9Ya.mjs} +1 -1
- package/dist/web-components/part-CXts97_M.mjs +1 -0
- package/dist/web-components/playerSurface-HYwEwPK6.mjs +1 -0
- package/dist/web-components/presentation-2-C-U79S_T.mjs +1 -0
- package/dist/web-components/{provider-C1wKfdjb.mjs → provider-BpxorEiq.mjs} +1 -1
- package/dist/web-components/pt-DWYQkATt.mjs +1 -0
- package/dist/web-components/range-regions-BGQy4E9U.mjs +1 -0
- package/dist/web-components/read-more-BDM_6CVc.mjs +1 -0
- package/dist/web-components/readingLanguages-fs_HqvqQ.mjs +1 -0
- package/dist/web-components/rendererSurface-C0aKlE0v.mjs +22 -0
- package/dist/web-components/{renderers-BMSWEFUR.mjs → renderers-CiB74bQh.mjs} +1 -1
- package/dist/web-components/{resource-DLHocQ1C.mjs → resource-CRbpf9pX.mjs} +1 -1
- package/dist/web-components/sanitize-qIOeyIww.mjs +3 -0
- package/dist/web-components/save-file-CCuZEuQr.mjs +1 -0
- package/dist/web-components/search-CkM0O0Z1.mjs +1 -0
- package/dist/web-components/sequence-C28xoNmD.mjs +1 -0
- package/dist/web-components/shared-MTsMddHx.mjs +1 -0
- package/dist/web-components/{show-link-CyzYE1eS.mjs → show-link-BXm7SNIC.mjs} +1 -1
- package/dist/web-components/{sizedImage-uv_NlE0l.mjs → sizedImage-k4Q-eyOB.mjs} +1 -1
- package/dist/web-components/{split-CYuMjp89.mjs → split-Hp6z-v4h.mjs} +1 -1
- package/dist/web-components/{status-Ms5L0ghK.mjs → status-BmtuKfAG.mjs} +1 -1
- package/dist/web-components/styles-CZV1nbBQ.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-Dp7a8oom.mjs +1 -0
- package/dist/web-components/{tip-dWhupWSr.mjs → tip-C-oovDZK.mjs} +1 -1
- package/dist/web-components/{toggle-BQTjR1I3.mjs → toggle-C7ODWDEZ.mjs} +1 -1
- package/dist/web-components/upgrade-eNW0DPXq.mjs +1 -0
- package/dist/web-components/upgrader-BlbMUEH6.mjs +1 -0
- package/dist/web-components/useContainerName-CrOmY-km.mjs +1 -0
- package/dist/web-components/useNearViewport-BqXi9Gn4.mjs +1 -0
- package/dist/web-components/{useScrollTrack-WbG28FPD.mjs → useScrollTrack-CEsOU2yT.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationItems-CyhVcRFc.mjs +1 -0
- package/dist/web-components/viewer/AnnotationMenu-DPOSehBo.mjs +1 -0
- package/dist/web-components/viewer/AnnotationState-Bjztkobn.mjs +1 -0
- package/dist/web-components/viewer/Annotations-Dh_8Tzi0.mjs +2 -0
- package/dist/web-components/viewer/Annotations-wwuOCxzI.mjs +1 -0
- package/dist/web-components/viewer/{Canvas2DBackend-CAmzJD5P.mjs → Canvas2DBackend-BTK6ZJh0.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-BwCTovy_.mjs +1 -0
- package/dist/web-components/viewer/ChoiceMenu-DQ1x572Y.mjs +1 -0
- package/dist/web-components/viewer/Collection-DSBxCmXw.mjs +1 -0
- package/dist/web-components/viewer/Connected-CL3N8F2J.mjs +1 -0
- package/dist/web-components/viewer/Connected-DTk1jlyI.mjs +1 -0
- package/dist/web-components/viewer/Contents-DrXckx7d.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-Bp91s-g_.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-4u6U6yqb.mjs +1 -0
- package/dist/web-components/viewer/Cue-C-aF8peC.mjs +1 -0
- package/dist/web-components/viewer/Document-BN1rICu3.mjs +1 -0
- package/dist/web-components/viewer/DocumentPanel-CEesxdeY.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-DRdQSEtN.mjs → DomLayers-CGkDtemL.mjs} +1 -1
- package/dist/web-components/viewer/Download-CawEl9MN.mjs +1 -0
- package/dist/web-components/viewer/EntryBodies-nYHMwSSM.mjs +1 -0
- package/dist/web-components/viewer/EntryThumbnail-DrO_0SzR.mjs +1 -0
- package/dist/web-components/viewer/FieldPill-DFXGWrvB.mjs +1 -0
- package/dist/web-components/viewer/FrameAnimation-CZfzpxaD.mjs +1 -0
- package/dist/web-components/viewer/Gallery-MWHtvjti.mjs +1 -0
- package/dist/web-components/viewer/HideToggle-DP5kHzWM.mjs +1 -0
- package/dist/web-components/viewer/LanguageChoice-C50T7dPI.mjs +1 -0
- package/dist/web-components/viewer/{LightboxBody-CXMc1xOH.mjs → LightboxBody-C2T7IC29.mjs} +1 -1
- package/dist/web-components/viewer/ListEnd-BDuOx__m.mjs +1 -0
- package/dist/web-components/viewer/MapView-BN9wXQKV.mjs +3 -0
- package/dist/web-components/viewer/MediaBody-CEyswliX.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-Dw3DWDjc.mjs +1 -0
- package/dist/web-components/viewer/NavDate-C2-wwLuB.mjs +1 -0
- package/dist/web-components/viewer/{Navigator-CKwDgG2x.mjs → Navigator-C3jghOd3.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-Cg2NpqoD.mjs +1 -0
- package/dist/web-components/viewer/PartOfManifest-D22yMgCf.mjs +1 -0
- package/dist/web-components/viewer/PlaceBox-Dckw4Sfk.mjs +1 -0
- package/dist/web-components/viewer/Placeholder-NYVWYg5Q.mjs +1 -0
- package/dist/web-components/viewer/Search-DC259m4f.mjs +1 -0
- package/dist/web-components/viewer/StandaloneItems-E4kpMne9.mjs +1 -0
- package/dist/web-components/viewer/Steps-Bw32X5xO.mjs +1 -0
- package/dist/web-components/viewer/TargetItems-DLhUH1Gq.mjs +1 -0
- package/dist/web-components/viewer/Transcript-D_VGJQxn.mjs +1 -0
- package/dist/web-components/viewer/annotation-collection-DZHa18ir.mjs +1 -0
- package/dist/web-components/viewer/annotation-name-BaNdW2Xk.mjs +1 -0
- package/dist/web-components/viewer/annotations-content-CbA3eOIC.mjs +1 -0
- package/dist/web-components/viewer/{cloverEngine-CynoKdta.mjs → cloverEngine-C04bCSFR.mjs} +2 -2
- package/dist/web-components/viewer/content-state-reader-C7UBMOq3.mjs +1 -0
- package/dist/web-components/viewer/fetchManifest-C2Yxg3x9.mjs +1 -0
- package/dist/web-components/viewer/{host-DlCltI_c.mjs → host-CZeyjCKR.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-B09fporZ.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/link-DssZ0Z2N.mjs +1 -0
- package/dist/web-components/viewer/overlayImage-BR3eJCKq.mjs +1 -0
- package/dist/web-components/viewer/range-regions-By6L5JOK.mjs +1 -0
- package/dist/web-components/viewer/{renderers-C_wdmw9v.mjs → renderers-DLoqv3QO.mjs} +1 -1
- package/dist/web-components/viewer/save-file-CJT5p5Hg.mjs +1 -0
- package/dist/web-components/viewer/{search-BHLyNxZ6.mjs → search-PhOwMKHi.mjs} +1 -1
- package/dist/web-components/viewer/styles-NZLnZPAC.mjs +1 -0
- package/dist/web-components/viewer/viewer-D30YHqyF.mjs +29 -0
- package/dist/web-components/viewer/{vtt-XiS_-5Ao.mjs → vtt-1Pk7Dhsj.mjs} +1 -1
- package/dist/web-components/viewer-CH7re5OO.mjs +1 -0
- package/dist/web-components/{vtt-DYAOuQoK.mjs → vtt-CacHieeN.mjs} +1 -1
- package/package.json +8 -4
- package/dist/i18n/reader.mjs +0 -13
- package/dist/web-components/About-DbrFSVBm.mjs +0 -1
- package/dist/web-components/AnnotationMenu-EBjIQpQl.mjs +0 -1
- package/dist/web-components/AnnotationState-DQTaO6Gz.mjs +0 -1
- package/dist/web-components/Annotations-Cb9U7HJ_.mjs +0 -2
- package/dist/web-components/Annotations-Dl0SgHBS.mjs +0 -1
- package/dist/web-components/Body-DxSz3iST.mjs +0 -1
- package/dist/web-components/BodyAlert-C8EOXz24.mjs +0 -1
- package/dist/web-components/Button-uWgfvqsL.mjs +0 -1
- package/dist/web-components/CanvasView-BI3YzNdK.mjs +0 -1
- package/dist/web-components/CaptionDetails-B80ZhZ7v.mjs +0 -1
- package/dist/web-components/ChoiceMenu-DCp7-co7.mjs +0 -1
- package/dist/web-components/Collection-B1Le2_TU.mjs +0 -1
- package/dist/web-components/CollectionSelect-BL_jQog-.mjs +0 -1
- package/dist/web-components/Connected-BxqaRL9o.mjs +0 -1
- package/dist/web-components/Connected-DCBI-j9H.mjs +0 -1
- package/dist/web-components/Connected-DkhfVWxd.mjs +0 -1
- package/dist/web-components/Contents-zYEGHLfe.mjs +0 -1
- package/dist/web-components/ControlMenu-CAHiLAtl.mjs +0 -1
- package/dist/web-components/Cue-BT2V9VAq.mjs +0 -1
- package/dist/web-components/Document-BdCjGnJN.mjs +0 -1
- package/dist/web-components/DocumentPanel-X_Rta0Wu.mjs +0 -1
- package/dist/web-components/Download-DqU-goFi.mjs +0 -1
- package/dist/web-components/EntryBodies-DXAQH0vR.mjs +0 -1
- package/dist/web-components/ErrorBoundary-chQaO-Up.mjs +0 -1
- package/dist/web-components/FieldPill-CyEssPVm.mjs +0 -1
- package/dist/web-components/FrameAnimation-Bb0pOoRl.mjs +0 -1
- package/dist/web-components/Gallery-BXU3TcT3.mjs +0 -1
- package/dist/web-components/HideToggle-BwMrOBMu.mjs +0 -1
- package/dist/web-components/Items-DRj1UEpC.mjs +0 -1
- package/dist/web-components/Label-D6aVJB9s.mjs +0 -1
- package/dist/web-components/LightboxBody-BzXQGMDn.mjs +0 -1
- package/dist/web-components/LoadedCanvas-DOjtxLSe.mjs +0 -1
- package/dist/web-components/LoadedMap-DouDS2lO.mjs +0 -1
- package/dist/web-components/MapView-CD5zkTs8.mjs +0 -1
- package/dist/web-components/Markup-C1hMA8wk.mjs +0 -2
- package/dist/web-components/MediaBody-B_Gii4we.mjs +0 -1
- package/dist/web-components/MediaBody-BfrKIPte.mjs +0 -1
- package/dist/web-components/Pager-Di_2hHM3.mjs +0 -1
- package/dist/web-components/Panel-DbsC8A9V.mjs +0 -1
- package/dist/web-components/PartOfManifest-7eOwURrF.mjs +0 -1
- package/dist/web-components/Primitives-XQO3m1wG.mjs +0 -1
- package/dist/web-components/Provider-B61118lU.mjs +0 -1
- package/dist/web-components/ReadMore-BJH-qqte.mjs +0 -1
- package/dist/web-components/Root-Dj277K6p.mjs +0 -1
- package/dist/web-components/Scene-BTWpLeec.mjs +0 -1
- package/dist/web-components/SceneView-BYo7WmPt.mjs +0 -1
- package/dist/web-components/Search-ZV8FFN4p.mjs +0 -1
- package/dist/web-components/Sections-ejwu1_Sm.mjs +0 -2
- package/dist/web-components/StandaloneItems-BYaiyCca.mjs +0 -1
- package/dist/web-components/Status-YbQK2KzY.mjs +0 -1
- package/dist/web-components/Timeline-ByyVSd7B.mjs +0 -1
- package/dist/web-components/Tip-IO11xX4x.mjs +0 -1
- package/dist/web-components/Transcript-D0gUxUoA.mjs +0 -1
- package/dist/web-components/annotation-collection-Csv7WIlm.mjs +0 -1
- package/dist/web-components/annotations-content-BS_OFz5Z.mjs +0 -1
- package/dist/web-components/body-CKjwwFep.mjs +0 -1
- package/dist/web-components/canvas-CIzpp-Uz.mjs +0 -1
- package/dist/web-components/content-state-reader-D1BkpICh.mjs +0 -1
- package/dist/web-components/es-BwMkoRod.mjs +0 -1
- package/dist/web-components/fi-gPFOn9RK.mjs +0 -1
- package/dist/web-components/fr-DUHmgdJo.mjs +0 -1
- package/dist/web-components/fromManifest-BhemHaoA.mjs +0 -1
- package/dist/web-components/glyphs-drROkef9.mjs +0 -1
- package/dist/web-components/hooks-BXzQSllm.mjs +0 -1
- package/dist/web-components/index-B7nZdqLg.mjs +0 -1
- package/dist/web-components/items-CB2Uk7ts.mjs +0 -1
- package/dist/web-components/items-jfQ5XzEj.mjs +0 -1
- package/dist/web-components/keep-fragments-B5nlv2ck.mjs +0 -1
- package/dist/web-components/label-Vbg_cMOJ.mjs +0 -1
- package/dist/web-components/layout-mMHI0lsj.mjs +0 -1
- package/dist/web-components/link-ZRnv5NFR.mjs +0 -1
- package/dist/web-components/logo-Boy6u4m2.mjs +0 -1
- package/dist/web-components/models-D1EE_CmH.mjs +0 -1
- package/dist/web-components/nb-BSvnQ6jd.mjs +0 -1
- package/dist/web-components/nn-Dg2_HdZu.mjs +0 -1
- package/dist/web-components/no-BSvnQ6jd.mjs +0 -1
- package/dist/web-components/part-cUiPs2-y.mjs +0 -1
- package/dist/web-components/playerSurface-CU5XxI1j.mjs +0 -1
- package/dist/web-components/pt-B3J80JgO.mjs +0 -1
- package/dist/web-components/read-more-DNHNtG-a.mjs +0 -1
- package/dist/web-components/rendererSurface-DhIlOjGT.mjs +0 -22
- package/dist/web-components/sanitize-Dc7nOsgO.mjs +0 -3
- package/dist/web-components/search-CLy2Wj01.mjs +0 -1
- package/dist/web-components/shared-YUjOSBKO.mjs +0 -1
- package/dist/web-components/styles-CyuM_fB1.mjs +0 -1
- package/dist/web-components/thumbnail-c2K_iQsD.mjs +0 -1
- package/dist/web-components/time-B9GZoYcm.mjs +0 -1
- package/dist/web-components/upgrader-XNxI-5jo.mjs +0 -1
- package/dist/web-components/useContainerName-BpJ3IWY0.mjs +0 -1
- package/dist/web-components/useNearViewport-CtLyYg9n.mjs +0 -1
- package/dist/web-components/viewer/AnnotationMenu-ZKyBeyUU.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-DO33zokc.mjs +0 -1
- package/dist/web-components/viewer/Annotations-BOjhr5ks.mjs +0 -1
- package/dist/web-components/viewer/Annotations-DkLueFLK.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-DOJlUtOn.mjs +0 -1
- package/dist/web-components/viewer/ChoiceMenu-BDq6H34G.mjs +0 -1
- package/dist/web-components/viewer/Collection-By3puO0V.mjs +0 -1
- package/dist/web-components/viewer/Connected-DZNO2CPf.mjs +0 -1
- package/dist/web-components/viewer/Connected-ESg5y49m.mjs +0 -1
- package/dist/web-components/viewer/Contents-B_FqDwTW.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DdQl-dTf.mjs +0 -1
- package/dist/web-components/viewer/Cue-BTRHfiWQ.mjs +0 -1
- package/dist/web-components/viewer/Document-B9_PyD2w.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-CtEJVPoE.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-CJuTRcTq.mjs +0 -1
- package/dist/web-components/viewer/FieldPill-06uwrNwE.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-3dcDHf5q.mjs +0 -1
- package/dist/web-components/viewer/Gallery-BYasTqZc.mjs +0 -1
- package/dist/web-components/viewer/HideToggle-BxkNMX-T.mjs +0 -1
- package/dist/web-components/viewer/MapView-DCerrRRV.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-BdkJcyGy.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-waF4KvHp.mjs +0 -1
- package/dist/web-components/viewer/PartOfManifest-DalHJFwC.mjs +0 -1
- package/dist/web-components/viewer/Search-Di_QQfDb.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-B9J6nnWn.mjs +0 -1
- package/dist/web-components/viewer/Transcript-aHOixfna.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-I2UkdobR.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-D-i4j9pD.mjs +0 -1
- package/dist/web-components/viewer/content-state-reader-D7GIMcKK.mjs +0 -1
- package/dist/web-components/viewer/link-BX-wzj1u.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CHqn1fG8.mjs +0 -1
- package/dist/web-components/viewer/styles-BRCkEU3w.mjs +0 -1
- package/dist/web-components/viewer/viewer-ipqAA-xQ.mjs +0 -28
- package/dist/web-components/viewer-DEHIsIHd.mjs +0 -1
- /package/dist/{ui → i18n}/languageCode.mjs +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var rl=Object.defineProperty;var sl=(t,e,n)=>e in t?rl(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var I=(t,e,n)=>sl(t,typeof e!="symbol"?e+"":e,n);import{s as Ri}from"./styles-NZLnZPAC.mjs";function il(t={}){return Promise.resolve().then(()=>lu).then(e=>e.initCloverI18n(t))}const Bi="@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 al=null,Ge=null;const cl=()=>al??(al=import("./host-CZeyjCKR.mjs").then(t=>Ge=t)),ll=t=>t.trim().toLowerCase()==="false";function ul(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 dl=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function fl(t){class e extends HTMLElement{constructor(){super(...arguments);I(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){Ri(this.ownerDocument).inject("elements",Bi)}}customElements.define(t.tag,e)}function hl(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return fl(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),cl()]));class c extends HTMLElement{constructor(){super(...arguments);I(this,"kind",n);I(this,"needsRoot",!!t.needsRoot);I(this,"values",{});I(this,"kept",{});I(this,"props",{});I(this,"listeners",new Set);I(this,"warned",new Set);I(this,"handlers",Object.fromEntries(r.map(([d,p])=>[p.prop,(...h)=>{var v;if(p.keeps&&(this.kept[p.keeps]=h[0]??null,h[0]==null))return true;const m=p.detail==="first"?h[0]:Object.fromEntries(p.detail.map((y,w)=>[y,h[w]])),g=new CustomEvent(d,{detail:m,bubbles:!p.keeps,composed:!p.keeps,cancelable:!!p.cancelable}),_=this.dispatchEvent(g);if(!_&&p.cancelable){const y=h[h.length-1];(v=y==null?void 0:y.preventDefault)==null||v.call(y)}return _}])));I(this,"getProps",()=>this.props);I(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 p=this[d];delete this[d],p!=null&&(this.values[d]=p)}this.update(),this.warnOfAria(),Ri(this.ownerDocument).inject("elements",Bi),a().then(()=>{this.isConnected&&Ge.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||Ge==null||Ge.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[p,h]of Object.entries(t.attributes)){if(h.prop in this.values)continue;const m=this.getAttribute(p),g=ul(m,h,_=>{const v=`${p}=${m}`;this.warned.has(v)||(this.warned.add(v),console.warn(`<${t.tag}>: ${p}="${m}" ${_}; ignored.`))});g!==void 0&&(d[h.prop]=g)}dl(d,this.props)||(this.props=d,this.listeners.forEach(p=>p()))}}I(c,"initCloverI18n",il);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 an,st,$i,_e,ps,Fi,Di,zi,ir,Bo,$o,Hi,nn={},Wi=[],pl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cn=Array.isArray;function Vt(t,e){for(var n in e)t[n]=e[n];return t}function ar(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ue(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?an.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 tn(t,i,o,r,null)}function tn(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??++$i,__i:-1,__u:0};return r==null&&st.vnode!=null&&st.vnode(s),s}function ml(){return{current:null}}function xt(t){return t.children}function qt(t,e){this.props=t,this.context=e}function Fe(t,e){if(e==null)return t.__?Fe(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"?Fe(t):null}function Ui(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 Ui(t)}}function Fo(t){(!t.__d&&(t.__d=true)&&_e.push(t)&&!Rn.__r++||ps!=st.debounceRendering)&&((ps=st.debounceRendering)||Fi)(Rn)}function Rn(){for(var t,e,n,o,r,s,i,a=1;_e.length;)_e.length>a&&_e.sort(Di),t=_e.shift(),a=_e.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=Vt({},o)).__v=o.__v+1,st.vnode&&st.vnode(n),cr(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??Fe(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,qi(s,n,i),o.__e=o.__=null,n.__e!=r&&Ui(n)));Rn.__r=0}function ji(t,e,n,o,r,s,i,a,c,l,u){var d,p,h,m,g,_,v,y=o&&o.__k||Wi,w=e.length;for(c=gl(n,e,y,c,w),d=0;d<w;d++)(h=n.__k[d])!=null&&(p=h.__i==-1?nn:y[h.__i]||nn,h.__i=d,_=cr(t,h,p,r,s,i,a,c,l,u),m=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&lr(p.ref,null,h),u.push(h.ref,h.__c||m,h)),g==null&&m!=null&&(g=m),(v=!!(4&h.__u))||p.__k===h.__k?c=Vi(h,c,t,v):typeof h.type=="function"&&_!==void 0?c=_:m&&(c=m.nextSibling),h.__u&=-7);return n.__e=g,c}function gl(t,e,n,o,r){var s,i,a,c,l,u=n.length,d=u,p=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+p,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?tn(null,i,null,null,null):cn(i)?tn(xt,{children:i},null,null,null):i.constructor==null&&i.__b>0?tn(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=vl(i,n,c,d))!=-1&&(d--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>u?p--:r<u&&p++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,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=Fe(a)),Zi(a,a));return o}function Vi(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=Vi(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=Fe(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function le(t,e){return e=e||[],t==null||typeof t=="boolean"||(cn(t)?t.some(function(n){le(n,e)}):e.push(t)),e}function vl(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 ms(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||pl.test(e)?n:n+"px"}function Mn(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||ms(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||ms(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(zi,"$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=ir,t.addEventListener(e,s?$o:Bo,s)):t.removeEventListener(e,s?$o:Bo,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 gs(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ir++;else if(e.t<n.u)return;return n(st.event?st.event(e):e)}}}function cr(t,e,n,o,r,s,i,a,c,l){var u,d,p,h,m,g,_,v,y,w,S,x,k,B,H,et,rt,Y=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(u=st.__b)&&u(e);t:if(typeof Y=="function")try{if(v=e.props,y="prototype"in Y&&Y.prototype.render,w=(u=Y.contextType)&&o[u.__c],S=u?w?w.props.value:u.__:o,n.__c?_=(d=e.__c=n.__c).__=d.__E:(y?e.__c=d=new Y(v,S):(e.__c=d=new qt(v,S),d.constructor=Y,d.render=bl),w&&w.sub(d),d.props=v,d.state||(d.state={}),d.context=S,d.__n=o,p=d.__d=true,d.__h=[],d._sb=[]),y&&d.__s==null&&(d.__s=d.state),y&&Y.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Vt({},d.__s)),Vt(d.__s,Y.getDerivedStateFromProps(v,d.__s))),h=d.props,m=d.state,d.__v=e,p)y&&Y.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),y&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(y&&Y.getDerivedStateFromProps==null&&v!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,S),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,S)===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(Q){Q&&(Q.__=e)}),x=0;x<d._sb.length;x++)d.__h.push(d._sb[x]);d._sb=[],d.__h.length&&i.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,S),y&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,m,g)})}if(d.context=S,d.props=v,d.__P=t,d.__e=false,k=st.__r,B=0,y){for(d.state=d.__s,d.__d=false,k&&k(e),u=d.render(d.props,d.state,d.context),H=0;H<d._sb.length;H++)d.__h.push(d._sb[H]);d._sb=[]}else do d.__d=false,k&&k(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++B<25);d.state=d.__s,d.getChildContext!=null&&(o=Vt(Vt({},o),d.getChildContext())),y&&!p&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(h,m)),et=u,u!=null&&u.type===xt&&u.key==null&&(et=Ki(u.props.children)),a=ji(t,cn(et)?et:[et],e,n,o,r,s,i,a,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&i.push(d),_&&(d.__E=d.__=null)}catch(Q){if(e.__v=null,c||s!=null)if(Q.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(rt=s.length;rt--;)ar(s[rt]);Do(e)}else e.__e=n.__e,e.__k=n.__k,Q.then||Do(e);st.__e(Q,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=yl(n.__e,e,n,o,r,s,i,c,l);return(u=st.diffed)&&u(e),128&e.__u?void 0:a}function Do(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(Do)}function qi(t,e,n){for(var o=0;o<n.length;o++)lr(n[o],n[++o],n[++o]);st.__c&&st.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){st.__e(s,r.__v)}})}function Ki(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:cn(t)?t.map(Ki):Vt({},t)}function yl(t,e,n,o,r,s,i,a,c){var l,u,d,p,h,m,g,_=n.props,v=e.props,y=e.type;if(y=="svg"?r="http://www.w3.org/2000/svg":y=="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((h=s[l])&&"setAttribute"in h==!!y&&(y?h.localName==y:h.nodeType==3)){t=h,s[l]=null;break}}if(t==null){if(y==null)return document.createTextNode(v);t=document.createElementNS(r,y,v.is&&v),a&&(st.__m&&st.__m(e,s),a=false),s=null}if(y==null)_===v||a&&t.data==v||(t.data=v);else{if(s=s&&an.call(t.childNodes),_=n.props||nn,!a&&s!=null)for(_={},l=0;l<t.attributes.length;l++)_[(h=t.attributes[l]).name]=h.value;for(l in _)if(h=_[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=h;else if(!(l in v)){if(l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v)continue;Mn(t,l,null,h,r)}}for(l in v)h=v[l],l=="children"?p=h:l=="dangerouslySetInnerHTML"?u=h:l=="value"?m=h:l=="checked"?g=h:a&&typeof h!="function"||_[l]===h||Mn(t,l,h,_[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=""),ji(e.type=="template"?t.content:t,cn(p)?p:[p],e,n,o,y=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&Fe(n,0),a,c),s!=null)for(l=s.length;l--;)ar(s[l]);a||(l="value",y=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||y=="progress"&&!m||y=="option"&&m!=_[l])&&Mn(t,l,m,_[l],r),l="checked",g!=null&&g!=t[l]&&Mn(t,l,g,_[l],r))}return t}function lr(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){st.__e(r,n)}}function Zi(t,e,n){var o,r;if(st.unmount&&st.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||lr(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){st.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&Zi(o[r],e,n||typeof t.type!="function");n||ar(t.__e),t.__c=t.__=t.__e=void 0}function bl(t,e,n){return this.constructor(t,n)}function on(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),st.__&&st.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],cr(e,t=(!o&&n||e).__k=ue(xt,null,[t]),r||nn,nn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?an.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),qi(s,t,i)}function Xi(t,e){on(t,e,Xi)}function _l(t,e,n){var o,r,s,i,a=Vt({},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?an.call(arguments,2):n),tn(t.type,a,o||t.key,r||t.ref,null)}function Xt(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,Fo(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"+Hi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}an=Wi.slice,st={__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}},$i=0,qt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Vt({},this.state),typeof t=="function"&&(t=t(Vt({},n),this.props)),t&&Vt(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Fo(this))},qt.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),Fo(this))},qt.prototype.render=xt,_e=[],Fi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Di=function(t,e){return t.__v.__b-e.__v.__b},Rn.__r=0,zi=/(PointerCapture)$|Capture$/i,ir=0,Bo=gs(false),$o=gs(true),Hi=0;var wl=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:--wl,__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 st.vnode&&st.vnode(l),l}var pe,gt,yo,vs,De=0,Yi=[],yt=st,ys=yt.__b,bs=yt.__r,_s=yt.diffed,ws=yt.__c,xs=yt.unmount,Ss=yt.__;function Ue(t,e){yt.__h&&yt.__h(gt,t,De||e),De=0;var n=gt.__H||(gt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function j(t){return De=1,ur(Qi,t)}function ur(t,e,n){var o=Ue(pe++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Qi(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=gt,!gt.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var u=o.__c.__H.__.filter(function(p){return!!p.__c});if(u.every(function(p){return!p.__N}))return!s||s.call(this,a,c,l);var d=o.__c.props!==a;return u.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(d=true)}}),s&&s.call(this,a,c,l)||d};gt.__f=true;var s=gt.shouldComponentUpdate,i=gt.componentWillUpdate;gt.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)},gt.shouldComponentUpdate=r}return o.__N||o.__}function V(t,e){var n=Ue(pe++,3);!yt.__s&&fr(n.__H,e)&&(n.__=t,n.u=e,gt.__H.__h.push(n))}function Ot(t,e){var n=Ue(pe++,4);!yt.__s&&fr(n.__H,e)&&(n.__=t,n.u=e,gt.__h.push(n))}function W(t){return De=5,ht(function(){return{current:t}},[])}function Gi(t,e,n){De=6,Ot(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 ht(t,e){var n=Ue(pe++,7);return fr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function dt(t,e){return De=8,ht(function(){return t},e)}function Pt(t){var e=gt.context[t.__c],n=Ue(pe++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(gt)),e.props.value):t.__}function Ji(t,e){yt.useDebugValue&&yt.useDebugValue(e?e(t):t)}function dr(){var t=Ue(pe++,11);if(!t.__){for(var e=gt.__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 xl(){for(var t;t=Yi.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(On),t.__H.__h.forEach(zo),t.__H.__h=[]}catch(e){t.__H.__h=[],yt.__e(e,t.__v)}}yt.__b=function(t){gt=null,ys&&ys(t)},yt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ss&&Ss(t,e)},yt.__r=function(t){bs&&bs(t),pe=0;var e=(gt=t.__c).__H;e&&(yo===gt?(e.__h=[],gt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(On),e.__h.forEach(zo),e.__h=[],pe=0)),yo=gt},yt.diffed=function(t){_s&&_s(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Yi.push(e)!==1&&vs===yt.requestAnimationFrame||((vs=yt.requestAnimationFrame)||Sl)(xl)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),yo=gt=null},yt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(On),n.__h=n.__h.filter(function(o){return!o.__||zo(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],yt.__e(o,n.__v)}}),ws&&ws(t,e)},yt.unmount=function(t){xs&&xs(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{On(o)}catch(r){e=r}}),n.__H=void 0,e&&yt.__e(e,n.__v))};var ks=typeof requestAnimationFrame=="function";function Sl(t){var e,n=function(){clearTimeout(o),ks&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);ks&&(e=requestAnimationFrame(n))}function On(t){var e=gt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),gt=e}function zo(t){var e=gt;t.__c=t.__(),gt=e}function fr(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Qi(t,e){return typeof e=="function"?e(t):e}function ta(t,e){for(var n in e)t[n]=e[n];return t}function Ho(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 Ht(t,e){var n=e(),o=j({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Ot(function(){r.__=n,r.u=e,bo(r)&&s({t:r})},[t,n,e]),V(function(){return bo(r)&&s({t:r}),t(function(){bo(r)&&s({t:r})})},[t]),n}function bo(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 ea(t){t()}function na(t){return t}function oa(){return[false,ea]}var ra=Ot;function Wo(t,e){this.props=t,this.context=e}function kl(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:Ho(this.props,r)}function o(r){return this.shouldComponentUpdate=n,ue(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(Wo.prototype=new qt).isPureReactComponent=true,Wo.prototype.shouldComponentUpdate=function(t,e){return Ho(this.props,t)||Ho(this.state,e)};var Es=st.__b;st.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Es&&Es(t)};var El=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ut(t){function e(n){var o=ta({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=El,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Cs=function(t,e){return t==null?null:le(le(t).map(e))},Cl={map:Cs,forEach:Cs,count:function(t){return t?le(t).length:0},only:function(t){var e=le(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:le},Ml=st.__e;st.__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)}Ml(t,e,n,o)};var Ms=st.unmount;function sa(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=ta({},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 sa(o,e,n)})),t}function ia(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return ia(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 vt(){this.__u=0,this.o=null,this.__b=null}function aa(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ft(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 ue(n,s)}return r.displayName="Lazy",r.__f=true,r}function Je(){this.i=null,this.l=null}st.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ms&&Ms(t)},(vt.prototype=new qt).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=aa(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]=ia(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)},vt.prototype.componentWillUnmount=function(){this.o=[]},vt.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]=sa(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&ue(xt,null,t.fallback);return r&&(r.__u&=-33),[ue(xt,null,e.__a?null:t.children),r]};var Ts=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 Tl(t){return this.getChildContext=function(){return t.context},t.children}function Ll(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){on(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)}}}on(ue(Tl,{context:e.context},t.__v),e.v)}function Il(t,e){var n=ue(Ll,{__v:t,h:e});return n.containerInfo=e,n}(Je.prototype=new qt).__a=function(t){var e=this,n=aa(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),Ts(e,t,o)):r()};n?n(s):s()}},Je.prototype.render=function(t){this.i=null,this.l=new Map;var e=le(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},Je.prototype.componentDidUpdate=Je.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ts(t,n,e)})};var ca=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Pl=/^(?: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]/,Al=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ol=/[A-Z0-9]/g,Nl=typeof document<"u",Rl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Bl(t,e,n){return e.__k==null&&(e.textContent=""),on(t,e),typeof n=="function"&&n(),t?t.__c:null}function $l(t,e,n){return Xi(t,e),typeof n=="function"&&n(),t?t.__c:null}qt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(qt.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var Ls=st.event;function Fl(){}function Dl(){return this.cancelBubble}function zl(){return this.defaultPrevented}st.event=function(t){return Ls&&(t=Ls(t)),t.persist=Fl,t.isPropagationStopped=Dl,t.isDefaultPrevented=zl,t.nativeEvent=t};var hr,Hl={enumerable:false,configurable:true,get:function(){return this.class}},Is=st.vnode;st.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||Nl&&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"||Rl(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Al.test(i)&&(i=c):c=i="oninput":s&&Pl.test(i)?i=i.replace(Ol,"-$&").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=le(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=le(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",Hl)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=ca,Is&&Is(t)};var Ps=st.__r;st.__r=function(t){Ps&&Ps(t),hr=t.__c};var As=st.diffed;st.diffed=function(t){As&&As(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),hr=null};var Wl={ReactCurrentDispatcher:{current:{readContext:function(t){return hr.__n[t.__c].props.value},useCallback:dt,useContext:Pt,useDebugValue:Ji,useDeferredValue:na,useEffect:V,useId:dr,useImperativeHandle:Gi,useInsertionEffect:ra,useLayoutEffect:Ot,useMemo:ht,useReducer:ur,useRef:W,useState:j,useSyncExternalStore:Ht,useTransition:oa}}};function Ul(t){return ue.bind(null,t)}function qn(t){return!!t&&t.$$typeof===ca}function jl(t){return qn(t)&&t.type===xt}function Vl(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function ql(t){return qn(t)?_l.apply(null,arguments):t}function Kl(t){return!!t.__k&&(on(null,t),true)}function Zl(t){return t&&(t.base||t.nodeType===1&&t)||null}var Xl=function(t,e){return t(e)},Yl=function(t,e){return t(e)},Gl=xt,Jl=qn,de={useState:j,useId:dr,useReducer:ur,useEffect:V,useLayoutEffect:Ot,useInsertionEffect:ra,useTransition:oa,useDeferredValue:na,useSyncExternalStore:Ht,startTransition:ea,useRef:W,useImperativeHandle:Gi,useMemo:ht,useCallback:dt,useContext:Pt,useDebugValue:Ji,version:"18.3.1",Children:Cl,render:Bl,hydrate:$l,unmountComponentAtNode:Kl,createPortal:Il,createElement:ue,createContext:Xt,createFactory:Ul,cloneElement:ql,createRef:ml,Fragment:xt,isValidElement:qn,isElement:Jl,isFragment:jl,isMemo:Vl,findDOMNode:Zl,Component:qt,PureComponent:Wo,memo:kl,forwardRef:Ut,flushSync:Yl,unstable_batchedUpdates:Xl,StrictMode:Gl,Suspense:vt,SuspenseList:Je,lazy:ft,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Wl};function pr(t){const e=Ht(tu,eu);return!!t||e}const mr=t=>t?{"data-high-contrast":""}:{},Ql="(prefers-contrast: more)",la=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Ql):null;function tu(t){var n;const e=la();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 eu=()=>{var t;return!!((t=la())!=null&&t.matches)},ln=Xt(void 0),bt=(...t)=>t.filter(Boolean).join(" "),Kn=Xt(null);function me(){return Pt(Kn)}function Yt(t="This part"){const e=Pt(Kn);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function ot(t,e=Object.is,n){const{clover:o}=Yt(n),r=W(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 Ht(o.store.subscribe,s)}const nu={subscribe:()=>()=>{}};function un(t,e){const n=Pt(Kn),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return Ht(o?o.subscribe:nu.subscribe,r)}const ou=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","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","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","playerClose":"Close player","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","frameRepeat":"Repeat","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),ua={es:()=>import("../es-BYfHUZ7P.mjs"),fi:()=>import("../fi-B5y2qr8T.mjs"),fr:()=>import("../fr-ChezCx6V.mjs"),nb:()=>import("../nb-8J22f9Td.mjs"),nn:()=>import("../nn-Dv1EvzI1.mjs"),no:()=>import("../no-8J22f9Td.mjs"),pt:()=>import("../pt-DWYQkATt.mjs")};function da(){const t=[];return typeof document<"u"&&t.push(document.documentElement.lang),typeof navigator<"u"&&t.push(...navigator.languages??[],navigator.language),t.filter(Boolean)}const Bn=t=>t.split("-")[0];function fa(t,e){return Bn(t).toLowerCase()===Bn(e).toLowerCase()}const _o=t=>t.includes("-")?Bn(t):null;function ru(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=_o(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=>_o(a)===t);if(i!==-1)return e[i];for(const a of n){const c=_o(a);if(c&&e.includes(c))return c}return o()}function ha(t,e){const[n,...o]=e?[e]:da();return ru(n,t,o)??t[0]}const ie="clover",zt={en:{[ie]:{...ou}}};let Ne,pa=[],$n=0;const Uo=new Set;function gr(){$n++,Uo.forEach(t=>t())}function su(t){const e=Bn(t);return e&&e!==t?[t,e]:[t]}const Os=new Map,iu=t=>Object.prototype.hasOwnProperty.call(ua,t);function au(t){let e=Os.get(t);return e||(e=ua[t]().then(({default:n})=>{var o;zt[t]={...zt[t],[ie]:{...n,...(o=zt[t])==null?void 0:o[ie]}},gr()},()=>{}),Os.set(t,e)),e}function ma(t){const e=t.find(n=>n==="en"||iu(n));return e&&e!=="en"?au(e):Promise.resolve()}let Tn=[],Ns="";function Qe(){const t=Ne?`${$n}`:`${$n} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===Ns)return Tn;Ns=t;const e=Ne?[Ne]:da();return Tn=[...new Set([...e,...pa].flatMap(su).concat("en"))],ma(Tn),Tn}function vr(t,e){if(t)return fa(t,e||Dt.resolvedLanguage)?void 0:t}const Dt={get language(){return Ne??Qe().find(t=>zt[t])??"en"},get resolvedLanguage(){return Qe().find(t=>{var e;return Object.keys(((e=zt[t])==null?void 0:e[ie])??{}).length>0})??"en"},changeLanguage(t){Ne=t,gr()},resolve(t,e,n=ie){var r,s;let o={text:t};for(const i of Qe()){const a=(s=(r=zt[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=ie){return Dt.resolve(t,e,n).text},langOf(t,e,n=ie){return vr(Dt.resolve(t,void 0,n).lang,e)},ready(){return ma(Qe())},subscribe(t){return Uo.add(t),()=>{Uo.delete(t)}},getSnapshot(){return $n}};typeof document<"u"&&Qe();function cu(t={}){for(const[e,n]of Object.entries(t.resources??{}))for(const[o,r]of Object.entries(n??{}))zt[e]??(zt[e]={}),zt[e][o]={...zt[e][o],...r};return t.fallbackLng!==void 0&&(pa=t.fallbackLng===false?[]:[t.fallbackLng].flat()),t.lng&&(Ne=t.lng),gr(),Dt}const lu=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:ie,cloverI18n:Dt,initCloverI18n:cu,langWithin:vr},Symbol.toStringTag,{value:"Module"}));function St(t=ie,e){const n=Ht(Dt.subscribe,Dt.getSnapshot,Dt.getSnapshot),o=Pt(ln),r=e??o,s=dt((a,c)=>Dt.t(a,c,t),[t,n]),i=dt(a=>Dt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Dt}}function Zn(t,e){const n=Pt(ln),o=W(null),[r,s]=j(""),i=dt(u=>{o.current=u,typeof t=="function"?t(u):t&&(t.current=u)},[t]);V(()=>{var d,p;const u=(d=o.current)==null?void 0:d.parentElement;e!==void 0||n!==void 0||!u||s(((p=u.closest("[lang]"))==null?void 0:p.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=St(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const z=t=>Array.isArray(t)?t:t==null?[]:[t],uu=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function yr(t){return uu.includes(t)?t:"left-to-right"}const du=["individuals","paged","continuous","unordered"];function fu(t){return z(t).find(n=>du.includes(n))??"individuals"}function hu(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=z(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 pu(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const ga=["Independents","Composite","List"];function Xn(t){return z(t==null?void 0:t.body).flatMap(e=>ga.includes(e==null?void 0:e.type)?z(e.items):[e])}function br(t){const e=z(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function va(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 Ln(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return va(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 jo=t=>{var e;return Array.isArray(t)?jo(t[0]):ga.includes(t==null?void 0:t.type)?jo((e=t.items)==null?void 0:e[0]):t};function je(t){return mu(jo(t))}function mu(t){var n;if(typeof t=="string")return Ln(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return Ln(t.id??"");const e=typeof t.source=="string"?Ln(t.source):Ln(((n=t.source)==null?void 0:n.id)??"");for(const o of z(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=va(e.id,String(r.value));if(s)return s}}return e}const dn=t=>t==="Audio"||t==="Sound",gu=t=>{const e=z(t);return e.length>0&&e.every(n=>n==="supplementing")},vu=(t,e)=>gu(t)&&!!(e.rect||e.svg||e.point)&&!e.t,Rs=new WeakMap,yu={canvases:[],views:[],direction:"left-to-right"};function Et(t){if(!t)return yu;let e=Rs.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:hu(n,fu(t.behavior)),direction:yr(t.viewingDirection)},Rs.set(t,e)}return e}const Bs=new WeakMap;function Se(t,e){if(!e)return null;const n=Et(t);let o=Bs.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);Bs.set(n,o)}return o.get(e)??null}function fn(t,e){const{canvases:n,views:o}=Et(t),r=n.findIndex(s=>s.id===e);return r===-1?0:pu(o,r)}const $s=new WeakMap,bu=[];function we(t,e){if(!t)return bu;const n=fn(t,e);let o=$s.get(t);o||$s.set(t,o=new Map);let r=o.get(n);if(!r){const s=Et(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function _u(t,e){var s,i;const{canvases:n,views:o}=Et(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 wu(t){const e=t==null?void 0:t.start;if(!e)return null;const n=je(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 ye=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},xu=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function Su(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=we(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 pt(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=ha(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"?void 0:r}}const ku=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function rn(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&ku.test(o));return n.length===1?n[0]:void 0}const ze={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Eu=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi)$/,Cu=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function Mu(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>r.length===4);return(o?Cu.test(o):Eu.test(e))?"rtl":void 0}function it(t){return t?{lang:t,dir:Mu(t)}:{}}function Tu({clover:t,language:e}){const{t:n,langOf:o}=St(),[r,s]=j(null),i=W(n);return i.current=n,V(()=>{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 p=Se(c,l),h=pt(p==null?void 0:p.label,e),m=i.current("canvasPosition",{index:fn(c,l)+1,total:Et(c).views.length});s({label:h.text,lang:h.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:ze,children:[r!=null&&r.label?f(xt,{children:[f("span",{...it(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...it(o("canvasPosition")),children:r.position})]})}const Lu=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function Iu(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||Lu(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:z(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 Xn(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of z(r.items))o(i,s)}return e}const _r="content-search",Fs=/\/search\/([0-2])\//;function ya(t){if(!t)return null;let e=null;for(const n of z(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:Fs.test(s)?Number(Fs.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 Pu="contents",tv=(t,e)=>`${t}#region-${e+1}`,Au=t=>z(t==null?void 0:t.motivation).includes("linking");function ba(t,e,n){const o=[];for(const r of z(t==null?void 0:t.items)){const s=z(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Iu(r);if(!i.length&&!Au(r))continue;const a=je(z(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 Ou=t=>Et(t).canvases.some(e=>z(e.items).some(n=>z(n==null?void 0:n.items).some(o=>z(o==null?void 0:o.body).some(r=>[r,...z(r==null?void 0:r.items)].some(s=>z(s==null?void 0:s.annotations).length>0)))));function Nu(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=z(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 _a=t=>z(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"])))),Ds=new WeakMap;function wa(t){var n;if(!t)return[];let e=Ds.get(t);if(!e){const o=new Map;for(const r of Et(t).canvases)for(const s of z(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=_a(s)[0])==null?void 0:n.id;a={id:i,label:Nu(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...ba(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),Ds.set(t,e)}return e}const zs=new WeakMap,xa=[];function ev(t){if(!t)return xa;let e=zs.get(t);return e||(e=Et(t).canvases.flatMap(n=>z(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)}))),zs.set(t,e)),e}const wo=new WeakMap,xo=new WeakMap;function Sa(t,e=Ru){var n;if(!xo.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;xo.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:xa,entries:o.flatMap(s=>s.entries)}:null)}return xo.get(e)??Bu(t)}const Ru=[];function Bu(t){var r;if(!t)return null;if(wo.has(t))return wo.get(t);const e=Et(t).canvases.flatMap(s=>z(s.annotations).flatMap(i=>_a(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=wa(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:d,canvas:p})=>({id:String(d.id),canvasId:String(p.id),fetched:Array.isArray(d.items)})),entries:s.flatMap(({page:d})=>{var p;return((p=c.find(h=>h.id===d.id))==null?void 0:p.entries)??[]})}})():null;return wo.set(t,o),o}const Hs=new WeakMap,Ws=[];function wr(t,e){const n=wa(t);if(!e.length)return n.length?n:Ws;const o=t??Ws;let r=Hs.get(o);r||Hs.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 Us=new WeakMap;function ka(t,e,n,o=null){const r=wr(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=Us.get(r);i||Us.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 $u=t=>Number(t==null?void 0:t.duration)>0;function Ea(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>vu(n.motivation,n.target)&&!$u(e(n.canvasId)))}const js=new WeakMap;function Fu(t,e){const n=wr(t,e);let o=js.get(n);if(!o){const r=n.filter(s=>!Ea(s,i=>Se(t,i)??void 0));o=r.length===n.length?n:r,js.set(n,o)}return o}const Vs=new WeakMap;function xr(t,e,n,o){const r=wr(t,e),s=Vs.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)&&Ea(c,l=>Se(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Vs.set(r,{hidden:n,shown:o,ids:a}),a}const qs=new WeakMap;function Du(t,e,n,o){const r=xr(t,e,n,o),s=qs.get(r);if(s&&s.hidden===n)return s.ids;const i=[_r,Pu,...r.filter(a=>!n.includes(a))];return qs.set(r,{hidden:n,ids:i}),i}function zu(t){for(const e of z(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=z(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 So(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 Ks(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"?z(e.motivation).includes("contentState"):e.type==="SpecificResource"}function Hu(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Wu({manifestId:t,canvasId:e,region:n,time:o}){const r={id:e,type:"Canvas",partOf:[{id:t,type:"Manifest"}]},s=o!=null&&o>0?`t=${Math.round(o*100)/100}`:n?`xywh=${[n.x,n.y,n.w,n.h].map(Math.round).join(",")}`:null,i={"@context":"http://iiif.io/api/presentation/3/context.json",id:`${e}#content-state`,type:"Annotation",motivation:["contentState"],target:s?{type:"SpecificResource",source:r,selector:{type:"FragmentSelector",value:s}}:r};return{json:i,encoded:Hu(i)}}const Uu=/iiif\.io\/api\/presentation\/4\/context\.json/;function Ca(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&Uu.test(o))}let Zs=null;function Sr(){return Zs??(Zs=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Zs}async function xe(t){if(Ca(t))return t;const[e,{upgrade:n}]=await Promise.all([Sr(),import("../upgrade-eNW0DPXq.mjs")]);return await n(t,e)}function kr(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 ju=t=>(t==null?void 0:t.credentials)==="include",Vu=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class qu extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function He(t,e,n){const o=await kr(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new qu(`${e} answered ${o.status}`,e,o.status);return o.json()}const Xs=()=>import("./content-state-reader-C7UBMOq3.mjs"),Ku=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function Zu(t){const e={"@context":Yu,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of Ku)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const Ys=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},Xu=/^(oa:)?Annotation(Page|Collection)$/;class In extends Error{constructor(){super(...arguments);I(this,"name","CloverContentError")}}const Yu="http://iiif.io/api/presentation/4/context.json",Gu=t=>/^https?:\/\//i.test(t);async function Vo(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await He(e,t.id,n)}const Ju=50;async function Er(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<Ju;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 He(e.request,a.id,e.signal),l=await xe({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function Ma(t,e={}){return xe(await Vo(t,e))}async function Ta(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return xe(await Vo(o,e));if(o.type==="Collection"&&n<8){const r=await Er(await xe(await Vo(o,e)),e),s=await Ta(r,e,n+1);if(s)return s}}return null}async function Qu(t,{request:e,signal:n}={}){Sr();const o=typeof t=="string"?await He(e,t.trim(),n):t,r=await xe(o);return r.type==="Collection"?Er(r,{request:e,signal:n}):r}async function td(t,e={}){var d;const{request:n,signal:o}=e;Sr();let r,s,i,a,c;const l=async p=>{const{resolveContentState:h}=await Xs(),m=h(p);if(!m)throw new In("Unreadable content state");return r=m.target??r,s=m.manifestId??s,i=m.annotation??i,a=m.targets??a,He(n,m.id,o)};if(typeof t=="string")if(Gu(t.trim()))c=await He(n,t.trim(),o);else{const{decodeContentState:p}=await Xs(),h=p(t);if(!h)throw new In("Unreadable iiifContent");c=Ks(h)?await l(h):h}else c=t;if(Ks(c)&&(c=await l(c)),Xu.test(String((c==null?void 0:c.type)??""))){const{annotationsContent:p}=await import("./annotations-content-CbA3eOIC.mjs");return p(c,e)}const u=await xe(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 p=await Er(u,e),h=e.manifestId??s,m=h?(p.items??[]).find(_=>_.id===h&&_.type==="Manifest"):void 0,g=m?await Ma(m,e):await Ta(p,e);if(!g)throw new In("The Collection holds no Manifest");return{manifest:g,collection:p,target:r,annotation:i,targets:a}}case"Canvas":case"Timeline":case"Scene":{const p=u;return r??(r={canvasId:p.id}),{manifest:Zu(p),target:r,annotation:i}}default:throw new In(`Cannot show a ${String(u.type??"resource without a type")}`)}}const La=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Gs(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])La(r)&&e.push([n.id,o,r.id]);return e}async function ed(t,e,n,o){return nd(await He(n,t,o),e)}async function nd(t,e="urn:clover:annotation-page"){var r;const n=t;return Ca(n)?n:((r=(await xe({"@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 od(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 rd(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||!La(c)?c:(r=true,od(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}function sd(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 Pe(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 id(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 qo={query:"",status:"idle",hits:[],set:null},Js={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:qo,regions:null,targets:null,targetIndex:null};function ad(t={}){const e=sd(Js),n=Pe(null),o=Pe(null),r=Pe(null),s=Pe(null),i=Pe(null),a=Pe(null);let c=null,l=null,u=[],d=[],p=[],h=0,m=null,g=null,_=null;const v=(b,T)=>{!g||b===T||(g={...g,items:g.items.map(O=>O.manifestId===b&&O.manifestAs!==T?{...O,manifestAs:T}:O)})},y=b=>{var O;const T=(O=e.get().manifest)==null?void 0:O.id;return!!T&&(T===b.manifestId||T===b.manifestAs)},w=()=>u.length||d.length||p.length?[...u,...d,...p]:Js.addedSets;let S=t.request,x=null;const k=new Set;let B="view",H=0;const et=(b,T,O)=>{if(k.has(O))return;k.add(O);const R=x==null?void 0:x.signal;ed(O,b,S,R).then(N=>{R!=null&&R.aborted||e.set(E=>E.manifest?{manifest:rd(E.manifest,b,T,N)}:{})}).catch(()=>k.delete(O))},rt=()=>{const{manifest:b,canvasId:T}=e.get();if(b)for(const[O,R,N]of Gs(B==="all"||H>0?Et(b).canvases:we(b,T)))et(O,R,N)};e.subscribe(rt);const Y=(b,T,O,R,N)=>{var Jt,Qt,te;const{canvases:E}=Et(b),U=Ct=>!!Ct&&E.some(ee=>ee.id===Ct),G=wu(b),_t=U(O==null?void 0:O.canvasId)?O:U(G==null?void 0:G.canvasId)?G:null,at=U(R.canvasId)?R.canvasId:(_t==null?void 0:_t.canvasId)??(U(R.defaultCanvasId)?R.defaultCanvasId:null)??((Jt=E[0])==null?void 0:Jt.id)??null;l==null||l.abort();const $=N&&((Qt=So(p,N))==null?void 0:Qt.canvasId)===at?N:null,Z=_t&&$?{..._t,region:void 0}:_t,lt=++h;u=[],e.set({status:"ready",search:qo,regions:null,manifest:b,collection:T,canvasId:at,target:Z&&Z.canvasId===at?Z:null,addedSets:w(),annotationId:$,targets:g});const Lt=b==null?void 0:b.structures;Array.isArray(Lt)&&JSON.stringify(Lt).includes("xywh=")&&import("./range-regions-By6L5JOK.mjs").then(({contentsSet:Ct})=>{h===lt&&e.set({regions:Ct(b)})}),Ou(b)&&import("./image-layers-B09fporZ.mjs").then(({imageLayers:Ct})=>{h===lt&&(u=Ct(b),e.set({addedSets:w()}))}),at&&at!==R.canvasId&&((te=t.onCanvasChange)==null||te.call(t,at))},Q=(b,T)=>e.set(O=>{const R=O.hiddenSets.filter(E=>E!==b),N=O.shownSets.filter(E=>E!==b);return T?{hiddenSets:R,shownSets:[...N,b]}:{hiddenSets:[...R,b],shownSets:N}}),M=(b,T)=>{var R,N,E;if(!b)return;if((R=t.isControlled)!=null&&R.call(t)){T&&e.set({target:T}),(N=t.onCanvasChange)==null||N.call(t,b);return}const O=e.get().canvasId!==b;e.set({canvasId:b,target:T}),O&&((E=t.onCanvasChange)==null||E.call(t,b))},L=(b,T=false)=>{const{manifest:O}=e.get(),R=_u(O,b);M(R,R&&T?{canvasId:R,autoplay:T}:null)},P=()=>{const{manifest:b,canvasId:T}=e.get();return{at:fn(b,T),total:Et(b).views.length}},q=()=>{x==null||x.abort();const b=new AbortController;return x=b,k.clear(),e.set({status:"loading",error:null,annotationId:null}),b.signal},X=b=>e.set({status:"error",error:b instanceof Error?b:new Error(String(b))});async function K(b,T={}){var R;const O=q();try{const N=await td(b,{request:S,signal:O,manifestId:T.manifestId??void 0});if(O.aborted)return;const E=N.annotation,U=E?ba({items:[E]},`${E.id}#content-state`):[];p=U.length?[{id:`${E.id}#content-state`,source:"added",entries:U}]:N.annotationSets??[];const G=m??((R=U[0])==null?void 0:R.id)??N.pick;m=null,e.set({throughCollection:!!N.collection}),g=N.targets??null,g&&v(g.items[0].manifestId,N.manifest.id),e.set({targetIndex:g?0:null}),Y(N.manifest,N.collection??null,N.target,T,G)}catch(N){O.aborted||X(N)}}const C=b=>{const{manifest:T,collection:O}=e.get();return(T==null?void 0:T.id)===b||(O==null?void 0:O.id)===b},nt=b=>{var T;return(((T=e.get().collection)==null?void 0:T.items)??[]).find(O=>O.id===b)??{id:b,type:"Manifest"}},F=(b,T)=>{var O,R;if(m=T,(O=t.isManifestControlled)!=null&&O.call(t)){(R=t.onManifestChange)==null||R.call(t,b);return}tt({id:b,type:"Manifest"}).then(N=>{var E;return N&&((E=t.onManifestChange)==null?void 0:E.call(t,b))})},tt=async(b,T)=>{if(b.type==="Collection")return await K(b.id),e.get().status==="ready";const{collection:O}=e.get(),R=q(),N=m;m=null;const E=N?So(p,N):null,U=typeof T=="string"?{canvasId:T}:T??_;_=null;try{const G=await Ma(b,{request:S,signal:R});return R.aborted?false:(v(b.id,G.id),Y(G,O,E?{canvasId:E.canvasId}:U??void 0,{},N),true)}catch(G){return R.aborted||X(G),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return S},setRequest(b){S=b},load:K,async openCollection(b){var O;const T=e.get().manifest;if(!(!T||((O=e.get().collection)==null?void 0:O.id)===b))try{const R=await Qu(b,{request:S});if(R.type!=="Collection"||e.get().manifest!==T)return;e.set({collection:R})}catch{}},async goToManifest(b,T){var R,N,E;if(C(b))return;const O=nt(b);if(O.type!=="Collection"&&((R=t.isManifestControlled)!=null&&R.call(t))){(N=t.onManifestChange)==null||N.call(t,b);return}await tt(O,T)&&((E=t.onManifestChange)==null||E.call(t,e.get().manifest.id))},goToTarget(b){var R,N,E;const T=(R=e.get().targets)==null?void 0:R.items[b];if(!T)return;e.set({targetIndex:b});const O=T.canvasId?{canvasId:T.canvasId,...T.region&&{region:T.region},...T.time!==void 0&&{time:T.time}}:null;if(y(T)){O&&M(O.canvasId,O);return}if((N=t.isManifestControlled)!=null&&N.call(t)){_=O,(E=t.onManifestChange)==null||E.call(t,T.manifestId);return}tt(nt(T.manifestId),O??void 0).then(U=>{var G;return U&&((G=t.onManifestChange)==null?void 0:G.call(t,T.manifestId))})},async syncManifest(b){!b||C(b)||e.get().status!=="ready"||await tt(nt(b))},goTo(b,T){M(b,T?{...T,canvasId:b}:null)},next({autoplay:b=false,wrap:T=false}={}){const{at:O,total:R}=P();O+1<R?L(O+1,b):T&&R>1&&L(0,b)},previous(){const{at:b}=P();b>0&&L(b-1)},first(){L(0)},last(){L(P().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(b){b&&e.set({canvasId:b})},selectAnnotation(b){const{manifest:T,addedSets:O,canvasId:R,search:N,regions:E}=e.get(),U=So(ka(T,O,N.set,E),b);if(e.set({annotationId:U?b:null}),!U)return;a.emit(b);const{hiddenSets:G,shownSets:_t}=e.get();U.setId!==_r&&xr(T,O,G,_t).includes(U.setId)&&Q(U.setId,true);const at=we(T,R).some(lt=>lt.id===U.canvasId),$=Se(T,U.canvasId)!==null;!at&&$&&M(U.canvasId,null);const Z=$?void 0:zu(U.annotation);Z&&F(Z,U.id)},async search(b){l==null||l.abort();const T=ya(e.get().manifest),O=b.trim();if(!O||!T){l=null,e.set({search:qo,annotationId:null});return}const R=new AbortController;l=R,e.set(N=>({search:{...N.search,query:O,status:"loading"}}));try{const{searchInto:N}=await import("./search-PhOwMKHi.mjs");await N(e,T,O,S,R.signal)}catch{e.set({search:{query:O,status:"error",hits:[],set:null}})}},setSetVisible(b,T){Q(b,T)},async loadAnnotations(b){if(c==null||c.abort(),!b){d=[],e.set({addedSets:w()});return}const T=new AbortController;c=T;try{const{loadAnnotationSets:O}=await import("./annotation-collection-DZHa18ir.mjs"),R=await O(b,{request:S,signal:T.signal});if(T.signal.aborted)return;d=R,e.set({addedSets:w()})}catch{}},getContentState(){const{manifest:b,canvasId:T}=e.get();if(!b||!T)return null;const O=n.get(),R=o.get(),N=R&&R.currentTime>0?R.currentTime:null,U=O&&we(b,T).some(G=>G.id===O.canvasId)&&!N?O:null;return Wu({manifestId:b.id,canvasId:(U==null?void 0:U.canvasId)??T,region:U==null?void 0:U.region,time:N})},setAnnotationPages(b){b!==B&&(B=b,rt())},fetchAnnotationPages(b){const{manifest:T}=e.get();if(!T||!b.length)return;const O=new Set(b);for(const[R,N,E]of Gs(Et(T).canvases))O.has(E)&&et(R,N,E)},holdAllAnnotationPages(){H++,rt();let b=true;return()=>{b&&H--,b=false}},dispose(){x==null||x.abort(),c==null||c.abort(),l==null||l.abort()}}}function Cr(t){const e=[];for(const n of z(t==null?void 0:t.items))for(const o of z(n==null?void 0:n.items))if(br(o))for(let r of Xn(o))(r==null?void 0:r.type)==="Choice"&&(r=z(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 cd(t){return t.flatMap(e=>Cr(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 ud(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 dd({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:p,annotationPages:h="view",onContentStateChange:m,...g}){const _=e!==void 0,v=s!==void 0,y=W({controlled:_,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a});y.current={controlled:_,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[w]=j(()=>ad({request:l,onCanvasChange:F=>{var tt,b;return(b=(tt=y.current).onCanvasChange)==null?void 0:b.call(tt,F)},onManifestChange:F=>{var tt,b;return(b=(tt=y.current).onManifestChange)==null?void 0:b.call(tt,F)},isControlled:()=>y.current.controlled,isManifestControlled:()=>y.current.manifestControlled}));w.setRequest(l);const S=W({});S.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const x=Vu(l),k=W(t);k.current=t;const B=gd(t);V(()=>(w.load(k.current,S.current),()=>w.dispose()),[w,B,x]),V(()=>{_&&w.syncCanvas(e??null)},[w,_,e]);const[H,et]=j(w.store.get().status);V(()=>{let F=w.store.get().status;return w.store.subscribe(()=>{var T,O;const{status:tt,error:b}=w.store.get();tt!==F&&(F=tt,et(tt),(O=(T=y.current).onStatusChange)==null||O.call(T,tt,b))})},[w]);const rt=W(p);rt.current=p;const Y=hd(p);V(()=>{w.loadAnnotations(rt.current??null)},[w,Y,x]),V(()=>{w.setAnnotationPages(h)},[w,h]),md(w,m),V(()=>{v&&H==="ready"&&w.syncManifest(s??null)},[w,v,s,H]);const Q=fd(w,F=>{var tt;return F.status==="ready"?((tt=F.manifest)==null?void 0:tt.id)??null:null});V(()=>{c&&Q&&w.search(c)},[w,c,Q]);const M=W(d);ud(M.current,d)||(M.current=d);const L=M.current,[P,q]=j(),[X,K]=j(u);X!==u&&(K(u),q(void 0));const C=P??u;return[ht(()=>({clover:w,language:C,renderers:L,chooseLanguage:q}),[w,C,L]),H,g]}function fd(t,e){return Ht(t.store.subscribe,()=>e(t.store.get()))}function hd(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"))}const pd=300;function md(t,e){const n=W(e);n.current=e;const o=!!e;V(()=>{if(!o)return;let r,s="";const i=()=>{clearTimeout(r),r=setTimeout(()=>{var m;const h=t.getContentState();!h||h.encoded===s||(s=h.encoded,(m=n.current)==null||m.call(n,h))},pd)};let a=t.store.get().canvasId;const c=t.store.subscribe(()=>{const h=t.store.get().canvasId;h!==a&&(a=h,i())}),l=t.viewport.subscribe(i);let u=null;const d=h=>{u==null||u.removeEventListener("pause",i),u==null||u.removeEventListener("seeked",i),u=h,u==null||u.addEventListener("pause",i),u==null||u.addEventListener("seeked",i)};d(t.media.get());const p=t.media.subscribe(d);return i(),()=>{clearTimeout(r),c(),l(),p(),d(null)}},[t,o])}function gd(t){return typeof t=="string"?t:t.id??t["@id"]??t}const vd=Ut(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=dd(s),u=Zn(i,l.lang),d=pr(r);return f(Kn.Provider,{value:a,children:f(ln.Provider,{value:u.hostLanguage,children:f(e,{ref:u.ref,className:bt("clover-root",n),"data-status":c,...mr(d),...l,children:[o,f(Tu,{clover:a.clover,language:a.language})]})})})}),yd=()=>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"}),bd=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),_d=()=>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"}),nv=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),Ia=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),ov=()=>f(xt,{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"})]}),rv=()=>f(xt,{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"})]}),Bt={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 ke({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=St(),c=W(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return Sd(),V(()=>{const u=c.current;u&&Qs(u)&&Ko(u)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...it(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&&Qs(u)&&Ko(u)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function Pn(t){const e=t.target instanceof Element&&Pa(t.target),n=e&&Mr(e);n&&Ko(n)}function Mr(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function Pa(t){const e=t.matches("input")?t.parentElement:null;return e&&Mr(e)?e:t}function Qs(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function Ko(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=xd(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 xd(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 ti=0;function ei(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&&Pa(n);o&&Mr(o)&&e.add(o),e.forEach(r=>Aa(r,"tipHidden",["pointerenter","focusout"]))}function Aa(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 Sd(){V(()=>(ti++===0&&(document.addEventListener("keydown",ei,true),document.addEventListener("pointerenter",Pn,true),document.addEventListener("focus",Pn,true)),()=>{--ti||(document.removeEventListener("keydown",ei,true),document.removeEventListener("pointerenter",Pn,true),document.removeEventListener("focus",Pn,true))}),[])}function kd(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 Re=({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:bt("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,...it(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(ke,{label:n,shortcut:a})]})},Ed=Xt("");function Gt(){return Pt(Ed)+dr()}const ko=new Map;function Cd(t,e){const n=Gt(),o=W(e);o.current=e,V(()=>t?Md(n,o):void 0,[t,n])}function Md(t,e){for(const[n,o]of[...ko])n!==t&&o.current();return ko.set(t,e),()=>{ko.delete(t)}}const Td=ft(()=>import("./CaptionDetails-BwCTovy_.mjs"));function Ld(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const Oa=(t,e)=>`${t}-label-${e}`,Id=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=St(),c=W(null),[l,u]=j(o);return o&&!l&&u(true),Cd(o,()=>r(false)),V(()=>{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(Re,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(Ia,{})}),e.map((d,p)=>{const h=pt(d.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[h.text&&f("p",{className:"clover-canvas-caption-label",id:Oa(t,p),...it(h.lang),children:h.text}),l&&f(vt,{fallback:null,children:f(Td,{summary:d.summary,metadata:d.metadata,comments:n==null?void 0:n.get(d.id),language:s})})]},d.id)})]})},Pd=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),Ad=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),Od=()=>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"}),Nd=()=>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"}),Rd=()=>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"}),ni=()=>f(xt,{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"})]}),Bd=()=>f(xt,{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"})]}),$d=({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}),Fd=112,Dd=128;function zd(t){Ot(()=>{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 h of s?[]:Array.from(t.children))!(h instanceof HTMLElement)||!h.offsetParent||(i=Math.min(i,h.offsetLeft),a=Math.max(a,h.offsetTop+h.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[h,m]of Object.entries(c)){const g=`--clover-canvas-controls-${h}`;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),p=t.offsetLeft+i-l;a&&d<Fd&&p>=Dd?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 Yn=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},Na=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},Ra=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},Hd=(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()},Ba=async(t,e)=>{var o,r,s,i;const n=Ra(t);if(n)try{if(Yn()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!Na()){e&&t&&Hd(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 $a(t){const[e,n]=j(false);return V(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=Yn())!=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 Wd({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($d,{label:n,children:o}),label:n,tip:f(ke,{label:n,shortcut:a})},t):f(Re,{id:e,label:n,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const Ud=({controls:t,controlButtons:e,hasPlaceholder:n=false,children:o})=>{const[r,s]=j(null),i=$a(r);zd(r);const a=t(i),c=[...a.filter(l=>l.key!=="fullPage"),...a.filter(l=>l.key==="fullPage")];return f("div",{className:"clover-canvas-controls","data-fullscreen":i,"data-has-placeholder":n,"data-testid":"clover-canvas-controls",ref:s,children:[c.map(l=>Wd(l,e)),o]})},jd=()=>()=>{};function Vd(){return Ht(jd,Na)}const oi=new WeakMap;function Fn(t,e){const[n,o]=j(()=>oi.get(t)??null);return V(()=>{if(!e||n)return;let r=true;return t().then(s=>{oi.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}const qd=()=>import("./AnnotationMenu-DPOSehBo.mjs"),Kd=()=>import("./ChoiceMenu-DQ1x572Y.mjs"),ri=2,Zd=({renderer:t,instance:e,config:n,controlButtons:o,hasPlaceholder:r,choices:s=[],selections:i={},onSelect:a,annotations:c=[],hiddenPages:l,onPageVisibilityChange:u,selectedAnnotation:d=null,onAnnotationSelect:p,onAnnotationActivate:h,captionId:m,captionOpen:g=false,onCaptionToggle:_,placeId:v,placeOpen:y=false,onPlaceToggle:w,language:S,children:x})=>{var G,_t;const{t:k,langOf:B}=St(),[H,et]=j(false),[rt,Y]=j(false),Q=`annotations-${e}`,M=`${Q}-menu`,L=k("informationPanelTabsAnnotations"),P=B("informationPanelTabsAnnotations"),q=dt(at=>{var $;Y(false),h==null||h(null),at&&(($=document.getElementById(Q))==null||$.focus())},[Q,h]),X=n.annotations&&c.length>0&&p,K=n.information&&m&&_,C=n.map&&v&&w,nt=`choice-${e}`,F=s.length===1?pt(s[0].label,S):null,tt=(F==null?void 0:F.text)||k("canvasChoice"),b=F!=null&&F.text?F.lang:B("canvasChoice"),T=`${nt}-menu`,O=(G=Fn(qd,!!X))==null?void 0:G.default,R=(_t=Fn(Kd,s.length>0&&!!a))==null?void 0:_t.default,N=dt(at=>{var $;et(false),at&&(($=document.getElementById(nt))==null||$.focus())},[nt]),E=Vd();return f(xt,{children:[f(Ud,{controls:at=>{const $=[],Z=t;return n.zoom&&Z&&$.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:Bt.zoomIn,label:k("imageZoomIn"),lang:B("imageZoomIn"),glyph:f(Pd,{}),onClick:()=>Z.zoomBy(ri)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:Bt.zoomOut,label:k("imageZoomOut"),lang:B("imageZoomOut"),glyph:f(Ad,{}),onClick:()=>Z.zoomBy(1/ri)}),n.fullPage&&E&&$.push({key:"fullPage",id:`fullPage-${e}`,label:k(at?"imageExitFullScreen":"imageFullScreen"),lang:B(at?"imageExitFullScreen":"imageFullScreen"),glyph:at?f(Nd,{}):f(Od,{}),onClick:lt=>void Ba(lt.currentTarget)}),n.rotation&&Z&&$.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:Bt.rotateRight,label:k("imageRotateRight"),lang:B("imageRotateRight"),glyph:f(ni,{}),onClick:()=>Z.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:Bt.rotateLeft,label:k("imageRotateLeft"),lang:B("imageRotateLeft"),glyph:f(ni,{}),onClick:()=>Z.rotateBy(-90)}),n.reset&&Z&&$.push({key:"reset",id:`reset-${e}`,shortcut:Bt.reset,label:k("imageResetZoom"),lang:B("imageResetZoom"),glyph:f(Rd,{}),onClick:()=>Z.home()}),s.length&&$.push({key:"choice",id:nt,label:tt,lang:b,glyph:f(Bd,{}),onClick:()=>et(lt=>!lt),expanded:H,controls:T}),$},controlButtons:o,hasPlaceholder:r,children:[X&&f(Re,{id:Q,label:L,lang:P,onClick:()=>Y(at=>!at),expanded:rt,controls:M,children:f(yd,{})}),C&&f(Re,{id:`place-${e}`,label:k("mapLabel"),lang:B("mapLabel"),onClick:w,expanded:y,controls:v,children:f(_d,{})}),K&&f(Re,{id:`information-${e}`,label:k("informationPanelTabsAbout"),lang:B("informationPanelTabsAbout"),onClick:_,expanded:g,controls:m,children:f(bd,{})}),x]}),O&&rt&&X&&f(O,{id:M,triggerId:Q,label:L,labelLang:P,annotations:c,hiddenPages:l,onPageVisibilityChange:u,selected:d,onSelect:p,onActivate:at=>h==null?void 0:h(at),onClose:q}),R&&H&&s.length>0&&a&&f(R,{id:T,triggerId:nt,label:tt,labelLang:b,language:S,choices:s,selections:i,onSelect:a,onClose:N})]})},Xd=["jpg","png","webp","gif"];class Zo extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function Tr(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function Gn(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 Tr(a)}}function Yd(t,e){if(!t||typeof t!="object")throw new Zo("info.json is not an object",e??"");const n=t,o=Gd(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=Tr(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new Zo("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(y=>typeof y=="string"),u=c.filter(y=>!!y&&typeof y=="object"),d=Jd(l),p=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...u.flatMap(y=>Array.isArray(y.supports)?y.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(y=>String(y).toLowerCase()).find(y=>Xd.includes(y))??"jpg",g=y=>{var S;const w=n[y]??((S=u.find(x=>x[y]!==void 0))==null?void 0:S[y]);return Number(w)>0?Number(w):void 0};let _=g("maxWidth"),v=g("maxHeight");return _&&!v&&(v=_),v&&!_&&(_=void 0),{id:s,version:o,level:d,width:i,height:a,tiles:Qd(n.tiles),sizes:tf(n.sizes),maxWidth:_,maxHeight:v,maxArea:g("maxArea"),regionByPx:d>=1||p.has("regionByPx"),sizeByW:d>=1||p.has("sizeByW")||p.has("sizeByWh"),format:m,quality:"default"}}function Gd(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 Jd(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Qd(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 Dn(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 ef(t){return t.version===2&&t.level===0?"native":void 0}const Eo=new Map;function Fa(t,{request:e}={}){const n=Tr(t),o=Eo.get(n);if(o)return o;const r=`${n}/info.json`,s=kr(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new Zo(`info.json request failed with ${i.status}`,r,i.status);return Yd(await i.json(),n)}).catch(i=>{throw Eo.delete(n),i});return Eo.set(n,s),s}function nf(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 sv(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function Lr(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 of=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,rf=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,sf=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&rf.test(e)),af={width:1600,height:900};function cf(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(We),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),p=u.width*d,h=u.height*d;n[l]=r?{x:c,y:0,width:p,height:h}:{x:0,y:c,width:p,height:h},c+=r?p:h}return n}function We(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=Da(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=zn(t)[0])==null?void 0:s.body)??((i=Hn(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}:af}function Da(t){return t.accompanyingContainer??t.placeholderContainer}function lf(t,e,n,o,r){return of(t.id,e.id,n,o,r)}function uf(t){const e=[];for(const n of t)za(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=z(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 Co={};function df(t){if(t.type!=="Video"&&!dn(t.type)||!t.format||sf(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=Co[e]??(Co[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function ff(t){const e={};for(const n of t){const o=n.items.findIndex(df);o>0&&(e[n.key]=o)}return e}const Mo=new WeakMap,To=[];function hf(t){return Xn(t).some(e=>((e==null?void 0:e.type)==="Choice"?z(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||dn(o==null?void 0:o.type)))}function Xo(t){var i;const e=Mo.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!br(c))continue;const l=c.target?(i=je(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=>hf(a.annotation)))return Mo.set(t,To),To;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:To;return Mo.set(t,s),s}const sn=t=>`frame:${t.id}`;function za(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{br(r)&&Xn(r).forEach((i,a)=>e(i,lf(t,r,o,s,a),r))})})}function zn(t,e={},{allFrames:n=false}={}){const o=[];return Ha(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 Hn(t,e={}){const n=[];return Ha(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!dn(a))return;const c=Lr(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function pf(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 Ha(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Xo(t),a=Math.min(e[sn(t)]??0,Math.max(0,i.length-1));za(t,(c,l,u)=>{const d=i.findIndex(g=>g.annotation===u);if(!o&&d>=0&&d!==a)return;const p=Yo(c,e[l]??0);if(!p)return;const h=u.target?je(u.target):void 0,m=h==null?void 0:h.rect;n(p,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(p.body.width)||0,height:s||Number(p.body.height)||0},d,h==null?void 0:h.t)})}function Wa(t){return Ua(t).filter(e=>e.kind!=="transcript")}function mf(t){const e=z(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function Ua(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(z(r.motivation).includes("supplementing"))for(const s of z(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?z(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:z(c.language)[0],kind:mf(r)})}}return e}function gf(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:z(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(z(s.motivation).includes("supplementing"))for(const i of z(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?z(a.items):[a]).forEach(n)}return z(t.rendering).forEach(n),e}function Yo(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=z(n.items);return Yo(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=z(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=Yo({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"&&!dn(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function vf(t,e,n={},{standIns:o=true}={}){const r=cf(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const u=r[l],d=We(c),p=u.width/d.width,h=u.height/d.height,m=S=>({x:u.x+S.x*p,y:u.y+S.y*h,width:S.width*p,height:S.height*h}),g=Hn(c,n),_=zn(c,n,{allFrames:true}).map(S=>({...S,canvas:c})),v=Da(c);if(o&&!_.length&&g.some(S=>S.kind==="audio")&&v){const S=We(v);for(const x of zn(v))_.push({...x,canvas:v,target:{x:x.target.x/S.width*d.width,y:x.target.y/S.height*d.height,width:x.target.width/S.width*d.width,height:x.target.height/S.height*d.height}})}const y=n[sn(c)]??0;_.forEach(({body:S,target:x,region:k,rotation:B,frame:H,canvas:et},rt)=>{var L;const Y=Gn(S.service);if(!Y&&!S.id)return;const Q=`${et.id}|${rt}|${S.id??Y}|${k??""}|${B??""}`,M=!(Y&&k);if(s.push({id:Q,service:Y,url:S.id,width:M&&Number(S.width)||void 0,height:M&&Number(S.height)||void 0,region:k,...B?{rotation:B}:{},placement:m(x),...H!=null&&H!==y?{hidden:true}:{}}),H!=null){const P=a[L=sn(c)]??(a[L]=[]);(P[H]??(P[H]=[])).push(Q)}});const[w]=g;if(w!=null&&w.body.id){const S=pf(g),x=S?S[0]:void 0;i.push({id:`${c.id}|media|${w.body.id}`,kind:w.kind,src:(x==null?void 0:x.src)??w.body.id,format:x?x.format:w.body.format,placement:m(w.target),duration:S?Number(c.duration)||void 0:Number(w.body.duration??c.duration)||void 0,...S?{segments:S}:{},poster:yf(c),captions:Wa(c)})}}),{images:s,media:i,placements:r,frames:a}}function yf(t){var e;return(e=ja(t))==null?void 0:e.source}const iv=1280;function ja(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=zn(e)[0])==null?void 0:c.body;if(!n)return;const o=Gn(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}=We(e);return{source:s,width:i,height:a}}function bf(t,e,n){const o=We(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 _f=({hidden:t})=>{const{t:e,langOf:n}=St(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...it(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void Ba(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]})},Ir=5,Wn=300,Va=Ir*4;function Go(t,e=false){return t==="touch"||t==="pen"&&!e}function qa(t){return t.pointerType==="pen"&&t.buttons===0}function wf(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 Jo(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const xf=2e3,Sf=1e3,kf=1e3,Ef=[":scope > .clover-canvas-controls > *",":scope > .clover-canvas-navigator",":scope > .clover-canvas-media > .clover-canvas-transport > *"].join(", ");function Cf(t,e=xf,n){const[o,r]=j(false);return V(()=>{if(!t)return;const s=t.ownerDocument;let i,a=false,c=false,l=false,u=false,d=-1/0,p=null,h=false,m,g=null,_=null;const v=C=>{a=C,r(C)},y=()=>{l||v(false)},w=()=>{i&&clearTimeout(i),i=void 0},S=()=>{_&&clearTimeout(_.timer),_=null},x=C=>Go(C.pointerType,u),k=C=>{c=C.type==="keydown",!c&&(v(true),w(),Number.isFinite(e)&&(i=setTimeout(y,e)))},B=()=>{v(true),w(),i=setTimeout(y,Sf)},H=C=>{S(),_={...C,timer:setTimeout(()=>{_=null,v(C.onPicture?!a:true)},Wn)}},et=C=>{if(qa(C)&&(u=true),!x(C))return k(C);(g==null?void 0:g.id)===C.pointerId&&Math.hypot(C.clientX-g.x,C.clientY-g.y)>Ir&&(g=null)},rt=C=>{if(!x(C))return k(C);c=false,w(),g=C.isPrimary===false?null:{id:C.pointerId,x:C.clientX,y:C.clientY,target:C.target}},Y=C=>{if(!x(C)||(g==null?void 0:g.id)!==C.pointerId)return;const{target:nt}=g;if(g=null,C.type!=="pointerup"||Jo(nt,t))return;const F=n==null?void 0:n.current,tt=!!(F&&nt instanceof Node&&F.contains(nt));if(tt&&(_!=null&&_.onPicture)&&Math.hypot(C.clientX-_.x,C.clientY-_.y)<Va){S();return}H({x:C.clientX,y:C.clientY,onPicture:tt})},Q=C=>{const nt=n==null?void 0:n.current,F=C.target;return!nt||!F||!nt.contains(F)?false:Array.from(t.querySelectorAll(Ef)).some(tt=>{const b=tt.getBoundingClientRect();return b.width>0&&b.height>0&&C.clientX>=b.left&&C.clientX<=b.right&&C.clientY>=b.top&&C.clientY<=b.bottom})},M=C=>{if(C.type==="pointerdown"){if(p!==null||(clearTimeout(m),h=false,!Q(C)))return;p=C.pointerId,h=true,x(C)?(c=false,w()):k(C)}else if(C.pointerId!==p)return;C.stopPropagation(),C.preventDefault(),C.type==="pointercancel"?(p=null,h=false):C.type==="pointerup"&&(p=null,x(C)&&H({x:C.clientX,y:C.clientY,onPicture:false}),clearTimeout(m),m=setTimeout(()=>h=false,Wn))},L=C=>{h&&(h=false,C.stopPropagation(),C.preventDefault())},P=C=>{d=Date.now(),C.type==="pointerdown"&&(l=false)},q=()=>{Date.now()-d<kf||(l=true,w(),v(true))},X=C=>{x(C)||a&&B()},K=C=>{t.contains(C.relatedTarget)||(l=false,(a||c)&&B())};s.addEventListener("pointerdown",P,true),s.addEventListener("pointerup",P,true);for(const C of["pointerdown","pointermove","pointerup"])t.addEventListener(C,M,true);return t.addEventListener("pointercancel",M,true),t.addEventListener("click",L,true),t.addEventListener("pointermove",et),t.addEventListener("pointerdown",rt),t.addEventListener("pointerup",Y),t.addEventListener("pointercancel",Y),t.addEventListener("pointerleave",X),t.addEventListener("focusin",q),t.addEventListener("focusout",K),t.addEventListener("keydown",k),()=>{w(),S(),clearTimeout(m),s.removeEventListener("pointerdown",P,true),s.removeEventListener("pointerup",P,true);for(const C of["pointerdown","pointermove","pointerup"])t.removeEventListener(C,M,true);t.removeEventListener("pointercancel",M,true),t.removeEventListener("click",L,true),t.removeEventListener("pointermove",et),t.removeEventListener("pointerdown",rt),t.removeEventListener("pointerup",Y),t.removeEventListener("pointercancel",Y),t.removeEventListener("pointerleave",X),t.removeEventListener("focusin",q),t.removeEventListener("focusout",K),t.removeEventListener("keydown",k)}},[t,e,n]),o}const Ka="50%";function Za(t,e=Ka,n=null){const[o,r]=j(()=>typeof IntersectionObserver>"u");return V(()=>{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 Mf(t){const[e,n]=j(false);return V(()=>{if(!t)return;const o=()=>n(Yn()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Tf(t){const[e,n]=j(false);return V(()=>{if(!t)return;const o=()=>{const r=Yn();n(r===t||!!r&&Ra(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 Lf extends de.Component{constructor(){super(...arguments);I(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 en({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:bt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const If={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function Pf({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=St(),s=If[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...it(r(s)),children:o(s)})})}function Af({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...it(e),children:t})})}function Jn(t,e,n=false,o){const r=Gt(),{hostLanguage:s}=St(void 0,o);if(n)return{props:{},node:null};const i=vr(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...it(i),children:t})}}const Of=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function Wt(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function Kt(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function hn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function Nf(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 Zt(...t){return t.reduce((e,n)=>Nf(e,n),Of)}function Rf(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 ae(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 av(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map($f).join(",")})`}function Bf(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 $f(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function Ff(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Pr(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 Df(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 Qn(t,e){const n=[ae(t,{x:e.x,y:e.y}),ae(t,{x:e.x+e.width,y:e.y}),ae(t,{x:e.x,y:e.y+e.height}),ae(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 Ye(t,e,n){return Math.min(Math.max(t,e),n)}const si=t=>!!(t&&"overlays"in t),zf=ft(()=>import("./MediaBody-CEyswliX.mjs")),Hf=()=>import("./AnnotationState-Bjztkobn.mjs"),Wf=new Map,Uf={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:Wf,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},jf=ft(()=>import("./FrameAnimation-CZfzpxaD.mjs")),ii=ft(()=>import("./PlaceBox-Dckw4Sfk.mjs")),Vf=ft(()=>import("./Placeholder-NYVWYg5Q.mjs")),ai={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},qf={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",Bt.zoomIn.keys,Bt.zoomOut.keys,Bt.reset.keys,Bt.rotateRight.keys,Bt.rotateLeft.keys].join(" ")},Kf={description:"canvasKeysMedia",keys:[Bt.play.keys,"J L",Bt.mute.keys].join(" ")},Zf={description:"canvasKeysAnnotations",keys:"Escape"},Xf=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||Xa(t.body,t.src).length>0?f(Lf,{children:f(Yf,{...t})}):null},Yf=t=>{var ss,is,as,cs,ls,us;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:p,className:h,options:m,navigator:g=false,controls:_=true,controlButtons:v,annotations:y,onReady:w,onViewportChange:S,onMediaElement:x,onCaptionChange:k,caption:B,onEnded:H,chapters:et,highlightedChapter:rt,onChapterHighlight:Y,placeholder:Q=true,children:M}=t,{t:L}=St(),P=W(null),[q,X]=j(null),K=Mf(q),C=$a(q),nt=Tf(q),F=Zn(X),tt=pr(d),b=Cf(q,m==null?void 0:m.hideDelay,P),T=Za(q),O=Gt(),[R]=j(()=>p??`clover-canvas-${O}`),N=W(null),[E,U]=j(null),G=si(E)?E:null,[_t,at]=j(null),$=_===false?null:_===true?ai:{...ai,..._},[Z,lt]=j("loading"),[Lt,Jt]=j(false),[Qt,te]=j(0),Ct=W(w),ee=W(S),qe=W(m);Ct.current=w,ee.current=S,qe.current=m;const ne=yr(r),D=ht(()=>uf(o??[]),[o]),ct=ht(()=>ff(D),[D]),[Mt,Ac]=j({}),Ee=ht(()=>({...ct,...Mt}),[ct,Mt]),zr=(A,J)=>Ac(mt=>({...mt,[A]:J})),Oc=ht(()=>y==null?void 0:y.filter(A=>!A.layer||(Ee[A.layer.key]??0)===A.layer.item),[y,Ee]),$t=(ss=y==null?void 0:y.find(A=>A.layer&&A.annotation.id===t.selectedAnnotation))==null?void 0:ss.layer;V(()=>{$t&&(Ee[$t.key]??0)!==$t.item&&zr($t.key,$t.item)},[$t==null?void 0:$t.key,$t==null?void 0:$t.item,t.selectedAnnotation]);const Hr=!!($!=null&&$.information),Ke=!!(y!=null&&y.length),Wr=Fn(Hf,Ke),[Nc,Rc]=j(null),At=Ke&&Nc||Uf,Ce=ht(()=>{var mt,re;const A=(mt=y==null?void 0:y.find(jt=>jt.annotation.id===At.selected))==null?void 0:mt.annotation,J=(Array.isArray(A==null?void 0:A.body)?A==null?void 0:A.body:[A==null?void 0:A.body]).find(jt=>(jt==null?void 0:jt.type)==="Feature");return A&&J?{id:String(A.id),feature:J,name:((re=J.properties)==null?void 0:re.label)??A.label}:null},[y,At.selected]),no=Ce?`${Ce.id}:${t.refind??0}`:null,[Bc,$c]=j(null),Fc=no!==null&&Bc!==no,gn=ht(()=>{var jt,En;const A=(o??[]).map(Rt=>Rt.navPlace).filter(Boolean),J=A.length?A:t.navPlace?[t.navPlace]:[];if(!J.length)return null;const mt=J.flatMap(Rt=>(Rt==null?void 0:Rt.type)==="FeatureCollection"?Rt.features??[]:(Rt==null?void 0:Rt.type)==="Feature"?[Rt]:[]);if(!mt.length)return null;const re=mt.length===1?(En=(jt=mt[0])==null?void 0:jt.properties)==null?void 0:En.label:void 0;return{feature:{type:"FeatureCollection",features:mt},name:re??t.label}},[o,t.navPlace,t.label]),Ur=`place-box-${R}`,[jr,Vr]=j(false),[Dc,zc]=j(false),vn=W(At);vn.current=At;const yn=dt(()=>vn.current.release(),[]),{comments:oo,listedCount:qr}=At,Me=ht(()=>Hr?(o??[]).filter(A=>Ld(A)||oo.has(A.id)):[],[o,Hr,oo]),ro=`caption-${R}`,[Hc,Kr]=j(false),so=Hc&&Me.length>0,Zr=dt(A=>{var J;Kr(false),A&&((J=document.getElementById(`information-${R}`))==null||J.focus())},[R]),Nt=ht(()=>(o??[]).find(A=>Xo(A).length)??null,[o]),Wc=Nt?Xo(Nt):Jf,It=ht(()=>o!=null&&o.length?vf(o,ne,Ee,{standIns:o.length>1}):null,[o,ne,Ee]),Uc=ht(()=>Xa(s,i,a),[s,i,a]),ut=(It==null?void 0:It.media[0])??null,[Ze,jc]=j(null),bn=W(x);bn.current=x;const Vc=dt(A=>{var J;jc(A),(J=bn.current)==null||J.call(bn,A)},[]),fe=It?It.images:Uc,ge=!!ut&&(o==null?void 0:o.length)===1,ve=ge&&(ut==null?void 0:ut.kind)==="audio",Te=(o==null?void 0:o.length)===1&&!ut&&!Nt&&fe.length===0,_n=!ge&&!Te&&((is=m==null?void 0:m.gestures)==null?void 0:is.navigable)!==false,oe=o?`${n??""}
|
|
2
|
+
${o.map(A=>A.id).join("|")}`:null,Le=ht(()=>{if(!o||!Q)return[];const A=o.flatMap(J=>{const mt=ja(J),re=pt(J.label,u);return mt?[{...mt,alt:re.text,lang:re.lang}]:[]});return ne==="right-to-left"||ne==="bottom-to-top"?A.reverse():A},[o,ne,Q,u]),[qc,Xr]=j(false),[Kc,Yr]=j(null),kt=!ve&&Le.length>0&&(ut?Kc!==oe:!qc),Gr=(A,{annotations:J=false,fullPage:mt=false}={})=>({...A,zoom:false,rotation:false,reset:false,fullPage:mt&&A.fullPage,annotations:J&&A.annotations}),Xe=Te&&C,Jr=de.Children.count(M)>0,wn=$?kt?Me.length||Jr||qr?Gr($,{annotations:true}):null:ge||Te?D.length||Me.length||Jr||qr||Xe&&$.fullPage?Gr($,{annotations:true,fullPage:Xe}):null:$:null,io=g&&!kt&&(ut?ut.kind==="audio"&&!ge&&fe.length>0:true),[ao,Zc]=j(null),Ie=ut?ao??ut.placement:null,[xn,Xc]=j(Qf),co=ht(()=>{const A=(ut==null?void 0:ut.kind)==="video"&&Ze&&Ie?[...fe,{id:ut.id,placement:Ie,width:Ie.width,height:Ie.height,media:{element:Ze}}]:fe;return xn.length?[...A,...xn]:A},[fe,ut,Ze,Ie,xn]),Qr=ge&&(ut==null?void 0:ut.kind)==="video"&&ao?ao:It?Pr(It.placements):null,Yc=JSON.stringify([fe,Qr,co.length!==fe.length&&[ut==null?void 0:ut.id,Ie],xn.map(A=>A.id)]),Sn=W(null),lo=W(false),Gc=()=>{ut?Yr(kt?oe:null):Xr(kt),kt||yn()},uo=Array.isArray(s)?s[0]:s,wt=[c,(as=o==null?void 0:o[0])==null?void 0:as.label,uo==null?void 0:uo.label].map(A=>pt(A,u)).find(A=>A.text),Jc=ht(()=>{const A=pt(l,u);return A.text&&A.text!==(wt==null?void 0:wt.text)?A:void 0},[l,u,wt==null?void 0:wt.text]),ts=Jn((wt==null?void 0:wt.text)||L("canvasImage"),wt?wt.lang:F.langOf("canvasImage"),false,F.hostLanguage),kn=kt?[]:[..._n?[qf]:[],...ut?[Kf]:[],...Ke?[Zf]:[]],es=`keys-${R}`,Qc=_n&&!kt&&!F.langOf("canvasRoleDescription")?L("canvasRoleDescription"):void 0,fo=!!wn&&Me.length>0,tl=fo&&Me.map((A,J)=>pt(A.label,u).text?Oa(ro,J):null).filter(Boolean).join(" ")||void 0,ns=W({canvases:o,scene:It,canvasKey:oe});ns.current={canvases:o,scene:It,canvasKey:oe};const ho=W(null),po=dt(()=>{const{canvases:A,scene:J,canvasKey:mt}=ns.current;ho.current=A&&J&&Sn.current===mt?{key:mt,canvases:A,placements:J.placements}:null},[]),el=!o||((cs=ho.current)==null?void 0:cs.key)===oe;V(()=>{const A=P.current;if(!A)return;const J=e(A,qe.current),mt=si(J)?J:null;N.current=J,U(J),J.setDismiss(yn);const re=J.on("open",()=>{var se;go(false),po(),lt("ready"),te(Cn=>Cn+1),mt&&((se=Ct.current)==null||se.call(Ct,Gf(mt,()=>ho.current,Cn=>{var fs,hs;const ds=vn.current.placed.find(vo=>vo.id===Cn);return ds?(vn.current.select(ds),(hs=Array.from(((fs=mt.overlays)==null?void 0:fs.container.querySelectorAll("[id]"))??[]).find(vo=>vo.id===Cn))==null||hs.focus({preventScroll:true}),true):false})))}),jt=J.on("change",()=>{go(false),po(),lt("ready"),te(se=>se+1)}),En=J.on("error",()=>{J.isOpen||lt("error")}),Rt=J.on("unloadable",se=>Jt(!!se)),ol=J.on("viewport",()=>{var se;mt&&((se=ee.current)==null||se.call(ee,mt.getBounds()))});return()=>{re(),jt(),En(),Rt(),ol(),J.dispose(),N.current=null,U(null)}},[p,e,yn,po]),V(()=>{if(!(!G||!_t))return G.attachNavigator(_t)},[G,_t]),V(()=>{if(!(!E||!Te))return E.setGestures({navigable:false}),()=>E.setGestures({})},[E,Te]);const mo=W(false);V(()=>{var J;if(Xe)return;const A=!document.activeElement||document.activeElement===document.body;mo.current&&A&&((J=P.current)==null||J.focus()),mo.current=false},[Xe]),V(()=>{const A=N.current;if(kt&&(lo.current=true),!A||!T||kt)return;const J=Sn.current!==null&&Sn.current!==oe;(!A.isOpen||J)&<("loading");const mt=ge||lo.current&&A.isOpen||J;Sn.current=oe,lo.current=false,A.setImages(co,{world:Qr??void 0,fit:mt})},[Yc,p,Ze,T,kt]);const os=W(n),[nl,go]=j(false);Ot(()=>{var A;n!==os.current&&(os.current=n,(A=N.current)==null||A.clear(),go(true),lt("loading"))},[n]);const rs=Z==="loading"&&co.length>0&&T&&!kt;return f(ln.Provider,{value:F.hostLanguage,children:f("figure",{"aria-labelledby":tl,className:bt("clover-canvas",h),"data-testid":"clover-canvas","data-status":Z,...mr(tt),"data-unloadable":Lt||void 0,"data-has-navigator":io,"data-fullscreen":K,"data-exit":nt||void 0,"data-controls":b?"visible":"hidden","data-media":ut==null?void 0:ut.kind,"data-player":ve?"":void 0,"data-animated":Nt?"":void 0,"data-navigable":_n,"data-placeholder":Le.length&&!ve?kt:void 0,ref:F.ref,onFocus:A=>{mo.current=Xe&&A.target.id===`fullPage-${R}`},onKeyDown:A=>{if(A.key==="Escape"&&so&&!A.defaultPrevented){A.preventDefault(),Zr(false);return}if(A.key==="Escape"&&!A.defaultPrevented&&!A.currentTarget.querySelector(".clover-canvas-menu")&&yn()){A.preventDefault();return}kd(A,P.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(wn||io)&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),f(_f,{hidden:!nt}),E&&wn&&f(Zd,{renderer:G,instance:R,config:wn,controlButtons:v,hasPlaceholder:Le.length>0,choices:kt?[]:D,selections:Ee,onSelect:zr,annotations:At.menu,hiddenPages:At.hiddenPages,onPageVisibilityChange:At.setPagesVisible,selectedAnnotation:At.selected,onAnnotationSelect:At.select,onAnnotationActivate:At.activate,captionId:fo?ro:void 0,captionOpen:so,onCaptionToggle:()=>Kr(A=>!A),placeId:gn?Ur:void 0,placeOpen:jr,onPlaceToggle:()=>{zc(true),Vr(A=>!A)},language:u,children:M}),io&&f("div",{ref:at,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:P,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:Ke?"group":"img","aria-roledescription":Qc,...ts.props,"aria-describedby":kn.length?es:void 0,"aria-keyshortcuts":kn.map(({keys:A})=>A).join(" ")||void 0,"aria-busy":rs,tabIndex:0}),ts.node,kn.length>0&&f("span",{id:es,style:ze,children:kn.map(({description:A},J)=>f(de.Fragment,{children:[J>0&&" ",f("span",{...it(F.langOf(A)),children:L(A)})]},A))}),f(Pf,{kind:"image",shown:Lt&&!kt}),Te&&!kt&&(wt==null?void 0:wt.text)&&f(Af,{text:wt.text,lang:wt.lang||void 0}),(ut==null?void 0:ut.kind)==="audio"&&!ve&&fe.length===0&&!kt&&(wt==null?void 0:wt.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...it(wt.lang||void 0),children:wt.text}),Le.length>0&&!ve&&f(vt,{fallback:null,children:f(Vf,{instance:R,stills:Le,vertical:ne==="top-to-bottom"||ne==="bottom-to-top",media:!!ut,active:kt,lingering:Z==="loading"&&!nl,onToggle:Gc,request:m==null?void 0:m.request})}),E&&ut&&T&&!kt&&f(vt,{fallback:null,children:f(zf,{media:ut,request:m==null?void 0:m.request,surface:E,instance:R,onElement:Vc,onFit:Zc,onCaptionChange:k,caption:B,navigable:_n,fullscreen:ge&&!!($!=null&&$.fullPage),isFullscreen:C,onEnded:H,chapters:et,highlightedChapter:rt,onChapterHighlight:Y,autoPlay:!ve&&Le.length>0&&At.quietlyOpened!==oe,language:u,notes:At.timed,player:ve&&o?{canvas:o[0],title:wt,partOf:Jc}:void 0})}),G&&Nt&&(It==null?void 0:It.frames[sn(Nt)])&&!kt&&f(vt,{fallback:null,children:f(jf,{renderer:G,frames:Wc,byFrame:It.frames[sn(Nt)],animationKey:Nt.id,sceneVersion:Qt,autoplay:(ls=m==null?void 0:m.animation)==null?void 0:ls.autoplay,loop:(us=m==null?void 0:m.animation)==null?void 0:us.loop,onEnded:H,language:u,duration:Number(Nt.duration),canvas:Nt,place:It.placements[o.indexOf(Nt)],onItems:Xc},Nt.id)}),Wr&&Ke&&y&&f(Wr.AnnotationState,{given:t,annotations:Oc??y,scene:It,renderer:G,sceneVersion:Qt,drawn:el,media:ut,mediaElement:Ze,showPlaceholder:kt,canvasKey:oe,openImages:Xr,openMedia:Yr,host:P,onModel:Rc,refind:t.refind??0}),rs&&f(en,{overlay:true}),Ce&&f(vt,{fallback:null,children:f(ii,{id:`place-of-${R}`,open:Fc,onClose:A=>{var J;$c(no),A&&((J=document.getElementById(Ce.id))==null||J.focus())},feature:Ce.feature,name:Ce.name,language:u})}),gn&&Dc&&f(vt,{fallback:null,children:f(ii,{id:Ur,open:jr,onClose:A=>{var J;Vr(false),A&&((J=document.getElementById(`place-${R}`))==null||J.focus())},feature:gn.feature,name:gn.name,language:u})}),fo&&f(Id,{id:ro,canvases:Me,comments:oo,open:so,onClose:Zr,language:u})]})})};function Gf(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(bf(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?th(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 Jf=[],Qf=[];function Xa(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=Gn(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 th(t,e,n){let o=null;if(n.forEach((d,p)=>{const h=Math.max(t.x,d.x),m=Math.max(t.y,d.y),g=Math.min(t.x+t.width,d.x+d.width)-h,_=Math.min(t.y+t.height,d.y+d.height)-m;if(g<=0||_<=0)return;const v=g*_;(!o||v>o.area)&&(o={index:p,area:v,clip:{x:h,y:m,width:g,height:_}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=We(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 eh(t,e,n,o){return ht(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=pt(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 nh(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 oh(t,e){const n=t.store.get().manifest;if(e.canvasId&&Et(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 Ya(t){if(typeof t=="string")return ci(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?ci(e.id):e}const ci=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function Ga(t){const e=z(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const li=new WeakMap,ui=[];function rh(t,e,n){if(!t||!e)return ui;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=!z(u.behavior).includes("no-nav");for(const p of z(u.items)){if((p==null?void 0:p.type)==="Range"){c(p);continue}if(!d)continue;const h=je(Ya(p));if(h.id.split("#")[0]!==e)continue;const m=Lr(h.t);m&&i.push({...u.id?{id:u.id}:{},label:u.label,...m,...Ga(u)})}};for(const u of z(t.structures))c(u);i.sort((u,d)=>u.start-d.start);const l=i.length?i.map((u,d)=>{var p;return{...u,end:u.end??((p=i[d+1])==null?void 0:p.start)??n}}):ui;return o.set(r,l),l}const di=new WeakMap,fi=[];function sh(t){if(!t)return fi;const e=di.get(t);if(e)return e;const n=new Map(z(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var y,w;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],u=[],d=[];let p;for(const S of z(c.items))if((S==null?void 0:S.type)==="Range"){const x=r(S);l.push(...x),x.forEach(k=>u.push(...k.canvasIds))}else{const x=je(Ya(S));if(!x.id)continue;p??(p=x),u.push(x.id),d.push(x)}const h=z(c.behavior);if(h.includes("no-nav"))return l;const m=p??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((y=l[0])==null?void 0:y.canvasId),canvasIds:[...new Set(u)],...h.includes("sequence")?{sequence:true}:{},...Ga(c),children:l},_=Lr(m==null?void 0:m.t);return _?g.time=_:!m&&((w=l[0])!=null&&w.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(h.includes("sequence")&&d.length>1&&!d.some(S=>S.t)||ih(d,n))&&(g.parts=d.map(S=>({canvasId:S.id,...S.rect?{region:S.rect}:{}}))),[g]},s=z(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:fi;return di.set(t,a),a}function ih(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 cv(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 p=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),p&&i(s,l,u)&&(s=m)}l.children.forEach(h=>a(h,u+1,p))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function ah(){const t=ot(n=>n.status),e=ot(n=>n.error);return ht(()=>({status:t,error:e}),[t,e])}function ch(){return ot(t=>t.manifest)}function Ja(){return ot(t=>Et(t.manifest))}function Ar(){return ot(t=>we(t.manifest,t.canvasId))}function lh(){return ot(t=>Se(t.manifest,t.canvasId))}function uh(){const{clover:t}=Yt("useNavigation"),e=ot(o=>fn(o.manifest,o.canvasId)),n=ot(o=>Et(o.manifest).views.length);return ht(()=>id(t,e,n),[t,e,n])}function dh(){return ot(t=>Sa(t.manifest,t.addedSets))}function lv(t){const{language:e}=Yt("useLocalized");return ht(()=>pt(t,e),[t,e])}function uv(){return St().t}function dv(){return St().langOf}const fh=({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:p,...h})=>{const m=Yt("Canvas"),{clover:g}=m,_=Ht(g.captions.subscribe,g.captions.get,g.captions.get),v=s??_,y=u??m.language,w=Ar(),{direction:S}=Ja(),x=ch(),k=lh(),B=ot(D=>{var ct;return D.status==="loading"?"loading":((ct=D.manifest)==null?void 0:ct.id)??""}),H=ot(D=>D.target),et=ot(D=>ka(D.manifest,D.addedSets,D.search.set,D.regions)),rt=ot(D=>Du(D.manifest,D.addedSets,D.hiddenSets,D.shownSets)),Y=ot(D=>xr(D.manifest,D.addedSets,D.hiddenSets,D.shownSets)),Q=ot(D=>D.annotationId),M=W(Q);M.current=Q;const[L,P]=j(0);V(()=>g.found.subscribe(D=>{D&&D===M.current&&P(ct=>ct+1)}),[g]);const q=Ht(g.highlight.subscribe,g.highlight.get,g.highlight.get),X=Ht(g.chapter.subscribe,g.chapter.get,g.chapter.get),K=w.map(D=>D.id).join("|"),C=ht(()=>{if(d)return d;const D=w.map(ct=>ct.id);return et.flatMap(ct=>ct.entries.filter(Mt=>D.includes(Mt.canvasId)).map(Mt=>({annotation:Mt.annotation,targetIndex:D.indexOf(Mt.canvasId),pageId:ct.id,...ct.label?{pageLabel:ct.label}:{},...Mt.place?{place:Mt.place}:{},...Mt.layer?{layer:{key:Mt.layer.key,item:Mt.layer.item}}:{}})))},[d,et,w]),F=H?(D=>!!D&&w.some(ct=>ct.id===D))(H.canvasId):false,tt=W(null);F&&(tt.current=K);const b=a&&tt.current!==K,T=W(null),O=W(null),R=ht(()=>w.some(D=>Hn(D).length>0),[w]),N=R?w.find(D=>Hn(D).length>0):void 0,E=eh(x,N,y,rh),U=W(R);U.current=R;const G=s===void 0?m.language:void 0,_t=N==null?void 0:N.id;V(()=>{if(!G||!N)return;const D=Wa(N).find(ct=>ct.language&&fa(ct.language,G));D&&g.captions.get()!==D.id&&g.captions.emit(D.id)},[G,_t,g]);const at=dt(()=>{const D=g.store.get().target;!D||!g.store.get().canvasId||nh(D,T.current,O.current,U.current)&&g.consumeTarget()},[g]),$=W(K);V(()=>{$.current!==K&&($.current=K,O.current=null),H&&at()},[H,K,at]);const Z=W(e);Z.current=e;const lt=dt(D=>{var ct;T.current=D,D.on("change",at),at(),(ct=Z.current)==null||ct.call(Z,D)},[at]),Lt=dt(D=>{var Mt;const ct=(Mt=T.current)==null?void 0:Mt.getCanvasRegion();g.viewport.emit(ct?{canvasId:ct.canvasId,region:{x:ct.rect.x,y:ct.rect.y,w:ct.rect.width,h:ct.rect.height}}:null),n==null||n(D)},[g,n]),Jt=dt(D=>{O.current=D,g.media.emit(D),D&&at(),o==null||o(D)},[g,at,o]),Qt=dt(()=>{i==null||i(),(ye(x,"auto-advance")||ye(k,"auto-advance"))&&g.next({autoplay:true,wrap:ye(x,"repeat")})},[g,x,k,i]),te=dt(D=>void oh(g,D),[g]),Ct=(t==null?void 0:t.request)??g.request,ee=ye(k,"auto-advance")||ye(x,"auto-advance"),qe=ye(k,"repeat")||ye(x,"repeat"),ne=ht(()=>({...t,request:Ct,animation:(t==null?void 0:t.animation)??{autoplay:ee,loop:qe}}),[t,Ct,ee,qe]);return w.length?f(Xf,{...h,manifestId:B,navPlace:x==null?void 0:x.navPlace,canvases:w,viewingDirection:S,language:y,label:c??(k==null?void 0:k.label)??(x==null?void 0:x.label),partOf:l??(x==null?void 0:x.label),options:ne,placeholder:b,onReady:lt,onViewportChange:Lt,onMediaElement:Jt,caption:v,onCaptionChange:D=>{g.captions.emit((D==null?void 0:D.id)??null),r==null||r(D)},onEnded:Qt,annotations:C,hiddenPages:Y,unlistedPages:rt,onPageVisibilityChange:(D,ct)=>D.forEach(Mt=>g.setSetVisible(Mt,ct)),chapters:p??E,highlightedChapter:X,onChapterHighlight:D=>g.chapter.emit(D),selectedAnnotation:Q,refind:L,highlightedAnnotation:q,onAnnotationSelect:D=>g.selectAnnotation(D),onAnnotationLink:h.onAnnotationLink??te,onAnnotationActive:D=>{var ct;g.highlight.emit(D),(ct=h.onAnnotationActive)==null||ct.call(h,D)}}):null},hh=6,Ae=new Set;function ph(t){if(Ae.has(t))return true;for(;Ae.size>=hh;){let e;for(const n of Ae)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;Ae.delete(e),e.release()}return Ae.add(t),true}function hi(t){Ae.delete(t)}function mh(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function gh(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 vh=`#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
|
+
`,yh=`#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 Un{constructor(e,n,o){I(this,"kind","webgl2");I(this,"canvas");I(this,"maxTextureSize");I(this,"gl");I(this,"program",null);I(this,"vao",null);I(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});I(this,"textures",new Map);I(this,"cssWidth",1);I(this,"cssHeight",1);I(this,"pixelRatio",1);I(this,"matrixScratch",new Float32Array(9));I(this,"isLost",false);I(this,"callbacks");I(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=bh(n,vh,yh);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 Un(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||!mh(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=gh(e,this.pixelRatio),i=Zt(e.transform,Wt(r.x,r.y),Kt(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,Bf(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),_h(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 bh(t,e,n){const o=pi(t,t.VERTEX_SHADER,e),r=pi(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 pi(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 _h(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function Qa(t,e){return Zt(Wt(e.width/2,e.height/2),hn(t.rotation),Kt(t.zoom),Wt(-t.x,-t.y))}function tc(t,e){return Zt(Wt(t.x,t.y),Kt(1/t.zoom),hn(-t.rotation),Wt(-e.width/2,-e.height/2))}function mi(t,e,n){return ae(tc(t,e),n)}function wh(t,e,n){return ae(Qa(t,e),n)}function Qo(t,e){return Qn(tc(t,e),{x:0,y:0,width:e.width,height:e.height})}function gi(t,e,n=0,o=0){const r=Qn(hn(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=Ff(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function tr(t,e,n,o,r){const s=ae(Zt(Kt(1/n),hn(-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 xh(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const Sh=.09,kh=1e-4,vi=.05,Eh=1e-4;class Ch{constructor(e,n=Sh){I(this,"current");I(this,"target",null);I(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=tr(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>vi&&(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=tr(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))<kh&&Math.abs(i.rotation-c)<Eh&&Math.hypot(i.x-l.x,i.y-l.y)*a<vi?(this.current={...i},this.target=null,false):true}}const er={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true},Lo=2,yi=1.5,bi=.1,Mh=100,Th=200,Lh=.002,Ih=.01;class Ph{constructor(e,n,o=er){I(this,"pointers",new Map);I(this,"samples",[]);I(this,"down",null);I(this,"pinch",null);I(this,"lastTap",null);I(this,"lastPointerType","");I(this,"penHovers",false);I(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||Jo(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))});I(this,"onPointerMove",e2=>{var r;qa(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)>Ir&&(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-Mh;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}});I(this,"onPointerUp",e2=>{var c,l,u,d,p,h;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<Wn){if((d=(u=this.target).dismiss)!=null&&d.call(u)){this.lastTap=null;return}if(Go(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<Wn&&Math.hypot(o2.x-m.x,o2.y-m.y)<Va?(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/Lo,o2,true):this.zoomIn(o2):(h=(p=this.target).tap)==null||h.call(p,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)>Th&&this.target.flick(m,g)}});I(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||Go(this.lastPointerType,this.penHovers)||Jo(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/Lo,this.local(e2),true):this.zoomIn(this.local(e2))))});I(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&wf(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=Ah(e2),r=n2?Ih:Lh;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});I(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*bi*(e2.shiftKey?3:1),r=n2.height*bi*(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(yi,void 0,true);break;case"-":case"_":this.target.zoomBy(1/yi,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(Lo,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 Ah(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 _i=new Set;async function Oh(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=ju(r),i=Rh(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return Io(t,{signal:n,cors:true,withCredentials:s});if(i&&_i.has(i))return Io(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await kr(r,t,{mode:"cors",signal:n})}catch(p){if(Bh(p,n))throw p;const h=await Io(t,{signal:n,cors:false,withCredentials:s});return i&&_i.add(i),h}if(!a.ok)throw new ec(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await Nh(c);const u=l.width,d=l.height;if(o&&(l.width>o||l.height>o)){const p=o/Math.max(l.width,l.height),h=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*p)),resizeHeight:Math.max(1,Math.floor(l.height*p)),resizeQuality:"high"});l.close(),l=h}if(n!=null&&n.aborted)throw l.close(),nr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:u,naturalHeight:d,opaque:false}}async function Nh(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 Io(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(nr());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(nr())};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 Rh(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function Bh(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function nr(){const t=new Error("Aborted");return t.name="AbortError",t}function wi(t){t.kind==="bitmap"&&t.source.close()}const $h=192*1024*1024,Fh=6,Dh=2;class zh{constructor(e){I(this,"entries",new Map);I(this,"inFlight",0);I(this,"frame",0);I(this,"bytes",0);I(this,"wanted",[]);I(this,"disposed",false);I(this,"budget");I(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??$h,this.maxInFlight=e.maxInFlight??Fh}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:Po(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=Po(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){wi(s);return}e.state="ready",e.image=s,e.bytes=Po(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<Dh&&!Hh(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&&wi(o.image),this.options.onEvict(o.url)}}}function Po(t){return t.width*t.height*4}function Hh(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 Wh=.1;class Uh{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){I(this,"handle",0);I(this,"last",0);I(this,"disposed",false);I(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,Wh):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 jh=2*1024*1024;function Vh(t,e,n=jh){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 qh(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 Kh(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),p=Math.min(e,i+c),h=Math.min(n,a+l);return p<=u||h<=d?null:{x:u,y:d,width:p-u,height:h-d}}const Ao=512,Zh=16e6;function nc(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 Xh(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(p,h,m)=>{const g=Math.ceil(e/p),_=Math.ceil(n/p);return{scaleFactor:p,width:g,height:_,tileWidth:h,tileHeight:m,cols:Math.ceil(g/h),rows:Math.ceil(_/m)}},i=(p,h)=>({scaleFactor:e/p,width:p,height:h,tileWidth:p,tileHeight:h,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const p of a.scaleFactors)o.push(s(p,a.width,a.height));else if(r)for(let p=1;;p*=2){const h=s(p,Ao,Ao);if(o.push(h),h.cols===1&&h.rows===1)break}const c=Math.max(0,...o.map(p=>p.scaleFactor));for(const p of t.sizes){const h=e/p.width;Yh(t,p.width,p.height)&&h>c+1e-9&&o.push(i(p.width,p.height))}const l=o.reduce((p,h)=>!p||h.scaleFactor>p.scaleFactor?h:p,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const p=Math.max(e,n)/Ao;o.push(i(Math.ceil(e/p),Math.ceil(n/p)))}(!o.length||!a&&!r&&e*n<=Zh)&&(o.some(p=>p.scaleFactor===1)||o.push(i(e,n)));const u=Gh(o).sort((p,h)=>h.scaleFactor-p.scaleFactor),d=ef(t);return{width:e,height:n,levels:u,tile(p){const h=u[p.level],m=h.scaleFactor,g=h.cols===1&&h.rows===1;let _,v,y;if(g)_={x:0,y:0,width:e,height:n},v=h.width,y=h.height;else{const w=Math.round(p.col*h.tileWidth*m),S=Math.round(p.row*h.tileHeight*m);_={x:w,y:S,width:Math.min(Math.round(h.tileWidth*m),e-w),height:Math.min(Math.round(h.tileHeight*m),n-S)},v=Math.ceil(_.width/m),y=Math.ceil(_.height/m)}return{...p,region:_,url:Dn(t,_,v,y),fallbackUrl:d?Dn(t,_,v,y,d):void 0}}}}function Yh(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Gh(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 Jh(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 he(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)),p=Math.max(0,Math.floor(a/s)),h=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=p;g<=h;g++)for(let _=u;_<=d;_++)m.push({level:e,col:_,row:g});return m}async function Qh(t,e){if(t.media)return tp(t,t.media);let n=null,o=null;if(t.service)try{n=Xh(await Fa(t.service,e.infoOptions))}catch(p){o=p}if(!n){if(!t.url)throw o??new Error("Image has no source");const p=await e.loadStatic(t.url);e.cache.seed(t.url,p),n=nc(t.url,p.naturalWidth,p.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=Kh(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=qh(t.rotation),u=l?ep(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(he(n,0,c).map(p=>{const h=n.tile(p);return{url:h.url,fallbackUrl:h.fallbackUrl}})),d}const oc="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=`${oc}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:nc(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 ep(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=Zt(Wt(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},Kt(n?-1:1,1),Wt(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:Rf(l),width:a,height:c}}function rc(t){var e;return((e=t.turn)==null?void 0:e.orient)??Wt(-t.clip.x,-t.clip.y)}function np(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Qn(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 op(t,e){const{turn:n,clip:o}=t;return n?ae(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function xi(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 rp(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return Pr(t.map(o=>o.rect))}const e=xi(t[0]).height;let n=0;for(const o of t){const r=xi(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 to(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function sp(t){const e=to(t);return Zt(Wt(t.rect.x,t.rect.y),Kt(e.x,e.y),rc(t))}function ip(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 ap=1e7,cp=15e6,lp=2e7,up=2;function dp(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=Qa(n,o),c=[],l=[],u=[],d=(p,h,m)=>{const g=p.tile(h);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const p of e){const{pyramid:h,clip:m,rect:g}=p,_=to(p);if(t.wantOverview)for(const M of he(h,0,m))d(h,M,lp);const v=Si(p,n,o,r),y=i?Si(p,i,o,r):v;if(u.push((v==null?void 0:v.target)??-1),!v&&!y)continue;const w=M=>L=>{const P=h.tile(L).region;return Math.hypot(P.x+P.width/2-M.x,P.y+P.height/2-M.y)};if(y){const M=w(y.center);for(const L of he(h,0,y.area))d(h,L,M(L)/1e3);if(y.target>0)for(const L of he(h,y.target,y.area))d(h,L,ap+M(L))}if(!v)continue;const{area:S,target:x}=v,k=w(v.center),B=he(h,0,S),H=x===0?[]:he(h,x,S);if(y!==v){for(const L of B)d(h,L,k(L)/1e3);const M=x-up;if(M>0)for(const L of he(h,M,S))d(h,L,cp+k(L))}if(p.spec.hidden)continue;const Y=(x===0?B:H).every(M=>s(h.tile(M).url)!==void 0)?[x]:Array.from({length:x+1},(M,L)=>L),Q=Zt(a,Wt(g.x,g.y),Kt(_.x,_.y),rc(p));for(const M of Y){const L=M===0?B:M===x?H:he(h,M,S),P=h.levels[M].cols*h.levels[M].rows>1;for(const q of L){const X=h.tile(q),K=s(X.url);if(!K)continue;const C=fp(p,X.region,K,Q,P);C&&c.push({...C,url:X.url})}}}return l.sort((p,h)=>p.priority-h.priority),{draws:c,wants:hp(l),levels:u}}function Si(t,e,n,o){const{pyramid:r,rect:s}=t,i=Qo(e,n);if(!Df(i,s))return null;const a=to(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),p=1/(a.x*e.zoom*o);return{area:np(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(u-c)/a.x,height:(d-l)/a.y}),center:op(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Jh(r,p)}}function fp(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,p=1e-6;return{item:t,image:n,transform:Zt(o,Wt(e.x,e.y),Kt(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-p,bottom:r&&l<s.y+s.height-p}}}function hp(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const pp={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},mp=2,gp=3,vp=.1,yp=1e-6,sc={top:0,right:0,bottom:0,left:0};function bp(t){if(typeof getComputedStyle!="function")return sc;const e=getComputedStyle(t),n=o=>parseFloat(o)||0;return{top:n(e.paddingTop),right:n(e.paddingRight),bottom:n(e.paddingBottom),left:n(e.paddingLeft)}}const _p=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let wp;class xp{constructor(e,n={}){I(this,"host");I(this,"overlays",null);I(this,"options");I(this,"backend",null);I(this,"backendPreference");I(this,"contextLosses",0);I(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});I(this,"visible",true);I(this,"dom",null);I(this,"domAsked",false);I(this,"pending",null);I(this,"camera");I(this,"loop");I(this,"gestures");I(this,"gestureOptions",{});I(this,"cache");I(this,"navigator",null);I(this,"navigatorAsked",0);I(this,"viewport",{width:1,height:1});I(this,"inset",sc);I(this,"pixelRatio",1);I(this,"items",[]);I(this,"worldBounds",null);I(this,"contentVersion",0);I(this,"opaqueUrls",new Set);I(this,"mediaByKey",new Map);I(this,"detachMedia",[]);I(this,"opened",false);I(this,"atHome",true);I(this,"lastEmitted",null);I(this,"generation",0);I(this,"listeners",new Map);I(this,"unloadable",false);I(this,"resizeObserver",null);I(this,"intersectionObserver",null);I(this,"releaseTimer",null);I(this,"dprQuery",null);I(this,"disposed",false);I(this,"dismisser",null);I(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=Vh(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(oc));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,Qo(o,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!xh(this.lastEmitted,o))&&(this.lastEmitted={...o},this.opened&&this.emit("viewport")),n2||s.deferred});I(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));I(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});I(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...pp,...Oo(n)},kp()&&(this.options.animationTime=0),this.camera=new Ch({x:0,y:0,zoom:1,rotation:0},this.options.animationTime),this.loop=new Uh(this.tick),this.gestureOptions=Oo(n.gestures??{}),this.gestures=new Ph(e,this,{...er,...this.gestureOptions}),this.cache=new zh({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=Sp(e),this.visible?this.acquireBackend():this.holder.hiddenSince=ki(),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&&ip(d.spec,u)?(d.spec=u,Promise.resolve(d)):Qh(u,{cache:this.cache,loadStatic:p=>this.loadTile(p),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=rp(a);if(this.worldBounds=n?l?Pr([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){const o=gi(e,this.viewport,this.camera.destination.rotation,0);this.atHome=false,this.animateTo(this.constrain(o,{allowBeyondLimits:true}),n)}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){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)}getBounds(){return Qo(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=>to(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-yp)}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=mi(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=Ye(r.zoom*e,a,c),u=tr(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=ae(Zt(Kt(1/r.zoom),hn(-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,...Oo(e)})}setInteracting(e){e&&this.camera.stop()}worldToScreenPoint(e){return wh(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return mi(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 Qn(Zt(sp(o),Kt(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-C3jghOd3.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-CGkDtemL.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 Oh(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof Un?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,{top:o,right:r,bottom:s,left:i}=this.inset,a=gi(this.worldBounds,{width:Math.max(1,this.viewport.width-i-r),height:Math.max(1,this.viewport.height-o-s)},n);return a.x-=(i-r)/2/a.zoom,a.y-=(o-s)/2/a.zoom,a}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?Ye(e.zoom,r,Math.max(s,e.zoom)):Ye(e.zoom,r,s);return{...e,zoom:i,x:Ye(e.x,o.x,o.x+o.width),y:Ye(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<gp);let r=null;o&&(ph(this.holder)||this.backendPreference==="webgl2")&&(r=Un.create(n,{onLost:this.onContextLost}),r||hi(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(wp??(wp=import("./Canvas2DBackend-BTK6ZJh0.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(hi(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=ki()),!(!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=bp(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,mp);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&_p(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 ki=()=>typeof performance<"u"?performance.now():Date.now();function Sp(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 kp(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Oo(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const Ep=(t,e)=>new xp(t,e),Cp=ft(()=>import("./Connected-CL3N8F2J.mjs")),Mp=ft(()=>import("./Connected-DTk1jlyI.mjs").then(t=>t.C));function Tp({className:t,style:e,renderers:n,children:o,...r}){var p;const s=Yt("Body"),i=Ar(),a=ht(()=>cd(i),[i]),c=ld(n??s.renderers,{canvases:i,bodies:a}),l=c==null?void 0:c.component,u=((p=i.find(({type:h})=>h==="Scene"||h==="Timeline"))==null?void 0:p.type)??"Canvas",d=ot(h=>h.status==="loading");return f("div",{"aria-busy":d,className:bt("clover-body",t),"data-renderer":l?"custom":u.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[l?f(l,{canvases:i,bodies:a,children:o}):u==="Scene"?f(vt,{fallback:f(en,{overlay:true}),children:f(Mp,{...r,children:o})}):u==="Timeline"?f(vt,{fallback:f(en,{overlay:true}),children:f(Cp,{...r,children:o})}):f(fh,{...r,surface:Ep,children:o}),d&&f(en,{overlay:true})]})}const Lp={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function pn(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 Lp[n.toLowerCase()]??e})}const Ip=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function Pp(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 Ap(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"?Se(t.manifest,t.canvasId):t.manifest,ic=Xt(null),Or=()=>Pt(ic),Be=Ut(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var p;const a=un(h=>{var m,g;return e==="canvas"?(m=Se(h.manifest,h.canvasId))==null?void 0:m.label:(g=h.manifest)==null?void 0:g.label},void 0),c=Or(),l=(p=me())==null?void 0:p.language,{text:u,lang:d}=pt(n??(c?c.label:a),l);return u?f(o,{ref:i,className:bt("clover-label",r),...it(d),...s,children:pn(u)}):null});function Op(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)))),Dn(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 Dn(t,i,l.width,l.height)}function $e(t){var e;return(e=Cr(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function Np(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 ce(t,e="full"){if(!t)return null;const n=Gn(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 Nr(t){const e=t;return e?ce(z(e.thumbnail)[0])??ce($e(e))??ce($e(e.placeholderContainer))??ce($e(e.accompanyingContainer)):null}function Rp(t){const e=t;return e?ce($e(e))??ce($e(e.placeholderContainer))??ce($e(e.accompanyingContainer))??ce(z(e.thumbnail)[0]):null}async function Rr(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;try{const o=await Fa(t.service,{request:n}),r=typeof t.region=="string"?Np(t.region,o):t.region;return r===null?t.fallback:Op(o,e,r)??t.fallback}catch{return t.fallback}}const fv=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ce,resolveThumbnail:Rr,stillSource:Rp,thumbnailSource:Nr},Symbol.toStringTag,{value:"Module"})),Ei='.clover-items-item[role="option"], .clover-items-link',Oe=new Map;let Tt=null,Ft=null,or=0;function Br(t){const e=Oe.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 rr(){cancelAnimationFrame(or),or=requestAnimationFrame(()=>Oe.forEach((t,e)=>Br(e)))}function ac(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,Ei);n&&e.add(n);try{document.querySelectorAll(`:is(${Ei}):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=>Aa(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function Bp(){var t,e;Tt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>Br(o.target))),Ft=typeof MutationObserver>"u"?null:new MutationObserver(rr),Ft==null||Ft.observe(document.head,{childList:true,subtree:true,characterData:true}),Ft==null||Ft.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",rr),document.addEventListener("keydown",ac,true)}function $p(){var t,e,n;cancelAnimationFrame(or),(t=Tt==null?void 0:Tt.disconnect)==null||t.call(Tt),Ft==null||Ft.disconnect(),Tt=Ft=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",rr),document.removeEventListener("keydown",ac,true)}function Fp(t,e){var n;return Oe.size||Bp(),Oe.set(t,{change:e}),(n=Tt==null?void 0:Tt.observe)==null||n.call(Tt,t),Br(t),()=>{var o;Oe.delete(t),(o=Tt==null?void 0:Tt.unobserve)==null||o.call(Tt,t),Oe.size||$p()}}const Dp=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function cc(t,e){if(typeof t!="string")return null;const n=Dp.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 zp=ft(()=>import("./NavDate-C2-wwLuB.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function Hp(t,e,n,o){const r=t.source!==void 0?t.source:Nr(t.resource),[s,i]=j(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 V(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return Rr(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const Wp=()=>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 Up({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=j(null),a=Za(s,Ka,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=Hp(t,e,n,a),[u,d]=j(false),{width:p,height:h}=t.resource??{},m=p&&h?p/h:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":u,"data-empty":c?void 0:true,style:c&&!(p&&h)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&dn(t.media)&&f(Wp,{}),c&&f("img",{src:c,alt:o,...it(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:nf(t.duration)}):null]})}function jp({text:t,lang:e,first:n}){const o=W(null),[r,s]=j(false);return V(()=>{const i=o.current;if(!(!i||!t))return Fp(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",...it(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...it(e),"aria-hidden":"true",hidden:true,children:t})]})}function Vp({item:t,size:e,language:n,request:o,showSummary:r=false}){var l,u;const s=t.parts.map(d=>pt(t.parts.length===1?t.label:d.label,n)),i=r?pt(t.summary,n):null,a=r?cc(t.navDate):null,c=s.some(d=>d.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(u=(l=t.parts[0])==null?void 0:l.media)==null?void 0:u.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((d,p)=>{const h=s[p].text?{text:""}:pt(d.label,n);return f(Up,{part:d,size:e,request:o,alt:h.text,altLang:h.lang},d.id)})}),(c||a||(i==null?void 0:i.text))&&f("figcaption",{className:"clover-items-caption",children:[s.map((d,p)=>f(jp,{text:d.text,lang:d.lang,first:p===0},t.parts[p].id)),a&&f(vt,{fallback:null,children:f(zp,{value:t.navDate,className:"clover-items-date"})}),(i==null?void 0:i.text)&&f("span",{className:"clover-items-summary",...it(i.lang),children:i.text.replace(/<[^>]*>/g,"")})]})]})}function qp(t){var e;return(e=Cr(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function lc(t){const e=qp(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 Ci=new WeakMap;function uc(t){if(!t)return[];let e=Ci.get(t);if(!e){const{canvases:n,views:o}=Et(t);e=o.map(r=>{const s=r.map(i=>lc(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>pt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),Ci.set(t,e)}return e}const Mi=new WeakMap;function jn(t){if(!t)return[];let e=Mi.get(t);return e||(e=z(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[lc(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=z(n.homepage)[0])==null?void 0:o.id)??n.id,...rn(z(n.homepage)[0])?{hrefLang:rn(z(n.homepage)[0])}:{}}}),Mi.set(t,e)),e}function hv(t){return t?Array.isArray(t)?jn({items:t}):t.type==="Collection"?jn(t):uc(t):[]}function dc(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const $r=(t,e="p")=>dc(t)??e;function fc(t,e,n="p"){const o=dc(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Kp(t,e,{orientation:n="both",rtl:o=false,onActivate:r,onMove:s}={}){const[i,a]=j(Math.max(0,e)),c=W([]),l=W(r);l.current=r;const u=W(s);u.current=s,V(()=>{e>=0&&a(e)},[e]);const d=Math.min(i,Math.max(0,t-1)),p=dt(g=>{var _;a(g),(_=c.current[g])==null||_.focus()},[]),h=dt((g,_)=>{var k,B;const v=o?"ArrowLeft":"ArrowRight",y=o?"ArrowRight":"ArrowLeft",w=n!=="vertical",S=n!=="horizontal";let x=null;if(w&&g.key===v||S&&g.key==="ArrowDown")x=Math.min(t-1,_+1);else if(w&&g.key===y||S&&g.key==="ArrowUp")x=Math.max(0,_-1);else if(g.key==="Home")x=0;else if(g.key==="End")x=t-1;else if(g.key==="Enter"||g.key===" "){(k=l.current)==null||k.call(l,_,g),g.preventDefault();return}x!==null&&(g.preventDefault(),p(x),x!==_&&((B=u.current)==null||B.call(u,x,g)))},[t,n,o,p]);return{focused:d,itemProps:g=>({ref:_=>{c.current[g]=_},tabIndex:g===d?0:-1,onKeyDown:_=>h(_,g),onFocus:()=>a(g)})}}const Zp=5,Xp=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function hc({align:t="start",dragFree:e=false,itemCount:n=0}={}){const[o,r]=j(null),[s,i]=j(false),[a,c]=j(false),l=W(t);l.current=t;const u=e?"none":"x mandatory",d=dt(()=>{if(!o)return;const v=Math.abs(o.scrollLeft),y=o.scrollWidth-o.clientWidth;i(v>1),c(v<y-1)},[o]);V(()=>{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]),V(()=>{if(!o)return;let v=0;const y=()=>{cancelAnimationFrame(v),v=requestAnimationFrame(d)};d(),o.addEventListener("scroll",y,{passive:true});const w=typeof ResizeObserver<"u"?new ResizeObserver(y):null;return w==null||w.observe(o),o.firstElementChild&&(w==null||w.observe(o.firstElementChild)),()=>{cancelAnimationFrame(v),o.removeEventListener("scroll",y),w==null||w.disconnect()}},[o,d,n]);const p=dt((v,y=false)=>{if(!o||!v)return;const w=y||Xp()?"auto":"smooth";o.scrollBy({left:v,behavior:w})},[o]),h=dt((v,{instant:y=false}={})=>{const w=o==null?void 0:o.querySelector(`[data-track-index="${v}"]`);if(!o||!w)return;const S=o.getBoundingClientRect(),x=w.getBoundingClientRect(),k=getComputedStyle(o).direction==="rtl";p(l.current==="center"?x.left+x.width/2-(S.left+S.width/2):k?x.right-S.right:x.left-S.left,y)},[o,p]),m=dt(v=>{if(!o)return;const y=getComputedStyle(o).direction==="rtl";p(v*o.clientWidth*.9*(y?-1:1))},[o,p]),g=dt(()=>m(1),[m]),_=dt(()=>m(-1),[m]);return V(()=>{if(!o)return;let v=null,y=false;const w=B=>{B.pointerType!=="mouse"||B.button!==0||(v={x:B.clientX,scroll:o.scrollLeft},y=false)},S=B=>{var et;if(!v)return;const H=B.clientX-v.x;!y&&Math.abs(H)<Zp||(y||(y=true,(et=o.setPointerCapture)==null||et.call(o,B.pointerId),o.style.scrollSnapType="none",o.dataset.dragging="true"),o.scrollLeft=v.scroll-H)},x=B=>{var H;v&&(v=null,y&&((H=o.releasePointerCapture)==null||H.call(o,B.pointerId),delete o.dataset.dragging,o.style.scrollSnapType=u))},k=B=>{y&&(y=false,B.preventDefault(),B.stopPropagation())};return o.addEventListener("pointerdown",w),o.addEventListener("pointermove",S),o.addEventListener("pointerup",x),o.addEventListener("pointercancel",x),o.addEventListener("click",k,true),()=>{o.removeEventListener("pointerdown",w),o.removeEventListener("pointermove",S),o.removeEventListener("pointerup",x),o.removeEventListener("pointercancel",x),o.removeEventListener("click",k,true)}},[o,u]),{ref:r,canScrollPrev:s,canScrollNext:a,scrollPrev:_,scrollNext:g,scrollToIndex:h,measure:d}}const Vn=Ut(function(e,n){return!me()||e.iiifContent!==void 0||e.items!==void 0?f(vt,{fallback:null,children:f(Yp,{...e,forwardedRef:n})}):f(Gp,{...e,forwardedRef:n})}),Yp=ft(()=>import("./StandaloneItems-E4kpMne9.mjs"));function Gp({of:t="views",...e}){return t==="targets"?f(Qp,{...e}):t==="annotations"?f(em,{...e}):t==="members"?f(pc,{...e}):f(nm,{...e})}const Jp=ft(()=>import("./TargetItems-DLhUH1Gq.mjs"));function Qp(t){return ot(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(vt,{fallback:null,children:f(Jp,{...t})}):null}const tm=ft(()=>import("./AnnotationItems-CyhVcRFc.mjs"));function em(t){return ot(n=>!!Sa(n.manifest,n.addedSets))?f(vt,{fallback:null,children:f(tm,{...t})}):null}function pc({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=me(),s=ot(u=>u.collection),i=ot(u=>{var d;return((d=u.manifest)==null?void 0:d.id)??null}),a=jn(s),c=yr(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(gc,{...n,forwardedRef:e,steps:mc(a,u,c,l),nameKey:"informationPanelTabsCollection",position:f(rm,{position:u,total:a.length,list:d=>f(pc,{layout:"list",forwardedRef:null,onSelect:d})})})}return f(vc,{...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 nm({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=me(),s=ot(u=>u.manifest),i=ot(u=>fn(u.manifest,u.canvasId)),a=ot(u=>Et(u.manifest).direction),c=uc(s);if(c.length<2)return null;const l=u=>o.goTo(u.id);return n.layout==="pager"?f(gc,{...n,forwardedRef:e,steps:mc(c,i,a,l)}):f(vc,{...n,forwardedRef:e,items:c,selected:i,navigation:"id",rtl:a==="right-to-left",language:r,request:o.request,onActivate:(u,d)=>{t==null||t(u,d),o.goTo(u.id)},followFocus:l})}function mc(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 om=ft(()=>import("./PagerLayout-Cg2NpqoD.mjs")),rm=ft(()=>import("./PagerLayout-Cg2NpqoD.mjs").then(({CountMenu:t})=>({default:t})));function gc(t){return f(vt,{fallback:null,children:f(om,{...t})})}function vc({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,layout:s="slider",thumbnailSize:i=200,request:a,language:c,showSummary:l=false,heading:u,headingLevel:d=2,renderItem:p,onActivate:h,followFocus:m,as:g="section",className:_,"aria-label":v,size:y,highContrast:w,...S}){var at;const{t:x}=St(),k=Gt(),B=Zn(t,S.lang),{langOf:H}=B,et=pr(w),rt=s==="slider",Y=o==="id",Q=hc({align:Y?"center":"start",itemCount:e.length}),M=W(void 0);V(()=>()=>window.clearTimeout(M.current),[]);const L=Kp(e.length,n,{orientation:s==="slider"?"horizontal":s==="list"?"vertical":"both",rtl:r,onActivate:($,Z)=>h(e[$],Z),onMove:m?($,Z)=>{window.clearTimeout(M.current);const lt=()=>m(e[$]);Z.repeat?M.current=window.setTimeout(lt,150):lt()}:void 0}),P=W(null),q=W(false);q.current=!!((at=P.current)!=null&&at.contains(P.current.ownerDocument.activeElement)),V(()=>{var Lt;const $=P.current;if(!$||!q.current)return;const{activeElement:Z,body:lt}=$.ownerDocument;Z&&Z!==lt||(Lt=$.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||Lt.focus()},[e]);const X=W(false);V(()=>{var lt;if(n<0)return;const $=!X.current;if(X.current=true,rt){Q.scrollToIndex(n,{instant:$});return}const Z=(lt=P.current)==null?void 0:lt.querySelector(`[data-track-index="${n}"]`);Z&&sm(Z,$)},[rt,n]);const K=$r(d),C=u?pt(u.label,c):null,nt=u?pt(u.summary,c):null,F=v===void 0&&!!(C!=null&&C.text),tt=Jn(x("itemsLabel"),H("itemsLabel"),v!==void 0||F,B.hostLanguage),b=F?{"aria-labelledby":`${k}-title`}:v!==void 0?{"aria-label":v}:tt.props,T=($,Z)=>p?p($,{selected:Z}):f(Vp,{item:$,size:i,language:c,request:a,showSummary:l}),O=$=>!(p||pt($.label,c).text||l&&pt($.summary,c).text),R=($,Z)=>O($)?x("canvasPosition",{index:Z+1,total:e.length}):void 0,N=$=>O($)?H("canvasPosition"):void 0,E=rt?{display:"flex",margin:0,padding:0,listStyle:"none"}:void 0,U=rt?{flex:"0 0 auto",scrollSnapAlign:Y?"center":"start"}:void 0,G=Y&&n>=0,_t=$=>{const Z=n+($==="prev"?-1:1),lt=G?Z>=0&&Z<e.length:$==="prev"?Q.canScrollPrev:Q.canScrollNext,Lt=G?$==="prev"?"commonPrevious":"commonNext":$==="prev"?"itemsScrollBack":"itemsScrollForward",Jt=x(Lt),Qt=te=>{if(!lt)return;if(!G)return($==="prev"?Q.scrollPrev:Q.scrollNext)();const Ct=e[Z];m?m(Ct):h(Ct,te)};return f("button",{type:"button",className:`clover-items-scroll-${$}`,"aria-controls":G?void 0:`${k}-viewport`,...it(H(Lt)),"aria-disabled":!lt||void 0,tabIndex:lt?void 0:-1,onClick:Qt,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:$==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:ze,children:Jt}),f(ke,{label:Jt})]})};return f(ln.Provider,{value:B.hostLanguage,children:f(g,{ref:B.ref,className:bt("clover-items",_),"data-layout":s,"data-navigation":o,...mr(et),...S,children:[u&&((C==null?void 0:C.text)||(nt==null?void 0:nt.text))&&f("header",{className:"clover-items-header",children:[(C==null?void 0:C.text)&&f(K,{className:"clover-items-title",id:`${k}-title`,...it(C.lang),children:C.text}),(nt==null?void 0:nt.text)&&f("p",{className:"clover-items-description",...it(nt.lang),children:nt.text.replace(/<[^>]*>/g,"")}),u.homepage&&f("a",{className:"clover-items-homepage",href:u.homepage,hrefLang:u.homepageLang,...it(H("commonViewAll")),children:x("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[rt&&_t("prev"),f("div",{id:`${k}-viewport`,className:"clover-items-viewport",ref:rt?Q.ref:void 0,children:Y?f("div",{ref:P,role:"listbox",...b,"aria-orientation":rt?"horizontal":"vertical",className:"clover-items-track",style:E,children:e.map(($,Z)=>{const lt=Z===n;return f("div",{id:`${k}-${Z}`,role:"option","aria-selected":lt,"aria-label":R($,Z),...it(N($)),className:"clover-items-item","data-track-index":Z,style:U,...L.itemProps(Z),onClick:Lt=>h($,Lt),children:T($,lt)},$.id)})}):f("ul",{...b,className:"clover-items-track",style:E,children:e.map(($,Z)=>f("li",{className:"clover-items-item","data-track-index":Z,style:U,children:f("a",{className:"clover-items-link",href:$.href,hrefLang:$.hrefLang,"aria-label":R($,Z),...it(N($)),draggable:false,onClick:lt=>h($,lt),children:T($,false)})},$.id))})}),rt&&_t("next")]}),tt.node]})})}function sm(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 im(t,e){const{clover:n}=Yt(e),o=uh(),{direction:r}=Ja(),s=ot(l=>l.collection),i=ot(l=>{var u;return((u=l.manifest)==null?void 0:u.id)??null}),a=ot(l=>{var u;return((u=l.targets)==null?void 0:u.items.length)??0}),c=ot(l=>Su(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=jn(s),u=l.findIndex(d=>d.id===i);return{position:u,total:l.length,direction:"left-to-right",step:d=>{const p=l[u+d];p&&n.goToManifest(p.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const am=Ut(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=St(),{position:c,total:l}=e;if(l<2||c<0)return null;const u=c+1;return f(n,{ref:s,className:bt("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:ze,...it(a("canvasPosition")),children:i("canvasPosition",{index:u,total:l})})]})}),cm=Ut(function({of:e="views",...n},o){const r=im(e,"Position");return f(am,{ref:o,...n,steps:r})});function lm({className:t,loading:e,error:n}){const{t:o,langOf:r}=St(),{status:s,error:i}=ah(),a=s==="loading",c=e!==void 0&&e!==false;return f(xt,{children:[f("p",{className:bt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:ze,children:[a&&(c?e:e===void 0&&f(en,{})),a&&!c&&f("span",{style:ze,...it(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:bt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(xt,{children:[f("p",{...it(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function um(t,e=false,n=3){const o=e||Ip(t),r=e?`${n}
|
|
28
|
+
${t}`:t,[s,i]=j(null);return V(()=>{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 dm=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),yc=Ut(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=pt(n,o),u=it(l),d=Pp(r,c),p=d==="markdown",h=um(d==="plain"?"":c,p,s);if(!c)return null;if(d==="plain")return f(e,{ref:a,...i,...u,children:c.split(/\r?\n/).map((g,_)=>f(de.Fragment,{children:[_>0&&f("br",{}),g]},_))});const m=typeof e=="string"&&dm.has(e)&&h&&/<(p|ul|ol|div)[\s>]/i.test(h)?"div":e;return h!==null?f(m,{ref:a,...i,...u,dangerouslySetInnerHTML:{__html:h}}):f(e,{ref:a,...i,...u,children:p?Ap(c):pn(c)})}),bc=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=pt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":pt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...it(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(yc,{as:"dd",markup:r.value,language:e})]},s)})}):null,fm=typeof window>"u"?V:Ot;function hm({children:t}){const{t:e}=St(),n=Zn(),o=W(null),r=Gt(),s=de.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=pm(o);return f("div",{className:"clover-read-more",children:[de.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,...it(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function pm(t){const[e,n]=j(false),[o,r]=j(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return fm(s),V(()=>{var d,p;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"]}),(p=(d=document.fonts)==null?void 0:d.addEventListener)==null||p.call(d,"loadingdone",c),()=>{var h,m;cancelAnimationFrame(a),l==null||l.disconnect(),u==null||u.disconnect(),(m=(h=document.fonts)==null?void 0:h.removeEventListener)==null||m.call(h,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function Ve(t,e,n){const o=Or(),r=un(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 mn=()=>{var t;return(t=me())==null?void 0:t.language};function Ti({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=Ve(t,"summary",n),i=mn();return pt(s,i).text?f(hm,{children:f(yc,{as:e,markup:s,language:i,className:bt("clover-summary",o),...r})}):null}function mm({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=Ve(t,"metadata",e),i=mn();return f(bc,{metadata:s,language:i,renderValue:o,className:bt("clover-metadata",n),...r})}function gm({of:t="manifest",value:e,className:n,...o}){const r=Ve(t,"requiredStatement",e),s=mn();return f(bc,{metadata:r?[r]:null,language:s,className:bt("clover-required-statement",n),...o})}function vm({of:t="manifest",value:e,className:n,...o}){const r=Ve(t,"rights",e);return r?f("a",{href:r,className:bt("clover-rights",n),...o,children:r}):null}function ym({of:t="manifest",value:e,className:n,...o}){const r=Ve(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:bt("clover-id",n),...o,children:r}):null}function _c({property:t,className:e,of:n="manifest",value:o,...r}){const s=z(Ve(n,t,o)),i=mn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=pt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:rn(c),...it(l.text?l.lang:void 0),children:l.text?pn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const bm=({className:t,...e})=>f(_c,{property:"homepage",className:bt("clover-homepage",t),...e}),_m=({className:t,...e})=>f(_c,{property:"seeAlso",className:bt("clover-see-also",t),...e});function wm({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=un(g=>eo(g,t),null),i=e??s,a=mn(),c=i?Nr(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[u,d]=j(c==null?void 0:c.src),p=(m=me())==null?void 0:m.clover.request;if(V(()=>{if(!c)return d(void 0);if(c.src)return d(c.src);let g=true;return Rr(c,n,p).then(_=>g&&d(_)),()=>{g=false}},[l,n]),!u)return null;const h=pt(i==null?void 0:i.label,a);return f("img",{src:u,alt:pn(h.text),...it(r.alt===void 0&&h.text?h.lang:void 0),width:n,loading:"lazy",decoding:"async",className:bt("clover-thumbnail",o),...r})}const xm=typeof window>"u"?V:Ot,wc=Xt(null),Sm=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},km=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>z(t[e]).length>0),sr=t=>!!t&&typeof t.id=="string",Em=t=>{const e=z(t.homepage).find(sr);return e?{id:e.id,hrefLang:rn(e)}:void 0},Cm=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=z(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=pt(o,e);if(r.text)return{text:pn(r.text),lang:r.lang}}return null};function xc({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=un(u=>{var d;return(d=eo(u,t))==null?void 0:d.provider},void 0),a=(l=me())==null?void 0:l.language,c=z(e!==void 0?e:i).filter(km);return c.length?f("ul",{className:bt("clover-provider",r),...s,children:c.map((u,d)=>{const p=n?Em(u):void 0,h=!!pt(u.label,a).text;return f(Mm,{agent:u,homepage:p,children:o??f(xt,{children:[f(Sc,{alt:h?"":void 0}),f(Be,{className:"clover-provider-label"})]})},u.id??d)})}):null}function Mm({agent:t,homepage:e,children:n}){const o=W(null),[r,s]=j(null),i=dt(()=>{o.current&&!Sm(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(ic.Provider,{value:t,children:f(wc.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 Sc({of:t="manifest",value:e,alt:n,className:o,...r}){var p;const{t:s,langOf:i}=St(),a=Or(),c=un(h=>{var m;return(m=eo(h,t))==null?void 0:m.provider},void 0),l=(p=me())==null?void 0:p.language,d=(e!==void 0?z(e):a?[a]:z(c)).flatMap(h=>{if(!h||typeof h!="object")return[];const m=h;if(m.type!=="Agent"&&sr(m)&&!m.logo)return[{image:m,agent:null}];const g=z(m.logo).find(sr);return g?[{image:g,agent:m}]:[]});return d.length?f(xt,{children:d.map(({image:h,agent:m},g)=>{const _=Cm(m,l);return f(Tm,{src:h.id,alt:n??(_==null?void 0:_.text)??s("logo"),...it(n!==void 0?void 0:_?_.lang:i("logo")),width:h.width,height:h.height,loading:"lazy",decoding:"async",className:bt("clover-logo",o),...r},`${h.id}-${g}`)})}):null}function Tm({alt:t,onError:e,...n}){const o=Pt(wc),[r,s]=j(false),i=dt(()=>s(true),[]);xm(()=>{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 Lm(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=ha(t,e);return o==="none"?t[0]:o}const Im=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&pt({[e]:t[e]}).text):[];function Pm(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(Im).filter(r=>r.length>1);return[...new Set(o.flat())]}function kc(){const{language:t,chooseLanguage:e}=Yt("About"),n=ot(s=>s.manifest),o=ht(()=>Pm(n),[n]),r=Lm(o,t);return r&&e?{languages:o,chosen:r,onChange:e}:null}const Am=ft(()=>import("./LanguageChoice-C50T7dPI.mjs").then(t=>({default:t.LanguageChoice}))),Ec=Xt(false);function Om({part:t}){const e=kc();return e?f(vt,{fallback:null,children:f(Am,{...e,nameKey:"readingLanguage",part:t})}):null}function Li(t,e){const n=new Set,o=[];for(const r of t)for(const s of z(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=pt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:rn(s)})}return o}function Cc(){const{language:t}=Yt("Download"),e=ot(o=>o.manifest),n=ot(o=>we(o.manifest,o.canvasId));return{page:Li(n,t),all:Li([e],t)}}const Nm=ft(()=>import("./Download-CawEl9MN.mjs").then(({DownloadGroups:t})=>({default:t}))),Rm=ft(()=>import("./NavDate-C2-wwLuB.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),Bm=ft(()=>import("./PartOfManifest-D22yMgCf.mjs"));function $m({languages:t=true,...e}){const n=Pt(Ec);return f(Fm,{...e,download:!n&&e.download!==false,choice:n||!t?null:f(Om,{part:"clover-about"})})}function Fm({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}=St(),u=Cc(),d=ot(v=>v.manifest,Object.is,"About"),p=W(null);V(()=>{const v=p.current,y=v==null?void 0:v.querySelector(".clover-about-thumbnail");if(!v||!y||typeof ResizeObserver>"u")return;const w=v.querySelector(".clover-about-label"),S=()=>{const B=`${(w==null?void 0:w.offsetHeight)??0}px`,H=`${y.offsetWidth}px`,et=v.style;et.getPropertyValue("--clover-about-label-height")!==B&&et.setProperty("--clover-about-label-height",B),et.getPropertyValue("--clover-about-thumbnail-width")!==H&&et.setProperty("--clover-about-thumbnail-width",H)};S();let x=0;const k=new ResizeObserver(()=>{cancelAnimationFrame(x),x=requestAnimationFrame(S)});return k.observe(y),w&&k.observe(w),()=>{cancelAnimationFrame(x),k.disconnect(),v.style.removeProperty("--clover-about-label-height"),v.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,d]);const h=Gt(),m=()=>{var w,S;const v=p.current;(S=((w=v==null?void 0:v.closest(".clover-sections-item"))==null?void 0:w.querySelector(".clover-sections-button"))??v)==null||S.focus({preventScroll:true})};if(!d)return null;const g=(v,y,w)=>{if(!y)return null;const{as:S,title:x,group:k}=fc(n,`${h}-${v}`);return f("section",{className:"clover-about-section",...k,children:[f(S,{className:"clover-about-heading",...it(l(v)),...x,children:c(v)}),w]})},_=v=>Array.isArray(d[v])?d[v].length>0:!!d[v];return f("div",{ref:p,className:bt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(wm,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(Be,{as:$r(n),className:"clover-about-label"})]}),e&&f(Ti,{of:"canvas",className:"clover-about-summary"}),Ys(d)&&d.partOf&&f(vt,{fallback:null,children:f(Bm,{manifest:d,headingLevel:n,onOpened:m})}),f(Ti,{className:"clover-about-summary"}),f(mm,{className:"clover-about-metadata"}),f(gm,{className:"clover-about-metadata"}),g("aboutDate",cc(d.navDate),f(vt,{fallback:null,children:f(Rm,{value:d.navDate,className:"clover-about-date"})})),g("aboutProvider",_("provider"),f(xc,{})),g("aboutRights",d.rights,f(vm,{})),g("aboutHomepage",_("homepage"),f(bm,{})),g("aboutSeeAlso",_("seeAlso"),f(_m,{})),g("download",o&&u.page.length+u.all.length>0,f(vt,{fallback:null,children:f(Nm,{page:u.page,all:u.all,headingLevel:n+1})})),g(Ys(d)?"aboutCanvas":"aboutManifest",d.id,f(ym,{}))]})}const Dm=ft(()=>import("./LanguageChoice-C50T7dPI.mjs").then(t=>({default:t.LanguageChoice}))),zm=ft(()=>import("./ControlMenu-Bp91s-g_.mjs")),Hm=ft(()=>import("./Download-CawEl9MN.mjs").then(({DownloadGroups:t})=>({default:t})));function Wm({languages:t=true,download:e=true}){const n=kc(),{page:o,all:r}=Cc(),s=e&&o.length+r.length>0;return!(t&&n)&&!s?null:f("div",{className:"clover-about-actions",children:[s&&f(Um,{page:o,all:r}),t&&n&&f(vt,{fallback:null,children:f(Dm,{...n,nameKey:"readingLanguage",part:"clover-about"})})]})}function Um({page:t,all:e}){const{t:n,langOf:o}=St(),[r,s]=j(false),a=`${Gt()}-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"),...it(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(jm,{}),f(ke,{label:n("download")})]}),r&&f(vt,{fallback:null,children:f(zm,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(Hm,{page:t,all:e,inPopover:true})})})]})}function jm(){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 Vm(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Et(t).canvases){if(n.navPlace)return true;for(const o of z(n.annotations))for(const r of z(o==null?void 0:o.items))if(r!=null&&r.navPlace||z(r==null?void 0:r.motivation).includes("georeferencing")||z(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}function qm({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:bt("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 Mc=typeof window>"u"?V:Ot,Tc=Xt(null);function pv(){return Pt(Tc)}const Lc=Xt(0);function mv(){return Pt(Lc)}function Km({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var Q;const a=Gt(),c=Jn(r??"",s,r===void 0),l=W([]),u=e==="tabs",{t:d,langOf:p}=St(),h=hc({dragFree:true,itemCount:t.length}),m=t.some(M=>M.value===n)?n:((Q=t[0])==null?void 0:Q.value)??null,g=W(new Set);m&&g.current.add(m);const _=W(null),[v,y]=j({value:null,count:0});V(()=>{var K;if(u||!m||_.current!==m)return;_.current=null;const M=t.findIndex(C=>C.value===m),L=document.getElementById(`${a}-panel-${M}`),P=(K=l.current[M])==null?void 0:K.parentElement;if(!L||!P)return;const q=P.getBoundingClientRect().bottom-L.getBoundingClientRect().top;if(q<=0)return;const X=No(L);X&&(X.scrollTop-=q)},[m,u,t,a]);const w=M=>{var tt,b,T,O;const L=t.findIndex(R=>R.value===m),P=document.getElementById(`${a}-panel-${L}`),q=M.target;if(!P||q===P||!P.contains(q)||!Xm(q))return;const X=(b=(tt=l.current[L])==null?void 0:tt.parentElement)==null?void 0:b.getBoundingClientRect(),K=L+1<t.length?(O=(T=l.current[L+1])==null?void 0:T.parentElement)==null?void 0:O.getBoundingClientRect():void 0;if(!X)return;const C=q.getBoundingClientRect(),nt=C.top<X.bottom?Math.floor(C.top-X.bottom):K&&C.bottom>K.top?Math.ceil(Math.min(C.bottom-K.top,C.top-X.bottom)):0,F=nt?No(P):null;F&&(F.scrollTop+=nt)},S=W(null),x=t.map(M=>M.value).join(`
|
|
29
|
+
`);Mc(()=>{const M=S.current;if(u||!M||typeof ResizeObserver>"u")return;const L=[...M.querySelectorAll(":scope > .clover-sections-item")],P=L.map(N=>N.firstElementChild),q=P[0],X=P[P.length-1],K=new Map,C=N=>(N&&K.get(N))??0,nt=document.scrollingElement;let F=null,tt=0;const b=()=>{const N=P.reduce(($,Z)=>$+C(Z),0);let E=0;L.forEach(($,Z)=>{$.style.setProperty("--clover-sections-before",`${E}px`),E+=C(P[Z]),$.style.setProperty("--clover-sections-after",`${N-E}px`)}),M.style.setProperty("--clover-sections-total",`${N}px`);const U=q&&getComputedStyle(q);(U==null?void 0:U.position)==="sticky"&&X&&(tt=parseFloat(U.top)+parseFloat(getComputedStyle(X).bottom)||0);const G=getComputedStyle(M),_t=parseFloat(G.lineHeight)||1.2*parseFloat(G.fontSize),at=(F==null?void 0:F.clientHeight)??0;at>0&&at-tt-N<2*_t?M.dataset.stacks="off":delete M.dataset.stacks},T=new ResizeObserver(N=>{var E,U;for(const G of N)P.includes(G.target)&&K.set(G.target,((U=(E=G.borderBoxSize)==null?void 0:E[0])==null?void 0:U.blockSize)??G.target.getBoundingClientRect().height);b()}),O=()=>{const N=No(M);N!==F&&(F&&F!==nt&&T.unobserve(F),N&&N!==nt&&T.observe(N),F=N)},R=()=>{O(),b()};O();for(const N of P)N&&T.observe(N,{box:"border-box"});return window.addEventListener("resize",R),()=>{T.disconnect(),window.removeEventListener("resize",R);for(const N of L)N.style.removeProperty("--clover-sections-before"),N.style.removeProperty("--clover-sections-after");M.style.removeProperty("--clover-sections-total"),delete M.dataset.stacks}},[u,x,i]),V(()=>{if(u)return;const M=l.current.map(P=>P==null?void 0:P.parentElement).filter(P=>!!P),L=P=>{var C;if(P.ctrlKey)return;const q=P.currentTarget,X=Ii(q);if(!X||X===document.scrollingElement)return;P.preventDefault();const K=P.deltaMode===1?parseFloat(getComputedStyle(q).lineHeight)||16:P.deltaMode===2?X.clientHeight:1;(C=Ii(X)??document.scrollingElement)==null||C.scrollBy({left:P.deltaX*K,top:P.deltaY*K,behavior:"instant"})};for(const P of M)P.addEventListener("wheel",L,{passive:false});return()=>{for(const P of M)P.removeEventListener("wheel",L)}},[u,x]);const k=M=>{M!==m&&(_.current=M,u||y(L=>({value:M,count:L.count+1})),o==null||o(M))},B=(M,L)=>{var C;const P=t.length-1,[q,X]=u?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],K=M.key===X?(L+1)%t.length:M.key===q?(L-1+t.length)%t.length:M.key==="Home"?0:M.key==="End"?P:null;K!==null&&(M.preventDefault(),(C=l.current[K])==null||C.focus(),u&&k(t[K].value))},H=W(false);V(()=>{if(!u)return;const M=t.findIndex(F=>F.value===m),L=l.current[M],P=L==null?void 0:L.parentElement;if(!L||!P)return;const q=getComputedStyle(P),X=P.getBoundingClientRect(),K=L.getBoundingClientRect(),C=X.left+(parseFloat(q.scrollPaddingLeft)||0),nt=X.right-(parseFloat(q.scrollPaddingRight)||0);(K.left<C-1||K.right>nt+1)&&h.scrollToIndex(M,{instant:!H.current}),H.current=true},[m,u,t.length,h.scrollToIndex]);const et=M=>{const L=M==="prev"?h.canScrollPrev:h.canScrollNext,P=M==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-sections-scroll-${M}`,"aria-hidden":"true",tabIndex:-1,hidden:!L,...it(p(P)),onMouseDown:q=>q.preventDefault(),onClick:M==="prev"?h.scrollPrev:h.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:M==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(ke,{label:d(P)})]})},rt=$r(i,"div"),Y=(M,L)=>{const P=M.value===m;return f("button",{ref:q=>{l.current[L]=q},type:"button",id:`${a}-button-${L}`,className:"clover-sections-button","data-value":M.value,"data-track-index":u?L:void 0,"aria-controls":`${a}-panel-${L}`,...u?{role:"tab","aria-selected":P,tabIndex:P?0:-1}:{"aria-expanded":P,"aria-disabled":P||void 0},onClick:()=>k(M.value),onKeyDown:q=>B(q,L),children:[f("span",{className:"clover-sections-label",children:M.label}),!u&&f(qm,{open:P,className:"clover-sections-chevron"})]},M.value)};return f("div",{ref:S,className:"clover-sections","data-layout":e,onFocus:u?void 0:w,style:u?void 0:{"--clover-sections-count":t.length},children:[u&&f("div",{className:"clover-sections-tabs","data-more":[h.canScrollPrev&&"start",h.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:h.ref,...c.props,className:"clover-sections-list",children:t.map(Y)}),et("prev"),et("next")]})}),u&&c.node,t.map((M,L)=>{const P=M.value===m;return f("section",{className:"clover-sections-item","data-value":M.value,"data-open":P,style:u?void 0:{"--clover-sections-index":L},children:[!u&&f(rt,{className:"clover-sections-heading",children:[Y(M,L),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(Lc.Provider,{value:v.value===M.value?v.count:0,children:f(Zm,{id:`${a}-panel-${L}`,tabs:u,labelledBy:`${a}-button-${L}`,hidden:!P,actions:M.actions,children:g.current.has(M.value)?M.content:null})})]},M.value)})]})}function Zm({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=j(null),c=!o||!!r;return Mc(()=>{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(xt,{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(Tc.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function No(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 Ii(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 Xm(t){try{return t.matches(":focus-visible")}catch{return true}}const Ym=ft(()=>import("./MapView-BN9wXQKV.mjs").then(t=>({default:t.RootMap}))),Gm=ft(()=>import("./Collection-DSBxCmXw.mjs").then(t=>({default:t.Collection}))),Jm=ft(()=>import("./TargetItems-DLhUH1Gq.mjs").then(t=>({default:t.TargetsSection}))),Qm=ft(()=>import("./Contents-DrXckx7d.mjs").then(t=>({default:t.Contents}))),tg=ft(()=>import("./Search-DC259m4f.mjs").then(t=>({default:t.Search}))),eg=ft(()=>import("./Transcript-D_VGJQxn.mjs").then(t=>({default:t.Transcript}))),ng=ft(()=>import("./Annotations-Dh_8Tzi0.mjs").then(t=>({default:t.Annotations}))),be=t=>f(vt,{fallback:null,children:t}),og=()=>null,rg=Ut(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,className:d,children:p,onKeyDown:h,...m},g){var N;const{clover:_}=Yt("Panel"),v=W(null),{t:y,langOf:w}=St(),S=Jn(y("informationPanelTabs"),w("informationPanelTabs"),!!(m["aria-label"]||m["aria-labelledby"])||!(["aside","section","nav"].includes(c)||m.role)),x=E=>{const U=w(E);return U?f("span",{...it(U),children:y(E)}):y(E)},k=ot(E=>Fu(E.manifest,E.addedSets).length>0),B=ot(E=>we(E.manifest,E.canvasId).some(U=>Ua(U).length>0||gf(U).length>0)),H=ot(E=>sh(E.manifest).length>0),et=ot(E=>!!ya(E.manifest)),rt=ot(E=>Vm(E.manifest,E.collection)),Y=ot(E=>{var U;return(((U=E.targets)==null?void 0:U.items.length)??0)>1}),Q=ot(E=>{var U,G;return(((G=(U=E.collection)==null?void 0:U.items)==null?void 0:G.length)??0)>0||!!xu(E.manifest)}),M=de.Children.toArray(p).filter(E=>de.isValidElement(E)&&E.type===og),L=e==="accordion"?a+1:a,P=u||l?f(Wm,{languages:u,download:l}):void 0,q=M.length?M.map(({props:E})=>({value:E.value,label:E.label,content:E.children,...E.value==="about"&&{actions:P}})):[{value:"about",label:x("informationPanelTabsAbout"),content:f($m,{headingLevel:L,download:l}),actions:P},...Y?[{value:"targets",label:x("informationPanelTabsTargets"),content:be(f(Jm,{headingLevel:L}))}]:[],...Q?[{value:"collection",label:x("informationPanelTabsCollection"),content:be(f(Gm,{headingLevel:L}))}]:[],...H?[{value:"contents",label:x("informationPanelTabsContents"),content:be(f(Qm,{}))}]:[],...et?[{value:"search",label:x("informationPanelTabsSearch"),content:be(f(tg,{headingLevel:L,sticky:true,size:"small"}))}]:[],...rt?[{value:"map",label:x("informationPanelTabsMap"),content:be(f(Ym,{}))}]:[],...B?[{value:"transcript",label:x("transcriptLabel"),content:be(f(eg,{sticky:true,size:"small"}))}]:[],...k?[{value:"annotations",label:x("informationPanelTabsAnnotations"),content:be(f(ng,{headingLevel:L}))}]:[]],X=ot(E=>E.search.query),K=q.some(E=>E.value==="search"),[C,nt]=j(()=>X&&K?"search":o??null),F=W(X&&K?X:"");V(()=>{K&&(X&&X!==F.current&&n===void 0&&nt("search"),F.current=X)},[X,K,n]);const tt=ot(E=>{var U;return E.annotationId&&((U=E.regions)!=null&&U.entries.some(G=>G.id===E.annotationId))?E.annotationId:null}),b=q.some(E=>E.value==="contents");V(()=>{tt&&b&&n===void 0&&nt("contents")},[tt,b,n]);const T=n!==void 0?n:C,O=(q.some(E=>E.value===T)?T:(N=q[0])==null?void 0:N.value)==="search";if(V(()=>{K&&_.setSetVisible(_r,O)},[_,K,O]),!q.length)return null;const R=()=>{var U;const E=v.current;E!=null&&E.contains(document.activeElement)&&((U=sg(E))==null||U.focus()),s==null||s()};return f(c,{ref:E=>{v.current=E,typeof g=="function"?g(E):g&&(g.current=E)},className:bt("clover-panel",d),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...S.props,onKeyDown:E=>{h==null||h(E),i&&s&&E.key==="Escape"&&!E.defaultPrevented&&(E.preventDefault(),R())},...m,children:[S.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":y("informationPanelClose"),...it(w("informationPanelClose")),onClick:R,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(Ia,{})}),f(ke,{label:y("informationPanelClose")})]}),f(Ec.Provider,{value:q.some(E=>E.value==="about"),children:f(Km,{items:q,layout:e,value:n!==void 0?n:C,onValueChange:E=>{n===void 0&&nt(E),r==null||r(E)},label:y("informationPanelTabs"),labelLang:w("informationPanelTabs"),headingLevel:a})})]})});function sg(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 ig=1,ag=4,cg=8,lg=500,ug=4,Pi=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],Ic=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function Nn(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*Ic():t.endsWith("%")?n/100*e:n}const Ro=t=>typeof t=="number"?`${t}px`:t,dg=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},fg=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},hg=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function pg(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 mg(t,e,n){const{sized:o,other:r}=pg(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=Nn(a.min,s)??0,d=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(Nn(c.min,s)??0),p=Math.max(l,Math.min(Nn(a.max,s)??d,d)),h=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:p,after:h}}function gg(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 vg(t,e){const n=e.sized.getBoundingClientRect().width,o=ig*Ic()*(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 Ai(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 yg(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=()=>{Pi.forEach(g=>l.removeEventListener(g,p,true)),l.removeEventListener("pointermove",h,true),clearTimeout(m),s=null},p=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&u(g))return d();g.preventDefault(),g.stopPropagation()}},h=g=>u(g)&&d();Pi.forEach(g=>l.addEventListener(g,p,true)),l.addEventListener("pointermove",h,true);const m=setTimeout(d,lg);s=d};return{down(a){var u;if(o=false,r=null,a.defaultPrevented||a.button!==0||Ai(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"?cg:ag,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*ug}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||Ai(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=vg(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const Fr=Xt(null);function Dr(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const bg=Ut(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=W(null),l=W({}),[u,d]=j({});V(()=>d(dg(n)),[n]);const p=dt((m,g)=>d(_=>{const v={..._};return g===void 0?delete v[m]:v[m]=Math.round(g),fg(n,v),v}),[n]),h=ht(()=>({sizes:u,setSize:p,specs:l,element:c}),[u,p]);return f(Fr.Provider,{value:h,children:f(e,{ref:m=>{c.current=m,Dr(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),Oi=Ut(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},u){const d=Pt(Fr),p=W(null),[h,m]=j(s??"");V(()=>{if(s)return m(s);const _=hg(d==null?void 0:d.element.current);m(String(_.indexOf(p.current)))},[s,d]),d&&h&&(d.specs.current[h]={min:o,max:r,size:n});const g=d&&h?d.sizes[h]:void 0;return f(e,{ref:_=>{p.current=_,Dr(u,_)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:Ro(o)??0,"--clover-split-size":g!==void 0?`${g}px`:Ro(n),"--clover-split-max":Ro(r),...a},...l,children:c})}),_g=Ut(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=Pt(Fr),{t:l,langOf:u}=St(),d=W(null),[p,h]=j(),m=dt(()=>{const k=d.current,B=c==null?void 0:c.element.current;return!k||!B||!c?null:mg(k,B,c.specs.current)},[c]),g=dt(k=>{const B=m();if(!B||!c)return;const H=Math.min(B.max,Math.max(B.min,k));c.setSize(B.key,H),h({now:H,min:B.min,max:B.max})},[m,c]),_=dt(()=>{const k=m();k&&h({now:k.sized.getBoundingClientRect().width,min:k.min,max:k.max})},[m]);V(()=>{const k=c==null?void 0:c.element.current;if(_(),!k||typeof ResizeObserver>"u")return;let B=0;const H=new ResizeObserver(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(_)});return H.observe(k),()=>{cancelAnimationFrame(B),H.disconnect()}},[_,c,c==null?void 0:c.sizes]);const v=k=>{var B;return Math.round(k/(((B=c==null?void 0:c.element.current)==null?void 0:B.clientWidth)||1)*100)},y=()=>{var rt,Y;const k=m();if(!k||!c)return;const B=((rt=c.element.current)==null?void 0:rt.clientWidth)??0,H=Nn((Y=c.specs.current[k.key])==null?void 0:Y.size,B),et=gg(k,H,c.sizes[k.key]);if(!et.own)return g(et.to);c.setSize(k.key,void 0),h({now:H,min:k.min,max:k.max})},w=W({limits:m,resize:g,step:y});w.current={limits:m,resize:g,step:y};const[S]=j(()=>yg(()=>d.current,()=>w.current));V(()=>()=>S.dispose(),[S]);const x=i["aria-label"]??l("splitHandle");return f("div",{ref:k=>{d.current=k,Dr(a,k)},role:"separator","aria-orientation":"vertical","aria-label":x,...it(i["aria-label"]===void 0?u("splitHandle"):void 0),"aria-valuenow":p?v(p.now):void 0,"aria-valuemin":p?v(p.min):void 0,"aria-valuemax":p?v(p.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:k=>{o==null||o(k),S.down(k)},onPointerMove:k=>S.move(k),onPointerUp:k=>S.up(k),onPointerCancel:k=>S.up(k),onClick:k=>{r==null||r(k),S.click(k)},onKeyDown:k=>{s==null||s(k),S.key(k)},...i,children:[n,f(ke,{label:x})]})});let Pc;function wg(t){Pc=t}function gv(){return Pc}function xg({open:t,onOpenChange:e,controls:n}){const{t:o,langOf:r}=St(),s=Gt().replace(/:/g,"");return f(Re,{id:`panel-${s}`,label:o("informationPanelToggle"),lang:r("informationPanelToggle"),expanded:t,controls:n,onClick:()=>e(!t),children:f(xt,{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 Sg,An;function kg(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=W({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},V(()=>{const c=t.current;if(!c||(An==null||An.reset(c,a),!e))return;let l=true,u;return(Sg??(Sg=import("../dragToClose-C-Pf1IeO.mjs").then(d=>An=d))).then(d=>{l&&(u=d.attach(c,a))}),()=>{l=false,u==null||u()}},[t,e])}const Eg=240;function Cg(t){const[e,n]=j(t),[o,r]=j(t);return V(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),Eg);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function Mg(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 Tg=typeof window>"u"?V:Ot;function Lg(t,e){const[n,o]=j();return Tg(()=>{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 Ig=30;function Pg(){const t=W(0);return V(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&Ag()?r.focus():++n<Ig&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function Ag(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}const Og=typeof window>"u"?V:Ot;function Ng(t,e,n){Og(()=>{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])}const Rg="16rem",Bg="14rem",$g=31,Fg=typeof window>"u"?V:Ot;function Dg({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",download:i=true,languages:a=true,items:c="slider",storageKey:l="clover-template-default",fill:u=false,...d}){const p=W(null),h=Lg(p,$g),m=h??true,[g,_]=j(r??true),[v,y]=j(false),w=m?g:v,S=W(null),x=W(0);V(()=>{if(!x.current||!S.current)return;x.current-=1;const F=Mg(S.current);F==null||F.focus({preventScroll:true}),F&&document.activeElement===F&&(x.current=0)});const k=F=>{x.current=!m&&F?3:0,m||y(F),_(F)},B=Gt().replace(/:/g,""),H=`${B}-panel`,et=fc(n,`${B}-title`),rt=Pg(),Y=()=>rt(()=>document.querySelector(`[data-button="panel"][aria-controls~="${H}"]`)),Q=()=>{var F;(F=S.current)!=null&&F.contains(document.activeElement)&&Y()},M=W(h);Fg(()=>{M.current===true&&h===false&&Y(),h===true&&y(false),M.current=h},[h]);const L=!m,P=o&&!L&&w,q=W(null);Ng(q,()=>{var F,tt;return(tt=(F=q.current)==null?void 0:F.parentElement)==null?void 0:tt.querySelector(".clover-template-default-body")},P);const X=f(xg,{open:w,onOpenChange:F=>{L||Y(),k(F)},controls:H}),K=Cg(L&&w),C=W(null);kg(S,{enabled:L&&K.open,side:"end",onClose:()=>{Q(),k(false)},scrim:C});const nt=L?K.mounted:w;return f(vd,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":u||void 0,...e?et.group:null,...d,children:f(bg,{ref:p,className:"clover-template-default-panes clover-template-panes","data-panel":L?"over":"beside",storageKey:l||void 0,onKeyDown:F=>{L&&w&&F.key==="Escape"&&!F.defaultPrevented&&(F.preventDefault(),k(false))},children:[f(Oi,{className:"clover-template-default-main",min:L?void 0:Rg,children:[e&&f("header",{className:"clover-template-default-header",children:[f(zg,{title:et}),f(Vn,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(xc,{className:"clover-template-default-provider",children:f(Sc,{})})]}),f(lm,{loading:false}),f(Tp,{className:"clover-template-default-body",children:o&&!P&&X}),f("div",{className:"clover-template-default-rail",children:[f("div",{className:"clover-template-default-rail-header",children:[f(Ug,{}),f(cm,{})]}),c&&f(Vn,{layout:c})]})]}),P&&f(_g,{"aria-controls":H}),P&&f("div",{ref:q,className:"clover-template-default-spine",children:X}),o&&f(Oi,{ref:S,id:H,"data-spine":L||void 0,name:"panel",className:"clover-template-default-panel clover-template-drawer",size:"24rem",min:L?void 0:Bg,"data-open":L?K.open:w,hidden:!nt,children:f(rg,{layout:s,download:i,languages:a,headingLevel:e?Wg(n):n,onClose:L?()=>k(false):void 0,closeOnEscape:L})}),o&&L&&K.mounted&&f("div",{ref:C,className:"clover-template-default-scrim clover-template-scrim","data-open":K.open,"aria-hidden":"true",onMouseDown:F=>F.preventDefault(),onClick:()=>{Q(),k(false)}})]})})}function zg({title:t}){const e=ot(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=dh();return Hg(n==null?void 0:n.entries[0]),f(xt,{children:[f(Be,{as:t.as,className:"clover-template-default-title",...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(Be,{as:"p",label:e,className:"clover-template-default-collection"}),f(Vn,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(Be,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(Vn,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Hg(t){const{clover:e}=Yt(),n=ot(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=W(null);V(()=>{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 Wg=t=>t+1;function Ug(){const t=Ar();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(de.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(Be,{label:e.label})]},e.id))})}const jg=()=>import("./renderers-DLoqv3QO.mjs"),Vg=ft(()=>import("./Document-BN1rICu3.mjs").then(t=>({default:t.Document}))),qg=ft(()=>import("./Gallery-MWHtvjti.mjs").then(t=>({default:t.Gallery}))),Ni={default:Dg,document:Vg,gallery:qg},Kg={header:["default"],panel:["default"],items:["default"],fill:["default"],defaultPanelOpen:["default","document"],panelLayout:["default","document"],download:["default","document"],languages:["default","document"],storageKey:["default","document"],defaultSidebarOpen:["document"],size:["gallery"]};function Zg({props:t}){const e=typeof t.template=="string"&&t.template in Ni?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=Kg[i])==null?void 0:a.includes(e))??true)})),o=Fn(jg,!!t.renderers),r=ht(()=>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=Ni[e];return f(vt,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const Xg=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Yg={mapWorkerUrl:Xg},Gg={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","false"]},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"]},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},size:{prop:"size",type:"string"}},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"}}};wg(Yg.mapWorkerUrl);hl(Gg,()=>Promise.resolve(Zg));export{Il as $,W as A,Tp as B,Ht as C,bg as D,Oi as E,Vn as F,_g as G,xg as H,Ed as I,lv as J,lh as K,Be as L,kl as M,vt as N,ft as O,cm as P,Ti as Q,vd as R,lm as S,ht as T,Xt as U,Pt as V,Qu as W,hv as X,yr as Y,mc as Z,Ot as _,Cg as a,ym as a$,gc as a0,rn as a1,vc as a2,ot as a3,Su as a4,pt as a5,$r as a6,it as a7,Et as a8,Sa as a9,Tf as aA,Vd as aB,Cf as aC,Za as aD,Vu as aE,$a as aF,ph as aG,hi as aH,Ld as aI,Oa as aJ,Bt as aK,Rd as aL,_f as aM,Ud as aN,Re as aO,bd as aP,Pf as aQ,en as aR,Id as aS,kd as aT,Pd as aU,Ad as aV,Ba as aW,Nd as aX,Od as aY,ch as aZ,xu as a_,zu as aa,Se as ab,St as ac,Jn as ad,bt as ae,am as af,Ut as ag,im as ah,Zn as ai,pr as aj,mr as ak,ln as al,qa as am,Go as an,Wn as ao,Ir as ap,Ar as aq,fh as ar,Jo as as,br as at,Xn as au,z as av,de as aw,Wd as ax,Lf as ay,Mf as az,Kl as b,wh as b$,bm as b0,sh as b1,ce as b2,qm as b3,cv as b4,sv as b5,tv as b6,ya as b7,mv as b8,we as b9,Nr as bA,nf as bB,Cd as bC,ju as bD,iv as bE,sf as bF,me as bG,kr as bH,vu as bI,bf as bJ,yc as bK,We as bL,dn as bM,Yo as bN,Ia as bO,pn as bP,un as bQ,gv as bR,cc as bS,Dt as bT,Mu as bU,Pp as bV,Ap as bW,ha as bX,nd as bY,Nu as bZ,ga as b_,Ua as ba,gf as bb,kc as bc,fa as bd,pv as be,Fu as bf,xr as bg,ev as bh,So as bi,Lr as bj,Lm as bk,vr as bl,Fn as bm,oh as bn,wa as bo,Gn as bp,je as bq,Ma as br,Cc as bs,Ys as bt,Pu as bu,Ya as bv,of as bw,ba as bx,He as by,_r as bz,kg as c,Iu as c0,df as c1,nv as c2,ov as c3,rv as c4,gi as c5,dp as c6,mi as c7,mh as c8,gh as c9,av as ca,Zt as cb,Wt as cc,In as cd,hm as ce,bc as cf,rg as cg,Fa as ch,Op as ci,il as cj,fv as ck,j as d,Yt as e,Ja as f,uh as g,Gt as h,uv as i,dv as j,xt as k,Pg as l,Lg as m,Bl as n,ke as o,Mg as p,dt as q,Rr as r,Rp as s,fc as t,f as u,ze as v,xc as w,qt as x,V as y,Sc as z};
|