@videojs/html 10.0.0-beta.13 → 10.0.0-beta.15
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/cdn/{abort-JT-ewLFq.js → abort-CzqmAxxH.js} +1 -1
- package/cdn/{abort-JT-ewLFq.js.map → abort-CzqmAxxH.js.map} +1 -1
- package/cdn/{abort-C7q_G_dT.js → abort-KaHR4JO1.js} +1 -1
- package/cdn/{abort-C7q_G_dT.js.map → abort-KaHR4JO1.js.map} +1 -1
- package/cdn/audio-minimal-ui.dev.d.ts +1 -0
- package/cdn/audio-minimal-ui.dev.js +5 -0
- package/cdn/audio-minimal-ui.js +1 -0
- package/cdn/audio-minimal.dev.js +13 -14
- package/cdn/audio-minimal.dev.js.map +1 -1
- package/cdn/audio-minimal.js +1 -1
- package/cdn/audio-minimal.js.map +1 -1
- package/cdn/audio-ui.dev.d.ts +1 -0
- package/cdn/audio-ui.dev.js +5 -0
- package/cdn/audio-ui.js +1 -0
- package/cdn/audio.dev.js +13 -14
- package/cdn/audio.dev.js.map +1 -1
- package/cdn/audio.js +1 -1
- package/cdn/audio.js.map +1 -1
- package/cdn/background.dev.js +5 -11
- package/cdn/background.dev.js.map +1 -1
- package/cdn/background.js +1 -1
- package/cdn/background.js.map +1 -1
- package/cdn/{safe-define-Bw8JF08z.js → context-BjrbhiSk.js} +27 -23
- package/cdn/context-BjrbhiSk.js.map +1 -0
- package/cdn/context-CdkhXQEw.js +14 -0
- package/cdn/context-CdkhXQEw.js.map +1 -0
- package/cdn/create-player-BqU8r8H4.js +7 -0
- package/cdn/create-player-BqU8r8H4.js.map +1 -0
- package/cdn/{create-player-C2h3JeGl.js → create-player-p9xCO0yC.js} +2627 -2611
- package/cdn/create-player-p9xCO0yC.js.map +1 -0
- package/cdn/{default-CnBlD9BM.js → default-C8KsZ0zK.js} +1 -1
- package/cdn/{default-CnBlD9BM.js.map → default-C8KsZ0zK.js.map} +1 -1
- package/cdn/{default-CKnlVEjQ.js → default-XHZAb7gP.js} +1 -1
- package/cdn/{default-CKnlVEjQ.js.map → default-XHZAb7gP.js.map} +1 -1
- package/cdn/delegate-B626t_Va.js +2 -0
- package/cdn/delegate-B626t_Va.js.map +1 -0
- package/cdn/{delegate-AoR5Pt_6.js → delegate-BCw-LjP_.js} +9 -10
- package/cdn/delegate-BCw-LjP_.js.map +1 -0
- package/cdn/{hls-CNDMNsEo.js → hls-26YJVjvD.js} +3 -3
- package/cdn/hls-26YJVjvD.js.map +1 -0
- package/cdn/{hls-DHwATYV2.js → hls-BriQI4q1.js} +58 -89
- package/cdn/hls-BriQI4q1.js.map +1 -0
- package/cdn/{listen-UqQNdlqV.js → listen-D7fcau5d.js} +1 -1
- package/cdn/{listen-UqQNdlqV.js.map → listen-D7fcau5d.js.map} +1 -1
- package/cdn/{listen-BkAEGXCe.js → listen-w-Aun0yN.js} +1 -1
- package/cdn/{listen-BkAEGXCe.js.map → listen-w-Aun0yN.js.map} +1 -1
- package/cdn/media/dash-video.dev.js +4 -4
- package/cdn/media/dash-video.js +1 -1
- package/cdn/media/hls-video.dev.js +5 -4
- package/cdn/media/hls-video.dev.js.map +1 -1
- package/cdn/media/hls-video.js +1 -1
- package/cdn/media/hls-video.js.map +1 -1
- package/cdn/media/mux-video.dev.js +7 -6
- package/cdn/media/mux-video.dev.js.map +1 -1
- package/cdn/media/mux-video.js +1 -1
- package/cdn/media/mux-video.js.map +1 -1
- package/cdn/media/native-hls-video.dev.d.ts +1 -0
- package/cdn/media/native-hls-video.dev.js +28 -0
- package/cdn/media/native-hls-video.dev.js.map +1 -0
- package/cdn/media/native-hls-video.js +2 -0
- package/cdn/media/native-hls-video.js.map +1 -0
- package/cdn/media/simple-hls-video.dev.js +6 -6
- package/cdn/media/simple-hls-video.js +2 -2
- package/cdn/media/simple-hls-video.js.map +1 -1
- package/cdn/{media-attach-mixin-CkU58gjb.js → media-attach-mixin-DfKkofgF.js} +2 -2
- package/cdn/{media-attach-mixin-CkU58gjb.js.map → media-attach-mixin-DfKkofgF.js.map} +1 -1
- package/cdn/media-attach-mixin-Dv2D43tb.js +2 -0
- package/cdn/{media-attach-mixin-ByJOWMNT.js.map → media-attach-mixin-Dv2D43tb.js.map} +1 -1
- package/cdn/{media-props-mixin-BuVUebRp.js → media-props-mixin-Bd_N2HWy.js} +2 -2
- package/cdn/media-props-mixin-Bd_N2HWy.js.map +1 -0
- package/cdn/{media-props-mixin-DxsM38Bx.js → media-props-mixin-Dc5dpCV4.js} +8 -5
- package/cdn/media-props-mixin-Dc5dpCV4.js.map +1 -0
- package/cdn/{minimal-fA2p2Jrn.js → minimal-BUUGNZK7.js} +1 -1
- package/cdn/{minimal-fA2p2Jrn.js.map → minimal-BUUGNZK7.js.map} +1 -1
- package/cdn/{minimal-CKMdOXWm.js → minimal-CJGOJ6pE.js} +1 -1
- package/cdn/{minimal-CKMdOXWm.js.map → minimal-CJGOJ6pE.js.map} +1 -1
- package/cdn/minimal-ui-BL9eBXck.js +0 -0
- package/cdn/minimal-ui-a1UOKF79.js +0 -0
- package/cdn/native-hls-CjRvSXAJ.js +2 -0
- package/cdn/native-hls-CjRvSXAJ.js.map +1 -0
- package/cdn/native-hls-D2rfyyyW.js +126 -0
- package/cdn/native-hls-D2rfyyyW.js.map +1 -0
- package/cdn/player-Cz9-_j7J.js +2 -0
- package/cdn/{player-DOTrw60d.js.map → player-Cz9-_j7J.js.map} +1 -1
- package/cdn/{player-BWRklsUx.js → player-D0bhjT8X.js} +3 -3
- package/cdn/{player-BWRklsUx.js.map → player-D0bhjT8X.js.map} +1 -1
- package/cdn/poster-2FPYTjyv.js +2 -0
- package/cdn/poster-2FPYTjyv.js.map +1 -0
- package/cdn/{poster-Ds1EOmmU.js → poster-gVT-J1-z.js} +25 -4
- package/cdn/poster-gVT-J1-z.js.map +1 -0
- package/cdn/shadow-styles-62Yo__Ni.js +3 -0
- package/cdn/shadow-styles-62Yo__Ni.js.map +1 -0
- package/cdn/shadow-styles-I-_QR-PM.js +41 -0
- package/cdn/shadow-styles-I-_QR-PM.js.map +1 -0
- package/cdn/{shallow-equal-CaIo44Co.js → shallow-equal-C8Fs4TTE.js} +1 -1
- package/cdn/{shallow-equal-CaIo44Co.js.map → shallow-equal-C8Fs4TTE.js.map} +1 -1
- package/cdn/{shallow-equal-zo2IZwso.js → shallow-equal-uPuCQhnd.js} +1 -1
- package/cdn/{shallow-equal-zo2IZwso.js.map → shallow-equal-uPuCQhnd.js.map} +1 -1
- package/cdn/skin-element-DB-cKAAx.js +2 -0
- package/cdn/skin-element-DB-cKAAx.js.map +1 -0
- package/cdn/skin-element-zakTHELS.js +55 -0
- package/cdn/skin-element-zakTHELS.js.map +1 -0
- package/cdn/ui-CFIgmrlA.js +0 -0
- package/cdn/ui-Ccp_LyCf.js +0 -0
- package/cdn/video-minimal-ui.dev.d.ts +1 -0
- package/cdn/video-minimal-ui.dev.js +5 -0
- package/cdn/video-minimal-ui.js +1 -0
- package/cdn/video-minimal.dev.js +15 -22
- package/cdn/video-minimal.dev.js.map +1 -1
- package/cdn/video-minimal.js +1 -1
- package/cdn/video-minimal.js.map +1 -1
- package/cdn/video-ui.dev.d.ts +1 -0
- package/cdn/video-ui.dev.js +5 -0
- package/cdn/video-ui.js +1 -0
- package/cdn/video.dev.js +16 -47
- package/cdn/video.dev.js.map +1 -1
- package/cdn/video.js +1 -1
- package/cdn/video.js.map +1 -1
- package/cdn/{volume-slider-Dz_ND_4U.js → volume-slider-Co5X4Z1t.js} +166 -167
- package/cdn/volume-slider-Co5X4Z1t.js.map +1 -0
- package/cdn/volume-slider-D18sXnIA.js +8 -0
- package/cdn/volume-slider-D18sXnIA.js.map +1 -0
- package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/shared.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/shared.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/skin.js.map +1 -1
- package/dist/default/define/audio/minimal-skin.css +43 -26
- package/dist/default/define/audio/minimal-skin.js +7 -18
- package/dist/default/define/audio/minimal-skin.js.map +1 -1
- package/dist/default/define/audio/minimal-skin.tailwind.js +6 -18
- package/dist/default/define/audio/minimal-skin.tailwind.js.map +1 -1
- package/dist/default/define/audio/minimal-ui.js +12 -0
- package/dist/default/define/audio/skin.css +43 -26
- package/dist/default/define/audio/skin.js +7 -18
- package/dist/default/define/audio/skin.js.map +1 -1
- package/dist/default/define/audio/skin.tailwind.js +6 -18
- package/dist/default/define/audio/skin.tailwind.js.map +1 -1
- package/dist/default/define/audio/ui.js +12 -0
- package/dist/default/define/background/skin.js +2 -9
- package/dist/default/define/background/skin.js.map +1 -1
- package/dist/default/define/base.css +4 -0
- package/dist/default/define/shared.css +2 -1
- package/dist/default/define/skin-element.js +33 -0
- package/dist/default/define/skin-element.js.map +1 -0
- package/dist/default/define/video/minimal-skin.css +46 -45
- package/dist/default/define/video/minimal-skin.js +7 -23
- package/dist/default/define/video/minimal-skin.js.map +1 -1
- package/dist/default/define/video/minimal-skin.tailwind.js +6 -24
- package/dist/default/define/video/minimal-skin.tailwind.js.map +1 -1
- package/dist/default/define/video/minimal-ui.js +18 -0
- package/dist/default/define/video/skin.css +46 -45
- package/dist/default/define/video/skin.js +7 -24
- package/dist/default/define/video/skin.js.map +1 -1
- package/dist/default/define/video/skin.tailwind.js +6 -24
- package/dist/default/define/video/skin.tailwind.js.map +1 -1
- package/dist/default/define/video/ui.js +18 -0
- package/dist/default/skins/dist/default/default/tailwind/audio.tailwind.js +0 -1
- package/dist/default/skins/dist/default/default/tailwind/audio.tailwind.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/video.tailwind.js +0 -1
- package/dist/default/skins/dist/default/default/tailwind/video.tailwind.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/audio.tailwind.js +0 -1
- package/dist/default/skins/dist/default/minimal/tailwind/audio.tailwind.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/video.tailwind.js +0 -1
- package/dist/default/skins/dist/default/minimal/tailwind/video.tailwind.js.map +1 -1
- package/dist/default/ui/media-button-element.js +7 -0
- package/dist/default/ui/media-button-element.js.map +1 -1
- package/dist/default/ui/time/time-element.js +12 -10
- package/dist/default/ui/time/time-element.js.map +1 -1
- package/dist/default/ui/tooltip/tooltip-element.js +12 -8
- package/dist/default/ui/tooltip/tooltip-element.js.map +1 -1
- package/dist/default/ui/volume-slider/volume-slider-element.js +22 -14
- package/dist/default/ui/volume-slider/volume-slider-element.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/base.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/base.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/shared.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/shared.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/skin.js.map +1 -1
- package/dist/dev/define/audio/minimal-skin.css +43 -26
- package/dist/dev/define/audio/minimal-skin.d.ts +6 -10
- package/dist/dev/define/audio/minimal-skin.d.ts.map +1 -1
- package/dist/dev/define/audio/minimal-skin.js +7 -22
- package/dist/dev/define/audio/minimal-skin.js.map +1 -1
- package/dist/dev/define/audio/minimal-skin.tailwind.d.ts +4 -10
- package/dist/dev/define/audio/minimal-skin.tailwind.d.ts.map +1 -1
- package/dist/dev/define/audio/minimal-skin.tailwind.js +6 -24
- package/dist/dev/define/audio/minimal-skin.tailwind.js.map +1 -1
- package/dist/dev/define/audio/minimal-ui.d.ts +1 -0
- package/dist/dev/define/audio/minimal-ui.js +12 -0
- package/dist/dev/define/audio/skin.css +43 -26
- package/dist/dev/define/audio/skin.d.ts +6 -10
- package/dist/dev/define/audio/skin.d.ts.map +1 -1
- package/dist/dev/define/audio/skin.js +7 -22
- package/dist/dev/define/audio/skin.js.map +1 -1
- package/dist/dev/define/audio/skin.tailwind.d.ts +4 -10
- package/dist/dev/define/audio/skin.tailwind.d.ts.map +1 -1
- package/dist/dev/define/audio/skin.tailwind.js +6 -24
- package/dist/dev/define/audio/skin.tailwind.js.map +1 -1
- package/dist/dev/define/audio/ui.d.ts +1 -0
- package/dist/dev/define/audio/ui.js +12 -0
- package/dist/dev/define/background/skin.d.ts.map +1 -1
- package/dist/dev/define/background/skin.js +2 -9
- package/dist/dev/define/background/skin.js.map +1 -1
- package/dist/dev/define/base.css +4 -0
- package/dist/dev/define/shared.css +2 -1
- package/dist/dev/define/skin-element.d.ts +18 -0
- package/dist/dev/define/skin-element.d.ts.map +1 -0
- package/dist/dev/define/skin-element.js +33 -0
- package/dist/dev/define/skin-element.js.map +1 -0
- package/dist/dev/define/video/minimal-skin.css +46 -45
- package/dist/dev/define/video/minimal-skin.d.ts +6 -10
- package/dist/dev/define/video/minimal-skin.d.ts.map +1 -1
- package/dist/dev/define/video/minimal-skin.js +9 -35
- package/dist/dev/define/video/minimal-skin.js.map +1 -1
- package/dist/dev/define/video/minimal-skin.tailwind.d.ts +4 -10
- package/dist/dev/define/video/minimal-skin.tailwind.d.ts.map +1 -1
- package/dist/dev/define/video/minimal-skin.tailwind.js +9 -51
- package/dist/dev/define/video/minimal-skin.tailwind.js.map +1 -1
- package/dist/dev/define/video/minimal-ui.d.ts +1 -0
- package/dist/dev/define/video/minimal-ui.js +18 -0
- package/dist/dev/define/video/skin.css +46 -45
- package/dist/dev/define/video/skin.d.ts +6 -10
- package/dist/dev/define/video/skin.d.ts.map +1 -1
- package/dist/dev/define/video/skin.js +10 -40
- package/dist/dev/define/video/skin.js.map +1 -1
- package/dist/dev/define/video/skin.tailwind.d.ts +4 -10
- package/dist/dev/define/video/skin.tailwind.d.ts.map +1 -1
- package/dist/dev/define/video/skin.tailwind.js +9 -51
- package/dist/dev/define/video/skin.tailwind.js.map +1 -1
- package/dist/dev/define/video/ui.d.ts +1 -0
- package/dist/dev/define/video/ui.js +18 -0
- package/dist/dev/index.d.ts +2 -2
- package/dist/dev/skins/dist/default/default/tailwind/audio.tailwind.js +0 -1
- package/dist/dev/skins/dist/default/default/tailwind/audio.tailwind.js.map +1 -1
- package/dist/dev/skins/dist/default/default/tailwind/video.tailwind.js +0 -1
- package/dist/dev/skins/dist/default/default/tailwind/video.tailwind.js.map +1 -1
- package/dist/dev/skins/dist/default/minimal/tailwind/audio.tailwind.js +0 -1
- package/dist/dev/skins/dist/default/minimal/tailwind/audio.tailwind.js.map +1 -1
- package/dist/dev/skins/dist/default/minimal/tailwind/video.tailwind.js +0 -1
- package/dist/dev/skins/dist/default/minimal/tailwind/video.tailwind.js.map +1 -1
- package/dist/dev/store/container-mixin.d.ts +1 -1
- package/dist/dev/store/provider-mixin.d.ts +1 -1
- package/dist/dev/ui/media-button-element.d.ts +6 -2
- package/dist/dev/ui/media-button-element.d.ts.map +1 -1
- package/dist/dev/ui/media-button-element.js +7 -0
- package/dist/dev/ui/media-button-element.js.map +1 -1
- package/dist/dev/ui/time/time-element.d.ts +0 -1
- package/dist/dev/ui/time/time-element.d.ts.map +1 -1
- package/dist/dev/ui/time/time-element.js +12 -10
- package/dist/dev/ui/time/time-element.js.map +1 -1
- package/dist/dev/ui/tooltip/tooltip-element.d.ts.map +1 -1
- package/dist/dev/ui/tooltip/tooltip-element.js +12 -8
- package/dist/dev/ui/tooltip/tooltip-element.js.map +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-element.d.ts +5 -0
- package/dist/dev/ui/volume-slider/volume-slider-element.d.ts.map +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-element.js +22 -14
- package/dist/dev/ui/volume-slider/volume-slider-element.js.map +1 -1
- package/package.json +8 -8
- package/cdn/create-player-C2h3JeGl.js.map +0 -1
- package/cdn/create-player-i0Q36S9_.js +0 -7
- package/cdn/create-player-i0Q36S9_.js.map +0 -1
- package/cdn/delegate-AoR5Pt_6.js.map +0 -1
- package/cdn/delegate-odoSeh7c.js +0 -2
- package/cdn/delegate-odoSeh7c.js.map +0 -1
- package/cdn/hls-CNDMNsEo.js.map +0 -1
- package/cdn/hls-DHwATYV2.js.map +0 -1
- package/cdn/media-attach-mixin-ByJOWMNT.js +0 -2
- package/cdn/media-props-mixin-BuVUebRp.js.map +0 -1
- package/cdn/media-props-mixin-DxsM38Bx.js.map +0 -1
- package/cdn/player-DOTrw60d.js +0 -2
- package/cdn/poster-CRi_NWaR.js +0 -2
- package/cdn/poster-CRi_NWaR.js.map +0 -1
- package/cdn/poster-Ds1EOmmU.js.map +0 -1
- package/cdn/safe-define-Bw8JF08z.js.map +0 -1
- package/cdn/safe-define-t0AGOouq.js +0 -14
- package/cdn/safe-define-t0AGOouq.js.map +0 -1
- package/cdn/volume-slider-C7rEWi11.js +0 -9
- package/cdn/volume-slider-C7rEWi11.js.map +0 -1
- package/cdn/volume-slider-Dz_ND_4U.js.map +0 -1
- package/dist/default/define/skin-mixin.js +0 -71
- package/dist/default/define/skin-mixin.js.map +0 -1
- package/dist/default/skins/dist/default/shared/tailwind/tooltip-state.js +0 -28
- package/dist/default/skins/dist/default/shared/tailwind/tooltip-state.js.map +0 -1
- package/dist/dev/define/skin-mixin.d.ts +0 -22
- package/dist/dev/define/skin-mixin.d.ts.map +0 -1
- package/dist/dev/define/skin-mixin.js +0 -71
- package/dist/dev/define/skin-mixin.js.map +0 -1
- package/dist/dev/skins/dist/default/shared/tailwind/tooltip-state.js +0 -28
- package/dist/dev/skins/dist/default/shared/tailwind/tooltip-state.js.map +0 -1
package/cdn/background.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.js","names":[],"sources":["../../utils/dist/dom/attributes.js","../src/define/background/player.ts","../inline-css:src/define/background/skin.js","../src/define/background/skin.ts","../src/media/background-video/index.ts","../src/define/media/background-video.ts"],"sourcesContent":["//#region src/dom/attributes.ts\nfunction namedNodeMapToObject(namedNodeMap) {\n\tconst obj = {};\n\tfor (const attr of namedNodeMap) obj[attr.name] = attr.value;\n\treturn obj;\n}\n//#endregion\nexport { namedNodeMapToObject };\n\n//# sourceMappingURL=attributes.js.map","import { backgroundFeatures } from '@videojs/core/dom';\nimport { MediaContainerElement } from '../../media/container-element';\nimport { createPlayer } from '../../player/create-player';\nimport { MediaElement } from '../../ui/media-element';\nimport { safeDefine } from '../safe-define';\n\nconst { ProviderMixin } = createPlayer({\n features: backgroundFeatures,\n});\n\nexport class BackgroundVideoPlayerElement extends ProviderMixin(MediaElement) {\n static readonly tagName = 'background-video-player';\n}\n\n// Provider must be defined before consumer for context handshake during upgrade.\nsafeDefine(BackgroundVideoPlayerElement);\nsafeDefine(MediaContainerElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [BackgroundVideoPlayerElement.tagName]: BackgroundVideoPlayerElement;\n }\n}\n","export default \"background-video-player{display:contents}background-video-skin{--media-object-fit:cover;object-fit:var(--media-object-fit);width:100%;height:100%;display:block;position:relative}background-video-skin>background-video{object-fit:inherit;width:100%;height:100%;position:absolute;inset:0}background-video-skin>img,background-video-skin>picture{object-fit:inherit;width:100%;height:100%}\";","import { ReactiveElement } from '@videojs/element';\nimport { namedNodeMapToObject } from '@videojs/utils/dom';\nimport { safeDefine } from '../safe-define';\nimport styles from './skin.css?inline';\n\nconst STYLES_ID = '__media-background-styles';\n\nfunction
|
|
1
|
+
{"version":3,"file":"background.js","names":[],"sources":["../../utils/dist/dom/attributes.js","../src/define/background/player.ts","../inline-css:src/define/background/skin.js","../src/define/background/skin.ts","../src/media/background-video/index.ts","../src/define/media/background-video.ts"],"sourcesContent":["//#region src/dom/attributes.ts\nfunction namedNodeMapToObject(namedNodeMap) {\n\tconst obj = {};\n\tfor (const attr of namedNodeMap) obj[attr.name] = attr.value;\n\treturn obj;\n}\n//#endregion\nexport { namedNodeMapToObject };\n\n//# sourceMappingURL=attributes.js.map","import { backgroundFeatures } from '@videojs/core/dom';\nimport { MediaContainerElement } from '../../media/container-element';\nimport { createPlayer } from '../../player/create-player';\nimport { MediaElement } from '../../ui/media-element';\nimport { safeDefine } from '../safe-define';\n\nconst { ProviderMixin } = createPlayer({\n features: backgroundFeatures,\n});\n\nexport class BackgroundVideoPlayerElement extends ProviderMixin(MediaElement) {\n static readonly tagName = 'background-video-player';\n}\n\n// Provider must be defined before consumer for context handshake during upgrade.\nsafeDefine(BackgroundVideoPlayerElement);\nsafeDefine(MediaContainerElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [BackgroundVideoPlayerElement.tagName]: BackgroundVideoPlayerElement;\n }\n}\n","export default \"background-video-player{display:contents}background-video-skin{--media-object-fit:cover;object-fit:var(--media-object-fit);width:100%;height:100%;display:block;position:relative}background-video-skin>background-video{object-fit:inherit;width:100%;height:100%;position:absolute;inset:0}background-video-skin>img,background-video-skin>picture{object-fit:inherit;width:100%;height:100%}\";","import { ReactiveElement } from '@videojs/element';\nimport { ensureGlobalStyle, namedNodeMapToObject } from '@videojs/utils/dom';\nimport { safeDefine } from '../safe-define';\nimport styles from './skin.css?inline';\n\nconst STYLES_ID = '__media-background-styles';\n\nfunction getTemplateHTML(_attrs: Record<string, string>) {\n return /*html*/ `\n <media-container>\n <!-- @deprecated slot=\"media\" is no longer required, use the default slot instead -->\n <slot name=\"media\"></slot>\n <slot></slot>\n </media-container>\n `;\n}\n\nexport class BackgroundVideoSkinElement extends ReactiveElement {\n static readonly tagName = 'background-video-skin';\n static shadowRootOptions = { mode: 'open' as ShadowRootMode };\n static getTemplateHTML = getTemplateHTML;\n\n constructor() {\n super();\n\n ensureGlobalStyle(STYLES_ID, styles);\n\n if (!this.shadowRoot) {\n this.attachShadow((this.constructor as typeof BackgroundVideoSkinElement).shadowRootOptions);\n this.shadowRoot!.innerHTML = getTemplateHTML(namedNodeMapToObject(this.attributes));\n }\n }\n}\n\nsafeDefine(BackgroundVideoSkinElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [BackgroundVideoSkinElement.tagName]: BackgroundVideoSkinElement;\n }\n}\n","import type { Media } from '@videojs/core/dom';\nimport { namedNodeMapToObject } from '@videojs/utils/dom';\nimport { MediaAttachMixin } from '../../store/media-attach-mixin';\n\nfunction getTemplateHTML(attrs: Record<string, string>) {\n return /*html*/ `\n <style>\n :host {\n position: relative;\n }\n\n video {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: var(--media-object-fit, inherit);\n object-position: var(--media-object-position, 50% 50%);\n }\n </style>\n <slot></slot>\n <video ${serializeAttributes(attrs)}></video>\n `;\n}\n\n// Don't extend CustomMediaMixin to save some bytes, background videos don't need the full Media API.\nexport class BackgroundVideo extends MediaAttachMixin(HTMLElement) {\n static shadowRootOptions = { mode: 'open' as ShadowRootMode };\n static getTemplateHTML = getTemplateHTML;\n static get observedAttributes() {\n return ['src'];\n }\n\n constructor() {\n super();\n\n if (!this.shadowRoot) {\n this.attachShadow((this.constructor as typeof BackgroundVideo).shadowRootOptions);\n\n const attrs = {\n ...namedNodeMapToObject(this.attributes),\n ...(!this.hasAttribute('nomuted') && { muted: '' }),\n ...(!this.hasAttribute('noloop') && { loop: '' }),\n ...(!this.hasAttribute('noautoplay') && { autoplay: '' }),\n playsinline: '',\n disableremoteplayback: '',\n disablepictureinpicture: '',\n };\n\n this.shadowRoot!.innerHTML = getTemplateHTML(attrs);\n }\n\n // Neither Chrome or Firefox support setting the muted attribute\n // after using document.createElement.\n // Get around this by setting the muted property manually.\n this.target!.muted = !this.hasAttribute('nomuted');\n }\n\n // Register the inner <video> (not `this`) with the provider.\n getMediaTarget(): Media | null {\n return this.target;\n }\n\n attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void {\n if (attrName === 'src' && oldValue !== newValue) {\n this.target!.src = newValue ?? '';\n }\n }\n\n get target(): HTMLVideoElement | null {\n return (\n this.querySelector(':scope > [slot=media]') ??\n this.querySelector('video') ??\n this.shadowRoot?.querySelector('video') ??\n null\n );\n }\n}\n\nconst VideoAttributes = [\n 'autoplay',\n 'controls',\n 'controlslist',\n 'crossorigin',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'loop',\n 'muted',\n 'playsinline',\n 'preload',\n] as const;\n\nfunction serializeAttributes(attrs: Record<string, string>): string {\n let html = '';\n for (const key in attrs) {\n // Skip forwarding non native video attributes.\n if (!VideoAttributes.includes(key as any)) continue;\n\n const value = attrs[key];\n if (value === '') html += ` ${key}`;\n else html += ` ${key}=\"${value}\"`;\n }\n return html;\n}\n","import { BackgroundVideo } from '../../media/background-video';\nimport { safeDefine } from '../safe-define';\n\nexport class BackgroundVideoElement extends BackgroundVideo {\n static readonly tagName = 'background-video';\n}\n\nsafeDefine(BackgroundVideoElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [BackgroundVideoElement.tagName]: BackgroundVideoElement;\n }\n}\n"],"mappings":"2NACA,SAAS,EAAqB,EAAc,CAC3C,IAAM,EAAM,EAAE,CACd,IAAK,IAAM,KAAQ,EAAc,EAAI,EAAK,MAAQ,EAAK,MACvD,OAAO,ECER,KAAM,CAAE,iBAAkB,EAAa,CACrC,SAAU,EACX,CAAC,CAOF,EALA,cAAkD,EAAc,EAAa,AAAC,qBAClD,4BAIY,CACxC,EAAW,EAAsB,CChBjC,IAAA,EAAe,kYCOf,SAAS,EAAgB,EAAgC,CACvD,MAAgB,6EAoBlB,EAjBA,cAA+B,CAAA,qBACb,sDACG,CAAA,KAAA,OAAA,6BAClB,gBAGH,OAAO,CAEL,EAAO,4BAAsB,EAAO,mBAGpC,KAAA,aAAc,KAAA,YAAA,kBAAA,CACZ,KAAO,WAAA,UAAA,EAAA,EAAA,KAAA,WAAA,CAAA,IAKmB,CCxB9B,SAAS,EAAgB,EAA+B,CACtD,MAAgB,8OAAA,EAAA,EAAA,CAAA,WAIlB,IAAM,EAAN,cAAM,EAAA,YAAA,AAAA,yEAEM,EACV,WAAM,oBAAkB,CACtB,MAAI,CAAA,MAAQ,CAGd,aAAa,CAGX,GAFA,OAAI,CAEF,CAAA,KAAK,WAAA,CACN,KAAM,aAAK,KAAA,YAAA,kBAAA,CAEb,IAAA,EAAA,CACH,GAAA,EAAA,KAAA,WAAA,8CAEQ,GAAC,CAAA,KAAO,aAAA,SAAwB,EAAC,CAAK,KAAM,GAAC,CAC9C,GAAK,CAAC,KAAA,aAAgB,aAAQ,EAAA,CAAA,SAAiB,GAAA,CAC9C,YAAC,GACD,sBAAmB,GACnB,wBAAyB,GAC7B,gFAYF,gBAA8B,CAC5B,OAAO,KAAE,OAGX,yBAAM,EAA2B,EAAA,EAAA,CAC5B,IAAA,OAAA,IAAA,IAAA,KAAA,OAAA,IAAA,GAAA,IAKL,IAAI,QAAkC,CACpC,OACE,KAAK,cAAc,wBAAmB,EACxC,KAAK,cAAgB,QAAM,EAC7B,KAAA,YAAA,cAAA,QAAA,EAAA,gBAOA,WACA,WACA,eACA,cACA,kDAEA,OACA,QACA,cACA,UACD,CAED,SAAK,EAAA,EAAA,CACH,IAAA,EAAA,GACF,IAAA,IAAA,KAAA,EAAA,CAEA,GAAM,CAAA,EAAkB,SAAA,EAAA,CAAA,SAErB,IAAA,EAAS,EAAA,GACT,IAAa,GAAA,GAAA,IAAA,IACb,GAAY,IAAA,EAAA,IAAA,EAAA,GAEb,OAAC,EC9EH,EAJA,cAA4C,CAAgB,qBAChC,qBAGM"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
//#region src/define/safe-define.ts
|
|
2
|
+
/** Define a custom element only if not already registered. */
|
|
3
|
+
function safeDefine(element) {
|
|
4
|
+
const registry = globalThis.customElements;
|
|
5
|
+
if (!registry || registry.get(element.tagName)) return;
|
|
6
|
+
registry.define(element.tagName, element);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
1
10
|
//#region ../core/dist/dev/core/utils/define-class-prop-hooks.js
|
|
2
11
|
function defineClassPropHooks(Class, BaseClassProto) {
|
|
3
12
|
for (const prop of Object.getOwnPropertyNames(BaseClassProto)) {
|
|
@@ -33,9 +42,10 @@ function defineClassPropHooks(Class, BaseClassProto) {
|
|
|
33
42
|
*
|
|
34
43
|
* The `get`, `set`, and `call` methods can be overridden to provide catch-all custom behavior.
|
|
35
44
|
*/
|
|
36
|
-
const ProxyMixin = (
|
|
37
|
-
class
|
|
45
|
+
const ProxyMixin = (BaseClass) => {
|
|
46
|
+
class MediaProxyImpl extends EventTarget {
|
|
38
47
|
#target = null;
|
|
48
|
+
#types = /* @__PURE__ */ new Set();
|
|
39
49
|
get target() {
|
|
40
50
|
return this.#target;
|
|
41
51
|
}
|
|
@@ -51,28 +61,31 @@ const ProxyMixin = (PrimaryClass, ...AdditionalClasses) => {
|
|
|
51
61
|
attach(target) {
|
|
52
62
|
if (!target || this.#target === target) return;
|
|
53
63
|
this.#target = target;
|
|
64
|
+
for (const type of this.#types) target.addEventListener(type, this.#forwardEvent);
|
|
54
65
|
}
|
|
55
66
|
detach() {
|
|
56
67
|
if (!this.#target) return;
|
|
68
|
+
for (const type of this.#types) this.#target.removeEventListener(type, this.#forwardEvent);
|
|
57
69
|
this.#target = null;
|
|
58
70
|
}
|
|
59
71
|
addEventListener(type, listener, options) {
|
|
60
|
-
this.#
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
dispatchEvent(event) {
|
|
66
|
-
return this.#target?.dispatchEvent(event) ?? false;
|
|
72
|
+
if (!this.#types.has(type)) {
|
|
73
|
+
this.#types.add(type);
|
|
74
|
+
this.#target?.addEventListener(type, this.#forwardEvent);
|
|
75
|
+
}
|
|
76
|
+
super.addEventListener(type, listener, options);
|
|
67
77
|
}
|
|
78
|
+
#forwardEvent = (event) => {
|
|
79
|
+
this.dispatchEvent(new event.constructor(event.type, event));
|
|
80
|
+
};
|
|
68
81
|
}
|
|
69
|
-
for (
|
|
70
|
-
return
|
|
82
|
+
for (let proto = BaseClass.prototype; proto && !Object.prototype.isPrototypeOf.call(proto, MediaProxyImpl.prototype); proto = Object.getPrototypeOf(proto)) defineClassPropHooks(MediaProxyImpl, proto);
|
|
83
|
+
return MediaProxyImpl;
|
|
71
84
|
};
|
|
72
85
|
|
|
73
86
|
//#endregion
|
|
74
87
|
//#region ../core/dist/dev/dom/media/proxy.js
|
|
75
|
-
const VideoProxy = ProxyMixin(globalThis.HTMLVideoElement ?? class {}
|
|
88
|
+
const VideoProxy = ProxyMixin(globalThis.HTMLVideoElement ?? class {});
|
|
76
89
|
|
|
77
90
|
//#endregion
|
|
78
91
|
//#region ../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/context-request-event.js
|
|
@@ -171,14 +184,5 @@ const CONTAINER_CONTEXT_KEY = Symbol.for("@videojs/container");
|
|
|
171
184
|
const containerContext = createContext(CONTAINER_CONTEXT_KEY);
|
|
172
185
|
|
|
173
186
|
//#endregion
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
function safeDefine(element) {
|
|
177
|
-
const registry = globalThis.customElements;
|
|
178
|
-
if (!registry || registry.get(element.tagName)) return;
|
|
179
|
-
registry.define(element.tagName, element);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
//#endregion
|
|
183
|
-
export { createContext as a, playerContext as i, containerContext as n, ContextRequestEvent as o, mediaContext as r, defineClassPropHooks as s, safeDefine as t };
|
|
184
|
-
//# sourceMappingURL=safe-define-Bw8JF08z.js.map
|
|
187
|
+
export { ContextRequestEvent as a, createContext as i, mediaContext as n, defineClassPropHooks as o, playerContext as r, safeDefine as s, containerContext as t };
|
|
188
|
+
//# sourceMappingURL=context-BjrbhiSk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-BjrbhiSk.js","names":["#target","#types","#forwardEvent"],"sources":["../src/define/safe-define.ts","../../core/dist/dev/core/utils/define-class-prop-hooks.js","../../core/dist/dev/core/media/proxy.js","../../core/dist/dev/dom/media/proxy.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/context-request-event.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/create-context.js","../src/player/context.ts"],"sourcesContent":["type DefinableElement = CustomElementConstructor & { tagName: string };\n\n/** Define a custom element only if not already registered. */\nexport function safeDefine(element: DefinableElement): void {\n const registry = globalThis.customElements;\n if (!registry || registry.get(element.tagName)) return;\n\n registry.define(element.tagName, element);\n}\n","//#region src/core/utils/define-class-prop-hooks.ts\nfunction defineClassPropHooks(Class, BaseClassProto) {\n\tfor (const prop of Object.getOwnPropertyNames(BaseClassProto)) {\n\t\tif (prop in Class.prototype || prop.startsWith(\"_\")) continue;\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(BaseClassProto, prop);\n\t\tif (!descriptor) continue;\n\t\tconst config = {};\n\t\tif (typeof descriptor.value === \"function\") config.value = function(...args) {\n\t\t\treturn this.call?.(prop, ...args);\n\t\t};\n\t\telse if (descriptor.get) {\n\t\t\tconfig.get = function() {\n\t\t\t\treturn this.get?.(prop);\n\t\t\t};\n\t\t\tif (descriptor.set) config.set = function(val) {\n\t\t\t\tthis.set?.(prop, val);\n\t\t\t};\n\t\t}\n\t\tObject.defineProperty(Class.prototype, prop, config);\n\t}\n}\n//#endregion\nexport { defineClassPropHooks };\n\n//# sourceMappingURL=define-class-prop-hooks.js.map","import { defineClassPropHooks } from \"../utils/define-class-prop-hooks.js\";\n//#region src/core/media/proxy.ts\n/**\n* This mixin creates an API from the passed classes and proxies the methods and properties to the attached target.\n*\n* Many methods and properties will need no translation and are proxied directly to the attached target.\n* For example, the `play` and `pause` methods are proxied directly to the attached target.\n*\n* Child classes can override the proxied methods and properties to provide custom behavior.\n* For example, the `src` property for HLS media is proxied to the HLS engine, not the target itself.\n*\n* The `get`, `set`, and `call` methods can be overridden to provide catch-all custom behavior.\n*/\nconst ProxyMixin = (BaseClass) => {\n\tclass MediaProxyImpl extends EventTarget {\n\t\t#target = null;\n\t\t#types = /* @__PURE__ */ new Set();\n\t\tget target() {\n\t\t\treturn this.#target;\n\t\t}\n\t\tget(prop) {\n\t\t\treturn this.target?.[prop];\n\t\t}\n\t\tset(prop, val) {\n\t\t\tif (this.target) this.target[prop] = val;\n\t\t}\n\t\tcall(prop, ...args) {\n\t\t\treturn (this.target?.[prop])?.apply(this.target, args);\n\t\t}\n\t\tattach(target) {\n\t\t\tif (!target || this.#target === target) return;\n\t\t\tthis.#target = target;\n\t\t\tfor (const type of this.#types) target.addEventListener(type, this.#forwardEvent);\n\t\t}\n\t\tdetach() {\n\t\t\tif (!this.#target) return;\n\t\t\tfor (const type of this.#types) this.#target.removeEventListener(type, this.#forwardEvent);\n\t\t\tthis.#target = null;\n\t\t}\n\t\taddEventListener(type, listener, options) {\n\t\t\tif (!this.#types.has(type)) {\n\t\t\t\tthis.#types.add(type);\n\t\t\t\tthis.#target?.addEventListener(type, this.#forwardEvent);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\t\t#forwardEvent = (event) => {\n\t\t\tthis.dispatchEvent(new event.constructor(event.type, event));\n\t\t};\n\t}\n\tfor (let proto = BaseClass.prototype; proto && !Object.prototype.isPrototypeOf.call(proto, MediaProxyImpl.prototype); proto = Object.getPrototypeOf(proto)) defineClassPropHooks(MediaProxyImpl, proto);\n\treturn MediaProxyImpl;\n};\n//#endregion\nexport { ProxyMixin };\n\n//# sourceMappingURL=proxy.js.map","import { ProxyMixin } from \"../../core/media/proxy.js\";\n//#region src/dom/media/proxy.ts\nconst VideoProxy = ProxyMixin(globalThis.HTMLVideoElement ?? class {});\n//#endregion\nexport { VideoProxy };\n\n//# sourceMappingURL=proxy.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * An event fired by a context requester to signal it desires a specified context with the given key.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * method to the callback which consumers can invoke to indicate they no longer wish to receive these updates.\n *\n * If no `subscribe` value is present in the event, then the provider can assume that this is a 'one time'\n * request for the context and can therefore not track the consumer.\n */\nexport class ContextRequestEvent extends Event {\n /**\n *\n * @param context the context key to request\n * @param contextTarget the original context target of the requester\n * @param callback the callback that should be invoked when the context with the specified key is available\n * @param subscribe when, true indicates we want to subscribe to future updates\n */\n constructor(context, contextTarget, callback, subscribe) {\n super('context-request', { bubbles: true, composed: true });\n this.context = context;\n this.contextTarget = contextTarget;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n}\n//# sourceMappingURL=context-request-event.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Creates a typed Context.\n *\n * Contexts are compared with strict equality.\n *\n * If you want two separate `createContext()` calls to referer to the same\n * context, then use a key that will by equal under strict equality like a\n * string for `Symbol.for()`:\n *\n * ```ts\n * // true\n * createContext('my-context') === createContext('my-context')\n * // true\n * createContext(Symbol.for('my-context')) === createContext(Symbol.for('my-context'))\n * ```\n *\n * If you want a context to be unique so that it's guaranteed to not collide\n * with other contexts, use a key that's unique under strict equality, like\n * a `Symbol()` or object.:\n *\n * ```\n * // false\n * createContext({}) === createContext({})\n * // false\n * createContext(Symbol('my-context')) === createContext(Symbol('my-context'))\n * ```\n *\n * @param key a context key value\n * @template ValueType the type of value that can be provided by this context.\n * @returns the context key value cast to `Context<K, ValueType>`\n */\nexport function createContext(key) {\n return key;\n}\n//# sourceMappingURL=create-context.js.map","import type { AnyPlayerStore, Media, MediaContainer, PlayerStore } from '@videojs/core/dom';\nimport { type Context, createContext } from '@videojs/element/context';\n\n// ----------------------------------------\n// Player Context\n// ----------------------------------------\n\nexport const PLAYER_CONTEXT_KEY = Symbol.for('@videojs/player');\n\nexport type PlayerContextValue<Store extends PlayerStore = AnyPlayerStore> = Store;\n\nexport type PlayerContext<Store extends PlayerStore = AnyPlayerStore> = Context<\n typeof PLAYER_CONTEXT_KEY,\n PlayerContextValue<Store>\n>;\n\n/**\n * The default player context instance for consuming the player store in controllers.\n *\n * @public\n */\nexport const playerContext = createContext<PlayerContextValue, typeof PLAYER_CONTEXT_KEY>(PLAYER_CONTEXT_KEY);\n\n// ----------------------------------------\n// Media Context\n// ----------------------------------------\n\nexport const MEDIA_CONTEXT_KEY = Symbol.for('@videojs/media');\n\nexport interface MediaContextValue {\n media: Media | null;\n setMedia: (media: Media | null) => void;\n}\n\nexport type MediaContext = Context<typeof MEDIA_CONTEXT_KEY, MediaContextValue>;\n\nexport const mediaContext = createContext<MediaContextValue, typeof MEDIA_CONTEXT_KEY>(MEDIA_CONTEXT_KEY);\n\n// ----------------------------------------\n// Container Context\n// ----------------------------------------\n\nexport const CONTAINER_CONTEXT_KEY = Symbol.for('@videojs/container');\n\nexport interface ContainerContextValue {\n container: MediaContainer | null;\n setContainer: (container: MediaContainer | null) => void;\n}\n\nexport type ContainerContext = Context<typeof CONTAINER_CONTEXT_KEY, ContainerContextValue>;\n\nexport const containerContext = createContext<ContainerContextValue, typeof CONTAINER_CONTEXT_KEY>(\n CONTAINER_CONTEXT_KEY\n);\n"],"x_google_ignoreList":[4,5],"mappings":";;AAGA,SAAgB,WAAW,SAAiC;CAC1D,MAAM,WAAW,WAAW;AAC5B,KAAI,CAAC,YAAY,SAAS,IAAI,QAAQ,QAAQ,CAAE;AAEhD,UAAS,OAAO,QAAQ,SAAS,QAAQ;;;;;ACN3C,SAAS,qBAAqB,OAAO,gBAAgB;AACpD,MAAK,MAAM,QAAQ,OAAO,oBAAoB,eAAe,EAAE;AAC9D,MAAI,QAAQ,MAAM,aAAa,KAAK,WAAW,IAAI,CAAE;EACrD,MAAM,aAAa,OAAO,yBAAyB,gBAAgB,KAAK;AACxE,MAAI,CAAC,WAAY;EACjB,MAAM,SAAS,EAAE;AACjB,MAAI,OAAO,WAAW,UAAU,WAAY,QAAO,QAAQ,SAAS,GAAG,MAAM;AAC5E,UAAO,KAAK,OAAO,MAAM,GAAG,KAAK;;WAEzB,WAAW,KAAK;AACxB,UAAO,MAAM,WAAW;AACvB,WAAO,KAAK,MAAM,KAAK;;AAExB,OAAI,WAAW,IAAK,QAAO,MAAM,SAAS,KAAK;AAC9C,SAAK,MAAM,MAAM,IAAI;;;AAGvB,SAAO,eAAe,MAAM,WAAW,MAAM,OAAO;;;;;;;;;;;;;;;;;ACLtD,MAAM,cAAc,cAAc;CACjC,MAAM,uBAAuB,YAAY;EACxC,UAAU;EACV,yBAAyB,IAAI,KAAK;EAClC,IAAI,SAAS;AACZ,UAAO,MAAKA;;EAEb,IAAI,MAAM;AACT,UAAO,KAAK,SAAS;;EAEtB,IAAI,MAAM,KAAK;AACd,OAAI,KAAK,OAAQ,MAAK,OAAO,QAAQ;;EAEtC,KAAK,MAAM,GAAG,MAAM;AACnB,WAAQ,KAAK,SAAS,QAAQ,MAAM,KAAK,QAAQ,KAAK;;EAEvD,OAAO,QAAQ;AACd,OAAI,CAAC,UAAU,MAAKA,WAAY,OAAQ;AACxC,SAAKA,SAAU;AACf,QAAK,MAAM,QAAQ,MAAKC,MAAQ,QAAO,iBAAiB,MAAM,MAAKC,aAAc;;EAElF,SAAS;AACR,OAAI,CAAC,MAAKF,OAAS;AACnB,QAAK,MAAM,QAAQ,MAAKC,MAAQ,OAAKD,OAAQ,oBAAoB,MAAM,MAAKE,aAAc;AAC1F,SAAKF,SAAU;;EAEhB,iBAAiB,MAAM,UAAU,SAAS;AACzC,OAAI,CAAC,MAAKC,MAAO,IAAI,KAAK,EAAE;AAC3B,UAAKA,MAAO,IAAI,KAAK;AACrB,UAAKD,QAAS,iBAAiB,MAAM,MAAKE,aAAc;;AAEzD,SAAM,iBAAiB,MAAM,UAAU,QAAQ;;EAEhD,iBAAiB,UAAU;AAC1B,QAAK,cAAc,IAAI,MAAM,YAAY,MAAM,MAAM,MAAM,CAAC;;;AAG9D,MAAK,IAAI,QAAQ,UAAU,WAAW,SAAS,CAAC,OAAO,UAAU,cAAc,KAAK,OAAO,eAAe,UAAU,EAAE,QAAQ,OAAO,eAAe,MAAM,CAAE,sBAAqB,gBAAgB,MAAM;AACvM,QAAO;;;;;ACjDR,MAAM,aAAa,WAAW,WAAW,oBAAoB,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;ACgBtE,IAAa,sBAAb,cAAyC,MAAM;;;;;;;;CAQ3C,YAAY,SAAS,eAAe,UAAU,WAAW;AACrD,QAAM,mBAAmB;GAAE,SAAS;GAAM,UAAU;GAAM,CAAC;AAC3D,OAAK,UAAU;AACf,OAAK,gBAAgB;AACrB,OAAK,WAAW;AAChB,OAAK,YAAY,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACKtC,SAAgB,cAAc,KAAK;AAC/B,QAAO;;;;;AC9BX,MAAa,qBAAqB,OAAO,IAAI,kBAAkB;;;;;;AAc/D,MAAa,gBAAgB,cAA6D,mBAAmB;AAM7G,MAAa,oBAAoB,OAAO,IAAI,iBAAiB;AAS7D,MAAa,eAAe,cAA2D,kBAAkB;AAMzG,MAAa,wBAAwB,OAAO,IAAI,qBAAqB;AASrE,MAAa,mBAAmB,cAC9B,sBACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function e(e){let t=globalThis.customElements;!t||t.get(e.tagName)||t.define(e.tagName,e)}function t(e,t){for(let n of Object.getOwnPropertyNames(t)){if(n in e.prototype||n.startsWith(`_`))continue;let r=Object.getOwnPropertyDescriptor(t,n);if(!r)continue;let i={};typeof r.value==`function`?i.value=function(...e){return this.call?.(n,...e)}:r.get&&(i.get=function(){return this.get?.(n)},r.set&&(i.set=function(e){this.set?.(n,e)})),Object.defineProperty(e.prototype,n,i)}}(e=>{class n extends EventTarget{#e=null;#t=new Set;get target(){return this.#e}get(e){return this.target?.[e]}set(e,t){this.target&&(this.target[e]=t)}call(e,...t){return(this.target?.[e])?.apply(this.target,t)}attach(e){if(!(!e||this.#e===e)){this.#e=e;for(let t of this.#t)e.addEventListener(t,this.#n)}}detach(){if(this.#e){for(let e of this.#t)this.#e.removeEventListener(e,this.#n);this.#e=null}}addEventListener(e,t,n){this.#t.has(e)||(this.#t.add(e),this.#e?.addEventListener(e,this.#n)),super.addEventListener(e,t,n)}#n=e=>{this.dispatchEvent(new e.constructor(e.type,e))}}for(let r=e.prototype;r&&!Object.prototype.isPrototypeOf.call(r,n.prototype);r=Object.getPrototypeOf(r))t(n,r);return n})(globalThis.HTMLVideoElement??class{});
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2021 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
var n=class extends Event{constructor(e,t,n,r){super(`context-request`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=r??!1}};
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2021 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/
|
|
13
|
+
function r(e){return e}const i=r(Symbol.for(`@videojs/player`)),a=r(Symbol.for(`@videojs/media`)),o=r(Symbol.for(`@videojs/container`));export{n as a,r as i,a as n,t as o,i as r,e as s,o as t};
|
|
14
|
+
//# sourceMappingURL=context-CdkhXQEw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-CdkhXQEw.js","names":["#target","#types","#forwardEvent","createContext"],"sources":["../src/define/safe-define.ts","../../core/dist/default/core/utils/define-class-prop-hooks.js","../../core/dist/default/core/media/proxy.js","../../core/dist/default/dom/media/proxy.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/lib/context-request-event.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/lib/create-context.js","../src/player/context.ts"],"sourcesContent":["type DefinableElement = CustomElementConstructor & { tagName: string };\n\n/** Define a custom element only if not already registered. */\nexport function safeDefine(element: DefinableElement): void {\n const registry = globalThis.customElements;\n if (!registry || registry.get(element.tagName)) return;\n\n registry.define(element.tagName, element);\n}\n","//#region src/core/utils/define-class-prop-hooks.ts\nfunction defineClassPropHooks(Class, BaseClassProto) {\n\tfor (const prop of Object.getOwnPropertyNames(BaseClassProto)) {\n\t\tif (prop in Class.prototype || prop.startsWith(\"_\")) continue;\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(BaseClassProto, prop);\n\t\tif (!descriptor) continue;\n\t\tconst config = {};\n\t\tif (typeof descriptor.value === \"function\") config.value = function(...args) {\n\t\t\treturn this.call?.(prop, ...args);\n\t\t};\n\t\telse if (descriptor.get) {\n\t\t\tconfig.get = function() {\n\t\t\t\treturn this.get?.(prop);\n\t\t\t};\n\t\t\tif (descriptor.set) config.set = function(val) {\n\t\t\t\tthis.set?.(prop, val);\n\t\t\t};\n\t\t}\n\t\tObject.defineProperty(Class.prototype, prop, config);\n\t}\n}\n//#endregion\nexport { defineClassPropHooks };\n\n//# sourceMappingURL=define-class-prop-hooks.js.map","import { defineClassPropHooks } from \"../utils/define-class-prop-hooks.js\";\n//#region src/core/media/proxy.ts\n/**\n* This mixin creates an API from the passed classes and proxies the methods and properties to the attached target.\n*\n* Many methods and properties will need no translation and are proxied directly to the attached target.\n* For example, the `play` and `pause` methods are proxied directly to the attached target.\n*\n* Child classes can override the proxied methods and properties to provide custom behavior.\n* For example, the `src` property for HLS media is proxied to the HLS engine, not the target itself.\n*\n* The `get`, `set`, and `call` methods can be overridden to provide catch-all custom behavior.\n*/\nconst ProxyMixin = (BaseClass) => {\n\tclass MediaProxyImpl extends EventTarget {\n\t\t#target = null;\n\t\t#types = /* @__PURE__ */ new Set();\n\t\tget target() {\n\t\t\treturn this.#target;\n\t\t}\n\t\tget(prop) {\n\t\t\treturn this.target?.[prop];\n\t\t}\n\t\tset(prop, val) {\n\t\t\tif (this.target) this.target[prop] = val;\n\t\t}\n\t\tcall(prop, ...args) {\n\t\t\treturn (this.target?.[prop])?.apply(this.target, args);\n\t\t}\n\t\tattach(target) {\n\t\t\tif (!target || this.#target === target) return;\n\t\t\tthis.#target = target;\n\t\t\tfor (const type of this.#types) target.addEventListener(type, this.#forwardEvent);\n\t\t}\n\t\tdetach() {\n\t\t\tif (!this.#target) return;\n\t\t\tfor (const type of this.#types) this.#target.removeEventListener(type, this.#forwardEvent);\n\t\t\tthis.#target = null;\n\t\t}\n\t\taddEventListener(type, listener, options) {\n\t\t\tif (!this.#types.has(type)) {\n\t\t\t\tthis.#types.add(type);\n\t\t\t\tthis.#target?.addEventListener(type, this.#forwardEvent);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\t\t#forwardEvent = (event) => {\n\t\t\tthis.dispatchEvent(new event.constructor(event.type, event));\n\t\t};\n\t}\n\tfor (let proto = BaseClass.prototype; proto && !Object.prototype.isPrototypeOf.call(proto, MediaProxyImpl.prototype); proto = Object.getPrototypeOf(proto)) defineClassPropHooks(MediaProxyImpl, proto);\n\treturn MediaProxyImpl;\n};\n//#endregion\nexport { ProxyMixin };\n\n//# sourceMappingURL=proxy.js.map","import { ProxyMixin } from \"../../core/media/proxy.js\";\n//#region src/dom/media/proxy.ts\nconst VideoProxy = ProxyMixin(globalThis.HTMLVideoElement ?? class {});\n//#endregion\nexport { VideoProxy };\n\n//# sourceMappingURL=proxy.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e,o){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.contextTarget=t,this.callback=e,this.subscribe=o??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction n(n){return n}export{n as createContext};\n//# sourceMappingURL=create-context.js.map\n","import type { AnyPlayerStore, Media, MediaContainer, PlayerStore } from '@videojs/core/dom';\nimport { type Context, createContext } from '@videojs/element/context';\n\n// ----------------------------------------\n// Player Context\n// ----------------------------------------\n\nexport const PLAYER_CONTEXT_KEY = Symbol.for('@videojs/player');\n\nexport type PlayerContextValue<Store extends PlayerStore = AnyPlayerStore> = Store;\n\nexport type PlayerContext<Store extends PlayerStore = AnyPlayerStore> = Context<\n typeof PLAYER_CONTEXT_KEY,\n PlayerContextValue<Store>\n>;\n\n/**\n * The default player context instance for consuming the player store in controllers.\n *\n * @public\n */\nexport const playerContext = createContext<PlayerContextValue, typeof PLAYER_CONTEXT_KEY>(PLAYER_CONTEXT_KEY);\n\n// ----------------------------------------\n// Media Context\n// ----------------------------------------\n\nexport const MEDIA_CONTEXT_KEY = Symbol.for('@videojs/media');\n\nexport interface MediaContextValue {\n media: Media | null;\n setMedia: (media: Media | null) => void;\n}\n\nexport type MediaContext = Context<typeof MEDIA_CONTEXT_KEY, MediaContextValue>;\n\nexport const mediaContext = createContext<MediaContextValue, typeof MEDIA_CONTEXT_KEY>(MEDIA_CONTEXT_KEY);\n\n// ----------------------------------------\n// Container Context\n// ----------------------------------------\n\nexport const CONTAINER_CONTEXT_KEY = Symbol.for('@videojs/container');\n\nexport interface ContainerContextValue {\n container: MediaContainer | null;\n setContainer: (container: MediaContainer | null) => void;\n}\n\nexport type ContainerContext = Context<typeof CONTAINER_CONTEXT_KEY, ContainerContextValue>;\n\nexport const containerContext = createContext<ContainerContextValue, typeof CONTAINER_CONTEXT_KEY>(\n CONTAINER_CONTEXT_KEY\n);\n"],"x_google_ignoreList":[4,5],"mappings":"AAGA,SAAgB,EAAW,EAAiC,CAC1D,IAAM,EAAW,WAAW,eACxB,CAAC,GAAY,EAAS,IAAI,EAAQ,QAAQ,EAE9C,EAAS,OAAO,EAAQ,QAAS,EAAQ,CCN3C,SAAS,EAAqB,EAAO,EAAgB,CACpD,IAAK,IAAM,KAAQ,OAAO,oBAAoB,EAAe,CAAE,CAC9D,GAAI,KAAQ,EAAM,WAAa,EAAK,WAAW,IAAI,CAAE,SACrD,IAAM,EAAa,OAAO,yBAAyB,EAAgB,EAAK,CACxE,GAAI,CAAC,EAAY,SACjB,IAAM,EAAS,EAAE,CACb,OAAO,EAAW,OAAU,WAAY,EAAO,MAAQ,SAAS,GAAG,EAAM,CAC5E,OAAO,KAAK,OAAO,EAAM,GAAG,EAAK,EAEzB,EAAW,MACnB,EAAO,IAAM,UAAW,CACvB,OAAO,KAAK,MAAM,EAAK,EAEpB,EAAW,MAAK,EAAO,IAAM,SAAS,EAAK,CAC9C,KAAK,MAAM,EAAM,EAAI,IAGvB,OAAO,eAAe,EAAM,UAAW,EAAM,EAAO,GCLlC,GAAc,CACjC,MAAM,UAAuB,WAAY,CACxC,GAAU,KACV,GAAyB,IAAI,IAC7B,IAAI,QAAS,CACZ,OAAO,MAAA,EAER,IAAI,EAAM,CACT,OAAO,KAAK,SAAS,GAEtB,IAAI,EAAM,EAAK,CACV,KAAK,SAAQ,KAAK,OAAO,GAAQ,GAEtC,KAAK,EAAM,GAAG,EAAM,CACnB,OAAQ,KAAK,SAAS,KAAQ,MAAM,KAAK,OAAQ,EAAK,CAEvD,OAAO,EAAQ,CACV,MAAC,GAAU,MAAA,IAAiB,GAChC,OAAA,EAAe,EACf,IAAK,IAAM,KAAQ,MAAA,EAAa,EAAO,iBAAiB,EAAM,MAAA,EAAmB,EAElF,QAAS,CACH,SAAA,EACL,KAAK,IAAM,KAAQ,MAAA,EAAa,MAAA,EAAa,oBAAoB,EAAM,MAAA,EAAmB,CAC1F,MAAA,EAAe,MAEhB,iBAAiB,EAAM,EAAU,EAAS,CACpC,MAAA,EAAY,IAAI,EAAK,GACzB,MAAA,EAAY,IAAI,EAAK,CACrB,MAAA,GAAc,iBAAiB,EAAM,MAAA,EAAmB,EAEzD,MAAM,iBAAiB,EAAM,EAAU,EAAQ,CAEhD,GAAiB,GAAU,CAC1B,KAAK,cAAc,IAAI,EAAM,YAAY,EAAM,KAAM,EAAM,CAAC,EAG9D,IAAK,IAAI,EAAQ,EAAU,UAAW,GAAS,CAAC,OAAO,UAAU,cAAc,KAAK,EAAO,EAAe,UAAU,CAAE,EAAQ,OAAO,eAAe,EAAM,CAAE,EAAqB,EAAgB,EAAM,CACvM,OAAO,ICjDsB,WAAW,kBAAoB,KAAM,GAAG;;;;;;ACGtE,IAAM,EAAN,cAAgB,KAAK,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,GAAG,CAAC;;;;;;ACApK,SAAS,EAAE,EAAE,CAAC,OAAO,ECgBrB,MAAa,EAAgBG,EAdK,OAAO,IAAI,kBAAkB,CAc8C,CAehG,EAAeA,EATK,OAAO,IAAI,iBAAiB,CAS4C,CAe5F,EAAmBA,EATK,OAAO,IAAI,qBAAqB,CAWpE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{t as e}from"./listen-D7fcau5d.js";import{a as t,n,r,t as i}from"./context-CdkhXQEw.js";import{t as a}from"./abort-KaHR4JO1.js";import{t as o}from"./shallow-equal-uPuCQhnd.js";function s(e,t,n){return new Promise((r,i)=>{let a=()=>{i(n?.signal?.reason??`Aborted`)};if(n?.signal?.aborted){a();return}n?.signal?.addEventListener(`abort`,a,{once:!0}),e.addEventListener(t,e=>{n?.signal?.removeEventListener(`abort`,a),r(e)},{...n,once:!0})})}function c(){return typeof CSS<`u`&&CSS.supports(`anchor-name: --a`)}function l(e){try{e?.showPopover?.()}catch{}}function u(e){try{e?.hidePopover?.()}catch{}}function d(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function f(e,t){for(let[n,r]of Object.entries(t))if(typeof r==`string`){let t=n.startsWith(`--`)?n:d(n);e.style.setProperty(t,r)}}function p(e,t){let n=t.trim();if(!n)return 0;let r=Number.parseFloat(n);if(Number.isNaN(r))return 0;if(/^-?\d*\.?\d+$/.test(n)||n.endsWith(`px`))return r;let i=e.ownerDocument,a=i?.documentElement;if(n.endsWith(`rem`))return r*(a&&Number.parseFloat(getComputedStyle(a).fontSize)||16);if(n.endsWith(`em`))return r*(e instanceof HTMLElement&&Number.parseFloat(getComputedStyle(e).fontSize)||16);if(!i)return r;let o=i.createElement(`div`);o.style.position=`absolute`,o.style.visibility=`hidden`,o.style.pointerEvents=`none`,o.style.inlineSize=n,o.style.blockSize=`0`,o.style.padding=`0`,o.style.border=`0`,o.style.inset=`0`;let s=i.body??i.documentElement;if(!s)return r;s.appendChild(o);let c=o.getBoundingClientRect().width;return o.remove(),Number.isFinite(c)?c:r}function m(e,t){for(let n of e.querySelectorAll?.(`track`)??[])if(n.track===t)return n;return null}function h(e,t){return e?.textTracks?Array.from(e.textTracks).filter(t).sort(g):[]}function g(e,t){return e.kind>=t.kind?1:-1}function _(e){let t=[];for(let n=0;n<e.length;n++)t.push([e.start(n),e.end(n)]);return t}function v(e){class t extends e{#e=!1;#t=new Set;get destroyed(){return this.#e}destroy(){this.#e||(this.#e=!0,this.destroyCallback())}destroyCallback(){for(let e of this.#t)e.hostDestroyed?.()}addController(e){super.addController(e),this.#t.add(e)}removeController(e){super.removeController(e),this.#t.delete(e)}connectedCallback(){this.#e||super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),!this.#e&&!this.hasAttribute(`keep-alive`)&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.isConnected||this.destroy()})})}performUpdate(){this.#e||super.performUpdate()}}return t}const y=new WeakMap,b=new Map;var x=class extends HTMLElement{static{this.properties={}}static get observedAttributes(){return[...S(this).attrToProp.keys()]}#e=new Set;#t=new Map;#n;#r;constructor(){super(),this.isUpdatePending=!1,this.hasUpdated=!1,this.#r=new Promise(e=>this.enableUpdating=e);let{props:e}=S(this.constructor);for(let t of e.keys())Object.hasOwn(this,t)&&((this.#n??=new Map).set(t,this[t]),delete this[t]);this.requestUpdate()}enableUpdating(e){}addController(e){this.#e.add(e),this.isConnected&&e.hostConnected?.()}removeController(e){this.#e.delete(e)}connectedCallback(){this.enableUpdating(!0);for(let e of this.#e)e.hostConnected?.()}disconnectedCallback(){for(let e of this.#e)e.hostDisconnected?.()}attributeChangedCallback(e,t,n){if(t===n)return;let{props:r,attrToProp:i}=S(this.constructor),a=i.get(e);if(!a)return;let o=r.get(a);if(!o)return;let s=n;o.type===Boolean?s=n!==null:o.type===Number&&(s=n===null?null:Number(n)),this[a]=s}requestUpdate(e,t){e!==void 0&&this.#t.set(e,t),!this.isUpdatePending&&(this.#r=this.#i())}async#i(){this.isUpdatePending=!0;try{await this.#r}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated&&this.#n){for(let[e,t]of this.#n)this[e]=t;this.#n=void 0}let e=this.#t;this.willUpdate(e);for(let e of this.#e)e.hostUpdate?.();this.update(e),this.#t=new Map,this.isUpdatePending=!1;for(let e of this.#e)e.hostUpdated?.();this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}willUpdate(e){}update(e){}firstUpdated(e){}updated(e){}get updateComplete(){return this.#r}};function S(e){let t=y.get(e);if(t)return t;let n=new Map,r=new Map;for(let[t,i]of Object.entries(e.properties))if(n.set(t,i),r.set(i.attribute??t,t),!Object.getOwnPropertyDescriptor(e.prototype,t)?.get){let n=b.get(t);n||(n=Symbol(t),b.set(t,n)),Object.defineProperty(e.prototype,t,{get(){return this[n]},set(e){let r=this[n];this[n]=e,Object.is(r,e)||this.requestUpdate(t,r)},configurable:!0,enumerable:!0})}let i={props:n,attrToProp:r};return y.set(e,i),i}function ee(e){return typeof e==`number`}function C(e){return typeof e==`function`}function w(e){return e===null}function T(e){return e===void 0}function te(e){return typeof e==`object`&&!!e}var ne=class{#e=new AbortController;#t=new Map;get base(){return this.#e.signal}clear(){for(let e of this.#t.values())e.abort();this.#t.clear()}reset(){this.clear(),this.#e.abort(),this.#e=new AbortController}supersede(e){this.#t.get(e)?.abort();let t=new AbortController;return this.#t.set(e,t),a([this.#e.signal,t.signal])}};function re(...e){return{state:t=>{let n=e.map(e=>e.state(t));return Object.assign({},...n)},attach:t=>{for(let n of e)try{n.attach?.(t)}catch(e){t.reportError(e)}}}}var ie=class extends Error{code;cause;constructor(e,t){super(t?.message??e),this.name=`StoreError`,this.code=e,this.cause=t?.cause}};function E(){throw new ie(`NO_TARGET`)}function D(){throw new ie(`DESTROYED`)}function ae(e,t){let n={};for(let r of t)n[r]=e[r];return n}const oe={target:E,signals:new ne,set:E};function O(e){let t=e.state(oe),n=Object.keys(t),r=n[0];return r?Object.assign(e=>{if(r in e)return ae(e,n)},{displayName:e.name}):Object.assign(()=>void 0,{displayName:e.name})}function se(){return e=>e}function k(...e){}function ce(e,t){let n=null,r,i=(...i)=>{r=i,n===null&&(n=setTimeout(()=>{n=null,e(...r)},t))};return i.cancel=()=>{n!==null&&(clearTimeout(n),n=null)},i}let A=!1;function le(){A||(A=!0,queueMicrotask(ue))}const j=new Set;function ue(){A=!1;for(let e of j)e.flush();j.clear()}const de=Object.prototype.hasOwnProperty;var fe=class{#e;#t=new Set;#n=!1;constructor(e){this.#e=Object.freeze({...e})}get current(){return this.#e}patch(e){let t={...this.#e},n=!1;for(let r in e){if(!de.call(e,r))continue;let i=e[r];Object.is(this.#e[r],i)||(t[r]=i,n=!0)}n&&(this.#e=Object.freeze(t),this.#r())}subscribe(e,t){let n=t?.signal;if(n?.aborted)return k;if(this.#t.add(e),!n)return()=>this.#t.delete(e);let r=()=>this.#t.delete(e);return n.addEventListener(`abort`,r,{once:!0}),()=>{n.removeEventListener(`abort`,r),this.#t.delete(e)}}flush(){if(this.#n){this.#n=!1;for(let e of this.#t)e()}}#r(){this.#n=!0,j.add(this),le()}};function M(e){return new fe(e)}const pe=Symbol(`@videojs/store`);function me(){return(e,t={})=>{let n=null,r=!1,i=new AbortController,a=new ne,o;function s(){r&&D(),n||E()}let c=e.state({target:()=>(s(),n),signals:a,set:e=>o.patch(e)});o=M(c);let l={[pe]:!0,get $state(){return o},get target(){return n},get destroyed(){return r},get state(){return o.current},attach:u,destroy:f,subscribe:p};for(let e of Object.keys(c))Object.defineProperty(l,e,{get:()=>o.current[e],enumerable:!0});try{t.onSetup?.({store:l,signal:i.signal})}catch(e){m(e)}return l;function u(i){r&&D(),a.reset(),n=i;let s={target:i,signal:a.base,get:()=>o.current,set:e=>o.patch(e),reportError:m,store:{get state(){return o.current},subscribe:p}};try{e.attach?.(s)}catch(e){m(e)}try{t.onAttach?.({store:l,target:i,signal:a.base})}catch(e){m(e)}return d}function d(){w(n)||(a.reset(),n=null,o.patch(c))}function f(){r||(r=!0,d(),i.abort())}function p(e,t){return o.subscribe(e,t)}function m(e){t.onError?t.onError({store:l,error:e}):console.error(`[vjs-store]`,e)}}}function he(e){return te(e)&&pe in e}const N=se(),P=N({name:`buffer`,state:()=>({buffered:[],seekable:[]}),attach({target:t,signal:n,set:r}){let{media:i}=t,a=()=>r({buffered:_(i.buffered),seekable:_(i.seekable)});a(),e(i,`progress`,a,{signal:n}),e(i,`emptied`,a,{signal:n})}}),F=N({name:`controls`,state:()=>({userActive:!0,controlsVisible:!0}),attach({target:t,signal:n,get:r,set:i}){let{media:a,container:o}=t;if(w(o))return;function s(e){return e||a.paused}let c;function l(){clearTimeout(c),c=void 0}function u(){l(),c=setTimeout(f,2e3)}function d(){r().userActive||i({userActive:!0,controlsVisible:!0}),u()}function f(){l(),i({userActive:!1,controlsVisible:s(!1)})}let p=0;function m(){p=Date.now()}function h(e){if(e.pointerType===`touch`&&Date.now()-p<250){let t=[a,o].includes(e.target);r().controlsVisible&&t?f():d()}else d()}function g(){let{userActive:e}=r();i({controlsVisible:s(e)}),!a.paused&&e&&u()}e(o,`pointermove`,d,{signal:n}),e(o,`pointerdown`,m,{signal:n}),e(o,`pointerup`,h,{signal:n}),e(o,`keyup`,d,{signal:n}),e(o,`focusin`,d,{signal:n}),e(o,`mouseleave`,f,{signal:n}),e(a,`play`,g,{signal:n}),e(a,`pause`,g,{signal:n}),e(a,`ended`,g,{signal:n}),n.addEventListener(`abort`,l,{once:!0}),u()}}),I=N({name:`error`,state:({set:e})=>({error:null,dismissError(){e({error:null})}}),attach({target:t,signal:n,set:r}){let{media:i}=t;e(i,`error`,()=>r({error:i.error}),{signal:n}),e(i,`emptied`,()=>r({error:null}),{signal:n})}});function ge(){let e=document;return e.fullscreenEnabled||e.webkitFullscreenEnabled?!0:C(document.createElement(`video`).webkitEnterFullscreen)}function _e(){let e=document;return e.fullscreenElement??e.webkitFullscreenElement??null}function L(e,t){let n=t;if(n.webkitDisplayingFullscreen&&n.webkitPresentationMode===`fullscreen`)return!0;let r=e??t;if(_e()===r)return!0;try{return r.matches(`:fullscreen`)}catch{return!1}}async function ve(e,t){let n=document,r=t;if(e&&(n.fullscreenEnabled||n.webkitFullscreenEnabled)){let t=e;if(C(t.requestFullscreen))return t.requestFullscreen();if(C(t.webkitRequestFullscreen))return t.webkitRequestFullscreen()}if(C(r.webkitEnterFullscreen)){r.webkitEnterFullscreen();return}if(C(t.requestFullscreen))return t.requestFullscreen();throw new DOMException(`Fullscreen not supported`,`NotSupportedError`)}async function R(e){let t=document;if(e){let t=e;if(C(t.webkitExitFullscreen)&&t.webkitDisplayingFullscreen){t.webkitExitFullscreen();return}}if(C(t.exitFullscreen))return t.exitFullscreen();if(C(t.webkitExitFullscreen))return t.webkitExitFullscreen()}function z(e){let t=e.target;return t instanceof HTMLMediaElement?t:e}function ye(){if(document.pictureInPictureEnabled){let e=/.*Version\/.*Safari\/.*/.test(navigator.userAgent),t=typeof matchMedia==`function`&&matchMedia(`(display-mode: standalone)`).matches;return!e||!t}return C(document.createElement(`video`).webkitSetPresentationMode)}function B(e){let t=z(e);return document.pictureInPictureElement===t?!0:t.webkitPresentationMode===`picture-in-picture`}async function be(e){let t=z(e);if(C(t.webkitSetPresentationMode)){t.webkitSetPresentationMode(`picture-in-picture`);return}if(C(t.requestPictureInPicture)){await t.requestPictureInPicture();return}throw new DOMException(`Picture-in-Picture not supported`,`NotSupportedError`)}async function V(e){if(e){let t=z(e);if(C(t.webkitSetPresentationMode)&&t.webkitPresentationMode===`picture-in-picture`){t.webkitSetPresentationMode(`inline`);return}}if(C(document.exitPictureInPicture))return document.exitPictureInPicture()}const xe=N({name:`fullscreen`,state:({target:e})=>({fullscreen:!1,fullscreenAvailability:`unavailable`,async requestFullscreen(){let{media:t,container:n}=e();return B(t)&&await V(t),ve(n,t)},async exitFullscreen(){let{media:t}=e();return R(t)}}),attach({target:t,signal:n,set:r}){let{media:i,container:a}=t;r({fullscreenAvailability:ge()?`available`:`unsupported`});let o=()=>r({fullscreen:L(a,i)});o(),e(document,`fullscreenchange`,o,{signal:n}),e(document,`webkitfullscreenchange`,o,{signal:n}),`webkitPresentationMode`in i&&e(i,`webkitpresentationmodechanged`,o,{signal:n})}}),H=N({name:`pip`,state:({target:e})=>({pip:!1,pipAvailability:`unavailable`,async requestPictureInPicture(){let{media:t,container:n}=e();return L(n,t)&&await R(),be(t)},async exitPictureInPicture(){let{media:t}=e();return V(t)}}),attach({target:t,signal:n,set:r}){let{media:i}=t;r({pipAvailability:ye()?`available`:`unsupported`});let a=()=>r({pip:B(i)});a(),e(i,`enterpictureinpicture`,a,{signal:n}),e(i,`leavepictureinpicture`,a,{signal:n}),`webkitPresentationMode`in i&&e(i,`webkitpresentationmodechanged`,a,{signal:n})}}),U=N({name:`playback`,state:({target:e})=>({paused:!0,ended:!1,started:!1,waiting:!1,play(){return e().media.play()},pause(){e().media.pause()}}),attach({target:t,signal:n,set:r}){let{media:i}=t,a=()=>r({paused:i.paused,ended:i.ended,started:!i.paused||i.currentTime>0,waiting:i.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&!i.paused});a(),e(i,`emptied`,a,{signal:n}),e(i,`play`,a,{signal:n}),e(i,`pause`,a,{signal:n}),e(i,`ended`,a,{signal:n}),e(i,`playing`,a,{signal:n}),e(i,`waiting`,a,{signal:n}),e(i,`seeked`,a,{signal:n})}}),Se=[1,1.2,1.5,1.7,2],W=N({name:`playbackRate`,state:({target:e})=>({playbackRates:Se,playbackRate:1,setPlaybackRate(t){e().media.playbackRate=t}}),attach({target:t,signal:n,set:r}){let{media:i}=t,a=()=>r({playbackRate:i.playbackRate});a(),e(i,`ratechange`,a,{signal:n})}}),G=N({name:`source`,state:({target:e,signals:t})=>({source:null,canPlay:!1,loadSource(n){t.clear();let{media:r}=e();return r.src=n,r.load(),n}}),attach({target:t,signal:n,set:r}){let{media:i}=t,a=()=>r({source:i.currentSrc||i.src||null,canPlay:i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA});a(),e(i,`canplay`,a,{signal:n}),e(i,`canplaythrough`,a,{signal:n}),e(i,`loadstart`,a,{signal:n}),e(i,`emptied`,a,{signal:n})}}),Ce=N({name:`textTrack`,state:({target:e})=>({chaptersCues:[],thumbnailCues:[],thumbnailTrackSrc:null,textTrackList:[],subtitlesShowing:!1,toggleSubtitles(t){let n=h(e().media,e=>e.kind===`subtitles`||e.kind===`captions`);if(!n.length)return!1;let r=n.some(e=>e.mode===`showing`),i=t??!r;for(let e of n)e.mode=i?`showing`:`disabled`;return i}}),attach({target:t,signal:n,set:r}){let{media:i}=t,a=null;function o(){a?.abort(),a=new AbortController;let t=null,n=null,s=[],c=!1;for(let e=0;e<i.textTracks.length;e++){let r=i.textTracks[e];!t&&r.kind===`chapters`&&(t=r),!n&&r.kind===`metadata`&&r.label===`thumbnails`&&(n=r),s.push({kind:r.kind,label:r.label,language:r.language,mode:r.mode}),(r.kind===`captions`||r.kind===`subtitles`)&&r.mode===`showing`&&(c=!0)}let l=t?.cues?Array.from(t.cues):[],u=n?.cues?Array.from(n.cues):[],d=null;n&&(d=m(i,n)?.src??null);let f=i.querySelectorAll?.(`track`)??[],p=i.shadowRoot?.querySelectorAll?.(`track`)??[];for(let t of[...f,...p])t.track?.cues?.length||e(t,`load`,o,{signal:a.signal});r({chaptersCues:l,thumbnailCues:u,thumbnailTrackSrc:d,textTrackList:s,subtitlesShowing:c})}o(),e(i.textTracks,`addtrack`,o,{signal:n}),e(i.textTracks,`removetrack`,o,{signal:n}),e(i.textTracks,`change`,o,{signal:n}),e(i,`loadstart`,o,{signal:n}),n.addEventListener(`abort`,()=>a?.abort(),{once:!0})}});function we(e){return e.readyState>=HTMLMediaElement.HAVE_METADATA}const Te={seek:Symbol.for(`@videojs/seek`)},K=N({name:`time`,state:({target:e,signals:t,set:n})=>({currentTime:0,duration:0,seeking:!1,async seek(r){let{media:i}=e(),a=t.supersede(Te.seek);if(!we(i)&&!await s(i,`loadedmetadata`,{signal:a}).catch(()=>!1))return i.currentTime;let o=Math.max(0,Math.min(r,i.duration||1/0));return n({currentTime:o,seeking:!0}),i.currentTime=o,await s(i,`seeked`,{signal:a}).catch(k),i.currentTime}}),attach({target:t,signal:n,set:r}){let{media:i}=t,a=()=>r({currentTime:i.currentTime,duration:Number.isFinite(i.duration)?i.duration:0,seeking:i.seeking});a(),e(i,`timeupdate`,a,{signal:n}),e(i,`durationchange`,a,{signal:n}),e(i,`seeking`,a,{signal:n}),e(i,`seeked`,a,{signal:n}),e(i,`loadedmetadata`,a,{signal:n}),e(i,`emptied`,a,{signal:n})}}),q=N({name:`volume`,state:({target:e})=>({volume:1,muted:!1,volumeAvailability:`unavailable`,setVolume(t){let{media:n}=e(),r=Math.max(0,Math.min(1,t));return r>0&&n.muted&&(n.muted=!1),n.volume=r,n.volume},toggleMuted(){let{media:t}=e();return t.muted||t.volume===0?(t.muted=!1,t.volume===0&&(t.volume=.25)):t.muted=!0,t.muted}}),attach({target:t,signal:n,set:r}){let{media:i}=t;r({volumeAvailability:Ee()});let a=()=>r({volume:i.volume,muted:i.muted});a(),e(i,`volumechange`,a,{signal:n})}});function Ee(){let e=document.createElement(`video`);try{return e.volume=.5,e.volume===.5?`available`:`unsupported`}catch{return`unsupported`}}const De=[U,W,q,K,G,P,xe,H,F,Ce,I],Oe=[U,W,q,K,G,P,I],ke=[],Ae=O(P),je=O(F),Me=O(I),Ne=O(xe),Pe=O(H),Fe=O(U),Ie=O(W);O(G);const Le=O(Ce),Re=O(K),ze=O(q);function Be(t){let{transition:n}=t,r=n.state,i=new AbortController,a=null;function o(){if(i.signal.aborted)return null;let{active:e,status:t}=r.current;return e&&t!==`ending`?null:(t===`ending`&&n.cancel(),n.open())}function s(e){let{active:t,status:a}=r.current;return i.signal.aborted||!t||a===`ending`?null:n.close(e)}function c(){if(l(),typeof document>`u`)return;a=new AbortController;let{signal:n}=a;e(document,`keydown`,u,{signal:n}),t.onDocumentActive?.(n)}function l(){a?.abort(),a=null}function u(e){e.key===`Escape`&&r.current.active&&(t.closeOnEscape?.()??!0)&&t.onEscapeDismiss(e)}let d=r.subscribe(()=>{r.current.active?c():l()});i.signal.addEventListener(`abort`,()=>{d(),n.destroy(),l()});function f(){i.signal.aborted||i.abort()}return{input:r,open:o,close:s,signal:i.signal,destroy:f}}function Ve(t){let{onOpenChange:n}=t,r=null,i=null,a=null,o=Be({transition:t.transition,closeOnEscape:t.closeOnEscape,onEscapeDismiss(e){e.stopPropagation(),l()}}),s=o.input;function c(){i=document.activeElement;let e=o.open();e&&(n(!0),requestAnimationFrame(()=>{o.signal.aborted||!s.current.active||r?.focus()}),e.then(()=>{o.signal.aborted||!s.current.active||t.onOpenChangeComplete?.(!0)}))}function l(){let e=o.close(r);e&&(n(!1),e.then(()=>{o.signal.aborted||(i&&=(i.focus(),null),t.onOpenChangeComplete?.(!1))}))}function u(){if(d(),!r)return;a=new AbortController;let{signal:t}=a;e(r,`click`,f,{signal:t})}function d(){a?.abort(),a=null}function f(e){e.target instanceof HTMLButtonElement&&l()}function p(e){r=e,u()}return o.signal.addEventListener(`abort`,()=>{d(),r=null,i=null}),{input:s,open:c,close:l,setElement:p,destroy:o.destroy}}function He(e){let{onActivate:t,isDisabled:n}=e;return{role:`button`,tabIndex:0,onClick(e){if(n()){e.preventDefault();return}t()},onPointerDown(e){n()&&e.preventDefault()},onMouseDown(e){n()&&e.preventDefault()},onKeyDown(e){if(e.target===e.currentTarget){if(n()){e.key!==`Tab`&&e.preventDefault();return}e.key===`Enter`?(e.preventDefault(),t()):e.key===` `&&e.preventDefault()}},onKeyUp(e){e.target===e.currentTarget&&(n()||e.key===` `&&t())}}}function Ue(t){let{onOpenChange:n,closeOnOutsideClick:r}=t,i=null,a=null,o=null,s=new Set,c=Be({transition:t.transition,closeOnEscape:t.closeOnEscape,onEscapeDismiss(e){e.preventDefault(),_(`escape`,e)},onDocumentActive(t){e(document,`pointerdown`,b,{capture:!0,signal:t})}}),d=c.input;function f(){o!==null&&(clearTimeout(o),o=null)}function p(){return globalThis.matchMedia?.(`(hover: hover)`)?.matches??!1}function m(){return p()?globalThis.matchMedia?.(`(pointer: fine)`)?.matches??!1:!1}function h(){return t.openOnHover?.()?p():!0}function g(e,r){let i=c.open();i&&(n(!0,r?{reason:e,event:r}:{reason:e}),i.then(()=>{c.signal.aborted||!d.current.active||t.onOpenChangeComplete?.(!0)}))}function _(e,r){let i=c.close(a);i&&(n(!1,r?{reason:e,event:r}:{reason:e}),i.then(()=>{c.signal.aborted||(u(a),t.onOpenChangeComplete?.(!1))}))}function v(e=`click`){g(e)}function y(e=`click`){_(e)}function b(e){if(!r()||!d.current.active)return;let t=e.composedPath();i&&t.includes(i)||a&&t.includes(a)||_(`outside-click`,e)}c.signal.addEventListener(`abort`,()=>{f(),s.clear(),i=null,a=null});let x={onClick(e){h()&&(d.current.active&&d.current.status!==`ending`?_(`click`,e):g(`click`,e))},onPointerEnter(e){if(!t.openOnHover?.()||!p()||(f(),d.current.active))return;let n=t.delay?.()??300;o=setTimeout(()=>g(`hover`),n)},onPointerLeave(e){if(!t.openOnHover?.()||!p()||(f(),!d.current.active))return;let n=t.closeDelay?.()??0;o=setTimeout(()=>_(`hover`),n)},onFocusIn(e){if(t.openOnHover?.()){if(!m())return;g(`focus`)}},onFocusOut(e){let n=e.relatedTarget;n&&(i?.contains(n)||a?.contains(n))||t.openOnHover?.()&&_(`blur`)}},S={onPointerEnter(e){t.openOnHover?.()&&f()},onPointerLeave(e){if(!t.openOnHover?.()||s.size>0||(f(),!d.current.active))return;let n=t.closeDelay?.()??0;o=setTimeout(()=>_(`hover`),n)},onGotPointerCapture(e){s.add(e.pointerId)},onLostPointerCapture(e){s.delete(e.pointerId)},onFocusOut(e){let t=e.relatedTarget;t&&(i?.contains(t)||a?.contains(t))||_(`blur`)}};function ee(e){i=e}function C(e){!e&&a&&d.current.active&&u(a),a=e,e&&d.current.active&&l(e)}return{input:d,triggerProps:x,popupProps:S,get triggerElement(){return i},setTriggerElement:ee,setPopupElement:C,open:v,close:y,destroy:c.destroy}}const J={sideOffset:`--media-popover-side-offset`,alignOffset:`--media-popover-align-offset`,anchorWidth:`--media-popover-anchor-width`,anchorHeight:`--media-popover-anchor-height`,availableWidth:`--media-popover-available-width`,availableHeight:`--media-popover-available-height`},We={top:`bottom`,bottom:`top`,left:`right`,right:`left`};function Ge(e,t,n,r,i,a,o=J){return c()?qe(e,t,o):n&&r?{...Ye(n,r,t,a??{sideOffset:0,alignOffset:0}),...i?Je(n,i,t.side,o):{},position:`fixed`,inset:`auto`,margin:`0`}:{}}function Ke(e){return c()?{anchorName:`--${e}`}:{}}function qe(e,t,n=J){let r=`var(${n.sideOffset}, 0px)`,i=`var(${n.alignOffset}, 0px)`,{side:a,align:o}=t,s={positionAnchor:`--${e}`,position:`fixed`,inset:`auto`,margin:`0`,justifySelf:`normal`,alignSelf:`normal`,marginInlineStart:`0`,marginBlockStart:`0`},c=We[a];return a===`top`||a===`bottom`?(s[c]=`calc(anchor(${a}) + ${r})`,o===`start`?s.left=`calc(anchor(left) + ${i})`:o===`end`?s.right=`calc(anchor(right) + ${i})`:(s.justifySelf=`anchor-center`,s.marginInlineStart=i)):(s[c]=`calc(anchor(${a}) + ${r})`,o===`start`?s.top=`calc(anchor(top) + ${i})`:o===`end`?s.bottom=`calc(anchor(bottom) + ${i})`:(s.alignSelf=`anchor-center`,s.marginBlockStart=i)),s}function Je(e,t,n,r=J){let i={};return i[r.anchorWidth]=`${e.width}px`,i[r.anchorHeight]=`${e.height}px`,n===`top`||n===`bottom`?(i[r.availableHeight]=n===`top`?`${e.top-t.top}px`:`${t.bottom-e.bottom}px`,i[r.availableWidth]=`${t.width}px`):(i[r.availableWidth]=n===`left`?`${e.left-t.left}px`:`${t.right-e.right}px`,i[r.availableHeight]=`${t.height}px`),i}function Ye(e,t,n,r={sideOffset:0,alignOffset:0}){let{side:i,align:a}=n,{sideOffset:o,alignOffset:s}=r,c=0,l=0;return i===`top`?c=e.top-t.height-o:i===`bottom`?c=e.bottom+o:l=i===`left`?e.left-t.width-o:e.right+o,i===`top`||i===`bottom`?l=a===`start`?e.left+s:a===`end`?e.right-t.width+s:e.left+(e.width-t.width)/2+s:c=a===`start`?e.top+s:a===`end`?e.bottom-t.height+s:e.top+(e.height-t.height)/2+s,{top:`${c}px`,left:`${l}px`}}function Xe(e,t=J){let n=getComputedStyle(e);return{sideOffset:p(e,n.getPropertyValue(t.sideOffset)),alignOffset:p(e,n.getPropertyValue(t.alignOffset))}}function Ze(e){let t=e.getBoundingClientRect(),n=e.offsetWidth||t.width,r=e.offsetHeight||t.height,i={...t,width:n,height:r,right:t.left+n,bottom:t.top+r};return{...i,toJSON:()=>i}}function Y(e,t,n){return Math.max(t,Math.min(n,e))}function Qe(e,t,n){let r=Math.round((e-n)/t)*t+n,i=`${t}`.indexOf(`.`);return i===-1?r:Number(r.toFixed(`${t}`.length-i-1))}function X(e,t,n,r){let i;return i=n===`vertical`?1-(e.clientY-t.top)/t.height:r?(t.right-e.clientX)/t.width:(e.clientX-t.left)/t.width,Number.isFinite(i)?Y(i*100,0,100):0}function $e(e){let t=M({pointerPercent:0,dragPercent:0,dragging:!1,pointing:!1,focused:!1}),n=new AbortController,r=e.commitThrottle??0,i=!1,a=0,o=!1,s=null,c=null,l=r>0?ce(t=>e.onValueCommit?.(t),r):null;function u(){if(w(c))return;let t=c;c=null;try{e.getElement().releasePointerCapture(t)}catch{}}function d(){i?(i=!1,t.patch({dragging:!1,pointing:!1}),e.onDragEnd?.()):t.patch({pointing:!1}),f()}function f(){l?.cancel(),c=null,s=null}let p={onPointerDown(n){if(e.isDisabled())return;n.preventDefault();let r=e.getElement();s=r.getBoundingClientRect(),o=e.isRTL(),a=0,u(),c=n.pointerId,r.setPointerCapture(n.pointerId);let i=X(n,s,e.getOrientation(),o);t.patch({pointing:!0,pointerPercent:i,dragPercent:i}),e.onValueChange?.(i),e.getThumbElement?.()?.focus({preventScroll:!0,focusVisible:!1})},onPointerMove(n){if(e.isDisabled())return;if(!w(c)){if(n.pointerType!==`touch`&&n.buttons===0){d();return}a++;let r=X(n,s,e.getOrientation(),o);!i&&a>=2?(i=!0,t.patch({dragging:!0,dragPercent:r,pointerPercent:r}),e.onDragStart?.(),e.onValueChange?.(r),l?.(r)):i?(t.patch({dragPercent:r,pointerPercent:r}),e.onValueChange?.(r),l?.(r)):t.patch({pointerPercent:r});return}let r=X(n,e.getElement().getBoundingClientRect(),e.getOrientation(),e.isRTL());t.patch({pointing:!0,pointerPercent:r})},onPointerUp(t){if(w(c))return;let n=X(t,s,e.getOrientation(),o);l?.cancel(),e.onValueCommit?.(n)},onPointerLeave(){w(c)&&t.patch({pointing:!1})},onLostPointerCapture(){d()}},m={onKeyDown(n){if(e.isDisabled()){n.key!==`Tab`&&n.preventDefault();return}let r=e.getStepPercent(),i=e.getLargeStepPercent(),a=Qe(e.getPercent(),r,0),o=e.isRTL()?-1:1,s=n.shiftKey?i:r,c=null;switch(n.key){case`ArrowRight`:c=a+s*o;break;case`ArrowLeft`:c=a-s*o;break;case`ArrowUp`:c=a+s;break;case`ArrowDown`:c=a-s;break;case`PageUp`:c=a+i;break;case`PageDown`:c=a-i;break;case`Home`:c=0;break;case`End`:c=100;break;default:!n.metaKey&&!n.ctrlKey&&!n.altKey&&n.key>=`0`&&n.key<=`9`&&(c=Number(n.key)*10);break}c!==null&&(n.preventDefault(),c=Y(c,0,100),t.patch({pointerPercent:c,dragPercent:c}),e.onValueChange?.(c),e.onValueCommit?.(c))},onFocus(){t.patch({focused:!0})},onBlur(){t.patch({focused:!1})}};function h(t){if(!e.adjustPercent||t.thumbAlignment!==`edge`)return t;let n=e.getElement(),r=e.getThumbElement?.();if(!r)return t;let i=t.orientation===`horizontal`,a=i?r.offsetWidth:r.offsetHeight,o=i?n.offsetWidth:n.offsetHeight;return{...t,fillPercent:e.adjustPercent(t.fillPercent,a,o),pointerPercent:e.adjustPercent(t.pointerPercent,a,o)}}let g=null;return e.onResize&&(g=new ResizeObserver(()=>e.onResize()),g.observe(e.getElement())),{input:t,rootProps:p,rootStyle:{touchAction:`none`,userSelect:`none`},thumbProps:m,adjustForAlignment:h,destroy(){n.signal.aborted||(n.abort(),g?.disconnect(),u(),f())}}}const Z={fill:`--media-slider-fill`,pointer:`--media-slider-pointer`,buffer:`--media-slider-buffer`};function et(e){return{[Z.fill]:`${e.fillPercent.toFixed(3)}%`,[Z.pointer]:`${e.pointerPercent.toFixed(3)}%`}}function tt(e){return{...et(e),[Z.buffer]:`${e.bufferPercent.toFixed(3)}%`}}function nt(e,t){let n=e/2;return{position:`absolute`,left:t===`visible`?`calc(var(${Z.pointer}) - ${n}px)`:`min(max(0px, calc(var(${Z.pointer}) - ${n}px)), calc(100% - ${e}px))`,width:`max-content`,pointerEvents:`none`}}var rt=class{findActiveThumbnail(e,t){if(e.length===0)return;let n=0,r=e.length-1,i;for(;n<=r;){let a=n+r>>>1,o=e[a];t>=o.startTime?(i=o,n=a+1):r=a-1}return i}parseConstraints(e){let t=parseFloat(e.minWidth),n=parseFloat(e.maxWidth),r=parseFloat(e.minHeight),i=parseFloat(e.maxHeight);return{minWidth:Number.isFinite(t)?t:0,maxWidth:Number.isFinite(n)?n:1/0,minHeight:Number.isFinite(r)?r:0,maxHeight:Number.isFinite(i)?i:1/0}}calculateScale(e,t,n){let{minWidth:r,maxWidth:i,minHeight:a,maxHeight:o}=n,s=Math.min(i/e,o/t),c=Math.max(r/e,a/t);return Number.isFinite(s)&&s<1?s:Number.isFinite(c)&&c>1?c:1}resize(e,t,n,r){let i=e.width??t,a=e.height??n;if(!i||!a)return;let o=this.calculateScale(i,a,r),s=e.coords?.x??0,c=e.coords?.y??0,l=o===1?0:1;return{scale:o,containerWidth:Math.max(0,Math.floor(i*o)-l*2),containerHeight:Math.max(0,Math.floor(a*o)-l*2),imageWidth:Math.ceil(t*o),imageHeight:Math.ceil(n*o),offsetX:Math.ceil(s*o)+l,offsetY:Math.ceil(c*o)+l}}getState(e,t,n){return{loading:e,error:t,hidden:!e&&!n}}getAttrs(e){return{role:`img`,"aria-hidden":`true`}}};function it(t){let{getContainer:n,getImg:r,onStateChange:i}=t,a=new rt,o=new AbortController,s=o.signal,c=!1,l=!1,u=0,d=0,f=``,p=!1,m=null;function h(){let e=r();e&&(u=e.naturalWidth,d=e.naturalHeight),c=!1,l=!1,i()}function g(){c=!1,l=!0,i()}function _(t){e(t,`load`,h,{signal:s}),e(t,`error`,g,{signal:s})}function v(){if(!p){let e=r();e&&(_(e),p=!0)}if(!m){let e=n();e&&(m=new ResizeObserver(i),m.observe(e))}}function y(e){v();let t=e??``;t!==f&&(f=t,t?(c=!0,l=!1):(c=!1,l=!1,u=0,d=0))}function b(){v();let e=r();e?.complete&&f&&(e.naturalWidth>0?(u=e.naturalWidth,d=e.naturalHeight,c=!1,l=!1):(c=!1,l=!0),i())}function x(){o.abort(),m?.disconnect(),m=null}return{get loading(){return c},get error(){return l},get naturalWidth(){return u},get naturalHeight(){return d},readConstraints(){let e=n();return e?a.parseConstraints(getComputedStyle(e)):{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0}},updateSrc:y,connect:b,destroy:x}}const at={hover:`hover`,focus:`focus`,escape:`escape`,blur:`blur`};function ot(e){let t={transition:e.transition,onOpenChange(t,n){let r=at[n.reason];if(!r)return;let i=e.group?.();t?i?.notifyOpen():i?.notifyClose();let a=n.event?{reason:r,event:n.event}:{reason:r};e.onOpenChange(t,a)},closeOnEscape:()=>!0,closeOnOutsideClick:()=>!1,openOnHover:()=>!0,delay:()=>{let t=e.group?.();return t?.shouldSkipDelay()?0:e.delay?.()??t?.delay??600},closeDelay:()=>{let t=e.group?.();return e.closeDelay?.()??t?.closeDelay??0}};e.onOpenChangeComplete&&(t.onOpenChangeComplete=e.onOpenChangeComplete);let n=Ue(t),r=!1,{onClick:i,...a}=n.triggerProps,o={...a,onPointerDown(){r=!0},onPointerEnter(t){e.disabled?.()||t.pointerType!==`touch`&&a.onPointerEnter(t)},onFocusIn(t){if(!e.disabled?.()){if(r){r=!1;return}a.onFocusIn(t)}}},s={...n.popupProps,onPointerEnter(t){e.disableHoverablePopup?.()||n.popupProps.onPointerEnter(t)}};return{...n,triggerProps:o,popupProps:s,get triggerElement(){return n.triggerElement},open:()=>n.open(`hover`),close:()=>n.close(`hover`)}}function st(){let e=M({active:!1,status:`idle`}),t=!1,n=0,r=0;function i(){return cancelAnimationFrame(n),cancelAnimationFrame(r),n=0,r=0,e.patch({active:!0,status:`starting`}),new Promise(i=>{n=requestAnimationFrame(()=>{n=0,r=requestAnimationFrame(()=>{if(r=0,t||!e.current.active)return i();e.patch({status:`idle`}),i()})})})}function a(i){return cancelAnimationFrame(n),cancelAnimationFrame(r),n=0,r=0,e.patch({status:`ending`}),new Promise(a=>{n=requestAnimationFrame(()=>{n=0,r=requestAnimationFrame(()=>{if(r=0,t)return a();ct(i).finally(()=>{if(t||e.current.status!==`ending`)return a();e.patch({active:!1,status:`idle`}),a()})})})})}function o(){cancelAnimationFrame(n),cancelAnimationFrame(r),n=0,r=0,e.current.status!==`idle`&&e.patch({status:`idle`})}return{state:e,open:i,close:a,cancel:o,destroy(){t||(t=!0,o())}}}function ct(e){if(!e)return Promise.resolve();let t=e.getAnimations?.()??[];return t.length===0?Promise.resolve():Promise.all(t.map(e=>e.finished)).then(k,k)}function lt(e){return{onWheel(t){if(e.isDisabled())return;let n=Math.sign(t.deltaY);if(n===0)return;t.preventDefault();let r=e.getStepPercent(),i=Y(e.getPercent()-n*r,0,100);e.onValueChange?.(i)}}}function ut(t,n,r){let i=r?.signal;for(let[r,a]of Object.entries(n))C(a)&&r.startsWith(`on`)?e(t,r.slice(2).toLowerCase(),a,i?{signal:i}:void 0):T(a)||a===!1?t.removeAttribute(r):a===!0?t.setAttribute(r,``):t.setAttribute(r,String(a))}function dt(e,t,n){for(let r in t){if(n&&!(r in n))continue;let i=n?.[r]??ft(r),a=t[r];a===!0?e.setAttribute(i,``):a?e.setAttribute(i,String(a)):e.removeAttribute(i)}}function ft(e){return`data-${e.toLowerCase()}`}
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2021 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/var Q=class{constructor(e,t,n,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,t.context!==void 0){let e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&=(this.unsubscribe(),void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.host,this.t,this.subscribe))}},pt=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){let n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:t}]of this.subscriptions)e(this.o,t)},e!==void 0&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});let{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}},mt=class extends Event{constructor(e,t){super(`context-provider`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},$=class extends pt{constructor(e,n,r){super(n.context===void 0?r:n.initialValue),this.onContextRequest=e=>{if(e.context!==this.context)return;let t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context||(e.contextTarget??e.composedPath()[0])===this.host)return;let n=new Set;for(let[e,{consumerHost:r}]of this.subscriptions)n.has(e)||(n.add(e),r.dispatchEvent(new t(this.context,r,e,!0)));e.stopPropagation()},this.host=e,n.context===void 0?this.context=n:this.context=n.context,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(`context-request`,this.onContextRequest),this.host.addEventListener(`context-provider`,this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new mt(this.context,this.host))}};function ht(e){return t=>{class n extends t{#e=null;#t=null;constructor(...t){super(...t),new Q(this,{context:e.playerContext,callback:e=>{this.#e=e??null},subscribe:!0}),new Q(this,{context:e.containerContext,callback:e=>{this.#t=e?.setContainer??null,this.isConnected&&this.#t?.(this)},subscribe:!0})}get store(){return this.#e}connectedCallback(){super.connectedCallback(),this.#t?.(this)}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(null)}}return n}}var gt=class extends v(x){};const _t=ht({playerContext:r,containerContext:i});var vt=class extends _t(gt){static{this.tagName=`media-container`}};function yt(e){return t=>{class n extends t{#e=e.factory();#t=null;#n=null;#r=null;#i=!1;#a=e=>{this.#n!==e&&(this.#n=e,this.#c.setValue({media:e,setMedia:this.#a}),this.#u())};#o=e=>{this.#r!==e&&(this.#r=e,this.#l.setValue({container:e,setContainer:this.#o}),this.#u())};#s=new $(this,{context:e.playerContext,initialValue:this.store});#c=new $(this,{context:e.mediaContext,initialValue:{media:this.#n,setMedia:this.#a}});#l=new $(this,{context:e.containerContext,initialValue:{container:this.#r,setContainer:this.#o}});get store(){return w(this.#e)&&(this.#e=e.factory()),this.#e}connectedCallback(){super.connectedCallback(),this.#s.setValue(this.store),this.#c.setValue({media:this.#n,setMedia:this.#a}),this.#l.setValue({container:this.#r,setContainer:this.#o}),this.#u(),this.#f()}disconnectedCallback(){super.disconnectedCallback(),this.#d()}destroyCallback(){this.#d(),this.#e?.destroy(),this.#e=null,super.destroyCallback()}#u(){let e=this.#e;if(!e)return;if(!this.#n){this.#d();return}let t={media:this.#n,container:this.#r},n=e.target?.media!==t.media,r=e.target?.container!==t.container;(n||r)&&(this.#d(),this.#t=e.attach(t))}#d(){this.#t?.(),this.#t=null}#f(){this.#n||this.#i||(this.#i=!0,queueMicrotask(()=>{if(this.#i=!1,this.#n)return;let e=this.querySelector(`video, audio`);e&&this.#a(e)}))}}return n}}var bt=class{#e;#t;#n;#r;#i=k;constructor(e,t,n){this.#e=e,this.#n=t,this.#t=n,e.addController(this)}get value(){return this.#t?(this.#r??=this.#t(this.#n.current),this.#r):this.#n.current}track(e){this.#n=e,this.#a()}hostConnected(){this.#a()}hostDisconnected(){this.#i(),this.#i=k,this.#r=void 0}#a(){if(this.#i(),!this.#t){this.#i=this.#n.subscribe(()=>this.#e.requestUpdate());return}let e=this.#t;this.#r=e(this.#n.current),this.#i=this.#n.subscribe(()=>{let t=e(this.#n.current);o(this.#r,t)||(this.#r=t,this.#e.requestUpdate())})}},xt=class{#e;#t;#n;constructor(e,t,n){this.#e=n??k,he(t)?(this.#n=t,this.#t=null):(this.#n=null,this.#t=new Q(e,{context:t,callback:e=>this.#e(e),subscribe:!1})),e.addController(this)}get value(){return this.#t?this.#t.value??null:this.#n}hostConnected(){this.#n&&this.#e(this.#n)}},St=class{#e;#t;#n;#r=null;constructor(e,t,n){this.#e=e,this.#t=n,this.#n=new xt(e,t,e=>this.#i(e)),e.addController(this)}get value(){let e=this.#n.value;if(w(e))throw Error(`Store not available`);return T(this.#t)?e:this.#r.value}hostConnected(){}#i(e){T(this.#t)||(this.#r?this.#r.track(e.$state):this.#r=new bt(this.#e,e.$state,this.#t))}},Ct=class{#e;#t;#n;#r=null;constructor(e,t,n){this.#e=e,this.#t=n,this.#n=new Q(e,{context:t,callback:e=>this.#i(e),subscribe:!0}),e.addController(this)}get value(){let e=this.#n.value;if(e)return this.#t?this.#r?.value:e}get displayName(){return this.#t?.displayName}hostConnected(){let e=this.#n.value;e&&this.#i(e)}hostDisconnected(){this.#r=null}#i(e){!this.#r&&this.#t&&(this.#r=new St(this.#e,e,this.#t))}};function wt(e){let t=re(...e.features);function a(){return me()(t)}return{context:r,create:a,PlayerController:Ct,ProviderMixin:yt({playerContext:r,mediaContext:n,containerContext:i,factory:a}),ContainerMixin:ht({playerContext:r,containerContext:i})}}export{Me as A,De as B,Ze as C,Ve as D,He as E,Le as F,x as G,C as H,Re as I,l as J,f as K,ze as L,Pe as M,Fe as N,Ae as O,Ie as P,Oe as R,Ge as S,Ue as T,ee as U,M as V,T as W,c as Y,tt as _,gt as a,Qe as b,dt as c,st as d,ot as f,nt as g,et as h,vt as i,Ne as j,je as k,ut as l,rt as m,Ct as n,$ as o,it as p,u as q,bt as r,Q as s,wt as t,lt as u,$e as v,Xe as w,Ke as x,Y as y,ke as z};
|
|
7
|
+
//# sourceMappingURL=create-player-BqU8r8H4.js.map
|