@nulib/clover 4.0.0 → 4.1.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.
Files changed (381) hide show
  1. package/dist/components/Body/Body.mjs +16 -1
  2. package/dist/components/Body/glyphs.mjs +15 -0
  3. package/dist/components/Canvas/CanvasView.mjs +116 -12
  4. package/dist/components/Canvas/ChaptersMenu.mjs +105 -0
  5. package/dist/components/Canvas/ControlMenu.mjs +23 -4
  6. package/dist/components/Canvas/Controls.mjs +223 -60
  7. package/dist/components/Canvas/ControlsFade.mjs +16 -0
  8. package/dist/components/Canvas/ImageControls.mjs +209 -0
  9. package/dist/components/Canvas/Placeholder.mjs +44 -12
  10. package/dist/components/Canvas/RowFits.mjs +85 -0
  11. package/dist/components/Canvas/layout.mjs +11 -0
  12. package/dist/components/Canvas/media/MediaBody.mjs +105 -46
  13. package/dist/components/Canvas/media/Player.mjs +0 -55
  14. package/dist/components/Canvas/media/Transport.mjs +14 -23
  15. package/dist/components/Canvas/panClearOfControls.mjs +1 -1
  16. package/dist/components/Collection/Collection.mjs +1 -1
  17. package/dist/components/Items/CountMenu.mjs +1 -0
  18. package/dist/components/Items/Item.mjs +4 -3
  19. package/dist/components/Items/Items.mjs +30 -10
  20. package/dist/components/Items/PagerLayout.mjs +2 -0
  21. package/dist/components/Items/TargetItems.mjs +1 -1
  22. package/dist/components/Items/masonry.mjs +35 -0
  23. package/dist/components/Panel/About.mjs +25 -8
  24. package/dist/components/Root/useRootState.mjs +2 -49
  25. package/dist/components/Scene/SceneView.mjs +13 -2
  26. package/dist/components/Scene/cloverEngine.mjs +2 -1
  27. package/dist/components/Timeline/playerSurface.mjs +2 -0
  28. package/dist/core/clover.mjs +7 -4
  29. package/dist/core/content-state.mjs +5 -3
  30. package/dist/i18n/locales/en.json.mjs +1 -1
  31. package/dist/i18n/locales/es.json.mjs +1 -1
  32. package/dist/i18n/locales/fi.json.mjs +1 -1
  33. package/dist/i18n/locales/fr.json.mjs +1 -1
  34. package/dist/i18n/locales/nb.json.mjs +1 -1
  35. package/dist/i18n/locales/nn.json.mjs +1 -1
  36. package/dist/i18n/locales/no.json.mjs +1 -1
  37. package/dist/i18n/locales/pt.json.mjs +1 -1
  38. package/dist/index.d.mts +109 -51
  39. package/dist/lib/gltf/load.mjs +26 -6
  40. package/dist/lib/renderer/CanvasRenderer.mjs +44 -32
  41. package/dist/lib/renderer/camera/Camera.mjs +1 -1
  42. package/dist/react/useContentStateOutput.mjs +71 -0
  43. package/dist/styles.css +1 -1
  44. package/dist/templates/default/Default.mjs +37 -128
  45. package/dist/templates/document/Document.mjs +41 -64
  46. package/dist/templates/document/Sheets.mjs +13 -5
  47. package/dist/templates/gallery/Gallery.mjs +90 -18
  48. package/dist/templates/index.d.mts +299 -17
  49. package/dist/templates/shared/Lightbox.mjs +161 -69
  50. package/dist/templates/shared/LightboxView.mjs +118 -0
  51. package/dist/templates/shared/PanelPane.mjs +104 -0
  52. package/dist/templates/{document/DocumentPanel.mjs → shared/PanelPart.mjs} +2 -2
  53. package/dist/templates/shared/dragToClose.mjs +51 -8
  54. package/dist/templates/shared/givenAnnotations.mjs +13 -0
  55. package/dist/templates/shared/useDragToClose.mjs +6 -3
  56. package/dist/templates/shared/useLazyPanelPane.mjs +16 -0
  57. package/dist/templates/shared/useSlide.mjs +6 -0
  58. package/dist/templates.css +1 -1
  59. package/dist/ui/ControlCluster.mjs +15 -17
  60. package/dist/ui/Sections.mjs +3 -3
  61. package/dist/ui/mediaIcons.mjs +35 -8
  62. package/dist/ui/useScrollTrack.mjs +2 -1
  63. package/dist/web-components/About-DvyvVUK5.mjs +1 -0
  64. package/dist/web-components/AnnotationItems-BpRcSrOM.mjs +1 -0
  65. package/dist/web-components/{AnnotationMenu-BCwwwfbb.mjs → AnnotationMenu-BDPec3iI.mjs} +1 -1
  66. package/dist/web-components/{AnnotationState-CavxnAAq.mjs → AnnotationState-Chs_37Kk.mjs} +1 -1
  67. package/dist/web-components/{Annotations-DDjSrBL5.mjs → Annotations-6E-oD_wg.mjs} +1 -1
  68. package/dist/web-components/{Annotations-rBmeI5sR.mjs → Annotations-CLPEq7Ro.mjs} +1 -1
  69. package/dist/web-components/Body-Ct61yxI7.mjs +1 -0
  70. package/dist/web-components/{BodyAlert-COKp19lq.mjs → BodyAlert-C_Qh3Up_.mjs} +1 -1
  71. package/dist/web-components/{Button-DLFYqtz9.mjs → Button-L8ZMy5lY.mjs} +1 -1
  72. package/dist/web-components/{Camera-Cp5ma-6C.mjs → Camera-BPyLzZjP.mjs} +1 -1
  73. package/dist/web-components/{Canvas2DBackend-3PToh87Z.mjs → Canvas2DBackend-8wFavYdl.mjs} +1 -1
  74. package/dist/web-components/CanvasView-2Fj9nT06.mjs +2 -0
  75. package/dist/web-components/CaptionDetails-DuwS-grE.mjs +1 -0
  76. package/dist/web-components/ChaptersMenu-Bj2EqtVJ.mjs +1 -0
  77. package/dist/web-components/{Chevron-r-_hUPn8.mjs → Chevron-Cyr_cc9X.mjs} +1 -1
  78. package/dist/web-components/ChoiceMenu-ConzybVH.mjs +1 -0
  79. package/dist/web-components/Collection-CLayN8sv.mjs +1 -0
  80. package/dist/web-components/{CollectionSelect-CBWUbqQi.mjs → CollectionSelect-D2d8dGJ4.mjs} +1 -1
  81. package/dist/web-components/{Connected-B2d6EoFl.mjs → Connected-CBQ6xyhr.mjs} +1 -1
  82. package/dist/web-components/{Connected-BSRM9FJY.mjs → Connected-DMXG3imZ.mjs} +1 -1
  83. package/dist/web-components/{Connected-BnpxYeJN.mjs → Connected-pyd0EBD3.mjs} +1 -1
  84. package/dist/web-components/{Contents-D7FPxSH-.mjs → Contents-tCMXBYDK.mjs} +1 -1
  85. package/dist/web-components/ControlMenu-D1zkB0qX.mjs +1 -0
  86. package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +1 -0
  87. package/dist/web-components/{CountMenu-DyTp_J4k.mjs → CountMenu-Dnzb7lKo.mjs} +1 -1
  88. package/dist/web-components/Cue-CUGmPS3k.mjs +1 -0
  89. package/dist/web-components/Document-D-8nalCX.mjs +1 -0
  90. package/dist/web-components/{DomLayers-CTGub6wo.mjs → DomLayers-BxPU05-D.mjs} +1 -1
  91. package/dist/web-components/{Download-BOYNIb7C.mjs → Download-Bku9Vptk.mjs} +1 -1
  92. package/dist/web-components/{EntryBodies-Bfd2Z42z.mjs → EntryBodies-77vDudCb.mjs} +1 -1
  93. package/dist/web-components/{EntryThumbnail-DQE8ajI9.mjs → EntryThumbnail-BxQWKW6e.mjs} +1 -1
  94. package/dist/web-components/{FieldPill-D5DNJWLy.mjs → FieldPill-nFGsaru9.mjs} +1 -1
  95. package/dist/web-components/FrameAnimation-BvKiSXcm.mjs +1 -0
  96. package/dist/web-components/Gallery-4Hd58afA.mjs +1 -0
  97. package/dist/web-components/{HideToggle-DL911R1Z.mjs → HideToggle-TEhY4TS4.mjs} +1 -1
  98. package/dist/web-components/ImageControls-CZO7WoPb.mjs +1 -0
  99. package/dist/web-components/Items-CudZ4Lnb.mjs +1 -0
  100. package/dist/web-components/Label-f07N5Fld.mjs +1 -0
  101. package/dist/web-components/{LanguageChoice-DT1UPiDn.mjs → LanguageChoice-B5VM21DV.mjs} +1 -1
  102. package/dist/web-components/LightboxView-C4OASmkg.mjs +1 -0
  103. package/dist/web-components/ListEnd-M39M62Cl.mjs +1 -0
  104. package/dist/web-components/{Loaded-BWfEBJyg.mjs → Loaded-oGFyBuos.mjs} +1 -1
  105. package/dist/web-components/LoadedCanvas-IvpSzPO6.mjs +1 -0
  106. package/dist/web-components/LoadedMap-WATGNLxl.mjs +1 -0
  107. package/dist/web-components/{Loading-zw74TdAz.mjs → Loading-YxuKrDAM.mjs} +1 -1
  108. package/dist/web-components/{Map--dJhk0_0.mjs → Map-Cw9j3gi3.mjs} +1 -1
  109. package/dist/web-components/MapView-3OxoCr5l.mjs +3 -0
  110. package/dist/web-components/Markup-DW75Jx3j.mjs +2 -0
  111. package/dist/web-components/MediaBody-CLtd0bf0.mjs +1 -0
  112. package/dist/web-components/MediaBody-JnKnoIqY.mjs +1 -0
  113. package/dist/web-components/{NavDate-BQHuyLOC.mjs → NavDate-BCCOyycx.mjs} +1 -1
  114. package/dist/web-components/{Navigator-B3U21_ti.mjs → Navigator-Bx4zS0Yr.mjs} +1 -1
  115. package/dist/web-components/{Pager-DnJknq92.mjs → Pager-B9GvQ64b.mjs} +1 -1
  116. package/dist/web-components/PagerLayout-BF33VZL_.mjs +1 -0
  117. package/dist/web-components/Panel-BvDpCn6K.mjs +1 -0
  118. package/dist/web-components/PanelPart-Bd4lSUrP.mjs +1 -0
  119. package/dist/web-components/{PanelToggle-CFtWIeWv.mjs → PanelToggle-bPcIULGZ.mjs} +1 -1
  120. package/dist/web-components/{PartOfManifest-F87jIrf9.mjs → PartOfManifest-HLg-r00O.mjs} +1 -1
  121. package/dist/web-components/{Pending-CYAQajKu.mjs → Pending-BxGjjnqq.mjs} +1 -1
  122. package/dist/web-components/PlaceBox-D-Zhe9-U.mjs +1 -0
  123. package/dist/web-components/Placeholder-DzY5hcbk.mjs +1 -0
  124. package/dist/web-components/{Position-BkWBRBfW.mjs → Position-TYnzcm8e.mjs} +1 -1
  125. package/dist/web-components/{Primitives-BmODPlnK.mjs → Primitives-C6VJXxZD.mjs} +1 -1
  126. package/dist/web-components/Provider-DyB0wpeO.mjs +1 -0
  127. package/dist/web-components/{ReadMore-BwGFsLS2.mjs → ReadMore-De_0T7lc.mjs} +1 -1
  128. package/dist/web-components/Root-Bt3NNBFb.mjs +1 -0
  129. package/dist/web-components/Scene-DrOM9YlD.mjs +1 -0
  130. package/dist/web-components/SceneView-DA7Yg20p.mjs +1 -0
  131. package/dist/web-components/{Search-CbmK9vLp.mjs → Search-DgT8OPsK.mjs} +1 -1
  132. package/dist/web-components/{Sections-Dy5_pkyQ.mjs → Sections-d1acn7qm.mjs} +2 -2
  133. package/dist/web-components/{StandaloneItems-BmUnBp0H.mjs → StandaloneItems-DUb4YKCB.mjs} +1 -1
  134. package/dist/web-components/{Status-Dww3Pyf4.mjs → Status-CcU3u6P4.mjs} +1 -1
  135. package/dist/web-components/{Steps-o_UprQfZ.mjs → Steps-nlSCzbDQ.mjs} +1 -1
  136. package/dist/web-components/{TargetItems-BBOGDubv.mjs → TargetItems-BDJM3Ar-.mjs} +1 -1
  137. package/dist/web-components/Timeline-BfdN3lIv.mjs +1 -0
  138. package/dist/web-components/{Tip-BbexILXs.mjs → Tip-OCB88zwY.mjs} +1 -1
  139. package/dist/web-components/{Transcript-ZVXM3ZDA.mjs → Transcript-bSA3cx_K.mjs} +1 -1
  140. package/dist/web-components/Transport-DaIhfZqC.mjs +1 -0
  141. package/dist/web-components/Transport-DjOYI-fR.mjs +1 -0
  142. package/dist/web-components/{annotation-collection-7SS1ELcO.mjs → annotation-collection-D8emkElk.mjs} +1 -1
  143. package/dist/web-components/{annotation-name-CYkZopdd.mjs → annotation-name-DbWjhgra.mjs} +1 -1
  144. package/dist/web-components/{annotations-content-Bdtn50sf.mjs → annotations-content-Bg6aVAGC.mjs} +1 -1
  145. package/dist/web-components/{body-CkOBHlJ0.mjs → body-Ct8dmQdW.mjs} +1 -1
  146. package/dist/web-components/canvas-goEZLqEd.mjs +1 -0
  147. package/dist/web-components/cloverEngine-Df7cMwOP.mjs +164 -0
  148. package/dist/web-components/{content-state-reader-Ahh6artg.mjs → content-state-reader-CNmBpG1L.mjs} +1 -1
  149. package/dist/web-components/{controls-BJrZVQkS.mjs → controls-BZr16sYQ.mjs} +1 -1
  150. package/dist/web-components/custom-elements.json +160 -44
  151. package/dist/web-components/{downloads-CqVWo-yn.mjs → downloads-EjJ6Hpip.mjs} +1 -1
  152. package/dist/web-components/dragToClose-X9NbZOhA.mjs +1 -0
  153. package/dist/web-components/{engine-B-sscpLa.mjs → engine-DMoc0tff.mjs} +1 -1
  154. package/dist/web-components/{engines-DfCHjbt3.mjs → engines-BmB81VXR.mjs} +1 -1
  155. package/dist/web-components/es-B1NvdYp-.mjs +1 -0
  156. package/dist/web-components/{fetchManifest-BIzne1Pj.mjs → fetchManifest-CwQC6cCh.mjs} +1 -1
  157. package/dist/web-components/fi-BjtYZNLo.mjs +1 -0
  158. package/dist/web-components/fr-Cd22Lziw.mjs +1 -0
  159. package/dist/web-components/fromManifest-DrAmY1lB.mjs +1 -0
  160. package/dist/web-components/glyphs-BFK_hvJJ.mjs +1 -0
  161. package/dist/web-components/hooks-BhtNDs_1.mjs +1 -0
  162. package/dist/web-components/image-layers-D2nQC4R-.mjs +1 -0
  163. package/dist/web-components/{imageService-0eTvQ-3h.mjs → imageService-iFElsopt.mjs} +1 -1
  164. package/dist/web-components/index-FJEpXukG.mjs +1 -0
  165. package/dist/web-components/index.d.mts +4 -4
  166. package/dist/web-components/index.mjs +1 -1
  167. package/dist/web-components/items-BPPrqbeh.mjs +1 -0
  168. package/dist/web-components/items-BnEnc5ot.mjs +1 -0
  169. package/dist/web-components/label-DauFa5sg.mjs +1 -0
  170. package/dist/web-components/layout-Djwu8f4R.mjs +1 -0
  171. package/dist/web-components/{link-GEdiEwlR.mjs → link-0lUlTZlw.mjs} +1 -1
  172. package/dist/web-components/logo-DWPxaZaG.mjs +1 -0
  173. package/dist/web-components/masonry-0QfzOgbB.mjs +1 -0
  174. package/dist/web-components/{models-59cEeiAA.mjs → models-BF2pqufA.mjs} +1 -1
  175. package/dist/web-components/nb-CEwZDBiR.mjs +1 -0
  176. package/dist/web-components/nn-jYQhr9RI.mjs +1 -0
  177. package/dist/web-components/no-CEwZDBiR.mjs +1 -0
  178. package/dist/web-components/{nodes-CTw9OqlA.mjs → nodes-ChQRLDGU.mjs} +1 -1
  179. package/dist/web-components/{overlayImage-BMt4UTlR.mjs → overlayImage-MKrcgDep.mjs} +1 -1
  180. package/dist/web-components/panClearOfControls-Cn2ZXsZi.mjs +1 -0
  181. package/dist/web-components/{panel-C17Rl9Ya.mjs → panel-C13V6w6E.mjs} +1 -1
  182. package/dist/web-components/part-CekFWrtz.mjs +1 -0
  183. package/dist/web-components/playerSurface-DG1XipTq.mjs +1 -0
  184. package/dist/web-components/pointer-YQppt0at.mjs +1 -0
  185. package/dist/web-components/{provider-BpxorEiq.mjs → provider-DiUkZYiW.mjs} +1 -1
  186. package/dist/web-components/pt-CWR30SzS.mjs +1 -0
  187. package/dist/web-components/{range-regions-BGQy4E9U.mjs → range-regions-CqGjyM76.mjs} +1 -1
  188. package/dist/web-components/{read-more-BDM_6CVc.mjs → read-more-D8RJYdtQ.mjs} +1 -1
  189. package/dist/web-components/readingLanguages-BWOLZK2k.mjs +1 -0
  190. package/dist/web-components/rendererSurface-BkbGDL_Z.mjs +22 -0
  191. package/dist/web-components/{renderers-CiB74bQh.mjs → renderers-LtRX5pT0.mjs} +1 -1
  192. package/dist/web-components/{resource-CRbpf9pX.mjs → resource-Cfydiy4m.mjs} +1 -1
  193. package/dist/web-components/{save-file-CCuZEuQr.mjs → save-file-dZyOpXgY.mjs} +1 -1
  194. package/dist/web-components/search-BfUZJM3a.mjs +1 -0
  195. package/dist/web-components/shared-DkY2a89G.mjs +1 -0
  196. package/dist/web-components/{show-link-BXm7SNIC.mjs → show-link-DgLJzG7k.mjs} +1 -1
  197. package/dist/web-components/{sizedImage-k4Q-eyOB.mjs → sizedImage-NHzhcBYk.mjs} +1 -1
  198. package/dist/web-components/{split-Hp6z-v4h.mjs → split-CuFiKjin.mjs} +1 -1
  199. package/dist/web-components/{status-BmtuKfAG.mjs → status-C3etlkhY.mjs} +1 -1
  200. package/dist/web-components/styles-DkkVOSUQ.mjs +1 -0
  201. package/dist/web-components/three.mjs +1 -1
  202. package/dist/web-components/{thumbnail-Dp7a8oom.mjs → thumbnail-DecrVnpj.mjs} +1 -1
  203. package/dist/web-components/{tip-C-oovDZK.mjs → tip-D5YgaIWW.mjs} +1 -1
  204. package/dist/web-components/{toggle-C7ODWDEZ.mjs → toggle-CZGB65VZ.mjs} +1 -1
  205. package/dist/web-components/{useContainerName-CrOmY-km.mjs → useContainerName-hKQjEt7a.mjs} +1 -1
  206. package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +1 -0
  207. package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +1 -0
  208. package/dist/web-components/{useNearViewport-BqXi9Gn4.mjs → useNearViewport-CDbHQUBk.mjs} +1 -1
  209. package/dist/web-components/useScrollTrack-D9l_P3_B.mjs +1 -0
  210. package/dist/web-components/viewer/AnnotationItems-DtsnDXPM.mjs +1 -0
  211. package/dist/web-components/viewer/{AnnotationMenu-DPOSehBo.mjs → AnnotationMenu-C-Mz6CCn.mjs} +1 -1
  212. package/dist/web-components/viewer/AnnotationState-5pim5K72.mjs +1 -0
  213. package/dist/web-components/viewer/Annotations-Cqn1TkzD.mjs +2 -0
  214. package/dist/web-components/viewer/Annotations-CxwN9FkB.mjs +1 -0
  215. package/dist/web-components/viewer/{Canvas2DBackend-BTK6ZJh0.mjs → Canvas2DBackend-C-ZMSCak.mjs} +1 -1
  216. package/dist/web-components/viewer/CaptionDetails-CRD-gSZP.mjs +1 -0
  217. package/dist/web-components/viewer/ChaptersMenu-Brcq3yJv.mjs +1 -0
  218. package/dist/web-components/viewer/{ChoiceMenu-DQ1x572Y.mjs → ChoiceMenu-ByGzQQx1.mjs} +1 -1
  219. package/dist/web-components/viewer/Collection-m0GCcsfQ.mjs +1 -0
  220. package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +1 -0
  221. package/dist/web-components/viewer/Connected-Dvx7wtot.mjs +1 -0
  222. package/dist/web-components/viewer/Contents-CwDpfiJY.mjs +1 -0
  223. package/dist/web-components/viewer/ControlMenu-TcO85hDf.mjs +1 -0
  224. package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +1 -0
  225. package/dist/web-components/viewer/{CountMenu-4u6U6yqb.mjs → CountMenu-0-ie8kIZ.mjs} +1 -1
  226. package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +1 -0
  227. package/dist/web-components/viewer/Document-BsryuYJ1.mjs +1 -0
  228. package/dist/web-components/viewer/{DomLayers-CGkDtemL.mjs → DomLayers-hc0qARQc.mjs} +1 -1
  229. package/dist/web-components/viewer/Download-MO-1Rik4.mjs +1 -0
  230. package/dist/web-components/viewer/EntryBodies-g-OEwEsk.mjs +1 -0
  231. package/dist/web-components/viewer/EntryThumbnail-DcIDYATi.mjs +1 -0
  232. package/dist/web-components/viewer/{FieldPill-DFXGWrvB.mjs → FieldPill-B9S21lxw.mjs} +1 -1
  233. package/dist/web-components/viewer/FrameAnimation-qI9cZPEs.mjs +1 -0
  234. package/dist/web-components/viewer/Gallery-BOgUqfqw.mjs +1 -0
  235. package/dist/web-components/viewer/{HideToggle-DP5kHzWM.mjs → HideToggle-D8wH49mq.mjs} +1 -1
  236. package/dist/web-components/viewer/ImageControls-ZoEC9jWd.mjs +1 -0
  237. package/dist/web-components/viewer/LanguageChoice-CRqsCBAp.mjs +1 -0
  238. package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +1 -0
  239. package/dist/web-components/viewer/ListEnd-D9Obxie4.mjs +1 -0
  240. package/dist/web-components/viewer/{MapView-BN9wXQKV.mjs → MapView-DQSwUzd7.mjs} +2 -2
  241. package/dist/web-components/viewer/MediaBody-CIw2nTlj.mjs +1 -0
  242. package/dist/web-components/viewer/MediaBody-D5ff6xy-.mjs +1 -0
  243. package/dist/web-components/viewer/{NavDate-C2-wwLuB.mjs → NavDate-BnfDG57h.mjs} +1 -1
  244. package/dist/web-components/viewer/{Navigator-C3jghOd3.mjs → Navigator-BNwjmkXY.mjs} +1 -1
  245. package/dist/web-components/viewer/PagerLayout-C8jraHqs.mjs +1 -0
  246. package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +1 -0
  247. package/dist/web-components/viewer/{PartOfManifest-D22yMgCf.mjs → PartOfManifest-DX7H0V4g.mjs} +1 -1
  248. package/dist/web-components/viewer/PlaceBox-CCWfzsNU.mjs +1 -0
  249. package/dist/web-components/viewer/Placeholder-CsEkLhz7.mjs +1 -0
  250. package/dist/web-components/viewer/Search-CsdYzdq1.mjs +1 -0
  251. package/dist/web-components/viewer/StandaloneItems-BfvBxbUm.mjs +1 -0
  252. package/dist/web-components/viewer/{Steps-Bw32X5xO.mjs → Steps-BH8ZApS4.mjs} +1 -1
  253. package/dist/web-components/viewer/{TargetItems-DLhUH1Gq.mjs → TargetItems-BebPFr-c.mjs} +1 -1
  254. package/dist/web-components/viewer/Transcript-DXLv5WR9.mjs +1 -0
  255. package/dist/web-components/viewer/Transport-C-fh7Kx2.mjs +1 -0
  256. package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +1 -0
  257. package/dist/web-components/viewer/annotation-collection-Cjd8Dgyl.mjs +1 -0
  258. package/dist/web-components/viewer/annotation-name-CwmgQFia.mjs +1 -0
  259. package/dist/web-components/viewer/{annotations-content-CbA3eOIC.mjs → annotations-content-BARXoAz-.mjs} +1 -1
  260. package/dist/web-components/viewer/cloverEngine-CumnJPKO.mjs +164 -0
  261. package/dist/web-components/viewer/{content-state-reader-C7UBMOq3.mjs → content-state-reader-DuvyLThu.mjs} +1 -1
  262. package/dist/web-components/viewer/dragToClose-CFCxhUxn.mjs +1 -0
  263. package/dist/web-components/viewer/{fetchManifest-C2Yxg3x9.mjs → fetchManifest-qNB_KgxL.mjs} +1 -1
  264. package/dist/web-components/viewer/{host-CZeyjCKR.mjs → host-GTHX2fPK.mjs} +1 -1
  265. package/dist/web-components/viewer/image-layers-DKOuaRTj.mjs +1 -0
  266. package/dist/web-components/viewer/index.mjs +1 -1
  267. package/dist/web-components/viewer/{link-DssZ0Z2N.mjs → link-BlaM0tCa.mjs} +1 -1
  268. package/dist/web-components/viewer/overlayImage-RVpv69R5.mjs +1 -0
  269. package/dist/web-components/viewer/range-regions-CIZiAHOp.mjs +1 -0
  270. package/dist/web-components/viewer/{renderers-DLoqv3QO.mjs → renderers-Dw1klwlx.mjs} +1 -1
  271. package/dist/web-components/viewer/{save-file-CJT5p5Hg.mjs → save-file-EvzaBEJN.mjs} +1 -1
  272. package/dist/web-components/viewer/{search-PhOwMKHi.mjs → search-x1QL_bth.mjs} +1 -1
  273. package/dist/web-components/viewer/styles-I7_LWFGj.mjs +1 -0
  274. package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +1 -0
  275. package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +1 -0
  276. package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +29 -0
  277. package/dist/web-components/viewer/{vtt-1Pk7Dhsj.mjs → vtt-C2G89SWH.mjs} +1 -1
  278. package/dist/web-components/viewer-Br44EEba.mjs +1 -0
  279. package/dist/web-components/{vtt-CacHieeN.mjs → vtt-Dd0c7psH.mjs} +1 -1
  280. package/package.json +1 -1
  281. package/dist/templates/shared/LightboxBody.mjs +0 -9
  282. package/dist/web-components/About-DhOGPFaI.mjs +0 -1
  283. package/dist/web-components/AnnotationItems-CNP4CJiT.mjs +0 -1
  284. package/dist/web-components/Body-DaY1UJIy.mjs +0 -1
  285. package/dist/web-components/BodyUnloadable-DcTM7hHF.mjs +0 -1
  286. package/dist/web-components/CanvasView-BWQ4SK2b.mjs +0 -2
  287. package/dist/web-components/CaptionDetails-DSziiuQV.mjs +0 -1
  288. package/dist/web-components/ChoiceMenu-DTuEEUeM.mjs +0 -1
  289. package/dist/web-components/Collection-B9swJtPW.mjs +0 -1
  290. package/dist/web-components/ControlMenu-Crtho2cs.mjs +0 -1
  291. package/dist/web-components/Cue-CbZaGwZh.mjs +0 -1
  292. package/dist/web-components/Document-BfltLWZZ.mjs +0 -1
  293. package/dist/web-components/DocumentPanel-ZSe40cV4.mjs +0 -1
  294. package/dist/web-components/FrameAnimation-IfR1czfc.mjs +0 -1
  295. package/dist/web-components/Gallery-DD06BDQo.mjs +0 -1
  296. package/dist/web-components/Items-BHzT9A73.mjs +0 -1
  297. package/dist/web-components/Label-KabnxuMN.mjs +0 -1
  298. package/dist/web-components/LightboxBody-BhRhdXo6.mjs +0 -1
  299. package/dist/web-components/ListEnd-CbwNlty-.mjs +0 -1
  300. package/dist/web-components/LoadedCanvas-CdZ5WOWz.mjs +0 -1
  301. package/dist/web-components/LoadedMap-DQyQVRVQ.mjs +0 -1
  302. package/dist/web-components/MapView-duA5WGsu.mjs +0 -3
  303. package/dist/web-components/Markup-D-kioDf9.mjs +0 -2
  304. package/dist/web-components/MediaBody-CoOiVXcv.mjs +0 -1
  305. package/dist/web-components/MediaBody-d8ErTuwT.mjs +0 -1
  306. package/dist/web-components/PagerLayout-CvOmKtSW.mjs +0 -1
  307. package/dist/web-components/Panel-CIdjOznL.mjs +0 -1
  308. package/dist/web-components/PlaceBox-BtIbIotm.mjs +0 -1
  309. package/dist/web-components/Placeholder-TIyj4ZjR.mjs +0 -1
  310. package/dist/web-components/Provider-C8se8i4I.mjs +0 -1
  311. package/dist/web-components/Root-CAJB0-Mh.mjs +0 -1
  312. package/dist/web-components/Scene-Ctcdt7CD.mjs +0 -1
  313. package/dist/web-components/SceneView-B6bEx_7x.mjs +0 -1
  314. package/dist/web-components/Timeline-CfIF4APc.mjs +0 -1
  315. package/dist/web-components/canvas-CWf_Fag8.mjs +0 -1
  316. package/dist/web-components/cloverEngine-6djEHNCD.mjs +0 -164
  317. package/dist/web-components/dragToClose-C-Pf1IeO.mjs +0 -1
  318. package/dist/web-components/es-BYfHUZ7P.mjs +0 -1
  319. package/dist/web-components/fi-B5y2qr8T.mjs +0 -1
  320. package/dist/web-components/fr-ChezCx6V.mjs +0 -1
  321. package/dist/web-components/fromManifest-gg5Wx14y.mjs +0 -1
  322. package/dist/web-components/glyphs-JYl2STEr.mjs +0 -1
  323. package/dist/web-components/hooks-x7rO95CS.mjs +0 -1
  324. package/dist/web-components/image-layers-BjbeyHBS.mjs +0 -1
  325. package/dist/web-components/index-BZ7b9k0N.mjs +0 -1
  326. package/dist/web-components/items-CnAIl9fS.mjs +0 -1
  327. package/dist/web-components/items-F6hJgdAS.mjs +0 -1
  328. package/dist/web-components/label-CI88KH2_.mjs +0 -1
  329. package/dist/web-components/layout-De1MOSYe.mjs +0 -1
  330. package/dist/web-components/logo-Ckwj7FlP.mjs +0 -1
  331. package/dist/web-components/nb-8J22f9Td.mjs +0 -1
  332. package/dist/web-components/nn-Dv1EvzI1.mjs +0 -1
  333. package/dist/web-components/no-8J22f9Td.mjs +0 -1
  334. package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +0 -1
  335. package/dist/web-components/part-CXts97_M.mjs +0 -1
  336. package/dist/web-components/playerSurface-HYwEwPK6.mjs +0 -1
  337. package/dist/web-components/pt-DWYQkATt.mjs +0 -1
  338. package/dist/web-components/readingLanguages-fs_HqvqQ.mjs +0 -1
  339. package/dist/web-components/rendererSurface-C0aKlE0v.mjs +0 -22
  340. package/dist/web-components/search-CkM0O0Z1.mjs +0 -1
  341. package/dist/web-components/shared-MTsMddHx.mjs +0 -1
  342. package/dist/web-components/styles-CZV1nbBQ.mjs +0 -1
  343. package/dist/web-components/useScrollTrack-CEsOU2yT.mjs +0 -1
  344. package/dist/web-components/viewer/AnnotationItems-CyhVcRFc.mjs +0 -1
  345. package/dist/web-components/viewer/AnnotationState-Bjztkobn.mjs +0 -1
  346. package/dist/web-components/viewer/Annotations-Dh_8Tzi0.mjs +0 -2
  347. package/dist/web-components/viewer/Annotations-wwuOCxzI.mjs +0 -1
  348. package/dist/web-components/viewer/CaptionDetails-BwCTovy_.mjs +0 -1
  349. package/dist/web-components/viewer/Collection-DSBxCmXw.mjs +0 -1
  350. package/dist/web-components/viewer/Connected-CL3N8F2J.mjs +0 -1
  351. package/dist/web-components/viewer/Connected-DTk1jlyI.mjs +0 -1
  352. package/dist/web-components/viewer/Contents-DrXckx7d.mjs +0 -1
  353. package/dist/web-components/viewer/ControlMenu-Bp91s-g_.mjs +0 -1
  354. package/dist/web-components/viewer/Cue-C-aF8peC.mjs +0 -1
  355. package/dist/web-components/viewer/Document-BN1rICu3.mjs +0 -1
  356. package/dist/web-components/viewer/DocumentPanel-CEesxdeY.mjs +0 -1
  357. package/dist/web-components/viewer/Download-CawEl9MN.mjs +0 -1
  358. package/dist/web-components/viewer/EntryBodies-nYHMwSSM.mjs +0 -1
  359. package/dist/web-components/viewer/EntryThumbnail-DrO_0SzR.mjs +0 -1
  360. package/dist/web-components/viewer/FrameAnimation-CZfzpxaD.mjs +0 -1
  361. package/dist/web-components/viewer/Gallery-MWHtvjti.mjs +0 -1
  362. package/dist/web-components/viewer/LanguageChoice-C50T7dPI.mjs +0 -1
  363. package/dist/web-components/viewer/LightboxBody-C2T7IC29.mjs +0 -1
  364. package/dist/web-components/viewer/ListEnd-BDuOx__m.mjs +0 -1
  365. package/dist/web-components/viewer/MediaBody-CEyswliX.mjs +0 -1
  366. package/dist/web-components/viewer/MediaBody-Dw3DWDjc.mjs +0 -1
  367. package/dist/web-components/viewer/PagerLayout-Cg2NpqoD.mjs +0 -1
  368. package/dist/web-components/viewer/PlaceBox-Dckw4Sfk.mjs +0 -1
  369. package/dist/web-components/viewer/Placeholder-NYVWYg5Q.mjs +0 -1
  370. package/dist/web-components/viewer/Search-DC259m4f.mjs +0 -1
  371. package/dist/web-components/viewer/StandaloneItems-E4kpMne9.mjs +0 -1
  372. package/dist/web-components/viewer/Transcript-D_VGJQxn.mjs +0 -1
  373. package/dist/web-components/viewer/annotation-collection-DZHa18ir.mjs +0 -1
  374. package/dist/web-components/viewer/annotation-name-BaNdW2Xk.mjs +0 -1
  375. package/dist/web-components/viewer/cloverEngine-C04bCSFR.mjs +0 -164
  376. package/dist/web-components/viewer/image-layers-B09fporZ.mjs +0 -1
  377. package/dist/web-components/viewer/overlayImage-BR3eJCKq.mjs +0 -1
  378. package/dist/web-components/viewer/range-regions-By6L5JOK.mjs +0 -1
  379. package/dist/web-components/viewer/styles-NZLnZPAC.mjs +0 -1
  380. package/dist/web-components/viewer/viewer-D30YHqyF.mjs +0 -29
  381. package/dist/web-components/viewer-CH7re5OO.mjs +0 -1
