var $cTKjd$optionvalidator = require("option-validator"); var $cTKjd$screenfull = require("screenfull"); function $parcel$interopDefault(a) { return a && a.__esModule ? a.default : a; } function $parcel$defineInteropFlag(a) { Object.defineProperty(a, '__esModule', {value: true, configurable: true}); } function $parcel$export(e, n, v, s) { Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); } function $parcel$exportWildcard(dest, source) { Object.keys(source).forEach(function(key) { if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { return; } Object.defineProperty(dest, key, { enumerable: true, get: function get() { return source[key]; } }); }); return dest; } $parcel$defineInteropFlag(module.exports); $parcel$export(module.exports, "default", () => $cdf9fe9adb2d02f9$export$2e2bcd8739ae039); var $fc322dd812272489$exports = {}; $fc322dd812272489$exports = ".art-video-player {\n z-index: 20;\n width: 100%;\n height: 100%;\n zoom: 1;\n color: #eee;\n text-align: left;\n direction: ltr;\n user-select: none;\n -webkit-tap-highlight-color: #0000;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n background-color: #000;\n outline: none;\n margin: 0 auto;\n font-family: Roboto, Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n display: flex;\n position: relative;\n}\n\n.art-video-player * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: #666;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: #ccc;\n}\n\n.art-video-player .art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1.5;\n display: inline-flex;\n}\n\n.art-video-player .art-icon svg {\n fill: #fff;\n}\n\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n\n@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) {\n .art-video-player .art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000b3 !important;\n }\n}\n\n.art-video-player .art-video {\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: #000;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-poster {\n z-index: 11;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n width: 100%;\n text-align: center;\n color: #fff;\n pointer-events: none;\n text-shadow: 1px 0 1px #000, 0 1px 1px #000, -1px 0 1px #000, 0 -1px 1px #000, 1px 1px 1px #000, -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000;\n padding: 0 20px;\n font-size: 20px;\n display: none;\n position: absolute;\n bottom: 10px;\n}\n\n.art-video-player .art-subtitle p {\n word-break: break-all;\n height: fit-content;\n margin: 5px 0 0;\n line-height: 1.2;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: block;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: 50px;\n}\n\n.art-video-player .art-danmuku {\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers {\n z-index: 40;\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n\n.art-video-player.art-layer-show .art-layers {\n display: block;\n}\n\n.art-video-player .art-mask {\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-mask .art-state {\n width: 60px;\n height: 60px;\n opacity: .85;\n cursor: pointer;\n pointer-events: all;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n bottom: 65px;\n right: 30px;\n}\n\n.art-video-player.art-mask-show .art-mask {\n display: flex;\n}\n\n.art-video-player.art-mobile .art-state {\n position: static;\n}\n\n.art-video-player .art-loading {\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n\n.art-video-player .art-bottom {\n z-index: 60;\n height: 100px;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) bottom repeat-x;\n flex-direction: column;\n justify-content: space-between;\n padding: 50px 10px 0;\n transition: all .2s ease-in-out;\n display: flex;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-bottom .art-progress {\n z-index: 0;\n pointer-events: auto;\n flex: 1;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress {\n height: 4px;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n height: 50%;\n width: 100%;\n background: #fff3;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded {\n z-index: 10;\n height: 100%;\n width: 0;\n background: #fff6;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played {\n z-index: 20;\n height: 100%;\n width: 0;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight {\n z-index: 30;\n height: 100%;\n pointer-events: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span {\n width: 7px;\n height: 100%;\n pointer-events: auto;\n background: #fff;\n display: inline-block;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n visibility: hidden;\n z-index: 40;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n transition: transform .1s ease-in-out;\n position: absolute;\n transform: scale(.1);\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon {\n width: 100%;\n height: 100%;\n pointer-events: none;\n user-select: none;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip {\n z-index: 50;\n height: 20px;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n background: #000000b3;\n border-radius: 3px;\n padding: 0 5px;\n font-size: 12px;\n font-weight: bold;\n line-height: 20px;\n display: none;\n position: absolute;\n top: -25px;\n left: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-thumbnails {\n pointer-events: none;\n background-color: #000000b3;\n display: none;\n position: absolute;\n bottom: 8px;\n left: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-loop {\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-loop .art-loop-point {\n width: 2px;\n height: 8px;\n background: #ffffffbf;\n position: absolute;\n top: -2px;\n left: 0;\n}\n\n.art-video-player .art-bottom .art-controls {\n z-index: 1;\n pointer-events: auto;\n height: 45px;\n justify-content: space-between;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-controls .art-controls-left, .art-video-player .art-bottom .art-controls .art-controls-right {\n display: flex;\n}\n\n.art-video-player .art-bottom .art-controls .art-control {\n opacity: .9;\n min-height: 36px;\n min-width: 36px;\n text-align: center;\n cursor: pointer;\n white-space: nowrap;\n align-items: center;\n font-size: 12px;\n line-height: 1;\n display: flex;\n}\n\n.art-video-player .art-bottom .art-controls .art-control .art-icon {\n float: left;\n height: 36px;\n width: 36px;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.art-video-player .art-bottom .art-controls .art-control:hover {\n opacity: 1;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-onlyText {\n padding: 0 10px;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel {\n float: left;\n width: 0;\n height: 100%;\n transition: margin .2s cubic-bezier(.4, 0, 1, 1), width .2s cubic-bezier(.4, 0, 1, 1);\n position: relative;\n overflow: hidden;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle {\n width: 12px;\n height: 12px;\n background: #fff;\n border-radius: 12px;\n margin-top: -6px;\n position: absolute;\n top: 50%;\n left: 0;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before {\n background: #fff;\n left: -54px;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after {\n background: #fff3;\n left: 6px;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before, .art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after {\n content: \"\";\n height: 3px;\n width: 60px;\n margin-top: -2px;\n display: block;\n position: absolute;\n top: 50%;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel {\n width: 60px;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-quality {\n z-index: 30;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys {\n width: 100px;\n text-align: center;\n color: #fff;\n background: #000c;\n border-radius: 3px;\n padding: 5px 0;\n display: none;\n position: absolute;\n bottom: 35px;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item {\n height: 30px;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-shadow: 0 0 2px #00000080;\n line-height: 30px;\n overflow: hidden;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover {\n background-color: #ffffff1a;\n}\n\n.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys {\n display: block;\n}\n\n.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner {\n height: 100%;\n}\n\n.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n visibility: visible;\n transform: scale(1);\n}\n\n.art-video-player.art-control-show .art-bottom, .art-video-player.art-hover .art-bottom {\n opacity: 1;\n visibility: visible;\n}\n\n.art-video-player.art-error .art-progress-indicator, .art-video-player.art-destroy .art-progress-indicator, .art-video-player.art-error .art-progress-tip, .art-video-player.art-destroy .art-progress-tip {\n display: none !important;\n}\n\n.art-video-player.art-mobile .art-bottom {\n padding: 50px 7px 0;\n}\n\n.art-video-player.art-mobile .art-bottom .art-controls {\n height: 40px;\n}\n\n.art-video-player.art-mobile .art-bottom .art-progress-indicator {\n visibility: visible !important;\n transform: scale(1) !important;\n}\n\n.art-video-player .art-notice {\n z-index: 80;\n width: 100%;\n pointer-events: none;\n padding: 10px;\n font-size: 14px;\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.art-video-player .art-notice .art-notice-inner {\n color: #fff;\n background-color: #0009;\n border-radius: 3px;\n padding: 5px 10px;\n display: inline-block;\n}\n\n.art-video-player.art-notice-show .art-notice {\n display: flex;\n}\n\n.art-video-player .art-contextmenus {\n z-index: 120;\n min-width: 200px;\n background-color: #000000e6;\n border-radius: 3px;\n flex-direction: column;\n padding: 5px 0;\n display: none;\n position: absolute;\n top: 10px;\n left: 10px;\n}\n\n.art-video-player .art-contextmenus .art-contextmenu {\n cursor: pointer;\n color: #fff;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-shadow: 0 0 2px #00000080;\n border-bottom: 1px solid #ffffff1a;\n padding: 10px 15px;\n font-size: 12px;\n display: block;\n overflow: hidden;\n}\n\n.art-video-player .art-contextmenus .art-contextmenu a {\n color: #fff;\n text-decoration: none;\n}\n\n.art-video-player .art-contextmenus .art-contextmenu span {\n padding: 0 7px;\n display: inline-block;\n}\n\n.art-video-player .art-contextmenus .art-contextmenu span:hover, .art-video-player .art-contextmenus .art-contextmenu span.art-current {\n color: #00c9ff;\n}\n\n.art-video-player .art-contextmenus .art-contextmenu:hover {\n background-color: #ffffff1a;\n}\n\n.art-video-player .art-contextmenus .art-contextmenu:last-child {\n border-bottom: none;\n}\n\n.art-video-player.art-contextmenu-show .art-contextmenus {\n display: flex;\n}\n\n.art-video-player .art-settings {\n z-index: 90;\n max-height: 300px;\n background-color: #000000e6;\n border-radius: 3px;\n font-size: 13px;\n transition: all .2s;\n display: none;\n position: absolute;\n bottom: 50px;\n right: 10px;\n overflow: auto;\n}\n\n.art-video-player .art-settings .art-setting-panel {\n display: none;\n}\n\n.art-video-player .art-settings .art-setting-panel.art-current {\n display: block;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item {\n height: 35px;\n cursor: pointer;\n color: #fffc;\n justify-content: space-between;\n align-items: center;\n padding: 0 5px;\n line-height: 1;\n display: flex;\n overflow: hidden;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item:hover, .art-video-player .art-settings .art-setting-panel .art-setting-item.art-current {\n color: #fff;\n background-color: #ffffff1a;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon {\n width: 30px;\n height: 30px;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check {\n visibility: hidden;\n height: 15px;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check {\n visibility: visible;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left {\n white-space: nowrap;\n align-items: center;\n display: flex;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon {\n height: 24px;\n width: 24px;\n justify-content: center;\n align-items: center;\n margin-right: 10px;\n display: flex;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right {\n align-items: center;\n display: flex;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip {\n white-space: nowrap;\n color: #ffffff80;\n font-size: 12px;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon {\n height: 24px;\n width: 24px;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.art-video-player .art-settings .art-setting-panel .art-setting-item-back {\n border-bottom: 1px solid #ffffff1a;\n}\n\n.art-video-player.art-setting-show .art-settings {\n display: block;\n}\n\n.art-video-player.art-mobile .art-settings {\n max-height: 200px;\n}\n\n.art-video-player .art-info {\n z-index: 100;\n width: 350px;\n color: #fff;\n -webkit-font-smoothing: antialiased;\n background-color: #000000e6;\n flex-direction: column;\n padding: 10px;\n font-family: Noto Sans CJK SC DemiLight, Roboto, Segoe UI, Tahoma, Arial, Helvetica, sans-serif;\n font-size: 12px;\n display: none;\n position: absolute;\n top: 10px;\n left: 10px;\n}\n\n.art-video-player .art-info .art-info-item {\n margin-bottom: 5px;\n display: flex;\n}\n\n.art-video-player .art-info .art-info-item .art-info-title {\n width: 100px;\n text-align: right;\n}\n\n.art-video-player .art-info .art-info-item .art-info-content {\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n padding-left: 5px;\n overflow: hidden;\n}\n\n.art-video-player .art-info .art-info-item:last-child {\n margin-bottom: 0;\n}\n\n.art-video-player .art-info .art-info-close {\n cursor: pointer;\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.art-video-player.art-info-show .art-info {\n display: flex;\n}\n\n.art-video-player.art-hide-cursor * {\n cursor: none !important;\n}\n\n.art-video-player[data-aspect-ratio] video {\n box-sizing: content-box;\n object-fit: fill;\n}\n\n.art-video-player.art-fullscreen-web {\n z-index: 9999;\n width: 100%;\n height: 100%;\n position: fixed;\n inset: 0;\n}\n\n.art-fullscreen-rotate {\n z-index: 9999;\n width: 100%;\n height: 100%;\n background-color: #000;\n position: fixed;\n inset: 0;\n}\n\n.art-video-player .art-mini-header {\n z-index: 110;\n height: 35px;\n color: #fff;\n opacity: 0;\n visibility: hidden;\n background-color: #00000080;\n justify-content: space-between;\n align-items: center;\n line-height: 35px;\n transition: all .2s ease-in-out;\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-mini-header .art-mini-title {\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: move;\n flex: 1;\n padding: 0 10px;\n overflow: hidden;\n}\n\n.art-video-player .art-mini-header .art-mini-close {\n width: 35px;\n text-align: center;\n cursor: pointer;\n font-size: 22px;\n}\n\n.art-video-player.art-is-dragging {\n opacity: .7;\n}\n\n.art-video-player.art-mini {\n z-index: 9999;\n width: 400px;\n height: 225px;\n position: fixed;\n box-shadow: 0 2px 5px #00000029, 0 3px 6px #0003;\n}\n\n.art-video-player.art-mini .art-mini-header {\n user-select: none;\n display: flex;\n}\n\n.art-video-player.art-mini.art-hover .art-mini-header {\n opacity: 1;\n visibility: visible;\n}\n\n.art-video-player.art-mini .art-mask .art-state {\n position: static;\n}\n\n.art-video-player.art-mini .art-contextmenu, .art-video-player.art-mini .art-bottom, .art-video-player.art-mini .art-danmu, .art-video-player.art-mini .art-info, .art-video-player.art-mini .art-layers, .art-video-player.art-mini .art-notice, .art-video-player.art-mini .art-setting, .art-video-player.art-mini .art-subtitle {\n display: none !important;\n}\n\n.art-auto-size {\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.art-video-player[data-flip=\"horizontal\"] .art-video {\n transform: scaleX(-1);\n}\n\n.art-video-player[data-flip=\"vertical\"] .art-video {\n transform: scaleY(-1);\n}\n\n.art-video-player .art-layer-miniProgressBar {\n height: 2px;\n background-color: var(--theme);\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-layer-lock {\n height: 34px;\n width: 34px;\n color: #fff;\n background-color: #00000080;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n top: calc(50% - 17px);\n left: 15px;\n}\n\n.art-video-player.art-lock .art-bottom {\n display: none !important;\n}\n\n.art-video-player.art-lock .art-subtitle {\n bottom: 10px !important;\n}\n\n.art-video-player.art-lock .art-layer-miniProgressBar {\n display: block !important;\n}\n\n.art-video-player.art-control-show .art-layer-miniProgressBar {\n display: none;\n}\n\n.art-video-player.art-control-show .art-layer-lock {\n display: flex;\n}\n\n.art-video-player .art-control-selector {\n position: relative;\n}\n\n.art-video-player .art-control-selector .art-selector-list {\n min-width: 100px;\n max-width: 200px;\n max-height: 200px;\n text-align: center;\n color: #fff;\n background-color: #000c;\n border-radius: 3px;\n padding: 5px 0;\n display: none;\n position: absolute;\n bottom: 35px;\n overflow: auto;\n}\n\n.art-video-player .art-control-selector .art-selector-list .art-selector-item {\n height: 30px;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-shadow: 0 0 2px #00000080;\n padding: 0 5px;\n line-height: 30px;\n overflow: hidden;\n}\n\n.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover {\n background-color: #ffffff1a;\n}\n\n.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover, .art-video-player .art-control-selector .art-selector-list .art-selector-item.art-current {\n color: #00c9ff;\n}\n\n.art-video-player .art-control-selector:hover .art-selector-list {\n display: block;\n}\n\n"; class $a2113e5ff6e5df5a$export$2e2bcd8739ae039 { on(name, fn, ctx) { const e = this.e || (this.e = {}); (e[name] || (e[name] = [])).push({ fn: fn, ctx: ctx }); return this; } once(name, fn, ctx) { const self = this; function listener(...args) { self.off(name, listener); fn.apply(ctx, args); } listener._ = fn; return this.on(name, listener, ctx); } emit(name, ...data) { const evtArr = ((this.e || (this.e = {}))[name] || []).slice(); for(let i = 0; i < evtArr.length; i += 1)evtArr[i].fn.apply(evtArr[i].ctx, data); return this; } off(name, callback) { const e = this.e || (this.e = {}); const evts = e[name]; const liveEvents = []; if (evts && callback) { for(let i = 0, len = evts.length; i < len; i += 1)if (evts[i].fn !== callback && evts[i].fn._ !== callback) liveEvents.push(evts[i]); } if (liveEvents.length) e[name] = liveEvents; else delete e[name]; return this; } } var $719e22089069758c$exports = {}; var $1617d61110f74a7d$exports = {}; $parcel$export($1617d61110f74a7d$exports, "query", () => $1617d61110f74a7d$export$2fa187e846a241c4); $parcel$export($1617d61110f74a7d$exports, "queryAll", () => $1617d61110f74a7d$export$dcd0d083aa86c355); $parcel$export($1617d61110f74a7d$exports, "addClass", () => $1617d61110f74a7d$export$d2cf6cd1dc7067d3); $parcel$export($1617d61110f74a7d$exports, "removeClass", () => $1617d61110f74a7d$export$c2255604a80b4506); $parcel$export($1617d61110f74a7d$exports, "hasClass", () => $1617d61110f74a7d$export$4ea3d958472af68f); $parcel$export($1617d61110f74a7d$exports, "append", () => $1617d61110f74a7d$export$10d8903dec122b9d); $parcel$export($1617d61110f74a7d$exports, "remove", () => $1617d61110f74a7d$export$cd7f480d6b8286c3); $parcel$export($1617d61110f74a7d$exports, "setStyle", () => $1617d61110f74a7d$export$37a5fde709c1db82); $parcel$export($1617d61110f74a7d$exports, "setStyles", () => $1617d61110f74a7d$export$ac3d318a39e8020a); $parcel$export($1617d61110f74a7d$exports, "getStyle", () => $1617d61110f74a7d$export$3d2f074408bd1b82); $parcel$export($1617d61110f74a7d$exports, "sublings", () => $1617d61110f74a7d$export$cba12de11953f3f1); $parcel$export($1617d61110f74a7d$exports, "inverseClass", () => $1617d61110f74a7d$export$ff1a70dcfa68e743); $parcel$export($1617d61110f74a7d$exports, "tooltip", () => $1617d61110f74a7d$export$4e6f96734dfe12f4); $parcel$export($1617d61110f74a7d$exports, "isInViewport", () => $1617d61110f74a7d$export$157b27307c5a0381); $parcel$export($1617d61110f74a7d$exports, "includeFromEvent", () => $1617d61110f74a7d$export$89ce434956e92c43); $parcel$export($1617d61110f74a7d$exports, "replaceElement", () => $1617d61110f74a7d$export$2dfe578f95754f6a); var $46f6a63658609cc7$exports = {}; $parcel$export($46f6a63658609cc7$exports, "userAgent", () => $46f6a63658609cc7$export$3dcce53a3755dc8c); $parcel$export($46f6a63658609cc7$exports, "isMobile", () => $46f6a63658609cc7$export$d0a8044dce8ff2fc); $parcel$export($46f6a63658609cc7$exports, "isSafari", () => $46f6a63658609cc7$export$95df08bae54cb4df); $parcel$export($46f6a63658609cc7$exports, "isWechat", () => $46f6a63658609cc7$export$c4eaf35627cc1b2); $parcel$export($46f6a63658609cc7$exports, "isIE", () => $46f6a63658609cc7$export$7e7b1a9668aaed8); const $46f6a63658609cc7$export$3dcce53a3755dc8c = typeof window !== 'undefined' ? window.navigator.userAgent : ''; const $46f6a63658609cc7$export$d0a8044dce8ff2fc = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test($46f6a63658609cc7$export$3dcce53a3755dc8c); const $46f6a63658609cc7$export$95df08bae54cb4df = /^((?!chrome|android).)*safari/i.test($46f6a63658609cc7$export$3dcce53a3755dc8c); const $46f6a63658609cc7$export$c4eaf35627cc1b2 = /MicroMessenger/i.test($46f6a63658609cc7$export$3dcce53a3755dc8c); const $46f6a63658609cc7$export$7e7b1a9668aaed8 = /MSIE|Trident/i.test($46f6a63658609cc7$export$3dcce53a3755dc8c); function $1617d61110f74a7d$export$2fa187e846a241c4(selector, parent = document) { return parent.querySelector(selector); } function $1617d61110f74a7d$export$dcd0d083aa86c355(selector, parent = document) { return Array.from(parent.querySelectorAll(selector)); } function $1617d61110f74a7d$export$d2cf6cd1dc7067d3(target, className) { return target.classList.add(className); } function $1617d61110f74a7d$export$c2255604a80b4506(target, className) { return target.classList.remove(className); } function $1617d61110f74a7d$export$4ea3d958472af68f(target, className) { return target.classList.contains(className); } function $1617d61110f74a7d$export$10d8903dec122b9d(parent, child) { if (child instanceof Element) parent.appendChild(child); else parent.insertAdjacentHTML('beforeend', String(child)); return parent.lastElementChild || parent.lastChild; } function $1617d61110f74a7d$export$cd7f480d6b8286c3(child) { return child.parentNode.removeChild(child); } function $1617d61110f74a7d$export$37a5fde709c1db82(element, key, value) { element.style[key] = value; return element; } function $1617d61110f74a7d$export$ac3d318a39e8020a(element, styles) { Object.keys(styles).forEach((key)=>{ $1617d61110f74a7d$export$37a5fde709c1db82(element, key, styles[key]); }); return element; } function $1617d61110f74a7d$export$3d2f074408bd1b82(element, key, numberType = true) { const value = window.getComputedStyle(element, null).getPropertyValue(key); return numberType ? parseFloat(value) : value; } function $1617d61110f74a7d$export$cba12de11953f3f1(target) { return Array.from(target.parentElement.children).filter((item)=>item !== target ); } function $1617d61110f74a7d$export$ff1a70dcfa68e743(target, className) { $1617d61110f74a7d$export$cba12de11953f3f1(target).forEach((item)=>$1617d61110f74a7d$export$c2255604a80b4506(item, className) ); $1617d61110f74a7d$export$d2cf6cd1dc7067d3(target, className); } function $1617d61110f74a7d$export$4e6f96734dfe12f4(target, msg, pos = 'up') { if ($46f6a63658609cc7$export$d0a8044dce8ff2fc) return; target.setAttribute('aria-label', msg); target.setAttribute('data-balloon-pos', pos); } function $1617d61110f74a7d$export$157b27307c5a0381(el, offset = 0) { const rect = el.getBoundingClientRect(); const windowHeight = window.innerHeight || document.documentElement.clientHeight; const windowWidth = window.innerWidth || document.documentElement.clientWidth; const vertInView = rect.top - offset <= windowHeight && rect.top + rect.height + offset >= 0; const horInView = rect.left - offset <= windowWidth + offset && rect.left + rect.width + offset >= 0; return vertInView && horInView; } function $1617d61110f74a7d$export$89ce434956e92c43(event, target) { return event.composedPath && event.composedPath().indexOf(target) > -1; } function $1617d61110f74a7d$export$2dfe578f95754f6a(newChild, oldChild) { oldChild.parentNode.replaceChild(newChild, oldChild); return newChild; } var $9f39e86245920cd9$exports = {}; $parcel$export($9f39e86245920cd9$exports, "ArtPlayerError", () => $9f39e86245920cd9$export$8f14b18212bb1ea5); $parcel$export($9f39e86245920cd9$exports, "errorHandle", () => $9f39e86245920cd9$export$ff496a5a51be1527); class $9f39e86245920cd9$export$8f14b18212bb1ea5 extends Error { constructor(message, context){ super(message); if (typeof Error.captureStackTrace === 'function') Error.captureStackTrace(this, context || this.constructor); this.name = 'ArtPlayerError'; } } function $9f39e86245920cd9$export$ff496a5a51be1527(condition, msg) { if (!condition) throw new $9f39e86245920cd9$export$8f14b18212bb1ea5(msg); return condition; } var $3bd617987c2ca385$exports = {}; $parcel$export($3bd617987c2ca385$exports, "srtToVtt", () => $3bd617987c2ca385$export$5ae19f500bb84e8b); $parcel$export($3bd617987c2ca385$exports, "vttToBlob", () => $3bd617987c2ca385$export$108f84c95df61951); $parcel$export($3bd617987c2ca385$exports, "assToVtt", () => $3bd617987c2ca385$export$aaf95c443eb8118a); function $3bd617987c2ca385$export$5ae19f500bb84e8b(srtText) { return 'WEBVTT \r\n\r\n'.concat(srtText.replace(/{[\s\S]*?}/g, '').replace(/\{\\([ibu])\}/g, '$1>').replace(/\{\\([ibu])1\}/g, '<$1>').replace(/\{([ibu])\}/g, '<$1>').replace(/\{\/([ibu])\}/g, '$1>').replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, '$1.$2').concat('\r\n\r\n')); } function $3bd617987c2ca385$export$108f84c95df61951(vttText) { return URL.createObjectURL(new Blob([ vttText ], { type: 'text/vtt' })); } function $3bd617987c2ca385$export$aaf95c443eb8118a(ass) { const reAss = new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$", 'i'); function fixTime(time = '') { return time.split(/[:.]/).map((item, index, arr)=>{ if (index === arr.length - 1) { if (item.length === 1) return `.${item}00`; if (item.length === 2) return `.${item}0`; } else if (item.length === 1) return (index === 0 ? '0' : ':0') + item; // eslint-disable-next-line no-nested-ternary return index === 0 ? item : index === arr.length - 1 ? `.${item}` : `:${item}`; }).join(''); } return `WEBVTT\n\n${ass.split(/\r?\n/).map((line)=>{ const m = line.match(reAss); if (!m) return null; return { start: fixTime(m[1].trim()), end: fixTime(m[2].trim()), text: m[5].replace(/{[\s\S]*?}/g, '').replace(/(\\N)/g, '\n').trim().split(/\r?\n/).map((item)=>item.trim() ).join('\n') }; }).filter((line)=>line ).map((line, index)=>{ if (line) return `${index + 1}\n${line.start} --> ${line.end}\n${line.text}`; return ''; }).filter((line)=>line.trim() ).join('\n\n')}`; } var $112d5cbf48554e5f$exports = {}; $parcel$export($112d5cbf48554e5f$exports, "getExt", () => $112d5cbf48554e5f$export$ba319cdd039ba52e); $parcel$export($112d5cbf48554e5f$exports, "download", () => $112d5cbf48554e5f$export$24422be91ad4011f); function $112d5cbf48554e5f$export$ba319cdd039ba52e(url) { if (url.includes('?')) return $112d5cbf48554e5f$export$ba319cdd039ba52e(url.split('?')[0]); if (url.includes('#')) return $112d5cbf48554e5f$export$ba319cdd039ba52e(url.split('#')[0]); return url.trim().toLowerCase().split('.').pop(); } function $112d5cbf48554e5f$export$24422be91ad4011f(url, name) { const elink = document.createElement('a'); elink.style.display = 'none'; elink.href = url; elink.download = name; document.body.appendChild(elink); elink.click(); document.body.removeChild(elink); } var $6b21bd176607d26d$exports = {}; $parcel$export($6b21bd176607d26d$exports, "def", () => $6b21bd176607d26d$export$8afb76124cf08683); $parcel$export($6b21bd176607d26d$exports, "has", () => $6b21bd176607d26d$export$a4f4bb6b1453fff5); $parcel$export($6b21bd176607d26d$exports, "get", () => $6b21bd176607d26d$export$3988ae62b71be9a3); $parcel$export($6b21bd176607d26d$exports, "mergeDeep", () => $6b21bd176607d26d$export$dd702b3c8240390c); const $6b21bd176607d26d$export$8afb76124cf08683 = Object.defineProperty; const { hasOwnProperty: $6b21bd176607d26d$var$hasOwnProperty } = Object.prototype; function $6b21bd176607d26d$export$a4f4bb6b1453fff5(obj, name) { return $6b21bd176607d26d$var$hasOwnProperty.call(obj, name); } function $6b21bd176607d26d$export$3988ae62b71be9a3(obj, name) { return Object.getOwnPropertyDescriptor(obj, name); } function $6b21bd176607d26d$export$dd702b3c8240390c(...objects) { const isObject = (item)=>item && typeof item === 'object' && !Array.isArray(item) ; return objects.reduce((prev, obj)=>{ Object.keys(obj).forEach((key)=>{ const pVal = prev[key]; const oVal = obj[key]; if (Array.isArray(pVal) && Array.isArray(oVal)) prev[key] = pVal.concat(...oVal); else if (isObject(pVal) && isObject(oVal) && !(oVal instanceof Element)) prev[key] = $6b21bd176607d26d$export$dd702b3c8240390c(pVal, oVal); else prev[key] = oVal; }); return prev; }, {}); } var $c4508bb07fd554bb$exports = {}; $parcel$export($c4508bb07fd554bb$exports, "sleep", () => $c4508bb07fd554bb$export$e772c8ff12451969); $parcel$export($c4508bb07fd554bb$exports, "debounce", () => $c4508bb07fd554bb$export$61fc7d43ac8f84b0); $parcel$export($c4508bb07fd554bb$exports, "throttle", () => $c4508bb07fd554bb$export$de363e709c412c8a); function $c4508bb07fd554bb$export$e772c8ff12451969(ms = 0) { return new Promise((resolve)=>setTimeout(resolve, ms) ); } function $c4508bb07fd554bb$export$61fc7d43ac8f84b0(func, wait, context) { let timeout; function fn(...args) { const later = function later() { timeout = null; func.apply(context, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } fn.clearTimeout = function ct() { clearTimeout(timeout); }; return fn; } function $c4508bb07fd554bb$export$de363e709c412c8a(callback, delay) { let isThrottled = false; let args; let context; function fn(...args2) { if (isThrottled) { args = args2; context = this; return; } isThrottled = true; callback.apply(this, args2); setTimeout(()=>{ isThrottled = false; if (args) { fn.apply(context, args); args = null; context = null; } }, delay); } return fn; } var $f82eff12ae1758cb$exports = {}; $parcel$export($f82eff12ae1758cb$exports, "clamp", () => $f82eff12ae1758cb$export$7d15b64cf5a3a4c4); $parcel$export($f82eff12ae1758cb$exports, "secondToTime", () => $f82eff12ae1758cb$export$bfdd1c721864a50a); $parcel$export($f82eff12ae1758cb$exports, "escape", () => $f82eff12ae1758cb$export$4e7f196112fea3c5); function $f82eff12ae1758cb$export$7d15b64cf5a3a4c4(num, a, b) { return Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b)); } function $f82eff12ae1758cb$export$bfdd1c721864a50a(second) { const add0 = (num)=>num < 10 ? `0${num}` : String(num) ; const hour = Math.floor(second / 3600); const min = Math.floor((second - hour * 3600) / 60); const sec = Math.floor(second - hour * 3600 - min * 60); return (hour > 0 ? [ hour, min, sec ] : [ min, sec ]).map(add0).join(':'); } function $f82eff12ae1758cb$export$4e7f196112fea3c5(str) { return str.replace(/[&<>'"]/g, (tag)=>({ '&': '&', '<': '<', '>': '>', "'": ''', '"': '"' })[tag] || tag ); } $parcel$exportWildcard($719e22089069758c$exports, $1617d61110f74a7d$exports); $parcel$exportWildcard($719e22089069758c$exports, $9f39e86245920cd9$exports); $parcel$exportWildcard($719e22089069758c$exports, $3bd617987c2ca385$exports); $parcel$exportWildcard($719e22089069758c$exports, $112d5cbf48554e5f$exports); $parcel$exportWildcard($719e22089069758c$exports, $6b21bd176607d26d$exports); $parcel$exportWildcard($719e22089069758c$exports, $c4508bb07fd554bb$exports); $parcel$exportWildcard($719e22089069758c$exports, $f82eff12ae1758cb$exports); $parcel$exportWildcard($719e22089069758c$exports, $46f6a63658609cc7$exports); const $10469c873ed71d57$var$a = 'array'; const $10469c873ed71d57$var$b = 'boolean'; const $10469c873ed71d57$var$s = 'string'; const $10469c873ed71d57$var$n = 'number'; const $10469c873ed71d57$var$o = 'object'; const $10469c873ed71d57$var$f = 'function'; const $10469c873ed71d57$var$r = 'regexp'; function $10469c873ed71d57$var$validElement(value, type, paths) { return $9f39e86245920cd9$export$ff496a5a51be1527(type === $10469c873ed71d57$var$s || value instanceof Element, `${paths.join('.')} require '${$10469c873ed71d57$var$s}' or 'Element' type`); } const $10469c873ed71d57$export$fa4c546e01a0c57c = { html: $10469c873ed71d57$var$validElement, disable: `?${$10469c873ed71d57$var$b}`, name: `?${$10469c873ed71d57$var$s}`, index: `?${$10469c873ed71d57$var$n}`, style: `?${$10469c873ed71d57$var$o}`, click: `?${$10469c873ed71d57$var$f}`, mounted: `?${$10469c873ed71d57$var$f}`, tooltip: `?${$10469c873ed71d57$var$s}`, width: `?${$10469c873ed71d57$var$n}`, selector: `?${$10469c873ed71d57$var$a}`, onSelect: `?${$10469c873ed71d57$var$f}` }; var $10469c873ed71d57$export$2e2bcd8739ae039 = { container: $10469c873ed71d57$var$validElement, url: $10469c873ed71d57$var$s, poster: $10469c873ed71d57$var$s, title: $10469c873ed71d57$var$s, type: $10469c873ed71d57$var$s, theme: $10469c873ed71d57$var$s, lang: $10469c873ed71d57$var$s, volume: $10469c873ed71d57$var$n, isLive: $10469c873ed71d57$var$b, muted: $10469c873ed71d57$var$b, autoplay: $10469c873ed71d57$var$b, autoSize: $10469c873ed71d57$var$b, autoMini: $10469c873ed71d57$var$b, loop: $10469c873ed71d57$var$b, flip: $10469c873ed71d57$var$b, playbackRate: $10469c873ed71d57$var$b, aspectRatio: $10469c873ed71d57$var$b, screenshot: $10469c873ed71d57$var$b, setting: $10469c873ed71d57$var$b, hotkey: $10469c873ed71d57$var$b, pip: $10469c873ed71d57$var$b, mutex: $10469c873ed71d57$var$b, backdrop: $10469c873ed71d57$var$b, fullscreen: $10469c873ed71d57$var$b, fullscreenWeb: $10469c873ed71d57$var$b, subtitleOffset: $10469c873ed71d57$var$b, miniProgressBar: $10469c873ed71d57$var$b, useSSR: $10469c873ed71d57$var$b, playsInline: $10469c873ed71d57$var$b, lock: $10469c873ed71d57$var$b, fastForward: $10469c873ed71d57$var$b, autoPlayback: $10469c873ed71d57$var$b, autoOrientation: $10469c873ed71d57$var$b, ads: [ { url: $10469c873ed71d57$var$s }, ], plugins: [ $10469c873ed71d57$var$f ], whitelist: [ `${$10469c873ed71d57$var$s}|${$10469c873ed71d57$var$f}|${$10469c873ed71d57$var$r}` ], layers: [ $10469c873ed71d57$export$fa4c546e01a0c57c ], contextmenu: [ $10469c873ed71d57$export$fa4c546e01a0c57c ], settings: [ $10469c873ed71d57$export$fa4c546e01a0c57c ], controls: [ { ...$10469c873ed71d57$export$fa4c546e01a0c57c, position: (value, _, paths)=>{ const position = [ 'top', 'left', 'right' ]; return $9f39e86245920cd9$export$ff496a5a51be1527(position.includes(value), `${paths.join('.')} only accept ${position.toString()} as parameters`); } }, ], quality: [ { default: `?${$10469c873ed71d57$var$b}`, html: $10469c873ed71d57$var$s, url: $10469c873ed71d57$var$s }, ], highlight: [ { time: $10469c873ed71d57$var$n, text: $10469c873ed71d57$var$s }, ], thumbnails: { url: $10469c873ed71d57$var$s, number: $10469c873ed71d57$var$n, column: $10469c873ed71d57$var$n }, subtitle: { url: $10469c873ed71d57$var$s, type: $10469c873ed71d57$var$s, style: $10469c873ed71d57$var$o, encoding: $10469c873ed71d57$var$s }, moreVideoAttr: $10469c873ed71d57$var$o, icons: $10469c873ed71d57$var$o, customType: $10469c873ed71d57$var$o }; var $6bdef3f9911d4dfd$export$2e2bcd8739ae039 = { propertys: [ 'audioTracks', 'autoplay', 'buffered', 'controller', 'controls', 'crossOrigin', 'currentSrc', 'currentTime', 'defaultMuted', 'defaultPlaybackRate', 'duration', 'ended', 'error', 'loop', 'mediaGroup', 'muted', 'networkState', 'paused', 'playbackRate', 'played', 'preload', 'readyState', 'seekable', 'seeking', 'src', 'startDate', 'textTracks', 'videoTracks', 'volume', ], methods: [ 'addTextTrack', 'canPlayType', 'load', 'play', 'pause' ], events: [ 'abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting', ], prototypes: [ "width", "height", "videoWidth", "videoHeight", "poster", "webkitDecodedFrameCount", "webkitDroppedFrameCount", "playsInline", "webkitSupportsFullscreen", "webkitDisplayingFullscreen", "onenterpictureinpicture", "onleavepictureinpicture", "disablePictureInPicture", "cancelVideoFrameCallback", "requestVideoFrameCallback", "getVideoPlaybackQuality", "requestPictureInPicture", "webkitEnterFullScreen", "webkitEnterFullscreen", "webkitExitFullScreen", "webkitExitFullscreen", ] }; class $63bba146437a34c3$export$2e2bcd8739ae039 { constructor(art){ this.art = art; } get state() { const { option: option , constructor: { kindOf: kindOf } , } = this.art; return !$46f6a63658609cc7$export$d0a8044dce8ff2fc || option.whitelist.some((item)=>{ switch(kindOf(item)){ case 'string': return item === '*' || $46f6a63658609cc7$export$3dcce53a3755dc8c.indexOf(item) > -1; case 'function': return item($46f6a63658609cc7$export$3dcce53a3755dc8c); case 'regexp': return item.test($46f6a63658609cc7$export$3dcce53a3755dc8c); default: return false; } }); } } class $420c1882d92b952b$export$2e2bcd8739ae039 { constructor(art){ this.art = art; const { option: option , constructor: constructor , whitelist: whitelist } = art; if (option.container instanceof Element) this.$container = option.container; else { this.$container = $1617d61110f74a7d$export$2fa187e846a241c4(option.container); $9f39e86245920cd9$export$ff496a5a51be1527(this.$container, `No container element found by ${option.container}`); } const type = this.$container.tagName.toLowerCase(); $9f39e86245920cd9$export$ff496a5a51be1527(type === 'div', `Unsupported container element type, only support 'div' but got '${type}'`); $9f39e86245920cd9$export$ff496a5a51be1527(constructor.instances.every((ins)=>ins.template.$container !== this.$container ), 'Cannot mount multiple instances on the same dom element'); this.query = this.query.bind(this); this.$container.dataset.artId = art.id; this.$original = this.$container.cloneNode(true); if (whitelist.state) this.desktop(); else this.mobile(); } static get html() { return `
${$f82eff12ae1758cb$export$4e7f196112fea3c5(item)}
` ).join(''); this.art.emit('subtitleUpdate', this.activeCue.text); } } switch(url, newOption = {}) { const { i18n: i18n , notice: notice , option: option } = this.art; const subtitleOption = { ...option.subtitle, ...newOption, url: url }; return this.init(subtitleOption).then((subUrl)=>{ if (newOption.name) notice.show = `${i18n.get('Switch Subtitle')}: ${newOption.name}`; return subUrl; }); } init(subtitleOption) { ($parcel$interopDefault($cTKjd$optionvalidator))(subtitleOption, $10469c873ed71d57$export$2e2bcd8739ae039.subtitle); if (!subtitleOption.url) return; const { notice: notice , events: { proxy: proxy } , template: { $subtitle: $subtitle , $video: $video , $track: $track } , } = this.art; if (!$track) { const $track = document.createElement('track'); $track.default = true; $track.kind = 'metadata'; $video.appendChild($track); this.art.template.$track = $track; proxy(this.textTrack, 'cuechange', this.update.bind(this)); } this.style(subtitleOption.style); $9f39e86245920cd9$export$ff496a5a51be1527(window.fetch, 'fetch not support'); return fetch(subtitleOption.url).then((response)=>response.arrayBuffer() ).then((buffer)=>{ $9f39e86245920cd9$export$ff496a5a51be1527(window.TextDecoder, 'TextDecoder not support'); const decoder = new TextDecoder(subtitleOption.encoding); const text = decoder.decode(buffer); this.art.emit('subtitleLoad', subtitleOption.url); switch(subtitleOption.type || $112d5cbf48554e5f$export$ba319cdd039ba52e(subtitleOption.url)){ case 'srt': return $3bd617987c2ca385$export$108f84c95df61951($3bd617987c2ca385$export$5ae19f500bb84e8b(text)); case 'ass': return $3bd617987c2ca385$export$108f84c95df61951($3bd617987c2ca385$export$aaf95c443eb8118a(text)); case 'vtt': return $3bd617987c2ca385$export$108f84c95df61951(text); default: return subtitleOption.url; } }).then((subUrl)=>{ $subtitle.innerHTML = ''; if (this.url === subUrl) return subUrl; URL.revokeObjectURL(this.url); this.art.template.$track.src = subUrl; this.art.emit('subtitleSwitch', subUrl); return subUrl; }).catch((err)=>{ notice.show = err; throw err; }); } } function $73a3e403a4b80fbc$export$2e2bcd8739ae039(art, events) { const { constructor: constructor , template: { $player: $player , $video: $video } , } = art; events.proxy(document, [ 'click', 'contextmenu' ], (event)=>{ if ($1617d61110f74a7d$export$89ce434956e92c43(event, $player)) { art.isFocus = true; art.emit('focus'); } else { art.isFocus = false; art.emit('blur'); } }); let clickTime = 0; events.proxy($video, 'click', ()=>{ const now = Date.now(); if (now - clickTime <= constructor.DB_CLICE_TIME) { art.emit('dblclick'); if ($46f6a63658609cc7$export$d0a8044dce8ff2fc) art.toggle(); else art.fullscreen = !art.fullscreen; } else { art.emit('click'); if (!$46f6a63658609cc7$export$d0a8044dce8ff2fc) art.toggle(); } clickTime = now; }); } function $eccc38f47ad4e496$export$2e2bcd8739ae039(art, events) { const { $player: $player } = art.template; events.hover($player, ()=>{ $1617d61110f74a7d$export$d2cf6cd1dc7067d3($player, 'art-hover'); art.emit('hover', true); }, ()=>{ $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-hover'); art.emit('hover'); }); } function $af27990c30407626$export$2e2bcd8739ae039(art, events) { const { $player: $player } = art.template; events.proxy($player, 'mousemove', (event)=>{ art.emit('mousemove', event); }); } function $4875c55156125b7f$export$2e2bcd8739ae039(art, events) { const { notice: notice , option: option } = art; const resizeFn = $c4508bb07fd554bb$export$de363e709c412c8a(()=>{ if (art.normalSize) art.autoSize = option.autoSize; art.aspectRatioReset = true; notice.show = ''; art.emit('resize'); }, art.constructor.RESIZE_TIME); events.proxy(window, [ 'orientationchange', 'resize' ], ()=>{ resizeFn(); }); if (screen && screen.orientation && screen.orientation.onchange) events.proxy(screen.orientation, 'change', ()=>{ resizeFn(); }); } function $aceb871fa680c246$export$2e2bcd8739ae039(art, events) { if ($46f6a63658609cc7$export$d0a8044dce8ff2fc && !art.option.isLive) { const { notice: notice , plugins: plugins , template: { $video: $video , $bottom: $bottom , $controls: $controls } , } = art; let isDroging = false; let startX = 0; let startY = 0; let startTime = 0; const onTouchStart = (event)=>{ if (event.touches.length === 1) { isDroging = true; const { clientX: clientX , clientY: clientY } = event.touches[0]; startX = clientX; startY = clientY; startTime = art.currentTime; } }; const onTouchMove = (event)=>{ if (event.touches.length === 1 && isDroging && art.duration) { const autoOrientation = plugins.autoOrientation && plugins.autoOrientation.state; const { clientX: clientX , clientY: clientY } = event.touches[0]; const ratioX = $f82eff12ae1758cb$export$7d15b64cf5a3a4c4((clientX - startX) / art.width, -1, 1); const ratioY = $f82eff12ae1758cb$export$7d15b64cf5a3a4c4((clientY - startY) / art.height, -1, 1); const ratio = autoOrientation ? ratioY : ratioX; const currentTime = $f82eff12ae1758cb$export$7d15b64cf5a3a4c4(startTime + art.duration * ratio / 2, 0, art.duration); art.seek = currentTime; art.emit('setBar', 'played', $f82eff12ae1758cb$export$7d15b64cf5a3a4c4(currentTime / art.duration, 0, 1)); notice.show = `${$f82eff12ae1758cb$export$bfdd1c721864a50a(currentTime)} / ${$f82eff12ae1758cb$export$bfdd1c721864a50a(art.duration)}`; } }; const onTouchEnd = ()=>{ if (isDroging) { startX = 0; startY = 0; startTime = 0; isDroging = false; } }; events.proxy($bottom, 'touchstart', (event)=>{ if (!$1617d61110f74a7d$export$89ce434956e92c43(event, $controls)) onTouchStart(event); }); events.proxy($bottom, 'touchmove', onTouchMove); events.proxy($video, 'touchstart', onTouchStart); events.proxy($video, 'touchmove', onTouchMove); events.proxy(document, 'touchend', onTouchEnd); } } function $f71d899ac667f7fb$export$2e2bcd8739ae039(art, events) { const { option: option , constructor: constructor , template: { $container: $container } , } = art; const scrollFn = $c4508bb07fd554bb$export$de363e709c412c8a(()=>{ art.emit('view', $1617d61110f74a7d$export$157b27307c5a0381($container, constructor.SCROLL_GAP)); }, constructor.SCROLL_TIME); events.proxy(window, 'scroll', ()=>{ scrollFn(); }); art.on('view', (state)=>{ if (option.autoMini) art.mini = !state; }); } class $9dd1746ab026757b$export$2e2bcd8739ae039 { constructor(art){ this.destroyEvents = []; this.proxy = this.proxy.bind(this); this.hover = this.hover.bind(this); this.loadImg = this.loadImg.bind(this); if (art.whitelist.state) art.once('video:loadedmetadata', ()=>{ $73a3e403a4b80fbc$export$2e2bcd8739ae039(art, this); $eccc38f47ad4e496$export$2e2bcd8739ae039(art, this); $af27990c30407626$export$2e2bcd8739ae039(art, this); $4875c55156125b7f$export$2e2bcd8739ae039(art, this); $aceb871fa680c246$export$2e2bcd8739ae039(art, this); $f71d899ac667f7fb$export$2e2bcd8739ae039(art, this); }); } proxy(target, name, callback, option = {}) { if (Array.isArray(name)) return name.map((item)=>this.proxy(target, item, callback, option) ); target.addEventListener(name, callback, option); const destroy = ()=>target.removeEventListener(name, callback, option) ; this.destroyEvents.push(destroy); return destroy; } hover(target, mouseenter, mouseleave) { if (mouseenter) this.proxy(target, 'mouseenter', mouseenter); if (mouseleave) this.proxy(target, 'mouseleave', mouseleave); } loadImg(img) { return new Promise((resolve, reject)=>{ let image; if (img instanceof HTMLImageElement) image = img; else if (typeof img === 'string') { image = new Image(); image.src = img; } else return reject(new $9f39e86245920cd9$export$8f14b18212bb1ea5('Unable to get Image')); if (image.complete) return resolve(image); this.proxy(image, 'load', ()=>resolve(image) ); this.proxy(image, 'error', ()=>reject(new $9f39e86245920cd9$export$8f14b18212bb1ea5(`Failed to load Image: ${image.src}`)) ); }); } destroy() { for(let index = 0; index < this.destroyEvents.length; index++)this.destroyEvents[index](); } } class $3e1980c05dfeee5d$export$2e2bcd8739ae039 { constructor(art){ this.art = art; this.keys = {}; art.once('video:loadedmetadata', ()=>{ if (art.option.hotkey && !$46f6a63658609cc7$export$d0a8044dce8ff2fc) this.init(); }); } init() { const { proxy: proxy } = this.art.events; this.add(27, ()=>{ if (this.art.fullscreenWeb) this.art.fullscreenWeb = false; }); this.add(32, ()=>{ this.art.toggle(); }); this.add(37, ()=>{ this.art.backward = 5; }); this.add(38, ()=>{ this.art.volume += 0.1; }); this.add(39, ()=>{ this.art.forward = 5; }); this.add(40, ()=>{ this.art.volume -= 0.1; }); proxy(window, 'keydown', (event)=>{ if (this.art.isFocus) { const tag = document.activeElement.tagName.toUpperCase(); const editable = document.activeElement.getAttribute('contenteditable'); if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') { const events = this.keys[event.keyCode]; if (events) { event.preventDefault(); for(let index = 0; index < events.length; index++)events[index].call(this.art, event); this.art.emit('hotkey', event); } } } }); } add(key, event) { if (this.keys[key]) this.keys[key].push(event); else this.keys[key] = [ event ]; return this; } remove(key, event) { if (this.keys[key]) { const index = this.keys[key].indexOf(event); if (index !== -1) this.keys[key].splice(index, 1); } return this; } } class $87ad6b3f378139e4$export$2e2bcd8739ae039 extends $9c5a9d082f4955c3$export$2e2bcd8739ae039 { constructor(art){ super(art); const { option: option , template: { $layer: $layer } , } = art; this.name = 'layer'; this.$parent = $layer; art.once('video:loadedmetadata', ()=>{ for(let index = 0; index < option.layers.length; index++)this.add(option.layers[index]); }); } } class $e3e38774bcec1905$export$2e2bcd8739ae039 extends $9c5a9d082f4955c3$export$2e2bcd8739ae039 { constructor(art){ super(art); this.name = 'loading'; $1617d61110f74a7d$export$10d8903dec122b9d(art.template.$loading, art.icons.loading); } } class $6281e0d09498f459$export$2e2bcd8739ae039 { constructor(art){ this.art = art; this.timer = null; } set show(msg) { const { $player: $player , $noticeInner: $noticeInner } = this.art.template; if (!msg) return $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-notice-show'); $noticeInner.innerText = msg instanceof Error ? msg.message.trim() : msg; $1617d61110f74a7d$export$d2cf6cd1dc7067d3($player, 'art-notice-show'); clearTimeout(this.timer); this.timer = setTimeout(()=>{ $noticeInner.innerText = ''; $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-notice-show'); }, this.art.constructor.NOTICE_TIME); } } class $846b6021e30a62e3$export$2e2bcd8739ae039 extends $9c5a9d082f4955c3$export$2e2bcd8739ae039 { constructor(art){ super(art); this.name = 'mask'; const { template: template , icons: icons , events: events } = art; $1617d61110f74a7d$export$10d8903dec122b9d(template.$state, icons.state); events.proxy(template.$state, 'click', ()=>art.play() ); } } var $ea73f885035fc70c$exports = {}; $ea73f885035fc70c$exports = ""; var $a318808550c32ac6$exports = {}; $a318808550c32ac6$exports = ""; var $f4a5ad62ee3af34e$exports = {}; $f4a5ad62ee3af34e$exports = ""; var $93fafa15944f6274$exports = {}; $93fafa15944f6274$exports = ""; var $1bfbe8e3a51fd237$exports = {}; $1bfbe8e3a51fd237$exports = ""; var $3565d9857c49b4ba$exports = {}; $3565d9857c49b4ba$exports = ""; var $34048e42a1cebf0c$exports = {}; $34048e42a1cebf0c$exports = ""; var $e1361ff4dcafdf4b$exports = {}; $e1361ff4dcafdf4b$exports = ""; var $e0523ecc964a3d0f$exports = {}; $e0523ecc964a3d0f$exports = "\n"; var $659436e8c6d8debf$exports = {}; $659436e8c6d8debf$exports = ""; var $667a538d9bdd13c5$exports = {}; $667a538d9bdd13c5$exports = ""; var $238fab3092857e42$exports = {}; $238fab3092857e42$exports = ""; var $be072e4880963a9b$exports = {}; $be072e4880963a9b$exports = ""; var $cfca05de282e5208$exports = {}; $cfca05de282e5208$exports = ""; var $ea77b339b12614aa$exports = {}; $ea77b339b12614aa$exports = ""; var $c6a8a0c1103b1f88$exports = {}; $c6a8a0c1103b1f88$exports = ""; var $1dad62262a809e52$exports = {}; $1dad62262a809e52$exports = ""; var $e0de5fe9f40e0c64$exports = {}; $e0de5fe9f40e0c64$exports = ""; var $baad8354f50de513$exports = {}; $baad8354f50de513$exports = "\n\n"; var $a6b31ea821176f04$exports = {}; $a6b31ea821176f04$exports = "\n\n"; class $82c4f6420e2bb729$export$2e2bcd8739ae039 { constructor(art){ const icons = { loading: (/*@__PURE__*/$parcel$interopDefault($ea73f885035fc70c$exports)), state: (/*@__PURE__*/$parcel$interopDefault($a318808550c32ac6$exports)), play: (/*@__PURE__*/$parcel$interopDefault($93fafa15944f6274$exports)), pause: (/*@__PURE__*/$parcel$interopDefault($1bfbe8e3a51fd237$exports)), check: (/*@__PURE__*/$parcel$interopDefault($f4a5ad62ee3af34e$exports)), volume: (/*@__PURE__*/$parcel$interopDefault($3565d9857c49b4ba$exports)), volumeClose: (/*@__PURE__*/$parcel$interopDefault($34048e42a1cebf0c$exports)), subtitle: (/*@__PURE__*/$parcel$interopDefault($e1361ff4dcafdf4b$exports)), screenshot: (/*@__PURE__*/$parcel$interopDefault($e0523ecc964a3d0f$exports)), setting: (/*@__PURE__*/$parcel$interopDefault($659436e8c6d8debf$exports)), fullscreen: (/*@__PURE__*/$parcel$interopDefault($667a538d9bdd13c5$exports)), fullscreenWeb: (/*@__PURE__*/$parcel$interopDefault($238fab3092857e42$exports)), pip: (/*@__PURE__*/$parcel$interopDefault($e0de5fe9f40e0c64$exports)), arrowLeft: (/*@__PURE__*/$parcel$interopDefault($be072e4880963a9b$exports)), arrowRight: (/*@__PURE__*/$parcel$interopDefault($cfca05de282e5208$exports)), playbackRate: (/*@__PURE__*/$parcel$interopDefault($ea77b339b12614aa$exports)), aspectRatio: (/*@__PURE__*/$parcel$interopDefault($c6a8a0c1103b1f88$exports)), config: (/*@__PURE__*/$parcel$interopDefault($1dad62262a809e52$exports)), lock: (/*@__PURE__*/$parcel$interopDefault($baad8354f50de513$exports)), unlock: (/*@__PURE__*/$parcel$interopDefault($a6b31ea821176f04$exports)), ...art.option.icons }; Object.keys(icons).forEach((key)=>{ $6b21bd176607d26d$export$8afb76124cf08683(this, key, { get: ()=>{ const icon = document.createElement('i'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3(icon, 'art-icon'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3(icon, `art-icon-${key}`); $1617d61110f74a7d$export$10d8903dec122b9d(icon, icons[key]); return icon; } }); }); } } function $07522957bcac9a25$export$2e2bcd8739ae039(art) { const { i18n: i18n , icons: icons , constructor: constructor } = art; const keys = { normal: 'Normal', horizontal: 'Horizontal', vertical: 'Vertical' }; function update($panel, $tooltip, value) { if ($tooltip) $tooltip.innerText = i18n.get(keys[value]); const $current = $1617d61110f74a7d$export$dcd0d083aa86c355('.art-setting-item', $panel).find((item)=>item.dataset.value === value ); if ($current) $1617d61110f74a7d$export$ff1a70dcfa68e743($current, 'art-current'); } return { width: constructor.SETTING_ITEM_WIDTH, html: i18n.get('Video Flip'), tooltip: i18n.get(keys[art.flip]), icon: icons.config, selector: Object.keys(keys).map((item)=>{ return { value: item, default: item === art.flip, html: i18n.get(keys[item]) }; }), onSelect (item) { art.flip = item.value; }, mounted: ($panel, item)=>{ update($panel, item._$tooltip, art.flip); art.on('flip', ()=>{ update($panel, item._$tooltip, art.flip); }); } }; } function $85bc3f596413f7b9$export$2e2bcd8739ae039(art) { const { i18n: i18n , icons: icons , constructor: constructor } = art; function getI18n(value) { return value === 'default' ? i18n.get('Default') : value; } function update($panel, $tooltip, value) { if ($tooltip) $tooltip.innerText = getI18n(value); const $current = $1617d61110f74a7d$export$dcd0d083aa86c355('.art-setting-item', $panel).find((item)=>item.dataset.value === value ); if ($current) $1617d61110f74a7d$export$ff1a70dcfa68e743($current, 'art-current'); } return { width: constructor.SETTING_ITEM_WIDTH, html: i18n.get('Aspect Ratio'), icon: icons.aspectRatio, tooltip: getI18n(art.aspectRatio), selector: [ 'default', '4:3', '16:9' ].map((item)=>{ return { value: item, default: item === art.aspectRatio, html: getI18n(item) }; }), onSelect (item) { art.aspectRatio = item.value; }, mounted: ($panel, item)=>{ update($panel, item._$tooltip, art.aspectRatio); art.on('aspectRatio', ()=>{ update($panel, item._$tooltip, art.aspectRatio); }); } }; } function $ccc4e5bb833602ad$export$2e2bcd8739ae039(art) { const { i18n: i18n , icons: icons , constructor: constructor } = art; function getI18n(value) { return value === 1.0 ? i18n.get('Normal') : value; } function update($panel, $tooltip, value) { if ($tooltip) $tooltip.innerText = getI18n(value); const $current = $1617d61110f74a7d$export$dcd0d083aa86c355('.art-setting-item', $panel).find((item)=>Number(item.dataset.value) === value ); if ($current) $1617d61110f74a7d$export$ff1a70dcfa68e743($current, 'art-current'); } return { width: constructor.SETTING_ITEM_WIDTH, html: i18n.get('Play Speed'), tooltip: getI18n(art.playbackRate), icon: icons.playbackRate, selector: [ 0.5, 0.75, 1.0, 1.25, 1.5, 2.0 ].map((item)=>{ return { value: item, default: item === art.playbackRate, html: getI18n(item) }; }), onSelect (item) { art.playbackRate = item.value; }, mounted: ($panel, item)=>{ update($panel, item._$tooltip, art.playbackRate); art.on('playbackRate', ()=>{ update($panel, item._$tooltip, art.playbackRate); }); } }; } function $5847b96169acf576$export$2e2bcd8739ae039(art) { const { i18n: i18n , icons: icons , constructor: constructor } = art; function getI18n(value) { return value === 0 ? i18n.get('Normal') : value; } function update($panel, $tooltip, value) { if ($tooltip) $tooltip.innerText = getI18n(value); const $current = $1617d61110f74a7d$export$dcd0d083aa86c355('.art-setting-item', $panel).find((item)=>Number(item.dataset.value) === value ); if ($current) $1617d61110f74a7d$export$ff1a70dcfa68e743($current, 'art-current'); } return { width: constructor.SETTING_ITEM_WIDTH, html: i18n.get('Subtitle Offset'), tooltip: getI18n(art.subtitleOffset), icon: icons.subtitle, selector: [ -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 ].map((item)=>{ return { value: item, default: item === art.subtitleOffset, html: getI18n(item) }; }), onSelect (item) { art.subtitleOffset = item.value; }, mounted: ($panel, item)=>{ update($panel, item._$tooltip, art.subtitleOffset); art.on('subtitleOffset', ()=>{ update($panel, item._$tooltip, art.subtitleOffset); }); } }; } function $e5ec7c417fcf0d47$var$makeRecursion(option, parentItem, parentList) { for(let index = 0; index < option.length; index++){ const item = option[index]; item._parentItem = parentItem; item._parentList = parentList; if (item.selector) $e5ec7c417fcf0d47$var$makeRecursion(item.selector, item, option); } return option; } class $e5ec7c417fcf0d47$export$2e2bcd8739ae039 extends $9c5a9d082f4955c3$export$2e2bcd8739ae039 { constructor(art){ super(art); const { option: option , events: { proxy: proxy } , template: { $setting: $setting , $player: $player } , } = art; this.art = art; this.name = 'setting'; this.$parent = $setting; this.option = []; this.events = []; this.cache = new Map(); if (option.setting) { art.once('video:loadedmetadata', ()=>{ if (option.playbackRate) this.option.push($ccc4e5bb833602ad$export$2e2bcd8739ae039(art)); if (option.aspectRatio) this.option.push($85bc3f596413f7b9$export$2e2bcd8739ae039(art)); if (option.flip) this.option.push($07522957bcac9a25$export$2e2bcd8739ae039(art)); if (option.subtitleOffset) this.option.push($5847b96169acf576$export$2e2bcd8739ae039(art)); for(let index = 0; index < option.settings.length; index++)this.option.push(option.settings[index]); this.option = $e5ec7c417fcf0d47$var$makeRecursion(this.option); this.init(this.option); }); art.on('blur', ()=>{ if (this.show) { this.show = false; this.init(this.option); } }); proxy($player, 'click', (event)=>{ if (this.show && !$1617d61110f74a7d$export$89ce434956e92c43(event, art.controls.setting) && !$1617d61110f74a7d$export$89ce434956e92c43(event, this.$parent)) { this.show = false; this.init(this.option); } }); } } add(callback) { if (typeof callback === 'function') this.option.push(callback(this.art)); else this.option.push(callback); this.cache = new Map(); this.events.forEach((event)=>event() ); this.events = []; this.$parent.innerHTML = ''; this.option = $e5ec7c417fcf0d47$var$makeRecursion(this.option); this.init(this.option); } creatHeader(item) { const { icons: icons , events: { proxy: proxy } , } = this.art; const $item = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($item, 'art-setting-item'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($item, 'art-setting-item-back'); const $left = $1617d61110f74a7d$export$10d8903dec122b9d($item, ''); const $icon = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($icon, 'art-setting-item-left-icon'); $1617d61110f74a7d$export$10d8903dec122b9d($icon, icons.arrowLeft); $1617d61110f74a7d$export$10d8903dec122b9d($left, $icon); $1617d61110f74a7d$export$10d8903dec122b9d($left, item._parentItem.html); const event = proxy($item, 'click', ()=>{ this.init(item._parentList); }); this.events.push(event); return $item; } creatItem(item) { const { icons: icons , events: { proxy: proxy } , } = this.art; const hasChildren = item.selector && item.selector.length; const $item = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($item, 'art-setting-item'); if (item.default) $1617d61110f74a7d$export$d2cf6cd1dc7067d3($item, 'art-current'); const $left = $1617d61110f74a7d$export$10d8903dec122b9d($item, ''); const $right = $1617d61110f74a7d$export$10d8903dec122b9d($item, ''); const $icon = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($icon, 'art-setting-item-left-icon'); $1617d61110f74a7d$export$10d8903dec122b9d($icon, hasChildren ? item.icon || icons.config : icons.check); $1617d61110f74a7d$export$10d8903dec122b9d($left, $icon); item._$icon = $icon; $6b21bd176607d26d$export$8afb76124cf08683(item, 'icon', { get () { return $icon.innerHTML; }, set (value) { if (typeof value === 'string' || typeof value === 'number') $icon.innerHTML = value; } }); const $html = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($html, 'art-setting-item-left-text'); $1617d61110f74a7d$export$10d8903dec122b9d($html, item.html || ''); $1617d61110f74a7d$export$10d8903dec122b9d($left, $html); item._$html = $html; $6b21bd176607d26d$export$8afb76124cf08683(item, 'html', { get () { return $html.innerHTML; }, set (value) { if (typeof value === 'string' || typeof value === 'number') $html.innerHTML = value; } }); if (hasChildren) { const $tooltip = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($tooltip, 'art-setting-item-right-tooltip'); $1617d61110f74a7d$export$10d8903dec122b9d($tooltip, item.tooltip || ''); $1617d61110f74a7d$export$10d8903dec122b9d($right, $tooltip); item._$tooltip = $tooltip; $6b21bd176607d26d$export$8afb76124cf08683(item, 'tooltip', { get () { return $tooltip.innerHTML; }, set (value) { if (typeof value === 'string' || typeof value === 'number') $tooltip.innerHTML = value; } }); const $arrow = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($arrow, 'art-setting-item-right-icon'); $1617d61110f74a7d$export$10d8903dec122b9d($arrow, icons.arrowRight); $1617d61110f74a7d$export$10d8903dec122b9d($right, $arrow); } const event1 = proxy($item, 'click', async (event)=>{ if (hasChildren) this.init(item.selector, item.width); else { $1617d61110f74a7d$export$ff1a70dcfa68e743($item, 'art-current'); if (item._parentList) this.init(item._parentList); if (item._parentItem && item._parentItem.onSelect) { const result = await item._parentItem.onSelect.call(this.art, item, $item, event); if (item._parentItem._$tooltip) { if (typeof result === 'string' || typeof result === 'number') item._parentItem._$tooltip.innerHTML = result; } } } }); this.events.push(event1); return $item; } init(option, width) { if (this.cache.has(option)) { const $panel = this.cache.get(option); $1617d61110f74a7d$export$ff1a70dcfa68e743($panel, 'art-current'); $1617d61110f74a7d$export$37a5fde709c1db82(this.$parent, 'width', `${$panel.dataset.width}px`); } else { const $panel = document.createElement('div'); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($panel, 'art-setting-panel'); if (option[0] && option[0]._parentItem) $1617d61110f74a7d$export$10d8903dec122b9d($panel, this.creatHeader(option[0])); for(let index = 0; index < option.length; index++)$1617d61110f74a7d$export$10d8903dec122b9d($panel, this.creatItem(option[index])); $panel.dataset.width = width || this.art.constructor.SETTING_WIDTH; $1617d61110f74a7d$export$10d8903dec122b9d(this.$parent, $panel); this.cache.set(option, $panel); $1617d61110f74a7d$export$ff1a70dcfa68e743($panel, 'art-current'); $1617d61110f74a7d$export$37a5fde709c1db82(this.$parent, 'width', `${$panel.dataset.width}px`); if (option[0] && option[0]._parentItem && option[0]._parentItem.mounted) option[0]._parentItem.mounted.call(this.art, $panel, option[0]._parentItem); } } } class $3978873f41bb02b6$export$2e2bcd8739ae039 { constructor(){ this.name = 'artplayer_settings'; this.settings = {}; } get(key) { try { const storage = JSON.parse(window.localStorage.getItem(this.name)) || {}; return key ? storage[key] : storage; } catch (error) { return key ? this.settings[key] : this.settings; } } set(key, value) { try { const storage = Object.assign({}, this.get(), { [key]: value }); window.localStorage.setItem(this.name, JSON.stringify(storage)); } catch (error) { this.settings[key] = value; } } del(key) { try { const storage = this.get(); delete storage[key]; window.localStorage.setItem(this.name, JSON.stringify(storage)); } catch (error) { delete this.settings[key]; } } clear() { try { window.localStorage.removeItem(this.name); } catch (error) { this.settings = {}; } } } function $8e33b1de5b364dcf$export$2e2bcd8739ae039(art) { art.on('ready', ()=>{ art.layers.add({ name: 'miniProgressBar', mounted ($progressBar) { art.on('destroy', ()=>{ $progressBar.style.display = 'none'; }); art.on('video:timeupdate', ()=>{ $progressBar.style.width = `${art.played * 100}%`; }); art.on('setBar', (type, percentage)=>{ if (type === 'played') $progressBar.style.width = `${percentage * 100}%`; }); } }); }); return { name: 'miniProgressBar' }; } function $c1e42da5837b57c2$export$2e2bcd8739ae039(art) { const { option: option , constructor: constructor , template: { $player: $player , $video: $video } , } = art; art.on('fullscreenWeb', (state)=>{ if (state) { const { videoWidth: videoWidth , videoHeight: videoHeight } = $video; const { clientWidth: viewWidth , clientHeight: viewHeight } = document.documentElement; if (videoWidth > videoHeight && viewWidth < viewHeight || videoWidth < videoHeight && viewWidth > viewHeight) // There is a conflict with the fullscreen event, and it is changed to asynchronous execution setTimeout(()=>{ $1617d61110f74a7d$export$37a5fde709c1db82($player, 'width', `${viewHeight}px`); $1617d61110f74a7d$export$37a5fde709c1db82($player, 'height', `${viewWidth}px`); $1617d61110f74a7d$export$37a5fde709c1db82($player, 'transform-origin', '0 0'); $1617d61110f74a7d$export$37a5fde709c1db82($player, 'transform', `rotate(90deg) translate(0, -${viewWidth}px)`); $1617d61110f74a7d$export$d2cf6cd1dc7067d3($player, 'art-auto-orientation'); }, constructor.MOBILE_AUTO_ORIENTATION_TIME); } else if ($1617d61110f74a7d$export$4ea3d958472af68f($player, 'art-auto-orientation')) { $1617d61110f74a7d$export$37a5fde709c1db82($player, 'width', null); $1617d61110f74a7d$export$37a5fde709c1db82($player, 'height', null); $1617d61110f74a7d$export$37a5fde709c1db82($player, 'transform', null); $1617d61110f74a7d$export$37a5fde709c1db82($player, 'transform-origin', null); $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-auto-orientation'); art.aspectRatioReset = true; art.autoSize = option.autoSize; art.notice.show = ''; } }); art.on('fullscreen', (state)=>{ const lastOrientation = screen.orientation.type; if (state) { const { videoWidth: videoWidth , videoHeight: videoHeight } = $video; const { clientWidth: viewWidth , clientHeight: viewHeight } = document.documentElement; if (videoWidth > videoHeight && viewWidth < viewHeight || videoWidth < videoHeight && viewWidth > viewHeight) { const oppositeOrientation = lastOrientation.startsWith('portrait') ? 'landscape' : 'portrait'; screen.orientation.lock(oppositeOrientation).then(()=>{ $1617d61110f74a7d$export$d2cf6cd1dc7067d3($player, 'art-auto-orientation-fullscreen'); }); } } else if ($1617d61110f74a7d$export$4ea3d958472af68f($player, 'art-auto-orientation-fullscreen')) screen.orientation.lock(lastOrientation).then(()=>{ $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-auto-orientation-fullscreen'); }); }); return { name: 'autoOrientation', get state () { return $1617d61110f74a7d$export$4ea3d958472af68f($player, 'art-auto-orientation'); } }; } function $78b87c2a2d050eb1$export$2e2bcd8739ae039(art) { const { i18n: i18n , storage: storage , constructor: constructor , template: { $poster: $poster } , } = art; art.on('video:timeupdate', ()=>{ const times = storage.get('times') || {}; const keys = Object.keys(times); if (keys.length > constructor.AUTO_PLAYBACK_MAX) delete times[keys[0]]; times[art.option.url] = art.currentTime; storage.set('times', times); }); art.on('ready', ()=>{ const times = storage.get('times') || {}; const currentTime = times[art.option.url]; if (currentTime) { art.seek = currentTime; $1617d61110f74a7d$export$37a5fde709c1db82($poster, 'display', 'none'); art.notice.show = `${i18n.get('Auto playback at')} ${$f82eff12ae1758cb$export$bfdd1c721864a50a(currentTime)}`; } }); return { name: 'autoPlayback', get times () { return storage.get('times') || {}; }, clear () { return storage.del('times'); } }; } function $723aeb30421d5ffe$export$2e2bcd8739ae039(art) { const { constructor: constructor , events: { proxy: proxy } , template: { $player: $player , $video: $video } , } = art; let timer = null; let isPress = false; const onStart = (event)=>{ if (event.touches.length === 1 && art.playing) timer = setTimeout(()=>{ isPress = true; art.playbackRate = constructor.FAST_FORWARD_VALUE; $1617d61110f74a7d$export$d2cf6cd1dc7067d3($player, 'art-fast-forward'); }, constructor.FAST_FORWARD_TIME); }; const onStop = ()=>{ clearTimeout(timer); if (isPress) { isPress = false; art.playbackRate = 1; $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-fast-forward'); } }; proxy($video, 'touchstart', onStart); proxy(document, 'touchmove', onStop); proxy(document, 'touchend', onStop); return { name: 'fastForward', get state () { return $1617d61110f74a7d$export$4ea3d958472af68f($player, 'art-fast-forward'); } }; } function $987d9aaf8fa2e706$export$2e2bcd8739ae039(art) { const { layers: layers , icons: icons , template: { $player: $player } , } = art; layers.add({ name: 'lock', mounted ($el) { const $lock = $1617d61110f74a7d$export$10d8903dec122b9d($el, icons.lock); const $unlock = $1617d61110f74a7d$export$10d8903dec122b9d($el, icons.unlock); $1617d61110f74a7d$export$37a5fde709c1db82($lock, 'display', 'none'); art.on('lock', (state)=>{ if (state) { $1617d61110f74a7d$export$37a5fde709c1db82($lock, 'display', 'inline-flex'); $1617d61110f74a7d$export$37a5fde709c1db82($unlock, 'display', 'none'); } else { $1617d61110f74a7d$export$37a5fde709c1db82($lock, 'display', 'none'); $1617d61110f74a7d$export$37a5fde709c1db82($unlock, 'display', 'inline-flex'); } }); }, click () { if ($1617d61110f74a7d$export$4ea3d958472af68f($player, 'art-lock')) { $1617d61110f74a7d$export$c2255604a80b4506($player, 'art-lock'); art.emit('lock', false); } else { $1617d61110f74a7d$export$d2cf6cd1dc7067d3($player, 'art-lock'); art.emit('lock', true); } } }); return { name: 'lock', get state () { return $1617d61110f74a7d$export$4ea3d958472af68f($player, 'art-lock'); } }; } class $9d9cbfc93570c5e0$export$2e2bcd8739ae039 { constructor(art){ this.art = art; this.id = 0; const { option: option } = art; if (option.miniProgressBar && !option.isLive) this.add($8e33b1de5b364dcf$export$2e2bcd8739ae039); if (option.lock && $46f6a63658609cc7$export$d0a8044dce8ff2fc) this.add($987d9aaf8fa2e706$export$2e2bcd8739ae039); if (option.autoPlayback) this.add($78b87c2a2d050eb1$export$2e2bcd8739ae039); if (option.autoOrientation && $46f6a63658609cc7$export$d0a8044dce8ff2fc) this.add($c1e42da5837b57c2$export$2e2bcd8739ae039); if (option.fastForward && $46f6a63658609cc7$export$d0a8044dce8ff2fc && !option.isLive) this.add($723aeb30421d5ffe$export$2e2bcd8739ae039); for(let index = 0; index < option.plugins.length; index++)this.add(option.plugins[index]); } add(plugin) { this.id += 1; const result = plugin.call(this, this.art); const pluginName = result && result.name || plugin.name || `plugin${this.id}`; $9f39e86245920cd9$export$ff496a5a51be1527(!$6b21bd176607d26d$export$a4f4bb6b1453fff5(this, pluginName), `Cannot add a plugin that already has the same name: ${pluginName}`); $6b21bd176607d26d$export$8afb76124cf08683(this, pluginName, { value: result }); return this; } } class $741625d8671c484a$export$2e2bcd8739ae039 { constructor(art){ this.art = art; this.init(); } get current() { return this.art.option.ads[this.index]; } get prev() { return this.art.option.ads[this.index - 1]; } get next() { return this.art.option.ads[this.index + 1]; } init() { this.index = 0; this.isEnd = false; this.playing = false; this.urlCache = this.art.option.url; if (this.current) { this.playing = true; this.play(this.current); } } play(item = {}) { if (this.isEnd) return; this.art.switchUrl(item.url); this.art.once('video:timeupdate', ()=>{ this.art.emit('ads:start', item); }); this.art.once('video:ended', ()=>{ const next = this.next; if (next) { this.index += 1; this.play(next); } else this.end(); }); } end() { if (this.isEnd) return; this.isEnd = true; this.playing = false; this.art.option.url = this.urlCache; this.art.switchUrl(this.urlCache); this.art.emit('ads:end'); } } class $cf28796c28b9e292$export$2e2bcd8739ae039 { constructor(art){ const { option: option , events: { proxy: proxy } , template: { $video: $video } , } = art; for(let index = 0; index < $6bdef3f9911d4dfd$export$2e2bcd8739ae039.events.length; index++)proxy($video, $6bdef3f9911d4dfd$export$2e2bcd8739ae039.events[index], (event)=>{ art.emit(`video:${event.type}`, event); }); Object.keys(option.moreVideoAttr).forEach((key)=>{ $video[key] = option.moreVideoAttr[key]; }); if (option.muted) $video.muted = option.muted; if (option.volume) $video.volume = $f82eff12ae1758cb$export$7d15b64cf5a3a4c4(option.volume, 0, 1); if (option.poster) $video.poster = option.poster; if (option.autoplay) $video.autoplay = option.autoplay; if (option.playsInline) { $video.playsInline = true; $video['webkit-playsinline'] = true; } const typeName = option.type || $112d5cbf48554e5f$export$ba319cdd039ba52e(option.url); const typeCallback = option.customType[typeName]; if (typeName && typeCallback) { typeCallback($video, option.url, art); art.emit('customType', typeName); } else { $video.src = option.url; art.emit('url', $video.src); } } } let $cdf9fe9adb2d02f9$var$id = 0; const $cdf9fe9adb2d02f9$var$instances = []; class $cdf9fe9adb2d02f9$export$2e2bcd8739ae039 extends $a2113e5ff6e5df5a$export$2e2bcd8739ae039 { constructor(option, readyCallback){ super(); this.id = ++$cdf9fe9adb2d02f9$var$id; const mergeOption = $719e22089069758c$exports.mergeDeep($cdf9fe9adb2d02f9$export$2e2bcd8739ae039.option, option); this.option = ($parcel$interopDefault($cTKjd$optionvalidator))(mergeOption, $10469c873ed71d57$export$2e2bcd8739ae039); this.isReady = false; this.isFocus = false; this.isDestroy = false; this.whitelist = new $63bba146437a34c3$export$2e2bcd8739ae039(this); this.template = new $420c1882d92b952b$export$2e2bcd8739ae039(this); this.events = new $9dd1746ab026757b$export$2e2bcd8739ae039(this); if (this.whitelist.state) { this.storage = new $3978873f41bb02b6$export$2e2bcd8739ae039(this); this.icons = new $82c4f6420e2bb729$export$2e2bcd8739ae039(this); this.i18n = new $8988e731cb9b6b27$export$2e2bcd8739ae039(this); this.notice = new $6281e0d09498f459$export$2e2bcd8739ae039(this); this.player = new $8f55b19a5260c651$export$2e2bcd8739ae039(this); this.layers = new $87ad6b3f378139e4$export$2e2bcd8739ae039(this); this.controls = new $5fbd4a5b2c9a3876$export$2e2bcd8739ae039(this); this.contextmenu = new $058f60678a15f124$export$2e2bcd8739ae039(this); this.subtitle = new $832c66d5be9ddefa$export$2e2bcd8739ae039(this); this.ads = new $741625d8671c484a$export$2e2bcd8739ae039(this); this.info = new $d6c99f18c678401b$export$2e2bcd8739ae039(this); this.loading = new $e3e38774bcec1905$export$2e2bcd8739ae039(this); this.hotkey = new $3e1980c05dfeee5d$export$2e2bcd8739ae039(this); this.mask = new $846b6021e30a62e3$export$2e2bcd8739ae039(this); this.setting = new $e5ec7c417fcf0d47$export$2e2bcd8739ae039(this); this.plugins = new $9d9cbfc93570c5e0$export$2e2bcd8739ae039(this); } else this.mobile = new $cf28796c28b9e292$export$2e2bcd8739ae039(this); if (typeof readyCallback === 'function') this.on('ready', ()=>readyCallback.call(this) ); $cdf9fe9adb2d02f9$var$instances.push(this); } static get instances() { return $cdf9fe9adb2d02f9$var$instances; } static get version() { return "4.3.11"; } static get env() { return "production"; } static get build() { return "1651116320085"; } static get config() { return $6bdef3f9911d4dfd$export$2e2bcd8739ae039; } static get utils() { return $719e22089069758c$exports; } static get scheme() { return $10469c873ed71d57$export$2e2bcd8739ae039; } static get Emitter() { return $a2113e5ff6e5df5a$export$2e2bcd8739ae039; } static get validator() { return ($parcel$interopDefault($cTKjd$optionvalidator)); } static get kindOf() { return ($parcel$interopDefault($cTKjd$optionvalidator)).kindOf; } static get html() { return $420c1882d92b952b$export$2e2bcd8739ae039.html; } static get option() { return { container: '#artplayer', url: '', poster: '', title: '', type: '', theme: '#f00', volume: 0.7, isLive: false, muted: false, autoplay: false, autoSize: false, autoMini: false, loop: false, flip: false, playbackRate: false, aspectRatio: false, screenshot: false, setting: false, hotkey: true, pip: false, mutex: true, backdrop: true, fullscreen: false, fullscreenWeb: false, subtitleOffset: false, miniProgressBar: false, useSSR: false, playsInline: true, lock: false, fastForward: false, autoPlayback: false, autoOrientation: false, ads: [], layers: [], contextmenu: [], controls: [], settings: [], quality: [], highlight: [], plugins: [], whitelist: [], thumbnails: { url: '', number: 60, column: 10 }, subtitle: { url: '', type: '', style: {}, encoding: 'utf-8' }, moreVideoAttr: { controls: false, preload: $719e22089069758c$exports.isSafari ? 'auto' : 'metadata' }, icons: {}, customType: {}, lang: navigator.language.toLowerCase() }; } get proxy() { return this.events.proxy; } get query() { return this.template.query; } destroy(removeHtml = true) { this.events.destroy(); this.template.destroy(removeHtml); $cdf9fe9adb2d02f9$var$instances.splice($cdf9fe9adb2d02f9$var$instances.indexOf(this), 1); this.isDestroy = true; this.emit('destroy'); } } $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.NOTICE_TIME = 2000; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.SETTING_WIDTH = 250; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.SETTING_ITEM_WIDTH = 200; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.INDICATOR_SIZE = 14; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.INDICATOR_SIZE_ICON = 16; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.INDICATOR_SIZE_MOBILE = 18; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.INDICATOR_SIZE_MOBILE_ICON = 20; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.VOLUME_PANEL_WIDTH = 60; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.VOLUME_HANDLE_WIDTH = 12; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.RESIZE_TIME = 500; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.SCROLL_TIME = 200; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.SCROLL_GAP = 50; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.AUTO_PLAYBACK_MAX = 10; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.RECONNECT_TIME_MAX = 5; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.RECONNECT_SLEEP_TIME = 1000; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.CONTROL_HIDE_TIME = 3000; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.DB_CLICE_TIME = 300; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.MOBILE_AUTO_PLAYBACKRATE = 3; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.MOBILE_AUTO_PLAYBACKRATE_TIME = 1000; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.MOBILE_AUTO_ORIENTATION_TIME = 500; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.INFO_LOOP_TIME = 1000; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.FAST_FORWARD_VALUE = 3; $cdf9fe9adb2d02f9$export$2e2bcd8739ae039.FAST_FORWARD_TIME = 1000; const $cdf9fe9adb2d02f9$var$$style = document.createElement('style'); $cdf9fe9adb2d02f9$var$$style.textContent = (/*@__PURE__*/$parcel$interopDefault($fc322dd812272489$exports)); document.head.appendChild($cdf9fe9adb2d02f9$var$$style); window['Artplayer'] = $cdf9fe9adb2d02f9$export$2e2bcd8739ae039; // eslint-disable-next-line no-console console.log(`%c ArtPlayer %c ${$cdf9fe9adb2d02f9$export$2e2bcd8739ae039.version} %c https://artplayer.org`, 'color: #fff; background: #5f5f5f', 'color: #fff; background: #4bc729', '');