@nulib/clover 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Items/Item.mjs +30 -21
- package/dist/components/Items/Items.mjs +3 -1
- package/dist/components/Items/PagerLayout.mjs +1 -0
- package/dist/components/Map/MapView.mjs +7 -6
- package/dist/components/Panel/PanelToggle.mjs +3 -1
- package/dist/index.d.mts +26 -3
- package/dist/index.mjs +2 -1
- package/dist/map/index.d.mts +6 -0
- package/dist/react/hooks.mjs +3 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/document/Document.mjs +2 -3
- package/dist/templates/index.d.mts +433 -0
- package/dist/templates/index.mjs +19 -2
- package/dist/templates/shared/LightboxView.mjs +7 -5
- package/dist/templates/shared/PanelPane.mjs +27 -13
- package/dist/ui/Button.mjs +3 -1
- package/dist/web-components/{About-j3O9cA3r.mjs → About-BtaFd4AF.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-U0WmWGOh.mjs → AnnotationItems-CowjcNUd.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-C1fAWWYy.mjs → AnnotationMenu-CuR-ZArp.mjs} +1 -1
- package/dist/web-components/{AnnotationState-C9UhGpsr.mjs → AnnotationState-DYkjbBGk.mjs} +1 -1
- package/dist/web-components/{Annotations-BtJ4IVmy.mjs → Annotations-BbSg10Oz.mjs} +1 -1
- package/dist/web-components/{Annotations-YcFbQRJx.mjs → Annotations-CzeyfbPR.mjs} +1 -1
- package/dist/web-components/{Body-Ccxmucbr.mjs → Body-Bh8Nu8Fo.mjs} +1 -1
- package/dist/web-components/{BodyAlert-BBSStCpI.mjs → BodyAlert-Cra_XvnG.mjs} +1 -1
- package/dist/web-components/Button-CE-5ew-f.mjs +1 -0
- package/dist/web-components/{Camera-DSk-YFpW.mjs → Camera-Cr2RIqCs.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-CYAJ-W6-.mjs → Canvas2DBackend-CH8h2VnH.mjs} +1 -1
- package/dist/web-components/{CanvasView-BAJ6OYvn.mjs → CanvasView-DcrhjwpU.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-Dg9Y11o_.mjs → CaptionDetails-BgsrrXAm.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-i4bFwR8c.mjs → ChaptersMenu-Bl6PPqt2.mjs} +1 -1
- package/dist/web-components/{Chevron-BnlK9F4K.mjs → Chevron-CePM9HdR.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-YXA7Ku8M.mjs → ChoiceMenu-ClsLiaxQ.mjs} +1 -1
- package/dist/web-components/{Collection-DgSFQbN-.mjs → Collection-a_DaYUM4.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-PUcTh3Uv.mjs → CollectionSelect-XLruVPnQ.mjs} +1 -1
- package/dist/web-components/{Connected-YgL5BWf5.mjs → Connected-BqaysSD7.mjs} +1 -1
- package/dist/web-components/{Connected-B_caNIrW.mjs → Connected-D30kPwoX.mjs} +1 -1
- package/dist/web-components/{Connected-XhRc6yaA.mjs → Connected-D_Y8fBZk.mjs} +1 -1
- package/dist/web-components/{Contents-CoC4TK6G.mjs → Contents-CA6CnTu3.mjs} +1 -1
- package/dist/web-components/{ControlMenu-CYfLg3Ok.mjs → ControlMenu-BTGCnS_-.mjs} +1 -1
- package/dist/web-components/ControlsFade-D-SexeLX.mjs +1 -0
- package/dist/web-components/{CountMenu-C7XawAoa.mjs → CountMenu-CpM-FXwx.mjs} +1 -1
- package/dist/web-components/Cue-DghSvEx4.mjs +1 -0
- package/dist/web-components/Document-FFVXMPwT.mjs +1 -0
- package/dist/web-components/{DomLayers-Bbrulm6v.mjs → DomLayers-mS4hhHRF.mjs} +1 -1
- package/dist/web-components/{Download-CfRPt74Y.mjs → Download-CqYuifok.mjs} +1 -1
- package/dist/web-components/{EntryBodies-Bz8hyAUW.mjs → EntryBodies-3IO45Orn.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-R9h0AXcu.mjs → EntryThumbnail-Anfv7mFZ.mjs} +1 -1
- package/dist/web-components/{FieldPill-DFIdy-hn.mjs → FieldPill-pocIy1LB.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-DFDuFwwt.mjs → FrameAnimation-R4MeMOFu.mjs} +1 -1
- package/dist/web-components/{Gallery-BrYWLufL.mjs → Gallery-DvS3b7CP.mjs} +1 -1
- package/dist/web-components/{HideToggle-geO9QfFR.mjs → HideToggle-29T-__gd.mjs} +1 -1
- package/dist/web-components/{ImageControls-B9PhCHqi.mjs → ImageControls-1LGEiMZc.mjs} +1 -1
- package/dist/web-components/Items-GF8INTZw.mjs +1 -0
- package/dist/web-components/{Label-S7o8PlWU.mjs → Label-CMEDN1xd.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-URJJAdah.mjs → LanguageChoice-E8VCduh-.mjs} +1 -1
- package/dist/web-components/LightboxView-CKK5mjZc.mjs +1 -0
- package/dist/web-components/{ListEnd-B0wGr87o.mjs → ListEnd-YjSPUw9O.mjs} +1 -1
- package/dist/web-components/{Loaded-Do53YvYw.mjs → Loaded-CTi6A9VS.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-BrtGPpSm.mjs → LoadedCanvas-Bdqqh01C.mjs} +1 -1
- package/dist/web-components/LoadedMap-DN3MdhcJ.mjs +1 -0
- package/dist/web-components/{Loading-Du3wn1EM.mjs → Loading-tVzMiUqD.mjs} +1 -1
- package/dist/web-components/{Map-B6LVO0gx.mjs → Map-X1sSxMhL.mjs} +1 -1
- package/dist/web-components/MapView-nkpoN7X_.mjs +3 -0
- package/dist/web-components/{Markup-DACv7sRg.mjs → Markup-Bowjvwik.mjs} +1 -1
- package/dist/web-components/{MediaBody-CcuO5IZT.mjs → MediaBody-B-sQOihV.mjs} +1 -1
- package/dist/web-components/{MediaBody-DGd2uFfK.mjs → MediaBody-DZZrA-DM.mjs} +1 -1
- package/dist/web-components/{NavDate-DRKmjc54.mjs → NavDate-Cc5i7OTE.mjs} +1 -1
- package/dist/web-components/{Navigator-CA8zB6CU.mjs → Navigator-BAlMH9x3.mjs} +1 -1
- package/dist/web-components/{Pager-DWp6u3iv.mjs → Pager-DmIPop9E.mjs} +1 -1
- package/dist/web-components/PagerLayout-DPIiFt_i.mjs +1 -0
- package/dist/web-components/{Panel-CzUDNn8M.mjs → Panel-COAOFI-u.mjs} +1 -1
- package/dist/web-components/PanelPart-DGYFBVl7.mjs +1 -0
- package/dist/web-components/PanelToggle-C4B6UY5p.mjs +1 -0
- package/dist/web-components/{PartOfManifest-Ct-I8Ofm.mjs → PartOfManifest-DpZTyo9I.mjs} +1 -1
- package/dist/web-components/{Pending-f1heQNo7.mjs → Pending-Ci8Pe6Ip.mjs} +1 -1
- package/dist/web-components/{PlaceBox-_an9ya_W.mjs → PlaceBox-vlZhTMoG.mjs} +1 -1
- package/dist/web-components/{Placeholder-D4-VCxeD.mjs → Placeholder-DrJKiL3N.mjs} +1 -1
- package/dist/web-components/{Position-DA4rzRiy.mjs → Position-D46qbQob.mjs} +1 -1
- package/dist/web-components/{Primitives-DU_VhdO2.mjs → Primitives-CijKEUFK.mjs} +1 -1
- package/dist/web-components/{Provider-Dl_t_qEC.mjs → Provider-hKagyo0v.mjs} +1 -1
- package/dist/web-components/{ReadMore-BpA8Dex8.mjs → ReadMore-B-l-lJxV.mjs} +1 -1
- package/dist/web-components/{Root-DixSZV9Y.mjs → Root-3orKkAAl.mjs} +1 -1
- package/dist/web-components/Scene-CQmIsctH.mjs +1 -0
- package/dist/web-components/{SceneView-BJNlboix.mjs → SceneView-B8_AOroA.mjs} +1 -1
- package/dist/web-components/{Search-CvpKzlYP.mjs → Search-BQhTX9cc.mjs} +1 -1
- package/dist/web-components/{Sections-BhfcUyaf.mjs → Sections-DK04V31W.mjs} +1 -1
- package/dist/web-components/{SeekMarks-BfOrFnvQ.mjs → SeekMarks-tjdJi7bR.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-CoiceHd8.mjs → StandaloneItems-3l4YBXUu.mjs} +1 -1
- package/dist/web-components/{Status-B4327UOL.mjs → Status-ZeDFIe5P.mjs} +1 -1
- package/dist/web-components/{Steps-ACdXJZrV.mjs → Steps-Dw4i3bYY.mjs} +1 -1
- package/dist/web-components/{TargetItems-D1bLKA_B.mjs → TargetItems-DkNwteSd.mjs} +1 -1
- package/dist/web-components/Timeline-wqnaRrC1.mjs +1 -0
- package/dist/web-components/{Tip-BatwzZZo.mjs → Tip-Dd_jhbIx.mjs} +1 -1
- package/dist/web-components/{Transcript-B1nh9UJK.mjs → Transcript-CVfpxNjD.mjs} +1 -1
- package/dist/web-components/{Transport-BsjGGbFJ.mjs → Transport-DGXTdsId.mjs} +1 -1
- package/dist/web-components/{Transport-DKb3XTMA.mjs → Transport-DJB0UXR1.mjs} +1 -1
- package/dist/web-components/{annotation-collection-CtxYL-V3.mjs → annotation-collection-BTpPigqD.mjs} +1 -1
- package/dist/web-components/{annotation-name-KQ4wAi8-.mjs → annotation-name-CFvHyKti.mjs} +1 -1
- package/dist/web-components/{annotations-content-XVgQ5me7.mjs → annotations-content-GrkrBVh0.mjs} +1 -1
- package/dist/web-components/{body-CbYkzpmQ.mjs → body-fIGeqGQD.mjs} +1 -1
- package/dist/web-components/{canvas-Du31_Dru.mjs → canvas-BS2SLLKS.mjs} +1 -1
- package/dist/web-components/{cloverEngine-CuRCXZNZ.mjs → cloverEngine-CQIuzG6M.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DLlBY4Ox.mjs → content-state-reader-CYaSfkCN.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-ClH59vLg.mjs → controlGlyphs-DbocsVHI.mjs} +1 -1
- package/dist/web-components/{controls-smixEi0i.mjs → controls-wzIEvR64.mjs} +1 -1
- package/dist/web-components/custom-elements.json +22 -0
- package/dist/web-components/{downloads-BqkNwsM0.mjs → downloads-7EkgG29z.mjs} +1 -1
- package/dist/web-components/{dragToClose-2joCF413.mjs → dragToClose-Bop25BOK.mjs} +1 -1
- package/dist/web-components/{engine-DNTgJBST.mjs → engine-cAKeOT-F.mjs} +1 -1
- package/dist/web-components/{engines-BpFZX2dO.mjs → engines-DJ3NJG7R.mjs} +1 -1
- package/dist/web-components/{fetchManifest-B-poGgag.mjs → fetchManifest-BchmTYKJ.mjs} +1 -1
- package/dist/web-components/{fromManifest-Dw3BwjHM.mjs → fromManifest-IctmL1Dl.mjs} +1 -1
- package/dist/web-components/{glyphs-VoJVEqLE.mjs → glyphs-BO-1m6-c.mjs} +1 -1
- package/dist/web-components/{hooks-Syt1XLVX.mjs → hooks-Dl6ZSn_E.mjs} +1 -1
- package/dist/web-components/{image-layers-ryUJ_0bq.mjs → image-layers-BWmHzoSJ.mjs} +1 -1
- package/dist/web-components/{imageService-DBU_Xks1.mjs → imageService-Dhb-E5rq.mjs} +1 -1
- package/dist/web-components/index-BAkCMEQf.mjs +1 -0
- package/dist/web-components/index.d.mts +3 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{items-BQPvL5D6.mjs → items-CDbMZvPN.mjs} +1 -1
- package/dist/web-components/items-Z6uMtKSM.mjs +1 -0
- package/dist/web-components/label-B32XGxUM.mjs +1 -0
- package/dist/web-components/{layout-MzMKFa5I.mjs → layout-BixQWLYR.mjs} +1 -1
- package/dist/web-components/{link-BUQQE9P2.mjs → link-DoDZrIK7.mjs} +1 -1
- package/dist/web-components/logo-DFdob1X0.mjs +1 -0
- package/dist/web-components/{models-wl-5vW2i.mjs → models-qg8TrXAe.mjs} +1 -1
- package/dist/web-components/{nodes-CmOpA3s7.mjs → nodes-C_TYa0cJ.mjs} +1 -1
- package/dist/web-components/{overlayImage-tb9-Md51.mjs → overlayImage-utUhUeIp.mjs} +1 -1
- package/dist/web-components/{panel-BPVyAugu.mjs → panel-Do2CIE4L.mjs} +1 -1
- package/dist/web-components/part-1MCSi0Gx.mjs +1 -0
- package/dist/web-components/{playerSurface-BxxMV-va.mjs → playerSurface-D3T1sYp4.mjs} +1 -1
- package/dist/web-components/{pointer-BqgxBJ82.mjs → pointer-CAZRjvDP.mjs} +1 -1
- package/dist/web-components/{provider-B9oAQG-u.mjs → provider-CTvn2JYS.mjs} +1 -1
- package/dist/web-components/{range-regions-BFB1374L.mjs → range-regions-Bn6iZRLa.mjs} +1 -1
- package/dist/web-components/{read-more-oWPk0OLi.mjs → read-more-sUL-TwGp.mjs} +1 -1
- package/dist/web-components/{readingLanguages-BigCi6rZ.mjs → readingLanguages-JQPbnrhL.mjs} +1 -1
- package/dist/web-components/{rendererSurface-B_OOhxzA.mjs → rendererSurface-CE09-Vp6.mjs} +2 -2
- package/dist/web-components/{renderers-CBupZj8Z.mjs → renderers-J_Go4mqn.mjs} +1 -1
- package/dist/web-components/{resource-B6uUsU6D.mjs → resource-DU94ocC-.mjs} +1 -1
- package/dist/web-components/{save-file-BaIrLp1V.mjs → save-file-CYFtT-_E.mjs} +1 -1
- package/dist/web-components/{search-DaGpvTki.mjs → search-BhcYrsRY.mjs} +1 -1
- package/dist/web-components/{shared-D2RadIoz.mjs → shared-BtCBrxx9.mjs} +1 -1
- package/dist/web-components/{show-link-Cxylys81.mjs → show-link-21y7MiKT.mjs} +1 -1
- package/dist/web-components/{sizedImage-DchqGFdt.mjs → sizedImage-C4pD0cZa.mjs} +1 -1
- package/dist/web-components/{split-oaEIep3T.mjs → split-w6D-xEIb.mjs} +1 -1
- package/dist/web-components/{status-CfCgO5OB.mjs → status-Yo7BOr8p.mjs} +1 -1
- package/dist/web-components/styles-CAv9WP3T.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-D83GaQ8C.mjs → thumbnail-BdKVLxxw.mjs} +1 -1
- package/dist/web-components/{tip-CMEBtCil.mjs → tip-D1BgXKQ-.mjs} +1 -1
- package/dist/web-components/toggle-Cqtdko9H.mjs +1 -0
- package/dist/web-components/{useContainerName-fp0-n_9x.mjs → useContainerName-C2L1lj9-.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-BYZlgiAt.mjs → useControlsVisibility-B4X3mKyY.mjs} +1 -1
- package/dist/web-components/{useNearViewport-DMqMdvue.mjs → useNearViewport-DWtnayYx.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-BHuPAWxB.mjs → useScrollTrack-D-Yh7v0Q.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationItems-DJxYDDLY.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationMenu-BO18q_Ze.mjs → AnnotationMenu-CBQft8tP.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-D-pYs13c.mjs +1 -0
- package/dist/web-components/viewer/{Annotations-C46kSUA6.mjs → Annotations-KDQunny2.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-DEKa_9xz.mjs → Annotations-yD1LhlP3.mjs} +2 -2
- package/dist/web-components/viewer/{Canvas2DBackend-DHSI3dKr.mjs → Canvas2DBackend-M6vNWI1j.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-BhXwMQyX.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-CIwIM2Pb.mjs → ChaptersMenu-CQoZerOz.mjs} +1 -1
- package/dist/web-components/viewer/ChoiceMenu-zk7-RWGR.mjs +1 -0
- package/dist/web-components/viewer/Collection-CMHNssor.mjs +1 -0
- package/dist/web-components/viewer/{Connected-DAOMKtJR.mjs → Connected-CWTe22Y4.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-Bbk8M5rE.mjs → Connected-o-wFtqr5.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-BnRBx3rc.mjs → Contents-6XNd1KtI.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-Co6yBttc.mjs → ControlMenu-D5LwsByV.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-C164aYHv.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-lu21fO_7.mjs → CountMenu-DGWnbRTj.mjs} +1 -1
- package/dist/web-components/viewer/Cue-RCMyZKdq.mjs +1 -0
- package/dist/web-components/viewer/Document-XCWKzfno.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-BjxGaZkt.mjs → DomLayers-D5F-HKU-.mjs} +1 -1
- package/dist/web-components/viewer/{Download-DhMD4AJt.mjs → Download-D9sTED6x.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-DL5UolEz.mjs → EntryBodies-D9GDp-K4.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-CJisDcni.mjs → EntryThumbnail-FgoJmUgn.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-DAk6zxxD.mjs → FieldPill-BRzwSwLf.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-DGMuFNdW.mjs → FrameAnimation-BfqvPgd9.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-CbHhyWlF.mjs → Gallery-71gebgEA.mjs} +1 -1
- package/dist/web-components/viewer/HideToggle-rX4vxm05.mjs +1 -0
- package/dist/web-components/viewer/{ImageControls-BDx7C1q5.mjs → ImageControls-XEFV3Uq0.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-BM9xZr_D.mjs → LanguageChoice-DXFfN1n1.mjs} +1 -1
- package/dist/web-components/viewer/LightboxView-CF4mcC0I.mjs +1 -0
- package/dist/web-components/viewer/ListEnd-BlsK9wx6.mjs +1 -0
- package/dist/web-components/viewer/MapView-DCxcUkUC.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-BokgnTO-.mjs → MediaBody-4ZFKNnr3.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-DPOcyiYH.mjs → MediaBody-B_T8alBZ.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-B6rCV-Cd.mjs → NavDate-DtMXkvCo.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-CjgUcgKY.mjs → Navigator-B4RQiJXK.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-CAk2XDZs.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-DyxYm0ly.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-B0TYADTv.mjs → PartOfManifest-Cu4fmoxn.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-Cjdjg-_9.mjs → PlaceBox-CSYpxMgb.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-MYLjXbiF.mjs → Placeholder-DLJ6qaSl.mjs} +1 -1
- package/dist/web-components/viewer/{Search-CyRrBHsr.mjs → Search-BOI3sJa2.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-1WSjARP5.mjs → SeekMarks-DfTSWZph.mjs} +1 -1
- package/dist/web-components/viewer/StandaloneItems-B1Ul8G2q.mjs +1 -0
- package/dist/web-components/viewer/Steps-5eg2Dbfd.mjs +1 -0
- package/dist/web-components/viewer/{TargetItems-BpmZEVMS.mjs → TargetItems-5JGXJ5e4.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-CE4BsnWd.mjs → Transcript-jk8NyuUI.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-1ROUkfsf.mjs → Transport-BbvsG9Qr.mjs} +1 -1
- package/dist/web-components/viewer/Transport-D0-7mRrT.mjs +1 -0
- package/dist/web-components/viewer/{annotation-collection-vM0aeJgP.mjs → annotation-collection-C_5hyuvw.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-kjUrGbhg.mjs → annotation-name-Bb6Dgo3i.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-CysDLy4t.mjs → annotations-content-Jts8hjGT.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-S8GEd-YZ.mjs → cloverEngine-rvO-m6rC.mjs} +2 -2
- package/dist/web-components/viewer/{content-state-reader-BTZKS9Hq.mjs → content-state-reader-CP0H4Gnm.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-Bt4QtVSO.mjs → dragToClose-CfijwC7H.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-D4aIqcDV.mjs → fetchManifest-CI3k9v0b.mjs} +1 -1
- package/dist/web-components/viewer/{host-ClJe-BX1.mjs → host-CTbjXNd9.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-C3YwnNvq.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-CU71f0wU.mjs → link-CUm6T-7L.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-JHIugjA0.mjs +1 -0
- package/dist/web-components/viewer/range-regions-ulWKWvhS.mjs +1 -0
- package/dist/web-components/viewer/{renderers-2BgvLkI0.mjs → renderers-Hs9tzSPp.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-BW7D7oYG.mjs → save-file-CWKAFvNb.mjs} +1 -1
- package/dist/web-components/viewer/{search-DBMO82DV.mjs → search-HCPnXtXW.mjs} +1 -1
- package/dist/web-components/viewer/styles-DvZTMHkr.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-DSSIzst5.mjs → useControlsVisibility-ClvKjBYI.mjs} +1 -1
- package/dist/web-components/viewer/viewer-BFDNip3h.mjs +29 -0
- package/dist/web-components/viewer/{vtt-Dk5bwDVQ.mjs → vtt-B3wqH_vT.mjs} +1 -1
- package/dist/web-components/viewer-C-eGBKAn.mjs +1 -0
- package/dist/web-components/{vtt-9Ui3h60h.mjs → vtt-BYJ_dF4L.mjs} +1 -1
- package/package.json +1 -1
- package/dist/templates/shared/useLazyPanelPane.mjs +0 -16
- package/dist/web-components/Button-Bphsp8rv.mjs +0 -1
- package/dist/web-components/ControlsFade-BcGL7yUH.mjs +0 -1
- package/dist/web-components/Cue-DZJ5TBKU.mjs +0 -1
- package/dist/web-components/Document-DZDYR2Tk.mjs +0 -1
- package/dist/web-components/Items-C7wjylgH.mjs +0 -1
- package/dist/web-components/LightboxView-65ROPr0_.mjs +0 -1
- package/dist/web-components/LoadedMap-C06TIgvf.mjs +0 -1
- package/dist/web-components/MapView-CzV3y5iI.mjs +0 -3
- package/dist/web-components/PagerLayout-DHRpcI8x.mjs +0 -1
- package/dist/web-components/PanelPart-DKb9dXm6.mjs +0 -1
- package/dist/web-components/PanelToggle-D5sx5FP9.mjs +0 -1
- package/dist/web-components/Scene-CSaXgBNr.mjs +0 -1
- package/dist/web-components/Timeline-DY8LpnOG.mjs +0 -1
- package/dist/web-components/index-DGXCFoHu.mjs +0 -1
- package/dist/web-components/items-TIbaHoB8.mjs +0 -1
- package/dist/web-components/label-Bd-QYEXn.mjs +0 -1
- package/dist/web-components/logo-Cn820OoX.mjs +0 -1
- package/dist/web-components/part-DeZI8Hmp.mjs +0 -1
- package/dist/web-components/styles-DZIDbHxL.mjs +0 -1
- package/dist/web-components/toggle-3NncfBSZ.mjs +0 -1
- package/dist/web-components/useLazyPanelPane-DXYGGS7f.mjs +0 -1
- package/dist/web-components/viewer/AnnotationItems-B5Vs0dYi.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-ZPmnCpbZ.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-BVCqV9NT.mjs +0 -1
- package/dist/web-components/viewer/ChoiceMenu-Ww7lcPnq.mjs +0 -1
- package/dist/web-components/viewer/Collection-DCYM9eE6.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-pOQ5VQ5i.mjs +0 -1
- package/dist/web-components/viewer/Cue-oaiVO9ZO.mjs +0 -1
- package/dist/web-components/viewer/Document-ByBRhL68.mjs +0 -1
- package/dist/web-components/viewer/HideToggle-C6B9B2Bo.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-RrioB0CN.mjs +0 -1
- package/dist/web-components/viewer/ListEnd-8vdKw6Py.mjs +0 -1
- package/dist/web-components/viewer/MapView-G3yj-Bjd.mjs +0 -3
- package/dist/web-components/viewer/PagerLayout-LZmC6VpV.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Cw1G5W4b.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-CQrzTSPC.mjs +0 -1
- package/dist/web-components/viewer/Steps-Bd42-eq7.mjs +0 -1
- package/dist/web-components/viewer/Transport-g0_Cjy0f.mjs +0 -1
- package/dist/web-components/viewer/image-layers-DGa5HJt8.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-D9GHzMmm.mjs +0 -1
- package/dist/web-components/viewer/range-regions-CiceyEuu.mjs +0 -1
- package/dist/web-components/viewer/styles-DogZyfVz.mjs +0 -1
- package/dist/web-components/viewer/useLazyPanelPane-_6IY7cV5.mjs +0 -1
- package/dist/web-components/viewer/viewer-ClQD1LNQ.mjs +0 -29
- package/dist/web-components/viewer-DLfZQmZs.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as s,O as k,t as y,X as x,d as A,y as T,l as S,S as j,Y as C}from"./shared-
|
|
1
|
+
import{u as s,O as k,t as y,X as x,d as A,y as T,l as S,S as j,Y as C}from"./shared-BtCBrxx9.mjs";import{thumbnailSource as _,resolveThumbnail as w}from"./thumbnail-BdKVLxxw.mjs";import{t as O}from"./text-BTAkxEfQ.mjs";import{j as c}from"./classnames-DukgfdpI.mjs";import{M as R,a as q}from"./Markup-Bowjvwik.mjs";import{R as H}from"./ReadMore-B-l-lJxV.mjs";import{u as I,r as L}from"./resource-DU94ocC-.mjs";function u(t,a,r){const l=I(),n=x(i=>{var o;return(o=L(i,t))==null?void 0:o[a]},void 0);return r!==void 0?r:l?l[a]:n}const f=()=>{var t;return(t=k())==null?void 0:t.language};function F({of:t="manifest",as:a="p",value:r,className:l,...n}){const i=u(t,"summary",r),o=f();return y(i,o).text?s(H,{children:s(R,{as:a,markup:i,language:o,className:c("clover-summary",l),...n})}):null}function G({value:t,format:a,headingLevel:r,as:l="span",className:n,...i}){const o=f();return s(R,{as:l,markup:t,format:a,headingLevel:r,language:o,className:c("clover-value",n),...i})}function J({of:t="manifest",value:a,className:r,renderValue:l,...n}){const i=u(t,"metadata",a),o=f();return s(q,{metadata:i,language:o,renderValue:l,className:c("clover-metadata",r),...n})}function K({of:t="manifest",value:a,className:r,...l}){const n=u(t,"requiredStatement",a),i=f();return s(q,{metadata:n?[n]:null,language:i,className:c("clover-required-statement",r),...l})}function Q({of:t="manifest",value:a,className:r,...l}){const n=u(t,"rights",a);return n?s("a",{href:n,className:c("clover-rights",r),...l,children:n}):null}function U({of:t="manifest",value:a,className:r,...l}){const n=u(t,"id",a);return n?s("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:c("clover-id",r),...l,children:n}):null}function p({property:t,className:a,of:r="manifest",value:l,...n}){const i=j(u(r,t,l)),o=f(),d=i.filter(e=>e==null?void 0:e.id);return d.length?s("ul",{className:a,...n,children:d.map(e=>{const m=y(e.label,o);return s("li",{children:[s("a",{href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:C(e),...S(m.text?m.lang:void 0),children:m.text?O(m.text):e.id}),e.format&&s("span",{className:"clover-link-format",children:[" (",e.format,")"]})]},e.id)})}):null}const W=({className:t,...a})=>s(p,{property:"homepage",className:c("clover-homepage",t),...a}),Z=({className:t,...a})=>s(p,{property:"rendering",className:c("clover-rendering",t),...a}),$=({className:t,...a})=>s(p,{property:"seeAlso",className:c("clover-see-also",t),...a}),tt=({className:t,...a})=>s(p,{property:"partOf",className:c("clover-part-of",t),...a});function et({of:t="manifest",value:a,size:r=400,className:l,...n}){var b;const i=x(g=>L(g,t),null),o=a??i,d=f(),e=o?_(o):null,m=(e==null?void 0:e.src)??(e==null?void 0:e.service)??(e==null?void 0:e.fallback),[N,v]=A(e==null?void 0:e.src),M=(b=k())==null?void 0:b.clover.request;if(T(()=>{if(!e)return v(void 0);if(e.src)return v(e.src);let g=true;return w(e,r,M).then(P=>g&&v(P)),()=>{g=false}},[m,r]),!N)return null;const h=y(o==null?void 0:o.label,d);return s("img",{src:N,alt:O(h.text),...S(n.alt===void 0&&h.text?h.lang:void 0),width:r,loading:"lazy",decoding:"async",className:c("clover-thumbnail",l),...n})}export{W as Homepage,U as Id,J as Metadata,tt as PartOf,Z as Rendering,K as RequiredStatement,Q as Rights,$ as SeeAlso,F as Summary,et as Thumbnail,G as Value};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,X as x,O as P,S as v,u as l,l as B,k as O,t as w,x as I,Q as S,d as N,q as y,y as q,_ as z,Y as R,A as T}from"./shared-
|
|
1
|
+
import{a as k,X as x,O as P,S as v,u as l,l as B,k as O,t as w,x as I,Q as S,d as N,q as y,y as q,_ as z,Y as R,A as T}from"./shared-BtCBrxx9.mjs";import{t as _}from"./text-BTAkxEfQ.mjs";import{j}from"./classnames-DukgfdpI.mjs";import{L as $}from"./Label-CMEDN1xd.mjs";import{u as F,r as A,P as M}from"./resource-DU94ocC-.mjs";import"./styles-CAv9WP3T.mjs";const Q=typeof window>"u"?q:z,C=S(null),W=o=>{var e;return!!((e=o.textContent)!=null&&e.trim())||o.querySelector("img, svg, picture, video, canvas, object")!==null},X=o=>!!o&&typeof o=="object"&&["label","logo","homepage"].some(e=>v(o[e]).length>0),L=o=>!!o&&typeof o.id=="string",Y=o=>{const e=v(o.homepage).find(L);return e?{id:e.id,hrefLang:R(e)}:void 0},D=(o,e)=>{var s;if(!o)return null;for(const n of[o.label,(s=v(o.homepage).find(t=>t==null?void 0:t.label))==null?void 0:s.label]){const t=w(n,e);if(t.text)return{text:_(t.text),lang:t.lang}}return null};function eo({of:o="manifest",value:e,link:s=true,children:n,className:t,...d}){var f;const c=x(u=>{var p;return(p=A(u,o))==null?void 0:p.provider},void 0),g=(f=P())==null?void 0:f.language,r=v(e!==void 0?e:c).filter(X);return r.length?l("ul",{className:j("clover-provider",t),...d,children:r.map((u,p)=>{const m=s?Y(u):void 0,i=!!w(u.label,g).text;return l(G,{agent:u,homepage:m,children:n??l(O,{children:[l(H,{alt:i?"":void 0}),l($,{className:"clover-provider-label"})]})},u.id??p)})}):null}function G({agent:o,homepage:e,children:s}){const n=T(null),[t,d]=N(null),c=y(()=>{n.current&&!W(n.current)&&d(o)},[o]);return t===o?null:l("li",{className:"clover-provider-agent",children:l(M.Provider,{value:o,children:l(C.Provider,{value:c,children:e?l("a",{ref:n,href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:e.hrefLang,className:"clover-provider-link",children:s}):l("span",{ref:n,className:"clover-provider-content",children:s})})})})}function H({of:o="manifest",value:e,alt:s,className:n,...t}){var m;const{t:d,langOf:c}=k(),g=F(),r=x(i=>{var a;return(a=A(i,o))==null?void 0:a.provider},void 0),f=(m=P())==null?void 0:m.language,p=(e!==void 0?v(e):g?[g]:v(r)).flatMap(i=>{if(!i||typeof i!="object")return[];const a=i;if(a.type!=="Agent"&&L(a)&&!a.logo)return[{image:a,agent:null}];const b=v(a.logo).find(L);return b?[{image:b,agent:a}]:[]});return p.length?l(O,{children:p.map(({image:i,agent:a},b)=>{const h=D(a,f);return l(J,{src:i.id,alt:s??(h==null?void 0:h.text)??d("logo"),...B(s!==void 0?void 0:h?h.lang:c("logo")),width:i.width,height:i.height,loading:"lazy",decoding:"async",className:j("clover-logo",n),...t},`${i.id}-${b}`)})}):null}function J({alt:o,onError:e,...s}){const n=I(C),[t,d]=N(false),c=y(()=>d(true),[]);Q(()=>{t&&(n==null||n())},[t,n]);const g=y(r=>{var f;r!=null&&r.complete&&!r.naturalWidth&&((f=r.decode)==null||f.call(r).catch(c))},[c]);return t?null:l("img",{ref:g,alt:o,onError:r=>{e==null||e(r),c()},...s})}export{H as L,eo as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as p,y as h,_ as R,a as L,a2 as M,A as O,b as w,R as v,u as g,l as E}from"./shared-
|
|
1
|
+
import{d as p,y as h,_ as R,a as L,a2 as M,A as O,b as w,R as v,u as g,l as E}from"./shared-BtCBrxx9.mjs";const F=typeof window>"u"?h:R;function I({children:s}){const{t:r}=L(),u=M(),i=O(null),m=w(),c=v.Children.only(s),e=c.props.id??m,{open:t,cut:a,toggle:o}=A(i);return g("div",{className:"clover-read-more",children:[v.cloneElement(c,{ref:i,id:e,"data-read-more":t?"open":""}),(a||t)&&g("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e,onClick:o,ref:u.ref,...E(u.langOf(t?"readLess":"readMore")),children:r(t?"readLess":"readMore")})]})}function A(s){const[r,u]=p(false),[i,m]=p(false),c=()=>{const e=s.current;e&&!r&&m(e.scrollHeight>e.clientHeight+1)};return F(c),h(()=>{var l,f;const e=s.current;if(!e)return;let t=0;const a=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(c)},o=typeof ResizeObserver>"u"?null:new ResizeObserver(a);o==null||o.observe(e);const n=typeof MutationObserver>"u"?null:new MutationObserver(a);return n==null||n.observe(document.head,{childList:true,subtree:true,characterData:true}),n==null||n.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),n==null||n.observe(e,{attributes:true,attributeFilter:["style"]}),(f=(l=document.fonts)==null?void 0:l.addEventListener)==null||f.call(l,"loadingdone",a),()=>{var d,b;cancelAnimationFrame(t),o==null||o.disconnect(),n==null||n.disconnect(),(b=(d=document.fonts)==null?void 0:d.removeEventListener)==null||b.call(d,"loadingdone",a)}},[r,s.current]),{open:r,cut:i,toggle:()=>u(e=>!e)}}export{I as R,A as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as v,ai as h,a2 as d,u as o,a6 as m,aj as f,ak as p}from"./shared-
|
|
1
|
+
import{D as v,ai as h,a2 as d,u as o,a6 as m,aj as f,ak as p}from"./shared-BtCBrxx9.mjs";import{u as C,h as R}from"./useNearViewport-DWtnayYx.mjs";import{j as x}from"./classnames-DukgfdpI.mjs";const k=v(function({as:r="div",className:s,children:n,highContrast:u,...c},i){const[a,g,t]=h(c),e=d(i,t.lang),l=C(u);return o(p.Provider,{value:a,children:o(m.Provider,{value:e.hostLanguage,children:o(r,{ref:e.ref,className:x("clover-root",s),"data-status":g,...R(l),...t,children:[n,o(f,{clover:a.clover,language:a.language})]})})})});export{k as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as r,u as e,z as o,P as t}from"./shared-BtCBrxx9.mjs";import{S as a}from"./SceneView-B8_AOroA.mjs";import{C as i}from"./Pending-Ci8Pe6Ip.mjs";const l=o(()=>import("./Connected-BqaysSD7.mjs")),f=o(()=>import("./Loaded-CTi6A9VS.mjs"));function s(n){const c=r();return n.iiifContent!==void 0&&n.scene===void 0?e(t,{fallback:e(i,{}),children:e(f,{...n})}):n.scene?e(a,{...n}):c?e(t,{fallback:e(i,{}),children:e(l,{...n})}):null}export{s as Scene,s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r,A as m,y as F,R as ze,a as Ve,a4 as We,at as Ge,d as ee,a2 as Xe,b as Je,au as Qe,q as z,T as et,t as Se,l as tt,v as rt,a6 as ot}from"./shared-D2RadIoz.mjs";import{i as nt,T as at,r as he,E as ct,e as st,f as it,u as lt,d as ut,h as dt,g as vt,j as ft,C as pt,B as ht,l as gt,t as mt}from"./pointer-BqgxBJ82.mjs";import{s as bt,a as wt,h as yt,t as xt,z as kt,b as Ot}from"./models-wl-5vW2i.mjs";import{B as Lt}from"./BodyAlert-BBSStCpI.mjs";import{I as Ct}from"./glyphs-VoJVEqLE.mjs";import{u as Rt}from"./useControlsVisibility-BYZlgiAt.mjs";import{u as It,a as St,h as Mt}from"./useNearViewport-DMqMdvue.mjs";import{j as At}from"./classnames-DukgfdpI.mjs";import{c as Et,r as Ft}from"./contexts-ByL3eA_T.mjs";import{B as Pt}from"./Button-Bphsp8rv.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-ClH59vLg.mjs";import{L as Kt}from"./Loading-Du3wn1EM.mjs";import{S as A,f as Bt}from"./Tip-BatwzZZo.mjs";import{u as Me}from"./useContainerName-fp0-n_9x.mjs";import{e as Ht}from"./engines-BpFZX2dO.mjs";import"./styles-DZIDbHxL.mjs";import{a as Ut}from"./index-DGXCFoHu.mjs";const Ae=2*Math.PI,qt=.01,Zt=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Te(t,u,d=()=>t.clientHeight){const a=new Map;let v=0,f=false,l={x:0,y:0};const p=()=>{const[o,g]=[...a.values()];return o&&g?Math.hypot(o.x-g.x,o.y-g.y):0},b=o=>{if(!(o.pointerType==="mouse"&&o.button!==0)&&!nt(o.target,t)){a.set(o.pointerId,{x:o.clientX,y:o.clientY});try{t.setPointerCapture(o.pointerId)}catch{}a.size===1&&(f=false,l={x:o.clientX,y:o.clientY}),a.size===2&&(v=p())}},L=o=>{const g=a.get(o.pointerId);if(!g)return;const y={x:o.clientX,y:o.clientY};if(a.set(o.pointerId,y),a.size===2){const s=p();v>0&&s>0&&u.zoom(s/v),v=s;return}if(!f){if(Math.hypot(y.x-l.x,y.y-l.y)<at)return;f=true}const E=d()||1;u.turn(-(y.x-g.x)/E*Ae,-(y.y-g.y)/E*Ae)},C=o=>{a.delete(o.pointerId),v=a.size===2?p():0},R=o=>{o.ctrlKey&&(o.preventDefault(),u.zoom(Math.exp(-Zt(o)*qt)))};return t.addEventListener("pointerdown",b),t.addEventListener("pointermove",L),t.addEventListener("pointerup",C),t.addEventListener("pointercancel",C),t.addEventListener("wheel",R,{passive:false}),()=>{t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",L),t.removeEventListener("pointerup",C),t.removeEventListener("pointercancel",C),t.removeEventListener("wheel",R)}}const Ee={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},_t=400,te=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),H=236,j=t=>t.toFixed(1);function re(t,u,d,a){const[v,f]=d?[`256 ${j(256-u)}`,`256 ${j(256+u)}`]:[`${j(256-t)} 256`,`${j(256+t)} 256`];return`M${v}A${j(t)} ${j(u)} 0 0 ${a} ${f}`}function De({theta:t,phi:u}){const d=Math.PI/2-u,a=Math.max(1,H*Math.abs(Math.sin(d))),v=Math.max(1,H*Math.abs(Math.sin(t))),f=d>=0,l=Math.sin(2*t)<0;return{equator:{front:re(H,a,false,f?0:1),back:re(H,a,false,f?1:0)},meridian:{front:re(v,H,true,l?1:0),back:re(v,H,true,l?0:1)},x:256-H*Math.sin(t),y:256+(f?1:-1)*a*Math.cos(t),facing:Math.cos(t)>0}}function Fe(t,u){const[d,a,v,f,l]=(t==null?void 0:t.children)??[];if(!l)return;const{equator:p,meridian:b,x:L,y:C,facing:R}=De(u);d.setAttribute("d",p.front),a.setAttribute("d",p.back),v.setAttribute("d",b.front),f.setAttribute("d",b.back),l.setAttribute("cx",L.toFixed(1)),l.setAttribute("cy",C.toFixed(1)),l.setAttribute("fill",R?"currentColor":"none"),l.setAttribute("opacity",R?"1":String(ge))}const ge=.3,jt=ze.forwardRef(function(u,d){const a=De({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:a.equator.front}),r("path",{d:a.equator.back,strokeOpacity:ge}),r("path",{d:a.meridian.front}),r("path",{d:a.meridian.back,strokeOpacity:ge}),r("circle",{cx:a.x.toFixed(1),cy:a.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Yt({controls:t,controlButtons:u,turn:d,zoom:a,span:v,indicator:f,name:l}){const p=m(null),b=m(false),L=m(d);L.current=d;const C=m(a);C.current=a;const R=m(null),o=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);F(()=>{const s=R.current;if(s)return Te(s,{turn:(w,i)=>L.current(w,i),zoom:w=>C.current(w)},v)},[v,o]);const g=s=>{const w=p.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),p.current=null,w.held&&s&&(b.current=true))};F(()=>()=>g(false),[]);const y=(s,w)=>{if(s.button>0)return;g(false),b.current=false;const[i,ae]=Ee[w].rate,P={timer:0,frame:0,held:false};P.timer=window.setTimeout(()=>{P.held=true;let W=performance.now();const G=U=>{const ce=Math.min(.1,Math.max(0,U-W)/1e3);W=U,L.current(i*ce,ae*ce),P.frame=requestAnimationFrame(G)};P.frame=requestAnimationFrame(G)},_t),p.current=P},E=s=>{const w=t[s];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Ee[s].place,onPointerDown:i=>y(i,s),onPointerUp:()=>g(true),onPointerLeave:()=>g(false),onPointerCancel:()=>g(false),onKeyDown:i=>{i.repeat&&i.key==="Enter"&&i.preventDefault()},onClickCapture:i=>{b.current&&i.detail>0&&(i.stopPropagation(),i.preventDefault()),b.current=false},children:he(w,u)},s):null};return r("div",{className:"clover-scene-rotate",role:"group",...l.props,"data-testid":"clover-scene-rotate",children:[l.node,o&&r("span",{ref:R,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(jt,{ref:f})})}),E("rotateUp"),E("rotateLeft"),E("rotateRight"),E("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:he(t.reset,u)})]})}Ut(16,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Pe={zoom:true,fullPage:true,rotation:true,reset:true,information:true},Y=Math.PI/4,oe=Math.PI/12,Vt=Y/2,ne=1.5,Wt=["ArrowLeft ArrowRight ArrowUp ArrowDown",A.rotateRight.keys,A.rotateLeft.keys,A.zoomIn.keys,A.zoomOut.keys,A.reset.keys].join(" ");function pr(t){return t.scene?r(ct,{children:r(Gt,{...t,scene:t.scene})}):null}function Gt({scene:t,label:u,language:d,highContrast:a,className:v,controls:f=true,controlButtons:l,options:p,manifestId:b,engine:L="clover",onContentStateChange:C,children:R}){const{t:o}=Ve(),g=We(()=>b==="loading"?null:Ge({manifestId:b,canvasId:t.id,type:"Scene"}),C);F(()=>g(),[t.id,b,g]);const[y,E]=ee(null),s=Xe(E),w=It(a),i=m(null),ae=st(y),P=it(y),W=lt(),G=Rt(y,p==null?void 0:p.hideDelay,i),U=St(y),T=`clover-scene-${Je()}`,k=f===false?null:f===true?Pe:{...Pe,...f},me=bt(t),be=wt(t),we=p==null?void 0:p.request,ye=JSON.stringify([t.id,me,Qe(we),L]),xe=b==="loading",[I,D]=ee({state:"waiting"}),N=m(null),se=m(null),M=m(null),h=m(null),$=m(0),[Ne,$e]=ee(0),X=m({hiddenSince:null,release:()=>{}}),J=m(false),ie=m(null),le=m(null),Ke=ut(y),q=z(()=>{$.current||!N.current||($.current=requestAnimationFrame(()=>{var e;$.current=0,h.current&&((e=N.current)==null||e.draw(h.current),Fe(le.current,h.current))}))},[]),Z=z(()=>{const e=i.current,n=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return se.current?yt(se.current,n):null},[]),Q=z(e=>{!h.current||!M.current||(h.current=e(h.current,M.current),q())},[q]),ue=m(0),x=z((e,n)=>{Q(O=>xt(O,e,n));const c=ie.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[Q]);F(()=>()=>window.clearTimeout(ue.current),[]);const K=z(e=>Q((n,c)=>kt(n,e,c)),[Q]),Be=z(()=>{var e;return((e=i.current)==null?void 0:e.clientHeight)??0},[]),ke=z(()=>{M.current=Z(),h.current=M.current,q()},[Z,q]);F(()=>{const e=i.current;if(!e||!U)return;if(xe){D({state:"loading"});return}let n=true,c=null;const O=()=>{cancelAnimationFrame($.current),$.current=0,c==null||c.dispose(),c=null,N.current=null,Ft(X.current)};return X.current.release=()=>{O(),J.current=true,n&&D({state:"waiting"})},J.current=false,Et(X.current)?(D({state:"loading"}),Ht(L)().then(({createEngine:S})=>{if(n)return c=S(e,{onLost:()=>{O(),n&&D({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),N.current=c,c.load(me,we).then(Ye=>{n&&(se.current=Ye,M.current=Z(),h.current??(h.current=M.current),D({state:"ready"}),q())})}).catch(S=>{n&&(O(),D({state:"error",error:S instanceof Error?S:new Error(String(S)),load:true}))}),()=>{n=false,O()}):(J.current=true,D({state:"waiting"}),()=>{n=false})},[ye,xe,U,Ne,Z,q]),F(()=>{h.current=null},[ye]),F(()=>{const e=i.current;if(!e||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{X.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&J.current&&$e(O=>O+1)});return n.observe(e),()=>n.disconnect()},[]),F(()=>{const e=i.current;if(!e||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>{var S;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((S=ie.current)==null||S.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!N.current)return;N.current.resize();const O=h.current&&M.current&&Ot(h.current,M.current);M.current=Z(),O&&(h.current=M.current),cancelAnimationFrame($.current),$.current=0,h.current&&(N.current.draw(h.current),Fe(le.current,h.current))});return n.observe(e),()=>n.disconnect()},[Z]),F(()=>{const e=i.current;if(!(!e||I.state!=="ready"))return Te(e,{turn:x,zoom:K})},[I.state,x,K]);const He=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const n=e.shiftKey?Y:Vt,c=e.shiftKey?2*oe:oe;switch(e.key){case"ArrowLeft":x(n,0);break;case"ArrowRight":x(-n,0);break;case"ArrowUp":x(0,c);break;case"ArrowDown":x(0,-c);break;case"r":x(-Y,0);break;case"R":x(Y,0);break;case"+":case"=":K(ne);break;case"-":case"_":K(1/ne);break;case"0":ke();break;default:return}e.preventDefault()},de=`caption-${T}`,_=et(()=>k!=null&&k.information&&dt(t)?[t]:[],[k==null?void 0:k.information,t]),[Ue,Oe]=ee(false),ve=Ue&&_.length>0,Le=z(e=>{var n;Oe(false),e&&((n=document.getElementById(`information-${T}`))==null||n.focus())},[T]),qe=_.length&&Se(t.label,d).text?vt(de,0):void 0,V=[u,t.label].map(e=>Se(e,d)).find(e=>e.text),Ce=Me((V==null?void 0:V.text)||o("sceneModel"),V?V.lang:s.langOf("sceneModel"),false,s.hostLanguage),Re=`keys-${T}`,Ze=s.langOf("sceneRoleDescription")?void 0:o("sceneRoleDescription"),B=(e,n,c,O,S)=>({key:e,id:`${e}-${T}`,label:o(n),lang:s.langOf(n),glyph:c,onClick:O,...S?{shortcut:S}:{}}),_e=e=>k?[...k.zoom?[B("zoomIn","imageZoomIn",r(Tt,{}),()=>K(ne),A.zoomIn),B("zoomOut","imageZoomOut",r(Dt,{}),()=>K(1/ne),A.zoomOut)]:[],...k.fullPage&&W?[{key:"fullPage",id:`fullPage-${T}`,label:o(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(Nt,{}):r($t,{}),onClick:n=>void mt(n.currentTarget)}]:[]]:[],je=Me(o("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),fe=k?{...k.rotation&&{rotateUp:B("rotateUp","sceneRotateUp",r(te,{rotate:-90}),()=>x(0,oe)),rotateLeft:B("rotateLeft","imageRotateLeft",r(te,{rotate:180}),()=>x(Y,0),A.rotateLeft),rotateRight:B("rotateRight","imageRotateRight",r(te,{rotate:0}),()=>x(-Y,0),A.rotateRight),rotateDown:B("rotateDown","sceneRotateDown",r(te,{rotate:90}),()=>x(0,-oe))},...k.reset&&{reset:B("reset","sceneResetView",r(zt,{}),ke,A.reset)}}:{},pe=_e(Ke),Ie=I.state==="loading"||I.state==="waiting"&&U;return r(ot.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":qe,className:At("clover-canvas","clover-scene",v),"data-testid":"clover-scene",...Mt(w),"data-status":I.state==="ready"?"ready":I.state==="error"?"error":"loading","data-fullscreen":ae,"data-exit":P||void 0,"data-controls":G?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&ve&&!e.defaultPrevented){e.preventDefault(),Le(false);return}Bt(e,i.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ft,{hidden:!P}),(_.length>0||ze.Children.count(R)>0)&&r(pt,{children:[_.length>0&&r(Pt,{id:`information-${T}`,label:o("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>Oe(e=>!e),expanded:ve,controls:de,children:r(Ct,{})}),R]}),(pe.length>0||Object.keys(fe).length>0)&&r("div",{ref:ie,className:"clover-scene-navigation",children:[pe.length>0&&r("div",{className:"clover-scene-tools",children:pe.map(e=>he(e,l))}),Object.keys(fe).length>0&&r(Yt,{controls:fe,controlButtons:l,turn:x,zoom:K,span:Be,indicator:le,name:je})]}),r("div",{ref:i,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...be?{backgroundColor:be}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ze,...Ce.props,"aria-describedby":Re,"aria-keyshortcuts":Wt,"aria-busy":Ie,tabIndex:0,onKeyDown:He}),Ce.node,r("span",{id:Re,style:rt,...tt(s.langOf("sceneKeys")),children:o("sceneKeys")}),r(ht,{kind:"model",shown:I.state==="error"&&!!I.load}),I.state==="error"&&!I.load&&r(Lt,{error:I.error,className:"clover-scene-error"}),Ie&&r(Kt,{overlay:true}),_.length>0&&r(gt,{id:de,canvases:_,open:ve,onClose:Le,language:d})]})})}export{pr as S};
|
|
1
|
+
import{u as r,A as m,y as F,R as ze,a as Ve,a4 as We,at as Ge,d as ee,a2 as Xe,b as Je,au as Qe,q as z,T as et,t as Se,l as tt,v as rt,a6 as ot}from"./shared-BtCBrxx9.mjs";import{i as nt,T as at,r as he,E as ct,e as st,f as it,u as lt,d as ut,h as dt,g as vt,j as ft,C as pt,B as ht,l as gt,t as mt}from"./pointer-CAZRjvDP.mjs";import{s as bt,a as wt,h as yt,t as xt,z as kt,b as Ot}from"./models-qg8TrXAe.mjs";import{B as Lt}from"./BodyAlert-Cra_XvnG.mjs";import{I as Ct}from"./glyphs-BO-1m6-c.mjs";import{u as Rt}from"./useControlsVisibility-B4X3mKyY.mjs";import{u as It,a as St,h as Mt}from"./useNearViewport-DWtnayYx.mjs";import{j as At}from"./classnames-DukgfdpI.mjs";import{c as Et,r as Ft}from"./contexts-ByL3eA_T.mjs";import{B as Pt}from"./Button-CE-5ew-f.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-DbocsVHI.mjs";import{L as Kt}from"./Loading-tVzMiUqD.mjs";import{S as A,f as Bt}from"./Tip-Dd_jhbIx.mjs";import{u as Me}from"./useContainerName-C2L1lj9-.mjs";import{e as Ht}from"./engines-DJ3NJG7R.mjs";import"./styles-CAv9WP3T.mjs";import{a as Ut}from"./index-BAkCMEQf.mjs";const Ae=2*Math.PI,qt=.01,Zt=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Te(t,u,d=()=>t.clientHeight){const a=new Map;let v=0,f=false,l={x:0,y:0};const p=()=>{const[o,g]=[...a.values()];return o&&g?Math.hypot(o.x-g.x,o.y-g.y):0},b=o=>{if(!(o.pointerType==="mouse"&&o.button!==0)&&!nt(o.target,t)){a.set(o.pointerId,{x:o.clientX,y:o.clientY});try{t.setPointerCapture(o.pointerId)}catch{}a.size===1&&(f=false,l={x:o.clientX,y:o.clientY}),a.size===2&&(v=p())}},L=o=>{const g=a.get(o.pointerId);if(!g)return;const y={x:o.clientX,y:o.clientY};if(a.set(o.pointerId,y),a.size===2){const s=p();v>0&&s>0&&u.zoom(s/v),v=s;return}if(!f){if(Math.hypot(y.x-l.x,y.y-l.y)<at)return;f=true}const E=d()||1;u.turn(-(y.x-g.x)/E*Ae,-(y.y-g.y)/E*Ae)},C=o=>{a.delete(o.pointerId),v=a.size===2?p():0},R=o=>{o.ctrlKey&&(o.preventDefault(),u.zoom(Math.exp(-Zt(o)*qt)))};return t.addEventListener("pointerdown",b),t.addEventListener("pointermove",L),t.addEventListener("pointerup",C),t.addEventListener("pointercancel",C),t.addEventListener("wheel",R,{passive:false}),()=>{t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",L),t.removeEventListener("pointerup",C),t.removeEventListener("pointercancel",C),t.removeEventListener("wheel",R)}}const Ee={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},_t=400,te=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),H=236,j=t=>t.toFixed(1);function re(t,u,d,a){const[v,f]=d?[`256 ${j(256-u)}`,`256 ${j(256+u)}`]:[`${j(256-t)} 256`,`${j(256+t)} 256`];return`M${v}A${j(t)} ${j(u)} 0 0 ${a} ${f}`}function De({theta:t,phi:u}){const d=Math.PI/2-u,a=Math.max(1,H*Math.abs(Math.sin(d))),v=Math.max(1,H*Math.abs(Math.sin(t))),f=d>=0,l=Math.sin(2*t)<0;return{equator:{front:re(H,a,false,f?0:1),back:re(H,a,false,f?1:0)},meridian:{front:re(v,H,true,l?1:0),back:re(v,H,true,l?0:1)},x:256-H*Math.sin(t),y:256+(f?1:-1)*a*Math.cos(t),facing:Math.cos(t)>0}}function Fe(t,u){const[d,a,v,f,l]=(t==null?void 0:t.children)??[];if(!l)return;const{equator:p,meridian:b,x:L,y:C,facing:R}=De(u);d.setAttribute("d",p.front),a.setAttribute("d",p.back),v.setAttribute("d",b.front),f.setAttribute("d",b.back),l.setAttribute("cx",L.toFixed(1)),l.setAttribute("cy",C.toFixed(1)),l.setAttribute("fill",R?"currentColor":"none"),l.setAttribute("opacity",R?"1":String(ge))}const ge=.3,jt=ze.forwardRef(function(u,d){const a=De({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:a.equator.front}),r("path",{d:a.equator.back,strokeOpacity:ge}),r("path",{d:a.meridian.front}),r("path",{d:a.meridian.back,strokeOpacity:ge}),r("circle",{cx:a.x.toFixed(1),cy:a.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Yt({controls:t,controlButtons:u,turn:d,zoom:a,span:v,indicator:f,name:l}){const p=m(null),b=m(false),L=m(d);L.current=d;const C=m(a);C.current=a;const R=m(null),o=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);F(()=>{const s=R.current;if(s)return Te(s,{turn:(w,i)=>L.current(w,i),zoom:w=>C.current(w)},v)},[v,o]);const g=s=>{const w=p.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),p.current=null,w.held&&s&&(b.current=true))};F(()=>()=>g(false),[]);const y=(s,w)=>{if(s.button>0)return;g(false),b.current=false;const[i,ae]=Ee[w].rate,P={timer:0,frame:0,held:false};P.timer=window.setTimeout(()=>{P.held=true;let W=performance.now();const G=U=>{const ce=Math.min(.1,Math.max(0,U-W)/1e3);W=U,L.current(i*ce,ae*ce),P.frame=requestAnimationFrame(G)};P.frame=requestAnimationFrame(G)},_t),p.current=P},E=s=>{const w=t[s];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Ee[s].place,onPointerDown:i=>y(i,s),onPointerUp:()=>g(true),onPointerLeave:()=>g(false),onPointerCancel:()=>g(false),onKeyDown:i=>{i.repeat&&i.key==="Enter"&&i.preventDefault()},onClickCapture:i=>{b.current&&i.detail>0&&(i.stopPropagation(),i.preventDefault()),b.current=false},children:he(w,u)},s):null};return r("div",{className:"clover-scene-rotate",role:"group",...l.props,"data-testid":"clover-scene-rotate",children:[l.node,o&&r("span",{ref:R,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(jt,{ref:f})})}),E("rotateUp"),E("rotateLeft"),E("rotateRight"),E("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:he(t.reset,u)})]})}Ut(16,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Pe={zoom:true,fullPage:true,rotation:true,reset:true,information:true},Y=Math.PI/4,oe=Math.PI/12,Vt=Y/2,ne=1.5,Wt=["ArrowLeft ArrowRight ArrowUp ArrowDown",A.rotateRight.keys,A.rotateLeft.keys,A.zoomIn.keys,A.zoomOut.keys,A.reset.keys].join(" ");function pr(t){return t.scene?r(ct,{children:r(Gt,{...t,scene:t.scene})}):null}function Gt({scene:t,label:u,language:d,highContrast:a,className:v,controls:f=true,controlButtons:l,options:p,manifestId:b,engine:L="clover",onContentStateChange:C,children:R}){const{t:o}=Ve(),g=We(()=>b==="loading"?null:Ge({manifestId:b,canvasId:t.id,type:"Scene"}),C);F(()=>g(),[t.id,b,g]);const[y,E]=ee(null),s=Xe(E),w=It(a),i=m(null),ae=st(y),P=it(y),W=lt(),G=Rt(y,p==null?void 0:p.hideDelay,i),U=St(y),T=`clover-scene-${Je()}`,k=f===false?null:f===true?Pe:{...Pe,...f},me=bt(t),be=wt(t),we=p==null?void 0:p.request,ye=JSON.stringify([t.id,me,Qe(we),L]),xe=b==="loading",[I,D]=ee({state:"waiting"}),N=m(null),se=m(null),M=m(null),h=m(null),$=m(0),[Ne,$e]=ee(0),X=m({hiddenSince:null,release:()=>{}}),J=m(false),ie=m(null),le=m(null),Ke=ut(y),q=z(()=>{$.current||!N.current||($.current=requestAnimationFrame(()=>{var e;$.current=0,h.current&&((e=N.current)==null||e.draw(h.current),Fe(le.current,h.current))}))},[]),Z=z(()=>{const e=i.current,n=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return se.current?yt(se.current,n):null},[]),Q=z(e=>{!h.current||!M.current||(h.current=e(h.current,M.current),q())},[q]),ue=m(0),x=z((e,n)=>{Q(O=>xt(O,e,n));const c=ie.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[Q]);F(()=>()=>window.clearTimeout(ue.current),[]);const K=z(e=>Q((n,c)=>kt(n,e,c)),[Q]),Be=z(()=>{var e;return((e=i.current)==null?void 0:e.clientHeight)??0},[]),ke=z(()=>{M.current=Z(),h.current=M.current,q()},[Z,q]);F(()=>{const e=i.current;if(!e||!U)return;if(xe){D({state:"loading"});return}let n=true,c=null;const O=()=>{cancelAnimationFrame($.current),$.current=0,c==null||c.dispose(),c=null,N.current=null,Ft(X.current)};return X.current.release=()=>{O(),J.current=true,n&&D({state:"waiting"})},J.current=false,Et(X.current)?(D({state:"loading"}),Ht(L)().then(({createEngine:S})=>{if(n)return c=S(e,{onLost:()=>{O(),n&&D({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),N.current=c,c.load(me,we).then(Ye=>{n&&(se.current=Ye,M.current=Z(),h.current??(h.current=M.current),D({state:"ready"}),q())})}).catch(S=>{n&&(O(),D({state:"error",error:S instanceof Error?S:new Error(String(S)),load:true}))}),()=>{n=false,O()}):(J.current=true,D({state:"waiting"}),()=>{n=false})},[ye,xe,U,Ne,Z,q]),F(()=>{h.current=null},[ye]),F(()=>{const e=i.current;if(!e||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{X.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&J.current&&$e(O=>O+1)});return n.observe(e),()=>n.disconnect()},[]),F(()=>{const e=i.current;if(!e||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>{var S;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((S=ie.current)==null||S.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!N.current)return;N.current.resize();const O=h.current&&M.current&&Ot(h.current,M.current);M.current=Z(),O&&(h.current=M.current),cancelAnimationFrame($.current),$.current=0,h.current&&(N.current.draw(h.current),Fe(le.current,h.current))});return n.observe(e),()=>n.disconnect()},[Z]),F(()=>{const e=i.current;if(!(!e||I.state!=="ready"))return Te(e,{turn:x,zoom:K})},[I.state,x,K]);const He=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const n=e.shiftKey?Y:Vt,c=e.shiftKey?2*oe:oe;switch(e.key){case"ArrowLeft":x(n,0);break;case"ArrowRight":x(-n,0);break;case"ArrowUp":x(0,c);break;case"ArrowDown":x(0,-c);break;case"r":x(-Y,0);break;case"R":x(Y,0);break;case"+":case"=":K(ne);break;case"-":case"_":K(1/ne);break;case"0":ke();break;default:return}e.preventDefault()},de=`caption-${T}`,_=et(()=>k!=null&&k.information&&dt(t)?[t]:[],[k==null?void 0:k.information,t]),[Ue,Oe]=ee(false),ve=Ue&&_.length>0,Le=z(e=>{var n;Oe(false),e&&((n=document.getElementById(`information-${T}`))==null||n.focus())},[T]),qe=_.length&&Se(t.label,d).text?vt(de,0):void 0,V=[u,t.label].map(e=>Se(e,d)).find(e=>e.text),Ce=Me((V==null?void 0:V.text)||o("sceneModel"),V?V.lang:s.langOf("sceneModel"),false,s.hostLanguage),Re=`keys-${T}`,Ze=s.langOf("sceneRoleDescription")?void 0:o("sceneRoleDescription"),B=(e,n,c,O,S)=>({key:e,id:`${e}-${T}`,label:o(n),lang:s.langOf(n),glyph:c,onClick:O,...S?{shortcut:S}:{}}),_e=e=>k?[...k.zoom?[B("zoomIn","imageZoomIn",r(Tt,{}),()=>K(ne),A.zoomIn),B("zoomOut","imageZoomOut",r(Dt,{}),()=>K(1/ne),A.zoomOut)]:[],...k.fullPage&&W?[{key:"fullPage",id:`fullPage-${T}`,label:o(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(Nt,{}):r($t,{}),onClick:n=>void mt(n.currentTarget)}]:[]]:[],je=Me(o("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),fe=k?{...k.rotation&&{rotateUp:B("rotateUp","sceneRotateUp",r(te,{rotate:-90}),()=>x(0,oe)),rotateLeft:B("rotateLeft","imageRotateLeft",r(te,{rotate:180}),()=>x(Y,0),A.rotateLeft),rotateRight:B("rotateRight","imageRotateRight",r(te,{rotate:0}),()=>x(-Y,0),A.rotateRight),rotateDown:B("rotateDown","sceneRotateDown",r(te,{rotate:90}),()=>x(0,-oe))},...k.reset&&{reset:B("reset","sceneResetView",r(zt,{}),ke,A.reset)}}:{},pe=_e(Ke),Ie=I.state==="loading"||I.state==="waiting"&&U;return r(ot.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":qe,className:At("clover-canvas","clover-scene",v),"data-testid":"clover-scene",...Mt(w),"data-status":I.state==="ready"?"ready":I.state==="error"?"error":"loading","data-fullscreen":ae,"data-exit":P||void 0,"data-controls":G?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&ve&&!e.defaultPrevented){e.preventDefault(),Le(false);return}Bt(e,i.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ft,{hidden:!P}),(_.length>0||ze.Children.count(R)>0)&&r(pt,{children:[_.length>0&&r(Pt,{id:`information-${T}`,label:o("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>Oe(e=>!e),expanded:ve,controls:de,children:r(Ct,{})}),R]}),(pe.length>0||Object.keys(fe).length>0)&&r("div",{ref:ie,className:"clover-scene-navigation",children:[pe.length>0&&r("div",{className:"clover-scene-tools",children:pe.map(e=>he(e,l))}),Object.keys(fe).length>0&&r(Yt,{controls:fe,controlButtons:l,turn:x,zoom:K,span:Be,indicator:le,name:je})]}),r("div",{ref:i,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...be?{backgroundColor:be}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ze,...Ce.props,"aria-describedby":Re,"aria-keyshortcuts":Wt,"aria-busy":Ie,tabIndex:0,onKeyDown:He}),Ce.node,r("span",{id:Re,style:rt,...tt(s.langOf("sceneKeys")),children:o("sceneKeys")}),r(ht,{kind:"model",shown:I.state==="error"&&!!I.load}),I.state==="error"&&!I.load&&r(Lt,{error:I.error,className:"clover-scene-error"}),Ie&&r(Kt,{overlay:true}),_.length>0&&r(gt,{id:de,canvases:_,open:ve,onClose:Le,language:d})]})})}export{pr as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as te,a as se,e as ne,c as p,M as re,F as ce,C as oe,b as ae,d as H,y as h,A as d,u as o,l as j,t as ie}from"./shared-
|
|
1
|
+
import{D as te,a as se,e as ne,c as p,M as re,F as ce,C as oe,b as ae,d as H,y as h,A as d,u as o,l as j,t as ie}from"./shared-BtCBrxx9.mjs";import{j as le}from"./classnames-DukgfdpI.mjs";import{b as ue,s as he}from"./bringIntoView-CQH5ZgMM.mjs";import{a as de}from"./heading-Cjt0f-Eu.mjs";import{u as fe}from"./Sections-DK04V31W.mjs";import{F as ve}from"./FieldPill-pocIy1LB.mjs";import"./styles-CAv9WP3T.mjs";const O=40,xe=te(function({headingLevel:D=3,sticky:y=false,size:K="large",as:L="div",className:T,...U},k){const{t:B,langOf:V}=se(),{clover:r,language:G}=ne("Search"),b=p(e=>{var s;return((s=re(e.manifest))==null?void 0:s.id)??null}),t=p(e=>e.search),J=p(e=>ce(e.manifest).canvases),a=p(e=>e.annotationId),Q=oe(r.highlight.subscribe,r.highlight.get,r.highlight.get),I=ae(),[$,S]=H(t.query);h(()=>S(t.query),[t.query]);const l=d(null),v=fe(),P=d(0),q=d(false),R=d(null);h(()=>{if(t.status!=="ready"||!t.set||R.current===t.set)return;R.current=t.set;const e=t.hits[0],s=t.hits.some(n=>a&&n.entryIds.includes(a));e&&!s&&r.selectAnnotation(e.entryIds[0])},[r,t.status,t.set,t.hits,a]),h(()=>{var i;const e=(i=l.current)==null?void 0:i.closest(".clover-content-search-field"),s=e==null?void 0:e.parentElement;if(!y||!e||!s||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>s.style.setProperty("--clover-content-search-field",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),s.style.removeProperty("--clover-content-search-field")}},[y,b]),h(()=>{var s,n;if(!q.current)return;q.current=false;const e=(n=(s=l.current)==null?void 0:s.closest(".clover-content-search"))==null?void 0:n.querySelector('.clover-content-search-hit[aria-current="true"]');e&&ue(e,"nearest")},[a]);const[M,W]=H({set:null,count:O}),w=M.set===t.set?M.count:O,x=()=>W({set:t.set,count:w+O}),z=d(null),A=a?t.hits.findIndex(e=>e.entryIds.includes(a)):-1,N=typeof IntersectionObserver<"u",u=N?Math.min(t.hits.length,Math.max(w,A+1)):t.hits.length,E=d(x);if(E.current=x,h(()=>{const e=z.current;if(!e||!N||u>=t.hits.length)return;const s=new IntersectionObserver(n=>{n.some(i=>i.isIntersecting)&&E.current()},{root:he(e),rootMargin:"0px 0px 400px 0px"});return s.observe(e),()=>s.disconnect()},[N,u,t.hits.length]),h(()=>{!v||v===P.current||!l.current||(P.current=v,l.current.focus())},[v,b]),!b)return null;const F={position:A,total:t.hits.length,step:e=>{const s=t.hits[F.position+e];s&&(q.current=true,r.selectAnnotation(s.entryIds[0]))}},g=[];t.hits.slice(0,u).forEach((e,s)=>{const n=g[g.length-1];(n==null?void 0:n.canvasId)===e.canvasId?n.hits.push({hit:e,index:s}):g.push({canvasId:e.canvasId,hits:[{hit:e,index:s}]})});const X=de(D),f=t.hits.length,m=t.status==="loading"?"contentSearchLoading":t.status==="error"?"contentSearchError":t.status==="ready"?f===0?"contentSearchResultsNone":f===1?"contentSearchResult":"contentSearchResults":null,Y=m?B(m,{count:f}):"",Z=t.status==="ready"?F:null,_=o("p",{className:"clover-content-search-status",role:"status","data-status":t.status,...j(m?V(m):void 0),children:Y});return o(L,{ref:k,className:le("clover-content-search",T),"data-status":t.status,"data-sticky":y||void 0,...U,children:[o("div",{className:"clover-content-search-field",children:o(ve,{ref:l,id:`${I}-query`,value:$,onChange:e=>{S(e),!e&&t.query&&r.search("")},onSubmit:()=>void r.search($),onClear:()=>{var e;S(""),t.query&&r.search(""),(e=l.current)==null||e.focus()},results:Z,size:K,classes:{form:"clover-content-search-form",query:"clover-content-search-query",clear:"clover-content-search-clear",submit:"clover-content-search-submit"}})}),_,g.map(({canvasId:e,hits:s},n)=>{const i=J.find(c=>c.id===e),C=ie(i==null?void 0:i.label,G);return o("section",{className:"clover-content-search-group","aria-labelledby":`${I}-${n}`,children:[o(X,{id:`${I}-${n}`,className:"clover-content-search-canvas",...j(C.text?C.lang:void 0),children:C.text||e}),o("ol",{className:"clover-content-search-hits",children:s.map(({hit:c,index:ee})=>o("li",{children:o("button",{type:"button",className:"clover-content-search-hit","aria-current":a&&c.entryIds.includes(a)?"true":void 0,"data-highlighted":c.entryIds.includes(Q??""),onClick:()=>r.selectAnnotation(c.entryIds[0]),onPointerEnter:()=>r.highlight.emit(c.entryIds[0]),onPointerLeave:()=>r.highlight.emit(null),onFocus:()=>{r.highlight.emit(c.entryIds[0]),u<f&&ee>=u-5&&x()},onBlur:()=>r.highlight.emit(null),children:[c.before,o("mark",{children:c.match}),c.after]})},c.id))})]},`${e}-${n}`)}),u<f&&o("div",{ref:z,className:"clover-content-search-more","aria-hidden":"true"})]})});export{xe as Search};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as ae,A as $,a as ie,d as G,y as z,_ as de,u as i,Q as J,l as ue,k as fe,x as Z}from"./shared-
|
|
1
|
+
import{b as ae,A as $,a as ie,d as G,y as z,_ as de,u as i,Q as J,l as ue,k as fe,x as Z}from"./shared-BtCBrxx9.mjs";import{a as pe}from"./heading-Cjt0f-Eu.mjs";import{T as ve}from"./Tip-Dd_jhbIx.mjs";import{u as he}from"./useContainerName-C2L1lj9-.mjs";import{u as ge}from"./useScrollTrack-D-Yh7v0Q.mjs";import{C as me}from"./Chevron-CePM9HdR.mjs";import"./styles-CAv9WP3T.mjs";const V=typeof window>"u"?z:de,ee=J(null);function Pe(){return Z(ee)}const te=J(0);function Ne(){return Z(te)}function $e({items:n,layout:r="tabs",value:R,onValueChange:S,label:E,labelLang:F,headingLevel:h=3}){var Q;const g=ae(),k=he(E??"",F,E===void 0),f=$([]),s=r==="tabs",{t:I,langOf:oe}=ie(),m=ge({dragFree:true,itemCount:n.length}),v=n.some(e=>e.value===R)?R:((Q=n[0])==null?void 0:Q.value)??null,H=$(new Set);v&&H.current.add(v);const T=$(null),[D,ne]=G({value:null,count:0});z(()=>{var d;if(s||!v||T.current!==v)return;T.current=null;const e=n.findIndex(u=>u.value===v),o=document.getElementById(`${g}-panel-${e}`),t=(d=f.current[e])==null?void 0:d.parentElement;if(!o||!t)return;const l=t.getBoundingClientRect().bottom-o.getBoundingClientRect().top;if(l<=0)return;const a=M(o);a&&(a.scrollTop-=l)},[v,s,n,g]);const re=e=>{var B,P,y,N;const o=n.findIndex(A=>A.value===v),t=document.getElementById(`${g}-panel-${o}`),l=e.target;if(!t||l===t||!t.contains(l)||!ye(l))return;const a=(P=(B=f.current[o])==null?void 0:B.parentElement)==null?void 0:P.getBoundingClientRect(),d=o+1<n.length?(N=(y=f.current[o+1])==null?void 0:y.parentElement)==null?void 0:N.getBoundingClientRect():void 0;if(!a)return;const u=l.getBoundingClientRect(),b=u.top<a.bottom?Math.floor(u.top-a.bottom):d&&u.bottom>d.top?Math.ceil(Math.min(u.bottom-d.top,u.top-a.bottom)):0,p=b?M(t):null;p&&(p.scrollTop+=b)},j=$(null),K=n.map(e=>e.value).join(`
|
|
2
2
|
`);V(()=>{const e=j.current;if(s||!e||typeof ResizeObserver>"u")return;const o=[...e.querySelectorAll(":scope > .clover-sections-item")],t=o.map(c=>c.firstElementChild),l=t[0],a=t[t.length-1],d=new Map,u=c=>(c&&d.get(c))??0,b=document.scrollingElement;let p=null,B=0;const P=()=>{const c=t.reduce((O,L)=>O+u(L),0);let C=0;o.forEach((O,L)=>{O.style.setProperty("--clover-sections-before",`${C}px`),C+=u(t[L]),O.style.setProperty("--clover-sections-after",`${c-C}px`)}),e.style.setProperty("--clover-sections-total",`${c}px`);const w=l&&getComputedStyle(l);(w==null?void 0:w.position)==="sticky"&&a&&(B=parseFloat(w.top)+parseFloat(getComputedStyle(a).bottom)||0);const x=getComputedStyle(e),ce=parseFloat(x.lineHeight)||1.2*parseFloat(x.fontSize),X=(p==null?void 0:p.clientHeight)??0;X>0&&X-B-c<2*ce?e.dataset.stacks="off":delete e.dataset.stacks},y=new ResizeObserver(c=>{var C,w;for(const x of c)t.includes(x.target)&&d.set(x.target,((w=(C=x.borderBoxSize)==null?void 0:C[0])==null?void 0:w.blockSize)??x.target.getBoundingClientRect().height);P()}),N=()=>{const c=M(e);c!==p&&(p&&p!==b&&y.unobserve(p),c&&c!==b&&y.observe(c),p=c)},A=()=>{N(),P()};N();for(const c of t)c&&y.observe(c,{box:"border-box"});return window.addEventListener("resize",A),()=>{y.disconnect(),window.removeEventListener("resize",A);for(const c of o)c.style.removeProperty("--clover-sections-before"),c.style.removeProperty("--clover-sections-after");e.style.removeProperty("--clover-sections-total"),delete e.dataset.stacks}},[s,K,h]),z(()=>{if(s)return;const e=f.current.map(t=>t==null?void 0:t.parentElement).filter(t=>!!t),o=t=>{var u;if(t.ctrlKey)return;const l=t.currentTarget,a=_(l);if(!a||a===document.scrollingElement)return;t.preventDefault();const d=t.deltaMode===1?parseFloat(getComputedStyle(l).lineHeight)||16:t.deltaMode===2?a.clientHeight:1;(u=_(a)??document.scrollingElement)==null||u.scrollBy({left:t.deltaX*d,top:t.deltaY*d,behavior:"instant"})};for(const t of e)t.addEventListener("wheel",o,{passive:false});return()=>{for(const t of e)t.removeEventListener("wheel",o)}},[s,K]);const W=e=>{e!==v&&(T.current=e,s||ne(o=>({value:e,count:o.count+1})),S==null||S(e))},se=(e,o)=>{var u;const t=n.length-1,[l,a]=s?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],d=e.key===a?(o+1)%n.length:e.key===l?(o-1+n.length)%n.length:e.key==="Home"?0:e.key==="End"?t:null;d!==null&&(e.preventDefault(),(u=f.current[d])==null||u.focus(),s&&W(n[d].value))},Y=$(false);z(()=>{if(!s)return;const e=n.findIndex(p=>p.value===v),o=f.current[e],t=o==null?void 0:o.parentElement;if(!o||!t)return;const l=getComputedStyle(t),a=t.getBoundingClientRect(),d=o.getBoundingClientRect(),u=a.left+(parseFloat(l.scrollPaddingLeft)||0),b=a.right-(parseFloat(l.scrollPaddingRight)||0);(d.left<u-1||d.right>b+1)&&m.scrollToIndex(e,{instant:!Y.current}),Y.current=true},[v,s,n.length,m.scrollToIndex]);const q=e=>{const o=e==="prev"?m.canScrollPrev:m.canScrollNext,t=e==="prev"?"sectionsScrollBack":"sectionsScrollForward";return i("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${e}`,"aria-hidden":"true",tabIndex:-1,hidden:!o,...ue(oe(t)),onMouseDown:l=>l.preventDefault(),onClick:e==="prev"?m.scrollPrev:m.scrollNext,children:[i("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:i("path",{d:e==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),i(ve,{label:I(t)})]})},le=pe(h,"div"),U=(e,o)=>{const t=e.value===v;return i("button",{ref:l=>{f.current[o]=l},type:"button",id:`${g}-button-${o}`,className:"clover-sections-button","data-value":e.value,"data-track-index":s?o:void 0,"aria-controls":`${g}-panel-${o}`,...s?{role:"tab","aria-selected":t,tabIndex:t?0:-1}:{"aria-expanded":t,"aria-disabled":t||void 0},onClick:()=>W(e.value),onKeyDown:l=>se(l,o),children:[i("span",{className:"clover-sections-label",children:e.label}),!s&&i(me,{open:t,className:"clover-sections-chevron"})]},e.value)};return i("div",{ref:j,className:"clover-sections","data-layout":r,onFocus:s?void 0:re,style:s?void 0:{"--clover-sections-count":n.length},children:[s&&i("div",{className:"clover-sections-tabs","data-more":[m.canScrollPrev&&"start",m.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:i("div",{className:"clover-sections-row",children:[i("div",{role:"tablist",ref:m.ref,...k.props,className:"clover-sections-list",children:n.map(U)}),q("prev"),q("next")]})}),s&&k.node,n.map((e,o)=>{const t=e.value===v;return i("section",{className:"clover-sections-item","data-value":e.value,"data-open":t,style:s?void 0:{"--clover-sections-index":o},children:[!s&&i(le,{className:"clover-sections-heading",children:[U(e,o),i("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),i(te.Provider,{value:D.value===e.value?D.count:0,children:i(be,{id:`${g}-panel-${o}`,tabs:s,labelledBy:`${g}-button-${o}`,hidden:!t,actions:e.actions,children:H.current.has(e.value)?e.content:null})})]},e.value)})]})}function be({id:n,tabs:r,labelledBy:R,hidden:S,actions:E,children:F}){const[h,g]=G(null),k=!S||!!E;return V(()=>{const f=h==null?void 0:h.parentElement;if(!k||!h||!f||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>{const I=h.offsetWidth;I?(f.style.setProperty("--clover-sections-actions",`${I}px`),f.setAttribute("data-actions","")):(f.style.removeProperty("--clover-sections-actions"),f.removeAttribute("data-actions"))});return s.observe(h),()=>{s.disconnect(),f.style.removeProperty("--clover-sections-actions"),f.removeAttribute("data-actions")}},[h,k]),i(fe,{children:[!r&&i("div",{ref:g,className:"clover-sections-actions",hidden:!k,children:E}),i("div",{id:n,role:r?"tabpanel":"region","aria-labelledby":R,tabIndex:r?0:void 0,className:"clover-sections-panel",hidden:S,children:i(ee.Provider,{value:r?null:h,children:[r&&E,F]})})]})}function M(n){for(let r=n.parentElement;r&&r!==document.body;r=r.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(r).overflowY))return r;return document.scrollingElement}function _(n){for(let r=n.parentElement;r&&r!==document.body;r=r.parentElement)if(/auto|scroll/.test(getComputedStyle(r).overflowY)&&r.scrollHeight>r.clientHeight)return r;return document.scrollingElement}function ye(n){try{return n.matches(":focus-visible")}catch{return true}}export{$e as S,Pe as a,Ne as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A,A as C,d as B,_ as O,T as W,u as c,ah as q,l as P,k as _}from"./shared-
|
|
1
|
+
import{a as A,A as C,d as B,_ as O,T as W,u as c,ah as q,l as P,k as _}from"./shared-BtCBrxx9.mjs";import{b as z}from"./Transport-DGXTdsId.mjs";import{S as Y}from"./Steps-Dw4i3bYY.mjs";import{h as j}from"./Tip-Dd_jhbIx.mjs";const H=12;function G(e,s,l,d){const f=i=>H/2+(l-H)*(i.start/s),h=[];for(const i of e){const m=h[h.length-1];(m?l>0?f(i)-f(m[0])<d:i.start===m[0].start:false)?m.push(i):h.push([i])}return h}const J={ArrowDown:e=>parseFloat(getComputedStyle(e).lineHeight)||16,ArrowUp:e=>-(parseFloat(getComputedStyle(e).lineHeight)||16),PageDown:e=>e.clientHeight,PageUp:e=>-e.clientHeight};function Q(e){const s=e.currentTarget.querySelector(".clover-canvas-transport-mark-words"),l=J[e.key];if(!s||!l||e.altKey||e.ctrlKey||e.metaKey)return false;const d=l(s);return(d>0?s.scrollHeight-s.clientHeight-s.scrollTop:s.scrollTop)<1?false:(e.preventDefault(),s.scrollBy({top:d}),true)}function et({marks:e,duration:s,selected:l,onSelect:d,onActivate:f}){const{t:h,langOf:i}=A(),m=C(null),[u,D]=B({width:0,target:0,from:0});O(()=>{const t=m.current;if(!t)return;const n=t.closest(".clover-canvas-media"),r=()=>{const p=t.querySelector(".clover-canvas-transport-mark"),g={width:t.clientWidth,target:(p==null?void 0:p.offsetWidth)??0,from:n?t.getBoundingClientRect().left-n.getBoundingClientRect().left:0};D(v=>v.width===g.width&&v.target===g.target&&v.from===g.from?v:g)};r();const o=new ResizeObserver(r);return o.observe(t),n&&o.observe(n),()=>o.disconnect()},[]);const y=W(()=>G(e,s,u.width,u.target),[e,s,u]),[M,E]=B({}),K=t=>{const n=t.findIndex(r=>r.id===l);return n>=0?n:Math.min(M[t[0].id]??0,t.length-1)},[$,I]=B(null),[L,R]=B(null),k=t=>{R(t),f==null||f(t)},T=C([]),x=C(new Set);if(!e.length||!(s>0))return null;const b=(t,n)=>!!n&&t.some(r=>r.id===n),F=Math.max(0,y.findIndex(t=>b(t,$??l))),S=t=>{var r;const n=Math.min(y.length-1,Math.max(0,t));(r=T.current[n])==null||r.focus()},N=t=>z(t[0].start/s*100),U=t=>`${u.from+H/2+(u.width-H)*(t[0].start/s)}px`;return c(_,{children:[c("span",{className:"clover-canvas-transport-points","aria-hidden":"true",children:y.map(t=>c("span",{className:"clover-canvas-transport-mark-point","data-active":b(t,L)||b(t,l)?"true":void 0,style:{left:N(t)}},t[0].id))}),c("div",{ref:m,className:"clover-canvas-transport-marks",role:"toolbar","aria-label":h("informationPanelTabsAnnotations"),lang:i("informationPanelTabsAnnotations"),onKeyDown:t=>{const n=T.current.findIndex(o=>o===document.activeElement);if(n<0)return;const r=getComputedStyle(t.currentTarget).direction==="rtl"?-1:1;if(t.key==="ArrowRight")S(n+r);else if(t.key==="ArrowLeft")S(n-r);else if(t.key==="Home")S(0);else if(t.key==="End")S(y.length-1);else return;t.preventDefault()},children:y.map((t,n)=>{const r=K(t),o=t[r],p=q(o.start),g=t.length>1?` ${r+1} / ${t.length}`:"",v=a=>{E(w=>({...w,[t[0].id]:a})),k(t[a].id),d(t[a].id)};return c("div",{className:"clover-canvas-transport-mark-group",style:{left:N(t),...u.width>0&&{"--clover-mark-x":U(t)}},onPointerEnter:()=>{x.current.delete(t[0].id),k(o.id)},onPointerLeave:()=>k(null),onFocus:()=>{x.current.delete(t[0].id),I(o.id),k(o.id)},onBlur:a=>{a.currentTarget.contains(a.relatedTarget)||k(null)},onKeyDown:a=>{if(a.defaultPrevented||Q(a)||a.key!=="Escape"||x.current.has(t[0].id))return;a.preventDefault(),x.current.add(t[0].id);const w=T.current[n];w&&document.activeElement!==w&&w.focus(),j(a.currentTarget,"tipHidden",["pointerenter","focusin"])},children:[c("button",{ref:a=>{T.current[n]=a},type:"button",className:"clover-canvas-transport-mark",tabIndex:n===F?0:-1,"aria-label":`${p} ${o.label}${g}`,...P(o.lang),"aria-current":b(t,l)?"true":void 0,"data-active":b(t,l)?"true":void 0,onClick:()=>d(o.id)}),c("span",{className:"clover-tip clover-canvas-transport-mark-tip",children:[c("span",{className:"clover-canvas-transport-mark-words","aria-hidden":"true",...P(o.lang),children:[c("span",{className:"clover-tip-lead",children:p}),o.label]}),t.length>1&&c(Y,{steps:{position:r,total:t.length,step:a=>v(r+a)}})]})]},t[0].id)})})]})}export{et as SeekMarks,G as groupMarks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as b,A as I,y as L,aD as P,T as V,a3 as k,u as O,Y as F}from"./shared-
|
|
1
|
+
import{d as b,A as I,y as L,aD as P,T as V,a3 as k,u as O,Y as F}from"./shared-BtCBrxx9.mjs";import{s as M,P as R,a as T}from"./Items-GF8INTZw.mjs";import{b as Y}from"./items-CDbMZvPN.mjs";function B({iiifContent:a,items:e,navigation:w,onSelect:r,request:i,header:x=true,forwardedRef:g,...u}){var p;const[s,A]=b(null),[f,c]=b(0),D=typeof a=="string"?a:a==null?void 0:a.id,m=I({iiifContent:a,request:i});m.current={iiifContent:a,request:i},L(()=>{if(e||m.current.iiifContent===void 0)return;const t=new AbortController;return P(m.current.iiifContent,{request:m.current.request,signal:t.signal}).then(o=>{t.signal.aborted||A(o)}).catch(()=>{}),()=>t.abort()},[D,e]);const n=V(()=>Y(e||s),[e,s]);if(!n.length)return null;const h=!e&&(s==null?void 0:s.type)==="Manifest",d=k(s==null?void 0:s.viewingDirection),y=w??(h?"id":"homepage");if(u.layout==="pager")return O(R,{...u,forwardedRef:g,steps:M(n,f,d,(t,o)=>{r==null||r(t,o),c(n.indexOf(t))})});const l=(p=s==null?void 0:s.homepage)==null?void 0:p[0],v=l==null?void 0:l.id;return O(T,{...u,forwardedRef:g,items:n,selected:y==="id"?f:-1,navigation:y,rtl:d==="right-to-left",request:i,showSummary:!h,heading:x&&s?{label:s.label,summary:s.summary,homepage:v,homepageLang:F(l)}:void 0,onActivate:(t,o)=>{r==null||r(t,o),c(n.indexOf(t))},followFocus:t=>c(n.indexOf(t))})}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,u as s,v as c,l as d,k as m}from"./shared-
|
|
1
|
+
import{a as p,u as s,v as c,l as d,k as m}from"./shared-BtCBrxx9.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{b as f}from"./hooks-Dl6ZSn_E.mjs";import{L as h}from"./Loading-tVzMiUqD.mjs";function b({className:e,loading:t,error:l}){const{t:n,langOf:i}=p(),{status:a,error:o}=f(),r=a==="loading",u=t!==void 0&&t!==false;return s(m,{children:[s("p",{className:v("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(h,{})),r&&!u&&s("span",{style:c,...d(i("statusLoading")),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:v("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(m,{children:[s("p",{...d(i("statusError")),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{b as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,u as o,l as p,v as u}from"./shared-
|
|
1
|
+
import{a as c,u as o,l as p,v as u}from"./shared-BtCBrxx9.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-Dd_jhbIx.mjs";import"./styles-CAv9WP3T.mjs";function g({steps:e,sentence:t,className:a}){const{t:l,langOf:n}=c(),{position:r,total:i}=e;if(i<1)return null;const s=r+1;return o("div",{className:h("clover-steps",a),children:[o("span",{"aria-live":"polite",className:"clover-steps-position",children:[o("span",{"aria-hidden":t?"true":void 0,children:[s>0?s:"\u2013"," / ",i]}),o("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[i," / ",i]}),t&&s>0&&o("span",{style:u,...p(n(t)),children:l(t,{index:s,total:i})})]}),o(d,{steps:e,step:"previous"}),o(d,{steps:e,step:"next"})]})}function d({steps:e,step:t}){const{t:a,langOf:l}=c(),n=t==="next",r=n?e.position+1<e.total:e.position>0,i=n?"commonNext":"commonPrevious";return o("button",{type:"button",className:"clover-steps-step","data-step":t,...p(l(i)),"aria-disabled":!r||void 0,tabIndex:r?void 0:-1,onClick:()=>{r&&e.step(n?1:-1)},children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:o("path",{d:n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("span",{style:u,children:a(i)}),o(v,{label:a(i)})]})}export{g as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p,c as m,ad as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-
|
|
1
|
+
import{e as p,c as m,ad as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-BtCBrxx9.mjs";import{s as w,P as M,a as C}from"./Items-GF8INTZw.mjs";import{C as P}from"./CountMenu-CpM-FXwx.mjs";import{f as S,r as N}from"./fetchManifest-BchmTYKJ.mjs";import{S as q}from"./Steps-Dw4i3bYY.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-CAv9WP3T.mjs";function I({onSelect:s,forwardedRef:t,...i}){const{clover:l,language:o}=p("Items"),{items:a,position:e}=F(),r=(n,c)=>{s==null||s(n,c);const u=a.findIndex(T=>T.id===n.id);u>=0&&l.goToTarget(u)};return i.layout==="pager"?d(M,{...i,forwardedRef:t,steps:w(a,e,"left-to-right",r),nameKey:"informationPanelTabsTargets",position:d(P,{position:e,total:a.length,list:n=>d(I,{layout:"list",forwardedRef:null,onSelect:n})})}):d(C,{...i,forwardedRef:t,items:a,selected:e,navigation:"id",language:o,request:l.request,showSummary:true,onActivate:r})}function F(){const{language:s}=p("Items"),t=m(e=>e.targets),i=m(e=>e.manifest),l=m(e=>v(e.targets,e.targetIndex,e.manifest,e.canvasId)),o=z(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>B(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function z(s,t){const{clover:i}=p("Items"),l=g(()=>[...new Set((s??[]).map(e=>e.manifestId))],[s]),[o,a]=x(new Map);return y(()=>{let e=true;return Promise.all(l.map(async r=>[r,await S(i,r)])).then(r=>{e&&a(new Map(r.filter(n=>!!n[1])))}),()=>{e=false}},[i,l]),g(()=>{const e=new Map(o);return t&&e.set(t.id,t),e},[o,t])}function B(s,t,i){const l=t?b(t).canvases:[],o=l.find(u=>u.id===s.canvasId)??l[0],a=t==null?void 0:t.label,e=o==null?void 0:o.label,r=f(e,i).text?e:a,n=a&&r!==a&&f(a,i).text!==f(r,i).text?a:void 0,c=o&&s.region?N(o,s.region):void 0;return{id:s.id,label:r,summary:n,parts:[{id:s.id,type:"Canvas",label:r,resource:o??{id:s.canvasId??s.manifestId},...c?{source:c}:{}}]}}function E({headingLevel:s=3}){const{clover:t,language:i}=p("Items"),l=m(n=>{var c;return(c=n.targets)==null?void 0:c.label}),o=m(n=>{var c;return((c=n.targets)==null?void 0:c.items.length)??0}),a=m(n=>v(n.targets,n.targetIndex,n.manifest,n.canvasId));if(o<2)return null;const e=f(l,i),r=A(s);return d("div",{className:"clover-about clover-collection clover-targets",children:[d("div",{className:"clover-targets-head",children:[e.text&&d(r,{className:"clover-collection-title clover-title",...h(e.lang),children:e.text}),d(q,{className:"clover-targets-steps",steps:{position:a,total:o,step:n=>{const c=a+n;c>=0&&c<o&&t.goToTarget(c)}}})]}),d(I,{layout:"list",forwardedRef:null})]})}export{E as TargetsSection,I as default,F as useTargetItems};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as f,u as a,z as l,P as r}from"./shared-BtCBrxx9.mjs";import{C as m}from"./CanvasView-DcrhjwpU.mjs";import{p as t}from"./playerSurface-D3T1sYp4.mjs";import{C as s}from"./Pending-Ci8Pe6Ip.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";const d=l(()=>import("./Connected-D_Y8fBZk.mjs")),v=l(()=>import("./LoadedCanvas-Bdqqh01C.mjs"));function h({timeline:o,className:n,...e}){const c=f(),i=u("clover-timeline",n);return e.iiifContent!==void 0&&o===void 0?a(r,{fallback:a(s,{}),children:a(v,{...e,className:i,of:"Timeline",surface:t})}):o?a(m,{...e,className:i,canvases:[o],navigator:false,surface:t}):c?a(r,{fallback:a(s,{}),children:a(d,{...e,className:n})}):null}export{h as Timeline,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,A as L,y as S,u as f,l as w}from"./shared-
|
|
1
|
+
import{a as k,A as L,y as S,u as f,l as w}from"./shared-BtCBrxx9.mjs";import"./styles-CAv9WP3T.mjs";const M={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},R=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function B({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:i,after:a}){const{t:c}=k(),l=L(null),u=n?c("controlShortcut",{label:t,shortcut:n.glyph}):t;return K(),S(()=>{const s=l.current;s&&m(s)&&p(s)},[u,i]),f("span",{ref:l,className:"clover-tip","aria-hidden":"true",...w(e),...o&&{tabIndex:-1,onMouseDown:s=>{var g;s.preventDefault(),(g=s.currentTarget.parentElement)==null||g.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const s=l.current;s&&m(s)&&p(s)}}),i&&f("span",{className:"clover-tip-lead",children:i}),u,a!=null&&a!==false&&f("span",{className:"clover-tip-after",children:a})]})}function d(t){const e=t.target instanceof Element&&y(t.target),n=e&&h(e);n&&p(n)}function O(t){const e=h(y(t));e&&m(e)&&p(e)}function h(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function y(t){const e=t.matches("input")?t.parentElement:null;return e&&h(e)?e:t}function m(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function p(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=T(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,i=n.right-o,a=e.getBoundingClientRect();let c=t.getBoundingClientRect();const l=c.right<=a.left?c.right-r:c.left>=a.right?i-c.left:i-r;c.width>l&&(t.style.setProperty("--clover-tip-room",`${Math.max(l,0)}px`),c=t.getBoundingClientRect());const u=c.left<r?r-c.left:c.right>i?i-c.right:0;u&&t.style.setProperty("--clover-tip-shift",`${u}px`)}function T(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:i,overflowX:a}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=a||i;if(!c||c==="visible")continue;const l=o.getBoundingClientRect();e=Math.max(e,l.left+o.clientLeft),n=Math.min(n,l.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let E=0;function v(t){if(t.key!=="Escape")return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&y(n);o&&h(o)&&e.add(o),e.forEach(r=>b(r,"tipHidden",["pointerenter","focusout"]))}function b(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function K(){S(()=>(E++===0&&(document.addEventListener("keydown",v,true),document.addEventListener("pointerenter",d,true),document.addEventListener("focus",d,true)),()=>{--E||(document.removeEventListener("keydown",v,true),document.removeEventListener("pointerenter",d,true),document.removeEventListener("focus",d,true))}),[])}function P(t,e){const n=t.target;!e||n===e||e.contains(n)||R.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{M as S,B as T,P as f,b as h,O as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as Le,a as Oe,e as Ie,c as $e,n as Me,T as ie,d as C,y as m,N as Re,C as Se,A as L,b as we,u as n,t as Ee,k as le,l as M,v as Ae,$ as Pe,E as ze}from"./shared-
|
|
1
|
+
import{D as Le,a as Oe,e as Ie,c as $e,n as Me,T as ie,d as C,y as m,N as Re,C as Se,A as L,b as we,u as n,t as Ee,k as le,l as M,v as Ae,$ as Pe,E as ze}from"./shared-BtCBrxx9.mjs";import{c as ue,a as de}from"./layout-BixQWLYR.mjs";import{l as Fe,a as Ve,p as He,b as Ke,c as je}from"./vtt-BYJ_dF4L.mjs";import{j as qe}from"./classnames-DukgfdpI.mjs";import{u as De}from"./readingLanguages-JQPbnrhL.mjs";import{b as pe,s as Ue}from"./bringIntoView-CQH5ZgMM.mjs";import{C as Xe}from"./Cue-DghSvEx4.mjs";import{F as Be}from"./FieldPill-pocIy1LB.mjs";import{l as Ge}from"./languageCode-cCpiU0b0.mjs";import{a as Je}from"./Sections-DK04V31W.mjs";import{T as Qe}from"./Tip-Dd_jhbIx.mjs";import{u as We}from"./useContainerName-C2L1lj9-.mjs";import"./styles-CAv9WP3T.mjs";const j=40,q=s=>s.toLocaleLowerCase();function Ye(s,i){if(!i)return s;const v=q(s),g=[];let a=0;for(let p=v.indexOf(i);p>=0;p=v.indexOf(i,p+i.length))p>a&&g.push(s.slice(a,p)),g.push(n("mark",{children:s.slice(p,p+i.length)},p)),a=p+i.length;return a<s.length&&g.push(s.slice(a)),g}const R=s=>s.read==="cues"&&s.kind!=="transcript",ft=Le(function({as:i="div",follow:v=true,find:g=true,sticky:a=false,size:p="large",className:fe,...ge},me){const{t:D,langOf:U}=Oe(),{clover:o,language:X}=Ie("Transcript"),T=$e(e=>Me(e.manifest,e.canvasId)).find(e=>ue(e).length>0||de(e).length>0),l=ie(()=>T?[...ue(T).map(e=>({...e,read:"cues"})),...de(T).map(e=>({...e,read:"text"}))]:[],[T]),[B,S]=C(0),u=l[B]??l[0],O=De(),w=(O==null?void 0:O.chosen)??X;m(()=>{if(!w)return;const e=l.findIndex(r=>r.language&&r.language!=="none"&&Re(r.language,w));if(e<0)return;S(e);const t=l[e];R(t)&&o.captions.get()!==t.id&&o.captions.emit(t.id)},[w,l,o]),m(()=>{const e=t=>{const r=l.findIndex(d=>R(d)&&d.id===t);r>=0&&S(r)};return e(o.captions.get()),o.captions.subscribe(e)},[o,l]);const[c,G]=C([]),[ve,J]=C([]);m(()=>{if(G([]),J([]),!u)return;let e=true;return(u.read==="cues"?Fe(u.id,o.request).then(t=>e&&G(He(t))):Ve(u.id,o.request).then(t=>e&&J(Ke(t)))).catch(()=>{}),()=>{e=false}},[u,o]);const h=Se(o.media.subscribe,o.media.get,o.media.get),y=Ze(h,c),E=L(null);m(()=>{var t;if(!v||y<0||!h||h.paused)return;const e=(t=E.current)==null?void 0:t.children[y];e&&pe(e,"nearest")},[y,v,h]);const[Q,W]=C(""),f=q(Q.trim()),b=ie(()=>f?c.flatMap((e,t)=>q(e.text).includes(f)?[t]:[]):[],[c,f]),[A,he]=C({query:"",at:0}),x=A.query===f?A.at:0,P=L(null),z=L(false),[Y,be]=C({cues:[],count:j}),Z=Y.cues===c?Y.count:j,F=()=>be({cues:c,count:Z+j}),_=L(F);_.current=F;const V=typeof IntersectionObserver<"u",N=V?Math.min(c.length,Math.max(Z,y+1,(b[x]??-1)+1)):c.length,ee=L(null);m(()=>{const e=ee.current;if(!e||!V||N>=c.length)return;const t=new IntersectionObserver(r=>{r.some(d=>d.isIntersecting)&&_.current()},{root:Ue(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[V,N,c.length]);const I=b[x];m(()=>{var t;if(I===void 0)return;const e=(t=E.current)==null?void 0:t.children[I];e&&pe(e,"nearest"),z.current=false},[I,f]);const Ce=c.length>0;m(()=>{var d;const e=(d=P.current)==null?void 0:d.closest(".clover-transcript-find"),t=e==null?void 0:e.parentElement;if(!a||!e||!t||typeof ResizeObserver>"u")return;const r=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return r.observe(e),()=>{r.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[a,Ce,g]);const H=we(),te=Je(),ne=l.every(R)?"playerCaptions":"transcriptLabel",se=We(D(ne),U(ne));if(!T||!u)return null;const Te=l.filter(e=>e.read==="text").length,re=l.map(e=>{const t=Ge(e.language);return e.read==="cues"?t:Te>1&&t?`TXT ${t}`:"TXT"}),xe=re.map(e=>e&&re.filter(t=>t===e).length===1?e:void 0),ae=u.language&&u.language!=="none"?u.language:void 0,K=l.length>1&&!O&&n(le,{children:[se.node,n("fieldset",{...se.props,className:"clover-transcript-languages",children:l.map((e,t)=>{const r=Ee(e.label,X),d=xe[t],ke=r.text||e.language||String(t+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${H}-language`,checked:t===B,onChange:()=>{S(t),R(e)&&o.captions.emit(e.id)}}),d&&n(le,{children:[n("span",{className:"clover-transcript-code",children:d})," "]}),n("span",{style:d?Ae:void 0,...M(r.text?r.lang:void 0),children:ke}),d&&r.text&&n(Qe,{label:r.text,lang:r.lang})]},e.id)})})]}),ce=(e,t=true)=>{if(h){t?ze(h,e.start):h.currentTime=e.start;return}o.goTo(T.id,{time:e.start,...t&&{autoplay:true}})},oe=e=>{const t=c[b[e]];t&&(z.current=true,he({query:f,at:e}),ce(t,false))},Ne={position:b.length?x:-1,total:b.length,step:e=>oe(x+e)},k=b.length,$=f?k===0?"contentSearchResultsNone":k===1?"contentSearchResult":"contentSearchResults":null,ye=g&&u.read==="cues"&&c.length>0&&n("div",{className:"clover-transcript-find",children:[n(Be,{ref:P,id:`${H}-find`,value:Q,onChange:W,onSubmit:()=>{if(!k)return;const e=A.query===f&&z.current;oe(e?(x+1)%k:x)},onClear:()=>{var e;W(""),(e=P.current)==null||e.focus()},results:f?Ne:null,size:p,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",...M($?U($):void 0),children:$?D($,{count:k}):""})]});return n(i,{ref:me,className:qe("clover-transcript",fe),"data-sticky":a||void 0,...ge,children:[K&&(te?Pe(K,te):K),ye,u.read==="text"?n("div",{className:"clover-transcript-body",...M(ae),children:ve.map((e,t)=>n("p",{children:e},t))}):n("ol",{ref:E,className:"clover-transcript-cues",id:`${H}-cues`,...M(ae),children:c.slice(0,N).map((e,t)=>n("li",{className:"clover-transcript-cue","aria-current":t===y?"true":void 0,"data-match":f&&b.includes(t)?t===I?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>ce(e),onFocus:()=>{N<c.length&&t>=N-5&&F()},children:[n(Xe,{start:e.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&n("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),Ye(e.text,f)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&N<c.length&&n("div",{ref:ee,className:"clover-transcript-more","aria-hidden":"true"})]})});function Ze(s,i){const[v,g]=C(-1);return m(()=>{if(!s||!i.length){g(-1);return}const a=()=>g(je(i,s.currentTime));return a(),s.addEventListener("timeupdate",a),s.addEventListener("seeked",a),()=>{s.removeEventListener("timeupdate",a),s.removeEventListener("seeked",a)}},[s,i]),v}export{ft as Transcript};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,u as o,l as b,_ as m}from"./shared-D2RadIoz.mjs";import{T as x}from"./Tip-BatwzZZo.mjs";import{b as f,c as k}from"./controlGlyphs-ClH59vLg.mjs";import{a as y}from"./index-DGXCFoHu.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:var(--clover-space-l);height:var(--clover-space-l);translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:var(--clover-space-l);margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:var(--clover-space-l);padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
|
|
1
|
+
import{a as g,u as o,l as b,_ as m}from"./shared-BtCBrxx9.mjs";import{T as x}from"./Tip-Dd_jhbIx.mjs";import{b as f,c as k}from"./controlGlyphs-DbocsVHI.mjs";import{a as y}from"./index-BAkCMEQf.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:var(--clover-space-l);height:var(--clover-space-l);translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:var(--clover-space-l);margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:var(--clover-space-l);padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Se,A as h,d as R,_ as J,T as Ee,u as e,P as Ce,z as we,ah as B,l as w,ab as Pe,y as Fe,k as ie}from"./shared-
|
|
1
|
+
import{a as Se,A as h,d as R,_ as J,T as Ee,u as e,P as Ce,z as we,ah as B,l as w,ab as Pe,y as Fe,k as ie}from"./shared-BtCBrxx9.mjs";import{u as Ie,g as Oe,a as Me,b as de,l as $e,s as Be,T as D,P as Re,c as Ve,V as Ae,d as Ke,C as xe,F as De,e as Le,E as ze,f as Ue,p as _e}from"./Transport-DGXTdsId.mjs";import{imageSource as je}from"./thumbnail-BdKVLxxw.mjs";import{u as qe,P as Xe,E as Ze}from"./EntryThumbnail-Anfv7mFZ.mjs";import{j as Ge}from"./classnames-DukgfdpI.mjs";import{l as pe}from"./languageCode-cCpiU0b0.mjs";import{T as fe,S as me}from"./Tip-Dd_jhbIx.mjs";import{u as Je}from"./useContainerName-C2L1lj9-.mjs";import{u as Qe,t as We}from"./pointer-CAZRjvDP.mjs";import"./styles-CAv9WP3T.mjs";const Ye=we(()=>import("./SeekMarks-tjdJi7bR.mjs").then(({SeekMarks:r})=>({default:r}))),He=".clover-canvas-transport-marks",en=r=>typeof(r==null?void 0:r.thumbnail)=="string"?{src:r.thumbnail}:je(r==null?void 0:r.thumbnail);function ve(r,i){var g;let f=-1;r.forEach((P,k)=>{P.start<=i&&(f=k)});const m=(g=r[f])==null?void 0:g.end;return m!==void 0&&i>=m?-1:f}let G;function nn(){if(G===void 0){if(typeof document>"u")return true;const r=document.createElement("video");r.volume=.5,G=r.volume===.5}return G}function tn({id:r,label:i,labelLang:f,button:m,icon:g,active:P,current:k,options:F,selected:V,onSelect:c,request:L,asMenu:I=false}){const[d,p]=R(false),T=h(null),O=h(null),M=h(null),$=h(false),y=Je(i,f),N=F.some(a=>pe(a.language));Pe(d,()=>p(false));const A=()=>{var a;p(false),(a=O.current)==null||a.focus()};return Fe(()=>{if(!d)return;const a=o=>{var s,t,S;if(o instanceof KeyboardEvent){if(o.key!=="Escape")return;(s=T.current)!=null&&s.contains(document.activeElement)&&(o.preventDefault(),(t=O.current)==null||t.focus())}else if((S=T.current)!=null&&S.contains(o.target))return;p(false)};return document.addEventListener("pointerdown",a),document.addEventListener("keydown",a,true),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("keydown",a,true)}},[d]),J(()=>{const a=M.current,o=T.current,s=o==null?void 0:o.closest(".clover-canvas-transport"),t=o==null?void 0:o.closest(".clover-canvas-media");if(!d||!a||!o||!s||!t)return;const S=()=>_e(a,o,s,t);S();const b=new ResizeObserver(S);return b.observe(t),b.observe(s),b.observe(a),()=>b.disconnect()},[d]),e("div",{className:"clover-canvas-transport-menu",ref:T,onBlur:a=>{var s;const o=a.relatedTarget;d&&o instanceof Node&&!((s=T.current)!=null&&s.contains(o))&&p(false)},children:[e("button",{"aria-controls":r,"aria-describedby":k?`${r}-current`:void 0,"aria-expanded":d,"aria-label":i,...w(f),className:"clover-canvas-transport-button","data-active":P?"":void 0,"data-button":m,onClick:()=>p(a=>!a),ref:O,type:"button",children:[g,e(fe,{label:i})]}),k&&e("span",{hidden:true,id:`${r}-current`,...w(k.lang),children:k.label}),d&&y.node,d&&e("fieldset",{...y.props,className:Ge("clover-canvas-transport-options",I&&"clover-canvas-menu"),id:r,ref:M,children:F.map((a,o)=>{const s=pe(a.language);return e("label",{className:"clover-canvas-transport-option",onPointerDown:()=>{$.current=true},children:[e("input",{checked:V===o,name:r,onChange:()=>c(o),onClick:()=>{$.current&&A()},onKeyDown:t=>{$.current=false,t.key==="Enter"&&(t.preventDefault(),c(o),A())},type:"radio"}),a.time&&e(ie,{children:[e("span",{className:"clover-cue-time",children:a.time})," "]}),N&&(s?e(ie,{children:[e("span",{className:"clover-canvas-transport-code",children:s})," "]}):e("span",{className:"clover-canvas-transport-code","aria-hidden":"true"})),e("span",{className:"clover-cue-text",...w(a.lang),children:a.label}),V===o&&e(Ze,{source:a.thumbnail,request:L,large:true})]},o)})})]})}const rn=r=>r.querySelector(":scope > .clover-tip"),an=r=>{try{return r.matches(":focus-visible")}catch{return false}},gn=({instance:r,controller:i,kind:f,captions:m,activeCaption:g,onCaptionChange:P,fullscreen:k=false,isFullscreen:F=false,video:V,chapters:c=[],highlightedChapter:L=null,onChapterHighlight:I,request:d,fill:p,marks:T=[],selectedMark:O,onMarkSelect:M,onMarkActivate:$})=>{var oe,se;const{t:y,langOf:N}=Se(),A=Qe()||f==="video",a=h(null);Ie(a);const{paused:o,currentTime:s,duration:t,buffered:S,muted:b,volume:z}=i,E=ve(c,s),[U,ge]=R(-1),[Q,ye]=R(0),W=h(-1),_=n=>{var l;W.current!==n&&(W.current=n,ge(n),I==null||I(((l=c[n])==null?void 0:l.id)??null))},[Y,H]=R(false),[K,j]=R(false),v=K?U:Y?E:-1,ee=(K||Y)&&t>0,be=qe(en(c[v]),Xe,d),q=U>=0?U:c.findIndex(n=>n.id!==void 0&&n.id===L),ne=h(null);J(()=>{const n=ne.current,l=n==null?void 0:n.closest(".clover-canvas"),u=n&&v>=0?rn(n):null;if(!l||!u)return;const le="--clover-transport-preview-top",ce=()=>l.style.setProperty(le,`${l.getBoundingClientRect().bottom-u.getBoundingClientRect().top}px`);ce();const ue=new ResizeObserver(ce);return ue.observe(u),()=>{ue.disconnect(),l.style.removeProperty(le)}},[v]);const x=n=>{const{start:l,end:u=t}=c[n];return{left:l/t*100,width:(u-l)/t*100}},he=o?"playerPlay":"playerPause",te={label:y("playerCaptionsOff"),lang:N("playerCaptionsOff")},ke=b?"playerUnmute":"playerMute",Te=F?"imageExitFullScreen":"imageFullScreen",re=t?s/t*100:0,X=Ee(()=>{const n=Oe(c,t);return n.length?Me(n):void 0},[c,t]),Ne=t?S/t*100:0,Z=k&&A,C=h(null),ae=h(null);return J(()=>{var u;const n=C.current;if(!n||n.isConnected)return;C.current=null;const l=document.activeElement;(!l||l===document.body)&&((u=ae.current)==null||u.focus())},[m.length,c.length,Z]),e("div",{className:"clover-canvas-transport","data-kind":f,"data-testid":"clover-canvas-transport",onFocus:n=>{C.current=n.target},onBlur:n=>{const l=n.target,u=n.relatedTarget;if(u instanceof Node){n.currentTarget.contains(u)||(C.current=null);return}queueMicrotask(()=>{C.current===l&&l.isConnected&&(C.current=null)})},children:[e("div",{ref:ne,className:"clover-canvas-transport-seek-area",onPointerMove:n=>{const l=n.target;if(l.closest(He)){j(false),_(-1);return}if(!t||l.closest(".clover-tip"))return;const u=Be(n.currentTarget,n.clientX)*t;j(true),ye(Math.floor(u)),_(ve(c,u))},onPointerLeave:()=>{j(false),_(-1)},style:ee?{"--clover-transport-preview":de(v>=0?x(v).left+x(v).width/2:(K?Q:s)/t*100)}:void 0,children:[M&&T.length>0&&e(Ce,{fallback:null,children:e(Ye,{marks:T,duration:t,selected:O,onSelect:M,onActivate:$})}),e("input",{"aria-label":y("playerSeek"),lang:N("playerSeek"),"aria-valuetext":`${B(s)} / ${B(t)}${E>=0?`, ${c[E].label}`:""}`,className:"clover-canvas-transport-seek",onFocus:n=>H(an(n.currentTarget)),onBlur:()=>H(false),max:t||0,min:0,onChange:n=>i.seek(Number(n.target.value)),step:"any","data-gaps":X?"":void 0,style:{"--clover-transport-progress":`${re}%`,"--clover-transport-loaded":`${Ne}%`,...X&&{"--clover-transport-gaps":X,"--clover-transport-at":re/100}},type:"range",value:s}),q>=0&&t>0&&e("span",{"aria-hidden":"true",className:"clover-canvas-transport-chapter-span",style:{left:de(x(q).left),width:$e(x(q).width)}}),ee&&e(fe,{lead:B(K?Q:s),label:((oe=c[v])==null?void 0:oe.label)??"",lang:(se=c[v])==null?void 0:se.lang,image:v>=0?be:void 0},v)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(D,{words:he,button:o?"play":"pause",shortcut:me.play,onClick:i.toggle,buttonRef:ae,children:o?e(Re,{}):e(Ve,{})}),e(D,{words:ke,button:"mute",shortcut:me.mute,onClick:i.toggleMute,children:b||z===0?e(Ae,{}):e(Ke,{})}),nn()&&e("input",{"aria-label":y("playerVolume"),lang:N("playerVolume"),className:"clover-canvas-transport-volume",max:1,min:0,onChange:n=>i.setVolume(Number(n.target.value)),step:.05,style:{"--clover-transport-progress":`${(b?0:z)*100}%`},type:"range",value:b?0:z}),e("span",{className:"clover-canvas-transport-status",children:[e("span",{className:"clover-canvas-transport-time",children:[e("span",{"aria-label":y("playerCurrentTime"),...w(N("playerCurrentTime")),children:B(s)}),e("span",{"aria-hidden":"true",children:" / "}),e("span",{"aria-label":y("playerDuration"),...w(N("playerDuration")),children:B(t)})]}),E>=0&&e("span",{className:"clover-canvas-transport-chapter",...w(c[E].lang),children:c[E].label})]}),(m.length>0||Z||p)&&e("div",{className:"clover-canvas-transport-end",children:[m.length>0&&e(tn,{id:`${r}-captions`,label:y("playerCaptions"),labelLang:N("playerCaptions"),button:"captions",icon:e(xe,{on:g>=0}),active:g>=0,current:m[g]??te,options:[te,...m],selected:g+1,onSelect:n=>P(n-1)}),p&&e(D,{words:p.filled?"playerFit":"playerFill",button:"fill",onClick:p.onToggle,children:p.filled?e(De,{}):e(Le,{})}),Z&&e(D,{words:Te,button:"fullscreen",onClick:n=>void We(n.currentTarget,V),children:F?e(ze,{}):e(Ue,{})})]})]})]})};export{gn as T,en as a,ve as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as l,az as g,ax as y,aA as u,ay as f}from"./shared-
|
|
1
|
+
import{S as l,az as g,ax as y,aA as u,ay as f}from"./shared-BtCBrxx9.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function x(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=y(e,s);d.length&&a.push({id:s,label:u(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{x as loadAnnotationSets};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d,V as p}from"./shared-
|
|
1
|
+
import{t as d,V as p}from"./shared-BtCBrxx9.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
|
package/dist/web-components/{annotations-content-XVgQ5me7.mjs → annotations-content-GrkrBVh0.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadAnnotationSets as f}from"./annotation-collection-
|
|
1
|
+
import{loadAnnotationSets as f}from"./annotation-collection-BTpPigqD.mjs";import{G as i,aB as l,aq as c}from"./shared-BtCBrxx9.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-
|
|
1
|
+
import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-BtCBrxx9.mjs";import{B as h}from"./Body-Bh8Nu8Fo.mjs";import{u as y,P as L}from"./nodes-C_TYa0cJ.mjs";import{Toggle as b}from"./toggle-Cqtdko9H.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-
|
|
1
|
+
import{O as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-BtCBrxx9.mjs";import{C as b}from"./CanvasView-DcrhjwpU.mjs";import{r as s}from"./rendererSurface-CE09-Vp6.mjs";import{C as i}from"./Pending-Ci8Pe6Ip.mjs";const h=c(()=>import("./Connected-D30kPwoX.mjs")),B=c(()=>import("./LoadedCanvas-Bdqqh01C.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
|