@nulib/clover 0.0.0-stage → 4.0.0-beta.1

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 (413) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +120 -2
  3. package/dist/components/Annotations/Annotations.mjs +674 -0
  4. package/dist/components/Annotations/EntryBodies.mjs +52 -0
  5. package/dist/components/Annotations/languages.mjs +43 -0
  6. package/dist/components/Body/Body.mjs +51 -0
  7. package/dist/components/Body/BodyAlert.mjs +25 -0
  8. package/dist/components/Body/Caption.mjs +90 -0
  9. package/dist/components/Body/CaptionDetails.mjs +50 -0
  10. package/dist/components/Body/Pending.mjs +9 -0
  11. package/dist/components/Body/glyphs.mjs +66 -0
  12. package/dist/components/Body/renderers.mjs +30 -0
  13. package/dist/components/Body/useControlsVisibility.mjs +204 -0
  14. package/dist/components/Body/useNearViewport.mjs +27 -0
  15. package/dist/components/Canvas/AnnotationMenu.mjs +128 -0
  16. package/dist/components/Canvas/AnnotationState.mjs +338 -0
  17. package/dist/components/Canvas/Annotations.mjs +497 -0
  18. package/dist/components/Canvas/CanvasView.mjs +669 -0
  19. package/dist/components/Canvas/ChoiceMenu.mjs +77 -0
  20. package/dist/components/Canvas/Connected.mjs +228 -0
  21. package/dist/components/Canvas/ControlMenu.mjs +67 -0
  22. package/dist/components/Canvas/Controls.mjs +233 -0
  23. package/dist/components/Canvas/FrameAnimation.mjs +344 -0
  24. package/dist/components/Canvas/LoadedCanvas.mjs +177 -0
  25. package/dist/components/Canvas/Placeholder.mjs +105 -0
  26. package/dist/components/Canvas/fromManifest.mjs +44 -0
  27. package/dist/components/Canvas/index.mjs +19 -0
  28. package/dist/components/Canvas/layout.mjs +369 -0
  29. package/dist/components/Canvas/media/MediaBody.mjs +285 -0
  30. package/dist/components/Canvas/media/Player.mjs +193 -0
  31. package/dist/components/Canvas/media/Transport.mjs +511 -0
  32. package/dist/components/Canvas/media/TransportButton.mjs +39 -0
  33. package/dist/components/Canvas/media/useBarHeight.mjs +28 -0
  34. package/dist/components/Canvas/media/useCaptionTracks.mjs +131 -0
  35. package/dist/components/Canvas/media/useMediaController.mjs +77 -0
  36. package/dist/components/Canvas/media/useMediaElement.mjs +100 -0
  37. package/dist/components/Canvas/panClearOfControls.mjs +92 -0
  38. package/dist/components/Canvas/rendererSurface.mjs +6 -0
  39. package/dist/components/Canvas/surface.mjs +5 -0
  40. package/dist/components/Canvas/track.mjs +43 -0
  41. package/dist/components/Canvas/useSvgReader.mjs +23 -0
  42. package/dist/components/Collection/Collection.mjs +76 -0
  43. package/dist/components/CollectionSelect/CollectionSelect.mjs +114 -0
  44. package/dist/components/Contents/Contents.mjs +120 -0
  45. package/dist/components/Download/Download.mjs +105 -0
  46. package/dist/components/Items/Item.mjs +184 -0
  47. package/dist/components/Items/Items.mjs +455 -0
  48. package/dist/components/Items/Pager.mjs +190 -0
  49. package/dist/components/Items/StandaloneItems.mjs +80 -0
  50. package/dist/components/Items/clamped.mjs +90 -0
  51. package/dist/components/Label/Label.mjs +39 -0
  52. package/dist/components/Map/LoadedMap.mjs +26 -0
  53. package/dist/components/Map/Map.mjs +38 -0
  54. package/dist/components/Map/MapView.mjs +539 -0
  55. package/dist/components/Map/basemap.mjs +50 -0
  56. package/dist/components/Map/maplibre-worker.mjs +7 -0
  57. package/dist/components/Map/overlayImage.mjs +17 -0
  58. package/dist/components/Map/worker.mjs +22 -0
  59. package/dist/components/Panel/About.mjs +148 -0
  60. package/dist/components/Panel/Panel.mjs +259 -0
  61. package/dist/components/Panel/PanelToggle.mjs +43 -0
  62. package/dist/components/Panel/PartOfManifest.mjs +52 -0
  63. package/dist/components/Primitives/Primitives.mjs +263 -0
  64. package/dist/components/Primitives/resource.mjs +11 -0
  65. package/dist/components/Provider/Provider.mjs +174 -0
  66. package/dist/components/Root/Announcer.mjs +58 -0
  67. package/dist/components/Root/Root.mjs +29 -0
  68. package/dist/components/Root/useRootState.mjs +188 -0
  69. package/dist/components/Scene/Connected.mjs +48 -0
  70. package/dist/components/Scene/Loaded.mjs +56 -0
  71. package/dist/components/Scene/RotatePad.mjs +204 -0
  72. package/dist/components/Scene/Scene.mjs +20 -0
  73. package/dist/components/Scene/SceneView.mjs +539 -0
  74. package/dist/components/Scene/cloverEngine.mjs +105 -0
  75. package/dist/components/Scene/engine.mjs +141 -0
  76. package/dist/components/Scene/engines.mjs +23 -0
  77. package/dist/components/Scene/gestures.mjs +74 -0
  78. package/dist/components/Scene/models.mjs +78 -0
  79. package/dist/components/Scene/orbit.mjs +60 -0
  80. package/dist/components/Search/Search.mjs +246 -0
  81. package/dist/components/Split/Split.mjs +210 -0
  82. package/dist/components/Split/splitting.mjs +203 -0
  83. package/dist/components/Status/Status.mjs +47 -0
  84. package/dist/components/Timeline/Connected.mjs +25 -0
  85. package/dist/components/Timeline/Timeline.mjs +40 -0
  86. package/dist/components/Timeline/playerSurface.mjs +84 -0
  87. package/dist/components/Transcript/Transcript.mjs +377 -0
  88. package/dist/components/Viewer/Viewer.mjs +19 -0
  89. package/dist/core/annotation-bodies.mjs +29 -0
  90. package/dist/core/annotation-collection.mjs +55 -0
  91. package/dist/core/annotation-name.mjs +31 -0
  92. package/dist/core/annotation-sets.mjs +155 -0
  93. package/dist/core/annotations-content.mjs +27 -0
  94. package/dist/core/annotations.mjs +73 -0
  95. package/dist/core/clover.mjs +393 -0
  96. package/dist/core/content-state-reader.mjs +82 -0
  97. package/dist/core/content-state.mjs +43 -0
  98. package/dist/core/direction.mjs +12 -0
  99. package/dist/core/geo-detect.mjs +30 -0
  100. package/dist/core/geo.mjs +283 -0
  101. package/dist/core/items.mjs +76 -0
  102. package/dist/core/keep-fragments.mjs +40 -0
  103. package/dist/core/link.mjs +28 -0
  104. package/dist/core/load.mjs +183 -0
  105. package/dist/core/map-config.mjs +12 -0
  106. package/dist/core/markdown.mjs +139 -0
  107. package/dist/core/pages.mjs +51 -0
  108. package/dist/core/painted-bodies.mjs +20 -0
  109. package/dist/core/painting.mjs +17 -0
  110. package/dist/core/presentation.mjs +27 -0
  111. package/dist/core/ranges.mjs +133 -0
  112. package/dist/core/region.mjs +32 -0
  113. package/dist/core/request.mjs +40 -0
  114. package/dist/core/sanitize.mjs +72 -0
  115. package/dist/core/search-service.mjs +22 -0
  116. package/dist/core/search.mjs +154 -0
  117. package/dist/core/selectors.mjs +94 -0
  118. package/dist/core/sequence.mjs +70 -0
  119. package/dist/core/show-link.mjs +16 -0
  120. package/dist/core/store.mjs +40 -0
  121. package/dist/core/svg-shape.mjs +183 -0
  122. package/dist/core/text.mjs +36 -0
  123. package/dist/core/thumbnail.mjs +55 -0
  124. package/dist/core/value.mjs +39 -0
  125. package/dist/core/vtt.mjs +111 -0
  126. package/dist/hooks/useFullscreen.mjs +21 -0
  127. package/dist/hooks/useFullscreenSupported.mjs +11 -0
  128. package/dist/hooks/useLoaded.mjs +27 -0
  129. package/dist/hooks/useWithinFullscreen.mjs +24 -0
  130. package/dist/i18n/config.mjs +170 -0
  131. package/dist/i18n/hostLanguage.mjs +6 -0
  132. package/dist/i18n/locales/en.json.mjs +5 -0
  133. package/dist/i18n/locales/es.json.mjs +5 -0
  134. package/dist/i18n/locales/fi.json.mjs +5 -0
  135. package/dist/i18n/locales/fr.json.mjs +5 -0
  136. package/dist/i18n/locales/index.mjs +13 -0
  137. package/dist/i18n/locales/nb.json.mjs +5 -0
  138. package/dist/i18n/locales/nn.json.mjs +5 -0
  139. package/dist/i18n/locales/no.json.mjs +5 -0
  140. package/dist/i18n/locales/pt.json.mjs +5 -0
  141. package/dist/i18n/reader.mjs +13 -0
  142. package/dist/i18n/useCloverTranslation.mjs +28 -0
  143. package/dist/index.d.mts +2215 -0
  144. package/dist/index.mjs +133 -0
  145. package/dist/lib/asArray.mjs +5 -0
  146. package/dist/lib/classnames.mjs +5 -0
  147. package/dist/lib/fullscreen.mjs +65 -0
  148. package/dist/lib/gltf/bounds.mjs +44 -0
  149. package/dist/lib/gltf/load.mjs +156 -0
  150. package/dist/lib/gltf/mat4.mjs +150 -0
  151. package/dist/lib/gltf/renderer.mjs +342 -0
  152. package/dist/lib/gltf/shaders.mjs +192 -0
  153. package/dist/lib/hls.mjs +6 -0
  154. package/dist/lib/pointer.mjs +38 -0
  155. package/dist/lib/renderer/CanvasRenderer.mjs +857 -0
  156. package/dist/lib/renderer/backends/backend.mjs +21 -0
  157. package/dist/lib/renderer/backends/canvas2d/Canvas2DBackend.mjs +91 -0
  158. package/dist/lib/renderer/backends/contexts.mjs +27 -0
  159. package/dist/lib/renderer/backends/dom/DomLayers.mjs +91 -0
  160. package/dist/lib/renderer/backends/webgl2/WebGL2Backend.mjs +248 -0
  161. package/dist/lib/renderer/backends/webgl2/shaders.mjs +28 -0
  162. package/dist/lib/renderer/camera/Camera.mjs +64 -0
  163. package/dist/lib/renderer/camera/CameraAnimator.mjs +90 -0
  164. package/dist/lib/renderer/input/GestureController.mjs +252 -0
  165. package/dist/lib/renderer/io/TileCache.mjs +207 -0
  166. package/dist/lib/renderer/io/decode.mjs +156 -0
  167. package/dist/lib/renderer/loop/FrameLoop.mjs +50 -0
  168. package/dist/lib/renderer/math/affine.mjs +68 -0
  169. package/dist/lib/renderer/math/rect.mjs +45 -0
  170. package/dist/lib/renderer/overlays/Navigator.mjs +141 -0
  171. package/dist/lib/renderer/overlays/OverlayLayer.mjs +94 -0
  172. package/dist/lib/renderer/scene/planFrame.mjs +168 -0
  173. package/dist/lib/renderer/scene/regions.mjs +30 -0
  174. package/dist/lib/renderer/scene/sceneItem.mjs +114 -0
  175. package/dist/lib/renderer/scene/uploadBudget.mjs +30 -0
  176. package/dist/lib/renderer/sources/imageService.mjs +160 -0
  177. package/dist/lib/renderer/sources/sizedImage.mjs +38 -0
  178. package/dist/lib/renderer/sources/tilePyramid.mjs +172 -0
  179. package/dist/lib/time.mjs +21 -0
  180. package/dist/map/index.d.mts +195 -0
  181. package/dist/map/index.mjs +16 -0
  182. package/dist/react/context.mjs +46 -0
  183. package/dist/react/hooks.mjs +69 -0
  184. package/dist/react/language.mjs +30 -0
  185. package/dist/styles.css +1 -0
  186. package/dist/templates/default/Default.mjs +229 -0
  187. package/dist/templates/document/Document.mjs +286 -0
  188. package/dist/templates/document/DocumentPanel.mjs +9 -0
  189. package/dist/templates/document/Sheets.mjs +360 -0
  190. package/dist/templates/gallery/Gallery.mjs +62 -0
  191. package/dist/templates/index.d.mts +276 -0
  192. package/dist/templates/index.mjs +11 -0
  193. package/dist/templates/shared/Lightbox.mjs +111 -0
  194. package/dist/templates/shared/LightboxBody.mjs +9 -0
  195. package/dist/templates/shared/dragToClose.mjs +129 -0
  196. package/dist/templates/shared/useDragToClose.mjs +35 -0
  197. package/dist/templates/shared/useDrawer.mjs +113 -0
  198. package/dist/templates/shared/useFollowFocus.mjs +24 -0
  199. package/dist/templates/shared/useSlide.mjs +52 -0
  200. package/dist/templates/shared/useSpine.mjs +26 -0
  201. package/dist/templates.css +1 -0
  202. package/dist/three/index.d.mts +6 -0
  203. package/dist/three/index.mjs +8 -0
  204. package/dist/ui/Button.mjs +53 -0
  205. package/dist/ui/ControlCluster.mjs +87 -0
  206. package/dist/ui/Cue.mjs +13 -0
  207. package/dist/ui/ErrorBoundary.mjs +26 -0
  208. package/dist/ui/ExitFullscreen.mjs +46 -0
  209. package/dist/ui/FieldPill.mjs +153 -0
  210. package/dist/ui/HideToggle.mjs +57 -0
  211. package/dist/ui/Loading.mjs +20 -0
  212. package/dist/ui/Markup.mjs +95 -0
  213. package/dist/ui/ReadMore.mjs +84 -0
  214. package/dist/ui/Sections.mjs +448 -0
  215. package/dist/ui/Steps.mjs +84 -0
  216. package/dist/ui/Tip.mjs +196 -0
  217. package/dist/ui/bringIntoView.mjs +27 -0
  218. package/dist/ui/controlGlyphs.mjs +120 -0
  219. package/dist/ui/heading.mjs +19 -0
  220. package/dist/ui/languageCode.mjs +8 -0
  221. package/dist/ui/mediaIcons.mjs +104 -0
  222. package/dist/ui/useClusterReach.mjs +50 -0
  223. package/dist/ui/useContainerName.mjs +19 -0
  224. package/dist/ui/useOneOpen.mjs +22 -0
  225. package/dist/ui/useRovingFocus.mjs +64 -0
  226. package/dist/ui/useScrollTrack.mjs +150 -0
  227. package/dist/ui/useUniqueId.mjs +10 -0
  228. package/dist/ui/visuallyHidden.mjs +15 -0
  229. package/dist/web-components/About-DbrFSVBm.mjs +1 -0
  230. package/dist/web-components/AnnotationMenu-EBjIQpQl.mjs +1 -0
  231. package/dist/web-components/AnnotationState-DQTaO6Gz.mjs +1 -0
  232. package/dist/web-components/Annotations-Cb9U7HJ_.mjs +2 -0
  233. package/dist/web-components/Annotations-Dl0SgHBS.mjs +1 -0
  234. package/dist/web-components/Body-DxSz3iST.mjs +1 -0
  235. package/dist/web-components/BodyAlert-C8EOXz24.mjs +1 -0
  236. package/dist/web-components/Button-uWgfvqsL.mjs +1 -0
  237. package/dist/web-components/Camera-cdCqKMup.mjs +1 -0
  238. package/dist/web-components/Canvas2DBackend-CnLEHRs4.mjs +1 -0
  239. package/dist/web-components/CanvasView-BI3YzNdK.mjs +1 -0
  240. package/dist/web-components/CaptionDetails-B80ZhZ7v.mjs +1 -0
  241. package/dist/web-components/ChoiceMenu-DCp7-co7.mjs +1 -0
  242. package/dist/web-components/Collection-B1Le2_TU.mjs +1 -0
  243. package/dist/web-components/CollectionSelect-BL_jQog-.mjs +1 -0
  244. package/dist/web-components/Connected-BxqaRL9o.mjs +1 -0
  245. package/dist/web-components/Connected-DCBI-j9H.mjs +1 -0
  246. package/dist/web-components/Connected-DkhfVWxd.mjs +1 -0
  247. package/dist/web-components/Contents-zYEGHLfe.mjs +1 -0
  248. package/dist/web-components/ControlMenu-CAHiLAtl.mjs +1 -0
  249. package/dist/web-components/Cue-BT2V9VAq.mjs +1 -0
  250. package/dist/web-components/Document-BdCjGnJN.mjs +1 -0
  251. package/dist/web-components/DocumentPanel-X_Rta0Wu.mjs +1 -0
  252. package/dist/web-components/DomLayers-BD4QPbl6.mjs +1 -0
  253. package/dist/web-components/Download-DqU-goFi.mjs +1 -0
  254. package/dist/web-components/EntryBodies-DXAQH0vR.mjs +1 -0
  255. package/dist/web-components/ErrorBoundary-chQaO-Up.mjs +1 -0
  256. package/dist/web-components/FieldPill-CyEssPVm.mjs +1 -0
  257. package/dist/web-components/FrameAnimation-Bb0pOoRl.mjs +1 -0
  258. package/dist/web-components/Gallery-BXU3TcT3.mjs +1 -0
  259. package/dist/web-components/HideToggle-BwMrOBMu.mjs +1 -0
  260. package/dist/web-components/Items-DRj1UEpC.mjs +1 -0
  261. package/dist/web-components/Label-D6aVJB9s.mjs +1 -0
  262. package/dist/web-components/LightboxBody-BzXQGMDn.mjs +1 -0
  263. package/dist/web-components/Loaded-D5xmFRSo.mjs +1 -0
  264. package/dist/web-components/LoadedCanvas-DOjtxLSe.mjs +1 -0
  265. package/dist/web-components/LoadedMap-DouDS2lO.mjs +1 -0
  266. package/dist/web-components/Loading-CBKfwsML.mjs +1 -0
  267. package/dist/web-components/Map-Bcgp_R8H.mjs +1 -0
  268. package/dist/web-components/MapView-CD5zkTs8.mjs +1 -0
  269. package/dist/web-components/Markup-C1hMA8wk.mjs +2 -0
  270. package/dist/web-components/MediaBody-B_Gii4we.mjs +1 -0
  271. package/dist/web-components/MediaBody-BfrKIPte.mjs +1 -0
  272. package/dist/web-components/Navigator-BSJbEbuJ.mjs +1 -0
  273. package/dist/web-components/Pager-Di_2hHM3.mjs +1 -0
  274. package/dist/web-components/Panel-DbsC8A9V.mjs +1 -0
  275. package/dist/web-components/PanelToggle-mUDw73zI.mjs +1 -0
  276. package/dist/web-components/PartOfManifest-7eOwURrF.mjs +1 -0
  277. package/dist/web-components/Pending-BPOQ2z1L.mjs +1 -0
  278. package/dist/web-components/Primitives-XQO3m1wG.mjs +1 -0
  279. package/dist/web-components/Provider-B61118lU.mjs +1 -0
  280. package/dist/web-components/ReadMore-BJH-qqte.mjs +1 -0
  281. package/dist/web-components/Root-Dj277K6p.mjs +1 -0
  282. package/dist/web-components/Scene-BTWpLeec.mjs +1 -0
  283. package/dist/web-components/SceneView-BYo7WmPt.mjs +1 -0
  284. package/dist/web-components/Search-ZV8FFN4p.mjs +1 -0
  285. package/dist/web-components/Sections-ejwu1_Sm.mjs +2 -0
  286. package/dist/web-components/StandaloneItems-BYaiyCca.mjs +1 -0
  287. package/dist/web-components/Status-YbQK2KzY.mjs +1 -0
  288. package/dist/web-components/Timeline-ByyVSd7B.mjs +1 -0
  289. package/dist/web-components/Tip-IO11xX4x.mjs +1 -0
  290. package/dist/web-components/Transcript-D0gUxUoA.mjs +1 -0
  291. package/dist/web-components/annotation-collection-Csv7WIlm.mjs +1 -0
  292. package/dist/web-components/annotations-content-BS_OFz5Z.mjs +1 -0
  293. package/dist/web-components/assets/maplibre-gl-worker-kTz9OPxr.js +13831 -0
  294. package/dist/web-components/body-CKjwwFep.mjs +1 -0
  295. package/dist/web-components/bringIntoView-CQH5ZgMM.mjs +1 -0
  296. package/dist/web-components/canvas-CIzpp-Uz.mjs +1 -0
  297. package/dist/web-components/classnames-DukgfdpI.mjs +1 -0
  298. package/dist/web-components/cloverEngine-B4LinbSt.mjs +164 -0
  299. package/dist/web-components/content-state-reader-D1BkpICh.mjs +1 -0
  300. package/dist/web-components/contexts-ByL3eA_T.mjs +1 -0
  301. package/dist/web-components/controls-Dj2BybWb.mjs +1 -0
  302. package/dist/web-components/custom-elements.json +2739 -0
  303. package/dist/web-components/dragToClose-C-Pf1IeO.mjs +1 -0
  304. package/dist/web-components/engine-BSt8LTso.mjs +4228 -0
  305. package/dist/web-components/engines-CC0OEsVE.mjs +1 -0
  306. package/dist/web-components/es-BwMkoRod.mjs +1 -0
  307. package/dist/web-components/fi-gPFOn9RK.mjs +1 -0
  308. package/dist/web-components/fr-DUHmgdJo.mjs +1 -0
  309. package/dist/web-components/fromManifest-BhemHaoA.mjs +1 -0
  310. package/dist/web-components/glyphs-drROkef9.mjs +1 -0
  311. package/dist/web-components/heading-Cjt0f-Eu.mjs +1 -0
  312. package/dist/web-components/hls-CdKrthkC.mjs +40 -0
  313. package/dist/web-components/hooks-BXzQSllm.mjs +1 -0
  314. package/dist/web-components/imageService-dsdmcegU.mjs +1 -0
  315. package/dist/web-components/index-B7nZdqLg.mjs +1 -0
  316. package/dist/web-components/index.d.mts +604 -0
  317. package/dist/web-components/index.mjs +1 -0
  318. package/dist/web-components/index.umd.js +18 -0
  319. package/dist/web-components/items-CB2Uk7ts.mjs +1 -0
  320. package/dist/web-components/items-jfQ5XzEj.mjs +1 -0
  321. package/dist/web-components/keep-fragments-B5nlv2ck.mjs +1 -0
  322. package/dist/web-components/label-Vbg_cMOJ.mjs +1 -0
  323. package/dist/web-components/languageCode-cCpiU0b0.mjs +1 -0
  324. package/dist/web-components/layout-mMHI0lsj.mjs +1 -0
  325. package/dist/web-components/link-ZRnv5NFR.mjs +1 -0
  326. package/dist/web-components/logo-Boy6u4m2.mjs +1 -0
  327. package/dist/web-components/maplibre-gl-CQ4OueXY.mjs +823 -0
  328. package/dist/web-components/markdown-CCYJwzFn.mjs +5 -0
  329. package/dist/web-components/models-D1EE_CmH.mjs +1 -0
  330. package/dist/web-components/nb-BSvnQ6jd.mjs +1 -0
  331. package/dist/web-components/nn-Dg2_HdZu.mjs +1 -0
  332. package/dist/web-components/no-BSvnQ6jd.mjs +1 -0
  333. package/dist/web-components/nodes-B7JRwBgl.mjs +1 -0
  334. package/dist/web-components/overlayImage-0OgQl1TL.mjs +1 -0
  335. package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +1 -0
  336. package/dist/web-components/panel-CjXfre-g.mjs +1 -0
  337. package/dist/web-components/part-cUiPs2-y.mjs +1 -0
  338. package/dist/web-components/playerSurface-CU5XxI1j.mjs +1 -0
  339. package/dist/web-components/provider-C1wKfdjb.mjs +1 -0
  340. package/dist/web-components/pt-B3J80JgO.mjs +1 -0
  341. package/dist/web-components/read-more-DNHNtG-a.mjs +1 -0
  342. package/dist/web-components/rendererSurface-DhIlOjGT.mjs +22 -0
  343. package/dist/web-components/renderers-BMSWEFUR.mjs +1 -0
  344. package/dist/web-components/resource-DLHocQ1C.mjs +1 -0
  345. package/dist/web-components/sanitize-Dc7nOsgO.mjs +3 -0
  346. package/dist/web-components/search-CLy2Wj01.mjs +1 -0
  347. package/dist/web-components/shared-YUjOSBKO.mjs +1 -0
  348. package/dist/web-components/show-link-CyzYE1eS.mjs +1 -0
  349. package/dist/web-components/sizedImage-uv_NlE0l.mjs +1 -0
  350. package/dist/web-components/split-CYuMjp89.mjs +1 -0
  351. package/dist/web-components/splitting-BnQUxxgH.mjs +1 -0
  352. package/dist/web-components/status-Ms5L0ghK.mjs +1 -0
  353. package/dist/web-components/styles-CyuM_fB1.mjs +1 -0
  354. package/dist/web-components/svg-shape-DLY3g7oq.mjs +1 -0
  355. package/dist/web-components/text-BTAkxEfQ.mjs +5 -0
  356. package/dist/web-components/three.mjs +1 -0
  357. package/dist/web-components/thumbnail-c2K_iQsD.mjs +1 -0
  358. package/dist/web-components/time-B9GZoYcm.mjs +1 -0
  359. package/dist/web-components/tip-dWhupWSr.mjs +1 -0
  360. package/dist/web-components/toggle-BQTjR1I3.mjs +1 -0
  361. package/dist/web-components/upgrader-XNxI-5jo.mjs +1 -0
  362. package/dist/web-components/useContainerName-BpJ3IWY0.mjs +1 -0
  363. package/dist/web-components/useNearViewport-CtLyYg9n.mjs +1 -0
  364. package/dist/web-components/useScrollTrack-WbG28FPD.mjs +1 -0
  365. package/dist/web-components/viewer/AnnotationMenu-ZKyBeyUU.mjs +1 -0
  366. package/dist/web-components/viewer/AnnotationState-DO33zokc.mjs +1 -0
  367. package/dist/web-components/viewer/Annotations-BOjhr5ks.mjs +1 -0
  368. package/dist/web-components/viewer/Annotations-DkLueFLK.mjs +2 -0
  369. package/dist/web-components/viewer/Canvas2DBackend-CAmzJD5P.mjs +1 -0
  370. package/dist/web-components/viewer/CaptionDetails-DOJlUtOn.mjs +1 -0
  371. package/dist/web-components/viewer/ChoiceMenu-BDq6H34G.mjs +1 -0
  372. package/dist/web-components/viewer/Collection-By3puO0V.mjs +1 -0
  373. package/dist/web-components/viewer/Connected-DZNO2CPf.mjs +1 -0
  374. package/dist/web-components/viewer/Connected-ESg5y49m.mjs +1 -0
  375. package/dist/web-components/viewer/Contents-B_FqDwTW.mjs +1 -0
  376. package/dist/web-components/viewer/ControlMenu-DdQl-dTf.mjs +1 -0
  377. package/dist/web-components/viewer/Cue-BTRHfiWQ.mjs +1 -0
  378. package/dist/web-components/viewer/Document-B9_PyD2w.mjs +1 -0
  379. package/dist/web-components/viewer/DocumentPanel-CtEJVPoE.mjs +1 -0
  380. package/dist/web-components/viewer/DomLayers-DRdQSEtN.mjs +1 -0
  381. package/dist/web-components/viewer/EntryBodies-CJuTRcTq.mjs +1 -0
  382. package/dist/web-components/viewer/FieldPill-06uwrNwE.mjs +1 -0
  383. package/dist/web-components/viewer/FrameAnimation-3dcDHf5q.mjs +1 -0
  384. package/dist/web-components/viewer/Gallery-BYasTqZc.mjs +1 -0
  385. package/dist/web-components/viewer/HideToggle-BxkNMX-T.mjs +1 -0
  386. package/dist/web-components/viewer/LightboxBody-CXMc1xOH.mjs +1 -0
  387. package/dist/web-components/viewer/MapView-DCerrRRV.mjs +1 -0
  388. package/dist/web-components/viewer/MediaBody-BdkJcyGy.mjs +1 -0
  389. package/dist/web-components/viewer/MediaBody-waF4KvHp.mjs +1 -0
  390. package/dist/web-components/viewer/Navigator-CKwDgG2x.mjs +1 -0
  391. package/dist/web-components/viewer/PartOfManifest-DalHJFwC.mjs +1 -0
  392. package/dist/web-components/viewer/Search-Di_QQfDb.mjs +1 -0
  393. package/dist/web-components/viewer/StandaloneItems-B9J6nnWn.mjs +1 -0
  394. package/dist/web-components/viewer/Transcript-aHOixfna.mjs +1 -0
  395. package/dist/web-components/viewer/annotation-collection-I2UkdobR.mjs +1 -0
  396. package/dist/web-components/viewer/annotations-content-D-i4j9pD.mjs +1 -0
  397. package/dist/web-components/viewer/cloverEngine-CynoKdta.mjs +164 -0
  398. package/dist/web-components/viewer/content-state-reader-D7GIMcKK.mjs +1 -0
  399. package/dist/web-components/viewer/host-DlCltI_c.mjs +1 -0
  400. package/dist/web-components/viewer/index.d.mts +7 -0
  401. package/dist/web-components/viewer/index.mjs +1 -0
  402. package/dist/web-components/viewer/index.umd.js +18 -0
  403. package/dist/web-components/viewer/link-BX-wzj1u.mjs +1 -0
  404. package/dist/web-components/viewer/overlayImage-CHqn1fG8.mjs +1 -0
  405. package/dist/web-components/viewer/renderers-C_wdmw9v.mjs +1 -0
  406. package/dist/web-components/viewer/search-BHLyNxZ6.mjs +1 -0
  407. package/dist/web-components/viewer/styles-BRCkEU3w.mjs +1 -0
  408. package/dist/web-components/viewer/viewer-ipqAA-xQ.mjs +28 -0
  409. package/dist/web-components/viewer/vtt-XiS_-5Ao.mjs +5 -0
  410. package/dist/web-components/viewer-DEHIsIHd.mjs +1 -0
  411. package/dist/web-components/vtt-DYAOuQoK.mjs +5 -0
  412. package/dist/web-components/worker-CjXN0dku.mjs +1 -0
  413. package/package.json +111 -4