@@ -0,0 +1,29 @@
1
+ var kl=Object.defineProperty;var Cl=(t,e,n)=>e in t?kl(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var P=(t,e,n)=>Cl(t,typeof e!="symbol"?e+"":e,n);import{s as na}from"./styles-I7_LWFGj.mjs";function El(t={}){return Promise.resolve().then(()=>Iu).then(e=>e.initCloverI18n(t))}const oa="@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 Ml=null,gn=null;const Tl=()=>Ml??(Ml=import("./host-GTHX2fPK.mjs").then(t=>gn=t)),Il=t=>t.trim().toLowerCase()==="false";function Pl(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Il(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 Ll=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function Al(t){class e extends HTMLElement{constructor(){super(...arguments);P(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){na(this.ownerDocument).inject("elements",oa)}}customElements.define(t.tag,e)}function Ol(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return Al(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),Tl()]));class c extends HTMLElement{constructor(){super(...arguments);P(this,"kind",n);P(this,"needsRoot",!!t.needsRoot);P(this,"values",{});P(this,"kept",{});P(this,"props",{});P(this,"listeners",new Set);P(this,"warned",new Set);P(this,"handlers",Object.fromEntries(r.map(([d,h])=>[h.prop,(...p)=>{var v;if(h.keeps&&(this.kept[h.keeps]=p[0]??null,p[0]==null))return true;const m=h.detail==="first"?p[0]:Object.fromEntries(h.detail.map((b,_)=>[b,p[_]])),g=new CustomEvent(d,{detail:m,bubbles:!h.keeps,composed:!h.keeps,cancelable:!!h.cancelable}),w=this.dispatchEvent(g);if(!w&&h.cancelable){const b=p[p.length-1];(v=b==null?void 0:b.preventDefault)==null||v.call(b)}return w}])));P(this,"getProps",()=>this.props);P(this,"subscribe",d=>(this.listeners.add(d),()=>{this.listeners.delete(d)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const d of o){if(!Object.prototype.hasOwnProperty.call(this,d))continue;const h=this[d];delete this[d],h!=null&&(this.values[d]=h)}this.update(),this.warnOfAria(),na(this.ownerDocument).inject("elements",oa),a().then(()=>{this.isConnected&&gn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||gn==null||gn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const d of["aria-label","aria-labelledby","role"])!this.hasAttribute(d)||this.warned.has(d)||(this.warned.add(d),console.warn(`<${t.tag}>: ${d} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const d={...this.handlers,...this.values};for(const[h,p]of Object.entries(t.attributes)){if(p.prop in this.values)continue;const m=this.getAttribute(h),g=Pl(m,p,w=>{const v=`${h}=${m}`;this.warned.has(v)||(this.warned.add(v),console.warn(`<${t.tag}>: ${h}="${m}" ${w}; ignored.`))});g!==void 0&&(d[p.prop]=g)}Ll(d,this.props)||(this.props=d,this.listeners.forEach(h=>h()))}}P(c,"initCloverI18n",El);for(const l of o)Object.defineProperty(c.prototype,l,{configurable:true,enumerable:true,get(){return l in this.values?this.values[l]:this.getProps()[l]},set(u){u==null?delete this.values[l]:this.values[l]=u,this.update()}});for(const[,l]of r){if(!l.keeps)continue;const u=l.keeps;Object.defineProperty(c.prototype,u,{configurable:true,enumerable:true,get(){return this.kept[u]??null}})}customElements.define(t.tag,c)}var Cn,st,ra,Ae,Ns,sa,ia,aa,Pr,ar,cr,ca,wn={},la=[],Nl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,En=Array.isArray;function ne(t,e){for(var n in e)t[n]=e[n];return t}function Lr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ye(t,e,n){var o,r,s,i={};for(s in e)s=="key"?o=e[s]:s=="ref"?r=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?Cn.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 bn(t,i,o,r,null)}function bn(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??++ra,__i:-1,__u:0};return r==null&&st.vnode!=null&&st.vnode(s),s}function Rl(){return{current:null}}function kt(t){return t.children}function oe(t,e){this.props=t,this.context=e}function Qe(t,e){if(e==null)return t.__?Qe(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"?Qe(t):null}function ua(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 ua(t)}}function lr(t){(!t.__d&&(t.__d=true)&&Ae.push(t)&&!ro.__r++||Ns!=st.debounceRendering)&&((Ns=st.debounceRendering)||sa)(ro)}function ro(){for(var t,e,n,o,r,s,i,a=1;Ae.length;)Ae.length>a&&Ae.sort(ia),t=Ae.shift(),a=Ae.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=ne({},o)).__v=o.__v+1,st.vnode&&st.vnode(n),Ar(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??Qe(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,ha(s,n,i),o.__e=o.__=null,n.__e!=r&&ua(n)));ro.__r=0}function da(t,e,n,o,r,s,i,a,c,l,u){var d,h,p,m,g,w,v,b=o&&o.__k||la,_=e.length;for(c=Bl(n,e,b,c,_),d=0;d<_;d++)(p=n.__k[d])!=null&&(h=p.__i==-1?wn:b[p.__i]||wn,p.__i=d,w=Ar(t,p,h,r,s,i,a,c,l,u),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Or(h.ref,null,p),u.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),(v=!!(4&p.__u))||h.__k===p.__k?c=fa(p,c,t,v):typeof p.type=="function"&&w!==void 0?c=w:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=g,c}function Bl(t,e,n,o,r){var s,i,a,c,l,u=n.length,d=u,h=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+h,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?bn(null,i,null,null,null):En(i)?bn(kt,{children:i},null,null,null):i.constructor==null&&i.__b>0?bn(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=$l(i,n,c,d))!=-1&&(d--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>u?h--:r<u&&h++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,i.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<u;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=Qe(a)),ma(a,a));return o}function fa(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=fa(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=Qe(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ve(t,e){return e=e||[],t==null||typeof t=="boolean"||(En(t)?t.some(function(n){ve(n,e)}):e.push(t)),e}function $l(t,e,n,o){var r,s,i,a=t.key,c=t.type,l=e[n],u=l!=null&&(2&l.__u)==0;if(l===null&&t.key==null||u&&a==l.key&&c==l.type)return n;if(o>(u?1:0)){for(r=n-1,s=n+1;r>=0||s<e.length;)if((l=e[i=r>=0?r--:s++])!=null&&!(2&l.__u)&&a==l.key&&c==l.type)return i}return-1}function Rs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Nl.test(e)?n:n+"px"}function Xn(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||Rs(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||Rs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(aa,"$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=Pr,t.addEventListener(e,s?cr:ar,s)):t.removeEventListener(e,s?cr:ar,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 Bs(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Pr++;else if(e.t<n.u)return;return n(st.event?st.event(e):e)}}}function Ar(t,e,n,o,r,s,i,a,c,l){var u,d,h,p,m,g,w,v,b,_,k,x,I,O,H,Y,it,G=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(u=st.__b)&&u(e);t:if(typeof G=="function")try{if(v=e.props,b="prototype"in G&&G.prototype.render,_=(u=G.contextType)&&o[u.__c],k=u?_?_.props.value:u.__:o,n.__c?w=(d=e.__c=n.__c).__=d.__E:(b?e.__c=d=new G(v,k):(e.__c=d=new oe(v,k),d.constructor=G,d.render=Dl),_&&_.sub(d),d.props=v,d.state||(d.state={}),d.context=k,d.__n=o,h=d.__d=true,d.__h=[],d._sb=[]),b&&d.__s==null&&(d.__s=d.state),b&&G.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ne({},d.__s)),ne(d.__s,G.getDerivedStateFromProps(v,d.__s))),p=d.props,m=d.state,d.__v=e,h)b&&G.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),b&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(b&&G.getDerivedStateFromProps==null&&v!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,k),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,k)===false||e.__v==n.__v){for(e.__v!=n.__v&&(d.props=v,d.state=d.__s,d.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(J){J&&(J.__=e)}),x=0;x<d._sb.length;x++)d.__h.push(d._sb[x]);d._sb=[],d.__h.length&&i.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,k),b&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,g)})}if(d.context=k,d.props=v,d.__P=t,d.__e=false,I=st.__r,O=0,b){for(d.state=d.__s,d.__d=false,I&&I(e),u=d.render(d.props,d.state,d.context),H=0;H<d._sb.length;H++)d.__h.push(d._sb[H]);d._sb=[]}else do d.__d=false,I&&I(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++O<25);d.state=d.__s,d.getChildContext!=null&&(o=ne(ne({},o),d.getChildContext())),b&&!h&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(p,m)),Y=u,u!=null&&u.type===kt&&u.key==null&&(Y=pa(u.props.children)),a=da(t,En(Y)?Y:[Y],e,n,o,r,s,i,a,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&i.push(d),w&&(d.__E=d.__=null)}catch(J){if(e.__v=null,c||s!=null)if(J.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(it=s.length;it--;)Lr(s[it]);ur(e)}else e.__e=n.__e,e.__k=n.__k,J.then||ur(e);st.__e(J,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Fl(n.__e,e,n,o,r,s,i,c,l);return(u=st.diffed)&&u(e),128&e.__u?void 0:a}function ur(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(ur)}function ha(t,e,n){for(var o=0;o<n.length;o++)Or(n[o],n[++o],n[++o]);st.__c&&st.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){st.__e(s,r.__v)}})}function pa(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:En(t)?t.map(pa):ne({},t)}function Fl(t,e,n,o,r,s,i,a,c){var l,u,d,h,p,m,g,w=n.props,v=e.props,b=e.type;if(b=="svg"?r="http://www.w3.org/2000/svg":b=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((p=s[l])&&"setAttribute"in p==!!b&&(b?p.localName==b:p.nodeType==3)){t=p,s[l]=null;break}}if(t==null){if(b==null)return document.createTextNode(v);t=document.createElementNS(r,b,v.is&&v),a&&(st.__m&&st.__m(e,s),a=false),s=null}if(b==null)w===v||a&&t.data==v||(t.data=v);else{if(s=s&&Cn.call(t.childNodes),w=n.props||wn,!a&&s!=null)for(w={},l=0;l<t.attributes.length;l++)w[(p=t.attributes[l]).name]=p.value;for(l in w)if(p=w[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=p;else if(!(l in v)){if(l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v)continue;Xn(t,l,null,p,r)}}for(l in v)p=v[l],l=="children"?h=p:l=="dangerouslySetInnerHTML"?u=p:l=="value"?m=p:l=="checked"?g=p:a&&typeof p!="function"||w[l]===p||Xn(t,l,p,w[l],r);if(u)a||d&&(u.__html==d.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(d&&(t.innerHTML=""),da(e.type=="template"?t.content:t,En(h)?h:[h],e,n,o,b=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&Qe(n,0),a,c),s!=null)for(l=s.length;l--;)Lr(s[l]);a||(l="value",b=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||b=="progress"&&!m||b=="option"&&m!=w[l])&&Xn(t,l,m,w[l],r),l="checked",g!=null&&g!=t[l]&&Xn(t,l,g,w[l],r))}return t}function Or(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){st.__e(r,n)}}function ma(t,e,n){var o,r;if(st.unmount&&st.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Or(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){st.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&ma(o[r],e,n||typeof t.type!="function");n||Lr(t.__e),t.__c=t.__=t.__e=void 0}function Dl(t,e,n){return this.constructor(t,n)}function xn(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),st.__&&st.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],Ar(e,t=(!o&&n||e).__k=ye(kt,null,[t]),r||wn,wn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?Cn.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),ha(s,t,i)}function ga(t,e){xn(t,e,ga)}function zl(t,e,n){var o,r,s,i,a=ne({},t.props);for(s in t.type&&t.type.defaultProps&&(i=t.type.defaultProps),e)s=="key"?o=e[s]:s=="ref"?r=e[s]:a[s]=e[s]===void 0&&i!=null?i[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?Cn.call(arguments,2):n),bn(t.type,a,o||t.key,r||t.ref,null)}function ae(t){function e(n){var o,r;return this.getChildContext||(o=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&o.forEach(function(i){i.__e=true,lr(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"+ca++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}Cn=la.slice,st={__e:function(t,e,n,o){for(var r,s,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),i=r.__d),i)return r.__E=r}catch(a){t=a}throw t}},ra=0,oe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},n),this.props)),t&&ne(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),lr(this))},oe.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),lr(this))},oe.prototype.render=kt,Ae=[],sa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ia=function(t,e){return t.__v.__b-e.__v.__b},ro.__r=0,aa=/(PointerCapture)$|Capture$/i,Pr=0,ar=Bs(false),cr=Bs(true),ca=0;var Hl=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:--Hl,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return st.vnode&&st.vnode(l),l}var Ce,St,Wo,$s,tn=0,va=[],Mt=st,Fs=Mt.__b,Ds=Mt.__r,zs=Mt.diffed,Hs=Mt.__c,Ws=Mt.unmount,Us=Mt.__;function rn(t,e){Mt.__h&&Mt.__h(St,t,tn||e),tn=0;var n=St.__H||(St.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function z(t){return tn=1,Nr(_a,t)}function Nr(t,e,n){var o=rn(Ce++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):_a(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=St,!St.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!s||s.call(this,a,c,l);var d=o.__c.props!==a;return u.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=true)}}),s&&s.call(this,a,c,l)||d};St.__f=true;var s=St.shouldComponentUpdate,i=St.componentWillUpdate;St.componentWillUpdate=function(a,c,l){if(this.__e){var u=s;s=void 0,r(a,c,l),s=u}i&&i.call(this,a,c,l)},St.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=rn(Ce++,3);!Mt.__s&&Br(n.__H,e)&&(n.__=t,n.u=e,St.__H.__h.push(n))}function Dt(t,e){var n=rn(Ce++,4);!Mt.__s&&Br(n.__H,e)&&(n.__=t,n.u=e,St.__h.push(n))}function R(t){return tn=5,mt(function(){return{current:t}},[])}function ya(t,e,n){tn=6,Dt(function(){if(typeof t=="function"){var o=t(e());return function(){t(null),o&&typeof o=="function"&&o()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function mt(t,e){var n=rn(Ce++,7);return Br(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ut(t,e){return tn=8,mt(function(){return t},e)}function zt(t){var e=St.context[t.__c],n=rn(Ce++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(St)),e.props.value):t.__}function ba(t,e){Mt.useDebugValue&&Mt.useDebugValue(e?e(t):t)}function Rr(){var t=rn(Ce++,11);if(!t.__){for(var e=St.__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 Wl(){for(var t;t=va.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(eo),t.__H.__h.forEach(dr),t.__H.__h=[]}catch(e){t.__H.__h=[],Mt.__e(e,t.__v)}}Mt.__b=function(t){St=null,Fs&&Fs(t)},Mt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Us&&Us(t,e)},Mt.__r=function(t){Ds&&Ds(t),Ce=0;var e=(St=t.__c).__H;e&&(Wo===St?(e.__h=[],St.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(eo),e.__h.forEach(dr),e.__h=[],Ce=0)),Wo=St},Mt.diffed=function(t){zs&&zs(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(va.push(e)!==1&&$s===Mt.requestAnimationFrame||(($s=Mt.requestAnimationFrame)||Ul)(Wl)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Wo=St=null},Mt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(eo),n.__h=n.__h.filter(function(o){return!o.__||dr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],Mt.__e(o,n.__v)}}),Hs&&Hs(t,e)},Mt.unmount=function(t){Ws&&Ws(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{eo(o)}catch(r){e=r}}),n.__H=void 0,e&&Mt.__e(e,n.__v))};var js=typeof requestAnimationFrame=="function";function Ul(t){var e,n=function(){clearTimeout(o),js&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);js&&(e=requestAnimationFrame(n))}function eo(t){var e=St,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),St=e}function dr(t){var e=St;t.__c=t.__(),St=e}function Br(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function _a(t,e){return typeof e=="function"?e(t):e}function wa(t,e){for(var n in e)t[n]=e[n];return t}function fr(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return true;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return true;return false}function Jt(t,e){var n=e(),o=z({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Dt(function(){r.__=n,r.u=e,Uo(r)&&s({t:r})},[t,n,e]),F(function(){return Uo(r)&&s({t:r}),t(function(){Uo(r)&&s({t:r})})},[t]),n}function Uo(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 xa(t){t()}function Sa(t){return t}function ka(){return[false,xa]}var Ca=Dt;function hr(t,e){this.props=t,this.context=e}function jl(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:fr(this.props,r)}function o(r){return this.shouldComponentUpdate=n,ye(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(hr.prototype=new oe).isPureReactComponent=true,hr.prototype.shouldComponentUpdate=function(t,e){return fr(this.props,t)||fr(this.state,e)};var Vs=st.__b;st.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Vs&&Vs(t)};var Vl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function te(t){function e(n){var o=wa({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=Vl,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var qs=function(t,e){return t==null?null:ve(ve(t).map(e))},ql={map:qs,forEach:qs,count:function(t){return t?ve(t).length:0},only:function(t){var e=ve(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ve},Kl=st.__e;st.__e=function(t,e,n,o){if(t.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}Kl(t,e,n,o)};var Ks=st.unmount;function Ea(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=wa({},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 Ea(o,e,n)})),t}function Ma(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return Ma(o,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=true,t.__c.__P=n)),t}function _t(){this.__u=0,this.o=null,this.__b=null}function Ta(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function pt(t){var e,n,o;function r(s){if(e||(e=t()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw e;return ye(n,s)}return r.displayName="Lazy",r.__f=true,r}function vn(){this.i=null,this.l=null}st.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ks&&Ks(t)},(_t.prototype=new oe).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Ta(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]=Ma(c,c.__c.__P,c.__c.__O)}var l;for(o.setState({__a:o.__b=null});l=o.o.pop();)l.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(i,i)},_t.prototype.componentWillUnmount=function(){this.o=[]},_t.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ea(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&ye(kt,null,t.fallback);return r&&(r.__u&=-33),[ye(kt,null,e.__a?null:t.children),r]};var Zs=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 Zl(t){return this.getChildContext=function(){return t.context},t.children}function Gl(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){xn(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)}}}xn(ye(Zl,{context:e.context},t.__v),e.v)}function Xl(t,e){var n=ye(Gl,{__v:t,h:e});return n.containerInfo=e,n}(vn.prototype=new oe).__a=function(t){var e=this,n=Ta(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),Zs(e,t,o)):r()};n?n(s):s()}},vn.prototype.render=function(t){this.i=null,this.l=new Map;var e=ve(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},vn.prototype.componentDidUpdate=vn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Zs(t,n,e)})};var Ia=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Yl=/^(?: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]/,Jl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ql=/[A-Z0-9]/g,tu=typeof document<"u",eu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function nu(t,e,n){return e.__k==null&&(e.textContent=""),xn(t,e),typeof n=="function"&&n(),t?t.__c:null}function ou(t,e,n){return ga(t,e),typeof n=="function"&&n(),t?t.__c:null}oe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(oe.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var Gs=st.event;function ru(){}function su(){return this.cancelBubble}function iu(){return this.defaultPrevented}st.event=function(t){return Gs&&(t=Gs(t)),t.persist=ru,t.isPropagationStopped=su,t.isDefaultPrevented=iu,t.nativeEvent=t};var $r,au={enumerable:false,configurable:true,get:function(){return this.class}},Xs=st.vnode;st.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,o=e.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||tu&&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"||eu(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Jl.test(i)&&(i=c):c=i="oninput":s&&Yl.test(i)?i=i.replace(Ql,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ve(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=ve(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",au)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=Ia,Xs&&Xs(t)};var Ys=st.__r;st.__r=function(t){Ys&&Ys(t),$r=t.__c};var Js=st.diffed;st.diffed=function(t){Js&&Js(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),$r=null};var cu={ReactCurrentDispatcher:{current:{readContext:function(t){return $r.__n[t.__c].props.value},useCallback:ut,useContext:zt,useDebugValue:ba,useDeferredValue:Sa,useEffect:F,useId:Rr,useImperativeHandle:ya,useInsertionEffect:Ca,useLayoutEffect:Dt,useMemo:mt,useReducer:Nr,useRef:R,useState:z,useSyncExternalStore:Jt,useTransition:ka}}};function lu(t){return ye.bind(null,t)}function mo(t){return!!t&&t.$$typeof===Ia}function uu(t){return mo(t)&&t.type===kt}function du(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function fu(t){return mo(t)?zl.apply(null,arguments):t}function hu(t){return!!t.__k&&(xn(null,t),true)}function pu(t){return t&&(t.base||t.nodeType===1&&t)||null}var mu=function(t,e){return t(e)},gu=function(t,e){return t(e)},vu=kt,yu=mo,re={useState:z,useId:Rr,useReducer:Nr,useEffect:F,useLayoutEffect:Dt,useInsertionEffect:Ca,useTransition:ka,useDeferredValue:Sa,useSyncExternalStore:Jt,startTransition:xa,useRef:R,useImperativeHandle:ya,useMemo:mt,useCallback:ut,useContext:zt,useDebugValue:ba,version:"18.3.1",Children:ql,render:nu,hydrate:ou,unmountComponentAtNode:hu,createPortal:Xl,createElement:ye,createContext:ae,createFactory:lu,cloneElement:fu,createRef:Rl,Fragment:kt,isValidElement:mo,isElement:yu,isFragment:uu,isMemo:du,findDOMNode:pu,Component:oe,PureComponent:hr,memo:jl,forwardRef:te,flushSync:gu,unstable_batchedUpdates:mu,StrictMode:vu,Suspense:_t,SuspenseList:vn,lazy:pt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:cu};function Fr(t){const e=Jt(_u,wu);return!!t||e}const Dr=t=>t?{"data-high-contrast":""}:{},bu="(prefers-contrast: more)",Pa=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(bu):null;function _u(t){var n;const e=Pa();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 wu=()=>{var t;return!!((t=Pa())!=null&&t.matches)},Mn=ae(void 0),Tt=(...t)=>t.filter(Boolean).join(" "),go=ae(null);function Ee(){return zt(go)}function ce(t="This part"){const e=zt(go);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function ot(t,e=Object.is,n){const{clover:o}=ce(n),r=R(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return Jt(o.store.subscribe,s)}const xu={subscribe:()=>()=>{}};function Tn(t,e){const n=zt(go),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return Jt(o?o.subscribe:xu.subscribe,r)}const Su=JSON.parse('{"commonClose":"Close","commonNext":"Next","commonPrevious":"Previous","commonSearch":"Search","commonViewAll":"View all","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Loading...","contentSearchPlaceholder":"Search","contentSearchResultsNone":"No results","contentSearchResult":"1 result","contentSearchResults":"{{count}} results","contentSearchError":"The search could not be completed.","contentSearchPosition":"Result {{index}} of {{total}}","contentSearchClear":"Clear search","canvasPosition":"Item {{index}} of {{total}}","canvasImage":"Image","bodyUnloadableImage":"This image could not be loaded.","bodyUnloadableVideo":"This video could not be loaded.","bodyUnloadableAudio":"This audio could not be loaded.","bodyUnloadableModel":"This model could not be loaded.","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","templateBack":"Back","templateBackTo":"Back to {{label}}","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","aboutDate":"Date","aboutHomepage":"Homepage","aboutSeeAlso":"See also","aboutProvider":"Provider","logo":"Logo","aboutManifest":"IIIF Manifest","aboutCanvas":"IIIF Canvas","aboutPartOf":"Part of","aboutOpenManifest":"Open the full Manifest","aboutCollection":"IIIF Collection","readingLanguage":"Language","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open the link","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","canvasViewerControls":"Viewer controls","canvasExpandControls":"Expand viewer controls","canvasCollapseControls":"Collapse viewer controls","canvasScrollBack":"Show previous controls","canvasScrollForward":"Show more controls","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","contentsSectionsIn":"Sections in","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","playerFill":"Fill frame","playerFit":"Fit to frame","frameRepeat":"Repeat","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),La={es:()=>import("../es-B1NvdYp-.mjs"),fi:()=>import("../fi-BjtYZNLo.mjs"),fr:()=>import("../fr-Cd22Lziw.mjs"),nb:()=>import("../nb-CEwZDBiR.mjs"),nn:()=>import("../nn-jYQhr9RI.mjs"),no:()=>import("../no-CEwZDBiR.mjs"),pt:()=>import("../pt-CWR30SzS.mjs")};function Aa(){const t=[];return typeof document<"u"&&t.push(document.documentElement.lang),typeof navigator<"u"&&t.push(...navigator.languages??[],navigator.language),t.filter(Boolean)}const so=t=>t.split("-")[0];function Oa(t,e){return so(t).toLowerCase()===so(e).toLowerCase()}const jo=t=>t.includes("-")?so(t):null;function ku(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=jo(t);if(r&&e.includes(r))return r;const s=n.find(a=>e.includes(a));if(s)return s;const i=e.findIndex(a=>jo(a)===t);if(i!==-1)return e[i];for(const a of n){const c=jo(a);if(c&&e.includes(c))return c}return o()}function Na(t,e){const[n,...o]=e?[e]:Aa();return ku(n,t,o)??t[0]}const pe="clover",Yt={en:{[pe]:{...Su}}};let Xe,Ra=[],io=0;const pr=new Set;function zr(){io++,pr.forEach(t=>t())}function Cu(t){const e=so(t);return e&&e!==t?[t,e]:[t]}const Qs=new Map,Eu=t=>Object.prototype.hasOwnProperty.call(La,t);function Mu(t){let e=Qs.get(t);return e||(e=La[t]().then(({default:n})=>{var o;Yt[t]={...Yt[t],[pe]:{...n,...(o=Yt[t])==null?void 0:o[pe]}},zr()},()=>{}),Qs.set(t,e)),e}function Ba(t){const e=t.find(n=>n==="en"||Eu(n));return e&&e!=="en"?Mu(e):Promise.resolve()}let Yn=[],ti="";function yn(){const t=Xe?`${io}`:`${io} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===ti)return Yn;ti=t;const e=Xe?[Xe]:Aa();return Yn=[...new Set([...e,...Ra].flatMap(Cu).concat("en"))],Ba(Yn),Yn}function Hr(t,e){if(t)return Oa(t,e||Xt.resolvedLanguage)?void 0:t}const Xt={get language(){return Xe??yn().find(t=>Yt[t])??"en"},get resolvedLanguage(){return yn().find(t=>{var e;return Object.keys(((e=Yt[t])==null?void 0:e[pe])??{}).length>0})??"en"},changeLanguage(t){Xe=t,zr()},resolve(t,e,n=pe){var r,s;let o={text:t};for(const i of yn()){const a=(s=(r=Yt[i])==null?void 0:r[n])==null?void 0:s[t];if(a!==void 0){o={text:a,lang:i};break}}return e?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in e?String(e[a]):i)}:o},t(t,e,n=pe){return Xt.resolve(t,e,n).text},langOf(t,e,n=pe){return Hr(Xt.resolve(t,void 0,n).lang,e)},ready(){return Ba(yn())},subscribe(t){return pr.add(t),()=>{pr.delete(t)}},getSnapshot(){return io}};typeof document<"u"&&yn();function Tu(t={}){for(const[e,n]of Object.entries(t.resources??{}))for(const[o,r]of Object.entries(n??{}))Yt[e]??(Yt[e]={}),Yt[e][o]={...Yt[e][o],...r};return t.fallbackLng!==void 0&&(Ra=t.fallbackLng===false?[]:[t.fallbackLng].flat()),t.lng&&(Xe=t.lng),zr(),Xt}const Iu=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:pe,cloverI18n:Xt,initCloverI18n:Tu,langWithin:Hr},Symbol.toStringTag,{value:"Module"}));function Pt(t=pe,e){const n=Jt(Xt.subscribe,Xt.getSnapshot,Xt.getSnapshot),o=zt(Mn),r=e??o,s=ut((a,c)=>Xt.t(a,c,t),[t,n]),i=ut(a=>Xt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Xt}}function vo(t,e){const n=zt(Mn),o=R(null),[r,s]=z(""),i=ut(u=>{o.current=u,typeof t=="function"?t(u):t&&(t.current=u)},[t]);F(()=>{var d,h;const u=(d=o.current)==null?void 0:d.parentElement;e!==void 0||n!==void 0||!u||s(((h=u.closest("[lang]"))==null?void 0:h.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Pt(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const D=t=>Array.isArray(t)?t:t==null?[]:[t],Pu=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function Wr(t){return Pu.includes(t)?t:"left-to-right"}const Lu=["individuals","paged","continuous","unordered"];function Au(t){return D(t).find(n=>Lu.includes(n))??"individuals"}function Ou(t,e){if(!t.length)return[];if(e==="continuous")return[t.map((a,c)=>c)];if(e!=="paged")return t.map((a,c)=>[c]);const n=[];let o=[],r=0,s=false;const i=()=>{o.length&&n.push(o),o=[]};return t.forEach((a,c)=>{const l=D(a.behavior);if(l.includes("non-paged")){c===r&&r++,i(),n.push([c]);return}if(c===r||l.includes("facing-pages")){o.length&&(s=true),i(),n.push([c]);return}if(o.push(c),s){i(),s=false;return}o.length>1&&i()}),i(),n}function Nu(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const $a=["Independents","Composite","List"];function yo(t){return D(t==null?void 0:t.body).flatMap(e=>$a.includes(e==null?void 0:e.type)?D(e.items):[e])}function Ur(t){const e=D(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function Fa(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 Jn(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return Fa(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 mr=t=>{var e;return Array.isArray(t)?mr(t[0]):$a.includes(t==null?void 0:t.type)?mr((e=t.items)==null?void 0:e[0]):t};function sn(t){return Ru(mr(t))}function Ru(t){var n;if(typeof t=="string")return Jn(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return Jn(t.id??"");const e=typeof t.source=="string"?Jn(t.source):Jn(((n=t.source)==null?void 0:n.id)??"");for(const o of D(t.selector)){const r=o;if((r==null?void 0:r.type)==="PointSelector"){const[s,i,a]=[r.x,r.y,r.instant??r.t].map(Number),c=Number.isFinite(s)&&Number.isFinite(i);return{id:e.id,...c?{point:{x:s,y:i}}:{},...Number.isFinite(a)?{t:String(a)}:{}}}if((r==null?void 0:r.type)==="SvgSelector"&&r.value)return{id:e.id,svg:String(r.value)};if((r==null?void 0:r.type)==="FragmentSelector"&&r.value){const s=Fa(e.id,String(r.value));if(s)return s}}return e}const In=t=>t==="Audio"||t==="Sound",Bu=t=>{const e=D(t);return e.length>0&&e.every(n=>n==="supplementing")},$u=(t,e)=>Bu(t)&&!!(e.rect||e.svg||e.point)&&!e.t,ei=new WeakMap,Fu={canvases:[],views:[],direction:"left-to-right"};function At(t){if(!t)return Fu;let e=ei.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:Ou(n,Au(t.behavior)),direction:Wr(t.viewingDirection)},ei.set(t,e)}return e}const ni=new WeakMap;function Be(t,e){if(!e)return null;const n=At(t);let o=ni.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);ni.set(n,o)}return o.get(e)??null}function Pn(t,e){const{canvases:n,views:o}=At(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Nu(o,r)}const oi=new WeakMap,Du=[];function Ne(t,e){if(!t)return Du;const n=Pn(t,e);let o=oi.get(t);o||oi.set(t,o=new Map);let r=o.get(n);if(!r){const s=At(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function zu(t,e){var s,i;const{canvases:n,views:o}=At(t),r=(s=o[e])==null?void 0:s[0];return r===void 0?null:((i=n[r])==null?void 0:i.id)??null}function Hu(t){const e=t==null?void 0:t.start;if(!e)return null;const n=sn(e);if(!n.id)return null;const o={canvasId:n.id};n.rect&&(o.region=n.rect);const r=n.t?Number(n.t.split(",")[0]):NaN;return Number.isFinite(r)&&(o.time=r),o}const Pe=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},Wu=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function Uu(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=Ne(n,o),i=a=>{const c=r[a];return((c==null?void 0:c.manifestId)===n.id||(c==null?void 0:c.manifestAs)===n.id)&&(!c.canvasId||s.some(l=>l.id===c.canvasId))};return e!==null&&i(e)?e:r.findIndex((a,c)=>i(c))}function yt(t,e,n=", "){if(!t)return{text:""};if(typeof t=="string")return{text:t};const o=Object.keys(t).filter(a=>{var c;return(c=t[a])==null?void 0:c.length});if(!o.length)return{text:""};const r=Na(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"?void 0:r}}const ju=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function Sn(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&ju.test(o));return n.length===1?n[0]:void 0}const en={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Vu=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi)$/,qu=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function Ku(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>r.length===4);return(o?qu.test(o):Vu.test(e))?"rtl":void 0}function dt(t){return t?{lang:t,dir:Ku(t)}:{}}function Zu({clover:t,language:e}){const{t:n,langOf:o}=Pt(),[r,s]=z(null),i=R(n);return i.current=n,F(()=>{let a=null;return t.store.subscribe(()=>{const{manifest:c,canvasId:l,status:u}=t.store.get();if(u!=="ready"||l===a)return;const d=a===null;if(a=l,d)return;const h=Be(c,l),p=yt(h==null?void 0:h.label,e),m=i.current("canvasPosition",{index:Pn(c,l)+1,total:At(c).views.length});s({label:p.text,lang:p.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:en,children:[r!=null&&r.label?f(kt,{children:[f("span",{...dt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...dt(o("canvasPosition")),children:r.position})]})}const Gu=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function Xu(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||Gu(r))return;if(r.type==="SpecificResource"){r.source&&typeof r.source=="object"&&o(r.source,s);return}const i=s===void 0?{}:{choice:s};if(r.type==="TextualBody"||typeof r.value=="string")e.push({value:String(r.value??""),format:r.format,language:D(r.language)[0],...i});else if(r.type==="Image"&&r.id){const c=r.label??t.label;e.push({image:r.id,format:r.format,...c?{label:c}:{},...i})}else if(r.type==="Feature"){const c=((a=r.properties)==null?void 0:a.label)??t.label;c&&typeof c=="object"&&e.push({label:c,place:true,...i})}};for(const r of yo(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of D(r.items))o(i,s)}return e}const jr="content-search",ri=/\/search\/([0-2])\//;function Da(t){if(!t)return null;let e=null;for(const n of D(t.service)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string")continue;const r=String(n.type??n["@type"]??""),s=[n.profile,n["@context"]].flat().map(a=>String(a??"")).join(" "),i=r==="SearchService2"?2:r==="SearchService1"?1:ri.test(s)?Number(ri.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(e??(e={id:o,version:i}))}return e}const Yu="contents",Iv=(t,e)=>`${t}#region-${e+1}`,Ju=t=>D(t==null?void 0:t.motivation).includes("linking");function za(t,e,n){const o=[];for(const r of D(t==null?void 0:t.items)){const s=D(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Xu(r);if(!i.length&&!Ju(r))continue;const a=sn(D(r.target)[0]),c=a.id||n;!c||!r.id||o.push({id:r.id,setId:e,canvasId:c,target:a,motivation:s,bodies:i,annotation:r})}return o}const Qu=t=>At(t).canvases.some(e=>D(e.items).some(n=>D(n==null?void 0:n.items).some(o=>D(o==null?void 0:o.body).some(r=>[r,...D(r==null?void 0:r.items)].some(s=>D(s==null?void 0:s.annotations).length>0)))));function td(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=D(n==null?void 0:n.partOf).find(r=>/AnnotationCollection/.test(String((r==null?void 0:r.type)??(r==null?void 0:r["@type"])))&&r.label);if(o)return o.label}}const Ha=t=>D(t==null?void 0:t.partOf).filter(e=>(e==null?void 0:e.id)&&/AnnotationCollection/.test(String((e==null?void 0:e.type)??(e==null?void 0:e["@type"])))),si=new WeakMap;function Wa(t){var n;if(!t)return[];let e=si.get(t);if(!e){const o=new Map;for(const r of At(t).canvases)for(const s of D(r.annotations)){if(!Array.isArray(s==null?void 0:s.items))continue;const i=s.id??`${r.id}#annotations`;let a=o.get(i);if(!a){const c=(n=Ha(s)[0])==null?void 0:n.id;a={id:i,label:td(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...za(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),si.set(t,e)}return e}const ii=new WeakMap,Ua=[];function Pv(t){if(!t)return Ua;let e=ii.get(t);return e||(e=At(t).canvases.flatMap(n=>D(n.annotations).filter(o=>o==null?void 0:o.id).map(o=>({id:String(o.id),canvasId:String(n.id),fetched:Array.isArray(o.items)}))),ii.set(t,e)),e}const Vo=new WeakMap,qo=new WeakMap;function ja(t,e=ed){var n;if(!qo.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;qo.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:Ua,entries:o.flatMap(s=>s.entries)}:null)}return qo.get(e)??nd(t)}const ed=[];function nd(t){var r;if(!t)return null;if(Vo.has(t))return Vo.get(t);const e=At(t).canvases.flatMap(s=>D(s.annotations).flatMap(i=>Ha(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=e[0])==null?void 0:r.part.id,o=n?(()=>{var l,u;const s=e.filter(({part:d})=>d.id===n),i=(l=s.find(({part:d})=>d.label))==null?void 0:l.part.label,a=Number((u=s.find(({part:d})=>d.total))==null?void 0:u.part.total),c=Wa(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:d,canvas:h})=>({id:String(d.id),canvasId:String(h.id),fetched:Array.isArray(d.items)})),entries:s.flatMap(({page:d})=>{var h;return((h=c.find(p=>p.id===d.id))==null?void 0:h.entries)??[]})}})():null;return Vo.set(t,o),o}const ai=new WeakMap,ci=[];function Vr(t,e){const n=Wa(t);if(!e.length)return n.length?n:ci;const o=t??ci;let r=ai.get(o);r||ai.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 li=new WeakMap;function Va(t,e,n,o=null){const r=Vr(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=li.get(r);i||li.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 od=t=>Number(t==null?void 0:t.duration)>0;function qa(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>$u(n.motivation,n.target)&&!od(e(n.canvasId)))}const ui=new WeakMap;function rd(t,e){const n=Vr(t,e);let o=ui.get(n);if(!o){const r=n.filter(s=>!qa(s,i=>Be(t,i)??void 0));o=r.length===n.length?n:r,ui.set(n,o)}return o}const di=new WeakMap;function qr(t,e,n,o){const r=Vr(t,e),s=di.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)&&qa(c,l=>Be(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return di.set(r,{hidden:n,shown:o,ids:a}),a}const fi=new WeakMap;function sd(t,e,n,o){const r=qr(t,e,n,o),s=fi.get(r);if(s&&s.hidden===n)return s.ids;const i=[jr,Yu,...r.filter(a=>!n.includes(a))];return fi.set(r,{hidden:n,ids:i}),i}function id(t){for(const e of D(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=D(n==null?void 0:n.partOf).find(r=>(r==null?void 0:r.id)&&(!r.type||r.type==="Manifest"));if(o)return o.id}}function Ko(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 hi(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"?D(e.motivation).includes("contentState"):e.type==="SpecificResource"}function ad(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ka({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:ad(a)}}const cd=/iiif\.io\/api\/presentation\/4\/context\.json/;function Za(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&cd.test(o))}let pi=null;function Kr(){return pi??(pi=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),pi}async function Re(t){if(Za(t))return t;const[e,{upgrade:n}]=await Promise.all([Kr(),import("../upgrade-eNW0DPXq.mjs")]);return await n(t,e)}function Zr(t,e,n={}){return((t==null?void 0:t.fetch)??globalThis.fetch)(e,{credentials:(t==null?void 0:t.credentials)??"same-origin",...n,headers:{...n.headers,...t==null?void 0:t.headers}})}const ld=t=>(t==null?void 0:t.credentials)==="include",ud=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class dd extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function nn(t,e,n){const o=await Zr(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new dd(`${e} answered ${o.status}`,e,o.status);return o.json()}const mi=()=>import("./content-state-reader-DuvyLThu.mjs"),fd=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function hd(t){const e={"@context":md,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of fd)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const gi=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},pd=/^(oa:)?Annotation(Page|Collection)$/;class Qn extends Error{constructor(){super(...arguments);P(this,"name","CloverContentError")}}const md="http://iiif.io/api/presentation/4/context.json",gd=t=>/^https?:\/\//i.test(t);async function gr(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await nn(e,t.id,n)}const vd=50;async function Gr(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<vd;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 nn(e.request,a.id,e.signal),l=await Re({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function Ga(t,e={}){return Re(await gr(t,e))}async function Xa(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return Re(await gr(o,e));if(o.type==="Collection"&&n<8){const r=await Gr(await Re(await gr(o,e)),e),s=await Xa(r,e,n+1);if(s)return s}}return null}async function yd(t,{request:e,signal:n}={}){Kr();const o=typeof t=="string"?await nn(e,t.trim(),n):t,r=await Re(o);return r.type==="Collection"?Gr(r,{request:e,signal:n}):r}async function bd(t,e={}){var d;const{request:n,signal:o}=e;Kr();let r,s,i,a,c;const l=async h=>{const{resolveContentState:p}=await mi(),m=p(h);if(!m)throw new Qn("Unreadable content state");return r=m.target??r,s=m.manifestId??s,i=m.annotation??i,a=m.targets??a,nn(n,m.id,o)};if(typeof t=="string")if(gd(t.trim()))c=await nn(n,t.trim(),o);else{const{decodeContentState:h}=await mi(),p=h(t);if(!p)throw new Qn("Unreadable iiifContent");c=hi(p)?await l(p):p}else c=t;if(hi(c)&&(c=await l(c)),pd.test(String((c==null?void 0:c.type)??""))){const{annotationsContent:h}=await import("./annotations-content-BARXoAz-.mjs");return h(c,e)}const u=await Re(c);switch((d=o==null?void 0:o.throwIfAborted)==null||d.call(o),u.type){case"Manifest":return{manifest:u,target:r,annotation:i,targets:a};case"Collection":{const h=await Gr(u,e),p=e.manifestId??s,m=p?(h.items??[]).find(w=>w.id===p&&w.type==="Manifest"):void 0,g=m?await Ga(m,e):await Xa(h,e);if(!g)throw new Qn("The Collection holds no Manifest");return{manifest:g,collection:h,target:r,annotation:i,targets:a}}case"Canvas":case"Timeline":case"Scene":{const h=u;return r??(r={canvasId:h.id}),{manifest:hd(h),target:r,annotation:i}}default:throw new Qn(`Cannot show a ${String(u.type??"resource without a type")}`)}}const Ya=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function vi(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])Ya(r)&&e.push([n.id,o,r.id]);return e}async function _d(t,e,n,o){return wd(await nn(n,t,o),e)}async function wd(t,e="urn:clover:annotation-page"){var r;const n=t;return Za(n)?n:((r=(await Re({"@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 xd(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 Sd(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||!Ya(c)?c:(r=true,xd(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}function kd(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 qe(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 Cd(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 vr={query:"",status:"idle",hits:[],set:null},yi={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:vr,regions:null,targets:null,targetIndex:null};function Ed(t={}){const e=kd(yi),n=qe(null),o=qe(null),r=qe(null),s=qe(null),i=qe(null),a=qe(null);let c=null,l=null,u=[],d=[],h=[],p=0,m=null,g=null,w=null;const v=(y,E)=>{!g||y===E||(g={...g,items:g.items.map(L=>L.manifestId===y&&L.manifestAs!==E?{...L,manifestAs:E}:L)})},b=y=>{var L;const E=(L=e.get().manifest)==null?void 0:L.id;return!!E&&(E===y.manifestId||E===y.manifestAs)},_=()=>u.length||d.length||h.length?[...u,...d,...h]:yi.addedSets;let k=t.request,x=null;const I=new Set;let O="view",H=0;const Y=(y,E,L)=>{if(I.has(L))return;I.add(L);const $=x==null?void 0:x.signal;_d(L,y,k,$).then(A=>{$!=null&&$.aborted||e.set(M=>M.manifest?{manifest:Sd(M.manifest,y,E,A)}:{})}).catch(()=>I.delete(L))},it=()=>{const{manifest:y,canvasId:E}=e.get();if(y)for(const[L,$,A]of vi(O==="all"||H>0?At(y).canvases:Ne(y,E)))Y(L,$,A)};e.subscribe(it);const G=(y,E,L,$,A)=>{var U,rt,tt;const{canvases:M}=At(y),W=wt=>!!wt&&M.some(Bt=>Bt.id===wt),X=Hu(y),Ct=W(L==null?void 0:L.canvasId)?L:W(X==null?void 0:X.canvasId)?X:null,nt=W($.canvasId)?$.canvasId:(Ct==null?void 0:Ct.canvasId)??(W($.defaultCanvasId)?$.defaultCanvasId:null)??((U=M[0])==null?void 0:U.id)??null;l==null||l.abort();const gt=A&&((rt=Ko(h,A))==null?void 0:rt.canvasId)===nt?A:null,ht=Ct&&gt?{...Ct,region:void 0}:Ct,Ht=++p;u=[],e.set({status:"ready",search:vr,regions:null,manifest:y,collection:E,canvasId:nt,target:ht&&ht.canvasId===nt?ht:null,addedSets:_(),annotationId:gt,targets:g});const Lt=y==null?void 0:y.structures;Array.isArray(Lt)&&JSON.stringify(Lt).includes("xywh=")&&import("./range-regions-CIZiAHOp.mjs").then(({contentsSet:wt})=>{p===Ht&&e.set({regions:wt(y)})}),Qu(y)&&import("./image-layers-DKOuaRTj.mjs").then(({imageLayers:wt})=>{p===Ht&&(u=wt(y),e.set({addedSets:_()}))}),nt&&nt!==$.canvasId&&((tt=t.onCanvasChange)==null||tt.call(t,nt))},J=(y,E)=>e.set(L=>{const $=L.hiddenSets.filter(M=>M!==y),A=L.shownSets.filter(M=>M!==y);return E?{hiddenSets:$,shownSets:[...A,y]}:{hiddenSets:[...$,y],shownSets:A}}),C=(y,E)=>{var $,A,M;if(!y)return;if(($=t.isControlled)!=null&&$.call(t)){E&&e.set({target:E}),(A=t.onCanvasChange)==null||A.call(t,y);return}const L=e.get().canvasId!==y;e.set({canvasId:y,target:E}),L&&((M=t.onCanvasChange)==null||M.call(t,y))},S=(y,E=false)=>{const{manifest:L}=e.get(),$=zu(L,y);C($,$&&E?{canvasId:$,autoplay:E}:null)},N=()=>{const{manifest:y,canvasId:E}=e.get();return{at:Pn(y,E),total:At(y).views.length}},j=()=>{x==null||x.abort();const y=new AbortController;return x=y,I.clear(),e.set({status:"loading",error:null,annotationId:null}),y.signal},K=y=>e.set({status:"error",error:y instanceof Error?y:new Error(String(y))});async function Z(y,E={}){var $;const L=j();try{const A=await bd(y,{request:k,signal:L,manifestId:E.manifestId??void 0});if(L.aborted)return;const M=A.annotation,W=M?za({items:[M]},`${M.id}#content-state`):[];h=W.length?[{id:`${M.id}#content-state`,source:"added",entries:W}]:A.annotationSets??[];const X=m??(($=W[0])==null?void 0:$.id)??A.pick;m=null,e.set({throughCollection:!!A.collection}),g=A.targets??null,g&&v(g.items[0].manifestId,A.manifest.id),e.set({targetIndex:g?0:null}),G(A.manifest,A.collection??null,A.target,E,X)}catch(A){L.aborted||K(A)}}const Q=y=>{const{manifest:E,collection:L}=e.get();return(E==null?void 0:E.id)===y||(L==null?void 0:L.id)===y},xt=y=>{var E;return(((E=e.get().collection)==null?void 0:E.items)??[]).find(L=>L.id===y)??{id:y,type:"Manifest"}},at=(y,E)=>{var L,$;if(m=E,(L=t.isManifestControlled)!=null&&L.call(t)){($=t.onManifestChange)==null||$.call(t,y);return}ct({id:y,type:"Manifest"}).then(A=>{var M;return A&&((M=t.onManifestChange)==null?void 0:M.call(t,y))})},ct=async(y,E)=>{if(y.type==="Collection")return await Z(y.id),e.get().status==="ready";const{collection:L}=e.get(),$=j(),A=m;m=null;const M=A?Ko(h,A):null,W=typeof E=="string"?{canvasId:E}:E??w;w=null;try{const X=await Ga(y,{request:k,signal:$});return $.aborted?false:(v(y.id,X.id),G(X,L,M?{canvasId:M.canvasId}:W??void 0,{},A),true)}catch(X){return $.aborted||K(X),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return k},setRequest(y){k=y},load:Z,async openCollection(y){var L;const E=e.get().manifest;if(!(!E||((L=e.get().collection)==null?void 0:L.id)===y))try{const $=await yd(y,{request:k});if($.type!=="Collection"||e.get().manifest!==E)return;e.set({collection:$})}catch{}},async goToManifest(y,E){var $,A,M;if(Q(y))return;const L=xt(y);if(L.type!=="Collection"&&(($=t.isManifestControlled)!=null&&$.call(t))){(A=t.onManifestChange)==null||A.call(t,y);return}await ct(L,E)&&((M=t.onManifestChange)==null||M.call(t,e.get().manifest.id))},goToTarget(y){var $,A,M;const E=($=e.get().targets)==null?void 0:$.items[y];if(!E)return;e.set({targetIndex:y});const L=E.canvasId?{canvasId:E.canvasId,...E.region&&{region:E.region},...E.time!==void 0&&{time:E.time}}:null;if(b(E)){L&&C(L.canvasId,L);return}if((A=t.isManifestControlled)!=null&&A.call(t)){w=L,(M=t.onManifestChange)==null||M.call(t,E.manifestId);return}ct(xt(E.manifestId),L??void 0).then(W=>{var X;return W&&((X=t.onManifestChange)==null?void 0:X.call(t,E.manifestId))})},async syncManifest(y){!y||Q(y)||e.get().status!=="ready"||await ct(xt(y))},goTo(y,E){C(y,E?{...E,canvasId:y}:null)},next({autoplay:y=false,wrap:E=false}={}){const{at:L,total:$}=N();L+1<$?S(L+1,y):E&&$>1&&S(0,y)},previous(){const{at:y}=N();y>0&&S(y-1)},first(){S(0)},last(){S(N().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(y){y&&e.set({canvasId:y})},selectAnnotation(y){const{manifest:E,addedSets:L,canvasId:$,search:A,regions:M}=e.get(),W=Ko(Va(E,L,A.set,M),y);if(e.set({annotationId:W?y:null}),!W)return;a.emit(y);const{hiddenSets:X,shownSets:Ct}=e.get();W.setId!==jr&&qr(E,L,X,Ct).includes(W.setId)&&J(W.setId,true);const nt=Ne(E,$).some(Ht=>Ht.id===W.canvasId),gt=Be(E,W.canvasId)!==null;!nt&&gt&&C(W.canvasId,null);const ht=gt?void 0:id(W.annotation);ht&&at(ht,W.id)},async search(y){l==null||l.abort();const E=Da(e.get().manifest),L=y.trim();if(!L||!E){l=null,e.set({search:vr,annotationId:null});return}const $=new AbortController;l=$,e.set(A=>({search:{...A.search,query:L,status:"loading"}}));try{const{searchInto:A}=await import("./search-x1QL_bth.mjs");await A(e,E,L,k,$.signal)}catch{e.set({search:{query:L,status:"error",hits:[],set:null}})}},setSetVisible(y,E){J(y,E)},async loadAnnotations(y){if(c==null||c.abort(),!y){d=[],e.set({addedSets:_()});return}const E=new AbortController;c=E;try{const{loadAnnotationSets:L}=await import("./annotation-collection-Cjd8Dgyl.mjs"),$=await L(y,{request:k,signal:E.signal});if(E.signal.aborted)return;d=$,e.set({addedSets:_()})}catch{}},getContentState(){var nt;const{manifest:y,canvasId:E}=e.get();if(!y||!E)return null;const L=n.get(),$=o.get(),A=$&&$.currentTime>0?$.currentTime:null,M=Ne(y,E),X=L&&M.some(gt=>gt.id===L.canvasId)&&!A?L:null,Ct=(X==null?void 0:X.canvasId)??E;return Ka({manifestId:y.id,canvasId:Ct,type:(nt=M.find(gt=>gt.id===Ct))==null?void 0:nt.type,region:X==null?void 0:X.region,time:A})},setAnnotationPages(y){y!==O&&(O=y,it())},fetchAnnotationPages(y){const{manifest:E}=e.get();if(!E||!y.length)return;const L=new Set(y);for(const[$,A,M]of vi(At(E).canvases))L.has(M)&&Y($,A,M)},holdAllAnnotationPages(){H++,it();let y=true;return()=>{y&&H--,y=false}},dispose(){x==null||x.abort(),c==null||c.abort(),l==null||l.abort()}}}const Md=100;function Ja(t,e){const n=R({read:t,onChange:e});n.current={read:t,onChange:e};const o=R(void 0),r=R("");return F(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),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))},Md))},[])}function yr(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 Qa(t,e){const n=Ja(()=>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=yr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=yr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function Xr(t){const e=[];for(const n of D(t==null?void 0:t.items))for(const o of D(n==null?void 0:n.items))if(Ur(o))for(let r of yo(o))(r==null?void 0:r.type)==="Choice"&&(r=D(r.items)[0]),(r==null?void 0:r.type)==="SpecificResource"&&(r=typeof r.source=="string"?{id:r.source}:r.source),r&&e.push({body:r,annotation:o});return e}function Td(t){return t.flatMap(e=>Xr(e).map(({body:n})=>n))}function Id(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 Pd(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 Ld({iiifContent:t,canvasId:e,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:u,renderers:d,annotations:h,annotationPages:p="view",onContentStateChange:m,...g}){const w=e!==void 0,v=s!==void 0,b=R({controlled:w,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a});b.current={controlled:w,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[_]=z(()=>Ed({request:l,onCanvasChange:at=>{var ct,y;return(y=(ct=b.current).onCanvasChange)==null?void 0:y.call(ct,at)},onManifestChange:at=>{var ct,y;return(y=(ct=b.current).onManifestChange)==null?void 0:y.call(ct,at)},isControlled:()=>b.current.controlled,isManifestControlled:()=>b.current.manifestControlled}));_.setRequest(l);const k=R({});k.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const x=ud(l),I=R(t);I.current=t;const O=Nd(t);F(()=>(_.load(I.current,k.current),()=>_.dispose()),[_,O,x]),F(()=>{w&&_.syncCanvas(e??null)},[_,w,e]);const[H,Y]=z(_.store.get().status);F(()=>{let at=_.store.get().status;return _.store.subscribe(()=>{var E,L;const{status:ct,error:y}=_.store.get();ct!==at&&(at=ct,Y(ct),(L=(E=b.current).onStatusChange)==null||L.call(E,ct,y))})},[_]);const it=R(h);it.current=h;const G=Od(h);F(()=>{_.loadAnnotations(it.current??null)},[_,G,x]),F(()=>{_.setAnnotationPages(p)},[_,p]),Qa(_,m),F(()=>{v&&H==="ready"&&_.syncManifest(s??null)},[_,v,s,H]);const J=Ad(_,at=>{var ct;return at.status==="ready"?((ct=at.manifest)==null?void 0:ct.id)??null:null});F(()=>{c&&J&&_.search(c)},[_,c,J]);const C=R(d);Pd(C.current,d)||(C.current=d);const S=C.current,[N,j]=z(),[K,Z]=z(u);K!==u&&(Z(u),j(void 0));const Q=N??u;return[mt(()=>({clover:_,language:Q,renderers:S,chooseLanguage:j}),[_,Q,S]),H,g]}function Ad(t,e){return Jt(t.store.subscribe,()=>e(t.store.get()))}function Od(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 Nd(t){return typeof t=="string"?t:t.id??t["@id"]??t}const Rd=te(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=Ld(s),u=vo(i,l.lang),d=Fr(r);return f(go.Provider,{value:a,children:f(Mn.Provider,{value:u.hostLanguage,children:f(e,{ref:u.ref,className:Tt("clover-root",n),"data-status":c,...Dr(d),...l,children:[o,f(Zu,{clover:a.clover,language:a.language})]})})})}),Bd=()=>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"}),$d=()=>f(kt,{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"})]}),Fd=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),Dd=()=>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"}),Lv=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),tc=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),Av=()=>f(kt,{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"})]}),Ov=()=>f(kt,{children:[f("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),f("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]}),Kt={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},zd=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function $e({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Pt(),c=R(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return Wd(),F(()=>{const u=c.current;u&&bi(u)&&br(u)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...dt(e),...o&&{tabIndex:-1,onMouseDown:u=>{var d;u.preventDefault(),(d=u.currentTarget.parentElement)==null||d.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const u=c.current;u&&bi(u)&&br(u)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function to(t){const e=t.target instanceof Element&&ec(t.target),n=e&&Yr(e);n&&br(n)}function Yr(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function ec(t){const e=t.matches("input")?t.parentElement:null;return e&&Yr(e)?e:t}function bi(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function br(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=Hd(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 Hd(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 _i=0;function wi(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&ec(n);o&&Yr(o)&&e.add(o),e.forEach(r=>nc(r,"tipHidden",["pointerenter","focusout"]))}function nc(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 Wd(){F(()=>(_i++===0&&(document.addEventListener("keydown",wi,true),document.addEventListener("pointerenter",to,true),document.addEventListener("focus",to,true)),()=>{--_i||(document.removeEventListener("keydown",wi,true),document.removeEventListener("pointerenter",to,true),document.removeEventListener("focus",to,true))}),[])}function Ud(t,e){const n=t.target;!e||n===e||e.contains(n)||zd.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 Oe=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c})=>{const u=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Tt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":u,onClick:r,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...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($e,{label:n,shortcut:a})]})},jd=ae("");function le(){return zt(jd)+Rr()}const Zo=new Map;function Vd(t,e){const n=le(),o=R(e);o.current=e,F(()=>t?qd(n,o):void 0,[t,n])}function qd(t,e){for(const[n,o]of[...Zo])n!==t&&o.current();return Zo.set(t,e),()=>{Zo.delete(t)}}const Kd=pt(()=>import("./CaptionDetails-CRD-gSZP.mjs"));function Zd(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const oc=(t,e)=>`${t}-label-${e}`,Gd=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Pt(),c=R(null),[l,u]=z(o);return o&&!l&&u(true),Vd(o,()=>r(false)),F(()=>{var d;o&&((d=c.current)==null||d.focus())},[o]),f("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:t,onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),r(true))},ref:c,tabIndex:-1,children:[f(Oe,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(tc,{})}),e.map((d,h)=>{const p=yt(d.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[p.text&&f("p",{className:"clover-canvas-caption-label",id:oc(t,h),...dt(p.lang),children:p.text}),l&&f(_t,{fallback:null,children:f(Kd,{summary:d.summary,metadata:d.metadata,comments:n==null?void 0:n.get(d.id),language:s})})]},d.id)})]})},Xd=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),Yd=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),Jd=()=>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"}),Qd=()=>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"}),tf=()=>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"}),xi=()=>f(kt,{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"})]}),ef=()=>f(kt,{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"})]}),nf=({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}),of=112,rf=128;function sf(t){Dt(()=>{const e=t==null?void 0:t.closest(".clover-canvas");if(!t||!e)return;const n=(s=false)=>{let i=t.offsetWidth,a=0;for(const p of s?[]:Array.from(t.children))!(p instanceof HTMLElement)||!p.offsetParent||(i=Math.min(i,p.offsetLeft),a=Math.max(a,p.offsetTop+p.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[p,m]of Object.entries(c)){const g=`--clover-canvas-controls-${p}`;a?e.style.setProperty(g,`${m}px`):e.style.removeProperty(g)}const l=t.offsetTop,u=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),d=e.clientHeight-2*l-c.height-((u==null?void 0:u.offsetHeight)??0),h=t.offsetLeft+i-l;a&&d<of&&h>=rf?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 bo=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},rc=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},sc=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},af=(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()},ic=async(t,e)=>{var o,r,s,i;const n=sc(t);if(n)try{if(bo()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!rc()){e&&t&&af(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 Jr(t){const[e,n]=z(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=bo())!=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 cf({key:t,id:e,label:n,glyph:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c},l){const u=l==null?void 0:l[t];return u?f(u,{buttonProps:{id:e,type:"button","aria-label":n,...c&&{lang:c},...a&&{"aria-keyshortcuts":a.keys},onClick:r,...s!==void 0&&{"aria-expanded":s,"aria-controls":i}},icon:f(nf,{label:n,children:o}),label:n,tip:f($e,{label:n,shortcut:a})},t):f(Oe,{id:e,label:n,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const lf=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=z(null),s=Jr(o);sf(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})},uf=()=>()=>{};function df(){return Jt(uf,rc)}const Si=new WeakMap;function Ze(t,e){const[n,o]=z(()=>Si.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{Si.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function ff(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function hf(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 pf({cluster:t,ids:e,more:n,fits:o,onFits:r}){const s=R(o);s.current=o;const i=R(r);i.current=r;const a=R(new Map),c=R(e);c.current=e;const l=R(null),u=e.join(" ");return Dt(()=>{const d=t.ownerDocument,h=()=>{var I;const g=c.current,w=getComputedStyle(t),v=parseFloat(w.columnGap)||0;let b=t.clientWidth-(parseFloat(w.paddingLeft)||0)-(parseFloat(w.paddingRight)||0),_=0;for(const O of g){const H=(I=d.getElementById(O))==null?void 0:I.offsetWidth;H&&a.current.set(O,H),_=Math.max(_,a.current.get(O)??0)}for(const O of Array.from(t.children))!(O instanceof HTMLElement)||g.includes(O.id)||O.id===n||O.classList.contains("clover-canvas-more")||!O.offsetWidth||getComputedStyle(O).position==="absolute"||(b-=O.offsetWidth+v);const k=ff(g.map(O=>a.current.get(O)??_),b,v);if(k===s.current)return;const x=d.activeElement;l.current=x instanceof HTMLElement&&t.contains(x)?x.id:null,s.current=k,i.current(k)};h();const p=new ResizeObserver(()=>h());p.observe(t);const m=new MutationObserver(()=>h());return m.observe(t,{childList:true}),()=>{p.disconnect(),m.disconnect()}},[t,u,n]),Dt(()=>{const d=l.current;if(l.current=null,d===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&hf(t,d,n)},[o,t,n]),null}const mf=()=>import("./AnnotationMenu-C-Mz6CCn.mjs"),gf=()=>import("./ChaptersMenu-Brcq3yJv.mjs"),vf=()=>import("./ChoiceMenu-ByGzQQx1.mjs"),yf=()=>import("./ImageControls-ZoEC9jWd.mjs"),ki=2,bf=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),_f=({renderer:t,instance:e,config:n,controlButtons:o,placeholder:r,placeholderIsMore:s=false,choices:i=[],selections:a={},onSelect:c,annotations:l=[],chapters:u=[],mediaElement:d=null,onChapter:h,request:p,hiddenPages:m,onPageVisibilityChange:g,selectedAnnotation:w=null,onAnnotationSelect:v,onAnnotationActivate:b,captionId:_,captionOpen:k=false,onCaptionToggle:x,placeId:I,placeOpen:O=false,onPlaceToggle:H,language:Y,fit:it=true,more:G="auto",children:J})=>{var Fn,Dn,Ie,dn;const{t:C,langOf:S}=Pt(),[N,j]=z(false),[K,Z]=z(false),Q=`annotations-${e}`,xt=`${Q}-menu`,at=C("informationPanelTabsAnnotations"),ct=S("informationPanelTabsAnnotations"),y=ut(V=>{var ft;Z(false),b==null||b(null),V&&((ft=document.getElementById(Q))==null||ft.focus())},[Q,b]),E=n.annotations&&l.length>0&&v,[L,$]=z(false),A=`chapters-${e}`,M=`${A}-menu`,W=u.length>0&&!!h,X=R(false),Ct=R(null);F(()=>{const V=()=>{var ft;X.current=((ft=document.activeElement)==null?void 0:ft.id)===A};return document.addEventListener("focusin",V),()=>document.removeEventListener("focusin",V)},[A]);const nt=ut(()=>{var ft,_e;if(!X.current)return;X.current=false;const V=document.activeElement;V&&V!==document.body||(_e=(ft=Ct.current)==null?void 0:ft.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||_e.focus()},[]);F(()=>{W||nt()},[W,nt]),F(()=>()=>nt(),[nt]);const gt=ut(V=>{var ft;$(false),V&&((ft=document.getElementById(A))==null||ft.focus())},[A]),ht=n.information&&_&&x,Ht=n.map&&I&&H,Lt=`choice-${e}`,U=i.length===1?yt(i[0].label,Y):null,rt=(U==null?void 0:U.text)||C("canvasChoice"),tt=U!=null&&U.text?U.lang:S("canvasChoice"),wt=`${Lt}-menu`,Bt=(Fn=Ze(mf,!!E))==null?void 0:Fn.default,ee=(Dn=Ze(gf,W))==null?void 0:Dn.default,be=(Ie=Ze(vf,i.length>0&&!!c))==null?void 0:Ie.default,B=ut(V=>{var ft;j(false),V&&((ft=document.getElementById(Lt))==null||ft.focus())},[Lt]),lt=df(),[bt,Fe]=z(null);F(()=>{Ct.current=(bt==null?void 0:bt.closest(".clover-canvas"))??null},[bt]);const De=Jr(bt),[ue,Me]=z(false),Nn=V=>f(Oe,{className:V,id:Q,label:at,lang:ct,onClick:()=>Z(ft=>!ft),expanded:K,controls:xt,children:f(Bd,{})},"annotations"),Rn=(()=>{const V=[],ft=t;return n.zoom&&ft&&V.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:Kt.zoomIn,label:C("imageZoomIn"),lang:S("imageZoomIn"),glyph:f(Xd,{}),onClick:()=>ft.zoomBy(ki)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:Kt.zoomOut,label:C("imageZoomOut"),lang:S("imageZoomOut"),glyph:f(Yd,{}),onClick:()=>ft.zoomBy(1/ki)}),n.fullPage&&lt&&V.push({key:"fullPage",id:`fullPage-${e}`,label:C(De?"imageExitFullScreen":"imageFullScreen"),lang:S(De?"imageExitFullScreen":"imageFullScreen"),glyph:De?f(Qd,{}):f(Jd,{}),onClick:_e=>void ic(_e.currentTarget)}),n.rotation&&ft&&V.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:Kt.rotateRight,label:C("imageRotateRight"),lang:S("imageRotateRight"),glyph:f(xi,{}),onClick:()=>ft.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:Kt.rotateLeft,label:C("imageRotateLeft"),lang:S("imageRotateLeft"),glyph:f(xi,{}),onClick:()=>ft.rotateBy(-90)}),n.reset&&ft&&V.push({key:"reset",id:`reset-${e}`,shortcut:Kt.reset,label:C("imageResetZoom"),lang:S("imageResetZoom"),glyph:f(tf,{}),onClick:()=>ft.home()}),i.length&&V.push({key:"choice",id:Lt,label:rt,lang:tt,glyph:f(ef,{}),onClick:()=>j(_e=>!_e),expanded:N,controls:wt}),V})(),Zt=[...Rn.filter(V=>V.key!=="fullPage"),...Rn.filter(V=>V.key==="fullPage")].map(V=>({id:V.id,view:bf.has(V.key),node:cf(V,o)})),cn=[Ht&&{id:`place-${e}`,view:false,node:f(Oe,{id:`place-${e}`,label:C("mapLabel"),lang:S("mapLabel"),onClick:H,expanded:O,controls:I,children:f(Dd,{})},"place")},W&&{id:A,view:false,node:f(Oe,{id:A,label:C("playerChapters"),lang:S("playerChapters"),onClick:()=>$(V=>!V),expanded:L,controls:M,children:f($d,{})},"chapters")},E&&{id:Q,view:false,node:Nn()},ht&&{id:`information-${e}`,view:false,node:f(Oe,{id:`information-${e}`,label:C("informationPanelTabsAbout"),lang:S("informationPanelTabsAbout"),onClick:x,expanded:k,controls:_,children:f(Fd,{})},"information")},!!r&&{id:`placeholder-${e}`,view:false,node:f(re.Fragment,{children:r},"placeholder")}].filter(V=>!!V),Bn=cn.filter(V=>V.id===`placeholder-${e}`),Wt=[...Zt.filter(V=>V.view),...Bn],ln=[...Zt.filter(V=>!V.view),...cn.filter(V=>!Bn.includes(V))],de=[...Wt,...ln],[ze,Eo]=z(true),un=G==="always"||s,Nt=(dn=Ze(yf,it&&(un||!ze)&&de.some(V=>V.view)))==null?void 0:dn.ImageControls,jt=ze&&!un||!Nt?[]:de.filter(V=>V.view),Te=s&&jt.length>0;F(()=>{jt.length||Me(false)},[jt.length]);const $n=V=>V.filter(ft=>!jt.includes(ft)&&!(Te&&ft.id===`placeholder-${e}`)).map(({node:ft})=>ft);return f(kt,{children:[f(lf,{fit:it,clusterRef:Fe,children:[$n(Wt),Nt&&jt.length>0&&f(Nt,{instance:e,open:Te||ue,onOpenChange:Me,toggle:Te?r:void 0,children:jt.map(({node:V})=>V)}),$n(ln),J]}),it&&!un&&bt&&f(pf,{cluster:bt,ids:de.map(({id:V})=>V),more:`more-${e}`,fits:ze,onFits:Eo}),ee&&L&&W&&f(ee,{id:M,triggerId:A,label:C("playerChapters"),labelLang:S("playerChapters"),chapters:u,element:d,onChapter:h,request:p,onClose:gt}),Bt&&K&&E&&f(Bt,{id:xt,triggerId:Q,label:at,labelLang:ct,annotations:l,hiddenPages:m,onPageVisibilityChange:g,selected:w,onSelect:v,onActivate:V=>b==null?void 0:b(V),onClose:y}),be&&N&&i.length>0&&c&&f(be,{id:wt,triggerId:Lt,label:rt,labelLang:tt,language:Y,choices:i,selections:a,onSelect:c,onClose:B})]})},wf=["jpg","png","webp","gif"];class _r extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function Qr(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function _o(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 Qr(a)}}function xf(t,e){if(!t||typeof t!="object")throw new _r("info.json is not an object",e??"");const n=t,o=Sf(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=Qr(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new _r("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(b=>typeof b=="string"),u=c.filter(b=>!!b&&typeof b=="object"),d=kf(l),h=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...u.flatMap(b=>Array.isArray(b.supports)?b.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(b=>String(b).toLowerCase()).find(b=>wf.includes(b))??"jpg",g=b=>{var k;const _=n[b]??((k=u.find(x=>x[b]!==void 0))==null?void 0:k[b]);return Number(_)>0?Number(_):void 0};let w=g("maxWidth"),v=g("maxHeight");return w&&!v&&(v=w),v&&!w&&(w=void 0),{id:s,version:o,level:d,width:i,height:a,tiles:Cf(n.tiles),sizes:Ef(n.sizes),maxWidth:w,maxHeight:v,maxArea:g("maxArea"),regionByPx:d>=1||h.has("regionByPx"),sizeByW:d>=1||h.has("sizeByW")||h.has("sizeByWh"),format:m,quality:"default"}}function Sf(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 kf(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Cf(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 Ef(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 ao(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 Mf(t){return t.version===2&&t.level===0?"native":void 0}const Go=new Map;function ac(t,{request:e}={}){const n=Qr(t),o=Go.get(n);if(o)return o;const r=`${n}/info.json`,s=Zr(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new _r(`info.json request failed with ${i.status}`,r,i.status);return xf(await i.json(),n)}).catch(i=>{throw Go.delete(n),i});return Go.set(n,s),s}function Tf(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 Nv(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function ts(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 If=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,Pf=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,Lf=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Pf.test(e)),Af={width:1600,height:900};function Of(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(on),r=e==="left-to-right"||e==="right-to-left",s=e==="right-to-left"||e==="bottom-to-top",i=r?o[0].height:o[0].width,a=t.map((l,u)=>u);s&&a.reverse();let c=0;for(const l of a){const u=o[l],d=i/(r?u.height:u.width),h=u.width*d,p=u.height*d;n[l]=r?{x:c,y:0,width:h,height:p}:{x:0,y:c,width:h,height:p},c+=r?h:p}return n}function on(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=cc(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=co(t)[0])==null?void 0:s.body)??((i=lo(t)[0])==null?void 0:i.body),o=Number(n==null?void 0:n.width),r=Number(n==null?void 0:n.height);return o>0&&r>0?{width:o,height:r}:Af}function cc(t){return t.accompanyingContainer??t.placeholderContainer}function Nf(t,e,n,o,r){return If(t.id,e.id,n,o,r)}function Rf(t){const e=[];for(const n of t)lc(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=D(s.items).filter(a=>!!a&&typeof a=="object");i.length>1&&e.push({key:r,canvasId:n.id,label:s.label,items:i.map(a=>({label:a.label,id:a.id,...typeof a.type=="string"?{type:a.type}:{},...typeof a.format=="string"?{format:a.format}:{}}))})});return e}const Xo={};function Bf(t){if(t.type!=="Video"&&!In(t.type)||!t.format||Lf(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=Xo[e]??(Xo[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function $f(t){const e={};for(const n of t){const o=n.items.findIndex(Bf);o>0&&(e[n.key]=o)}return e}const Yo=new WeakMap,Jo=[];function Ff(t){return yo(t).some(e=>((e==null?void 0:e.type)==="Choice"?D(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||In(o==null?void 0:o.type)))}function wr(t){var i;const e=Yo.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!Ur(c))continue;const l=c.target?(i=sn(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[u,d]=l.split(",").map(Number);Number.isFinite(u)&&n.push({annotation:c,start:u,end:Number.isFinite(d)?d:NaN})}if(n.every(a=>Ff(a.annotation)))return Yo.set(t,Jo),Jo;n.sort((a,c)=>a.start-c.start);const o=Number(t.duration),r=Number.isFinite(o)&&o/n.length||.5;n.forEach((a,c)=>{var u;const l=(u=n[c+1])==null?void 0:u.start;a.end>a.start||(l!=null?a.end=l>a.start?l:a.start+r:Number.isFinite(o)&&o>a.start?a.end=o:a.end>a.start||(a.end=a.start+r))});const s=n.length>1?n:Jo;return Yo.set(t,s),s}const kn=t=>`frame:${t.id}`;function lc(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{Ur(r)&&yo(r).forEach((i,a)=>e(i,Nf(t,r,o,s,a),r))})})}function co(t,e={},{allFrames:n=false}={}){const o=[];return es(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 Df(t,e={}){for(const n of t){let o;if(es(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function lo(t,e={}){const n=[];return es(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!In(a))return;const c=ts(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function zf(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 es(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=wr(t),a=Math.min(e[kn(t)]??0,Math.max(0,i.length-1));lc(t,(c,l,u)=>{const d=i.findIndex(g=>g.annotation===u);if(!o&&d>=0&&d!==a)return;const h=xr(c,e[l]??0);if(!h)return;const p=u.target?sn(u.target):void 0,m=p==null?void 0:p.rect;n(h,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(h.body.width)||0,height:s||Number(h.body.height)||0},d,p==null?void 0:p.t)})}function uc(t){return dc(t).filter(e=>e.kind!=="transcript")}function Hf(t){const e=D(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function dc(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(D(r.motivation).includes("supplementing"))for(const s of D(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?D(i.items):[i];for(const c of a){const l=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof l=="string"&&/\.vtt(\?|$)/i.test(l))||typeof l!="string"||e.push({id:l,label:c.label,language:D(c.language)[0],kind:Hf(r)})}}return e}function Wf(t){const e=[],n=r=>{const s=r,i=s==null?void 0:s.id;if(typeof i!="string"||e.some(c=>c.id===i))return;const a=s==null?void 0:s.format;(a?a!=="text/plain":!/\.txt(\?|$)/i.test(i))||e.push({id:i,label:s==null?void 0:s.label,language:D(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(D(s.motivation).includes("supplementing"))for(const i of D(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?D(a.items):[a]).forEach(n)}return D(t.rendering).forEach(n),e}function xr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=D(n.items);return xr(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=D(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=xr({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"&&!In(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function Uf(t,e,n={},{standIns:o=true}={}){const r=Of(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const u=r[l],d=on(c),h=u.width/d.width,p=u.height/d.height,m=k=>({x:u.x+k.x*h,y:u.y+k.y*p,width:k.width*h,height:k.height*p}),g=lo(c,n),w=co(c,n,{allFrames:true}).map(k=>({...k,canvas:c})),v=cc(c);if(o&&!w.length&&g.some(k=>k.kind==="audio")&&v){const k=on(v);for(const x of co(v))w.push({...x,canvas:v,target:{x:x.target.x/k.width*d.width,y:x.target.y/k.height*d.height,width:x.target.width/k.width*d.width,height:x.target.height/k.height*d.height}})}const b=n[kn(c)]??0;w.forEach(({body:k,target:x,region:I,rotation:O,frame:H,canvas:Y},it)=>{var S;const G=_o(k.service);if(!G&&!k.id)return;const J=`${Y.id}|${it}|${k.id??G}|${I??""}|${O??""}`,C=!(G&&I);if(s.push({id:J,service:G,url:k.id,width:C&&Number(k.width)||void 0,height:C&&Number(k.height)||void 0,region:I,...O?{rotation:O}:{},placement:m(x),...H!=null&&H!==b?{hidden:true}:{}}),H!=null){const N=a[S=kn(c)]??(a[S]=[]);(N[H]??(N[H]=[])).push(J)}});const[_]=g;if(_!=null&&_.body.id){const k=zf(g),x=k?k[0]:void 0;i.push({id:`${c.id}|media|${_.body.id}`,kind:_.kind,src:(x==null?void 0:x.src)??_.body.id,format:x?x.format:_.body.format,placement:m(_.target),duration:k?Number(c.duration)||void 0:Number(_.body.duration??c.duration)||void 0,...k?{segments:k}:{},poster:jf(c),captions:uc(c)})}}),{images:s,media:i,placements:r,frames:a}}function jf(t){var e;return(e=fc(t))==null?void 0:e.source}const Rv=1280;function fc(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=co(e)[0])==null?void 0:c.body;if(!n)return;const o=_o(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}=on(e);return{source:s,width:i,height:a}}function Vf(t,e,n){const o=on(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 qf=({hidden:t})=>{const{t:e,langOf:n}=Pt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...dt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void ic(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]})},hc="50%";function pc(t,e=hc,n=null){const[o,r]=z(()=>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 Kf(t){const[e,n]=z(false);return F(()=>{if(!t)return;const o=()=>n(bo()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Zf(t){const[e,n]=z(false);return F(()=>{if(!t)return;const o=()=>{const r=bo();n(r===t||!!r&&sc(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 Gf extends re.Component{constructor(){super(...arguments);P(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f("div",{className:"clover-canvas-error",role:"alert",lang:"en",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",children:"Something went wrong"}),n.message&&f("span",{className:"clover-canvas-error-body",children:`Error message: ${n.message}`})]}):this.props.children}}function _n({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:Tt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const Xf={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function Yf({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Pt(),s=Xf[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 Jf({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...dt(e),children:t})})}function wo(t,e,n=false,o){const r=le(),{hostLanguage:s}=Pt(void 0,o);if(n)return{props:{},node:null};const i=Hr(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 Qf=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function Qt(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function se(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Ln(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function th(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function ie(...t){return t.reduce((e,n)=>th(e,n),Qf)}function eh(t){const e=t.a*t.d-t.b*t.c;if(!e||!Number.isFinite(e))return null;const n=1/e;return{a:t.d*n,b:-t.b*n,c:-t.c*n,d:t.a*n,e:(t.c*t.f-t.d*t.e)*n,f:(t.b*t.e-t.a*t.f)*n}}function me(t,e){return{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function Bv(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(oh).join(",")})`}function nh(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 oh(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function mc(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function ns(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 rh(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 xo(t,e){const n=[me(t,{x:e.x,y:e.y}),me(t,{x:e.x+e.width,y:e.y}),me(t,{x:e.x,y:e.y+e.height}),me(t,{x:e.x+e.width,y:e.y+e.height})],o=n.map(a=>a.x),r=n.map(a=>a.y),s=Math.min(...o),i=Math.min(...r);return{x:s,y:i,width:Math.max(...o)-s,height:Math.max(...r)-i}}function mn(t,e,n){return Math.min(Math.max(t,e),n)}const Qo=t=>!!(t&&"overlays"in t),sh=pt(()=>import("./MediaBody-CIw2nTlj.mjs")),ih=()=>import("./AnnotationState-5pim5K72.mjs"),ah=new Map,ch={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:ah,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},lh=pt(()=>import("./FrameAnimation-qI9cZPEs.mjs")),Ci=pt(()=>import("./PlaceBox-CCWfzsNU.mjs")),uh=pt(()=>import("./Placeholder-CsEkLhz7.mjs")),dh=pt(()=>import("./ControlsFade-BoZ4ABAE.mjs")),fh=()=>true,hh=pt(()=>import("./Placeholder-CsEkLhz7.mjs").then(({PlaceholderToggle:t})=>({default:t}))),Ei={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},ph={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},mh={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",Kt.zoomIn.keys,Kt.zoomOut.keys,Kt.reset.keys,Kt.rotateRight.keys,Kt.rotateLeft.keys].join(" ")},gh={description:"canvasKeysMedia",keys:[Kt.play.keys,"J L",Kt.mute.keys].join(" ")},vh={description:"canvasKeysAnnotations",keys:"Escape"},yh=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||gc(t.body,t.src).length>0?f(Gf,{children:f(bh,{...t})}):null},bh=t=>{var Cs,Es,Ms,Ts,Is,Ps;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:u,highContrast:d,instanceId:h,className:p,options:m,navigator:g=false,controls:w=true,collapseControls:v="auto",controlButtons:b,annotations:_,onReady:k,onViewportChange:x,onContentStateChange:I,onMediaElement:O,onCaptionChange:H,caption:Y,onEnded:it,chapters:G,highlightedChapter:J,onChapterHighlight:C,placeholder:S=true,children:N}=t,{t:j}=Pt(),K=R(null),[Z,Q]=z(null),xt=Kf(Z),at=Jr(Z),ct=Zf(Z),y=vo(Q),E=Fr(d),L=!!e.controlsVisibility,A=(e.controlsVisibility??fh)(L?Z:null,m==null?void 0:m.hideDelay,K),[M,W]=z(false),X=pc(Z),Ct=le(),[nt]=z(()=>h??`clover-canvas-${Ct}`),gt=R(null),[ht,Ht]=z(null),Lt=Qo(ht)?ht:null,[U,rt]=z(null),tt=w===false?null:w===true?Ei:{...Ei,...w},[wt,Bt]=z("loading"),[ee,be]=z(false),[B,lt]=z(0),bt=R(k),Fe=R(x),De=R(m);bt.current=k,Fe.current=x,De.current=m;const ue=Wr(r),Me=mt(()=>Rf(o??[]),[o]),Nn=mt(()=>$f(Me),[Me]),[Co,Rn]=z({}),Zt=mt(()=>({...Nn,...Co}),[Nn,Co]),cn=(T,q)=>Rn(vt=>({...vt,[T]:q})),Bn=mt(()=>_==null?void 0:_.filter(T=>!T.layer||(Zt[T.layer.key]??0)===T.layer.item),[_,Zt]),Wt=(Cs=_==null?void 0:_.find(T=>T.layer&&T.annotation.id===t.selectedAnnotation))==null?void 0:Cs.layer;F(()=>{Wt&&(Zt[Wt.key]??0)!==Wt.item&&cn(Wt.key,Wt.item)},[Wt==null?void 0:Wt.key,Wt==null?void 0:Wt.item,t.selectedAnnotation]);const ln=!!(tt!=null&&tt.information),de=!!(_!=null&&_.length),ze=Ze(ih,de),[Eo,un]=z(null),Nt=de&&Eo||ch,jt=mt(()=>{var vt,Ot;const T=(vt=_==null?void 0:_.find(Ut=>Ut.annotation.id===Nt.selected))==null?void 0:vt.annotation,q=(Array.isArray(T==null?void 0:T.body)?T==null?void 0:T.body:[T==null?void 0:T.body]).find(Ut=>(Ut==null?void 0:Ut.type)==="Feature");return T&&q?{id:String(T.id),feature:q,name:((Ot=q.properties)==null?void 0:Ot.label)??T.label}:null},[_,Nt.selected]),Te=jt?`${jt.id}:${t.refind??0}`:null,[$n,Fn]=z(null),Dn=Te!==null&&$n!==Te,Ie=mt(()=>{var Ut,Ve;const T=(o??[]).map(qt=>qt.navPlace).filter(Boolean),q=T.length?T:t.navPlace?[t.navPlace]:[];if(!q.length)return null;const vt=q.flatMap(qt=>(qt==null?void 0:qt.type)==="FeatureCollection"?qt.features??[]:(qt==null?void 0:qt.type)==="Feature"?[qt]:[]);if(!vt.length)return null;const Ot=vt.length===1?(Ve=(Ut=vt[0])==null?void 0:Ut.properties)==null?void 0:Ve.label:void 0;return{feature:{type:"FeatureCollection",features:vt},name:Ot??t.label}},[o,t.navPlace,t.label]),dn=`place-box-${nt}`,[V,ft]=z(false),[_e,nl]=z(false),zn=R(Nt);zn.current=Nt;const Hn=ut(()=>zn.current.release(),[]),{comments:Mo,listedCount:ds}=Nt,He=mt(()=>ln?(o??[]).filter(T=>Zd(T)||Mo.has(T.id)):[],[o,ln,Mo]),To=`caption-${nt}`,[ol,fs]=z(false),Io=ol&&He.length>0,hs=ut(T=>{var q;fs(false),T&&((q=document.getElementById(`information-${nt}`))==null||q.focus())},[nt]),Vt=mt(()=>(o??[]).find(T=>wr(T).length)??null,[o]),rl=Vt?wr(Vt):wh,Ft=mt(()=>o!=null&&o.length?Uf(o,ue,Zt,{standIns:o.length>1}):null,[o,ue,Zt]),sl=mt(()=>gc(s,i,a),[s,i,a]),et=(Ft==null?void 0:Ft.media[0])??null,ps=!L&&(et==null?void 0:et.kind)==="video",il=L||ps,al=L?A:M,cl=mt(()=>{if(o!=null&&o.length)return Df(o,Zt);const T=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(T==null?void 0:T.type)=="string"?T.type.toLowerCase():i?"image":void 0},[o,Zt,s,i]),[$t,ll]=z(null),Wn=R(O);Wn.current=O;const ul=ut(T=>{var q;ll(T),(q=Wn.current)==null||q.call(Wn,T)},[]),we=Ft?Ft.images:sl,xe=!!et&&(o==null?void 0:o.length)===1,Se=xe&&(et==null?void 0:et.kind)==="audio",dl=xe&&(et==null?void 0:et.kind)==="video",We=(o==null?void 0:o.length)===1&&!et&&!Vt&&we.length===0,Un=!xe&&!We&&((Es=m==null?void 0:m.gestures)==null?void 0:Es.navigable)!==false,fe=o?`${n??""}
2
+ ${o.map(T=>T.id).join("|")}`:null,Ue=mt(()=>{if(!o||!S)return[];const T=o.flatMap(q=>{const vt=fc(q),Ot=yt(q.label,u);return vt?[{...vt,alt:Ot.text,lang:Ot.lang}]:[]});return ue==="right-to-left"||ue==="bottom-to-top"?T.reverse():T},[o,ue,S,u]),[fl,ms]=z(false),[hl,gs]=z(null),Et=!Se&&Ue.length>0&&(et?hl!==fe:!fl),vs=(T,{annotations:q=false,fullPage:vt=false}={})=>({...T,zoom:false,rotation:false,reset:false,fullPage:vt&&T.fullPage,annotations:q&&T.annotations}),fn=We&&at,ys=re.Children.count(N)>0,Po=Ue.length>0&&!Se&&!et,hn=tt?Et?He.length||ys||ds||et&&(G!=null&&G.length)?vs(tt,{annotations:true}):null:xe||We?Me.length||He.length||ys||ds||et&&(G!=null&&G.length)||fn&&tt.fullPage?vs(tt,{annotations:true,fullPage:fn}):null:tt:null,Lo=g&&!Et&&(et?et.kind==="audio"&&!xe&&we.length>0:true),[Ao,pl]=z(null),je=et?Ao??et.placement:null,[jn,ml]=z(xh),Oo=mt(()=>{const T=(et==null?void 0:et.kind)==="video"&&$t&&je?[...we,{id:et.id,placement:je,width:je.width,height:je.height,media:{element:$t}}]:we;return jn.length?[...T,...jn]:T},[we,et,$t,je,jn]),bs=xe&&(et==null?void 0:et.kind)==="video"&&Ao?Ao:Ft?ns(Ft.placements):null,gl=JSON.stringify([we,bs,Oo.length!==we.length&&[et==null?void 0:et.id,je],jn.map(T=>T.id)]),Vn=R(null),No=R(false),Ro=()=>{et?gs(Et?fe:null):ms(Et),Et||Hn()},qn=R(null),vl=T=>{if($t&&!Et){$t.currentTime=T;return}qn.current=T,Et&&Ro()};F(()=>{!$t||qn.current===null||($t.currentTime=qn.current,qn.current=null)},[$t]);const Bo=Array.isArray(s)?s[0]:s,It=[c,(Ms=o==null?void 0:o[0])==null?void 0:Ms.label,Bo==null?void 0:Bo.label].map(T=>yt(T,u)).find(T=>T.text),yl=mt(()=>{const T=yt(l,u);return T.text&&T.text!==(It==null?void 0:It.text)?T:void 0},[l,u,It==null?void 0:It.text]),_s=wo((It==null?void 0:It.text)||j("canvasImage"),It?It.lang:y.langOf("canvasImage"),false,y.hostLanguage),Kn=Et?[]:[...Un?[mh]:[],...et?[gh]:[],...de?[vh]:[]],ws=`keys-${nt}`,bl=Un&&!Et&&!y.langOf("canvasRoleDescription")?j("canvasRoleDescription"):void 0,$o=!!hn&&He.length>0,_l=$o&&He.map((T,q)=>yt(T.label,u).text?oc(To,q):null).filter(Boolean).join(" ")||void 0,xs=R({canvases:o,scene:Ft,canvasKey:fe});xs.current={canvases:o,scene:Ft,canvasKey:fe};const Zn=R(null),Fo=ut(()=>{const{canvases:T,scene:q,canvasKey:vt}=xs.current;Zn.current=T&&q&&Vn.current===vt?{key:vt,canvases:T,placements:q.placements}:null},[]),wl=!o||((Ts=Zn.current)==null?void 0:Ts.key)===fe,pn=Ja(()=>{const T=Zn.current,q=gt.current;if(!T||n==="loading")return null;const vt=$t&&$t.currentTime>0?$t.currentTime:null,Ot=!vt&&q&&Qo(q)?vc(q.getBounds(),T.canvases,T.placements):null,Ut=T.canvases.find(Ve=>Ve.id===(Ot==null?void 0:Ot.canvasId))??T.canvases[0];return Ut?Ka({manifestId:n,canvasId:Ut.id,type:Ut.type,region:Ot&&{x:Ot.rect.x,y:Ot.rect.y,w:Ot.rect.width,h:Ot.rect.height},time:vt}):null},I);F(()=>yr($t,pn),[$t,pn]),F(()=>{const T=K.current;if(!T)return;const q=e(T,De.current),vt=Qo(q)?q:null;gt.current=q,Ht(q),q.setDismiss(Hn);const Ot=q.on("open",()=>{var he;zo(false),Fo(),pn(),Bt("ready"),lt(Gn=>Gn+1),vt&&((he=bt.current)==null||he.call(bt,_h(vt,()=>Zn.current,Gn=>{var As,Os;const Ls=zn.current.placed.find(Ho=>Ho.id===Gn);return Ls?(zn.current.select(Ls),(Os=Array.from(((As=vt.overlays)==null?void 0:As.container.querySelectorAll("[id]"))??[]).find(Ho=>Ho.id===Gn))==null||Os.focus({preventScroll:true}),true):false})))}),Ut=q.on("change",()=>{zo(false),Fo(),pn(),Bt("ready"),lt(he=>he+1)}),Ve=q.on("error",()=>{q.isOpen||Bt("error")}),qt=q.on("unloadable",he=>be(!!he)),Sl=q.on("viewport",()=>{var he;vt&&((he=Fe.current)==null||he.call(Fe,vt.getBounds())),pn()});return()=>{Ot(),Ut(),Ve(),qt(),Sl(),q.dispose(),gt.current=null,Ht(null)}},[h,e,Hn,Fo]),F(()=>{if(!(!Lt||!U))return Lt.attachNavigator(U)},[Lt,U]),F(()=>{if(!(!ht||!We))return ht.setGestures({navigable:false}),()=>ht.setGestures({})},[ht,We]);const Do=R(false);F(()=>{var q;if(fn)return;const T=!document.activeElement||document.activeElement===document.body;Do.current&&T&&((q=K.current)==null||q.focus()),Do.current=false},[fn]),F(()=>{const T=gt.current;if(Et&&(No.current=true),!T||!X||Et)return;const q=Vn.current!==null&&Vn.current!==fe;(!T.isOpen||q)&&Bt("loading");const vt=xe||No.current&&T.isOpen||q;Vn.current=fe,No.current=false,T.setImages(Oo,{world:bs??void 0,fit:vt})},[gl,h,$t,X,Et]);const Ss=R(n),[xl,zo]=z(false);Dt(()=>{var T;n!==Ss.current&&(Ss.current=n,(T=gt.current)==null||T.clear(),zo(true),Bt("loading"))},[n]);const ks=wt==="loading"&&Oo.length>0&&X&&!Et;return f(Mn.Provider,{value:y.hostLanguage,children:f("figure",{"aria-labelledby":_l,className:Tt("clover-canvas",p),"data-testid":"clover-canvas","data-status":wt,...Dr(E),"data-unloadable":ee||void 0,"data-has-navigator":Lo,"data-fullscreen":xt,"data-exit":ct||void 0,"data-controls":il?al?"visible":"hidden":void 0,"data-media":cl,"data-recording":et?"":void 0,"data-player":Se?"":void 0,"data-animated":Vt?"":void 0,"data-navigable":Un,"data-placeholder":Ue.length&&!Se?Et:void 0,ref:y.ref,onFocus:T=>{Do.current=fn&&T.target.id===`fullPage-${nt}`},onKeyDown:T=>{if(T.key==="Escape"&&Io&&!T.defaultPrevented){T.preventDefault(),hs(false);return}if(T.key==="Escape"&&!T.defaultPrevented&&!T.currentTarget.querySelector(".clover-canvas-menu")&&Hn()){T.preventDefault();return}Ud(T,K.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(hn||Lo)&&et&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),ps&&f(_t,{fallback:null,children:f(dh,{element:Z,hideDelay:m==null?void 0:m.hideDelay,picture:K,onChange:W})}),f(qf,{hidden:!ct}),ht&&(hn||Po)&&f(_f,{renderer:Lt,instance:nt,config:hn??ph,controlButtons:b,placeholderIsMore:Po&&!et,chapters:et?G:void 0,mediaElement:$t,onChapter:vl,request:m==null?void 0:m.request,placeholder:Po&&f(_t,{fallback:null,children:f(hh,{instance:nt,media:!!et,active:Et,onToggle:Ro,more:!!tt&&(tt.zoom||tt.rotation||tt.reset||tt.fullPage)})}),fit:!L,more:v,choices:Et?[]:Me,selections:Zt,onSelect:cn,annotations:Nt.menu,hiddenPages:Nt.hiddenPages,onPageVisibilityChange:Nt.setPagesVisible,selectedAnnotation:Nt.selected,onAnnotationSelect:Nt.select,onAnnotationActivate:Nt.activate,captionId:$o?To:void 0,captionOpen:Io,onCaptionToggle:()=>fs(T=>!T),placeId:Ie?dn:void 0,placeOpen:V,onPlaceToggle:()=>{nl(true),ft(T=>!T)},language:u,children:hn&&N}),Lo&&f("div",{ref:rt,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:K,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:de?"group":"img","aria-roledescription":bl,..._s.props,"aria-describedby":Kn.length?ws:void 0,"aria-keyshortcuts":Kn.map(({keys:T})=>T).join(" ")||void 0,"aria-busy":ks,tabIndex:0}),_s.node,Kn.length>0&&f("span",{id:ws,style:en,children:Kn.map(({description:T},q)=>f(re.Fragment,{children:[q>0&&" ",f("span",{...dt(y.langOf(T)),children:j(T)})]},T))}),f(Yf,{kind:"image",shown:ee&&!Et}),We&&!Et&&(It==null?void 0:It.text)&&f(Jf,{text:It.text,lang:It.lang||void 0}),(et==null?void 0:et.kind)==="audio"&&!Se&&we.length===0&&!Et&&(It==null?void 0:It.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...dt(It.lang||void 0),children:It.text}),Ue.length>0&&!Se&&f(_t,{fallback:null,children:f(uh,{instance:nt,stills:Ue,vertical:ue==="top-to-bottom"||ue==="bottom-to-top",media:!!et,active:Et,lingering:wt==="loading"&&!xl,onToggle:Ro,request:m==null?void 0:m.request})}),ht&&et&&X&&!Et&&f(_t,{fallback:null,children:f(sh,{media:et,request:m==null?void 0:m.request,fillable:dl,surface:ht,instance:nt,onElement:ul,onFit:pl,onCaptionChange:H,caption:Y,navigable:Un,fullscreen:xe&&!!(tt!=null&&tt.fullPage),isFullscreen:at,onEnded:it,chapters:G,highlightedChapter:J,onChapterHighlight:C,autoPlay:!Se&&Ue.length>0&&Nt.quietlyOpened!==fe,language:u,notes:Nt.timed,player:Se&&o?{canvas:o[0],title:It,partOf:yl}:void 0})}),Lt&&Vt&&(Ft==null?void 0:Ft.frames[kn(Vt)])&&!Et&&f(_t,{fallback:null,children:f(lh,{renderer:Lt,frames:rl,byFrame:Ft.frames[kn(Vt)],animationKey:Vt.id,sceneVersion:B,autoplay:(Is=m==null?void 0:m.animation)==null?void 0:Is.autoplay,loop:(Ps=m==null?void 0:m.animation)==null?void 0:Ps.loop,onEnded:it,language:u,duration:Number(Vt.duration),canvas:Vt,place:Ft.placements[o.indexOf(Vt)],onItems:ml},Vt.id)}),ze&&de&&_&&f(ze.AnnotationState,{given:t,annotations:Bn??_,scene:Ft,renderer:Lt,sceneVersion:B,drawn:wl,media:et,mediaElement:$t,showPlaceholder:Et,canvasKey:fe,openImages:ms,openMedia:gs,host:K,onModel:un,refind:t.refind??0}),ks&&f(_n,{overlay:true}),jt&&f(_t,{fallback:null,children:f(Ci,{id:`place-of-${nt}`,open:Dn,onClose:T=>{var q;Fn(Te),T&&((q=document.getElementById(jt.id))==null||q.focus())},feature:jt.feature,name:jt.name,language:u})}),Ie&&_e&&f(_t,{fallback:null,children:f(Ci,{id:dn,open:V,onClose:T=>{var q;ft(false),T&&((q=document.getElementById(`place-${nt}`))==null||q.focus())},feature:Ie.feature,name:Ie.name,language:u})}),$o&&f(Gd,{id:To,canvases:He,comments:Mo,open:Io,onClose:hs,language:u})]})})};function _h(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(Vf(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?vc(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 wh=[],xh=[];function gc(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=_o(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 vc(t,e,n){let o=null;if(n.forEach((d,h)=>{const p=Math.max(t.x,d.x),m=Math.max(t.y,d.y),g=Math.min(t.x+t.width,d.x+d.width)-p,w=Math.min(t.y+t.height,d.y+d.height)-m;if(g<=0||w<=0)return;const v=g*w;(!o||v>o.area)&&(o={index:h,area:v,clip:{x:p,y:m,width:g,height:w}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=on(i),l=c.width/a.width,u=c.height/a.height;return{canvasId:i.id,rect:{x:Math.round((s.x-a.x)*l),y:Math.round((s.y-a.y)*u),width:Math.round(s.width*l),height:Math.round(s.height*u)}}}function Sh(t,e,n,o){return mt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=yt(r.label,n);return{...r.id?{id:r.id}:{},label:s.text,lang:s.lang,start:r.start,end:r.end,...r.thumbnail?{thumbnail:r.thumbnail}:{}}}),[t,e,n,o])}function kh(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 Ch(t,e){const n=t.store.get().manifest;if(e.canvasId&&At(n).canvases.some(r=>r.id===e.canvasId))t.goTo(e.canvasId);else if(e.manifestId&&e.manifestId!==(n==null?void 0:n.id))t.goToManifest(e.manifestId,e.canvasId);else return false;return true}function yc(t){if(typeof t=="string")return Mi(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?Mi(e.id):e}const Mi=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function bc(t){const e=D(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const Ti=new WeakMap,Ii=[];function Eh(t,e,n){if(!t||!e)return Ii;let o=Ti.get(t);o||Ti.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=u=>{if(!u||a.has(u.id??u))return;a.add(u.id??u);const d=!D(u.behavior).includes("no-nav");for(const h of D(u.items)){if((h==null?void 0:h.type)==="Range"){c(h);continue}if(!d)continue;const p=sn(yc(h));if(p.id.split("#")[0]!==e)continue;const m=ts(p.t);m&&i.push({...u.id?{id:u.id}:{},label:u.label,...m,...bc(u)})}};for(const u of D(t.structures))c(u);i.sort((u,d)=>u.start-d.start);const l=i.length?i.map((u,d)=>{var h;return{...u,end:u.end??((h=i[d+1])==null?void 0:h.start)??n}}):Ii;return o.set(r,l),l}const Pi=new WeakMap,Li=[];function Mh(t){if(!t)return Li;const e=Pi.get(t);if(e)return e;const n=new Map(D(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var b,_;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],u=[],d=[];let h;for(const k of D(c.items))if((k==null?void 0:k.type)==="Range"){const x=r(k);l.push(...x),x.forEach(I=>u.push(...I.canvasIds))}else{const x=sn(yc(k));if(!x.id)continue;h??(h=x),u.push(x.id),d.push(x)}const p=D(c.behavior);if(p.includes("no-nav"))return l;const m=h??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((b=l[0])==null?void 0:b.canvasId),canvasIds:[...new Set(u)],...p.includes("sequence")?{sequence:true}:{},...bc(c),children:l},w=ts(m==null?void 0:m.t);return w?g.time=w:!m&&((_=l[0])!=null&&_.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(p.includes("sequence")&&d.length>1&&!d.some(k=>k.t)||Th(d,n))&&(g.parts=d.map(k=>({canvasId:k.id,...k.rect?{region:k.rect}:{}}))),[g]},s=D(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:Li;return Pi.set(t,a),a}function Th(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 $v(t,e,n,o){let r=null,s=null;const i=(l,u,d)=>!l||d>l.depth||d===l.depth&&!(l.sequence&&u.sequence),a=(l,u,d)=>{const h=d||l.id===o;if(e&&l.canvasIds.includes(e)&&(!l.time||n!==void 0&&n>=l.time.start&&(l.time.end===void 0||n<l.time.end))){const m={id:l.id,depth:u,...l.sequence?{sequence:true}:{}};i(r,l,u)&&(r=m),h&&i(s,l,u)&&(s=m)}l.children.forEach(p=>a(p,u+1,h))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function Ih(){const t=ot(n=>n.status),e=ot(n=>n.error);return mt(()=>({status:t,error:e}),[t,e])}function Ph(){return ot(t=>t.manifest)}function _c(){return ot(t=>At(t.manifest))}function os(){return ot(t=>Ne(t.manifest,t.canvasId))}function Lh(){return ot(t=>Be(t.manifest,t.canvasId))}function Ah(){const{clover:t}=ce("useNavigation"),e=ot(o=>Pn(o.manifest,o.canvasId)),n=ot(o=>At(o.manifest).views.length);return mt(()=>Cd(t,e,n),[t,e,n])}function Oh(){return ot(t=>ja(t.manifest,t.addedSets))}function Fv(t){const{language:e}=ce("useLocalized");return mt(()=>yt(t,e),[t,e])}function Dv(){return Pt().t}function zv(){return Pt().langOf}const Nh=({options:t,onReady:e,onViewportChange:n,onMediaElement:o,onCaptionChange:r,caption:s,onEnded:i,placeholder:a=true,label:c,partOf:l,language:u,annotations:d,chapters:h,...p})=>{const m=ce("Canvas"),{clover:g}=m,w=Jt(g.captions.subscribe,g.captions.get,g.captions.get),v=s??w,b=u??m.language,_=os(),{direction:k}=_c(),x=Ph(),I=Lh(),O=ot(B=>{var lt;return B.status==="loading"?"loading":((lt=B.manifest)==null?void 0:lt.id)??""}),H=ot(B=>B.target),Y=ot(B=>Va(B.manifest,B.addedSets,B.search.set,B.regions)),it=ot(B=>sd(B.manifest,B.addedSets,B.hiddenSets,B.shownSets)),G=ot(B=>qr(B.manifest,B.addedSets,B.hiddenSets,B.shownSets)),J=ot(B=>B.annotationId),C=R(J);C.current=J;const[S,N]=z(0);F(()=>g.found.subscribe(B=>{B&&B===C.current&&N(lt=>lt+1)}),[g]);const j=Jt(g.highlight.subscribe,g.highlight.get,g.highlight.get),K=Jt(g.chapter.subscribe,g.chapter.get,g.chapter.get),Z=_.map(B=>B.id).join("|"),Q=mt(()=>{if(d)return d;const B=_.map(lt=>lt.id);return Y.flatMap(lt=>lt.entries.filter(bt=>B.includes(bt.canvasId)).map(bt=>({annotation:bt.annotation,targetIndex:B.indexOf(bt.canvasId),pageId:lt.id,...lt.label?{pageLabel:lt.label}:{},...bt.place?{place:bt.place}:{},...bt.layer?{layer:{key:bt.layer.key,item:bt.layer.item}}:{}})))},[d,Y,_]),at=H?(B=>!!B&&_.some(lt=>lt.id===B))(H.canvasId):false,ct=R(null);at&&(ct.current=Z);const y=a&&ct.current!==Z,E=R(null),L=R(null),$=mt(()=>_.some(B=>lo(B).length>0),[_]),A=$?_.find(B=>lo(B).length>0):void 0,M=Sh(x,A,b,Eh),W=R($);W.current=$;const X=s===void 0?m.language:void 0,Ct=A==null?void 0:A.id;F(()=>{if(!X||!A)return;const B=uc(A).find(lt=>lt.language&&Oa(lt.language,X));B&&g.captions.get()!==B.id&&g.captions.emit(B.id)},[X,Ct,g]);const nt=ut(()=>{const B=g.store.get().target;!B||!g.store.get().canvasId||kh(B,E.current,L.current,W.current)&&g.consumeTarget()},[g]),gt=R(Z);F(()=>{gt.current!==Z&&(gt.current=Z,L.current=null),H&&nt()},[H,Z,nt]);const ht=R(e);ht.current=e;const Ht=ut(B=>{var lt;E.current=B,B.on("change",nt),nt(),(lt=ht.current)==null||lt.call(ht,B)},[nt]),Lt=ut(B=>{var bt;const lt=(bt=E.current)==null?void 0:bt.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(B)},[g,n]),U=ut(B=>{L.current=B,g.media.emit(B),B&&nt(),o==null||o(B)},[g,nt,o]),rt=ut(()=>{i==null||i(),(Pe(x,"auto-advance")||Pe(I,"auto-advance"))&&g.next({autoplay:true,wrap:Pe(x,"repeat")})},[g,x,I,i]),tt=ut(B=>void Ch(g,B),[g]),wt=(t==null?void 0:t.request)??g.request,Bt=Pe(I,"auto-advance")||Pe(x,"auto-advance"),ee=Pe(I,"repeat")||Pe(x,"repeat"),be=mt(()=>({...t,request:wt,animation:(t==null?void 0:t.animation)??{autoplay:Bt,loop:ee}}),[t,wt,Bt,ee]);return _.length?f(yh,{...p,manifestId:O,navPlace:x==null?void 0:x.navPlace,canvases:_,viewingDirection:k,language:b,label:c??(I==null?void 0:I.label)??(x==null?void 0:x.label),partOf:l??(x==null?void 0:x.label),options:be,placeholder:y,onReady:Ht,onViewportChange:Lt,onMediaElement:U,caption:v,onCaptionChange:B=>{g.captions.emit((B==null?void 0:B.id)??null),r==null||r(B)},onEnded:rt,annotations:Q,hiddenPages:G,unlistedPages:it,onPageVisibilityChange:(B,lt)=>B.forEach(bt=>g.setSetVisible(bt,lt)),chapters:h??M,highlightedChapter:K,onChapterHighlight:B=>g.chapter.emit(B),selectedAnnotation:J,refind:S,highlightedAnnotation:j,onAnnotationSelect:B=>g.selectAnnotation(B),onAnnotationLink:p.onAnnotationLink??tt,onAnnotationActive:B=>{var lt;g.highlight.emit(B),(lt=p.onAnnotationActive)==null||lt.call(p,B)}}):null},Rh=6,Ke=new Set;function Bh(t){if(Ke.has(t))return true;for(;Ke.size>=Rh;){let e;for(const n of Ke)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;Ke.delete(e),e.release()}return Ke.add(t),true}function Ai(t){Ke.delete(t)}function $h(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function Fh(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 Dh=`#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
+ `,zh=`#version 300 es
14
+ precision highp float;
15
+ in vec2 v_uv;
16
+ uniform sampler2D u_texture;
17
+ uniform float u_opacity;
18
+ out vec4 outColor;
19
+
20
+ void main() {
21
+ outColor = texture(u_texture, v_uv) * u_opacity;
22
+ }
23
+ `;class uo{constructor(e,n,o){P(this,"kind","webgl2");P(this,"canvas");P(this,"maxTextureSize");P(this,"gl");P(this,"program",null);P(this,"vao",null);P(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});P(this,"textures",new Map);P(this,"cssWidth",1);P(this,"cssHeight",1);P(this,"pixelRatio",1);P(this,"matrixScratch",new Float32Array(9));P(this,"isLost",false);P(this,"callbacks");P(this,"handleLost",()=>{var e2,n2;this.isLost=true,this.textures.clear(),(n2=(e2=this.callbacks).onLost)==null||n2.call(e2)});this.canvas=e,this.gl=n,this.callbacks=o,this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)||4096;const r=Hh(n,Dh,zh);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 uo(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||!$h(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=Fh(e,this.pixelRatio),i=ie(e.transform,Qt(r.x,r.y),se(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,nh(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),Wh(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 Hh(t,e,n){const o=Oi(t,t.VERTEX_SHADER,e),r=Oi(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 Oi(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 Wh(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function wc(t,e){return ie(Qt(e.width/2,e.height/2),Ln(t.rotation),se(t.zoom),Qt(-t.x,-t.y))}function xc(t,e){return ie(Qt(t.x,t.y),se(1/t.zoom),Ln(-t.rotation),Qt(-e.width/2,-e.height/2))}function Ni(t,e,n){return me(xc(t,e),n)}function Uh(t,e,n){return me(wc(t,e),n)}function Sr(t,e){return xo(xc(t,e),{x:0,y:0,width:e.width,height:e.height})}function jh(t,e,n=0,o=0){const r=xo(Ln(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=mc(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function fo(t,e,n,o,r){const s=me(ie(se(1/n),Ln(-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 Vh(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const qh=.09,Kh=1e-4,Ri=.05,Zh=1e-4;class Gh{constructor(e,n=qh){P(this,"current");P(this,"target",null);P(this,"timeConstant");this.current={...e},this.timeConstant=n}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){if(o||this.timeConstant===0){this.set(e.state);return}let r=e.anchor;if(r){const s=fo(r.world,r.screen,e.state.zoom,e.state.rotation,n);Math.hypot(s.x-e.state.x,s.y-e.state.y)*e.state.zoom>Ri&&(r=void 0)}this.target={state:{...e.state},anchor:r}}stop(){this.target=null}step(e,n){const o=this.target;if(!o)return false;const r=1-Math.exp(-Math.max(e,0)/this.timeConstant),s=this.current,i=o.state,a=Math.exp(Math.log(s.zoom)+(Math.log(i.zoom)-Math.log(s.zoom))*r),c=s.rotation+(i.rotation-s.rotation)*r;let l;return o.anchor?l=fo(o.anchor.world,o.anchor.screen,a,c,n):l={x:s.x+(i.x-s.x)*r,y:s.y+(i.y-s.y)*r},this.current={x:l.x,y:l.y,zoom:a,rotation:c},Math.abs(Math.log(i.zoom/a))<Kh&&Math.abs(i.rotation-c)<Zh&&Math.hypot(i.x-l.x,i.y-l.y)*a<Ri?(this.current={...i},this.target=null,false):true}}const Sc=5,Bi=300,Xh=Sc*4;function $i(t,e=false){return t==="touch"||t==="pen"&&!e}function Yh(t){return t.pointerType==="pen"&&t.buttons===0}function Jh(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 Fi(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const kr={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true},tr=2,Di=1.5,zi=.1,Qh=100,tp=200,ep=.002,np=.01;class op{constructor(e,n,o=kr){P(this,"pointers",new Map);P(this,"samples",[]);P(this,"down",null);P(this,"pinch",null);P(this,"lastTap",null);P(this,"lastPointerType","");P(this,"penHovers",false);P(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||Fi(e2.target,this.element))return;(r=(o2=this.element).setPointerCapture)==null||r.call(o2,e2.pointerId);const n2=this.local(e2);this.pointers.set(e2.pointerId,n2),this.pointers.size===1?(this.down={x:n2.x,y:n2.y,t:e2.timeStamp,moved:false},this.samples=[{x:n2.x,y:n2.y,t:e2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});P(this,"onPointerMove",e2=>{var r;Yh(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)>Sc&&(this.down.moved=true),(r=this.down)!=null&&r.moved&&this.options.navigable&&this.target.panBy(s,i,false),this.samples.push({x:o2.x,y:o2.y,t:e2.timeStamp});const a=e2.timeStamp-Qh;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const s=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(s.distance/this.pinch.distance,s.mid,false),this.target.panBy(s.mid.x-this.pinch.mid.x,s.mid.y-this.pinch.mid.y,false),this.pinch=s}});P(this,"onPointerUp",e2=>{var c,l,u,d,h,p;if(!this.pointers.has(e2.pointerId))return;if(this.pointers.delete(e2.pointerId),(l=(c=this.element).releasePointerCapture)==null||l.call(c,e2.pointerId),this.pointers.size===1){this.pinch=null;const[m]=this.pointers.values();this.samples=[{...m,t:e2.timeStamp}];return}if(this.pointers.size>0)return;const n2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!n2)return;const o2=this.local(e2);if(!n2.moved&&e2.type==="pointerup"&&e2.timeStamp-n2.t<Bi){if((d=(u=this.target).dismiss)!=null&&d.call(u)){this.lastTap=null;return}if($i(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<Bi&&Math.hypot(o2.x-m.x,o2.y-m.y)<Xh?(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/tr,o2,true):this.zoomIn(o2):(p=(h=this.target).tap)==null||p.call(h,o2);return}if(!this.options.navigable)return;const s=this.samples[0],i=this.samples[this.samples.length-1],a=((i==null?void 0:i.t)??0)-((s==null?void 0:s.t)??0);if(s&&i&&a>0&&e2.timeStamp-i.t<50){const m=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3;Math.hypot(m,g)>tp&&this.target.flick(m,g)}});P(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||$i(this.lastPointerType,this.penHovers)||Fi(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/tr,this.local(e2),true):this.zoomIn(this.local(e2))))});P(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&Jh(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=rp(e2),r=n2?np:ep;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});P(this,"onKeyDown",e2=>{if(e2.target!==this.element||!this.options.navigable||e2.altKey||e2.metaKey||e2.ctrlKey)return;const n2=this.element.getBoundingClientRect(),o2=n2.width*zi*(e2.shiftKey?3:1),r=n2.height*zi*(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(Di,void 0,true);break;case"-":case"_":this.target.zoomBy(1/Di,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(tr,e,true)}pinchState(){const[e,n]=[...this.pointers.values()];return{distance:Math.hypot(n.x-e.x,n.y-e.y),mid:{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}}}function rp(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class kc extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const Hi=new Set;async function sp(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=ld(r),i=ap(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return er(t,{signal:n,cors:true,withCredentials:s});if(i&&Hi.has(i))return er(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await Zr(r,t,{mode:"cors",signal:n})}catch(h){if(cp(h,n))throw h;const p=await er(t,{signal:n,cors:false,withCredentials:s});return i&&Hi.add(i),p}if(!a.ok)throw new kc(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await ip(c);const u=l.width,d=l.height;if(o&&(l.width>o||l.height>o)){const h=o/Math.max(l.width,l.height),p=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*h)),resizeHeight:Math.max(1,Math.floor(l.height*h)),resizeQuality:"high"});l.close(),l=p}if(n!=null&&n.aborted)throw l.close(),Cr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:u,naturalHeight:d,opaque:false}}async function ip(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 er(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Cr());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(Cr())};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 kc("Image failed to load",t))},i.src=t})}function ap(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function cp(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Cr(){const t=new Error("Aborted");return t.name="AbortError",t}function Wi(t){t.kind==="bitmap"&&t.source.close()}const lp=192*1024*1024,up=6,dp=2;class fp{constructor(e){P(this,"entries",new Map);P(this,"inFlight",0);P(this,"frame",0);P(this,"bytes",0);P(this,"wanted",[]);P(this,"disposed",false);P(this,"budget");P(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??lp,this.maxInFlight=e.maxInFlight??up}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:nr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=nr(n),this.flushWaiters(e))}prefetch(e){return Promise.all(e.map(n=>new Promise(o=>{const r=this.entries.get(n.url);if(r&&r.state!=="loading")return o();if(r){r.waiters.push(o);return}this.start({...n,priority:-1},o)}))).then(()=>{})}update(e){if(this.disposed)return;this.frame++;const n=new Set(e.map(o=>o.url));this.wanted=[...e].sort((o,r)=>o.priority-r.priority);for(const o of this.entries.values())o.state==="loading"&&!o.pinned&&!n.has(o.url)&&o.controller&&(o.controller.abort(),this.entries.delete(o.url),this.inFlight--);for(const o of this.wanted){const r=this.entries.get(o.url);r&&(r.lastUsed=this.frame)}this.pump(),this.evict(n)}dispose(){var e;this.disposed=true;for(const n of this.entries.values())(e=n.controller)==null||e.abort(),this.flushWaiters(n.url);this.entries.clear(),this.bytes=0}forEachReady(e){for(const n of this.entries.values())n.state==="ready"&&n.image&&e(n.url,n.image)}pump(){for(const e of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(e.url)||this.start(e)}}start(e,n){const o=new AbortController,r={url:e.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:o,pinned:!!n,waiters:n?[n]:[]};this.entries.set(e.url,r),this.inFlight++,this.attempt(r,e,o,e.url)}attempt(e,n,o,r){e.attempts++,this.options.load(r,o.signal).then(s=>{if(this.disposed||this.entries.get(e.url)!==e){Wi(s);return}e.state="ready",e.image=s,e.bytes=nr(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<dp&&!hp(s,n)){this.attempt(e,n,o,n.fallbackUrl??n.url);return}e.state="failed",e.controller=void 0,e.pinned=false,this.settle(e)}})}settle(e){this.inFlight--,this.flushWaiters(e.url),this.options.onSettled(),this.pump()}flushWaiters(e){const n=this.entries.get(e);if(!n)return;const o=n.waiters;n.waiters=[],o.forEach(r=>r())}evict(e){if(this.bytes<=this.budget)return;const n=[...this.entries.values()].filter(o=>o.state==="ready"&&!e.has(o.url)).sort((o,r)=>o.lastUsed-r.lastUsed);for(const o of n){if(this.bytes<=this.budget)break;this.entries.delete(o.url),this.bytes-=o.bytes,o.image&&Wi(o.image),this.options.onEvict(o.url)}}}function nr(t){return t.width*t.height*4}function hp(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 pp=.1;class mp{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){P(this,"handle",0);P(this,"last",0);P(this,"disposed",false);P(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,pp):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 gp=2*1024*1024;function vp(t,e,n=gp){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 yp(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 bp(t,e,n){if(!t)return null;let o=t.trim().replace(/^xywh=/,""),r=false;o.startsWith("pct:")?(r=true,o=o.slice(4)):o.startsWith("pixel:")&&(o=o.slice(6));const s=o.split(",").map(Number);if(s.length!==4||s.some(m=>!Number.isFinite(m)))return null;let[i,a,c,l]=s;r&&(i=i/100*e,a=a/100*n,c=c/100*e,l=l/100*n);const u=Math.max(0,i),d=Math.max(0,a),h=Math.min(e,i+c),p=Math.min(n,a+l);return h<=u||p<=d?null:{x:u,y:d,width:h-u,height:p-d}}const or=512,_p=16e6;function Cc(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 wp(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(h,p,m)=>{const g=Math.ceil(e/h),w=Math.ceil(n/h);return{scaleFactor:h,width:g,height:w,tileWidth:p,tileHeight:m,cols:Math.ceil(g/p),rows:Math.ceil(w/m)}},i=(h,p)=>({scaleFactor:e/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const h of a.scaleFactors)o.push(s(h,a.width,a.height));else if(r)for(let h=1;;h*=2){const p=s(h,or,or);if(o.push(p),p.cols===1&&p.rows===1)break}const c=Math.max(0,...o.map(h=>h.scaleFactor));for(const h of t.sizes){const p=e/h.width;xp(t,h.width,h.height)&&p>c+1e-9&&o.push(i(h.width,h.height))}const l=o.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const h=Math.max(e,n)/or;o.push(i(Math.ceil(e/h),Math.ceil(n/h)))}(!o.length||!a&&!r&&e*n<=_p)&&(o.some(h=>h.scaleFactor===1)||o.push(i(e,n)));const u=Sp(o).sort((h,p)=>p.scaleFactor-h.scaleFactor),d=Mf(t);return{width:e,height:n,levels:u,tile(h){const p=u[h.level],m=p.scaleFactor,g=p.cols===1&&p.rows===1;let w,v,b;if(g)w={x:0,y:0,width:e,height:n},v=p.width,b=p.height;else{const _=Math.round(h.col*p.tileWidth*m),k=Math.round(h.row*p.tileHeight*m);w={x:_,y:k,width:Math.min(Math.round(p.tileWidth*m),e-_),height:Math.min(Math.round(p.tileHeight*m),n-k)},v=Math.ceil(w.width/m),b=Math.ceil(w.height/m)}return{...h,region:w,url:ao(t,w,v,b),fallbackUrl:d?ao(t,w,v,b,d):void 0}}}}function xp(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Sp(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 kp(t,e){const n=t.levels;for(let o=0;o<n.length;o++)if(n[o].scaleFactor<=e*(1+1e-6))return o;return n.length-1}function ke(t,e,n){const o=t.levels[e],r=o.tileWidth*o.scaleFactor,s=o.tileHeight*o.scaleFactor,i=Math.max(0,n.x),a=Math.max(0,n.y),c=Math.min(t.width,n.x+n.width),l=Math.min(t.height,n.y+n.height);if(c<=i||l<=a)return[];const u=Math.max(0,Math.floor(i/r)),d=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),h=Math.max(0,Math.floor(a/s)),p=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=h;g<=p;g++)for(let w=u;w<=d;w++)m.push({level:e,col:w,row:g});return m}async function Cp(t,e){if(t.media)return Ep(t,t.media);let n=null,o=null;if(t.service)try{n=wp(await ac(t.service,e.infoOptions))}catch(h){o=h}if(!n){if(!t.url)throw o??new Error("Image has no source");const h=await e.loadStatic(t.url);e.cache.seed(t.url,h),n=Cc(t.url,h.naturalWidth,h.naturalHeight)}const r=t.width&&t.height&&t.width>0&&t.height>0?{width:t.width,height:t.height}:{width:n.width,height:n.height},s=bp(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=yp(t.rotation),u=l?Mp(c,l):void 0,d={id:t.id,spec:t,pyramid:n,size:r,clip:c,contentClip:s,rect:{x:0,y:0,width:s.width,height:s.height},...u?{turn:u}:{}};return await e.cache.prefetch(ke(n,0,c).map(h=>{const p=n.tile(h);return{url:p.url,fallbackUrl:p.fallbackUrl}})),d}const Ec="media:";function Ep(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=`${Ec}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:Cc(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 Mp(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=u=>Math.abs(u)<1e-12?0:u,s=r(Math.cos(o)),i=r(Math.sin(o)),a=Math.abs(t.width*s)+Math.abs(t.height*i),c=Math.abs(t.width*i)+Math.abs(t.height*s),l=ie(Qt(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},se(n?-1:1,1),Qt(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:eh(l),width:a,height:c}}function Mc(t){var e;return((e=t.turn)==null?void 0:e.orient)??Qt(-t.clip.x,-t.clip.y)}function Tp(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=xo(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 Ip(t,e){const{turn:n,clip:o}=t;return n?me(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function Ui(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 Pp(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return ns(t.map(o=>o.rect))}const e=Ui(t[0]).height;let n=0;for(const o of t){const r=Ui(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 So(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function Lp(t){const e=So(t);return ie(Qt(t.rect.x,t.rect.y),se(e.x,e.y),Mc(t))}function Ap(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 Op=1e7,Np=15e6,Rp=2e7,Bp=2;function $p(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=wc(n,o),c=[],l=[],u=[],d=(h,p,m)=>{const g=h.tile(p);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const h of e){const{pyramid:p,clip:m,rect:g}=h,w=So(h);if(t.wantOverview)for(const C of ke(p,0,m))d(p,C,Rp);const v=ji(h,n,o,r),b=i?ji(h,i,o,r):v;if(u.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const _=C=>S=>{const N=p.tile(S).region;return Math.hypot(N.x+N.width/2-C.x,N.y+N.height/2-C.y)};if(b){const C=_(b.center);for(const S of ke(p,0,b.area))d(p,S,C(S)/1e3);if(b.target>0)for(const S of ke(p,b.target,b.area))d(p,S,Op+C(S))}if(!v)continue;const{area:k,target:x}=v,I=_(v.center),O=ke(p,0,k),H=x===0?[]:ke(p,x,k);if(b!==v){for(const S of O)d(p,S,I(S)/1e3);const C=x-Bp;if(C>0)for(const S of ke(p,C,k))d(p,S,Np+I(S))}if(h.spec.hidden)continue;const G=(x===0?O:H).every(C=>s(p.tile(C).url)!==void 0)?[x]:Array.from({length:x+1},(C,S)=>S),J=ie(a,Qt(g.x,g.y),se(w.x,w.y),Mc(h));for(const C of G){const S=C===0?O:C===x?H:ke(p,C,k),N=p.levels[C].cols*p.levels[C].rows>1;for(const j of S){const K=p.tile(j),Z=s(K.url);if(!Z)continue;const Q=Fp(h,K.region,Z,J,N);Q&&c.push({...Q,url:K.url})}}}return l.sort((h,p)=>h.priority-p.priority),{draws:c,wants:Dp(l),levels:u}}function ji(t,e,n,o){const{pyramid:r,rect:s}=t,i=Sr(e,n);if(!rh(i,s))return null;const a=So(t),c=Math.max(i.x,s.x),l=Math.max(i.y,s.y),u=Math.min(i.x+i.width,s.x+s.width),d=Math.min(i.y+i.height,s.y+s.height),h=1/(a.x*e.zoom*o);return{area:Tp(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(u-c)/a.x,height:(d-l)/a.y}),center:Ip(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:kp(r,h)}}function Fp(t,e,n,o,r){const{clip:s}=t,i=Math.max(e.x,s.x),a=Math.max(e.y,s.y),c=Math.min(e.x+e.width,s.x+s.width),l=Math.min(e.y+e.height,s.y+s.height);if(c<=i||l<=a)return null;const u=n.width/e.width,d=n.height/e.height,h=1e-6;return{item:t,image:n,transform:ie(o,Qt(e.x,e.y),se(1/u,1/d)),crop:{x:(i-e.x)*u,y:(a-e.y)*d,width:(c-i)*u,height:(l-a)*d},bleed:{right:r&&c<s.x+s.width-h,bottom:r&&l<s.y+s.height-h}}}function Dp(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const zp={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Hp=2,Wp=3,Up=.1,jp=1e-6,Er={top:0,right:0,bottom:0,left:0};function Vi(t,e="padding"){if(!t||typeof getComputedStyle!="function")return Er;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 Vp=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let qp;class Kp{constructor(e,n={}){P(this,"host");P(this,"overlays",null);P(this,"options");P(this,"backend",null);P(this,"backendPreference");P(this,"contextLosses",0);P(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});P(this,"visible",true);P(this,"dom",null);P(this,"domAsked",false);P(this,"pending",null);P(this,"camera");P(this,"loop");P(this,"gestures");P(this,"gestureOptions",{});P(this,"cache");P(this,"navigator",null);P(this,"navigatorAsked",0);P(this,"viewport",{width:1,height:1});P(this,"inset",Er);P(this,"pixelRatio",1);P(this,"items",[]);P(this,"worldBounds",null);P(this,"contentVersion",0);P(this,"opaqueUrls",new Set);P(this,"mediaByKey",new Map);P(this,"detachMedia",[]);P(this,"opened",false);P(this,"atHome",true);P(this,"lastEmitted",null);P(this,"generation",0);P(this,"listeners",new Map);P(this,"unloadable",false);P(this,"resizeObserver",null);P(this,"intersectionObserver",null);P(this,"releaseTimer",null);P(this,"dprQuery",null);P(this,"disposed",false);P(this,"dismisser",null);P(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o=this.camera.current,r=this.backend,s=vp(this.getTile,u=>r?r.has(u):true),i=$p({items:this.items,camera:o,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=i.wants.filter(u=>!u.url.startsWith(Ec));return this.cache.update(a),i.draws.length?this.setUnloadable(false):a.length&&a.every(u=>this.cache.failed(u.url))&&this.setUnloadable(true),this.paint(i.draws),(c=this.overlays)==null||c.position(o,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(u=>!u.spec.hidden),this.worldBounds,Sr(o,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!Vh(this.lastEmitted,o))&&(this.lastEmitted={...o},this.opened&&this.emit("viewport")),n2||s.deferred});P(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));P(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});P(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...zp,...rr(n)},Gp()&&(this.options.animationTime=0),this.camera=new Gh({x:0,y:0,zoom:1,rotation:0},this.options.animationTime),this.loop=new mp(this.tick),this.gestureOptions=rr(n.gestures??{}),this.gestures=new op(e,this,{...kr,...this.gestureOptions}),this.cache=new fp({load:(o,r)=>this.loadTile(o,r),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:o=>{var r;return(r=this.backend)==null?void 0:r.release(o)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Zp(e),this.visible?this.acquireBackend():this.holder.hiddenSince=qi(),this.measure(),this.observe()}get backendKind(){var e;return((e=this.backend)==null?void 0:e.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(e,n){let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(n),()=>o==null?void 0:o.delete(n)}async setImages(e,{world:n,fit:o=false}={}){const r=++this.generation,s=new Map(this.items.map(u=>[u.id,u])),i=await Promise.allSettled(e.map(u=>{const d=s.get(u.id);return d&&Ap(d.spec,u)?(d.spec=u,Promise.resolve(d)):Cp(u,{cache:this.cache,loadStatic:h=>this.loadTile(h),infoOptions:{request:this.options.request}})}));if(r!==this.generation||this.disposed)return;const a=i.filter(u=>u.status==="fulfilled").map(u=>u.value),c=i.filter(u=>u.status==="rejected").map(u=>u.reason);this.items=a,this.watchMedia(a);const l=Pp(a);if(this.worldBounds=n?l?ns([n,l]):n:l,this.contentVersion++,c.length&&this.emit("error",c),this.setUnloadable(e.length>0&&!a.length&&c.length>0),!this.worldBounds){this.invalidate();return}this.opened?o?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(e){const n=new Set(e);let o=false;for(const r of this.items){const s=n.has(r.id);!!r.spec.hidden!==s&&(r.spec={...r.spec,hidden:s},o=true)}o&&this.invalidate()}isReady(e){const n=this.items.find(r=>r.id===e);if(!n)return false;if(n.spec.media)return true;const o=n.pyramid.levels[0];if(!o)return false;for(let r=0;r<o.rows;r++)for(let s=0;s<o.cols;s++)if(!this.getTile(n.pyramid.tile({level:0,col:s,row:r}).url))return false;return true}fitBounds(e,n=false,o=Er){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i}){const{width:a,height:c}=this.viewport,{zoom:l}=jh(e,{width:Math.max(1,a-i-r),height:Math.max(1,c-o-s)},n);return{...fo(mc(e),{x:(a+i-r)/2,y:(c+o-s)/2},l,n,this.viewport),zoom:l,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*Up;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,Vi((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return Sr(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var o;const e=((o=this.homeCamera())==null?void 0:o.zoom)??1,n=this.items.length?Math.min(...this.items.map(r=>So(r).x)):1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.options.maxZoomPixelRatio/n)}}home(e=false){const n=this.homeCamera();n&&(this.atHome=true,this.animateTo(n,e))}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-jp)}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=Ni(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=mn(r.zoom*e,a,c),u=fo(i,s,l,r.rotation,this.viewport),d=this.constrain({...r,...u,zoom:l});this.atHome=false,o?this.camera.animateTo({state:d,anchor:{world:i,screen:s}},this.viewport):this.camera.set(d),this.invalidate()}panBy(e,n,o=false){const r=o?this.camera.destination:this.camera.current,s=me(ie(se(1/r.zoom),Ln(-r.rotation)),{x:e,y:n}),i=this.constrain({...r,x:r.x-s.x,y:r.y-s.y});this.atHome=false,o?this.camera.animateTo({state:i},this.viewport):this.camera.set(i),this.invalidate()}panTo(e,n=false){const o=n?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...o,...e}),n)}flick(e,n){this.panBy(e*.25,n*.25,true)}rotateBy(e){const n=this.camera.destination;this.setRotation(n.rotation*180/Math.PI+e)}setRotation(e,n=false){const o=this.camera.destination,r=e*Math.PI/180;this.animateTo(this.constrain({...o,rotation:r}),n)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(e){this.emit("tap",e)}setDismiss(e){this.dismisser=e}dismiss(){var e;return((e=this.dismisser)==null?void 0:e.call(this))??false}setGestures(e){this.gestures.setOptions({...kr,...this.gestureOptions,...rr(e)})}setInteracting(e){e&&this.camera.stop()}worldToScreenPoint(e){return Uh(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return Ni(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 xo(ie(Lp(o),se(s.width/r.width,s.height/r.height)),n);const i=o.rect.width/r.width,a=o.rect.height/r.height;return{x:o.rect.x+(n.x-r.x)*i,y:o.rect.y+(n.y-r.y)*a,width:n.width*i,height:n.height*a}}attachNavigator(e){var s;(s=this.navigator)==null||s.dispose(),this.navigator=null;const n=++this.navigatorAsked;let o=null,r=false;return import("./Navigator-BNwjmkXY.mjs").then(i=>{r||this.disposed||n!==this.navigatorAsked||(o=new i.Navigator(e,(a,c)=>this.panTo(a,c)),this.navigator=o,this.invalidate())}),()=>{r=true,o==null||o.dispose(),o&&this.navigator===o&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var e,n,o,r,s,i,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(e=this.resizeObserver)==null||e.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),(r=(o=this.dprQuery)==null?void 0:o.removeEventListener)==null||r.call(o,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(s=this.navigator)==null||s.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(i=this.dom)==null||i.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(c=>c()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(e){this.detachMedia.forEach(n=>n()),this.detachMedia=[],this.mediaByKey.clear();for(const n of e){if(!n.media||n.media.kind!=="media")continue;const o=n.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(o,n.media);const r=n.media.source,s=()=>this.invalidate(),i=["play","seeked","loadeddata","resize"];i.forEach(a=>r.addEventListener(a,s)),this.detachMedia.push(()=>i.forEach(a=>r.removeEventListener(a,s)))}}paint(e){const n=this.backend,o=[],r=(n==null?void 0:n.kind)==="webgl2";n==null||n.begin();for(const s of e){const{image:i}=s;if(!(i.kind==="media"||i.kind==="element"&&r&&(i.opaque||this.opaqueUrls.has(s.url)))&&n){if(n.draw({key:s.url,source:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1,bleed:s.bleed})!=="tainted"||i.kind==="bitmap")continue;this.opaqueUrls.add(s.url)}(i.kind==="element"||i.kind==="media")&&o.push({key:`${s.item.id}|${s.url}`,element:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1})}n==null||n.end(),this.dom?this.dom.sync(o):o.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-hc0qARQc.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 sp(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof uo?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const e=2*Math.PI,n=Math.round(this.camera.destination.rotation/e)*e||0;return this.fit(this.worldBounds,n,this.inset)}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?mn(e.zoom,r,Math.max(s,e.zoom)):mn(e.zoom,r,s);return{...e,zoom:i,x:mn(e.x,o.x,o.x+o.width),y:mn(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<Wp);let r=null;o&&(Bh(this.holder)||this.backendPreference==="webgl2")&&(r=uo.create(n,{onLost:this.onContextLost}),r||Ai(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(qp??(qp=import("./Canvas2DBackend-C-ZMSCak.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(Ai(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=qi()),!(!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=Vi(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Hp);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&Vp(s,this.inset))return;const a=this.viewport;if(this.viewport={width:o,height:r},this.inset=s,this.pixelRatio=i,(c=this.backend)==null||c.resize(o,r,i),this.opened)if(this.atHome)this.home(true);else{const l=this.camera.current,u=o/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*u}))}e?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var e,n,o,r;typeof window>"u"||typeof window.matchMedia!="function"||((n=(e=this.dprQuery)==null?void 0:e.removeEventListener)==null||n.call(e,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(r=(o=this.dprQuery).addEventListener)==null||r.call(o,"change",this.onPixelRatioChange))}setUnloadable(e){e!==this.unloadable&&(this.unloadable=e,this.emit("unloadable",e))}emit(e,n){var o;(o=this.listeners.get(e))==null||o.forEach(r=>r(n))}}const qi=()=>typeof performance<"u"?performance.now():Date.now();function Zp(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 Gp(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function rr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const Xp=(t,e)=>new Kp(t,e),Yp=pt(()=>import("./Connected-Dvx7wtot.mjs")),Jp=pt(()=>import("./Connected-Bmc_CdUD.mjs").then(t=>t.C));function Qp({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var m;const a=ce("Body");Qa(a.clover,r);const c=os(),l=mt(()=>Td(c),[c]),u=Id(n??a.renderers,{canvases:c,bodies:l}),d=u==null?void 0:u.component,h=((m=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:m.type)??"Canvas",p=ot(g=>g.status==="loading");return f("div",{"aria-busy":p,className:Tt("clover-body",t),"data-renderer":d?"custom":h.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[d?f(d,{canvases:c,bodies:l,children:s}):h==="Scene"?f(_t,{fallback:f(_n,{overlay:true}),children:f(Jp,{...i,children:s})}):h==="Timeline"?f(_t,{fallback:f(_n,{overlay:true}),children:f(Yp,{...i,children:s})}):f(Nh,{...i,collapseControls:o,surface:Xp,children:s}),p&&f(_n,{overlay:true})]})}const tm={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function An(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 tm[n.toLowerCase()]??e})}const em=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function nm(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 om(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 ko=(t,e)=>e==="canvas"?Be(t.manifest,t.canvasId):t.manifest,Tc=ae(null),rs=()=>zt(Tc),Ye=te(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var h;const a=Tn(p=>{var m,g;return e==="canvas"?(m=Be(p.manifest,p.canvasId))==null?void 0:m.label:(g=p.manifest)==null?void 0:g.label},void 0),c=rs(),l=(h=Ee())==null?void 0:h.language,{text:u,lang:d}=yt(n??(c?c.label:a),l);return u?f(o,{ref:i,className:Tt("clover-label",r),...dt(d),...s,children:An(u)}):null});function rm(t,e,n){const o=(u,d)=>Math.min(Math.max(Math.round(u),0),d),r=n?o(n.x*t.width,t.width-1):0,s=n?o(n.y*t.height,t.height-1):0,i={x:r,y:s,width:n?Math.max(1,o(n.width*t.width,t.width-r)):t.width,height:n?Math.max(1,o(n.height*t.height,t.height-s)):t.height},a=i.width===t.width&&i.height===t.height;if(!a&&!t.regionByPx)return null;if(t.sizeByW){let u=Math.min(1,e/Math.max(i.width,i.height));return t.maxWidth&&(u=Math.min(u,t.maxWidth/i.width)),t.maxHeight&&(u=Math.min(u,t.maxHeight/i.height)),t.maxArea&&(u=Math.min(u,Math.sqrt(t.maxArea/(i.width*i.height)))),ao(t,i,Math.max(1,Math.floor(i.width*u)),Math.max(1,Math.floor(i.height*u)))}if(!a)return null;const c=[...t.sizes].sort((u,d)=>u.width-d.width),l=c.find(u=>Math.max(u.width,u.height)>=e)??c.at(-1)??{width:t.width,height:t.height};return ao(t,i,l.width,l.height)}function Je(t){var e;return(e=Xr(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function sm(t,{width:e,height:n}){if(t==="full")return{x:0,y:0,width:1,height:1};const o=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(t);if(!o)return null;const[r,s,i,a]=o.slice(2).map(Number),[c,l]=o[1]?[100,100]:[e,n];return{x:r/c,y:s/l,width:i/c,height:a/l}}function ge(t,e="full"){if(!t)return null;const n=_o(t.service);return n?e==="full"?{service:n,fallback:t.id}:{service:n,region:e,fallback:t.id}:t.id?{src:t.id}:null}function ss(t){const e=t;return e?ge(D(e.thumbnail)[0])??ge(Je(e))??ge(Je(e.placeholderContainer))??ge(Je(e.accompanyingContainer)):null}function im(t){const e=t;return e?ge(Je(e))??ge(Je(e.placeholderContainer))??ge(Je(e.accompanyingContainer))??ge(D(e.thumbnail)[0]):null}async function is(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;try{const o=await ac(t.service,{request:n}),r=typeof t.region=="string"?sm(t.region,o):t.region;return r===null?t.fallback:rm(o,e,r)??t.fallback}catch{return t.fallback}}const Hv=Object.freeze(Object.defineProperty({__proto__:null,imageSource:ge,resolveThumbnail:is,stillSource:im,thumbnailSource:ss},Symbol.toStringTag,{value:"Module"})),Ki='.clover-items-item[role="option"], .clover-items-link',Ge=new Map;let Rt=null,Gt=null,Mr=0;function as(t){const e=Ge.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 Tr(){cancelAnimationFrame(Mr),Mr=requestAnimationFrame(()=>Ge.forEach((t,e)=>as(e)))}function Ic(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,Ki);n&&e.add(n);try{document.querySelectorAll(`:is(${Ki}):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=>nc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function am(){var t,e;Rt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>as(o.target))),Gt=typeof MutationObserver>"u"?null:new MutationObserver(Tr),Gt==null||Gt.observe(document.head,{childList:true,subtree:true,characterData:true}),Gt==null||Gt.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Tr),document.addEventListener("keydown",Ic,true)}function cm(){var t,e,n;cancelAnimationFrame(Mr),(t=Rt==null?void 0:Rt.disconnect)==null||t.call(Rt),Gt==null||Gt.disconnect(),Rt=Gt=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Tr),document.removeEventListener("keydown",Ic,true)}function lm(t,e){var n;return Ge.size||am(),Ge.set(t,{change:e}),(n=Rt==null?void 0:Rt.observe)==null||n.call(Rt,t),as(t),()=>{var o;Ge.delete(t),(o=Rt==null?void 0:Rt.unobserve)==null||o.call(Rt,t),Ge.size||cm()}}const um=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function Pc(t,e){if(typeof t!="string")return null;const n=um.exec(t.trim());if(!n)return null;const[o,r,s,i=0,a=0,c=0]=n.slice(1,7).map(d=>d===void 0?void 0:Number(d)),l=new Date(Date.UTC(2e3,r-1,s,i,a,c));if(l.setUTCFullYear(o),l.getUTCMonth()!==r-1||l.getUTCDate()!==s)return null;const u=!i&&!a&&!c&&!Number(n[7]??0);return{at:l,precision:e??(u?s!==1?"day":r!==1?"month":"year":"time")}}const dm=pt(()=>import("./NavDate-BnfDG57h.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function fm(t,e,n,o){const r=t.source!==void 0?t.source:ss(t.resource),[s,i]=z(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 is(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const hm=()=>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 pm({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=z(null),a=pc(s,hc,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=fm(t,e,n,a),[u,d]=z(false),{width:h,height:p}=t.resource??{},m=h&&p?h/p:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":u,"data-empty":c?void 0:true,style:c&&!(h&&p)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&In(t.media)&&f(hm,{}),c&&f("img",{src:c,alt:o,...dt(o?r:void 0),width:e,height:Math.round(e/m),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>d(true),onError:()=>d(true)}),t.duration?f("span",{className:"clover-items-duration",children:Tf(t.duration)}):null]})}function mm({text:t,lang:e,first:n}){const o=R(null),[r,s]=z(false);return F(()=>{const i=o.current;if(!(!i||!t))return lm(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 gm({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary"}){var u,d;const i=t.parts.map(h=>yt(t.parts.length===1?t.label:h.label,n)),a=r&&s==="summary"?yt(t.summary,n):null,c=r&&s==="navDate"?Pc(t.navDate):null,l=i.some(h=>h.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(d=(u=t.parts[0])==null?void 0:u.media)==null?void 0:d.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,p)=>{const m=i[p].text?{text:""}:yt(h.label,n);return f(pm,{part:h,size:e,request:o,alt:m.text,altLang:m.lang},h.id)})}),(l||c||(a==null?void 0:a.text))&&f("figcaption",{className:"clover-items-caption",children:[i.map((h,p)=>f(mm,{text:h.text,lang:h.lang,first:p===0},t.parts[p].id)),c&&f(_t,{fallback:null,children:f(dm,{value:t.navDate,className:"clover-items-date"})}),(a==null?void 0:a.text)&&f("span",{className:"clover-items-summary",...dt(a.lang),children:a.text.replace(/<[^>]*>/g,"")})]})]})}function vm(t){var e;return(e=Xr(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function Lc(t){const e=vm(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 Zi=new WeakMap;function Ac(t){if(!t)return[];let e=Zi.get(t);if(!e){const{canvases:n,views:o}=At(t);e=o.map(r=>{const s=r.map(i=>Lc(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>yt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),Zi.set(t,e)}return e}const Gi=new WeakMap;function ho(t){if(!t)return[];let e=Gi.get(t);return e||(e=D(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[Lc(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=D(n.homepage)[0])==null?void 0:o.id)??n.id,...Sn(D(n.homepage)[0])?{hrefLang:Sn(D(n.homepage)[0])}:{}}}),Gi.set(t,e)),e}function Wv(t){return t?Array.isArray(t)?ho({items:t}):t.type==="Collection"?ho(t):Ac(t):[]}function Oc(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const cs=(t,e="p")=>Oc(t)??e;function Nc(t,e,n="p"){const o=Oc(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function ym(t,e,{orientation:n="both",rtl:o=false,onActivate:r,onMove:s}={}){const[i,a]=z(Math.max(0,e)),c=R([]),l=R(r);l.current=r;const u=R(s);u.current=s,F(()=>{e>=0&&a(e)},[e]);const d=Math.min(i,Math.max(0,t-1)),h=ut(g=>{var w;a(g),(w=c.current[g])==null||w.focus()},[]),p=ut((g,w)=>{var I,O;const v=o?"ArrowLeft":"ArrowRight",b=o?"ArrowRight":"ArrowLeft",_=n!=="vertical",k=n!=="horizontal";let x=null;if(_&&g.key===v||k&&g.key==="ArrowDown")x=Math.min(t-1,w+1);else if(_&&g.key===b||k&&g.key==="ArrowUp")x=Math.max(0,w-1);else if(g.key==="Home")x=0;else if(g.key==="End")x=t-1;else if(g.key==="Enter"||g.key===" "){(I=l.current)==null||I.call(l,w,g),g.preventDefault();return}x!==null&&(g.preventDefault(),h(x),x!==w&&((O=u.current)==null||O.call(u,x,g)))},[t,n,o,h]);return{focused:d,itemProps:g=>({ref:w=>{c.current[g]=w},tabIndex:g===d?0:-1,onKeyDown:w=>p(w,g),onFocus:()=>a(g)})}}const bm=5,_m=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function Rc({align:t="start",dragFree:e=false,itemCount:n=0}={}){const[o,r]=z(null),[s,i]=z(false),[a,c]=z(false),l=R(t);l.current=t;const u=e?"none":"x mandatory",d=ut(()=>{if(!o)return;const v=Math.abs(o.scrollLeft),b=o.scrollWidth-o.clientWidth;i(v>1),c(v<b-1)},[o]);F(()=>{if(!o)return;const v=o.style;v.overflowX="auto",v.overflowY="hidden",v.scrollSnapType=u,v.setProperty("--clover-track-align",t),v.overscrollBehaviorX="contain"},[o,u,t]),F(()=>{if(!o)return;let v=0;const b=()=>{cancelAnimationFrame(v),v=requestAnimationFrame(d)};d(),o.addEventListener("scroll",b,{passive:true});const _=typeof ResizeObserver<"u"?new ResizeObserver(b):null;return _==null||_.observe(o),o.firstElementChild&&(_==null||_.observe(o.firstElementChild)),()=>{cancelAnimationFrame(v),o.removeEventListener("scroll",b),_==null||_.disconnect()}},[o,d,n]);const h=ut((v,b=false)=>{if(!o||!v)return;const _=b||_m()?"auto":"smooth";o.scrollBy({left:v,behavior:_})},[o]),p=ut((v,{instant:b=false}={})=>{const _=o==null?void 0:o.querySelector(`[data-track-index="${v}"]`);if(!o||!_)return false;const k=o.getBoundingClientRect(),x=_.getBoundingClientRect(),I=getComputedStyle(o).direction==="rtl";return h(l.current==="center"?x.left+x.width/2-(k.left+k.width/2):I?x.right-k.right:x.left-k.left,b),true},[o,h]),m=ut(v=>{if(!o)return;const b=getComputedStyle(o).direction==="rtl";h(v*o.clientWidth*.9*(b?-1:1))},[o,h]),g=ut(()=>m(1),[m]),w=ut(()=>m(-1),[m]);return F(()=>{if(!o)return;let v=null,b=false;const _=O=>{O.pointerType!=="mouse"||O.button!==0||(v={x:O.clientX,scroll:o.scrollLeft},b=false)},k=O=>{var Y;if(!v)return;const H=O.clientX-v.x;!b&&Math.abs(H)<bm||(b||(b=true,(Y=o.setPointerCapture)==null||Y.call(o,O.pointerId),o.style.scrollSnapType="none",o.dataset.dragging="true"),o.scrollLeft=v.scroll-H)},x=O=>{var H;v&&(v=null,b&&((H=o.releasePointerCapture)==null||H.call(o,O.pointerId),delete o.dataset.dragging,o.style.scrollSnapType=u))},I=O=>{b&&(b=false,O.preventDefault(),O.stopPropagation())};return o.addEventListener("pointerdown",_),o.addEventListener("pointermove",k),o.addEventListener("pointerup",x),o.addEventListener("pointercancel",x),o.addEventListener("click",I,true),()=>{o.removeEventListener("pointerdown",_),o.removeEventListener("pointermove",k),o.removeEventListener("pointerup",x),o.removeEventListener("pointercancel",x),o.removeEventListener("click",I,true)}},[o,u]),{ref:r,canScrollPrev:s,canScrollNext:a,scrollPrev:w,scrollNext:g,scrollToIndex:p,measure:d}}const po=te(function(e,n){return!Ee()||e.iiifContent!==void 0||e.items!==void 0?f(_t,{fallback:null,children:f(wm,{...e,forwardedRef:n})}):f(xm,{...e,forwardedRef:n})}),wm=pt(()=>import("./StandaloneItems-BfvBxbUm.mjs"));function xm({of:t="views",...e}){return t==="targets"?f(km,{...e}):t==="annotations"?f(Em,{...e}):t==="members"?f(Bc,{...e}):f(Mm,{...e})}const Sm=pt(()=>import("./TargetItems-BebPFr-c.mjs"));function km(t){return ot(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(_t,{fallback:null,children:f(Sm,{...t})}):null}const Cm=pt(()=>import("./AnnotationItems-DtsnDXPM.mjs"));function Em(t){return ot(n=>!!ja(n.manifest,n.addedSets))?f(_t,{fallback:null,children:f(Cm,{...t})}):null}function Bc({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Ee(),s=ot(u=>u.collection),i=ot(u=>{var d;return((d=u.manifest)==null?void 0:d.id)??null}),a=ho(s),c=Wr(s==null?void 0:s.viewingDirection);if(!a.length)return null;const l=(u,d)=>{t==null||t(u,d),o.goToManifest(u.id)};if(n.layout==="pager"){const u=a.findIndex(d=>d.id===i);return f(Fc,{...n,forwardedRef:e,steps:$c(a,u,c,l),nameKey:"informationPanelTabsCollection",position:f(Im,{position:u,total:a.length,list:d=>f(Bc,{layout:"list",forwardedRef:null,onSelect:d})})})}return f(Dc,{...n,forwardedRef:e,items:a,selected:a.findIndex(u=>u.id===i),navigation:"id",rtl:c==="right-to-left",language:r,request:o.request,showSummary:true,onActivate:l})}function Mm({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Ee(),i=ot(d=>d.manifest),a=ot(d=>Pn(d.manifest,d.canvasId)),c=ot(d=>At(d.manifest).direction),l=Ac(i);if(l.length<(n?1:2))return null;const u=d=>r.goTo(d.id);return o.layout==="pager"?f(Fc,{...o,forwardedRef:e,steps:$c(l,a,c,u)}):f(Dc,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",language:s,request:r.request,onActivate:(d,h)=>{t==null||t(d,h),r.goTo(d.id)},followFocus:u})}function $c(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 Tm=pt(()=>import("./PagerLayout-C8jraHqs.mjs")),Im=pt(()=>import("./PagerLayout-C8jraHqs.mjs").then(({CountMenu:t})=>({default:t})));function Fc(t){return f(_t,{fallback:null,children:f(Tm,{...t})})}function Dc({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,layout:s="slider",thumbnailSize:i=200,request:a,language:c,showSummary:l=false,secondary:u="summary",heading:d,headingLevel:h=2,renderItem:p,onActivate:m,followFocus:g,as:w="section",className:v,"aria-label":b,size:_,singleItem:k,highContrast:x,...I}){var Lt;const{t:O}=Pt(),H=le(),Y=vo(t,I.lang),{langOf:it}=Y,G=Fr(x),J=s==="slider",C=o==="id",S=R(null),N=s==="masonry";F(()=>{const U=S.current;if(!N||!U)return;let rt,tt=true;return import("../masonry-0QfzOgbB.mjs").then(({attachMasonry:wt})=>{tt&&(rt=wt(U))}),()=>{tt=false,rt==null||rt()}},[N]);const j=Rc({align:C?"center":"start",itemCount:e.length}),K=R(void 0);F(()=>()=>window.clearTimeout(K.current),[]);const Z=ym(e.length,n,{orientation:s==="slider"?"horizontal":s==="list"?"vertical":"both",rtl:r,onActivate:(U,rt)=>m(e[U],rt),onMove:g?(U,rt)=>{window.clearTimeout(K.current);const tt=()=>g(e[U]);rt.repeat?K.current=window.setTimeout(tt,150):tt()}:void 0}),Q=R(null),xt=R(false);xt.current=!!((Lt=Q.current)!=null&&Lt.contains(Q.current.ownerDocument.activeElement)),F(()=>{var wt;const U=Q.current;if(!U||!xt.current)return;const{activeElement:rt,body:tt}=U.ownerDocument;rt&&rt!==tt||(wt=U.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||wt.focus()},[e]);const at=R(false);F(()=>{var tt;if(n<0)return;const U=!at.current;if(J){j.scrollToIndex(n,{instant:U})&&(at.current=true);return}at.current=true;const rt=(tt=Q.current)==null?void 0:tt.querySelector(`[data-track-index="${n}"]`);rt&&Pm(rt,U)},[J,n,j.scrollToIndex]);const ct=cs(h),y=d?yt(d.label,c):null,E=d?yt(d.summary,c):null,L=b===void 0&&!!(y!=null&&y.text),$=wo(O("itemsLabel"),it("itemsLabel"),b!==void 0||L,Y.hostLanguage),A=L?{"aria-labelledby":`${H}-title`}:b!==void 0?{"aria-label":b}:$.props,M=(U,rt)=>p?p(U,{selected:rt}):f(gm,{item:U,size:i,language:c,request:a,showSummary:l,secondary:u}),W=U=>!(p||yt(U.label,c).text||l&&u==="summary"&&yt(U.summary,c).text),X=(U,rt)=>W(U)?O("canvasPosition",{index:rt+1,total:e.length}):void 0,Ct=U=>W(U)?it("canvasPosition"):void 0,nt=J?{display:"flex",margin:0,padding:0,listStyle:"none"}:void 0,gt=J?{flex:"0 0 auto",scrollSnapAlign:C?"center":"start"}:void 0,ht=C&&n>=0,Ht=U=>{const rt=n+(U==="prev"?-1:1),tt=ht?rt>=0&&rt<e.length:U==="prev"?j.canScrollPrev:j.canScrollNext,wt=ht?U==="prev"?"commonPrevious":"commonNext":U==="prev"?"itemsScrollBack":"itemsScrollForward",Bt=O(wt),ee=be=>{if(!tt)return;if(!ht)return(U==="prev"?j.scrollPrev:j.scrollNext)();const B=e[rt];g?g(B):m(B,be)};return f("button",{type:"button",className:`clover-items-scroll-${U}`,"aria-controls":ht?void 0:`${H}-viewport`,...dt(it(wt)),"aria-disabled":!tt||void 0,tabIndex:tt?void 0:-1,onClick:ee,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:U==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:en,children:Bt}),f($e,{label:Bt})]})};return f(Mn.Provider,{value:Y.hostLanguage,children:f(w,{ref:Y.ref,className:Tt("clover-items",v),"data-layout":s,"data-navigation":o,...Dr(G),...I,children:[d&&((y==null?void 0:y.text)||(E==null?void 0:E.text))&&f("header",{className:"clover-items-header",children:[(y==null?void 0:y.text)&&f(ct,{className:"clover-items-title clover-title",id:`${H}-title`,...dt(y.lang),children:y.text}),(E==null?void 0:E.text)&&f("p",{className:"clover-items-description",...dt(E.lang),children:E.text.replace(/<[^>]*>/g,"")}),d.homepage&&f("a",{className:"clover-items-homepage",href:d.homepage,hrefLang:d.homepageLang,...dt(it("commonViewAll")),children:O("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[J&&Ht("prev"),f("div",{id:`${H}-viewport`,className:"clover-items-viewport",ref:J?j.ref:S,children:C?f("div",{ref:Q,role:"listbox",...A,"aria-orientation":J?"horizontal":"vertical",className:"clover-items-track",style:nt,children:e.map((U,rt)=>{const tt=rt===n;return f("div",{id:`${H}-${rt}`,role:"option","aria-selected":tt,"aria-label":X(U,rt),...dt(Ct(U)),className:"clover-items-item","data-track-index":rt,style:gt,...Z.itemProps(rt),onClick:wt=>m(U,wt),children:M(U,tt)},U.id)})}):f("ul",{...A,className:"clover-items-track",style:nt,children:e.map((U,rt)=>f("li",{className:"clover-items-item","data-track-index":rt,style:gt,children:f("a",{className:"clover-items-link",href:U.href,hrefLang:U.hrefLang,"aria-label":X(U,rt),...dt(Ct(U)),draggable:false,onClick:tt=>m(U,tt),children:M(U,false)})},U.id))})}),J&&Ht("next")]}),$.node]})})}function Pm(t,e){var i;let n=t.parentElement;for(;n&&n!==document.body;){const{overflowY:a}=getComputedStyle(n);if(/(auto|scroll)/.test(a)&&n.scrollHeight>n.clientHeight)break;n=n.parentElement}if(!n||n===document.body)return;const o=n.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top<o.top?r.top-o.top:r.bottom>o.bottom?r.bottom-o.bottom:0;s&&((i=n.scrollBy)==null||i.call(n,{top:s,behavior:e?"auto":"smooth"}))}function Lm(t,e){const{clover:n}=ce(e),o=Ah(),{direction:r}=_c(),s=ot(l=>l.collection),i=ot(l=>{var u;return((u=l.manifest)==null?void 0:u.id)??null}),a=ot(l=>{var u;return((u=l.targets)==null?void 0:u.items.length)??0}),c=ot(l=>Uu(l.targets,l.targetIndex,l.manifest,l.canvasId));if(t==="targets")return{position:c,total:a,direction:"left-to-right",step:l=>{const u=c+l;u>=0&&u<a&&n.goToTarget(u)}};if(t==="members"){const l=ho(s),u=l.findIndex(d=>d.id===i);return{position:u,total:l.length,direction:"left-to-right",step:d=>{const h=l[u+d];h&&n.goToManifest(h.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Am=te(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Pt(),{position:c,total:l}=e;if(l<2||c<0)return null;const u=c+1;return f(n,{ref:s,className:Tt("clover-pager-position",o),...r,children:[f("span",{"aria-hidden":"true",children:[u," / ",l]}),f("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]}),f("span",{style:en,...dt(a("canvasPosition")),children:i("canvasPosition",{index:u,total:l})})]})}),Om=te(function({of:e="views",...n},o){const r=Lm(e,"Position");return f(Am,{ref:o,...n,steps:r})});function Nm({className:t,loading:e,error:n}){const{t:o,langOf:r}=Pt(),{status:s,error:i}=Ih(),a=s==="loading",c=e!==void 0&&e!==false;return f(kt,{children:[f("p",{className:Tt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:en,children:[a&&(c?e:e===void 0&&f(_n,{})),a&&!c&&f("span",{style:en,...dt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Tt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(kt,{children:[f("p",{...dt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function Rm(t,e=false,n=3){const o=e||em(t),r=e?`${n}
28
+ ${t}`:t,[s,i]=z(null);return F(()=>{if(!o)return;let a=true;return Promise.all([import("../sanitize-qIOeyIww.mjs"),e?import("../markdown-CCYJwzFn.mjs"):null]).then(([{sanitizeHTML:c},l])=>{const u=l?l.markdownToHtml(t,{headingLevel:n}):t;a&&i({for:r,html:c(u,{markdown:!!l})})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s.html:null}const Bm=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),zc=te(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=yt(n,o),u=dt(l),d=nm(r,c),h=d==="markdown",p=Rm(d==="plain"?"":c,h,s);if(!c)return null;if(d==="plain")return f(e,{ref:a,...i,...u,children:c.split(/\r?\n/).map((g,w)=>f(re.Fragment,{children:[w>0&&f("br",{}),g]},w))});const m=typeof e=="string"&&Bm.has(e)&&p&&/<(p|ul|ol|div)[\s>]/i.test(p)?"div":e;return p!==null?f(m,{ref:a,...i,...u,dangerouslySetInnerHTML:{__html:p}}):f(e,{ref:a,...i,...u,children:h?om(c):An(c)})}),Hc=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=yt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":yt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...dt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(zc,{as:"dd",markup:r.value,language:e})]},s)})}):null,$m=typeof window>"u"?F:Dt;function Fm({children:t}){const{t:e}=Pt(),n=vo(),o=R(null),r=le(),s=re.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=Dm(o);return f("div",{className:"clover-read-more",children:[re.cloneElement(s,{ref:o,id:i,"data-read-more":a?"open":""}),(c||a)&&f("button",{type:"button",className:"clover-read-more-button","aria-expanded":a,"aria-controls":i,onClick:l,ref:n.ref,...dt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function Dm(t){const[e,n]=z(false),[o,r]=z(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return $m(s),F(()=>{var d,h;const i=t.current;if(!i)return;let a=0;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(s)},l=typeof ResizeObserver>"u"?null:new ResizeObserver(c);l==null||l.observe(i);const u=typeof MutationObserver>"u"?null:new MutationObserver(c);return u==null||u.observe(document.head,{childList:true,subtree:true,characterData:true}),u==null||u.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),u==null||u.observe(i,{attributes:true,attributeFilter:["style"]}),(h=(d=document.fonts)==null?void 0:d.addEventListener)==null||h.call(d,"loadingdone",c),()=>{var p,m;cancelAnimationFrame(a),l==null||l.disconnect(),u==null||u.disconnect(),(m=(p=document.fonts)==null?void 0:p.removeEventListener)==null||m.call(p,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function an(t,e,n){const o=rs(),r=Tn(s=>{var i;return(i=ko(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const On=()=>{var t;return(t=Ee())==null?void 0:t.language};function Xi({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=an(t,"summary",n),i=On();return yt(s,i).text?f(Fm,{children:f(zc,{as:e,markup:s,language:i,className:Tt("clover-summary",o),...r})}):null}function zm({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=an(t,"metadata",e),i=On();return f(Hc,{metadata:s,language:i,renderValue:o,className:Tt("clover-metadata",n),...r})}function Hm({of:t="manifest",value:e,className:n,...o}){const r=an(t,"requiredStatement",e),s=On();return f(Hc,{metadata:r?[r]:null,language:s,className:Tt("clover-required-statement",n),...o})}function Wm({of:t="manifest",value:e,className:n,...o}){const r=an(t,"rights",e);return r?f("a",{href:r,className:Tt("clover-rights",n),...o,children:r}):null}function Um({of:t="manifest",value:e,className:n,...o}){const r=an(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Tt("clover-id",n),...o,children:r}):null}function Wc({property:t,className:e,of:n="manifest",value:o,...r}){const s=D(an(n,t,o)),i=On(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=yt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:Sn(c),...dt(l.text?l.lang:void 0),children:l.text?An(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const jm=({className:t,...e})=>f(Wc,{property:"homepage",className:Tt("clover-homepage",t),...e}),Vm=({className:t,...e})=>f(Wc,{property:"seeAlso",className:Tt("clover-see-also",t),...e});function qm({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=Tn(g=>ko(g,t),null),i=e??s,a=On(),c=i?ss(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[u,d]=z(c==null?void 0:c.src),h=(m=Ee())==null?void 0:m.clover.request;if(F(()=>{if(!c)return d(void 0);if(c.src)return d(c.src);let g=true;return is(c,n,h).then(w=>g&&d(w)),()=>{g=false}},[l,n]),!u)return null;const p=yt(i==null?void 0:i.label,a);return f("img",{src:u,alt:An(p.text),...dt(r.alt===void 0&&p.text?p.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Tt("clover-thumbnail",o),...r})}const Km=typeof window>"u"?F:Dt,Uc=ae(null),Zm=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},Gm=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>D(t[e]).length>0),Ir=t=>!!t&&typeof t.id=="string",Xm=t=>{const e=D(t.homepage).find(Ir);return e?{id:e.id,hrefLang:Sn(e)}:void 0},Ym=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=D(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=yt(o,e);if(r.text)return{text:An(r.text),lang:r.lang}}return null};function jc({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=Tn(u=>{var d;return(d=ko(u,t))==null?void 0:d.provider},void 0),a=(l=Ee())==null?void 0:l.language,c=D(e!==void 0?e:i).filter(Gm);return c.length?f("ul",{className:Tt("clover-provider",r),...s,children:c.map((u,d)=>{const h=n?Xm(u):void 0,p=!!yt(u.label,a).text;return f(Jm,{agent:u,homepage:h,children:o??f(kt,{children:[f(Vc,{alt:p?"":void 0}),f(Ye,{className:"clover-provider-label"})]})},u.id??d)})}):null}function Jm({agent:t,homepage:e,children:n}){const o=R(null),[r,s]=z(null),i=ut(()=>{o.current&&!Zm(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(Tc.Provider,{value:t,children:f(Uc.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 Vc({of:t="manifest",value:e,alt:n,className:o,...r}){var h;const{t:s,langOf:i}=Pt(),a=rs(),c=Tn(p=>{var m;return(m=ko(p,t))==null?void 0:m.provider},void 0),l=(h=Ee())==null?void 0:h.language,d=(e!==void 0?D(e):a?[a]:D(c)).flatMap(p=>{if(!p||typeof p!="object")return[];const m=p;if(m.type!=="Agent"&&Ir(m)&&!m.logo)return[{image:m,agent:null}];const g=D(m.logo).find(Ir);return g?[{image:g,agent:m}]:[]});return d.length?f(kt,{children:d.map(({image:p,agent:m},g)=>{const w=Ym(m,l);return f(Qm,{src:p.id,alt:n??(w==null?void 0:w.text)??s("logo"),...dt(n!==void 0?void 0:w?w.lang:i("logo")),width:p.width,height:p.height,loading:"lazy",decoding:"async",className:Tt("clover-logo",o),...r},`${p.id}-${g}`)})}):null}function Qm({alt:t,onError:e,...n}){const o=zt(Uc),[r,s]=z(false),i=ut(()=>s(true),[]);Km(()=>{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})}function tg(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=Na(t,e);return o==="none"?t[0]:o}const eg=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&yt({[e]:t[e]}).text):[];function ng(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(eg).filter(r=>r.length>1);return[...new Set(o.flat())]}function qc(){const{language:t,chooseLanguage:e}=ce("About"),n=ot(s=>s.manifest),o=mt(()=>ng(n),[n]),r=tg(o,t);return r&&e?{languages:o,chosen:r,onChange:e}:null}const og=pt(()=>import("./LanguageChoice-CRqsCBAp.mjs").then(t=>({default:t.LanguageChoice}))),Kc=ae(false);function rg({part:t}){const e=qc();return e?f(_t,{fallback:null,children:f(og,{...e,nameKey:"readingLanguage",part:t})}):null}function Yi(t,e){const n=new Set,o=[];for(const r of t)for(const s of D(r==null?void 0:r.rendering)){const i=(s==null?void 0:s.id)??(s==null?void 0:s["@id"]);if(typeof i!="string"||n.has(i))continue;n.add(i);const a=yt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:Sn(s)})}return o}function Zc(){const{language:t}=ce("Download"),e=ot(o=>o.manifest),n=ot(o=>Ne(o.manifest,o.canvasId));return{page:Yi(n,t),all:Yi([e],t)}}const sg=pt(()=>import("./Download-MO-1Rik4.mjs").then(({DownloadGroups:t})=>({default:t}))),ig=pt(()=>import("./NavDate-BnfDG57h.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),ag=pt(()=>import("./PartOfManifest-DX7H0V4g.mjs"));function cg({languages:t=true,...e}){const n=zt(Kc);return f(lg,{...e,download:!n&&e.download!==false,choice:n||!t?null:f(rg,{part:"clover-about"})})}function lg({choice:t,canvasSummary:e=false,headingLevel:n=3,download:o=true,thumbnail:r=true,label:s=true,className:i,...a}){const{t:c,langOf:l}=Pt(),u=Zc(),d=ot(v=>v.manifest,Object.is,"About"),h=R(null);F(()=>{const v=h.current,b=v==null?void 0:v.querySelector(".clover-about-head");if(!v||!b||typeof ResizeObserver>"u")return;const _=new Set,k=()=>{const O=b.querySelector(".clover-about-thumbnail"),H=b.querySelector(".clover-about-label");for(const J of[O,H])J&&!_.has(J)&&(_.add(J),I.observe(J));const Y=v.style;if(!O){Y.removeProperty("--clover-about-label-height"),Y.removeProperty("--clover-about-thumbnail-width");return}const it=`${(H==null?void 0:H.offsetHeight)??0}px`,G=`${O.offsetWidth}px`;Y.getPropertyValue("--clover-about-label-height")!==it&&Y.setProperty("--clover-about-label-height",it),Y.getPropertyValue("--clover-about-thumbnail-width")!==G&&Y.setProperty("--clover-about-thumbnail-width",G)};let x=0;const I=new ResizeObserver(()=>{cancelAnimationFrame(x),x=requestAnimationFrame(k)});return I.observe(b),k(),()=>{cancelAnimationFrame(x),I.disconnect(),v.style.removeProperty("--clover-about-label-height"),v.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,d]);const p=le(),m=()=>{var _,k;const v=h.current;(k=((_=v==null?void 0:v.closest(".clover-sections-item"))==null?void 0:_.querySelector(".clover-sections-button"))??v)==null||k.focus({preventScroll:true})};if(!d)return null;const g=(v,b,_)=>{if(!b)return null;const{as:k,title:x,group:I}=Nc(n,`${p}-${v}`);return f("section",{className:"clover-about-section",...I,children:[f(k,{className:"clover-about-heading",...dt(l(v)),...x,children:c(v)}),_]})},w=v=>Array.isArray(d[v])?d[v].length>0:!!d[v];return f("div",{ref:h,className:Tt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(qm,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(Ye,{as:cs(n),className:"clover-about-label clover-title"})]}),e&&f(Xi,{of:"canvas",className:"clover-about-summary"}),gi(d)&&d.partOf&&f(_t,{fallback:null,children:f(ag,{manifest:d,headingLevel:n,onOpened:m})}),f(Xi,{className:"clover-about-summary"}),f(zm,{className:"clover-about-metadata"}),f(Hm,{className:"clover-about-metadata"}),g("aboutDate",Pc(d.navDate),f(_t,{fallback:null,children:f(ig,{value:d.navDate,className:"clover-about-date"})})),g("aboutProvider",w("provider"),f(jc,{})),g("aboutRights",d.rights,f(Wm,{})),g("aboutHomepage",w("homepage"),f(jm,{})),g("aboutSeeAlso",w("seeAlso"),f(Vm,{})),g("download",o&&u.page.length+u.all.length>0,f(_t,{fallback:null,children:f(sg,{page:u.page,all:u.all,headingLevel:n+1})})),g(gi(d)?"aboutCanvas":"aboutManifest",d.id,f(Um,{}))]})}const ug=pt(()=>import("./LanguageChoice-CRqsCBAp.mjs").then(t=>({default:t.LanguageChoice}))),dg=pt(()=>import("./ControlMenu-TcO85hDf.mjs")),fg=pt(()=>import("./Download-MO-1Rik4.mjs").then(({DownloadGroups:t})=>({default:t})));function hg({languages:t=true,download:e=true}){const n=qc(),{page:o,all:r}=Zc(),s=e&&o.length+r.length>0;return!(t&&n)&&!s?null:f("div",{className:"clover-about-actions",children:[s&&f(pg,{page:o,all:r}),t&&n&&f(_t,{fallback:null,children:f(ug,{...n,nameKey:"readingLanguage",part:"clover-about"})})]})}function pg({page:t,all:e}){const{t:n,langOf:o}=Pt(),[r,s]=z(false),a=`${le()}-download`,c=ut(l=>{var u;s(false),l&&((u=document.getElementById(a))==null||u.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const u=l.relatedTarget;r&&u&&!l.currentTarget.contains(u)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...dt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(mg,{}),f($e,{label:n("download")})]}),r&&f(_t,{fallback:null,children:f(dg,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(fg,{page:t,all:e,inPopover:true})})})]})}function mg(){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 gg(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of At(t).canvases){if(n.navPlace)return true;for(const o of D(n.annotations))for(const r of D(o==null?void 0:o.items))if(r!=null&&r.navPlace||D(r==null?void 0:r.motivation).includes("georeferencing")||D(r==null?void 0:r.body).some(i=>(i==null?void 0:i.type)==="Feature"||(i==null?void 0:i.type)==="FeatureCollection"))return true}return false}function vg({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Tt("clover-chevron",e),"data-open":t||void 0,children:f("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Gc=typeof window>"u"?F:Dt,Xc=ae(null);function Uv(){return zt(Xc)}const Yc=ae(0);function jv(){return zt(Yc)}function yg({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var J;const a=le(),c=wo(r??"",s,r===void 0),l=R([]),u=e==="tabs",{t:d,langOf:h}=Pt(),p=Rc({dragFree:true,itemCount:t.length}),m=t.some(C=>C.value===n)?n:((J=t[0])==null?void 0:J.value)??null,g=R(new Set);m&&g.current.add(m);const w=R(null),[v,b]=z({value:null,count:0});F(()=>{var Z;if(u||!m||w.current!==m)return;w.current=null;const C=t.findIndex(Q=>Q.value===m),S=document.getElementById(`${a}-panel-${C}`),N=(Z=l.current[C])==null?void 0:Z.parentElement;if(!S||!N)return;const j=N.getBoundingClientRect().bottom-S.getBoundingClientRect().top;if(j<=0)return;const K=sr(S);K&&(K.scrollTop-=j)},[m,u,t,a]);const _=C=>{var ct,y,E,L;const S=t.findIndex($=>$.value===m),N=document.getElementById(`${a}-panel-${S}`),j=C.target;if(!N||j===N||!N.contains(j)||!_g(j))return;const K=(y=(ct=l.current[S])==null?void 0:ct.parentElement)==null?void 0:y.getBoundingClientRect(),Z=S+1<t.length?(L=(E=l.current[S+1])==null?void 0:E.parentElement)==null?void 0:L.getBoundingClientRect():void 0;if(!K)return;const Q=j.getBoundingClientRect(),xt=Q.top<K.bottom?Math.floor(Q.top-K.bottom):Z&&Q.bottom>Z.top?Math.ceil(Math.min(Q.bottom-Z.top,Q.top-K.bottom)):0,at=xt?sr(N):null;at&&(at.scrollTop+=xt)},k=R(null),x=t.map(C=>C.value).join(`
29
+ `);Gc(()=>{const C=k.current;if(u||!C||typeof ResizeObserver>"u")return;const S=[...C.querySelectorAll(":scope > .clover-sections-item")],N=S.map(A=>A.firstElementChild),j=N[0],K=N[N.length-1],Z=new Map,Q=A=>(A&&Z.get(A))??0,xt=document.scrollingElement;let at=null,ct=0;const y=()=>{const A=N.reduce((gt,ht)=>gt+Q(ht),0);let M=0;S.forEach((gt,ht)=>{gt.style.setProperty("--clover-sections-before",`${M}px`),M+=Q(N[ht]),gt.style.setProperty("--clover-sections-after",`${A-M}px`)}),C.style.setProperty("--clover-sections-total",`${A}px`);const W=j&&getComputedStyle(j);(W==null?void 0:W.position)==="sticky"&&K&&(ct=parseFloat(W.top)+parseFloat(getComputedStyle(K).bottom)||0);const X=getComputedStyle(C),Ct=parseFloat(X.lineHeight)||1.2*parseFloat(X.fontSize),nt=(at==null?void 0:at.clientHeight)??0;nt>0&&nt-ct-A<2*Ct?C.dataset.stacks="off":delete C.dataset.stacks},E=new ResizeObserver(A=>{var M,W;for(const X of A)N.includes(X.target)&&Z.set(X.target,((W=(M=X.borderBoxSize)==null?void 0:M[0])==null?void 0:W.blockSize)??X.target.getBoundingClientRect().height);y()}),L=()=>{const A=sr(C);A!==at&&(at&&at!==xt&&E.unobserve(at),A&&A!==xt&&E.observe(A),at=A)},$=()=>{L(),y()};L();for(const A of N)A&&E.observe(A,{box:"border-box"});return window.addEventListener("resize",$),()=>{E.disconnect(),window.removeEventListener("resize",$);for(const A of S)A.style.removeProperty("--clover-sections-before"),A.style.removeProperty("--clover-sections-after");C.style.removeProperty("--clover-sections-total"),delete C.dataset.stacks}},[u,x,i]),F(()=>{if(u)return;const C=l.current.map(N=>N==null?void 0:N.parentElement).filter(N=>!!N),S=N=>{var Q;if(N.ctrlKey)return;const j=N.currentTarget,K=Ji(j);if(!K||K===document.scrollingElement)return;N.preventDefault();const Z=N.deltaMode===1?parseFloat(getComputedStyle(j).lineHeight)||16:N.deltaMode===2?K.clientHeight:1;(Q=Ji(K)??document.scrollingElement)==null||Q.scrollBy({left:N.deltaX*Z,top:N.deltaY*Z,behavior:"instant"})};for(const N of C)N.addEventListener("wheel",S,{passive:false});return()=>{for(const N of C)N.removeEventListener("wheel",S)}},[u,x]);const I=C=>{C!==m&&(w.current=C,u||b(S=>({value:C,count:S.count+1})),o==null||o(C))},O=(C,S)=>{var Q;const N=t.length-1,[j,K]=u?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],Z=C.key===K?(S+1)%t.length:C.key===j?(S-1+t.length)%t.length:C.key==="Home"?0:C.key==="End"?N:null;Z!==null&&(C.preventDefault(),(Q=l.current[Z])==null||Q.focus(),u&&I(t[Z].value))},H=R(false);F(()=>{if(!u)return;const C=t.findIndex(at=>at.value===m),S=l.current[C],N=S==null?void 0:S.parentElement;if(!S||!N)return;const j=getComputedStyle(N),K=N.getBoundingClientRect(),Z=S.getBoundingClientRect(),Q=K.left+(parseFloat(j.scrollPaddingLeft)||0),xt=K.right-(parseFloat(j.scrollPaddingRight)||0);(Z.left<Q-1||Z.right>xt+1)&&p.scrollToIndex(C,{instant:!H.current}),H.current=true},[m,u,t.length,p.scrollToIndex]);const Y=C=>{const S=C==="prev"?p.canScrollPrev:p.canScrollNext,N=C==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${C}`,"aria-hidden":"true",tabIndex:-1,hidden:!S,...dt(h(N)),onMouseDown:j=>j.preventDefault(),onClick:C==="prev"?p.scrollPrev:p.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:C==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f($e,{label:d(N)})]})},it=cs(i,"div"),G=(C,S)=>{const N=C.value===m;return f("button",{ref:j=>{l.current[S]=j},type:"button",id:`${a}-button-${S}`,className:"clover-sections-button","data-value":C.value,"data-track-index":u?S:void 0,"aria-controls":`${a}-panel-${S}`,...u?{role:"tab","aria-selected":N,tabIndex:N?0:-1}:{"aria-expanded":N,"aria-disabled":N||void 0},onClick:()=>I(C.value),onKeyDown:j=>O(j,S),children:[f("span",{className:"clover-sections-label",children:C.label}),!u&&f(vg,{open:N,className:"clover-sections-chevron"})]},C.value)};return f("div",{ref:k,className:"clover-sections","data-layout":e,onFocus:u?void 0:_,style:u?void 0:{"--clover-sections-count":t.length},children:[u&&f("div",{className:"clover-sections-tabs","data-more":[p.canScrollPrev&&"start",p.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:p.ref,...c.props,className:"clover-sections-list",children:t.map(G)}),Y("prev"),Y("next")]})}),u&&c.node,t.map((C,S)=>{const N=C.value===m;return f("section",{className:"clover-sections-item","data-value":C.value,"data-open":N,style:u?void 0:{"--clover-sections-index":S},children:[!u&&f(it,{className:"clover-sections-heading",children:[G(C,S),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(Yc.Provider,{value:v.value===C.value?v.count:0,children:f(bg,{id:`${a}-panel-${S}`,tabs:u,labelledBy:`${a}-button-${S}`,hidden:!N,actions:C.actions,children:g.current.has(C.value)?C.content:null})})]},C.value)})]})}function bg({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=z(null),c=!o||!!r;return Gc(()=>{const l=i==null?void 0:i.parentElement;if(!c||!i||!l||typeof ResizeObserver>"u")return;const u=new ResizeObserver(()=>{const d=i.offsetWidth;d?(l.style.setProperty("--clover-sections-actions",`${d}px`),l.setAttribute("data-actions","")):(l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions"))});return u.observe(i),()=>{u.disconnect(),l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions")}},[i,c]),f(kt,{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(Xc.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function sr(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 Ji(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 _g(t){try{return t.matches(":focus-visible")}catch{return true}}const wg=pt(()=>import("./MapView-DQSwUzd7.mjs").then(t=>({default:t.RootMap}))),xg=pt(()=>import("./Collection-m0GCcsfQ.mjs").then(t=>({default:t.Collection}))),Sg=pt(()=>import("./TargetItems-BebPFr-c.mjs").then(t=>({default:t.TargetsSection}))),kg=pt(()=>import("./Contents-CwDpfiJY.mjs").then(t=>({default:t.Contents}))),Cg=pt(()=>import("./Search-CsdYzdq1.mjs").then(t=>({default:t.Search}))),Eg=pt(()=>import("./Transcript-DXLv5WR9.mjs").then(t=>({default:t.Transcript}))),Mg=pt(()=>import("./Annotations-Cqn1TkzD.mjs").then(t=>({default:t.Annotations}))),Le=t=>f(_t,{fallback:null,children:t}),Tg=()=>null,Ig=te(function({layout:e="tabs",value:n,defaultValue:o,onValueChange:r,onClose:s,closeOnEscape:i=false,headingLevel:a=3,as:c="aside",download:l=true,languages:u=true,className:d,children:h,onKeyDown:p,...m},g){var A;const{clover:w}=ce("Panel"),v=R(null),{t:b,langOf:_}=Pt(),k=wo(b("informationPanelTabs"),_("informationPanelTabs"),!!(m["aria-label"]||m["aria-labelledby"])||!(["aside","section","nav"].includes(c)||m.role)),x=M=>{const W=_(M);return W?f("span",{...dt(W),children:b(M)}):b(M)},I=ot(M=>rd(M.manifest,M.addedSets).length>0),O=ot(M=>Ne(M.manifest,M.canvasId).some(W=>dc(W).length>0||Wf(W).length>0)),H=ot(M=>Mh(M.manifest).length>0),Y=ot(M=>!!Da(M.manifest)),it=ot(M=>gg(M.manifest,M.collection)),G=ot(M=>{var W;return(((W=M.targets)==null?void 0:W.items.length)??0)>1}),J=ot(M=>{var W,X;return(((X=(W=M.collection)==null?void 0:W.items)==null?void 0:X.length)??0)>0||!!Wu(M.manifest)}),C=re.Children.toArray(h).filter(M=>re.isValidElement(M)&&M.type===Tg),S=e==="accordion"?a+1:a,N=u||l?f(hg,{languages:u,download:l}):void 0,j=C.length?C.map(({props:M})=>({value:M.value,label:M.label,content:M.children,...M.value==="about"&&{actions:N}})):[{value:"about",label:x("informationPanelTabsAbout"),content:f(cg,{headingLevel:S,download:l}),actions:N},...G?[{value:"targets",label:x("informationPanelTabsTargets"),content:Le(f(Sg,{headingLevel:S}))}]:[],...J?[{value:"collection",label:x("informationPanelTabsCollection"),content:Le(f(xg,{headingLevel:S}))}]:[],...H?[{value:"contents",label:x("informationPanelTabsContents"),content:Le(f(kg,{}))}]:[],...Y?[{value:"search",label:x("informationPanelTabsSearch"),content:Le(f(Cg,{headingLevel:S,sticky:true,size:"small"}))}]:[],...it?[{value:"map",label:x("informationPanelTabsMap"),content:Le(f(wg,{}))}]:[],...O?[{value:"transcript",label:x("transcriptLabel"),content:Le(f(Eg,{sticky:true,size:"small"}))}]:[],...I?[{value:"annotations",label:x("informationPanelTabsAnnotations"),content:Le(f(Mg,{headingLevel:S}))}]:[]],K=ot(M=>M.search.query),Z=j.some(M=>M.value==="search"),[Q,xt]=z(()=>K&&Z?"search":o??null),at=R(K&&Z?K:"");F(()=>{Z&&(K&&K!==at.current&&n===void 0&&xt("search"),at.current=K)},[K,Z,n]);const ct=ot(M=>{var W;return M.annotationId&&((W=M.regions)!=null&&W.entries.some(X=>X.id===M.annotationId))?M.annotationId:null}),y=j.some(M=>M.value==="contents");F(()=>{ct&&y&&n===void 0&&xt("contents")},[ct,y,n]);const E=n!==void 0?n:Q,L=(j.some(M=>M.value===E)?E:(A=j[0])==null?void 0:A.value)==="search";if(F(()=>{Z&&w.setSetVisible(jr,L)},[w,Z,L]),!j.length)return null;const $=()=>{var W;const M=v.current;M!=null&&M.contains(document.activeElement)&&((W=Pg(M))==null||W.focus()),s==null||s()};return f(c,{ref:M=>{v.current=M,typeof g=="function"?g(M):g&&(g.current=M)},className:Tt("clover-panel",d),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...k.props,onKeyDown:M=>{p==null||p(M),i&&s&&M.key==="Escape"&&!M.defaultPrevented&&(M.preventDefault(),$())},...m,children:[k.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":b("informationPanelClose"),...dt(_("informationPanelClose")),onClick:$,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(tc,{})}),f($e,{label:b("informationPanelClose")})]}),f(Kc.Provider,{value:j.some(M=>M.value==="about"),children:f(yg,{items:j,layout:e,value:n!==void 0?n:Q,onValueChange:M=>{n===void 0&&xt(M),r==null||r(M)},label:b("informationPanelTabs"),labelLang:_("informationPanelTabs"),headingLevel:a})})]})});function Pg(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 Lg=1,Ag=4,Og=8,Ng=500,Rg=4,Qi=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],Jc=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function no(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*Jc():t.endsWith("%")?n/100*e:n}const ir=t=>typeof t=="number"?`${t}px`:t,Bg=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},$g=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Fg=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function Dg(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 zg(t,e,n){const{sized:o,other:r}=Dg(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=no(a.min,s)??0,d=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(no(c.min,s)??0),h=Math.max(l,Math.min(no(a.max,s)??d,d)),p=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:h,after:p}}function Hg(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 Wg(t,e){const n=e.sized.getBoundingClientRect().width,o=Lg*Jc()*(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 ta(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 Ug(t,e){let n=null,o=false,r=null,s=null;const i=a=>{s==null||s();const c=t(),l=c==null?void 0:c.ownerDocument.defaultView;if(!c||!l)return;const u=g=>Math.hypot(g.clientX-a.x,g.clientY-a.y)>a.reach,d=()=>{Qi.forEach(g=>l.removeEventListener(g,h,true)),l.removeEventListener("pointermove",p,true),clearTimeout(m),s=null},h=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&u(g))return d();g.preventDefault(),g.stopPropagation()}},p=g=>u(g)&&d();Qi.forEach(g=>l.addEventListener(g,h,true)),l.addEventListener("pointermove",p,true);const m=setTimeout(d,Ng);s=d};return{down(a){var u;if(o=false,r=null,a.defaultPrevented||a.button!==0||ta(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"?Og:Ag,moved:false};const l=a.currentTarget;l.dataset.dragging="",(u=l.setPointerCapture)==null||u.call(l,a.pointerId)},move(a){const c=n;if(!c)return;const l=a.clientX-c.x;!c.moved&&Math.abs(l)<c.slop||(c.moved=true,e().resize(c.from+(c.found.after?-l:l)))},up(a){const c=n;o=(c==null?void 0:c.moved)??false,r=c&&!c.moved&&a.type==="pointerup"?{x:a.clientX,y:a.clientY,reach:c.slop*Rg}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||ta(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=Wg(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const ls=ae(null);function us(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const jg=te(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=R(null),l=R({}),[u,d]=z({});F(()=>d(Bg(n)),[n]);const h=ut((m,g)=>d(w=>{const v={...w};return g===void 0?delete v[m]:v[m]=Math.round(g),$g(n,v),v}),[n]),p=mt(()=>({sizes:u,setSize:h,specs:l,element:c}),[u,h]);return f(ls.Provider,{value:p,children:f(e,{ref:m=>{c.current=m,us(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),Qc=te(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},u){const d=zt(ls),h=R(null),[p,m]=z(s??"");F(()=>{if(s)return m(s);const w=Fg(d==null?void 0:d.element.current);m(String(w.indexOf(h.current)))},[s,d]),d&&p&&(d.specs.current[p]={min:o,max:r,size:n});const g=d&&p?d.sizes[p]:void 0;return f(e,{ref:w=>{h.current=w,us(u,w)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":p||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:ir(o)??0,"--clover-split-size":g!==void 0?`${g}px`:ir(n),"--clover-split-max":ir(r),...a},...l,children:c})}),Vg=te(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=zt(ls),{t:l,langOf:u}=Pt(),d=R(null),[h,p]=z(),m=ut(()=>{const I=d.current,O=c==null?void 0:c.element.current;return!I||!O||!c?null:zg(I,O,c.specs.current)},[c]),g=ut(I=>{const O=m();if(!O||!c)return;const H=Math.min(O.max,Math.max(O.min,I));c.setSize(O.key,H),p({now:H,min:O.min,max:O.max})},[m,c]),w=ut(()=>{const I=m();I&&p({now:I.sized.getBoundingClientRect().width,min:I.min,max:I.max})},[m]);F(()=>{const I=c==null?void 0:c.element.current;if(w(),!I||typeof ResizeObserver>"u")return;let O=0;const H=new ResizeObserver(()=>{cancelAnimationFrame(O),O=requestAnimationFrame(w)});return H.observe(I),()=>{cancelAnimationFrame(O),H.disconnect()}},[w,c,c==null?void 0:c.sizes]);const v=I=>{var O;return Math.round(I/(((O=c==null?void 0:c.element.current)==null?void 0:O.clientWidth)||1)*100)},b=()=>{var it,G;const I=m();if(!I||!c)return;const O=((it=c.element.current)==null?void 0:it.clientWidth)??0,H=no((G=c.specs.current[I.key])==null?void 0:G.size,O),Y=Hg(I,H,c.sizes[I.key]);if(!Y.own)return g(Y.to);c.setSize(I.key,void 0),p({now:H,min:I.min,max:I.max})},_=R({limits:m,resize:g,step:b});_.current={limits:m,resize:g,step:b};const[k]=z(()=>Ug(()=>d.current,()=>_.current));F(()=>()=>k.dispose(),[k]);const x=i["aria-label"]??l("splitHandle");return f("div",{ref:I=>{d.current=I,us(a,I)},role:"separator","aria-orientation":"vertical","aria-label":x,...dt(i["aria-label"]===void 0?u("splitHandle"):void 0),"aria-valuenow":h?v(h.now):void 0,"aria-valuemin":h?v(h.min):void 0,"aria-valuemax":h?v(h.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:I=>{o==null||o(I),k.down(I)},onPointerMove:I=>k.move(I),onPointerUp:I=>k.up(I),onPointerCancel:I=>k.up(I),onClick:I=>{r==null||r(I),k.click(I)},onKeyDown:I=>{s==null||s(I),k.key(I)},...i,children:[n,f($e,{label:x})]})});let tl;function qg(t){tl=t}function Vv(){return tl}function Kg({open:t,onOpenChange:e,controls:n}){const{t:o,langOf:r}=Pt(),s=le().replace(/:/g,"");return f(Oe,{id:`panel-${s}`,label:o("informationPanelToggle"),lang:r("informationPanelToggle"),expanded:t,controls:n,onClick:()=>e(!t),children:f(kt,{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 Zg,oo;const el=()=>Zg??(Zg=import("./dragToClose-CFCxhUxn.mjs").then(t=>oo=t));function Gg(){el()}function Xg(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=R({enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i});a.current={enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i},F(()=>{const c=t.current;if(!c||(oo==null||oo.reset(c,a),!e))return;let l=true,u;return el().then(d=>{l&&(u=d.attach(c,a))}),()=>{l=false,u==null||u()}},[t,e])}const Yg=240,Jg="16rem",Qg="14rem",tv=31;function ev(t){const[e,n]=z(t),[o,r]=z(t);return F(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),Yg);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function nv(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 ov=typeof window>"u"?F:Dt;function rv(t,e){const[n,o]=z();return ov(()=>{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 sv=typeof window>"u"?F:Dt;function iv({id:t,beside:e,defaultOpen:n,side:o,focus:r=nv,slides:s=true,alongside:i,followFocus:a}){var J,C;const c=R(null),l=R(null),u=e===false,[d,h]=z(n),[p,m]=z(false),g=u?p:d,w=()=>document.querySelector(`button[aria-controls~="${t}"]`),v=()=>a(w),b=()=>{var S,N;(S=c.current)!=null&&S.contains(document.activeElement)&&((N=w())==null||N.focus(),v())},_=R(0),k=S=>{_.current=u&&S?3:0,_.current||v(),u&&m(S),h(S)},x=()=>{b(),k(false)},I=R(e),O=R(false);if(I.current===true&&e===false){const S=document.activeElement;O.current=!!(S&&((J=c.current)!=null&&J.contains(S)||(C=w())!=null&&C.contains(S)))}sv(()=>{var S;O.current&&(O.current=false,(S=w())==null||S.focus(),v()),e===true&&m(false),I.current=e},[e]);const H=ev(s&&u&&g),Y=s&&u,it=Y?H.mounted:g,G=Y?H.open:g;return F(()=>{if(!_.current||!c.current)return;_.current-=1;const S=r(c.current);S==null||S.focus({preventScroll:true}),S&&document.activeElement===S&&(_.current=0)}),Xg(c,{enabled:u&&G,side:o,onClose:x,scrim:l,alongside:i,exits:!s}),{pane:c,over:u,open:g,shown:it,opened:G,setOpen:k,close:x,onKeyDown:S=>{u&&g&&S.key==="Escape"&&!S.defaultPrevented&&(S.preventDefault(),x())},scrim:u&&it&&{ref:l,"data-open":G,"aria-hidden":true,onMouseDown:S=>S.preventDefault(),onClick:x}}}const av=typeof window>"u"?F:Dt;function cv(t,e,n){av(()=>{const o=t.current,r=o==null?void 0:o.parentElement;if(!n||!o||!r)return;const s=()=>{const c=e();o.style.setProperty("--clover-template-spine-top",`${c?c.getBoundingClientRect().top-r.getBoundingClientRect().top:0}px`)};s();const i=new ResizeObserver(s);for(const c of Array.from(r.children))i.observe(c);const a=e();return a&&i.observe(a),()=>i.disconnect()},[t,n])}function lv({id:t,beside:e,defaultOpen:n,followFocus:o,body:r,panel:s,load:i}){const a=iv({id:t,beside:e,defaultOpen:n,side:"end",followFocus:o}),c=!a.over&&a.open,l=R(null);cv(l,()=>r==null?void 0:r(),c&&!!r);const u=h=>{var p,m;(m=(p=h.target).closest)!=null&&m.call(p,`[aria-controls~="${t}"]`)&&(s||i==null||i(),a.over&&Gg())},d=f(Kg,{open:a.open,onOpenChange:h=>h&&!s&&i?i().then(()=>a.setOpen(true)):a.setOpen(h),controls:t});return{...a,id:t,docked:c,spine:l,toggle:d,Part:s,splitProps:{"data-panel":a.over?"over":"beside",onKeyDown:a.onKeyDown,onPointerOver:u,onFocus:u}}}function uv({pane:t,className:e,...n}){const{id:o,over:r,docked:s,Part:i}=t;return f(kt,{children:[s&&f(Vg,{className:"clover-template-panel-handle","aria-controls":o}),s&&f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle}),f(Qc,{ref:t.pane,id:o,"data-spine":r||void 0,name:"panel",className:["clover-template-panel clover-template-drawer",e].filter(Boolean).join(" "),size:"24rem",min:r?void 0:Qg,"data-open":t.opened,hidden:!t.shown,children:i&&f(i,{...n,onClose:r?t.close:void 0,closeOnEscape:r})}),t.scrim&&f("div",{className:"clover-template-scrim",...t.scrim})]})}const dv=30;function fv(){const t=R(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&hv()?r.focus():++n<dv&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function hv(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function pv({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",download:i=true,languages:a=true,items:c="slider",singleItem:l=false,storageKey:u="clover-template-default",fill:d=false,collapseControls:h,...p}){const m=R(null),g=le().replace(/:/g,""),w=`${g}-panel`,v=Nc(n,`${g}-title`),b=lv({id:w,beside:rv(m,tv),defaultOpen:r??true,followFocus:fv(),body:()=>{var x;return(x=m.current)==null?void 0:x.querySelector(".clover-template-default-body")},panel:Ig}),_=b.over,k=o&&b.docked;return f(Rd,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":d||void 0,...e?v.group:null,...p,children:f(jg,{ref:m,className:"clover-template-default-panes clover-template-panes",storageKey:u||void 0,...o?b.splitProps:{"data-panel":"beside"},children:[f(Qc,{className:"clover-template-default-main",min:_?void 0:Jg,children:[e&&f("header",{className:"clover-template-default-header",children:[f(mv,{title:v}),f(po,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(jc,{className:"clover-template-default-provider",children:f(Vc,{})})]}),f(Nm,{loading:false}),f(Qp,{className:"clover-template-default-body",collapseControls:h,children:o&&!k&&b.toggle}),f("div",{className:"clover-template-default-rail",children:[f("div",{className:"clover-template-default-rail-header",children:[f(yv,{}),f(Om,{})]}),c&&f(po,{layout:c,singleItem:l})]})]}),o&&f(uv,{pane:b,className:"clover-template-default-panel",layout:s,download:i,languages:a,headingLevel:e?vv(n):n})]})})}function mv({title:t}){const e=ot(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Oh();return gv(n==null?void 0:n.entries[0]),f(kt,{children:[f(Ye,{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(Ye,{as:"p",label:e,className:"clover-template-default-collection"}),f(po,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(Ye,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(po,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function gv(t){const{clover:e}=ce(),n=ot(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=R(null);F(()=>{if(!t||!n||o.current===n)return;o.current=n;const{annotationId:r,canvasId:s}=e.store.get();!r&&s===t.canvasId&&e.selectAnnotation(t.id)},[e,t,n])}const vv=t=>t+1;function yv(){const t=os();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(re.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(Ye,{label:e.label})]},e.id))})}const bv=()=>import("./renderers-Dw1klwlx.mjs"),_v=pt(()=>import("./Document-BsryuYJ1.mjs").then(t=>({default:t.Document}))),wv=pt(()=>import("./Gallery-BOgUqfqw.mjs").then(t=>({default:t.Gallery}))),ea={default:pv,document:_v,gallery:wv},xv={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["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 Sv({props:t}){const e=typeof t.template=="string"&&t.template in ea?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=xv[i])==null?void 0:a.includes(e))??true)})),o=Ze(bv,!!t.renderers),r=mt(()=>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=ea[e];return f(_t,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const kv=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Cv={mapWorkerUrl:kv},Ev={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}};qg(Cv.mapWorkerUrl);Ol(Ev,()=>Promise.resolve(Sv));export{Xl as $,R as A,Qp as B,Jt as C,Qc as D,po as E,Vg as F,Jg as G,uv as H,jd as I,Gg as J,ot as K,Ye as L,jl as M,Oh as N,Fv as O,Om as P,Ph as Q,Rd as R,Nm as S,mt as T,_t as U,pt as V,Xi as W,ae as X,zt as Y,yd as Z,Dt as _,ce as a,Jd as a$,Wv as a0,Wr as a1,$c as a2,Fc as a3,Sn as a4,Dc as a5,Uu as a6,yt as a7,cs as a8,dt as a9,Gf as aA,Ja as aB,Ka as aC,Kf as aD,Zf as aE,df as aF,pc as aG,ud as aH,Jr as aI,Bh as aJ,Ai as aK,Zd as aL,oc as aM,Kt as aN,tf as aO,qf as aP,lf as aQ,Oe as aR,Fd as aS,Yf as aT,_n as aU,Gd as aV,Ud as aW,Xd as aX,Yd as aY,ic as aZ,Qd as a_,At as aa,ja as ab,id as ac,Be as ad,Pt as ae,wo as af,Tt as ag,Am as ah,te as ai,Lm as aj,vo as ak,Fr as al,Dr as am,Mn as an,Yh as ao,$i as ap,Bi as aq,Sc as ar,os as as,Nh as at,Fi as au,Ur as av,yo as aw,D as ax,re as ay,cf as az,hu as b,Ku as b$,Wu as b0,Um as b1,jm as b2,Mh as b3,ge as b4,vg as b5,$v as b6,Nv as b7,Iv as b8,Da as b9,za as bA,nn as bB,jr as bC,ss as bD,ld as bE,Rv as bF,Lf as bG,Ee as bH,Qo as bI,Zr as bJ,$u as bK,Vf as bL,Tf as bM,zc as bN,on as bO,In as bP,xr as bQ,lv as bR,An as bS,nm as bT,om as bU,Na as bV,Xh as bW,Tn as bX,Vv as bY,Pc as bZ,Xt as b_,jv as ba,Ne as bb,dc as bc,Wf as bd,qc as be,Oa as bf,Uv as bg,rd as bh,qr as bi,Pv as bj,Ko as bk,ts as bl,tg as bm,Hr as bn,Ze as bo,Ch as bp,Wa as bq,_o as br,sn as bs,Ga as bt,Yg as bu,Zc as bv,gi as bw,Yu as bx,yc as by,If as bz,_c as c,Vd as c0,wd as c1,td as c2,$a as c3,Uh as c4,Xu as c5,Bf as c6,tc as c7,Lv as c8,Av as c9,Ov as ca,jh as cb,$p as cc,Ni as cd,$h as ce,Fh as cf,Bv as cg,ie as ch,Qt as ci,Qn as cj,Fm as ck,Hc as cl,Ig as cm,ac as cn,rm as co,El as cp,Hv as cq,Ah as d,z as e,le as f,Dv as g,zv as h,fv as i,iv as j,kt as k,rv as l,tv as m,nu as n,$e as o,jc as p,ut as q,is as r,im as s,Nc as t,f as u,en as v,Vc as w,oe as x,F as y,jg as z};