@nulib/clover 4.6.0 → 4.7.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 +2 -0
- package/dist/base.css +1 -0
- package/dist/components/Canvas/CanvasView.mjs +18 -4
- package/dist/components/Canvas/Connected.mjs +1 -1
- package/dist/components/Canvas/ControlMenu.mjs +1 -1
- package/dist/components/Canvas/LoadedCanvas.mjs +26 -6
- package/dist/components/Canvas/PlaceBox.mjs +1 -1
- package/dist/components/Canvas/Placeholder.mjs +1 -1
- package/dist/components/Canvas/media/Player.mjs +2 -2
- package/dist/components/Canvas/media/Transport.mjs +1 -1
- package/dist/components/CollectionSelect/CollectionSelect.mjs +7 -5
- package/dist/components/Contents/Contents.mjs +9 -1
- package/dist/components/Items/Items.mjs +2 -5
- package/dist/components/Items/Position.mjs +2 -5
- package/dist/components/Items/StandaloneItems.mjs +6 -0
- package/dist/components/Items/clamped.mjs +1 -1
- package/dist/components/Map/MapView.mjs +2 -8
- package/dist/components/Root/useRootState.mjs +15 -14
- package/dist/components/Scene/Loaded.mjs +5 -1
- package/dist/core/clover.mjs +38 -10
- package/dist/core/geo.mjs +5 -4
- package/dist/core/selectors.mjs +7 -1
- 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/it.json.mjs +1 -1
- package/dist/i18n/locales/ja.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/i18n/locales/zh-Hans.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
- package/dist/index.d.mts +14 -2
- package/dist/lib/renderer/CanvasRenderer.mjs +4 -3
- package/dist/map/index.d.mts +2 -1
- package/dist/spacing.css +1 -0
- package/dist/styles/core.css +1 -1
- package/dist/styles/items.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui/EntryThumbnail.mjs +6 -3
- package/dist/ui/Tip.mjs +16 -10
- package/dist/ui/adoptSheet.mjs +6 -0
- package/dist/web-components/About-Cb0IP45J.mjs +1 -0
- package/dist/web-components/AnnotationItems-vwOrc2LC.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-4PN2LNP-.mjs → AnnotationMenu-DEbZR6u5.mjs} +1 -1
- package/dist/web-components/{AnnotationState-3KHHmQhl.mjs → AnnotationState-CHI2fYVb.mjs} +1 -1
- package/dist/web-components/{Annotations-BwKS6fG8.mjs → Annotations-DelBDbuL.mjs} +1 -1
- package/dist/web-components/{Annotations-CPUvoKJe.mjs → Annotations-DvLurCSg.mjs} +1 -1
- package/dist/web-components/{Body-CTzmxY8R.mjs → Body-eYyY_zlC.mjs} +1 -1
- package/dist/web-components/{BodyAlert-CXOxbNBE.mjs → BodyAlert-DeoEp76n.mjs} +1 -1
- package/dist/web-components/{Button-a59NBnOp.mjs → Button-M-Lskr_F.mjs} +1 -1
- package/dist/web-components/{Camera-BlbXBgYZ.mjs → Camera-Z7dN1HO1.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-DXCfms6g.mjs → Canvas2DBackend-BqkQkUat.mjs} +1 -1
- package/dist/web-components/CanvasView-DC9Zf7Tn.mjs +2 -0
- package/dist/web-components/{CaptionDetails-CCCTWTQP.mjs → CaptionDetails-D9OrUqvi.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-PjHy5-zS.mjs +1 -0
- package/dist/web-components/{Chevron-CH8yyEDi.mjs → Chevron-lIH5boXF.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-BQVTRzXj.mjs → ChoiceMenu-Coknxzkh.mjs} +1 -1
- package/dist/web-components/{Collection-CbEMQWrO.mjs → Collection-DfWwFkgY.mjs} +1 -1
- package/dist/web-components/CollectionSelect-CYa0N09G.mjs +1 -0
- package/dist/web-components/Connected-CkrBE4v-.mjs +1 -0
- package/dist/web-components/{Connected-C31vzWei.mjs → Connected-Dy4Fjp_-.mjs} +1 -1
- package/dist/web-components/{Connected-Dq0xux9o.mjs → Connected-tpnive3y.mjs} +1 -1
- package/dist/web-components/Contents-JgQb97do.mjs +1 -0
- package/dist/web-components/ControlMenu-DARWTFzU.mjs +1 -0
- package/dist/web-components/ControlsFade-DXN4_Kcr.mjs +1 -0
- package/dist/web-components/{CountMenu-D4M1roIh.mjs → CountMenu-DNkuen7t.mjs} +1 -1
- package/dist/web-components/Cue-CcxumEor.mjs +1 -0
- package/dist/web-components/{Document-CPQELxSI.mjs → Document-74sHCl40.mjs} +1 -1
- package/dist/web-components/{DomLayers-DwhkzPRS.mjs → DomLayers-B0tKZUWz.mjs} +1 -1
- package/dist/web-components/{Download-Dsei4KG3.mjs → Download-CVmsdUyH.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BI7V3B5i.mjs → EntryBodies-BrGtXUx4.mjs} +1 -1
- package/dist/web-components/EntryThumbnail-DZPp7vk8.mjs +1 -0
- package/dist/web-components/{FieldPill-BOeOasUT.mjs → FieldPill-Dr-7bigM.mjs} +1 -1
- package/dist/web-components/FrameAnimation-Dr4lStqa.mjs +1 -0
- package/dist/web-components/{Gallery-BDGDzt0R.mjs → Gallery-BI_p4a2m.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-9zKXX7B6.mjs → GlobeGlyph-Bo56m375.mjs} +1 -1
- package/dist/web-components/{HideToggle-CmwFnHcZ.mjs → HideToggle-COFq37Jg.mjs} +1 -1
- package/dist/web-components/{ImageControls-CSHxdUD1.mjs → ImageControls-DQwLWsTL.mjs} +1 -1
- package/dist/web-components/Items-Co-0SKPW.mjs +1 -0
- package/dist/web-components/{ItemsVertical-BeIiJ37B.mjs → ItemsVertical-Dv3gKZJ2.mjs} +1 -1
- package/dist/web-components/Label-BGPmD5NF.mjs +1 -0
- package/dist/web-components/{LanguageChoice-D_vEiQp9.mjs → LanguageChoice-DTNAjTpR.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-ycNvnbOB.mjs → LanguageMenu-DViT7hCI.mjs} +1 -1
- package/dist/web-components/{LightboxView-CsOAsZ3f.mjs → LightboxView-DUEAuXcS.mjs} +1 -1
- package/dist/web-components/{ListEnd-B6tyeK1B.mjs → ListEnd-Ccc_v93N.mjs} +1 -1
- package/dist/web-components/Loaded-DlWNFC49.mjs +1 -0
- package/dist/web-components/LoadedCanvas-BU03onyH.mjs +3 -0
- package/dist/web-components/LoadedMap-Qernkf9V.mjs +1 -0
- package/dist/web-components/{Loading-CAkF1fBT.mjs → Loading-1cRP8fn5.mjs} +1 -1
- package/dist/web-components/{Map-BDsBYSp5.mjs → Map-DdcDYjzX.mjs} +1 -1
- package/dist/web-components/MapView-BW4dD40Q.mjs +3 -0
- package/dist/web-components/{Markup-COA2t_y1.mjs → Markup-23-Aibht.mjs} +1 -1
- package/dist/web-components/{MediaBody-XsEObuYV.mjs → MediaBody-C37X6xTP.mjs} +1 -1
- package/dist/web-components/{MediaBody-CNk9fFfN.mjs → MediaBody-dXy6NIcq.mjs} +1 -1
- package/dist/web-components/{NavDate-1LLiZ8Vq.mjs → NavDate-DT_7gQEE.mjs} +1 -1
- package/dist/web-components/{Navigator-t1y35uj8.mjs → Navigator-COqGN-K4.mjs} +1 -1
- package/dist/web-components/{Pager-35N8_3lH.mjs → Pager-DY6QIfJo.mjs} +1 -1
- package/dist/web-components/PagerLayout-CXSF9P8N.mjs +1 -0
- package/dist/web-components/{Panel-D16u98YB.mjs → Panel-Dj_tQ89q.mjs} +1 -1
- package/dist/web-components/PanelPart-BPWf5byV.mjs +1 -0
- package/dist/web-components/{PanelToggle-BcUVIbQw.mjs → PanelToggle-D9JBD6t1.mjs} +1 -1
- package/dist/web-components/PartOfManifest-14dPnF-N.mjs +1 -0
- package/dist/web-components/{Pending-bIYd0PwB.mjs → Pending-BsqpZMEF.mjs} +1 -1
- package/dist/web-components/PlaceBox-B_OXZC8S.mjs +1 -0
- package/dist/web-components/Placeholder-BBjY81nx.mjs +1 -0
- package/dist/web-components/Position-qHH_2RQA.mjs +1 -0
- package/dist/web-components/{Primitives-DP2uwwcU.mjs → Primitives-3boP2HT0.mjs} +1 -1
- package/dist/web-components/{Provider-BUDzNTyJ.mjs → Provider-laA0MWws.mjs} +1 -1
- package/dist/web-components/{ReadMore-B6qft77s.mjs → ReadMore-Trj9tAw5.mjs} +1 -1
- package/dist/web-components/{Root-J9v7nQ6o.mjs → Root-DIfyZZ9O.mjs} +1 -1
- package/dist/web-components/Scene-DGLalXcX.mjs +1 -0
- package/dist/web-components/{SceneView-DykQJepG.mjs → SceneView-B7Zrpafx.mjs} +1 -1
- package/dist/web-components/{Search-DEoFdx2g.mjs → Search-DhsZJhFF.mjs} +1 -1
- package/dist/web-components/{Sections-B6j9eFao.mjs → Sections-EpYlUFGL.mjs} +1 -1
- package/dist/web-components/{SeekMarks-C3ZDOMbt.mjs → SeekMarks-C0NHUzE_.mjs} +1 -1
- package/dist/web-components/StandaloneItems-cmPpspAM.mjs +1 -0
- package/dist/web-components/{Status-C49DxNaY.mjs → Status-BeDk5zEi.mjs} +1 -1
- package/dist/web-components/{Steps-BTAJ3lc6.mjs → Steps-BDB0OPKa.mjs} +1 -1
- package/dist/web-components/{TargetItems-BZFSWVs6.mjs → TargetItems-DHcGeFqU.mjs} +1 -1
- package/dist/web-components/Timeline-DWhKhdYb.mjs +1 -0
- package/dist/web-components/Tip-PBxp-ONQ.mjs +1 -0
- package/dist/web-components/{Transcript-FmC6HR0-.mjs → Transcript-DbhV6Vxo.mjs} +1 -1
- package/dist/web-components/Transport-BtIKsYml.mjs +1 -0
- package/dist/web-components/{Transport-pRWbs9M3.mjs → Transport-wJNLFRXZ.mjs} +1 -1
- package/dist/web-components/{annotation-collection-Dc-peX7w.mjs → annotation-collection-DA_XNrVM.mjs} +1 -1
- package/dist/web-components/{annotation-name-BhbhOgES.mjs → annotation-name-DCHYfYjG.mjs} +1 -1
- package/dist/web-components/{annotations-content-BJSUCNd1.mjs → annotations-content-CLVJE9-j.mjs} +1 -1
- package/dist/web-components/{body-BEZ3sYcR.mjs → body-DY6_Kb7A.mjs} +1 -1
- package/dist/web-components/canvas-BsmSDfXr.mjs +1 -0
- package/dist/web-components/{cloverEngine-BstElW9l.mjs → cloverEngine-xAanVNmS.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DGOg8oAH.mjs → content-state-reader-CHLSQAIO.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-Lxfq7zz4.mjs → controlGlyphs-LR_viOPR.mjs} +1 -1
- package/dist/web-components/{controls-BibZpBh1.mjs → controls-CSwaU0O6.mjs} +1 -1
- package/dist/web-components/{downloads-cYib41PV.mjs → downloads-UWzv4fZU.mjs} +1 -1
- package/dist/web-components/{dragToClose-BpzjNnPx.mjs → dragToClose-BXoYlfWj.mjs} +1 -1
- package/dist/web-components/{engine-Cl755NaO.mjs → engine-Codq0RYR.mjs} +1 -1
- package/dist/web-components/{engines-fZzYf1dz.mjs → engines-kj0OVyAK.mjs} +1 -1
- package/dist/web-components/{es-Bx-zZBfZ.mjs → es-Czdt8By_.mjs} +1 -1
- package/dist/web-components/{fetchManifest-D31pEPrb.mjs → fetchManifest-Cw6_bmlS.mjs} +1 -1
- package/dist/web-components/{fi-DsP1FhBy.mjs → fi-RWtClOWA.mjs} +1 -1
- package/dist/web-components/{follow-content-Byosc3Ev.mjs → follow-content-DcFvV4qy.mjs} +1 -1
- package/dist/web-components/{fr-BuL_F9Jq.mjs → fr-CFRY9P3c.mjs} +1 -1
- package/dist/web-components/{fromManifest-DqCyZd2Q.mjs → fromManifest-Bzpc1R9t.mjs} +1 -1
- package/dist/web-components/{glyphs-8fjIPAtZ.mjs → glyphs-BuGNvvP-.mjs} +1 -1
- package/dist/web-components/{hooks-Bo5GjPGX.mjs → hooks-CAA2UpX_.mjs} +1 -1
- package/dist/web-components/image-layers-DhYm73Ju.mjs +1 -0
- package/dist/web-components/{image-service-content-bUFBZCr1.mjs → image-service-content-Rn8Tl4Hk.mjs} +1 -1
- package/dist/web-components/{imageService-CCKieCxo.mjs → imageService-BBwzg9uY.mjs} +1 -1
- package/dist/web-components/index-BujnlXi0.mjs +1 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{it-DH3EtrgI.mjs → it-D_Hb0t9G.mjs} +1 -1
- package/dist/web-components/items-CD8kE1Gd.mjs +1 -0
- package/dist/web-components/{items-CKMFXz0W.mjs → items-DjWXCG9C.mjs} +1 -1
- package/dist/web-components/{ja-BEHbDotv.mjs → ja-BoJ9dFmn.mjs} +1 -1
- package/dist/web-components/label-CssXf-do.mjs +1 -0
- package/dist/web-components/{layout-DQtgCOJJ.mjs → layout-CwH0NLMY.mjs} +1 -1
- package/dist/web-components/{link-q4quIuuD.mjs → link-Ujj3Xhp2.mjs} +1 -1
- package/dist/web-components/logo-Bd8fSMYN.mjs +1 -0
- package/dist/web-components/{models-Dw-cADIz.mjs → models-CxmIV7Mb.mjs} +1 -1
- package/dist/web-components/{nb-Bdfn_mZs.mjs → nb-B43QGinl.mjs} +1 -1
- package/dist/web-components/{nn-BCWbSuK0.mjs → nn-BmkkC79H.mjs} +1 -1
- package/dist/web-components/{no-Bdfn_mZs.mjs → no-B43QGinl.mjs} +1 -1
- package/dist/web-components/{nodes-nZmQ93ib.mjs → nodes-CDVV_37U.mjs} +1 -1
- package/dist/web-components/{overlayImage-B-ybt0wn.mjs → overlayImage-T6FKPFQJ.mjs} +1 -1
- package/dist/web-components/{panel-C27fOmhT.mjs → panel-DhzvJaxa.mjs} +1 -1
- package/dist/web-components/part-D1ZpOfJ5.mjs +1 -0
- package/dist/web-components/{playerSurface-BLzwC0Ux.mjs → playerSurface-BxtfijMA.mjs} +1 -1
- package/dist/web-components/{pointer-BYZjBehK.mjs → pointer-DWmL4uP7.mjs} +1 -1
- package/dist/web-components/{provider-Cs6sFr4G.mjs → provider-BziMOPSN.mjs} +1 -1
- package/dist/web-components/{pt-Da5El49z.mjs → pt-BbtIGupi.mjs} +1 -1
- package/dist/web-components/{range-regions-DssQTTra.mjs → range-regions-V0yKxXzo.mjs} +1 -1
- package/dist/web-components/{read-more-Cp9CLzyd.mjs → read-more-DdhUDS2g.mjs} +1 -1
- package/dist/web-components/{readingLanguages-D97yt-4s.mjs → readingLanguages-CtdxDxbb.mjs} +1 -1
- package/dist/web-components/{rendererSurface-BuBm8Th_.mjs → rendererSurface-B6BzhEeK.mjs} +2 -2
- package/dist/web-components/{renderers-BL-b8snn.mjs → renderers-BmoCXuIv.mjs} +1 -1
- package/dist/web-components/{resource-DwKOZbOZ.mjs → resource-BjumsIsL.mjs} +1 -1
- package/dist/web-components/{save-file-CcfAgDXf.mjs → save-file-BCXU9sr5.mjs} +1 -1
- package/dist/web-components/{search-C45Jd7QH.mjs → search-Bn5kscQv.mjs} +1 -1
- package/dist/web-components/shared-pIVPxZLY.mjs +1 -0
- package/dist/web-components/{show-link-D9bByIzf.mjs → show-link-DG3TQzXI.mjs} +1 -1
- package/dist/web-components/{sizedImage-BFAry04f.mjs → sizedImage-CagzYSJ_.mjs} +1 -1
- package/dist/web-components/{split-CDZiE4rz.mjs → split-C_xPhLhD.mjs} +1 -1
- package/dist/web-components/{status-BtCciELI.mjs → status-BesMKiXg.mjs} +1 -1
- package/dist/web-components/styles-BU6g0i7W.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-bCaBWTkt.mjs +1 -0
- package/dist/web-components/{tip-_XUeFMj4.mjs → tip-UheLXik6.mjs} +1 -1
- package/dist/web-components/{toggle-DkPNS5eL.mjs → toggle-Bl0NKbUx.mjs} +1 -1
- package/dist/web-components/{useContainerName-BfU0IozO.mjs → useContainerName-CDABwGvV.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-pU1JVIpK.mjs → useControlsVisibility-Dpl7D0m0.mjs} +1 -1
- package/dist/web-components/{useNearViewport-D1kQt-tS.mjs → useNearViewport-C_3U4CAr.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-cQfG_zk_.mjs → useScrollTrack-QFtFpyV3.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-UHFS1uDO.mjs → AnnotationItems-FXIoYk9T.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-0Ru0csCz.mjs → AnnotationMenu-nlFTIjg6.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-hEds2Tpa.mjs → AnnotationState-Diacn0Xk.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-vzP6-fS4.mjs → Annotations-Bs94MQmn.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-Oprg7015.mjs → Annotations-CAmFWoUj.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-3b5xEKac.mjs → Canvas2DBackend-BztBm6yM.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DDIjm-rC.mjs → CaptionDetails-lhSoA0rU.mjs} +1 -1
- package/dist/web-components/viewer/ChaptersMenu-hOyR7aOL.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-COUDRKGM.mjs → ChoiceMenu-Dq4FBYhi.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-kWUradiW.mjs → Collection-XZzrypzP.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-B2TrgX9-.mjs → Connected-BKk80iCZ.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-FiJKHEv9.mjs → Connected-nHyQM-64.mjs} +1 -1
- package/dist/web-components/viewer/Contents-0FL0Dr2p.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-BRUWyNEi.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-9CrQlxNq.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-BYU6T0Ou.mjs → CountMenu-BxdPpin6.mjs} +1 -1
- package/dist/web-components/viewer/Cue-B75D4FgX.mjs +1 -0
- package/dist/web-components/viewer/{Document-BtN3vmsO.mjs → Document-CN5l-m01.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-CEzVM7HQ.mjs → DomLayers-CvZPZjNg.mjs} +1 -1
- package/dist/web-components/viewer/{Download-5BsnDZLL.mjs → Download-B9UuJ9wY.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-D9R-wouw.mjs → EntryBodies-BNtItsOn.mjs} +1 -1
- package/dist/web-components/viewer/EntryThumbnail-BQepnfmY.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-CsyRt9Xh.mjs → FieldPill-D0efaqWg.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-f4RKtdpP.mjs → FrameAnimation-C5bLeZc9.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-DC4QY9lG.mjs → Gallery-BuhT4BOj.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-BwZm2Ffj.mjs → GlobeGlyph-B1Q5TIaT.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-BD6zlrz3.mjs → HideToggle-Dh4AUuX3.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-Bw9a17cS.mjs → ImageControls-ClVI428k.mjs} +1 -1
- package/dist/web-components/viewer/{ItemsVertical-BftsRVJP.mjs → ItemsVertical-BRiKuRL-.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-CcDmpHnE.mjs → LanguageChoice-BTUONm8l.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-CRtM-mLy.mjs → LanguageMenu-NDTTmazt.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-DJoH23fL.mjs → LightboxView-DMTkdJB6.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-CSp0KGGZ.mjs → ListEnd-D2sYRngp.mjs} +1 -1
- package/dist/web-components/viewer/MapView-WwJmyeZr.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-D-1SNnW2.mjs → MediaBody-CepsC09h.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CMddJWMF.mjs → MediaBody-qOIVDdNm.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-BJ_MF_t1.mjs → NavDate-Co0A4bkP.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-Gt56cM6f.mjs → Navigator-Dyf2F7fU.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-BMrlMLfO.mjs → PagerLayout-nnWJump4.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-D479R8OK.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BdZWbAQI.mjs → PartOfManifest-7z0GBIsk.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-Icavvsim.mjs +1 -0
- package/dist/web-components/viewer/{Placeholder-BX2y25Fo.mjs → Placeholder-DF1FFSpC.mjs} +1 -1
- package/dist/web-components/viewer/{Search-auUpOyeS.mjs → Search-BSK3yFqw.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-Bg0PLdp0.mjs → SeekMarks-267Lxpeb.mjs} +1 -1
- package/dist/web-components/viewer/StandaloneItems-Cv4dGiJh.mjs +1 -0
- package/dist/web-components/viewer/{Steps-ABKs2V_m.mjs → Steps-C1BHjJsE.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-BQVUKMAs.mjs → TargetItems-CBsfkmeg.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-DaShc1z-.mjs → Transcript-BBtNC39n.mjs} +1 -1
- package/dist/web-components/viewer/Transport-BZB1ZAvP.mjs +1 -0
- package/dist/web-components/viewer/{Transport-ClkPaaOB.mjs → Transport-DXFW6beP.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-eyRpE2h4.mjs → annotation-collection-BcDJ7GZv.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-DdchUvJI.mjs → annotation-name-CPXHHlGo.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-BZXlT3bR.mjs → annotations-content-Cb7_aoII.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-CZWHXlyY.mjs → cloverEngine-CX9s9-Uu.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-CDV0Igdx.mjs → content-state-reader-CIVUq8ar.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-CD-MJb-V.mjs → dragToClose-BGb6fAd6.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-C1IEIf45.mjs → fetchManifest-D8zizfoi.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-IQqCbvbJ.mjs → follow-content-BOcIhHhz.mjs} +1 -1
- package/dist/web-components/viewer/{host-BxQrzQnu.mjs → host-CNGrorb7.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DurrQgfL.mjs → image-layers-DGdl54CF.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-ClAm_g0Y.mjs → image-service-content-DpXbrUuI.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-Drdj-HcB.mjs → link-CwQzXqUe.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-DtyovrNi.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-a5eVBfJy.mjs → range-regions-iACwlawo.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-CdXzZ9As.mjs → renderers-DUD0Xleg.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-B2UBQRXz.mjs → save-file-Z6klARC7.mjs} +1 -1
- package/dist/web-components/viewer/{search-BBZKUiMB.mjs → search-TNACVRnK.mjs} +1 -1
- package/dist/web-components/viewer/styles-CLp9tx_B.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-BfTACzo_.mjs → useControlsVisibility-C-Af-o1n.mjs} +1 -1
- package/dist/web-components/viewer/viewer-7dcL5wmD.mjs +29 -0
- package/dist/web-components/viewer/{vtt-CCkTp_f2.mjs → vtt-DLGuRf3w.mjs} +1 -1
- package/dist/web-components/{viewer-D-AQ7mGw.mjs → viewer-Br37L21l.mjs} +1 -1
- package/dist/web-components/{vtt-BjXkNfI_.mjs → vtt-DnFNzhne.mjs} +1 -1
- package/dist/web-components/{zh-Hans-BhTHTZXT.mjs → zh-Hans-BAFQ7Pft.mjs} +1 -1
- package/dist/web-components/{zh-Hant-_CJAOTzC.mjs → zh-Hant-DS7iN4iO.mjs} +1 -1
- package/package.json +3 -1
- package/dist/web-components/About-Brbhm22a.mjs +0 -1
- package/dist/web-components/AnnotationItems-Dy4BNabL.mjs +0 -1
- package/dist/web-components/CanvasView-CiP25Iqc.mjs +0 -2
- package/dist/web-components/ChaptersMenu-Bne6N9cf.mjs +0 -1
- package/dist/web-components/CollectionSelect-BpvtCwSl.mjs +0 -1
- package/dist/web-components/Connected-BWomgzfE.mjs +0 -1
- package/dist/web-components/Contents-CGc6_Z5c.mjs +0 -1
- package/dist/web-components/ControlMenu-ej-Kpb31.mjs +0 -1
- package/dist/web-components/ControlsFade-CStkqANR.mjs +0 -1
- package/dist/web-components/Cue-BhXRUDe9.mjs +0 -1
- package/dist/web-components/EntryThumbnail-BnMLzy5M.mjs +0 -1
- package/dist/web-components/FrameAnimation-BcEfAQrI.mjs +0 -1
- package/dist/web-components/Items-DCRr750U.mjs +0 -1
- package/dist/web-components/Label-CVfL9bMO.mjs +0 -1
- package/dist/web-components/Loaded-CSYg8oIR.mjs +0 -1
- package/dist/web-components/LoadedCanvas-W9sCFkdf.mjs +0 -1
- package/dist/web-components/LoadedMap-jx7uEeDg.mjs +0 -1
- package/dist/web-components/MapView-DO23FSrT.mjs +0 -3
- package/dist/web-components/PagerLayout-SNT5cl4D.mjs +0 -1
- package/dist/web-components/PanelPart-DfjlK_hB.mjs +0 -1
- package/dist/web-components/PartOfManifest-BYyflVQI.mjs +0 -1
- package/dist/web-components/PlaceBox-D-pLIX5w.mjs +0 -1
- package/dist/web-components/Placeholder-Mq1Iaasr.mjs +0 -1
- package/dist/web-components/Position-Bh1Iq4d6.mjs +0 -1
- package/dist/web-components/Scene-CdqC1O-B.mjs +0 -1
- package/dist/web-components/StandaloneItems-CtxMB090.mjs +0 -1
- package/dist/web-components/Timeline-D5oL1UyW.mjs +0 -1
- package/dist/web-components/Tip-Dv-gYN8n.mjs +0 -1
- package/dist/web-components/Transport-BKFLjI45.mjs +0 -1
- package/dist/web-components/canvas-CfnKZqTU.mjs +0 -1
- package/dist/web-components/image-layers-CFarmTfZ.mjs +0 -1
- package/dist/web-components/index-DhlRi3H9.mjs +0 -1
- package/dist/web-components/items-BXd02UN6.mjs +0 -1
- package/dist/web-components/label-DcF-YCIN.mjs +0 -1
- package/dist/web-components/logo-DWI0N9FL.mjs +0 -1
- package/dist/web-components/part-B9t8Qe9D.mjs +0 -1
- package/dist/web-components/shared-D2pvbPvF.mjs +0 -1
- package/dist/web-components/styles-Bf3qmdsh.mjs +0 -1
- package/dist/web-components/thumbnail-By5wfGlE.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-DmJy-cfd.mjs +0 -1
- package/dist/web-components/viewer/Contents-DHyzbjco.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DWi6tgKb.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-CuooJOpa.mjs +0 -1
- package/dist/web-components/viewer/Cue-Ct2isFl7.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-P6CmjmO9.mjs +0 -1
- package/dist/web-components/viewer/MapView-BO2ppZpW.mjs +0 -3
- package/dist/web-components/viewer/PanelPart-CaxBca8z.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-C27N2KG8.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-CBRWUCNf.mjs +0 -1
- package/dist/web-components/viewer/Transport-6wRUIGiD.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CDT5ohRo.mjs +0 -1
- package/dist/web-components/viewer/styles-XRfyRUPf.mjs +0 -1
- package/dist/web-components/viewer/viewer-BrkFZVo_.mjs +0 -29
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var yu=Object.defineProperty;var bu=(t,e,n)=>e in t?yu(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var L=(t,e,n)=>bu(t,typeof e!="symbol"?e+"":e,n);import{s as Va}from"./styles-XRfyRUPf.mjs";function _u(t={}){return Promise.resolve().then(()=>Ed).then(e=>e.initCloverI18n(t))}const qa="@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 wu=null,kn=null;const xu=()=>wu??(wu=import("./host-BxQrzQnu.mjs").then(t=>kn=t)),Su=t=>t.trim().toLowerCase()==="false";function ku(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Su(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 Cu=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function Eu(t){class e extends HTMLElement{constructor(){super(...arguments);L(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){Va(this.ownerDocument).inject("elements",qa)}}customElements.define(t.tag,e)}function Mu(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return Eu(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),xu()]));class c extends HTMLElement{constructor(){super(...arguments);L(this,"kind",n);L(this,"needsRoot",!!t.needsRoot);L(this,"values",{});L(this,"kept",{});L(this,"props",{});L(this,"listeners",new Set);L(this,"warned",new Set);L(this,"handlers",Object.fromEntries(r.map(([u,m])=>[m.prop,(...h)=>{var y;if(m.keeps&&(this.kept[m.keeps]=h[0]??null,h[0]==null))return true;const p=m.detail==="first"?h[0]:Object.fromEntries(m.detail.map((k,x)=>[k,h[x]])),g=new CustomEvent(u,{detail:p,bubbles:!m.keeps,composed:!m.keeps,cancelable:!!m.cancelable}),v=this.dispatchEvent(g);if(!v&&m.cancelable){const k=h[h.length-1];(y=k==null?void 0:k.preventDefault)==null||y.call(k)}return v}])));L(this,"getProps",()=>this.props);L(this,"subscribe",u=>(this.listeners.add(u),()=>{this.listeners.delete(u)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const u of o){if(!Object.prototype.hasOwnProperty.call(this,u))continue;const m=this[u];delete this[u],m!=null&&(this.values[u]=m)}this.update(),this.warnOfAria(),Va(this.ownerDocument).inject("elements",qa),a().then(()=>{this.isConnected&&kn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||kn==null||kn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const u of["aria-label","aria-labelledby","role"])!this.hasAttribute(u)||this.warned.has(u)||(this.warned.add(u),console.warn(`<${t.tag}>: ${u} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const u={...this.handlers,...this.values};for(const[m,h]of Object.entries(t.attributes)){if(h.prop in this.values)continue;const p=this.getAttribute(m),g=ku(p,h,v=>{const y=`${m}=${p}`;this.warned.has(y)||(this.warned.add(y),console.warn(`<${t.tag}>: ${m}="${p}" ${v}; ignored.`))});g!==void 0&&(u[h.prop]=g)}Cu(u,this.props)||(this.props=u,this.listeners.forEach(m=>m()))}}L(c,"initCloverI18n",_u);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(d){d==null?delete this.values[l]:this.values[l]=d,this.update()}});for(const[,l]of r){if(!l.keeps)continue;const d=l.keeps;Object.defineProperty(c.prototype,d,{configurable:true,enumerable:true,get(){return this.kept[d]??null}})}customElements.define(t.tag,c)}var Nn,it,Ka,He,di,Za,Ga,Xa,Qr,kr,Cr,Ya,In={},Ja=[],Tu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Rn=Array.isArray;function ue(t,e){for(var n in e)t[n]=e[n];return t}function ts(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Ee(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?Nn.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 Mn(t,i,o,r,null)}function Mn(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??++Ka,__i:-1,__u:0};return r==null&&it.vnode!=null&&it.vnode(s),s}function Iu(){return{current:null}}function Mt(t){return t.children}function de(t,e){this.props=t,this.context=e}function un(t,e){if(e==null)return t.__?un(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"?un(t):null}function Qa(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 Qa(t)}}function Er(t){(!t.__d&&(t.__d=true)&&He.push(t)&&!ho.__r++||di!=it.debounceRendering)&&((di=it.debounceRendering)||Za)(ho)}function ho(){for(var t,e,n,o,r,s,i,a=1;He.length;)He.length>a&&He.sort(Ga),t=He.shift(),a=He.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=ue({},o)).__v=o.__v+1,it.vnode&&it.vnode(n),es(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??un(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,nc(s,n,i),o.__e=o.__=null,n.__e!=r&&Qa(n)));ho.__r=0}function tc(t,e,n,o,r,s,i,a,c,l,d){var u,m,h,p,g,v,y,k=o&&o.__k||Ja,x=e.length;for(c=Lu(n,e,k,c,x),u=0;u<x;u++)(h=n.__k[u])!=null&&(m=h.__i==-1?In:k[h.__i]||In,h.__i=u,v=es(t,h,m,r,s,i,a,c,l,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&ns(m.ref,null,h),d.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),(y=!!(4&h.__u))||m.__k===h.__k?c=ec(h,c,t,y):typeof h.type=="function"&&v!==void 0?c=v:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function Lu(t,e,n,o,r){var s,i,a,c,l,d=n.length,u=d,m=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+m,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Mn(null,i,null,null,null):Rn(i)?Mn(Mt,{children:i},null,null,null):i.constructor==null&&i.__b>0?Mn(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=Pu(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?m--:r<d&&m++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?m--:l==c+1?m++:(l>c?m--:m++,i.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<d;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=un(a)),rc(a,a));return o}function ec(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=ec(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=un(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Ce(t,e){return e=e||[],t==null||typeof t=="boolean"||(Rn(t)?t.some(function(n){Ce(n,e)}):e.push(t)),e}function Pu(t,e,n,o){var r,s,i,a=t.key,c=t.type,l=e[n],d=l!=null&&(2&l.__u)==0;if(l===null&&t.key==null||d&&a==l.key&&c==l.type)return n;if(o>(d?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 fi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Tu.test(e)?n:n+"px"}function so(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||fi(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||fi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Xa,"$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=Qr,t.addEventListener(e,s?Cr:kr,s)):t.removeEventListener(e,s?Cr:kr,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 hi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Qr++;else if(e.t<n.u)return;return n(it.event?it.event(e):e)}}}function es(t,e,n,o,r,s,i,a,c,l){var d,u,m,h,p,g,v,y,k,x,b,M,_,N,P,Z,G,j=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(d=it.__b)&&d(e);t:if(typeof j=="function")try{if(y=e.props,k="prototype"in j&&j.prototype.render,x=(d=j.contextType)&&o[d.__c],b=d?x?x.props.value:d.__:o,n.__c?v=(u=e.__c=n.__c).__=u.__E:(k?e.__c=u=new j(y,b):(e.__c=u=new de(y,b),u.constructor=j,u.render=Ou),x&&x.sub(u),u.props=y,u.state||(u.state={}),u.context=b,u.__n=o,m=u.__d=true,u.__h=[],u._sb=[]),k&&u.__s==null&&(u.__s=u.state),k&&j.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ue({},u.__s)),ue(u.__s,j.getDerivedStateFromProps(y,u.__s))),h=u.props,p=u.state,u.__v=e,m)k&&j.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),k&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k&&j.getDerivedStateFromProps==null&&y!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,b),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,b)===false||e.__v==n.__v){for(e.__v!=n.__v&&(u.props=y,u.state=u.__s,u.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Q){Q&&(Q.__=e)}),M=0;M<u._sb.length;M++)u.__h.push(u._sb[M]);u._sb=[],u.__h.length&&i.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,b),k&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,g)})}if(u.context=b,u.props=y,u.__P=t,u.__e=false,_=it.__r,N=0,k){for(u.state=u.__s,u.__d=false,_&&_(e),d=u.render(u.props,u.state,u.context),P=0;P<u._sb.length;P++)u.__h.push(u._sb[P]);u._sb=[]}else do u.__d=false,_&&_(e),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++N<25);u.state=u.__s,u.getChildContext!=null&&(o=ue(ue({},o),u.getChildContext())),k&&!m&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(h,p)),Z=d,d!=null&&d.type===Mt&&d.key==null&&(Z=oc(d.props.children)),a=tc(t,Rn(Z)?Z:[Z],e,n,o,r,s,i,a,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&i.push(u),v&&(u.__E=u.__=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(G=s.length;G--;)ts(s[G]);Mr(e)}else e.__e=n.__e,e.__k=n.__k,Q.then||Mr(e);it.__e(Q,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Au(n.__e,e,n,o,r,s,i,c,l);return(d=it.diffed)&&d(e),128&e.__u?void 0:a}function Mr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(Mr)}function nc(t,e,n){for(var o=0;o<n.length;o++)ns(n[o],n[++o],n[++o]);it.__c&&it.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){it.__e(s,r.__v)}})}function oc(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Rn(t)?t.map(oc):ue({},t)}function Au(t,e,n,o,r,s,i,a,c){var l,d,u,m,h,p,g,v=n.props,y=e.props,k=e.type;if(k=="svg"?r="http://www.w3.org/2000/svg":k=="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==!!k&&(k?h.localName==k:h.nodeType==3)){t=h,s[l]=null;break}}if(t==null){if(k==null)return document.createTextNode(y);t=document.createElementNS(r,k,y.is&&y),a&&(it.__m&&it.__m(e,s),a=false),s=null}if(k==null)v===y||a&&t.data==y||(t.data=y);else{if(s=s&&Nn.call(t.childNodes),v=n.props||In,!a&&s!=null)for(v={},l=0;l<t.attributes.length;l++)v[(h=t.attributes[l]).name]=h.value;for(l in v)if(h=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=h;else if(!(l in y)){if(l=="value"&&"defaultValue"in y||l=="checked"&&"defaultChecked"in y)continue;so(t,l,null,h,r)}}for(l in y)h=y[l],l=="children"?m=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?p=h:l=="checked"?g=h:a&&typeof h!="function"||v[l]===h||so(t,l,h,v[l],r);if(d)a||u&&(d.__html==u.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(u&&(t.innerHTML=""),tc(e.type=="template"?t.content:t,Rn(m)?m:[m],e,n,o,k=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&un(n,0),a,c),s!=null)for(l=s.length;l--;)ts(s[l]);a||(l="value",k=="progress"&&p==null?t.removeAttribute("value"):p!=null&&(p!==t[l]||k=="progress"&&!p||k=="option"&&p!=v[l])&&so(t,l,p,v[l],r),l="checked",g!=null&&g!=t[l]&&so(t,l,g,v[l],r))}return t}function ns(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){it.__e(r,n)}}function rc(t,e,n){var o,r;if(it.unmount&&it.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||ns(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){it.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&rc(o[r],e,n||typeof t.type!="function");n||ts(t.__e),t.__c=t.__=t.__e=void 0}function Ou(t,e,n){return this.constructor(t,n)}function Ln(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),it.__&&it.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],es(e,t=(!o&&n||e).__k=Ee(Mt,null,[t]),r||In,In,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?Nn.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),nc(s,t,i)}function sc(t,e){Ln(t,e,sc)}function Nu(t,e,n){var o,r,s,i,a=ue({},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?Nn.call(arguments,2):n),Mn(t.type,a,o||t.key,r||t.ref,null)}function me(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,Er(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"+Ya++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}Nn=Ja.slice,it={__e:function(t,e,n,o){for(var r,s,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),i=r.__d),i)return r.__E=r}catch(a){t=a}throw t}},Ka=0,de.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ue({},this.state),typeof t=="function"&&(t=t(ue({},n),this.props)),t&&ue(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Er(this))},de.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),Er(this))},de.prototype.render=Mt,He=[],Za=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ga=function(t,e){return t.__v.__b-e.__v.__b},ho.__r=0,Xa=/(PointerCapture)$|Capture$/i,Qr=0,kr=hi(false),Cr=hi(true),Ya=0;var Ru=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:--Ru,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return it.vnode&&it.vnode(l),l}var Ne,Et,er,pi,dn=0,ic=[],It=it,mi=It.__b,gi=It.__r,vi=It.diffed,yi=It.__c,bi=It.unmount,_i=It.__;function pn(t,e){It.__h&&It.__h(Et,t,dn||e),dn=0;var n=Et.__H||(Et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function D(t){return dn=1,os(lc,t)}function os(t,e,n){var o=pn(Ne++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):lc(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=Et,!Et.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};Et.__f=true;var s=Et.shouldComponentUpdate,i=Et.componentWillUpdate;Et.componentWillUpdate=function(a,c,l){if(this.__e){var d=s;s=void 0,r(a,c,l),s=d}i&&i.call(this,a,c,l)},Et.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=pn(Ne++,3);!It.__s&&ss(n.__H,e)&&(n.__=t,n.u=e,Et.__H.__h.push(n))}function Ut(t,e){var n=pn(Ne++,4);!It.__s&&ss(n.__H,e)&&(n.__=t,n.u=e,Et.__h.push(n))}function $(t){return dn=5,yt(function(){return{current:t}},[])}function ac(t,e,n){dn=6,Ut(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 yt(t,e){var n=pn(Ne++,7);return ss(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ut(t,e){return dn=8,yt(function(){return t},e)}function Vt(t){var e=Et.context[t.__c],n=pn(Ne++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(Et)),e.props.value):t.__}function cc(t,e){It.useDebugValue&&It.useDebugValue(e?e(t):t)}function rs(){var t=pn(Ne++,11);if(!t.__){for(var e=Et.__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 Bu(){for(var t;t=ic.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lo),t.__H.__h.forEach(Tr),t.__H.__h=[]}catch(e){t.__H.__h=[],It.__e(e,t.__v)}}It.__b=function(t){Et=null,mi&&mi(t)},It.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),_i&&_i(t,e)},It.__r=function(t){gi&&gi(t),Ne=0;var e=(Et=t.__c).__H;e&&(er===Et?(e.__h=[],Et.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(lo),e.__h.forEach(Tr),e.__h=[],Ne=0)),er=Et},It.diffed=function(t){vi&&vi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ic.push(e)!==1&&pi===It.requestAnimationFrame||((pi=It.requestAnimationFrame)||$u)(Bu)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),er=Et=null},It.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lo),n.__h=n.__h.filter(function(o){return!o.__||Tr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],It.__e(o,n.__v)}}),yi&&yi(t,e)},It.unmount=function(t){bi&&bi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{lo(o)}catch(r){e=r}}),n.__H=void 0,e&&It.__e(e,n.__v))};var wi=typeof requestAnimationFrame=="function";function $u(t){var e,n=function(){clearTimeout(o),wi&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);wi&&(e=requestAnimationFrame(n))}function lo(t){var e=Et,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Et=e}function Tr(t){var e=Et;t.__c=t.__(),Et=e}function ss(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function lc(t,e){return typeof e=="function"?e(t):e}function uc(t,e){for(var n in e)t[n]=e[n];return t}function Ir(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 ne(t,e){var n=e(),o=D({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Ut(function(){r.__=n,r.u=e,nr(r)&&s({t:r})},[t,n,e]),F(function(){return nr(r)&&s({t:r}),t(function(){nr(r)&&s({t:r})})},[t]),n}function nr(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 dc(t){t()}function fc(t){return t}function hc(){return[false,dc]}var pc=Ut;function Lr(t,e){this.props=t,this.context=e}function Fu(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:Ir(this.props,r)}function o(r){return this.shouldComponentUpdate=n,Ee(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(Lr.prototype=new de).isPureReactComponent=true,Lr.prototype.shouldComponentUpdate=function(t,e){return Ir(this.props,t)||Ir(this.state,e)};var xi=it.__b;it.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),xi&&xi(t)};var Du=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ce(t){function e(n){var o=uc({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=Du,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Si=function(t,e){return t==null?null:Ce(Ce(t).map(e))},zu={map:Si,forEach:Si,count:function(t){return t?Ce(t).length:0},only:function(t){var e=Ce(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Ce},Hu=it.__e;it.__e=function(t,e,n,o){if(t.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}Hu(t,e,n,o)};var ki=it.unmount;function mc(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=uc({},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 mc(o,e,n)})),t}function gc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return gc(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 kt(){this.__u=0,this.o=null,this.__b=null}function vc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function bt(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 Ee(n,s)}return r.displayName="Lazy",r.__f=true,r}function Cn(){this.i=null,this.l=null}it.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ki&&ki(t)},(kt.prototype=new de).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=vc(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]=gc(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)},kt.prototype.componentWillUnmount=function(){this.o=[]},kt.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]=mc(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&Ee(Mt,null,t.fallback);return r&&(r.__u&=-33),[Ee(Mt,null,e.__a?null:t.children),r]};var Ci=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 Wu(t){return this.getChildContext=function(){return t.context},t.children}function Uu(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Ln(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)}}}Ln(Ee(Wu,{context:e.context},t.__v),e.v)}function ju(t,e){var n=Ee(Uu,{__v:t,h:e});return n.containerInfo=e,n}(Cn.prototype=new de).__a=function(t){var e=this,n=vc(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),Ci(e,t,o)):r()};n?n(s):s()}},Cn.prototype.render=function(t){this.i=null,this.l=new Map;var e=Ce(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},Cn.prototype.componentDidUpdate=Cn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ci(t,n,e)})};var yc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Vu=/^(?: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]/,qu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ku=/[A-Z0-9]/g,Zu=typeof document<"u",Gu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Xu(t,e,n){return e.__k==null&&(e.textContent=""),Ln(t,e),typeof n=="function"&&n(),t?t.__c:null}function Yu(t,e,n){return sc(t,e),typeof n=="function"&&n(),t?t.__c:null}de.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(de.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var Ei=it.event;function Ju(){}function Qu(){return this.cancelBubble}function td(){return this.defaultPrevented}it.event=function(t){return Ei&&(t=Ei(t)),t.persist=Ju,t.isPropagationStopped=Qu,t.isDefaultPrevented=td,t.nativeEvent=t};var is,ed={enumerable:false,configurable:true,get:function(){return this.class}},Mi=it.vnode;it.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,o=e.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||Zu&&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"||Gu(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":qu.test(i)&&(i=c):c=i="oninput":s&&Vu.test(i)?i=i.replace(Ku,"-$&").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=Ce(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=Ce(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",ed)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=yc,Mi&&Mi(t)};var Ti=it.__r;it.__r=function(t){Ti&&Ti(t),is=t.__c};var Ii=it.diffed;it.diffed=function(t){Ii&&Ii(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),is=null};var nd={ReactCurrentDispatcher:{current:{readContext:function(t){return is.__n[t.__c].props.value},useCallback:ut,useContext:Vt,useDebugValue:cc,useDeferredValue:fc,useEffect:F,useId:rs,useImperativeHandle:ac,useInsertionEffect:pc,useLayoutEffect:Ut,useMemo:yt,useReducer:os,useRef:$,useState:D,useSyncExternalStore:ne,useTransition:hc}}};function od(t){return Ee.bind(null,t)}function Co(t){return!!t&&t.$$typeof===yc}function rd(t){return Co(t)&&t.type===Mt}function sd(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function id(t){return Co(t)?Nu.apply(null,arguments):t}function ad(t){return!!t.__k&&(Ln(null,t),true)}function cd(t){return t&&(t.base||t.nodeType===1&&t)||null}var ld=function(t,e){return t(e)},ud=function(t,e){return t(e)},dd=Mt,fd=Co,fe={useState:D,useId:rs,useReducer:os,useEffect:F,useLayoutEffect:Ut,useInsertionEffect:pc,useTransition:hc,useDeferredValue:fc,useSyncExternalStore:ne,startTransition:dc,useRef:$,useImperativeHandle:ac,useMemo:yt,useCallback:ut,useContext:Vt,useDebugValue:cc,version:"18.3.1",Children:zu,render:Xu,hydrate:Yu,unmountComponentAtNode:ad,createPortal:ju,createElement:Ee,createContext:me,createFactory:od,cloneElement:id,createRef:Iu,Fragment:Mt,isValidElement:Co,isElement:fd,isFragment:rd,isMemo:sd,findDOMNode:cd,Component:de,PureComponent:Lr,memo:Fu,forwardRef:ce,flushSync:ud,unstable_batchedUpdates:ld,StrictMode:dd,Suspense:kt,SuspenseList:Cn,lazy:bt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:nd};function as(t){const e=ne(pd,md);return!!t||e}const cs=t=>t?{"data-high-contrast":""}:{},hd="(prefers-contrast: more)",bc=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(hd):null;function pd(t){var n;const e=bc();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 md=()=>{var t;return!!((t=bc())!=null&&t.matches)},Bn=me(void 0),Pt=(...t)=>t.filter(Boolean).join(" "),Eo=me(null);function Be(){return Vt(Eo)}function le(t="This part"){const e=Vt(Eo);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function ot(t,e=Object.is,n){const{clover:o}=le(n),r=$(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return ne(o.store.subscribe,s)}const gd={subscribe:()=>()=>{}};function $n(t,e){const n=Vt(Eo),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return ne(o?o.subscribe:gd.subscribe,r)}const vd=JSON.parse('{"commonClose":"Close","commonNext":"Next","commonPrevious":"Previous","commonSearch":"Search","commonViewAll":"View all","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Loading...","contentSearchPlaceholder":"Search","contentSearchResultsNone":"No results","contentSearchResult":"1 result","contentSearchResults":"{{count}} results","contentSearchError":"The search could not be completed.","contentSearchPosition":"Result {{index}} of {{total}}","contentSearchClear":"Clear search","canvasPosition":"Item {{index}} of {{total}}","canvasImage":"Image","bodyUnloadableImage":"This image could not be loaded.","bodyUnloadableVideo":"This video could not be loaded.","bodyUnloadableAudio":"This audio could not be loaded.","bodyUnloadableModel":"This model could not be loaded.","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","templateBack":"Back","templateBackTo":"Back to {{label}}","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","aboutDate":"Date","aboutHomepage":"Homepage","aboutSeeAlso":"See also","aboutProvider":"Provider","logo":"Logo","aboutManifest":"IIIF Manifest","aboutCanvas":"IIIF Canvas","aboutPartOf":"Part of","aboutOpenManifest":"Open the full Manifest","aboutCollection":"IIIF Collection","readingLanguage":"Language","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","canvasViewerControls":"Viewer controls","canvasExpandControls":"Expand viewer controls","canvasCollapseControls":"Collapse viewer controls","canvasScrollBack":"Show previous controls","canvasScrollForward":"Show more controls","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","contentsSectionsIn":"Sections in","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","playerFill":"Fill frame","playerFit":"Fit to frame","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),_c={es:()=>import("../es-Bx-zZBfZ.mjs"),fi:()=>import("../fi-DsP1FhBy.mjs"),fr:()=>import("../fr-BuL_F9Jq.mjs"),it:()=>import("../it-DH3EtrgI.mjs"),ja:()=>import("../ja-BEHbDotv.mjs"),nb:()=>import("../nb-Bdfn_mZs.mjs"),nn:()=>import("../nn-BCWbSuK0.mjs"),no:()=>import("../no-Bdfn_mZs.mjs"),pt:()=>import("../pt-Da5El49z.mjs"),"zh-Hans":()=>import("../zh-Hans-BhTHTZXT.mjs"),"zh-Hant":()=>import("../zh-Hant-_CJAOTzC.mjs")};function ls(){return typeof navigator>"u"?[]:[...navigator.languages??[],navigator.language].filter(Boolean)}function wc(){if(!(typeof document>"u"))return document.documentElement.lang||void 0}let xc=()=>[];function yd(t){xc=t}function bd(){const[t,...e]=xc();return[...new Set([t,...ls(),...e,wc()].filter(n=>!!n))]}const po=t=>t.split("-")[0];function us(t,e){return po(t).toLowerCase()===po(e).toLowerCase()}function Pr(t){try{const{language:e,script:n}=new Intl.Locale(t).maximize();return n&&`${e}-${n}`}catch{return}}function _d(t,e){const n=Pr(t);if(n)return e.find(o=>o!=="none"&&o!=="@none"&&Pr(o)===n)}const or=t=>t.includes("-")?po(t):null;function wd(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=or(t);if(r&&e.includes(r))return r;const s=_d(t,e);if(s)return s;const i=n.find(c=>e.includes(c));if(i)return i;const a=e.findIndex(c=>or(c)===t);if(a!==-1)return e[a];for(const c of n){const l=or(c);if(l&&e.includes(l))return l}return o()}function ds(t,e){const[n,...o]=e?[e]:bd();return wd(n,t,o)??t[0]}function Sc(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=ds(t,e);return o==="none"?t[0]:o}const xe="clover",te={en:{[xe]:{...vd}}};let En=[],Qt,mo=[],kc=[],fs=0;const Ar=new Set;function hs(){fs++,Ar.forEach(t=>t())}function Cc(t){return[t,Pr(t),po(t)].filter(e=>!!e)}const xd=t=>t==="en"||Ec(t)||!!te[t],Re=t=>Cc(t).find(xd),Li=new Map,Ec=t=>Object.prototype.hasOwnProperty.call(_c,t);function Sd(t){let e=Li.get(t);return e||(e=_c[t]().then(({default:n})=>{var o;te[t]={...te[t],[xe]:{...n,...(o=te[t])==null?void 0:o[xe]}},hs()},()=>{}),Li.set(t,e)),e}function Or(t){const e=t.find(n=>n==="en"||Ec(n));return e&&e!=="en"?Sd(e):Promise.resolve()}let io=[],Pi="",Pn="en";function Mo(){const t=wc();return[...new Set([...En,...t?[t]:[]])]}function Oe(){const t=`${fs} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===Pi)return io;Pi=t;const e=Mo();return Pn=ls().map(Re).find(Boolean)??e.map(Re).find(Boolean)??"en",io=[...new Set([Qt??Pn,...kc,...e].filter(o=>!!o).flatMap(Cc).concat("en"))],Or(io),io}function kd(){return Oe(),[...new Set([Pn,...Mo().map(Re),...mo.map(Re)].filter(t=>!!t))]}yd(()=>(Oe(),[Qt,Pn,...Mo()]));function To(t,e){if(t)return us(t,e||Lt.resolvedLanguage)?void 0:t}const Lt={get language(){return Qt??Oe().find(t=>te[t])??"en"},get chosenLanguage(){return Qt},stringsFor(t){return Re(t)},interfaceLanguages(){return{languages:kd(),chosen:Qt&&Re(Qt)||Pn}},chooseInterfaceLanguage(t){return Qt=t||void 0,mo=Qt?[...new Set([...mo,Qt])]:[],hs(),Or(Oe())},get resolvedLanguage(){return Oe().find(t=>{var e;return Object.keys(((e=te[t])==null?void 0:e[xe])??{}).length>0})??"en"},changeLanguage(t){return Lt.chooseInterfaceLanguage(t)},resolve(t,e,n=xe){var r,s;let o={text:t};for(const i of Oe()){const a=(s=(r=te[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=xe){return Lt.resolve(t,e,n).text},langOf(t,e,n=xe){return To(Lt.resolve(t,void 0,n).lang,e)},ready(){return Or(Oe())},subscribe(t){return Ar.add(t),()=>{Ar.delete(t)}},getSnapshot(){return fs}};typeof document<"u"&&Oe();function Cd(t={}){for(const[n,o]of Object.entries(t.resources??{}))for(const[r,s]of Object.entries(o??{}))te[n]??(te[n]={}),te[n][r]={...te[n][r],...s};t.fallbackLng!==void 0&&(kc=t.fallbackLng===false?[]:[t.fallbackLng].flat());const e=En.join();if(t.languages!==void 0?En=[t.languages].flat().filter(Boolean):t.lng&&(En=[t.lng]),En.join()!==e){mo=[];const n=[...ls(),...Mo()].map(Re);Qt&&!n.includes(Re(Qt))&&(Qt=void 0)}return hs(),Lt}const Ed=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:xe,cloverI18n:Lt,initCloverI18n:Cd,langWithin:To},Symbol.toStringTag,{value:"Module"}));function Tt(t=xe,e){const n=ne(Lt.subscribe,Lt.getSnapshot,Lt.getSnapshot),o=Vt(Bn),r=e??o,s=ut((a,c)=>Lt.t(a,c,t),[t,n]),i=ut(a=>Lt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Lt}}function Io(t,e){const n=Vt(Bn),o=$(null),[r,s]=D(""),i=ut(d=>{o.current=d,typeof t=="function"?t(d):t&&(t.current=d)},[t]);F(()=>{var u,m;const d=(u=o.current)==null?void 0:u.parentElement;e!==void 0||n!==void 0||!d||s(((m=d.closest("[lang]"))==null?void 0:m.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Tt(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const W=t=>Array.isArray(t)?t:t==null?[]:[t],Md=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function ps(t){return Md.includes(t)?t:"left-to-right"}const Td=["individuals","paged","continuous","unordered"];function Id(t){return W(t).find(n=>Td.includes(n))??"individuals"}function Ld(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=W(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 Pd(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const Mc=["Independents","Composite","List"];function Lo(t){return W(t==null?void 0:t.body).flatMap(e=>Mc.includes(e==null?void 0:e.type)?W(e.items):[e])}function ms(t){const e=W(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function Tc(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 ao(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return Tc(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 Nr=t=>{var e;return Array.isArray(t)?Nr(t[0]):Mc.includes(t==null?void 0:t.type)?Nr((e=t.items)==null?void 0:e[0]):t};function mn(t){return Ad(Nr(t))}function Ad(t){var n;if(typeof t=="string")return ao(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return ao(t.id??"");const e=typeof t.source=="string"?ao(t.source):ao(((n=t.source)==null?void 0:n.id)??"");for(const o of W(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=Tc(e.id,String(r.value));if(s)return s}}return e}const Fn=t=>t==="Audio"||t==="Sound",Od=t=>{const e=W(t);return e.length>0&&e.every(n=>n==="supplementing")},Nd=(t,e)=>Od(t)&&!!(e.rect||e.svg||e.point)&&!e.t,Ai=new WeakMap,Rd={canvases:[],views:[],direction:"left-to-right"};function Rt(t){if(!t)return Rd;let e=Ai.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:Ld(n,Id(t.behavior)),direction:ps(t.viewingDirection)},Ai.set(t,e)}return e}const Oi=new WeakMap;function qe(t,e){if(!e)return null;const n=Rt(t);let o=Oi.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);Oi.set(n,o)}return o.get(e)??null}function gn(t,e){const{canvases:n,views:o}=Rt(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Pd(o,r)}const Ni=new WeakMap,Rr=[];function Ue(t,e){return t?Ic(t,gn(t,e)):Rr}function Bd(t,e){if(!t)return Rr;const n=gn(t,e)+1;return n<Rt(t).views.length?Ic(t,n):Rr}function Ic(t,e){let n=Ni.get(t);n||Ni.set(t,n=new Map);let o=n.get(e);if(!o){const r=Rt(t);o=(r.views[e]??[]).map(s=>r.canvases[s]),n.set(e,o)}return o}function $d(t,e){var s,i;const{canvases:n,views:o}=Rt(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 Fd(t){const e=t==null?void 0:t.start;if(!e)return null;const n=mn(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 De=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},Dd=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function zd(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=Ue(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 xt(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=ds(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const Hd=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function An(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&Hd.test(o));return n.length===1?n[0]:void 0}const je={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Wd=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi|ota|prs|azb|pnb|bal|glk|mzn|lrc|khw|nqo|rhg|jrb|jpr|sam|arz|ary|apc|acm|ajp|aeb|ars)$/,Ud=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function jd(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?Ud.test(o):Wd.test(e))?"rtl":void 0}function dt(t){return t?{lang:t,dir:jd(t)}:{}}function Vd({clover:t,language:e}){const{t:n,langOf:o}=Tt(),[r,s]=D(null),i=$(n);return i.current=n,F(()=>{let a=null;return t.store.subscribe(()=>{const{manifest:c,canvasId:l,status:d}=t.store.get();if(d!=="ready"||l===a)return;const u=a===null;if(a=l,u)return;const m=qe(c,l),h=xt(m==null?void 0:m.label,e),p=i.current("canvasPosition",{index:gn(c,l)+1,total:Rt(c).views.length});s({label:h.text,lang:h.lang,position:p})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:je,children:[r!=null&&r.label?f(Mt,{children:[f("span",{...dt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...dt(o("canvasPosition")),children:r.position})]})}const qd=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function Kd(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||qd(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:W(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 Lo(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of W(r.items))o(i,s)}return e}const gs="content-search",Zd="contents",By=(t,e)=>`${t}#region-${e+1}`,Gd=t=>W(t==null?void 0:t.motivation).includes("linking");function Lc(t,e,n){const o=[];for(const r of W(t==null?void 0:t.items)){const s=W(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Kd(r);if(!i.length&&!Gd(r))continue;const a=mn(W(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 Xd=t=>Rt(t).canvases.some(e=>W(e.items).some(n=>W(n==null?void 0:n.items).some(o=>W(o==null?void 0:o.body).some(r=>[r,...W(r==null?void 0:r.items)].some(s=>W(s==null?void 0:s.annotations).length>0)))));function Yd(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=W(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 Pc=t=>W(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"])))),Ri=new WeakMap;function Ac(t){var n;if(!t)return[];let e=Ri.get(t);if(!e){const o=new Map;for(const r of Rt(t).canvases)for(const s of W(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=Pc(s)[0])==null?void 0:n.id;a={id:i,label:Yd(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Lc(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),Ri.set(t,e)}return e}const Bi=new WeakMap,Oc=[];function $y(t){if(!t)return Oc;let e=Bi.get(t);return e||(e=Rt(t).canvases.flatMap(n=>W(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)}))),Bi.set(t,e)),e}const rr=new WeakMap,sr=new WeakMap;function Nc(t,e=Jd){var n;if(!sr.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;sr.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:Oc,entries:o.flatMap(s=>s.entries)}:null)}return sr.get(e)??Qd(t)}const Jd=[];function Qd(t){var r;if(!t)return null;if(rr.has(t))return rr.get(t);const e=Rt(t).canvases.flatMap(s=>W(s.annotations).flatMap(i=>Pc(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=e[0])==null?void 0:r.part.id,o=n?(()=>{var l,d;const s=e.filter(({part:u})=>u.id===n),i=(l=s.find(({part:u})=>u.label))==null?void 0:l.part.label,a=Number((d=s.find(({part:u})=>u.total))==null?void 0:d.part.total),c=Ac(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:m})=>({id:String(u.id),canvasId:String(m.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var m;return((m=c.find(h=>h.id===u.id))==null?void 0:m.entries)??[]})}})():null;return rr.set(t,o),o}const $i=new WeakMap,Fi=[];function vs(t,e){const n=Ac(t);if(!e.length)return n.length?n:Fi;const o=t??Fi;let r=$i.get(o);r||$i.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 Di=new WeakMap;function Rc(t,e,n,o=null){const r=vs(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=Di.get(r);i||Di.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 tf=t=>Number(t==null?void 0:t.duration)>0;function Bc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>Nd(n.motivation,n.target)&&!tf(e(n.canvasId)))}const zi=new WeakMap;function ef(t,e){const n=vs(t,e);let o=zi.get(n);if(!o){const r=n.filter(s=>!Bc(s,i=>qe(t,i)??void 0));o=r.length===n.length?n:r,zi.set(n,o)}return o}const Hi=new WeakMap;function ys(t,e,n,o){const r=vs(t,e),s=Hi.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)&&Bc(c,l=>qe(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Hi.set(r,{hidden:n,shown:o,ids:a}),a}const Wi=new WeakMap,Ui=[gs,Zd];function nf(t,e,n,o,r){if(!r)return Ui;const s=ys(t,e,n,o),i=Wi.get(s);if(i&&i.hidden===n)return i.ids;const a=[...Ui,...s.filter(c=>!n.includes(c))];return Wi.set(s,{hidden:n,ids:a}),a}function of(t){for(const e of W(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=W(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 ir(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 $c(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Fc({manifestId:t,canvasId:e,type:n="Canvas",region:o,time:r}){const s={id:e,type:n,...t&&t!==e?{partOf:[{id:t,type:"Manifest"}]}:{}},i=r!=null&&r>0?`t=${Math.round(r*100)/100}`:o?`xywh=${[o.x,o.y,o.w,o.h].map(Math.round).join(",")}`:null,a={"@context":`http://iiif.io/api/presentation/${n==="Canvas"?3:4}/context.json`,id:`${e}#content-state`,type:"Annotation",motivation:["contentState"],target:i?{type:"SpecificResource",source:s,selector:{type:"FragmentSelector",value:i}}:s};return{json:a,encoded:$c(a)}}const rf=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:Fc,encodeContentState:$c},Symbol.toStringTag,{value:"Module"})),sf=/iiif\.io\/api\/presentation\/4\/context\.json/;function Dc(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&sf.test(o))}let ji=null,Vi=null;function bs(){return Vi??(Vi=import("../upgrade-eNW0DPXq.mjs")),ji??(ji=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([ji,Vi])}async function Ve(t){if(Dc(t))return t;const[e,{upgrade:n}]=await bs();return await n(t,e)}function _s(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}})}function ws(t){var e;(e=t.body)==null||e.cancel().catch(()=>{})}const af=t=>(t==null?void 0:t.credentials)==="include",cf=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class lf extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function fn(t,e,n){const o=await _s(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw ws(o),new lf(`${e} answered ${o.status}`,e,o.status);return o.json()}const uf=()=>import("./content-state-reader-CDV0Igdx.mjs");function df(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"||e["@type"]==="oa:Annotation"||e.type==="SpecificResource"}const zc=t=>!!t&&typeof t=="object"&&/ImageService[123]|iiif\.io\/api\/image/.test(JSON.stringify(["@context","type","@type","protocol"].map(e=>t[e])));async function ff(t,e,n){try{return await fn(t,e,n)}catch(o){if(n!=null&&n.aborted||/\.json([?#]|$)/i.test(e))throw o;try{const r=await fn(t,`${e.replace(/\/+$/,"")}/info.json`,n);if(zc(r))return r}catch{}throw o}}const hf=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function pf(t){const e={"@context":gf,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of hf)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const qi=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},Hc=t=>{var e,n;return!!t&&((e=t.items)==null?void 0:e.length)===1&&((n=t.items[0])==null?void 0:n.id)===`${t.id}/canvas`},mf=/^(oa:)?Annotation(Page|Collection)$/;class ar extends Error{constructor(){super(...arguments);L(this,"name","CloverContentError")}}const gf="http://iiif.io/api/presentation/4/context.json",vf=t=>/^https?:\/\//i.test(t);async function Br(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await fn(e,t.id,n)}const yf=50;async function xs(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<yf;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 fn(e.request,a.id,e.signal),l=await Ve({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function Wc(t,e={}){return Ve(await Br(t,e))}async function Uc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return Ve(await Br(o,e));if(o.type==="Collection"&&n<8){const r=await xs(await Ve(await Br(o,e)),e),s=await Uc(r,e,n+1);if(s)return s}}return null}async function bf(t,{request:e,signal:n}={}){bs();const o=typeof t=="string"?await fn(e,t.trim(),n):t,r=await Ve(o);return r.type==="Collection"?xs(r,{request:e,signal:n}):r}async function jc(t,e={}){var i;const{request:n,signal:o}=e;bs();let r=t;if(typeof t=="string"&&(r=vf(t.trim())?await ff(n,t.trim(),o):(await uf()).decodeContentState(t),!r))throw new ar("Unreadable iiifContent");if(df(r)&&(e.follows??0)<2){const{follow:a}=await import("./follow-content-IQqCbvbJ.mjs");return a(r,e,jc)}if(mf.test(String((r==null?void 0:r.type)??""))){const{annotationsContent:a}=await import("./annotations-content-BZXlT3bR.mjs");return a(r,e)}if(zc(r)){const{imageServiceContent:a}=await import("./image-service-content-ClAm_g0Y.mjs");return a(r,typeof t=="string"?t.trim():void 0)}const s=await Ve(r);switch((i=o==null?void 0:o.throwIfAborted)==null||i.call(o),s.type){case"Manifest":return{manifest:s};case"Collection":{const a=await xs(s,e),c=e.manifestId,l=c?(a.items??[]).find(u=>u.id===c&&u.type==="Manifest"):void 0,d=l?await Wc(l,e):await Uc(a,e);if(!d)throw new ar("The Collection holds no Manifest");return{manifest:d,collection:a}}case"Canvas":case"Timeline":case"Scene":return{manifest:pf(s),target:{canvasId:s.id}};default:throw new ar(`Cannot show a ${String(s.type??"resource without a type")}`)}}const Vc=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Ki(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])Vc(r)&&e.push([n.id,o,r.id]);return e}async function _f(t,e,n,o){return wf(await fn(n,t,o),e)}async function wf(t,e="urn:clover:annotation-page"){var r;const n=t;return Dc(n)?n:((r=(await Ve({"@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 xf(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 Sf(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||!Vc(c)?c:(r=true,xf(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}const Zi=/\/search\/([0-2])\//;function Ss(t){if(!t)return null;let e=null;for(const n of W(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:Zi.test(s)?Number(Zi.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}function kf(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 nn(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 Cf(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 $r={query:"",status:"idle",hits:[],set:null},Gi={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:$r,regions:null,targets:null,targetIndex:null};function Ef(t={}){const e=kf(Gi),n=nn(null),o=nn(null),r=nn(null),s=nn(null),i=nn(null),a=nn(null);let c=null,l=null,d=[],u=[],m=[],h=0,p=null,g=null,v=null;const y=(w,I)=>{!g||w===I||(g={...g,items:g.items.map(O=>O.manifestId===w&&O.manifestAs!==I?{...O,manifestAs:I}:O)})},k=w=>{var O;const I=(O=e.get().manifest)==null?void 0:O.id;return!!I&&(I===w.manifestId||I===w.manifestAs)},x=()=>d.length||u.length||m.length?[...d,...u,...m]:Gi.addedSets;let b=t.request,M=null;const _=new Set;let N="view",P=0;const Z=(w,I,O)=>{if(_.has(O))return;_.add(O);const B=M==null?void 0:M.signal;_f(O,w,b,B).then(U=>{B!=null&&B.aborted||e.set(H=>H.manifest?{manifest:Sf(H.manifest,w,I,U)}:{})}).catch(()=>_.delete(O))},G=()=>{const{manifest:w,canvasId:I}=e.get();if(w)for(const[O,B,U]of Ki(N==="all"||P>0?Rt(w).canvases:Ue(w,I)))Z(O,B,U)};e.subscribe(G);const j=(w,I,O,B,U)=>{var $t,Ft,Bt;const{canvases:H}=Rt(w),T=vt=>!!vt&&H.some(Ht=>Ht.id===vt),z=Fd(w),K=T(O==null?void 0:O.canvasId)?O:T(z==null?void 0:z.canvasId)?z:null,at=T(B.canvasId)?B.canvasId:(K==null?void 0:K.canvasId)??(T(B.defaultCanvasId)?B.defaultCanvasId:null)??(($t=H[0])==null?void 0:$t.id)??null;l==null||l.abort();const et=U&&((Ft=ir(m,U))==null?void 0:Ft.canvasId)===at?U:null,gt=K&&et?{...K,region:void 0}:K,ft=++h;d=[],e.set({status:"ready",search:$r,regions:null,manifest:w,collection:I,canvasId:at,target:gt&>.canvasId===at?gt:null,addedSets:x(),annotationId:et,targets:g});const zt=w==null?void 0:w.structures;Array.isArray(zt)&&JSON.stringify(zt).includes("xywh=")&&import("./range-regions-a5eVBfJy.mjs").then(({contentsSet:vt})=>{h===ft&&e.set({regions:vt(w)})}),Xd(w)&&import("./image-layers-DurrQgfL.mjs").then(({imageLayers:vt})=>{h===ft&&(d=vt(w),e.set({addedSets:x()}))}),at&&at!==B.canvasId&&((Bt=t.onCanvasChange)==null||Bt.call(t,at))},Q=(w,I)=>e.set(O=>{const B=O.hiddenSets.filter(H=>H!==w),U=O.shownSets.filter(H=>H!==w);return I?{hiddenSets:B,shownSets:[...U,w]}:{hiddenSets:[...B,w],shownSets:U}}),st=(w,I)=>{var B,U,H;if(!w)return;if((B=t.isControlled)!=null&&B.call(t)){I&&e.set({target:I}),(U=t.onCanvasChange)==null||U.call(t,w);return}const O=e.get().canvasId!==w;e.set({canvasId:w,target:I}),O&&((H=t.onCanvasChange)==null||H.call(t,w))},pt=(w,I=false)=>{const{manifest:O}=e.get(),B=$d(O,w);st(B,B&&I?{canvasId:B,autoplay:I}:null)},S=()=>{const{manifest:w,canvasId:I}=e.get();return{at:gn(w,I),total:Rt(w).views.length}},C=()=>{M==null||M.abort();const w=new AbortController;return M=w,_.clear(),e.set({status:"loading",error:null,annotationId:null}),w.signal},A=w=>e.set({status:"error",error:w instanceof Error?w:new Error(String(w))});async function V(w,I={}){var B;const O=C();try{const U=await jc(w,{request:b,signal:O,manifestId:I.manifestId??void 0});if(O.aborted)return;const H=U.annotation,T=H?Lc({items:[H]},`${H.id}#content-state`):[];m=T.length?[{id:`${H.id}#content-state`,source:"added",entries:T}]:U.annotationSets??[];const z=p??((B=T[0])==null?void 0:B.id)??U.pick;p=null,e.set({throughCollection:!!U.collection}),g=U.targets??null,g&&y(g.items[0].manifestId,U.manifest.id),e.set({targetIndex:g?0:null}),j(U.manifest,U.collection??null,U.target,I,z)}catch(U){O.aborted||A(U)}}const q=w=>{const{manifest:I,collection:O}=e.get();return(I==null?void 0:I.id)===w||(O==null?void 0:O.id)===w},rt=w=>{var I;return(((I=e.get().collection)==null?void 0:I.items)??[]).find(O=>O.id===w)??{id:w,type:"Manifest"}},tt=(w,I)=>{var O,B;if(p=I,(O=t.isManifestControlled)!=null&&O.call(t)){(B=t.onManifestChange)==null||B.call(t,w);return}_t({id:w,type:"Manifest"}).then(U=>{var H;return U&&((H=t.onManifestChange)==null?void 0:H.call(t,w))})},_t=async(w,I)=>{if(w.type==="Collection")return await V(w.id),e.get().status==="ready";const{collection:O}=e.get(),B=C(),U=p;p=null;const H=U?ir(m,U):null,T=typeof I=="string"?{canvasId:I}:I??v;v=null;try{const z=await Wc(w,{request:b,signal:B});return B.aborted?false:(y(w.id,z.id),j(z,O,H?{canvasId:H.canvasId}:T??void 0,{},U),true)}catch(z){return B.aborted||A(z),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return b},setRequest(w){b=w},load:V,async openCollection(w){var O;const I=e.get().manifest;if(!(!I||((O=e.get().collection)==null?void 0:O.id)===w))try{const B=await bf(w,{request:b});if(B.type!=="Collection"||e.get().manifest!==I)return;e.set({collection:B})}catch{}},async goToManifest(w,I){var B,U,H;if(q(w))return;const O=rt(w);if(O.type!=="Collection"&&((B=t.isManifestControlled)!=null&&B.call(t))){(U=t.onManifestChange)==null||U.call(t,w);return}await _t(O,I)&&((H=t.onManifestChange)==null||H.call(t,e.get().manifest.id))},goToTarget(w){var B,U,H;const I=(B=e.get().targets)==null?void 0:B.items[w];if(!I)return;e.set({targetIndex:w});const O=I.canvasId?{canvasId:I.canvasId,...I.region&&{region:I.region},...I.time!==void 0&&{time:I.time}}:null;if(k(I)){O&&st(O.canvasId,O);return}if((U=t.isManifestControlled)!=null&&U.call(t)){v=O,(H=t.onManifestChange)==null||H.call(t,I.manifestId);return}_t(rt(I.manifestId),O??void 0).then(T=>{var z;return T&&((z=t.onManifestChange)==null?void 0:z.call(t,I.manifestId))})},async syncManifest(w){!w||q(w)||e.get().status!=="ready"||await _t(rt(w))},goTo(w,I){st(w,I?{...I,canvasId:w}:null)},next({autoplay:w=false,wrap:I=false}={}){const{at:O,total:B}=S();O+1<B?pt(O+1,w):I&&B>1&&pt(0,w)},previous(){const{at:w}=S();w>0&&pt(w-1)},first(){pt(0)},last(){pt(S().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(w){w&&e.set({canvasId:w})},selectAnnotation(w){const{manifest:I,addedSets:O,canvasId:B,search:U,regions:H}=e.get(),T=ir(Rc(I,O,U.set,H),w);if(e.set({annotationId:T?w:null}),!T)return;a.emit(w);const{hiddenSets:z,shownSets:K}=e.get();T.setId!==gs&&ys(I,O,z,K).includes(T.setId)&&Q(T.setId,true);const at=Ue(I,B).some(ft=>ft.id===T.canvasId),et=qe(I,T.canvasId)!==null;!at&&et&&st(T.canvasId,null);const gt=et?void 0:of(T.annotation);gt&&tt(gt,T.id)},async search(w){l==null||l.abort();const I=Ss(e.get().manifest),O=w.trim();if(!O||!I){l=null,e.set({search:$r,annotationId:null});return}const B=new AbortController;l=B,e.set(U=>({search:{...U.search,query:O,status:"loading"}}));try{const{searchInto:U}=await import("./search-BBZKUiMB.mjs");await U(e,I,O,b,B.signal)}catch{e.set({search:{query:O,status:"error",hits:[],set:null}})}},setSetVisible(w,I){Q(w,I)},async loadAnnotations(w){if(c==null||c.abort(),!w){u=[],e.set({addedSets:x()});return}const I=new AbortController;c=I;try{const{loadAnnotationSets:O}=await import("./annotation-collection-eyRpE2h4.mjs"),B=await O(w,{request:b,signal:I.signal});if(I.signal.aborted)return;u=B,e.set({addedSets:x()})}catch{}},getContentState(){var at;const{manifest:w,canvasId:I}=e.get();if(!w||!I)return null;const O=n.get(),B=o.get(),U=B&&B.currentTime>0?B.currentTime:null,H=Ue(w,I),z=O&&H.some(et=>et.id===O.canvasId)&&!U?O:null,K=(z==null?void 0:z.canvasId)??I;return Fc({manifestId:w.id,canvasId:K,type:(at=H.find(et=>et.id===K))==null?void 0:at.type,region:z==null?void 0:z.region,time:U})},setAnnotationPages(w){w!==N&&(N=w,G())},fetchAnnotationPages(w){const{manifest:I}=e.get();if(!I||!w.length)return;const O=new Set(w);for(const[B,U,H]of Ki(Rt(I).canvases))O.has(H)&&Z(B,U,H)},holdAllAnnotationPages(){P++,G();let w=true;return()=>{w&&P--,w=false}},dispose(){M==null||M.abort(),c==null||c.abort(),l==null||l.abort()}}}const Mf=100;function qc(t,e){const n=$({read:t,onChange:e});n.current={read:t,onChange:e};const o=$(void 0),r=$("");return F(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),ut(()=>{!n.current.onChange||o.current!==void 0||(o.current=setTimeout(()=>{var i,a;o.current=void 0;const s=n.current.read();!s||s.encoded===r.current||(r.current=s.encoded,(a=(i=n.current).onChange)==null||a.call(i,s))},Mf))},[])}function Fr(t,e){return t==null||t.addEventListener("pause",e),t==null||t.addEventListener("seeked",e),()=>{t==null||t.removeEventListener("pause",e),t==null||t.removeEventListener("seeked",e)}}function Kc(t,e){const n=qc(()=>t.getContentState(),e),o=!!e;F(()=>{if(!o)return;let r=t.store.get().canvasId;const s=t.store.subscribe(()=>{const l=t.store.get().canvasId;l!==r&&(r=l,n())}),i=t.viewport.subscribe(n);let a=Fr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=Fr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function ks(t){const e=[];for(const n of W(t==null?void 0:t.items))for(const o of W(n==null?void 0:n.items))if(ms(o))for(let r of Lo(o))(r==null?void 0:r.type)==="Choice"&&(r=W(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 Tf(t){return t.flatMap(e=>ks(e).map(({body:n})=>n))}function If(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 Lf(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 Pf({iiifContent:t,canvasId:e,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:d,renderers:u,annotations:m,annotationPages:h="view",onContentStateChange:p,...g}){const v=e!==void 0,y=s!==void 0,k=$({controlled:v,manifestControlled:y,onCanvasChange:o,onStatusChange:r,onManifestChange:a});k.current={controlled:v,manifestControlled:y,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[x]=D(()=>Ef({request:l,onCanvasChange:z=>{var K,at;return(at=(K=k.current).onCanvasChange)==null?void 0:at.call(K,z)},onManifestChange:z=>{var K,at;return(at=(K=k.current).onManifestChange)==null?void 0:at.call(K,z)},isControlled:()=>k.current.controlled,isManifestControlled:()=>k.current.manifestControlled}));x.setRequest(l);const b=$({});b.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const M=cf(l),_=$(t);_.current=t;const N=Nf(t);F(()=>(x.load(_.current,b.current),()=>x.dispose()),[x,N,M]),F(()=>{v&&x.syncCanvas(e??null)},[x,v,e]);const[P,Z]=D(x.store.get().status);F(()=>{let z=x.store.get().status;return x.store.subscribe(()=>{var et,gt;const{status:K,error:at}=x.store.get();K!==z&&(z=K,Z(K),(gt=(et=k.current).onStatusChange)==null||gt.call(et,K,at))})},[x]);const G=$(m);G.current=m;const j=Of(m);F(()=>{x.loadAnnotations(G.current??null)},[x,j,M]),F(()=>{x.setAnnotationPages(h)},[x,h]),Kc(x,p),F(()=>{y&&P==="ready"&&x.syncManifest(s??null)},[x,y,s,P]);const Q=Af(x,z=>{var K;return z.status==="ready"?((K=z.manifest)==null?void 0:K.id)??null:null});F(()=>{c&&Q&&x.search(c)},[x,c,Q]);const st=$(u);Lf(st.current,u)||(st.current=u);const pt=st.current,[S,C]=D(),[A,V]=D(d);A!==d&&(V(d),C(void 0));const q=$(void 0),[rt,tt]=D(N);rt!==N&&(tt(N),C(void 0)),F(()=>()=>{const z=q.current;q.current=void 0,z&&Lt.chosenLanguage===z&&Lt.chooseInterfaceLanguage()},[N]);const _t=ne(Lt.subscribe,()=>Lt.chosenLanguage),w=S??d??_t,I=ut(z=>{C(z);const K=Lt.stringsFor(z);q.current=K,K&&Lt.chooseInterfaceLanguage(K)},[]),[O,B]=D(0),U=ut(()=>(B(z=>z+1),()=>B(z=>z-1)),[]),H=O>0;return[yt(()=>({clover:x,language:w,renderers:pt,chooseLanguage:I,toggleDrawn:H,drawsToggle:U}),[x,w,pt,I,H,U]),P,g]}function Af(t,e){return ne(t.store.subscribe,()=>e(t.store.get()))}function Of(t){const e=Array.isArray(t)?t:t?[t]:[];return JSON.stringify(e.map(n=>typeof n=="string"?n:(n==null?void 0:n.id)??"object"))}function Nf(t){return typeof t=="string"?t:t.id??t["@id"]??t}const Rf=ce(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=Pf(s),d=Io(i,l.lang),u=as(r);return f(Eo.Provider,{value:a,children:f(Bn.Provider,{value:d.hostLanguage,children:f(e,{ref:d.ref,className:Pt("clover-root",n),"data-status":c,...cs(u),...l,children:[o,f(Vd,{clover:a.clover,language:a.language})]})})})}),Bf=()=>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"}),$f=()=>f(Mt,{children:[f("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),f("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),Ff=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),Df=()=>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"}),Fy=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),Zc=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),Dy=()=>f(Mt,{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"})]}),zy=()=>f(Mt,{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"})]}),ee={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"}},zf=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}=Tt(),c=$(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return Wf(),F(()=>{const d=c.current;d&&Dr(d)&&go(d)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...dt(e),...o&&{tabIndex:-1,onMouseDown:d=>{var u;d.preventDefault(),(u=d.currentTarget.parentElement)==null||u.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const d=c.current;d&&Dr(d)&&go(d)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function co(t){const e=t.target instanceof Element&&Cs(t.target),n=e&&Po(e);n&&go(n)}function Hy(t){const e=Po(Cs(t));e&&Dr(e)&&go(e)}function Po(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function Cs(t){const e=t.matches("input")?t.parentElement:null;return e&&Po(e)?e:t}function Dr(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function go(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=Hf(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 Hf(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 Xi=0;function Yi(t){if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&Cs(n);o&&Po(o)&&e.add(o),e.forEach(r=>Gc(r,"tipHidden",["pointerenter","focusout"]))}function Gc(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 Wf(){F(()=>(Xi++===0&&(document.addEventListener("keydown",Yi,true),document.addEventListener("pointerenter",co,true),document.addEventListener("focus",co,true)),()=>{--Xi||(document.removeEventListener("keydown",Yi,true),document.removeEventListener("pointerenter",co,true),document.removeEventListener("focus",co,true))}),[])}function Uf(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||zf.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 We=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l,side:d})=>{const m=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Pt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":m,"data-side":d,onClick:r,"aria-disabled":l||void 0,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...dt(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})]})},jf=me("");function ge(){return Vt(jf)+rs()}const cr=new Map;function Vf(t,e){const n=ge(),o=$(e);o.current=e,F(()=>t?qf(n,o):void 0,[t,n])}function qf(t,e){for(const[n,o]of[...cr])n!==t&&o.current();return cr.set(t,e),()=>{cr.delete(t)}}const Kf=bt(()=>import("./CaptionDetails-DDIjm-rC.mjs"));function Zf(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const Xc=(t,e)=>`${t}-label-${e}`,Gf=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Tt(),c=$(null),[l,d]=D(o);return o&&!l&&d(true),Vf(o,()=>r(false)),F(()=>{var u;o&&((u=c.current)==null||u.focus())},[o]),f("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:t,onKeyDown:u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),u.stopPropagation(),r(true))},ref:c,tabIndex:-1,children:[f(We,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(Zc,{})}),e.map((u,m)=>{const h=xt(u.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[h.text&&f("p",{className:"clover-canvas-caption-label",id:Xc(t,m),...dt(h.lang),children:h.text}),l&&f(kt,{fallback:null,children:f(Kf,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:s})})]},u.id)})]})},Xf=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),Yf=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),Jf=()=>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"}),Qf=()=>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"}),th=()=>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"}),Ji=()=>f(Mt,{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"})]}),eh=()=>f(Mt,{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"})]}),nh=({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}),oh=112,rh=128;function sh(t){Ut(()=>{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,p]of Object.entries(c)){const g=`--clover-canvas-controls-${h}`;a?e.style.setProperty(g,`${p}px`):e.style.removeProperty(g)}const l=t.offsetTop,d=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),u=e.clientHeight-2*l-c.height-((d==null?void 0:d.offsetHeight)??0),m=t.offsetLeft+i-l;a&&u<oh&&m>=rh?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 Ao=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},Yc=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},Jc=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},ih=(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()},Qc=async(t,e)=>{var o,r,s,i;const n=Jc(t);if(n)try{if(Ao()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!Yc()){e&&t&&ih(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 Es(t){const[e,n]=D(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=Ao())!=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 ah({key:t,id:e,label:n,glyph:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l},d){const u=d==null?void 0:d[t];return u?f(u,{buttonProps:{id:e,type:"button","aria-label":n,...c&&{lang:c},...a&&{"aria-keyshortcuts":a.keys},onClick:l?void 0:r,...l&&{"aria-disabled":true},...s!==void 0&&{"aria-expanded":s,"aria-controls":i}},icon:f(nh,{label:n,children:o}),label:n,tip:f(Ke,{label:n,shortcut:a})},t):f(We,{id:e,label:n,onClick:l?void 0:r,unavailable:l,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const ch=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=D(null),s=Es(o);sh(o);const i=ut(a=>{r(a),e==null||e(a)},[e]);return f("div",{className:"clover-canvas-controls","data-fit":t||void 0,"data-fullscreen":s,"data-testid":"clover-canvas-controls",ref:i,children:n})},lh=()=>()=>{};function uh(){return ne(lh,Yc)}const Qi=new WeakMap;function rn(t,e){const[n,o]=D(()=>Qi.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{Qi.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function dh(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function fh(t,e,n){const o=t.ownerDocument,r=i=>i instanceof HTMLElement&&t.contains(i)&&!i.closest("[hidden]"),s=[o.getElementById(e),o.getElementById(n),...Array.from(t.querySelectorAll("button"))].find(r);s==null||s.focus()}function hh({cluster:t,ids:e,more:n,fits:o,settled:r,onFits:s}){const i=$(o);i.current=o;const a=$(s);a.current=s;const c=$(new Map),l=$(e);l.current=e;const d=$(null),u=e.join(" ");return Ut(()=>{const m=t.ownerDocument,h=()=>{var N;const v=l.current,y=getComputedStyle(t),k=parseFloat(y.columnGap)||0;let x=t.clientWidth-(parseFloat(y.paddingLeft)||0)-(parseFloat(y.paddingRight)||0),b=0;for(const P of v){const Z=(N=m.getElementById(P))==null?void 0:N.offsetWidth;Z&&c.current.set(P,Z),b=Math.max(b,c.current.get(P)??0)}for(const P of Array.from(t.children))!(P instanceof HTMLElement)||v.includes(P.id)||P.id===n||P.classList.contains("clover-canvas-more")||!P.offsetWidth||getComputedStyle(P).position==="absolute"||(x-=P.offsetWidth+k);const M=dh(v.map(P=>c.current.get(P)??b),x,k);if(M===i.current)return;const _=m.activeElement;d.current=_ instanceof HTMLElement&&t.contains(_)?_.id:null,i.current=M,a.current(M)};h();const p=new ResizeObserver(()=>h());p.observe(t);const g=new MutationObserver(()=>h());return g.observe(t,{childList:true}),()=>{p.disconnect(),g.disconnect()}},[t,u,n]),Ut(()=>{if(!r)return;const m=d.current;if(d.current=null,m===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&fh(t,m,n)},[o,r,t,n]),null}const ph=()=>import("./AnnotationMenu-0Ru0csCz.mjs"),mh=()=>import("./ChaptersMenu-DmJy-cfd.mjs"),gh=()=>import("./ChoiceMenu-COUDRKGM.mjs"),vh=()=>import("./ImageControls-Bw9a17cS.mjs"),ta=2,yh=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),tl={atMax:false,atMin:false,atHome:false},bh=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=tl,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:d=[],chapters:u=[],mediaElement:m=null,onChapter:h,overStill:p,request:g,hiddenPages:v,onPageVisibilityChange:y,selectedAnnotation:k=null,onAnnotationSelect:x,onAnnotationActivate:b,captionId:M,captionOpen:_=false,onCaptionToggle:N,placeId:P,placeOpen:Z=false,onPlaceToggle:G,language:j,fit:Q=true,more:st="auto",children:pt})=>{var qn,Kn,Zn,Fe;const{t:S,langOf:C}=Tt(),[A,V]=D(false),[q,rt]=D(false),tt=`annotations-${e}`,_t=`${tt}-menu`,w=S("informationPanelTabsAnnotations"),I=C("informationPanelTabsAnnotations"),O=ut(J=>{var mt;rt(false),b==null||b(null),J&&((mt=document.getElementById(tt))==null||mt.focus())},[tt,b]),B=n.annotations&&d.length>0&&x,[U,H]=D(false),T=`chapters-${e}`,z=`${T}-menu`,K=u.length>0&&!!h,at=$(false),et=$(null);F(()=>{const J=()=>{var mt;at.current=((mt=document.activeElement)==null?void 0:mt.id)===T};return document.addEventListener("focusin",J),()=>document.removeEventListener("focusin",J)},[T]);const gt=ut(()=>{var mt,ye;if(!at.current)return;at.current=false;const J=document.activeElement;J&&J!==document.body||(ye=(mt=et.current)==null?void 0:mt.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||ye.focus()},[]);F(()=>{K||gt()},[K,gt]),F(()=>()=>gt(),[gt]);const ft=ut(J=>{var mt;H(false),J&&((mt=document.getElementById(T))==null||mt.focus())},[T]),zt=n.information&&M&&N,$t=n.map&&P&&G,Ft=`choice-${e}`,Bt=a.length===1?xt(a[0].label,j):null,vt=(Bt==null?void 0:Bt.text)||S("canvasChoice"),Ht=Bt!=null&&Bt.text?Bt.lang:C("canvasChoice"),X=`${Ft}-menu`,ct=(qn=rn(ph,!!B))==null?void 0:qn.default,St=(Kn=rn(mh,K))==null?void 0:Kn.default,R=(Zn=rn(gh,a.length>0&&!!l))==null?void 0:Zn.default,lt=ut(J=>{var mt;V(false),J&&((mt=document.getElementById(Ft))==null||mt.focus())},[Ft]),Ot=uh(),[oe,ve]=D(null);F(()=>{et.current=(oe==null?void 0:oe.closest(".clover-canvas"))??null},[oe]);const Me=Es(oe),[Wn,Xt]=D(false),Ze=J=>f(We,{className:J,id:tt,label:w,lang:I,onClick:()=>rt(mt=>!mt),expanded:q,controls:_t,children:f(Bf,{})},"annotations"),yn=(()=>{const J=[],mt=t;return n.zoom&&mt&&J.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:ee.zoomIn,label:S("imageZoomIn"),lang:C("imageZoomIn"),glyph:f(Xf,{}),unavailable:r.atMax,onClick:()=>mt.zoomBy(ta)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:ee.zoomOut,label:S("imageZoomOut"),lang:C("imageZoomOut"),glyph:f(Yf,{}),unavailable:r.atMin,onClick:()=>mt.zoomBy(1/ta)}),n.fullPage&&Ot&&J.push({key:"fullPage",id:`fullPage-${e}`,label:S(Me?"imageExitFullScreen":"imageFullScreen"),lang:C(Me?"imageExitFullScreen":"imageFullScreen"),glyph:Me?f(Qf,{}):f(Jf,{}),onClick:ye=>void Qc(ye.currentTarget)}),n.rotation&&mt&&J.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:ee.rotateRight,label:S("imageRotateRight"),lang:C("imageRotateRight"),glyph:f(Ji,{}),onClick:()=>mt.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:ee.rotateLeft,label:S("imageRotateLeft"),lang:C("imageRotateLeft"),glyph:f(Ji,{}),onClick:()=>mt.rotateBy(-90)}),n.reset&&mt&&J.push({key:"reset",id:`reset-${e}`,shortcut:ee.reset,label:S("imageResetZoom"),lang:C("imageResetZoom"),glyph:f(th,{}),unavailable:r.atHome,onClick:()=>mt.home()}),a.length&&J.push({key:"choice",id:Ft,label:vt,lang:Ht,glyph:f(eh,{}),onClick:()=>V(ye=>!ye),expanded:A,controls:X}),J})(),Un=[...yn.filter(J=>J.key!=="fullPage"),...yn.filter(J=>J.key==="fullPage")].map(J=>({id:J.id,view:yh.has(J.key),node:ah(J,o)})),Gt=[$t&&{id:`place-${e}`,view:false,node:f(We,{id:`place-${e}`,label:S("mapLabel"),lang:C("mapLabel"),onClick:G,expanded:Z,controls:P,children:f(Df,{})},"place")},K&&{id:T,view:false,node:f(We,{id:T,label:S("playerChapters"),lang:C("playerChapters"),onClick:()=>H(J=>!J),expanded:U,controls:z,children:f($f,{})},"chapters")},B&&{id:tt,view:false,node:Ze()},zt&&{id:`information-${e}`,view:false,node:f(We,{id:`information-${e}`,label:S("informationPanelTabsAbout"),lang:C("informationPanelTabsAbout"),onClick:N,expanded:_,controls:M,children:f(Ff,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(fe.Fragment,{children:s},"placeholder")}].filter(J=>!!J),bn=Gt.filter(J=>J.id===`placeholder-${e}`),jn=[...Un.filter(J=>J.view),...bn],qt=[...Un.filter(J=>!J.view),...Gt.filter(J=>!bn.includes(J))],$e=[...jn,...qt],[re,Vn]=D(true),_n=st==="always"||i,Ge=(Fe=rn(vh,Q&&(i||(_n||!re)&&$e.some(J=>J.view))))==null?void 0:Fe.ImageControls,Ct=re&&!_n||!Ge?[]:$e.filter(J=>J.view),se=i&&!!s&&!!Ge;F(()=>{Ct.length||Xt(false)},[Ct.length]);const Xe=J=>J.filter(mt=>!Ct.includes(mt)&&!(se&&mt.id===`placeholder-${e}`)).map(({node:mt})=>mt);return f(Mt,{children:[f(ch,{fit:Q,clusterRef:ve,children:[Xe(jn),Ge&&(Ct.length>0||se)&&f(Ge,{instance:e,open:se?Ct.length>0:Wn,onOpenChange:Xt,toggle:se?s:void 0,children:Ct.map(({node:J})=>J)}),Xe(qt),pt]}),Q&&!_n&&oe&&f(hh,{cluster:oe,ids:$e.map(({id:J})=>J),more:`more-${e}`,fits:re,settled:re||Ct.length>0||!$e.some(J=>J.view),onFits:Vn}),St&&U&&K&&f(St,{id:z,triggerId:T,label:S("playerChapters"),labelLang:C("playerChapters"),chapters:u,element:m,onChapter:h,overStill:p,request:g,onClose:ft}),ct&&q&&B&&f(ct,{id:_t,triggerId:tt,label:w,labelLang:I,annotations:d,hiddenPages:v,onPageVisibilityChange:y,selected:k,onSelect:x,onActivate:J=>b==null?void 0:b(J),onClose:O}),R&&A&&a.length>0&&l&&f(R,{id:X,triggerId:Ft,label:vt,labelLang:Ht,language:j,choices:a,selections:c,onSelect:l,onClose:lt})]})},_h=["jpg","png","webp","gif"];class zr extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function Ms(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function Oo(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 Ms(a)}}function wh(t,e){if(!t||typeof t!="object")throw new zr("info.json is not an object",e??"");const n=t,o=xh(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=Ms(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new zr("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(k=>typeof k=="string"),d=c.filter(k=>!!k&&typeof k=="object"),u=Sh(l),m=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...d.flatMap(k=>Array.isArray(k.supports)?k.supports:[])]),p=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(k=>String(k).toLowerCase()).find(k=>_h.includes(k))??"jpg",g=k=>{var b;const x=n[k]??((b=d.find(M=>M[k]!==void 0))==null?void 0:b[k]);return Number(x)>0?Number(x):void 0};let v=g("maxWidth"),y=g("maxHeight");return v&&!y&&(y=v),y&&!v&&(v=void 0),{id:s,version:o,level:u,width:i,height:a,tiles:kh(n.tiles),sizes:Ch(n.sizes),maxWidth:v,maxHeight:y,maxArea:g("maxArea"),regionByPx:u>=1||m.has("regionByPx"),sizeByW:u>=1||m.has("sizeByW")||m.has("sizeByWh"),format:p,quality:"default"}}function xh(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 Sh(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function kh(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 Ch(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 vo(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 Eh(t){return t.version===2&&t.level===0?"native":void 0}const lr=new Map;function Ts(t,{request:e}={}){const n=Ms(t),o=lr.get(n);if(o)return o;const r=`${n}/info.json`,s=_s(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw ws(i),new zr(`info.json request failed with ${i.status}`,r,i.status);return wh(await i.json(),n)}).catch(i=>{throw lr.delete(n),i});return lr.set(n,s),s}function Mh(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 Wy(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function Is(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 Th=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,Ih=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,Lh=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Ih.test(e)),Ph={width:1600,height:900};function Ah(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(hn),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,d)=>d);s&&a.reverse();let c=0;for(const l of a){const d=o[l],u=i/(r?d.height:d.width),m=d.width*u,h=d.height*u;n[l]=r?{x:c,y:0,width:m,height:h}:{x:0,y:c,width:m,height:h},c+=r?m:h}return n}function hn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=el(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=yo(t)[0])==null?void 0:s.body)??((i=bo(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}:Ph}function el(t){return t.accompanyingContainer??t.placeholderContainer}function Oh(t,e,n,o,r){return Th(t.id,e.id,n,o,r)}function Nh(t){const e=[];for(const n of t)nl(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=W(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}:{},...typeof W(a.language)[0]=="string"?{language:W(a.language)[0]}:{}}))})});return e}const ur={};function ea(t){if(t.type!=="Video"&&!Fn(t.type)||!t.format||Lh(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=ur[e]??(ur[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function Rh(t,e){const n={};for(const o of t){const r=o.items.filter(ea),s=[...new Set(r.flatMap(c=>c.language??[]))],i=s.length>1?Sc(s,e):void 0,a=o.items.findIndex(c=>ea(c)&&(!i||c.language===i));a>0&&(n[o.key]=a)}return n}const dr=new WeakMap,fr=[];function Bh(t){return Lo(t).some(e=>((e==null?void 0:e.type)==="Choice"?W(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||Fn(o==null?void 0:o.type)))}function Hr(t){var i;const e=dr.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!ms(c))continue;const l=c.target?(i=mn(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[d,u]=l.split(",").map(Number);Number.isFinite(d)&&n.push({annotation:c,start:d,end:Number.isFinite(u)?u:NaN})}if(n.every(a=>Bh(a.annotation)))return dr.set(t,fr),fr;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 d;const l=(d=n[c+1])==null?void 0:d.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:fr;return dr.set(t,s),s}const On=t=>`frame:${t.id}`;function nl(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{ms(r)&&Lo(r).forEach((i,a)=>e(i,Oh(t,r,o,s,a),r))})})}function yo(t,e={},{allFrames:n=false}={}){const o=[];return Ls(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 $h(t,e={}){for(const n of t){let o;if(Ls(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function bo(t,e={}){const n=[];return Ls(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!Fn(a))return;const c=Is(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function Fh(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 Ls(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Hr(t),a=Math.min(e[On(t)]??0,Math.max(0,i.length-1));nl(t,(c,l,d)=>{const u=i.findIndex(g=>g.annotation===d);if(!o&&u>=0&&u!==a)return;const m=Wr(c,e[l]??0);if(!m)return;const h=d.target?mn(d.target):void 0,p=h==null?void 0:h.rect;n(m,p?{x:p.x,y:p.y,width:p.w,height:p.h}:{x:0,y:0,width:r||Number(m.body.width)||0,height:s||Number(m.body.height)||0},u,h==null?void 0:h.t)})}function ol(t){return rl(t).filter(e=>e.kind!=="transcript")}function Dh(t){const e=W(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function rl(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(W(r.motivation).includes("supplementing"))for(const s of W(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?W(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:W(c.language)[0],kind:Dh(r)})}}return e}function zh(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:W(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(W(s.motivation).includes("supplementing"))for(const i of W(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?W(a.items):[a]).forEach(n)}return W(t.rendering).forEach(n),e}function Wr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=W(n.items);return Wr(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=W(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=Wr({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"&&!Fn(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function na(t,e,n={},{standIns:o=true}={}){const r=Ah(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const d=r[l],u=hn(c),m=d.width/u.width,h=d.height/u.height,p=b=>({x:d.x+b.x*m,y:d.y+b.y*h,width:b.width*m,height:b.height*h}),g=bo(c,n),v=yo(c,n,{allFrames:true}).map(b=>({...b,canvas:c})),y=el(c);if(o&&!v.length&&g.some(b=>b.kind==="audio")&&y){const b=hn(y);for(const M of yo(y))v.push({...M,canvas:y,target:{x:M.target.x/b.width*u.width,y:M.target.y/b.height*u.height,width:M.target.width/b.width*u.width,height:M.target.height/b.height*u.height}})}const k=n[On(c)]??0;v.forEach(({body:b,target:M,region:_,rotation:N,frame:P,canvas:Z},G)=>{var pt;const j=Oo(b.service);if(!j&&!b.id)return;const Q=`${Z.id}|${G}|${b.id??j}|${_??""}|${N??""}`,st=!(j&&_);if(s.push({id:Q,service:j,url:b.id,width:st&&Number(b.width)||void 0,height:st&&Number(b.height)||void 0,region:_,...N?{rotation:N}:{},placement:p(M),...P!=null&&P!==k?{hidden:true}:{}}),P!=null){const S=a[pt=On(c)]??(a[pt]=[]);(S[P]??(S[P]=[])).push(Q)}});const[x]=g;if(x!=null&&x.body.id){const b=Fh(g),M=b?b[0]:void 0;i.push({id:`${c.id}|media|${x.body.id}`,kind:x.kind,src:(M==null?void 0:M.src)??x.body.id,format:M?M.format:x.body.format,placement:p(x.target),duration:b?Number(c.duration)||void 0:Number(x.body.duration??c.duration)||void 0,...b?{segments:b}:{},poster:Hh(c),captions:ol(c)})}}),{images:s,media:i,placements:r,frames:a}}function Hh(t){var e;return(e=Ur(t))==null?void 0:e.source}const Uy=1280;function Ur(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=yo(e)[0])==null?void 0:c.body;if(!n)return;const o=Oo(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}=hn(e);return{source:s,width:i,height:a}}function Wh(t,e,n){const o=hn(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 Uh=({hidden:t})=>{const{t:e,langOf:n}=Tt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...dt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void Qc(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]})},sl="50%";function il(t,e=sl,n=null){const[o,r]=D(()=>typeof IntersectionObserver>"u");return F(()=>{if(o||!t)return;const s=new IntersectionObserver(i=>{i.some(a=>a.isIntersecting)&&(r(true),s.disconnect())},{root:n,rootMargin:e});return s.observe(t),()=>s.disconnect()},[t,o,e,n]),o}function jh(t){const[e,n]=D(false);return F(()=>{if(!t)return;const o=()=>n(Ao()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Vh(t){const[e,n]=D(false);return F(()=>{if(!t)return;const o=()=>{const r=Ao();n(r===t||!!r&&Jc(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 qh extends fe.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f(Kh,{error:n}):this.props.children}}function Kh({error:t}){const{t:e,langOf:n}=Tt();return f("div",{className:"clover-canvas-error",role:"alert",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",...dt(n("statusError")),children:e("statusError")}),t.message&&f("span",{className:"clover-canvas-error-body",lang:"en",children:t.message})]})}const Zh=250,oa=100,Gh=330,hr=new WeakMap;let pr;const ra=(t,e)=>t.style.setProperty("--clover-loading-elapsed",`${Math.round(e)}ms`);function Xh(t){var i;const e=t.closest(".clover-body")??t.parentElement,n=t.parentElement;if(!e||!n)return()=>{};const o=performance.now();let r=hr.get(e);if(!r){const a=pr,c=a&&o>=a.at&&o-a.at<oa&&!a.host.isConnected;r={start:c?a.start:o,marks:0},c&&(pr=void 0),hr.set(e,r)}clearTimeout(r.timer),(i=r.ghost)==null||i.remove(),r.ghost=void 0,r.marks++,ra(t,o-r.start);const s=r;return()=>{if(--s.marks)return;const a=performance.now(),c=a-s.start;pr={start:s.start,at:a,host:e};const l=t.firstElementChild,d=c>=Zh&&n.isConnected&&l&&getComputedStyle(l).animationName.startsWith("clover-loading")?t.cloneNode(true):void 0;d&&(ra(d,c),n.appendChild(d)),s.ghost=d,s.timer=setTimeout(()=>{if(hr.delete(e),!d)return;const u=d.firstElementChild;u&&(u.style.transform=getComputedStyle(u).transform),d.dataset.done="",setTimeout(()=>d.remove(),Gh)},oa)}}const Yh=typeof window>"u"?F:Ut;function Tn({overlay:t=false,className:e}){const n=$(null);return Yh(()=>{const o=n.current;return o?Xh(o):void 0},[]),f("span",{ref:n,"aria-hidden":"true",className:Pt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const Jh={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function Qh({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Tt(),s=Jh[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...dt(r(s)),children:o(s)})})}function tp({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...dt(e),children:t})})}function No(t,e,n=false,o){const r=ge(),{hostLanguage:s}=Tt(void 0,o);if(n)return{props:{},node:null};const i=To(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...dt(i),children:t})}}const ep=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function ae(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function he(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Dn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function np(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 pe(...t){return t.reduce((e,n)=>np(e,n),ep)}function op(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 Se(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 jy(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(sp).join(",")})`}function rp(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 sp(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function al(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function an(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 ip(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 Ro(t,e){const n=[Se(t,{x:e.x,y:e.y}),Se(t,{x:e.x+e.width,y:e.y}),Se(t,{x:e.x,y:e.y+e.height}),Se(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 Sn(t,e,n){return Math.min(Math.max(t,e),n)}const mr=t=>!!(t&&"overlays"in t);let jr;const ap=()=>Promise.resolve().then(()=>rf).then(t=>{jr=t.buildContentState}),cp=bt(()=>import("./MediaBody-CMddJWMF.mjs")),lp=()=>import("./AnnotationState-hEds2Tpa.mjs"),up=new Map,dp={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:up,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},fp=bt(()=>import("./FrameAnimation-f4RKtdpP.mjs")),sa=bt(()=>import("./PlaceBox-C27N2KG8.mjs")),hp=bt(()=>import("./Placeholder-BX2y25Fo.mjs")),pp=bt(()=>import("./ControlsFade-CuooJOpa.mjs")),mp=()=>true,gp=bt(()=>import("./Placeholder-BX2y25Fo.mjs").then(({PlaceholderToggle:t})=>({default:t}))),ia={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},vp={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},yp={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",ee.zoomIn.keys,ee.zoomOut.keys,ee.reset.keys,ee.rotateRight.keys,ee.rotateLeft.keys].join(" ")},bp={description:"canvasKeysMedia",keys:[ee.play.keys,"J L",ee.mute.keys].join(" ")},_p={description:"canvasKeysAnnotations",keys:"Escape"},wp=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||cl(t.body,t.src).length>0?f(qh,{children:f(xp,{...t})}):null},xp=t=>{var ni,oi,ri,si,ii,ai;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:d,highContrast:u,instanceId:m,className:h,options:p,navigator:g=false,controls:v=true,collapseControls:y="auto",controlButtons:k,annotations:x,onReady:b,onViewportChange:M,onContentStateChange:_,onMediaElement:N,onCaptionChange:P,caption:Z,onEnded:G,chapters:j,highlightedChapter:Q,onChapterHighlight:st,placeholder:pt=true,ahead:S,children:C}=t,{t:A}=Tt(),V=$(null),[q,rt]=D(null),tt=jh(q),_t=Es(q),w=Vh(q),I=Io(rt),O=as(u),B=!!e.controlsVisibility,H=(e.controlsVisibility??mp)(B?q:null,p==null?void 0:p.hideDelay,V),[T,z]=D(false),K=il(q),at=ge(),[et]=D(()=>m??`clover-canvas-${at}`),gt=$(null),[ft,zt]=D(null),$t=mr(ft)?ft:null,[Ft,Bt]=D(null),vt=v===false?null:v===true?ia:{...ia,...v},[Ht,X]=D("loading"),[ct,St]=D(false),[R,lt]=D(0),[Ot,oe]=D(tl),ve=$(b),Me=$(M),Wn=$(p);ve.current=b,Me.current=M,Wn.current=p;const Xt=ps(r),Ze=yt(()=>Nh(o??[]),[o]),Fo=yt(()=>Rh(Ze,d),[Ze,d]),[yn,Un]=D({}),Gt=yt(()=>({...Fo,...yn}),[Fo,yn]),bn=(E,Y)=>Un(ht=>({...ht,[E]:Y})),jn=yt(()=>x==null?void 0:x.filter(E=>!E.layer||(Gt[E.layer.key]??0)===E.layer.item),[x,Gt]),qt=(ni=x==null?void 0:x.find(E=>E.layer&&E.annotation.id===t.selectedAnnotation))==null?void 0:ni.layer;F(()=>{qt&&(Gt[qt.key]??0)!==qt.item&&bn(qt.key,qt.item)},[qt==null?void 0:qt.key,qt==null?void 0:qt.item,t.selectedAnnotation]);const $e=!!(vt!=null&&vt.information),re=!!(x!=null&&x.length),Vn=rn(lp,re),[_n,Ge]=D(null),Ct=re&&_n||dp,se=yt(()=>{var ht,Nt;const E=(ht=x==null?void 0:x.find(Kt=>Kt.annotation.id===Ct.selected))==null?void 0:ht.annotation,Y=(Array.isArray(E==null?void 0:E.body)?E==null?void 0:E.body:[E==null?void 0:E.body]).find(Kt=>(Kt==null?void 0:Kt.type)==="Feature");return E&&Y?{id:String(E.id),feature:Y,name:((Nt=Y.properties)==null?void 0:Nt.label)??E.label}:null},[x,Ct.selected]),Xe=se?`${se.id}:${t.refind??0}`:null,[qn,Kn]=D(null),Zn=Xe!==null&&qn!==Xe,Fe=yt(()=>{var Kt,en;const E=(o??[]).map(Jt=>Jt.navPlace).filter(Boolean),Y=E.length?E:t.navPlace?[t.navPlace]:[];if(!Y.length)return null;const ht=Y.flatMap(Jt=>(Jt==null?void 0:Jt.type)==="FeatureCollection"?Jt.features??[]:(Jt==null?void 0:Jt.type)==="Feature"?[Jt]:[]);if(!ht.length)return null;const Nt=ht.length===1?(en=(Kt=ht[0])==null?void 0:Kt.properties)==null?void 0:en.label:void 0;return{feature:{type:"FeatureCollection",features:ht},name:Nt??t.label}},[o,t.navPlace,t.label]),J=`place-box-${et}`,[mt,ye]=D(false),[Gl,Xl]=D(false),Gn=$(Ct);Gn.current=Ct;const Xn=ut(()=>Gn.current.release(),[]),{comments:Do,listedCount:Hs}=Ct,Ye=yt(()=>$e?(o??[]).filter(E=>Zf(E)||Do.has(E.id)):[],[o,$e,Do]),zo=`caption-${et}`,[Yl,Ws]=D(false),Ho=Yl&&Ye.length>0,Us=ut(E=>{var Y;Ws(false),E&&((Y=document.getElementById(`information-${et}`))==null||Y.focus())},[et]),Yt=yt(()=>(o??[]).find(E=>Hr(E).length)??null,[o]),Jl=Yt?Hr(Yt):kp,jt=yt(()=>o!=null&&o.length?na(o,Xt,Gt,{standIns:o.length>1}):null,[o,Xt,Gt]),Ql=yt(()=>cl(s,i,a),[s,i,a]),nt=(jt==null?void 0:jt.media[0])??null,js=!B&&(nt==null?void 0:nt.kind)==="video",tu=B||js,eu=B?H:T,nu=yt(()=>{if(o!=null&&o.length)return $h(o,Gt);const E=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(E==null?void 0:E.type)=="string"?E.type.toLowerCase():i?"image":void 0},[o,Gt,s,i]),[Wt,ou]=D(null),Yn=$(N);Yn.current=N;const ru=ut(E=>{var Y;ou(E),(Y=Yn.current)==null||Y.call(Yn,E)},[]),Te=jt?jt.images:Ql,Ie=!!nt&&(o==null?void 0:o.length)===1,Le=Ie&&(nt==null?void 0:nt.kind)==="audio",su=Ie&&(nt==null?void 0:nt.kind)==="video",Je=(o==null?void 0:o.length)===1&&!nt&&!Yt&&Te.length===0,Jn=!Ie&&!Je&&((oi=p==null?void 0:p.gestures)==null?void 0:oi.navigable)!==false,be=o?`${n??""}
|
|
2
|
-
${o.map(E=>E.id).join("|")}`:null,Pe=yt(()=>{if(!o||!pt)return[];const E=o.flatMap(Y=>{const ht=Ur(Y),Nt=xt(Y.label,d);return ht?[{...ht,alt:Nt.text,lang:Nt.lang}]:[]});return Xt==="right-to-left"||Xt==="bottom-to-top"?E.reverse():E},[o,Xt,pt,d]),[Wo,Vs]=D(false),[iu,qs]=D(null),wt=!Le&&Pe.length>0&&(nt?iu!==be:!Wo),Ks=p==null?void 0:p.request;F(()=>{if(wt){Promise.resolve().then(()=>ig);for(const{source:E}of Pe)E.service&&Ts(E.service,{request:Ks}).catch(()=>{})}},[wt,Pe,Ks]);const Qn=yt(()=>{if(!(S!=null&&S.length)||pt&&!Wo&&S.some(ht=>Ur(ht)))return null;const E=na(S,Xt,Gt,{standIns:false});if(E.media.length)return null;const Y=E.images.filter(ht=>ht.service&&!ht.hidden);return Y.length?{images:Y,world:an(E.placements)??void 0}:null},[S,Xt,Gt,pt,Wo]);F(()=>{var E;Ht!=="ready"||wt||!Qn||(E=ft==null?void 0:ft.prefetch)==null||E.call(ft,Qn.images,{world:Qn.world})},[ft,Ht,wt,Qn]);const Zs=(E,{annotations:Y=false,fullPage:ht=false}={})=>({...E,zoom:false,rotation:false,reset:false,fullPage:ht&&E.fullPage,annotations:Y&&E.annotations}),wn=Je&&_t,Gs=fe.Children.count(C)>0,Uo=Pe.length>0&&!Le&&!nt,xn=vt?wt?Ye.length||Gs||Hs||nt&&(j!=null&&j.length)?Zs(vt,{annotations:true}):null:Ie||Je?Ze.length||Ye.length||Gs||Hs||nt&&(j!=null&&j.length)||wn&&vt.fullPage?Zs(vt,{annotations:true,fullPage:wn}):null:vt:null,jo=g&&!wt&&(nt?nt.kind==="audio"&&!Ie&&Te.length>0:true),[Vo,au]=D(null),Qe=nt?Vo??nt.placement:null,[to,cu]=D(Cp),qo=yt(()=>{const E=(nt==null?void 0:nt.kind)==="video"&&Wt&&Qe?[...Te,{id:nt.id,placement:Qe,width:Qe.width,height:Qe.height,media:{element:Wt}}]:Te;return to.length?[...E,...to]:E},[Te,nt,Wt,Qe,to]),Xs=Ie&&(nt==null?void 0:nt.kind)==="video"&&Vo?Vo:jt?an(jt.placements):null,lu=JSON.stringify([Te,Xs,qo.length!==Te.length&&[nt==null?void 0:nt.id,Qe],to.map(E=>E.id)]),eo=$(null),Ko=$(false),Zo=()=>{nt?qs(wt?be:null):Vs(wt),wt||Xn()},no=$(null),uu=E=>{if(Wt&&!wt){Wt.currentTime=E;return}no.current=E,wt&&Zo()};F(()=>{!Wt||no.current===null||(Wt.currentTime=no.current,no.current=null)},[Wt]);const Go=Array.isArray(s)?s[0]:s,At=[c,(ri=o==null?void 0:o[0])==null?void 0:ri.label,Go==null?void 0:Go.label].map(E=>xt(E,d)).find(E=>E.text),du=yt(()=>{const E=xt(l,d);return E.text&&E.text!==(At==null?void 0:At.text)?E:void 0},[l,d,At==null?void 0:At.text]),Ys=No((At==null?void 0:At.text)||A("canvasImage"),At?At.lang:I.langOf("canvasImage"),false,I.hostLanguage),oo=wt?[]:[...Jn?[yp]:[],...nt?[bp]:[],...re?[_p]:[]],Js=`keys-${et}`,fu=Jn&&!wt&&!I.langOf("canvasRoleDescription")?A("canvasRoleDescription"):void 0,Xo=!!xn&&Ye.length>0,hu=Xo&&Ye.map((E,Y)=>xt(E.label,d).text?Xc(zo,Y):null).filter(Boolean).join(" ")||void 0,Qs=$({canvases:o,scene:jt,canvasKey:be});Qs.current={canvases:o,scene:jt,canvasKey:be};const ro=$(null),Yo=ut(()=>{const{canvases:E,scene:Y,canvasKey:ht}=Qs.current;ro.current=E&&Y&&eo.current===ht?{key:ht,canvases:E,placements:Y.placements}:null},[]),pu=!o||((si=ro.current)==null?void 0:si.key)===be,tn=qc(()=>{const E=ro.current,Y=gt.current;if(!E||n==="loading")return null;const ht=Wt&&Wt.currentTime>0?Wt.currentTime:null,Nt=!ht&&Y&&mr(Y)?ll(Y.getBounds(),E.canvases,E.placements):null,Kt=E.canvases.find(en=>en.id===(Nt==null?void 0:Nt.canvasId))??E.canvases[0];return Kt?jr?jr({manifestId:n,canvasId:Kt.id,type:Kt.type,region:Nt&&{x:Nt.rect.x,y:Nt.rect.y,w:Nt.rect.width,h:Nt.rect.height},time:ht}):(ap().then(()=>tn()),null):null},_);F(()=>Fr(Wt,tn),[Wt,tn]),F(()=>{const E=V.current;if(!E)return;const Y=e(E,Wn.current),ht=mr(Y)?Y:null;gt.current=Y,zt(Y),Y.setDismiss(Xn);const Nt=()=>{if(!ht)return;const Zt=ht.viewLimits();oe(_e=>_e.atMax===Zt.atMax&&_e.atMin===Zt.atMin&&_e.atHome===Zt.atHome?_e:Zt)},Kt=Y.on("open",()=>{var Zt;Nt(),Qo(false),Yo(),tn(),X("ready"),lt(_e=>_e+1),ht&&((Zt=ve.current)==null||Zt.call(ve,Sp(ht,()=>ro.current,_e=>{var li,ui;const ci=Gn.current.placed.find(tr=>tr.id===_e);return ci?(Gn.current.select(ci),(ui=Array.from(((li=ht.overlays)==null?void 0:li.container.querySelectorAll("[id]"))??[]).find(tr=>tr.id===_e))==null||ui.focus({preventScroll:true}),true):false})))}),en=Y.on("change",()=>{Nt(),Qo(false),Yo(),tn(),X("ready"),lt(Zt=>Zt+1)}),Jt=Y.on("error",()=>{Y.isOpen||X("error")}),gu=Y.on("unloadable",Zt=>St(!!Zt)),vu=Y.on("viewport",()=>{var Zt;Nt(),ht&&((Zt=Me.current)==null||Zt.call(Me,ht.getBounds())),tn()});return()=>{Kt(),en(),Jt(),gu(),vu(),Y.dispose(),gt.current=null,zt(null)}},[m,e,Xn,Yo]),F(()=>{if(!(!$t||!Ft))return $t.attachNavigator(Ft)},[$t,Ft]),F(()=>{if(!(!ft||!Je))return ft.setGestures({navigable:false}),()=>ft.setGestures({})},[ft,Je]);const Jo=$(false);F(()=>{var Y;if(wn)return;const E=!document.activeElement||document.activeElement===document.body;Jo.current&&E&&((Y=V.current)==null||Y.focus()),Jo.current=false},[wn]),F(()=>{const E=gt.current;if(wt&&(Ko.current=true),!E||!K||wt)return;const Y=eo.current!==null&&eo.current!==be;(!E.isOpen||Y)&&X("loading");const ht=Ie||Ko.current&&E.isOpen||Y;eo.current=be,Ko.current=false,E.setImages(qo,{world:Xs??void 0,fit:ht})},[lu,m,Wt,K,wt]);const ti=$(n),[mu,Qo]=D(false);Ut(()=>{var E;n!==ti.current&&(ti.current=n,(E=gt.current)==null||E.clear(),Qo(true),X("loading"))},[n]);const ei=Ht==="loading"&&qo.length>0&&K&&!wt;return f(Bn.Provider,{value:I.hostLanguage,children:f("figure",{"aria-labelledby":hu,className:Pt("clover-canvas",h),"data-testid":"clover-canvas","data-status":Ht,...cs(O),"data-unloadable":ct||void 0,"data-has-navigator":jo,"data-fullscreen":tt,"data-exit":w||void 0,"data-controls":tu?eu?"visible":"hidden":void 0,"data-media":nu,"data-recording":nt?"":void 0,"data-player":Le?"":void 0,"data-animated":Yt?"":void 0,"data-navigable":Jn,"data-placeholder":Pe.length&&!Le?wt:void 0,ref:I.ref,onFocus:E=>{Jo.current=wn&&E.target.id===`fullPage-${et}`},onKeyDown:E=>{if(E.key==="Escape"&&Ho&&!E.defaultPrevented){E.preventDefault(),Us(false);return}if(E.key==="Escape"&&!E.defaultPrevented&&!E.currentTarget.querySelector(".clover-canvas-menu")&&Xn()){E.preventDefault();return}Uf(E,V.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(xn||jo)&&nt&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),js&&f(kt,{fallback:null,children:f(pp,{element:q,hideDelay:p==null?void 0:p.hideDelay,picture:V,onChange:z})}),f(Uh,{hidden:!w}),ft&&(xn||Uo)&&f(bh,{renderer:$t,instance:et,config:xn??vp,controlButtons:k,limits:Ot,placeholderIsMore:Uo&&!nt,chapters:nt?j:void 0,mediaElement:Wt,onChapter:uu,overStill:!!nt&&wt,request:p==null?void 0:p.request,placeholder:Uo&&f(kt,{fallback:null,children:f(gp,{instance:et,media:!!nt,active:wt,onToggle:Zo,more:!!vt&&(vt.zoom||vt.rotation||vt.reset||vt.fullPage)})}),fit:!B,more:y,choices:wt?[]:Ze,selections:Gt,onSelect:bn,annotations:Ct.menu,hiddenPages:Ct.hiddenPages,onPageVisibilityChange:Ct.setPagesVisible,selectedAnnotation:Ct.selected,onAnnotationSelect:Ct.select,onAnnotationActivate:Ct.activate,captionId:Xo?zo:void 0,captionOpen:Ho,onCaptionToggle:()=>Ws(E=>!E),placeId:Fe?J:void 0,placeOpen:mt,onPlaceToggle:()=>{Xl(true),ye(E=>!E)},language:d,children:xn&&C}),jo&&f("div",{ref:Bt,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:V,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:re?"group":"img","aria-roledescription":fu,...Ys.props,"aria-describedby":oo.length?Js:void 0,"aria-keyshortcuts":oo.map(({keys:E})=>E).join(" ")||void 0,"aria-busy":ei,tabIndex:0}),Ys.node,oo.length>0&&f("span",{id:Js,style:je,children:oo.map(({description:E},Y)=>f(fe.Fragment,{children:[Y>0&&" ",f("span",{...dt(I.langOf(E)),children:A(E)})]},E))}),f(Qh,{kind:"image",shown:ct&&!wt}),Je&&!wt&&(At==null?void 0:At.text)&&f(tp,{text:At.text,lang:At.lang||void 0}),(nt==null?void 0:nt.kind)==="audio"&&!Le&&Te.length===0&&!wt&&(At==null?void 0:At.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...dt(At.lang||void 0),children:At.text}),Pe.length>0&&!Le&&f(kt,{fallback:null,children:f(hp,{instance:et,stills:Pe,vertical:Xt==="top-to-bottom"||Xt==="bottom-to-top",media:!!nt,active:wt,lingering:Ht==="loading"&&!mu,onToggle:Zo,request:p==null?void 0:p.request})}),ft&&nt&&K&&!wt&&f(kt,{fallback:null,children:f(cp,{media:nt,request:p==null?void 0:p.request,fillable:su,surface:ft,instance:et,onElement:ru,onFit:au,onCaptionChange:P,caption:Z,navigable:Jn,fullscreen:Ie&&!!(vt!=null&&vt.fullPage),isFullscreen:_t,onEnded:G,chapters:j,highlightedChapter:Q,onChapterHighlight:st,autoPlay:!Le&&Pe.length>0&&Ct.quietlyOpened!==be,language:d,notes:Ct.timed,marked:Ct.placed,selectedAnnotation:Ct.selected,onAnnotationSelect:re?Ct.select:void 0,onAnnotationActivate:Ct.activate,player:Le&&o?{canvas:o[0],title:At,partOf:du}:void 0})}),$t&&Yt&&(jt==null?void 0:jt.frames[On(Yt)])&&!wt&&f(kt,{fallback:null,children:f(fp,{renderer:$t,frames:Jl,byFrame:jt.frames[On(Yt)],animationKey:Yt.id,sceneVersion:R,autoplay:(ii=p==null?void 0:p.animation)==null?void 0:ii.autoplay,loop:(ai=p==null?void 0:p.animation)==null?void 0:ai.loop,onEnded:G,language:d,duration:Number(Yt.duration),canvas:Yt,place:jt.placements[o.indexOf(Yt)],onItems:cu},Yt.id)}),Vn&&re&&x&&f(Vn.AnnotationState,{given:t,annotations:jn??x,scene:jt,renderer:$t,sceneVersion:R,drawn:pu,media:nt,mediaElement:Wt,showPlaceholder:wt,canvasKey:be,openImages:Vs,openMedia:qs,host:V,onModel:Ge,refind:t.refind??0}),ei&&f(Tn,{overlay:true}),se&&f(kt,{fallback:null,children:f(sa,{id:`place-of-${et}`,open:Zn,onClose:E=>{var Y;Kn(Xe),E&&((Y=document.getElementById(se.id))==null||Y.focus())},feature:se.feature,name:se.name,language:d})}),Fe&&Gl&&f(kt,{fallback:null,children:f(sa,{id:J,open:mt,onClose:E=>{var Y;ye(false),E&&((Y=document.getElementById(`place-${et}`))==null||Y.focus())},feature:Fe.feature,name:Fe.name,language:d})}),Xo&&f(Gf,{id:zo,canvases:Ye,comments:Do,open:Ho,onClose:Us,language:d})]})})};function Sp(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(Wh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?ll(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 kp=[],Cp=[];function cl(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=Oo(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 ll(t,e,n){let o=null;if(n.forEach((u,m)=>{const h=Math.max(t.x,u.x),p=Math.max(t.y,u.y),g=Math.min(t.x+t.width,u.x+u.width)-h,v=Math.min(t.y+t.height,u.y+u.height)-p;if(g<=0||v<=0)return;const y=g*v;(!o||y>o.area)&&(o={index:m,area:y,clip:{x:h,y:p,width:g,height:v}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=hn(i),l=c.width/a.width,d=c.height/a.height;return{canvasId:i.id,rect:{x:Math.round((s.x-a.x)*l),y:Math.round((s.y-a.y)*d),width:Math.round(s.width*l),height:Math.round(s.height*d)}}}function Ep(t,e,n,o){return yt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=xt(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 Mp(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 Tp(t,e){const n=t.store.get().manifest;if(e.canvasId&&Rt(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 ul(t){if(typeof t=="string")return aa(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?aa(e.id):e}const aa=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function dl(t){const e=W(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const ca=new WeakMap,la=[];function Ip(t,e,n){if(!t||!e)return la;let o=ca.get(t);o||ca.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=d=>{if(!d||a.has(d.id??d))return;a.add(d.id??d);const u=!W(d.behavior).includes("no-nav");for(const m of W(d.items)){if((m==null?void 0:m.type)==="Range"){c(m);continue}if(!u)continue;const h=mn(ul(m));if(h.id.split("#")[0]!==e)continue;const p=Is(h.t);p&&i.push({...d.id?{id:d.id}:{},label:d.label,...p,...dl(d)})}};for(const d of W(t.structures))c(d);i.sort((d,u)=>d.start-u.start);const l=i.length?i.map((d,u)=>{var m;return{...d,end:d.end??((m=i[u+1])==null?void 0:m.start)??n}}):la;return o.set(r,l),l}const ua=new WeakMap,da=[];function Lp(t){if(!t)return da;const e=ua.get(t);if(e)return e;const n=new Map(W(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var k,x;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let m;for(const b of W(c.items))if((b==null?void 0:b.type)==="Range"){const M=r(b);l.push(...M),M.forEach(_=>d.push(..._.canvasIds))}else{const M=mn(ul(b));if(!M.id)continue;m??(m=M),d.push(M.id),u.push(M)}const h=W(c.behavior);if(h.includes("no-nav"))return l;const p=m??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(p==null?void 0:p.id)??((k=l[0])==null?void 0:k.canvasId),canvasIds:[...new Set(d)],...h.includes("sequence")?{sequence:true}:{},...dl(c),children:l},v=Is(p==null?void 0:p.t);return v?g.time=v:!p&&((x=l[0])!=null&&x.time)&&(g.time=l[0].time),p!=null&&p.rect&&(g.region=p.rect),(h.includes("sequence")&&u.length>1&&!u.some(b=>b.t)||Pp(u,n))&&(g.parts=u.map(b=>({canvasId:b.id,...b.rect?{region:b.rect}:{}}))),[g]},s=W(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:da;return ua.set(t,a),a}function Pp(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 Vy(t,e,n,o){let r=null,s=null;const i=(l,d,u)=>!l||u>l.depth||u===l.depth&&!(l.sequence&&d.sequence),a=(l,d,u)=>{const m=u||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 p={id:l.id,depth:d,...l.sequence?{sequence:true}:{}};i(r,l,d)&&(r=p),m&&i(s,l,d)&&(s=p)}l.children.forEach(h=>a(h,d+1,m))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function Ap(){const t=ot(n=>n.status),e=ot(n=>n.error);return yt(()=>({status:t,error:e}),[t,e])}function Op(){return ot(t=>t.manifest)}function Ps(){return ot(t=>Rt(t.manifest))}function As(){return ot(t=>Ue(t.manifest,t.canvasId))}function Np(){return ot(t=>qe(t.manifest,t.canvasId))}function Rp(){const{clover:t}=le("useNavigation"),e=ot(o=>gn(o.manifest,o.canvasId)),n=ot(o=>Rt(o.manifest).views.length);return yt(()=>Cf(t,e,n),[t,e,n])}function Bp(){return ot(t=>Nc(t.manifest,t.addedSets))}function qy(t){const{language:e}=le("useLocalized");return yt(()=>xt(t,e),[t,e])}function Ky(){return Tt().t}function Zy(){return Tt().langOf}const $p=({options:t,onReady:e,onViewportChange:n,onMediaElement:o,onCaptionChange:r,caption:s,onEnded:i,placeholder:a=true,label:c,partOf:l,language:d,annotations:u,chapters:m,...h})=>{const p=le("Canvas"),{clover:g}=p,v=ne(g.captions.subscribe,g.captions.get,g.captions.get),y=s??v,k=d??p.language,x=As(),b=ot(R=>Bd(R.manifest,R.canvasId)),{direction:M}=Ps(),_=Op(),N=Np(),P=ot(R=>{var lt;return R.status==="loading"?"loading":((lt=R.manifest)==null?void 0:lt.id)??""}),Z=ot(R=>R.target),G=ot(R=>Rc(R.manifest,R.addedSets,R.search.set,R.regions)),j=ot(R=>nf(R.manifest,R.addedSets,R.hiddenSets,R.shownSets,!!Ss(R.manifest))),Q=ot(R=>ys(R.manifest,R.addedSets,R.hiddenSets,R.shownSets)),st=ot(R=>R.annotationId),pt=$(st);pt.current=st;const[S,C]=D(0);F(()=>g.found.subscribe(R=>{R&&R===pt.current&&C(lt=>lt+1)}),[g]);const A=ne(g.highlight.subscribe,g.highlight.get,g.highlight.get),V=ne(g.chapter.subscribe,g.chapter.get,g.chapter.get),q=x.map(R=>R.id).join("|"),rt=yt(()=>{if(u)return u;const R=x.map(lt=>lt.id);return G.flatMap(lt=>lt.entries.filter(Ot=>R.includes(Ot.canvasId)).map(Ot=>({annotation:Ot.annotation,targetIndex:R.indexOf(Ot.canvasId),pageId:lt.id,...lt.label?{pageLabel:lt.label}:{},...Ot.place?{place:Ot.place}:{},...Ot.layer?{layer:{key:Ot.layer.key,item:Ot.layer.item}}:{}})))},[u,G,x]),_t=Z?(R=>!!R&&x.some(lt=>lt.id===R))(Z.canvasId):false,w=$(null);_t&&(w.current=q);const I=a&&w.current!==q,O=$(null),B=$(null),U=yt(()=>x.some(R=>bo(R).length>0),[x]),H=U?x.find(R=>bo(R).length>0):void 0,T=Ep(_,H,k,Ip),z=$(U);z.current=U;const K=s===void 0?p.language:void 0,at=H==null?void 0:H.id;F(()=>{if(!K||!H)return;const R=ol(H).find(lt=>lt.language&&us(lt.language,K));R&&g.captions.get()!==R.id&&g.captions.emit(R.id)},[K,at,g]);const et=ut(()=>{const R=g.store.get().target;!R||!g.store.get().canvasId||Mp(R,O.current,B.current,z.current)&&g.consumeTarget()},[g]),gt=$(q);F(()=>{gt.current!==q&&(gt.current=q,B.current=null),Z&&et()},[Z,q,et]);const ft=$(e);ft.current=e;const zt=ut(R=>{var lt;O.current=R,R.on("change",et),et(),(lt=ft.current)==null||lt.call(ft,R)},[et]),$t=ut(R=>{var Ot;const lt=(Ot=O.current)==null?void 0:Ot.getCanvasRegion();g.viewport.emit(lt?{canvasId:lt.canvasId,region:{x:lt.rect.x,y:lt.rect.y,w:lt.rect.width,h:lt.rect.height}}:null),n==null||n(R)},[g,n]),Ft=ut(R=>{B.current=R,g.media.emit(R),R&&et(),o==null||o(R)},[g,et,o]),Bt=ut(()=>{i==null||i(),(De(_,"auto-advance")||De(N,"auto-advance"))&&g.next({autoplay:true,wrap:De(_,"repeat")})},[g,_,N,i]),vt=ut(R=>void Tp(g,R),[g]),Ht=(t==null?void 0:t.request)??g.request,X=De(N,"auto-advance")||De(_,"auto-advance"),ct=De(N,"repeat")||De(_,"repeat"),St=yt(()=>({...t,request:Ht,animation:(t==null?void 0:t.animation)??{autoplay:X,loop:ct}}),[t,Ht,X,ct]);return x.length?f(wp,{...h,manifestId:P,navPlace:_==null?void 0:_.navPlace,canvases:x,ahead:b,viewingDirection:M,language:k,label:c??(N==null?void 0:N.label)??(_==null?void 0:_.label),partOf:l??(_==null?void 0:_.label),options:St,placeholder:I,onReady:zt,onViewportChange:$t,onMediaElement:Ft,caption:y,onCaptionChange:R=>{g.captions.emit((R==null?void 0:R.id)??null),r==null||r(R)},onEnded:Bt,annotations:rt,hiddenPages:Q,unlistedPages:j,onPageVisibilityChange:(R,lt)=>R.forEach(Ot=>g.setSetVisible(Ot,lt)),chapters:m??T,highlightedChapter:V,onChapterHighlight:R=>g.chapter.emit(R),selectedAnnotation:st,refind:S,highlightedAnnotation:A,onAnnotationSelect:R=>g.selectAnnotation(R),onAnnotationLink:h.onAnnotationLink??vt,onAnnotationActive:R=>{var lt;g.highlight.emit(R),(lt=h.onAnnotationActive)==null||lt.call(h,R)}}):null},Fp=6,on=new Set;function Dp(t){if(on.has(t))return true;for(;on.size>=Fp;){let e;for(const n of on)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;on.delete(e),e.release()}return on.add(t),true}function fa(t){on.delete(t)}function zp(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function Hp(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 Wp=`#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
|
-
`,Up=-.5,jp=`#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, ${Up.toFixed(1)}) * u_opacity;
|
|
22
|
-
}
|
|
23
|
-
`;class _o{constructor(e,n,o){L(this,"kind","webgl2");L(this,"canvas");L(this,"maxTextureSize");L(this,"gl");L(this,"program",null);L(this,"vao",null);L(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});L(this,"textures",new Map);L(this,"cssWidth",1);L(this,"cssHeight",1);L(this,"pixelRatio",1);L(this,"matrixScratch",new Float32Array(9));L(this,"isLost",false);L(this,"callbacks");L(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=Vp(n,Wp,jp);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 _o(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||!zp(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=Hp(e,this.pixelRatio),i=pe(e.transform,ae(r.x,r.y),he(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,rp(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),qp(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 Vp(t,e,n){const o=ha(t,t.VERTEX_SHADER,e),r=ha(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 ha(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 qp(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function fl(t,e){return pe(ae(e.width/2,e.height/2),Dn(t.rotation),he(t.zoom),ae(-t.x,-t.y))}function hl(t,e){return pe(ae(t.x,t.y),he(1/t.zoom),Dn(-t.rotation),ae(-e.width/2,-e.height/2))}function pa(t,e,n){return Se(hl(t,e),n)}function Kp(t,e,n){return Se(fl(t,e),n)}function Vr(t,e){return Ro(hl(t,e),{x:0,y:0,width:e.width,height:e.height})}function Zp(t,e,n=0,o=0){const r=Ro(Dn(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=al(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function wo(t,e,n,o,r){const s=Se(pe(he(1/n),Dn(-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 ma(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const Gp=.09,Xp=1e-4,ga=.05,Yp=1e-4;class Jp{constructor(e,n=Gp,o){L(this,"current");L(this,"target",null);L(this,"timeConstant");L(this,"spring");L(this,"start");L(this,"elapsed",0);this.current={...e},this.start={...e},this.timeConstant=n,this.spring=o}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){const r=this.spring?this.spring.duration<=0:this.timeConstant===0;if(o||r){this.set(e.state);return}let s=e.anchor;if(s){const i=wo(s.world,s.screen,e.state.zoom,e.state.rotation,n);Math.hypot(i.x-e.state.x,i.y-e.state.y)*e.state.zoom>ga&&(s=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...e.state},anchor:s}}stop(){this.target=null}step(e,n){const o=this.target;if(!o)return false;const r=o.state;let s,i;if(this.spring){this.elapsed+=Math.max(e,0);const u=this.elapsed/this.spring.duration;if(u>=1)return this.current={...r},this.target=null,false;const m=this.spring.stiffness;s=this.start,i=(1-Math.exp(-m*u))/(1-Math.exp(-m))}else s=this.current,i=1-Math.exp(-Math.max(e,0)/this.timeConstant);const a=Math.exp(Math.log(s.zoom)+(Math.log(r.zoom)-Math.log(s.zoom))*i),c=s.rotation+(r.rotation-s.rotation)*i,l=o.anchor?wo(o.anchor.world,o.anchor.screen,a,c,n):{x:s.x+(r.x-s.x)*i,y:s.y+(r.y-s.y)*i};return this.current={x:l.x,y:l.y,zoom:a,rotation:c},this.spring?true:Math.abs(Math.log(r.zoom/a))<Xp&&Math.abs(r.rotation-c)<Yp&&Math.hypot(r.x-l.x,r.y-l.y)*a<ga?(this.current={...r},this.target=null,false):true}}const pl=5,va=300,Qp=pl*4;function ya(t,e=false){return t==="touch"||t==="pen"&&!e}function tm(t){return t.pointerType==="pen"&&t.buttons===0}function em(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 ba(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const qr={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},gr=2,_a=1.5,wa=.1,nm=100,om=.002,rm=.01;class sm{constructor(e,n,o=qr){L(this,"pointers",new Map);L(this,"samples",[]);L(this,"down",null);L(this,"pinch",null);L(this,"lastTap",null);L(this,"lastPointerType","");L(this,"penHovers",false);L(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||ba(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))});L(this,"onPointerMove",e2=>{var r;tm(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)>pl&&(this.down.moved=true),(r=this.down)!=null&&r.moved&&this.options.navigable&&this.target.panBy(s,i,!this.tracksPointer(e2.pointerType)),this.samples.push({x:o2.x,y:o2.y,t:e2.timeStamp});const a=e2.timeStamp-nm;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}});L(this,"onPointerUp",e2=>{var c,l,d,u,m,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[p]=this.pointers.values();this.samples=[{...p,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<va){if((u=(d=this.target).dismiss)!=null&&u.call(d)){this.lastTap=null;return}if(ya(e2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&e2.timeStamp-p.t<va&&Math.hypot(o2.x-p.x,o2.y-p.y)<Qp?(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/gr,o2,true):this.zoomIn(o2):(h=(m=this.target).tap)==null||h.call(m,o2);return}if(!this.options.navigable||!this.tracksPointer(e2.pointerType))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 p=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3,v=this.options.flickMomentum;v>0&&Math.hypot(p,g)>this.options.flickMinSpeed&&this.target.panBy(p*v,g*v,true)}});L(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||ya(this.lastPointerType,this.penHovers)||ba(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/gr,this.local(e2),true):this.zoomIn(this.local(e2))))});L(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&em(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=im(e2),r=n2?rm:om;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});L(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*wa*(e2.shiftKey?3:1),r=n2.height*wa*(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(_a,void 0,true);break;case"-":case"_":this.target.zoomBy(1/_a,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(gr,e,true)}tracksPointer(e){return e==="touch"||this.options.flickEnabled}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 im(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class ml extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const xa=new Set;async function am(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=af(r),i=lm(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return vr(t,{signal:n,cors:true,withCredentials:s});if(i&&xa.has(i))return vr(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await _s(r,t,{mode:"cors",signal:n})}catch(m){if(um(m,n))throw m;const h=await vr(t,{signal:n,cors:false,withCredentials:s});return i&&xa.add(i),h}if(!a.ok)throw ws(a),new ml(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await cm(c);const d=l.width,u=l.height;if(o&&(l.width>o||l.height>o)){const m=o/Math.max(l.width,l.height),h=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*m)),resizeHeight:Math.max(1,Math.floor(l.height*m)),resizeQuality:"high"});l.close(),l=h}if(n!=null&&n.aborted)throw l.close(),Kr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:d,naturalHeight:u,opaque:false}}async function cm(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 vr(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Kr());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(Kr())};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 ml("Image failed to load",t))},i.src=t})}function lm(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function um(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Kr(){const t=new Error("Aborted");return t.name="AbortError",t}function Sa(t){t.kind==="bitmap"&&t.source.close()}const dm=192*1024*1024,fm=16,hm=2;class pm{constructor(e){L(this,"entries",new Map);L(this,"inFlight",0);L(this,"frame",0);L(this,"bytes",0);L(this,"wanted",[]);L(this,"disposed",false);L(this,"budget");L(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??dm,this.maxInFlight=e.maxInFlight??fm}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:yr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=yr(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){Sa(s);return}e.state="ready",e.image=s,e.bytes=yr(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<hm&&!mm(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&&Sa(o.image),this.options.onEvict(o.url)}}}function yr(t){return t.width*t.height*4}function mm(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 gm=.1;class vm{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){L(this,"handle",0);L(this,"last",0);L(this,"disposed",false);L(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,gm):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 ym=2*1024*1024;function bm(t,e,n=ym){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 _m(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 wm(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(p=>!Number.isFinite(p)))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 d=Math.max(0,i),u=Math.max(0,a),m=Math.min(e,i+c),h=Math.min(n,a+l);return m<=d||h<=u?null:{x:d,y:u,width:m-d,height:h-u}}const br=512,xm=1024,Sm=16e6;function gl(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 km(t,e=xm){const{width:n,height:o}=t,r=[],s=t.regionByPx&&t.sizeByW,i=(h,p,g)=>{const v=Math.ceil(n/h),y=Math.ceil(o/h);return{scaleFactor:h,width:v,height:y,tileWidth:p,tileHeight:g,cols:Math.ceil(v/p),rows:Math.ceil(y/g)}},a=(h,p)=>({scaleFactor:n/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),c=t.tiles[0];if(c){const{width:h,height:p}=s?Cm(t,c,e):c;for(const g of c.scaleFactors)r.push(i(g,h,p))}else if(s){let h=Math.max(br,e);for(;h>br&&!Zr(t,h,h);)h/=2;for(let p=1;;p*=2){const g=i(p,h,h);if(r.push(g),g.cols===1&&g.rows===1)break}}const l=Math.max(0,...r.map(h=>h.scaleFactor));for(const h of t.sizes){const p=n/h.width;Zr(t,h.width,h.height)&&p>l+1e-9&&r.push(a(h.width,h.height))}const d=r.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(d&&d.cols*d.rows>1&&t.sizeByW){const h=Math.max(n,o)/br;r.push(a(Math.ceil(n/h),Math.ceil(o/h)))}(!r.length||!c&&!s&&n*o<=Sm)&&(r.some(h=>h.scaleFactor===1)||r.push(a(n,o)));const u=Em(r).sort((h,p)=>p.scaleFactor-h.scaleFactor),m=Eh(t);return{width:n,height:o,levels:u,tile(h){const p=u[h.level],g=p.scaleFactor,v=p.cols===1&&p.rows===1;let y,k,x;if(v)y={x:0,y:0,width:n,height:o},k=p.width,x=p.height;else{const b=Math.round(h.col*p.tileWidth*g),M=Math.round(h.row*p.tileHeight*g);y={x:b,y:M,width:Math.min(Math.round(p.tileWidth*g),n-b),height:Math.min(Math.round(p.tileHeight*g),o-M)},k=Math.ceil(y.width/g),x=Math.ceil(y.height/g)}return{...h,region:y,url:vo(t,y,k,x),fallbackUrl:m?vo(t,y,k,x,m):void 0}}}}function Cm(t,e,n){let o=Math.max(1,Math.floor(n/Math.max(e.width,e.height)));for(;o>1&&!Zr(t,e.width*o,e.height*o);)o--;return{width:e.width*o,height:e.height*o}}function Zr(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Em(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 Mm(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 we(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 d=Math.max(0,Math.floor(i/r)),u=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),m=Math.max(0,Math.floor(a/s)),h=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),p=[];for(let g=m;g<=h;g++)for(let v=d;v<=u;v++)p.push({level:e,col:v,row:g});return p}async function ka(t,e){if(t.media)return Im(t,t.media);let n=null,o=null;if(t.service)try{n=km(await Ts(t.service,e.infoOptions))}catch(m){o=m}if(!n){if(!t.url)throw o??new Error("Image has no source");const m=await e.loadStatic(t.url);e.cache.seed(t.url,m),n=gl(t.url,m.naturalWidth,m.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=wm(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=_m(t.rotation),d=l?Lm(c,l):void 0;return{id:t.id,spec:t,pyramid:n,size:r,clip:c,contentClip:s,rect:{x:0,y:0,width:s.width,height:s.height},...d?{turn:d}:{}}}function Tm(t,e){if(t.media)return Promise.resolve();const{pyramid:n,clip:o}=t;return e.prefetch(we(n,0,o).map(r=>{const s=n.tile(r);return{url:s.url,fallbackUrl:s.fallbackUrl}}))}const vl="media:";function Im(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=`${vl}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:gl(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 Lm(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=d=>Math.abs(d)<1e-12?0:d,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=pe(ae(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},he(n?-1:1,1),ae(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:op(l),width:a,height:c}}function yl(t){var e;return((e=t.turn)==null?void 0:e.orient)??ae(-t.clip.x,-t.clip.y)}function Pm(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Ro(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 Am(t,e){const{turn:n,clip:o}=t;return n?Se(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function Ca(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 Ea(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return an(t.map(o=>o.rect))}const e=Ca(t[0]).height;let n=0;for(const o of t){const r=Ca(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 Bo(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function Om(t){const e=Bo(t);return pe(ae(t.rect.x,t.rect.y),he(e.x,e.y),yl(t))}function Nm(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 Rm=5e6,bl=1e7,Bm=15e6,$m=2e7,Ma=2;function Ta(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=t.has??(h=>s(h)!==void 0),c=fl(n,o),l=[],d=[],u=[],m=(h,p,g)=>{const v=h.tile(p);d.push({url:v.url,fallbackUrl:v.fallbackUrl,priority:g})};for(const h of e){const{pyramid:p,clip:g,rect:v}=h,y=Bo(h);if(t.wantOverview)for(const S of we(p,0,g))m(p,S,$m);const k=Ia(h,n,o,r),x=i?Ia(h,i,o,r):k;if(u.push((k==null?void 0:k.target)??-1),!k&&!x)continue;const b=S=>C=>{const A=p.tile(C).region;return Math.hypot(A.x+A.width/2-S.x,A.y+A.height/2-S.y)};if(x){const S=b(x.center);for(const C of we(p,0,x.area))m(p,C,S(C)/1e3);if(x.target>0)for(const C of we(p,x.target,x.area))m(p,C,bl+S(C))}if(!k)continue;const{area:M,target:_}=k,N=b(k.center),P=we(p,0,M),Z=_===0?[]:we(p,_,M);if(x!==k){for(const C of P)m(p,C,N(C)/1e3);const S=_-Ma;if(S>0)for(const C of we(p,S,M))m(p,C,Bm+N(C))}const G=_-Ma;if(x===k&&G>0){const S=new Set;for(const C of Z){const A=p.tile(C);if(!a(A.url))for(const V of we(p,G,A.region)){const q=`${V.col},${V.row}`;S.has(q)||(S.add(q),m(p,V,Rm+N(V)))}}}if(h.spec.hidden)continue;const st=(_===0?P:Z).every(S=>s(p.tile(S).url)!==void 0)?[_]:Array.from({length:_+1},(S,C)=>C),pt=pe(c,ae(v.x,v.y),he(y.x,y.y),yl(h));for(const S of st){const C=S===0?P:S===_?Z:we(p,S,M),A=p.levels[S].cols*p.levels[S].rows>1;for(const V of C){const q=p.tile(V),rt=s(q.url);if(!rt)continue;const tt=Fm(h,q.region,rt,pt,A);tt&&l.push({...tt,url:q.url})}}}return d.sort((h,p)=>h.priority-p.priority),{draws:l,wants:Dm(d),levels:u}}function Ia(t,e,n,o){const{pyramid:r,rect:s}=t,i=Vr(e,n);if(!ip(i,s))return null;const a=Bo(t),c=Math.max(i.x,s.x),l=Math.max(i.y,s.y),d=Math.min(i.x+i.width,s.x+s.width),u=Math.min(i.y+i.height,s.y+s.height),m=1/(a.x*e.zoom*o);return{area:Pm(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(d-c)/a.x,height:(u-l)/a.y}),center:Am(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Mm(r,m)}}function Fm(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 d=n.width/e.width,u=n.height/e.height,m=1e-6;return{item:t,image:n,transform:pe(o,ae(e.x,e.y),he(1/d,1/u)),crop:{x:(i-e.x)*d,y:(a-e.y)*u,width:(c-i)*d,height:(l-a)*u},bleed:{right:r&&c<s.x+s.width-m,bottom:r&&l<s.y+s.height-m}}}function Dm(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const zm={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,upscale:true,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:16,releaseAfterMs:2e3},Hm=2,Wm=3,Um=.1,_r=1e-6,La=1e8,jm=6,Gr={top:0,right:0,bottom:0,left:0};function Pa(t,e="padding"){if(!t||typeof getComputedStyle!="function")return Gr;const n=getComputedStyle(t),o=r=>parseFloat(n.getPropertyValue(`${e}-${r}`))||0;return{top:o("top"),right:o("right"),bottom:o("bottom"),left:o("left")}}const Vm=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let qm;class Km{constructor(e,n={}){L(this,"host");L(this,"overlays",null);L(this,"options");L(this,"backend",null);L(this,"backendPreference");L(this,"contextLosses",0);L(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});L(this,"visible",true);L(this,"dom",null);L(this,"domAsked",false);L(this,"pending",null);L(this,"camera");L(this,"loop");L(this,"gestures");L(this,"gestureOptions",{});L(this,"cache");L(this,"navigator",null);L(this,"navigatorAsked",0);L(this,"viewport",{width:1,height:1});L(this,"inset",Gr);L(this,"pixelRatio",1);L(this,"items",[]);L(this,"worldBounds",null);L(this,"contentVersion",0);L(this,"opaqueUrls",new Set);L(this,"mediaByKey",new Map);L(this,"detachMedia",[]);L(this,"opened",false);L(this,"atHome",true);L(this,"interacting",false);L(this,"lastEmitted",null);L(this,"generation",0);L(this,"landing",[]);L(this,"ahead",null);L(this,"listeners",new Map);L(this,"unloadable",false);L(this,"resizeObserver",null);L(this,"intersectionObserver",null);L(this,"releaseTimer",null);L(this,"dprQuery",null);L(this,"disposed",false);L(this,"dismisser",null);L(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o2=this.camera.current,r2=this.backend,s=bm(this.getTile,d=>r2?r2.has(d):true),i=Ta({items:this.items,camera:o2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,has:this.hasTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=(this.landing.length?[...this.landing,...i.wants]:i.wants).filter(d=>!d.url.startsWith(vl));if(this.cache.update(a),this.ahead&&!n2&&!this.cache.pending){const d=this.ahead;this.ahead=null,this.readAhead(d)}return i.draws.length?this.setUnloadable(false):a.length&&a.every(d=>this.cache.failed(d.url))&&this.setUnloadable(true),this.paint(i.draws),(c=this.overlays)==null||c.position(o2,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(d=>!d.spec.hidden),this.worldBounds,Vr(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!ma(this.lastEmitted,o2))&&(this.lastEmitted={...o2},this.opened&&this.emit("viewport")),n2||s.deferred});L(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));L(this,"hasTile",e2=>this.mediaByKey.has(e2)||this.cache.has(e2));L(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});L(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...zm,...wr(n)},Oa()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new Jp({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new vm(this.tick),this.gestureOptions=wr(n.gestures??{}),Oa()&&(this.gestureOptions.flickMomentum=0),this.gestures=new sm(e,this,{...qr,...this.gestureOptions}),this.cache=new pm({load:(s,i)=>this.loadTile(s,i),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:s=>{var i;return(i=this.backend)==null?void 0:i.release(s)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Zm(e),this.visible?this.acquireBackend():this.holder.hiddenSince=Aa(),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=()=>r!==this.generation||this.disposed,i=new Map(this.items.map(v=>[v.id,v]));this.landing=[],this.ahead=null;const a=this.prepareContext(),c=[],l=e.map(v=>{const y=i.get(v.id);if(y&&Nm(y.spec,v))return y.spec=v,{item:Promise.resolve(y),ready:Promise.resolve()};let k,x,b;const M=new Promise((N,P)=>{k=N,x=P}),_=new Promise(N=>b=N);return c.push(()=>ka(v,a).then(N=>(k(N),Tm(N,this.cache)),x).then(b,b)),{item:M,ready:_}}),d=()=>{var v;return(v=c.shift())==null?void 0:v().then(d)};for(let v=0;v<jm;v++)d();const u=e.flatMap(v=>v.placement?[v.placement]:[]);let m=false;if(!this.items.length&&e.length>1&&u.length===e.length){const v=an(n?[n,...u]:u),y=[];l.forEach(({item:k,ready:x},b)=>{Promise.all([k,x]).then(([M])=>{s()||(y[b]=M,this.place(y.filter(Boolean),v,o,!m,false),m=true)},()=>{})})}const h=await Promise.allSettled(l.map(({item:v})=>v));if(s()||(this.landing=this.landingWants(h.flatMap(v=>v.status==="fulfilled"?[v.value]:[]),n,o||!this.opened),this.invalidate(),await Promise.all(l.map(({ready:v})=>v)),s()))return;this.landing=[];const p=h.filter(v=>v.status==="fulfilled").map(v=>v.value),g=h.filter(v=>v.status==="rejected").map(v=>v.reason);g.length&&this.emit("error",g),this.setUnloadable(e.length>0&&!p.length&&g.length>0),this.place(p,n,o,!m,true)}place(e,n,o,r,s){this.items=e,this.watchMedia(e);const i=Ea(e);this.worldBounds=n?i?an([n,i]):n:i,this.contentVersion++,this.worldBounds&&(this.opened?r?(o?this.home(true):this.camera.set(this.constrain(this.camera.current)),this.emit("change")):s&&this.emit("change"):(this.opened=true,this.home(true),this.emit("open"))),this.invalidate()}prefetch(e,{world:n}={}){const o=e.filter(r=>!r.media);this.ahead=o.length?{images:o,world:n}:null,this.ahead&&this.invalidate()}async readAhead({images:e,world:n}){const o=this.generation,r=this.prepareContext(),s=(await Promise.allSettled(e.map(a=>ka(a,r)))).flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(!s.length||o!==this.generation||this.disposed)return;const i=this.landingWants(s,n,true).filter(a=>a.priority<bl-La);await this.cache.prefetch(i)}prepareContext(){return{cache:this.cache,loadStatic:e=>this.loadTile(e),infoOptions:{request:this.options.request}}}clear(){this.setUnloadable(false),this.generation++,this.landing=[],this.ahead=null,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(e){const n=new Set(e);let o=false;for(const r of this.items){const s=n.has(r.id);!!r.spec.hidden!==s&&(r.spec={...r.spec,hidden:s},o=true)}o&&this.invalidate()}isReady(e){const n=this.items.find(r=>r.id===e);if(!n)return false;if(n.spec.media)return true;const o=n.pyramid.levels[0];if(!o)return false;for(let r=0;r<o.rows;r++)for(let s=0;s<o.cols;s++)if(!this.getTile(n.pyramid.tile({level:0,col:s,row:r}).url))return false;return true}fitBounds(e,n=false,o=Gr){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i},a=1/0){const{width:c,height:l}=this.viewport,d=Zp(e,{width:Math.max(1,c-i-r),height:Math.max(1,l-o-s)},n),u=Math.min(d.zoom,a);return{...wo(al(e),{x:(c+i-r)/2,y:(l+o-s)/2},u,n,this.viewport),zoom:u,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*Um;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,Pa((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return Vr(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var n;const e=((n=this.homeCamera())==null?void 0:n.zoom)??1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.closestZoom())}}closestZoom(e=this.items){const n=e.length?Math.min(...e.map(o=>Bo(o).x)):1;return this.options.maxZoomPixelRatio/n}home(e=false){const n=this.homeCamera();if(!n)return;const o=this.atHome;this.atHome=true,this.animateTo(n,e),!o&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-_r)}viewLimits(){const{zoom:e,x:n,y:o,rotation:r}=this.camera.destination,{min:s,max:i}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:e>=i*(1-_r),atMin:e<=s*(1+_r),atHome:this.atHome&&(!a||Math.abs(e/a.zoom-1)<.001&&Math.hypot(n-a.x,o-a.y)*e<.5&&Math.abs(r-a.rotation)<.001)}}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=pa(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=Sn(r.zoom*e,a,c),d=wo(i,s,l,r.rotation,this.viewport),u=this.constrain({...r,...d,zoom:l});this.atHome=false,o?this.camera.animateTo({state:u,anchor:{world:i,screen:s}},this.viewport):this.camera.set(u),this.invalidate()}panBy(e,n,o=false){const r=o?this.camera.destination:this.camera.current,s=Se(pe(he(1/r.zoom),Dn(-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)}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({...qr,...this.gestureOptions,...wr(e)})}setInteracting(e){if(this.interacting=e,e){this.camera.stop();return}if(this.options.constrainDuringPan)return;const n=this.camera.destination,o=this.constrain(n);ma(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return Kp(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return pa(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 Ro(pe(Om(o),he(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-Gt56cM6f.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)}landingWants(e,n,o){const r=e.map(l=>({...l,rect:{...l.rect}})),s=Ea(r),i=n?s?an([n,s]):n:s;if(!i)return[];const a=o?this.homeCamera(i,r):this.camera.destination;if(!a)return[];const{wants:c}=Ta({items:r,camera:a,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:l=>this.cache.get(l)});return c.map(l=>({...l,priority:l.priority-La}))}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-CEzVM7HQ.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 am(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof _o?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(e=this.worldBounds,n=this.items){if(!e)return null;const o=2*Math.PI,r=Math.round(this.camera.destination.rotation/o)*o||0;return this.fit(e,r,this.inset,this.options.upscale?1/0:this.closestZoom(n))}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?Sn(e.zoom,r,Math.max(s,e.zoom)):Sn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:Sn(e.x,o.x,o.x+o.width),y:Sn(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<Wm);let r=null;o&&(Dp(this.holder)||this.backendPreference==="webgl2")&&(r=_o.create(n,{onLost:this.onContextLost}),r||fa(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(qm??(qm=import("./Canvas2DBackend-3b5xEKac.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(fa(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=Aa()),!(!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=Pa(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Hm);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&Vm(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,d=o/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*d}))}this.emit("viewport")}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 Aa=()=>typeof performance<"u"?performance.now():Date.now();function Zm(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 Oa(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function wr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const Gm=(t,e)=>new Km(t,e),Xm=bt(()=>import("./Connected-FiJKHEv9.mjs")),Ym=bt(()=>import("./Connected-B2TrgX9-.mjs").then(t=>t.C));function Jm({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var p;const a=le("Body");Kc(a.clover,r);const c=As(),l=yt(()=>Tf(c),[c]),d=If(n??a.renderers,{canvases:c,bodies:l}),u=d==null?void 0:d.component,m=((p=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:p.type)??"Canvas",h=ot(g=>g.status==="loading");return f("div",{"aria-busy":h,className:Pt("clover-body",t),"data-renderer":u?"custom":m.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[u?f(u,{canvases:c,bodies:l,children:s}):m==="Scene"?f(kt,{fallback:f(Tn,{overlay:true}),children:f(Ym,{...i,children:s})}):m==="Timeline"?f(kt,{fallback:f(Tn,{overlay:true}),children:f(Xm,{...i,children:s})}):f($p,{...i,collapseControls:o,surface:Gm,children:s}),h&&f(Tn,{overlay:true})]})}const Qm={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function zn(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 Qm[n.toLowerCase()]??e})}const tg=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function eg(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 ng(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 $o=(t,e)=>e==="canvas"?qe(t.manifest,t.canvasId):t.manifest,_l=me(null),Os=()=>Vt(_l),cn=ce(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var m;const a=$n(h=>{var p,g;return e==="canvas"?(p=qe(h.manifest,h.canvasId))==null?void 0:p.label:(g=h.manifest)==null?void 0:g.label},void 0),c=Os(),l=(m=Be())==null?void 0:m.language,{text:d,lang:u}=xt(n??(c?c.label:a),l);return d?f(o,{ref:i,className:Pt("clover-label",r),...dt(u),...s,children:zn(d)}):null});function og(t,e,n){const o=(d,u)=>Math.min(Math.max(Math.round(d),0),u),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 d=Math.min(1,e/Math.max(i.width,i.height));return t.maxWidth&&(d=Math.min(d,t.maxWidth/i.width)),t.maxHeight&&(d=Math.min(d,t.maxHeight/i.height)),t.maxArea&&(d=Math.min(d,Math.sqrt(t.maxArea/(i.width*i.height)))),vo(t,i,Math.max(1,Math.floor(i.width*d)),Math.max(1,Math.floor(i.height*d)))}if(!a)return null;const c=[...t.sizes].sort((d,u)=>d.width-u.width),l=c.find(d=>Math.max(d.width,d.height)>=e)??c.at(-1)??{width:t.width,height:t.height};return vo(t,i,l.width,l.height)}function ln(t){var e;return(e=ks(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function rg(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 ke(t,e="full",n=false){if(!t)return null;const o=Oo(t.service);if(o){if(e!=="full")return{service:o,region:e,fallback:t.id};const{width:r,height:s}=t;return n&&t.id&&r>0&&s>0?{service:o,fallback:t.id,fallbackSize:{width:r,height:s}}:{service:o,fallback:t.id}}return t.id?{src:t.id}:null}function Ns(t){const e=t;return e?ke(W(e.thumbnail)[0],"full",true)??ke(ln(e))??ke(ln(e.placeholderContainer))??ke(ln(e.accompanyingContainer)):null}function sg(t){const e=t;return e?ke(ln(e))??ke(ln(e.placeholderContainer))??ke(ln(e.accompanyingContainer))??ke(W(e.thumbnail)[0],"full",true):null}async function Rs(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;const o=t.fallbackSize;if(o&&t.fallback&&t.region===void 0){const r=Math.max(o.width,o.height);if(r>=e&&r<=e*2)return t.fallback}try{const r=await Ts(t.service,{request:n}),s=typeof t.region=="string"?rg(t.region,r):t.region;return s===null?t.fallback:og(r,e,s)??t.fallback}catch{return t.fallback}}const ig=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ke,resolveThumbnail:Rs,stillSource:sg,thumbnailSource:Ns},Symbol.toStringTag,{value:"Module"})),Na='.clover-items-item[role="option"], .clover-items-link',sn=new Map;let Dt=null,ie=null,Xr=0;function Bs(t){const e=sn.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 Yr(){cancelAnimationFrame(Xr),Xr=requestAnimationFrame(()=>sn.forEach((t,e)=>Bs(e)))}function wl(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,Na);n&&e.add(n);try{document.querySelectorAll(`:is(${Na}):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=>Gc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function ag(){var t,e;Dt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>Bs(o.target))),ie=typeof MutationObserver>"u"?null:new MutationObserver(Yr),ie==null||ie.observe(document.head,{childList:true,subtree:true,characterData:true}),ie==null||ie.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Yr),document.addEventListener("keydown",wl,true)}function cg(){var t,e,n;cancelAnimationFrame(Xr),(t=Dt==null?void 0:Dt.disconnect)==null||t.call(Dt),ie==null||ie.disconnect(),Dt=ie=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Yr),document.removeEventListener("keydown",wl,true)}function lg(t,e){var n;return sn.size||ag(),sn.set(t,{change:e}),(n=Dt==null?void 0:Dt.observe)==null||n.call(Dt,t),Bs(t),()=>{var o;sn.delete(t),(o=Dt==null?void 0:Dt.unobserve)==null||o.call(Dt,t),sn.size||cg()}}const ug=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function xl(t,e){if(typeof t!="string")return null;const n=ug.exec(t.trim());if(!n)return null;const[o,r,s,i=0,a=0,c=0]=n.slice(1,7).map(u=>u===void 0?void 0:Number(u)),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 d=!i&&!a&&!c&&!Number(n[7]??0);return{at:l,precision:e??(d?s!==1?"day":r!==1?"month":"year":"time")}}const dg=bt(()=>import("./NavDate-BJ_MF_t1.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function fg(t,e,n,o){const r=t.source!==void 0?t.source:Ns(t.resource),[s,i]=D(r==null?void 0:r.src),a=(r==null?void 0:r.src)??(r==null?void 0:r.service)??(r==null?void 0:r.fallback);return F(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return Rs(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const hg=()=>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 pg({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=D(null),a=il(s,sl,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=fg(t,e,n,a),[d,u]=D(false),{width:m,height:h}=t.resource??{},p=m&&h?m/h:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":d,"data-empty":c?void 0:true,style:c&&!(m&&h)?void 0:{"--clover-items-ratio":p},children:[!c&&l&&Fn(t.media)&&f(hg,{}),c&&f("img",{src:c,alt:o,...dt(o?r:void 0),width:e,height:Math.round(e/p),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>u(true),onError:()=>u(true)}),t.duration?f("span",{className:"clover-items-duration",children:Mh(t.duration)}):null]})}function mg({text:t,lang:e,first:n}){const o=$(null),[r,s]=D(false);return F(()=>{const i=o.current;if(!(!i||!t))return lg(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",...dt(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...dt(e),"aria-hidden":"true",hidden:true,children:t})]})}function gg({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var u,m;const a=t.parts.map(h=>xt(t.parts.length===1?t.label:h.label,n)),c=r&&s==="summary"?xt(t.summary,n):null,l=r&&s==="navDate"?xl(t.navDate):null,d=a.some(h=>h.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(m=(u=t.parts[0])==null?void 0:u.media)==null?void 0:m.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,p)=>{const g=a[p].text?{text:""}:xt(h.label,n);return f(pg,{part:h,size:e,request:o,alt:g.text,altLang:g.lang},h.id)})}),(d||l||(c==null?void 0:c.text))&&f("figcaption",{className:"clover-items-caption",style:i?void 0:je,children:[a.map((h,p)=>f(mg,{text:h.text,lang:h.lang,first:p===0},t.parts[p].id)),l&&f(kt,{fallback:null,children:f(dg,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...dt(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function vg(t){var e;return(e=ks(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function Sl(t){const e=vg(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 Ra=new WeakMap;function kl(t){if(!t)return[];let e=Ra.get(t);if(!e){const{canvases:n,views:o}=Rt(t);e=o.map(r=>{const s=r.map(i=>Sl(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>xt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),Ra.set(t,e)}return e}const Ba=new WeakMap;function xo(t){if(!t)return[];let e=Ba.get(t);return e||(e=W(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[Sl(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=W(n.homepage)[0])==null?void 0:o.id)??n.id,...An(W(n.homepage)[0])?{hrefLang:An(W(n.homepage)[0])}:{}}}),Ba.set(t,e)),e}function Gy(t){return t?Array.isArray(t)?xo({items:t}):t.type==="Collection"?xo(t):kl(t):[]}function Cl(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const $s=(t,e="p")=>Cl(t)??e;function El(t,e,n="p"){const o=Cl(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function yg(t,e,{orientation:n="both",rtl:o=false,upward:r=false,onActivate:s,onMove:i}={}){const[a,c]=D(Math.max(0,e)),l=$([]),d=$(s);d.current=s;const u=$(i);u.current=i,F(()=>{e>=0&&c(e)},[e]);const m=Math.min(a,Math.max(0,t-1)),h=ut(v=>{var y;c(v),(y=l.current[v])==null||y.focus()},[]),p=ut((v,y)=>{var Z,G;const k=o?"ArrowLeft":"ArrowRight",x=o?"ArrowRight":"ArrowLeft",b=r?"ArrowUp":"ArrowDown",M=r?"ArrowDown":"ArrowUp",_=n!=="vertical",N=n!=="horizontal";let P=null;if(_&&v.key===k||N&&v.key===b)P=Math.min(t-1,y+1);else if(_&&v.key===x||N&&v.key===M)P=Math.max(0,y-1);else if(v.key==="Home")P=0;else if(v.key==="End")P=t-1;else if(v.key==="Enter"||v.key===" "){(Z=d.current)==null||Z.call(d,y,v),v.preventDefault();return}P!==null&&(v.preventDefault(),h(P),P!==y&&((G=u.current)==null||G.call(u,P,v)))},[t,n,o,r,h]);return{focused:m,itemProps:v=>({ref:y=>{l.current[v]=y},tabIndex:v===m?0:-1,onKeyDown:y=>p(y,v),onFocus:()=>c(v)})}}const bg=5,_g=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function Ml({align:t="start",dragFree:e=false,itemCount:n=0,axis:o="x",upward:r=false}={}){const s=o==="y",[i,a]=D(null),[c,l]=D(false),[d,u]=D(false),m=$(t);m.current=t;const h=e?"none":`${o} mandatory`,p=ut(()=>{if(!i)return;const b=Math.abs(s?i.scrollTop:i.scrollLeft),M=s?i.scrollHeight-i.clientHeight:i.scrollWidth-i.clientWidth;l(r?b<M-1:b>1),u(r?b>1:b<M-1)},[i,s,r]);F(()=>{if(!i)return;const b=i.style;b.overflowX=s?"hidden":"auto",b.overflowY=s?"auto":"hidden",b.scrollSnapType=h,b.setProperty("--clover-track-align",t),b.overscrollBehaviorX=s?"":"contain"},[i,h,t,s]),F(()=>{if(!i)return;let b=0;const M=()=>{cancelAnimationFrame(b),b=requestAnimationFrame(p)};p(),i.addEventListener("scroll",M,{passive:true});const _=typeof ResizeObserver<"u"?new ResizeObserver(M):null;return _==null||_.observe(i),i.firstElementChild&&(_==null||_.observe(i.firstElementChild)),()=>{cancelAnimationFrame(b),i.removeEventListener("scroll",M),_==null||_.disconnect()}},[i,p,n]);const g=ut((b,M=false)=>{if(!i||!b)return;const _=M||_g()?"auto":"smooth";i.scrollBy({[s?"top":"left"]:b,behavior:_})},[i,s]),v=ut((b,{instant:M=false}={})=>{const _=i==null?void 0:i.querySelector(`[data-track-index="${b}"]`);if(!i||!_)return false;const N=i.getBoundingClientRect(),P=_.getBoundingClientRect(),Z=getComputedStyle(i).direction==="rtl";return s?(g(m.current==="center"?P.top+P.height/2-(N.top+N.height/2):P.top-N.top,M),true):(g(m.current==="center"?P.left+P.width/2-(N.left+N.width/2):Z?P.right-N.right:P.left-N.left,M),true)},[i,g,s]),y=ut(b=>{if(!i)return;const M=s?r:getComputedStyle(i).direction==="rtl",_=s?i.clientHeight:i.clientWidth;g(b*_*.9*(M?-1:1))},[i,g,s,r]),k=ut(()=>y(1),[y]),x=ut(()=>y(-1),[y]);return F(()=>{if(!i)return;let b=null,M=false;const _=G=>{G.pointerType!=="mouse"||G.button!==0||(b={x:s?G.clientY:G.clientX,scroll:s?i.scrollTop:i.scrollLeft},M=false)},N=G=>{var Q;if(!b)return;const j=(s?G.clientY:G.clientX)-b.x;!M&&Math.abs(j)<bg||(M||(M=true,(Q=i.setPointerCapture)==null||Q.call(i,G.pointerId),i.style.scrollSnapType="none",i.dataset.dragging="true"),s?i.scrollTop=b.scroll-j:i.scrollLeft=b.scroll-j)},P=G=>{var j;b&&(b=null,M&&((j=i.releasePointerCapture)==null||j.call(i,G.pointerId),delete i.dataset.dragging,i.style.scrollSnapType=h))},Z=G=>{M&&(M=false,G.preventDefault(),G.stopPropagation())};return i.addEventListener("pointerdown",_),i.addEventListener("pointermove",N),i.addEventListener("pointerup",P),i.addEventListener("pointercancel",P),i.addEventListener("click",Z,true),()=>{i.removeEventListener("pointerdown",_),i.removeEventListener("pointermove",N),i.removeEventListener("pointerup",P),i.removeEventListener("pointercancel",P),i.removeEventListener("click",Z,true)}},[i,h,s]),{ref:a,canScrollPrev:c,canScrollNext:d,scrollPrev:x,scrollNext:k,scrollToIndex:v,measure:p}}const So=ce(function(e,n){return!Be()||e.iiifContent!==void 0||e.items!==void 0?f(kt,{fallback:null,children:f(wg,{...e,forwardedRef:n})}):f(xg,{...e,forwardedRef:n})}),wg=bt(()=>import("./StandaloneItems-CBRWUCNf.mjs"));function xg({of:t="views",...e}){return t==="targets"?f(kg,{...e}):t==="annotations"?f(Eg,{...e}):t==="members"?f(Tl,{...e}):f(Mg,{...e})}const Sg=bt(()=>import("./TargetItems-BQVUKMAs.mjs"));function kg(t){return ot(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(kt,{fallback:null,children:f(Sg,{...t})}):null}const Cg=bt(()=>import("./AnnotationItems-UHFS1uDO.mjs"));function Eg(t){return ot(n=>!!Nc(n.manifest,n.addedSets))?f(kt,{fallback:null,children:f(Cg,{...t})}):null}function Tl({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Be(),s=ot(d=>d.collection),i=ot(d=>{var u;return((u=d.manifest)==null?void 0:u.id)??null}),a=xo(s),c=ps(s==null?void 0:s.viewingDirection);if(!a.length)return null;const l=(d,u)=>{t==null||t(d,u),o.goToManifest(d.id)};if(n.layout==="pager"){const d=a.findIndex(u=>u.id===i);return f(Ll,{...n,forwardedRef:e,steps:Il(a,d,c,l),nameKey:"informationPanelTabsCollection",position:f(Ig,{position:d,total:a.length,list:u=>f(Tl,{layout:"list",forwardedRef:null,onSelect:u})})})}return f(Pl,{...n,forwardedRef:e,items:a,selected:a.findIndex(d=>d.id===i),navigation:"id",rtl:c==="right-to-left",upward:c==="bottom-to-top",language:r,request:o.request,showSummary:true,onActivate:l})}function Mg({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Be(),i=ot(u=>u.manifest),a=ot(u=>gn(u.manifest,u.canvasId)),c=ot(u=>Rt(u.manifest).direction),l=kl(i);if(l.length<(n?1:2))return null;const d=u=>r.goTo(u.id);return o.layout==="pager"?f(Ll,{...o,forwardedRef:e,steps:Il(l,a,c,d)}):f(Pl,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",upward:c==="bottom-to-top",language:s,request:r.request,onActivate:(u,m)=>{t==null||t(u,m),r.goTo(u.id)},followFocus:d})}function Il(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 Tg=bt(()=>import("./PagerLayout-BMrlMLfO.mjs")),Ig=bt(()=>import("./PagerLayout-BMrlMLfO.mjs").then(({CountMenu:t})=>({default:t})));function Ll(t){return f(kt,{fallback:null,children:f(Tg,{...t})})}let ko,Lg;const $a=()=>Lg??(Lg=import("./ItemsVertical-BftsRVJP.mjs").then(()=>ko=true,()=>ko=false));function Pl(t){const e=(t.layout??"slider")==="slider"&&t.orientation==="vertical"&&ko===void 0,[,n]=D();return F(()=>{if(!e)return;let o=true;return $a().then(r=>o&&n(r)),()=>{o=false}},[e]),e?(typeof document<"u"&&$a(),null):f(Pg,{...t,orientation:ko===false?"horizontal":t.orientation})}function Pg({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,upward:s=false,layout:i="slider",orientation:a="horizontal",thumbnailSize:c=200,request:l,language:d,showSummary:u=false,secondary:m="summary",labels:h=true,heading:p,headingLevel:g=2,renderItem:v,onActivate:y,followFocus:k,as:x="section",className:b,"aria-label":M,size:_,singleItem:N,highContrast:P,...Z}){var Ht;const{t:G}=Tt(),j=ge(),Q=Io(t,Z.lang),{langOf:st}=Q,pt=as(P),S=i==="slider",C=S&&a==="vertical",A=C&&s,V=o==="id",q=$(null),rt=i==="masonry";F(()=>{const X=q.current;if(!rt||!X)return;let ct,St=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:R})=>{St&&(ct=R(X))}),()=>{St=false,ct==null||ct()}},[rt]);const tt=Ml({align:V?"center":"start",itemCount:e.length,axis:C?"y":"x",upward:A}),_t=$(void 0);F(()=>()=>window.clearTimeout(_t.current),[]);const w=yg(e.length,n,{orientation:C?"vertical":i==="slider"?"horizontal":i==="list"?"vertical":"both",rtl:r,upward:A,onActivate:(X,ct)=>y(e[X],ct),onMove:k?(X,ct)=>{window.clearTimeout(_t.current);const St=()=>k(e[X]);ct.repeat?_t.current=window.setTimeout(St,150):St()}:void 0}),I=$(null),O=$(false);O.current=!!((Ht=I.current)!=null&&Ht.contains(I.current.ownerDocument.activeElement)),F(()=>{var R;const X=I.current;if(!X||!O.current)return;const{activeElement:ct,body:St}=X.ownerDocument;ct&&ct!==St||(R=X.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||R.focus()},[e]);const B=$(false);F(()=>{var St;if(n<0)return;const X=!B.current;if(S){tt.scrollToIndex(n,{instant:X})&&(B.current=true);return}B.current=true;const ct=(St=I.current)==null?void 0:St.querySelector(`[data-track-index="${n}"]`);ct&&Ag(ct,X)},[S,n,tt.scrollToIndex]);const U=$s(g),H=p?xt(p.label,d):null,T=p?xt(p.summary,d):null,z=M===void 0&&!!(H!=null&&H.text),K=No(G("itemsLabel"),st("itemsLabel"),M!==void 0||z,Q.hostLanguage),at=z?{"aria-labelledby":`${j}-title`}:M!==void 0?{"aria-label":M}:K.props,et=(X,ct)=>v?v(X,{selected:ct}):f(gg,{item:X,size:c,language:d,request:l,showSummary:u,secondary:m,labels:h}),gt=X=>!(v||xt(X.label,d).text||u&&m==="summary"&&xt(X.summary,d).text),ft=(X,ct)=>gt(X)?G("canvasPosition",{index:ct+1,total:e.length}):void 0,zt=X=>gt(X)?st("canvasPosition"):void 0,$t=S?{display:"flex",flexDirection:A?"column-reverse":C?"column":void 0,margin:0,padding:0,listStyle:"none"}:void 0,Ft=S?{flex:"0 0 auto",scrollSnapAlign:V?"center":"start"}:void 0,Bt=V&&n>=0,vt=X=>{const ct=n+(X==="prev"?-1:1),St=Bt?ct>=0&&ct<e.length:X==="prev"?tt.canScrollPrev:tt.canScrollNext,R=Bt?X==="prev"?"commonPrevious":"commonNext":X==="prev"?"itemsScrollBack":"itemsScrollForward",lt=G(R),Ot=oe=>{if(!St)return;if(!Bt)return(X==="prev"?tt.scrollPrev:tt.scrollNext)();const ve=e[ct];k?k(ve):y(ve,oe)};return f("button",{type:"button",className:`clover-items-scroll-${X}`,"aria-controls":Bt?void 0:`${j}-viewport`,...dt(st(R)),"aria-disabled":!St||void 0,tabIndex:St?void 0:-1,onClick:Ot,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:C?X==="next"!==A?"M3 6l5 5 5-5":"M3 10l5-5 5 5":X==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:je,children:lt}),f(Ke,{label:lt})]})};return f(Bn.Provider,{value:Q.hostLanguage,children:f(x,{ref:Q.ref,className:Pt("clover-items",b),"data-layout":i,"data-orientation":C?"vertical":void 0,"data-upward":A||void 0,"data-navigation":o,...cs(pt),...Z,children:[p&&((H==null?void 0:H.text)||(T==null?void 0:T.text))&&f("header",{className:"clover-items-header",children:[(H==null?void 0:H.text)&&f(U,{className:"clover-items-title clover-title",id:`${j}-title`,...dt(H.lang),children:H.text}),(T==null?void 0:T.text)&&f("p",{className:"clover-items-description",...dt(T.lang),children:T.text.replace(/<[^>]*>/g,"")}),p.homepage&&f("a",{className:"clover-items-homepage",href:p.homepage,hrefLang:p.homepageLang,...dt(st("commonViewAll")),children:G("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[S&&vt("prev"),f("div",{id:`${j}-viewport`,className:"clover-items-viewport",ref:S?tt.ref:q,children:V?f("div",{ref:I,role:"listbox",...at,"aria-orientation":C?"vertical":S?"horizontal":i==="list"?"vertical":void 0,className:"clover-items-track",style:$t,children:e.map((X,ct)=>{const St=ct===n;return f("div",{id:`${j}-${ct}`,role:"option","aria-selected":St,"aria-label":ft(X,ct),...dt(zt(X)),className:"clover-items-item","data-track-index":ct,style:Ft,...w.itemProps(ct),onClick:R=>y(X,R),children:et(X,St)},X.id)})}):f("ul",{...at,className:"clover-items-track",style:$t,children:e.map((X,ct)=>f("li",{className:"clover-items-item","data-track-index":ct,style:Ft,children:f("a",{className:"clover-items-link",href:X.href,hrefLang:X.hrefLang,"aria-label":ft(X,ct),...dt(zt(X)),draggable:false,onClick:St=>y(X,St),children:et(X,false)})},X.id))})}),S&&vt("next")]}),K.node]})})}function Ag(t,e){var i,a;let n=t.parentElement;for(;n&&n!==document.body;){const{overflowY:c}=getComputedStyle(n);if(/(auto|scroll)/.test(c)&&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;if(s){const c=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-reduced-motion: reduce)").matches;(a=n.scrollBy)==null||a.call(n,{top:s,behavior:e||c?"auto":"smooth"})}}function Og(t,e){const{clover:n}=le(e),o=Rp(),{direction:r}=Ps(),s=ot(l=>l.collection),i=ot(l=>{var d;return((d=l.manifest)==null?void 0:d.id)??null}),a=ot(l=>{var d;return((d=l.targets)==null?void 0:d.items.length)??0}),c=ot(l=>zd(l.targets,l.targetIndex,l.manifest,l.canvasId));if(t==="targets")return{position:c,total:a,direction:"left-to-right",step:l=>{const d=c+l;d>=0&&d<a&&n.goToTarget(d)}};if(t==="members"){const l=xo(s),d=l.findIndex(u=>u.id===i);return{position:d,total:l.length,direction:"left-to-right",step:u=>{const m=l[d+u];m&&n.goToManifest(m.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Ng=ce(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Tt(),{position:c,total:l}=e;if(l<2||c<0)return null;const d=c+1;return f(n,{ref:s,className:Pt("clover-pager-position",o),...r,children:[f("span",{"aria-hidden":"true",children:[d," / ",l]}),f("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]}),f("span",{style:je,...dt(a("canvasPosition")),children:i("canvasPosition",{index:d,total:l})})]})}),Rg=ce(function({of:e="views",...n},o){const r=Og(e,"Position");return f(Ng,{ref:o,...n,steps:r})});function Bg({className:t,loading:e,error:n}){const{t:o,langOf:r}=Tt(),{status:s,error:i}=Ap(),a=s==="loading",c=e!==void 0&&e!==false;return f(Mt,{children:[f("p",{className:Pt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:je,children:[a&&(c?e:e===void 0&&f(Tn,{})),a&&!c&&f("span",{style:je,...dt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Pt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(Mt,{children:[f("p",{...dt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function $g(t,e=false,n=3){const o=e||tg(t),r=e?`${n}
|
|
28
|
-
${t}`:t,[s,i]=D(null);return F(()=>{if(!o)return;let a=true;return Promise.all([import("./sanitize-DETRcc_c.mjs"),e?import("../markdown-CCYJwzFn.mjs"):null]).then(([{sanitizeHTML:c,trusted:l},d])=>{const u=d?d.markdownToHtml(t,{headingLevel:n}):t,m=c(u,{markdown:!!d});a&&i({for:r,html:m,inner:l(m)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const Fg=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),Al=ce(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=xt(n,o),d=dt(l),u=eg(r,c),m=u==="markdown",h=$g(u==="plain"?"":c,m,s),p=(h==null?void 0:h.html)??null;if(!c)return null;if(u==="plain")return f(e,{ref:a,...i,...d,children:c.split(/\r?\n/).map((v,y)=>f(fe.Fragment,{children:[y>0&&f("br",{}),v]},y))});const g=typeof e=="string"&&Fg.has(e)&&p&&/<(p|ul|ol|div)[\s>]/i.test(p)?"div":e;return h?f(g,{ref:a,...i,...d,dangerouslySetInnerHTML:{__html:h.inner}}):f(e,{ref:a,...i,...d,children:m?ng(c):zn(c)})}),Ol=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=xt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":xt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...dt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(Al,{as:"dd",markup:r.value,language:e})]},s)})}):null,Dg=typeof window>"u"?F:Ut;function zg({children:t}){const{t:e}=Tt(),n=Io(),o=$(null),r=ge(),s=fe.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=Hg(o);return f("div",{className:"clover-read-more",children:[fe.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,...dt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function Hg(t){const[e,n]=D(false),[o,r]=D(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return Dg(s),F(()=>{var u,m;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 d=typeof MutationObserver>"u"?null:new MutationObserver(c);return d==null||d.observe(document.head,{childList:true,subtree:true,characterData:true}),d==null||d.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),d==null||d.observe(i,{attributes:true,attributeFilter:["style"]}),(m=(u=document.fonts)==null?void 0:u.addEventListener)==null||m.call(u,"loadingdone",c),()=>{var h,p;cancelAnimationFrame(a),l==null||l.disconnect(),d==null||d.disconnect(),(p=(h=document.fonts)==null?void 0:h.removeEventListener)==null||p.call(h,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function vn(t,e,n){const o=Os(),r=$n(s=>{var i;return(i=$o(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const Hn=()=>{var t;return(t=Be())==null?void 0:t.language};function Fa({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=vn(t,"summary",n),i=Hn();return xt(s,i).text?f(zg,{children:f(Al,{as:e,markup:s,language:i,className:Pt("clover-summary",o),...r})}):null}function Wg({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=vn(t,"metadata",e),i=Hn();return f(Ol,{metadata:s,language:i,renderValue:o,className:Pt("clover-metadata",n),...r})}function Ug({of:t="manifest",value:e,className:n,...o}){const r=vn(t,"requiredStatement",e),s=Hn();return f(Ol,{metadata:r?[r]:null,language:s,className:Pt("clover-required-statement",n),...o})}function jg({of:t="manifest",value:e,className:n,...o}){const r=vn(t,"rights",e);return r?f("a",{href:r,className:Pt("clover-rights",n),...o,children:r}):null}function Vg({of:t="manifest",value:e,className:n,...o}){const r=vn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Pt("clover-id",n),...o,children:r}):null}function Nl({property:t,className:e,of:n="manifest",value:o,...r}){const s=W(vn(n,t,o)),i=Hn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=xt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:An(c),...dt(l.text?l.lang:void 0),children:l.text?zn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const qg=({className:t,...e})=>f(Nl,{property:"homepage",className:Pt("clover-homepage",t),...e}),Kg=({className:t,...e})=>f(Nl,{property:"seeAlso",className:Pt("clover-see-also",t),...e});function Zg({of:t="manifest",value:e,size:n=400,className:o,...r}){var p;const s=$n(g=>$o(g,t),null),i=e??s,a=Hn(),c=i?Ns(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[d,u]=D(c==null?void 0:c.src),m=(p=Be())==null?void 0:p.clover.request;if(F(()=>{if(!c)return u(void 0);if(c.src)return u(c.src);let g=true;return Rs(c,n,m).then(v=>g&&u(v)),()=>{g=false}},[l,n]),!d)return null;const h=xt(i==null?void 0:i.label,a);return f("img",{src:d,alt:zn(h.text),...dt(r.alt===void 0&&h.text?h.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Pt("clover-thumbnail",o),...r})}const Gg=typeof window>"u"?F:Ut,Rl=me(null),Xg=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},Yg=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>W(t[e]).length>0),Jr=t=>!!t&&typeof t.id=="string",Jg=t=>{const e=W(t.homepage).find(Jr);return e?{id:e.id,hrefLang:An(e)}:void 0},Qg=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=W(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=xt(o,e);if(r.text)return{text:zn(r.text),lang:r.lang}}return null};function Bl({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=$n(d=>{var u;return(u=$o(d,t))==null?void 0:u.provider},void 0),a=(l=Be())==null?void 0:l.language,c=W(e!==void 0?e:i).filter(Yg);return c.length?f("ul",{className:Pt("clover-provider",r),...s,children:c.map((d,u)=>{const m=n?Jg(d):void 0,h=!!xt(d.label,a).text;return f(tv,{agent:d,homepage:m,children:o??f(Mt,{children:[f($l,{alt:h?"":void 0}),f(cn,{className:"clover-provider-label"})]})},d.id??u)})}):null}function tv({agent:t,homepage:e,children:n}){const o=$(null),[r,s]=D(null),i=ut(()=>{o.current&&!Xg(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(_l.Provider,{value:t,children:f(Rl.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 $l({of:t="manifest",value:e,alt:n,className:o,...r}){var m;const{t:s,langOf:i}=Tt(),a=Os(),c=$n(h=>{var p;return(p=$o(h,t))==null?void 0:p.provider},void 0),l=(m=Be())==null?void 0:m.language,u=(e!==void 0?W(e):a?[a]:W(c)).flatMap(h=>{if(!h||typeof h!="object")return[];const p=h;if(p.type!=="Agent"&&Jr(p)&&!p.logo)return[{image:p,agent:null}];const g=W(p.logo).find(Jr);return g?[{image:g,agent:p}]:[]});return u.length?f(Mt,{children:u.map(({image:h,agent:p},g)=>{const v=Qg(p,l);return f(ev,{src:h.id,alt:n??(v==null?void 0:v.text)??s("logo"),...dt(n!==void 0?void 0:v?v.lang:i("logo")),width:h.width,height:h.height,loading:"lazy",decoding:"async",className:Pt("clover-logo",o),...r},`${h.id}-${g}`)})}):null}function ev({alt:t,onError:e,...n}){const o=Vt(Rl),[r,s]=D(false),i=ut(()=>s(true),[]);Gg(()=>{r&&(o==null||o())},[r,o]);const a=ut(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})}const nv=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&xt({[e]:t[e]}).text):[];function ov(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(nv).filter(r=>r.length>1);return[...new Set(o.flat())]}function rv(){const{language:t,chooseLanguage:e,toggleDrawn:n}=le("About"),o=ot(i=>i.manifest),r=yt(()=>ov(o),[o]),s=Sc(r,t);return s&&e?{languages:r,chosen:s,onChange:e,drawn:n??false}:null}function Xy(t,e){return t!=null&&t.drawn?e.every(n=>!!n&&n!=="none"&&t.languages.some(o=>us(o,n))):false}const sv=bt(()=>import("./LanguageChoice-CcDmpHnE.mjs").then(t=>t.b).then(t=>({default:t.LanguageChoice}))),iv=t=>{var o;const e=t.closest(".clover-sections-actions"),n=(o=e==null?void 0:e.closest(".clover-sections-item"))==null?void 0:o.querySelector(".clover-sections-heading .clover-sections-label");return e&&n?{box:e,label:n}:null},av=t=>void Lt.chooseInterfaceLanguage(t);function cv(){Tt();const{languages:t,chosen:e}=Lt.interfaceLanguages();return t.length>1?{languages:t,chosen:e}:null}function Fl({values:t=true,interfaceLanguages:e=true}={}){const n=rv(),o=cv(),r=t?(n==null?void 0:n.languages)??[]:[],s=u=>r.some(m=>m===u||Lt.stringsFor(m)===u),i=[...r,...(e?(o==null?void 0:o.languages)??[]:[]).filter(u=>!s(u))];if(i.length<2)return null;const a=Lt.chosenLanguage,c=a&&Lt.stringsFor(a),l=c&&i.includes(c)&&!s(c)?c:t&&n?n.chosen:(o==null?void 0:o.chosen)??i[0];return{languages:i,chosen:l,onChange:u=>r.includes(u)&&n?n.onChange(u):av(u)}}function Dl({values:t,interfaceLanguages:e}){const n=Fl({values:t,interfaceLanguages:e}),{drawsToggle:o}=le("About"),r=!!n;return F(()=>r?o==null?void 0:o():void 0,[r,o]),n?f(kt,{fallback:null,children:f(sv,{...n,nameKey:"readingLanguage",part:"clover-about",fit:iv})}):null}const zl=me(false);function Da(t,e){const n=new Set,o=[];for(const r of t)for(const s of W(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=xt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:An(s)})}return o}function Hl(){const{language:t}=le("Download"),e=ot(o=>o.manifest),n=ot(o=>Ue(o.manifest,o.canvasId));return{page:Da(n,t),all:Da([e],t)}}const lv=bt(()=>import("./Download-5BsnDZLL.mjs").then(({DownloadGroups:t})=>({default:t}))),uv=bt(()=>import("./NavDate-BJ_MF_t1.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),dv=bt(()=>import("./PartOfManifest-BdZWbAQI.mjs"));function fv({languages:t=true,interfaceLanguages:e=true,...n}){const o=Vt(zl);return f(hv,{...n,download:!o&&n.download!==false,choice:o?null:f(Dl,{values:t,interfaceLanguages:e})})}function hv({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}=Tt(),d=Hl(),u=ot(y=>y.manifest,Object.is,"About"),m=$(null);F(()=>{const y=m.current,k=y==null?void 0:y.querySelector(".clover-about-head");if(!y||!k||typeof ResizeObserver>"u")return;const x=new Set,b=()=>{const N=k.querySelector(".clover-about-thumbnail"),P=k.querySelector(".clover-about-label");for(const Q of[N,P])Q&&!x.has(Q)&&(x.add(Q),_.observe(Q));const Z=y.style;if(!N){Z.removeProperty("--clover-about-label-height"),Z.removeProperty("--clover-about-thumbnail-width");return}const G=`${(P==null?void 0:P.offsetHeight)??0}px`,j=`${N.offsetWidth}px`;Z.getPropertyValue("--clover-about-label-height")!==G&&Z.setProperty("--clover-about-label-height",G),Z.getPropertyValue("--clover-about-thumbnail-width")!==j&&Z.setProperty("--clover-about-thumbnail-width",j)};let M=0;const _=new ResizeObserver(()=>{cancelAnimationFrame(M),M=requestAnimationFrame(b)});return _.observe(k),b(),()=>{cancelAnimationFrame(M),_.disconnect(),y.style.removeProperty("--clover-about-label-height"),y.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,u]);const h=ge(),p=()=>{var x,b;const y=m.current;(b=((x=y==null?void 0:y.closest(".clover-sections-item"))==null?void 0:x.querySelector(".clover-sections-button"))??y)==null||b.focus({preventScroll:true})};if(!u)return null;const g=(y,k,x)=>{if(!k)return null;const{as:b,title:M,group:_}=El(n,`${h}-${y}`);return f("section",{className:"clover-about-section",..._,children:[f(b,{className:"clover-about-heading",...dt(l(y)),...M,children:c(y)}),x]})},v=y=>Array.isArray(u[y])?u[y].length>0:!!u[y];return f("div",{ref:m,className:Pt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(Zg,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(cn,{as:$s(n),className:"clover-about-label clover-title"})]}),e&&f(Fa,{of:"canvas",className:"clover-about-summary"}),qi(u)&&u.partOf&&f(kt,{fallback:null,children:f(dv,{manifest:u,headingLevel:n,onOpened:p})}),f(Fa,{className:"clover-about-summary"}),f(Wg,{className:"clover-about-metadata"}),f(Ug,{className:"clover-about-metadata"}),g("aboutDate",xl(u.navDate),f(kt,{fallback:null,children:f(uv,{value:u.navDate,className:"clover-about-date"})})),g("aboutProvider",v("provider"),f(Bl,{})),g("aboutRights",u.rights,f(jg,{})),g("aboutHomepage",v("homepage"),f(qg,{})),g("aboutSeeAlso",v("seeAlso"),f(Kg,{})),g("download",o&&d.page.length+d.all.length>0,f(kt,{fallback:null,children:f(lv,{page:d.page,all:d.all,headingLevel:n+1})})),g(qi(u)?"aboutCanvas":"aboutManifest",!Hc(u)&&u.id,f(Vg,{}))]})}const pv=bt(()=>import("./ControlMenu-DWi6tgKb.mjs")),mv=bt(()=>import("./Download-5BsnDZLL.mjs").then(({DownloadGroups:t})=>({default:t})));function gv({languages:t=true,interfaceLanguages:e=true,download:n=true}){const o=Fl({values:t,interfaceLanguages:e}),{page:r,all:s}=Hl(),i=n&&r.length+s.length>0;return!o&&!i?null:f("div",{className:"clover-about-actions",children:[i&&f(vv,{page:r,all:s}),o&&f(Dl,{values:t,interfaceLanguages:e})]})}function vv({page:t,all:e}){const{t:n,langOf:o}=Tt(),[r,s]=D(false),a=`${ge()}-download`,c=ut(l=>{var d;s(false),l&&((d=document.getElementById(a))==null||d.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const d=l.relatedTarget;r&&d&&!l.currentTarget.contains(d)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...dt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(yv,{}),f(Ke,{label:n("download")})]}),r&&f(kt,{fallback:null,children:f(pv,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(mv,{page:t,all:e,inPopover:true})})})]})}function yv(){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 bv(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Rt(t).canvases){if(n.navPlace)return true;for(const o of W(n.annotations))for(const r of W(o==null?void 0:o.items))if(r!=null&&r.navPlace||W(r==null?void 0:r.motivation).includes("georeferencing")||W(r==null?void 0:r.body).some(i=>(i==null?void 0:i.type)==="Feature"||(i==null?void 0:i.type)==="FeatureCollection"))return true}return false}const _v=["about","targets","collection","contents","search","map","transcript","annotations"],Ae={about:t=>{var e,n;return!Hc(t.manifest)||!!((e=t.manifest)!=null&&e.rights||(n=t.manifest)!=null&&n.requiredStatement)},targets:t=>{var e;return(((e=t.targets)==null?void 0:e.items.length)??0)>1},collection:t=>{var e,n;return(((n=(e=t.collection)==null?void 0:e.items)==null?void 0:n.length)??0)>0||!!Dd(t.manifest)},contents:t=>Lp(t.manifest).length>0,search:t=>!!Ss(t.manifest),map:t=>bv(t.manifest,t.collection),transcript:t=>Ue(t.manifest,t.canvasId).some(e=>rl(e).length>0||zh(e).length>0),annotations:t=>ef(t.manifest,t.addedSets).length>0},wv=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return _v.filter(o=>t[o]&&(!n||n.has(o)))};function Fs(t){const e={about:ot(Ae.about),targets:ot(Ae.targets),collection:ot(Ae.collection),contents:ot(Ae.contents),search:ot(Ae.search),map:ot(Ae.map),transcript:ot(Ae.transcript),annotations:ot(Ae.annotations)};return wv(e,t)}function xv({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Pt("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 Wl=typeof window>"u"?F:Ut,Ul=me(null);function Yy(){return Vt(Ul)}const jl=me(0);function Jy(){return Vt(jl)}function Sv({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var st,pt;const a=ge(),c=No(r??"",s,r===void 0),l=$([]),d=e==="tabs",{t:u,langOf:m}=Tt(),h=Ml({dragFree:true,itemCount:t.length}),p=t.some(S=>S.value===n)?n:((st=t[0])==null?void 0:st.value)??null,g=$(new Set);p&&g.current.add(p);const v=$(null),[y,k]=D({value:null,count:0});F(()=>{var rt;if(d||!p||v.current!==p)return;v.current=null;const S=t.findIndex(tt=>tt.value===p),C=document.getElementById(`${a}-panel-${S}`),A=(rt=l.current[S])==null?void 0:rt.parentElement;if(!C||!A)return;const V=A.getBoundingClientRect().bottom-C.getBoundingClientRect().top;if(V<=0)return;const q=xr(C);q&&(q.scrollTop-=V)},[p,d,t,a]);const x=S=>{var I,O,B,U;const C=t.findIndex(H=>H.value===p),A=document.getElementById(`${a}-panel-${C}`),V=S.target;if(!A||V===A||!A.contains(V)||!Cv(V))return;const q=(O=(I=l.current[C])==null?void 0:I.parentElement)==null?void 0:O.getBoundingClientRect(),rt=C+1<t.length?(U=(B=l.current[C+1])==null?void 0:B.parentElement)==null?void 0:U.getBoundingClientRect():void 0;if(!q)return;const tt=V.getBoundingClientRect(),_t=tt.top<q.bottom?Math.floor(tt.top-q.bottom):rt&&tt.bottom>rt.top?Math.ceil(Math.min(tt.bottom-rt.top,tt.top-q.bottom)):0,w=_t?xr(A):null;w&&(w.scrollTop+=_t)},b=$(null),M=t.map(S=>S.value).join(`
|
|
29
|
-
`),_=$(false);_.current=!!((pt=b.current)!=null&&pt.contains(b.current.ownerDocument.activeElement)),F(()=>{var q;const S=b.current;if(!S||!_.current)return;const{activeElement:C,body:A}=S.ownerDocument;if(C&&C!==A)return;const V=t.findIndex(rt=>rt.value===p);(q=l.current[V])==null||q.focus()},[M]),Wl(()=>{const S=b.current;if(d||!S||typeof ResizeObserver>"u")return;const C=[...S.querySelectorAll(":scope > .clover-sections-item")],A=C.map(T=>T.firstElementChild),V=A[0],q=A[A.length-1],rt=new Map,tt=T=>(T&&rt.get(T))??0,_t=document.scrollingElement;let w=null,I=0;const O=()=>{const T=A.reduce((ft,zt)=>ft+tt(zt),0);let z=0;C.forEach((ft,zt)=>{ft.style.setProperty("--clover-sections-before",`${z}px`),z+=tt(A[zt]),ft.style.setProperty("--clover-sections-after",`${T-z}px`)}),S.style.setProperty("--clover-sections-total",`${T}px`);const K=V&&getComputedStyle(V);(K==null?void 0:K.position)==="sticky"&&q&&(I=parseFloat(K.top)+parseFloat(getComputedStyle(q).bottom)||0);const at=getComputedStyle(S),et=parseFloat(at.lineHeight)||1.2*parseFloat(at.fontSize),gt=(w==null?void 0:w.clientHeight)??0;gt>0&>-I-T<2*et?S.dataset.stacks="off":delete S.dataset.stacks},B=new ResizeObserver(T=>{var z,K;for(const at of T)A.includes(at.target)&&rt.set(at.target,((K=(z=at.borderBoxSize)==null?void 0:z[0])==null?void 0:K.blockSize)??at.target.getBoundingClientRect().height);O()}),U=()=>{const T=xr(S);T!==w&&(w&&w!==_t&&B.unobserve(w),T&&T!==_t&&B.observe(T),w=T)},H=()=>{U(),O()};U();for(const T of A)T&&B.observe(T,{box:"border-box"});return window.addEventListener("resize",H),()=>{B.disconnect(),window.removeEventListener("resize",H);for(const T of C)T.style.removeProperty("--clover-sections-before"),T.style.removeProperty("--clover-sections-after");S.style.removeProperty("--clover-sections-total"),delete S.dataset.stacks}},[d,M,i]),F(()=>{if(d)return;const S=l.current.map(A=>A==null?void 0:A.parentElement).filter(A=>!!A),C=A=>{var tt;if(A.ctrlKey)return;const V=A.currentTarget,q=za(V);if(!q||q===document.scrollingElement)return;A.preventDefault();const rt=A.deltaMode===1?parseFloat(getComputedStyle(V).lineHeight)||16:A.deltaMode===2?q.clientHeight:1;(tt=za(q)??document.scrollingElement)==null||tt.scrollBy({left:A.deltaX*rt,top:A.deltaY*rt,behavior:"instant"})};for(const A of S)A.addEventListener("wheel",C,{passive:false});return()=>{for(const A of S)A.removeEventListener("wheel",C)}},[d,M]);const N=S=>{S!==p&&(v.current=S,d||k(C=>({value:S,count:C.count+1})),o==null||o(S))},P=(S,C)=>{var tt;const A=t.length-1,[V,q]=d?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],rt=S.key===q?(C+1)%t.length:S.key===V?(C-1+t.length)%t.length:S.key==="Home"?0:S.key==="End"?A:null;rt!==null&&(S.preventDefault(),(tt=l.current[rt])==null||tt.focus(),d&&N(t[rt].value))},Z=$(false);F(()=>{if(!d)return;const S=t.findIndex(w=>w.value===p),C=l.current[S],A=C==null?void 0:C.parentElement;if(!C||!A)return;const V=getComputedStyle(A),q=A.getBoundingClientRect(),rt=C.getBoundingClientRect(),tt=q.left+(parseFloat(V.scrollPaddingLeft)||0),_t=q.right-(parseFloat(V.scrollPaddingRight)||0);(rt.left<tt-1||rt.right>_t+1)&&h.scrollToIndex(S,{instant:!Z.current}),Z.current=true},[p,d,t.length,h.scrollToIndex]);const G=S=>{const C=S==="prev"?h.canScrollPrev:h.canScrollNext,A=S==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${S}`,"aria-hidden":"true",tabIndex:-1,hidden:!C,...dt(m(A)),onMouseDown:V=>V.preventDefault(),onClick:S==="prev"?h.scrollPrev:h.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:S==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Ke,{label:u(A)})]})},j=$s(i,"div"),Q=(S,C)=>{const A=S.value===p;return f("button",{ref:V=>{l.current[C]=V},type:"button",id:`${a}-button-${C}`,className:"clover-sections-button","data-value":S.value,"data-track-index":d?C:void 0,"aria-controls":`${a}-panel-${C}`,...d?{role:"tab","aria-selected":A,tabIndex:A?0:-1}:{"aria-expanded":A,"aria-disabled":A||void 0},onClick:()=>N(S.value),onKeyDown:V=>P(V,C),children:[f("span",{className:"clover-sections-label",children:S.label}),!d&&f(xv,{open:A,className:"clover-sections-chevron"})]},S.value)};return f("div",{ref:b,className:"clover-sections","data-layout":e,onFocus:d?void 0:x,style:d?void 0:{"--clover-sections-count":t.length},children:[d&&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(Q)}),G("prev"),G("next")]})}),d&&c.node,t.map((S,C)=>{const A=S.value===p;return f("section",{className:"clover-sections-item","data-value":S.value,"data-open":A,style:d?void 0:{"--clover-sections-index":C},children:[!d&&f(j,{className:"clover-sections-heading",children:[Q(S,C),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(jl.Provider,{value:y.value===S.value?y.count:0,children:f(kv,{id:`${a}-panel-${C}`,tabs:d,labelledBy:`${a}-button-${C}`,hidden:!A,actions:S.actions,children:g.current.has(S.value)?S.content:null})})]},S.value)})]})}function kv({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=D(null),c=!o||!!r;return Wl(()=>{const l=i==null?void 0:i.parentElement;if(!c||!i||!l||typeof ResizeObserver>"u")return;const d=new ResizeObserver(()=>{const u=i.offsetWidth;u?(l.style.setProperty("--clover-sections-actions",`${u}px`),l.setAttribute("data-actions","")):(l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions"))});return d.observe(i),()=>{d.disconnect(),l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions")}},[i,c]),f(Mt,{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(Ul.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function xr(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 za(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 Cv(t){try{return t.matches(":focus-visible")}catch{return true}}const Ev=bt(()=>import("./MapView-BO2ppZpW.mjs").then(t=>({default:t.RootMap}))),Mv=bt(()=>import("./Collection-kWUradiW.mjs").then(t=>({default:t.Collection}))),Tv=bt(()=>import("./TargetItems-BQVUKMAs.mjs").then(t=>({default:t.TargetsSection}))),Iv=bt(()=>import("./Contents-DHyzbjco.mjs").then(t=>({default:t.Contents}))),Lv=bt(()=>import("./Search-auUpOyeS.mjs").then(t=>({default:t.Search}))),Pv=bt(()=>import("./Transcript-DaShc1z-.mjs").then(t=>({default:t.Transcript}))),Av=bt(()=>import("./Annotations-vzP6-fS4.mjs").then(t=>({default:t.Annotations}))),ze=t=>f(kt,{fallback:null,children:t}),Ov=()=>null,Nv=ce(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:d=true,interfaceLanguages:u=true,sections:m,labels:h,className:p,children:g,onKeyDown:v,...y},k){var H;const{clover:x}=le("Panel"),b=$(null),{t:M,langOf:_,hostLanguage:N,i18n:P}=Tt(),Z=No(M("informationPanelTabs"),_("informationPanelTabs"),!!(y["aria-label"]||y["aria-labelledby"])||!(["aside","section","nav"].includes(c)||y.role)),G=T=>{const z=_(T);return z?f("span",{...dt(z),children:M(T)}):M(T)},j=(T,z)=>{const K=h==null?void 0:h[T];if(K===void 0)return G(z);if(typeof K=="string")return K;const at=Object.keys(K),et=ds(at,P.language);if(!et)return G(z);const gt=To(et,N);return gt?f("span",{...dt(gt),children:K[et]}):K[et]},Q=Fs(m),st=T=>Q.includes(T),pt=fe.Children.toArray(g).filter(T=>fe.isValidElement(T)&&T.type===Ov),S=e==="accordion"?a+1:a,C=d||u||l?f(gv,{languages:d,interfaceLanguages:u,download:l}):void 0,A=pt.length?pt.map(({props:T})=>({value:T.value,label:T.label,content:T.children,...T.value==="about"&&{actions:C}})):[...st("about")?[{value:"about",label:j("about","informationPanelTabsAbout"),content:f(fv,{headingLevel:S,download:l}),actions:C}]:[],...st("targets")?[{value:"targets",label:j("targets","informationPanelTabsTargets"),content:ze(f(Tv,{headingLevel:S}))}]:[],...st("collection")?[{value:"collection",label:j("collection","informationPanelTabsCollection"),content:ze(f(Mv,{headingLevel:S}))}]:[],...st("contents")?[{value:"contents",label:j("contents","informationPanelTabsContents"),content:ze(f(Iv,{}))}]:[],...st("search")?[{value:"search",label:j("search","informationPanelTabsSearch"),content:ze(f(Lv,{headingLevel:S,sticky:true,size:"small"}))}]:[],...st("map")?[{value:"map",label:j("map","informationPanelTabsMap"),content:ze(f(Ev,{}))}]:[],...st("transcript")?[{value:"transcript",label:j("transcript","transcriptLabel"),content:ze(f(Pv,{sticky:true,size:"small"}))}]:[],...st("annotations")?[{value:"annotations",label:j("annotations","informationPanelTabsAnnotations"),content:ze(f(Av,{headingLevel:S}))}]:[]],V=ot(T=>T.search.query),q=A.some(T=>T.value==="search"),[rt,tt]=D(()=>V&&q?"search":o??null),_t=$(V&&q?V:"");F(()=>{q&&(V&&V!==_t.current&&n===void 0&&tt("search"),_t.current=V)},[V,q,n]);const w=ot(T=>{var z;return T.annotationId&&((z=T.regions)!=null&&z.entries.some(K=>K.id===T.annotationId))?T.annotationId:null}),I=A.some(T=>T.value==="contents");F(()=>{w&&I&&n===void 0&&tt("contents")},[w,I,n]);const O=n!==void 0?n:rt,B=(A.some(T=>T.value===O)?O:(H=A[0])==null?void 0:H.value)==="search";if(F(()=>{q&&x.setSetVisible(gs,B)},[x,q,B]),!A.length)return null;const U=()=>{var z;const T=b.current;T!=null&&T.contains(document.activeElement)&&((z=Rv(T))==null||z.focus()),s==null||s()};return f(c,{ref:T=>{b.current=T,typeof k=="function"?k(T):k&&(k.current=T)},className:Pt("clover-panel",p),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...Z.props,onKeyDown:T=>{v==null||v(T),i&&s&&T.key==="Escape"&&!T.defaultPrevented&&(T.preventDefault(),U())},...y,children:[Z.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":M("informationPanelClose"),...dt(_("informationPanelClose")),onClick:U,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(Zc,{})}),f(Ke,{label:M("informationPanelClose")})]}),f(zl.Provider,{value:A.some(T=>T.value==="about"),children:f(Sv,{items:A,layout:e,value:n!==void 0?n:rt,onValueChange:T=>{n===void 0&&tt(T),r==null||r(T)},label:M("informationPanelTabs"),labelLang:_("informationPanelTabs"),headingLevel:a})})]})});function Rv(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 Bv=1,$v=4,Fv=8,Dv=500,zv=4,Ha=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],Vl=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function uo(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*Vl():t.endsWith("%")?n/100*e:n}const Sr=t=>typeof t=="number"?`${t}px`:t,Hv=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},Wv=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Uv=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function jv(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 Vv(t,e,n){const{sized:o,other:r}=jv(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=uo(a.min,s)??0,u=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(uo(c.min,s)??0),m=Math.max(l,Math.min(uo(a.max,s)??u,u)),h=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:m,after:h}}function qv(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 Kv(t,e){const n=e.sized.getBoundingClientRect().width,o=Bv*Vl()*(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 Wa(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 Zv(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 d=g=>Math.hypot(g.clientX-a.x,g.clientY-a.y)>a.reach,u=()=>{Ha.forEach(g=>l.removeEventListener(g,m,true)),l.removeEventListener("pointermove",h,true),clearTimeout(p),s=null},m=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&d(g))return u();g.preventDefault(),g.stopPropagation()}},h=g=>d(g)&&u();Ha.forEach(g=>l.addEventListener(g,m,true)),l.addEventListener("pointermove",h,true);const p=setTimeout(u,Dv);s=u};return{down(a){var d;if(o=false,r=null,a.defaultPrevented||a.button!==0||Wa(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"?Fv:$v,moved:false};const l=a.currentTarget;l.dataset.dragging="",(d=l.setPointerCapture)==null||d.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*zv}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||Wa(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=Kv(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const Ds=me(null);function zs(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Gv=ce(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=$(null),l=$({}),[d,u]=D({});F(()=>u(Hv(n)),[n]);const m=ut((p,g)=>u(v=>{const y={...v};return g===void 0?delete y[p]:y[p]=Math.round(g),Wv(n,y),y}),[n]),h=yt(()=>({sizes:d,setSize:m,specs:l,element:c}),[d,m]);return f(Ds.Provider,{value:h,children:f(e,{ref:p=>{c.current=p,zs(a,p)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),ql=ce(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},d){const u=Vt(Ds),m=$(null),[h,p]=D(s??"");F(()=>{if(s)return p(s);const v=Uv(u==null?void 0:u.element.current);p(String(v.indexOf(m.current)))},[s,u]),u&&h&&(u.specs.current[h]={min:o,max:r,size:n});const g=u&&h?u.sizes[h]:void 0;return f(e,{ref:v=>{m.current=v,zs(d,v)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:Sr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:Sr(n),"--clover-split-max":Sr(r),...a},...l,children:c})}),Xv=ce(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=Vt(Ds),{t:l,langOf:d}=Tt(),u=$(null),[m,h]=D(),p=ut(()=>{const _=u.current,N=c==null?void 0:c.element.current;return!_||!N||!c?null:Vv(_,N,c.specs.current)},[c]),g=ut(_=>{const N=p();if(!N||!c)return;const P=Math.min(N.max,Math.max(N.min,_));c.setSize(N.key,P),h({now:P,min:N.min,max:N.max})},[p,c]),v=ut(()=>{const _=p();_&&h({now:_.sized.getBoundingClientRect().width,min:_.min,max:_.max})},[p]);F(()=>{const _=c==null?void 0:c.element.current;if(v(),!_||typeof ResizeObserver>"u")return;let N=0;const P=new ResizeObserver(()=>{cancelAnimationFrame(N),N=requestAnimationFrame(v)});return P.observe(_),()=>{cancelAnimationFrame(N),P.disconnect()}},[v,c,c==null?void 0:c.sizes]);const y=_=>{var N;return Math.round(_/(((N=c==null?void 0:c.element.current)==null?void 0:N.clientWidth)||1)*100)},k=()=>{var G,j;const _=p();if(!_||!c)return;const N=((G=c.element.current)==null?void 0:G.clientWidth)??0,P=uo((j=c.specs.current[_.key])==null?void 0:j.size,N),Z=qv(_,P,c.sizes[_.key]);if(!Z.own)return g(Z.to);c.setSize(_.key,void 0),h({now:P,min:_.min,max:_.max})},x=$({limits:p,resize:g,step:k});x.current={limits:p,resize:g,step:k};const[b]=D(()=>Zv(()=>u.current,()=>x.current));F(()=>()=>b.dispose(),[b]);const M=i["aria-label"]??l("splitHandle");return f("div",{ref:_=>{u.current=_,zs(a,_)},role:"separator","aria-orientation":"vertical","aria-label":M,...dt(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":m?y(m.now):void 0,"aria-valuemin":m?y(m.min):void 0,"aria-valuemax":m?y(m.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:_=>{o==null||o(_),b.down(_)},onPointerMove:_=>b.move(_),onPointerUp:_=>b.up(_),onPointerCancel:_=>b.up(_),onClick:_=>{r==null||r(_),b.click(_)},onKeyDown:_=>{s==null||s(_),b.key(_)},...i,children:[n,f(Ke,{label:M})]})});let Kl;function Yv(t){Kl=t}function Qy(){return Kl}function Jv({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Tt(),i=ge().replace(/:/g,"");return f(We,{id:`panel-${i}`,label:r("informationPanelToggle"),lang:s("informationPanelToggle"),expanded:t,controls:n,side:o==="start"?o:void 0,onClick:()=>e(!t),children:f(Mt,{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 Qv,fo;const Zl=()=>Qv??(Qv=import("./dragToClose-CD-MJb-V.mjs").then(t=>fo=t));function ty(){Zl()}function ey(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=$({enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i});a.current={enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i},F(()=>{const c=t.current;if(!c||(fo==null||fo.reset(c,a),!e))return;let l=true,d;return Zl().then(u=>{l&&(d=u.attach(c,a))}),()=>{l=false,d==null||d()}},[t,e])}const ny=240,oy="16rem",ry="14rem",sy=31;function iy(t){const[e,n]=D(t),[o,r]=D(t);return F(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),ny);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function ay(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 cy=typeof window>"u"?F:Ut;function ly(t,e){const[n,o]=D();return cy(()=>{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 Ua=typeof window>"u"?F:Ut;function uy({id:t,beside:e,defaultOpen:n,side:o,focus:r=ay,slides:s=true,alongside:i,followFocus:a}){var pt,S;const c=$(null),l=$(null),d=$(null),u=e===false,[m,h]=D(n),[p,g]=D(false),v=u?p:m,y=()=>document.querySelector(`button[aria-controls~="${t}"]`),k=()=>a(y),x=()=>{var C,A,V;(C=c.current)!=null&&C.contains(document.activeElement)&&((A=d.current)==null||A.removeAttribute("inert"),(V=y())==null||V.focus(),k())},b=$(0),M=C=>{b.current=u&&C?3:0,b.current||k(),u&&g(C),h(C)},_=()=>{x(),M(false)},N=$(e),P=$(false);if(N.current===true&&e===false){const C=document.activeElement;P.current=!!(C&&((pt=c.current)!=null&&pt.contains(C)||(S=y())!=null&&S.contains(C)))}Ua(()=>{var C;P.current&&(P.current=false,(C=y())==null||C.focus(),k()),e===true&&g(false),N.current=e},[e]);const Z=iy(s&&u&&v),G=s&&u,j=G?Z.mounted:v,Q=G?Z.open:v,st=u&&Q;return Ua(()=>{const C=d.current;if(C)return st?C.setAttribute("inert",""):C.removeAttribute("inert"),()=>C.removeAttribute("inert")},[st]),F(()=>{if(!b.current||!c.current)return;b.current-=1;const C=r(c.current);C==null||C.focus({preventScroll:true}),C&&document.activeElement===C&&(b.current=0)}),ey(c,{enabled:u&&Q,side:o,onClose:_,scrim:l,alongside:i,exits:!s}),{pane:c,main:d,over:u,open:v,shown:j,opened:Q,setOpen:M,close:_,onKeyDown:C=>{u&&v&&C.key==="Escape"&&!C.defaultPrevented&&(C.preventDefault(),_())},scrim:u&&j&&{ref:l,"data-open":Q,"aria-hidden":true,onMouseDown:C=>C.preventDefault(),onClick:_}}}const dy=typeof window>"u"?F:Ut;function fy(t,e,n){dy(()=>{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 hy=()=>import("./PanelPart-CaxBca8z.mjs");function py({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=uy({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,d=$(null),[u,m]=D(),h=a??u,p=()=>hy().then(y=>m(()=>y.default));F(()=>{c.open&&!h&&p()},[c.open]),fy(d,()=>s==null?void 0:s(),l&&!!s);const g=y=>{var k,x;(x=(k=y.target).closest)!=null&&x.call(k,`[aria-controls~="${t}"]`)&&(h||p(),c.over&&ty())},v=f(my,{sections:i,open:c.open,onOpenChange:y=>y&&!h?p().then(()=>c.setOpen(true)):c.setOpen(y),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:d,toggle:v,Part:h,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function my({sections:t,...e}){return Fs(t).length?f(Jv,{...e}):null}function gy({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=Fs(n.sections);if(!c.length)return null;const l=s&&f(Mt,{children:[f(Xv,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(Mt,{children:[i==="end"&&l,f(ql,{ref:t.pane,id:o,"data-spine":r||void 0,"data-side":i,name:"panel","data-about":c.includes("about")||void 0,className:["clover-template-panel clover-template-drawer",e].filter(Boolean).join(" "),size:"24rem",min:r?void 0:ry,"data-open":t.opened,hidden:!t.shown,children:a&&f(a,{...n,onClose:r?t.close:void 0,closeOnEscape:r})}),i==="start"&&l,t.scrim&&f("div",{className:"clover-template-scrim",...t.scrim})]})}const vy=30;function yy(){const t=$(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&by()?r.focus():++n<vy&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function by(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function _y({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",panelSections:i,panelLabels:a,download:c=true,languages:l=true,interfaceLanguages:d=true,items:u="slider",singleItem:m=false,storageKey:h="clover-template-default",fill:p=false,collapseControls:g,canvasOptions:v,...y}){const k=$(null),x=ge().replace(/:/g,""),b=`${x}-panel`,M=El(n,`${x}-title`),_=py({id:b,beside:ly(k,sy),defaultOpen:r??true,followFocus:yy(),sections:i,body:()=>{var Z;return(Z=k.current)==null?void 0:Z.querySelector(".clover-template-default-body")},panel:Nv}),N=_.over,P=o&&_.docked;return f(Rf,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":p||void 0,...e?M.group:null,...y,children:f(Gv,{ref:k,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?_.splitProps:{"data-panel":"beside"},children:[f(ql,{ref:_.main,className:"clover-template-default-main",min:N?void 0:oy,children:[e&&f("header",{className:"clover-template-default-header",children:[f(wy,{title:M}),f(So,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(Bl,{className:"clover-template-default-provider",children:f($l,{})})]}),f(Bg,{loading:false}),f(Sy,{items:u,singleItem:m,body:f(Jm,{className:"clover-template-default-body",collapseControls:g,options:v,children:o&&!P&&_.toggle},"body")})]}),o&&f(gy,{pane:_,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,interfaceLanguages:d,headingLevel:e?ky(n):n})]})})}function wy({title:t}){const e=ot(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Bp();return xy(n==null?void 0:n.entries[0]),f(Mt,{children:[f(cn,{as:t.as,className:"clover-template-default-title clover-template-title clover-title",...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(cn,{as:"p",label:e,className:"clover-template-default-collection"}),f(So,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(cn,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(So,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function xy(t){const{clover:e}=le(),n=ot(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=$(null);F(()=>{if(!t||!n||o.current===n)return;o.current=n;const{annotationId:r,canvasId:s}=e.store.get();!r&&s===t.canvasId&&e.selectAnnotation(t.id)},[e,t,n])}function Sy({body:t,items:e,singleItem:n}){const{direction:o}=Ps(),r=e==="slider"&&(o==="top-to-bottom"||o==="bottom-to-top"),s=f("div",{className:"clover-template-default-rail-header",children:[f(Cy,{}),f(Rg,{})]},"header"),i=e&&f(So,{layout:e,orientation:r?"vertical":void 0,singleItem:n});return f("div",{className:"clover-template-default-views","data-orientation":r?"vertical":void 0,children:r?[f("div",{className:"clover-template-default-rail","data-orientation":"vertical",children:i},"rail"),t,s]:[t,f("div",{className:"clover-template-default-rail",children:[s,i]},"rail")]})}const ky=t=>t+1;function Cy(){const t=As();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(fe.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(cn,{label:e.label})]},e.id))})}const Ey=()=>import("./renderers-CdXzZ9As.mjs"),My=bt(()=>import("./Document-BtN3vmsO.mjs").then(t=>({default:t.Document}))),Ty=bt(()=>import("./Gallery-DC4QY9lG.mjs").then(t=>({default:t.Gallery}))),ja={default:_y,document:My,gallery:Ty},Iy={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["default","document","gallery"],panelSections:["default","document","gallery"],panelLabels:["default","document","gallery"],download:["default","document","gallery"],languages:["default","document","gallery"],storageKey:["default","document","gallery"],defaultSidebarOpen:["document"],size:["gallery"],height:["gallery"],gap:["gallery"],secondary:["gallery"],summary:["gallery"],lightboxItems:["gallery"]};function Ly({props:t}){const e=typeof t.template=="string"&&t.template in ja?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=Iy[i])==null?void 0:a.includes(e))??true)})),o=rn(Ey,!!t.renderers),r=yt(()=>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=ja[e];return f(kt,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const Py=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Ay={mapWorkerUrl:Py},Oy={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"interface-languages":{prop:"interfaceLanguages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"panel-sections":{prop:"panelSections",type:"data"},"panel-labels":{prop:"panelLabels",type:"data"},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers","canvasOptions"],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"}}};Yv(Ay.mapWorkerUrl);Mu(Oy,()=>Promise.resolve(Ly));export{ju as $,$ as A,Jm as B,ne as C,Gv as D,ql as E,So as F,Xv as G,oy as H,jf as I,gy as J,ty as K,cn as L,Fu as M,ot as N,Bp as O,Rg as P,qy as Q,Rf as R,Bg as S,yt as T,Op as U,kt as V,bt as W,Fa as X,me as Y,Vt as Z,Ut as _,le as a,Qc as a$,Nv as a0,bf as a1,Gy as a2,ps as a3,Il as a4,Ll as a5,An as a6,Pl as a7,zd as a8,xt as a9,fe as aA,ah as aB,qh as aC,qc as aD,Fc as aE,jh as aF,Vh as aG,uh as aH,il as aI,cf as aJ,Es as aK,Dp as aL,fa as aM,Zf as aN,Xc as aO,ee as aP,th as aQ,Uh as aR,ch as aS,We as aT,Ff as aU,Qh as aV,Tn as aW,Gf as aX,Uf as aY,Xf as aZ,Yf as a_,$s as aa,dt as ab,Rt as ac,Nc as ad,of as ae,qe as af,Tt as ag,No as ah,Pt as ai,Ng as aj,ce as ak,Og as al,Io as am,as as an,cs as ao,Bn as ap,tm as aq,ya as ar,va as as,pl as at,As as au,$p as av,ba as aw,ms as ax,Lo as ay,W as az,ad as b,Ve as b$,Qf as b0,Jf as b1,Dd as b2,Vg as b3,qg as b4,Lp as b5,ke as b6,xv as b7,Vy as b8,Wy as b9,Zd as bA,ul as bB,Th as bC,Lc as bD,fn as bE,gs as bF,ar as bG,zn as bH,eg as bI,ng as bJ,ds as bK,Qp as bL,Be as bM,$n as bN,Qy as bO,xl as bP,Lt as bQ,jd as bR,af as bS,Mh as bT,_s as bU,ws as bV,Al as bW,Vf as bX,wf as bY,Yd as bZ,wh as b_,By as ba,Ss as bb,Jy as bc,Ue as bd,rl as be,zh as bf,rv as bg,Sc as bh,us as bi,Yy as bj,Xy as bk,ef as bl,ys as bm,$y as bn,ir as bo,Is as bp,To as bq,rn as br,Tp as bs,Ac as bt,Oo as bu,mn as bv,Wc as bw,ny as bx,Hl as by,qi as bz,Ps as c,vo as c0,Ns as c1,Uy as c2,Lh as c3,mr as c4,Nd as c5,Wh as c6,Mc as c7,Kp as c8,Kd as c9,hn as ca,Fn as cb,Wr as cc,ea as cd,Zc as ce,Fy as cf,Dy as cg,zy as ch,Zp as ci,Ta as cj,pa as ck,zp as cl,Hp as cm,jy as cn,pe as co,ae as cp,zg as cq,Ol as cr,Hy as cs,Ts as ct,og as cu,Gc as cv,_u as cw,ig as cx,Rp as d,D as e,ge as f,Ky as g,Zy as h,yy as i,uy as j,Mt as k,ly as l,py as m,Xu as n,sy as o,Ke as p,ut as q,Rs as r,sg as s,El as t,f as u,je as v,Bl as w,de as x,F as y,$l as z};
|