@@ -0,0 +1,5 @@
1
+ const m=/^\s*[-*+]\s+/,f=/^\s*(\d+)[.)]\s+/,$=/^(#{1,6})\s+(\S.*?)(?:\s+#+)?\s*$/,d=Symbol.for("clover.markdown.groups"),b=()=>{const p=globalThis;return p[d]=(p[d]??0)+1},k=p=>p.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function u(p,c){const l=[];return k(p).replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+|mailto:[^\s)]+)\)/g,(n,s,e)=>(l.push(e),`\0${l.length-1}${s}`)).replace(/\[\^([^\]]+)\]/g,(n,s)=>{const e=c.get(s);return e?`<sup>${e}</sup>`:n}).replace(/\*\*([^*]+)\*\*|__([^_]+)__/g,(n,s,e)=>`<b>${s??e}</b>`).replace(/\*([^*\s][^*]*)\*|_([^_\s][^_]*)_/g,(n,s,e)=>`<i>${s??e}</i>`).replace(/( {2,}|\\)\n/g,"<br>").replace(/\n/g," ").replace(/\u0000(\d+)\u0001([^\u0002]*)\u0002/g,(n,s,e)=>`<a href="${l[Number(s)]}">${e}</a>`)}function _(p){const c=[];for(const l of p.split(/\n(?:[ \t]*\n)+/)){let t;for(const n of l.split(`
2
+ `)){if(!n.trim())continue;const s=$.exec(n),e=f.exec(n),i=m.test(n)||e&&((t==null?void 0:t.kind)!=="paragraph"||Number(e[1])===1);s?(t={kind:"heading",depth:s[1].length,text:s[2]},c.push(t)):i&&(t==null?void 0:t.kind)!=="list"?(t={kind:"list",lines:[n]},c.push(t)):t&&t.kind!=="heading"?t.lines.push(n):(t={kind:"paragraph",lines:[n]},c.push(t))}}return c}function x(p,c){const l=[];for(const e of p){const i=m.exec(e),r=i?null:f.exec(e),o=i??r;o?l.push({indent:e.replace(/\t/g," ").search(/\S/),tag:i?"ul":"ol",start:r?Number(r[1]):1,text:e.slice(o[0].length)}):l[l.length-1].text+=`
3
+ ${e.trimStart()}`}let t="";const n=[],s=()=>t+=`</li></${n.pop().tag}>`;for(const e of l){for(;n.length>1&&e.indent<=n[n.length-2].indent;)s();const i=n[n.length-1],r=i&&e.indent<=i.indent;if(r&&e.tag===i.tag)t+="</li><li>";else{r&&s();const o=e.tag==="ol"&&e.start!==1?` start="${e.start}"`:"";t+=`<${e.tag}${o}><li>`,n.push({indent:r?i.indent:e.indent,tag:e.tag})}t+=u(e.text.trim(),c)}for(;n.length;)s();return t}function v(p,{headingLevel:c=3}={}){const l=new Map,t=[],n=p.replace(/\r\n?/g,`
4
+ `).replace(/^\[\^([^\]]+)\]:\s*(.*)$/gm,(o,a,h)=>(l.set(a,l.size+1),t.push([a,h]),"")),s=Math.max(c,1),e=[],i=[],r=[];for(const o of _(n))if(o.kind==="heading"){for(;e.length&&e[e.length-1]>=o.depth;)e.pop();for(;i.length&&i[i.length-1]>=o.depth;)i.pop(),r.push("</div>");const a=s+e.length;e.push(o.depth);const h=`<b>${u(o.text,l)}</b>`;if(a<=6)r.push(`<p role="heading" aria-level="${a}">${h}</p>`);else{const g=`clover-md-${b()}`;i.push(o.depth),r.push(`<div role="group" aria-labelledby="${g}"><p id="${g}">${h}</p>`)}}else o.kind==="list"?r.push(x(o.lines,l)):r.push(`<p>${u(o.lines.join(`
5
+ `).trim(),l)}</p>`);for(;i.pop()!==void 0;)r.push("</div>");return t.length&&r.push(`<p><small>${t.map(([o,a])=>`<sup>${l.get(o)}</sup> ${u(a,l)}`).join("<br>")}</small></p>`),r.join("")}export{v as markdownToHtml};
@@ -0,0 +1 @@
1
+ import{m as M,a3 as l,j as f}from"./shared-YUjOSBKO.mjs";const m=45,d=75*Math.PI/180,h=5*Math.PI/180,p=Math.PI-h,y=1.1,g=.35,I=4;function P(n,a=1){const t=m*Math.PI/180,o=2*Math.atan(Math.tan(t/2)*a),s=Math.min(t,o);return Math.max(n,1e-6)/Math.sin(s/2)*y}function x(n,a=1){return{theta:0,phi:d,distance:P(n.radius,a)}}function E(n,a,t){return{...n,theta:n.theta+a,phi:Math.min(p,Math.max(h,n.phi+t))}}function R(n,a,t){const o=n.distance/a;return{...n,distance:Math.min(t.distance*I,Math.max(t.distance*g,o))}}function z(n,a){const{theta:t,phi:o,distance:s}=n;return[a[0]+s*Math.sin(o)*Math.sin(t),a[1]+s*Math.cos(o),a[2]+s*Math.sin(o)*Math.cos(t)]}function A(n,a){const t=(s,i)=>Math.abs(s-i)<1e-6,o=(n.theta-a.theta)%(2*Math.PI);return(t(o,0)||t(Math.abs(o),2*Math.PI))&&t(n.phi,a.phi)&&t(n.distance,a.distance)}const O=["model/gltf-binary","model/gltf+json"],c=(n,a)=>{const t=Number(n);return Number.isFinite(t)?t:a};function F(n){return n.format?O.includes(n.format.toLowerCase()):/\.(glb|gltf)(\?|#|$)/i.test(n.src)}function b(n){return f(n.transform).flatMap(a=>{const t=a,o=(t==null?void 0:t.type)==="ScaleTransform"?"scale":(t==null?void 0:t.type)==="RotateTransform"?"rotate":(t==null?void 0:t.type)==="TranslateTransform"?"translate":null;if(!o||!t)return[];const s=o==="scale"?1:0;return[{type:o,x:c(t.x,s),y:c(t.y,s),z:c(t.z,s)}]})}function S(n){for(const a of f(n)){const t=a;if((t==null?void 0:t.type)!=="SpecificResource")continue;const o=f(t.selector).find(s=>(s==null?void 0:s.type)==="PointSelector");if(o)return[c(o.x,0),c(o.y,0),c(o.z,0)]}return[0,0,0]}const u=new WeakMap;function _(n){const a=u.get(n);if(a)return a;const t=[];for(const o of n.items??[])for(const s of(o==null?void 0:o.items)??[])if(M(s))for(let i of l(s)){(i==null?void 0:i.type)==="Choice"&&(i=f(i.items)[0]);const r=(i==null?void 0:i.type)==="SpecificResource"?i:null,e=r?typeof r.source=="string"?{id:r.source,type:"Model"}:r.source:i;(e==null?void 0:e.type)!=="Model"||typeof e.id!="string"||t.push({id:String(s.id??e.id),src:e.id,...typeof e.format=="string"?{format:e.format}:{},...e.label?{label:e.label}:{},position:S(s.target),transforms:r?b(r):[]})}return u.set(n,t),t}function w(n){const a=n.backgroundColor;return typeof a=="string"&&/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(a)?a:void 0}export{m as F,O as M,w as a,A as b,z as c,x as h,F as i,_ as s,E as t,R as z};
@@ -0,0 +1 @@
1
+ const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"Forrige","commonSearch":"S\xF8k","commonViewAll":"Se alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Laster inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultater","contentSearchError":"S\xF8ket kunne ikke fullf\xF8res.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilde","canvasRoleDescription":"zoombart bilde","canvasKeysImage":"Bruk piltastene for \xE5 flytte bildet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spille av eller pause, J eller L for \xE5 spole ti sekunder bakover eller fremover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valget av annoteringen.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastene for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere den mot h\xF8yre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visningen","statusLoading":"Laster inn\u2026","statusError":"Dette kunne ikke lastes inn.","itemsLabel":"Elementer","download":"Last ned","downloadPage":"Denne siden","downloadAll":"Alle sider","templateSidebar":"Elementer","templateSidebarToggle":"Vis elementer","collectionLabel":"Samling","itemsScrollBack":"Vis forrige elementer","itemsScrollForward":"Vis flere elementer","aboutRights":"Rettigheter","aboutHomepage":"Hjemmeside","aboutSeeAlso":"Se ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"\xC5pne hele manifestet","aboutCollection":"IIIF-samling","annotationsHide":"Skjul annoteringer","annotationsHideTip":"Skjul","readMore":"Les mer","readLess":"Les mindre","annotationsShow":"Vis p\xE5 bildet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilde","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"\xC5pne lenken","transcriptLabel":"Transkripsjon","imageViewerOpen":"\xC5pne bildeviseren","imageViewerClose":"Lukk bildeviseren","canvasChoice":"Valg","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8yre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis forrige faner","sectionsScrollForward":"Vis flere faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringer","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhold","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","mapUnavailable":"Kartet kunne ikke vises.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Sted {{number}}","mapOverlay":"Georeferert bilde","mapPlacesListed":"Steder oppf\xF8rt etter kartet: {{count}}","informationPanelToggle":"Mer informasjon","playerPlay":"Spill av","playerPause":"Pause","playerClose":"Lukk avspilleren","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspillingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapitler","framePrevious":"Forrige bilde","frameNext":"Neste bilde","frameSeek":"Bilde","frameRepeat":"Gjenta","framePosition":"Bilde {{index}} av {{total}}","playerCurrentTime":"N\xE5v\xE6rende tid","playerDuration":"Varighet","splitHandle":"Endre st\xF8rrelse p\xE5 panelene"}');export{e as default};
@@ -0,0 +1 @@
1
+ const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"F\xF8rre","commonSearch":"S\xF8k","commonViewAll":"Sj\xE5 alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Lastar inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultat","contentSearchError":"S\xF8ket kunne ikkje fullf\xF8rast.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilete","canvasRoleDescription":"zoombart bilete","canvasKeysImage":"Bruk piltastane for \xE5 flytte biletet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visinga, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spele av eller pause, J eller L for \xE5 spole ti sekund bakover eller framover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valet av annoteringa.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastane for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visinga, og R eller Shift+R for \xE5 rotere han mot h\xF8gre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visinga","statusLoading":"Lastar inn\u2026","statusError":"Dette kunne ikkje lastast inn.","itemsLabel":"Element","download":"Last ned","downloadPage":"Denne sida","downloadAll":"Alle sider","templateSidebar":"Element","templateSidebarToggle":"Vis element","collectionLabel":"Samling","itemsScrollBack":"Vis f\xF8rre element","itemsScrollForward":"Vis fleire element","aboutRights":"Rettigheiter","aboutHomepage":"Heimeside","aboutSeeAlso":"Sj\xE5 ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"Opne heile manifestet","aboutCollection":"IIIF-samling","annotationsHide":"Skjul annoteringar","annotationsHideTip":"Skjul","readMore":"Les meir","readLess":"Les mindre","annotationsShow":"Vis p\xE5 biletet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilete","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"Opne lenkja","transcriptLabel":"Transkripsjon","imageViewerOpen":"Opne biletvisaren","imageViewerClose":"Lukk biletvisaren","canvasChoice":"Val","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8gre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis f\xF8rre faner","sectionsScrollForward":"Vis fleire faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringar","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhald","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","mapUnavailable":"Kartet kunne ikkje visast.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Stad {{number}}","mapOverlay":"Georeferert bilete","mapPlacesListed":"Stader lista opp etter kartet: {{count}}","informationPanelToggle":"Meir informasjon","playerPlay":"Spel av","playerPause":"Pause","playerClose":"Lukk avspelaren","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspelingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapittel","framePrevious":"F\xF8rre bilete","frameNext":"Neste bilete","frameSeek":"Bilete","frameRepeat":"Gjenta","framePosition":"Bilete {{index}} av {{total}}","playerCurrentTime":"Noverande tid","playerDuration":"Varigheit","splitHandle":"Endre storleiken p\xE5 panela"}');export{e as default};
@@ -0,0 +1 @@
1
+ const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"Forrige","commonSearch":"S\xF8k","commonViewAll":"Se alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Laster inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultater","contentSearchError":"S\xF8ket kunne ikke fullf\xF8res.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilde","canvasRoleDescription":"zoombart bilde","canvasKeysImage":"Bruk piltastene for \xE5 flytte bildet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spille av eller pause, J eller L for \xE5 spole ti sekunder bakover eller fremover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valget av annoteringen.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastene for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere den mot h\xF8yre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visningen","statusLoading":"Laster inn\u2026","statusError":"Dette kunne ikke lastes inn.","itemsLabel":"Elementer","download":"Last ned","downloadPage":"Denne siden","downloadAll":"Alle sider","templateSidebar":"Elementer","templateSidebarToggle":"Vis elementer","collectionLabel":"Samling","itemsScrollBack":"Vis forrige elementer","itemsScrollForward":"Vis flere elementer","aboutRights":"Rettigheter","aboutHomepage":"Hjemmeside","aboutSeeAlso":"Se ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"\xC5pne hele manifestet","aboutCollection":"IIIF-samling","annotationsHide":"Skjul annoteringer","annotationsHideTip":"Skjul","readMore":"Les mer","readLess":"Les mindre","annotationsShow":"Vis p\xE5 bildet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilde","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"\xC5pne lenken","transcriptLabel":"Transkripsjon","imageViewerOpen":"\xC5pne bildeviseren","imageViewerClose":"Lukk bildeviseren","canvasChoice":"Valg","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8yre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis forrige faner","sectionsScrollForward":"Vis flere faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringer","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhold","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","mapUnavailable":"Kartet kunne ikke vises.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Sted {{number}}","mapOverlay":"Georeferert bilde","mapPlacesListed":"Steder oppf\xF8rt etter kartet: {{count}}","informationPanelToggle":"Mer informasjon","playerPlay":"Spill av","playerPause":"Pause","playerClose":"Lukk avspilleren","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspillingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapitler","framePrevious":"Forrige bilde","frameNext":"Neste bilde","frameSeek":"Bilde","frameRepeat":"Gjenta","framePosition":"Bilde {{index}} av {{total}}","playerCurrentTime":"N\xE5v\xE6rende tid","playerDuration":"Varighet","splitHandle":"Endre st\xF8rrelse p\xE5 panelene"}');export{e as default};
@@ -0,0 +1 @@
1
+ import{A as i,q as f,C as p,_ as l,u as a}from"./shared-YUjOSBKO.mjs";const b={childList:true,subtree:true,attributes:true,attributeFilter:["value","label","slot","controls"]};function h(t,e,n){const r=i(null),o=f(s=>{const u=new MutationObserver(s);return u.observe(t,b),()=>u.disconnect()},[t]);return p(o,()=>{const s=e();return r.current&&n(r.current.value,s)?r.current.value:(r.current={value:s},s)})}const v=(t,e)=>[...t.children].find(n=>n.getAttribute("slot")===e)??null;function y(t,e){return h(t,()=>v(t,e),Object.is)}function C({of:t}){const e=i(null);return l(()=>{const n=e.current;if(!n)return;const r=()=>n.replaceChildren(...[...t.childNodes].map(c=>c.cloneNode(true)));r();const o=new MutationObserver(r);return o.observe(t,{childList:true,subtree:true,characterData:true,attributes:true}),()=>o.disconnect()},[t]),a("span",{ref:e,style:{display:"contents"}})}function M({from:t,stays:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;const o=()=>{for(const s of[...t.childNodes])e(s)||r.append(s)};o();const c=new MutationObserver(o);return c.observe(t,{childList:true}),()=>{c.disconnect(),t.append(...r.childNodes)}},[t,e]),a("div",{ref:n,style:{display:"contents"}})}function O({from:t,picks:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;let o=[];const c=()=>{const u=[...t.childNodes].filter(e);u.length&&(o=o.filter(d=>d.parentNode===r.parentNode),(o.at(-1)??r).after(...u),o.push(...u))};c();const s=new MutationObserver(c);return s.observe(t,{childList:true}),()=>{s.disconnect();for(const u of o)u.parentNode===r.parentNode&&t.append(u)}},[t,e]),a("span",{ref:n,hidden:true})}function N({value:t}){const e=i(null);return l(()=>{var n;(n=e.current)==null||n.replaceChildren(t instanceof Node?t:String(t))},[t]),a("span",{ref:e,style:{display:"contents"}})}function g(t,e){let n=t;for(const r of e){const o=t[r];typeof o=="function"&&(n={...n,[r]:(...c)=>{const s=o(...c);return s==null?s:a(N,{value:s})}})}return n}export{C,M,O as P,y as a,v as s,h as u,g as w};
@@ -0,0 +1 @@
1
+ import{f as c,b as s}from"./imageService-dsdmcegU.mjs";import{s as a}from"./sizedImage-uv_NlE0l.mjs";async function l(r,o,i){const t=typeof r.id=="string"?r.id:void 0,e=c(r.service);if(!e)return t;try{const n=await s(e,{request:i});return a(n,o)??t}catch{return t}}export{l as overlayImageUrl};
@@ -0,0 +1 @@
1
+ const T=[".clover-canvas-controls",".clover-canvas-navigator",".clover-canvas-transport",'.clover-canvas-caption[data-open="true"]',".clover-canvas-menu",".clover-canvas-placeholder-toggle",".clover-canvas-exit-full-screen"].join(", "),v=(r,i,a,e)=>r<e&&a<i;function A(r,i){var C;const a=(C=r.overlays)==null?void 0:C.container;if(!a)return;const e=a.closest(".clover-canvas");if((e==null?void 0:e.getAttribute("data-navigable"))==="false")return;const n=a.getBoundingClientRect();if(!n.width||!n.height)return;const l={top:n.top,right:n.right,bottom:n.bottom,left:n.left};let b=Array.from((e==null?void 0:e.querySelectorAll(T))??[]).flatMap(o=>{if(o.closest(".clover-canvas")!==e)return[];const[s=0,t=0]=(getComputedStyle(o).translate||"").split(" ").map(p=>parseFloat(p)||0),f=o.getBoundingClientRect(),u=f.top-t,d=f.right-s,y=f.bottom-t,M=f.left-s;if(!f.width||!f.height||!v(M,d,n.left,n.right)||!v(u,y,n.top,n.bottom))return[];const w=[["top",y-n.top],["bottom",n.bottom-u],["left",d-n.left],["right",n.right-M]],[B]=w.reduce((p,R)=>R[1]<p[1]?R:p);return[{side:B,top:u,right:d,bottom:y,left:M}]});const m=[i,i.querySelector(".clover-canvas-annotation-point")].filter(o=>!!o).map(o=>o.getBoundingClientRect()),c={top:Math.min(...m.map(o=>o.top)),right:Math.max(...m.map(o=>o.right)),bottom:Math.max(...m.map(o=>o.bottom)),left:Math.min(...m.map(o=>o.left))};let h=0,g=0;for(let o=true;o;){const s=b.filter(t=>t.side==="top"||t.side==="bottom"?v(t.left,t.right,c.left+h,c.right+h):v(t.top,t.bottom,c.top+g,c.bottom+g));b=b.filter(t=>!s.includes(t)),o=s.length>0;for(const t of s)t.side==="top"&&(l.top=Math.max(l.top,t.bottom)),t.side==="bottom"&&(l.bottom=Math.min(l.bottom,t.top)),t.side==="left"&&(l.left=Math.max(l.left,t.right)),t.side==="right"&&(l.right=Math.min(l.right,t.left));h=S(c.left,c.right,l.left,l.right),g=S(c.top,c.bottom,l.top,l.bottom)}if(!h&&!g)return;const x=r.worldToScreenPoint(r.getCamera());r.panTo(r.screenToWorldPoint({x:x.x-h,y:x.y-g}))}function S(r,i,a,e){return i-r>e-a?(a+e-r-i)/2:r<a?a-r:i>e?e-i:0}export{A as panClearOfControls};
@@ -0,0 +1 @@
1
+ import{d as v,A as g,y as p,u as s}from"./shared-YUjOSBKO.mjs";import{T as y,P as S}from"./Panel-DbsC8A9V.mjs";import{u as b,M as C,C as w,s as A}from"./nodes-B7JRwBgl.mjs";const k=l=>[...l.children].filter(t=>t.localName==="clover-tab").map((t,e)=>{const n=t.getAttribute("value")||String(e);return{element:t,value:n,label:t.getAttribute("label")||n,labelSlot:A(t,"label")}}),E=(l,t)=>l.length===t.length&&l.every((e,n)=>e.element===t[n].element&&e.value===t[n].value&&e.label===t[n].label&&e.labelSlot===t[n].labelSlot),M=l=>l instanceof Element&&l.getAttribute("slot")==="label",a=new WeakMap;let O=0;const P=l=>(a.has(l)||a.set(l,++O),a.get(l));function T(l){const t=l.ownerDocument;for(let e=l;e&&e!==t.body;e=e.parentElement){if(!e.id)continue;const n=e.id.replace(/["\\]/g,"\\$&");if(t.querySelector(`[aria-controls~="${n}"]`)){e.hidden=true;return}}l.hidden=true}function q({hosted:l,props:t}){const e=l.element,n=b(e,()=>k(e),E),{value:r,closable:i,onValueChange:m,onClose:f,...d}=t,[h,c]=v(r),u=g(r);return p(()=>{r!==u.current&&(u.current=r,r&&c(r))},[r]),s(S,{...d,value:h,onValueChange:o=>{c(o),m(o)},onClose:i?()=>{f()&&T(e)}:void 0,children:n.length?n.map(o=>s(y,{value:o.value,label:o.labelSlot?s(w,{of:o.labelSlot}):o.label,children:s(C,{from:o.element,stays:M})},P(o.element))):null})}export{q as PanelElement};
@@ -0,0 +1 @@
1
+ import{T as i,u as e}from"./shared-YUjOSBKO.mjs";import{w as u}from"./nodes-B7JRwBgl.mjs";function a(r,t=[]){return function({props:n}){const o=i(()=>u(n,t),[n]);return e(r,{...o})}}export{a as drawn};
@@ -0,0 +1 @@
1
+ import{a as y,c as L,b as E,T as v}from"./ErrorBoundary-chQaO-Up.mjs";const b=r=>{const s=new Map,p=e=>{var t;return(t=s.get(e))==null?void 0:t.forEach(i=>i())};let a=false,o=null,n=null,d=false,l=null;const u=e=>{y(e)&&(d=true)},m=e=>{l=e.isPrimary&&e.button===0&&(e.target===r||e.target===n)?{x:e.clientX,y:e.clientY,t:e.timeStamp,direct:L(e.pointerType,d)}:null},f=e=>{const t=l;l=null,!(!t||e.timeStamp-t.t>=E||Math.hypot(e.clientX-t.x,e.clientY-t.y)>v)&&!(o!=null&&o())&&!t.direct&&p("tap")},c=e=>{e!==n&&(n==null||n.remove(),n=e,n&&(Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",objectFit:"contain"}),n.classList.add("clover-canvas-dom-media"),r.append(n)))};return r.addEventListener("pointermove",u),r.addEventListener("pointerdown",m),r.addEventListener("pointerup",f),{host:r,get isOpen(){return a},on(e,t){const i=s.get(e)??new Set;return s.set(e,i.add(t)),()=>i.delete(t)},async setImages(e,{world:t}={}){var i,g;c(((g=(i=e.find(w=>w.media))==null?void 0:i.media)==null?void 0:g.element)??null),!(!t&&!e.length)&&(p(a?"change":"open"),a=true)},clear:()=>c(null),setDismiss(e){o=e},setGestures(){},dispose(){c(null),s.clear(),r.removeEventListener("pointermove",u),r.removeEventListener("pointerdown",m),r.removeEventListener("pointerup",f)}}};export{b as p};
@@ -0,0 +1 @@
1
+ import{u as r}from"./shared-YUjOSBKO.mjs";import{L as n,P as a}from"./Provider-B61118lU.mjs";import{u as i}from"./nodes-B7JRwBgl.mjs";const s=t=>[...t.children].filter(e=>e.localName==="clover-logo").map(e=>({element:e,alt:e.getAttribute("alt")??void 0})),c=(t,e)=>t.length===e.length&&t.every((l,o)=>l.element===e[o].element&&l.alt===e[o].alt);function u({hosted:t,props:e}){const l=i(t.element,()=>s(t.element),c);return r(a,{...e,children:l.length?l.map((o,m)=>r(n,{alt:o.alt},m)):void 0})}export{u as ProviderElement};
@@ -0,0 +1 @@
1
+ const a=JSON.parse('{"commonClose":"Fechar","commonNext":"Seguinte","commonPrevious":"Anterior","commonSearch":"Pesquisar","commonViewAll":"Ver tudo","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"A carregar...","contentSearchPlaceholder":"Pesquisar","contentSearchResultsNone":"Sem resultados","contentSearchResult":"1 resultado","contentSearchResults":"{{count}} resultados","contentSearchError":"N\xE3o foi poss\xEDvel concluir a pesquisa.","contentSearchPosition":"Resultado {{index}} de {{total}}","contentSearchClear":"Limpar a pesquisa","canvasPosition":"Item {{index}} de {{total}}","canvasImage":"Imagem","canvasRoleDescription":"imagem ampli\xE1vel","canvasKeysImage":"Use as teclas de seta para deslocar a imagem, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para rodar.","canvasKeysMedia":"Prima Espa\xE7o ou K para reproduzir ou pausar, J ou L para recuar ou avan\xE7ar dez segundos, e M para silenciar ou ativar o som.","canvasKeysAnnotations":"Prima Esc para desmarcar a anota\xE7\xE3o.","sceneModel":"Modelo 3D","sceneRoleDescription":"modelo 3D rotativo","sceneKeys":"Use as teclas de seta para rodar o modelo, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para o rodar para a direita ou para a esquerda.","sceneRotateUp":"Rodar para cima","sceneRotateDown":"Rodar para baixo","sceneRotate":"Rodar","sceneResetView":"Repor a vista","statusLoading":"A carregar\u2026","statusError":"N\xE3o foi poss\xEDvel carregar este conte\xFAdo.","itemsLabel":"Itens","download":"Transferir","downloadPage":"Esta p\xE1gina","downloadAll":"Todas as p\xE1ginas","templateSidebar":"Itens","templateSidebarToggle":"Mostrar itens","collectionLabel":"Cole\xE7\xE3o","itemsScrollBack":"Mostrar itens anteriores","itemsScrollForward":"Mostrar mais itens","aboutRights":"Direitos","aboutHomepage":"P\xE1gina inicial","aboutSeeAlso":"Ver tamb\xE9m","aboutProvider":"Fornecedor","logo":"Log\xF3tipo","aboutManifest":"Manifesto IIIF","aboutCanvas":"Tela IIIF","aboutPartOf":"Parte de","aboutOpenManifest":"Abrir o manifesto completo","aboutCollection":"Cole\xE7\xE3o IIIF","annotationsHide":"Ocultar anota\xE7\xF5es","annotationsHideTip":"Ocultar","readMore":"Ler mais","readLess":"Ler menos","annotationsShow":"Mostrar na imagem","annotationsShowTime":"Mostrar na grava\xE7\xE3o","annotationsImage":"Imagem","annotationsLanguage":"Idioma","annotationsOpenLink":"Abrir a liga\xE7\xE3o","transcriptLabel":"Transcri\xE7\xE3o","imageViewerOpen":"Abrir o visualizador de imagens","imageViewerClose":"Fechar o visualizador de imagens","canvasChoice":"Alternativas","imageFullScreen":"Ecr\xE3 completo","imageExitFullScreen":"Sair do ecr\xE3 completo","imageResetZoom":"Repor o zoom","imageRotateLeft":"Rodar para a esquerda","imageRotateRight":"Rodar para a direita","imageZoomIn":"Ampliar","imageZoomOut":"Reduzir","informationPanelTabs":"Painel de informa\xE7\xF5es","sectionsScrollBack":"Mostrar separadores anteriores","sectionsScrollForward":"Mostrar mais separadores","informationPanelClose":"Fechar o painel de informa\xE7\xF5es","informationPanelTabsAbout":"Sobre","informationPanelTabsAnnotations":"Anota\xE7\xF5es","informationPanelTabsSearch":"Pesquisa","informationPanelTabsContents":"Conte\xFAdo","informationPanelTabsMap":"Mapa","informationPanelTabsCollection":"Cole\xE7\xE3o","mapUnavailable":"N\xE3o foi poss\xEDvel mostrar o mapa.","mapLabel":"Mapa","mapAttribution":"Cr\xE9ditos do mapa","mapPlaceUntitled":"Local {{number}}","mapOverlay":"Imagem georreferenciada","mapPlacesListed":"Locais listados depois do mapa: {{count}}","informationPanelToggle":"Mais informa\xE7\xF5es","playerPlay":"Reproduzir","playerPause":"Pausar","playerClose":"Fechar o reprodutor","playerMute":"Silenciar","playerUnmute":"Ativar o som","playerVolume":"Volume","playerSeek":"Posi\xE7\xE3o de reprodu\xE7\xE3o","playerCaptions":"Legendas","playerCaptionsOff":"Desativadas","playerChapters":"Cap\xEDtulos","framePrevious":"Fotograma anterior","frameNext":"Pr\xF3ximo fotograma","frameSeek":"Fotograma","frameRepeat":"Repetir","framePosition":"Fotograma {{index}} de {{total}}","playerCurrentTime":"Tempo atual","playerDuration":"Dura\xE7\xE3o","splitHandle":"Redimensionar os pain\xE9is"}');export{a as default};
@@ -0,0 +1 @@
1
+ import{a as m,M as f,b,A as v,_ as a,u as p}from"./shared-YUjOSBKO.mjs";import{u as g}from"./ReadMore-BJH-qqte.mjs";import{u as L}from"./nodes-B7JRwBgl.mjs";const M=o=>[...o.children].find(r=>!r.classList.contains("clover-read-more-button"))??null;function R({hosted:o}){const r=o.element,e=L(r,()=>M(r),Object.is),{t:s}=m(),i=f(),n=b(),c=v(null);c.current=e;const{open:t,cut:l,toggle:u}=g(c);return a(()=>(r.classList.add("clover-read-more"),()=>r.classList.remove("clover-read-more")),[r]),a(()=>{if(!e)return;const d=e.id;return d||(e.id=n),()=>{d||e.removeAttribute("id"),e.removeAttribute("data-read-more")}},[e,n]),a(()=>{e==null||e.setAttribute("data-read-more",t?"open":"")},[e,t]),!e||!(l||t)?null:p("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e.id||n,onClick:u,ref:i.ref,lang:i.langOf(t?"readLess":"readMore"),children:s(t?"readLess":"readMore")})}export{R as ReadMoreElement};
@@ -0,0 +1,22 @@
1
+ var wt=Object.defineProperty;var yt=(r,t,e)=>t in r?wt(r,t,{enumerable:true,configurable:true,writable:true,value:e}):r[t]=e;var h=(r,t,e)=>yt(r,typeof t!="symbol"?t+"":t,e);import{c as xt,r as V}from"./contexts-ByL3eA_T.mjs";import{c as P,s as S,t as I,a as vt,u as ct,i as bt,b as k,d as Tt,r as Et}from"./CanvasView-BI3YzNdK.mjs";import{a as F,w as Mt,v as D,f as Y,s as $,b as Lt,c as _t}from"./Camera-cdCqKMup.mjs";import{i as Q,a as kt,T as It,b as j,c as J,D as At,s as Pt}from"./ErrorBoundary-chQaO-Up.mjs";import{a0 as St,a1 as Rt}from"./shared-YUjOSBKO.mjs";import{a as Bt,i as tt,b as Ot}from"./imageService-dsdmcegU.mjs";function Ct(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement?r.complete&&r.naturalWidth>0:true}function zt(r,t){if(!r.bleed)return{x:0,y:0};const e=r.transform,i=Math.hypot(e.a,e.b)*t,s=Math.hypot(e.c,e.d)*t;return{x:r.bleed.right&&i>0?1/i:0,y:r.bleed.bottom&&s>0?1/s:0}}const Ut=`#version 300 es
2
+ in vec2 a_position;
3
+ uniform mat3 u_matrix;
4
+ uniform vec4 u_crop;
5
+ out vec2 v_uv;
6
+
7
+ void main() {
8
+ vec3 clip = u_matrix * vec3(a_position, 1.0);
9
+ gl_Position = vec4(clip.xy, 0.0, 1.0);
10
+ v_uv = u_crop.xy + a_position * u_crop.zw;
11
+ }
12
+ `,Wt=`#version 300 es
13
+ precision highp float;
14
+ in vec2 v_uv;
15
+ uniform sampler2D u_texture;
16
+ uniform float u_opacity;
17
+ out vec4 outColor;
18
+
19
+ void main() {
20
+ outColor = texture(u_texture, v_uv) * u_opacity;
21
+ }
22
+ `;class A{constructor(t,e,i){h(this,"kind","webgl2");h(this,"canvas");h(this,"maxTextureSize");h(this,"gl");h(this,"program",null);h(this,"vao",null);h(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});h(this,"textures",new Map);h(this,"cssWidth",1);h(this,"cssHeight",1);h(this,"pixelRatio",1);h(this,"matrixScratch",new Float32Array(9));h(this,"isLost",false);h(this,"callbacks");h(this,"handleLost",()=>{var t2,e2;this.isLost=true,this.textures.clear(),(e2=(t2=this.callbacks).onLost)==null||e2.call(t2)});this.canvas=t,this.gl=e,this.callbacks=i,this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)||4096;const s=Ft(e,Ut,Wt);this.program=s,this.uniforms={matrix:e.getUniformLocation(s,"u_matrix"),crop:e.getUniformLocation(s,"u_crop"),opacity:e.getUniformLocation(s,"u_opacity"),texture:e.getUniformLocation(s,"u_texture")};const o=e.createVertexArray();e.bindVertexArray(o);const n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),e.STATIC_DRAW);const a=e.getAttribLocation(s,"a_position");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,false,0,0),e.bindVertexArray(null),this.vao=o,e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,false),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),t.addEventListener("webglcontextlost",this.handleLost)}static create(t,e={}){let i=null;try{i=t.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{i=null}if(!i||typeof i.createShader!="function")return null;try{return new A(t,i,e)}catch{return null}}resize(t,e,i){this.cssWidth=Math.max(1,t),this.cssHeight=Math.max(1,e),this.pixelRatio=i;const s=Math.max(1,Math.round(t*i)),o=Math.max(1,Math.round(e*i));this.canvas.width!==s&&(this.canvas.width=s),this.canvas.height!==o&&(this.canvas.height=o)}begin(){if(this.isLost)return;const t=this.gl;t.viewport(0,0,this.canvas.width,this.canvas.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(this.program),t.bindVertexArray(this.vao),t.activeTexture(t.TEXTURE0),t.uniform1i(this.uniforms.texture,0)}draw(t){if(this.isLost||!Ct(t.source))return"skipped";const e=this.gl,i=this.upload(t);if(i==="tainted")return"tainted";if(!i)return"skipped";const s=t.crop??{x:0,y:0,width:t.width,height:t.height},o=zt(t,this.pixelRatio),n=P(t.transform,I(s.x,s.y),S(s.width+o.x,s.height+o.y));return e.uniformMatrix3fv(this.uniforms.matrix,false,vt(n,this.cssWidth,this.cssHeight,this.matrixScratch)),e.uniform4f(this.uniforms.crop,s.x/t.width,s.y/t.height,s.width/t.width,s.height/t.height),e.uniform1f(this.uniforms.opacity,t.opacity),e.bindTexture(e.TEXTURE_2D,i.texture),e.drawArrays(e.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(t){return!this.isLost&&this.textures.has(t)}release(t){const e=this.textures.get(t);e&&(this.isLost||this.gl.deleteTexture(e.texture),this.textures.delete(t))}dispose(){var t;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const e of[...this.textures.keys()])this.release(e);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(t=this.gl.getExtension("WEBGL_lose_context"))==null||t.loseContext(),this.isLost=true}upload(t){const e=this.gl,i=this.textures.get(t.key);if(i&&i.width===t.width&&i.height===t.height)return i;const s=(i==null?void 0:i.texture)??e.createTexture();if(!s)return null;e.bindTexture(e.TEXTURE_2D,s);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source)}catch(n){if(i||e.deleteTexture(s),Dt(n))return"tainted";throw n}e.generateMipmap(e.TEXTURE_2D),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const o={texture:s,width:t.width,height:t.height};return this.textures.set(t.key,o),o}}function Ft(r,t,e){const i=et(r,r.VERTEX_SHADER,t),s=et(r,r.FRAGMENT_SHADER,e),o=r.createProgram();if(!o)throw new Error("Could not create WebGL program");if(r.attachShader(o,i),r.attachShader(o,s),r.linkProgram(o),r.deleteShader(i),r.deleteShader(s),!r.getProgramParameter(o,r.LINK_STATUS)){const n=r.getProgramInfoLog(o);throw r.deleteProgram(o),new Error(`Could not link WebGL program: ${n}`)}return o}function et(r,t,e){const i=r.createShader(t);if(!i)throw new Error("Could not create WebGL shader");if(r.shaderSource(i,e),r.compileShader(i),!r.getShaderParameter(i,r.COMPILE_STATUS)){const s=r.getShaderInfoLog(i);throw r.deleteShader(i),new Error(`Could not compile WebGL shader: ${s}`)}return i}function Dt(r){return typeof r=="object"&&r!==null&&r.name==="SecurityError"}const Nt=.09,Ht=1e-4,it=.05,Gt=1e-4;class Xt{constructor(t,e=Nt){h(this,"current");h(this,"target",null);h(this,"timeConstant");this.current={...t},this.timeConstant=e}get destination(){return this.target?{...this.target.state}:{...this.current}}set(t){this.current={...t},this.target=null}animateTo(t,e,i=false){if(i||this.timeConstant===0){this.set(t.state);return}let s=t.anchor;if(s){const o=F(s.world,s.screen,t.state.zoom,t.state.rotation,e);Math.hypot(o.x-t.state.x,o.y-t.state.y)*t.state.zoom>it&&(s=void 0)}this.target={state:{...t.state},anchor:s}}stop(){this.target=null}step(t,e){const i=this.target;if(!i)return false;const s=1-Math.exp(-Math.max(t,0)/this.timeConstant),o=this.current,n=i.state,a=Math.exp(Math.log(o.zoom)+(Math.log(n.zoom)-Math.log(o.zoom))*s),d=o.rotation+(n.rotation-o.rotation)*s;let c;return i.anchor?c=F(i.anchor.world,i.anchor.screen,a,d,e):c={x:o.x+(n.x-o.x)*s,y:o.y+(n.y-o.y)*s},this.current={x:c.x,y:c.y,zoom:a,rotation:d},Math.abs(Math.log(n.zoom/a))<Ht&&Math.abs(n.rotation-d)<Gt&&Math.hypot(n.x-c.x,n.y-c.y)*a<it?(this.current={...n},this.target=null,false):true}}const N={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true},O=2,st=1.5,rt=.1,Zt=100,Kt=200,qt=.002,Vt=.01;class Yt{constructor(t,e,i=N){h(this,"pointers",new Map);h(this,"samples",[]);h(this,"down",null);h(this,"pinch",null);h(this,"lastTap",null);h(this,"lastPointerType","");h(this,"penHovers",false);h(this,"onPointerDown",t2=>{var i2,s;if(this.lastPointerType=t2.pointerType,t2.pointerType==="mouse"&&t2.button!==0||Q(t2.target,this.element))return;(s=(i2=this.element).setPointerCapture)==null||s.call(i2,t2.pointerId);const e2=this.local(t2);this.pointers.set(t2.pointerId,e2),this.pointers.size===1?(this.down={x:e2.x,y:e2.y,t:t2.timeStamp,moved:false},this.samples=[{x:e2.x,y:e2.y,t:t2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});h(this,"onPointerMove",t2=>{var s;kt(t2)&&(this.penHovers=true);const e2=this.pointers.get(t2.pointerId);if(!e2)return;const i2=this.local(t2);if(this.pointers.set(t2.pointerId,i2),this.pointers.size===1){const o=i2.x-e2.x,n=i2.y-e2.y;this.down&&Math.hypot(i2.x-this.down.x,i2.y-this.down.y)>It&&(this.down.moved=true),(s=this.down)!=null&&s.moved&&this.options.navigable&&this.target.panBy(o,n,false),this.samples.push({x:i2.x,y:i2.y,t:t2.timeStamp});const a=t2.timeStamp-Zt;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 o=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(o.distance/this.pinch.distance,o.mid,false),this.target.panBy(o.mid.x-this.pinch.mid.x,o.mid.y-this.pinch.mid.y,false),this.pinch=o}});h(this,"onPointerUp",t2=>{var d,c,m,f,l,u;if(!this.pointers.has(t2.pointerId))return;if(this.pointers.delete(t2.pointerId),(c=(d=this.element).releasePointerCapture)==null||c.call(d,t2.pointerId),this.pointers.size===1){this.pinch=null;const[p]=this.pointers.values();this.samples=[{...p,t:t2.timeStamp}];return}if(this.pointers.size>0)return;const e2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!e2)return;const i2=this.local(t2);if(!e2.moved&&t2.type==="pointerup"&&t2.timeStamp-e2.t<j){if((f=(m=this.target).dismiss)!=null&&f.call(m)){this.lastTap=null;return}if(J(t2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&t2.timeStamp-p.t<j&&Math.hypot(i2.x-p.x,i2.y-p.y)<At?(this.lastTap=null,this.zoomIn(i2)):this.lastTap={x:i2.x,y:i2.y,t:t2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?t2.shiftKey?this.target.zoomBy(1/O,i2,true):this.zoomIn(i2):(u=(l=this.target).tap)==null||u.call(l,i2);return}if(!this.options.navigable)return;const o=this.samples[0],n=this.samples[this.samples.length-1],a=((n==null?void 0:n.t)??0)-((o==null?void 0:o.t)??0);if(o&&n&&a>0&&t2.timeStamp-n.t<50){const p=(n.x-o.x)/a*1e3,w=(n.y-o.y)/a*1e3;Math.hypot(p,w)>Kt&&this.target.flick(p,w)}});h(this,"onDoubleClick",t2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||J(this.lastPointerType,this.penHovers)||Q(t2.target,this.element)||(t2.shiftKey?this.target.zoomBy(1/O,this.local(t2),true):this.zoomIn(this.local(t2))))});h(this,"onWheel",t2=>{const e2=t2.ctrlKey;if(!this.options.navigable||!e2&&!this.options.scrollToZoom||!e2&&Pt(t2.target,this.element,t2.deltaY))return;t2.preventDefault();const i2=$t(t2),s=e2?Vt:qt;this.target.zoomBy(Math.exp(-i2*s),this.local(t2),!e2)});h(this,"onKeyDown",t2=>{if(t2.target!==this.element||!this.options.navigable||t2.altKey||t2.metaKey||t2.ctrlKey)return;const e2=this.element.getBoundingClientRect(),i2=e2.width*rt*(t2.shiftKey?3:1),s=e2.height*rt*(t2.shiftKey?3:1);switch(t2.key){case"ArrowLeft":this.target.panBy(i2,0,true);break;case"ArrowRight":this.target.panBy(-i2,0,true);break;case"ArrowUp":this.target.panBy(0,s,true);break;case"ArrowDown":this.target.panBy(0,-s,true);break;case"+":case"=":this.target.zoomBy(st,void 0,true);break;case"-":case"_":this.target.zoomBy(1/st,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}t2.preventDefault()});this.element=t,this.target=e,this.options=i,t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.onPointerUp),t.addEventListener("pointercancel",this.onPointerUp),t.addEventListener("dblclick",this.onDoubleClick),t.addEventListener("wheel",this.onWheel,{passive:false}),t.addEventListener("keydown",this.onKeyDown)}setOptions(t){this.options=t}dispose(){const t=this.element;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown)}local(t){const e=this.element.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}zoomIn(t){var e,i;(i=(e=this.target).atMaxZoom)!=null&&i.call(e)?this.target.home():this.target.zoomBy(O,t,true)}pinchState(){const[t,e]=[...this.pointers.values()];return{distance:Math.hypot(e.x-t.x,e.y-t.y),mid:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}}function $t(r){return r.deltaMode===1?r.deltaY*16:r.deltaMode===2?r.deltaY*400:r.deltaY}class lt extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageLoadError"}}const ot=new Set;async function Qt(r,t={}){const{signal:e,maxTextureSize:i,request:s}=t,o=St(s),n=Jt(r);if(typeof createImageBitmap!="function"||typeof fetch!="function")return C(r,{signal:e,cors:true,withCredentials:o});if(n&&ot.has(n))return C(r,{signal:e,cors:false,withCredentials:o});let a;try{a=await Rt(s,r,{mode:"cors",signal:e})}catch(l){if(te(l,e))throw l;const u=await C(r,{signal:e,cors:false,withCredentials:o});return n&&ot.add(n),u}if(!a.ok)throw new lt(`Image request failed with ${a.status}`,r,a.status);const d=await a.blob();let c=await jt(d);const m=c.width,f=c.height;if(i&&(c.width>i||c.height>i)){const l=i/Math.max(c.width,c.height),u=await createImageBitmap(c,{resizeWidth:Math.max(1,Math.floor(c.width*l)),resizeHeight:Math.max(1,Math.floor(c.height*l)),resizeQuality:"high"});c.close(),c=u}if(e!=null&&e.aborted)throw c.close(),H();return{kind:"bitmap",source:c,width:c.width,height:c.height,naturalWidth:m,naturalHeight:f,opaque:false}}async function jt(r){const t={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(r,t)}catch(e){if(e instanceof TypeError)return createImageBitmap(r);throw e}}function C(r,{signal:t,cors:e,withCredentials:i}){return new Promise((s,o)=>{if(t!=null&&t.aborted){o(H());return}const n=new Image;n.decoding="async",e&&(n.crossOrigin=i?"use-credentials":"anonymous");const a=()=>{n.onload=null,n.onerror=null,t==null||t.removeEventListener("abort",d)},d=()=>{a(),n.src="",o(H())};t==null||t.addEventListener("abort",d),n.onload=()=>{a();const c=()=>s({kind:"element",source:n,width:n.naturalWidth,height:n.naturalHeight,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight,opaque:!e});typeof n.decode=="function"?n.decode().then(c,c):c()},n.onerror=()=>{a(),o(new lt("Image failed to load",r))},n.src=r})}function Jt(r){var t;try{return new URL(r,(t=globalThis.location)==null?void 0:t.href).origin}catch{return null}}function te(r,t){return!!(t!=null&&t.aborted)||typeof r=="object"&&r!==null&&r.name==="AbortError"}function H(){const r=new Error("Aborted");return r.name="AbortError",r}function nt(r){r.kind==="bitmap"&&r.source.close()}const ee=192*1024*1024,ie=6,se=2;class re{constructor(t){h(this,"entries",new Map);h(this,"inFlight",0);h(this,"frame",0);h(this,"bytes",0);h(this,"wanted",[]);h(this,"disposed",false);h(this,"budget");h(this,"maxInFlight");this.options=t,this.budget=t.byteBudget??ee,this.maxInFlight=t.maxInFlight??ie}get(t){const e=this.entries.get(t);if((e==null?void 0:e.state)==="ready")return e.lastUsed=this.frame,e.image}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="ready"}failed(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(t,e){var s;const i=this.entries.get(t);(i==null?void 0:i.state)!=="ready"&&((s=i==null?void 0:i.controller)==null||s.abort(),this.entries.set(t,{url:t,state:"ready",image:e,bytes:z(e),lastUsed:this.frame,attempts:0,pinned:false,waiters:(i==null?void 0:i.waiters)??[]}),this.bytes+=z(e),this.flushWaiters(t))}prefetch(t){return Promise.all(t.map(e=>new Promise(i=>{const s=this.entries.get(e.url);if(s&&s.state!=="loading")return i();if(s){s.waiters.push(i);return}this.start({...e,priority:-1},i)}))).then(()=>{})}update(t){if(this.disposed)return;this.frame++;const e=new Set(t.map(i=>i.url));this.wanted=[...t].sort((i,s)=>i.priority-s.priority);for(const i of this.entries.values())i.state==="loading"&&!i.pinned&&!e.has(i.url)&&i.controller&&(i.controller.abort(),this.entries.delete(i.url),this.inFlight--);for(const i of this.wanted){const s=this.entries.get(i.url);s&&(s.lastUsed=this.frame)}this.pump(),this.evict(e)}dispose(){var t;this.disposed=true;for(const e of this.entries.values())(t=e.controller)==null||t.abort(),this.flushWaiters(e.url);this.entries.clear(),this.bytes=0}forEachReady(t){for(const e of this.entries.values())e.state==="ready"&&e.image&&t(e.url,e.image)}pump(){for(const t of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(t.url)||this.start(t)}}start(t,e){const i=new AbortController,s={url:t.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:i,pinned:!!e,waiters:e?[e]:[]};this.entries.set(t.url,s),this.inFlight++,this.attempt(s,t,i,t.url)}attempt(t,e,i,s){t.attempts++,this.options.load(s,i.signal).then(o=>{if(this.disposed||this.entries.get(t.url)!==t){nt(o);return}t.state="ready",t.image=o,t.bytes=z(o),t.controller=void 0,t.pinned=false,this.bytes+=t.bytes,this.settle(t)},o=>{if(!(i.signal.aborted||this.disposed)&&this.entries.get(t.url)===t){if(t.attempts<se&&!oe(o,e)){this.attempt(t,e,i,e.fallbackUrl??e.url);return}t.state="failed",t.controller=void 0,t.pinned=false,this.settle(t)}})}settle(t){this.inFlight--,this.flushWaiters(t.url),this.options.onSettled(),this.pump()}flushWaiters(t){const e=this.entries.get(t);if(!e)return;const i=e.waiters;e.waiters=[],i.forEach(s=>s())}evict(t){if(this.bytes<=this.budget)return;const e=[...this.entries.values()].filter(i=>i.state==="ready"&&!t.has(i.url)).sort((i,s)=>i.lastUsed-s.lastUsed);for(const i of e){if(this.bytes<=this.budget)break;this.entries.delete(i.url),this.bytes-=i.bytes,i.image&&nt(i.image),this.options.onEvict(i.url)}}}function z(r){return r.width*r.height*4}function oe(r,t){if(t.fallbackUrl)return false;const e=r==null?void 0:r.status;return typeof e=="number"&&e>=400&&e<500&&e!==408&&e!==429}const ne=.1;class ae{constructor(t,e=s=>requestAnimationFrame(s),i=s=>cancelAnimationFrame(s)){h(this,"handle",0);h(this,"last",0);h(this,"disposed",false);h(this,"frame",t2=>{if(this.handle=0,this.disposed)return;const e2=this.last?Math.min((t2-this.last)/1e3,ne):1/60;this.last=t2,this.tick(e2,t2)?this.invalidate():this.last=0});this.tick=t,this.raf=e,this.caf=i}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 he=2*1024*1024;function ce(r,t,e=he){const i=new Set;let s=e,o=false;return{get deferred(){return o},getTile(n){const a=r(n);if(!a||a.kind==="media"||a.opaque||i.has(n)||t(n))return a;const d=a.width*a.height*4;if(i.size>0&&d>s){o=true;return}return s-=d,i.add(n),a}}}function le(r,t,e){if(!r)return null;let i=r.trim().replace(/^xywh=/,""),s=false;i.startsWith("pct:")?(s=true,i=i.slice(4)):i.startsWith("pixel:")&&(i=i.slice(6));const o=i.split(",").map(Number);if(o.length!==4||o.some(p=>!Number.isFinite(p)))return null;let[n,a,d,c]=o;s&&(n=n/100*t,a=a/100*e,d=d/100*t,c=c/100*e);const m=Math.max(0,n),f=Math.max(0,a),l=Math.min(t,n+d),u=Math.min(e,a+c);return l<=m||u<=f?null:{x:m,y:f,width:l-m,height:u-f}}const U=512,de=16e6;function dt(r,t,e){return{width:t,height:e,levels:[{scaleFactor:1,width:t,height:e,tileWidth:t,tileHeight:e,cols:1,rows:1}],tile:s=>({...s,url:r,region:{x:0,y:0,width:t,height:e}})}}function ue(r){const{width:t,height:e}=r,i=[],s=r.regionByPx&&r.sizeByW,o=(l,u,p)=>{const w=Math.ceil(t/l),y=Math.ceil(e/l);return{scaleFactor:l,width:w,height:y,tileWidth:u,tileHeight:p,cols:Math.ceil(w/u),rows:Math.ceil(y/p)}},n=(l,u)=>({scaleFactor:t/l,width:l,height:u,tileWidth:l,tileHeight:u,cols:1,rows:1,whole:true}),a=r.tiles[0];if(a)for(const l of a.scaleFactors)i.push(o(l,a.width,a.height));else if(s)for(let l=1;;l*=2){const u=o(l,U,U);if(i.push(u),u.cols===1&&u.rows===1)break}const d=Math.max(0,...i.map(l=>l.scaleFactor));for(const l of r.sizes){const u=t/l.width;me(r,l.width,l.height)&&u>d+1e-9&&i.push(n(l.width,l.height))}const c=i.reduce((l,u)=>!l||u.scaleFactor>l.scaleFactor?u:l,null);if(c&&c.cols*c.rows>1&&r.sizeByW){const l=Math.max(t,e)/U;i.push(n(Math.ceil(t/l),Math.ceil(e/l)))}(!i.length||!a&&!s&&t*e<=de)&&(i.some(l=>l.scaleFactor===1)||i.push(n(t,e)));const m=fe(i).sort((l,u)=>u.scaleFactor-l.scaleFactor),f=Bt(r);return{width:t,height:e,levels:m,tile(l){const u=m[l.level],p=u.scaleFactor,w=u.cols===1&&u.rows===1;let y,v,b;if(w)y={x:0,y:0,width:t,height:e},v=u.width,b=u.height;else{const _=Math.round(l.col*u.tileWidth*p),E=Math.round(l.row*u.tileHeight*p);y={x:_,y:E,width:Math.min(Math.round(u.tileWidth*p),t-_),height:Math.min(Math.round(u.tileHeight*p),e-E)},v=Math.ceil(y.width/p),b=Math.ceil(y.height/p)}return{...l,region:y,url:tt(r,y,v,b),fallbackUrl:f?tt(r,y,v,b,f):void 0}}}}function me(r,t,e){return!(r.maxWidth&&t>r.maxWidth||r.maxHeight&&e>r.maxHeight||r.maxArea&&t*e>r.maxArea)}function fe(r){const t=new Map;for(const e of r){const i=`${e.width}x${e.height}`,s=t.get(i);(!s||s.cols*s.rows<e.cols*e.rows)&&t.set(i,e)}return[...t.values()]}function pe(r,t){const e=r.levels;for(let i=0;i<e.length;i++)if(e[i].scaleFactor<=t*(1+1e-6))return i;return e.length-1}function T(r,t,e){const i=r.levels[t],s=i.tileWidth*i.scaleFactor,o=i.tileHeight*i.scaleFactor,n=Math.max(0,e.x),a=Math.max(0,e.y),d=Math.min(r.width,e.x+e.width),c=Math.min(r.height,e.y+e.height);if(d<=n||c<=a)return[];const m=Math.max(0,Math.floor(n/s)),f=Math.min(i.cols-1,Math.floor((d-1e-9)/s)),l=Math.max(0,Math.floor(a/o)),u=Math.min(i.rows-1,Math.floor((c-1e-9)/o)),p=[];for(let w=l;w<=u;w++)for(let y=m;y<=f;y++)p.push({level:t,col:y,row:w});return p}async function ge(r,t){if(r.media)return we(r,r.media);let e=null,i=null;if(r.service)try{e=ue(await Ot(r.service,t.infoOptions))}catch(m){i=m}if(!e){if(!r.url)throw i??new Error("Image has no source");const m=await t.loadStatic(r.url);t.cache.seed(r.url,m),e=dt(r.url,m.naturalWidth,m.naturalHeight)}const s=r.width&&r.height&&r.width>0&&r.height>0?{width:r.width,height:r.height}:{width:e.width,height:e.height},o=le(r.region,s.width,s.height)??{x:0,y:0,width:s.width,height:s.height},n=e.width/s.width,a=e.height/s.height,d={x:o.x*n,y:o.y*a,width:o.width*n,height:o.height*a},c={id:r.id,spec:r,pyramid:e,size:s,clip:d,contentClip:o,rect:{x:0,y:0,width:o.width,height:o.height}};return await t.cache.prefetch(T(e,0,d).map(m=>{const f=e.tile(m);return{url:f.url,fallbackUrl:f.fallbackUrl}})),c}const ut="media:";function we(r,t){var a,d;const e=r.width||((a=r.placement)==null?void 0:a.width)||t.element.videoWidth||1600,i=r.height||((d=r.placement)==null?void 0:d.height)||t.element.videoHeight||900,s=`${ut}${r.id}`,o={width:e,height:i},n={x:0,y:0,width:e,height:i};return{id:r.id,spec:r,pyramid:dt(s,e,i),media:{kind:"media",source:t.element,width:e,height:i,naturalWidth:e,naturalHeight:i},size:o,clip:n,contentClip:n,rect:{...n}}}function ye(r){if(!r.length)return null;if(r.every(i=>i.spec.placement)){for(const i of r)i.rect={...i.spec.placement};return ct(r.map(i=>i.rect))}const t=r[0].contentClip.height;let e=0;for(const i of r){const s=i.contentClip.width*t/i.contentClip.height;i.rect={x:e,y:0,width:s,height:t},e+=s}return{x:0,y:0,width:e,height:t}}function G(r){return{x:r.rect.width/r.clip.width,y:r.rect.height/r.clip.height}}function xe(r,t){var e,i;return r.service===t.service&&r.url===t.url&&r.width===t.width&&r.height===t.height&&r.region===t.region&&((e=r.media)==null?void 0:e.element)===((i=t.media)==null?void 0:i.element)&&JSON.stringify(r.placement)===JSON.stringify(t.placement)}const ve=1e7,be=15e6,Te=2e7,Ee=2;function Me(r){const{items:t,camera:e,viewport:i,pixelRatio:s,getTile:o,destination:n}=r,a=Mt(e,i),d=[],c=[],m=[],f=(l,u,p)=>{const w=l.tile(u);c.push({url:w.url,fallbackUrl:w.fallbackUrl,priority:p})};for(const l of t){const{pyramid:u,clip:p,rect:w}=l,y=G(l);if(r.wantOverview)for(const g of T(u,0,p))f(u,g,Te);const v=at(l,e,i,s),b=n?at(l,n,i,s):v;if(m.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const _=g=>x=>{const L=u.tile(x).region;return Math.hypot(L.x+L.width/2-g.x,L.y+L.height/2-g.y)};if(b){const g=_(b.center);for(const x of T(u,0,b.area))f(u,x,g(x)/1e3);if(b.target>0)for(const x of T(u,b.target,b.area))f(u,x,ve+g(x))}if(!v)continue;const{area:E,target:M}=v,X=_(v.center),R=T(u,0,E),Z=M===0?[]:T(u,M,E);if(b!==v){for(const x of R)f(u,x,X(x)/1e3);const g=M-Ee;if(g>0)for(const x of T(u,g,E))f(u,x,be+X(x))}if(l.spec.hidden)continue;const ft=(M===0?R:Z).every(g=>o(u.tile(g).url)!==void 0)?[M]:Array.from({length:M+1},(g,x)=>x),pt=P(a,I(w.x,w.y),S(y.x,y.y),I(-p.x,-p.y));for(const g of ft){const x=g===0?R:g===M?Z:T(u,g,E),L=u.levels[g].cols*u.levels[g].rows>1;for(const gt of x){const B=u.tile(gt),K=o(B.url);if(!K)continue;const q=Le(l,B.region,K,pt,L);q&&d.push({...q,url:B.url})}}}return c.sort((l,u)=>l.priority-u.priority),{draws:d,wants:_e(c),levels:m}}function at(r,t,e,i){const{pyramid:s,clip:o,rect:n}=r,a=D(t,e);if(!bt(a,n))return null;const d=G(r),c=Math.max(a.x,n.x),m=Math.max(a.y,n.y),f=Math.min(a.x+a.width,n.x+n.width),l=Math.min(a.y+a.height,n.y+n.height),u=1/(d.x*t.zoom*i);return{area:{x:o.x+(c-n.x)/d.x,y:o.y+(m-n.y)/d.y,width:(f-c)/d.x,height:(l-m)/d.y},center:{x:o.x+(t.x-n.x)/d.x,y:o.y+(t.y-n.y)/d.y},target:pe(s,u)}}function Le(r,t,e,i,s){const{clip:o}=r,n=Math.max(t.x,o.x),a=Math.max(t.y,o.y),d=Math.min(t.x+t.width,o.x+o.width),c=Math.min(t.y+t.height,o.y+o.height);if(d<=n||c<=a)return null;const m=e.width/t.width,f=e.height/t.height,l=1e-6;return{item:r,image:e,transform:P(i,I(t.x,t.y),S(1/m,1/f)),crop:{x:(n-t.x)*m,y:(a-t.y)*f,width:(d-n)*m,height:(c-a)*f},bleed:{right:s&&d<o.x+o.width-l,bottom:s&&c<o.y+o.height-l}}}function _e(r){const t=new Set;return r.filter(e=>t.has(e.url)?false:(t.add(e.url),true))}const ke={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Ie=2,Ae=3,Pe=.1,Se=1e-6,mt={top:0,right:0,bottom:0,left:0};function Re(r){if(typeof getComputedStyle!="function")return mt;const t=getComputedStyle(r),e=i=>parseFloat(i)||0;return{top:e(t.paddingTop),right:e(t.paddingRight),bottom:e(t.paddingBottom),left:e(t.paddingLeft)}}const Be=(r,t)=>r.top===t.top&&r.right===t.right&&r.bottom===t.bottom&&r.left===t.left;let Oe;class Ce{constructor(t,e={}){h(this,"host");h(this,"overlays",null);h(this,"options");h(this,"backend",null);h(this,"backendPreference");h(this,"contextLosses",0);h(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});h(this,"visible",true);h(this,"dom",null);h(this,"domAsked",false);h(this,"pending",null);h(this,"camera");h(this,"loop");h(this,"gestures");h(this,"gestureOptions",{});h(this,"cache");h(this,"navigator",null);h(this,"navigatorAsked",0);h(this,"viewport",{width:1,height:1});h(this,"inset",mt);h(this,"pixelRatio",1);h(this,"items",[]);h(this,"worldBounds",null);h(this,"contentVersion",0);h(this,"opaqueUrls",new Set);h(this,"mediaByKey",new Map);h(this,"detachMedia",[]);h(this,"opened",false);h(this,"atHome",true);h(this,"lastEmitted",null);h(this,"generation",0);h(this,"listeners",new Map);h(this,"resizeObserver",null);h(this,"intersectionObserver",null);h(this,"releaseTimer",null);h(this,"dprQuery",null);h(this,"disposed",false);h(this,"dismisser",null);h(this,"tick",t2=>{var a,d;if(this.disposed)return false;const e2=this.camera.step(t2,this.viewport),i=this.camera.current,s=this.backend,o=ce(this.getTile,c=>s?s.has(c):true),n=Me({items:this.items,camera:i,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:o.getTile,wantOverview:!!this.navigator,destination:e2?this.camera.destination:void 0});return this.cache.update(n.wants.filter(c=>!c.url.startsWith(ut))),this.paint(n.draws),(a=this.overlays)==null||a.position(i,this.viewport),(d=this.navigator)==null||d.render(this.items.filter(c=>!c.spec.hidden),this.worldBounds,D(i,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!_t(this.lastEmitted,i))&&(this.lastEmitted={...i},this.opened&&this.emit("viewport")),e2||o.deferred});h(this,"getTile",t2=>this.mediaByKey.get(t2)??this.cache.get(t2));h(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});h(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=t,this.backendPreference=e.backend??"auto",this.options={...ke,...W(e)},Ue()&&(this.options.animationTime=0),this.camera=new Xt({x:0,y:0,zoom:1,rotation:0},this.options.animationTime),this.loop=new ae(this.tick),this.gestureOptions=W(e.gestures??{}),this.gestures=new Yt(t,this,{...N,...this.gestureOptions}),this.cache=new re({load:(i,s)=>this.loadTile(i,s),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:i=>{var s;return(s=this.backend)==null?void 0:s.release(i)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=ze(t),this.visible?this.acquireBackend():this.holder.hiddenSince=ht(),this.measure(),this.observe()}get backendKind(){var t;return((t=this.backend)==null?void 0:t.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>i==null?void 0:i.delete(e)}async setImages(t,{world:e,fit:i=false}={}){const s=++this.generation,o=new Map(this.items.map(m=>[m.id,m])),n=await Promise.allSettled(t.map(m=>{const f=o.get(m.id);return f&&xe(f.spec,m)?(f.spec=m,Promise.resolve(f)):ge(m,{cache:this.cache,loadStatic:l=>this.loadTile(l),infoOptions:{request:this.options.request}})}));if(s!==this.generation||this.disposed)return;const a=n.filter(m=>m.status==="fulfilled").map(m=>m.value),d=n.filter(m=>m.status==="rejected").map(m=>m.reason);this.items=a,this.watchMedia(a);const c=ye(a);if(this.worldBounds=e?c?ct([e,c]):e:c,this.contentVersion++,d.length&&this.emit("error",d),!this.worldBounds){this.invalidate();return}this.opened?i?(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.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(t){const e=new Set(t);let i=false;for(const s of this.items){const o=e.has(s.id);!!s.spec.hidden!==o&&(s.spec={...s.spec,hidden:o},i=true)}i&&this.invalidate()}isReady(t){const e=this.items.find(s=>s.id===t);if(!e)return false;if(e.spec.media)return true;const i=e.pyramid.levels[0];if(!i)return false;for(let s=0;s<i.rows;s++)for(let o=0;o<i.cols;o++)if(!this.getTile(e.pyramid.tile({level:0,col:o,row:s}).url))return false;return true}fitBounds(t,e=false){const i=Y(t,this.viewport,this.camera.destination.rotation,0);this.atHome=false,this.animateTo(this.constrain(i,{allowBeyondLimits:true}),e)}fitItemRect(t,e,i=false){const s=this.itemRectToWorld(t,e);s&&this.fitAnnotation(s,i)}fitAnnotation(t,e=false){const i=this.items[0];if(!i)return;const s=i.rect.width*Pe;this.fitBounds({x:t.x-s,y:t.y-s,width:t.width+s*2,height:t.height+s*2},e)}getBounds(){return D(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var i;const t=((i=this.homeCamera())==null?void 0:i.zoom)??1,e=this.items.length?Math.min(...this.items.map(s=>G(s).x)):1;return{home:t,min:t*this.options.minZoomImageRatio,max:Math.max(t,this.options.maxZoomPixelRatio/e)}}home(t=false){const e=this.homeCamera();e&&(this.atHome=true,this.animateTo(e,t))}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-Se)}zoomBy(t,e,i=true){const s=i?this.camera.destination:this.camera.current,o=e??{x:this.viewport.width/2,y:this.viewport.height/2},n=$(s,this.viewport,o),{min:a,max:d}=this.getZoomLimits(),c=k(s.zoom*t,a,d),m=F(n,o,c,s.rotation,this.viewport),f=this.constrain({...s,...m,zoom:c});this.atHome=false,i?this.camera.animateTo({state:f,anchor:{world:n,screen:o}},this.viewport):this.camera.set(f),this.invalidate()}panBy(t,e,i=false){const s=i?this.camera.destination:this.camera.current,o=Tt(P(S(1/s.zoom),Et(-s.rotation)),{x:t,y:e}),n=this.constrain({...s,x:s.x-o.x,y:s.y-o.y});this.atHome=false,i?this.camera.animateTo({state:n},this.viewport):this.camera.set(n),this.invalidate()}panTo(t,e=false){const i=e?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...i,...t}),e)}flick(t,e){this.panBy(t*.25,e*.25,true)}rotateBy(t){const e=this.camera.destination;this.setRotation(e.rotation*180/Math.PI+t)}setRotation(t,e=false){const i=this.camera.destination,s=t*Math.PI/180;this.animateTo(this.constrain({...i,rotation:s}),e)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(t){this.emit("tap",t)}setDismiss(t){this.dismisser=t}dismiss(){var t;return((t=this.dismisser)==null?void 0:t.call(this))??false}setGestures(t){this.gestures.setOptions({...N,...this.gestureOptions,...W(t)})}setInteracting(t){t&&this.camera.stop()}worldToScreenPoint(t){return Lt(this.camera.current,this.viewport,t)}screenToWorldPoint(t){return $(this.camera.current,this.viewport,t)}itemRectToWorld(t,e){const i=this.items[t];if(!i)return null;const{contentClip:s}=i,o=i.rect.width/s.width,n=i.rect.height/s.height;return{x:i.rect.x+(e.x-s.x)*o,y:i.rect.y+(e.y-s.y)*n,width:e.width*o,height:e.height*n}}attachNavigator(t){var o;(o=this.navigator)==null||o.dispose(),this.navigator=null;const e=++this.navigatorAsked;let i=null,s=false;return import("./Navigator-BSJbEbuJ.mjs").then(n=>{s||this.disposed||e!==this.navigatorAsked||(i=new n.Navigator(t,(a,d)=>this.panTo(a,d)),this.navigator=i,this.invalidate())}),()=>{s=true,i==null||i.dispose(),i&&this.navigator===i&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var t,e,i,s,o,n,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(t=this.resizeObserver)==null||t.disconnect(),(e=this.intersectionObserver)==null||e.disconnect(),(s=(i=this.dprQuery)==null?void 0:i.removeEventListener)==null||s.call(i,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(o=this.navigator)==null||o.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(n=this.dom)==null||n.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(d=>d()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(t){this.detachMedia.forEach(e=>e()),this.detachMedia=[],this.mediaByKey.clear();for(const e of t){if(!e.media||e.media.kind!=="media")continue;const i=e.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(i,e.media);const s=e.media.source,o=()=>this.invalidate(),n=["play","seeked","loadeddata","resize"];n.forEach(a=>s.addEventListener(a,o)),this.detachMedia.push(()=>n.forEach(a=>s.removeEventListener(a,o)))}}paint(t){const e=this.backend,i=[],s=(e==null?void 0:e.kind)==="webgl2";e==null||e.begin();for(const o of t){const{image:n}=o;if(!(n.kind==="media"||n.kind==="element"&&s&&(n.opaque||this.opaqueUrls.has(o.url)))&&e){if(e.draw({key:o.url,source:n.source,width:n.width,height:n.height,transform:o.transform,crop:o.crop,opacity:1,bleed:o.bleed})!=="tainted"||n.kind==="bitmap")continue;this.opaqueUrls.add(o.url)}(n.kind==="element"||n.kind==="media")&&i.push({key:`${o.item.id}|${o.url}`,element:n.source,width:n.width,height:n.height,transform:o.transform,crop:o.crop,opacity:1})}e==null||e.end(),this.dom?this.dom.sync(i):i.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-BD4QPbl6.mjs").then(({DomLayers:o})=>{if(this.disposed)return;const n=new o(this.host);this.overlays&&this.host.insertBefore(n.container,this.overlays.container),this.dom=n,this.invalidate()}))}loadTile(t,e){return Qt(t,{signal:e,request:this.options.request,maxTextureSize:this.backend instanceof A?this.backend.maxTextureSize:void 0})}animateTo(t,e){this.camera.animateTo({state:t},this.viewport,e),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const t=2*Math.PI,e=Math.round(this.camera.destination.rotation/t)*t||0,{top:i,right:s,bottom:o,left:n}=this.inset,a=Y(this.worldBounds,{width:Math.max(1,this.viewport.width-n-s),height:Math.max(1,this.viewport.height-i-o)},e);return a.x-=(n-s)/2/a.zoom,a.y-=(i-o)/2/a.zoom,a}constrain(t,{allowBeyondLimits:e=false}={}){const i=this.worldBounds;if(!i)return t;const{min:s,max:o}=this.getZoomLimits(),n=e?k(t.zoom,s,Math.max(o,t.zoom)):k(t.zoom,s,o);return{...t,zoom:n,x:k(t.x,i.x,i.x+i.width),y:k(t.y,i.y,i.y+i.height)}}acquireBackend(t=true){var o,n;if(this.backend||this.pending||this.disposed)return;const e=document.createElement("canvas");e.className="clover-canvas-surface",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(e,((o=this.dom)==null?void 0:o.container)??((n=this.overlays)==null?void 0:n.container)??null);const i=t&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<Ae);let s=null;i&&(xt(this.holder)||this.backendPreference==="webgl2")&&(s=A.create(e,{onLost:this.onContextLost}),s||V(this.holder)),s?this.install(s):this.backendPreference==="webgl2"?this.none(e):(this.pending=e,(Oe??(Oe=import("./Canvas2DBackend-CnLEHRs4.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==e)return;this.pending=null;const d=a.create(e);d?this.install(d):this.none(e)}))}none(t){t.remove(),this.host.dataset.backend="none"}install(t){this.backend=t,this.host.dataset.backend=t.kind,t.resize(this.viewport.width,this.viewport.height,this.pixelRatio),t.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",t.kind),this.invalidate()}releaseBackend(){var e;if(V(this.holder),(e=this.pending)==null||e.remove(),this.pending=null,!this.backend)return;const t=this.backend.canvas;this.backend.dispose(),t.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(t=>{const e=t.some(i=>i.isIntersecting);this.setVisible(e)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(t){var e;if(this.visible=t,t){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(e=this.holder).hiddenSince??(e.hiddenSince=ht()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(t=false){var d;const e=this.host.getBoundingClientRect(),i=Math.max(1,e.width),s=Math.max(1,e.height),o=Re(this.host),n=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Ie);if(i===this.viewport.width&&s===this.viewport.height&&n===this.pixelRatio&&Be(o,this.inset))return;const a=this.viewport;if(this.viewport={width:i,height:s},this.inset=o,this.pixelRatio=n,(d=this.backend)==null||d.resize(i,s,n),this.opened)if(this.atHome)this.home(true);else{const c=this.camera.current,m=i/Math.max(a.width,1);this.camera.set(this.constrain({...c,zoom:c.zoom*m}))}t?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var t,e,i,s;typeof window>"u"||typeof window.matchMedia!="function"||((e=(t=this.dprQuery)==null?void 0:t.removeEventListener)==null||e.call(t,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(s=(i=this.dprQuery).addEventListener)==null||s.call(i,"change",this.onPixelRatioChange))}emit(t,e){var i;(i=this.listeners.get(t))==null||i.forEach(s=>s(e))}}const ht=()=>typeof performance<"u"?performance.now():Date.now();function ze(r){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:t,left:e,width:i,height:s}=r.getBoundingClientRect();return t+s>=0&&e+i>=0&&t<=window.innerHeight&&e<=window.innerWidth}function Ue(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(r){return Object.fromEntries(Object.entries(r).filter(([,t])=>t!==void 0))}const qe=(r,t)=>new Ce(r,t);export{zt as b,Ct as h,Me as p,qe as r};
@@ -0,0 +1 @@
1
+ import{u as c,A as l,x as u,ai as p,_ as d,k as m}from"./shared-YUjOSBKO.mjs";import"./styles-CyuM_fB1.mjs";const f=new WeakMap;function v(t){let n=f.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:r=>c(y,{...r,render:o})},f.set(t,n)}return n}function b(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(v)}function y({render:t,canvases:n,bodies:o,children:r}){const a=l(null),i=u(p);return d(()=>{const e=a.current;if(!e)return;const s=t(e,{canvases:n,bodies:o,clover:i});return()=>{typeof s=="function"&&s(),e.replaceChildren()}},[t,n,o,i]),c(m,{children:[c("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),r&&c("div",{className:"clover-canvas-controls",children:r})]})}export{b as toRenderers};
@@ -0,0 +1 @@
1
+ import{x as n,Z as o,Q as r}from"./shared-YUjOSBKO.mjs";const t=(s,a)=>a==="canvas"?o(s.manifest,s.canvasId):s.manifest,e=r(null),i=()=>n(e);export{e as P,t as r,i as u};
@@ -0,0 +1,3 @@
1
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function rn(r,a){(a==null||a>r.length)&&(a=r.length);for(var s=0,c=Array(a);s<a;s++)c[s]=r[s];return c}function po(r){if(Array.isArray(r))return r}function mo(r,a){var s=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(s!=null){var c,f,d,E,$=[],C=true,Dt=false;try{if(d=(s=s.call(r)).next,a!==0)for(;!(C=(c=d.call(s)).done)&&($.push(c.value),$.length!==a);C=true);}catch(et){Dt=true,f=et}finally{try{if(!C&&s.return!=null&&(E=s.return(),Object(E)!==E))return}finally{if(Dt)throw f}}return $}}function _o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function To(r,a){return po(r)||mo(r,a)||ho(r,a)||_o()}function ho(r,a){if(r){if(typeof r=="string")return rn(r,a);var s={}.toString.call(r).slice(8,-1);return s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set"?Array.from(r):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?rn(r,a):void 0}}const Sn=Object.entries,an=Object.setPrototypeOf,go=Object.isFrozen,yn=Object.getPrototypeOf,bn=Object.getOwnPropertyDescriptor;let b=Object.freeze,R=Object.seal,pt=Object.create,On=typeof Reflect<"u"&&Reflect,ye=On.apply,be=On.construct;b||(b=function(a){return a});R||(R=function(a){return a});ye||(ye=function(a,s){for(var c=arguments.length,f=new Array(c>2?c-2:0),d=2;d<c;d++)f[d-2]=arguments[d];return a.apply(s,f)});be||(be=function(a){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return new a(...c)});const W=g(Array.prototype.forEach),Ao=g(Array.prototype.lastIndexOf),sn=g(Array.prototype.pop),St=g(Array.prototype.push),Eo=g(Array.prototype.slice),So=g(Array.prototype.splice),mt=Array.isArray,me=Rn(Set),de=g(Set.prototype.add),yt=g(Set.prototype.has),tt=g(String.prototype.toLowerCase),_e=g(String.prototype.toString),ln=g(String.prototype.match),bt=g(String.prototype.replace),cn=g(String.prototype.indexOf),yo=g(String.prototype.trim),bo=g(Number.prototype.toString),Oo=g(Boolean.prototype.toString),un=typeof BigInt>"u"?null:g(BigInt.prototype.toString),fn=typeof Symbol>"u"?null:g(Symbol.prototype.toString),N=g(Object.prototype.hasOwnProperty),Ot=g(Object.prototype.toString),O=g(RegExp.prototype.test),G=Rn(TypeError);function g(r){return function(a){a instanceof RegExp&&(a.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return ye(r,a,c)}}function Rn(r){return function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return be(r,s)}}function m(r,a){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tt;if(an&&an(r,null),!mt(a))return r;let c=a.length;for(;c--;){let f=a[c];if(typeof f=="string"){const d=s(f);d!==f&&(go(a)||(a[c]=d),f=d)}r[f]=true}return r}function Ro(r){for(let a=0;a<r.length;a++)N(r,a)||(r[a]=null);return r}function M(r){const a=pt(null);for(const c of Sn(r)){var s=To(c,2);const f=s[0],d=s[1];N(r,f)&&(mt(d)?a[f]=Ro(d):d&&typeof d=="object"&&d.constructor===Object?a[f]=M(d):a[f]=d)}return a}function Do(r){switch(typeof r){case"string":return r;case"number":return bo(r);case"boolean":return Oo(r);case"bigint":return un?un(r):"0";case"symbol":return fn?fn(r):"Symbol()";case"undefined":return Ot(r);case"function":case"object":{if(r===null)return Ot(r);const a=r,s=v(a,"toString");if(typeof s=="function"){const c=s(a);return typeof c=="string"?c:Ot(c)}return Ot(r)}default:return Ot(r)}}function v(r,a){for(;r!==null;){const c=bn(r,a);if(c){if(c.get)return g(c.get);if(typeof c.value=="function")return g(c.value)}r=yn(r)}function s(){return null}return s}function Lo(r,a){for(;r!==null;){const s=bn(r,a);if(s)return s.get?g(s.get):null;r=yn(r)}return null}function wo(r){try{return O(r,""),true}catch{return false}}const pn=b(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Te=b(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),he=b(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Io=b(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ge=b(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),No=b(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mn=b(["#text"]),dn=b(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ae=b(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_n=b(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zt=b(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Co=R(/{{[\w\W]*|^[\w\W]*}}/g),Mo=R(/<%[\w\W]*|^[\w\W]*%>/g),Po=R(/\${[\w\W]*/g),vo=R(/^data-[\-\w.\u00B7-\uFFFF]+$/),xo=R(/^aria-[\-\w]+$/),Tn=R(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ko=R(/^(?:\w+script|data):/i),Uo=R(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zo=R(/^html$/i),Fo=R(/^[a-z][.\w]*(-[.\w]+)+$/i),Ee=R(/<[/\w!]/g),hn=R(/<[/\w]/g),Ho=R(/<\/no(script|embed|frames)/i),gn=R(/\/>/i),S={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wo=b(m({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Go=function(){return typeof window>"u"?null:window},Bo=function(a,s){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let c=null;const f="data-tt-policy-suffix";s&&s.hasAttribute(f)&&(c=s.getAttribute(f));const d="dompurify"+(c?"#"+c:"");try{return a.createPolicy(d,{createHTML(E){return E},createScriptURL(E){return E}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},An=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},V=function(a,s,c,f){return N(a,s)&&mt(a[s])?m(f.base?M(f.base):{},a[s],f.transform):c},Se=function(a,s,c){const f=N(a,s)?a[s]:void 0;return f&&typeof f=="object"?M(f):c()};function Dn(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Go();const a=i=>Dn(i);if(a.version="3.4.17",a.removed=[],!r||!r.document||r.document.nodeType!==S.document||!r.Element)return a.isSupported=false,a;let s=r.document;const c=s,f=c.currentScript;r.DocumentFragment;const d=r.HTMLTemplateElement,E=r.Node,$=r.Element,C=r.NodeFilter;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const Dt=r.DOMParser,et=r.trustedTypes,F=$.prototype,Mn=v(F,"cloneNode"),Ft=v(F,"remove"),Oe=v(F,"removeAttributeNode"),Pn=v(F,"nextSibling"),dt=v(F,"childNodes"),nt=v(F,"parentNode"),Ht=v(F,"shadowRoot"),Wt=v(F,"attributes"),X=E&&E.prototype?v(E.prototype,"nodeType"):null,ot=E&&E.prototype?v(E.prototype,"nodeName"):null,Lt=E&&E.prototype?v(E.prototype,"ownerDocument"):null,P=function(t){return X?X(t):t.nodeType},_t=function(t){return ot?ot(t):t.nodeName},Re=Lo(F,"namespaceURI"),Gt=function(t){return Re?Re(t):t.namespaceURI};if(typeof d=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let L,K="",Bt,De=false,Tt=0;const Le=function(){if(Tt>0)throw G('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},rt=function(t){Le(),Tt++;try{return L.createHTML(t)}finally{Tt--}},vn=function(t){Le(),Tt++;try{return L.createScriptURL(t)}finally{Tt--}},xn=function(){return De||(Bt=Bo(et,f),De=true),Bt},wt=s,Yt=wt.implementation,we=wt.createNodeIterator,kn=wt.createDocumentFragment,Un=wt.getElementsByTagName,zn=c.importNode;let _=An();a.isSupported=typeof Sn=="function"&&typeof nt=="function"&&Yt&&Yt.createHTMLDocument!==void 0;const Fn=Co,Hn=Mo,Wn=Po,Gn=vo,Bn=xo,Yn=ko,Ie=Uo,jn=Fo;let Ne=Tn,T=null;const jt=m({},[...pn,...Te,...he,...ge,...mn]);let h=null;const Vt=m({},[...dn,...Ae,..._n,...zt]);let k=Object.seal(pt(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}})),ht=null,Ce=null;const B=Object.seal(pt(null,{tagCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeCheck:{writable:true,configurable:false,enumerable:true,value:null}}));let Me=true,$t=true,Pe=false,Xt=true,H=false,q=true,Z=false,Kt=false,It=null,Nt=null,qt=false,it=false,Ct=false,Mt=false,ve=true,xe=false;const ke="user-content-";let Zt=true,Jt=false,J=null,at={},Q=null;const Ue=m({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ze=null;const Fe=m({},["audio","video","img","source","image","track"]);let He=null;const We=m({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pt="http://www.w3.org/1998/Math/MathML",vt="http://www.w3.org/2000/svg",U="http://www.w3.org/1999/xhtml";let st=U,Qt=false,te=null;const Vn=m({},[Pt,vt,U],_e),Ge=b(["mi","mo","mn","ms","mtext"]);let ee=m({},Ge);const Be=b(["annotation-xml"]);let ne=m({},Be);const $n=m({},["title","style","font","a","script"]);let gt=null;const Xn=["application/xhtml+xml","text/html"],Kn="text/html";let A=null,lt=null;const qn=s.createElement("form"),Ye=function(t){return t instanceof RegExp||t instanceof Function},oe=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(lt&&lt===t)return;(!t||typeof t!="object")&&(t={}),t=M(t),gt=Xn.indexOf(t.PARSER_MEDIA_TYPE)===-1?Kn:t.PARSER_MEDIA_TYPE,A=gt==="application/xhtml+xml"?_e:tt,T=V(t,"ALLOWED_TAGS",jt,{transform:A}),h=V(t,"ALLOWED_ATTR",Vt,{transform:A}),te=V(t,"ALLOWED_NAMESPACES",Vn,{transform:_e}),He=V(t,"ADD_URI_SAFE_ATTR",We,{transform:A,base:We}),ze=V(t,"ADD_DATA_URI_TAGS",Fe,{transform:A,base:Fe}),Q=V(t,"FORBID_CONTENTS",Ue,{transform:A}),ht=V(t,"FORBID_TAGS",M({}),{transform:A}),Ce=V(t,"FORBID_ATTR",M({}),{transform:A}),at=N(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?M(t.USE_PROFILES):t.USE_PROFILES:false,Me=t.ALLOW_ARIA_ATTR!==false,$t=t.ALLOW_DATA_ATTR!==false,Pe=t.ALLOW_UNKNOWN_PROTOCOLS||false,Xt=t.ALLOW_SELF_CLOSE_IN_ATTR!==false,H=t.SAFE_FOR_TEMPLATES||false,q=t.SAFE_FOR_XML!==false,Z=t.WHOLE_DOCUMENT||false,it=t.RETURN_DOM||false,Ct=t.RETURN_DOM_FRAGMENT||false,Mt=t.RETURN_TRUSTED_TYPE||false,qt=t.FORCE_BODY||false,ve=t.SANITIZE_DOM!==false,xe=t.SANITIZE_NAMED_PROPS||false,Zt=t.KEEP_CONTENT!==false,Jt=t.IN_PLACE||false,Ne=wo(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:Tn,st=typeof t.NAMESPACE=="string"?t.NAMESPACE:U,ee=Se(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>m({},Ge)),ne=Se(t,"HTML_INTEGRATION_POINTS",()=>m({},Be));const e=Se(t,"CUSTOM_ELEMENT_HANDLING",()=>pt(null));if(k=pt(null),N(e,"tagNameCheck")&&Ye(e.tagNameCheck)&&(k.tagNameCheck=e.tagNameCheck),N(e,"attributeNameCheck")&&Ye(e.attributeNameCheck)&&(k.attributeNameCheck=e.attributeNameCheck),N(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),R(k),H&&($t=false),Ct&&(it=true),at&&(T=m({},mn),h=pt(null),at.html===true&&(m(T,pn),m(h,dn)),at.svg===true&&(m(T,Te),m(h,Ae),m(h,zt)),at.svgFilters===true&&(m(T,he),m(h,Ae),m(h,zt)),at.mathMl===true&&(m(T,ge),m(h,_n),m(h,zt))),B.tagCheck=null,B.attributeCheck=null,N(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?B.tagCheck=t.ADD_TAGS:mt(t.ADD_TAGS)&&(T===jt&&(T=M(T)),m(T,t.ADD_TAGS,A))),N(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?B.attributeCheck=t.ADD_ATTR:mt(t.ADD_ATTR)&&(h===Vt&&(h=M(h)),m(h,t.ADD_ATTR,A))),N(t,"ADD_FORBID_CONTENTS")&&mt(t.ADD_FORBID_CONTENTS)&&(Q===Ue&&(Q=M(Q)),m(Q,t.ADD_FORBID_CONTENTS,A)),Zt&&(T["#text"]=true),Z&&m(T,["html","head","body"]),T.table&&(m(T,["tbody"]),delete ht.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const n=L;L=t.TRUSTED_TYPES_POLICY;try{K=rt("")}catch(o){throw L=n,o}}else t.TRUSTED_TYPES_POLICY===null?(L=void 0,K=""):(L===void 0&&(L=xn()),L&&typeof K=="string"&&(K=rt("")));b&&b(t),lt=t},je=m({},[...Te,...he,...Io]),Ve=m({},[...ge,...No]),Zn=function(t,e,n){return e.namespaceURI===U?t==="svg":e.namespaceURI===Pt?t==="svg"&&(n==="annotation-xml"||ee[n]):!!je[t]},Jn=function(t,e,n){return e.namespaceURI===U?t==="math":e.namespaceURI===vt?t==="math"&&ne[n]:!!Ve[t]},Qn=function(t,e,n){return e.namespaceURI===vt&&!ne[n]||e.namespaceURI===Pt&&!ee[n]?false:!Ve[t]&&($n[t]||!je[t])},to=function(t){const e=Gt(t),n=tt(_t(t)),o=nt(t);let l,u;return o&&P(o)===S.element?(l={namespaceURI:Gt(o)},u=tt(_t(o))):(l={namespaceURI:st},u="template"),te[e]?e===vt?Zn(n,l,u):e===Pt?Jn(n,l,u):e===U?Qn(n,l,u):!!(gt==="application/xhtml+xml"&&te[e]):false},Y=function(t){St(a.removed,{element:t});try{nt(t).removeChild(t)}catch{if(Ft(t),!nt(t))throw G("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},$e=function(t,e,n){try{Oe(t,e)}catch{try{t.removeAttribute(n)}catch{}}},re=function(t){ae(t);const e=dt(t);e&&W(Eo(e),o=>{try{Ft(o)}catch{}});const n=P(t)===S.element?Wt(t):null;if(n)for(let o=n.length-1;o>=0;--o){const l=n[o],u=l&&l.name;typeof u=="string"&&$e(t,l,u)}},ct=function(t,e,n){if(!n)try{n=e.getAttributeNode(t)}catch{n=null}St(a.removed,{attribute:n||null,from:e});try{n?Oe(e,n):e.removeAttribute(t)}catch{try{e.removeAttribute(t)}catch{}}if(t==="is")if(it||Ct)try{Y(e)}catch{}else try{e.setAttribute(t,"")}catch{}},Xe=function(t){const e=Wt(t);if(e)for(let n=e.length-1;n>=0;--n){const o=e[n],l=o&&o.name;typeof l!="string"||h[A(l)]||$e(t,o,l)}},ie=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;const o=[t];for(;o.length>0;){const l=o.pop();if(e(l)===false)continue;if(n&&P(l)===S.element){const p=Ht(l);j(p)&&o.push(p)}const u=dt(l);if(u)for(let p=u.length-1;p>=0;--p)o.push(u[p])}},ae=function(t){ie(t,e=>{P(e)===S.element&&Xe(e)})},se=function(t){const e=[];return ie(t,n=>{e.push(n)},true),e},eo=function(t,e){const n=me();W(se(t),o=>{P(o)===S.element&&de(n,o)}),W(e,o=>{P(o)===S.element&&!yt(n,o)&&Xe(o)})},Ke=function(t,e){let n=false;return W(a.removed,o=>{o.element&&(n=n||o.element===t,ae(o.element))}),eo(t,e),n},no=8,oo=function(t,e){const n=J;let o=null;const l=()=>(o||(o=me(),W(e,u=>{de(o,u)})),o);for(let u=0;;u++){const p=se(t),y=[t];let z=false;if(W(p,D=>{P(D)===S.documentFragment?St(y,D):!z&&!yt(n,D)&&(z=yt(l(),D))}),!z)return;if(u>=no)throw G("the tree kept changing during in-place sanitization; refusing to return it");W(y,(D,w)=>{ro(D,w>0,t,l())})}},ro=function(t,e,n,o){const l=le(t);let u;for(;u=l.nextNode();)!yt(o,u)||yt(J,u)||(e&&x(_.uponSanitizeShadowNode,u,null),ue(u,n),fe(u,n),j(u.content)&&Et(u.content))},io=function(t){J&&de(J,t)},qe=function(t,e){return q?t==="patchsrc"?true:t==="for"&&e!=="label"&&e!=="output":false},ao=function(t){q&&ie(t,e=>{const n=P(e);if(n===S.processingInstruction||n===S.comment&&O(hn,e.data)){try{Ft(e)}catch{}return false}if(n===S.element){const o=e,l=A(_t(e));try{o.hasAttribute&&o.hasAttribute("patchsrc")&&o.removeAttribute("patchsrc"),o.hasAttribute&&o.hasAttribute("for")&&qe("for",l)&&o.removeAttribute("for")}catch{}}return true})},Ze=function(t){let e=null,n=null;if(qt)t="<remove></remove>"+t;else{const u=ln(t,/^[\r\n\t ]+/);n=u&&u[0]}gt==="application/xhtml+xml"&&st===U&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=L?rt(t):t;if(st===U)try{e=new Dt().parseFromString(o,gt)}catch{}if(!e||!e.documentElement){e=Yt.createDocument(st,"template",null);try{e.documentElement.innerHTML=Qt?K:o}catch{}}const l=e.body||e.documentElement;return t&&n&&l.insertBefore(s.createTextNode(n),l.childNodes[0]||null),st===U?Un.call(e,Z?"html":"body")[0]:Z?e.documentElement:l},le=function(t){const e=Lt?Lt(t):t.ownerDocument;return we.call(e||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},xt=function(t){return t=bt(t,Fn," "),t=bt(t,Hn," "),t=bt(t,Wn," "),t},ce=function(t){var e;Je(t);const n=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");n&&W(n,o=>{j(o.content)&&ce(o.content)})},Je=function(t){t.normalize();const e=Lt?Lt(t):t.ownerDocument,n=we.call(e||t,t,C.SHOW_TEXT|C.SHOW_COMMENT|C.SHOW_CDATA_SECTION|C.SHOW_PROCESSING_INSTRUCTION,null);let o=n.nextNode();for(;o;)o.data=xt(o.data),o=n.nextNode()},kt=function(t){const e=ot?ot(t):null;return typeof e!="string"||A(e)!=="form"?false:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==Wt(t)||typeof t.removeAttribute!="function"||typeof t.removeAttributeNode!="function"||typeof t.getAttributeNode!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==X(t)||t.childNodes!==dt(t)},j=function(t){if(!X||typeof t!="object"||t===null)return false;try{return X(t)===S.documentFragment}catch{return false}},At=function(t){if(!X||typeof t!="object"||t===null)return false;try{return typeof X(t)=="number"}catch{return false}};function x(i,t,e){i.length!==0&&W(i,n=>{n.call(a,t,e,lt)})}const so=function(t,e){return!!(q&&t.hasChildNodes()&&!At(t.firstElementChild)&&O(Ee,t.textContent)&&O(Ee,t.innerHTML)||q&&Wo[e]&&P(t)===S.element&&Gt(t)===U&&(At(t.firstElementChild)||typeof t.textContent=="string"&&O(Ee,t.textContent))||t.nodeType===S.processingInstruction||q&&t.nodeType===S.comment&&O(hn,t.data))},Ut=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var n=arguments.length,o=new Array(n>2?n-2:0),l=2;l<n;l++)o[l-2]=arguments[l];return!!t(e,...o)}return false},lo=function(t,e,n){if(!ht[e]&&en(e)&&Ut(k.tagNameCheck,e))return false;if(Zt&&!Q[e]&&!Q[tt(e)]){const o=nt(t),l=dt(t);if(l&&o){const u=l.length;for(let p=u-1;p>=0;--p){const y=t===n?Mn(l[p],true):l[p];o.insertBefore(y,Pn(t))}}}return Y(t),true},Qe=function(t,e,n,o){return t.length===0?e:e===n||e===o?M(e):e},ut=function(t,e){return t===e||nt(t)!==null?false:(Jt&&ae(t),true)},ue=function(t,e){if(io(t),x(_.beforeSanitizeElements,t,null),ut(t,e))return true;if(kt(t))return Y(t),true;const n=A(_t(t));if(T=Qe(_.uponSanitizeElement,T,jt,It),x(_.uponSanitizeElement,t,{tagName:n,allowedTags:T}),ut(t,e))return true;if(so(t,n))return Y(t),true;if(ht[n]||!(B.tagCheck instanceof Function&&B.tagCheck(n))&&!T[n]){const o=lo(t,n,e);return o===false&&(x(_.afterSanitizeElements,t,null),ut(t,e))?true:o}if(P(t)===S.element&&!to(t)||(n==="noscript"||n==="noembed"||n==="noframes")&&O(Ho,t.innerHTML))return Y(t),true;if(H&&t.nodeType===S.text){const o=xt(t.textContent);t.textContent!==o&&(St(a.removed,{element:t.cloneNode()}),t.textContent=o)}return x(_.afterSanitizeElements,t,null),ut(t,e)},tn=function(t,e,n){if(Ce[e]||qe(e,t)||ve&&(e==="id"||e==="name")&&(n in s||n in qn))return false;const o=h[e]||B.attributeCheck instanceof Function&&B.attributeCheck(e,t);return $t&&O(Gn,e)||Me&&O(Bn,e)?true:o?He[e]||O(Ne,bt(n,Ie,""))||(e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&cn(n,"data:")===0&&ze[t]||Pe&&!O(Yn,bt(n,Ie,""))?true:!n:en(t)&&Ut(k.tagNameCheck,t)&&Ut(k.attributeNameCheck,e,t)||e==="is"&&k.allowCustomizedBuiltInElements&&Ut(k.tagNameCheck,n)},co=m({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),en=function(t){return!co[tt(t)]&&O(jn,t)},uo=function(t,e,n,o){if(L&&typeof et=="object"&&typeof et.getAttributeType=="function"&&!n)switch(et.getAttributeType(t,e)){case"TrustedHTML":return rt(o);case"TrustedScriptURL":return vn(o)}return o},fo=function(t,e,n,o){try{return n?t.setAttributeNS(n,e,o):t.setAttribute(e,o),kt(t)?(Y(t),false):true}catch{return ct(e,t),false}},nn=function(t,e){return q&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e)?true:tt(t)==="attributename"&&ln(e,"href")!==null},fe=function(t,e){if(x(_.beforeSanitizeAttributes,t,null),ut(t,e))return;const n=t.attributes;if(!n||kt(t))return;h=Qe(_.uponSanitizeAttribute,h,Vt,Nt);const o={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:h,forceKeepAttr:void 0};let l=n.length;const u=A(t.nodeName);for(;l--;){const p=n[l],y=p.name,z=p.namespaceURI,D=p.value,w=A(y),ft=D;let I=y==="value"?ft:yo(ft),on=false;if(o.attrName=w,o.attrValue=I,o.keepAttr=true,o.forceKeepAttr=void 0,x(_.uponSanitizeAttribute,t,o),I=o.attrValue,xe&&(w==="id"||w==="name")&&cn(I,ke)!==0&&(ct(y,t,p),I=ke+I,on=true),nn(y,I)){ct(y,t,p);continue}if(!o.forceKeepAttr){if(!o.keepAttr){ct(y,t,p);continue}if(!Xt&&O(gn,I)){ct(y,t,p);continue}if(H&&(I=xt(I)),!tn(u,w,I)){ct(y,t,p);continue}I=uo(u,w,z,I),I!==ft&&fo(t,y,z,I)&&on&&sn(a.removed)}}x(_.afterSanitizeAttributes,t,null),ut(t,e)},Et=function(t){let e=null;const n=le(t);for(x(_.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(x(_.uponSanitizeShadowNode,e,null),ue(e,t),fe(e,t),j(e.content)&&Et(e.content),P(e)===S.element){const o=Ht(e);j(o)&&(pe(o),Et(o))}H&&Je(t),x(_.afterSanitizeShadowDOM,t,null)},pe=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const n=e.pop();if(n.shadow){Et(n.shadow);continue}const o=n.node,l=P(o)===S.element,u=dt(o);if(u)for(let p=u.length-1;p>=0;--p)e.push({node:u[p],shadow:null});if(l){const p=ot?ot(o):null;if(typeof p=="string"&&A(p)==="template"){const y=o.content;j(y)&&e.push({node:y,shadow:null})}}if(l){const p=Ht(o);j(p)&&e.push({node:null,shadow:p},{node:p,shadow:null})}}};return a.sanitize=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,n=null,o=null,l=null;if(Qt=!i,Qt&&(i="<!-->"),typeof i!="string"&&!At(i)&&(i=Do(i),typeof i!="string"))throw G("dirty is not a string, aborting");if(!a.isSupported)return i;Kt?(T=It,h=Nt):oe(t),(_.uponSanitizeElement.length>0||_.uponSanitizeAttribute.length>0)&&(T=M(T)),_.uponSanitizeAttribute.length>0&&(h=M(h)),a.removed=[];const u=Jt&&typeof i!="string"&&At(i);let p=[];const y=J;if(u){ao(i);const w=_t(i);if(typeof w=="string"){const ft=A(w);if(!T[ft]||ht[ft])throw re(i),G("root node is forbidden and cannot be sanitized in-place")}if(kt(i))throw re(i),G("root node is clobbered and cannot be sanitized in-place");p=se(i),J=me()}else if(At(i))e=Ze("<!---->"),n=e.ownerDocument.importNode(i,true),n.nodeType===S.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?e=n:e.appendChild(n),pe(e);else{if(!it&&!H&&!Z&&i.indexOf("<")===-1)return L&&Mt?rt(i):i;if(e=Ze(i),!e)return it?null:Mt?K:""}e&&qt&&Y(e.firstChild);const z=u?i:e;try{u&&pe(i);const w=le(z);for(;o=w.nextNode();)ue(o,z),fe(o,z),j(o.content)&&Et(o.content);u&&oo(i,p)}catch(w){throw u&&(re(i),Ke(i,p)),w}finally{J=y}if(u){if(Ke(i,p))throw G("a node selected for removal could not be safely returned; refusing to sanitize in place");return H&&ce(i),i}if(it){if(H&&ce(e),Ct)for(l=kn.call(e.ownerDocument);e.firstChild;)l.appendChild(e.firstChild);else l=e;return(h.shadowroot||h.shadowrootmode)&&(l=zn.call(c,l,true)),l}let D=Z?e.outerHTML:e.innerHTML;return Z&&T["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&O(zo,e.ownerDocument.doctype.name)&&(D="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
3
+ `+D),H&&(D=xt(D)),L&&Mt?rt(D):D},a.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(i),Kt=true,It=T,Nt=h},a.clearConfig=function(){lt=null,Kt=false,It=null,Nt=null,L=Bt,K=""},a.isValidAttribute=function(i,t,e){lt||oe({});const n=A(i),o=A(t);return typeof e=="string"&&(nn(t,e)||!Xt&&O(gn,e))?false:tn(n,o,e)},a.addHook=function(i,t){typeof t=="function"&&N(_,i)&&St(_[i],t)},a.removeHook=function(i,t){if(N(_,i)){if(t!==void 0){const e=Ao(_[i],t);return e===-1?void 0:So(_[i],e,1)[0]}return sn(_[i])}},a.removeHooks=function(i){N(_,i)&&(_[i]=[])},a.removeAllHooks=function(){_=An()},a}var Yo=Dn();const Ln=["a","b","br","i","img","p","small","span","sub","sup"],wn=["href","alt","src","height","width","lang","dir"],In=["height","width","lang","dir"],Nn=/^(?:https?|mailto):/i,Cn={ALLOWED_TAGS:Ln,ALLOWED_ATTR:wn,ADD_URI_SAFE_ATTR:In,ALLOWED_URI_REGEXP:Nn,ALLOW_ARIA_ATTR:false,ALLOW_DATA_ATTR:false},jo={...Cn,ALLOWED_TAGS:[...Ln,"ul","ol","li","div"],ALLOWED_ATTR:[...wn,"role","aria-level","start","id","aria-labelledby"],ADD_URI_SAFE_ATTR:[...In,"aria-level","start","id","aria-labelledby"]},En=/^clover-md-\d+$/,Vo={role:[["P",/^heading$/],["DIV",/^group$/]],"aria-level":[["P",/^[1-6]$/]],start:[["OL",/^\d+$/]],id:[["P",En]],"aria-labelledby":[["DIV",En]]};let Rt=null;function $o(){return Rt||(Rt=Yo(window),Rt.addHook("afterSanitizeAttributes",r=>{var a,s;for(const c of["src","href"]){const f=(a=r.getAttribute)==null?void 0:a.call(r,c);f&&!Nn.test(f.trim())&&r.removeAttribute(c)}for(const[c,f]of Object.entries(Vo)){const d=(s=r.getAttribute)==null?void 0:s.call(r,c);d!=null&&!f.some(([E,$])=>r.nodeName===E&&$.test(d))&&r.removeAttribute(c)}}),Rt)}function Xo(r,{markdown:a=false}={}){return typeof window>"u"?r:$o().sanitize(r,a?jo:Cn)}export{Xo as sanitizeHTML};
@@ -0,0 +1 @@
1
+ import{ae as w,j as f,n as x,W as S}from"./shared-YUjOSBKO.mjs";const A=10;async function R(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await b(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function b(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<A&&!d.has(n);){d.add(n);const c=await w(s,n,o);i.push(c),n=$(c)}return E(i,t)}function T(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function $(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function E(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?T(a.on):f(a.target)[0],v=x(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{E as readResults,b as search,R as searchInto};
@@ -0,0 +1 @@
1
+ var ko=Object.defineProperty;var Oo=(e,t,n)=>t in e?ko(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var X=(e,t,n)=>Oo(e,typeof t!="symbol"?t+"":t,n);import{a as Oe}from"./index-B7nZdqLg.mjs";const Po=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","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","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","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open the link","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerClose":"Close player","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","framePrevious":"Previous frame","frameNext":"Next frame","frameSeek":"Frame","frameRepeat":"Repeat","framePosition":"Frame {{index}} of {{total}}","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),Sn={es:()=>import("./es-BwMkoRod.mjs"),fi:()=>import("./fi-gPFOn9RK.mjs"),fr:()=>import("./fr-DUHmgdJo.mjs"),nb:()=>import("./nb-BSvnQ6jd.mjs"),nn:()=>import("./nn-Dg2_HdZu.mjs"),no:()=>import("./no-BSvnQ6jd.mjs"),pt:()=>import("./pt-B3J80JgO.mjs")};function Cn(){const e=[];return typeof document<"u"&&e.push(document.documentElement.lang),typeof navigator<"u"&&e.push(...navigator.languages??[],navigator.language),e.filter(Boolean)}const B="clover",W={en:{[B]:{...Po}}};let fe,xn=[],De=0;const Xe=new Set;function ut(){De++,Xe.forEach(e=>e())}function Eo(e){const t=e.split("-")[0];return t&&t!==e?[e,t]:[e]}const Nt=new Map,Io=e=>Object.prototype.hasOwnProperty.call(Sn,e);function Mo(e){let t=Nt.get(e);return t||(t=Sn[e]().then(({default:n})=>{var o;W[e]={...W[e],[B]:{...n,...(o=W[e])==null?void 0:o[B]}},ut()},()=>{}),Nt.set(e,t)),t}function kn(e){const t=e.find(n=>n==="en"||Io(n));return t&&t!=="en"?Mo(t):Promise.resolve()}let Ne=[],$t="";function we(){const e=fe?`${De}`:`${De} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(e===$t)return Ne;$t=e;const t=fe?[fe]:Cn();return Ne=[...new Set([...t,...xn].flatMap(Eo).concat("en"))],kn(Ne),Ne}function On(e,t){const n=o=>o.split("-")[0].toLowerCase();return n(e)===n(t)}function Pn(e,t){if(e)return On(e,t||U.resolvedLanguage)?void 0:e}const U={get language(){return fe??we().find(e=>W[e])??"en"},get resolvedLanguage(){return we().find(e=>{var t;return Object.keys(((t=W[e])==null?void 0:t[B])??{}).length>0})??"en"},changeLanguage(e){fe=e,ut()},resolve(e,t,n=B){var r,s;let o={text:e};for(const i of we()){const a=(s=(r=W[i])==null?void 0:r[n])==null?void 0:s[e];if(a!==void 0){o={text:a,lang:i};break}}return t?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in t?String(t[a]):i)}:o},t(e,t,n=B){return U.resolve(e,t,n).text},langOf(e,t,n=B){return Pn(U.resolve(e,void 0,n).lang,t)},ready(){return kn(we())},subscribe(e){return Xe.add(e),()=>{Xe.delete(e)}},getSnapshot(){return De}};typeof document<"u"&&we();function No(e={}){for(const[t,n]of Object.entries(e.resources??{}))for(const[o,r]of Object.entries(n??{}))W[t]??(W[t]={}),W[t][o]={...W[t][o],...r};return e.fallbackLng!==void 0&&(xn=e.fallbackLng===false?[]:[e.fallbackLng].flat()),e.lng&&(fe=e.lng),ut(),U}const Ds=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:B,cloverI18n:U,initCloverI18n:No,langWithin:Pn,sameLanguage:On},Symbol.toStringTag,{value:"Module"}));var Pe,C,En,ae,At,In,Mn,Nn,ft,Qe,et,$n,xe={},An=[],$o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ee=Array.isArray;function J(e,t){for(var n in t)e[n]=t[n];return e}function _t(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ee(e,t,n){var o,r,s,i={};for(s in t)s=="key"?o=t[s]:s=="ref"?r=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Pe.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return Ce(e,i,o,r,null)}function Ce(e,t,n,o,r){var s={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++En,__i:-1,__u:0};return r==null&&C.vnode!=null&&C.vnode(s),s}function Ao(){return{current:null}}function q(e){return e.children}function V(e,t){this.props=e,this.context=t}function _e(e,t){if(t==null)return e.__?_e(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?_e(e):null}function Tn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Tn(e)}}function tt(e){(!e.__d&&(e.__d=true)&&ae.push(e)&&!Fe.__r++||At!=C.debounceRendering)&&((At=C.debounceRendering)||In)(Fe)}function Fe(){for(var e,t,n,o,r,s,i,a=1;ae.length;)ae.length>a&&ae.sort(Mn),e=ae.shift(),a=ae.length,e.__d&&(n=void 0,o=void 0,r=(o=(t=e).__v).__e,s=[],i=[],t.__P&&((n=J({},o)).__v=o.__v+1,C.vnode&&C.vnode(n),dt(t.__P,n,o,t.__n,t.__P.namespaceURI,32&o.__u?[r]:null,s,r??_e(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,Hn(s,n,i),o.__e=o.__=null,n.__e!=r&&Tn(n)));Fe.__r=0}function Rn(e,t,n,o,r,s,i,a,l,u,f){var c,p,d,g,O,k,b,y=o&&o.__k||An,x=t.length;for(l=To(n,t,y,l,x),c=0;c<x;c++)(d=n.__k[c])!=null&&(p=d.__i==-1?xe:y[d.__i]||xe,d.__i=c,k=dt(e,d,p,r,s,i,a,l,u,f),g=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&pt(p.ref,null,d),f.push(d.ref,d.__c||g,d)),O==null&&g!=null&&(O=g),(b=!!(4&d.__u))||p.__k===d.__k?l=Ln(d,l,e,b):typeof d.type=="function"&&k!==void 0?l=k:g&&(l=g.nextSibling),d.__u&=-7);return n.__e=O,l}function To(e,t,n,o,r){var s,i,a,l,u,f=n.length,c=f,p=0;for(e.__k=new Array(r),s=0;s<r;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(l=s+p,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Ce(null,i,null,null,null):Ee(i)?Ce(q,{children:i},null,null,null):i.constructor==null&&i.__b>0?Ce(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(u=i.__i=Ro(i,n,l,c))!=-1&&(c--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(r>f?p--:r<f&&p++),typeof i.type!="function"&&(i.__u|=4)):u!=l&&(u==l-1?p--:u==l+1?p++:(u>l?p--:p++,i.__u|=4))):e.__k[s]=null;if(c)for(s=0;s<f;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=_e(a)),Dn(a,a));return o}function Ln(e,t,n,o){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Ln(r[s],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=_e(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Q(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ee(e)?e.some(function(n){Q(n,t)}):t.push(e)),t}function Ro(e,t,n,o){var r,s,i,a=e.key,l=e.type,u=t[n],f=u!=null&&(2&u.__u)==0;if(u===null&&e.key==null||f&&a==u.key&&l==u.type)return n;if(o>(f?1:0)){for(r=n-1,s=n+1;r>=0||s<t.length;)if((u=t[i=r>=0?r--:s++])!=null&&!(2&u.__u)&&a==u.key&&l==u.type)return i}return-1}function Tt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||$o.test(t)?n:n+"px"}function $e(e,t,n,o,r){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Tt(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||Tt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(Nn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?o?n.u=o.u:(n.u=ft,e.addEventListener(t,s?et:Qe,s)):e.removeEventListener(t,s?et:Qe,s);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===false&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Rt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ft++;else if(t.t<n.u)return;return n(C.event?C.event(t):t)}}}function dt(e,t,n,o,r,s,i,a,l,u){var f,c,p,d,g,O,k,b,y,x,T,F,R,te,j,K,G,A=t.type;if(t.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=C.__b)&&f(t);e:if(typeof A=="function")try{if(b=t.props,y="prototype"in A&&A.prototype.render,x=(f=A.contextType)&&o[f.__c],T=f?x?x.props.value:f.__:o,n.__c?k=(c=t.__c=n.__c).__=c.__E:(y?t.__c=c=new A(b,T):(t.__c=c=new V(b,T),c.constructor=A,c.render=Ho),x&&x.sub(c),c.props=b,c.state||(c.state={}),c.context=T,c.__n=o,p=c.__d=true,c.__h=[],c._sb=[]),y&&c.__s==null&&(c.__s=c.state),y&&A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=J({},c.__s)),J(c.__s,A.getDerivedStateFromProps(b,c.__s))),d=c.props,g=c.state,c.__v=t,p)y&&A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),y&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(y&&A.getDerivedStateFromProps==null&&b!==d&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(b,T),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(b,c.__s,T)===false||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=b,c.state=c.__s,c.__d=false),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(D){D&&(D.__=t)}),F=0;F<c._sb.length;F++)c.__h.push(c._sb[F]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(b,c.__s,T),y&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(d,g,O)})}if(c.context=T,c.props=b,c.__P=e,c.__e=false,R=C.__r,te=0,y){for(c.state=c.__s,c.__d=false,R&&R(t),f=c.render(c.props,c.state,c.context),j=0;j<c._sb.length;j++)c.__h.push(c._sb[j]);c._sb=[]}else do c.__d=false,R&&R(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++te<25);c.state=c.__s,c.getChildContext!=null&&(o=J(J({},o),c.getChildContext())),y&&!p&&c.getSnapshotBeforeUpdate!=null&&(O=c.getSnapshotBeforeUpdate(d,g)),K=f,f!=null&&f.type===q&&f.key==null&&(K=Un(f.props.children)),a=Rn(e,Ee(K)?K:[K],t,n,o,r,s,i,a,l,u),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),k&&(c.__E=c.__=null)}catch(D){if(t.__v=null,l||s!=null)if(D.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else{for(G=s.length;G--;)_t(s[G]);nt(t)}else t.__e=n.__e,t.__k=n.__k,D.then||nt(t);C.__e(D,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Lo(n.__e,t,n,o,r,s,i,l,u);return(f=C.diffed)&&f(t),128&t.__u?void 0:a}function nt(e){e&&e.__c&&(e.__c.__e=true),e&&e.__k&&e.__k.forEach(nt)}function Hn(e,t,n){for(var o=0;o<n.length;o++)pt(n[o],n[++o],n[++o]);C.__c&&C.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(s){s.call(r)})}catch(s){C.__e(s,r.__v)}})}function Un(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Ee(e)?e.map(Un):J({},e)}function Lo(e,t,n,o,r,s,i,a,l){var u,f,c,p,d,g,O,k=n.props,b=t.props,y=t.type;if(y=="svg"?r="http://www.w3.org/2000/svg":y=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((d=s[u])&&"setAttribute"in d==!!y&&(y?d.localName==y:d.nodeType==3)){e=d,s[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(b);e=document.createElementNS(r,y,b.is&&b),a&&(C.__m&&C.__m(t,s),a=false),s=null}if(y==null)k===b||a&&e.data==b||(e.data=b);else{if(s=s&&Pe.call(e.childNodes),k=n.props||xe,!a&&s!=null)for(k={},u=0;u<e.attributes.length;u++)k[(d=e.attributes[u]).name]=d.value;for(u in k)if(d=k[u],u!="children"){if(u=="dangerouslySetInnerHTML")c=d;else if(!(u in b)){if(u=="value"&&"defaultValue"in b||u=="checked"&&"defaultChecked"in b)continue;$e(e,u,null,d,r)}}for(u in b)d=b[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?f=d:u=="value"?g=d:u=="checked"?O=d:a&&typeof d!="function"||k[u]===d||$e(e,u,d,k[u],r);if(f)a||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),Rn(t.type=="template"?e.content:e,Ee(p)?p:[p],t,n,o,y=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&_e(n,0),a,l),s!=null)for(u=s.length;u--;)_t(s[u]);a||(u="value",y=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[u]||y=="progress"&&!g||y=="option"&&g!=k[u])&&$e(e,u,g,k[u],r),u="checked",O!=null&&O!=e[u]&&$e(e,u,O,k[u],r))}return e}function pt(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(r){C.__e(r,n)}}function Dn(e,t,n){var o,r;if(C.unmount&&C.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||pt(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){C.__e(s,t)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&Dn(o[r],t,n||typeof e.type!="function");n||_t(e.__e),e.__c=e.__=e.__e=void 0}function Ho(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var o,r,s,i;t==document&&(t=document.documentElement),C.__&&C.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],dt(t,e=(!o&&n||t).__k=ee(q,null,[e]),r||xe,xe,t.namespaceURI,!o&&n?[n]:r?null:t.firstChild?Pe.call(t.childNodes):null,s,!o&&n?n:r?r.__e:t.firstChild,o,i),Hn(s,e,i)}function Fn(e,t){ke(e,t,Fn)}function Uo(e,t,n){var o,r,s,i,a=J({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?o=t[s]:s=="ref"?r=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?Pe.call(arguments,2):n),Ce(e.type,a,o||e.key,r||e.ref,null)}function Ie(e){function t(n){var o,r;return this.getChildContext||(o=new Set,(r={})[t.__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,tt(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 t.__c="__cC"+$n++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,o){return n.children(o)}).contextType=t,t}Pe=An.slice,C={__e:function(e,t,n,o){for(var r,s,i;t=t.__;)if((r=t.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(e)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),i=r.__d),i)return r.__E=r}catch(a){e=a}throw e}},En=0,V.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=J({},this.state),typeof e=="function"&&(e=e(J({},n),this.props)),e&&J(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tt(this))},V.prototype.forceUpdate=function(e){this.__v&&(this.__e=true,e&&this.__h.push(e),tt(this))},V.prototype.render=q,ae=[],In=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mn=function(e,t){return e.__v.__b-t.__v.__b},Fe.__r=0,Nn=/(PointerCapture)$|Capture$/i,ft=0,Qe=Rt(false),et=Rt(true),$n=0;var Do=0;function N(e,t,n,o,r,s){t||(t={});var i,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?i=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Do,__i:-1,__u:0,__source:r,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)l[a]===void 0&&(l[a]=i[a]);return C.vnode&&C.vnode(u),u}var oe,E,qe,Lt,de=0,jn=[],M=C,Ht=M.__b,Ut=M.__r,Dt=M.diffed,Ft=M.__c,jt=M.unmount,Wt=M.__;function he(e,t){M.__h&&M.__h(E,e,de||t),de=0;var n=E.__H||(E.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function re(e){return de=1,vt(Vn,e)}function vt(e,t,n){var o=he(oe++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Vn(void 0,t),function(a){var l=o.__N?o.__N[0]:o.__[0],u=o.t(l,a);l!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=E,!E.__f)){var r=function(a,l,u){if(!o.__c.__H)return true;var f=o.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!s||s.call(this,a,l,u);var c=o.__c.props!==a;return f.forEach(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(c=true)}}),s&&s.call(this,a,l,u)||c};E.__f=true;var s=E.shouldComponentUpdate,i=E.componentWillUpdate;E.componentWillUpdate=function(a,l,u){if(this.__e){var f=s;s=void 0,r(a,l,u),s=f}i&&i.call(this,a,l,u)},E.shouldComponentUpdate=r}return o.__N||o.__}function $(e,t){var n=he(oe++,3);!M.__s&&mt(n.__H,t)&&(n.__=e,n.u=t,E.__H.__h.push(n))}function Z(e,t){var n=he(oe++,4);!M.__s&&mt(n.__H,t)&&(n.__=e,n.u=t,E.__h.push(n))}function L(e){return de=5,ce(function(){return{current:e}},[])}function Wn(e,t,n){de=6,Z(function(){if(typeof e=="function"){var o=e(t());return function(){e(null),o&&typeof o=="function"&&o()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function ce(e,t){var n=he(oe++,7);return mt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function pe(e,t){return de=8,ce(function(){return e},t)}function se(e){var t=E.context[e.__c],n=he(oe++,9);return n.c=e,t?(n.__==null&&(n.__=true,t.sub(E)),t.props.value):e.__}function Bn(e,t){M.useDebugValue&&M.useDebugValue(t?t(e):e)}function ht(){var e=he(oe++,11);if(!e.__){for(var t=E.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Fo(){for(var e;e=jn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Le),e.__H.__h.forEach(ot),e.__H.__h=[]}catch(t){e.__H.__h=[],M.__e(t,e.__v)}}M.__b=function(e){E=null,Ht&&Ht(e)},M.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Wt&&Wt(e,t)},M.__r=function(e){Ut&&Ut(e),oe=0;var t=(E=e.__c).__H;t&&(qe===E?(t.__h=[],E.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Le),t.__h.forEach(ot),t.__h=[],oe=0)),qe=E},M.diffed=function(e){Dt&&Dt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(jn.push(t)!==1&&Lt===M.requestAnimationFrame||((Lt=M.requestAnimationFrame)||jo)(Fo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),qe=E=null},M.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Le),n.__h=n.__h.filter(function(o){return!o.__||ot(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],M.__e(o,n.__v)}}),Ft&&Ft(e,t)},M.unmount=function(e){jt&&jt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{Le(o)}catch(r){t=r}}),n.__H=void 0,t&&M.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function jo(e){var t,n=function(){clearTimeout(o),Bt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function Le(e){var t=E,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),E=t}function ot(e){var t=E;e.__c=e.__(),E=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Vn(e,t){return typeof t=="function"?t(e):t}function zn(e,t){for(var n in t)e[n]=t[n];return e}function rt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return true;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return true;return false}function ie(e,t){var n=t(),o=re({t:{__:n,u:t}}),r=o[0].t,s=o[1];return Z(function(){r.__=n,r.u=t,Ke(r)&&s({t:r})},[e,n,t]),$(function(){return Ke(r)&&s({t:r}),e(function(){Ke(r)&&s({t:r})})},[e]),n}function Ke(e){var t,n,o=e.u,r=e.__;try{var s=o();return!((t=r)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return true}}function qn(e){e()}function Kn(e){return e}function Jn(){return[false,qn]}var Zn=Z;function st(e,t){this.props=e,this.context=t}function gt(e,t){function n(r){var s=this.props.ref,i=s==r.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,r)||!i:rt(this.props,r)}function o(r){return this.shouldComponentUpdate=n,ee(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=e,o}(st.prototype=new V).isPureReactComponent=true,st.prototype.shouldComponentUpdate=function(e,t){return rt(this.props,e)||rt(this.state,t)};var Vt=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Vt&&Vt(e)};var Wo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Bo(e){function t(n){var o=zn({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Wo,t.render=e,t.prototype.isReactComponent=t.__f=true,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var zt=function(e,t){return e==null?null:Q(Q(e).map(t))},Vo={map:zt,forEach:zt,count:function(e){return e?Q(e).length:0},only:function(e){var t=Q(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Q},zo=C.__e;C.__e=function(e,t,n,o){if(e.then){for(var r,s=t;s=s.__;)if((r=s.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}zo(e,t,n,o)};var qt=C.unmount;function Gn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=zn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=true,e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Gn(o,t,n)})),e}function Yn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Yn(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=true,e.__c.__P=n)),e}function He(){this.__u=0,this.o=null,this.__b=null}function Xn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function qo(e){var t,n,o;function r(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw t;return ee(n,s)}return r.displayName="Lazy",r.__f=true,r}function Se(){this.i=null,this.l=null}C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),qt&&qt(e)},(He.prototype=new V).__c=function(e,t){var n=t.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Xn(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 l=o.state.__a;o.__v.__k[0]=Yn(l,l.__c.__P,l.__c.__O)}var u;for(o.setState({__a:o.__b=null});u=o.o.pop();)u.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},He.prototype.componentWillUnmount=function(){this.o=[]},He.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Gn(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&ee(q,null,e.fallback);return r&&(r.__u&=-33),[ee(q,null,t.__a?null:e.children),r]};var Kt=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Ko(e){return this.getChildContext=function(){return e.context},e.children}function Jo(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){ke(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var o=t.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return true},insertBefore:function(r,s){this.childNodes.push(r),t.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}}ke(ee(Ko,{context:t.context},e.__v),t.v)}function yt(e,t){var n=ee(Jo,{__v:e,h:t});return n.containerInfo=t,n}(Se.prototype=new V).__a=function(e){var t=this,n=Xn(t.__v),o=t.l.get(e);return o[0]++,function(r){var s=function(){t.props.revealOrder?(o.push(r),Kt(t,e,o)):r()};n?n(s):s()}},Se.prototype.render=function(e){this.i=null,this.l=new Map;var t=Q(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Kt(e,n,t)})};var Qn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Zo=/^(?: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]/,Go=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Yo=/[A-Z0-9]/g,Xo=typeof document<"u",Qo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function eo(e,t,n){return t.__k==null&&(t.textContent=""),ke(e,t),typeof n=="function"&&n(),e?e.__c:null}function er(e,t,n){return Fn(e,t),typeof n=="function"&&n(),e?e.__c:null}V.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(V.prototype,e,{configurable:true,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:true,writable:true,value:t})}})});var Jt=C.event;function tr(){}function nr(){return this.cancelBubble}function or(){return this.defaultPrevented}C.event=function(e){return Jt&&(e=Jt(e)),e.persist=tr,e.isPropagationStopped=nr,e.isDefaultPrevented=or,e.nativeEvent=e};var bt,rr={enumerable:false,configurable:true,get:function(){return this.class}},Zt=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,o=t.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||Xo&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===true?a="":l==="translate"&&a==="no"?a=false:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?i="ondblclick":l!=="onchange"||o!=="input"&&o!=="textarea"||Qo(n.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":Go.test(i)&&(i=l):l=i="oninput":s&&Zo.test(i)?i=i.replace(Yo,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&r[i=l]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Q(n.children).forEach(function(u){u.props.selected=r.value.indexOf(u.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=Q(n.children).forEach(function(u){u.props.selected=r.multiple?r.defaultValue.indexOf(u.props.value)!=-1:r.defaultValue==u.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",rr)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=Qn,Zt&&Zt(e)};var Gt=C.__r;C.__r=function(e){Gt&&Gt(e),bt=e.__c};var Yt=C.diffed;C.diffed=function(e){Yt&&Yt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),bt=null};var sr={ReactCurrentDispatcher:{current:{readContext:function(e){return bt.__n[e.__c].props.value},useCallback:pe,useContext:se,useDebugValue:Bn,useDeferredValue:Kn,useEffect:$,useId:ht,useImperativeHandle:Wn,useInsertionEffect:Zn,useLayoutEffect:Z,useMemo:ce,useReducer:vt,useRef:L,useState:re,useSyncExternalStore:ie,useTransition:Jn}}};function ir(e){return ee.bind(null,e)}function je(e){return!!e&&e.$$typeof===Qn}function ar(e){return je(e)&&e.type===q}function cr(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function lr(e){return je(e)?Uo.apply(null,arguments):e}function to(e){return!!e.__k&&(ke(null,e),true)}function ur(e){return e&&(e.base||e.nodeType===1&&e)||null}var fr=function(e,t){return e(t)},_r=function(e,t){return e(t)},dr=q,pr=je,Fs={useState:re,useId:ht,useReducer:vt,useEffect:$,useLayoutEffect:Z,useInsertionEffect:Zn,useTransition:Jn,useDeferredValue:Kn,useSyncExternalStore:ie,startTransition:qn,useRef:L,useImperativeHandle:Wn,useMemo:ce,useCallback:pe,useContext:se,useDebugValue:Bn,version:"18.3.1",Children:Vo,render:eo,hydrate:er,unmountComponentAtNode:to,createPortal:yt,createElement:ee,createContext:Ie,createFactory:ir,cloneElement:lr,createRef:Ao,Fragment:q,isValidElement:je,isElement:pr,isFragment:ar,isMemo:cr,findDOMNode:ur,Component:V,PureComponent:st,memo:gt,forwardRef:Bo,flushSync:_r,unstable_batchedUpdates:fr,StrictMode:dr,Suspense:He,SuspenseList:Se,lazy:qo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:sr};function vr(e){return{render:function(t){eo(t,e)},unmount:function(){to(e)}}}const wt=Ie("");function hr(){return se(wt)+ht()}Oe(1,"styles/scale","@layer clover{:root{--clover-space-3xs: .146rem;--clover-space-2xs: .236rem;--clover-space-xs: .382rem;--clover-space-s: .618rem;--clover-space-m: 1rem;--clover-space-l: 1.618rem;--clover-space-xl: 2.618rem;--clover-space-2xl: 4.236rem;--clover-text-xs: .764rem;--clover-text-s: .854rem;--clover-text-m: 1.146rem;--clover-text-l: 1.236rem;--clover-control: calc(1rem + 2 * var(--clover-space-s));--clover-inset: var(--clover-space-l)}:where(.clover-root,.clover-canvas,.clover-items,.clover-geomap) :where(button,input,select,textarea){font:inherit}:where(.clover-field-pill-query,.clover-collection-select-control){box-sizing:border-box;padding:var(--clover-space-xs) var(--clover-space-s);border:1px solid var( --clover-field-edge, color-mix( in srgb, var(--clover-color-primary-muted, #26292b) 80%, var(--clover-color-secondary, #fff) ) );border-radius:var(--clover-radius, 3px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}:where(.clover-field-pill-query,.clover-collection-select-control):focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:1px}:where(.clover-field-pill-query)::placeholder{color:color-mix(in srgb,var(--clover-color-primary, #1a1d1e) 65%,var(--clover-color-secondary, #fff));opacity:1}}");const mr="clover-root",no=Symbol("roots"),gr=[];class oo{constructor(t){X(this,"entries",new Map);X(this,"lists",new Map);X(this,"listeners",new Map);X(this,"languages",new yr(t2=>this.entries.has(t2)));this.count=t}list(t){return this.lists.get(t)??gr}subscribe(t,n){let o=this.listeners.get(t);return o||this.listeners.set(t,o=new Set),o.add(n),()=>{o.delete(n)}}connect(t){var s;const n=t.kind==="part"?((s=t.element.parentElement)==null?void 0:s.closest(mr))??null:null,o=this.entries.get(t.element);if(o&&o.root===n)return;const r={hosted:t,key:(o==null?void 0:o.key)??++this.count.made,root:n};this.entries.set(t.element,r),o&&this.change(Je(o),i=>i.filter(a=>a!==o)),this.change(Je(r),i=>[...i,r]),t.needsRoot&&!n&&console.warn(`<${t.element.localName}> shows a <clover-root>'s state: put it inside one.`),t.kind!=="root"&&this.languages.draws(t.element.localName),(t.kind!=="part"||!n)&&this.languages.watch(t.element)}disconnect(t){const n=this.entries.get(t);n&&(this.entries.delete(t),this.change(Je(n),o=>o.filter(r=>r!==n)))}change(t,n){var o;this.lists.set(t,n(this.list(t))),(o=this.listeners.get(t))==null||o.forEach(r=>r())}}const Je=e=>e.hosted.kind==="root"?no:e.root;class yr{constructor(t){X(this,"observer",null);X(this,"tags",new Set);this.isElement=t}draws(t){this.tags.add(t)}watch(t){this.observer??(this.observer=new MutationObserver(n=>{const o=[...this.tags,".clover-announcer"].join(",");for(const{target:r}of n){const s=r;s.getAttribute("lang")!==""||this.isElement(s)||s.closest(o)&&s.removeAttribute("lang")}})),this.observer.observe(t,{subtree:true,attributes:true,attributeFilter:["lang"]})}}function it(e,t){const n=pe(r=>e.subscribe(t,r),[e,t]);return ie(n,()=>e.list(t))}function ro(e){return ie(e.subscribe,e.getProps,e.getProps)}function br({registry:e}){const t=it(e,no),n=it(e,null);return N(q,{children:[t.map(o=>N(wr,{entry:o,registry:e},o.key)),n.map(o=>N(io,{entry:o},o.key))]})}const so=e=>`clover-${e.key}-`,wr=gt(function({entry:t,registry:n}){const{hosted:o}=t,r=it(n,o.element),s=ro(o),i=o.Component;return N(ao,{hosted:o,props:s,children:N(wt.Provider,{value:so(t),children:N(i,{hosted:o,props:s,children:r.map(a=>N(io,{entry:a},a.key))})})})}),io=gt(function({entry:t}){const{hosted:n}=t,o=ro(n);if(n.needsRoot&&!t.root)return null;const r=n.Component;return yt(N(ao,{hosted:n,props:o,children:N(wt.Provider,{value:so(t),children:N(r,{hosted:n,props:o})})}),n.element)});class ao extends V{constructor(){super(...arguments);X(this,"state",{failed:false})}static getDerivedStateFromError(){return{failed:true}}componentDidCatch(n,o){console.error(`<${this.props.hosted.element.localName}>:`,n)}componentDidUpdate(n){this.state.failed&&n.props!==this.props.props&&this.setState({failed:false})}render(){return this.state.failed?null:this.props.children}}const Xt=new WeakMap,Ae=Symbol.for("clover.elements");function Sr(e){let t=Xt.get(e);if(!t){const n=e;n[Ae]&&console.warn("Clover is loaded twice on this page: load one entry."),t=new oo(n[Ae]??(n[Ae]={made:0})),Xt.set(e,t),vr(e.createElement("div")).render(N(br,{registry:t}))}return t}const js=Object.freeze(Object.defineProperty({__proto__:null,Registry:oo,hostOf:Sr},Symbol.toStringTag,{value:"Module"})),St=Ie(void 0);function co(e=B,t){const n=ie(U.subscribe,U.getSnapshot,U.getSnapshot),o=se(St),r=t??o,s=pe((a,l)=>U.t(a,l,e),[e,n]),i=pe(a=>U.langOf(a,r,e),[e,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:U}}function Cr(e,t,n={}){return((e==null?void 0:e.fetch)??globalThis.fetch)(t,{credentials:(e==null?void 0:e.credentials)??"same-origin",...n,headers:{...n.headers,...e==null?void 0:e.headers}})}const Ws=e=>(e==null?void 0:e.credentials)==="include",xr=e=>JSON.stringify([e==null?void 0:e.credentials,e==null?void 0:e.headers]);class kr extends Error{constructor(t,n,o){super(t),this.url=n,this.status=o,this.name="CloverRequestError"}}async function ve(e,t,n){const o=await Cr(e,t,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new kr(`${t} answered ${o.status}`,t,o.status);return o.json()}const P=e=>Array.isArray(e)?e:e==null?[]:[e],lo=["Independents","Composite","List"];function uo(e){return P(e==null?void 0:e.body).flatMap(t=>lo.includes(t==null?void 0:t.type)?P(t.items):[t])}function Or(e){const t=P(e==null?void 0:e.motivation);return!t.length||t.includes("painting")}function Pr(e){const t=[];for(const n of P(e==null?void 0:e.items))for(const o of P(n==null?void 0:n.items))if(Or(o))for(let r of uo(o))(r==null?void 0:r.type)==="Choice"&&(r=P(r.items)[0]),(r==null?void 0:r.type)==="SpecificResource"&&(r=typeof r.source=="string"?{id:r.source}:r.source),r&&t.push({body:r,annotation:o});return t}const Ze=e=>e.indexOf("-")===-1?null:e.slice(0,e.indexOf("-"));function Er(e,t,n=[]){if(!t.length)return;if(t.length===1)return t[0];const o=()=>t.includes("none")?"none":t.includes("@none")?"@none":t[0];if(!e)return t.includes("none")?"none":t[0];if(t.includes(e))return e;const r=Ze(e);if(r&&t.includes(r))return r;const s=n.find(a=>t.includes(a));if(s)return s;const i=t.findIndex(a=>Ze(a)===e);if(i!==-1)return t[i];for(const a of n){const l=Ze(a);if(l&&t.includes(l))return l}return o()}function fo(e,t,n=", "){if(!e)return{text:""};if(typeof e=="string")return{text:e};const o=Object.keys(e).filter(u=>{var f;return(f=e[u])==null?void 0:f.length});if(!o.length)return{text:""};const[r,...s]=t?[t]:Cn(),i=Er(r,o,s)??o[0],a=e[i];return{text:Array.isArray(a)?a.join(n):String(a),lang:i==="none"?void 0:i}}const We=Ie(null);function Bs(){return se(We)}function Ir(e="This part"){const t=se(We);if(!t)throw new Error(`${e} must be rendered inside <Clover.Root>.`);return t}function Vs(e,t=Object.is,n){const{clover:o}=Ir(n),r=L(null),s=()=>{const i=e(o.store.get());return r.current&&t(r.current.value,i)?r.current.value:(r.current={value:i},i)};return ie(o.store.subscribe,s)}const Mr={subscribe:()=>()=>{}};function zs(e,t){const n=se(We),o=n==null?void 0:n.clover.store,r=()=>o?e(o.get()):t;return ie(o?o.subscribe:Mr.subscribe,r)}function Nr(e,t){const n=se(St),o=L(null),[r,s]=re(""),i=pe(f=>{o.current=f,typeof e=="function"?e(f):e&&(e.current=f)},[e]);$(()=>{var c,p;const f=(c=o.current)==null?void 0:c.parentElement;t!==void 0||n!==void 0||!f||s(((p=f.closest("[lang]"))==null?void 0:p.getAttribute("lang"))??"")});const l=t??n??r,{langOf:u}=co(void 0,l);return{ref:i,hostLanguage:l,langOf:u}}Oe(19,"ui/ReadMore","@layer clover{.clover-read-more{display:flex;flex-direction:column;align-items:flex-start;gap:var(--clover-space-xs);min-width:0}button.clover-read-more-button{margin:0;padding:0;border:0;background:none;color:var(--clover-color-accent-text, var(--clover-color-accent, #0065c3));font-size:var(--clover-text-s);text-decoration:underline 1px;text-decoration-color:color-mix(in srgb,currentColor 20%,transparent);text-underline-offset:var(--clover-space-3xs);cursor:pointer}button.clover-read-more-button:hover{text-decoration-color:currentColor}button.clover-read-more-button:focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:2px;border-radius:var(--clover-radius, 3px)}}");const $r=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function Ar(e){return $r.includes(e)?e:"left-to-right"}const Tr=["individuals","paged","continuous","unordered"];function Rr(e){return P(e).find(n=>Tr.includes(n))??"individuals"}function Lr(e,t){if(!e.length)return[];if(t==="continuous")return[e.map((a,l)=>l)];if(t!=="paged")return e.map((a,l)=>[l]);const n=[];let o=[],r=0,s=false;const i=()=>{o.length&&n.push(o),o=[]};return e.forEach((a,l)=>{const u=P(a.behavior);if(u.includes("non-paged")){l===r&&r++,i(),n.push([l]);return}if(l===r||u.includes("facing-pages")){o.length&&(s=true),i(),n.push([l]);return}if(o.push(l),s){i(),s=false;return}o.length>1&&i()}),i(),n}function Hr(e,t){const n=e.findIndex(o=>o.includes(t));return n===-1?0:n}function _o(e,t){const n=/(?:^|[#&])t=([^&]+)/.exec(t),o=n&&{t:n[1]},r=/(?:^|[#&])xywh=(?:pixel:)?([^&]+)/.exec(t);if(r){const[s,i,a,l]=r[1].split(",").map(Number);if([s,i,a,l].every(Number.isFinite))return{id:e,rect:{x:s,y:i,w:a,h:l},...o}}return o&&{id:e,...o}}function Te(e){const t=e.indexOf("#");if(t>=0){const o=e.slice(0,t);return _o(o,e.slice(t))??{id:o}}const n=e.indexOf("&t=");return n>=0?{id:e.slice(0,n),t:e.slice(n+3)}:{id:e}}const at=e=>{var t;return Array.isArray(e)?at(e[0]):lo.includes(e==null?void 0:e.type)?at((t=e.items)==null?void 0:t[0]):e};function Be(e){return Ur(at(e))}function Ur(e){var n;if(typeof e=="string")return Te(e);if(!e||typeof e!="object")return{id:""};if(e.type!=="SpecificResource"||e.source===void 0)return Te(e.id??"");const t=typeof e.source=="string"?Te(e.source):Te(((n=e.source)==null?void 0:n.id)??"");for(const o of P(e.selector)){const r=o;if((r==null?void 0:r.type)==="PointSelector")return{id:t.id,point:{x:Number(r.x),y:Number(r.y)}};if((r==null?void 0:r.type)==="SvgSelector"&&r.value)return{id:t.id,svg:String(r.value)};if((r==null?void 0:r.type)==="FragmentSelector"&&r.value){const s=_o(t.id,String(r.value));if(s)return s}}return t}const qs=e=>e==="Audio"||e==="Sound",Dr=e=>{const t=P(e);return t.length>0&&t.every(n=>n==="supplementing")},Fr=(e,t)=>Dr(e)&&!!(t.rect||t.svg||t.point)&&!t.t,Qt=new WeakMap,jr={canvases:[],views:[],direction:"left-to-right"};function z(e){if(!e)return jr;let t=Qt.get(e);if(!t){const n=(e.items??[]).filter(o=>(o==null?void 0:o.type)==="Canvas"||(o==null?void 0:o.type)==="Timeline"||(o==null?void 0:o.type)==="Scene");t={canvases:n,views:Lr(n,Rr(e.behavior)),direction:Ar(e.viewingDirection)},Qt.set(e,t)}return t}const en=new WeakMap;function Me(e,t){if(!t)return null;const n=z(e);let o=en.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);en.set(n,o)}return o.get(t)??null}function Ve(e,t){const{canvases:n,views:o}=z(e),r=n.findIndex(s=>s.id===t);return r===-1?0:Hr(o,r)}const tn=new WeakMap,Wr=[];function Ue(e,t){if(!e)return Wr;const n=Ve(e,t);let o=tn.get(e);o||tn.set(e,o=new Map);let r=o.get(n);if(!r){const s=z(e);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function Br(e,t){var s,i;const{canvases:n,views:o}=z(e),r=(s=o[t])==null?void 0:s[0];return r===void 0?null:((i=n[r])==null?void 0:i.id)??null}function Vr(e){const t=e==null?void 0:e.start;if(!t)return null;const n=Be(t);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 Ks=(e,t)=>{const n=e==null?void 0:e.behavior;return Array.isArray(n)?n.includes(t):n===t},Js=e=>[(e==null?void 0:e.partOf)??[]].flat().find(t=>(t==null?void 0:t.id)&&t.type==="Collection");Oe(24,"components/Primitives/Primitives","@layer clover{.clover-summary:not([data-read-more=open]){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--clover-summary-lines, 5);overflow:hidden}:is(.clover-metadata,.clover-required-statement){display:flex;flex-direction:column;gap:var(--clover-space-s);margin:0}:is(.clover-metadata,.clover-required-statement) dt{margin:0;font-weight:500}:is(.clover-metadata,.clover-required-statement) dd{margin:0}.clover-summary,:is(.clover-metadata,.clover-required-statement) :is(dt,dd){overflow-wrap:anywhere}:is(.clover-about,.clover-canvas-caption,.clover-annotations-body,.clover-metadata,.clover-required-statement,.clover-summary) a:not([class]){text-decoration-line:underline;text-underline-offset:var(--clover-space-3xs)}:is(.clover-homepage,.clover-rendering,.clover-see-also,.clover-part-of)>li{min-block-size:24px}:is(.clover-homepage,.clover-rendering,.clover-see-also,.clover-part-of) a,a:is(.clover-id,.clover-rights){color:var(--clover-color-accent-text, var(--clover-color-accent, #0065c3));overflow-wrap:anywhere;text-decoration-line:underline;text-underline-offset:var(--clover-space-3xs)}.clover-link-format{color:var(--clover-color-primary-muted, #26292b);font-size:var(--clover-text-s)}}");const zr=e=>(e==null?void 0:e.format)==="text/vtt"||typeof(e==null?void 0:e.id)=="string"&&/\.vtt(\?|$)/i.test(e.id);function qr(e){const t=[];for(let n of uo(e))if((n==null?void 0:n.type)==="Choice"&&(n=P(n.items)[0]),!(!n||zr(n))){if(n.type==="TextualBody"||typeof n.value=="string")t.push({value:String(n.value??""),format:n.format,language:P(n.language)[0]});else if(n.type==="Image"&&n.id){const o=n.label??e.label;t.push({image:n.id,format:n.format,...o?{label:o}:{}})}}return t}const po="content-search",nn=/\/search\/([0-2])\//;function Kr(e){if(!e)return null;let t=null;for(const n of P(e.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:nn.test(s)?Number(nn.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(t??(t={id:o,version:i}))}return t}const Jr=e=>P(e==null?void 0:e.motivation).includes("linking");function vo(e,t,n){const o=[];for(const r of P(e==null?void 0:e.items)){const s=P(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=qr(r);if(!i.length&&!Jr(r))continue;const a=Be(P(r.target)[0]),l=a.id||n;!l||!r.id||o.push({id:r.id,setId:t,canvasId:l,target:a,motivation:s,bodies:i,annotation:r})}return o}const on=new WeakMap;function Zr(e){if(!e)return[];let t=on.get(e);if(!t){const n=new Map;for(const o of z(e).canvases)for(const r of P(o.annotations)){if(!Array.isArray(r==null?void 0:r.items))continue;const s=r.id??`${o.id}#annotations`;let i=n.get(s);i||(i={id:s,label:r.label,source:"manifest",entries:[]},n.set(s,i)),i.entries.push(...vo(r,s,o.id))}t=[...n.values()].filter(o=>o.entries.length),on.set(e,t)}return t}const rn=new WeakMap,sn=[];function ze(e,t){const n=Zr(e);if(!t.length)return n.length?n:sn;const o=e??sn;let r=rn.get(o);r||rn.set(o,r=new Map);let s=r.get(t);return s||(s=[...n,...t],r.set(t,s)),s}const an=new WeakMap;function Gr(e,t,n){const o=ze(e,t);if(!(n!=null&&n.entries.length))return o;let r=an.get(o);r||an.set(o,r=new Map);let s=r.get(n);return s||(s=[...o,n],r.set(n,s)),s}const Yr=e=>Number(e==null?void 0:e.duration)>0;function ho(e,t){return e.source==="search"||!e.entries.length?false:e.entries.every(n=>Fr(n.motivation,n.target)&&!Yr(t(n.canvasId)))}const cn=new WeakMap;function Zs(e,t){const n=ze(e,t);let o=cn.get(n);if(!o){const r=n.filter(s=>!ho(s,i=>Me(e,i)??void 0));o=r.length===n.length?n:r,cn.set(n,o)}return o}const ln=new WeakMap;function mo(e,t,n,o){const r=ze(e,t),s=ln.get(r);if(s&&s.hidden===n&&s.shown===o)return s.ids;const i=r.filter(l=>!n.includes(l.id)&&!o.includes(l.id)&&ho(l,u=>Me(e,u)??void 0)).map(l=>l.id),a=i.length?[...n,...i]:n;return ln.set(r,{hidden:n,shown:o,ids:a}),a}const un=new WeakMap;function Gs(e,t,n,o){const r=mo(e,t,n,o),s=un.get(r);if(s&&s.hidden===n)return s.ids;const i=[po,...r.filter(a=>!n.includes(a))];return un.set(r,{hidden:n,ids:i}),i}function Xr(e){for(const t of P(e==null?void 0:e.target)){const n=(t==null?void 0:t.type)==="SpecificResource"?t.source:t,o=P(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 Ge(e,t){if(!t)return null;for(const n of e){const o=n.entries.find(r=>r.id===t);if(o)return o}return null}function fn(e){const t=e;return!t||typeof t!="object"?false:t.type==="Annotation"?P(t.motivation).includes("contentState"):t.type==="SpecificResource"}function Qr(e){return btoa(encodeURIComponent(JSON.stringify(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function es({manifestId:e,canvasId:t,region:n,time:o}){const r={id:t,type:"Canvas",partOf:[{id:e,type:"Manifest"}]},s=o!=null&&o>0?`t=${Math.round(o*100)/100}`:n?`xywh=${[n.x,n.y,n.w,n.h].map(Math.round).join(",")}`:null,i={"@context":"http://iiif.io/api/presentation/3/context.json",id:`${t}#content-state`,type:"Annotation",motivation:["contentState"],target:s?{type:"SpecificResource",source:r,selector:{type:"FragmentSelector",value:s}}:r};return{json:i,encoded:Qr(i)}}const ts=/iiif\.io\/api\/presentation\/4\/context\.json/;function go(e){const t=e==null?void 0:e["@context"];return(Array.isArray(t)?t:[t]).some(o=>typeof o=="string"&&ts.test(o))}let _n=null;function Ct(){return _n??(_n=import("./upgrader-XNxI-5jo.mjs")),_n}async function le(e){if(go(e))return e;const[{upgradeToPresentation4:t},{keepFragments:n}]=await Promise.all([Ct(),import("./keep-fragments-B5nlv2ck.mjs")]);return t(n(e))}const dn=()=>import("./content-state-reader-D1BkpICh.mjs"),ns=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function os(e){const t={"@context":ss,id:e.id,type:"Manifest",label:e.label??{none:[""]},items:[e]};for(const n of ns)e[n]!==void 0&&n!=="label"&&(t[n]=e[n]);return t}const Ys=e=>{var t,n;return!!e&&((n=(t=e.items)==null?void 0:t[0])==null?void 0:n.id)===e.id},rs=/^(oa:)?Annotation(Page|Collection)$/;class Re extends Error{constructor(){super(...arguments);X(this,"name","CloverContentError")}}const ss="http://iiif.io/api/presentation/4/context.json",is=e=>/^https?:\/\//i.test(e);async function ct(e,{request:t,signal:n}){return Array.isArray(e.items)&&e.items.length>0||!e.id?e:await ve(t,e.id,n)}const as=50;async function xt(e,t){const n=e;if(Array.isArray(n.items)&&n.items.length||!n.first)return e;const o=[],r=new Set;let s=n.first;for(let i=0;s&&i<as;i++){const a=typeof s=="string"?{id:s}:s;if(r.has(a.id??a))break;r.add(a.id??a);const l=a.items?a:await ve(t.request,a.id,t.signal),u=await le({"@context":l["@context"]??n["@context"],...l,type:"Collection"});o.push(...u.items??[]),s=l.next}return{...n,items:o}}async function yo(e,t={}){return le(await ct(e,t))}async function bo(e,t,n=0){for(const o of e.items??[]){if(o.type==="Manifest")return le(await ct(o,t));if(o.type==="Collection"&&n<8){const r=await xt(await le(await ct(o,t)),t),s=await bo(r,t,n+1);if(s)return s}}return null}async function cs(e,{request:t,signal:n}={}){Ct();const o=typeof e=="string"?await ve(t,e.trim(),n):e,r=await le(o);return r.type==="Collection"?xt(r,{request:t,signal:n}):r}async function ls(e,t={}){var f;const{request:n,signal:o}=t;Ct();let r,s,i,a;const l=async c=>{const{resolveContentState:p}=await dn(),d=p(c);if(!d)throw new Re("Unreadable content state");return r=d.target??r,s=d.manifestId??s,i=d.annotation??i,ve(n,d.id,o)};if(typeof e=="string")if(is(e.trim()))a=await ve(n,e.trim(),o);else{const{decodeContentState:c}=await dn(),p=c(e);if(!p)throw new Re("Unreadable iiifContent");a=fn(p)?await l(p):p}else a=e;if(fn(a)&&(a=await l(a)),rs.test(String((a==null?void 0:a.type)??""))){const{annotationsContent:c}=await import("./annotations-content-BS_OFz5Z.mjs");return c(a,t)}const u=await le(a);switch((f=o==null?void 0:o.throwIfAborted)==null||f.call(o),u.type){case"Manifest":return{manifest:u,target:r,annotation:i};case"Collection":{const c=await xt(u,t),p=t.manifestId??s,d=p?(c.items??[]).find(O=>O.id===p&&O.type==="Manifest"):void 0,g=d?await yo(d,t):await bo(c,t);if(!g)throw new Re("The Collection holds no Manifest");return{manifest:g,collection:c,target:r,annotation:i}}case"Canvas":case"Timeline":case"Scene":{const c=u;return r??(r={canvasId:c.id}),{manifest:os(c),target:r,annotation:i}}default:throw new Re(`Cannot show a ${String(u.type??"resource without a type")}`)}}const wo=e=>!!(e!=null&&e.id)&&e.type==="AnnotationPage"&&!e.items;function us(e){const t=[];for(const n of e)for(const o of["items","annotations"])for(const r of n[o]??[])wo(r)&&t.push([n.id,o,r.id]);return t}async function fs(e,t,n,o){return _s(await ve(n,e,o),t)}async function _s(e,t="urn:clover:annotation-page"){var r;const n=e;return go(n)?n:((r=(await le({"@context":n["@context"]??"http://iiif.io/api/presentation/3/context.json",id:t,type:"Canvas",items:[{...n,"@context":void 0}]})).items)==null?void 0:r[0])??n}function ds(e,t,n,o){let r=false;const s=(e.items??[]).map(i=>{if(i.id!==t||!Array.isArray(i[n]))return i;const a=i[n].map(l=>l.id!==o.id||!wo(l)?l:(r=true,o));return r?{...i,[n]:a}:i});return r?{...e,items:s}:e}function ps(e){let t=e;const n=new Set;return{get:()=>t,set(o){const r=typeof o=="function"?o(t):o;Object.keys(r).some(i=>!Object.is(r[i],t[i]))&&(t={...t,...r},n.forEach(i=>i()))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function be(e){let t=e;const n=new Set;return{get:()=>t,emit(o){t=o,n.forEach(r=>r(o))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function vs(e,t,n){return{position:t,total:n,hasPrevious:t>0,hasNext:t+1<n,previous:()=>e.previous(),next:()=>e.next(),first:()=>e.first(),last:()=>e.last(),goTo:o=>e.goTo(o)}}const lt={query:"",status:"idle",hits:[],set:null},pn={status:"idle",error:null,manifest:null,collection:null,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:lt};function hs(e={}){const t=ps(pn),n=be(null),o=be(null),r=be(null),s=be(null),i=be(null);let a=null,l=null,u=[],f=[],c=null;const p=()=>u.length||f.length?[...u,...f]:pn.addedSets;let d=e.request,g=null;const O=new Set;let k="view",b=0;const y=()=>{const{manifest:_,canvasId:h}=t.get();if(!_)return;const v=g==null?void 0:g.signal;for(const[m,S,w]of us(k==="all"||b>0?z(_).canvases:Ue(_,h)))O.has(w)||(O.add(w),fs(w,m,d,v).then(I=>{v!=null&&v.aborted||t.set(H=>H.manifest?{manifest:ds(H.manifest,m,S,I)}:{})}).catch(()=>O.delete(w)))};t.subscribe(y);const x=(_,h,v,m,S)=>{var Pt,Et,It;const{canvases:w}=z(_),I=Mt=>!!Mt&&w.some(xo=>xo.id===Mt),H=Vr(_),ne=I(v==null?void 0:v.canvasId)?v:I(H==null?void 0:H.canvasId)?H:null,Y=I(m.canvasId)?m.canvasId:(ne==null?void 0:ne.canvasId)??(I(m.defaultCanvasId)?m.defaultCanvasId:null)??((Pt=w[0])==null?void 0:Pt.id)??null;l==null||l.abort();const ge=S&&((Et=Ge(f,S))==null?void 0:Et.canvasId)===Y?S:null,ye=ne&&ge?{...ne,region:void 0}:ne;t.set({status:"ready",search:lt,manifest:_,collection:h,canvasId:Y,target:ye&&ye.canvasId===Y?ye:null,addedSets:p(),annotationId:ge}),Y&&Y!==m.canvasId&&((It=e.onCanvasChange)==null||It.call(e,Y))},T=(_,h)=>t.set(v=>{const m=v.hiddenSets.filter(w=>w!==_),S=v.shownSets.filter(w=>w!==_);return h?{hiddenSets:m,shownSets:[...S,_]}:{hiddenSets:[...m,_],shownSets:S}}),F=(_,h)=>{var m,S,w;if(!_)return;if((m=e.isControlled)!=null&&m.call(e)){h&&t.set({target:h}),(S=e.onCanvasChange)==null||S.call(e,_);return}const v=t.get().canvasId!==_;t.set({canvasId:_,target:h}),v&&((w=e.onCanvasChange)==null||w.call(e,_))},R=(_,h=false)=>{const{manifest:v}=t.get(),m=Br(v,_);F(m,m&&h?{canvasId:m,autoplay:h}:null)},te=()=>{const{manifest:_,canvasId:h}=t.get();return{at:Ve(_,h),total:z(_).views.length}},j=()=>{g==null||g.abort();const _=new AbortController;return g=_,O.clear(),t.set({status:"loading",error:null,annotationId:null}),_.signal},K=_=>t.set({status:"error",error:_ instanceof Error?_:new Error(String(_))});async function G(_,h={}){var m;const v=j();try{const S=await ls(_,{request:d,signal:v,manifestId:h.manifestId??void 0});if(v.aborted)return;const w=S.annotation,I=w?vo({items:[w]},`${w.id}#content-state`):[];f=I.length?[{id:`${w.id}#content-state`,source:"added",entries:I}]:S.annotationSets??[];const H=c??((m=I[0])==null?void 0:m.id)??S.pick;c=null,x(S.manifest,S.collection??null,S.target,h,H)}catch(S){v.aborted||K(S)}}const A=_=>{const{manifest:h,collection:v}=t.get();return(h==null?void 0:h.id)===_||(v==null?void 0:v.id)===_},D=_=>{var h;return(((h=t.get().collection)==null?void 0:h.items)??[]).find(v=>v.id===_)??{id:_,type:"Manifest"}},me=(_,h)=>{var v,m;if(c=h,(v=e.isManifestControlled)!=null&&v.call(e)){(m=e.onManifestChange)==null||m.call(e,_);return}ue({id:_,type:"Manifest"}).then(S=>{var w;return S&&((w=e.onManifestChange)==null?void 0:w.call(e,_))})},ue=async(_,h)=>{if(_.type==="Collection")return await G(_.id),t.get().status==="ready";const{collection:v}=t.get(),m=j(),S=c;c=null;const w=S?Ge(f,S):null;try{const I=await yo(_,{request:d,signal:m});return m.aborted?false:(x(I,v,w?{canvasId:w.canvasId}:h?{canvasId:h}:void 0,{},S),true)}catch(I){return m.aborted||K(I),false}};return{store:t,viewport:n,media:o,captions:r,highlight:s,chapter:i,get request(){return d},setRequest(_){d=_},load:G,async openCollection(_){var v;const h=t.get().manifest;if(!(!h||((v=t.get().collection)==null?void 0:v.id)===_))try{const m=await cs(_,{request:d});if(m.type!=="Collection"||t.get().manifest!==h)return;t.set({collection:m})}catch{}},async goToManifest(_,h){var m,S,w;if(A(_))return;const v=D(_);if(v.type!=="Collection"&&((m=e.isManifestControlled)!=null&&m.call(e))){(S=e.onManifestChange)==null||S.call(e,_);return}await ue(v,h)&&((w=e.onManifestChange)==null||w.call(e,t.get().manifest.id))},async syncManifest(_){!_||A(_)||t.get().status!=="ready"||await ue(D(_))},goTo(_,h){F(_,h?{...h,canvasId:_}:null)},next({autoplay:_=false,wrap:h=false}={}){const{at:v,total:m}=te();v+1<m?R(v+1,_):h&&m>1&&R(0,_)},previous(){const{at:_}=te();_>0&&R(_-1)},first(){R(0)},last(){R(te().total-1)},consumeTarget(){t.set({target:null})},syncCanvas(_){_&&t.set({canvasId:_})},selectAnnotation(_){const{manifest:h,addedSets:v,canvasId:m,search:S}=t.get(),w=Ge(Gr(h,v,S.set),_);if(t.set({annotationId:w?_:null}),!w)return;const{hiddenSets:I,shownSets:H}=t.get();w.setId!==po&&mo(h,v,I,H).includes(w.setId)&&T(w.setId,true);const ne=Ue(h,m).some(ye=>ye.id===w.canvasId),Y=Me(h,w.canvasId)!==null;!ne&&Y&&F(w.canvasId,null);const ge=Y?void 0:Xr(w.annotation);ge&&me(ge,w.id)},async search(_){l==null||l.abort();const h=Kr(t.get().manifest),v=_.trim();if(!v||!h){l=null,t.set({search:lt,annotationId:null});return}const m=new AbortController;l=m,t.set(S=>({search:{...S.search,query:v,status:"loading"}}));try{const{searchInto:S}=await import("./search-CLy2Wj01.mjs");await S(t,h,v,d,m.signal)}catch{t.set({search:{query:v,status:"error",hits:[],set:null}})}},setSetVisible(_,h){T(_,h)},async loadAnnotations(_){if(a==null||a.abort(),!_){u=[],t.set({addedSets:p()});return}const h=new AbortController;a=h;try{const{loadAnnotationSets:v}=await import("./annotation-collection-Csv7WIlm.mjs"),m=await v(_,{request:d,signal:h.signal});if(h.signal.aborted)return;u=m,t.set({addedSets:p()})}catch{}},getContentState(){const{manifest:_,canvasId:h}=t.get();if(!_||!h)return null;const v=n.get(),m=o.get(),S=m&&m.currentTime>0?m.currentTime:null,I=v&&Ue(_,h).some(H=>H.id===v.canvasId)&&!S?v:null;return es({manifestId:_.id,canvasId:(I==null?void 0:I.canvasId)??h,region:I==null?void 0:I.region,time:S})},setAnnotationPages(_){_!==k&&(k=_,y())},holdAllAnnotationPages(){b++,y();let _=true;return()=>{_&&b--,_=false}},dispose(){g==null||g.abort(),a==null||a.abort(),l==null||l.abort()}}}const ms={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};function gs({clover:e,language:t}){const{t:n,langOf:o}=co(),[r,s]=re(null),i=L(n);return i.current=n,$(()=>{let a=null;return e.store.subscribe(()=>{const{manifest:l,canvasId:u,status:f}=e.store.get();if(f!=="ready"||u===a)return;const c=a===null;if(a=u,c)return;const p=Me(l,u),d=fo(p==null?void 0:p.label,t),g=i.current("canvasPosition",{index:Ve(l,u)+1,total:z(l).views.length});s({label:d.text,lang:d.lang,position:g})})},[e,t]),N("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:ms,children:[r!=null&&r.label?N(q,{children:[N("span",{lang:r.lang,children:r.label}),","," "]}):null,r&&N("span",{lang:o("canvasPosition"),children:r.position})]})}function Xs(e){return e.flatMap(t=>Pr(t).map(({body:n})=>n))}function Qs(e,t){if(!(e!=null&&e.length)||!t.canvases.length)return null;const n=t.canvases.map(r=>r.id),o=t.bodies.map(r=>r==null?void 0:r.format).filter(Boolean);return e.find(r=>{var s,i,a;return((s=r.canvasId)==null?void 0:s.some(l=>n.includes(l)))||((i=r.format)==null?void 0:i.some(l=>o.includes(l)))||!!((a=r.match)!=null&&a.call(r,t))})??null}function ys(e,t){return e===t?true:!e||!t||e.length!==t.length?false:e.every((n,o)=>n.component===t[o].component&&n.match===t[o].match&&JSON.stringify([n.canvasId,n.format])===JSON.stringify([t[o].canvasId,t[o].format]))}function bs({iiifContent:e,canvasId:t,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:l,request:u,language:f,renderers:c,annotations:p,annotationPages:d="view",onContentStateChange:g,...O}){const k=t!==void 0,b=s!==void 0,y=L({controlled:k,manifestControlled:b,onCanvasChange:o,onStatusChange:r,onManifestChange:a});y.current={controlled:k,manifestControlled:b,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[x]=re(()=>hs({request:u,onCanvasChange:h=>{var v,m;return(m=(v=y.current).onCanvasChange)==null?void 0:m.call(v,h)},onManifestChange:h=>{var v,m;return(m=(v=y.current).onManifestChange)==null?void 0:m.call(v,h)},isControlled:()=>y.current.controlled,isManifestControlled:()=>y.current.manifestControlled}));x.setRequest(u);const T=L({});T.current={canvasId:t,defaultCanvasId:n,manifestId:s??i};const F=xr(u),R=L(e);R.current=e;const te=ks(e);$(()=>(x.load(R.current,T.current),()=>x.dispose()),[x,te,F]),$(()=>{k&&x.syncCanvas(t??null)},[x,k,t]);const[j,K]=re(x.store.get().status);$(()=>{let h=x.store.get().status;return x.store.subscribe(()=>{var S,w;const{status:v,error:m}=x.store.get();v!==h&&(h=v,K(v),(w=(S=y.current).onStatusChange)==null||w.call(S,v,m))})},[x]);const G=L(p);G.current=p;const A=Ss(p);$(()=>{x.loadAnnotations(G.current??null)},[x,A,F]),$(()=>{x.setAnnotationPages(d)},[x,d]),xs(x,g),$(()=>{b&&j==="ready"&&x.syncManifest(s??null)},[x,b,s,j]);const D=ws(x,h=>{var v;return h.status==="ready"?((v=h.manifest)==null?void 0:v.id)??null:null});$(()=>{l&&D&&x.search(l)},[x,l,D]);const me=L(c);ys(me.current,c)||(me.current=c);const ue=me.current;return[ce(()=>({clover:x,language:f,renderers:ue}),[x,f,ue]),j,O]}function ws(e,t){return ie(e.store.subscribe,()=>t(e.store.get()))}function Ss(e){const t=Array.isArray(e)?e:e?[e]:[];return JSON.stringify(t.map(n=>typeof n=="string"?n:(n==null?void 0:n.id)??"object"))}const Cs=300;function xs(e,t){const n=L(t);n.current=t;const o=!!t;$(()=>{if(!o)return;let r,s="";const i=()=>{clearTimeout(r),r=setTimeout(()=>{var g;const d=e.getContentState();!d||d.encoded===s||(s=d.encoded,(g=n.current)==null||g.call(n,d))},Cs)};let a=e.store.get().canvasId;const l=e.store.subscribe(()=>{const d=e.store.get().canvasId;d!==a&&(a=d,i())}),u=e.viewport.subscribe(i);let f=null;const c=d=>{f==null||f.removeEventListener("pause",i),f==null||f.removeEventListener("seeked",i),f=d,f==null||f.addEventListener("pause",i),f==null||f.addEventListener("seeked",i)};c(e.media.get());const p=e.media.subscribe(c);return i(),()=>{clearTimeout(r),l(),u(),p(),c(null)}},[e,o])}function ks(e){return typeof e=="string"?e:e.id??e["@id"]??e}const Ye=new Map;function ei(e,t){const n=hr(),o=L(t);o.current=t,$(()=>e?So(n,o):void 0,[e,n])}function So(e,t){for(const[n,o]of[...Ye])n!==e&&o.current();return Ye.set(e,t),()=>{Ye.delete(e)}}let Os=0;const Ps=e=>So(`page-${Os+=1}`,{current:e}),vn=new WeakMap;function Es(e,t){const[n,o]=re(()=>vn.get(e)??null);return $(()=>{if(!t||n)return;let r=true;return e().then(s=>{vn.set(e,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[e,t,n]),n}function kt(e){if(!e)return;const[t,n]=e.split(","),o=Number(t);if(t===""||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}}function Ot(e){if(typeof e=="string")return hn(e);const t=e;return(t==null?void 0:t.type)==="SpecificResource"?t:typeof(t==null?void 0:t.id)=="string"?hn(t.id):t}const hn=e=>e.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1"),mn=new WeakMap,gn=[];function Is(e,t,n){if(!e||!t)return gn;let o=mn.get(e);o||mn.set(e,o=new Map);const r=`${t}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,l=f=>{if(!(!f||a.has(f.id??f))){a.add(f.id??f);for(const c of P(f.items)){if((c==null?void 0:c.type)==="Range"){l(c);continue}const p=Be(Ot(c));if(p.id.split("#")[0]!==t)continue;const d=kt(p.t);d&&i.push({...f.id?{id:f.id}:{},label:f.label,...d})}}};for(const f of P(e.structures))l(f);i.sort((f,c)=>f.start-c.start);const u=i.length?i.map((f,c)=>{var p;return{...f,end:f.end??((p=i[c+1])==null?void 0:p.start)??n}}):gn;return o.set(r,u),u}const yn=new WeakMap,bn=[];function Co(e){if(!e)return bn;const t=yn.get(e);if(t)return t;const n=new Set,o=a=>{var O,k;if(!a||n.has(a.id??a))return[];n.add(a.id??a);const l=[],u=[];let f;for(const b of P(a.items))if((b==null?void 0:b.type)==="Range"){const y=o(b);l.push(...y),y.forEach(x=>u.push(...x.canvasIds))}else{const y=Be(Ot(b));if(!y.id)continue;f??(f=y),u.push(y.id)}if(P(a.behavior).includes("no-nav"))return l;const p=f??void 0,d={id:a.id??`range-${n.size}`,label:a.label,canvasId:(p==null?void 0:p.id)??((O=l[0])==null?void 0:O.canvasId),canvasIds:[...new Set(u)],children:l},g=kt(p==null?void 0:p.t);return g?d.time=g:!p&&((k=l[0])!=null&&k.time)&&(d.time=l[0].time),p!=null&&p.rect&&(d.region=p.rect),[d]},r=P(e.structures).flatMap(o),s=r.length===1&&r[0].children.length?r[0].children:r,i=s.length?s:bn;return yn.set(e,i),i}function Ms(e,t,n){let o=null;const r=(s,i)=>{t&&s.canvasIds.includes(t)&&(!s.time||n!==void 0&&n>=s.time.start&&(s.time.end===void 0||n<s.time.end))&&(!o||i>=o.depth)&&(o={id:s.id,depth:i}),s.children.forEach(a=>r(a,i+1))};return e.forEach(s=>r(s,0)),o?o.id:null}const ti=Object.freeze(Object.defineProperty({__proto__:null,chaptersOf:Is,currentContents:Ms,parseTime:kt,rangeItemTarget:Ot,tableOfContents:Co},Symbol.toStringTag,{value:"Module"}));Oe(26,"components/Label/Label","@layer clover{.clover-label{text-wrap:balance}}");Oe(27,"components/Status/Status","@layer clover{.clover-status{margin:0;padding:var(--clover-space-m);color:var(--clover-color-primary-muted, #26292b)}.clover-status[data-status=loading]{display:flex}.clover-status[data-status=error] p{margin:0}.clover-status-detail{font-size:var(--clover-text-s)}}");const ni=()=>import("./controls-Dj2BybWb.mjs"),Ns=()=>import("./renderers-BMSWEFUR.mjs");function oi(e){Z(()=>()=>e==null?void 0:e(null),[e])}function $s(e,t,n){const o=()=>e.store.get();return{get state(){return o()},subscribe(r){return e.store.subscribe(()=>r(o()))},get language(){return t()},status(){const{status:r,error:s}=o();return{status:r,error:s}},manifest(){return o().manifest},sequence(){return z(o().manifest)},visibleCanvases(){return Ue(o().manifest,o().canvasId)},activeCanvas(){return Me(o().manifest,o().canvasId)},navigation(){const{manifest:r,canvasId:s}=o();return vs(e,Ve(r,s),z(r).views.length)},annotationSets(){return ze(o().manifest,o().addedSets)},contents(){return Co(o().manifest)},localize(r){return fo(r,t())},t(r,s){return U.t(r,s,B)},langOf(r){return U.langOf(r,n(),B)},oneOpen(r){return Ps(r)}}}function As(e,t,n){return Object.defineProperties(Object.create(e),Object.getOwnPropertyDescriptors($s(e,t,n)))}const Ts=Ie(null);function Rs({hosted:e,props:t,children:n}){const o=Es(Ns,!!t.renderers);return!t.iiifContent||t.renderers&&!o?null:N(Ls,{element:e.element,props:t,toRenderers:o==null?void 0:o.toRenderers,children:n})}function Ls({element:e,props:t,toRenderers:n,children:o}){const{canvasId:r,manifestId:s,lang:i,onReady:a,renderers:l,...u}=t,f=Nr(void 0,i);f.ref(e);const c=ce(()=>n==null?void 0:n(l),[n,l]),[p,d]=bs({...u,defaultCanvasId:r,defaultManifestId:s,renderers:c}),{clover:g,language:O}=p,k=L({language:O,host:f.hostLanguage});k.current={language:O,host:f.hostLanguage};const b=ce(()=>As(g,()=>k.current.language,()=>k.current.host),[g]);return Z(()=>(a==null||a(b),()=>a==null?void 0:a(null)),[b,a]),wn(g,r,y=>g.goTo(y)),wn(g,s,y=>void g.goToManifest(y)),Z(()=>(e.classList.add("clover-root"),()=>e.classList.remove("clover-root")),[e]),Z(()=>{e.setAttribute("data-status",d)},[e,d]),Z(()=>()=>e.removeAttribute("data-status"),[e]),N(We.Provider,{value:p,children:N(St.Provider,{value:f.hostLanguage,children:N(Ts.Provider,{value:b,children:[o,yt(N(gs,{clover:g,language:O}),e)]})})})}function wn(e,t,n){const o=L(t);$(()=>{t&&t!==o.current&&n(t),o.current=t},[e,t])}const ri=Object.freeze(Object.defineProperty({__proto__:null,RootElement:Rs},Symbol.toStringTag,{value:"Module"}));export{yt as $,L as A,kt as B,ie as C,Bo as D,z as E,Xr as F,Pn as G,yo as H,Js as I,qs as J,Bs as K,Ve as L,Nr as M,St as N,Pr as O,He as P,Ie as Q,Fs as R,Co as S,ce as T,Ms as U,Kr as V,po as W,Ys as X,zs as Y,Me as Z,Z as _,co as a,Ws as a0,Cr as a1,Ar as a2,uo as a3,ei as a4,vs as a5,bs as a6,gs as a7,We as a8,Ks as a9,Gr as aa,Is as ab,Gs as ac,xr as ad,ve as ae,_s as af,vo as ag,Re as ah,Ts as ai,cs as aj,Fr as ak,lo as al,qr as am,ee as an,ls as ao,Ds as ap,js as aq,ti as ar,ri as as,hr as b,Es as c,re as d,oi as e,ni as f,Ir as g,Qs as h,Vs as i,P as j,q as k,Ns as l,Or as m,Be as n,fo as o,Xs as p,pe as q,Ue as r,Zs as s,mo as t,N as u,ms as v,Ge as w,se as x,$ as y,qo as z};
@@ -0,0 +1 @@
1
+ import{E as n}from"./shared-YUjOSBKO.mjs";function f(a,e){const s=a.store.get().manifest;if(e.canvasId&&n(s).canvases.some(t=>t.id===e.canvasId))a.goTo(e.canvasId);else if(e.manifestId&&e.manifestId!==(s==null?void 0:s.id))a.goToManifest(e.manifestId,e.canvasId);else return false;return true}export{f as s};
@@ -0,0 +1 @@
1
+ import{i as l}from"./imageService-dsdmcegU.mjs";function s(t,g,e){const a=(h,d)=>Math.min(Math.max(Math.round(h),0),d),m=e?a(e.x*t.width,t.width-1):0,w=e?a(e.y*t.height,t.height-1):0,i={x:m,y:w,width:e?Math.max(1,a(e.width*t.width,t.width-m)):t.width,height:e?Math.max(1,a(e.height*t.height,t.height-w)):t.height},x=i.width===t.width&&i.height===t.height;if(!x&&!t.regionByPx)return null;if(t.sizeByW){let h=Math.min(1,g/Math.max(i.width,i.height));return t.maxWidth&&(h=Math.min(h,t.maxWidth/i.width)),t.maxHeight&&(h=Math.min(h,t.maxHeight/i.height)),t.maxArea&&(h=Math.min(h,Math.sqrt(t.maxArea/(i.width*i.height)))),l(t,i,Math.max(1,Math.floor(i.width*h)),Math.max(1,Math.floor(i.height*h)))}if(!x)return null;const M=[...t.sizes].sort((h,d)=>h.width-d.width),r=M.find(h=>Math.max(h.width,h.height)>=g)??M.at(-1)??{width:t.width,height:t.height};return l(t,i,r.width,r.height)}export{s};